Posts

java - Assigning occurrences of whitespace to variables -

i wondering if possible assign occurrences of characters variable until hit white space character. instance if have string "17 23 4 54 6 343 4" how assign first number 17 variable, , next subsequent numbers. string values = "17 23 4 54 6 343 4"; string[] variables = values.split("\\s"); now you've got array variables holds 17 in variables[0] , 23 in variables[1] , on.

php - SoapFault exception: Could not connect to host -

sometimes fail call web service. this problem happens time. what problem? error: soapfault exception: [http] not connect host in 0 [internal function]: soapclient->__dorequest('<?xml version="...', http://.', '', 1, 0) the problem solved.the problem cache ini_set('soap.wsdl_cache_enabled',0); ini_set('soap.wsdl_cache_ttl',0);

c# - Preserving DateTime values in DataSet returned from WCF service -

i returning dataset wcf web service client. server , client in different time zones. datetime columns server's local time, others in utc. the problem datetime values in returned dataset converted client's local time. there way preserve datetime values server sending back? return datetimeoffset .

returning xml string - how to parse xml file using JQuery/Json -

when alert returning string this: data "<?xml version="1.0" encoding="utf-8" ?> <xml xmlns="http://www.opengis.net/kml/2.2"> <document> <name>john smith</name> <description>stackoverflow</description> <total>50</total> </document> </xml>" update: tried using method getjson , alerts never execute inside find('document').each..... $.getjson(_url, function (data) { alert(data); $(data).find('document').each(function () { debugger var name = $(this).find('name'); var desc = $(this).find('description').text(); var total = $(this).find('total').text() }); }); how read xml file in jquery, below returning me string , can see when alert(data); $.getjson(url, {}, ...

iphone - Unable to retrieve and view results from a SQLite database -

dear fellow iphone , objective-c developers: i trying build skills iphone developer, , presently working on using sqlite database. have created sqlite table follows in grocerylistappdelegate.m class: - (void)applicationdidfinishlaunching:(uiapplication *)application { self.database = [[[isdatabase alloc] initwithfilename:@"testdb.sqlite"] autorelease]; if(![[database tablenames] containsobject:@"groceryitem"]) { [database executesql:@"create table groceryitem(primarykey integer primary key autoincrement, name text not null, number integer not null)"]; [database executesql:@"insert groceryitem (name, number) values ('apples', 5)"]; [database executesql:@"insert groceryitem (name, number) values ('oranges', 3)"]; } [window addsubview:navigationcontroller.view]; [window makekeyandvisible]; } i make sql call in rootviewcontroller.m class: - (void)viewdidload { [super viewdidload]; gro...

internationalization - How do the Delphi 2010 IDE's default control fonts work when internationalized? -

i'm using delphi 2010. i've written application in english. provide tstringgrid users can create cross reference of component captions english own language. in every tform's create, traverse form's controls (which have unique tags), changing caption (or hint) property user-provided translations. this implemented , working, @ least in handful of common western languages french, italian, etc. minor screen layout issues (wider buttons, etc.) handle manually occur. not using third-party internationalization tool or delphi's, unless very, bad news in answers question! :-) next time, maybe i'll use tsilang (but not d2010's, heavy me...) when add components in ide, leave default font ide assigns as-is. (it's ms sans serif in locale.) happen when program run in japan, example? delphi rtl change fonts of standard components local font? font display default ascii text on components and allow display characters in their local font in cases they...

HTML5 <html> attributes xmlns, lang, xml:lang -

i don't understand html5 specifications lang , xml:lang attributes of opening <html> tag. scrolling bit, understand xmlns "talisman" (has no effect), lang , xml:lang ? should used? if so, should set to? everything i've seen , heard suggests should stick to <!doctype html> <html> <head> <meta charset='utf-8'> (or whatever character set want). if want language associated page can use "lang" attribute on <html> tag. since html5 not xml, really, find weird use xml: namespace stuff.