Posts

Showing posts from July, 2010

PL/SQL Implementation of Hungarian/Kuhn-Munkres Algorithm -

where pl/sql implementation of hungarian/kuhn-munkres algorithm? there don't appear online can find. i couldn't find one...so made one. want share else needs it. has been tested , validated, , additional comments welcome. https://github.com/esa606/hungarian_algorithm/ this based on comprehensive algorithm outlined @ http://csclab.murraystate.edu/bob.pilgrim/445/munkres.html .

mysql - Persisting a dockerized WordPress (with LAMP stack) -

i'm working on moving wordpress blogs traditional setup docker, i'm having trouble in understanding best way persist data. in short, idea have each blog running inside own container (based on tutum/wordpress ). during tests noticed if save data on blog, when commit container, image not contain such data. far understood docker supposed save status of container when committing new image. happens when run commands or install packages on container, somehow doesn't happen when i, example, create new post in wordpress. i have read bit docker volumes, don't think having separate data volume convenient, i'd prefer having data in single container, can move around more easily. is there missing? preventing docker saving new posts in wordpress? thank time! the dockerfile tutum/wordpress based off tutum:lamp , declares volumes @ /etc/mysql , /var/lib/mysql . so, if use image, have volumes whether or not. because data in volumes lives outside of union file ...

c# - Start-Process with java.exe fails after java update -

we have virtual server running windows server 2012 r2. on friday version of java updated 1.8.0_27 1.8.0_40. far know, change made. since time, can run java directly command line or in batch files, working powershell scripts use start-process start java, e.g. $process = start-process -filepath c:\programdata\oracle\java\javapath\java.exe -argumentlist $report_args -passthru -wait give error "start-process : command cannot run because system cannot find information required." java executable started , finishes task correctly, in meantime powershell script has gone down path reporting error. system.diagnostics.process.start (in c#) reporting failure when starting java. any ideas on things message "start-process : command cannot run because system cannot find information required."?

javascript - Why is AngularJS router not triggering? -

i'm trying trigger controller url http://crm.dev/accounts , i'm using anonymous function in example controller, alert inside doesn't triggered. can't figure out why, guess stupid i'm missing? i don't want use template or view, need controller fired. please note i've set $locationprovider.html5mode(true); . 'use strict'; angular.module('crm', [ 'ngsanitize', 'ngroute', 'angularmoment', 'ui.bootstrap', 'ui.select', 'ui.bootstrap.datetimepicker' ]); angular.module('crm').config(function(uiselectconfig) { uiselectconfig.theme = 'bootstrap'; }); angular.module('crm').constant('angularmomentconfig', { preprocess: 'utc', timezone: 'europe/berlin' }); angular.module('crm').config(['$routeprovider', '$locationprovider', function ($routeprovider, $locationprovider) { $rout...

java - Cursor SQLite with AndroidPlot -

i want connect sqlite cursor androidplot error. code, error? private xyplot mysimplexyplot; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_grafica); // initialize xyplot reference: mysimplexyplot = (xyplot) findviewbyid(r.id.mysimplexyplot); //increment domain , range mysimplexyplot.setdomainstep(xystepmode.increment_by_val,0.05); mysimplexyplot.setrangestep(xystepmode.increment_by_val,0.05); //open database plotxy databasehelper admin_plotxy = new databasehelper(this); sqlitedatabase bd_plotxy = admin_plotxy.getwritabledatabase(); //cursor sqlite plotxy cursor data_plotxy = bd_plotxy.rawquery( "select xi,yi plot_xy", null); if (data_plotxy.movetofirst()) { xyseries serie_xy = new simplexyseries(data_plotxy, simplexyseries.arrayformat.xy_vals_interleaved, "series x=y"); lineandpointformatte...

c# - Enable Migrations EF 6 Package Not Installed -

i'm creating new mvc 5 solution using ef 6 code first membership. broke out solution 3 projects, 1 consisting of main project views, 1 core, or business layer, , third domain. datacontext , initializer classes in project called 'core'. when try use package manager console enable-migrations , select 'core' project default, get: not sure understand issue, have referenced entity framework libraries within project. any idea doing wrong? tia the answer nuget install of ef package vs. referencing dlls.

android - State of the art push messaging, reliably receiving background messages -

i using signalr push messages browser. i'm developing web page @ moment potentially wrapped in cordova, although prefer use standard apis if possible. the issue see nature of mobile processes (which go sleep), browser tabs (which closed or hidden), , need ensure connection , listener live @ time message sent device. as understand can solved using serviceworker (see https://w3c.github.io/push-api/#extensions-to-the-serviceworkerregistration-interface ) however, it's not clear signalr client side library designed work inside service worker... seems use jquery. has trodden path? i'm unfamiliar signalr, article on push messaging in chrome shows how implement.

gsp - How to link from a page to another in Grails -

i know in html, if have button want link page use tags below: <a href="#"> button </a> however tried grail did not work, taking me blank page: in views/admin/admin.gsp have button trying link views/admin/gm.gsp <li><a href="users\mzein\file_down\grails-app\views\admin\gm.gsp">gm</a></li> i tried <g:link> tag: <g:link resource="gm"> but did not work , took me error no path page. problem specifying wrong path ? or not how works in grails ? i know how use controllers go 1 page ? i use url mapping such task class urlmappings { static mappings = { "/$controller/$action?/$id?(.$format)?"{ } "/"(view:"/index") "500"(view:'/error') "/views/admin/gm"(resources:'gm') } } <g:link resource="gm">gm</g:link> you can use createlink tag uri ...

Android wear app displaying rect layout on round watch -

i've got android wear app when run on round watch (moto 360) instead of round layout being displayed rectangular 1 is. when new wear project created, android studio creates necessary layout files enable automatically load rectangular layout our circular layout appropriate , haven't altered except content of rectangular or round layout files themselves. in particular i have not altered activity_main.xml nor names of rect or round activities nor how loading takes place within activity . here activity_main.xml: <?xml version="1.0" encoding="utf-8"?> <android.support.wearable.view.watchviewstub xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/watch_view_stub" android:layout_width="match_parent" android:layout_height="match_parent" a...

zend framework2 - zf2 How to achieve auto-complete when use fieldset -

i have web form generate using zf2 fieldset, 1 of input field "company name" in case, want achieve auto-complete source select option comes database. thank advice in advance, frank here 1 way it. make fieldset launch jquery function when type in this function fetch data api controller in json the controller asks data , returned them json one fetch have display data you can using jquery typeahead here example here way implement it hope you

android - onProgressUpdate in Async is not being called -

im having problems progressdialog and(for now) stops when async threads onprogressupdate() never gets called. onpreexecute() , doinbackground() runs fine, cannot life of me onprogressupdate() function start :( code taken her: http://developer.android.com/reference/android/os/asynctask.html and here version of code: private class createpasswordlist2 extends asynctask<string, integer, long> { @override protected void onpreexecute() { super.onpreexecute(); log.v(logtag,"in async: onpreexecute..."); //progressdialog progressdialog = progressdialog.show(mainactivity.this, "wait", "downloading..."); //pdialog = new progressdialog(context); pdialog = new progressdialog(mainactivity.this); pdialog.setmessage("decrypting, please wait..."); pdialog.setindeterminate(false); pdialog.setmax(100); pdialog.setprogressstyle(progressdialog.styl...

winforms - c# while loop usage -

i have general c# while loop question. this code should continue execute after rdp session has disconnected. when connected property changed 0 means rdp session connection has terminated. when property 1 still connected , connection has not yet terminated. does see inherently bad code? there better way go it? private void reconnect() { rdp1.disconnect(); // force rdp session disconnect while (rdp1.connected == 1) // true long rdp still connected { // nothing } rdp1.connect(); // execute code after while loop broken } /**************************************************************/ here's final code used per james' answer. counter suffices timeout purpose. int = 0; rdp1.disconnect(); while (rdp1.connected == 1) { if (i == 1000 * 10) break; else thread.sleep(100); i++; } rdp1.connect(); you should somethin...

html5 - Check with jQuery if a value in an input element was entered -

first of all, checked every topic similar problem, unfortunately, haven't found answer yet. tried combine of anwers, had no succes. (note: started learn jquery) so here problem: i created form 4 text inputs , button. each input has svg icon inside , placeholder text. html: <div class="first-field"> <input class="text" type="text" placeholder="uw naam.." value=""> <svg class="unfilled" id="svg_user"> </svg> </div> (i removed svg data since it's irrelevant.) the svg icon same color placeholder. entered text color bit lighter. want change color of svg icon same color entered text, when entered. first tried fire alert when entered, check if knows when entered. used example jquery website : $( ".text" ).change(function() { alert( "handler .change() called." ); }); this did not work and, accordingly documentation, should. i found solution on ...

performance - In java whats the most efficient way to remove duplicate characters from string? -

i have helper function finds indexes of duplicate characters in string. whats best way remove these duplicates? thanks! this best way know it. takes string, separates characters, put hashset (nonrepeating, ordered) , prints (or return string. this best way out of ones listed string example = "thiscode"; char[] chars = example.tochararray(); set<character> str = new linkedhashset<character>(); (char c : chars) { str.add(c); } stringbuilder sb = new stringbuilder(); (character character : str) { sb.append(character); } system.out.println(sb.tostring()); alternatively: public static string convert(string example){ char[] chars = example.tochararray(); set<character> str = new linkedhashset<character>(); (char c : chars) { str.add(c); } stringbuilder sb = new stringbuilder(); (character character : str) { sb.append(character); } return sb.tostring(); } another way it: st...

selenium - Functional testing with grunt-webdriver, mocha and chai-as-promised -

i'm trying build functional testing system verify our web site behaving correctly our users. have cobbled bunch of node.js modules , helpers in attempt framework provides simple, concise tests without heap of nested function callbacks , believe promises can provide that, package.json file looks this: "dependencies": { "chai-as-promised": "^4.3.0", "grunt": "^0.4.5", "grunt-webdriver": "^0.4.8" } my gruntfile.js looks this: module.exports = function(grunt) { grunt.initconfig({ webdriver: { // use webdriver.io options: { desiredcapabilities: { browsername: 'phantomjs' // no xvfb required } }, chrome: { tests: ['chrome/*.js'], options: { desiredcapabilities: { browsername: 'chrome' } } }, }, }); grunt.loadnpmtasks('grunt-webdriver'); grunt.registe...

linux - Programming pipes in c. Trying to execute piped commands cd and pwd, but it does not work out for me -

so programming pipes in c (to support multiple pipes). testing hardcoded commands. tried execute cd command change current working directory , pwd command display new directory. not work me: cd not change working directory , pwd display old directory of debug folder in project root. thankful if clarify cause of problem me. thank you! here code int main(int argc, const char * argv[]) { char *cd[] = {"cd", "/users/user01/desktop", null}; char *pwd[] = {"pwd", null}; char **cmd [] = {cd, pwd, null}; loop_pipe(cmd); return 0; } void loop_pipe(char ***cmd){ int p[2]; pid_t pid; int fd_in = 0; while (*cmd != null) { pipe(p); if ((pid = fork()) == -1){ exit(exit_failure); }else if (pid == 0){ dup2(fd_in, 0); //change input according old 1 if (*(cmd + 1) != null) dup2(p[1], 1); close(p[0]); execvp((*cmd)[0...

c++builder - What is corresponding to GStack.HostToNetwork() in Indy10 -

my environment: c++ builder xe4 indy 10.6.0.4975 i searching information on conversion host byte order network byte order. i found info indy 9 using gstack.hosttonetwork(). however, not find 1 indy10. what corresponding 1 indy10? you have information backwards. there no tidstack::hosttonetwork() (or tidstack::networktohost() ) methods in indy 9. tidstack::wshton...() (and tidstack::wsntoh...() ) instead. tidstack::hosttonetwork() is indy 10. there hosttolittleendian() (and littleendiantohost() ) functions in idglobal.hpp .

eclipse - Debugging Spark Applications -

i trying debug spark application on cluster using master , several worker nodes. have been successful @ setting master node , worker nodes using spark standalone cluster manager. downloaded spark folder binaries , use following commands setup worker , master nodes. these commands executed spark directory. command launching master ./sbin/start-master.sh command launching worker node ./bin/spark-class org.apache.spark.deploy.worker.worker master-url command submitting application ./sbin/spark-submit --class application --master url ~/app.jar now, understand flow of control through spark source code on worker nodes when submit application(i want use 1 of given examples use reduce()). assuming should setup spark on eclipse. eclipse setup link on apache spark website seems broken. appreciate guidance on setting spark , eclipse enable stepping through spark source code on worker nodes. thanks! it's important distinguish between debugging driver program , deb...

What is the issue with this reverse array code in c++? -

the program compile fine, crashes when running , shows : process terminated status -1073741819 void reverse(char *str){ char * end1 = str; char tmp = 'c'; if(str){ while(*end1){ ++end1; } --end1; while(str<end1){ tmp=*str; *str=*end1; *end1=tmp; str++; end1--; } } } any idea ? there absolutely nothing wrong reverse implementation: code work long string pass null-terminated , writable. then there must wrong way invoke it. common possibility passing string literal, writing undefined behavior may cause crash: char *s = "quick brown fox"; reverse(s); // <<== undefined behavior demo of working code .

jquery - How do I calculate number of given weekday between range using Moment JS? -

how find out how many of given weekday (ex: tuesdays) in date range using moment js , jquery? i can find number of days using difference: http://momentjs.com/docs/#/displaying/difference/ and know start , end date, feel should possible? example: how many tuesdays there between march 1st , march 25th? i came following function seems work given handful of test cases tried: function weekdaysbetween(d1, d2, isoweekday) { // ensure have valid moment instances d1 = moment(d1); d2 = moment(d2); // figure out how many days advance next // specified weekday (might 0 if d1 // specified weekday). var daystoadd = ((7 + isoweekday) - d1.isoweekday()) % 7; var nexttuesday = d1.clone().add(daystoadd, 'days'); // if passed end date, there must not // of day in given period. if (nexttuesday.isafter(d2)) { return 0; } // otherwise, return whole number of weeks // difference plus 1 day advanced var weeksbetw...

angularjs - Angular JS conditional logic to check "class name" exists -

below angular js code works fine on mouseover & mouseout. need regard adding conditional logic on js code. if class name "active" exists, img src path have in "overimg" if user mouseover & mouseout. but, present behaviour removes overimg once user mouseout element. active state have different rest of navigation element. angularjs: .directive('elehoveraction', function() { return { link: function (scope, elem, attrs) { var imgobj = $(elem).find('img'); var upimg = attrs.eleupimgsrc; var overimg = attrs.eleoverimgsrc; elem.bind('mouseover', function () { $(imgobj).attr("src", overimg); scope.$apply(); }); elem.bind('mouseout', function() { $(imgobj).attr("src", upimg); scope.$apply(); }); } }; }); html: <li class="menu-item menu-item--category active" e...

javascript - Knockout: How to do a two-way binding for two number inputs -

i picked ko , want similar following. there 2 inputs , change 1 another. html: <input data-bind="value: var1" type="text"> <input data-bind-"value: var2" type="text"> script: function dataviewmodel() { var self = this; self.price = 5; self.var1 = ko.observable(0); self.var2 = ko.computed({ read: function () { if(self.var1() <= 0) { return 0; } return (self.var1 - 1) / self.price; }, write: function (value) { self.var1((number(value) + 1) * self.price); // value = 7.8, output 44 var1, // var2 changes 8.6. desired 40 var1 , 7.8 var2. }, owner: self }); } ko.applybindings(new dataviewmodel()); when 40 inputed var1, var2 shows 7.8. when 7.8 inputed var2, var1 updates 44 instead of 40 , var2 changes 8.6....

javascript - dojo, on click is called only once -

my code below, have written same in dojo.ready. dojo.query(".itemsperpagelink").on("click", function(evt){ alert("clicked"); createurls(); }); every click on link refreshes total dom. i'm getting alert once. not second click. doing wrong point out. regards aadam if you're refreshing dom or you're dynamically creating items, should using event delegation, example: dojo.query(document).on(".itemsperpagelink:click", function(evt) { alert("clicked"); createurls(); }); because document still exist, can bind event handler document, , let delegate event elements matching .itemsperpagelink .

javascript - Display a div as popup using Jquery on button click -

i learning jquery , came across problem had display div popup on button click in same window.any suggestion on how achieve ? you use jquery ui dialog, or, if want more ...fancy, use fancybox : $(document).ready(function() { $("a#inline").fancybox({ 'hideoncontentclick': true }); }); .btn{ border: 1px solid #006; color:#01acee; font: bold 16px tahoma; border-radius:7px; padding:4px; } <link rel="stylesheet" href="http://dodsoftware.com/sotests/fancy/jquery.fancybox-1.3.4.css" type="text/css" media="screen" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <script type="text/javascript" src="http://dodsoftware.com/sotests/fancy/jquery.fancybox-1.3.4.js"></script> <script type="text/javascript" src="http://dodsoftw...

javascript - Dynamically increase ng-grid row height depending on content without additional plugins and jquery -

this question asked here angular ng-grid row height but not satisfy requirement if use css fix problem affect page responsiveness , ng-grid's header functionalities sort,etc . .ngcell { display : table-cell; height: auto !important; overflow:visible; position: static; } .ngrow { display : table-row; height: auto !important; position: static; } .ngcelltext{ height: auto !important; white-space: normal; overflow:visible; } there solution without affecting page responsiveness , have solve pure java script / angularjs/css i've implemented easy solution dynamically change table's height strictly based on visible rows. using ui-grid-unstable v3.0 my html looks like: <div id="grid1" ui-grid="gridoptions" ui-grid-grouping ui-grid-exporter class="grid"></div> in controller add: $scope.$watch('gridapi.core.getvisiblerows().length', function() { if ($scope.gridapi) { $sco...

linux - How does android manage its application users? -

if recall correctly, whenever new app installed on android device, unix user , group correspond app created. whenever app writes own /data/data/(app identifier) folder, file written owned specific app user. however, when try app users in /system/etc/passwd (if remember correctly), don't exist there. wondering how android manage app users?

Facebook follow button inside Android webview -

i developing android app displays facebook's follow button in webview. url below: https://www.facebook.com/plugins/follow.php?href=https://www.facebook.com/example&amp;layout=standard&amp;show_faces=true&amp;colorscheme=light&amp;fontwidth=450 i using facebook sdk login unfortunately unable pass login information above url. result, "follow" button leads facebook login screen after click. there method available facebook user id & password or token can passed url of "follow" button? please help

sql - Showing data as a column name -

i have 3 tables. called them table a,table b,table c. , have desired view want get. table aid regnum bid value 2ce7d0a7 2000000 d5981dfc offcro 9d3c13aa 2000000 c58566c5 ych - 9ddb90c4 2000000 812e9e75 y table b connected table table b's foreign key in table a table b bid label columnname order d5981dfc offered/change role statuschangecode 0 c58566c5 offered/role change comments statuschangecomments 1 812e9e75 assessed statuschangeassessed 2 table c has foreign key in table well. reg num. reg num primary key in table c table c name surname regnum etibar hasanov 2000000 as see there column's names datas in table b desiredview name surname regnum statuschangecode statuschangecomments statuschangeassessed etibar hasanov 2000000 offcr...

html - CSS: center elements inside <div> side by side -

Image
i've been trying night center elements without having them stacked on each other: i've tried floating them left works, but, stick left side no matter did. html: <div class="center pages clearfix"> <buuton class="center page-number">1</buuton> <buuton class="center page-number">2</buuton> <buuton class="center page-number">3</buuton> </div> css: .center { margin-left: auto; margin-right: auto; } .page-number { display: block; float: none; width: 28px; height: auto; border-radius: 3px; background-color: rgba(0, 0, 0, 0.47); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.34); text-shadow: 0 2px 5px rgba(0, 0, 0, .5); font-weight: 400; line-height: 1.5; text-align: center; color: rgba(255, 255, 255, 0.47); } just update " display:block " " display:inline-block " below updated css updated...

javascript - ASP Web API call to /Token intermittent -

since have deployed app test environment, calls /token (to log in , token) playing up. problem won't work @ few calls (takes 30 seconds , returns 500 error), of sudden start working (and working flawlessly, reply in <50ms). on localhost on dev machine, has never skipped beat. my dev setup on localhost; test setup has 3 servers - 1 html/js , iis rewrite points second server hosts apis , third db server. same response via following javascript: var logindata = { grant_type: 'password', username: self.loginemail(), password: self.loginpassword() }; $.ajax({ type: 'post', url: url + '/token', data: logindata }).done(function (data) { self.loggedinusername(data.username); // cache access token in session storage. sessionstorage.setitem(tokenkey, data.access_token); or if use postman same response. web.config: <system.webserver> <httperrors e...

cryptography - PKCS11 command flow -

i'm trying access pkcs11 cryptographic token (smart card). using smart card had own proprietary api card access, i'm trying understand how can map out pkcs11 token. in previous smart card, had connect device, issue api calls various functions such verify pin, card info, select file, read file, write file, perform cryptographic functions (rng, symmetric/assymmetric encryption, etc), , finally, disconnect device. is there similar flow pkcs11 tokens? looked various functions such c_initialize, c_opensession, etc, i'm not sure do, nor parameters use. simple examples in c showing how application accesses token to, say, verify pin, helpful. thanks! i have written pkcs#11 wrapper .net called pkcs11interop comes unit tests covering functions provided pkcs#11 api. can take @ lowlevelapi tests can mapped ansi c. you should consider reading @ least "chapter 2 - scope", "chapter 6 - general overview" , "chapter 10 - objects" of pkcs#...

android - My main activity is starts when i am go through login.but after login if i want to open it directly then it stops -

logcat the exception following one: 03-17 11:06:09.497: e/androidruntime(10784): fatal exception: main 03-17 11:06:09.497: e/androidruntime(10784): process: info.androidhive.slidingmenu, pid: 10784 03-17 11:06:09.497: e/androidruntime(10784): java.lang.runtimeexception: unable start activity componentinfo{info.androidhive.slidingmenu/com.clockerp.login.loginactivity}: java.lang.classcastexception: java.lang.string cannot cast java.lang.integer 03-17 11:06:09.497: e/androidruntime(10784): @ android.app.activitythread.performlaunchactivity(activitythread.java:2318) 03-17 11:06:09.497: e/androidruntime(10784): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2396) 03-17 11:06:09.497: e/androidruntime(10784): @ android.app.activitythread.access$800(activitythread.java:139) 03-17 11:06:09.497: e/androidruntime(10784): @ android.app.activitythread$h.handlemessage(activitythread.java:1293) 03-17 11:06:09.497: e/androidruntime(10784): @ android.os.ha...

How to specify time in kaltura api -

i trying call livereport service of kaltura m not sure how specify time in request filters. asks time in int format when canver time in milli seconds long value, api expecting int value. can provide in this? if referring livereports.getreport service fromtime & totime properties expect integer timestamp in seconds. can provide timestamp lower 315360000 seconds , treated relative now , -1440 converted now - 1440 seems other report services expecting integer created using conversion of date format yyyymmdd integer, may 18th, 2015 send 20150318.

php - 2 Pdo Selects are they working? -

so asked on here few months ago own traffic exchange website users earn coins viewing other users websites , gain coins. on surf page grab random user there coins higher 1 grab 1 of there websites use. im wondering if both pdo selects linked ?? grabbing username first select second one? $stmt9 = $db->prepare('select * users coins >= ? order rand() limit 1'); $stmt9->execute( array('1') ) ; $row = $stmt9->fetch(); $stmt212 = $db->prepare('select * websites w w.owner in (select u.username users u u.coins >= ?) order rand() limit 1'); $stmt212->execute( array($row['username']) ) ; $row212 = $stmt212->fetch(); variables messy know.

javascript - How to hide source code from public view -

how hide source code public view in php, asp.net , javascript. i have seen many cms , other website source hidden public view, wordpress config.php, whmcs configuration.php, , more files hidden, inside have code when check in browser view source display none. how in php , asp.net or javascript. i found article here source code padding really, oldest trick in book. involves adding ton of white space before start of code view source menu appears blank. however, must people notice scroll bars , scroll around find code. pointless , silly method is, there still use it. no right click scripts these scripts stop users right-clicking, "view source" function located. cons: notoriously hard working across browsers , work properly. right-click menu, or context menu, includes many helpful tools users, including navigation buttons , "bookmark page" button. users don't take kindly having browser functionality disabled , inclined not revisit such pa...

java - HtmlUnit click the submitinput but the page doesn't update -

first post. i'm trying solve htmlunit problem i'm having using dvwa. when try click submit button in doformpost section of code showing me old page text field still full rather new page. have tried literally work, putting wait in until page changes having wait 3 minutes , recheck haven't found issue can possibly be. i'm hoping here may know what's going on. thank in advance. import java.io.ioexception; import java.net.malformedurlexception; import java.util.list; import com.gargoylesoftware.htmlunit.failinghttpstatuscodeexception; import com.gargoylesoftware.htmlunit.webclient; import com.gargoylesoftware.htmlunit.html.htmlanchor; import com.gargoylesoftware.htmlunit.html.htmlform; import com.gargoylesoftware.htmlunit.html.htmlinput; import com.gargoylesoftware.htmlunit.html.htmloption; import com.gargoylesoftware.htmlunit.html.htmlpage; import com.gargoylesoftware.htmlunit.html.htmlselect; import com.gargoylesoftware.htmlunit.html.htmlsubmitinput; public cl...

hadoop Datanode shutting down -

i have configured hadoop cluster namenode 192.168.56.101 secondarynode 192.168.56.102 datanode1 192.168.56.103 after running start-dfs.sh , start-mapred.sh all demons except datanode1 , don't know why ! here log datanode1 2015-03-17 09:35:58,224 info org.apache.hadoop.hdfs.server.datanode.datanode: startup_msg: /************************************************************ startup_msg: starting datanode startup_msg: host = datanode1/192.168.56.103 startup_msg: args = [] startup_msg: version = 1.2.0 startup_msg: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2 -r 1479473; compiled 'hortonfo' on mon may 6 06:59:37 utc 2013 startup_msg: java = 1.7.0_75 ************************************************************/ 2015-03-17 09:35:58,572 info org.apache.hadoop.metrics2.impl.metricsconfig: loaded properties hadoop-metrics2.properties 2015-03-17 09:35:58,596 info org.apache.hadoop.metrics2.impl.metricssourceadapter: mbean source me...

.net - C# Git Command issue -

i developing app need run git command c#. used process run commands if passing user name , password says username or password incorrect actual working conventional. below code:- public static void pullcode(string gitcommand) { string strpassword = "password"; processstartinfo gitinfo = new processstartinfo(); process gitprocess = new process(); gitinfo.createnowindow = true; gitinfo.username = "username"; gitinfo.password = misc.convertpassword(strpassword); gitinfo.useshellexecute = false; gitinfo.filename = @"c:\program files (x86)\git\bin\git.exe"; //git repostory directory path gitinfo.arguments = gitcommand; //git command such "fetch orign" gitinfo.workingdirectory = @"e:\code demo\testrepo"; //your_git_repository_path want copy data gitinfo.redirectstandarderror = true; gitinfo.redirectstandardoutput = true; using( var proc = new system.diagnostics.process() ) { ...

java - Jetty blocked by company proxy -

i'm developing applicatoin runs in jetty 9.2.0. works fine far. now have implement feature requires loading webpage. using code load it: @path( "/bla") @get @produces( mediatype.application_json ) public childlist getbla() { childlist childlist = new childlist(); string url = "http://www.google.de"; httpget httpget = new httpget( url ) ; closeablehttpclient httpclient = httpclients.createdefault(); closeablehttpresponse response = null; try{ response = httpclient.execute( httpget ); } catch ( exception e ) { e.printstacktrace(); } return childlist; } i getting "unknownhostexception". have tried start jetty -dhttp.proxyhost , -dhttp.proxyport , -dhttp.proxyuser , -dhttp.proxypassword . have tried set these properties in method above using system.setproperty() . then tried set proxy settings in java control panel. but still "unknownhostexception". is there way fix issue? ...

ios - How to get radius from visible area of MKmapview? -

i able visible rectangle of map view , centre point of map view , span deltas mkmaap view methods: visible : mapview.visiblemaprect used . centre point: map view.centercoordinate used , span: mapview.region.span used. now have information, how can calculate radius of visible using calculation? can explain me in detail? i have seen this question answer giving me span not radius of visible area. to radius follow this: - (cllocationdistance)getradius { cllocationcoordinate2d centercoor = [self getcentercoordinate]; // init center location center coordinate cllocation *centerlocation = [[cllocation alloc] initwithlatitude:centercoor.latitude longitude:centercoor.longitude]; cllocationcoordinate2d topcentercoor = [self gettopcentercoordinate]; cllocation *topcenterlocation = [[cllocation alloc] initwithlatitude:topcentercoor.latitude longitude:topcentercoor.longitude]; cllocationdistance radius = [centerlocation distancefromlocation:topcente...

How do I compare strings in Java? -

i've been using == operator in program compare strings far. however, ran bug, changed 1 of them .equals() instead, , fixed bug. is == bad? when should , should not used? what's difference? == tests reference equality (whether same object). .equals() tests value equality (whether logically "equal"). objects.equals() checks nulls before calling .equals() don't have (available of jdk7, available in guava ). consequently, if want test whether 2 strings have same value want use objects.equals() . // these 2 have same value new string("test").equals("test") // --> true // ... not same object new string("test") == "test" // --> false // ... neither these new string("test") == new string("test") // --> false // ... these because literals interned // compiler , refer same object "test" == "test" // --> true // ... should call objects.equals() o...