Posts

php - How to switch ZendX_JQuery back to use CDN rather than local library? -

i have following settings jquery in application.ini because it's used in every controller , every action: [production] pluginpaths.zendx_application_resource_ = "zendx/application/resource" resources.jquery.version = 1.5 resources.jquery.ui_enable = true resources.jquery.ui_version = 1.8.9 [development : production] resources.jquery.localpath = "/js/jquery-1.5.min.js" resources.jquery.ui_localpath = "/js/jquery-ui-1.8.9.custom.min.js" i don't want use cdn in development because might slow because i'm behind proxy. in 1 case want use cdn because base uri has different. the below trick core library: $this->view->jquery()->setlocalpath(''); but doesn't work ui library: $this->view->jquery()->setuilocalpath(''); any ideas? you try if works $config = new zend_config_ini( application_path . '/configs/application.ini', application_env ); $this->view->jquery()->...

How to create a mixed data buffer in Java? -

i need create buffer contains byte , string data. how can in java? you can use plain array of objects object[] or implementation of collections (list, set) etc. but why? if want store different types of data in same collection, check design. if still wish create wrapper interface , many want implementations. each implementation store type if data. create collection stores these wrappers: interface storagecell<t> { } class stringcell implements storagecell<string>{} class bytecell implements storagecell<byte>{} and buffer is: collection<? extends storagecell> buffer = new linkedlist<storagecell>();

Execute .bat file from java? -

i come previous problem executing .bat file java program. when execute java code, don't understand why it's looking .bat file in project directory of eclipse. i declare path : "cmd.exe", "/c", "start", "c:\\file\\batfile.bat" if explain me clearly, please. thank much! i use win xp , eclipse helios. here code: string cmd; try { string[] command = { "cmd.exe", "/c", "start", "c:\\file\\batfile.bat" }; runtime r = runtime.getruntime(); process p = r.exec(command); p.waitfor(); } catch (exception e) { system.out.println("execution error");} the process cmd.exe (picked path environment variable) created current working directory same in parent process (eclipse.exe = java). c:\eclipse or workspace dir. if cant find file (c:\file\batfile.bat) tries curr...

Handling field types in database interaction with R -

i use rmysql , mysql database store datasets. data gets revised or store results database well. long story short, there quite interaction between r , database in use case. most of time use convenience functions dbwritetable , dbreadtable to write , read data. unfortunately these ignoring r data types , mysql field types. mean expect mysql date fields end in date or posix class. other way around i´d think these r classes stored corresponding mysql field type. means date should not character – i not expect distinguish between float , doubles here... i tried use dbgetquery – same result there. there have missed when reading manual or not possible (yet) in these packages? nice work around? edit: @mdsummer tried find more in documentation, found these disappointing lines: `mysql tables read r data.frames, without coercing character or logical data factors. while exporting data.frames, factors exported character vectors. integer columns imported r integer vectors, except cas...

iphone - when an action sheet is visible in a mode (i.e. portrait), should it rotate in the other one (i.e. landscape)? -

i have app supports both orientations. when action sheet displayed in portrait mode, view doesn't rotate in landscape mode. should so? or view should rotate , action sheet resize? thank in advance. fran ... action sheet displayed in orientation displayed. not rotate. try official app mail or notes.

c++ - Pass data as code -

i'm trying interpret formula given input: y= y argv[1][s] 5; where argv[1][s] can + - * example. y= y+5; y= y*5; i use check specific values, it's more interesting find out why doesn't work. error c2146: syntax error : missing ';' before identifier 'argv' i think happens + passed '+' no operation results. there way unquote this? no, because that's not how c++ works. code must make sense @ compile-time, compiler can convert fixed set of assembler instructions. run-time text not "substituted" in; there no equivalent of "eval" in interpreted languages. if want this, you'll need like: switch (argv[1][s]) { case '+': y = y + 5; break; case '-': y = y - 5; break; case '*': y = y * 5; break; default: std::cerr << "unrecognised operator: \"" << argv[1][s] << "\"" << std::endl; ...

contenttype - SharePoint 2010: RemoveFieldRef and Inherits="TRUE" -

i have created custom content type inherits ootb sharepoint picture content type. customisations have made add simple url field, , remove 2 of fields on base type. see below: <elements xmlns="http://schemas.microsoft.com/sharepoint/"> <!-- parent contenttype: picture (0x010102) --> <contenttype id="0x0101020027f16ab27e6e45a6848c25c47aaa7053" name="custom picture" description="" group="custom" inherits="true" version="0"> <fieldrefs> <removefieldref id="{b66e9b50-a28e-469b-b1a0-af0e45486874}" name="keywords" /> <removefieldref id="{a5d2f824-bc53-422e-87fd-765939d863a5}" name="imagecreatedate" /> <fieldref id="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" name="url" displayname="u...