Posts

Showing posts from July, 2010

Lightswitch: Stop Windows Service -

Lightswitch: Stop Windows Service - i have little desktop application built in lightswitch allows remote sales staff log , work client info locally on laptops client sites don't have internet/vpn access. such, each client application has local install of sql 2012 express. in command bar, have button labeled, "database backup" meant re-create .mdf file machine mapped network drive when office. works fine on test .mdf file isn't attached sql instance. problem when trying re-create .mdf file in production (with sql running), can't re-create since it's open in sql express. my question this: there reference can add together client allow me utilize system.serviceprocess.servicecontroller class? or best assembly utilize stop restart windows service? (stop service => re-create mdf file => restart service) first, want ensure understand topology. i'm assuming app configured silverlight desktop app deployed 2-tier environment app ,

regex - htaccess - How to cut some text from url -

regex - htaccess - How to cut some text from url - i have simple question htaccess, can't solve it. part of links of website on google search has fragment of url , don't know how fragment appeared there? here examle: in google seach is: http://dobry-portal.pl/part1-/tranformers,main,film,0 real adres http://www.dobry-portal.pl/tranformers,main,film,0 sometimes adrress on google seach have more 1 part between slashes ex. http://dobry-portal.pl/part1-/part2-/part3-/tranformers,main,film,0 how can cutting of parts in htaccess redirect real adres http://www.dobry-portal.pl/tranformers,main,film,0 i've tried rewriterule (.)/part1-/(.) $1/$2 [l] but not work thanks help, adam this should remove "fake subdirectories" between slashes you: rewriterule ^.*/([^/,]*,.*) $1 [l,r=301] ^.*/ greedily matches path lastly forwards slash ([^/,]*,.*) captures grouping 1... [^/,]* characters not slashes or commas, ,.* comma , rest of

jquery - Javascript Send parameters from button to function -

jquery - Javascript Send parameters from button to function - $.getjson('/courthousemanagement/loadlawcourt/?cityid=' + id, function (result) { $('#justicecourttable').html(''); (var = 0; < result.length; i++) { var tablestring = '<tr>' + '<th>' + result[i].courtid + '</th>' + '<th><button type="button" class="btn btn-sm btn-primary" onclick="javascript:selectclaimant(' + result[i].courtid + ',\'' + result[i].name +');">update</button></th>'+ //problem here '<th><button type="button" class="btn btn-sm btn-primary" onclick="javascript:selectclaimant(' + result[i].courtid + ',\'' + result[i].name +');">delete</button></th>' //problem her

c++ - performance.exe in opencv autoclose when finish -

c++ - performance.exe in opencv autoclose when finish - i'm new opencv,i have done haar-training , decent detection. however, when want check nail rate using performance.exe, run until finish , auto-close , cannot check nail rate, how solve this? thanks assuming, running performance on command prompt; go command line , run: c:\program files\opencv\bin> performance -data trainingsample.xml -info testingsample\testsample.txt -sf 1.2 -w 15 -h 20 > testresult.log you need place testingsample.txt in folder testingimages , if not set testingsample.txt testingimage performance programme execute not save , show result. > testresult.log used direct result of execution log file rather screen, can remove it. adjust opencv path. please post in details if see more problem. happy coding :) c++ opencv

javascript - WYSIHTML5 editor incorrecty parses text entered as HTML code -

javascript - WYSIHTML5 editor incorrecty parses text entered as HTML code - if seek paste html code in rich text editor mode parsed incorrectly e.g.: go here http://xing.github.io/wysihtml5/ and seek paste text: <a href="http://google.com"> the pasted text parsed , looks ugly, want see exacly entered javascript wysihtml5 bootstrap-wysihtml5

html - Display content after a full-screen background image,using CSS -

html - Display content after a full-screen background image,using CSS - i trying display content after(below image,as scroll down) full-screen background image.i have decided utilize css3 technique : body{ background: url('images/body-bg.jpg') no-repeat center center fixed; -moz-background-size: cover; -webkit-background-size: cover; -o-background-size: cover; background-size: cover; } here codepen : link what did in pen above : .content{ width:100%; background-color:#fff; position:absolute; top:100%; left:0; text-align: center; } here html : <html> <body> <header>my title</header> <div class="content">my content starts here</div> </body> </html> my question best way style content after(below image,as scroll down) background image ? use jquery var winh = $(window).height(); var winw = $(window).width(); $("body").css("background-size",winh

c# - unable to get correct ConnectionString from app.config -

c# - unable to get correct ConnectionString from app.config - let's have 2 folder > 1>original 2> copied. have copied total visual project folder1 folder2 , changed connectionstring path respect folder2. folder 1 > <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionstrings> <add name="mydata" connectionstring="data source=.\sqlexpress;attachdbfilename=e:\folder1\mydata.mdf;integrated security=true;user instance=true" /> </connectionstrings> </configuration> connection manager string connectionstring = configurationmanager.connectionstrings["mydata"].connectionstring; , after coping folder 2 chanaged path > <?xml version="1.0" encoding="utf-8" ?> <configuration> <connectionstrings> <add name="mydata" con

Having trouble with ascending insertion sort with strings in C -

Having trouble with ascending insertion sort with strings in C - i having problem sorting out list of names in c. have code sorting names, when go print them out still in same order @ origin isnt right. function need help sort_data function. post of code can help guys out helping me! lot in advance, function has been killing me morning. #include <string.h> #include <stdio.h> #include <stdlib.h> #define max_string_len 25 void insert_data(char **strings, const char* filename, int size); void allocate(char ***strings, int size); void sort_data(char **strings, int size); int main(int argc, char* argv[]){ if(argc != 4){ printf("wrong number of args"); } char **pointer; int size = atoi(argv[1]); allocate(&pointer, size); insert_data(pointer, argv[2], size); sort_data(pointer,size); } void sort_data(char **strings, int size){ int i, j; char temp[max_string_len]; for( = 1; < size; i++){

c++ - How can I check a log for a string or a digit? -

c++ - How can I check a log for a string or a digit? - i'm doing basic coding in visual studio. i attempting check output of command grouping of period separated digits or string. works fine when checking string doesn't seem work if inquire grouping of period separated digits such 4.2.3 the code using follows bool checklogforstring(char* str) { file* f = fopen (logname, "r"); if (null == f){ messagebox(0, "can't find log!","error",mb_applmodal|mb_ok|mb_iconstop);return false;} bool found = false; while (!feof(f)) { char buf[1000]=""; if (fgets(buf,1000,f)==null) break; strupr(buf); if (0 != strstr (buf, str))found = true; } fclose (f); homecoming found; } i phone call follows if (checklogforstring("words")) { } that works fine when try if (checklogforstring("4.2.3")) { } i

Send some preliminary data in a rails response -

Send some preliminary data in a rails response - in rails, possible send response browser in 2 parts? first part doesn't need specific (reason explained below). sec part of response total normal response such view in .html.erb format. the reason i'm looking heroku requires response sent browser within 30 seconds, it's taking longer 30 seconds app perform several dozen calculations on 1.2 1000000 records. the heroku documentation indicates may possible platforms (but possible rails?): https://devcenter.heroku.com/articles/limits http requests have initial 30 sec window in web process must homecoming response info (either completed response or amount of response info indicate process active). processes not send response info within initial 30-second window see h12 error in logs. p.s.- recognize there may improve platforms rails build kind of data-intensive app, i'm building in rails because that's know. thanks! the right w

java - Spring NamedParameterJdbcTemplate delete with IN clause -

java - Spring NamedParameterJdbcTemplate delete with IN clause - when seek execute delete, items set list<string> , namedparameterjdbctemplate seems not setting values placeholders of generated statement. public class dbtest { public static void main(string[] args) { basicdatasource basicdatasource = new basicdatasource(); basicdatasource.setdriverclassname("com.mysql.jdbc.driver"); basicdatasource.seturl("jdbc:mysql://localhost:3306/test?rewritebatchedstatements=true"); basicdatasource.setusername("root"); basicdatasource.setpassword("qwedsa"); namedparameterjdbctemplate template = new namedparameterjdbctemplate(new jdbctemplate(basicdatasource)); immutablemap<string, ?> param = immutablemap.of("items", newarraylist("a", "b", "c"), "user_id", 1); map<string, ?>[] params = new map[]{param};

Can I use TFS 2013 for Continuous Integration for non microsoft stack OSes? i.e. android, mac, iOS, etc -

Can I use TFS 2013 for Continuous Integration for non microsoft stack OSes? i.e. android, mac, iOS, etc - for continuous integration, tfs microsoft technology stack solution? if have projects require building apps every major desktop , mobile os platform, tfs appropriate continuous integration solution or need elsewhere? you can customize tfs build compile/build app (for illustration have build compiling oracle forms on linux). can utilize link start: customize build process template tfs continuous-integration build-automation tfs2013

ios - Not getting success or error callback after FTP upload -

ios - Not getting success or error callback after FTP upload - i followed link ftp upload : https://github.com/gokce/phonegap-ios-plugin-ftpupload. able upload file on ftp every time weather success or error going cdvpluginresult.m file on success going function - (nsstring*)tosuccesscallbackstring:(nsstring*)callbackid and on error going function - (nsstring*)toerrorcallbackstring:(nsstring*)callbackid so want homecoming success or error javascript can help me? following snippet returning success or error - (void) returnsuccess { nsmutabledictionary* poserror = [nsmutabledictionary dictionarywithcapacity:2]; [poserror setobject: [nsnumber numberwithint: cdvcommandstatus_ok] forkey:@"code"]; [poserror setobject: @"success" forkey: @"message"]; cdvpluginresult* result = [cdvpluginresult resultwithstatus:cdvcommandstatus_ok messageasdictionary:poserror]; if (callbackid) { [self writejavascript:[result tosuccesscallbackstring:cal

python - pandas groupby to nested json -

python - pandas groupby to nested json - i utilize pandas groupby generate stacked tables. want output resulting nested relations json. there way extract nested json filed stacked table produces? let's have df like: year office candidate amount 2010 mayor joe smith 100.00 2010 mayor jay gould 12.00 2010 govnr pati mara 500.00 2010 govnr jess rapp 50.00 2010 govnr jess rapp 30.00 i can do: grouped = df.groupby('year', 'office', 'candidate').sum() print grouped amount year office candidate 2010 mayor joe smith 100 jay gould 12 govnr pati mara 500 jess rapp 80 beautiful! of course, i'd real nested json via command along lines of grouped.to_json. feature isn't available. workarounds? so, want like: {"2010": {"mayor": [ {"joe smith": 100}, {"jay gould": 12}

Manually create modules and their dependencies with angularjs -

Manually create modules and their dependencies with angularjs - we modular application ui divided in components/modules billing area, staff management, real time charts, shipment etc... client pays component/module , modules paid shall loaded on client side. name these paid modules "main modules" on client side because every main module route/button sub content user different claims can different things. what before angular initialized manually create modules basing on array of licensed module names. modules not licensed not created. here have understanding problem , can not find similar case in google. 1.) how can tell angularjs load specific module attached controllers/services , depending modules? 2.) happens mutual javascript includes cause immediate creation of angularjs modules? user @mpm set me on right track. best if files belonging angular module copied on index.html before body tag before index.html sent client side. way client not know how mo

actionscript 3 - How to get textfile text to sring variable action script 3 -

actionscript 3 - How to get textfile text to sring variable action script 3 - i new action script. how can input textfield value string or varible. code doesn't work var str:string = mytextfield.text; textfield s have property known text . property not quite same thing variable, it's similar; can utilize same way. since textfield object has property called text , , since of type string , it's simple declaring string variable, assigning property's value variable. actionscript-3

bash - Calculate mean and standard deviation for a column -

bash - Calculate mean and standard deviation for a column - i z r 1 -30 3.5 2 -30 3.4 3 -30 3.6 ... 10 -30 4.2 1 -29.5 4.6 2 -29.5 2.8 3 -29.5 3.4 .... 10 -29.5 3.6 1 -29.0 2.5 2 -29.0 2.6 3 -29.0 3.0 i have file contents 3 column (above) . except first line (i z r), info file has 600 rows. first thought using command split 3rd column 10-lines-continuos sections, , utilize script calculate means , sd each section ("i" 1 10). after that, want set results file (result.dat).the result file content 3 column below: z means sd tried scripts below. don't know how combine them in 1 script file. 10 = split($3, array, " ") begin {n=0 ; s=0; ss =0} nf=10 {n++; s+= $3; ss == $3;} end { means=(s)/10 sd=sqrt((ss-m)*(ss-m))/10 prin $2 $means $sd}

microsoft.phone.controls.webbrowser won't show video clips -

microsoft.phone.controls.webbrowser won't show video clips - in windows phone application i'm loading html site view, simple stuff method: var itemview = view norwegianbrowserview; var webbrowser = itemview.browsercontainer; webbrowser.navigate(new uri(_globalaccessobjects.activenorwaylink,urikind.relativeorabsolute)); the site loads except video clip. or knows video there shows black square. , pressing black square nothing. as side note can add together got same application ios , android , both got no problem in loading same website(+ load video). , here can press video clip , start playing. am loading website view wrong way? or microsoft.phone.controls.webbrowser not back upwards video clip? any help much appreciated. the ability play video clips in line in web page dependent upon version of windows phone running on , format of video. only window phone 8.1 supports playing video within page. unfortunately isn't yet available. video format may

php - Mass import custom attributes Magento -

php - Mass import custom attributes Magento - i wondering if has ever tried mass import custom attributes magento database before? client has magento store specialises in selling musical instruments, , wishes add together google shopping feed (using extension of name rocket web) sell products on google shopping. problem need both mpn (manufacturer product number) , brand (so instance gibson) shopping feed work, both of not automatically uploaded stores pos system. the way pos scheme works when product added, title / sku number / description / cost etc uploaded magento store, means client not need add together product twice. problem mpn , brand aren't out of box attributes, pos scheme not upload either of these magento, , hence have 1,000 products without them , apparently crucial google shopping feed extension. i'm working on getting table of each of products sku, mpn , brands local database of pos scheme (of each of products has 3), 1 time have question this:

html - How to build the modal in my case -

html - How to build the modal in my case - i using bootstrap modal app. have bunch of element within modal . however, 1 of element within modal set absolute position , element bigger modal. want show element on top of modal instead of beingness cutting off within modal . have tried z-index doesn't work. suggestion? lot! modal html <div class="modal" tabindex="-1" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> test </div> <div class="modal-body"> //....contents.. <div class="option"> lots of stuff...</div> </div> </div> </div> </div> css .option{ position: absolute; max-width: 600px; } it shows like -------------- |

What is a good program in C that can demonstrate strengths/weaknesses of different linux schedulers (noop, CFS, deadline)? -

What is a good program in C that can demonstrate strengths/weaknesses of different linux schedulers (noop, CFS, deadline)? - i'm trying find way demonstrate how different schedulers may impact runtime of program. far, i'm using time function on linux seek , see measurable differences using noop, cfs, , deadline schedulers i'm not having luck. test programs, wrote bunch of c programs loop , count numbers. i thought maybe if start 1 process counts higher number, , start sec process doesn't count quite high; using deadline scheduler, sec process may finish faster because it's less resource-intensive job. however, don't see difference @ between schedulers. i'm wondering if maybe understanding of schedulers little flawed? there more appropriate type of programme seek making demonstrate of these concepts? can give me tips, advice, or that? while poking around con kolivas code stumbled upon interbench. this benchmark application designed

apply - intersection in R -

apply - intersection in R - i have 2 tables. both tables have 1 column. both have random integer values between 1 1000. i want intersect these 2 tables. grab want intersect numbers if have difference of 10. 1st table -> 5 , 50, 160, 280 2nd table -> 14, 75, 162, 360 output -> 1st table -> 5, 160 2nd table -> 14, 162 how can accomplish in r you sapply function, checking if each element of x or y sufficiently close fellow member of other vector: x <- c(5, 50, 160, 280) y <- c(14, 75, 162, 360) new.x <- x[sapply(x, function(z) min(abs(z-y)) <= 10)] new.y <- y[sapply(y, function(z) min(abs(z-x)) <= 10)] new.x # [1] 5 160 new.y # [1] 14 162 r apply

c++ - Why is jumping across variable definitions (with goto) allowed? -

c++ - Why is jumping across variable definitions (with goto) allowed? - this question has reply here: why ok jump scope of object of scalar type w/o initializer? 2 answers i confused variable definition, when playing goto , switch statements. below code accepted compiler: goto label0; int j; // skipped "goto" label0: j = 3; my questions are: since definition of int j; skipped, how programme create object j , later assign value in j = 3 ? is code between goto , label compiled? is code between goto , label executed? (at run-time) does variable definition happen @ compile-time(or more proper term) or run-time? (i inquire new question focusing more on relative order of variable definition , compilation , execution. ) just found question close answer: why ok jump scope of object of scalar type w/o initializer? to summarize ,

jquery - Morris.js donut chart not displaying chart when getting data through Ajax from php script -

jquery - Morris.js donut chart not displaying chart when getting data through Ajax from php script - i working on displaying info through morris.js donut chart. these info come mysql database through php , ajax. the typical illustration type info displayed right in code working fine morris.donut({ element: 'donut-example', data: [ { label: "download sales", value: 12 }, { label: "in-store sales", value: 30 }, { label: "mail-order sales", value: 20 }] }); however, when phone call info database, chart not displayed. moreover, firebug not show errors. this output php: [{label: "4 pares",value: "9"},{label: "3 pares",value: "9"},{label: "2 pares",value: "6"},{label: "5 pares",value: "3"},{label: "6 pares",value: "2"},{label: "1 par",value: &quo

tomcat - url-pattern in security-contraints casing issue -

tomcat - url-pattern in security-contraints casing issue - i can lock downwards specific resource using security-constraints in tomcat. locks downwards path using exact casing specified. can still access resource ( file) changing case. what best way deal issue? tomcat enforces case sensitive access resources (even on case insensitive file systems windows) default changing case should never allow bypass security constraints. can think of couple of ways might happen: you ignored secuirty warning in docs , set allowlinking true on case insensitive file system. you using reverse proxy in front end of tomcat , have configured in such way bypass security constraints (if have configured reverse proxy we'd need know 1 , how configured help further). tomcat

javascript - Laravel with Jquery - Ajax Throwing 500 Error - Prob with Server Side -

javascript - Laravel with Jquery - Ajax Throwing 500 Error - Prob with Server Side - . hello y'all. trying gather few variables , send controller. maintain getting 500 error , can't figure out i'm going wrong other i'm pretty sure server side. pointers went wrong or improve practices appreciated! give thanks yall much! route: /*ajax edit cost on cost page*/ route::post('edit_price', array( 'as' => 'edit_price', 'uses' => 'pricecontroller@edit_price' )); controller: public function price_edit(){ console.log($id_and_db); } js: /*ajax edit prices*/ $(document).ready(function(){ $('.edit_button').click(function(e){ e.preventdefault(); var id_and_db = $(this).prop('name').replace('edit', 'newprice'), new_price = $('[name=' + id_and_db + ']').val(); $('#test')

native code crash (android)? -

native code crash (android)? - i'm having android app heavily uses ffmpeg ported android. works pretty on devices crashes on galaxy tab 10: 06-20 13:16:36.136 505-561/? d/crashanrdetector﹕ build: samsung/espresso10rfxx/espresso10rf:4.2.2/jdq39/p5100xxdmj2:user/release-keys hardware: piranha revision: 9 bootloader: unknown radio: unknown kernel: linux version 3.0.31-1919150 (se.infra@sep-107) (gcc version 4.4.1 (sourcery g++ lite 2010q1-202) ) #1 smp preempt fri oct 18 15:31:19 kst 2013 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** build fingerprint: 'samsung/espresso10rfxx/espresso10rf:4.2.2/jdq39/p5100xxdmj2:user/release-keys' revision: '9' pid: 22003, tid: 22003, name: om.company.project >>> com.company.project <<< signal 11 (sigsegv), code 1 (segv_maperr), fault addr deadbaad r0 00000027 r1 deadbaad r2 401b5258 r3 00000000 r4 00000000 r5 bebb936c r6 00000004 r7

multithreading - Client/Server Socket Java (pattern MVC) doesn't send correct information to the Client -

multithreading - Client/Server Socket Java (pattern MVC) doesn't send correct information to the Client - i'm writing game i'm problem server/client socket. game works when play in local , when play online rmi. problem there when seek implements socket (i must socket). how i've implemented code (i utilize pattern model-view-controller): server: class socketservercreate: create server , create thread receive connection (socketserverconnection) create thread receive message client (socketserverreceive). server instantiate object implements observer called model send info client (socketserveroutput). client: class socketclientcreate: open connection server, create thread receive message server , instantiate class implements observer called view send info server. the problem update method of server in class socketserveroutput called lot of time, must called 1 time send message client. clare post code of server , client. socketservercreate /* * class cr

swift - Create CString from NSData -

swift - Create CString from NSData - i have c api takes pointer arbitrary binary info function signatures following: void receivedata(const char *data, size_t length); the bridging header imports swift next definition: func receivedata(data: cstring, length: uint) i sense i'm missing basic, can't seem work out how cstring arbitrary nsdata - options seem conversion nsstring or string literal. how create cstring ? it create more sense able pass through cconstpointer<cchar> , compiler isn't having bar of - there way modify swift signature generated bridging header? edit: cstring removed in xcode 6 beta 4. release notes: the cstring type has been removed. values of type const char * imported constunsafepointer instead of cstring. c macros expand string literals imported string. a c string null-terminated. arbitrary binary info doesn't need null terminated. think problem bridging mechanism sees char * , thinks "c st

ssis - It requires Enterprise Edition (64-bit) or higher -

ssis - It requires Enterprise Edition (64-bit) or higher - i'm running sql 2012 standard edition , visual studio 2010 within virtual server , i'm running bundle via sql server job , next error: 06/17/2014 16:35:57,a_e,error,,x,a_e,,,the job failed. job invoked schedule 17 (a_e). lastly step run step 1 (a_e).,00:00:19,0,0,,,,0 06/17/2014 16:35:57,a_e,error,1,x,a_e,a_e,,executed user: nt service\sqlserveragent. microsoft (r) sql server execute bundle utility version 11.0.2100.60 64-bit copyright (c) microsoft corporation. rights reserved. started: 16:35:57 error: 2014-06-17 16:36:15.87 code: 0xc00470fe source: info flow task 1 ssis.pipeline description: fuzzy lookup cannot run on installed edition of integration services. requires enterprise edition (64-bit) or higher. end error error: 2014-06-17 16:36:15.87 code: 0xc00470fe source: info flow task 1 ssis.pipeline description: fuzzy lookup 1 cannot run on installed edition of int

c# - Entity Framework stops loading related entities after a while -

c# - Entity Framework stops loading related entities after a while - it seems after 5-40 hours of using same entity framework context, entities stop loading related objects. (ex: character.items null). entities loaded prior issue fine, , load correctly - occurs on entities loaded database instead of cache. i using entity framework in game server project context has remain active whole duration (otherwise context loses track of objects). server run in single thread, , database related functions (such loading character data, items, relations, etc) done in separate db thread ( ex: game.dbexecute(() => { ... }) ). time entity relations loaded, related info loaded in same db thread, , cached either in list or dictionary later utilize game thread. on average start out 5,000 entities, , 50,000 non-tracked entities (mostly info such skill info, monster info, item info, etc). during runtime, it's exclusively possible add/use 50,000 - 100,000 or more entities until maintena

android - Opengl Es liquid shader -

android - Opengl Es liquid shader - i have particle scheme in place in android opengl. physics taken care of , particles draw screen great. problem render gl_points. colored squares. wondering if knows how combine points blobs looks liquid when particles close enough. nice beingness able avoid textures shader suggestions much appreciated. there techniques marching cubes create mesh out of cloud of points. never run on smart phone in real time. unless simulate super tiny blob of liquid. you raytrace rendering using grid marching , particules in vicinity have distance threshold pixel exit marching loop , render color according distance of nearby particles @ point. very heavy smartphone (but perfecly doable for, say, gtx480). you give high technology , utilize billboard rendering, each point becomes 4 points (either geometry shader or cpu side particle field expansion re-create pass buffer of quads) utilize spherical billboard rendering right blending setup (additive

json - Angularjs $http not retrieving data regard url -

json - Angularjs $http not retrieving data regard url - im getting tired of not retrieve info in angular laravel backend. heres app.js: var lonecesitoapp = angular.module('lonecesitoapp', ['ngroute']); lonecesitoapp.config(function($routeprovider){ $routeprovider .when('/',{ controller: 'preguntascontroller', templateurl: '/partials/preguntas.html' }) .when('/pregunta/:id',{ controller: 'preguntacontroller', templateurl: '/partials/pregunta.html' }); }); lonecesitoapp.factory('pregunta', function($http){ var preguntas = {}; $http.get('/preguntas').success(function(datos){ preguntas = datos; }); return{ all: function(){ homecoming preguntas; }, get: function(id){ var resultado = null; angular.foreach(preguntas, function(p){ if(p.id == id) resultado = p; }); homecoming resultad

restructuredtext - How do I mark text fixed width and bold in Sphinx / reStructured Text? -

restructuredtext - How do I mark text fixed width and bold in Sphinx / reStructured Text? - i'm working on generating documentation sphinx / restructured text. can mark text either bold or fixed width . how mark text both formats this: --bold-and-fixed-width ? python-sphinx restructuredtext

java - Saving a javafx.scene.canvas with transparent Pixels -

java - Saving a javafx.scene.canvas with transparent Pixels - i'm trying write simple "paint"-like javafx-application. draw on javafx.scene.canvas, works quite well. now want save canvas ".png" image. works, transparent pixels swapped white ones. how save transparent pixels, transparent pixels? here how save canvas: private void savefile(){ filechooser fc = new filechooser(); fc.setinitialdirectory(new file("res/maps")); fc.getextensionfilters().add(new filechooser.extensionfilter("png","*.png")); fc.settitle("save map"); file file = fc.showsavedialog(primarystage); if(file != null){ writableimage wi = new writableimage((int)width,(int)height); seek { imageio.write(swingfxutils.fromfximage(canvas.snapshot(null,wi),null),"png",file); } grab (ioexception e) { e.printstacktrace(); } } } the problem when

group by - SQL columns grouped by one value output in a row -

group by - SQL columns grouped by one value output in a row - i never heard 1 of friends needs help sql code. he wants bring table records grouped 1 value in 1 row. in fact don't know how many records there can don't know if possible. for illustration have table: name | role | place | 1 | place1 b | 2 | place1 c | 3 | place1 d | 1 | place2 e | 2 | place2 f | 3 | place2 g | 1 | place3 now output should like: place | role 1| role 2| role 3| place1 | | b | c | place2 | d | e | f | place3 | g | | | is there possibility that? thanks effort! sql group-by

npm - yeoman with gulp-angular generator - ENOENT error -

npm - yeoman with gulp-angular generator - ENOENT error - was trying generate angular app gulp tasks using generator, after generator has finished , bower , np, had finished installing dependencies well, got next error message: browser-sync@0.9.1 node_modules/browser-sync ├── path@0.4.9 ├── commander@2.1.0 ├── opn@0.1.2 ├── dev-ip@0.1.7 ├── browser-sync-client@0.1.9 ├── ua-parser-js@0.6.2 ├── optimist@0.6.1 (wordwrap@0.0.2, minimist@0.0.10) ├── http-proxy@1.0.3 (eventemitter3@0.1.2) ├── lodash@2.2.1 ├── resp-modifier@0.0.4 ├── cl-strings@0.0.5 (chalk@0.4.0, lodash@2.4.1) ├── gaze@0.5.1 (globule@0.1.0) ├── browser-sync-control-panel@0.0.5 (through@2.3.4) ├── portscanner-plus@0.1.0 (q@1.0.1, portscanner@0.2.3) ├── socket.io@0.8.7 (policyfile@0.0.4, redis@0.6.7, socket.io-client@0.8.7) ├── connect@2.13.1 (uid2@0.0.3, methods@0.1.0, cookie-signature@1.0.1, pause@0.0.1, debug@0.8.1, fresh@0.2.0, qs@0.6.6, bytes@0.2.1, buffer-crc32@0.2.1, raw-body@1.1.3, batch@0.5.0, cookie@0.1.0, c

vba - Macro to copy/paste if autofilter results exist -

vba - Macro to copy/paste if autofilter results exist - i have next code. applying filter different criteria , works when filter has rows, when doesn't error "property allow procedure not defined , property procedure did not homecoming object" @ line "my_range.parent.autofilter.range.copy". how can skip empty "paste" go on macro? thanks!! my_range.autofilter field:=14, criteria1:="=federal" my_range.autofilter field:=7, criteria1:="=no" 'copy/paste visible info new worksheet my_range.parent.autofilter.range.copy sheets("federal").range("c5") .pastespecial xlpastevalues .pastespecial xlpasteformats application.cutcopymode = false '.select end end if easy way skip trough error write: on error goto myerrorhandler 'put line on origin of sub/function ... code ... myerrorhandler: 'after error code continues execute

python - java.io.IOException: Cannot run program "ipy" -

python - java.io.IOException: Cannot run program "ipy" - trying configure pydev utilize iron python interpreter (from anaconda) interpreter. first tried pydev's auto-config: preferences->pydev->interpreters->ironpythoninterpreter->quick auto-config produces error: java.lang.runtimeexception: java.io.ioexception: cannot run programme "ipy": createprocess error=2, there no ipy.exe on system. there however, c:\anaconda\scripts\ipython.exe. executable open python repl. i tried creating new configuration instance manually , set "interpreter executable" c:\anaconda\scripts\ipython.exe. @ first, produces error: see error log details. unable recreate interpreter info (its format changed. please, re-create interpreter information).contents found: ipython i removed -x "vm arguments internal shell" under preferences->...->ironpython interpreters, error remains. the new configuration interpr

yarn - Submit Spark with additional input -

yarn - Submit Spark with additional input - i have used spark build machine learning pipeline, takes job xml file input users can specify data, features, models , parameters. reason using job xml input file users can modify xml file config pipeline , not need re-compile source code. however, spark job typically packaged uber-jar file, , seems there no way provide additional xml inputs when job submitted yarn. i wonder if there solutions or alternatives? i'd spark-jobserver can utilize submit job spark cluster configuration. might have adapt xml json format used config or maybe encapsulate somehow. here's illustration on how submit job + config: curl -d "input.string = b c b see" 'localhost:8090/jobs?appname=test&classpath=spark.jobserver.wordcountexample' { "status": "started", "result": { "jobid": "5453779a-f004-45fc-a11d-a39dae0f9bf4", "context": "b7ea0eb5

javascript - PhantomJS cannot click on existing elements -

javascript - PhantomJS cannot click on existing elements - i utilize phantomjs 1.9.7 on windows 8.1 , going click on login button after typing username , password. can write username , password but, when want phantomjs click on button, can find element not able of clicking on that. found in previous posts need create event , utilize "dispatchevent". did got error follows: typeerror: 'undefined' not function (evaluating 'elm.dispatchevent(event)') i tried help eventlistener got same error that. how can click on element? var page = require('webpage').create(); page.open('url', function() { var submitbutton = enteruserandpassandlogin(); click(submitbutton); phantom.exit(); }); function enteruserandpassandlogin() { var element = page.evaluate(function() { document.queryselector('input[name="username"]').value = "*******"; document.queryselector('input[name

midi - How to break out of a subrule once a certain part of the rule is met? -

midi - How to break out of a subrule once a certain part of the rule is met? - currently parsing midi messages firmata protocol in rebol 3, , came across situation haven't seen before. basically, have generic rule re-create bytes between framing bytes. rule eating framing bytes. have reduced code following: data: #{ f06c00010101040e7f000101010308040e7f00010101040e7f0001010103 08040e7f000101010308040e7f00010101040e7f00010101040e7f0001010103 08040e7f000101010308040e7f000101010308040e7f00010101040e7f000101 01040e7f00010101020a7f00010101020a7f00010101020a7f00010101020a7f 00010101020a06017f00010101020a06017ff7 } sysex-start: #{f0} sysex-end: #{f7} capability-query: #{6b} capability-response: #{6c} capability-end: #{7f} received-rule: [ sysex-start capability-response-rule sysex-end ] capability-response-rule: [ capability-response [ capability-end | [copy pin 1 skip] ] ] parse info received-rule the issue

c# - Data Sharing In between Xaml pages -

c# - Data Sharing In between Xaml pages - i developing first windows phone app , weather app.i have list in main page display country name , current temperature.now when click on 1 country in list page navigated xaml page show detailed info weather conditions. but problem facing when navigate xaml page there should give me detailed contents of next country in list in same format previous. can know how possible pretty new in field. thanks in advance code list <phone:longlistselector x:name="mainlonglistselector" datacontext="{binding listdata}" isgroupingenabled="false" > <phone:longlistselector.itemtemplate> <datatemplate> <stackpanel orientation="horizontal" grid.column="0"> <image name="condition" source="{binding imagetype}" height="80" /> <grid horizontalal