Posts

Showing posts from June, 2014

c - Why does using `execl` instead of `system` stops my program from working? -

i'm trying basic ipc using pipes. spent hours searching internet, doing , that, reading api documentations, , ended code below. not work, quite expected. making code 'work' many thanks. <edit> i've found using system instead of execl makes program run expected. going wrong here when use execl , while doesn't happen system function? </edit> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(void){ int hinpipe[2]; int houtpipe[2]; file *hinfile; file *houtfile; char *s; pipe(hinpipe); pipe(houtpipe); if(fork()){ close(hinpipe[0]); close(houtpipe[1]); hinfile=fdopen(hinpipe[1],"w"); fprintf(hinfile,"2^100\n"); fclose(hinfile); houtfile=fdopen(houtpipe[0],"r"); fscanf(houtfile,"%ms",&s); fclose(houtfile); printf("%s\n",s); free(s); }else{ ...

c# - Fluent NHibernate Where on Empty String -

i'm applying .where() -restriction on iqueryover<t,t> in fluentnh, such: .where(x => x.col1 == null || x.col1 == ""); which generates following sql: where (col1 null or col1 = null) how can make nh understand empty string means empty string? you can write where clause this: .where(restrictions.on<classtype>(obj => obj.col1).isnull || restrictions.on<classtype>(obj => obj.col1).islike(@"")) alternatively, if you're doing on several queries should consider creating query extension: public static class queryextention { public static iqueryover<e, f> wherestringisnullorempty<e, f>(this iqueryover<e, f> query, expression<func<e, object>> expression) { var property = projections.property(expression); var criteria = restrictions.or(restrictions.isnull(property), restrictions.eq(property, string.empty)); retu...

How start a service (module2) from another activity (in module1) in android studio? -

i have project in android studio 2 modules: wear , mobile. in wear module have wearservice , in mobile module have handactivity. want start wearservice handactivity, pressing button. how can it? im trying use code, wasnt working. package com.example.joe.activitytoactivity; public class wearservice extends wearablelistenerservice { public wearservice() { } @override public int onstartcommand(intent intent, int flags, int startid){ super.onstartcommand(intent, flags, startid); return start_sticky; } } and package com.example.joe.activitytoactivity; public class handactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_hand); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.menu_hand, menu); return true; } @override public boolean onoptionsitem...

android - APPHOST9623: The app couldn't resolve ms-appx: -

developed hybrid mobile app on cordova 3.0. trying deploy in android, windowsphone 8.1 , ios. have been facing problems ios 8.2 in macincloud. when upgraded ctp 3.1 in visual studio, upgraded cordova 3.7, app broke in windows , android throwing errors like apphost9623: app couldn't resolve ms-appx:..... all references broke. also xmlhttprequest broke in ripple. looking real here. please ping me soon.

Building chained function calls dynamically in PHP -

i use php (with kirbycms) , can create code: $results = $site->filterby('a_key', 'a_value')->filterby('a_key2', 'a_value2'); this chain 2 filterby . works. however need build function call dynamically. can 2 chained function calls, 3 or more. how done? maybe can play code? chain random number can used create between 1-5 chains. for( $i = 0; $i < 10; $i ++ ) { $chains = rand(1, 5); } examples of desired result example one, 1 function call $results = $site->filterby('a_key', 'a_value'); example two, many nested function calls $results = $site->filterby('a_key', 'a_value')->filterby('a_key2', 'a_value2')->filterby('a_key3', 'a_value3')->filterby('a_key4', 'a_value4')->filterby('a_key5', 'a_value5')->filterby('a_key6', 'a_value6'); $chains = rand(1, 5) $results = $site $suffix =...

jdepend - Cyclic dependency analysis for Java 8 - for use in an automated build -

i'll working on project using jdepend automatically generate report of cyclic package dependencies part of our ci build. (i interested in package level dependencies, i've been using cut down version of xslt more focused report - otherwise, though, vanilla jdepend.) however move project java 8 , have found jdepend not work against code compiled jdk 1.8 compiler. jdepend no longer seems being actively updated. i'm trying find replacement that: works jdk 1.8 compiled class and/or jars. reports cyclic dependencies @ package and/or jar level. can automated ant (command line executable do). produces report can linked project home page , opened in browser (e.g. html or plain text output - not desktop app). also (preferably) produces - or can configured/tweaked produce - focused report of cyclic dependencies (as jdepend can, if modify xslt). java 8 includes jdeps.exe in /bin . although doesn't explicitly call out cyclic dependencies show dependenc...

android - BluetoothGattCallback only calls onConnectionStateChange -

my device.connectgatt() triggers onconnectionstatechage. status 0, , connection established. tested on 4.4 , 5.1 system - same result. code: private final bluetoothgattcallback mycallback = new bluetoothgattcallback() { @override public void onconnectionstatechange(bluetoothgatt gatt, int status, int newstate) { super.onconnectionstatechange(gatt, status, newstate); //bluetoothgattcharacteristic tempchar = null; //tempchar.setvalue("test"); if(status == 0) { gatt.connect(); //gatt.disconnect(); } } @override public void onservicesdiscovered(bluetoothgatt gatt, int status) { super.onservicesdiscovered(gatt, status); } @override public void oncharacteristicread(bluetoothgatt gatt, bluetoothgattcharacteristic characteristic, int status) { super.oncharacteristicread(gatt, characteristic, status); } @override public void oncharacteristicwrite(blu...

c# - Castle Windsor Wcf Facility: How to inject WcfService-Instance into other components -

given following code: public interface isomeservice() {...} public class someservice: isomeservice {...} public class consumer() { public consumer(isomeservice service) {...} } i serve 1 instance of someservice wcf service , inject that same instance consumer classes. here's registration: container.register( component.for<isomeservice>().implementedby<someservice>().aswcfservice(...).lifestylesingleton(), component.for<consumer>() ); now when resolving consumer, i'll receive different instance of someservice 1 being served wcfservice, though specified singleton lifestyle explicitely. can done wcffacility somehow? if not, create instance myself , publish using facility's internal features automagic channel recreation in case of faults?

Can I share a properties file between java and javascript? -

i need have access properties file within java web application. put in classpath somewhere, , load using getresourceasstream("my.properties") . i need access same properties file within javascript. know read using xhr if file exists in web resources folder, in case not. what can here? i'm trying avoid 2 copies of file. project - javasource - myclass.java - my.properties - webcontent - myjavascript.js you can write java service turns properties file json . it's pretty easy do, , i've done in few projects. can call ajax or referencing in script tag.

birt - Postgresql - could not create shared memory segment: Cannot allocate memory -

this question has been asked many times, response given / worked not working me. so, suspicious else missing. os: $ cat /proc/version linux version 2.6.32-431.29.2.el6.x86_64 (mockbuild@x86-026.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (red hat 4.4.7-4) (gcc) ) #1 smp sun jul 27 15:55:46 edt 2014 when try start postgresql, following error : [reportadmin /opt/birt/modules/birtihub]$ ./startpostgresql.sh starting startpostgresql @ fri 05/15/2015 08:03:29 ac_server_home=/opt/birtihubftype/modules/birtihub/ihub 2015-05-15 12:03:30 utc 27379 log: loaded library "pg_stat_statements" 2015-05-15 12:03:30 utc 27379 fatal: not create shared memory segment: cannot allocate memory 2015-05-15 12:03:30 utc 27379 detail: failed system call shmget(key=8433001, size=290635776, 03600). 2015-05-15 12:03:30 utc 27379 hint: error means postgresql's request shared memory segment exceeded available memory or swap space, or exceeded kernel's shmall parameter....

mpeg dash live stream example -

i working on mpeg-dash live sreaming , trying find test url of live streaming content. far i've been able find many vod content, not live streaming. have test live stream url? we use public mpeg-dash livestream on our demo pages @ http://www.dash-player.com/demo/live-streaming-dvr/ , http://www.bitcodin.com/live-streaming/ . comes representations 1080p , distributed via cdn, worldwide pretty usable. stream available hls. can use via http , https mpeg-dash mpd: http://bitlivedemo-a.akamaihd.net/mpds/stream.php?streamkey=bitcodin hls m3u8: https://bitlivedemo-a.akamaihd.net/m3u8s/bitcodin.m3u8

java - How to check with Selenium WebDriver if a site is using Ajax? -

i doing research , development on few unknown third party websites page content using selenium. how should know whether website ajax based or non-ajax based. don't know data inside of unknown website check though using id or tag name, how should check ajax based or not. if you, set proxy , route webdriver traffic thru that. in proxy, each request parse request headers , header x-requested-with = xmlhttprequest reference if have that, can (with fair amount of confidence) say, had ajax invoked. there may corner cases you'll miss, should of them. anyway, need consider ajax calls may not done on page load, may require user interaction trigger calls. you can try tackle using webdrivers getpagesource() method , apply method output looking patterns $.get( , $.post( , $.ajax( , other ones can come with. you may interested in this answer setting proxy.

c - Writing to proc file / give parameter by calling kernel module -

i'm supposed change configuration parameter of kernel using kernel module. kernel module should create proc file , should able change parameter using cat command, e.g. cat "foobar" > /proc/prompt supposed set parameter "foobar", prompt name of proc file created in module. furthermore should able initialize parameter passing argument when calling module. these 2 articles relevant sources have found: http://www.tldp.org/ldp/lkmpg/2.6/html/x769.html writing proc file , http://www.tldp.org/ldp/lkmpg/2.6/html/x323.html initializing parameter command line. now have couple of questions, first of module far: #include <linux/kernel.h> #include <linux/version.h> #include <linux/list.h> #include <linux/module.h> #include <linux/proc_fs.h> #include "sar_main.h" #define procfs_name "sarlkm" char procfs_buffer[procfs_max_size]; static unsigned long procfs_buffer_size = 0 struct proc_dir_entry *proc_file...

jQuery-timepicker showing 12AM as PM -

i working jquery-timepicker, have issue. when user navigates using hour showing 12pm , not 12am ? code have tried, $('#ftime').timepicker({ timeformat: "hh:mm tt", ampm: true, hourmin :4, hourmax : 24 }); here try, http://jsfiddle.net/o59eoomx/ to me, using different library. try: $('#ftime').timepicker({ 'timeformat': 'h:i:s a' }); link documentation, make sure talking same library

python - Writing a different statement for an error -

i have written program on files i/o in python, contains part file opened i.e .... f = open("<filename.txt", "r") alltext = f.readlines() .... in case file not found, want write print statement saying, "sorry, file not found." tried using error handling (for & except), did not work because of nested code after above. appreciated. thanks use os.path.isfile : https://docs.python.org/2/library/os.path.html#os.path.isfile also, if need read text, want do: if os.path.isfile(f): open("filename.txt") f alltext = f.read() else: # print statement goes here

dictionary - Swap key and value in a map in fsharp -

how create new map similar original one, swapped keys , values in fsharp? example, have this let map1 = [("a", "1"); ("b", "2"); ("c", "3");] |> map.oflist and want this: let map2 = [("1", "a"); ("2", "b"); ("3", "c");] |> map.oflist thank help! perhaps approach decision: let map1 = map.oflist [("a", "1"); ("b", "2"); ("c", "3")] map1 |> printfn "%a" let rev map: map<string,string> = map.fold (fun m key value -> m.add(value,key)) map.empty map rev map1 |> printfn "%a" print: map [("a", "1"); ("b", "2"); ("c", "3")] map [("1", "a"); ("2", "b"); ("3", "c")] link: http://ideone.com/cfn2yh

cocos2d x - OpenGL ES 2.0 with static (Fixed Function) pipeline API? -

i know opengl es 2.0 standard threw out methods can achieve same results keeping one. result why static pipeline removed specification , dynamic pipeline present. strange use code , works: glcolor3f(0, 1, 1);//white glbegin(gl_line_loop); glvertex2f(lower.x, lower.y); glvertex2f(upper.x, lower.y); glvertex2f(upper.x, upper.y); glvertex2f(lower.x, upper.y); glend(); this api function use belong static pipeline, right draw without using shader. btw cocos2d-x 3.5 based on opengl es 2.0. btw cocos2d-x 3.5 based on opengl es 2.0. from cocos2d-x github page (my emphasis): opengl es 2.0 (mobile) / opengl 2.1 (desktop) based you not using gles2 context @ all, gl 2.1 one, support of legacy features fixed function pipeline , immediate mode. note immediate mode ( glbegin / glend ) never feature of gles, not in 1.x did implement fixed-function pipeline. exist in legacy desktop gl. code fail if run on mobile devices.

Batch - Conditionally minimize the current window -

i have batch file provides user menu. works fine. i permit commandline parameter run batch in automated mode (no need menu) - working fine. auto mode runs thru various menu options in prescribed manner. example: mybatch.bat -a request: when "-a" parameter passed-in, i'd auto-run batch file in minimized mode (i.e., in taskbar), exit, silently user. any suggestions? thank you! you invoke powershell minimize console window. for %%i in (%*) if /i "%%~i"=="-a" ( powershell -window minimized -command "" )

android - Setting button background programtically removes it from screen -

i trying change background color of button programmatically when change color button disappears screen. here button in layout <button android:id="@+id/ibtn_ea_colorpick_new" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:layout_marginright="10dp" android:background="@drawable/clr_btn" /> and here how changing background btn_colorpick.setbackgroundcolor(btn_colorpick.getcontext().getresources().getcolor(r.color.blackcolor)); i have tried btn_colorpick.setbackgroundcolor(getresources().getcolor(r.color.blackcolor)); but same result try using imagebutton - <imagebutton android:id="@+id/ibtn_ea_colorpick_new" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="10dp" android:la...

c - My Fixed point arithmetic implementation, performance -

i'm implementing fixed point arithmetic, in c, extends format of usual c types. for example... know greatest size allowed c integer types 8 bytes. my extension works in way typedef struct fixed_point { unsigned long long int chunk[chunk_element]; } fixed_point; where chunk_element set macro statement, when compile have specific version of fixed point stuff. i choose way of implementation (i.e. embodie array struct) because make easier implementation of stuff like fixed_point sum(fixed_point __x, fixed_point __y); my question is efficient implement stuff in way? instead work straight array defining typedef unsigned long long int[bit_chunk_size] fixed_point but in case should implement stuff like void sum(fixed_point* __z, fixed_point __x, fixed_point __y); which pretty tedious syntax point of view. what think? (ps. i'm implementing basic operator <<,>>,&,|,^,+,-,*,/ etc) a thing check done authoritative implementations of...

c# - ModelState Errors always showing in English in Azure Web Role -

i´m having problems model validation errors in asp.net webapi deployed in azure. this code returns modelstate errors: public static class comprobarerroresmodelo { public static string geterrors(modelstatedictionary modelstate) { var result = ""; foreach (var error in modelstate.values.selectmany(value => value.errors)) if (string.isnullorempty(error.errormessage)) result = result + error.exception.message + '\n'; else result = result + error.errormessage + '\n'; return result; } } in global.asax have tried several modifications on this: protected void application_acquirerequeststate(object sender, eventargs e) { thread.currentthread.currentuiculture = new cultureinfo("es"); thread.currentthread.currentculture = new cultureinfo("es"); cultureinfo.defaultthreadcurrentculture = new cultureinfo("es");...

php - How can I merge one array with values into an array with stdClass objects? -

i have 2 arrays , looking way merge them. standard array_merge() function don't work. do know nice solution without foreach iteration? my first array: array ( [0] => stdclass object ( [field_value] => green [count] => ) [1] => stdclass object ( [field_value] => yellow [count] => ) ) my second array: array ( [0] => 2 [1] => 7 ) and result get:* array ( [0] => stdclass object ( [field_value] => green [count] => 2 ) [1] => stdclass object ( [field_value] => yellow [count] => 7 ) ) [akshay@localhost tmp]$ cat test.php <?php $first_array = array( (object)array("field_value"=>"green","count"=>null), (object)array("field_value"=>"yellow","c...

mysql - Troubleshooting Wordpress/Woocommerce custom SQL query for reporting -

Image
hopefully right forum, question seems overlap stack exchange community seemed best. i have custom reports woocommerce orders on wordpress site. have 1 query freezing locally, meaning in localhost cpu goes 100% , never finishes , don't understand why. point here query: select sum(postmeta.meta_value) pca_postmeta postmeta left join pca_woocommerce_order_items orders on orders.order_id = postmeta.post_id postmeta.meta_key = '_order_total' , orders.order_item_id in ( select item_meta.order_item_id pca_woocommerce_order_itemmeta item_meta left join pca_woocommerce_order_items orders on item_meta.order_item_id = orders.order_item_id left join pca_posts posts on posts.id = orders.order_id item_meta.meta_value = '23563' , posts.post_status in ('wc-processing','wc-completed') group orders.order_id ) as can see goal here summation of orders specific campaign ( 23563 ). nested query works expected on own, returning l...

php - summernote image upload and alternative not working -

i using summernote editor on site , have implemented using click2edit method mentioned on site here . however image upload if used causes sorts of problems. understanding using called base64. tried replace more straight forward file upload server using code stackoverflow answer [here]. ( summernote image upload ) doesn't seem doing anything, image still gets inserted original method. if me work out how correctly implement this. in terms of error, site has several tabs, 1 of tabs includes click2edit summernote editor, when tried , use image upload , save it, picture doesn't display , combines tabs 1 page (likely special character somewhere causes problem?). secondly sql column text datatype shows no content when viewed in sql management studio , content editable, gives kind of saving error. ended needing delete entry return things normal. my code: to implement summernote: <div class="click2edit">click2edit</div> var edit = function() { $(...

Printing the value of a pointer in C -

int main() { int *i,*j; printf("%u",i); } the above program result in output 0 int main() { int *i,*j; j=i; printf("%u",i); } but the above program result in non zero. why? both pointers not initialized initial value indeterminate. accessing uninitialized pointer undefined behavior. moreover use p conversion specifier print pointer value (and yes cast required) u requires unsigned int argument : printf("%p\n", (void *) i);

javascript - Unable to load Json data in MG data table -

i'm new d3.js. created script can't load json data table. d3.json('c:\software\data\dirk\development\d3_testlab\data\statustabel.json', function (data) { var table_data = data var table1 = mg.data_table({ data: table_data, //title: '', //description: 'a table has many of same properties other data graphic.', show_tooltips: true }) .target('#div1') .number({ accessor: 'bu', label: 'bu', width: 120, font_size: 14, layout: 'center' }) .number({ accessor: 'lines', label: '# lines', width: 190, font_size: 14, layout: 'center' }) //.number({accessor: 'errors', label: 'errors', width: 170, font_size: 14, color: function(d){ return d > 0 ? '#f70101' : 'auto'; }) .number({ accessor: 'errors', label: 'errors', width: 190, font_size: 14, color: 'red', allign: ...

vb.net 2010 - How to export report from Devexpress End user designer? -

Image
i have used standard report designer in winform , added button "export pdf" in designer bar. i want when click on button , opened report or edited report in designer should exported in pdf. please give solution this. you need add button in ribbon , enable export command button. see below code snippet devexpress sample project reports in version 14.2.5. create button item in printpreview tab , specify it's properties below: private devexpress.xtraprinting.preview.printpreviewbaritem printpreviewbaritem23; this.ribboncontrol1.items.addrange(new devexpress.xtrabars.baritem[] { ..... this.printpreviewbaritem23 ..... }; // // printpreviewbaritem23 // this.printpreviewbaritem23.buttonstyle = devexpress.xtrabars.barbuttonstyle.dropdown; this.printpreviewbaritem23.caption = "export to"; this.printpreviewbaritem23.command = devexpress.xtraprinting.printingsystemcommand.exportfile; this.printpreviewbaritem23.contextspecifier = this.xrdesignribbonc...

Configuring a standard single server TFS 2013 with SharePoint 2013 and SSRS for reporting -

is following scenario possible? we have got tfs 2013 installed standard single server. server has got sql db. we have got sharepoint 2013 installed on machine. now want integrate tfs 2013 sharepoint 2013 along ssrs , ssas reports, etc. please guide whether possible or need install tfs via advanced mode again? no problem, can integrate existing tfs single server deployment external sharepoint server assuming have necessary permissions. msdn: verify sharepoint installation https://msdn.microsoft.com/library/dd578601(v=vs.120).aspx msdn: set remote sharepoint https://msdn.microsoft.com/library/hh548140(v=vs.120).aspx cheers

java - mapreduce task running only on master -

i trying run mapreduce on 2 node cluster using hadoop 2.6. mapreduce running on master node not on slave node. 2015-05-18 14:46:43,570 info org.apache.hadoop.yarn.server.nodemanager.nodemanager: registered unix signal handlers [term, hup, int] 2015-05-18 14:46:44,311 info org.apache.hadoop.yarn.event.asyncdispatcher: registering class org.apache.hadoop.yarn.server.nodemanager.containermanager.container.containereventtype class org.apache.hadoop.yarn.server.nodemanager.containermanager.containermanagerimpl$containereventdispatcher 2015-05-18 14:46:44,311 info org.apache.hadoop.yarn.event.asyncdispatcher: registering class org.apache.hadoop.yarn.server.nodemanager.containermanager.application.applicationeventtype class org.apache.hadoop.yarn.server.nodemanager.containermanager.containermanagerimpl$applicationeventdispatcher 2015-05-18 14:46:44,311 info org.apache.hadoop.yarn.event.asyncdispatcher: registering class org.apache.hadoop.yarn.server.nodemanager.containermanager.localize...

sql - mysql error in WHERE clause -

i'm sorry ask such basic question, cant life of me spot error here far can see correct. yet error, perhaps need pair of fresh eyes have look you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'where event_id = '1243'' @ line 1 in insert expiredevents (event_id,sport_type,tournament,round,team1,team2,venue,event_date) values ('1243','rugby','super15','3','waratahs','sharks','allianz stadium','') event_id = '1243' $sql="insert expiredevents (event_id,sport_type,tournament,round,team1,team2,venue,event_date) values ('$id','$sport','$trnmnt','$rnd','$t1','$t2','$ven','$edate') event_id = '$id'" there no where clause in correct syntax of insert statement . depending on want achieve, choose 1 of following. insert new row, don't...

php - JSON module is probably installed but json_encode() doesn't exist -

Image
i've installed lamp on ubuntu 14.04 , php5-json module. seems installed because it's situated on list of modules on phpinfo() page. but function_exists("json_encode") returns false update: solved problem editing file path marked below: two ideas coming mind : restart server after module installation ? check php.ini , line looks : extension=json.so

sql - Connect a web service to a database and display information -

i beginner vb.net developer , wanted know how create web service , connect sql 2012 database , display item in table. database table has several fields including stock item, manufacturer, free stock quantity, price, etc.. if add breakpoint , step through code, can see value passed string in recordset , returned, however, isn't display properly. i've changed server, username , password thats code shown below. public class service1 inherits system.web.services.webservice private sqlconnection adodb.connection <webmethod()> _ public function showstockitems() string dim command new sqlcommand sqlconnection = new adodb.connection sqlconnection.connectionstring = "driver={sql server};server=server;uid=id;pwd=password;database=able_instruments" try sqlconnection.open() dim strreturn string = "" dim rststockitem new adodb.recordset dim strstockitem string = "select * stockitem" rstst...

c# - SQL Server Consistent Column Encryption -

i have simple sql server requirements have column of type int , want encrypt column given function used encrypt column should generate same value each time called. context i have system 2 user roles source role, target role the source role users generate tables following structure id => int metadata columns => varchar my system generate copy of source table obfuscated id the target role users have access generated table , can add/update metadata columns shouldn't know clear id my trials i have tried encryptbykey authenticator , without authenticator each time call function,it generates different value beneficial in scenarios mine not 1 of them :) also have tried using encryptbyasymkey , same behavior appeared different output each call i have found forum post mentioning sql server using random initialization vector my question is, possible solutions achieve requirements considering function used encrypt tables millions of records. what ...

How to restore PostgreSQL database backup without psql and pg_restore? -

Image
i using postgresql on embedded device running yocto (customized linux). package containing postgresql not provide psql or pg_restore. /usr/bin provides following tools: pg_basebackup indicates able create backups. how supposed restore backup within terminal? pg_restore or psql not problem me. please note: want use backup created on windows/linux computer create initial database on embedded device.

rtos - Basics of Real Time OS -

i trying learn rtos scratch , this, use freertos.org reference. find out site best resource learn rtos. however, have doubts , trying find out not able exact answers. 1) how find out device have real-time capability e.g. controller has (ti hercules) , other don't have(msp430)? 2) depend upon architecture of core (arm cortex-r cpu in ti hercules tms570)? i know these questions make nuisance, don't know how answer of these questions. thanks in advance edit: one more query have meant "os" in rtos? mean same os others or it's contains source code file api's? figuring out whether device has "real-time" capability arbitrary , depends on project's timing requirements. if have timing requirements high, you'll want use faster microcontroller/processor. using rtos (e.g. freertos , ecos , or ucos-x ) can ensure given task execute @ predictable time. freertos website provides discussion of operating systems , means operating ...

eager loading - Web Api Returning Json - [System.NotSupportedException] Specified method is not supported. (Sybase Ase) -

i'm using web api entity framework 4.2 , sybase ase connector. this working without issues returning json, until tried add new table. return db.car .include("tires") .include("tires.hub_caps") .include("tires.hub_caps.colors") .include("tires.hub_caps.sizes") .include("tires.hub_caps.sizes.units") .where(c => c.tires == 13); the above works without issues if following line removed: .include("tires.hub_caps.colors") however, when line included, given error: ""an error occurred while preparing command definition. see inner exception details." the inner exception reads: "innerexception = {"specified method not supported."}" "source = sybase.adonet4.aseclient" the following results in error: list<car> cars = db.car.asnotracking() .include("tires") ...

html - Odoo status bar glitches when I reload the page using browser refresh page (F5) -

Image
normally status bar looks this: but every time reload page using f5 turns this: this annoying glitch because can't trace what's causing this. can me on this? browser: google chrome version 42.0.2311.152 m html code: <header> <button type="button" class="oe_button oe_form_button oe_highlight oe_form_invisible"> <span>post</span> </button><button type="button" class="oe_button oe_form_button"> <span>cancel entry</span> </button><ul class="oe_form_field_status oe_form_status oe_form_required" data-original-title="" title=""> <li class="" data-id="draft"> <span class="label">unposted</span> <span class="arrow"><span></span></span> </li> <li class="oe_active"...

windows - What does a VC++ executable need in order to run? -

i new vc++, etc . learned viewer let me know - visual c++ executable need in order run ? want create product in vc++, know when installed , run on bare minimum windows machine, require other software ? the respective visual c++ redistributable packages not installed default windows required run vc++ executables unless statically including runtime library. have @ microsoft visual studio ~ c/c++ runtime library ~ static/dynamic linking more information on difference between having runtime statically included or using dll. see the latest supported visual c++ downloads downloading redistributable packages visual c++.

Git won't allow me to switch branches -

$git branch stable development i have properties file has password database connection, had change properties file (say xyz.properties) password. can use on local server. , added file path .gitignore , $git update-index --assume-unchanged xyz.properties $git status on branch stable branch up-to-date 'origin/stable'. nothing commit, working directory clean now wanted change ...branch development $git checkout development error: local changes following files overwritten checkout: .gitignore x/y/z/xyz.properties please, commit changes or stash them before can switch branches. aborting now want change branch development , make branch , work on them. so how can achieve task...please me out. in advance edit when tried $git stash no local changes save note: need use local server every branch , required xyz.properties files modified because local db has different password repository. this common problem, namely error: error: local changes...

ios - "WatchKit Simulator Actions" not working on actual apple watch device -

Image
i've tested simulated apple watch push notification , works fine... however when tried send actual apple watch, button doesn't appear... why so? and doesn't vibrate or beep when send push notification in json format instead of text... { "aps": { "alert": { "body": "great!\nnew input", "title": "optional title" }, "category": "scategory" }, "watchkit simulator actions": [ { "title": "details", "identifier": "sdetailsbuttonaction" } ], "customkey": "use file define testing payload notifications. aps dictionary specifies category, alert text , title. watchkit s...

c# - Is there a way to distribute windows store app privately without sideloading -

Image
i went through windows store app , distribution models. want distribute application privately (not want publish in store). sideloading not seems option either expensive ($3000). there license or way this? windows phone store seems hiding app store listing. available store apps? thanks in advance you have 2 options: use windows side-loading though volume license agreements (then sideloading costs $100 unlimited devices - see : http://microsoft-news.com/you-can-buy-windows-8-1-enterprise-sideloading-rights-for-an-unlimited-number-of-devices-for-100/ ) run perpetual beta, whereby invite users "test" or use application in app store (but hidden).

jquery - $(this) not triggering in ajax success even after assigning value to DOM outside of ajax call -

following these instructions i assigning this var element var element = this; before ajax call works fine , called properly $(element).parent('.refreshstats').html('<i class="fa fa-refresh refresh-stats fa-spin" id="'+id+'" url="'+url+'"></i>'); if try , call again in success callback not trigger $(element).parent('.refreshstats').html('<i class="fa fa-refresh refresh-stats" id="'+id+'" url="'+url+'"></i>'); jquery $(document).on('click', '.refresh-stats', function() { var id = $(this).attr('id'); var url = $(this).attr('url'); var element = this; $(element).parent('.refreshstats').html('<i class="fa fa-refresh refresh-stats fa-spin" id="'+id+'" url="'+url+'"></i>'); $.ajax({ type: "...

angularjs - How to change text in element HTML after AJAX response? -

i have html elements on page as: <div ng-click="add()">1</div> <div ng-click="add()">2</div> <div ng-click="add()">3</div> how can change text inside <div> after click add() , ajax response? tried on jquery. instead of using static text 1 , 2 , 3 bind these like <div ng-click="add()">{{options.one}}</div> <div ng-click="add()">{{options.two}}</div> <div ng-click="add()">{{options.three}}</div> this way angular watch if of change on every $digest . can dynamically set options.one , options.two , options.three , update accordingly. also, considering how alike div elements are, should consider putting these in ng-repeat on options object, in <div ng-repeat="(key,value) in options" ng-click="add()">{{value}}</div> and have js starters: $scope.options = { one: 1, two: 2, th...