Posts

apache pig - Distributed cache with Pig and Python -

i know there lot of resources using distributed cache in pig scripts java-udfs. haven't found explain same python udfs. also, have not found detailed explanation of distributed cache usage while writing pig scripts. i not asking question. want have place people me can first pig + python + distributed cache example working. sorry if unknowingly asking wrong question. thankful help. thanks, r0ger22

<sizeof(T)> as inherited class template parameter in c++ -

i've been trying make transition simple self-made game engine written in c c++ , came across nice book mike mcshaffry (game coding complete). , love of bios almighty cannot wrap head around 'optional template class', namely piece of code: class optional_empty { }; template <unsigned long size> class optional_base { public: // code here }; template <class t> class optional : public optional_base<sizeof(t)> { public: // code here }; why 'sizeof(t)' used template parameter when inheriting, , not plain 't'? make possible have t's of dynamic size? there no 'sizeof...' operator, it's not related variadic templates. or it? thanks. because optional_base not expecting template type parameter template value parameter (of type unsigned long ).

swift - `{ ... }` in output from `po` in Xcode debugger indicates what? -

i gather strings (as received block's first parameter in call enumeratetagsinrange:scheme:options:usingblock: ) array , inspect array in xcode debugger po strings . strings bear annotation { ... } so: (lldb) po strings ▿ 3 elements - [0] : "determiner" - [1] : "adjective" - [2] : "adjective" { ... } (lldb) expr strings ([string]) $r5 = 3 values { - [0] : "determiner" - [1] : "adjective" - [2] : "adjective" what { ... } indicate? if additional information, of kind , can "expand" somehow?

Wix - Installing an app off the c:\ root instead of program files and creating shortcuts -

this markup used create directory structure , create sub directories. work fine. creates software directory of c:\ root , creates sub directories under that. add new component group called "shortcuts". want create short cut on start menu , desktop icon.i not sure of call id ?????? in start menu directory. following error when build project. error 1 component/@directory attribute not found; required. occurs twice. 1 @ line component id="cmpstartmenushortcut" , 1 @ line component id="cmpdesktopshortcut" <fragment> <directory id="targetdir" name="sourcedir"> <directory id="windowsvolume"> <directory id="softwaredirectory" name="unionadministrator"> <directory id="runtimefolder" name="runtime" /> <directory id="reportsfolder" name="reports" /> <directory id="tasksfol...

How to use REST using Post Method to get XML information in android? -

for example, uri: http://99.99.99.99:8080/services/api/products/getproduct method: post content-type: application/xml then, use advanced rest client can these data <products> <product> <category>apple</category> <productcode>a1</productcode> </product> <product> <category>orange</category> <productcode>a2</productcode> </product> <product> <category>banana</category> <productcode>a3</productcode> </product> .... </products> how if want store of category , productcode. what kinds of method should use? httppost? xml parser? this sample code try , nothing logcat. public void getxml(){ string result = ""; httpclient client = new defaulthttpclient(); try { httppost post = new httppost("http://99.99.99.99:8080/services/api/products/getproduct...

mobile - Google Maps block touch events on Windows Phone -

i've got basic google maps implemented on site. i've put custom controls (basic divs touch events) on map area , work great on devices. the problem have windows phones google maps somehow blocks events on top of it. controls not responding @ all. if swipe on controls div have on top of maps doesn't scroll map. i'm using basic touch events touchstart, touchmove , touchend controls. i'm using stoppropagation inside events. controls divs have z-index bigger map , said works on android , ios. thanks i've figured 1 out. problem in how implemented touch events. i've added click events windows phone , works should.

JSON Unicode doen't work or phpMyAdmin? -

i searched in web stackoverflow problem didn't resolved. im trying json database shows question sign (?) [{"task_id":"13","task_title":"???","task_desc":"??? ???","task_done":"0"}] i set db collation utf8_persian_ci; didnt work me. used php codes didnt worked me: mysql_set_charset('utf8'); (didn't worked) set db collation utf8_persian_ci (didn't worked) header('content-type: application/json; charset=utf-8');(didn't worked) function escapejsonstring($value) { $escapers = array("\", "/", "\"", "\n", "\r", "\t", "\x08", "\x0c"); $replacements = array("\\", "\/", "\\"", "\n", "\r", "\t", "\f", "\b"); $result = str_replace($escapers, $replacements, $value); return $result; } echo my_json_encode($...