Posts

Check if mysql row exisits within foreach loop of php array -

Check if mysql row exisits within foreach loop of php array - i have array of items looping on , checking if value exists in database, if update it, if not create new entry. first item in array seen , returns true, after first 1 returns 0 if know fact in database right item_name , ticket_id. i have tried researching before asking, stumped @ point. help in advance. if($func == 'edit') { foreach ($additem $key => $value) { if (empty($key) || $key=='amount_paid') { continue; } $ticket_items = mysql_query("select * ticket_items ticket_id = '$ticket_id' , item_name = '$key'"); if (mysql_num_rows($ticket_items)) { print 'updated '. $key ."\n"; mysql_query("update ticket_items set item_name='$key', item_price='$value' ticket_id='$ticket_id'"); } else { print 'created ...

jquery - Bootstrap 3 Dropdown Slidedown Strange Behavior when Navbar Collapsed -

jquery - Bootstrap 3 Dropdown Slidedown Strange Behavior when Navbar Collapsed - so adding animations navbar dropdowns, reason accepted reply (adding slide effect bootstrap dropdown) seems break or become "regular" sized when sliding on little window sizes. so weird thing seems happen slideup animation article posted: // add together slidedown animation dropdown // $('.dropdown').on('show.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slidedown(5000); }); // add together slideup animation dropdown // $('.dropdown').on('hide.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideup(5000); }); i can re-create , paste lines google chrome's console on http://bootswatch.com/default/, alter resolution 1 navbars collapse, , break. (i extended animation times seek , troubleshoot.) normal: broken slideup: but reason, if run $(...

linux kernel - access GPIO from user space -

linux kernel - access GPIO from user space - i trying access intel (cavecreek) gpio controller user space. getting: "no such device " error when trying echo /sys/class/gpio/export. here's error message: echo 32 > /sys/class/gpio/export bash: echo: write error: no such device the error message seems suggest need have device connected gpio. documentation doesn't seem mention that. nil beingness reserved far can tell dumping out /sys/kernel/debug/gpio. have i2c mux connected gpio pins. give thanks nadvance below more info on kernel , configuration the kernel is 3.14 here's relevant config setting: config_arch_want_optional_gpiolib=y config_gpiolib=y config_gpio_devres=y config_gpio_acpi=y config_debug_gpio=y config_gpio_sysfs=y in case, problem kernel source 3.14. scheme uses intel rangely. in source lpc_ich.c, .gpio_version field missing lpc_dh89xxcc. added field, recompiled , kernel able enumerate gpiopin, although display d...

http - Why digest are used in Rails 4 for static content instead of ETag -

http - Why digest are used in Rails 4 for static content instead of ETag - i think http's etag mechanism invalidating stale cached content. , digests used same sake. why improve , why etags not enough? because etags still require client nail server see if client's cached re-create still fresh. rails puts far future expires header on assets means client never nail server 1 time again asset, has cached. digests become means server create client new version of asset. think rails used utilize timestamps instead of digests, digests have added, little benefit if revert asset previous state, digest same, , client may still have cached. ruby-on-rails http asset-pipeline etag

asp.net - form authentication - how to clear session with formsauthenication.signout -

asp.net - form authentication - how to clear session with formsauthenication.signout - i have <system.webserver> <modules> <add name="formsauthenticationmodule" type="system.web.security.formsauthenticationmodule" /> <remove name="urlauthorization" /> <add name="urlauthorization" type="system.web.security.urlauthorizationmodule" /> <remove name="defaultauthentication" /> <add name="defaultauthentication" type="system.web.security.defaultauthenticationmodule" /> </modules> </system.webserver> <authentication mode="forms"> <forms loginurl="login.aspx" name=".test" timeout="15"> </forms> </authentication> <authorization> <deny users="?"/> </authorization> <location path="images"> <system.web> <authorization...

actionscript 3 - Get video encoding type or mime type before playing -

actionscript 3 - Get video encoding type or mime type before playing - i'm developing video player in as3. need switch between mp4 , flv files. easy if do: netstream.play(encoding + ":" + videosrc); the problem getting value encoding . don't want rely on extension observe this, since there might not one. thought create head request on file , read content-type header, can't seem urlrequest , urlrequestheader since back upwards post , get. how can observe encoding without kind of prior knowledge? actionscript-3 flash

How can I enable and collect trace for DB2 through WebSphere? -

How can I enable and collect trace for DB2 through WebSphere? - i enable trace db2 i'm accessing via datasource in websphere application server version 8. in server's bootstrap.properties file after variable com.ibm.ws.logging.trace.specification= add together next code: for version 6 or later: *=info:was.j2c=all:rra=all:was.database=all:transaction=all for version 5: rra=all=enabled:was.database=all=enabled:j2c=all=enabled more info can found on ibm website: https://www-304.ibm.com/support/docview.wss?rs=71&uid=swg21196160#wasconnection in datasource need specify tracelevel property well. example: <datasource id="db2" jndiname="jdbc/db2" jdbcdriverref="db2driver" > <properties.db2.jcc databasename="mydb" tracelevel="-1"/> </datasource> db2 websphere ibm trace websphere-8