Posts

Showing posts from February, 2012

How to inherit views porperly in openerp 7.0 -

hi view inheritance code , following error while using code . " valueerror: many values unpack " please me resolve issue <record model="ir.ui.view" id="inherit_form_view1"> <field name="name">inherit form</field> <field name="model">student.info.student</field> <field name="type">form</field> <field name="inherit_id" ref="student.info.student.form_view1" /> <field name="arch" type="xml"> <!-- <xpath expr="/sheet/notebook/page/field[@name='mname']" position="after"> <field name="m_tongue" /> </xpath -->> <field name="mname" positon="after"> <field name="m_tongue" /> </field> </fiel

Add event to google calendar from ios -

i have followed following tutorial fetch events google calendar working fine. https://developers.google.com/google-apps/calendar/quickstart/ios now stuck in insert event ios app can synced web well. please guide me in right direction or post sample code. i using code authorization in viewdidload // initialize google calendar api service & load existing credentials keychain if available. self.service = [[gtlservicecalendar alloc] init]; self.service.authorizer = [gtmoauth2viewcontrollertouch authforgooglefromkeychainforname:kkeychainitemname clientid:kclientid clientsecret:kclientsecret]; authorization seems fine because fetch events working fine. using following code add event - (void)addanevent { // make new event, , show user edit gtlcalendarevent *newevent = [gtlcalendarevent object]; newevent.summary = @"sample added event"; newevent.de

ruby on rails - Is RoR 'routes' file an alternative for Apache 'mod_rewrite' module? -

i'm starting web developer , following question sake of connecting several new things in brain: ror 'routes' file alternative apache 'mod_rewrite' module? thanks in advance participating. it's similar in list of url patterns, each pattern having rules associated it. the main difference routes internal rails: mod_rewrite come decision route, , serve file, or pass request on proxy handle, can thought of standalone process in request pipeline. routes.rb on other hand can thought of runs inside rails , decides object (where objects controllers) should have method called on it, passing through request object. maybe isn't happens it's this. rails black box request comes in , response comes out, , routes inside box. so, guess it's alternative mod_rewrite, because instead of using mod_rewrite apache pass requests rails , let rails (using routes.rb code) figure out. it's kind of different thing. edit: re-read , realised it'

Ordered associative arrays in bash -

i can following in bash : declare -a data data[a]="aaa" data[c]="ccc" data[b]="bbb" in "${!data[@]}" ; printf "%-20s ---> %s\n" "$i" "${data[$i]}" done which outputs: a ---> aaa b ---> bbb c ---> ccc that is, associative array reordered (i assume using lexicographic ordering on keys, not sure), , loses original order in created data. wanted instead: a ---> aaa c ---> ccc b ---> bbb in python use ordereddict instead of plain dict that. there similar concept in bash? as answered, associative arrays not ordered. if want ordering in array, use below work-around. declare -a data data_indices=() data[a]="aaa"; data_indices+=(a) data[c]="ccc"; data_indices+=(c) data[b]="bbb"; data_indices+=(b) in "${data_indices[@]}"

IFERROR function in MySQL -

is there function iferror in mysql. example: iferror(25/0,9) i tried on phpmyadmin said such function iferror not exist. appreciate help you can reach similar results ifnull: if answer not valid, defaults null. ifnull give alternative answer: your example (in case): select ifnull(25/0,9); gives result: 9

android - Starting Map Activity from Nav Drawer -

i trying develop map activity initiated navigation drawer. have read this query . my code :- mainactivity.java package com.tadrish.last; import android.graphics.bitmapfactory; import android.os.bundle; import android.support.v4.widget.drawerlayout; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; import android.view.menu; import android.view.menuitem; import android.widget.toast; import android.content.intent; public class mainactivity extends appcompatactivity implements navigationdrawercallbacks { /** * fragment managing behaviors, interactions , presentation of navigation drawer. */ private navigationdrawerfragment mnavigationdrawerfragment; private toolbar mtoolbar; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mtoolbar = (toolbar) findviewbyid(r.id.toolbar_actionbar); setsupportactionbar(mtoolbar); mnaviga

python - How to fit SGDRegressor with two numpy arrays? -

i'm trying learn sgdregressor . generate own data don't know how fit algorithm. error. x = np.random.randint(100, size=1000) y = x * 0.10 clf = linear_model.sgdregressor() clf.fit(x, y, coef_init=0, intercept_init=0) found arrays inconsistent numbers of samples: [ 1 1000] i'm new python , machine learning. miss? >>> np.random.randint(100, size=1000) will give 1 x 1000 array. features , target variables need in column. try >>> x = x.reshape(1000,)

php - Can't get pagination to work in a div -

i have page showing picture of product. underneath have tabs description , contact details , comments . when click on comments tab comments page loaded div="info" using jquery . products.php: <html> <head></head> <body> <img src="image.jpg"> <hr> <a id="det"><h3>details</h3></a> &nbsp<a id="contact"><h3>contact</h3></a> &nbsp<a id="comments"><h3>comments</h3></a> <div id="info"></div> </body> <html> jquery: <script> $(document).ready(function(){ $("#comments").click(function(){ $("#info").load("comments.php"); }); }); </script> the comments.php page below uses pagination comments. when click on pagination links page refreshes comments.php?page=* removing div="info" .how keep comments in div id="info

android - Explode transition affects shared element transition -

Image
i have recyclerview displaying images in grid. when click 1 of these images add new fragment image shared element. use explode transition move other items in recyclerview off screen. when add fragment transitions run fine , image scales full screen. when pop stack animations dont run in reverse though would. shared elements scale , translates wrong position on screen. dont have problems if use transition such fade. here grid fragment add detail fragment. public class gridfragment extends fragment implements itemadapter.bobbleclicklistener { @bind(r.id.image_recycler_view) recyclerview mimagerecycler; public static gridfragment newinstance(int imagearrayresource, int titlesarrayresource) { gridfragment fragment = new gridfragment(); bundle args = new bundle(); args.putint("key_images", imagearrayresource); args.putint("key_titles", titlesarrayresource); fragment.setarguments(args); return fragme

java - Unable to persist lists of a graph after deserializing, using hibernate and webservices -

i have 2 application servers , 2 database servers named xapp xdbase - yapp ydabse. using hibernate @ xapp , yapp. need synchronize data on webservice. simple object graph @entity @table(name="a_table") public class extends persistentobject { @column(name="user") private string user; @elementcollection() @enumerated(enumtype.string) @column(name="b_column") @collectiontable(name="b_table") @lazycollection(lazycollectionoption.false) private list<b> blist= new arralist<b>(); /* here comes getter , setter user , blist */ } public enum b { one,two,three } persistentobject serializable , has boilerplate code. xapp , yapp has these classes. i create new object (lets name ainstance) @ xapp b list including 2 b objects. desrialize , send yapp using webservice @ yapp. @ yapp, deserialize incoming , using repository, repo.saveorupdate(ainstance); , fine . b_table in ydbase has 2 records.

java - Spring keeps returning string instead of jsp/html content -

i trying understand whole spring framework. knowledge, relatively new techniques of using gradle makes lot of tutorials , posts online outdated? the main issue running in when try display jsp or html page, webpage's body shows text: "filename.jsp". the project created new-> other-> spring starter project using gradle , sts 3.7. goal create web application using mvc pattern. folder structure: test --spring elements (created sts) --src/main/java ++--test ++++--testapplication.java (created sts) ++--test.controller ++++--jspcontroller.java --sec/main/resources ++--application.properties (created sts , empty file) --src/main/webapp ( ** created directory, required?) ++--web-inf ++++--home.jsp ++++--home.html ++++--web.xml (** additional question below) testapplication.java package test; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication; @springbootapplication public

What's the exact number of types in Erlang? -

besides data primitives , structures found in other languages, what's full list of types in erlang? for example, what's type of socket handle? , ets handle? moreover, types impossible serialized , exchanged between nodes? think socket handle must 1 of them, right? even among processes within same node, socket handle shared, right? that's exception of share-nothing principle? what's behavior of gc against such shared stuff? , what's socket implementation in erlang? think it's not port, right? there few types in erlang, , can refer functions is_???(term) of erlang module list of built in elementary types: atom bitstring float function integer list map pid port reference tuple there second list derived elementary types: binary : bitstring size multiple of byte size boolean : atoms true , false number : integer or float record : tuple first term atom representing record name (the compiler uses record definition access diff

java - Using dynamic Wicket-Resources the right way -

i'm trying create simple application based on wicket. want place panel on page indicates if user logged in. sadly, unable find working example of problem: want label display username if logged on , message, if no user logged on. guess i'm missing something. here comes code: panel: public class header extends panel { imodel<stringresourcemodel> usernamemodel = new loadabledetachablemodel<stringresourcemodel>() { @override protected stringresourcemodel load() { final user user = mysession.get().getauthenticateduser(); if (user==null){ return new stringresourcemodel("username.nouser", header.this , null); }else{ return new stringresourcemodel("username.user", header.this, model.of(user)); } } }; public header(final string id) { super(id); } @override protected void oninitialize() { super.oninitialize(); add(new label("username", usernamemodel));

Python Tkinter Grid Checkbox -

i wondering if there easy way create grid of checkboxes using tkinter. trying make grid of 10 rows , columns (so 100 checkboxes) 2 checkboxes can selected per row. edit: i'm using python 2.7 spyder what have far: from tkinter import* master = tk() master.title("select groups") rows=10 columns=10 x in range(rows): y in range(columns): label(master, text= "group %s"%(y+1)).grid(row=0,column=y+1) label(master, text= "test %s"%(x+1)).grid(row=x+1,column=0) checkbutton(master).grid(row=x+1, column=y+1) mainloop() i'm trying use state='disabled' grey out row once 2 checkboxes have been selected. here's example using provided 10x10 grid. should give basic idea of how implement this. just make sure keep reference every checkbutton ( boxes in example) every intvar ( boxvars in example). here's why: - checkbuttons needed call config(state = disabled/normal) . - intvars needed

javascript - My IF loop does not stop -

i trying animated text output in html page. in javascript code, if statement not stop logic out of condition. var wss_i = 0; var wss_array = ["programmer", "developer", "brother"]; var wss_elem; function wssnext() { wss_i++; wss_elem.style.opacity = 0; if (wss_i > (wss_array.length - 1)) { wss_1 = 0; } console.log(wss_i); settimeout('wssslide()', 1000); } function wssslide() { wss_elem.innerhtml = wss_array[wss_i]; wss_elem.style.opacity = 1; settimeout('wssnext()', 2000); } correct variable should used. use wss_i = 0; instead of wss_1 = 0;

javascript - How to implement groups in Angular.js -

i have 2 lists, 1 names of "groups" , names of "items". should change contents of list of items when group selected. <div class="headers"> <div id="header-1">header 1</div> <div id="header-2 selected">header 2</div> </div> <div class="contents"> <div id="contents-2-1">Сontents 2.1</div> <div id="contents-2-2">Сontents 2.2</div> </div> currently i've monkey-coded 2 controllers interacting via service, it's not angular-idiomatic way that. it solvable if each #header-n contained #contents-n-* inside of it, scoping rules enough implement required behaviour. problem it's impossible so. another way in angular todomvc example via list filtering. combined quantity of items on groups high enough discard option. how implement such group selection in idiomatic way? upd. data looking this: var groups

c# - Translate DataGridComboBoxColumn on the fly -

i have got datagridcomboboxcolumn need translate wpflocalizationextension . i have got static method in view model, provides available values: public static list<profilesegmenttype> availablesegmenttypes { { var availablesegmenttypes = new list<profilesegmenttype> { new profilesegmenttype { value = profilesegmenttypeenum.arc }, new profilesegmenttype { value = profilesegmenttypeenum.line }, }; return availablesegmenttypes; } } the profilesegmenttype looks this: public class profilesegmenttype { public profilesegmenttypeenum value { get; set; } public string label { { return resources.localization.adummyvalue; } } } my data grid column definition looks this: <datagridcomboboxcolumn header="..." itemssource="{binding source={x:static viewmodels:profilegeometryviewmodel.availablesegmenttypes}}" selectedvaluebinding="{binding segmenttype, m

regex to find parenthesis and the numbers within. Java -

what regex used find parenthesis , numbers within these paernthesis? desired output: input = "hello (1) world" .replaceall( regex , "*"); result = hello * world i tried following: input = "hello (1) world" .replaceall( "([0-9])" , "*"); result = " "hello (*) world" why? ( , ) reserved characters in regexes (they create group). need escape them replace them: "hello (1) world".replaceall("\\([0-9]\\)", "*");

list - AngularJS ng-repeat and scope populated within http call results in empty html elements -

i have defined array within scope: $scope.foo = []; i make $http call, , populate variable success event in controller. in template have unordered list such: <ul> <li ng-repeat="i in foo">{{i}}</li> </ul> the outcome unordered list has many li elements $scope.foo, contents of empty: <li ng-repeat="i in foo" class="ng-scope"></li> <li ng-repeat="i in foo" class="ng-scope"></li> <li ng-repeat="i in foo" class="ng-scope"></li> . . . i can see array has been populated. furthermore li element count matches array length (as expected), the contents of li empty . all documentation can find looks populating unordered list. changed jquery call angular $http.post call since problems scoping arise that. why contents of li elements empty? if made $scope.foo = []; use foo not range. example: <li ng-repeat="i in foo" class=&

jquery - CSS3 transition-timing-function -

i need animate div top on slots in this link . have made demo , animation doesn't work properly. i'm trying jquery.easing.js , same result. can explain me what's wrong , how can fix that. my css: .box { width: 100px; height: 100px; position: relative; top: 40px; background: red; -webkit-transition-duration: .2s; transition-duration: 2s; -webkit-transition-timing-function: cubic-bezier(.75, 1.95, .66,.56); transition-timing-function: cubic-bezier(.75, 1.95, .66, .56); -webkit-transition-property: top; } .box:hover{ top: 500px; } i think problem not timing function doesn't work properly, when div moves, looses focus , hover... is want ? .launcher { width: 200px; height: 100px; background-color: lightgreen; } .box { width: 100px; height: 100px; position: relative; top: 10px; left: 0px; background: red; -webkit-transition-duration: .2s;

openstack - Fiware Keystone API Create User -

we trying create users in fiware idm using keystone identity api. we sending following curl command curl -s \ -h "x-auth-token: e746971040657101bb1e" \ -h "content-type: application/json" \ -d '{"user": {"name": "newuser", "password": "changeme"}}' \ http://localhost:35357/v3/users | python -mjson.tool the token have used 1 configured in keystone.conf admin_token=e746971040657101bb1e but result getting following { "error": { "code": 401, "message": "the request have made requires authentication.", "title": "unauthorized" } } does have idea can happen? a couple of ideas you. one port value 35357 not admin api calls, it's intended user calls. also since using v3 api believe token can't used when creating user unless indicating domain. however can't tell curl command acti

php - Codeigniter REST API elapsed time -

i'm using codeigniter rest-api (author: philsturgeon ref url: https://github.com/philsturgeon/codeigniter-restserver ) i want add response how time took service generate , process response. i trying use $this->benchmark->elapsed_time() in controller, doesn't send time instead sends "success": 1,"took": "{elapsed_time}", i tried edit the main controller of api abstract class rest_controller extends ci_controller , append elapsed time final output send public function response($data = null, $http_code = null, $continue = false) but no luck, keep receiving "{elapsed_time}" appreciated. you can elapsed_time using this $this->benchmark->mark('code_start'); // code happens here $this->benchmark->mark('code_end'); echo $this->benchmark->elapsed_time('code_start', 'code_end');

r - Is it possible to change the default color of the items in scale_size in ggplot2? -

i change default color of scale_size_manual() in ggplot2 independent of type of data in dataframe. is possible? for example of items in size legend of color "red" . try this: > p <- ggplot(mtcars,aes(x = mpg,y = disp,size = cyl)) + geom_point() > p + scale_size_continuous(guide = guide_legend(override.aes = list(colour = "red"))) oddly, override.aes seems not american spelling of color . might have track down , submit small patch...

python 2.7 - graph-tool crahes on import -

using python 2.7 try import graph-tool: from graph_tool.all import * each time execute above command following error returned , python crashes. dyld: lazy symbol binding failed: symbol not found: __zn5boost6python6detail11init_moduleepkcpfvve referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so expected in: flat namespace dyld: symbol not found: __zn5boost6python6detail11init_moduleepkcpfvve referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so expected in: flat namespace trace/bpt trap: 5 i installed graph-tool homebrew on mac osx 10.10. know how fix issue? there mismatch between python version using, , 1 used compile boost::python , graph-tool. for example, might using system's python, whereas graph-tool/python compiled version installed via homebrew.

MySQL Create Trigger if no exists? -

select trigger_schema, trigger_name information_schema.triggers; +------------------------+------------------+ | trigger_schema | trigger_name | +------------------------+------------------+ | tv_client1 | public_id | +------------------------+------------------+ i want added existing trigger public_id tv_client2. how create trigger if not exists? the final result should be: select trigger_schema, trigger_name information_schema.triggers; +------------------------+------------------+ | trigger_schema | trigger_name | +------------------------+------------------+ | tv_client1 | public_id | +------------------------+------------------+ | tv_client2 | public_id | +------------------------+------------------+ the query select trigger_schema, trigger_name information_schema.triggers; shows database name , trigger name. in case public_id trigger has been created in tv_client1 database. i

android - How to display the distance and time travelled between two points using spinners? -

Image
i want create app selecting town-a 1 spinner , town-b other spinner. want display distance between towns time take there selected towns. i have found this: var dist = [ ['town b', [], []], ['town c', [67], ['1h00m']], ['town d', [282,251], ['11h10m','10h00m']], ['town e', [243,210,41], ['9h45m','8h25m','1h40m']], now html dropdown boxes , calculates above file (dist.js) now know how convert using 2 spinners. think have basic idea not sure how implement. thinking when spinner 1 selected , spinner 2 needs spinner 1 = spinner 2 , distance 67km , time 1h00m. i don't have code cause haven't tried yet because not sure start. hoping me? edit this have sofar: public class mainactivity extends activity implements onitemselectedlistener { private spinner startloc; private spinner enddes; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstanc

How to do a for with fades in jquery? -

suppose have div: <div id="blink">blink</div> and want blink 3 times. this ugly code that : var t = animationtime = 600; $("#blink").fadeout(t).fadein(t).fadeout(t).fadein(t).fadeout(t).fadein(t); but if want blink ten times? how can loop fades? thanks in advance. animation on same element gets added queue, add them in loop! @:) for (var = 0; < 10; i++){ $("#blink").fadeout(t).fadein(t); } jsfiddle: http://jsfiddle.net/trueblueaussie/22bpkhtf/2/

javascript - How can I wrap multiple elements in a wrapper with jQuery? -

i have following script that's wrapping 1 element fine: $('.brandmodelwrappergroup').each(function(){ var divs = $(this).find(".brandmodelwrapper") for(var = 0; < divs.length; i+=brandmodellinecount) { divs.slice(i, i+brandmodellinecount).wrapall("<section class='brandmodellinewrapper'></section>") } }) but need wrap not .brandmodelwrapper , .brandmodelview , how that? use comma separated multiple selector: var divs = $(this).find(".brandmodelwrapper").add($(this).find(".brandmodelview"));

php - How to convert multidimensional array into json object -

i have issue in array json conversion, have array , want convert array json objects, desired output given below 1 please me. php array array ( [0] => array ( [application_id] => 132 [application_status] => submitted [reference_number] => [salutation] => [first_name] => [middle_name] => [last_name] => [mother_name] => ) [1] => array ( [application_id] => 148 [application_status] => submitted [reference_number] => [salutation] => [first_name] => [middle_name] => [last_name] => [mother_name] => ) [2] => array ( [application_id] => 154 [application_status] => submitted [reference_number] => [salutation] =>

java - How to tell if a Marker is in a Polygon googleMap v2 -

i've got google map polygons , i've got work except last part detect if marker inside polygon .the current situation when touch polygon add marker "which correct" if touch polygon in different spot remove marker , add new one. want happen if marker within points don't add new one. code below appreciate. public void onmapclick(latlng point) { (int j = 0; j < arrpolygons.size(); j++) { if (ispointinpolygon(point, arrpolygons.get(j).getpoints())) { if (marker != null) { marker.remove(); marker = null; log.v("marker", "removing marker"); }else{ marker = googlemap.addmarker(new markeroptions() .position(point) .title("test") .icon(bitmapdescriptorfactory.defaultmarker(bitmapdescriptorfactory.hue_red))); log.v("marker", "addin

sorting - Translating the following C++ code into Nim -

i'm trying learn nim converting different pieces of code, , i've stumbled upon i've never seen before. #include<bits/stdc++.h> ... for(int t=q&1?u+x:u+x>>1;t>1;)t/=p[++cnt]=sieve[t]; ... sort(p+1,p+cnt+1); i understand ternary operator , how works, don't quite what's going on variables "t" , "cnt" (both integers) , array "p" (an array of integers). how using increment index of "p" work? then there's sort function, in gave because couldn't find documentation on (the fact it's taking integer added array doesn't help). lets first start of making code little more readable. little bit of whitespace never hurt anybody. for(int t = (q & 1? u + x: u + x >> 1); t > 1;) { t /= p[++cnt] = sieve[t]; } what's going on variables "t" , "cnt" (both integers) , array "p" (an array of integers) so t being set either u + x or u +

Assembly Array and loop -

i've problem in assembly language want make loop sum element of array. suppose array contains 10,20,30,40,50,60,70,80,90,100 have sum elements of array loop... how can this? i'm trying this: .model small .stack 100h .data w dw 10,20,30,40,50,60,70,80,90,100 .code main proc mov ax, @data mov ds, ax xor ax, ax xor bx, bx mov cx, 10 addnos: add ax, w [bx] add bx, 2 loop addnos ;this display mov dx, ax mov ah,2 int 21h mov ah, 4ch int 21h main endp end main wrong in display print ascii (&). edit: updated answer since code in question has been changed: int 21h / ah=2 prints single character (note integer 1 , character '1' different values). sum of elements in array 550, requires 3 characters print. way solve write routine converts value 550 string "550", , use int 21h / ah=9 print string. how you'd go doing has been asked several times before on stackoverflow; see e.g. this question , answers it. this answer origin

optimization - AMD OpenCL Reduce Register Pressure -

i running sorting algorithm in kernel, , sorting part uses 36 vgpr, resulting in 12.5% occupancy , awful performance. the code segment follows: typedef struct { float record[8]; float dis; int t_class; }node; ( int = 0 ; < num_record ; ++ ){ in_data [ i]. dis = dist ( in_data [i]. record , new_point , num_feature ); } node tmp ; int i; int j; #pragma unroll 1 ( = 0 ; < num_record - 1 ; ++ ) ( j = 0 ; j < num_record - - 1 ; j ++ ) { if ( in_data [ j]. dis > in_data [ (j + 1) ]. dis ) { tmp = in_data [ j ]; in_data [ j ] = in_data [ (j + 1) ]; in_data [ (j + 1) ] = tmp ; } } is there way reduce register usage without big modifications algorithm itself? guess better reduce register under 16. update: basically kernel trying implement exhaustive knn method. float tmp; tmp = in_data [ j ].x; in_data [ j ].x = in_data [ (j + 1) ].x; in_data [ (j + 1) ].x = tmp ; tmp = in_data [ j ].y; in_data [ j ].y = in_data [ (j + 1) ].y; in_data [ (j + 1) ].y = tmp

javascript - Custom google search shortcuts for link navigation -

i changed duckduckgo google search. , 1 feature miss lot j , k navigation keys. first using chrome extension: https://chrome.google.com/webstore/detail/jk-shortcuts-navigator/chgfodomgimhbcmlfljhkgildehakgif?hl=en but decided few months ago switch keyboard layout bépo ergonomic layout (dvorak adapted french typing). j , k position replaced t , s. , of course, chrome extension above not allow change shortcuts. so had idea creating own extension allow use custom shortcuts up/down navigation in google results. i thinking finding function google calls in javascript when user types "up" or "down" , add custom script calling same function when custom shortcut hit. code minified, hard find out (even knowing "up" , "down" keycodes or using chrome developer tools "event listener breakpoints" in script panel). secondly noticed little arrow next selected search item in google search. span located after div result. moving span manuall

testing - PhantomJS teamcity config -

in teamcity config have build step runs phantomjs tests. "command line" step custom script. script looks like: %phantomjs% createentitypopuptest\unit.htm %phantomjs% excelimportpopuptest\unit.htm ... etc. so runs each qunit test package mentioned in htm page. didn't manage find way point phantomjs (phantomjs-1.9.0-windows) folder, not single file. there no need change config each time when add new files tests. i used chutzpah wrap behavior use in teamcity. chutzpah can run tests written in qunit, jasmine or mocha , uses phantomjs headless test runner. https://github.com/mmanela/chutzpah i installed on build agents , added path on machine. now add command line runner step called 'run js test' in build template. command line simply: chutzpah.console.exe %jstestfolder% then define parameter each project pointing folder... chutzpah rest.

Solving CSS Image Position hitting the Text Content on the Small Screen -

i have problem css. did not clue position of image when browser on small screen, image not responsive. have tried position:relative; , manually set margins didnt solve. here html code: <div id="home-product-slider" class="home-section" style="display:none;"> <div class="col-sm-8 col-sm-offset-2"> <div class="row mini-product-wrapper"> <div class="col-sm-12"> <img src="<?php echo get_template_directory_uri(); ?>/assets/img/home_product_glasku_capuccino.png" alt="" class="img-responsive img-home-product ihp-thumb"> <div class="product-box" style="margin-top:200px"> <div class="product-hero-box text-left"> <h4 style="color:white;"> <br/>glasku cappucino<br/> </h4> <div cla

java - Secret Information in Programs -

so read this question on programmers se , got little confused. in short, solution keep secret information in config files. i'm confused. couldn't user go searching file? what methods used prevent users finding file? i'm using java on windows if changes answer @ all. i think encryption come i'm not sure how helps if user can decompile source. edit : clarify further, intention use api keys (in case 1, singular key) in executable jar file. this depends trying achieve. assume here user has access enviroment in software running. if need store secret information, can use encryption, user has supply key. difficult implement correctly, there plenty of libraries , resources this. if problem described in programmers se- want share code without sharing 'secret' settings- extract settings configuration file , don't share configuration file. can give template, secrets missing.

networking - Cannot SSH to an Azure Virtual Machine from a certain IP -

up until 2 weeks ago i'd been happily connecting virtual machine hosted in azure cloud on ssh. of sudden, connection not established anymore, ssh times out. tricky part happens computer in firm's lan (one public ip). every other internet access connection works fine , i'm able connect virtual machine successfully. support tells me can see packets leaving our network , firewall not blocking connection - can't see failed login attempts in ssh log on server. suggests azure may blocking our ip ssh connection (other ports work fine btw). question - such thing real? can azure block ip without user knowing it? there kind of ip blacklist edit? thanks! the place ip cutted-off acl on ssh endpoint. go management portal , check if have acls on ssh endpoint. maybe misconfigured some?