Posts

Showing posts from June, 2013

How do I can call a jar file from wso2 -

i new esb wso2 , need call .jar wso2 parameters. think need create endpoint , call jar file. right? thanks all. i have done using script mediator (groovy language). within groovy script called custom method passing payload json , saved return value of method payload. used json payload, feel free leave default xml. can pass parameters, not payload, custom method. <script language="groovy"> println "---------- start java call -----------" mc.setpayloadjson(new my.own.package.myclass().mymethod(mc.getpayloadjson())) println "----------- end java call ----------" </script> added custom jar, json , groovy jars under {esb_root}/repository/components/lib , bounced wso2 esb. there other ways achieve need.

iteration - Does python iterate at a constant speed? -

i writing code sensor readings gpio against time. make sure measurements corresponds specific time, want know if python iterates @ constant speed (so gap between iterations constant) - , minimum time gap between iterations. if they're not, can let me know how make time gap constant. thank you! no, python not , can not iterate @ constant speed. python process on raspberry pi, , os responsible allocating time run on cpu (called multi-tasking ). other processes allotted time. means python never going running time , processing times going depend on other processes doing. iteration delegated specific types; how next item produced varies widely, , if python given constant access cpu iteration still vary. whatever in loop body takes time, , unless inputs , outputs same, take variable amount of time work. instead of trying time loops, measure time time.time() or timeit.default_timer (depending on how precise need be, on raspberry it'll same function) in loop ,

Php check if image is greyscale function memory leak -

i'm using function check if image greyscale or not, file paths , names loaded in correctly , runs fine. however it's started give usual memory exhausted errors i'm wondering causing this? fatal error: allowed memory size of 134217728 bytes exhausted (tried allocate 32 bytes) in ... on line 51 the line 51 $b[$i][$j] = $rgb & 0xff; how can optimize function use less memory, possibly half image work out average or if average high? function checkgreyscale(){ $imginfo = getimagesize($this->filelocation); $width = $imginfo[0]; $height = $imginfo[1]; $r = array(); $g = array(); $b = array(); $c = 0; ($i=0; $i<$width; $i++) { ($j=0; $j<$height; $j++) { $rgb = imagecolorat($this->file, $i, $j); $r[$i][$j] = ($rgb >> 16) & 0xff; $g[$i][$j] = ($rgb >> 8) & 0xff; $b[$i][$j] = $rgb & 0xff; if ($r[$i][$j] == $g[$i][$j] &&am

java - Retrieve data from an ArrayList item -

apologies in advance, new java , using else's code part please bear me. have looked around couldn't find problem i've retrieved arraylist method , i've attempted write foreach loop retrieve specific piece of data 'observation' below. for whatever reason won't allow me retrieve of data stored inside observation when accessing through arraylist. arraylist<observation>[] npcpositions = stateobs.getnpcpositions(); vector2d playerposition = stateobs.getavatarposition(); int npccount = npcpositions.length; (int = 0; <= npccount; i++) { if (playerposition.x == npcpositions[i].position) { } } position being value within observation error cannot resolved or not field. part of observation class below , can not access of these variables doing i'm doing. public class observation implements comparable<observation> { /** * category of observation (static, resource, npc, etc.). */ publi

undefined behavior - Why 5[a] with C arrays isn't out of range? -

acording post: with arrays, why case a[5] == 5[a]? where claimed, a[5] equal 5[a] . i'm asking self, true? while aggree e1[e2] identical (*((e1)+(e2))) but claim: given declaration of int a[sizei]; where if (sizei > 5) has true i aggree a[5] ok. but related cite iso/iec:9899 apendix j.2 undefined behavior: — array subscript out of range, even if object apparently accessible given subscript (as in lvalue expression a[1][7] given declaration int a[4][5] ) (6.5.6). is (if correct document) 5[a] "apparently accessible" "array subscript out of range" overall disaggree op linked, a[5] in given case defined , 5[a] undefined behaviour. so, right? or have forgotten consider important? edit: my claim doesn't imply e1[e2] identical (*((e1)+(e2))) would incorrect. and 6.5.2.1 array subscripting point 2 just says arithmeticaly identical. nothing said like: (*((e1)+(e2))) can't achive ub. so while know

java - LIBGDX drawables on devices with different densities/resolutions -

i'm new libgdx game development, , have faced first problem. i've created 9.patch drawables (buttons) using texture packer. drawables can used on low density , high density screens , quality same. if run project drawable on desktop project image shown okay , perfect size. if run project on low density android device, drawable becomes huge (almost half of screen). , if run project on high density android device button becomes small. so question is, how handle drawables in libgdx, ratio (screen:image size), stays same no matter resolution/density..? if button text button. change font of text. if using image button, this might you

php - How to safely create files based on session id -

here problem: want make html form allow users upload images webserver. when user uploads files, want create directory him files uploaded to. so user can delete files later on, thought should name directory user session id... so here concern: have chrome plugin 'editthiscookie' , can change phpsessid this: '../test' or string want. of course can remove unwanted characters before create directory, new php , wanted know if there best practices on how correctly? update: how right now. ok? if(! preg_match('/^[0-9a-za-z]+$/', session_id())){ session_regenerate_id(); } it's fine use session cookie value this. but people safe session id remote address (ip) of user , validate it, request needs have correct session cookie value , remote address. this way there won't unwanted/unvalidated cookie values written disk , no abuse through cookie manipulation.

c++ - Retrieving sigcontext during backtrace -

in writing code print backtraces in c++, came across this answer , includes copying definition of type: /* structure mirrors 1 found in /usr/include/asm/ucontext.h */ typedef struct _sig_ucontext { unsigned long uc_flags; struct ucontext *uc_link; stack_t uc_stack; struct sigcontext uc_mcontext; sigset_t uc_sigmask; } sig_ucontext_t; i can't include <asm/ucontext.h> since there defined ucontext collides named type <sys/ucontext.h> (which included necessary <signal.h> ): /* userlevel context. */ typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; mcontext_t uc_mcontext; __sigset_t uc_sigmask; struct _libc_fpstate __fpregs_mem; } ucontext_t; all need here struct sigcontext uc_mcontext member asm version. there better way retrieve value copying out struct? seems incredibly hackish , error-prone me. one potential workaround make asm/uconte

asp.net - Displayng javascript pop up from VB code -

using vs 2013 , asp.net vb. i using javascript display pop user if data missing form need complete. code below passing string sub notification("alert('please complete fields in section.')") the sub public sub notification(byval text string) dim script string = text if not page.clientscript.isstartupscriptregistered(me.gettype(), "alertscript") page.clientscript.registerstartupscript(me.gettype(), "alertscript", script, true) end if end sub i following error javascript critical error @ line 500, column 53 in http://localhost:61157/newncr.aspx \n\nscript1004: expected ';' the thing have used same piece of code in previous application , works fine. missing something?

javascript - Unexpected behavior with mouseup -

when click on menu, menu shows up, when pointer moved away menu, hides after 2-5 seconds. i want menu toggle when clicked, , explicitly hide when click anywhere else on page, seen on this demo. this fiddle code follows: $(document).ready(function() { $(".myaccount").click(function() { var x = $(this).attr('id'); if (x == 1) { $(".submenu").hide(); $(this).attr('id', '0'); } else { $(".submenu").show(); $(this).attr('id', '1'); } }); //mouseup textarea false $(".submenu").mouseup(function() { return false }); $(".myaccount").mouseup(function() { return false }); //textarea without editing. $(document).mouseup(function() { $(".submenu").hide(); $(".myaccount").attr('id', ''); }); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.

openkinect - Freenect on fedora: Number of devices found: 0 -

hye. i'm trying use kinect xbox 1 on fedora 21. installed freenect/openkinect using official repository. when plug kinect on computer dmesg | tail gives: [ 2877.198513] usb 1-2: usb disconnect, device number 4 [ 2877.400501] usb 2-2: usb disconnect, device number 6 [ 2877.400512] usb 2-2.1: usb disconnect, device number 7 [ 2881.158423] usb 1-2: new high-speed usb device number 5 using xhci_hcd [ 2881.574851] usb 2-2: new superspeed usb device number 8 using xhci_hcd [ 2881.589681] usb 1-2: new usb device found, idvendor=045e, idproduct=02d9 [ 2881.589690] usb 1-2: new usb device strings: mfr=1, product=2, serialnumber=0 [ 2881.589694] usb 1-2: product: nuisensor adaptor [ 2881.589698] usb 1-2: manufacturer: microsoft corporation [ 2881.591297] hub 1-2:1.0: usb hub found [ 2881.591616] hub 1-2:1.0: 1 port detected [ 2884.550626] usb 2-2: new usb device found, idvendor=045e, idproduct=02d9 [ 2884.550638] usb 2-2: new usb device strings: mfr=1, product=2, serialnumbe

c - Link a .a library with CMake -

i want link .a library cmake used : cc main.c -l/usr/lib64 -lmlx -l/usr/lib64/x11 -lxext -lx11 use clion jetbrains. i tried in cmake : target_link_libraries(fdf /usr/lib/x86_64-linux-gnu/libx11.a) target_link_libraries(fdf /usr/lib/x86_64-linux-gnu/libxext.a) rewrite your target_link_libraries(fdf /usr/lib/x86_64-linux-gnu/libx11.a) target_link_libraries(fdf /usr/lib/x86_64-linux-gnu/libxext.a) as: target_link_libraries(fdf) link_directories("/usr/lib/x86_64-linux-gnu/") target_link_libraries(x11) target_link_libraries(xext) as mentioned in answer, might have shuffle order of last 2 lines , on.

java - Set up Accumulo table through api -

new accumulo, , may sound silly, wondering how setup table through api? documentation lacking. have been able find conn.tableoperations().createtable("mytable"); as setting locality groups: hashset<text> metadatacolumns = new hashset<text>(); metadatacolumns.add(new text("domain")); metadatacolumns.add(new text("link")); hashset<text> contentcolumns = new hashset<text>(); contentcolumns.add(new text("body")); contentcolumns.add(new text("images")); localitygroups.put("metadata", metadatacolumns); localitygroups.put("content", contentcolumns); conn.tableoperations().setlocalitygroups("mytable", localitygroups); map<string, set<text>> groups = conn.tableoperations().getlocalitygroups("mytable"); from documentation, want know how take first approach , build table. build columns. thanks in advance! there no inherent schema table set up

asp.net - Using a Web API Service as Central Authentication Point -

i'm new identity management world, please spare me. :) what do, have multiple client (mvc) applications talk single web api application authenticate users against. in web api application, use asp.net identity talk database users. that way, use sso client applications (i guess). does make sense? me on way implement (links welcome of course)? don't know if identityserver me want? and side question: when implement way to, how deal same-origin policy? thank help. :) i did research myself during last few months , learnt lot identity management stuff. many of guys identityserver (and other projects). what did following (very briefly): identityserver used provider client applications. cookie , oidc middleware used. i used asp.net identity user service store users in sql server database. (the identityserver configuration way stored in database.) i set web api service uses asp.net identity user manager user configuration (change password, create new user

java - Changing default json for an object in Spring Boot Application -

i have simple spring boot application having simple mydatetime model class having java.util.date instance variable private access, getters/setters , default constructor. a controller instantiates object , returns back. in output, see default representation of date object done integer (maybe millis epoch) is there way can change default jsonification of date object iso-string or other string? edit: some clarification: i'm new spring , spring boot. i'm using template sample application on spring's website. jsonification done through jackson. rest, don't know spring in general. you can set default format jackson uses when serializing dates in application.properties file: spring.jackson.date-format=yyyy-mm-dd hh:mm:ss http://docs.spring.io/spring-boot/docs/1.2.3.release/reference/htmlsingle/#common-application-properties you can specify specific format use specific date using @jsonformat annotation, example below: example pojo: public cla

javascript - Link not working on image? -

i've been attempting create effect user clicks on image, image replaced image acts link. however problem whenever click replaced image, link doesn't work. fiddle: http://jsfiddle.net/ha6qp7w4/321/ $('.btnclick').on('click',function(){ $(this).attr('src','https://placekitten.com/g/200/300') $(this).attr('href','google.com') }); img tags don't have href properties. need wrap image in anchor , assign url that, or custom redirect. notice image html on inspection of element: <img src="https://placekitten.com/g/200/300" id="1" class="btnclick" href="google.com"> <!-- not valid! --> this isn't valid because imgs aren't anchors! function first() { this.src = 'https://placekitten.com/g/200/300'; $(this).unbind("click"); $(this).on("click", second); } function second() { window.location.href = &qu

java - Asynctask and Handler class - can't share variable -

i have service includes asynctask , handler classes. asynctask , handler should share variable. use static volatile variable issendmessage because think there 2 threads, i'm not sure. problem variable in while loop doesn't change. don't know mistake is. here snippet of code. public class services extends service { static volatile boolean issendmessage = false; @override public ibinder onbind(intent intent) { return null; } @override public int onstartcommand (intent intent, int flags, int startid) { new connectionserverasynctask().execute(); return service.start_sticky; } public class connectionserverasynctask extends asynctask<void, result, void> { private boolean finish = false; @override protected void onpreexecute() { super.onpreexecute(); } @override protected void doinbackground(void... params) { while(!finish){ l

What's up with spacing and syntax errors in Shell Scripts? -

i'm pretty familiar , comfortable batch scripts on windows. i've started out on unix , i'm having hard time getting hang of spacing things properly. the script below works fine. let's call script1.sh !#/bin/sh now=$(date +"%s") echo "this file created on $now" this script pasted below throws error ,also i've pasted further below !#/bin/sh now=$(date + "%s") echo "this file created on $now" [root@localhost /]# sh postbackup.sh postbackup.sh: line 1: !#/bin/sh: no such file or directory date: operand `%s' try `date --help' more information. file created on why space between + , "%s" matter ? additional information on how might affect in other cases extremely helpful. you have 2 errors in script: postbackup.sh: line 1: !#/bin/sh: no such file or directory this because should use !# (wrong), , not #! (correct), , tries run !#/bin/sh command, doesn't exist. error otherw

jdbc - Why java throws exception java.lang.ArrayIndexOutOfBoundsException: 1 -

i have code reads data file , inserts database. this code writes data file. public void save(collection<book> b) { try (printwriter print = new printwriter(this.file);) { (book book : b) { string str = book.getname() + "," + book.getauthor() + "," + book.getdate() + "\n"; print.println(str); } } catch (exception e) { } } this code writes data file , inserts db. try(reader reader = new filereader(this.file); bufferedreader br = new bufferedreader(reader)) { connection = drivermanager.getconnection( "jdbc:mysql://localhost:3306/mybook", this.username, this.pass); statement statement = connection.createstatement(); string str; while((str = br.readline()) != null){ string[] array = str.split(","); statement.executeupdate("insert mybook.

r - Can't add points to a plot: Error: A continuous variable can not be mapped to shape -

i'm trying add points generated plot dataframe used in original plot looks this: > head(df) fa va ca rs ch fsd tsd d p s cluster q 1 7.4 0.29 0.50 1.8 0.042 35 127 0.99370 3.45 0.50 10.2 1 7 2 10.0 0.41 0.45 6.2 0.071 6 14 0.99702 3.21 0.49 11.8 2 7 3 7.8 0.26 0.27 1.9 0.051 52 195 0.99280 3.23 0.50 10.9 3 6 4 6.9 0.32 0.30 1.8 0.036 28 117 0.99269 3.24 0.48 11.0 1 6 5 6.8 0.37 0.28 1.9 0.024 64 106 0.98993 3.45 0.60 12.6 1 8 6 6.2 0.25 0.44 15.8 0.057 39 167 0.99804 3.14 0.51 9.2 3 5 i generate plot this: > ggplot(data=df, aes(x=p, y=tsd, color=cluster )) + + geom_point() + + geom_point(data=centers, aes(x=p,y=tsd, color='center')) + + geom_point(data=centers, aes(x=p,y=tsd, color='center'), size=52, alpha=.3, show_guide=false) now need add more points plot. dataframe want add looks this: > head(df2) fa va ca rs ch fsd tsd d

How to retrieve ID of a list in Mailjet? -

please how can retrieve id of list add contact in , same contact how can know id of contact add list . can please answer me fastly . best regards , to retrieve id of contactlists in system, send http request to: https://api.mailjet.com/v3/rest/contactslist/ curl -x --user "$mj_apikey_public:$mj_apikey_private" https://api.mailjet.com/v3/rest/contactslist the json returned server contain lists, including id in format: { "address": "", "createdat": "2014-06-10t09:11:15z", "id": 2, "isdeleted": false, "name": "testlist", "subscribercount": 1 }, to id of contact, can use contact endpoint of api , specify email: https://api.mailjet.com/v3/rest/contact/johnsmith@example.com curl -x --user "$mj_apikey_public:$mj_apikey_private" https://api.mailjet.com/v3/rest/contact/johnsmith@example.com this return following: {"count": 1,"dat

javascript - TypeError: t(...).on is not a function on fullcalendar -

fullcalendar throwing error: typeerror: t(...).on not function fullcalendar.min.js:8:11264 this script/css includes: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script> <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <link href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css" rel="stylesheet" type="text/css"/> <link href="

c# - ASP MVC Radiobutton from model in list -

i want show list of radiobuttons model using entity framework , mvc 5. list displayed radiobuttons, value of radiobuttons te same al rows , can't find fault in code. perhaps here have idea? code: model: public class resultindexmodel { public ilist<resultinsertmodel> resultlist { get; set; } } public enum beoordeling { voldoende, onvoldoende } public class resultinsertmodel { public int userid { get; set; } public int examid { get; set; } public int id { get; set; } public beoordeling issufficient { get; set; } public nullable<decimal> result { get; set; } public exam exam { get; set; } public user user { get; set; } } examscontroller: [authorize] public actionresult addresults(int? id) { if (id == null) { return new httpstatuscoderesult(httpstatuscode.badrequest); } viewbag.examname = examcatalog.getname(id); return view(examcatalog.getexamstudents(id)); } [authorize] [httppost] [validat

android - Using intents for methods -

edit: updated code: the notificationsetter method: public void notificationsetter(){ intent myintent = new intent(this, myreceiver.class); alarmmanager alarmmanager = (alarmmanager)getsystemservice(alarm_service); pendingintent pendingintent = pendingintent.getbroadcast(this, 0, myintent, 0); log.v("log","notificationsetter"); calendar calendar = calendar.getinstance(); calendar.set(calendar.hour_of_day, 21); calendar.set(calendar.minute, 55); calendar.set(calendar.second, 00); alarmmanager.setrepeating(alarmmanager.rtc_wakeup, calendar.gettimeinmillis(), 24*60*60*1000 , pendingintent); } the myreceiver class: public class myreceiver extends broadcastreceiver { private static final string tag = "myactivity"; @override public void onreceive(context context, intent intent) { string = "log recieved"; log.v(tag, "index=" + i)

android - How to pass a string from a list in one activity to another -

what convert list of user string , on click pass selected string next activity. tried on messaging feature have used on app , has worked fine. attempting work gallery feature. section supposed find users in parse, convert them string , display them on list view. on click supposed collect string on list , use in gallery view activity display images username equal 1 selected list. listuseractivity list view of usernames saved in database. //display clickable list of users private void setconversationslist() { currentuserid = parseuser.getcurrentuser().getobjectid(); names = new arraylist<string>(); parsequery<parseuser> query = parseuser.getquery(); query.wherenotequalto("objectid", currentuserid); query.findinbackground(new findcallback<parseuser>() { public void done(list<parseuser> userlist, com.parse.parseexception e) { if (e == null) { (int i=0; i<userlist.size(); i++) {

javascript - SVG implementation of Monotone cubic interpolation without a Library like d3 -

i'm trying draw path in svg draws smoothed curve between series of points. for example - see (where "interpolations" set "monotone"): http://bl.ocks.org/mbostock/4342190 i've found excellent implementation of algorithm in javascript here: http://blog.mackerron.com/2011/01/01/javascript-cubic-splines/ i can use function create many points on curve want, , use points create polyline follow curve. huge number of points, i'd have relatively smooth curve. but i'd able create path uses cubic bezier curves, d3 does. i found svg implementation of catmull rom splines: https://gist.github.com/njvack/6925609 this works great, unlike monotone cubic interpolation, tends "overshoot" given points, isn't acceptable i'm doing. obviously - use d3, i'd able without library, if @ possible. thanks in advance. you extract d3's implementation, in function called d3_svg_linemonotonetangents in src/svg/line.js : /

.htaccess - UWSGi, how to convert wordpress htaccess into plugin router_redirect -

i convert htaccess: # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress into format required uwsgi (as explained here: http://uwsgi-docs.readthedocs.org/en/latest/internalrouting.html ). i think should write this: plugins = router_redirect route-if = exists break route-label = index route = .* index.php but i'm not expert of uwsgi. appreciated. thanks route-if-not = exists:${document_root}/${path_info} setpathinfo:/index.php this should enough, or if want use rewrite action (it fixes script_name too, needed on php) route-if-not = exists:${document_root}/${path_info} rewrite:/index.php

Java Thread.sleep() on Windows 10 stops in S3 sleep status -

there's desktop application uses thread.sleep() achieve long (minutes or hours) delays. same application has been working fine windows xp through (at least) windows 7. application calculates how far in future needs something, hits thread.sleep(mstowait). has been working fine, if system happens go s3 sleep state during wait. as of windows 10, though, code after thread.sleep() not execute "on time" if machine has been in s3. appears machine begins executing code @ "mstowait" plus time machine has been in s3 (not 100% sure of right now, likely). earlier versions of windows did not exhibit behavior; code after thread.sleep() waited right amount of time, irrespective of sleep status. testing has been on current jvm 1.7. is windows 10 bug? jvm bug? there work-around? additional data: a test program , procedure developed. procedure run program, cause machine sleep minute, wake machine , wait program finish. if program run on windows 10 (reporti

php - How to add quotes to the src attribute of the img tag -

i have correct several posts on database these: <a href="somelink.html"><img src=someimage.jpg border=1 alt="some text"></a> so need to: remove border=1 attribute (str_replace job) add quotes @ begin , end of src attribute: src="someimage.jpg" close img tag adding /> @ end of tag one thing tried parse dom , src source: $doc = new domdocument(); $body = $this->removeunnecessarytags($body); $doc->loadhtml($this->removeunnecessarytags($body)); $imagetags = $doc->getelementsbytagname('img'); foreach($imagetags $tag) { $result[] = [ 'src' => $tag->getattribute('src'), 'alt' => $tag->getattribute('alt') ]; } i know can done regex regex knowledge not good. ideas? thanks all need use domdocument features , libxml options: $html = '<a href="somelink.html"><img src=someimage.jpg border=1 alt="s

c++11 - Template specialization with constexpr non POD data initialization results in linker error when used in constructor as default value -

consider this: struct teststruct { uint16_t m_a : 8; uint16_t m_b : 8; }; template<typename t> struct some_trait { constexpr static const teststruct value = {0,0}; }; template<> struct some_trait<int> { constexpr static const teststruct value = {1,1}; }; template<class t> class obj { public: obj(teststruct t = some_trait<t>::value) : m_t(t) { } teststruct m_t; }; int main(int argc, const char * argv[]) { // linker error here -> undefined symbol some_trait<int>::value obj<int> o; teststruct t = some_trait<int>::value; obj<int> o1(t); // -> works } the following produces linker error, complaining some_trait not defined. have 2 questions: why happening? i'm guessing has either constexpr specifier or non-pod type of teststruct ? is there way make work, while still keeping default value in constructor? thanks!

multithreading - how to make thread in c++ -

i need simple program using sleep() , ( _begin thread() ) make thread on program void tdrow(){ sleep(50); move_bare_without_ball(a,b,windowsize); _beginthread(tdrow(),0,0); } _beginthread visual c++ crt function. don't recommend using or process.h purpose. please use std::thread (or if compiler older, boost::thread ). if using _beginthread , you'd give tdrow, not tdrow().

java.lang.NoClassDefFoundError: com/google/gwt/core/shared/GWTBridge -

i'm not sure why java.lang.noclassdeffounderror: com/google/gwt/core/shared/gwtbridge on line 60 of home.java . steps reproduce: clone jenterprise , open jenterprise , helloworld projects build jenterprise helloworld run helloworld -> com.jenterprise.examples.helloworld.begin go to: http://localhost:8090/examples/helloworld/home what i'm trying use onmoduleload() update interface after executing other logic in method use forward(request, response) show interface, i.e. public void main(httpservletrequest request, httpservletresponse response) { system.out.println("running home: main(httpservletrequest request, httpservletresponse response)"); onmoduleload(); request.getrequestdispatcher("/index.jsp").forward(request, response); } onmoduleload() entrypoint method, part of client-side gwt code compiled gwt compiler. can't use server-side.

linux - Update cURL in a server with Debian 7.8 Wheezy -

i have server debian 7.8 wheezy , need --tlsv1.2 option in curl, comes in version 7.34 or greater. problem that: curl --version >> curl 7.26.0 and 7.26.0 seems latest version in wheezy. as commented svlasov , here answer: https://serverfault.com/a/22418

matrix - How to get the Q from the QR factorization output? -

dgeqrf , sgeqrf lapack return q part of qr factorization in packed format. unpacking seems require o(k^3) steps (k low-rank products), , doesn't seem straightforward. plus, numerical stability of doing k sequential multiplications unclear me. does lapack include subroutine unpacking q, , if not, how should it? yes, lapack indeed offers routine retrieve q elementary reflectors (i.e. part of data returned dgeqrf), called dorgqr . describtion: * dorgqr generates m-by-n real matrix q orthonormal columns, * defined first n columns of product of k elementary * reflectors of order m * * q = h(1) h(2) . . . h(k) * returned dgeqrf. a complete calculation of q , r a using c -wrapper lapacke (a fortran adaption should straight forward) : void qr( double* const _q, double* const _r, double* const _a, const size_t _m, const size_t _n) { // maximal rank used lapacke const size_t rank = std::min(_m, _n); // tmp array lapacke const std::uni

visual studio 2010 - VS2010 javascript debugger wants to launch in new instance of VS2010 -

when debug asp.net 4.0 application , hits debugger; javascript statement wants debug new instance of vs2010 an unhandled exception ('script breakpoint') occured in iexplore.exe how can make use vs2010 open? enabled script debugging in ie11. enabled script debugging in vs2010 -tools - options - debugging - 'just in time' also worked until recently. i turned on silverlight debugging applied, , turned off again. think did trick, because works now.

How to add a custom CSS file in ExtJs 5? -

in extjs 4, included custom css this: <!-- <x-compile> --> <!-- <x-bootstrap> --> <link rel="stylesheet" href="bootstrap.css"> <script src="ext/ext-dev.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app.js"></script> <!-- </x-compile> --> <link rel="stylesheet" href="/custom/css.css" type="text/css" charset="utf-8" /> the fact link css comes after <x-compile> section makes loaded later , rules in custom.css override rules in compiled extjs theme css. in extjs 5.0, doesn't work anymore. despite of including custom css after microloader, theme css loaded after custom.css : <script id="microloader" type="text/javascript" src="bootstrap.js"></script> <link rel=&qu

libreoffice - unoconv fails to save in my specified directory -

i using unoconv convert ods spreadsheet csv file . here command: unoconv -vvv --doctype=spreadsheet --format=csv --output= ~/dropbox /mariners_site/textfiles/expenses.csv ~/dropbox/aldeburgh/expenses /expenses.ods it saves output file in same directory source file, not in specified directory. error message is: output file: /home/richard/dropbox/mariners_site/textfiles/expenses.csv unoconv: unoexception during export phase: unable store document file:///home/richard/dropbox/mariners_site /textfiles/expenses.csv (errcode 19468) i'm sure worked initially, has since stopped. i have checked permissions , identical both directories. i translated errcode 19468 , boils down meaning errcode_sfx_documentreadonly . you can find more information specific meaning of libreoffice errcode numbers unoconv documentation at: https://github.com/dagwieers/unoconv/blob/master/doc/errcode.adoc the clue here have whitespace-character between --output= , filename (--outpu

spring - Struts2 and Hibernate - Access ActionContext.getContext().getSession() outside a Servlet -

i try access actioncontext.getcontext() outside struts (struts2) action in 2 different situations , different result, regarding trying: from currenttenantidentifierresolverimpl (my) implementation of currenttenantidentifierresolver, hibernate interface --> ko (the result null) from abstractroutingdatasource (my) implementation of abstractdatasource, spring interface --> ok i have found solution currenttenantidentifierresolverimpl working using threadlocal, : why working spring , not hibernate? why can't access actioncontext (threadlocal also) can access threadlocal (that set actioncontext, same place, same data)? currenttenantidentifierresolverimpl : supposed give tenant used hibernate can give connection database. import java.util.map; import org.hibernate.context.spi.currenttenantidentifierresolver; import com.opensymphony.xwork2.actioncontext; public class currenttenantidentifierresolverimpl implements currenttenantidentifierresolver { @override publi

android - RecyclerView with fixed column and header, plus scrollable footer -

Image
i trying find way implement standing table sports app (like nba game time standings), fixed header, fixed first column , footer. searched bit on how it, best shot project ( https://github.com/inqbarna/tablefixheaders ) uses own view instead of recycler of gridview. knows or knows how can start (adapter or layoutmanager)? edit (adding images) after testing , searching lot, implemented own, combining listview inner horizontalscrollview s. first, extended horizontalscrollview report me scroll event, adding listener: public class myhorizontalscrollview extends horizontalscrollview { private onscrolllistener listener; @override protected void onscrollchanged(int l, int t, int oldl, int oldt) { super.onscrollchanged(l, t, oldl, oldt); if (listener != null) listener.onscroll(this, l, t); } public void setonscrolllistener(onscrolllistener listener) { this.listener = listener; } public interface onscrolllistener {