Posts

OpenCL - Are work-group axes exchangeable? -

i trying find best work-group size problem , figured out couldn't justify myself. these results : globalworksize {6400 6400 1}, workgroupsize {64 4 1}, time(milliseconds) = 44.18 globalworksize {6400 6400 1}, workgroupsize {4 64 1}, time(milliseconds) = 24.39 swapping axes caused twice faster execution. why !? by way, using amd gpu. thanks :-) edit : kernel (a simple matrix transposition): __kernel void transpose(__global float *input, __global float *output, const int size){ int = get_global_id(0); int j = get_global_id(1); output[i*size + j] = input[j*size + i]; } i agree @thomas, depends on kernel. probably, in second case access memory in coalescent way and/or make full use of memory transaction. coalescence : when threads need access elements in memory hardware tries access these elements in less possible transactions i.e. if thread 0 , thread 1 have access contiguous elements there 1 transaction. full use of memory transaction : ...

java - Android - Confuse on put source code -

i'm newbie on android. know method oncreate methods in android. i'm freshly learn android in day. search word 'part z' !! , search word 'end of part z'. public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { //part z string consumerkey = "yii"; string consumersecret = "yii"; string accesstoken = "yii"; string accesstokensecret = "yii"; //instantiate re-usable , thread-safe factory twitterfactory twitterfactory = new twitterfactory(); //instantiate new twitter instance twitter twitter = twitterfactory.getinstance(); //setup oauth consumer credentials twitter.setoauthconsumer(consumerkey, consumersecret); //setup oauth access token twitter.setoauthaccesstoken(new accesstoken(accesstoken, accesstokensecret)); try { user user = twitter.verifycredentials(); list<status> statuses ...

php - Trouble Accessing Facebook Friends without Login -

i'm trying understand how airbnb able access facebook friend lists without active facebook logged in session. see in action follow link: https://www.airbnb.com/s/austin?neighborhoods[]=barton+hills once there, select listing , midway down page find "friends" tab. assuming property owner has facebook friends, should see friend photos , when hover on them, message "xxxxxxxx facebook friend of xxxxxxx". "xxxxxxx" replaced friend's name , property owner's name. i've googled , yahood answer , found on stackoverflow: accessing friend list in facebook and this: facebook php sdk: people in network , friends of friends neither of solution see on airbnb website. thoughts airbnb has kind of special permission facebook data or when property owners login using personal facebook info, airbnb grabs friend data , stores locally on systems. might update every often. so, long story short, how 1 friend information on public website faceboo...

html - Using .ogg file while with <video> on html5 -

i trying learn web development w3schools.com studying html5 , had question on code not understand. if great! :) in below code, function of code code seem run in same way if delete code. here link found code: <!doctype html> <html> <body> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> browser not support video tag. </video> </body> </html> thanks in advance! :) try using 3rd party html5 video player library, e.g. videojs better support of different formats, browsers, providing flash player fallback.

android - Click images of carousel view -

i created app. displaying images in carousel view. want click images of carousel view & go web site. how it. load images following way carousel view.] public class lazyadapter extends baseadapter { private activity activity; private string[] data; private static layoutinflater inflater=null; string dirurl[]; public imageloader imageloader; public viewgroup carousel; horizontalcarousellayout carousel_layout_event; int widthscreen,heightscreen; public lazyadapter(activity a, string[] d) { activity = a; data=d; inflater = (layoutinflater)activity.getsystemservice(context.layout_inflater_service); imageloader=new imageloader(activity.getapplicationcontext()); } public int getcount() { return data.length; } public object getitem(int position) { return position; } public long getitemid(int position) { return position; } public void getdimensionscreen(...

notepad++ - Regex pattern repetition and capturing -

i had translate propkeys.h (in c[++]?) in c#. my goal come from: define_propertykey(pkey_audio_channelcount, 0x64440490, 0x4c8b, 0x11d1, 0x8b, 0x70, 0x08, 0x00, 0x36, 0xb1, 0x1a, 0x03, 7); to: public static propertykey audio_channelcount = new propertykey(new guid("{64440490-4c8b-11d1-8b70-080036b11a03}")); i using notepad++ regex, i'm open other scriptable solution (perl, sed...). please no compiled language (as c#, java...). i ended (working): // turns guid string // find (line breaks inserted convenience): 0x([[:xdigit:]]{8}),\s*0x([[:xdigit:]]{4}),\s*0x([[:xdigit:]] {4}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]] {2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]] {2}),\s*0x([[:xdigit:]]{2}),\s*0x([[:xdigit:]]{2}) // replace with: new guid\("{$1-$2-$3-$4$5-$6$7$8$9$10$11}"\) // final pass // find what: ^define_propertykey\(pkey_(\w+),\s*(new guid\("\{[[:xdigit:]|\-]+"\)),\s*\d+\);$ // repl...

http post - HttpPOST in android -

hi can enlighten me one. i'm stock in it. trying post reportcode web api, didn't receive error when check site see if there reportcode post, haven't seen it. don't know if doing right thing in httppost. here code: public class dopost extends asynctask<string, void, boolean> { exception exception = null; private progressdialog progressdialog; context mcontext = null; bufferedreader in; private string _code; public dopost(context context, string code) { // todo auto-generated constructor stub mcontext = context; this._code = code; } protected void onpreexecute() { progressdialog = new progressdialog(mcontext); progressdialog.setmessage("uploading...."); progressdialog.show(); progressdialog.setcancelable(false); } @override protected boolean doinbackground(string... arg0) { try{ httpparams httpparameters = new basichttpparams(); httpconnectionparams.setco...