Posts

Showing posts from July, 2013

Zurb Foundation tooltip nub looks strange -

my zurb fondation tooltips whacky. need style nub class make invisible. css below .tooltip>.nub, .nub {display:none !important} doesn't work. ideas? .tooltip { color : #f3d09b; background : #716f6a; padding : 1.25rem 2rem !important ; font-size : 1.2rem; text-align : justify !important ; max-width : 40rem !important ; border-radius : 0.30rem; border : none !important ; hyphens : auto; } .tooltip>.nub, .nub {display:none !important}

javascript - Ember computed property _super -

i'd know if there way _super computed property? for example: controllers/core-controller.js export default controller.extend({ myattribute: computed(function() { return { bar: this.get('bar') }; }); }); controllers/my-controller.js import corecontroller 'controllers/core-controller'; export default corecontroller.extend({ myattribute: computed(function() { let super = this.get('_super') //i'm trying myattribute object corecontroller return merge(super, { foo: 'foo' }); }); }); what best way that? thanks. you can calling this._super(...arguments) : import corecontroller 'controllers/core-controller'; export default corecontroller.extend({ myattribute: computed(function() { let supervalue = this._super(...arguments); return merge(supervalue, { foo: 'foo' }); }); }); also demoed in twiddle: https://ember-twiddle.com/d

javascript - Sending received Rest data in service file to controller angularjs -

i new angular js , have problem sending received data service file controller, binds html. can please me resolve problem. thank you. service file "use strict"; angular.module("fleetlistmodule").service("fleetsservice", function ($http) { this.gettrucks = function () { console.log("before calling webservice"); $http.get('http://localhost:8080/login/rest/truckservices/gettrucks?truckid') .success(function (data){ var trucks = data; console.log("after calling webservice data is", trucks); return trucks; }); }; }); controller "use strict"; angular.module("fleetlistmodule").controller("fleetlistcontroller", ['$scope', 'fleetsservice', function ($scope, fleetsservice) { var truckdata =

java - Struts2:There is no Action mapped for namespace [/] and action name [] associated with context path -

Image
i'm new struts2. i'm sorry i've tried different solutions suggested on stackoverflow,they didn't worked. followed these tutorial's instructions: http://www.tutorialspoint.com/struts_2/ can me? this error: avvertenza: not find action or result: /hellowordstrut2/hello?name=aaa there no action mapped namespace [/] , action name [hello] associated context path [/hellowordstrut2]. - [unknown location] @ com.opensymphony.xwork2.defaultactionproxy.prepare(defaultactionproxy.java:185) @ org.apache.struts2.impl.strutsactionproxy.prepare(strutsactionproxy.java:63) @ org.apache.struts2.impl.strutsactionproxyfactory.createactionproxy(strutsactionproxyfactory.java:37) @ com.opensymphony.xwork2.defaultactionproxyfactory.createactionproxy(defaultactionproxyfactory.java:58) @ org.apache.struts2.dispatcher.dispatcher.serviceaction(dispatcher.java:554) @ org.apache.struts2.dispatcher.ng.executeoperations.executeaction(executeoperations.java:81)

php - Jet API connection problems -

so far, connecting jet.com in postman, when attempt connect via php, not errors or response. page blank. far code have: protected static $api_user_id = "****"; protected static $api_secret = "****"; protected static $merchant_id = "****"; protected static $api_prefix = "https://merchant-api.jet.com/api/"; class jet { public function getnewtoken() { $ch = curl_init($this::$api_prefix.'/token'); curl_setopt($ch, curlopt_returntransfer, 1); //if necessary add ssl pem: curl_setopt($ch, curlopt_cainfo,'/ssl/cacert.pem'); $request = json_encode(array( "user" => $this::$api_user_id, "pass" => $this::$api_secret )); curl_setopt($ch, curlopt_postfields, $request); curl_setopt($ch, curlopt_httpheader, array( 'content-type: appli

ruby on rails - Search model with time range substitution -

one can search model time range this: user.where(updated_at: previous_update..now) however need more complex query: user.where("updated_at = :updated_at , status != :status", updated_at: previous_update..now, status: "employee") and turns out that user.where("updated_at = :updated_at", updated_at: previous_update..now) doesn't work. looks previous_update..now should somehow translated sql format before can substituted this. or maybe there's better way express complex query above? edit i used jon's suggestion chain where filters: now = time.now updates = user.where(updated_at: previous_update..now) employee_updates = updates.where(status: "employee") non_employee_updates = updates.where('status != :status', status: "employee") you can either chain where queries: user.where(status: 'employee').where(updated_at: previous_update..now) or can combine them

HTML / CSS: Experiencing Issues Regarding Site Width / Height -

i in process of setting website advertising region people visit task myself. i have spent time attempting place have done far on 1 page. wish there no scrollbars, not want make scrollbars invisible or forth, mean have web page fit on 1 page of browser without user having need scroll aesthetic purposes. i have played around width , height of divs along number of other things in attempt achieve desired result no success unfortunately. required change regarding code in order achieve this? body, td, th { font-family: consolas, "andale mono", "lucida console", "lucida sans typewriter", monaco, "courier new", monospace; } body { margin: 0px; } #navigation { color: white; background-color: #292526; width: 100%; padding: 0.5% 0.5%; } #navigationleft { width: 24.5%; display: inline-block; vertical-align: middle; font-size: 180%; } #navigationright { width: 74.5%; display: inline-block; vertical-

openerp - No contents on odoo localhost -

when run odoo on local host,that appears ,without rest of page odoo on local host8069 here output of code , there errors, don't know do some times happens, refresh page using ctrl+f5, still not loading then, check log in terminal, may module ever trying load having issue in xml file.

scrum - How to include user-stories from multiple TFS projects in a single sprint -

at organization we’re using tfs 2015 source control , alm. have tfs projects each distinct business capability e.g. there tfs project ‘risk management’ , 1 ‘account management’. team project structure setup many years ago. we have set of requirements require enhancements spanning multiple business capabilities (and therefore multiple tfs team projects). how include pbis (user-stories) multiple tfs projects in single sprint? appears limitation of tools. if cannot done, there alternative approaches have worked anyone? thanks as you've discovered it's not possible have work items shared between team projects. these days many people advocate strategy of setting , single team project , using combination of areas, iterations , teams manage work. however migrating such strategy can time consuming. interim step, create new team project, branch appropriate code in project. use new team project manage work , can decide if temporary fix, or start of migration new str

ruby on rails - Coveralls not sending Pull Request status -

Image
i develop in rails, keep code in github, use circleci testing, , i've been trying introduce coveralls in picture. i've set these settings in coveralls: i added coveralls gem: and set spec_helper.rb instructed in coveralls' documentation: what working: circleci sends coverage information coveralls, , can see coverage reports. what not working: coveralls doesn't send pull request status can't see in github whether pr meets coverage expectations shown here in 1 of ads: if went through coveralls-circleci setup, appreciate pointers on this.

angularjs - How do you protect /handle authenticated routes with ui-router? -

just started using angular , i'm trying learn fast can. i'm relatively new spa's please bear me , feel free tell me if want not feasible. i'm stuck on now, how protect routes when using ui-router? what want do? there routes don't want non-logged in users access. example, /home , /login okay anonymous users. /dashboard should logged in. i want if user tries access /dashboard in future without being logged in, not able to. what have tried? i have tried using angular-permission module found here: https://github.com/narzerus/angular-permission problem is..i'm not quite sure how use (nor if i'm using properly). what happening? in login controller, once user submits username , password makes /post web-sever. once gets result, (regardless of moment) i've got redirecting /dashboard. right nothing should getting /dashboard because no permissions have been set, yet (incorrectly) allowed see dashboard. can both (1) redirected dashboard wit

php - Laravel 5.1 MethodNotAllowedHttpException on store method using Resource Controller -

i trying add record database utilizing resource controller, however, getting methodnotallowedhttpexception error. have gone through several similar questions this or that ,however, none seem answer me. code: routes.php route::resource('animals', 'animalsctrl'); part of model. protected $table='animals'; protected $primarykey='name'; protected $fillable = [ 'name', 'type' ]; the store method in controller. public function store(request $request) { $creature = $request->all(); animal::create($creature); } this form. <form method="post"> <div class="small-6 small-centered large-4 large-centered columns"> {!! csrf_field() !!} <table> <tr> <th scope="row">name</th> <td>

What Java Equivalent method to Apache's Hex.encodeHexString() Method -

this question has answer here: how convert byte array hex string in java? 17 answers i use java8 , wonder if java8 has equivalent method org.apache.commons.codec.hex.encodehexstring thanks! integer.tohexstring(int) available. biginteger.tostring(int radix) . both can encode hex.

How to increment number in a cell after printing on excel -

i wondering if 1 can me. need increment 1 number in cell , clean few textbox after printing. there beforeprint event doesnt want becuase before sheet printed data cleaned, (i apologize english) there way need or better practice it. thank you. private sub workbook_beforeprint(cancel boolean) [i6] = [i6] + 1 [c11] = "" [c12] = "" range("b16:b27").clearcontents range("c16:c27").clearcontents range("d16:d27") = "" range("h16:h27").clearcontents end sub to act after printing, need print document via vba's activesheet.printout inside of beforeprint event , set cancel true, doesn't run own print too. private sub workbook_beforeprint(cancel boolean) cancel = true application.enableevents = false activesheet.printout application.enableevents = true [i6] = [i6] + 1 [c11] = "" [c12] = "" range("b16:b27").clearcontents range("c16:c27").clearcont

php - Laravel: Error InvalidArgumentException -

i' upload project localhost dedicated server , after many problems, pages works domain.com | domain.com/home | domain.com/allsites etc.. but now, routes "domain.com/site/create" "domain.com/site/id/manage", "domain.com/site/id/edit" not found, error, why? invalidargumentexception in fileviewfinder.php line 137: view [site.create] not found. in fileviewfinder.php line 137 at fileviewfinder->findinpaths('site.create', array('/....../resources/views')) in fileviewfinder.php line 79 at fileviewfinder->find('site.create') in factory.php line 151 i try artisan comands: cache:clear, route:clear, config:clear, config:cache , nothings works, don't know problem! on localhost works perfectly if local os different production server os might running case-sensitive issue , file not being found. make sure files names same, case , all. can happen if 1 environment mac , other linux. if issue n

vb.net - Adding a new row into TableLayoutPanel with a click of a button -

i have tablelayoutpanel 6 columns , 2 rows. first row contains headings columns, second row contains 2 comboboxes , 4 textboxes. when program running wish able click on either button or plus symbol create new row 2 comboboxes , 4 textboxes. seen in pic pic

html - How to center one of two flex items in a flex container? -

i want box 2 in center of #box-cntnr i'm using align-self property. i'd open other approaches on accomplishing this. jsfiddle . html <div id="box-cntnr"> <div class="box" id="b1">box 1</div> <div class="box" id="b2">box 2</div> </div> css .box { width: 100px; height: 100px; background-color: lightblue; margin: 10px; } #box-cntnr { display: flex; } #b1 { align-self: center; } assuming want box #2 centered both vertically , horizontally in flex container, first thing need give container height. in code, flex item center horizontally because container has no height specified, resolves content height , vertical space limited. html (no changes) css html, body { height: 100%; } body { margin: 0; } #box-cntnr { display: flex; position: relative; height: 100%; background-color: yellow; } .box { width: 100px; height: 100px; background-c

How to change the workspace location from a jenkins plugin? -

in jenkins, how design plugin take user's input on create workspace on filesystem? i came across workspacelocator not sure how use it. example great. [edit] i want able plugin's code. in, particular type of project, workspace should created in hard coded location declared in code. you can change workspace @ advance project options -> use custom workspace under job configuration.

css - fixed top header to show on top of div -

Image
this code uses , bootstrap 3. how can span class="badge" vertically line left cell content i.e. baseline menuitem? (i tried text alignment no avail ) thank you body { padding-top: 70px; } //---main.html------------------------------- <head> <title>tasks</title> </head> <body> <header> <nav class="navbar navbar-default navbar-fixed-top"> <header class="container"> <div class="row"> <h1> <button class="col-xs-2" type="button">&#9776;</button> <label class="col-xs-8 text-center">select item</label> <button class="col-xs-2" type="button">&#8942;</button> </h1> </div> </header> </nav> </header> <div> {{> mainme

How to transform a XML using XSLT only modifying a node that's required? -

i'm trying transform xml replace node name another, xslt framed messing transformed xml. might small issue might have overlooked, stuck long time. input xml have: <?xml version="1.0" encoding="utf-8"?> <datacollection> <queryconst language="dbsql"> <queryused> select emp.firstname, emp.lastname (select firstname, lastname employees employeeid &lt; 10) emp </queryused> </queryconst> <record> <old> <employees> <firstname>james</firstname> <lastname>gosling</lastname> </employees> </old> </record> <record> <old> <employees> <firstname>rod</firstname> <lastname>johnson</lastname> </employees> </old&g

android - Genymotion virtualization engine not found/plugin loading aborted on Mac -

i downloaded genymotion cannot work. keep on getting "virtualization engine not found, plugin loading aborted". have uninstalled , reinstalled it, force quit , restarted it, , looked @ other solutions no avail. seems hit snag here . i running on mac, osx yosemite version 10.10.5. you have install virtualbox genymotion work. here link download https://www.virtualbox.org/wiki/downloads

xml - PHP SimpleXML - Multiple children with same name -

i generating xml file following php code. takes form inputs , puts them xml file. i wanting have multiple children same name. eg: <person> <address> <street>streetname</street> <streetnumber>streetnumber</streetnumber> </address> <address> <street>streetname</street> <streetnumber>streetnumber</streetnumber> </address> </person> my code generate xml follows structure; //add first address - working $xml->person = ""; $xml->person->address = ""; $xml->person->address->addchild('streetname', $_post['streetname1']); $xml->person->address->addchild('streetnumber', $_post['streetnumber1']); //attempt add second address, doesn't work $xml->person->address = ""; $xml->person->address->addchild('streetname', $_post['streetname2']); $xml->

bash - Conda env activation: Weird "must be sourced" error -

i trying run following: source activate env-name but receiving error tells me call activate must sourced. in conda activate script, there's if block near beginning tests "$(basename "$0")" , whether it's equal activate , in case raise exception i'm referring to. little bit of fiddling script (i.e., echo $0; return 1 ) , found out indeed think 0th argument passing in activate rather source . perplexing because know command includes source in , that should 0th argument. i'm not sure else there do. have clues? in case it's important, using zsh default shell , seems activate script bash script, don't think should matter (it doesn't elsewhere me, in specific environment on work laptop). able around whole thing commenting out whole check (and couple of other minor changes), i'd rather not have in particular case. i've been having same issue, workaround i've found is: source <path anaconda>/anaconda3/b

c# - WCF Completed Event is getting called multiple times -

i making asynchronous call wcf service methods , generated completed event on button click: private void onsearchproductclick(object sender, routedeventargs e) { service.getproductscompleted += new eventhandler<getproductscompletedeventargs>(webservice_getproductscompleted); producttype producttype = (producttype)cboproducttype.selecteditem; _producttypeid = producttype.producttypeid; service.getproductsasync(txtname.text, txtcode.text, _producttypeid); } problem is, webservice_getproductscompleted event gets called multiple times. when click button first time gets called once, when click second time gets called twice when click third time gets called thrice , on. unusual behavior. why happening , how can resolve it? here webservice_getproductscompleted event: public void webservice_getproductscompleted(object sender, catalogueservicereference.getproductscompletedeventargs e) { if (e.result.count != 0) { pagedcollectionview paging

angularjs - angular-drag-and-drop-lists simple demo doesn't work -

i having problem getting simple demo work found here. i'm getting 2 lists show up, unable drag , drop items. demo simple, html file, javascript file , css file. here's index.html file: <!doctype html> <html ng-app="demo"> <head lang="en"> <meta charset="utf-8"> <title>drag & drop demo</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script> <script src="bower_components/angular-drag-and-drop-lists/angular-drag-and-drop-lists.min.js"></script> <script src="scripts/my-app.js"></script> <link href="content/my-styling.css" rel="stylesheet" /> </head> <body class="simpledemo" ng-controller="simpledemocontroller"> <ul dnd-list="list"> <li ng-repeat="item in models.lists.a"

Grails won't retrieve single item from list using get(params.id) -

i have table input information displayed, when click name of want go new page displays item clicked , not everything. here controller... class recipecontroller { def index() { def recipe = recipes.list() //recipes grails domain [recipe: recipe] } def newrecipeform() { } def createrecipe() { def r = new recipes(name: params.name, course: params.course, diet: params.diet) r.save() redirect(action:"index") } def deleterecipe() { def r = recipes.get(params.id) r.delete() redirect(action:"index") } def showrecipe() { def rec = recipes.get(params.id) [recipe: rec] } } my index.gsp recipe name clickable should redirect id new page displays recipe info. <g:each var="recipes" in="${recipe}"> <tbody> <tr> <td><g:link action="showrecipe" id="${recipes.id}">${recipes.name}</g:link></td> </tr>

python urllib2, No proper response -

i want data website, example : image url, page title etc. but response not good. code : import urllib2 bs4 import beautifulsoup url_list = [ "https://www.nfm.com/detailspage.aspx?productid=43382514" ] # image urlhttps://www.nfm.com/getphoto.ashx?productid=43382514&size=l def get_data(url): user_agent = '"mozilla/5.0 (x11; u; linux i686) gecko/20071127 firefox/2.0.0.11"' headers = {'user-agent': user_agent} page = urllib2.request(url, none, headers) page2 = urllib2.urlopen(page) soup = beautifulsoup(page2, 'html.parser') print soup.prettify('latin-1') # img_url = https://www.nfm.com/getphoto.ashx?productid=43382514&size=l in url_list: get_data(i) result is: <html> <body> <script type="text/javascript"> document.cookie="ns_cls="+"w:"+screen.width+",h:"+screen.height+",ua:"+escape(navigator.useragent) w

c# - asp.net mvc / Sql double register -

i made new mvc project , made insert function db. problem when enter model db records twice. tried debugging, unfortunately couldn't find mistake. there miss in code below? public class dbcode { protected sqlconnection conn; public bool open(string connection = "mydb") { conn = new sqlconnection(@webconfigurationmanager.connectionstrings[connection].tostring()); try { var b = true; if (conn.state.tostring() != "open") { conn.open(); } return b; } catch (sqlexception ex) { return false; } } public bool close() { try { conn.close(); return true; } catch (exception ex) { return false; }

OpenCV Python Error in simple digit recognition -

import cv2 import numpy np ####### training part ############### samples = np.loadtxt('generalsamples.data',np.float32) responses = np.loadtxt('generalresponses.data',np.float32) responses = responses.reshape((responses.size,1)) model = cv2.knearest() model.train(samples,responses) ############################# testing part ######################### im = cv2.imread('/home/manoj/pictures/untitled-1.jpg') out = np.zeros(im.shape,np.uint8) gray = cv2.cvtcolor(im,cv2.color_bgr2gray) thresh = cv2.adaptivethreshold(gray,255,1,1,11,2) contours,hierarchy = cv2.findcontours(thresh,cv2.retr_list,cv2.chain_approx_simple) cnt in contours: if cv2.contourarea(cnt)>50: [x,y,w,h] = cv2.boundingrect(cnt) if h>28: cv2.rectangle(im,(x,y),(x+w,y+h),(0,255,0),2) roi = thresh[y:y+h,x:x+w] roismall = cv2.resize(roi,(10,10)) roismall = roismall.reshape((1,100)) roismall = np.float32(roismal

laravel - php artisan migrate:refresh | ERROR [Laravel5] -

i use laravel 5. when try refresh migration, input: php artisan make:migrate output : [symfony\component\debug\exception\fatalerrorexception] class '****' not found even remove classes also. just run composer dump-autoload

c# - Supported API test error in WACK tools for windows 10 wup app -

i developed wup app after testing wack tools given result supported api test failed. following message •error found: supported apis test detected following errors:◦api getconsoleoutputcp in api-ms-win-core-console-l1-1-0.dll not supported application type. notnul.dll calls api. ◦api getstdhandle in api-ms-win-core-processenvironment-l1-1-0.dll not supported application type. notnul.dll calls api. i als got following warning in output c:\program files\msbuild\microsoft.netnative\arm\ilc\ilcinternals.targets(886,5): warning : unresolved p/invoke method 'setconsoletextattribute!api-ms-win-core-console-l2-1-0.dll' in assembly 'system.console, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' because not available in uwp applications. please either use api , or use [dllimport(exactspelling=true) indicate understand implications of using non-uwp application apis. 1>c:\program files\msbuild\microsoft.netnative\arm\ilc\ilcinternals.

Make files in web server match a certain git commit -

i trying set web server download particular version of website. need on server able issue command make folder match commit. i've tried searching this, seems there lots of info on git, , many different answers. i'm not sure answer is, or correct answer is. this find work, it's seems bit convoluted. git fetch origin git checkout {hash} git pull is there better way? , work in situations (state of repo, etc)? to clarify don't need make commits on web server, needs receive. you can use git reset --hard put working directory exact state of commit. following on server when deploying version (usually automated): git fetch origin git reset --hard origin/master this overwrite tracked files version fetched origin/master . note not remove untracked or ignored files. if need that, need run git clean afterwards: git clean -xdf

selenium - Jbehave : Story File Execution with Meta Filter on Eclipse (Local) -

i have smoke suite having xx test cases. have applied meta filter on smoke level test cases. when tried *.story argument eclipse, hangup execution while excluding test cases per meta filter. environment: variable:- story_meta_filter value:- +smoke story file structure: scenario : test_xyz meta : @smoke given test1 when test2 test3 can know correct way implement in eclipse? argument eclipse? set environment variable meta_filter , having value +smoke and run story file *.story

license key - ERROR: InstallAnywhere 2014 (SP1 Premier) Incomplete installation -

installanywhere provides executable(build.exe) runs installer build process command-line. i able use file without problems until tried update jre provided installanywhere application. that's did: i used build.exe build installer i noticed had annoying java related warnings during process(console output) after little research came across solution offered update included jre (ver. 1.7) in installanywhere root folder. i replaced jre more recent version (1.8) since following error when build.exe used. installanywhere gui works fine. the error: this incomplete installation of installanywhere 2014 sp1 evaluation. because of error can't use build.exe anymore though i'm using licensed version of installanywhere 2014 premier. this error message won't go away no matter do, tried to: restore original jre reinstall installanywhere supplying license again (license server) what's causing error? how can fix it? installanywhere saves hidden f

php - Error:must implement interface Zend\Stdlib\Hydrator\HydratorInterface -

i following https://zf2-docs.readthedocs.org/en/latest/in-depth-guide/zend-db-sql-zend-stdlib-hydrator.html here code zenddbsqlmapper.php namespace blog\mapper; use blog\model\postinterface; use zend\db\adapter\adapterinterface; use zend\db\adapter\driver\resultinterface; use zend\db\resultset\resultset; use zend\db\resultset\hydratingresultset; use zend\db\sql\sql; use zend\stdlib\hydrator\hydratorinterface; class zenddbsqlmapper implements postmapperinterface{ protected $dbadapter; protected $hydrator; protected $postprototype; public function __construct(adapterinterface $dbadapter,hydratorinterface $hydrator,postinterface $postprototype) { $this->dbadapter = $dbadapter; $this->hydrator = $hydrator; $this->postprototype = $postprototype; } public function find($id){ } public function findall() { $sql = new sql($this->dbadapter); $select = $sql->select('posts'); $stmt = $sql->preparestatementforsqlob

html5 - Want to create a div with just one corner raised a little bit up with css / html -

Image
this question has answer here: shape slanted side (responsive) 2 answers skewed borders on div 1 answer i want create div right corner raised little bit up. have tried using borders in vein. please take @ picture , suggestions appreciated :) i have used css3 skew didn't work me wanted maybe want this? i used 3 divs . parent div , , 2 divs inside parent div : html: <div class="container"> <div class="top"></div> <div class="main"></div> </div> css: body { margin:50px; min-width:400px; background:white; } .container{ width: 300px; } .top{ with: 100%; height: 0; border-bottom: 50px solid red; border-left: 300px solid transparent; } .main { backg

leaflet - Unable to display correct coordinates of a selected marker -

i built map leaflet (inside qlikview extension) many markers. want users go map , when double click on marker, displays coordinates. following code, when click on marker, have coordinates of last marker fetched, not selected one. want put coordinates in latsel e lonsel variables. for (var i=0,k=_this.data.rows.length;i<k;i++){ var row = _this.data.rows [i]; var latitude = parsefloat(row[0].text.replace(",",".")); var longitude = parsefloat(row[1].text.replace(",",".")); //check see coordinates valid if (latitude != nan && latitude !='' && latitude <= 90 && latitude >= -90 && longitude != nan && longitude !='' && longitude <= 180 && latitude >= -180) { var latlng = new l.latlng(latitude, longitude); var poptext = 'lat & long:'+latlng+'<br/>'+ row[2].text +'<br/>

hyperlink - How to increase a php var without refreshing the page? -

can me solve prob : i've page width div id (section of page #1 #2 ...) , link (next), how can increase link each time user click on without refreshing page ? sample if link 1 .. link become 2 etc .. any ideas ? ajax if need pull data server again on click. standard javascript if want number increment locally in browser without fancy.

osx - Calling ps -f from Python on different machines, getting different results -

i have tests require server. end, each time execute set of tests, start instance of tornado or simplehttpserver. however, because several jobs may run @ same time, or server previous run might have hung, need check there no other processes same name 1 "i in". so, is: execute os's ps -f python list of processes running on machine, , call python's os.getpid() id of process. find name of process in output ps -f . there 5 machines in testbed, 2 of them linux machines, , 3 of them macs. thing works great on of machines except 1 mac. 1 of macs doesn't include process ps -f called output ps . the first thing checked whether os same on macs, , is. me understand problem is?

c++ - How to extract bitmap out of Direct3D 11 Texture2D object? -

i using desktop duplication api (c++) , have created output duplication object , further queried interface id3d11texture2d object. i have tried using "d3dx11savetexturetofile" , "directx::savewictexturetofile" gives error. need extract bitmap or pixel buffer out of texture can save image. have tried using subresource , id3d11devicecontext::map function extract pixel buffer seems empty. context->draw() seems work. is there anyway can extract pixel buffer/bitmap/image out of texture2d object? thanks! update : solved using capturetexture function in directxtex. can create hbitmap resultant scratchimage

codeigniter - Curl not posting file in PHP -

i using brightcove api upload video files server brightcove account. had working following code: $fields = array( 'json' => json_encode( array( 'method' => "create_video", 'params' => array( 'video' => array( 'name' => $video->submission_by_name.' '.time(), 'shortdescription' => $video->submission_question_1 ), "token" => $this->config->item('brightcove_write_token'), "encode_to" => "mp4", "create_multiple_renditions" => "true" )) ), 'file' => new curlfile(fcpath.'assets/uploads/submitted/'.$video->filename) ); //open connection $ch = curl_init(); curl_setopt($ch,curlopt_url, $this->config->item('brightcove_write_endpoint')); curl_setopt($ch,curlopt_post, c

c# - Why does the explicit conversion of List<double> to IEnumerable<object> throw an exception? -

according msdn reference ienumerable covariant , possible implicitly cast list of objects enumerable: ienumerable<string> strings = new list<string>(); ienumerable<object> objects = strings; in own code have written line of code works perfect when item type of list class point (point simple class 3 properties double x,y,z): var objects = (ienumerable<object>)datamodel.value; // here property value list of type. but above code returns following exception when item type of list double : unable cast object of type system.collections.generic.list1[system.double] type system.collections.generic.ienumerable1[system.object]. what difference between string , double , causes code work string not double ? update according this post cast list ienumerable (without type argument) need iterate on items , add new items list ( not need cast items of list, @ all). decided use one: var objects = (ienumerable)datamodel.value; but if need cast item

node.js - apache redirecting www to subdomain -

i got server contains many application , 1 presentation page (served apache). www subdomain presentation page , subdomain apps. at moment, got 1 app written in nodejs (port 4000 example). i want redirect traffic xxx.mydomain.com localhost:4000, working configuration: <virtualhost *:443> servername xxx.mydomain.com:443 sslproxyengine on sslcertificatefile /root/cert.crt sslcertificatekeyfile /root/privatekey.key sslcertificatechainfile /root/cert.ca-bundle <location /> proxypreservehost on proxypass http://127.0.0.1:4000/ proxypassreverse http://127.0.0.1:4000/ </location> </virtualhost> my problem apache redirecting www.mydomain.com xxx.mydomain.com automatically , got certificate error because xxx.domain.com certified subdomain , not www.mydomain.com. i put config in same file xxx.domain.com vhost: <virtualhost *:433> servername www.mydomain.com:443 documentroot /var/www/html sslengine on sslcertificatefile

android - Add build machine signature to gradle generated variable -

i'd stamp variable generated gradle (in case it's user agent used later http requests) later able distinguish developer build app (for example if developer made mistake , app ddosing server). so can distinguish release debug with: buildtypes { debug { buildconfigfield "string", "user_agent", "\"android-debug\"" } release { buildconfigfield "string", "user_agent", "\"android-release\"" } } but debug i'd add know built app instance, may git login, machine name, or else. a gradle build file groovy code, , you're free put whatever want in it. have make sure code runs before used in dsl describes build. if want grab system, write groovy code that. groovy lot java, , have full jdk work @ runtime, should easy started. if want access things build machine , environment, might have shell out different commands in order gather data. populate v

javascript - Find head of link chain -

using lodash, have created array of pairs, each representing source , destination of link. given path of links, have: [ [a, b], [a, c], [d, c] ] it given first element first link in chain. wanted map pairs key/value map object , go through keys and/or values find head. simplified algorithm: keys.contains(a) || values.contains(a) if either returns true (excluding pair itself, naturally), not head. so, starting first pair, keys.contains(a) || values.contains(a) returns true not head, , keys.contains(b) || values.contains(b) returns false - must head. the problem: can't map pairs object, since there might key/value duplicates override each other. i.e., examples above, resulting object be: { a: c, d: c } i know can loop through them, reluctant many loops unless have to... any ideas of more efficient solution? i assume source key , destination value. roots of directed graph keys not occur value. (the leafs: vice versa). a root, d . b , c not.

.htaccess - PHP: Custom Designed URL -

im trying send users custom url's based on profile information. instead of sending user www.website.com/profile/john.doe want send them www.website.com/john.doe - when try remove "profile" portion of url. error saying the john.doe_controller.php file not found. unless im understanding wrong, dont want create new controller file every user. there .htaccess rule use this. thanx in advance. you can use following code in root/.htaccess : rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.+)$ /profile/$1 [nc,l,qsa]

objective c - AvAssetReader and Writer to overlay video -

i trying overlay recorded video avassetreader , avassetwriter images. following tutorial , able copy video (and audio) new file. objective overlay of initial video frames images code: while ([assetwritervideoinput isreadyformoremediadata] && !completedorfailed) { // next video sample buffer, , append output file. cmsamplebufferref samplebuffer = [assetreadervideooutput copynextsamplebuffer]; cvpixelbufferref pixelbuffer = cmsamplebuffergetimagebuffer(samplebuffer); cvpixelbufferlockbaseaddress(pixelbuffer, 0); eaglcontext *eaglcontext = [[eaglcontext alloc] initwithapi:keaglrenderingapiopengles2]; cicontext *cicontext = [cicontext contextwitheaglcontext:eaglcontext options:@{kcicontextworkingcolorspace : [nsnull null]}]; uifont *font = [uifont fontwithname:@"helvetica" size:40]; nsdictionary *attributes = @{nsfontattributen