Posts

Showing posts from July, 2013

java - Upload complete event using HttpPost -

my app uploads image server. in order execute uploading, use httppost class. here relevant code fragment: try { httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("%path_to_server_page%"); httppost.setentity(new urlencodedformentity(namevaluepairs)); httpclient.execute(httppost); } catch (exception e) { system.out.println("connection error: " + e.tostring()); } my question how can raise event , know if uploading has been finished sure file on server? thanks. probably, implementation of observer design pattern suitable solution. reference: https://stackoverflow.com/a/6270150/462347

Is it possible to have deployment slots with different service plans in Azure WebApps? -

i've worked lot in past azure cloud services web roles, bit new azure websites/webapps. loved concept of multiple deployment slots define webapps, enables useful cd scenarios. in case, have test->preprod->prod slots defined. good! is possible specify different pricing tiers or number of instances each of environments? seem share pricing tier of service plan. possible define different number of instances each one? well, multiple deployment slots available in standard sku (the highest one): http://azure.microsoft.com/en-us/pricing/details/websites/ so, no. require not possible. you can mitigate not using staged publishing. can instead, have different service plans different web apps. can link each of web apps different branch of repository ( https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/ ). when push uat branch - deployment in uat web site. when push relese branch, deployment releas web site , on.

javascript - Generate HTML Canvas from AngularJS Template -

Image
i trying render html element on canvas using html2canvas js. using angularjs data binding on html page , dynamic data not rendered on generated canvas these html elements. example, have html element this: <table class="table table-striped table-bordered table-hover"> <tr> <th>name</th> <th>uri</th> <th>is default</th> <th>action</th> </tr> <tr ng-repeat="printer in printers"> <td>{{printer.name}}</td> <td>{{printer.url}}</td> <td>{{printer.default}}</td> <td><button ng-click="printtestpage(printer.url)">print test page</button></td> </tr> </table> but can see dynamic data not rendered on canvas: suggestions regarding how properly, or without using html2canvas js??? when call html2canvas? should call function after d...

private key - Using Bitcoin-ruby to make a transaction -

i posted question on bitcoin stack told may have better luck reposting here. i having trouble bitcoin-ruby gem. following error when trying send money address have on test network: /var/lib/gems/2.2.0/gems/bitcoin-ruby-0.0.7/lib/bitcoin/protocol/txout.rb:76:in pk_script=': undefined method bytesize' nil:nilclass (nomethoderror) i generating private key with: def new_address bitcoin::generate_address end and getting details private key with: def key_details(prikey, pubkey) #returns prikey, prikey_hash58, pubkey_hash58, pubkey_uncompressed, address hash my_key = bitcoin::key.new(prikey, pubkey) { prikey:prikey, prikey_base58:my_key.to_base58, pubkey_58:my_key.hash160, pubkey: my_key.pub_uncompressed, address:my_key.addr } end the code have send money myself follows: require 'bitcoin' require_relative 'utilities.rb' require 'open-uri' bitcoin.network = :testnet3 def build_transaction(prev_tx, prev_o...

java - JDBC is throwing grammar error when the query is working in php myadmin -

i working on java website using jdbc mysql. here simple function fetch data sql, @override public list fetchmusic(string _uname, string _chnl_name) throws sqlexception { string sql = "select * `channel_songs` `uid` = " + " (select `id` `user` binary `uname` = ?)"+ " , `chnl_id` = (select `id` `channel` binary `chnl_name` = ?);"; connection conn = datasource.getconnection(); preparedstatement ps = conn.preparestatement(sql); ps.setstring(1, _uname); ps.setstring(2, _chnl_name); list<map<string, object>> musiclistsbychnl = jdbctemplate.queryforlist(string.valueof(ps)); return musiclistsbychnl; } so, when running this, getting error says, org.springframework.jdbc.badsqlgrammarexception: statementcallback; bad sql grammar [com.mysql.jdbc.jdbc4preparedstatement@3a4eb50a: select * `channel_songs`]; nested exception com.mysql.jdb...

How to use multiple Git SSH keys on Eclipse? -

i looked several answers , forums solution not find single 1 works. i have scenario: eclipse luna service release 2 (4.4.2) ubuntu 14.04 x64 two ssh keys on ~/.ssh folder two bitbucket accounts (one personal projects , 1 enterprise) a git repository accessible primary key (~/.ssh/id_rsa) a git repository accessible secondary key (~/.ssh/other) i created ~/.ssh/config file contents: host bitbucket bitbucket.org hostname bitbucket.org identityfile ~/.ssh/id_rsa identityfile ~/.ssh/other user git and sake of sanity added second key using ssh-add well. running ssh-add -l lists both keys. when using command line, git commands work charm, both repositories. when using eclipse, invalid remote: origin error when trying clone or pull repository secondary key: caused by: org.eclipse.jgit.errors.noremoterepositoryexception: git@bitbucket.org:myuser/myrepository.git: conq: repository access denied. i added secondary key @ window > preferences >...

sql server 2008 - SQL query with distinct records -

i want distinct records below query. mean if uncomment commented lines. please help. select cs1.nm categorytype, cs2.nm category --, cs2.nm sub_category cat_struct cs inner join cntrct_cat cc on cc.cat_struct_id = cs.cat_struct_id inner join cat_struct cs1 on cs1.cat_cd = cs.cat_cd , cs1.mkt_cd not null inner join cat_struct cs2 on cs2.cat_cd = cs.cat_cd , cs2.mkt_cd null --join cat_struct cs3 --on cs3.cat_cd = cs.cat_cd , cs3.mkt_cd null --and cs3.sub_cat_cd not null cs.lob_cd ='p' , cc.cntrct_vers_id = 781439637 , cs2.nm = 'adult books' use keyword distinct in select statement. yow records not repeated. thanks

javascript - LinkedIn API Login With Specific Account -

i login using own account in conjunction linkedinapi. problem have examples can see either use cookie or login interface local users login credentials. aim login own specific account providing username , password. i can extract testimonials profile , display them on website. is possible? , if have examples of how can achieved? after thinking considerable amount of time realised answer quite simple. if make api call on server side can specify credentials. example in mvc application might make call on controller action method.

alchemyapi - Shows Progress Dialogbox when API request is being processed in CakePHP 2.x -

$this->alchemyapi = new alchemyapi(); $response = $this->alchemyapi->sentiment("text", "text anaylse", null); i have above code made request alchemyapi , wait response ,in action of controller.my question should using create progress box showing spinning icon while request being processed.and dialogbox disappear when request finished?.i wondering if possible on server side(on controller/action) instead of using javascript/jquery on view. since how design code passing $response variable view. $this->set($response); i new cakephp , have no idea start that.any appreciated.

java - User input from editText to a String -

i looks simple question, can't manage work. i'm trying make weather app, , im using yahoo api, , app works: service.refreshweather("dallas, tx"); i wanted make user input city, made this: mbutton = (button)findviewbyid(r.id.mdugme); medit = (edittext)findviewbyid(r.id.unesigrad); string userinput11; mbutton.setonclicklistener( new view.onclicklistener() { public void onclick(view view) { userinput11 = medit.gettext().tostring(); } }); service.refreshweather(userinput11); why isn't working? take code mbutton.setonclicklistener( new view.onclicklistener() { public void onclick(view view) { userinput11 = medit.gettext().tostring(); } }); service.refreshweather(userinput11); and reorder this mbutt...

How to connect to socket.io using python -

i want connect socket.io server using python. there way it? i have tried websocket-client suggested in this answer . ws = create_connection("ws://example.com:1000/socket.io/") that code throws exception websocket._exceptions.websocketconnectionclosedexception: connection closed. i feel missing parameters because js client connection url looks this: ws://example.com:1000/socket.io/?eio=3&transport=websocket&sid=charsandnumbers you can @ this: socketio-client as example, from socketio_client import socketio socketio = socketio('localhost', 8000)

node.js - Where is 'NODE_ENV' being set to 'production'? -

i tried run npm install install packages newly added dev dependencies package.json . surprise couldn't npm install of new dev dependencies. after digging around realised node_env environmental variable set production . appears set default when open new shell (i can see using printenv ), , isn't being done in ~/.bash_profile . inside ~/.npmrc contains commented lines, where might being set? edit: i'm on osx, , there nothing wrong package.json . can install dev dependencies using node_env=development npm install . it's not being set in: ~/.bashrc ~/.bash_profile ~/.npmrc /etc/profile.d/* you have couple of places check: ~/.bashrc ~/.bash_profile ~/.npmrc ~/.zshrc (if you've got zsh installed) /etc/profile.d/env (or similar file) you run export node_env=development before running npm install , or see here more information npm install: https://docs.npmjs.com/misc/config#production might want paste package.json file here , have sanity che...

Menu mmenu not displaying with jquery mobile -

i using jquery ui autocomplete jquery mobile. in presence of these 2 libraries .mmenu displays nothing. i create menu using code: $(document).ready(function() { var mmenu = $("#mcba-menu").mmenu({}).data('mmenu'); $('a').click(function(ev) { ev.preventdefault(); mmenu.open(); }); }); my header is: <head> <title>mcba</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="shortcut icon" href="./favicon.ico"></link> <link href="./resources/css/jquery/jquery-ui.css" rel="stylesheet"></link> <link rel="stylesheet" href="./resources/css/jquery/jquery.mobile- 1.4.5.min.css"></link> <link rel="stylesheet" href="./resources/css/3rdparty/hamburger.css"></link> <link rel="sty...

html - Display label (span) no mouse hover -

i creating bar icons content on side: http://plnkr.co/edit/g6boxcskihewdwp7zrrw?p=preview when mouse on icon want name appear in front of icon , on content. showing under icon. how can fix this? markup <div class="wrapper"> <div class="navigation"> <ul> <li> <a href="#"> <i class="fa fa-home"></i> <span>one</span> </a> </li> <li> <a href="#"> <i class="fa fa-book"></i> <span>two</span> </a> </li> </ul> </div> <div class="content"> content</br> span of icon should on content when mouse on </div> </div> css .wrapper { border: 1px solid red; padding: 0; margin: 0; overflow: hidden; } .navigation { float: left; width: 4...

r - Rcpp, Rtools, and cygwin: failing to install Rcpp -

first try, within cygwin r 3.1.3 installed: >path=/usr/local/bin:/usr/bin in r: >install.packages("rcpp",repos="http://cran.us.r-project.org") yields error [...] /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lpcre /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -llzma /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lbz2 /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lz /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -liconv /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -licuuc /usr/lib/gcc/x86_64-pc-cygwin/4.9.2/../../../../x86_64-pc-cygwin/bin/ld: cannot find -licui18n collect2: error: ld returned 1 exit status /usr/lib/r/share/make/shlib.mk:6: recipe target 'rcpp.dll' failed make: *** [rcpp.dll] error 1 error: ...

vba - Variable Table Name in SQL Server -

i've looked through forums , know question has been asked before, after trying has been suggested still can't work. i'm new both vba , sql explain why i'm struggling. what i'm trying create form when executed runs query: strsql = "select new.[service name], new.wbs, new.[billing code], new.[cpu units], new.[vcpu units], new.[billing status], new.[bill to] " & _ " " & strnew & " new left join " & strold & " old on new.[service name] = old.[service name] " & _ " old.[service name] null;" i created form , have stored user inputs both strnew , strold respectively. when execute code, receive error. i've confirmed values inputted form actual "tables" located in database. why not work? appreciate help. i think trying create dynamic query, first advise can give you, need read erland sommarskog's article . in order solve problem is: dim strnew string dim str...

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

i trying hit soap api in application login purpose , getting above mentioned error , can 1 tell me going wrong , first time soap apis. here code hit soap :- vector<object> args = new vector<object>(); hashtable<string, object> hashtable = new hashtable<string, object>(); hashtable.put("email", "mss.siddhart28@gmail.com"); hashtable.put("password", "siddharth"); args.add(hashtable); soapserializationenvelope envelope = new soapserializationenvelope( soapenvelope.ver11); envelope.dotnet = true; envelope.xsd = soapserializationenvelope.xsd; envelope.enc = soapserializationenvelope.enc; (new marshalhashtable()).register(envelope); httptransportse androidhttptransport = new httptransportse( "http://tempuri.org/", 15000); androidhttptransport.debug = true; string result = ""; try { soapobject request = new soapobject("http:...

jquery - BlueImp silently fails on file upload -

when try upload using blueimp, fllowing error when open console: uncaught typeerror: cannot read property 'parsemetadata' of undefined accompanied stack trace. seems calling upload logic without file. there way can more information? make sure including js script https://blueimp.github.io/javascript-load-image/js/load-image.all.min.js before of file upload scripts. file needed parsemetadata function. <script> includes should in following order, taken directly example found @ https://blueimp.github.io/jquery-file-upload/ . <!-- load image plugin included preview images , image resizing functionality --> <script src="//blueimp.github.io/javascript-load-image/js/load-image.all.min.js"></script> <!-- canvas blob plugin included image resizing functionality --> <script src="//blueimp.github.io/javascript-canvas-to-blob/js/canvas-to-blob.min.js"></script> <!-- iframe transport required browsers wi...

MySQL update subselect issue -

before post question, tell all, not duplicate of this or that , since not want solve specific issue, rather desire understand one. reading docs , can see 2 interesting examples of anomalies regarding subqueries inside update command: update t1 set column2 = (select max(column1) t1); the error is error 1093 (er_update_table_used) sqlstate = hy000 message = "you can't specify target table 'x' update in clause" 2. select * t1 s1 in (select s2 t2 order s1 limit 1) the error is error 1235 (er_not_supported_yet) sqlstate = 42000 message = "this version of mysql doesn't yet support 'limit & in/all/any/some subquery'" looking @ first example can tell updating column2 of t1 might or might not change column1 values, instance because of triggers or if columns same. however, wonder why mysql throwing error instead of evaluating subquery normally, or @ least, determining whether possible subquery's result c...

ios - Save state of the options settings (cocos2d) -

i've question, want game save state of settings in options scene, example..if switch off music clicking on music button, music off , written under music image "music off" if change scene ,the settings remain same set , until here ok....but when restart application, settings returning before, music on , "music on" in written under music image, how can fix this? the easiest , common way achieve nsuserdefaults. firstly, have register defaults @ first launch (in applicationdidfinishlaunch). nsuserdefaults *userdefaults = [nsuserdefaults standarduserdefaults]; if (![userdefaults boolforkey:@"haslaunchedonce"]) { [userdefaults setbool:yes forkey:@"haslaunchedonce"]; nsdictionary* defaults = [nsdictionary dictionary]; [defaults setvalue:@yes forkey:@"musicon"]; [userdefaults registerdefaults:defaults]; } then example set new value on button press musicbutton.block = ...

javascript - How to extract data from unknown json file? -

i have json file : { "moosy": { "id": 39464441, "name": "moosy", "profileiconid": 558, "summonerlevel": 30, "revisiondate": 1436887737000 } } which generated api. here code : var http = require('http'); var lolapi = require('leagueapi'); var summonername = 'moosy'; var server = http.createserver(function(req, res) { res.writehead(200); lolapi.init('my_very_private_key', 'euw'); lolapi.summoner.getbyname(summonername, function(err, summoner) { if(!err) { var profil = json.stringify(summoner); console.log(profil); res.write(profil); var summonerid = profil.summonername.id; console.log(summonerid); res.write(summonerid); } }) }); server.listen(8080); and i'd extract different vari...

c# - In repository pattern, should I use database model as my View model or should I create separate ViewModel for that? -

self explanatory, have model map 1:1 db example: public class user { [key] public int userid { get; set; } public string firstname { get; set; } public string lastname { get; set; } } is there downside if use in view cshtml example : @model user or should create viewmodel this public class userviewmodel { [required] public string firstname { get; set; } [required] public string lastname { get; set; } } and bind view @model userviewmodel the idea of programming view should not know data comes ... using database model in view breaks sign . the best use viewmodel , , in future pleased choice example, view might 1:1 database table, imagine designer wants add recent "messages", that's new table call based on user... with viewmodel can add , edit view , controller, if use 1:1 need create brand new viewmodel... then, views have viewmodels , don't... messy! to out, can use automapper viewmodels construction, a...

html - Increase gap between select menu options -

i creating drop down list in html using select tag. unable increase gap between options inside select list. below code. how can increase gap between options? <style type="text/css"> #height { width: 200px; } #height option { width: 500px; height:200px !important; } </style> <select id="height"> <option value="bugatti">bugatti</option> <option value="lamborghini">lamborghini</option> <option value="ferrari">ferrari</option> <option value="levis">levis</option> <option value="reebok">reebok</option> <option value="nike">nike</option> </select> the rendering of option tags determined browser , have own peculiar way , restrictions padding , margin of option tag works in mozilla firefox while doesn't works chrome . s...

c - Segmentation Fault, large arrays -

#include <stdio.h> #define n 1024 int main(){ int i, j; int a[n][n]; int b[n][n]; (i=0;i<n;i++){ a[i][i]=i; b[i][i]=i; } (i=0;i<n;i++) for(j=0;j<n;j++) { printf("%d", a[i][j]); printf("%d", b[i][j]); } return 0; } this program reason of segmentation fault, if define n 1023, program work correctly. why happens? you overflowing stack. 2 * 1024 * 1024 * sizeof(int) lot systems. the simplest solution make arrays static . static int a[n][n]; static int b[n][n]; other methods: make arrays global (this same above) use malloc in loop , of course remember free int **a = malloc(n * sizeof *a); (i = 0; < n; i++) a[i] = malloc(n * sizeof *a[i]);

db2 luw - File loading issues in DB2 using Load utility -

i have .csv file, comma-delimited (located @ c:/). using db2 load utility load data present in csv file in db2 table. load client c:\users\somepath\filename.csv of del modified nochardel coldel, insert schemaname.table_name; csv file has 25 rows. after utility completed got error message nochardel. table has 25 rows loaded. when try execute insert/update/delete statement on of tables present in schema getting following error. lookup error - db2 database error: error [55039] [ibm][db2/aix64] sql0290n table space access not allowed. could please me whether making mistake or missing parameter causing lock on table. earlier while loading file similar situation occurred, dba confirmed table space in question in “load in progress” state changes generated db2 load utility not logged (one of side-effects of high performance). if database crashes after load impossible recover table loaded replaying log records, because there no such records. reason tablespace c...

github - How to Host Git Repository on Free Host? -

is there way host git repository on free host or have use bit bucket? want host own host and how use source tree connect it? i tried connect source tree , create repository have no idea how , if possible it if not possible host on computer , use source tree update stating website new files, if works update production one? is there anyway this? sourcetree optimized bitbucket, github , stash, have @ least reduced functionality. these links you: git: how connect sourcetree git-enabled-web-hosting via ssh? https://confluence.atlassian.com/pages/viewpage.action?pageid=282173660 how can connect own git server in sourcetree?

javascript - Angular $routeParams is empty -

i have url that's getting passed angular code via rails. however, when try pick parameter in url, shows blank. can me out? sample url: http://localhost:3000/events/event1 plnkr: http://plnkr.co/edit/yg8wazhhgpth2pbfzql3?p=preview angular: eventsapp = angular.module('eventsapp', ['ngroute']) eventsapp.config [ '$routeprovider' '$locationprovider' ($routeprovider, $locationprovider) -> $locationprovider.html5mode(true) $routeprovider.when '/events/:eventname', templateurl: '../../views/events/events.html.erb' controller: 'eventsctrl' return ] eventsapp.controller('eventsctrl', [ '$scope' '$routeparams' ($scope, $routeparams) -> console.log($routeparams.eventname) # shows undefined $scope.greeting = $routeparams.eventname ]) html: events.html.erb <div> {{...

javascript - Show different divs from different buttons with same class -

i have (currently) 3 buttons <p><button class="trigger-overlay" type="button">open overlay 1</button></p> <p><button class="trigger-overlay" type="button">open overlay 2</button></p> <p><button class="trigger-overlay" type="button">open overlay 3</button></p> with these buttons, want show different menus/overlays. overlays looks this: <!-- menu1 --> <div class="overlay overlay-hugeinc"> <button type="button" class="overlay-close">close</button> <nav> <ul> <li><a class="menuitem1">menu1</a></li> <li><a class="menuitem2">item2</a></li> </ul> </nav> </div> <!-- menu2 --> <div class="overlay overlay-hugeinc"> <but...

javascript - Play Local Video on PhoneGap/Cordova in Windows Apps -

i'm developing windows/windows phone 8.1 apps using phonegap(html, js, css, jqm) , native/windows runtime component. want play video in html page. video file located inside application folder. don't know what's wrong. please me. in html, have added: <div id="content"> <button onclick="domainobject.playvideo()" type="button" data-theme="b">play video</button> <video id="video" src='' type='video/mp4' width="400" autoplay="autoplay" controls></video> </div> and in js: var domainobject = { playvideo: function () { var vidpath = windows.storage.applicationdata.current.localfolder.path + "\\test.mp4"; var video = document.getelementbyid('video'); var source = document.createelement('source'); source.setattribute('src', vidpath); video.appendchild(source...

android - What is difference between layout-small and layout-sw320dp -

i know how use following folders example not know difference between layout-small , layout-sw320dp ? also, suggest me folders important optimization.i not program seen users irregular.i want final answer you. based on folders design layouts? because have not multiple android devices test layout in different screen size. i know how use folders , have not problem it.but question folders continuous use , devices? layout-sw320dp layout-sw480dp layout-sw600dp layout-sw720dp layout-small, layout-large etc... both qualifiers define layouts specific screen sizes. before honeycomb - 3.0 (i guess), screen's diagonal size measured based in 4 groups: small, normal, large, , extra-large . after layout resources defined screen sizes smallest width ( sw stands smallest width). resuming, layout-small deprecated , layout-swxxxdp qualifier should used instead. you can more info these qualifiers in supporting multiple screen 's android official doc page. ...

c++ - invalid initialization of non-const reference of type 'const char*&' from an rvalue of type 'const char *' -

i made mystrcpy function, void mystrcpy(char *&stuff, const char *&otherstuff){ for(int i=0; stuff[i]&&other[i]; i++){ stuff[i]=other[i]; } } and main function: int main(){ char *hello="hello"; mystrcpy(hello, "bye bye"/*<--i have no clue data type is!!*/); printf("%s\n", hello); return 0; } it not compile, , says "invalid initialization of non-const reference of type 'const char*&' rvalue of type 'const char *'"... when do: const char *bye="bye bye"; mystrcpy(hello, bye); it compiles without error. i need know why former 1 doesnt work, thanks. your function takes a reference pointer , bit unusual. notably, means input must pointer has own storage (so can take reference pointer). const char *bye="bye bye"; mystrcpy(hello, bye); works because bye pointer variable, can take reference it. mystrcpy(hello, "bye bye") ...

javascript - Waiting for jquery to load asynchronously before loading js -

i using following load ads on site <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> var adwidth = $(document).width(); google_ad_client = "ca-pub-6777348526535979"; if ( adwidth >= 768 ) { google_ad_slot = "3870513647"; google_ad_width = 728; google_ad_height = 90; } else { google_ad_slot = "1127560842"; google_ad_width = 320; google_ad_height = 50; } </script> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script> it works fine think can optimize ad delivery further.i want load jquery asynchronously , following script must wait jquery loaded. <script type="text/javascript"> var adwi...

REST API - CRUD operations on bulk of objects -

i designing restful api , understand how perform crud operations on bulk of objects. for example, delete 30 users @ once . how design such option in terms of rest api ? or may not good practice ? thoughts? you can design in way. @path("/users") @delete @consumes(mediatype.application_json) public response deleteusers(args) { ......... } you can pass list of users in json (forexample user ids) part of request. or can use matrix params pass list of user ids (if number of users less).

C - Adding icon to exe using makefile. Windows -

i trying add icon image .exe file in start menu. environment using c (geany) in windows 8. compile using make file gcc , create installer using nsis script. my resources.rc file looks like: #include "resources.h" main_icon icon "icon.ico" my resources.h file looks like: #define main_icon 1 after compilation image shows in bottom bar , thumbnail in directory. after installation of program however, thumbnail shows in directory in start menu , bottom bar image default windows image. hope not vague , in advance help.

javascript - Invalid character '\u0187' in ../plugins/cordova-plugin-file/www/FileWriter.js -

i want add cordova-plugin-file app, after installing cordova-plugin-file when start application got error message this !javascript error: syntaxerror: invalid character '\u0187' on line 2 http://localhost:49916/plugins/cordova-plugin-file/www/filewriter.js !javascript error: error: module cordova-plugin-file.filewriter not exist. on line 1371 http://localhost:49916/ripple/cordova/cordova-3.5.0.js when open filewritter.js eclipse, can't find character, when open on browser whit link on error message can see wrong character. this wrong character when open browser cordova.define("cordova-plugin-file.filewriter", function(require, exports, module) { /* //that wrong character * i've ready try delete still not work. what should remove or solve problem. thank you, regard,

java - org.springframework.boot.SpringApplication can not be resolved -

i trying run web-service server standalone application using spring-boot (1.2.4.release). have refereed tutorial provided here spring site. but in application unable locate org.springframework.boot.springapplication class in of apis of spring boot. below pom.xml file using this: <parent> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-parent</artifactid> <version>1.2.4.release</version> </parent> <dependencies> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot</artifactid> </dependency> <dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-web</artifactid> </dependency> </dependencies> <build> <plugins> <plugin> <groupid>org.springframework.boot...

linux - Bash - Concatenating Variable on to Path -

currently, have bash script untar file in root directory: #!/bin/bash tar xvf ~/some-file.tar this works without problems. now, change can specify path file in pre-defined variable such: #!/bin/bash p="~" tar xvf $p/some-file.tar this gives me following error message: tar: ~/some-file.tar: cannot open: no such file or directory tar: error not recoverable: exiting the path file seems correct, however, there hidden characters causing fail? proper way concatenate variable , path without storing both in string variables (if there one)? tilde expansion doesn't work when inside variable. can use $home variable instead: #!/bin/bash p=$home tar xvf "$p/some_file.tar"

java - JavaFX: Our javascript file is not working when we build the html and put the link in header. Why is this? -

the user should able change value , numbers should change. wrong in situation? possible link js file in html run in javafx webview? var numberstochange; var multiplier; function pageload() { var inputbox = number(document.getelementbyid("servinginputbox").value); multiplier = new array(); numberstochange = document.getelementsbyclassname("numbertochange"); (i = 0; < numberstochange.length; i++) { multiplier[i] = number(numberstochange[i].innerhtml) / inputbox; } } function changenumbers() { var inputboxvalue = number(document.getelementbyid("servinginputbox").value); (i = 0; < numberstochange.length; i++) { numberstochange[i].innerhtml = (math.trunc((inputboxvalue * multiplier[i]) * 10)) / 10; } } function increase() { var inputbox = number(document.getelementbyid("servinginputbox").value); document.getelementbyid("servinginputbox").value = (math.trunc(inputbox *...

android - Running synchronous tests with robotium on multiple devices -

i have 2 apps need test, 2 apps respond each other 1. app user app in doing activity, more submit orders 2. app b supplier app in recipes client orders both apps need run on separate devices definition my test flow follow 1. client , supplier have app open 2. client issue order 3. supplier receive order 4. supplier accept order 5. supplier fulfill order 6. client notification order fulfilled i can program tests separately in robotium, problem need them synchronous - since entire process real-time 1 in real life any 1 know how can that? (without creating million small robotium tests , run them 1 after other) thanks in advance you can make them wait element appear. can following snippets: activity solo.waitforactivity(solo.getcurrentactivity().tostring()); toast , more text in toast solo.waitfortext("some text inside toast"); waiting view disappear textview textfield = solo.gettext("my text value", true); solo.waitforcondition(new...

jsf 2 - h:commandLink in p:autocomplete not passing querystring parameters correctly -

i'm trying perform action through command link in autocomplete component (primefaces) i have same structure in others parts of code, , works, don't understand why in case doesn't. here code: <h:panelgroup layout="block" rendered="#{secondarymodel['mainbean'] == null}" styleclass="selector-title"> <label>#{msgs['attendee.view.contact.search']}</label> <p:autocomplete id="autocomplete-contact" value="#{secondarymodel['searchbean']}" completemethod="#{autocompleteaction.completecontacts}" var="contact" itemvalue="#{contact}" itemlabel="#{contact.fullname}" converter="#{secondarymodel['autocompletebeanconverter']}" minquerylength="3" maxresults="20" styleclass="autocomplete" widgetvar="autocompletecontactwidget" onfocus="triggerautoc...

How to efficiently transfrom narrow table into wide in Oracle? -

i have narrow table following columns: <customer id> <field id> <value> , of them numbers. i want reshape table wide format: <customer id> <field1> <field2> <field3> ... i have separate dictionary table dic_fields translates field id field name. i work on exadata server. narrow table has 2.5 billion records, , have 200 fields. the obvious simple solution below badly fills temporary space on our exadata server. create table wide_ads ( customerid ,max(case when fieldid = 1 value end) gender ,max(case when fieldid = 2 value end) age ,max(case when fieldid = 3 value end) education narrow_ads group customerid ); we tried cleverer , manual method: create index index1 on szeroki_ads(customerid); declare rowidwide rowid; type tcolnames table of string(32000) index pls_integer ; arrcolnames tcolnames; x_customerid number; strcolname varchar2(32); strcolvalue varchar2(32000); strsql varcha...

python - How to format the datetime object in list with strftime while leaving following numbers unaffected -

i have typical list of data, first item datetime object, , following items data corresponding date , time. print , format datetime object. don't want str representation of datetime , rather, choose formatting via strftime or similar. i have tried print('{}'.format(', '.join(map(str,row)))) and works ok, don't want format (from overriding default format when printing list of datetime objects ). i know how use strftime , don't know how call on data in list . seems there should easy way this. when searching how perform this, results either strftime or using str in list above, have not been able find trying do. this leave non- datetime objects alone (i assume they're strings - if not, use else str(item) instead of else item ). uses ternary if..else @ each item in row . print(', '.join(datetime.datetime.strftime(item, '%y%m%d') if type(item) == datetime.datetime else item item in row)) the format() doesn...

Xml C# Find a Node Value Based on Another Node -

i need finding attributes of position if subtypename has text equals "weight" the problem is, there multiple myobjectbuilder_entitybase elements (shown below) in xml file may or may not meet these requirements, have same structure. the attributes x y , z stored in 3 respective list variables each meets conditions. <myobjectbuilder_entitybase xsi:type="myobjectbuilder_cubegrid"> <entityid>173933426524952854</entityid> <persistentflags>castshadows inscene</persistentflags> <positionandorientation> <position x="32.206989288330078" y="28.401615142822266" z="11.562240600585937" /> <forward x="0.323335081" y="-0.00425125659" z="-0.946275" /> <up x="-0.9462663" y="-0.007667198" z="-0.32329765" /> </positionandorientation> <gridsizeenum>small</gridsizeenum> <cubeblocks> ...