Posts

Changing a language in the middle of a python program -

i have program processes text using pyhook. since use hebrew tried seeing happen if type in hebrew. seems if when program starts pc on hebrew if change language understand hebrew , vice-versa english. looked @ ascii value hebrew letters comes out , seems wrong hebrew ascii , unicode numbers.. can me solve problem please? def onkeyboardevent(event): global start global text print text text += chr(event.ascii) print event.ascii the prints there checking up thank you

c# - Xamarin Android Crash on Start "Got a SIGSEGV" -

i have xamarin forms app, i'm going publish app, found bug, meets on old(2.3.7 , 4.0.4) xperia devices or emulators, app crashes soons clicked on app icon in menu, here see in output: 06-10 12:46:18.344 e/mono-rt ( 2885): stacktrace: 06-10 12:46:18.344 e/mono-rt ( 2885): 06-10 12:46:18.344 e/mono-rt ( 2885): @ <unknown> <0xffffffff> 06-10 12:46:18.344 e/mono-rt ( 2885): @ (wrapper managed-to-native) object.wrapper_native_0x8235c890 (intptr,intptr,string,string) <il 0x00054, 0xffffffff> 06-10 12:46:18.344 e/mono-rt ( 2885): @ android.runtime.jnienv.getmethodid (intptr,string,string) [0x00042] in /users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/mono.android/src/runtime/jnienv.g.cs:158 06-10 12:46:18.344 e/mono-rt ( 2885): @ android.runtime.jnienv.createinstance (intptr,string,android.runtime.jvalue*) [0x00000] in /users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid...

java - Converting string to json object using json.simple -

i using org.json.simple.jsonobject , want convert string json object.i have tried no success. have been trying string value=request.getparameter("savepos"); jsonobject jsonobject = (jsonobject) jsonvalue.parse(value); please in advance. try this: jsonparser parser = new jsonparser(); jsonobject json = (jsonobject) parser.parse(stringtoparse);

python - generating custom colorbar: match data with color scheme -

Image
i have 3d bar chart, generated 3d discrete-dataset( x,y,z ). used code plot on canvas: bar_chart_3d =fx.bar3d(x, y, z, dx, dy, dz, color=cmap.to_rgba(dz), alpha=0.4,linewidth=0.5) but, i'm not being able attach colormap on canvas based on dz value plotted. tried using: #adding color-bar... fig.colorbar(cmap.to_rgba(dz), shrink=0.6, aspect=8) but invoking attributeerror: 'numpy.ndarray' object has no attribute 'autoscale_none' . thank you. from bar3d docs , color applied each face, color can be: an array of colors of length n bars, color each bar independently. i guess facecolor, not assumed convey information , bar3d not return anything. things contour return scalarmappable can used specify colorbar. looks cmap (which assume cm.scalarmappable ?) doesn't contain norm , autoscale required colorbar. as work around can draw colorbar between limits in example fig.subplots_adjust(bottom=0.25) ax1 = fig.add_axes([0.05,...

html - how to apply css class and also change css attribute dynamically in angularjs using ng-class? -

i want apply css class 'headerstyle' change color attribute defined in 'headerstyle' when user choose color color picker this. catch want use ng-class. possible able using ng-class, have done same thing using mixture of class , ng-style wish using ng-class only. html code : <input colorpicker type="text" ng-model="headercolor"> i tried not working - header div : <div ng-class="[headerstyle:true, {'background-color' : headercolor}]"> and this- <div ng-class= "{headerstyle:true, 'background-color' : headercolor}"> here css class headerstyle - .headerstyle { font-family: helvetica, arial, sans-serif !important; padding-top: 4px; font-size: 15px; color: #ffffff; text-align: center; text-shadow: #666666 1px 1px 1px; line-height: 16px; border: none; } thanx in advance <div class= "...

linux - Processes started with systemd are logging to /var/log/syslog and /var/log/daemon.log -

i'm running couple of python scripts on beaglebone black, both started @ init systemd. noticed yesterday emmc flash full, , reason had 1.8 gigs of log files. seems standard output of these scripts (they generate amount of data debugging purposes) being logged both /var/log/syslog , /var/log/daemon.log. also, /var/log/messages has ton of entries "rate-limiting". now, assume fix disabling standard output on these scripts. however, rather preserve capability , somehow tell systemd not log data. however, i've been unable find information on this. here example of current .service file: [unit] description=description of process after=network.target [service] type=simple execstart=/opt/myprocess [install] wantedby=multi-user.target i should note had syslog.target "after" target, because example following had it. have since removed , doesn't seem solve problem. any or insight problem appreciated. edit: may have found answer here: http://w...

use sass transformer in intellij dart -

when use dart plugin , "javascript debug" run/debug configuration ( idea config site ) , use sass transformer ( sass package ) transformer not called. running pub serve executes transformer correctly. how tell intellij use transformer? there nothing in intellij. maybe ensure don't enable sass watcher in intellij well, might collide. might bug in sass transformer or pubspec.yaml.