Posts

Showing posts from July, 2013

javascript - Show content on certain URL -

javascript - Show content on certain URL - i using online store solution allows me set simple online shop. cannot utilize code other html/css/javascript. i have set in simple image-slider in template. want slider shown on frontpage. shown on every-page. can utilize javascript functions says this: "if url "www.example.com" show image-slider else hide it." something maybe? <script> $(function() { if(document.url == "http://example.com/") { ... ... </script> thanks on beforehand :) i don't know exact circumstances of you're trying or why you'd need it, but if (location.href == "http://example.com") should it. location.href returns url of page, "document.url" in example. if you're looking parts of url, cool tip found here. var parser = document.createelement('a'); parser.href = "http://example.com:3000/pathname/?search=test#hash"; parser.hostname; ...

java - How to read Android crash log? -

java - How to read Android crash log? - i have published first android app on google play store few days ago. crash log available in developer console , trying find out caused crash. although un-obfuscated stack trace have difficulties understand crash log: java.lang.runtimeexception: unable start activity componentinfo{com.example.myapp/com.example.myapp.ui.addresseditor.addresseditoractivity}: java.lang.nullpointerexception @ android.app.activitythread.performlaunchactivity(activitythread.java:2184) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2233) @ android.app.activitythread.access$800(activitythread.java:135) @ android.app.activitythread$h.handlemessage(activitythread.java:1196) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:136) @ android.app.activitythread.main(activitythread.java:5001) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.andr...

git - Deploying a NodeJS App to Azure Websites fails on installing NPM packages from pagages.json from deploy.cmd? -

git - Deploying a NodeJS App to Azure Websites fails on installing NPM packages from pagages.json from deploy.cmd? - i'm trying force local git repository azure website using .deployment & deploy.cmd. the problem when script tries install npm packages fails after half installed. have tried lot of things can't work. i appriciate if of have thought of why not working? this code: package.json { "name": "api", "private": true, "version": "0.1.0", "description": "backend api", "keywords": [], "main": "app.js", "repository": "", "author": "frej (frej@example.com)", "license": "", "scripts": { "start": "node app.js", "debug": "node debug app.js" }, "devdependencies": { "grunt": "0.4.5", ...

R write function that calls plot() first time and points() on subsequent calls -

R write function that calls plot() first time and points() on subsequent calls - i wondering if possible encapsulate behavior in single function. have next code qq-plot of p-values adapted http://gettinggeneticsdone.blogspot.ca/2010/07/qq-plots-of-p-values-in-r-using-base.html i trying first time plot figure series labels , reddish line on y=x axis, , on subsequent calls add together additional points different info frames using color specified. however, none of behavior expected. if don't explicitly set par(new=true) sec phone call ggd.qqplot() overwrite first. if explicitly phone call 2 plots super-imposed on each other (not points axes, etc). right check should doing in if statement... if possible. ggd.qqplot = function(pvector, color="black", main=null, ...) { o = -log10(sort(pvector,decreasing=f)) e = -log10( 1:length(o)/length(o) ) if(par()$new) { points(e,o,cex=1, col=color) } else { par(new=true); plot(e,o,pc...

date - Python convert epoch time to day of the week -

date - Python convert epoch time to day of the week - how can in python? want day of week returned. >>> convert_epoch_time_to_day_of_the_week(epoch_time_in_miliseconds) >>> 'tuesday' ep = 1412673904406 datetime import datetime print datetime.fromtimestamp(ep/1000).strftime("%a") tuesday def ep_to_day(ep): homecoming datetime.fromtimestamp(ep/1000).strftime("%a") python date python-2.7 datetime time

javascript - Getting i is undefined in Console when use tag in custom view page using AdminTabStripEvent -

javascript - Getting i is undefined in Console when use <script> tag in custom view page using AdminTabStripEvent - i using nopcommerce 3.40 i have open custom tab , content plugin on client edit page using admintabstripcreated event . when utilize tag in custom tab content getting error "i undefined" jqueryvalidatemin.js in console my code in admintabstripcreated int customerid = convert.toint32(system.web.httpcontext.current.request.requestcontext.routedata.values["id"]); string url = "/controller/actionname?id=" + customerid; var sb = new stringbuilder(); sb.append("<style type=\"text/css\">"); sb.append(environment.newline); sb.append(".k-link {font-weight: bold;}"); sb.append(environment.newline); sb.append("</style>"); ...

java - How to display output in servlet when invoking a method dynamically -

java - How to display output in servlet when invoking a method dynamically - i trying dynamically load class , invoke 1 of methods servlet. in servlet have next code : printwriter out = response.getwriter(); seek { class<?> obj = class.forname(myclassname); method method = obj.getclass().getmethod(mymethodname); string returnvalue = (string) method.invoke(obj, null); out.println(returnvalue); } catch(exception e){} and in class have : public class studentclass { public string index() { homecoming "this studentclass"; } } the problem when run application not display anything. expecting this studentclass output , index method of class returning. could please tell me how solve problem? your invoke usage wrong: class<?> obj = class.forname(myclassname); // homecoming class, not instance method method = obj.getclass().getmethod(mymethodname); string returnvalue = (string) method...

PHP: Redirect but continue to process script with ignore_user_abort(true) fails -

PHP: Redirect but continue to process script with ignore_user_abort(true) fails - i have problem cannot figure out. seems server related issue. what need - when user submitting form, redirected page, php script continues process form info in background. code this: //if form submitted start: //redirect user header("location: activity.php"); ob_end_clean(); header("connection: close"); ignore_user_abort(true); set_time_limit(1800); //extend process time ob_start(); header("content-length: 0"); ob_end_flush(); flush(); session_write_close(); //below line starts code process form. when testing code on local server works expected, user redirected page activity.php , php script continues run in background. when uploading same script live server, nil works. user not redirected, , page waits until processed , redirects user activity.php . why so? cannot see error in script. can please help? there bundle needs enabled on server? cannot u...

magento - HTTPS broken up site? -

magento - HTTPS broken up site? - when access our home page https url site broken up. think because css, js load http & not secure. but should run site in both http & https. why happen ? why not solved in default magento? for illustration https://demo.magentocommerce.com/ any help appreciated you need set https unsecure base of operations url in order css load https. know want load site in both cases i.e. http , https, using both urls cause website's seo decrease. reason is: http , https indexed in search engine 2 different urls. decision you, whether want utilize http or https. magento

php - How to get the number of times a particular URL has been shared on Google+? -

php - How to get the number of times a particular URL has been shared on Google+? - i'm using google+ share link on website allow visitors share particular page on google+ for example: https://plus.google.com/share?url=http://example.com how can number of times particular url has been shared? please note: i'm not trying number of times page has been +1'd. you can track number of shares using google+ ripples (about). however, there not exist official api , perchance never will. parse number of shares using this snippet: $shares_url = 'https://plus.google.com/ripple/details?url='. $url; $response = file_get_contents( $shares_url ); $shares_match = preg_match('@<div[^0-9]*([0-9]+) public share[s]?\.</div>@',$response,$matches); if (!empty($matches)) { $shares = $matches[1]; } else { $shares = 0; } echo $shares; note regex tries specify number closely possible, since there might comment on right hand side of page sa...

html - Full width footer menu with drop up menu equal scaling -

html - Full width footer menu with drop up menu equal scaling - hello need work fast, stuck right now! i have total width footer menu list items centered , equal scaling on browser size , think have working correctly now, can't seem drop-up menu work on hover in same way list items on top of each other (vertical list menu) , in equal scaling footer menu. please can 1 help me this, must quite easy. thank you!! <footer> <ul> <li><a href="#">share</a> <ul> <li><a href="#">facebook</a></li> <li><a href="#">twitter</a></li> <li><a href="#">tumblr</a></li> </ul> </li> <li><a href="#" id="scroll-top">top</a></li> <li><a href="#" onclick="funcshow(event);">info</a></li> </ul> fiddle: http://jsfi...

Android NFC intent handling, showing a toast -

Android NFC intent handling, showing a toast - hello fellow programmers! i new android, 2 weeks old. i trying programming nfc. have nexus 5 , trying read , display uid of mifare classic 1k. know protocol compatibilities issues broadcom chip, can skip , go straight fact can read uid no problem. i want grab intent , show toast read uid. far made work putting performintent oncreate method. making intent restart activity able handle intent , show uid via toast , works. here humble code: mainactivity.java package sanjin.com.nfc; import android.content.intent; import android.nfc.nfcadapter; import android.app.activity; import android.nfc.tag; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuitem; import android.widget.toast; public class mainactivity extends activity { nfcadapter mnfcadapter; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); set...

ios - Implement heightForRowAtIndexPath -

ios - Implement heightForRowAtIndexPath - i have next code: - (uitableviewcell *) tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { if (indexpath.row == 10) { tableview:heightforrowatindexpath // create lastly row height = 100; } homecoming cell; you mean this?: -(cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { if (indexpath.row == 10) homecoming 100.0; homecoming 44.0; } ios uitableview

octave - Loading mat files within a package function -

octave - Loading mat files within a package function - i'm working on bundle gnu octave. 1 of bundle functions uses large, pre-computed table of data. info stored in mat file load , unload when function called. problem i'm unsure of good, installation non-specific way of doing this. near can tell have give load command absolute path mat file within bundle install directory. can see no way of getting directory @ run-time. missing or going wrong way? pkg_add executed when bundle loaded can path pkg_add resides in __fqp__ = fileparts (mfilename ("fullpath")); from there can init data. if want install dir bundle it's possible load( pkg ("local_list")) , inspect local_packages . i think such specific octave questions should go help@octave.org mailinglist. do want distribute new bundle on octave-forge? package octave

java ee - How to OSGi with Tomcat -

java ee - How to OSGi with Tomcat - i interested in osgi (and new osgi) , looking way integrate in tomcat jars , other modules can loaded in tomcat without restarting. 1 allow me know source, tutorial demonstrates step step clear procedure ( ground 0 level) how implement osgi in tomcat war file. tomcat java-ee osgi

Getting variables from pom.xml java -

Getting variables from pom.xml java - i using eclipse maven mobile automation test on mobile webpage. i defining next in pom.xml <properties> <my_variable>www.google.com/</my_variable> </properties> but when calling using string testurl1 = system.getproperty("my_variable"); it seems homecoming null. i tried next way of defining variable <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-surefire-plugin</artifactid> <version>2.16</version> <configuration> <systempropertyvariables> <my_variable>www.google.com</my_variable> </systempropertyvariables> </configuration> </plugin> but still getting value null. i utilize help thanks. your configuration not work in eclipse since there no m2e back upwards surefire. maven surefire plugin forkes new process , provides syste...

java - Spring's threadlocal bean is behaving like a singleton -

java - Spring's threadlocal bean is behaving like a singleton - we're using spring 4.0.6.release, java 8, , tomcat our app hosting engine. we have spring bean looks this: @service @scope("thread") public class foo { private bar bar; public void setbar(bar bar){ this.bar = bar; } } the problem when bean gets injected different threads, threads same bean. each thread doesn't it's own bean have expected. bean injected @autowired . there else has done thread local bean? i registered scope in xml this: <bean class="org.springframework.beans.factory.config.customscopeconfigurer"> <property name="scopes"> <map> <entry key="thread"> <bean class="org.springframework.context.support.simplethreadscope"/> </entry> </map> </property> </bean> the...

java - Emit items in RxJava in an interval which depends on the emitted item itself -

java - Emit items in RxJava in an interval which depends on the emitted item itself - in rxjava android, want emit items in interval depends on item itself: in observable, pull item queue, process , emit it. dependent on type of item, want adjust after time next item shall emitted (slow downwards or speed interval). the next code, proposed @a.bertucci here emit objects drawing in ui in regular interval using rxjava on android demonstrates how emit items in regular interval. private void drawpath(final string chars) { observable.zip( observable.create(new observable.onsubscribe<path>() { // drawing stuff here ... }), observable.timer(0, 50, timeunit.milliseconds), new func2<path, long, path>() { @override public path call(path path, long along) { homecoming path; } } ) .subscribeon(schedulers.newthread()) .observeon(androidscheduler...

java - Set Glassfish to not use any Digest Algorithm -

java - Set Glassfish to not use any Digest Algorithm - i want jdbcrealm not utilize digest algorithm in glassfish. want jdbcrealm compare against database without converting password algorithm. my password in database md5 , convert user's password md5 in java code , utilize code: facescontext context = facescontext.getcurrentinstance (); httpservletrequest request = (httpservletrequest) context.getexternalcontext (). getrequest (); request.login (username, md5password); so can remove digest algorithm jdbcrealm compare plain text without algorithm? i know can send user's password in plain text , jdbcrealm job me, want seek this yes, yo can set digest algorithm none java glassfish digest jdbcrealm

jquery - toggler creation using j query -

jquery - toggler creation using j query - this how creating text input fields entering values requirement toggle text fields when user click on register patient , close automatically if registers <li id="menutog" > <a href="#" onclick = ""><span class="fa-stack"><i class="fa fa-plus fa-stack-1x"></i><i class="fa fa-user"></i></span>register patient</a> <im:form id="togform" theme="simple" method="post"><br/> <!-- <div class="navbar-default navbar-static-side" role="navigation"> <div class="row"> <div class="sidebar-collapse">--> <div class="panel panel-default"> <div class="panel-heading"> ...

python - Delete every non utf-8 symbols froms string -

python - Delete every non utf-8 symbols froms string - i have big amount of files , parser. have strip non utf-8 symbols , set info in mongodb. have code this. with open(fname, "r") fp: line in fp: line = line.strip() line = line.decode('utf-8', 'ignore') line = line.encode('utf-8', 'ignore') somehow still error bson.errors.invalidstringdata: strings in documents must valid utf-8: 1/b62010montecassianomcir\xe2\x86\x90ta0\xe2\x86\x90008923304320733/290066010401040101506055soccorin i don't it. there simple way it? upd: seems python , mongo don't agree definition of utf-8 valid string. try below code line instead of lastly 2 lines. hope helps: line=line.decode('utf-8','ignore').encode("utf-8") python mongodb encode

c# - Scrape JavaScript array data with CsQuery -

c# - Scrape JavaScript array data with CsQuery - some of info want scrape contained within pages javascript. looks similar pattern: <script type="text/javascript"> arrayname["field1"] = 12; arrayname["field2"] = 42; arrayname["field3"] = 1442; </script> <script type="text/javascript"> arrayname["field4"] = 62; arrayname["field5"] = 3; arrayname["field6"] = 542; </script> it's mixed in hell of lot of other javascript. need these values. i started so: var dom = cq.createfromurl("http://somesite.xxx"); cq script = dom["script[type='text/javascript']"]; but cannot think how grab data. way create regex , loop on or there way has improve performance? i can't see how utilize css selectors actual javascript code. should seek different approach? it seems looking server-sid...

mysql - How to put single quotes around variables in a dynamic query -

mysql - How to put single quotes around variables in a dynamic query - i trying build dynamic query. @query set query string , want dynamically add together clause. works, except isn't putting single quotes around strings in case @val. causes error. how include single quotes adds them correctly? this i've tried: set @query = @query + ' ' + '' + @param + ' ' + @operator + ' ' + '' + @val + '' ; thanks! you have place quote in between quotes, escape doesn't break code. following: set @query = @query + ' ' + '' + @param + ' ' + @operator + ' ' + '\'' + @val + '\'' ; edit: eric anderson's reply works well. take mysql 5.0 manual a “'” within string quoted “'” may written “''”. mysql dynamic-sql

javascript - replace all images with inputs elements jquery -

javascript - replace all images with inputs elements jquery - i need find images textarea value , replaces inputs text elements , value of src of img reemplace after final string output on new div ('#newdiv') my script dont replace nil dont know why here have done far, <html> <head></head> <body> <textarea id="caja"></textarea> <input type="button" onclick="parsinghtml()" value="read"> <div id="newdiv"></div> <script type="text/javascript" src="jquery-1.11.1.min.js"></script> function parsinghtml() { var content = $('#caja').val(); var newcontent = $(content).find("img").replacewith('<input type="text">'); alert(newcontent) $('#newdiv').html(newcontent); }; </body> </html> any ideas? in advance! there 2 problems can see newcontent referring...

Convert Play Framework java Promise to Play Framework Scala Promise -

Convert Play Framework java Promise to Play Framework Scala Promise - i building scala play framework app uses library homecoming results f.promise (java promise). there way convert f.promises (https://www.playframework.com/documentation/2.1.0/api/java/play/libs/f.promise.html) scala promises or wrapped scala future out of f.promise? the way see far getting f.promise blocking operation , go on working asynchronous. the way descriped in first reply led me code. unfortunately dont know how define f.function correctly. code not compile. answer: so, found out f.promise has method called wrapped(). , method gives scala future back. it turns out class f.promise (java.play) has method called wrapped() returns scala.concurrente.future wrapped promise. have calling wrapped on f.promise. val promise: f.promise[t] = getpromise() val future : future[t] = promise.wrapped() java scala playframework promise

immutability - Can I call this C# class "immutable"? -

immutability - Can I call this C# class "immutable"? - i need create mutable class immutable, looks following. however, still i'm not sure have "immutable* class, , if is, kind of immutability called ? public class b<c, m> c : icomparable<c> m : imetadata { internal b(char tau, m metadata, b<c, m> nextblock) { if (tau == 'r') omega = 1; _lambda = new list<lambda<c, m>>(); _lambda.add(new lambda<c, m>(tau: tau, ati: metadata)); foreach (var item in nextblock.lambda) if (item.tau != 'l') _lambda.add(new lambda<c, m>(tau: 'm', ati: item.ati)); } internal int omega { private set; get; } private list<lambda<c, m>> _lambda { set; get; } internal readonlycollection<lambda<c, m>> lambda { { homecoming _lambda.asreadonly(); } } internal b<c, m> update(int omega, ch...

image uploading - Configure a constant in Tomcat -

image uploading - Configure a constant in Tomcat - i want provide upload functionality in website. cannot save uploaded image within war. can save particular location on machine , refer there. problem have create code compatible windows machine, mac , openshift server. path images folder different on different machines. the workaround thinking somehow configure images folder location in tomcat server on different machines , read there. there way configure variable within tomcat? there improve solution problem? option 1 you can define environment variable in context configuration file. <context> <environment name="myapp.upload.dir" type="java.lang.string" value="/srv/app/upload" override="true" /> </context> you can either create new context file application or set environment entry in $tomcat_home/conf/context.xml in case property accessible applications running in tomcat instance. here tomcat doc...

aquafold - Aqua Data Studio Macro possible? -

aquafold - Aqua Data Studio Macro possible? - is possible define kind of macro/scripts in aqua info studio? basically, want do: have folder containing several sql-queries named xyz.sql, want run of them , save them xyz.csv is somehow possible? thanks much! aqua info studio has feature called fluidshell integrated shell, can utilize fluidshell commands execute select query , write file. fluidshell introduction fluidshell commands a few of command useful accomplish task executing sql [source][4] [4]: http://www.aquaclusters.com/app/home/project/public/aquadatastudio/wikibook/documentation15/page/289/source to test created 2 tables named foo , bar under sql server database named northwind under schema named dbo , inserted few records. next, created file named xyz.sql , set below 2 lines , saved file. sqlexport -f csv -d northwind -s dbo foo -o /users/tariq/desktop/stack1.csv sqlexport -f csv -d northwind -s dbo bar -o /users/tariq/desktop/stack2.csv ...

android - Header Not 100% When Displayed In Mobile Devices -

android - Header Not 100% When Displayed In Mobile Devices - i have created header disappears when user scrolls down. header floats left leaving amounts 20px gap on right hand side, when displayed on mobile device. not know how prepare , great total help can provided. i have created 4 divs hold header in place. first 2 header bar causing issue. issue can solved if position set fixed, scrolling not work #headerbar { width: 100%; background-image: url(../image-core/header.png); background-position: 0px 0px; background-repeat: repeat-x; height: 80px; margin: 0px; border: 0px solid #fff; position: absolute; z-index: 100; } #headerbar #headerbarcontainer { width: 980px; margin: 0px auto; text-align: center; height: 76px; } the next div contains logo positioned left #headerbar #headerbarcontainerleft { width: 200px; float: left; text-align: left; } the final div positions navigation bar right of logo ...

matlab - Hold on only the axis, not the data -

matlab - Hold on only the axis, not the data - i want graph fixed axes , plot info 1 one. known, if utilize hold off remove first set of data, forgets limits on axes , automatically assigns new limits sec set of data. somehow possible maintain axes same each time separate info piece plotted in same figure? code is: figure(4) grid on axis([xl yl zl]) j = 1:n % n amount of info sets = 1:2 % 2 items drawn per info set *plot data* hold on end %this part has done every iteration 1 time again in order create work axis([xl yl zl]) xlabel = ... ylabel zlabel title pause(tstop) hold off end after searching relevant topic found was; matlab: plot subplot hold on , hold off in loop without calling xlabel, ylabel, xlim, etc not understand @ all. uses parent figure, replacechildren, nextplot , such not familiar , cant find much info about. here's illustration can adapted needs: xlim([0 10]) %// set x-...

ember.js - Commenting out Ember.Select breaks the page, gives an error -

ember.js - Commenting out Ember.Select breaks the page, gives an error - when remove code template of ember-cli project {{view ember.select class="form-control" viewname="list" content=availablelist optionvaluepath="content.value" optionlabelpath="content.label" value=selectedlist prompt="select list item" }} i next error in browser console, , breaks everything. typeerror: this.$(...)[0] undefined   var selectedindex = this.$()[0].selectedindex, any thought why happening, couldn't find linking too. help much appreciated. thanks! this such silly mistake. commenting of handlebar code done {{!-- --}} i doing <!-- --> , error. ember.js

How to add buttons like refresh and search in ToolBar in Android? -

How to add buttons like refresh and search in ToolBar in Android? - i have made toolbar, when add together menu items in menu.xml shows overflow. how add together separately? title shown in middle (vertically), how show @ top? menu.xml <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.toolbar.mainactivity" > <item android:id="@+id/action_search" android:icon="@drawable/ic_launcher" android:title="@string/action_search" android:showasaction="ifroom" android:orderincategory="1" android:menucategory="secondary"/> <item android:id="@+id/action_settings" android:orderincategory="100" android:title="@str...

java - Unified set of Eclipse Luna workarounds for Red Hat Enterprise Linux 6 -

java - Unified set of Eclipse Luna workarounds for Red Hat Enterprise Linux 6 - i'm using company-administered re-create of reddish hat linux, means force fixes out me on regular basis. several of recent fixes have caused eclipse (any version) blow uninformative java crash. websearching has been frustrating, since there several incompatabilities can cause this. in scheme there appear 2 conflicts versions of mozilla code, , 1 cairo graphics library. now i've got working, thought ought share i'm using, save others searching , experimentation time. not guaranteed, means, got me on air after painful thrashing. late edit: should have noted when able upgrade eclipse mars, crashes stopped occurring default configuration. out of date. the easiest way illustrate shell script. note much of commented out, wanted leave here "notes" things seek if still doesn't solve problems. in case, suppressing gre , cairo sufficient. note "nocairo" sw...

java - Binary to decimal, error message -

java - Binary to decimal, error message - i wrote programme convert binary number decimal number. when run programme binary number, programme give me decimal number error message. my code: public class ohad { public static void main(string[] args) { string bin = "10011"; int length = bin.length(); int j = 0; int sum = 0; if (length != 0) { (int i=0; < bin.length(); i++){ if (bin.charat(i) == '0' || bin.charat(i) == '1'){ (int t = (length - 1); t >= 0; t--){ string s = bin.charat(j) + ""; sum = (int)(sum + (integer.valueof(s)) * (math.pow(2, t))); j++; } system.out.println(sum); } else { ...

token - Installing Context broker GE in Fiware -

token - Installing Context broker GE in Fiware - i seek install orion context broker , first registered business relationship in fiware lab, user guide says need , run token_script.sh in order token, have no thought means. in fiware lab can either deploy instance of centos orion context broker installed, or fresh 1 on install yourself. way doing it? you need token if want connect public instance of orion, such 1 in santander (see this more info on that). the way works token (you need fiware account, have) using script, , utilize in succesive calls orion api. bottom line: if want check out orion context broker don't need tokens. set orion vm in cloud (cloud tab in fiware lab, orion-psb-r4.1 image). if want access orion context broker deployed in publicly accesible instance (such 1 in santander) need token. token fiware-orion fiware

django - Segmentation fault: 11 with Matplotlib python 2.7.8 and Mavericks -

django - Segmentation fault: 11 with Matplotlib python 2.7.8 and Mavericks - i encounter segmentation fault: 11 when utilize matplotlib in django app. i utilize : python 2.7.8 matplotlib 1.4.2 os x 10.9.5 (mavericks) i have seen many people study segfault 11 : on os: segmentation fault in django matplotlib, without answer. with package: segfault 11 pandas python v2.7.6 rc1 on mac os x 10.9 with python 3.3.2: python segfault os x 10.9 mavericks the problem: the segfault: 11 comes when seek access view.py in matplotlib used: def cht(request): operations = comptes.objects.all() ha = [0] = [0] in operations: if i.commun==true , i.qui=='hadrien': ha.append(i.montant) if i.commun==true , i.qui=='helene': he.append(i.montant) x = range(0, 2) y = (sum(ha), sum(he)) # width of bars width = 0.20 # phone call figure , set size f = plt.figure(figsize=(300,300)) ...

angularjs - angular src working fine with relative path, but not ng-src -

angularjs - angular src working fine with relative path, but not ng-src - within directive, using angular ng-include src attribute this: template: '<div ng-include src="\'app/views/address_detail_view.html\' "></div>' +... this works ok. now using exact same statement ng-src instead of src: template: '<div ng-include ng-src="\'app/views/address_detail_view.html\' "></div>' +... then inclusion not work. nil happens, no exceptions raised. my final goal include var within src (or ng-src) attribute, if this: template: '<div ng-include src="{{myvar}}' "></div>' +... then exception: [object xraywrapper [object domexception]] ns_error_dom_bad_uri: access restricted uri denied this why striving create ng-src work doesn't seem find relative url. any ideas why ng-src isn't working or should file bug angular team? thanks in advance if @ ...

linux - Running a script inside a loop - echo file names -

linux - Running a script inside a loop - echo file names - i have basic script runs within script. phone call mass_split.sh invokes split_file.sh . splite_file.sh takes 2 arguments -s file_name.txt , -c 1 (how many slices cutting file). trying run loop find text file names in directory ./ , input results cut_file.sh . getting no results , text files not beingness split. mass_split.sh #!/bin/bash f in ./*.txt sudo bash split_file.sh -s echo "file '$f'"; -c 10 done maybe has errant semicolon after string literal, not doing want (unless have executable you're intentionally running called -c ). linux bash shell ubuntu

c# - Get network information with WMI -

c# - Get network information with WMI - i have create resource monitoring dashboard (like task manager) in web project. i'm using wmi. currentbandwidth , bytestotalpersec win32_perfformatteddata_tcpip_networkinterface returns 7 items (task manager shows 4 items in network tab). found of items disabled; can find ones enabled using netenabled in win32_networkadapter , how can bring together these two? how can show network info task manager? i want network info task manager shows (e.g. adaptername , utilization (for have bandwidth , total send/receive bytes/sec), speed , , state). can of using win32_perfformatteddata_tcpip_networkinterface , others using win32_networkadapter . example, can networks' send/receive bytes/sec bytestotalpersec fellow member of 'win32_perfformatteddata_tcpip_networkinterface', retrieves networks' (including disabled) data. how can send/receive bytes/sec measurement enabled networks? the best way utilize wql querie...

image - ImageMagick Set Background Colour -

image - ImageMagick Set Background Colour - i attempting utilize next line of code set background colour of image 1 white. (i.e. first image 'image1.png' needs cleared , become blank white image. overlay image 2 on top of blank image) here line of code running in command line: convert \( image1.png -background white \) \( image2.png -resize 250x105 \) -geometry +347+400 -composite -format jpg -quality 90 image1.png alternatively, improve if generate blank canvas image2.png placed upon. first effort using 2 images working first. not sure trying do, or how big image1 , image2 supposed be, should going if create stuff: # create image2 reddish square coz don't know improve convert -size 100x100 xc:red image2.png # create bluish canvas , read in image2, resize , splat on top convert -size 1000x1000 xc:blue \ \( image2.png -resize 250x105\! \) \ -geometry +347+400 -composite out.png if want utilize image1 rather create empt...

css3 - Unexpected compilation with SASS media queries within a mixin -

css3 - Unexpected compilation with SASS media queries within a mixin - i'm working on front-end code vaadin project. i'm trying responsive styling , running. unfortunately vaadin's build in responsive add-on does not have back upwards ie11. so want utilize media queries responsive design. i've got 2 sass files: commontheme.scss mutual styling , mymixin.scss contain desktop specific styling. so here code: @import "../commontheme/commontheme.scss"; //the mutual them. mutual theme @mixin mymixin { @include commontheme; //including stuff mutual theme. $small-size: 100px; $med-size: 200px; @media (max-width:500px) { .my-image { width: $small-size; } } @media (min-width:501px) { .my-image { width: $med-size; } } } this compiles next css: .mymixin { @media (max-width:500px) { .my-image { width...