Posts

Generating a deck of cards in C -

i need assignment. supposed generate , print 52 cards, i'm having trouble understanding how print "ace", "2".....etc. for(i=0; < 52; i++) { if(i%13==0) { printf("card %2d = king %s\n", i,suits[i/13]); } else if(i%13==1) { printf("card %2d = ace %s\n", i,suits[i/13]); } else if(i%13==11) { printf("card %2d = jack %s\n", i,suits[i/13]); } else if(i%13==12) { printf("card %2d = queen %s\n", i,suits[i/13]); } else { printf("card %2d = %2d %s\n", i, i%13, suits[i/13]); } } another solution adding more condition loop "king" "ace" "jack" , "queen"

text box not working proper in contact form7 wordpress in chrome -

i using contact form 7 in wordpress. basically, have text input. facing weird issue on input box. behaviour happens in chrome (i using version 16.0.2). to reproduce issue: place focus/cursor in input box , type few characters without taking focus out of box, again click inside text-input box try entering further text there nothing displaying when hover text box contain display in text box.. again click in text box , trying type thing nothing act without out text box.. please me .. remove float of text box. .slider .form input { float: none !important; }

java - Using Embedd class or storing foreign keys for a Google Datastore? -

this best practice question regarding google datastore. i'm trying build object relationships , i'm seeing 2 options directly embed child class @persistent in parent class using google key class , store own foreign keys strings in related classes third option not available, jdo join app engine not support join queries: cannot query parent entity using attribute of child entity. (you can query property of embedded class, because embedded classes store properties on parent entity. see defining data classes: embedded classes.) my worry using option 1 simple search query return unneeded data. example being product class , productdetail class. when customer searches products searching based on category, name , sorted price. of simple info in product class. in productdetail class hold large description strings, links images, lists of key attributes. in product class embed productdetail class or create foreign key property holds key value of productdetail cl...

mysql - how to get the passed value data from the database and show in a html table using php -

i have database , have table named supplier .it contains different columns region,country,9xx,10xx . i fetching 9xx,10xx columns in drop down.when user select of them,selected value go to page mysql query performed , result shown in html table. the problem not geting records database passed values(i.e supplierid : 10xx or 9xx) ,please see code <?php $dbhost = 'localhost'; // localhost $dbusername = 'xxxxxxxxx'; $dbpassword = 'xxxxxxxxxx'; $dbdatabase = 'xxxxxxxxxxx'; $db = mysql_connect($dbhost, $dbusername, $dbpassword) or die ("unable connect database server."); mysql_select_db ($dbdatabase, $db) or die("could not select database."); $supplierid = $_get['supplier_id']; //supplierid 10xx or 9xx $sql = "select region,country,$supplierid supplierprice order country asc "; $sql_select = mysql_query($sql); while($rows=mysql_fetch_array($sql_select)) ...

Is com.google.android.c2dm.intent.REGISTRATION deprecated? -

short version: intent com.google.android.c2dm.intent.registration still used @ or has been deprecated gcm? longer version: google's gcm-demo-client declares intent in filter, however, if follow same procedure, valid registration id when call gcm.register() , then , broadcast receiver receives additional registration id because of registration filter, , second registration id bogus (i can't send notification it). at point, i'm considering removing registration filter (and keeping receive ) want make sure i'm not missing important in protocol. you looking @ older version of official google demo. current version doesn't use com.google.android.c2dm.intent.registration , can see here: <receiver android:name=".gcmbroadcastreceiver" android:permission="com.google.android.c2dm.permission.send" > <intent-filter> <!-- receives actual messages. --> <action andro...

How can I access multiple content in webview in android -

i trying use webview. use ourbrow.loadurl("https://www.google.com/finance/chart?client=firefox-a&rls=org.mozilla:en-us:official&channel=sb&biw=1366&bih=390&q=+val[from]+val[to]+&tkr=1&p=5y&chst=vkc&chs=229x94&chsc=1&ei=vyuxu7j6jaxq0qgh3og4cq"); logcat : 03-06 12:50:27.551: d/adnan(14485): android.webkit.webview{413ab878 vfedhvcl ........ 156,340-456,640 #7f0a0010 app:id/chartwebview} if use ourbrow.loadurl(" https://www.google.com/finance/chart?client=firefox-a&rls=org.mozilla:en-us:official&channel=sb&biw=1366&bih=390&q=currency:bdthkd&tkr=1&p=5y&chst=vkc&chs=229x94&chsc=1&ei=vyuxu7j6jaxq0qgh3og4cq "); then ok... need use dynamic data not fixed one. you have wrongly written it.. you can use : "static_part"+dynamic_part+" so need write : ourbrow.loadurl("https://www.google.com/finance/chart?client=firefox-a&rls=org....

How to get NEST to work with Proxy, like Fiddler -

i'm trying pass elasticsearch calls nest through fiddler can see actual json requests , responses. i've done following create client, requests not being pushed through proxy (it doesn't matter if fiddler on or off, request still gets elasticsearch). connectionsettings cs = new connectionsettings(uri); cs.setproxy(new uri("http://localhost:8888"),"username", "password"); elasticclient = new elasticclient(cs); fiddler has no username/password requirements pass random text. i can confirm @ point before executing request elasticclient has proxy property filled in uri specified above, though trailing slash added nest. thanks okay, so, gave on nest proxy settings - didn't seem make difference. however, setting host on nest client " http://ipv4.fiddler:9200 " instead of localhost routes call through fiddler , achieved desired result of allowing me see both requests , responses elasticsearch.