Jump to content

nadeemshafi

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

nadeemshafi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi guys I have to mass delete 1000's of files on api call, i have a queue table but i am thinking of the best way to delete the files without crashing the server, files can range from 1mb to 10gb or more idea 1. 1min cron - check to see if any pending if so exit, otherwise select 50 from queue and foreach mark as 'pending' and delete and mark as done maybe sleep. (file sizes vary so 50 could mean 1 mb or 100gb) idea 2. 1sec cron - check for pending if so exit otherwise select 1 from queue mark as pending and delete then mark as done ( I like this one ) idea 3 select all files with no status and foreach delete and then sleep while(file exists) ( while loop has potential of lockups ) I would appreciate if you could give me some thought son this I like idea 2. Thanks
  2. hi guys im using the pear xml serializer but i am running into a problem, i have a framework for an API which i use to create an array and then output as xml with xml serializer. The issue i have run into: i define a default tag before i create an array so my array is for example array( "a" "b" ) both of these will get labeled video in there xml thats fine <video>a</video> <video>b</video> ok so i have a whole bunch of "videos" with there _attributes set. inside each video i need multiple media elements <media x=2>x</media> <media x=4>x</media> <media x=5>x</media> my problem is that you cant add multiple items to an array with the same Key. array( "media" => x, "media" => x, "media" => x ) and if i let it default then the default tag is video plus i cant set the _attributes of the tag unless i make the value of the key into an array eg. array( "media" => array("_aributes" => array("x" => 1), "mediaValue" => "x"), "media" => array("_aributes" => array("x" => 2), "mediaValue" => "x"), "media" => array("_aributes" => array("x" => 2), "mediaValue" => "x") ) this will give me <media x=2><mediaValue>x</mediaValue></media> <media x=4><mediaValue>x</mediaValue></media> <media x=5><mediaValue>x</mediaValue></media> at the moment i get <video> <media x=2><mediaValue>x</mediaValue></media> </video> <video> <media x=4><mediaValue>x</mediaValue></media> </video> <video> <media x=5><mediaValue>x</mediaValue></media> </video> i want to get <media x=2>x</media> <media x=4>x</media> <media x=5>x</media> any help ? thanks im relay stuck on this one plus my API framework has constraints because it initializes the serializer at the end and inserts the array and parses outputs it even an injection work around would be good but the serializer seems to convert all tags into html char codes regards
  3. Thanks for your help, thats perfect
  4. hi i have this regex /^([a-zA-Z0-9_\-\.\']+)$/ it allows letters and number and single quotes, i want to limit the ammount of single quotes to {0,1} but i cant seem to get the quantifier in the right place. Any help appreciated.
  5. hi guys, just wanted to ask, i downloaded the subversion repo of my zf proj to my desktop and my laptop and work machine and it works fine, work machine is windows 7 and rest vista all fine even fine on centos all the configs are the same except the not working one has UAC on, maybe issues with xamp itself ? problem is my coworker has windows 7 on a laptop and i made sure all htaccess , vhosts and everything is set right with env var testing, but it is not finding the MODELS directory eg. it cant instantiate a model because the directory is not being added as an include path any ideas ? problem only happening on my coworkers machine i cant think of anything i set htaccess same as mine, httpd.conf same php ini same, it works on all my machines finds model directory app.ini same it just wont find models dir on his but does on all my others ???? it just says Class Application_Model_Permissions not found i did do a fresh install of xaamp whilst UAC was on maybe thats it ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.