Posts

mysql - How to run the PHP and/or CodeIgniter function continuously -

i working on location-based social networking website integrating foursquare . have used login foursquare, whenever user login foursquare account access token using data foursquare account large , takes lot of time. that's why looking solution retrieve foursquare data continuously in cycle. is there way run codeigniter or php function continuously update users data instead of updating data scheduled basic using cronjob , should run once run function run infinite time without stop. note: i using curl data foursquare thanks in advance! you can write simple php script following , run script scheduling in cron job , once script runs, delete cron tab (the script keep runing): while (true) { // setup curl request foursquare // fire curl request , results // processing // can put sleep here before again loops // here magic break infinite loop - check // variable database table or ini file , break loop // if variable set } hope helps...

.net - WMI instancename retrieved from performancecounter (for a network card) is not then accepted when used to retrieve counter value -

my basic problem want find total network io list of ip addresses. many of servers have different nics , have teamed nics. since seems need have exact name network interface instance have created array of instance names: dim category new performancecountercategory("network interface") dim instancenames string() = category.getinstancenames() i step through names , add list of performancecounter objects: each instancename in instancenames network.add(new performancecounter()) network(i) .categoryname = "network interface" .countername = "bytes total/sec" .instancename = instancename .machinename = ip_address end try network_usage = network_usage + network(i).nextvalue() catch ex exception end try = + 1 next the problem names generated first part of code raise e...

c# - Copy file from internal server to remote server in IIS 7 -

i have application written in c# after creating pdf file, needs save pdf file virtual folder in remote server. server in dmz , created 2 users in both servers same permissions. 2 servers not in same network. i'm able access dummy pdf file using string stempsourcefilespec = "https://servername/virtualfolder/dummy.pdf"; b = file bytes; //here write bytes system.io.file.writeallbytes(stempsourcefilespec, b) , i'm having problems when copying pdf file same virtual directory. user i'm using has full permissions on folder. this works internally when using \servername\folder\, doesn't work when try save remote virtual directory. thoughts? try convert virtualpath phyicalpath in handler, such system.web.httpserverutil.mappath http://asp.net.bigresource.com/uploading-files-to-server-and-saving-outside-virtual-path-bmvjftyf4.html#l9lpkwyji http://forums.iis.net/t/1157234.aspx

php - Form post not working in while loop result -

i'm pulling customer bookings database dependent upon date, seems working fine. decided add button within form, in table, send record invoicing page. seems work except first result in table. form post post invoicing page below first result, first result nothing, refresh page. when looking @ source code looks correct, isn't working if there 1 result or doesn't work first result, if there more one. need use other while loop? <?php $i=0; while ($i < $num) { $id = mysql_result($update4, $i, "id"); $booking_date = mysql_result($update4, $i, "booking_date"); $date = date("m/d/y", strtotime($booking_date)); $customer_name = mysql_result($update4, $i, "customer_name"); $customer_address = mysql_result($update4, $i, "customer_address"); $customer_city = mysql_result($update4, $i, "customer_city"); $starter1 = mysql_result($update4, $i, "start_time"); $starter = date("g:i a...

PHP-Submit a form to different pages according to variable values -

i wondering in php web page, like <form method = "post" action = ?> age: <input type = "text" name="age"> submit: <input type="submit"> </form> for example, if input age larger 18, go page: a.php; else goto b.php how can fulfil that, in current page or in next forwarding page? more specifically, if want in current page, what think action="function()", , inside function, judgement go a.php or b.php. correct way write action , function()? , saw using onclick="..." well, difference? if want in next page, we can write action="c.php" , judgement in c.php page. if so, how in c.php page? btw, way common used way? thanks, eve best way submit same page. <form method = "post" action = 'c.php'> age: <input type = "text" name="age"> submit: <input type="submit"> </form> in c.php ...

spring - Use an ApplicationContextListener or @PostConstruct to -

in 1 of our beans reading file based data in memory. would better applicationcontextlistener e.g. calling beans init() method, or adding @postconstruct init() method container automatically? you can use: 1. @postconstruct 2. initializingbean interface 3. <bean class="your bean class" init-method="your init method"/> attribute : init-method : name of custom initialization method invoke after setting bean properties. method must have no arguments, may throw exception. alternative implementing spring's initializingbean interface or marking method postconstruct annotation. they alternative: if program totally annotated go annotation, if xml go xml (i don't mixing , don't need ask if implements feature annot or xml) edit: context listener: called every context refresh (usually once, @ startup) initializingbean or @postconstruct : apply bean's lifecycle called every time bean created (depends scope) in case us...

common lisp - How to insert multiple records at once using the clsql provided FDML -

is there way of using given fdml interface insert multiple records @ once? the given insert-record statement can handle 1 value tuple @ once , idea of calling function uncountable times, instead of once bugging me quite bit, , guess (without having done profiling) not fastest approach either. how this? ; slime 2013-04-02 cl-user> (ql:quickload "clsql") load "clsql": load 1 asdf system: uffi install 1 quicklisp release: clsql ; fetching #<url "http://beta.quicklisp.org/archive/clsql/2013-04-20/clsql-20130420-git.tgz"> ; 900.99kb ================================================== 922,610 bytes in 1.92 seconds (468.78kb/sec) ; loading "clsql" [package uffi].................................... [package cmucl-compat]............................ [package clsql-sys]............................... [package clsql]................................... [package clsql-user].............................. .....................