Posts

Showing posts from February, 2011

node.js - Node JS Socket.io -

i have been struggling around have socket.io npm module setup , browser able interface end nodejs script. not sure going wrong. remeber seeing messages in console that: "socket.io .. started .." but nothing happens now. below nodejs code: var express = require('express'); var server = require('http').createserver(express); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieparser = require('cookie-parser'); var bodyparser = require('body-parser'); global.socket = require('socket.io')(server); //global.socket = require('socket.io').listen(80, {log:true}); //socket.listen(80, {log:true}); in index.js file have function catches socket.io incoming connections. when try below url browser: http://localhost:3000/socket.io/socket.io.js i error message: error: failed lookup view "error" in views directory "c:\amr\public...

php - update sql statement not working -

i new programming. try update sql not working. result show success alert come out info not updated. this html code. using tinymce <?php include("db.php"); dodb(); $id = $_get['id']; $get_contents_sql = "select * service service_id='$id'"; $get_contents_res = mysqli_query($mysqli, $get_contents_sql) or die(mysqli_error($mysqli)); if($get_contents_res = mysqli_query($mysqli, $get_contents_sql)){ //fetch associative array while ($row = mysqli_fetch_assoc($get_contents_res)) { $contents = $row['contents']; $service_name = $row['service_name']; $service_id = $row['service_id']; //draw results $fill_block = html_entity_decode($contents); } } //close connection mysql mysqli_close($mysqli); ?> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http...

networking - Wifi Hotspot not working when using netsh command, but working when using Connectify -

my android phone not have internet access when connected wifi hotspot.but when used connectify create hotspot fine, have internet access in android device. here steps followed( share internet lan via wifi ), have run these below commands. netsh wlan set hostednetwork mode=allow ssid=[[name]] key=[[password]] netsh wlan start hostednetwork. and shared internet connection ethernet wifi adapter(network sharing center -> checked "allow other network users connect through computer's internet connection , select network connection") the net work hosted successfully. it shows "internet access" in network , sharing center i can see network in android device. my android device obtained ip , connected. but problem android phone not have internet access. when used connectify create hotspot fine, have internet access in android device. so, if have idea, why netsh command cannot share internet? , connectify can that? note : pc connected lan static ...

javascript - how to update a list inside ng-repeat using angular? -

i lave ionic list <ion-list> <ion-item ng-repeat="item in items"> hello, {{item.name}}! </ion-item> </ion-list> then, in controller have event: $scope.items = somedata(); itemsref.on('event', function (response) { console.log(response); // object containing "name" property }); i append response ion-item , without inserting html, somehow adding response items edit: i've tried: $scope.items.push(response); weirdly enough uncaught typeerror: undefined not function edit: looks 1 doesn't $scope.items.push(response); , $scope.items[next_key_here] = response; see jsfiddle i've tried: $scope.items.push(response); weirdly enough uncaught typeerror: undefined not function that happens because $scope.items isn't array object when access before hasn't been populated value yet. try doing this, should work: if ($scope.items && $scope.items instanceof array) { $scope....

user interface - Android: View embedded in layout. onDraw() method triggered but the screen not update immediately -

i new on android. working on simple sudoku solver , have problem view. solverview contain on custom view embedded layout contains 2 buttons. when click on cell of sudoku grid, keypad dialog appear allow me choose number cell. however, after click on number on keypad, sudoku grid not display although ondraw() method called. instead, update on next time touch screen. following code public class solverview extends view{ private string tag = "solver view"; private int size; private solver solver; private static int selu, selv; public solverview(context context) { super(context); this.solver = (solver) context; setfocusable(true); setfocusableintouchmode(true); setlayertype(view.layer_type_software, null); } public solverview(context context, attributeset attrs) { super(context, attrs); this.solver = (solver) context; setfocusable(true); setfocusableintouchmode(true); setlayertype(view.layer_type_software, null); } public solvervie...

javascript - Show popups only once when user logged in -

i working mvc4. in layout page , have popup shows when user logged in. @if (user.identity.isauthenticated) { <div class="pop-suggest popup_window"> <div class="invite-add"> <a id="popupboxclosead" class="close-popup">x</a> <h4 class="invite-tit">"earn more points, more products!!!"</h4> <div> invite friends</div> </div> </div> } for close popup use following jquery, $('.close-popup').click(function () { close_popup(); }); function close_popup() { $('.popup_window').fadeout(500); } my problem that, after login, popup arrive in every page refresh. how can change code popup div shows when user login , after close not come. in opionion can create cookie when user log in kind of flag , destroy cookie on lo...

html5 - Flipped Range/Slider input html -

does know how achieve this? eg. starts max low (left right): ---------------------||--------------------- 100__________50__________20 check out jsfiddle link. html part: <input id="slider2" type="range" min="0" max="100" step="50" value="0" > <input id="rangevalue2" type="text" size="2"> javascript part: var max_range = 100; var range_element = document.getelementbyid("rangevalue2"); var range_input_element = document.getelementbyid("slider2"); range_element.value = max_range - range_input_element.value; document.getelementbyid("slider2").onchange=function(){ range_element.value = max_range - range_input_element.value; }; note: max range should same in html , javascript. in html set max="100" , in javascript set var max_range = 100;

c# - XNA - Make sprite unable to go out of borders -

i've been playing little around minx , miny, can't make work. have player( box ), use mouse guide around. can cross borders player can't seen. fix that, can't figure out how. heres code ( give complete, since not sure part of need): using system; using system.collections.generic; using system.linq; using microsoft.xna.framework; using microsoft.xna.framework.audio; using microsoft.xna.framework.content; using microsoft.xna.framework.gamerservices; using microsoft.xna.framework.graphics; using microsoft.xna.framework.input; using microsoft.xna.framework.media; namespace squaregame { /// <summary> /// main type game /// </summary> public class game1 : microsoft.xna.framework.game { graphicsdevicemanager graphics; spritebatch spritebatch; public game1() { graphics = new graphicsdevicemanager(this); content.rootdirectory = "content"; } /// <summary...

javascript - I need to mask the incoming number and show only last 4 digits? -

i want write mrender function j query datable give , hide , show link incoming data. i have 2 columns in 1 description , other card number. now, when card number ajax call, need have show , hide link in second column card number displayed. when data gets populated, should show show link - on click of link should show hide link - i new j query , java script thing. would appreciate help. thanks function displaycardlist() { otable = $('#cardtable').datatable({ "aadata": cardlist, "aocolumndefs": [ { "atargets": [0], "sclass": "card name", "mdata": "description" }, { "atargets": [1], "sclass": "cardnumber", //i need write function here.. } ] }); $('#cardtable').show(); } ...

oracle - Cannot cast object '(10)' with class 'java.lang.String' to class 'java.lang.Integer' -

i using ireport 3.7.1 . have made connection database.i have procedure when given input in number ,it returns word format of number i.e if give input 10,it return ten. problem when executing procedure in pl/sql developer,i getting proper output when firing same procedure in ireport it's giving me exception cannot cast object '(10)' class 'java.lang.string' class 'java.lang.integer' . casting straight string integer not possible. you'll want use function integer.parseint(stringnumber);

PHP while() fails to stop looping -

i getting problem because using while() function i'm solving 5 or 6 hours today. i'm asking here because don't understand how be. here code $sql = mysql_query("select saldo stock id >= '$id' , iditem = '$iditem';") if try : $row = mysql_fetch_array($sql); while($row) { // code here } then, while() fails stop looping. if try this: while($row = mysql_fetch_array($sql)) {//my code here } by code, i'm getting correct result. i feel little strength because think first , second code have same function. comments or answers! mysql_fetch_array() fetches 1 row @ once when use in while fetch next row every time. returns true if there next row fetch , false if there not. for preventing infinite loop, use correct syntax fetching: while($row = mysql_fetch_array($sql)) { //your code } note: original mysql extension deprecated, , generate e_deprecated errors when connecting database. instead, use mysqli or...

javascript - datepicker values on post should not loose its behaviour -

i using 2 datepickers in return should not less departure . on selecting of datepicker, executing onselect event functionality(pls check datepicker script). want make while initial load without on select. because issue return datepicker showing before date since not select departure datepicker.this issue happening when posted page, same datepickers. eg: in first page have selected 22-12-2014 , return 30-12-2014 , if post these values page having same datepickers return can able select before 22-12-2014. $("#departure").datepicker({ dateformat: 'dd-mm-yy', changemonth: true, changeyear: true, mindate: '+1d', numberofmonths: 2, showbuttonpanel: true, onselect: function (selecteddate) { var mindate = $(this).datepicker('getdate'); if (mindate) { mindate.setdate(mindate.getdate()); } $("#return").datepicker("option", {mindate: mindate}, selecte...

scala - How to run defined sbt.Command from build.sbt file? -

i using 1 of sbt plugins has object of sbt.command defined: val xcommand: command = command(xcommandkey)(_ => xparser) { (st, args) => ... } i need run build.sbt file , have no idea how that. know how? sbt-files shorthand defining configuration. mix in general scala code need add ie. build.scala project directory. see http://www.scala-sbt.org/0.13/tutorial/full-def.html#relating+build.sbt+to+build.scala understand how these files cooperate.

php - Regex to replace punctuation -

i've been trying few hours work effect need nothing works quite should. i'm building discussion board type thing , have made way tag other users putting @username in post text. currently have code strip wouldn't part of username once tags have been pulled out of entire text: $name= preg_replace("/[^a-za-z0-9_]/",'',$name); this works because correct captures names example (@username) , @username: , @username, text etc. (so remove , , : , , ) ). however, not work when user has non-ascii characters in username. example if it's @üsername , result of line above gives sername not useful. is there way using preg_replace still strip these additional punctuation, retain non-ascii letters? any appreciated :) to detect punctuation characters, can use unicode property \p{p} instead: $name = preg_replace('/[\p{p} ]+/', '', $name); regex demo

angularjs - Token Based Authentication - Security vulnerability? -

we doing html5 angularjs application. using token based authentication. authentication process logs user in jwt token returned application stored in sessionstorage. we requested security audit on application , tester said big problem token stored in sessionstorage. because can copy token , impersonate user device. where , how should store token make sure secure ? risk leaving in session storage since hacker need access actual device perform attack regards one way increase security on token storage store token in cooke httponly flag set. mean token accessed when app makes http requests.

javascript - DropDown is not populating in KENDO Grid -

i not able populating data in kendo dropdown data coming form database. here code kendo dropdown: function positiondropdowneditor(container, options) { $('<input name="size" required data-bind="value:' + options.field + '"/>') .appendto(container) .kendodropdownlist({ autobind: false, datatextfield: "name", datavaluefield: "id", datasource: { transport: { read: { datatype: "json", url: "/employee/allposition", } } } }); } and controller data coming from: public jsonresult allposition() { employeeservice employeeservice = new employeeservice(); list<position> positions= employeeservice.getallposition(); return json(positions); }...

OAuth for Google App Engine Python -

i've been reading documentation on how implement oauth gae python here: https://cloud.google.com/appengine/docs/python/oauth/#python_oauth_and_app_engine the steps below make sense. have no idea how make work. want able access https://www.googleapis.com/oauth2/v1/userinfo user can store his/her email in app's ndb. step 1: import oauth from google.appengine.api import oauth step 2: current user user = oauth.get_current_user() step 3: request token https://your_app_id.appspot.com/_ah/oauthgetrequesttoken step 4: authorize token https://your_app_id.appspot.com/_ah/oauthauthorizetoken step 5: access token https://your_app_id.appspot.com/_ah/oauthgetaccesstoken step 6: information google ' https://www.googleapis.com/oauth2/v1/userinfo?alt=json&access_token=tokenwouldgohere i can't find examples can use me solve problem. i've found, seems either import error or authentication error. example importerror: no module named oauth2client.client ...

camera costume image overlay in android -

i trying overlay live camera view costume image , i've saw this .but quite frankly new in android developing so. please me. here java code: package com.beginner.cameraimage; import java.io.ioexception; import android.app.activity; import android.graphics.pixelformat; import android.hardware.camera; import android.os.bundle; import android.view.layoutinflater; import android.view.menu; import android.view.menuitem; import android.view.surfaceholder; import android.view.surfaceview; public abstract class mainactivity extends activity implements surfaceholder.callback { camera camera; surfaceview surfaceview; surfaceholder surfaceholder; boolean previewing = false; layoutinflater controlinflater = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); getwindow().setformat(pixelformat.unknown); surfaceview=(surfaceview)findvie...

c++ - What value does a Pointer to a Pointer print if not a single dereference operator is used at all? -

i have tried output of following code. but, don't yet understand might value of q represent. i understand *q points p implying that, printing *q print address of p, **q print value @ address p points to, i.e., x(=5). #include <iostream> using namespace std; int main() { int x=5; int *p,**q; p=&x; q=&p; cout<<q; return 0; } so q alone represent? value printed when q printed? p.s: i'm c++ noob , have searched answer question elsewhere , seem not find it. if find answer somewhere else, please forgive me , notify me , i'll remove question. you say: printing *q print address of p however not true. printing q print address of p . after all, assigned in doing q = &p; . printing *q print value of p , address of x .

php - Cakephp Form is not getting submiited but giving Notice (8): Array to string Coversion, many other Warnings (2) -

Image
i having trouble submitting/saving data cakephp model. constructed form usual do, time getting notices , warning data not getting saved. here form have constructed , method in controller: educationaldetails.ctp <?php if (empty($education)): echo $this->form->create('candidate', array('class' => 'dynamic_field_form')); echo $this->form->input('candidateseducation.0.candidate_id', array( 'type' => 'hidden', 'value' => $userid )); echo $this->form->input('candidateseducation.0.grade_level', array( 'options' => array( 'basic' => 'basic', 'masters' => 'masters', 'doctorate' => 'doctorate', 'certificate' => 'certificate' ) )); echo $this->form->input('candidateseducation.0.course'); ...

Button Text and Booleans (Simple Android App) -

i'm build fun facts app on android development track. decided take exploratory detour , try create basic introductory message user. changed facttextview text "you can click button below see new fact!" , changed showfactbutton text "try out!" from there, changed final line onclick object (is object?) following: public void onclick(view view) { string fact = mfactbook.getfact(); // update label our dynamic fact factlabel.settext(fact); // set button text new fact prompt showfactbutton.settext("show fun fact."); this seems work fine. however, feel "updating" button text same new string on every press isn't best practice, if easy , readable. tried add boolean check text of button, , update if has not been updated. i've come far: view.onclicklistener listener = new view.onclicklistener() { @override public string launchtext = getresources().getstring(r....

python - django conversejs app not working -

i making django-conversejs application django. have followed tutorial of django-conversejs page. when try run it, error occurred. have added conversejs app in settings installed apps. debug trace gives error below code html page. <!doctype html> {% load conversejs %} <html> <head> <title>test app</title> {% conversejs_static %} </head> <body> <h1>hello, conversjs!</h1> {% conversejs_chatpanel %} {% conversejs_initialize %} </body> </html> in settings.py file using bosh xmpp server link conversejs_bosh_service_url = 'https://conversejs.org/http-bind/' when run app shows following error exception type: attributeerror exception value: 'nonetype' object has no attribute 'user' exception location: d:\pythondev\django_dev\sunny_project\env_sunny\lib\site-packages\conversejs\utils.py in get_conversejs_context, line 21

mysql - XQuery: How to check if two attributes have the same value? -

suppose have 2 elements following: (teacher name='john' age='25') , (student name='john' age='30) and want find out students have same name 1 of teachers older teacher. here have far: for $teacher in //$teacher $teacher/@name = //$student/@name return if ( $teacher/@age < //$student/@age) ($teacher/@name) else() it's not producing right results , have no idea why. me out please? so, first problem xquery syntactically incorrect. starting dollar sign $ indicates variable, whereas // path step. combining variable , path step did //$teacher incorrect. hence, compiler should complain that. the next problem logic flawed. want students, iterate on teachers. additionally, approach fail, because students set of students, if search $students/@age set of all ages. hence, if twice (for attribute such @name , not guaranteed name , age belong same person. so, following xquery should work , return expect...

c# - Oracle.ManagedDataAccess.Client.OracleException - ORA-01722: invalid number -

Image
i working in .net 4.5 c#, oracle 11g environment. i experiencing peculiar behaviour, when call following sql statement code using datacontext i ora-01722: invalid number stacktrace: @ corp.dataservices.executequeryhandler.handlequeryexception(exception exception) in c:\dev\cctech main\corp\corp.conveyancing.dataservices\fluentdata.cs:line 4022 @ corp.dataservices.executequeryhandler.executequery(boolean usereader, action action) in c:\dev\cctech main\corp\corp.conveyancing.dataservices\fluentdata.cs:line 3993 @ corp.dataservices.dbcommand.querymany[tentity,tlist](action`2 custommapper) in c:\dev\cctech main\corp\corp.conveyancing.dataservices\fluentdata.cs:line 3857 @ corp.dataservices.dbcommand.querymany[tentity](action`2 custommapper) in c:\dev\cctech main\corp\corp.conveyancing.dataservices\fluentdata.cs:line 3882 @ corp.dashboard.controllers.homecontroller.getinstructionsjson(string id) in c:\dev\cctech main\corp\corp.conveyancing.dashboard\controlle...

Error when to resolve Double Hop issue with powershell -

today need resolve double hop issue powershell. but failed when following try: machines: client1, server1, networkpath one client1 run following: $session = new-pssession -computer server1 -authentication credssp -credential "username" following error thrown: new-pssession : [server1] connecting remote server server1 failed following error message : winrm client cannot process request. authentication mechanism requested client not supported server or unencrypted traffic disabled in service configuration. verify unencrypted traffic setting in service configuration or specify 1 of authentication mechanisms supported server. use kerberos, specify computer name remote destination. verify client computer , destination computer joined domain. use basic, specify computer name remote destination, specify basic authentication , provide user name , password. possible authentication mechanisms reported server: negotiate more information, see a...

python - match plot color with ticks color -

i making plot bars, including twin axis. i want ticks have same color bars, means, including parameter "alpha". however cannot give them paramenter. any solution? here piece of relevant code: # drawing bar plot: rects1 = ax1.bar(x_axis, y_values, bar_width, color='magenta', alpha = 0.4) # playing color bars ax1.set_ylabel('charge value [nc]', color='magenta', alpha = 0.4) # ticks , copy color here not work tl in ax1.get_yticklabels(): tl.set_color(color='magenta', alpha = 0.4) the traceback: tl.set_color(color='magenta', alpha = 0.4) typeerror: set_color() got unexpected keyword argument 'alpha' set_color , name indicates, sets color. set alpha level use set_alpha : for tl in ax1.get_yticklabels(): tl.set_color('magenta') tl.set_alpha(0.4)

c# - Summarizing duplicate rows in datatable -

i have table , want sum duplicate rows: |name | n | |name | n | |------+---| |------+---| |leo | 1 | |leo | 3 | |wayne | 1 | |wayne | 2 | |joe | 1 | |joe | 1 | |wayne | 1 | |leo | 1 | |leo | 1 | i can delete this, how summarize? arraylist uniquerecords = new arraylist(); arraylist duplicaterecords = new arraylist(); foreach (datarow drow in table.rows) { if (uniquerecords.contains(drow["name"])) duplicaterecords.add(drow); else uniquerecords.add(drow["name"]); } foreach (datarow drow in duplicaterecords) { table.rows.remove(drow); } this how dictionary. create dictionary "name" datarow object , sum datarows' "n" property: // create intermediate dictionary group records dictionary<string, datarow> summarizedrecords = new dictionary<string, datarow...

c# - Getting unique emails EWS Manged Web API -

i trying retrieve emails exchange server using below code: exchangeservice service = new exchangeservice(exchangeversion.exchange2007_sp1); service.credentials = new webcredentials("username", "somepassword"); service.traceenabled = true; service.traceflags = traceflags.all; service.autodiscoverurl("username", redirectionurlvalidationcallback); finditemsresults<item> findresults = service.finditems(wellknownfoldername.inbox, new itemview(10)); serviceresponsecollection<getitemresponse> items = service.bindtoitems(findresults.select(item => item.id), new propertyset(basepropertyset.firstclassproperties, emailmessageschema.from, emailmessageschema.torecipients)); return items.select(item => { return new mailitem() { = ((microsoft.exchange.webservices.data.emailaddress)item.item[emailmessageschema.from]).address, ...

internet explorer - How to Interpret HTML + XML without XHTML declaration -

what type of document.i confused has html 4.0 declaration , contains xml. here structure of document: <!doctype html public "-//w3c//dtd html 4.0 frameset//en"> <html> <head> <title>container</title> <link href="css/xyz.css" type="text/css" rel="stylesheet"> </head> <frameset > <frameset rows="97%,28" border="0" frameborder="0"> <frame name="main" src="containerinner.htm"> <frame name="statusbar" src="html/mainstatusbar.htm"> </frameset> <noframes> <p>this page requires frames, browser not support them.</p> </noframes> </frameset> </html> <!-- containerinner.htm --> <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html...

sql server - MS SQL iterate through XML with default namespaces -

based on this reply so example, have xml this <parent_node > <category>low</category> <category>medium</category> <category>high</category> </parent_node> and good. in case have default xml namespace here, xml looks this: <parent_node xmlns="http://schemas.datacontract.org/2004/07/monitorwang.core.interfaces.entities"> <category>low</category> <category>medium</category> <category>high</category> </parent_node> and doesn't work. entire script: declare @xmlvariable xml = '<parent_node xmlns="http://schemas.datacontract.org/2004/07/monitorwang.core.interfaces.entities"> <category>low</category> <category>medium</category> <category>high</category> </parent_node>'...

iso8601 - Convert a datetime.timedelta into ISO 8601 duration in Python? -

given datetime.timedelta, how convert string of iso 8601 duration format? ex, >>> iso8601(datetime.timedelta(0, 18, 179651)) 'pt18.179651s' this function tin can python project (apache license 2.0) can conversion: def iso8601(value): # split seconds larger units seconds = value.total_seconds() minutes, seconds = divmod(seconds, 60) hours, minutes = divmod(minutes, 60) days, hours = divmod(hours, 24) days, hours, minutes = map(int, (days, hours, minutes)) seconds = round(seconds, 6) ## build date date = '' if days: date = '%sd' % days ## build time time = u't' # hours bigger_exists = date or hours if bigger_exists: time += '{:02}h'.format(hours) # minutes bigger_exists = bigger_exists or minutes if bigger_exists: time += '{:02}m'.format(minutes) # seconds if seconds.is_integer(): seconds = '{:02}...

javascript - Load Data into datatable where i dont know the columns -

i creating datatable fetching data database using ajax response. i getting following jason data [ { "id": "11105", "name": "gummy drop (iphone, free, row except cn, 72.3mb, w" }, { "id": "11107", "name": "gummy drop (ipad, free, row except cn, 72.3mb, w/ " }, { "id": "4274", "name": "z-redirect non-targeted traffic dragon city mobile" }, { "id": "6484", "name": "z-redirect non-targeted traffic dragon city mobile" } ] the issue is, may not know data coming ajax response so extracting keys of json array create header, in suceesfull in doing so. let me share code, easy understand , explain $('#load').click(function() { var v = $('#drp_v').val(); var cnt = $('#drp_cnt').val(); ...

java - Android anonymous asyncTask return value in method -

now in app try http parsing url, didn't carry threads, before time... i have such class , method: public class twitteroauthhelper { public string httpquerytoapi(string url) { httpget = new httpget(url); httpparams params = new basichttpparams(); httpprotocolparams.setuseexpectcontinue(params, false); get.setparams(params); string response = null; try { sharedpreferences settings = context.getsharedpreferences("my_app", 0); string userkey = settings.getstring("user_key", ""); string usersecret = settings.getstring("user_secret", ""); consumer.settokenwithsecret(userkey, usersecret); consumer.sign(get); defaulthttpclient client = new defaulthttpclient(); response = client.execute(get, new basicresponsehandler()); } catch (exception e) { displaytoast("failed data."); ...

ubuntu - Need a confirmation if I am on the right track GIT configuration -

i used using clearcase our version management in past. handed task of configuring git @ new job. since confgiration of git different traditional clearcase etc.., wanted blessings experts before go deep configuration. background : have multiple applications maintained in git. web-apps , other custom developed app. have 8 developers ( work on same project but, different files, ). our developers use windows/ubuntu platform. with in mind, have done far: on ec2 server runs ubuntu, have installed git repository. i have created 1 repository far ( need create 6 more ) 1 of project. repository contains multiple subdirectories, project structure requires. for single repo created, have commited initial version using git machine. each developer using repo has been asked install git locally , have been asked sync code git repository local machine. can work on changes on local machines , push git later. each user can access mutiple repos. the actual applications hosted on multiple ser...

python 2.7 - extract patches from detected features in skimage -

i'm getting confused on image processing assignment. need plot matching features of 2 pictures shot different angles. got features using blob detector, know relevant functions in skimage perform negative cross validation , plot matches. miss central part: have extract square of pixels using features , compute distance between patches of 2 images (to compute distances know need loop). i've started this, i'm not sure way proceed. #my data img1 = data.imread('img.png') img2 = data.imread('img.png') #grayscale img1 = rgb2gray(img1) img2 = rgb2gray(img2) #detect features blobs1 = blob_dog(img1, max_sigma=30, threshold=.1) blobs2 = blob_dog(img2, max_sigma=30, threshold=.1) #my keypoints image1 y1 = [p[0] p in blobs1] x1 = [p[1] p in blobs1] #my keypoints image2 y2 = [p[0] p in blobs2] x2 = [p[1] p in blobs2] #extract patches (how?) #then compute distance between them loop # normalized cross correlation use this: match_template(image, template, pad_...

camel split big sql result in smaller chunks -

because of memory limitation need split result sql-component ( list<map<column,value>> ) smaller chunks (some thousand). i know from(sql:...).split(body()).streaming().to(...) and know .split().tokenize("\n", 1000).streaming() but latter not working list<map<>> , returning string. there out of box way create chunks? or need add custom aggregator behind split? or there way? edit additional info requested soilworker: @ moment sql endpoint configured way: sqlendpoint endpoint = context.getendpoint("sql:select * " + lookuptablename + "?datasource=" + look_up_ds, sqlendpoint.class); // returns complete result in 1 list instead of 1 exchange per line. endpoint.getconsumerproperties().put("useiterator", false); // poll interval endpoint.getconsumerproperties().put("delay", lookup_poll_interval); the route using should poll once day (we add cronscheduledr...

internet explorer - Javascript: I hear my alert but it's not showing in IE -

i've got basic html page, has show javascript alert. i hear sound it's supposed make when pops up, it's not popping up! don't see anywhere (in google chrome pop up). can continue working on page without clicking "ok" on (invisible) alert box, means isn't there! any clues on how solve this? rebooted pc , disconnect multiple monitors. <script> alert('show!!'); </script> more info: my ie version ie11 the popup did work before, without making changes ie on other websites, popup isn't showing aswell i did reset ie properties (to factory default), no result unable test on older versions javascript enabled

ios - Minimum OS Version Mismatch -

i trying set ios 8.1 minimum deployment target in xcode 6.1 on submission itunes connect "invalid binary" error. minimum os version mismatch - minimum os version (lc_version_min_iphoneos) in binary ('8.0') architecture ('armv7') differs minimumosversion ('8.1') in info.plist. minimum os version mismatch - minimum os version (lc_version_min_iphoneos) in binary ('8.0') architecture ('arm64') differs minimumosversion ('8.1') in info.plist. any idea how resolve this? you need set deployment target both in info.plist , in build settings ( iphoneos_deployment_target , named ios deployment target) . @ build log , check -miphoneos-version-min flag set correctly.

asp.net mvc - loadrunner internal server error -

i running load test hp loadrunner 11.52 web site has asp.net mvc 5, c#, razor,wcf (windows communication foundation),wif (windows identity foundation),federated authentication,.net framework 4.5,javascript, jquery, json, html 5,bootstrap,telerik kendo ui,telerik reporting,oracle 11g r2 technologies. in simple search senario, when click search button, calls ajax function "ara" following. web_custom_request("ara", "url=http://egitim.gocnet.gov.tr/kisi/ara/**ara**", "method=post", "resource=0", "reccontenttype=application/json", "referer=http://egitim.gocnet.gov.tr/kisi/ara", "snapshot=t8.inf", "mode=html", "enctype=application/json; charset=utf-8", "body={\"success\":true,\"message\":\"\",\"result\":{\"mod\":\"kimlikbilgileri\",\"kim...

Select 9 elements from 3 arrays in PHP -

as part of autocomplete ajax script writing, pull total of 9 results 3 sets of results. each result type has array holds maximum of 9 results type. there total of 3 result type arrays follows: $places; $venues; $types; the autosuggest should include maximum of 9 results of type. so, if take lenght of each array follows: $places = 9; $venues = 9; $types = 9; the result array should include 3 results $places , 3 results $venues , 3 results $types . however, if counts instead this: $places = 1; $venues = 8; $types = 1; the result array should included 1 result $places , 7 results $venues , 1 result $types . i can't life of me figure out efficient logic handle this. tried writing each instance in if() else if() block, doesn't seem efficient. example: $numplaces = count($places); $numvenues = count($venues); $numtypes = count($types); $total = $numplaces + $numvenues + $numtypes; $results = array(); if( $total <= $maxresults ) { foreach( return_x...

osx - TortoiseHg: No visual diff tools were detected (Mac) -

i installed meld in mac , want use visual diff tool in tortoisehg. (note using mac. ) i have following configuration in .hgrc file. when double clicked on file, got "no visual diff tools detected". missing in file ? this getting little bit frustrating because have spent hours on , still wasn't able solution. need here please . [ui] merged = /opt/local/bin/meld [tortoisehg] vdiff = /opt/local/bin/meld i had same problem kdiff3 on osx, i'm sure solution works meld well. worked enable extdiff extension in mercurial, define kdiff3 extdiff command , use in [tortoisehg] section. this .hgrc file these changes made: [extensions] extdiff = [extdiff] cmd.kiddf3 = /usr/local/bin/kdiff3 [tortoisehg] vdiff = kdiff3

How does Facebook save my browser and recognize it the next time I log in? -

how facebook save browser when click on save browser i.e use user-agent combination of mac id? how facebook it? http header has info regarding browser , agent accessing app with. check image -> https://cdn.tutsplus.com/net/uploads/legacy/511_http/firebug.png i assume, take out header information respect unique user id , save browser info signed in user id.

search suggestion - Solr (Open Solr) suggester results contain punctuation marks -

i'm working on suggester , results i'm gettig contain punctuation. example, when type "volcan" get: "volcanoes", "volcanic", "volcano", "volcano,", <- comma "volcanoes." <- period/full stop here code in solrconfig.xml file: <searchcomponent class="solr.spellcheckcomponent" name="suggest"> <lst name="spellchecker"> <str name="name">suggest</str> <str name="classname">org.apache.solr.spelling.suggest.suggester</str> <str name="lookupimpl">org.apache.solr.spelling.suggest.tst.tstlookup</str> <str name="field">text</str> <float name="threshold">0.005</float> <str name="buildoncommit">true</str> </lst> </searchcomponent> <requesthandler class="org.apache.solr.handler.component.searchhandler...