Posts

Showing posts from April, 2014

github - Why curated lists contributors use the forks instead wiki tool? -

github full of curated lists ( example ). why curated lists contributors use forks instead github-wiki tool? for ease of viewing, such lists presented readme.md files in main repository (where shown default when viewing repo). such, regular program code. therefore, easiest way edit them, code - being able edit page, creating own fork so, , that, making pull-request.

c# - How to set the range of Y-axes in Zedgraph? -

i want set max , min values of axes. following code valid 1 y-axis. want set 3 y-axis. graphpane1.yaxis.scale.min = 0; graphpane1.yaxis.scale.max = 100; here codes: var y1 = graphpane1.addyaxis("yaxis-1"); var y2 = graphpane1.addyaxis("yaxis-2"); var y3 = graphpane1.addyaxis("yaxis-3"); lineitem mycurve1 = graphpane1.addcurve(txtplottitle.text, first_pointslist, color.blue, symboltype.none); mycurve.yaxisindex = y1; lineitem mycurve2 = graphpane1.addcurve(txtplottitle.text, second_pointslist, color.yellow, symboltype.none); mycurve.yaxisindex = y2; lineitem mycurve3 = graphpane1.addcurve(txtplottitle.text, third_pointslist, color.green, symboltype.none); mycurve.yaxisindex = y3; edit: when try run code, program gave error. want graphs auto-scaled when don't write in textboxes. tryed if loop that, doesn't work. var y1 = graphpane1.addyaxis("yaxis-1"); var y2 = graphpane1.addyaxis("yaxis-2"); var y3 = gra...

debugging - How to dump PHP backtrace on live running script in lldb? -

i'm playing around lldb (debugger) , did following experiment. run php script as: php -r "sleep(1000);" or: php -r "function r(){sleep(1000);}r();" on console, i've called directly zif_debug_backtrace() lldb : echo 'call (void)zif_debug_backtrace()' | lldb -p $(pgrep -fn php) above worked, process stopped following warning: warning: sleep() expects @ 2 parameters, 1606408648 given in command line code on line 1 call stack: 0.0016 235152 1. {main}() command line code:0 0.0021 235248 2. sleep(1000) command line code:1 i'm not quite sure why script had stop , need achieve transparency (without affecting script)? p.s. same happening when calling zif_debug_print_backtrace() , when calling custom_backtrace() showing: backtrace null function called . i'm using xdebug if change anything. maybe need call different function zend_fetch_debug_backtrace (see: image dump symtab )? or use right arguments,...

css - Bootstrap not showing correctly in Atom -

i'm relatively new apologies if basic question trying create site using atom text editor , bootstrap yeti theme pulled bootswatch. i've taken copy of style sheet , saved referencing normal in html, it's reading , applying style not showing quite right. i have tried in couple of other tools - js fiddle - , showing expect. again sorry if basic question i'm still learning any great <!doctype html> <html> <head> <title>clarity analysis ltd landing page</title> <link rel="stylesheet" href="/volumes/hd-documents/atom/clarity analysis/css/flatley.css"> <link rel="stylesheet" href="/volumes/hd-documents/atom/clarity analysis/css/landingcustom.css"> </head> <body> <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> <butt...

send data over link to jquery function -

what want <a href="#" onclick="myjqueryfunc(data1,data2)"></a> and in jquery myjqueryfunc(variable1,variable2) { var formdata = "name=variable1&age=variable2"; $.ajax({ url : "ajax_post_url", type: "post", data : formdata, success: function(data, textstatus, jqxhr) { } } so how can ? <a href="#" data-name="x" data-age="12" id="smth"></a> in js $("#smth").click(function(){ var name=$(this).data('name'); var age=$(this).data('age'); $.ajax({ ... data : { var1 :name , var2:age }, ... }); });

@ItemClick on GridView not detected - android annotation -

hi using android annotation in activity. not able detect click on gridview items. @itemclick(r.id.ordereditemslist) void itemclicked(int position){ log.w("cartactivity", "clicked detected"); } myactivity public class cartactivity extends actionbaractivity implements cartitemlistener { private static final string log_tag = cartactivity.class.getname(); private list<cartorderitem> orderitems; private dialog confirmdialog; @viewbyid(r.id.ordereditemslist) gridview cartitems; @viewbyid(r.id.buyoptions) radiogroup buyoptions; @viewbyid(r.id.clearcart) button clearbtn; @viewbyid(r.id.placeorder) button buybtn; @viewbyid(r.id.totalcost) textview totalcost; @viewbyid(r.id.totalheading) textview totaltitle; @viewbyid(r.id.paymentstatus) textview paystatus; @bean fudzonerestclient restclient; @bean fudzonepersistence persistence; @extra long restaurantid; @extra list<cartitems> cart; private cartadapter adapter; private long user...

sql server 2012 - what is the use of QueryDefs in MSAccess (VBA) -

we using ms access front end , sql server end.i want know use of querydefs temporary table.what advantage of using querydefs ? you can think of querydefs being views on sql server. stored sql query. querydef query appears on navigation pane under queries. if using types of conditional formatting in forms form must based on querydef (eg barcharts in control). instead of using built sql statement, creating querydef if can debugging. the performance benefits depend on structure of sql query, influenced whether using dao, ado or pass though queries access sql server data , on whether use parameters (to enable execution plan re-used). general advise use pass through queries , leverage use of sql server stored procedures, functions , views. harvey

php - Lost data while converting image png to base64 string -

i have image.png generated dynamically (barcode) , returned html <img src="data:image/png;base64,b64str" /> but defects (white dots). to convert image base64 string use code: ob_start(); imagepng($img); $contents = ob_get_contents(); ob_end_clean(); return base64_encode($contents); can output buffer cause of lost data? can convert image base64 other way? imagepng return bool. use file_get_contents without ob : return base64_encode(file_get_contents($img));

android - RecyclerView focus scrolling -

Image
i have recyclerview 2 columns , eight. use lot of d-pad navigation. have problem when scrolling, focused item jump left right. see photos: i noticed if items coming next cached, there no focus problem when scrolling. problem have focus item can appear below sticky header. not desired. feel if made when scrolling have sort of "threshold". way when focus within 1 item of being off screen, scroll. way focus never @ bottom, or top. with in mind, tried approach no luck: recyclerview rv; @override public void onfocuschange(view v, boolean hasfocus) { if(!v.hasfocus()) { log.w(tag, "view v did not have focus"); return; } final int index = rv.getchildposition(v); //adapter pos if(index == no_position) { log.w(tag, "recycler view did not have view"); return; } int position = rv.indexofchild(v); // layout pos int lastpos = rv.getchildcount(); // layout pos int span = getlayoutmanager().g...

android - Material design navigation drawer footer -

Image
i want pin 2 options on bottom of navigation drawer. in picture if it's possible pin header too. building navigation drawer support design lib.

fiware - Assign Orion entities to users -

i have switched our wirecloud instance login fiware idm. have there widget connected orion using ngsi source operator. question how assign entities in context broker user - different users see different entities. probably best way implement adding "users" attribute entities. "users" attribute contain white list of users access entity. the main problem applying solutions current version of orion (0.23) doesn't support searching entities using filters. next versions of orion going provide functionality (see @fganlan answer question ) have wait until functionality ready. if need feature now, viable solution see add attribute per user access entity (the value associated attribute irrelevant) orion allows filtering entities using list of attributes, can query orion context broker asking entities containing attribute associated user, if entity doesn't contain attribute not accesible user , filtered. see question how obtain logged user info wid...

javascript - Firefox keydown not working when page is initially loaded -

this maybe no brainer you. trying figure out why keydown not triggered in firefox upon initial load. $(document).keydown(function(){alert("test")}) i add above code in javascript , when open page , without clicking pressing key. can see key pressed not cautch @ all. however, after click background of page press keyboard. can see key caught then. this doesn't happen in chrome, in firefox. is familiar chance. thanks

html - Impact of td/th background over table border -

Image
i have table element border: .summary-table { font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 115%; overflow: auto; width: 100%; border: 1px solid rgb(195, 195, 195) !important; border-radius: 4px; overflow: hidden; } when use background color on thead tr works fine .summary-table thead tr{ background-color: #e8e8e8 !important; } but when use background color on thead th (no border-top , left ): .summary-table th { background-color: #e8e8e8 !important; font-weight: normal; color: black; padding: 20px 30px; } can tell nme why this?

javascript - Select text of li elements through JQuery -

how can select text list elements through jquery . want same functionality of .select() in javascript , applicable editable text areas/input boxes, can guide me ,for same functionality list elements i want list text selected on .click() . try this: http://jsfiddle.net/bigneo/w0y5yrcr/1/ html <ul id="ulmonth"> <li>jan</li> <li>feb</li> <li>mar</li> <li>apr</li> <li>may</li> <li>jun</li> <li>jul</li> <li>aug</li> <li>sep</li> <li>oct</li> <li>nov</li> <li>dec</li> </ul> js $.fn.oneclickselect = function(){ return $(this).on('click',function(){ var range, selection; if (window.getselection) { selection = window.getselection(); range = document.createrange(); range.selectnode(this); ...

c# - Unsubscribe from original event when try unsubscribe from a variable of that EventHandler -

i'm trying unsubscribe attached method event. have code: public event eventhandler menuitemselectionchanged; var eh = menuitemselectionchanged; eh -= themethod; after run above code result is: menuitemselectionchanged: not null el: null but want unsubscribe themethod menuitemselectionchanged , using eh (a pointer eventhandler). how can use eh remove themethod eh , menuitemselectionchanged i need result: menuitemselectionchanged: null el: null my main scenario is: inside targetclass.cs : public event eventhandler menuitemselectionchanged; public void unsubscribefromevent(thisclasseventhandlernames eventhandlername, dictionary<frameworkelement, methodinfo> eventhandlerinfos) { var eh = geteventhandler(eventhandlername); if (eh == null) return; foreach (var eventhandlerinfo in eventhandlerinfos) { var info = eventhandlerinfo; if (eh == null) br...

angularjs - How to reduce javascript object to only contain properties from interface -

when using typescript declared interface this: interface myinterface { test: string; } and implementation property this: class mytest implements myinterface { test: string; newtest: string; } example (here variable 'reduced' still contain property 'newtest'): var test: mytest = {test: "hello", newtest: "world"} var reduced: myinterface = test; // clever needed question in general way, how can make 'reduced' variable contain properties declared in 'myinterface' interface. why the problem occur when trying use 'reduced' variable angular.tojson before sending rest service - tojson method transforms newtest variable, if it's not accessible on instance during compile, , makes rest service not accept json since has properties shouldn't there. in example newtest property won't accessible thru reduced variable, that's goal of using types. typescript brings type checking, doesn...

javascript - want to go to home page when clicked on back button in mobile? -

i developing mobile app on ionic framework. has side menu subcategories. whenever go subcategory more once , click on button in android mobile, retraces whole of states went through don't want. .state('eventmenu', { url: "/event", abstract: true, templateurl: "templates/event-menu.html" }) .state('eventmenu.home', { url: "/home", views: { 'menucontent' :{ templateurl: "templates/home.html", controller: "homectrl" } } }) .state('categorymenu', { url: "/category", abstract: true, templateurl: "templates/event-menu.html" }) .state('categorymenu.compound', { url: "/compound", views: { 'menucontent' :{ templateurl: "templates/categories.html", controller: "categoriesctrl" } } }) .state('categorymenu.research', { url: "/research", views: { ...

excel - Vba multidimensional array -

hi im trying output following input both in separate column. using multidimensional array in vba number of repeat-ency may vary , unknown. 1. 16547508 subs4 2. 16547508 subs5 3. 17149264 subs9 4. 17149264 subs12 5. 17163022 subs18 6. 17163022 subs19 7. 17163023 subs23 8. 17163023 subs26 9. 17163023 subs27 10. 17163023 subs27 output 1. 16547508 - subs4,subs5 2. 17149264 - subs9,subs12 3. 17163022 - subs18,subs19 4. 17163023 - subs23,subs26,subs27 help please.

tomcat - RequestDispatcher instantiates servlet which has already been instantiated via load-on-startup -

i have servlet annotated this: @webservlet(value="/myserviceservlet", loadonstartup=1) this results in servlet being instantiated on application start , init() method being called. perfect! (in init() method, thread started perform db maintenance runs each hour) now, on end user actions, reach servlet using getservletcontext().getrequestdispatcher("/myserviceservlet").include(request, response) trigger other db stuff, first time try this, servlet gets instantiated 1 more time , init() method called (of course), results in 2 similar threads running. not perfect! it seems if loadonstartup=1 not put servlet in servlet context, hence when try reach request dispatcher needs instantiated. how can be? how fix 1 instance of servlet? need started along application, service started in init() should run immediately. the application deployed on tomcat 7.0.57. (in init() method, thread started perform db maintenance runs each hour) o lord,...

ruby on rails - Cloud9 app memory and disk space limit -

i'm making way through chapter 6 michael hartl tutorial [www.railstutorial.org/book] using cloud9 ide , server has stopped running due memory limits. using free tier comes 512mb ram. i've tried force killing processes using disk/memory/cpu menu. i've tried killing spring in bash with pkill -9 -f spring ive tried suggestions in box 3.4 @ end of chapter 3. $ ps aux | grep spring ubuntu 11419 0.0 0.0 10548 852 pts/1 s+ 19:22 0:00 grep --color=auto spring $ kill -9 11419 bash: kill: (11419) - no such process anyone have pointers! that process see running after doing ps aux | grep spring grep finding (as can see grep in name). appears there no spring processes running. you should have received 768mb of ram rails tutorial workspace, , if write cloud9 support they'll give additional swap space no longer have issues hitting memory limit. (i work cloud9 , implemented across workspaces soon)

mysql - Unable to connect to database using jsp in ubuntu -

i trying connect mysql database in linux. know making mistake in including jar file. don't know how give reference jar files in linux way reference them in eclipse or netbeans. running jsp pages using tomat7. type exception report message exception occurred processing jsp page /first.jsp @ line 9 description server encountered internal error prevented fulfilling request. exception org.apache.jasper.jasperexception: exception occurred processing jsp page /first.jsp @ line 9 6: <% 7: 8: out.println("hello world!"); 9: class.forname("com.mysql.jdbc.driver"); 10: connection con=drivermanager.getconnection("jdbc:mysql://localhost:3306/meshliumdb","myuser","mypass"); 11: if(con!=null) 12: out.println("connection established"); stacktrace: org.apache.jasper.servlet.jspservletwrapper.handlejspexception(jspservletwrapper.java:568) org.apache.jasper.servlet.jspservletwrapper.service(j...

bash - Running a script in PowerBroker -

i'm trying script commands run inside pbrun shell. i've tried executing through normal script, doesn't work because, understanding, pbrun executed in won subshell, making hard, if not impossible, pass commands to. the solution i'm thinking might work if have input/output text processor listens terminal , responds accordingly. i able send commands standard input of pbrun: echo 'echo $hostname' | pbrun bash

c# - Translucent background like iOS/OS X and Windows 10 startmenu in WPF apps -

Image
ios, mac os x , windows 10 support translucent background. there documented api in windows 10 extend effect in wpf window? want part of app window translucent, content put there should still legible. see example please not not same changing opacity property on control, want transparency plus blur on top of primary coloured hotspots in background. i have darkened , blurred backgrounds before when having dialog appear on top. the way use visualbrush blur effect create blurred visual (i blurring usercontrol not blurred before dialog appeared) , place canvas black background , reduced opacity on top darken it. <visualbrush> <visualbrush.visual> <grid cliptobounds="true"> <image source="images\myimage.png"> <image.effect> <blureffect radius="20"/> </image.effect> </image> </grid> </visual...

c# - Loading a string into a textview -

i need load string textview being displayed on new page after button click event. java.lang.runtimeexception keeps getting thrown when click button. "java.lang.reflect.invocationtargetexception" here section of code: setcontentview (resource.layout.main); button button1 = findviewbyid<button>(resource.id.story1); button1.click += delegate { setcontentview (resource.layout.next1); textview textvtest = (textview) findviewbyid(resource.id.textview1); textvtest.text = "test"; }; from first activity, in buttonclick : button1.click += delegate { var activity2 = new intent (this, typeof(activity2)); activity2.putextra ("mydata", "test"); startactivity (activity2); }; in second activity, in oncreate() : protected override void oncreate (bundle bundle) { setcontentview (resource.layout.next1); textview textvtest = (textv...

android - Where can I download the Google Play Services SDK 7.8? -

where can download google play services sdk 7.8 if beta? need new google proximity beacon api. i can not eclipse or android studio. it seems, have allready. the apk started rolling out, checked , nexus 5 , it's on 7.8. the apk 1 part though, , if want develop apps google services, need client library: https://developers.google.com/android/guides/overview the client library (which add app access play services apis, , later talk apk on phone) download via android sdk manager. latest available revision still 25 though, corresponds play services 7.5. tl;dr , we're still waiting play services 7.8 nearby api released in full.

objective c - How to change the button colour inside the cell depend upon user selection? -

this button when user select button display colour. uibutton *btnclk=[[uibutton alloc]initwithframe:cgrectmake(0, 50, 50, 50)]; [btnclk settitle:@"click" forstate:uicontrolstatenormal]; btnclk.backgroundcolor=[uicolor blackcolor]; [btnclk addtarget:self action:@selector(btnclicked:) forcontrolevents:uicontroleventtouchupinside]; [cell addsubview:btnclk]; method: -(void)btnclicked:(uibutton *)click { nsindexpath *ind1=[nsindexpath indexpathwithindex:click.tag]; nsindexpath *ind2=[nsindexpath indexpathwithindex:click.tag]; if(ind1==ind2) { btnclk.backgroundcolor=[uicolor colorfromhexstring:@"#ffc400"]; } else { btnclk.backgroundcolor=[uicolor blackcolor]; } } the button declaration global. your ind1 , ind2 same. try compare? and guess want change code btnclk .backgroundcolor=[uicolor colorfromhexstring:@"#ffc400"]; to click .backgroundcolor=[uicol...

ios - Ti_Keychain module compilation -

i want use tikeychain appcelerator. download module here ( https://github.com/pegli/ti_keychain ). when try compile, error appear: > [error] : 2015-08-05 12:56:15.779 xcodebuild[56074:256307] [mt] > dvtassertions: warning in > /sourcecache/ideframeworks/ideframeworks-7720/idefoundation/sourcecontrol/model/idesourcecontrolmanager.m:423 > [error] : details: error > domain=com.apple.dt.idesourcecontrolerrordomain code=-1 "missing > extension: public.vcs.subversion" userinfo=0x7fa2d6173b60 > {nslocalizeddescription=missing extension: public.vcs.subversion} > [error] : object: <idesourcecontrolmanager: 0x7fa2d47bba40> [error] > : method: -loadrepositories [error] : thread: <nsthread: > 0x7fa2d1c0b7c0>{number = 1, name = main} [error] : please file bug > @ http://bugreport.apple.com warning message , useful > information can provide. [error] : ** build failed **

locale - Detecting when OS language is changed - Java -

i'm coding fullscreen bilingual app in java. fullscreen means, language bar below desktop hidden user, and... need it! so, how can reproduce programmatically?! strictly speaking, need know, current os language is, when change language event occurs, and, way set when needed. how should task done? thanks! get os language: system.getproperty("user.language"); set os language: system.setproperty("user.language","..."); //... = language want set if want change language inside program, via combobox or something, add actionlistener component , use set method mentioned before set language. system.setproperty("user.language",yourcombobox.gettext()); can set language inside program simple if-statements.

javascript - Google Calendar createAllDayEvent from Google Form Submission -

i'm trying create all-day google calendar event google calendar form submission. i've managed source below code internet , have modified calendar id , column id's cannot work out how modify create all-day event opposed start/finish event. i know need modify line createevent(calendarid,title,startdt,enddt,desc) along lines of createalldayevent(title, date) i'm unsure else needs changing. any appreciated. //this id of calendar add event to, found on calendar settings page of calendar in question //look "calendar address:" , id shows beside it. var calendarid = "calendar_id_goes_here"; //below column ids of represents values used in spreadsheet (these non 0 indexed) //column containg start date/time event var startdtid = 4; //column containg end date/time event var enddtid = 5; //column containg first part of title event (in case, name) var titleid = 2; //column containg second part of title event (in case, absence type) var titleid2 = 3...

windows - Batch file runs fine in command prompt but gives error when double-clicked -

i have batch file accepts store numbers , sets them array , iterates through array. when double click batch file gives error: 256 unexpected @ time. but when run console/command prompt runs fine. here code. @echo off setlocal enabledelayedexpansion set index=0 :getstore set /a index=index + 1 set /p store[%index%]=enter slc store number: :ask set /p answer=do want enter store number (y/n): if /i "%answer%" == "n" ( set length=%index% goto next ) if /i "%answer%" == "y" ( goto getstore ) else goto ask :next /l %%i in (1,1,%length%) ( if %store% lss 256 ( /l %%k in (1,1,5) ping 192.168.!store[%%i]!.%%k -n 1 |find "ttl" ) if %store% gtr 255 ( set /a store=%store% - 255 /l %%k in (1,1,5) ping 10.0.!store[%%i]!.%%k -n 1 |find "ttl" ) ) when double click batch file, new cmd instance executed, 1 instance store has not been initialized, line if...

Ruby on rails created_at format show -

i added time method application_helper.rb . i want show in view <%= message.created_at %> exist, how can use relative type instead of <%= message.created_at %> display such 2 minutes ago, 1 week ago def relative_time(start_time) diff_seconds = time.now - start_time case diff_seconds when 0 .. 59 puts "#{diff_seconds} seconds ago" when 60 .. (3600-1) puts "#{diff_seconds/60} minutes ago" when 3600 .. (3600*24-1) puts "#{diff_seconds/3600} hours ago" when (3600*24) .. (3600*24*30) puts "#{diff_seconds/(3600*24)} days ago" else puts start_time.strftime("%m/%d/%y") end end there method called time_ago_in_words (thanks pavan mentioning alias, used distance_in_time_in_words_from_now ). change way sentences displayed, need configure locales: en: datetime: distance_in_words: half_a_minute: half minute less_than_x_seconds: one: less 1 second ...

java - possibility of passing MyObject to bean routing using Apache camel? -

i consuming messages apache kafka using apache camel java dsls. writing object converting byte[] on kafka. when consume have message byte[], deserialize , gets object. checks if object of myobject need pass bean using java dsl .to(). code below : public class kafkarouter extends routebuilder { private messagebean msgbean; @override public void configure() throws exception { from("{{kafka.cons.uri}}").process(new processor() { @override public void process(exchange exchange) throws exception { object obj = serializationutils.deserialize(exchange.getin().getbody(byte[].class)); //todo cast specific class returned after deserialization. if(obj !=null && obj instanceof messagebean){ msgbean = (messagebean)obj; } else { throw new ptfexception("invalid message read in kafka consumer"); ...

javascript - Sometimes when slickgrid is updated the updates don't display -

when update values in slickgrid need reload entire grid. i've checked correct data returned, , is, slickgrid not updated. if click on cells editor values update, it's when reload slickgrid again updates. the code load grid , load after updates same, or issue come data being similar, won't refresh? i use function render grid after data ajax call , determine columns display: // render grid given columns , data var rendergrid = function(columns, data) { grid.setcolumns(columns); dataview.beginupdate(); dataview.setitems(data); dataview.endupdate(); grid.setselectedrows([]); grid.render(); } a different question, using grid update functions in this answer, got working.

I am trying to use an if/else statement incorporating the java scanner for a username and password application -

this question has answer here: how compare strings in java? 23 answers so asking user username, , if user types in "username" he/she have "correct, username!" displayed , if wrong "incorrect, not username!" displayed. the problem having whenever type username, in example username being "username" have incorrect message displayed. i know went wrong , if question has been asked million times if direct me 1 of posts has been solved great since can't seem find 1 that's problem. import javax.swing.*; import java.util.scanner; public class userid { public static void main(string[] args) { scanner input = new scanner(system.in); string username; string password; string email; string scanner1; username = "username"; password = "password"; email = "emailhere...

jquery - offset anchor link from top of page -

currently have script opens div page, when land on target page heading above div not visible hidden behind fixed header when anchor id selected form home page. want offset heading before target div visible below site header. html... <h2 class="section-heading toggle">content 1 heading</h2> <div id="content1" class="slide-content">content</div> jquery... var hash = window.location.hash; // if(hash != "") { var id = hash.substr(1); // rid of # document.getelementbyid(id).style.display = 'block'; $(hash).prev().first().addclass("open"); }

Azure Web App node.js deploy fails -

we tried deploy new node.js version on azure web app. new source version retrieved our git repository on push. it seems of files remain locked , blocking our new deployment, can do, , can avoid in future? (the locked file npm library has nothing app code) updating iisnode.yml @ d:\home\site\wwwroot\iisnode.yml npm warn package.json express-livereload@0.0.24 no repository field. npm err! error: eperm, unlink 'd:\home\site\wwwroot\node_modules\azure_util\node_modules\pkgcloud\node_modules\aws-sdk\apis' npm err! { [error: eperm, unlink 'd:\home\site\wwwroot\node_modules\azure_util\node_modules\pkgcloud\node_modules\aws-sdk\apis'] npm err! errno: 50, npm err! code: 'eperm', npm err! path: 'd:\\home\\site\\wwwroot\\node_modules\\azure_util\\node_modules\\pkgcloud\\node_modules\\aws-sdk\\apis' } npm err! npm err! please try running command again root/administrator. npm err! system windows_nt 6.2.9200 npm err! command "d:\\program files (x8...

Coq: manage LoadPath in project with subdirectories -

i have coq project libraries organised subdirectories, like: …/myproj/auxiliary/aux.v …/myproj/main/main.v (imports auxiliary/aux.v) when compile files, expect working directory myproj (via makefile). want work on files using proof general/coqtop, in case working directory default directory in file lives. but means loadpath different between 2 contexts, , logical path needed library import different. how set coqc invocation, loadpath, , import declarations work in both contexts? each approach have tried, goes wrong. instance, if compile aux.v invoking coqc -r "." "myproj" auxiliary/aux.v and import in main.v as require import myproj.auxiliary.aux. then works when compile main.v with coqc -r "." "myproj" main/main.v but fails in coqtop, error: cannot find library myproj.auxiliary.aux in loadpath . on other hand, if before require import add add loadpath ".." myproj. then works in coqtop, fails under c...

php - Foreach loop: split elements in groups of five and six -

i'm using foreach loop output images fetched instagram api. want split outputted images in groups of four , five , in addition add div element each group except last 1 2 div's should added, following structure: <div class="group> <div class="extra"> </div> <img/> <img/> <img/> <img/> </div> <!-- close group of 5 --> <div class="group> <div class="extra"> </div> <img/> <img/> <img/> <img/> <img/> </div> <!-- close group of 6 --> <div class="group> <div class="extra"> </div> <img/> <img/> <img/> <div class="extra"> </div> </div> <!-- close group of 5 --> by using modulus in loop i've manage group elements correct number of items in each group, but when try add div each group b...

java - Floating Action Button Without Checkable -

i've been following code example google floating action button in newest android library http://developer.android.com/samples/floatingactionbuttonbasic/index.html this works, checkable button. however, don't want checkable, want able click , animate you'd expect (seems strange google example checkable button when seems it'd against design principles, , others have had problems) i'm reasonably new android, , far research has come lot of external libraries, i'm trying keep native possible is there interface in android java allow me use button? fab button example checkable , constructors , methods pertain that. @jmo : please check android floating action button based on material design specification , nqh_floatingactionbutton sample purpose . hope link http://android-developers.blogspot.in/2015/05/android-design-support-library.html

swift - Check if NSUserDefaults key exists -

in application, saving key using code: func savekey(){ var xminespillere = minespillere var defaults = nsuserdefaults.standarduserdefaults() defaults.setobject(xminespillere, forkey: "yourkey") } but how can check if key exists? want code this: if key("yourkey") exists { println("key exists") } else { println("does not exist") } how can in swift? first of every time save nsuserdefaults need call synchronize() method writes modifications persistent domains disk , updates unmodified persistent domains on disk. func savekey(){ var xminespillere = minespillere var defaults = nsuserdefaults.standarduserdefaults() defaults.setobject(xminespillere, forkey: "yourkey") defaults.synchronize() } the synchronize method automatically invoked @ periodic intervals, use method if cannot wait automatic synchronization (for example, if application exit) or if want update u...

adobe - CQ5 Invalid recursion selector value 'data' (data.json.jsp) -

let's have page in cq5. created page using template single component, call tablecomp, , hit @ url test.html . component contains standard jsp file page template being used contains specific jsp json or xml rendering of custom data, not page data. this jsp file rendering named data.xml.jsp or data.json.jsp . hit rendering jsp page test.html call /content/{org}/desktop/en_us/{name}/test.data.json or /content/{org}/desktop/en_us/{name}/test.data.xml . the xml/json jsp called contains code values , print screen xml or json. ex: blah now want display information screen json output when hit new file named data.json.jsp . when hitting data.xml.jsp works correctly , hits jsp. when exact same process data.json.jsp following. invalid recursion selector value 'data' cannot serve request /content/{org}/desktop/en_us/{name}/test.data.json in org.apache.sling.servlets.get.defaultgetservlet request progress: 0 (2015-07-22 18:10:06) timer_start{request processing}...

c# - SSIS transformation Duplicate column Name how to add suffix? -

i new ssis, using visual studio 2012 ssis package development the source data (flat file) has 2 columns named 'interestrate' have same name, content , derived in same way. land both fields , distinguish them adding sequential numeric suffix end of second column name. i want have interestrate & interestrate1 or interestrate2... how do that? use derived column transformation between source , destination.which ever column name want change , can through derived column name. can go data flow tab , add derived column found under data flow transformations in tool box.

javascript - indexOf is not a funciton -

i have event... <textarea id="chat"> </textarea> <button type="button" onclick="play_song();">talk</button> ... triggering following function : var input = function() { var chat = document.getelementbyid("chat").value.split(" "); return chat && console.log(chat); } then there's function : function setintersection(a, b) { var result = []; (var = 0; < a.length; i++) { if (b.indexof(a[i]) !== -1 && result.indexof(a[i]) === -1) { result.push(a[i]); } } return result; } a prototype function : song.prototype.lyricsintersect = function(input) { var bestsong = null; var bestcount = -infinity; (var in songs) { var currentcount = setintersection(songs[i].lyrics, input).length; if (currentcount > bestcount) { bestsong = songs[i]; b...

php - Adding custom methods to Laravel 5 scheduler -

i'm wondering best way add things weekends available schedule constraints: illuminate\console\scheduling\event.php public function weekdays() { return $this->spliceintoposition(5, '1-5'); } and logical opposite: public function weekends() { return $this->days(array( '0','6')); } where include these things they're not overwritten framework update? first of all, if missing weekends() method, can achieve calling days(6,7) on event. if need add more logic scheduler, please go on reading. i had @ code , while laravel doesn't offer way extend scheduler , , scheduled events , additional methoods, it's still possible apply additional constraints kernel::schedule() . depending on needs, there 2 ways it. if want set custom cron expression event, can use cron() method: protected function schedule(schedule $schedule) { $schedule->call(function () { //scheduled code })->cron('0 1 2...

ios - Add MKTileOverlay on map in swift -

during execute image repeated throughout map. specify uiimage in place of urltemplate? i have add overlay image in particular location. precisely @ current position. thank you this code: import uikit import mapkit class viewcontroller: uiviewcontroller, mkmapviewdelegate, cllocationmanagerdelegate { @iboutlet weak var mapview: mkmapview! let locationmanager = cllocationmanager() var latitude: cllocationdegrees = 0.0 var longitude: cllocationdegrees = 0.0 var cnt: int = 0 override func viewdidload() { super.viewdidload() self.mapview.delegate = self self.mapview.maptype = mkmaptype.satellite //map centre let centre = cllocationcoordinate2d(latitude: 40.8325769, longitude: 14.318884400000002) //declare span of map let span = mkcoordinatespan(latitudedelta: 0.05, longitudedelta: 0.05) //set region of map let region = mkcoordinateregion(center: c...

ios - UITableViewCell won't move beyond it's row when in drag and drop edit mode -

Image
i'm following this official documentation apple . i'm trying implement drag , drop functionality on uitableview . problem is, rows won't move pass rows. can see, bounce back: here code: func tableview(tableview: uitableview, moverowatindexpath sourceindexpath: nsindexpath, toindexpath destinationindexpath: nsindexpath) { // gets called, when reach uitableviewcell above or below // 1 uitableviewcell i'm dragging around. part // snaps think. } func tableview(tableview: uitableview, targetindexpathformovefromrowatindexpath sourceindexpath: nsindexpath, toproposedindexpath proposeddestinationindexpath: nsindexpath) -> nsindexpath { return proposeddestinationindexpath } i'm using dznemptydataset library , not quite sure, if meddles original functionality of uitableview . what missing here? edit: have created new viewcontroller tableview in project , behaves same. if try implement functionality in new project however, works intended...

angularjs - angular - failing to bind element's ng-show inside ng-repeat -

there panel each contact. want show remove button on specific panel when user mouse on same panel. ... <div class="col-sm-3" ng-repeat="contact1 in contacts"> <div class="panel panel-success" ng-mouseenter="{{contact1.id}}=true" ng-mouseleave="{{contact1.id}}=false)"> <div class="panel-heading"> <a href="#" ng-show="{{contact1.id}}" ng-click="remove($index)">remove button</a> </div> ... i cant reason why code doesnt work. there 2 things in code can create problem. first of all, ng-show / ng-mouseneter / ng-mouseleave need expression. don't need put {{ }} . but wasn't 1 problem. fact using id manage show property of item. expression need boolean , can't erase id boolean in ng-mouseneter . so, have use other attribute in item, isshow example. keep i...