Posts

Showing posts from February, 2013

html - Responsive video banner on Safari has huge gaps top and bottom -

i'm trying implement simple video banner on website using html5 tags. need full width , responsive, appears work in chrome , firefox, not safari. here simplified version taken more complex wordpress page using same markup , same happens. http://noisilyfestival.com/video-test.html i've set video background red, see in safari there huge gaps @ top , bottom whereas in firefox , chrome sits flush. can't figure out life of me what's going on here! i've set video display:block fixes few pixel gap @ bottom cannot resolve this. in advance! i removed display:block; #homepage-video , safari looked fine.

umbraco6 - Umbraco.TypedContentSingleAtXPath always giving wrong ID -

umbraco version 6.1, visual studio 2010 i'm trying list of newsarticles under news folder in umbraco i.e. -news --newsarticle1 --newsarticle2 my code var doctype = "documenttypename"; var parnode = umbraco.typedcontentsingleatxpath("//" + doctype); list<ipublishedcontent> child = parnode.children.tolist(); when line hit var parnode = umbraco.typedcontentsingleatxpath("//" + doctype); it gives me wrong parnode (parent node is) id. finds correct doc type (as if change name error). i've tried rebuilding, cleaning project doesnt work. other folders using same code work dont know or whats going wrong? any thoughts? if it's giving wrong content node, may have 2 or more content nodes of same contenttype (doctype). typedcontentsingleatxpath return first valid match , ignore subsequent nodes. can verify results checking required node first 1 of it's type in published cache (the ~/app_data/umbraco.config file

multithreading - Cannot delete a wav file after it has been opened, java -

i want sound file (temp0x) of wav format edited/deleted after has been opened. i'm using thread play sound, , close streams when done. main thread should delete it, fails so. if not play sound first there no problem deleting it. this code in playsound thread plays sound: public void run() { synchronized(this){ system.out.println("play sound: " + soundfile.getname()); audioformat format; dataline.info info; try { stream = audiosystem.getaudioinputstream(soundfile); format = stream.getformat(); info = new dataline.info(clip.class, format); clip = (clip) audiosystem.getline(info); clip.open(stream); clip.start(); }catch(exception ex){ ex.printstacktrace(); } while(clip.getmicrosecondlength() != clip.getmicrosecondposition()){ //waiting sound finished } try { stream.close();

node.js - Only compile sass if a file has changed using gulp -

i'm trying rebuild gulp file bit more efficient, , i'm having trouble getting styles task compile if file has changed. i found this question , answer doesn't seem working me. let's have repo organized so: /dev /assets /styles all.css /src /assets /styles all.scss _header.scss gulpfile.js package.json i want overwrite all.css if change has been made in either of sass files. so, if save _header.scss no changes had been made, , ran styles task, should realize code hasn't changed , not overwrite all.css . i looking @ gulp-cached , per question linked above, doesn't seem working me. here's task @ it's basic: var gulp = require("gulp"), cached = require("gulp-cached"), sass = require("gulp-sass"); gulp.task("styles", function() { return gulp.src(src + "/assets/styles/all.scss") .pipe(sass().on("error", sass.logerror)) .pipe

ios - Method That Recognizes Swipes in WKWebView -

i have wkwebview working fine except 1 small detail. every time user changes page need know can run check make sure page viewing either page user has saved or not. if user clicks on url, can use didfinishnavigation() method in navigation delegate. doesn't appear recognizing when user swipes or forward , never called in scenarios (my guess because these pages loaded , popping them on/off stack). tried adding swipe gesture recognizer, doesn't seem reliable - @ least on simulator. so, question need in order recognize when user swipes go backwards or forwards inside wkwebview ? or there way recognize when url changes inside wkwebview ? if happens else, please upgrade simulator , restart computer. seemed fix problem. didfinishnavigation() being called each time swipe left or right inside wkwebview , should.

java - Understanding Spring Boot Usage and Configuration -

i trying understand how configure spring boot. these tutorials , this make reference called application.properties . i'm assuming that file , if so, go , there template set up? i see different configurations can specify , pick , choose ones need. i setup logback in program , set logging level. tutorial says spring boot provides base config so: <configuration> <include resource="org/springframework/boot/logging/logback/base.xml"/> <logger name="org.springframework.web" level="debug"/> </configuration> but have no idea put that. in application.properties? in pom.xml? stick application.properties in src/main/resources. prefer use .yml files alternative format. can find many spring boot properties (including logging properties) here: https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html spring boot auto configure dependency declare in maven sensible def

Elasticsearch phrase suggester is suggesting me suggestions that do not exists in my index -

i have elasticsearch index have data. implemented , did-you-mean feature when user write misspelled receive suggestion right words. i used phrase suggester because need suggestions short phrases, names example, problem suggestions not exists in index. example: document in index: coding master search: codning boss suggestion: <em>coding</em> boss search result: not found my problem that, there no phrase in index match specified suggestion, it's recommending me phrases not exists , give me not found search. what can this? shouldn't phrase suggester give suggestions phrases exists in index? here i'll leave corresponding query, mapping , setting in case need it. setting , mappings { "settings": { "index": { "number_of_shards": 3, "number_of_replicas": 1, "search.slowlog.threshold.fetch.warn": "2s", "index.analysis.analyzer.default.filter.0": "

validation - AjaxControlToolkit ValidatorCalloutExtender does not work with UnobtrusiveValidation -

i have webforms application. if target application use .net 4.6 framework using <httpruntime targetframework="4.6"/> , validatorcalloutextender not work. if switch off unobtrusivevalidation using <add key="validationsettings:unobtrusivevalidationmode" value="none"/> , validation works fine. don't want turn off unobtrusivevalidation setting. there other solution? thank you.

c# - How to have two setting.settings file with the same setting name for default and user config -

i have 2 .settings file. 1 default value of setting , other 1 user choice. 2 settings file contained same setting name not same value. maybe solution not need 2 .settings file idea have. in brief, want able propose user choose return default value after has choose bad setting usage. edit : i use visual studio 2010 , in win form project all how restore default configuration when setting.settings file has been changed user choices (how save these default config) the settingsproperty object each user setting (or setting) can obtained through properties collection on settings class. can @ defaultvalue property default value (the value before being set particular user. example, if you'd access property this: var value = properties.settings.default.mysetting; then can @ default value this: var defaultvalue = properties.settings.default.properties["mysetting"].defaultvalue; the default value 1 set in settings editor in visual studio. update

html - Height in CSS with Auto/Calc -

i'm having problem on new website. first should give information. i'm building full responsive website portfolio. portfolio images stands in div , response screen size. on screen more 1005px it's working perfect. scaling works great. because following css line: @media screen , (max-width: 1005px) { the div image newtextportfolio. image doesn't use css except 100% width , height. when give div follow definition (height: auto;) white line under images. , don't want white line :( .newtextportfolio { width: calc(95% + 10px); height: auto; margin-right: 25px; } i can make dissapear if make height example 200px. when view site on ipad makes images stretch (because it's fixed , not responsive). does know how can make white line dissapear? tried som things calc, percentages makes line, fixed pixels doens't. on jsfiddle deleted lot of code site. part need. hope can work it. for jsfiddle: https://jsfiddle.net/gertjan2805/dcpgg9zv/ really great

html - PHP: How to save in session generated table, and apear everytime when curent user is login? -

this table, generated when user pick values in select boxes. how save in session generated table, , appear every time when current user login. <table border="0" class="table table-hover table-striped" name="raspored" id="raspored" class="tablesorter"> <thead> <tr colspan=2 bgcolor="#6d8fff"> <th>ИД</th> <th>Предмет</th> <th>Професор</th> <th>Ден</th> <th>Час</th> <th>Просторија</th> <th>Тип</th> </tr> </thead> <?php foreach ($_post['predmet'] $predmet) { $_session['predmet'] = $_post['predmet']; $rows = get_info($db, $predmet); if (count($rows)){ foreach ($rows $row) { $_session['row'] = $rows;

r - Cannot get Plots from ggplot in Rstudio -

Image
i'm new r. have been working on plotting data, working fine, of sudden i'm not getting plot in rstudio. i've reinstalled rstudio. missing in code? thanks library(ggplot2) library(rmisc) srl<-summaryse(combinedwinrhizosigmaplot, measurevar="slr", groupvars=c("rootstock")) offset.v = -3 offest.h = 0.5 ggplot(srl,aes(x=roostock, y=srl, ymax=70000, ymin = 0)) + geom_bar(stat="idendity",fill="gray50", colour="black", width = 0.7) + geom_errorbar(aes(ymax=srl+se, ymin=srl-se), width = 0.0, size=0.5, color = "black")+ geom_text(aes(label=c("bc","bc","a","cde","g","fg","efg","cd","defg","cdefg","ab","a","cd","cdef","defg","cd","a","cdefg"), hjust=offest.h, vjust=offest.v) + labs(x = "rootstock&

java - How to cut binary number when moving left? -

how cut binary number when moving left instead of expand number of bits? int num = 0b101010; num = num << 1 // want num 01010 num = num << 1 // want num 1010 num = num << 1 // want num 010 num = num << 1 // want num 10 is there easy way it? yes, easy do: make mask ones ( 0b111111 in case), , use mask original number using & . shift mask right, effect below: number mask result ------ ------ ------ 101010 011111 001010 101010 001111 001010 101010 000111 000010 101010 000011 000010 101010 000011 000010 101010 000001 000000

java - I changed the code while it was running and it had effects on the output? -

i using selenium , java write test. ran test , while going on changed in code ide, , changes not supposed have effect on running test because it's compiled, test failed when got point changed throwing errors related changes !!!!! by way, change adding static variable. many ide's automatically plug in new code running aps when change made, warning app needs restarted if ide thinks change drastic. don't know selenium, eclipse this.

ruby - Dashing & Openhab -

i'm trying start openhab dashing project, i'm still having same error. when try dashing sample project starts perfect, not openhab project. user@server:~/dashboard$ dashing start /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require': cannot load such file -- data_mapper (loaderror) /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require_with_backports' /home/jopo/dashboard/lib/settings.rb:1:in `<top (required)>' /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require' /usr/local/lib/ruby/gems/2.0.0/gems/backports-3.6.7/lib/backports/std_lib.rb:9:in `require_with_backports' /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:157:in `block in require_glob' /usr/local/lib/ruby/gems/2.0.0/gems/dashing-1.3.4/lib/dashing/app.rb:156:in `each' /usr/local/lib/ruby/gems/

machine learning - Torch7 alternative to MultiLabelMarginCriterion -

i have multi class label problem solve. ie: each test image can allocated 1-10 non-exclusive labels. however, having problems multilabelmargincriterion because it's not supported cunn. so, looking alternative approaches. either of these effective? calculate each permutation of labels in training set (about 150) , train classifier identify 150 classes. however, not think new permutations of labels in test set (those not found in training set) not recognised. train 10 separate binary classifiers using bcecriterion. ie: 1 classifier each label. run each test image through each classifier , combine results. however, training lots of cnns time-consuming. the best solution found use msecriterion targets , predictions arrays of 1s , -1s, indicating presence or absence of label.

php - How to add remove button for items in widget : entityreference view widget? -

Image
i installed entityreference_view_widget , have created view entity reference created field entityreference view but want customize widget entityreference view, want add remove button every items added how can add "remove" button every items inn widget of rentity reference view field ? there module or php code? me plz i managed on project using jquery. unchecking checkbox row saving node removes row, so: hide checkbox via css using jquery.each() add remove button, link, whatever each row on button click uncheck checkbox row , .hide() row

cakebuild - Retrieving an XML value in Cake build? -

is there simple way of retrieving xml value file using cake build automation system? i've been poking around cake.common.xml namespace , seems geared toward modifying ( xmlpoke ) or transforming ( xmltransformation ) xml. docs on methods make them appear geared toward prepping xml use in later build steps consume, don't return anything. ideally, go in filepath object xpath query string , resulting value. specifically, i'm trying extract values xamarin.android project's androidmanifest.xml use in naming resulting apk cake.xamarin call, seems functionality should @ cake.common.xml level. as of cake v0.8.0 , there xmlpeek cake.common.xml.xmlpeekaliases namespace . pass filepath instance , xpath query (with optional settings things namespaces), , return string. for example, given local xml file this… <some> <nested> <thing someattribute="attributevalue" /> <otherthing>some text value</othert

javascript - Trying to inject factory inside a private function -

new angularjs here. trying use factory piece of code (logger)inside private function shown below, possible? still trying grasp angular concepts. thanks: (function () { 'use strict'; angular .module('app.admin') .controller('uploadcontroller', uploadcontroller); uploadcontroller.$inject = ['$scope', 'fileuploader', 'dataservice', 'logger', 'config']; function uploadcontroller($scope, fileuploader, dataservice, logger, config) { ... logger.info('blah blah blah', 'error!'); ... somefunction(); ... } //private function function somefunction() { //... code hidden brevity $.ajax({ type: "post", url: url, async: true, cache: false, data: datastring, success: function(results) { //need u

What perl web framework to use for the old CGI based perl code? -

yes, while i'm working on node.js, still love perl, :) the old web product based on old perl cgi, i'm looking simplest way fix xss/sql injection/etc. web security holes, within week including testing, :( so catalyst dancer mason maypole mojolicious which 1 should use in arm platform ? thank ! you have fallen foul of primarily opinion-based off-topic categorisation, , question closed soon. think it's worth offering few guidelines here first of should absorb written in cgi::alternatives reasonable summary of subject next should separate html generation functionality of existing cgi code interface itself, , consider replacements each of them separately. if use html::tiny cgi::simple code have change little , have achieved better partitioning of functionality ideally move on 1 of many templating systems such template toolkit , 1 of frameworks, topic of question. in end need lot of research , many trials discover how each framework fits requirement,

javascript - Rendering CSS on the Server Sid of my ReactJS Application using webpack on entry.js file -

i building reactjs app , on reload on localhost:8080/extension, styling on page flickers. understand being caused css being rendered on client side. so trying in entry.js file(i using webpack), remove require('./css/base.scss') if(document === 'undefined') block reactdomserver.render callback in order compile css on server side. any tips or suggestions of how render css on server side of react application? thank you

assembly - Don't understand shifting, rotating, and LAHF -

for example, assignment have write hla assembly program prompts int8 value inspect , prints in binary format. example, here program output various entered values gimme decimal value print: 15 15 0000_1111 gimme decimal value print: 7 7 0000_0111 i able source code of answer i'm having trouble understanding. i put thought process inside comments program binaryoutput; #include( "stdlib.hhf" ); static zgivennumber : int8; // value inspect begin binaryoutput; //ask decimal number stdout.put( "gimme decimal value print: "); //put number in 'zgivennumber' (let's 7) stdin.get( zgivennumber ); //put 'zgivennumber' inside 'bh' ('bh' contains 7) mov( zgivennumber, bh); stdout.put("number in binary is: ", nl); //shift left 1 @ 'bh' (this makes 'bh' 14) shl(1, bh); //not clue doing lahf(); //checking see if 0000_0001 , ah match 0's ,

jquery - Is it possbile to group td tags in a fieldset -

i have html table , want group <td> fieldset. ex in row there 16 columns, want group 8 1 fieldset (which has check box select these 8 cells) , group other 8 fieldset (same checkbox can allow second set of td tags selected) each row must have arrangement. using asp.net mvc, razor, html5 etc. suggestions on how achieve this? <tr> elements can contain <td> s, <th> s , elements aren't rendered themselves( script , template ). here can read html5 specification <tr> element, states content of these elements can .... zero or more td, th, , script-supporting elements and of case, can use classes , name attributes group checkboxes , use js handle checking/unchecking, , leave table structure alone.

javascript - First public template. What to do? -

i'm on way create "open source" free template, , requirement must keep name @ buttom of template. and that's why i'm here! how can make sure user keeps name @ bottom? know can create can delete code, i'm not sure how that, , if legal. what should in situation? it's codede in html/css/javascript/jquery/mvc/c# if it's open source , have access code , can change deletion code or credits., thus, there isn't nothing can defend credits @ bottom, except hope appropriate license you're publish code under protect you. more on license: http://choosealicense.com/ https://stackoverflow.com/questions/6883638/how-to-publish-code-as-open-source

swift - ios9 / swift2 / xcode7+ AVplayer icecast doesn't process streaming without file extension -

how play stream icecast2 not have file extension example stream url: http://icecast:8044/channel-123?a=hash format: mp4a the code seems working on files extension, not on files without. var player = avplayer(); let playeritem = avplayeritem(url:nsurl(string:"http://host/file.mp4a")!); player = avplayer(playeritem:playeritem) let playercontroller = avplayerviewcontroller() playercontroller.view.frame = self.view.frame playercontroller.player = player self.addchildviewcontroller(playercontroller) self.view.addsubview(playercontroller.view) player.play() edit: when stream address ends without file extension (the file on server stored without file extension .mp3, .mp4,..) avplayer not play anything( http://example.com/file ) ... if file name contains file extension works ( http://example.com/file.mp3 ) it seems confusing live streaming , loading media files server. if talking live streaming: 1) file extension has no i

entity framework core - EF7: "The EntityFramework package is not installed" when it is -

have entered install-package entityframework.commands –pre , when try add-migration initial following error: the entityframework package not installed on project '…'. as clue, when try use-dbcontext command, error. here's package manager console session: pm> install-package entityframework.commands –pre package 'entityframework.commands.7.0.0-rc1-final' exists in project '…' pm> add-migration initial entityframework package not installed on project '…'. pm> use-dbcontext use-dbcontext : term 'use-dbcontext' not recognized name of cmdlet, function, script file, or operable program. check spelling of name, or if path included, verify path correct , try again. @ line:1 char:1 + use-dbcontext + ~~~~~~~~~~~~~ + categoryinfo : objectnotfound: (use-dbcontext:string) [], commandnotfoundexception + fullyqualifiederrorid : commandnotfoundexception what doing wrong?

python - How to resolve twitter api rate limit? -

using pip3 install twitter small python program retrieve user's tweets in total year. utl = t.statuses.user_timeline(count = n, screen_name = name) got error rate limits, shows: details: {'errors': [{'code': 88, 'message': 'rate limit exceeded'}]} after checking api docs, https://dev.twitter.com/rest/public/rate-limiting , no idea how fix it. hopefully, help. thanks! the rate limit page quite clear, restricted making 180 calls per 15 minutes. this gives few options. throttle code. put sleep in there ensure never exceeds limit. use api options maximum amount of data in shortest amount of api calls. the documentation statuses/user_timeline says: this method can return 3,200 of user’s recent tweets. and count specifies number of tweets try , retrieve, maximum of 200 per distinct request. so can use count=200 request 3,200 statuses in 16 api calls .

git - how can I clone local svn repository? -

i unable find explanation how should specify location of existing svn repository. in other words - should used url in git svn clone url when svn repository local? you should able succeed this: git svn clone file:///e/svn_repo_on_e_drive similar svn checkout command: svn co file:///e/svn_repo_on_e_drive file:// folder on current drive of executing cmd prompt, file:///d/some_folder d:\some_folder . note: / , removed drive colon in file link on windows. file://e:/svn_repo_on_e_drive → file:///e/svn_repo_on_e_drive

python - how to disable privacy or anyother feature in edit profile form in userena? -

i've tried many things can't figure out. followed 1 here, django-userena removing mugshot isn't working me. tried 1 here https://www.reddit.com/r/django/comments/1mgk3b/adding_and_removing_custom_django_userena_form/ isn't working. how did it, in accounts/forms.py have. from userena.forms import editprofileform class editprofileformextra(editprofileform): class meta(editprofileform.meta): exclude = editprofileform.meta.exclude + ['privacy'] and inside accounts/urls.py have from django.conf.urls import patterns, url urlpatterns = patterns( '', url(r'^accounts/(?p<username>[\.\w-]+)/edit/$', 'userena.views.profile_edit', {'edit_profile_form': editprofileformextra}, name='userena_profile_edit'), ) any appreciated

jquery - Find the closest table containing a text -

i've 3 nested tables innermost table containing text in td portion. what way innermost table containing text? if run like: $("td").filter(function(){ return $(this).text().match(/pnr no:/);}).closest('table') it gives me 3 tables it gives me 3 tables it's returning 3 tables because each td element presumably contains text (since nested). what way innermost table containing text? if want select innermost td element, 1 solution select td elements don't contain table elements (i.e., innermost td elements) combining :not() pseudo class , :has() selector : $("td:not(:has(table))").filter(function() { return $(this).text().match(/pnr no:/); }).closest('table'); jsfiddle demo

php - Symfony 2.8 twig and bootstrap -

is there link or post how symfony can work bootstrap? not forms general layout. maybe calling them in resources: the symfony demo application uses bootstrap , modern symfony practices. maybe can check out source code , file structure.

Test uploading files flask with python 2 and 3 -

firstly question similar one . but problem of trying write tests require uploading files app can run either in python 2.7 or 3.4. with following code, when run under python 3.4 error. not sure if matters, running unittests py.test self.client = app.test_client() open(standard_test_path, 'rb') dataset: params = {} params['priority'] = 5 params['dataset'] = (dataset, standard_mol_file) response = self.client.post( '/datasets', data=params ) the error following: response = self.client.post( '/datasets', data=params ) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /users/user/.virtualenvs/playground3/lib/python3.4/site-packages/werkzeug/test.py:788: in post return self.open(*args, **kw) /users/user/.virtualenvs/playground3/lib/python3.4/site-packages/flask/testing.py:108: in open follow_redirects

System.out.println in java - Is out initialized in a native method? -

i wanted know if out variable in system.out.println() initialized in static block of system class. out field declared final static variable, equals null ( public final static printstream out = null; ) . since out pointing null, assume being pointed printstream object somewhere. can't see code except native method called registernatives() . being pointed in native method? why being done way (any performance advantage)? also, documentation out variable in system says: the "standard" output stream. stream open , ready accept output data. typically stream corresponds display output or output destination specified host environment or user." thanks. the out registration flow java virtual machine (jvm) invokes private static void initializesystemclass() @ line-1155 the function call setout0(newprintstream(fdout, props.getproperty("sun.stdout.encoding"))) @ line-1192 invokes actual native method defined private static n

scala.MatchError: String Extraction using regular expression -

i working on scala pattern matching. for below program getting output. val pattern = "([0-9]+) ([a-za-z]+)".r val pattern(count,fruit) ="100 bananas" the output of program count: string = 100 fruit: string = bananas i modified program deeper understanding, adding 1 more numeric pattern pattern val object , 1 more object extraction pattern val. the program val pattern = "([0-9]+) ([a-za-z]+) ([0-9]+) ".r val pattern(count, fruit, price) ="100 bananas 1002" but program not compiling , throwing error. error - scala.matcherror: 100 bananas 1002 (of class java.lang.string) @ #worksheet#.x$1$lzycompute(extractingstrings.sc0.tmp:6) @ #worksheet#.x$1(extractingstrings.sc0.tmp:6) @ #worksheet#.count$lzycompute(extractingstrings.sc0.tmp:6) @ #worksheet#.count(extractingstrings.sc0.tmp:6) @ #worksheet#.#worksheet#(extractingstrings.sc0.tmp:6) can explain why throwing error. in advance. the program compiling fine

javascript - Ghostdriver 1.2.1 + PhantomJS 2.0 + latest Selenium Can't find variable error in Java -

[error - 2016-01-16t02:22:00.898z] session [e6651a90-bbf7-11e5-9061-cff578894101] - page.onerror - msg: referenceerror: can't find variable: data :262 in error [error - 2016-01-16t02:22:00.898z] session [e6651a90-bbf7-11e5-9061-cff578894101] - page.onerror - stack: (anonymous function) (http://www.example.com/ns/common/jquery/jquery.cartactions.js?cd=0:205) o (http://www.example.com/images/common/jquery/jquery.latest.js:2) firewith (http://www.example.com/images/common/jquery/jquery.latest.js:2) w (http://www.example.com/images/common/jquery/jquery.latest.js:4) d (http://www.example.com/images/common/jquery/jquery.latest.js:4) openurl (:0) open (:280) (anonymous function) (:/ghostdriver/request_handlers/session_request_handler.js:495) _execfuncandwaitforloaddecorator (:/ghostdriver/session.js:212) _posturlcommand (:/ghostdriver/request_handlers/session_request_handler.js:494) _handle (:/ghostdriver/request_handlers/session_request_handler.js:91) _rero

Is there any emma plugin for jdeveloper 12c? -

similar eclemma plugin on eclipse, there plugin jdeveloper see run junit tests , see code coverage? see emma integration plugin in jdeveloper after installing wasn't able see difference , not documentation on plugin supposed do.. please help! i know old question in case came across it. there blog post here explaining how emma work jdeveloper. tested on latest jdeveloper 12c , works fine. regarding documentation , how use emma listed in site here

makefile - How to make "%" wildcard match targets containing the equal sign? -

the makefile wildcard system doesn't seem match targets if contain equal sign. there way work around deficiency? flag or setting or rule escape equal sign? know can not use equal sign i'd prefer fix idiosyncrasy of make if possible. here's example of mean $ cat makefile all: echo dummy target b_%: echo $@ $ make b_c=1 echo dummy target $ make b_c1 echo b_c1 the first make command not match b_% though should. wasn't able find documentation supposed matched % wildcard. pointers? make version is $ make --version gnu make 3.81 copyright (c) 2006 free software foundation, inc. program built i386-apple-darwin10.0 the problem here not % syntax, fact any command-line argument equals sign in interpreted variable assignment . you should find if add

can not conect to meteor from localhost:3000/192.168.1.104:3000 -

Image
i have installed sentos7 virtual machine. , installed meteor, can not open in web browser application. can me solve issue? run app binded 192.168.1.104:3000 or 0.0.0.0:3000 , not localhost:3000 . if run app in vm, addr must visible other machines. 127.0.0.1 local address. addr never visible other machines.

parse.com - swift parse query orderbyDescending doesn't work -

i using swift , parse. used 'query.orderbydescending' in way doesn't work perfectly. want arrange people's total score order looks (e.g., 9, 7, 32, 21, 15....). seems coding recognize first digit of number. how can fix it? here's codes. thank you! class individualstatstvc: uitableviewcontroller { var postsarray = [pfobject]() override func viewdidload() { super.viewdidload() self.view.backgroundcolor = uicolor(patternimage: uiimage(named: "background2.png")!) tableview.separatorcolor = uicolor.orangecolor() fetchdata() print(postsarray) } override func numberofsectionsintableview(tableview: uitableview) -> int { return 1 } override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int { return postsarray.count } override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidenti

c# - How can i get remote call on bootstrap twitter typeahead to work, by calling asp.net web method -

i trying load typeahead.js using bloohound's remote function can call web method. have seen similar threads querystring being used : integrating typeahead.js asp.net webmethod typeahead.js , bloodhound.js integration c# webforms webmethod http://yassershaikh.com/using-twitter-typeahead-js-with-asp-net-mvc-web-api/ and many more.... however, cannot find example ajax used call webmethod typeahead.js. so have , works: webmethod [webmethod] public static string getemployeetypeahead() { javascriptserializer jss = new javascriptserializer(); jss.maxjsonlength = 100000000; string json; using (var rep = new rbzpos_csharpentities()) { var result = rep.employees .where(x => x.employeestate == 1) .select(x => new { x.employeeid, x.fullname, x.mann

keyboard - USB HID Atmega 32u4 Arduino - system device ID / name changing from default Arduino leonardo -

i'm building usb hid device using arduino leonardo mini clone, based on atmega32u4 . particular ic has got usb controller build in, , turning in hid device simple, need include keyboard.h , use keyboard.print ... the question , can set/define name of device shown, when arduino connected pc, because @ moment named arduino leonardo. the default automated name tty usbmodemhidp1 in system preferences can see: id product: 0x8036 id vendor: 0x2341 wersion: 1.00 serial number: hidpc speed: 12 mb/sek. vendor: arduino llc id location: 0x14200000 / 16 so in arduino keyboard.h can change name, or id's ? possible ? because in opinion should can't find right place, , not have experience wit arduino avr working microchips mplab x before different ic's ;). any appreciated best regards the "iproduct" string sent board on enumeration tells operating system gives human-readable name. value of string set near top of usbco

java - Why does Hibernate return random result? -

i want read data database using hibernate. want start first row, read 200 rows , process them, read next 200 rows. hibernate returns random row every time. this method reads database. public list getpages(int start, int end) { criteria querycriteria = session.createcriteria(page.class); querycriteria.setfirstresult(start).setmaxresults(end); return querycriteria.list(); } public void myfunction(){ while (readflag) { //get page database; list<page> pageslist = database.getpages(startfromdatabaseindex, read_from_database_size); if ((pageslist == null) || (pageslist.size() == 0)) { break; } if (pageslist.size() < read_from_database_size) { readflag = false; } else { startfromdatabaseindex = startfromdatabaseindex + 200; } (int = 0; < pageslist.size(); i++) { process(); } } } to extract data dat

php - Ajax internal server error in Symfony -

so have problem symfony 2. "internal server error". below ajax call $.ajax({ url: resource_url + '/delete', type: 'post', success: function(result){ $(row).fadeout(function(){ $(this).remove(); show_msg_box('#msg-box', 'successfully deleted <strong>' + job_name + '</strong>!'); if(!has_table_row('.jwobs-table', 'tr.app-row')){ $('tr.app-norow').fadein(); } }); } }); and content of function being called in url public function ajaxdeleteaction($job) { return $this->forward('web.api.job:deleteaction', $job); } and function route above being forwarded to public function deleteaction($job) { $con = \propel::getconnection(); $sql = "delete tb_job id = ".$job.""; $prep = $con->prepare($sql); $prep->execute(); $this->response->setsta

python - Connect data points in the order they were individually plotted - matplotlib -

i trying connect points plotted individually, want connect them in order plotted. have list of numbers referring set of points (ordered pairs). list tells order points should plotted in. the points in dictionary p . let's p[1] , p[2] , p[3] . list = (2, 1, 3) . want plot line connects p[2] p[1] p[3] . p[i] = (x, y) tuplet x-coordinate x , y-coordinate y . as have now, plotting points using loop. works, doesn't connect points. great! thanks. x=[-4, 2, -1, 5] y=[-3, -2, 4, 2] n = 3 #number of cities p = dict() p_0 = (x[0],y[0]) in range (1,n): p[i] = (x[i],y[i]) route = (2,1,3) plt.plot([p_0[0]],[p_0[1]]) k in range (0,n-1): plt.plot([p[route[k]][0]],[p[route[k]][1]]) you need provide x coordinates list , y coordinates separate list, when calling plot: import matplotlib.pyplot plt x=[-4, 2, -1, 5] y=[-3, -2, 4, 2] plt.plot(x,y,'b-')

class - python - setting instance variable within the instance -

i have following tile class got instance variables such unmapped,free etc. instance variables default value once new instance created, want set of variables method within instance itself. when im trying so, seems the new value not saved when im doing without method seems work. how can be? class tile(): def __init__(self): self.free = 0 self.unmapped = 1 def set_tile(self,newval): self.free = newval so : tile1 = tile() tile1.set_tile(20) -> tile1.free = 0 but, tile1.free = 20 -> tile1.free = 20 thanks help

How Mysql load data in file statment behaves in case of exception -

i inserting data table mysql load data local infile statement. csv file contains 50000 rows. my question suppose load data infile stament has inserted 30000 rows , @ time power failure or exception has occurred. in case mysql automatically rollback transaction or there 30000 rows table. it depends engine using. remember myisam doesn't support transactions, myisam find in database rows inserted moment with innodb instead, rollback find no rows inserted.

linux - How to get information from text file using PHP and remote ssh? -

i've got problem poor performance php executing bash script remote ssh , doing grep on log. in web browser receive output after 40 seconds. executing bash script(ssh + grep on remote machine) directly on local machine taking 8 seconds. know cannot bypass came idea of : creating php script save text file on local machine "variables" need. let's call "parameters.txt". other bash script "reader.sh" read "parameters.txt" file, of magic of remote ssh , grep, save output "output.txt". background script run every 2 seconds reader.sh is idea? if need use php on ssh, use http://phpseclib.sourceforge.net/ . have nice ssh implementation used sometime deploy applications , configure linux servers (puppet replaced it). code cleaner , easy maintain. another option is, if reading logs linux ( messages, apache, syslog, etc...) have options rsyslog ( http://www.rsyslog.com/ ) centralize on server , work on locally. cheaper com

How to read/processes 100 lines at a time from 10000 lines in python? -

how pass/processes 100 lines or lower try: @ time ? receipt_dict = {} open("data.txt", "r") plain_text: // ** 10000+ lines ** line in plain_text: hash_value = line.strip() receipt_dict[hash_value] = 1 try: bitcoind.sendmany("", receipt_dict) // **here must loop 100 @ time** with generators. here, load_data_chunks accumulates data in receipt_dict until size exceeds chunk_size , yields main loop below. def load_data_chunks(path, fname, chunk_size): receipt_dict = {} open(fname, "r") plain_text: line in plain_text: hash_value = line.strip() receipt_dict[hash_value] = 1 if len(receipt_dict) > chunk_size: yield receipt_dict receipt_dict = {} yield receipt_dict chunk in load_data_chunks("data.txt", 100): try: ...

IF condition in C translation to MIPS -

i want know why if(x == y) in c programming language translated 'bne' condition , not 'beq' condition in mips ? ignoring conditional moment, consider order in these blocks of code printed in assembler language instruction stream: // if (x == y) { // b } // c when x == y true, flow goes sequentially b c. there's no jump required on equality ( beq ), because desired flow matches way blocks printed in instruction stream. when x == y false, @ end of flow has bypass b , jump straight c. that's why makes sense branch instruction triggered on inequality ( bne ). of course, take these example thought process particular case. in general case, these implementation details. compiler may print instructions in way sees fit, including inverting conditionals. (keep in mind that, due modern cpu pipelines, strong optimization goal compiler guess execution path , ensure contains fewest possible jumps.)

jasper reports - Print the Values from list in JasperReports version 3 -

Image
i want values list , show in tabular form. m using sub reports. however, able first row values list, can't access rest of values. i using ireports version 3. here sub report: the first row matches pojo fields. need print second row, other values list. however, error shows cant' retrieve value material1.... as suggested in prevoius comments, should better understand how detail band works. the detail band iterates every "row" of datasource, unless did unconventional in datasource, need single field every "column" in datasource. basically, if data source like: material quantity actual_cost aaa 100 5 bbb 200 10 ccc 150 7 ddd 50 8 having 3 "columns" show, need 3 fields in detail band. running report, 4 rows (like datasource should suggest you).

android - How to retrieve data from the database in the View Pager concept? -

i have implemented view pager concept , retrieved 1 data. now,i want retrieve other data data base pages swipe to.. xyz= db.tablename(id); (int = 0; < xyz.size(); i++) { data1 key= xyz.get(i).get("data1"); data2 key=xyz.get(i).get("data2"); data3 key=xyz.get(i).get("data3"); } now these values on 1 screen , being repeated other swiped views. whereas,i want values change other layouts of swipe views . i have declared view pager coding after setting text particular field. my view pager coding this.. pageadapter adapter=new pageadapter(); vp.setadapter(adapter); vp.setcurrentitem(0); what should do? i tried implementing view pager coding(above mentioned coding) within loop neither content layout seen nor swipe features work. if using fragments viewpager in fragment class make cursor statment id id of viewpager. , populate listview cursor. way database entries sorted according id of viewpager. make column in database n

How to open Spring Boot sample in Eclipse STS -

i've downloaded spring boot samples, , want run 1 of them in spring sts, instance one: https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-web-jsp however have no clue how import eclipse sts. tried import wizard, import file system non of work ((i error no project exists @ given location). how can run sample in eclipse sts? spring boot uses maven build tool, can import project existing maven project. m2e eclipse plugin generate eclipse settings mavens pom.xml file. import file system tries import existing eclipse project, spring boot demos not include eclipse settings, independent of ide

c++ - How to output MODULEENTRY32 properties data types? -

i have created module snapshot , got moduleentry32 struct contains data, output this: _tprintf( text("%6d %-15s %s\n"),pe.th32processid,me.szmodule,me.szexepath); now lets want use path, wchar me.szexepath , method requires path of const *char. how handle that, need convert data type?

iphone - Get a list of images in the project in iOS? -

i imported lot of images app. use imagenamed: each item hard manually (~50 images). can somehow list of them? testing purposes, private api acceptable too. or easier me rename them 1.jpg, 2.jpg , etc. the best way rename file ( 1,2,3 xxx ) but there tool see picture app bundle during coding ksimagenamed

vagrant - How can I get chef to reboot the node, and pick up the recipe from where it left off? -

i'm trying set asterisk server chef using berkshelf , vagrant, , i'd first upgrade kernel running apt-get upgrade , , rebooting machine. how can trigger reboot in recipe, , have pick after machine reboots? have no problem using fabric, execute "reboot" the chef provisioner in vagrant died machine rebooted idempotence 1 of principles of chef. this means recipe can run on , on again, , change things not expected. so in case this: first chef run notices unexpected kernel installed. installs kernel , triggers reboot. chef runs again, identifies kernel installed expected , continues. can continue other things. one note: i've never tried this, signalling reboot in middle of chef run damage. i'd recommend abort chef run after reboot signal (e.g. through raising exception, see how abort/end chef run? ).

javascript - how to retrive User name/login name from gmail? -

i using google login custom website. here wrote code it var soauthserviceendpoint = "https://accounts.google.com/o/oauth2/auth?scope=http://gdata.youtube.com https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email&response_type=token&"; var soauthredirecturl = "http://example.com/testpage/test.html"; var termsandcondurl = "termsandcondition.html"; var soauthclientid = "294016263542.apps.googleusercontent.com"; var sauthenticationurl = soauthserviceendpoint + "redirect_uri=" + soauthredirecturl + "&client_id=" + soauthclientid; even got access token using below function function fnonload() { //alert("form loaded"); var saccesstoken = ''; var params = {}, querystring = location.hash.substring(1),regex = /([^&=]+)=([^&]*)/g, m; while (m = regex.exec(querystring)) { params[decodeuricomponent(m[1])] = d