Posts

Showing posts from June, 2015

c# - Disable certification validation on client side of wcf -

i have 2 apps running inside iis - client , service. service running fine, client isn't. they talk each other thru wcf message security relaying on certificates (it isn't transport security, it's message security). both using self-signed certificates. but client ends error: system.identitymodel.tokens.securitytokenvalidationexception: x.509 certificate ... not in trusted people store. x.509 certificate ... chain building failed. certificate used has trust chain cannot verified. replace certificate or change certificatevalidationmode. certificate chain processed, terminated in root certificate not trusted trust provider i know how disable certificate validation on service side , did it, how can disable ca validation on client side? if making request server client application, call below lines avoid certification check before making service request. using code bypass ssl validation error due self signed certificate. system.net.servicepointmanager.

html - What exactly changes in the css rendering, when desktop browsers zoom in or out on a website? -

in way design scaled or down? i'm trying figure out happens @ css level, , consequences different sizing methods ( px , em , rem , etc). by way, concerned zooming behaviour modern desktop browsers. (i suspect mobile browser straight enlargement of whole page after rendering normally, , know old fashioned browsers increment base font-size). isn't clear however, modern browsers (say latest versions of chrome or ff) when user presses ctrl + or ctrl - . do render page (i.e. @ 100%) , enlarge rendered image? because ff still seems respect % widths example, doesn't seem straight enlargement. zooming implemented in modern browsers consists of nothing more “stretching up” pixels. is, width of element not changed 128 256 pixels; instead actual pixels doubled in size. formally, element still has width of 128 css pixels, though happens take space of 256 device pixels. in other words, zooming 200% makes 1 css pixel grow 4 times size of 1 device pixels. (two times

linux - What does `!:-` do? -

i new bash scripting , in ubuntu\debian package system. today studying content of preinst file script executes before package unpacked debian archive (.deb) file. my fist doubt line containing this: !:- probably stupid question but, using google, can't find answer. insert last command without last argument (bash) /usr/sbin/ab2 -f tls1 -s -n 1000 -c 100 -t 2 http://www.google.com/ then !:- http://www.stackoverflow.com/ is same as /usr/sbin/ab2 -f tls1 -s -n 1000 -c 100 -t 2 http://www.stackoverflow.com/

java - Couldn't parse the HTML tags from live site in android -

we working on power shut down app in android domain particular region.so need live update details url.so need html tags live site.we got nothing. for example in app title live url , put in text view code comes here.we using jsoup values. package com.example.poweralert.app; import java.io.file; import java.io.ioexception; import java.io.inputstream; import java.lang.annotation.documented; import java.util.arraylist; import java.util.arrays; import java.util.hashmap; import java.util.list; import android.app.progressdialog; import android.provider.documentscontract; import android.support.v7.app.actionbaractivity; import android.os.bundle; import android.util.log; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.listadapter; import android.widget.radiobutton; import android.widget.radiogroup; import android.widget.simpleadapter; import android.widget.tex

content management system - What does Typo3 CMS offer (or can do) that WordPress 4 doesn't? -

this not opinion based question rather technical limits comparison one. from various comparison charts 2 cms couldn't find technical difference between 2 platforms. being long time wordpress developer find supplied arguments typo3 technical pros exist somehow in wordpress; achieve in 1 can achieved in other (plugins & extensions). let's take example latest versions of both 2 cms's, typo3 can wordpress can't plugins/extensions? update please instead of down voting question, provide @ least 1 reason vote. as write, technical pros exist somehow in wordpress. i think major advantage of typo3 extension framework extbase , template rendering engine fluid . developing (and maintaining) larger extensions becomes lot easier since introduction overall cleaner, object oriented code base. 3rd party extension written in technology easier adapt/customize extensions in wordpress mix procedural object oriented style. webpages multiple languages easie

oracle - Why my LibraryCache gets locked with parallel queries? -

i using oracle 12c, needed understand, 1) facing issue of several sessions in locked state (librarycache). showing me parallel queries running, have not set parallel clause in ddl of table object. migration indexes created parallel clause create not understand why taking dml also. 2) if assume if case while running dml sqleditor executionplan shows me noting parallel. finally got answer through, http://blog.tanelpoder.com/2007/06/23/a-gotcha-with-parallel-index-builds-parallel-degree-and-query-plans/

how to create pagenation in dynamic table view in android -

paginationlayout paginationlayout = new paginationlayout(this); paginationlayout.setlayoutparams(new layoutparams(layoutparams.fill_parent, layoutparams.fill_parent)); // creates content sample tablelayout table = new tablelayout(this); table.setlayoutparams(new layoutparams(layoutparams.fill_parent, layoutparams.fill_parent)); table.setgravity(gravity.center_horizontal|gravity.center_vertical); tablerow row = new tablerow(this); row.setlayoutparams(new layoutparams(layoutparams.fill_parent, layoutparams.fill_parent)); table.addview(row); tablerow row2 = new tablerow(this); row2.setlayoutparams(new layoutparams(layoutparams.fill_parent, layoutparams.fill_parent)); table.addview(row2); for(int = 0; i< 50;i++){ button button = new button(this); button.settext("button " + i); if (i%2==0) { row.addview(button); } else { row2.addview(button); } }

Undefined LatLng google map in AngularJs Controller -

i want retrieve longitude , latitude position of click mouse event, can't, gives me undefined. 1 can me please ? i'm using angularjs , found can google.maps.event.addlistener(map, 'click', function(event) { console.log(event.latlng); }); but can't in controller gives me error, or maybe don't know how use that!! here code : $scope.map = { center: { latitude: 36, longitude: -80 }, events: { "click": function (event) { console.log(event.latlng); } } } and tried gives me (nan,nan) $scope.map = { center: { latitude: 36, longitude: -80 }, events: { "click": function (event) { var pos = new google.maps.latlng(event.latlng, event.latlng); console.log("position: " + pos); }

c++ - SPOJ: What is the difference between these two answers for KURUK14 -

i have solved this problem , got ac. problem related equivalence of following 2 approaches. first code got accepted, while second didn't. far can discern, both equivalent (valid) test cases human can think of. wrong? if so, test case can differentiate them? code#1 (accepted one): #include <cstdio> bool* m; bool proc(int n){ for(int j=0;j<=n;j++){ m[j]=false; } for(int i=0;i<n;i++){ int a=0; scanf("%d",&a); if(a>=n) return false; else if(!m[a]) m[a]=true; else if(!m[n-1-a]) m[n-1-a]=true; } bool f = true; for(int k=0;k<n;k++) { f = f && m[k]; } return f; } int main() { m=new bool[1002]; int num=0; scanf("%d",&num); while(num){ int n=0; scanf("%d",&n); if(proc(n)) printf("yes\n"); else printf("

c# - How to instantiate a TableAdapter -

i trying instantiate tableadapter in register dataset not getting intellisense instantiate it? here example microsoft uses: northwinddatasettableadapters.regiontableadapter regiontableadapter = new northwinddatasettableadapters.regiontableadapter(); my table adapter called userstableadapter , dataset called register, if understands how should greatful table adapters custom classes generated vs, need create own table adapter, more information open link: https://msdn.microsoft.com/en-us/library/6sb6kb28.aspx

javascript - How can one address two instances of the same application through osascript -

can think of workaround osascript index-by-name bottle-neck in reference multiple instances of same application ? if obtain 2 process ids – 1 each of 2 different instances of same application, osascript returns same instance in exchange either pid - if first maps pid application name, , retrieves first application process name. for example, start 2 different instances of vlc.app, playing 2 different video files, like: open -na /applications/vlc.app ~/filea.m4v open -na /applications/vlc.app ~/fileb.m4v then obtain 2 separate application process ids with, example: echo "$(ps -ceo pid=,comm= | awk '/vlc/ { print $1}')" we can use applescript or yosemite jxa javascript reference application object either pid. it turns out, however, whichever process id supply, returned reference same instance, running same video file, if osascript translates pid application name, , returns first process matches name. yosemite javascript applications: function run()

c# - How to login into other person account - EF6 Identity -

i have asp.net mvc 5 webapp using ef6. i've used identity managing user account. i've structure under user there can sub users. if need log in sub user account without knowing password? password stored encrypted in db. is possible? if not work around.

java - Spring form input can't be disable -

i want disable <form:input> attribute disabled, it's not working. <td class="value"> <sec:authorize access="hasanyrole('role_edit_device_install_date')"> <form:input path="installdt" maxlength="10" size="10" cssclass="installdatepicker" /> <form:errors path="installdt" cssclass="errormsg" /> </sec:authorize> <sec:authorize access="!hasanyrole('role_edit_device_install_date')"> <form:input path="installdt" maxlength="10" size="10" cssclass="installdatepicker" disabled="disabled" /> <form:errors path="installdt" cssclass="errormsg" /> </sec:authorize> </td> does have idea solve ?

vb.net - Addition and Subtraction of Random Numbers -

i trying make simple math game made of 3 forms. first form title screen has button start game. when button pressed make form 2 visible. form 2 generate 2 random numbers , either “+” or “-“ symbol , begin timer. user inputs answer text box , clicks “check answer” button, display either “correct” or “incorrect” label. want repeat 5 times , final time display form 3 show total time taken , number of correct answers. so far in first form have: public class startform public randomnumber new random() private sub button1_click(byval sender system.object, byval e system.eventargs) handles button1.click me.hide() questionform.show() questionform.num1.text = randomnumber.next(1, 100) questionform.num2.text = randomnumber.next(1, 100) questionform.mathsymbol.text = randomnumber.next(1, 10) if questionform.mathsymbol.text = 1 questionform.mathsymbol.text = "+" elseif questionform.mathsymbol.text = 2 questionform.mathsymbol.text = &q

module - PERL : Unicode string : Permission denied -

this question has answer here: how can use new perl module without install permissions? 10 answers i program using perl , need install unicode string. make install tells me: files found in blib/arch: installing files in blib/lib architecture dependent library tree !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! error: can't create '/library/perl/5.16/darwin-thread-multi-2level/unicode' mkdir /library/perl/5.16/darwin-thread-multi-2level/unicode: permission denied @ /system/library/perl/5.16/extutils/install.pm line 494. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @ -e line 1. make: *** [pure_site_install] error 13 does ever encountered problem? /library system directory. bad idea tinker system's own perl distribution. if goes wrong, you'll have lot of cle

rest - Check if RESTful server is available on Android -

i'm developping android rest-api oriented application. i need create method check whether server available or not. problem if use url.openstream() method, there's no way determine whether request successful or not. is there way without need operate of performing full httpurlconnection , read return code? you can use tcp sockets socketaddress socketaddress = new inetsocketaddress(address, port); try { int timeout = 2000; socket.connect(socketaddress, timeout); } catch (ioexception e) { return false; } { if (socket.isconnected()) { try { socket.close(); } catch (ioexception e) { e.printstacktrace(); } } }

php - input data codeigniter always 0 on database -

i new codeigniter. found problem. have read on codeigniter form sends '0' data , zero (0 ) database result in codeigniter did not help. problem data in database 0. my add view code <form method="post"> <div class="form-inline form-group"> <label for="kegiatan">kegiatan : </label> <select class="form-control" id="disableselect" disabled><option>mpab</option></select> <!-- inget ganti pake id terakhir --> </div> <div class="form-group"> <label for="indikator">indikator : </label> <input type="text" name="indikator" id="indikator" placeholder="indikator" class="form-control"> <!-- kosongin, tapi kalo edit munculin indikator yang di edit --> </div> <div class="form-grou

java - pass HttpServletRequest in a hasPermission expression -

in spring security config i've got following settings: @override protected void configure(httpsecurity http) throws exception { http .authorizerequests() .antmatchers("/login.htm", "/signup.htm").permitall() .antmatchers("/page1.htm", "/page2.htm", "/page3.htm").access("@permission.haspermission(principal.username)) .... } the @permission contains method haspermission @component bean decides whether principal username has access pages. in bean use dao methods determine this. however, need more knowledge make decision because it's not single page. instance, there way know page user has requested , pass in haspermission method? in other words, want like: .antmatchers("/page1.htm", "/page2.htm", "/page3.htm").access("@permission.haspermission(principal.username, httpservletrequest http)) see 2nd parameter of meth

ios - Black bars simulating iPhone 5 - Xcode -

when running iphone 5 simulator 2 black bars appear making resolution of iphone 4(s). question is: how able use full screen resolution? (it creates black bars around app when trying simulate ipad) now, know questions has been answered multiple times here on stackoverflow, of them give solution of adding default-568h@2x.png launch image. want make use of launchscreen.xib instead of creating seperate launch screen images. anyone got solution this? thanks! - merijn you must use specific launch image take account 4" inches screens... or either way can use specific launch screen autolayout constraint example if don't want add many launch images : http://useyourloaf.com/blog/2014/12/24/using-a-launch-screen-storyboard.html

excel - RegEx to extract email -

i need extract email spreadsheet in excel. i've found example vb code here on stackoverflow link , courtesy of portland runner . i created excel module , seems working fine, except. return first uppercase character of address in cell , ignoring email. for example: text | result ----------------------------------------|------------------------------ email address address@gmail.com | email address yes address@gmail.com | yes below code i'm using: function simplecellregex(myrange range) string dim regex new regexp dim strpattern string dim strinput string dim strreplace string dim stroutput string strpattern = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?" if strpattern <> "" strinput = myrange.value strreplace = ""

java - TextView as attribute? -

i'd use textview attribute private textview = (textview) findviewbyid(r.id.tv_up); private textview mid = (textview) findviewbyid(r.id.tv_mid); private textview down = (textview) findviewbyid(r.id.tv_down); instead of define evertime new: public void onbuttonclickup(view v) { textview = (textview) findviewbyid(r.id.tv_up); textview mid = (textview) findviewbyid(r.id.tv_mid); textview down = (textview) findviewbyid(r.id.tv_down); <..> } public void onbuttonclickdown(view v) { textview = (textview) findviewbyid(r.id.tv_up); textview mid = (textview) findviewbyid(r.id.tv_mid); textview down = (textview) findviewbyid(r.id.tv_down); <..> } the upper methode producing force close error on android device. how solve or possible? thanks! public class testactivity extends activity { private textview up; private textview mid; private textview down; @override public void oncreate(

android - Remove SearchView search voice button line -

Image
thanks other related posts regarding searchview customisation able customise searchview point: now i'm trying add voice search , able change voice button background resource: int searchvoiceiconid = searchplate.getcontext().getresources().getidentifier("android:id/search_voice_btn", null, null); imageview searchvoiceicon = (imageview) searchview.findviewbyid(searchvoiceiconid); searchvoiceicon.setimageresource(r.drawable.ic_action_mic); searchvoiceicon.setbackgroundcolor(color.transparent); however, can't seem rid of line under voice search button. any suggestions???? thanks code: ((linearlayout)search.findviewbyid(r.id.search_voice_btn).getparent()).setbackgroundcolor(color.transparent);

ios - How to run Objective-C file in the beginning of Swift project -

i trying use objective-c in swift project.i want use this library of objective-c in swift.i imported library in swift project.i want library run in beginning when build project,but when build project,viewcontroller.swift being run.so,how run library in beginning? in objective c can have class +(void)load method... run early, maybe before set up... can investigate constructor attribute.

c# - Null Reference Exception on Unity's GetComponent method -

i have ontriggerenter method deal damage player when collides other objects void ontriggerenter (collider other){ if (other.tag != gameobject.tag) { getcomponent<health>().lowerhealth(other.getcomponent<damage>().getdamage(0)); } } however, other.getcomponent<damage>().getdamage(0)); line giving me null reference exception. what correct way of doing this? edit: have made instances of damage , have made sure components there , isnt null. error still exsist.

php - How to format a session variable in a bracket part -

i use tablesorter. in page before set session cookie. tablesorter has part: $.tablesorter.setfilters( table, ['', 'test' ], true); now need session variable word 'test' is, don't know how format it... is this: $.tablesorter.setfilters( table, ['', ($_session["favcoloor"]) ], true); or this: $.tablesorter.setfilters( table, ['', '($_session["favcoloor"])' ], true); or this: $.tablesorter.setfilters( table, ['', $_session["favcoloor"] ], true); or $.tablesorter.setfilters( table, ['', "$_session["favcoloor"]" ], true); i can not work, please me correct formatting. you need echo session variable php jquery code :) $.tablesorter.setfilters( table, ['', '<?php echo $_session["favcoloor"]; ?>' ], true); if php shorthand tags enabled, can use this: $.tablesorter.setfilters( table, [''

common table expression - PostgreSQL changes result when i play with offset, limit -

hi guys im using below query if change limit 10 or 20 results different i'm learning postgresql couldn't figure out problem there postgresql specific warning ? recursive children ( select id, name, 1 depth wapi_categories parentid = 1 , visible = true union select a.id, a.name, depth+1 wapi_categories join children b on(a.parentid = b.id) a.visible = true ) select wapi_issues.* (select distinct on(wapi_issues.publicationid) wapi_issues.* wapi_publications right join wapi_category_publication on wapi_category_publication.publication_id = wapi_publications.id right join ( select *, max(wapi_issues.issue_identifier) on (partition wapi_issues.publicationid) max_id wapi_issues wapi_issues.status = true order wapi_issues.issue_identifier desc ) wapi_issues on wapi_issues.publicationid = wapi_category_publication.

Jquery load function behavior on reload -

in index.php load page content jquery load function. access elements loaded use load callback function. this scenario index.php <html>.. <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/script.js"></script> <div id="load-page"></div> <button type="button" class="btn btn-primary" id="reload"> <span class="glyphicon glyphicon-refresh"></span> reload </button> <button type="button" class="btn btn-default" id="selectall"> <span class="glyphicon glyphicon-check"></span> select </button> <button type="button" class="btn btn-default" id="add"> <span class="glyphicon glyphicon-plus"></span> add </button> loaded-page.php <inpu

machine learning - Interpret the output of neural network in matlab -

i have build neural network model, 3 classes. understand best output classification process boolean 1 class , boolean zeros other classes , example best classification result class, output of classifire lead on how data belong class first element in vector [1 , 0 , 0]. output of testing data not that,instead rational numbers [2.4 ,-1 , .6] ,so how interpret result? how decide class testing data belong? have tried take absolute value , turn maximum element 1 , other zeros, correct? learner. it appears neural network bad designed. regardless structure -number of input-hidden-output- layers, when doing multiple classification problem, must ensure each of output neurones evaluating individual class, is, each them has bounded output, in case, between 0 , 1. use of defined function on output layer performing this. nevertheles, neural network work properly, must remember, every single neuron loop -from input output- operates classificator , is, define region on input

html - My header image isn't responsive -

i'm making website course in webdesign , 1 criteria responsive (resize content fit screen size). in site every image , text paragraph size according screen sizes full hd iphone size.. except header image stays locked in place when scale down, when it's down mobile resolution have scroll right see image. here's html , css codes header image: html: <div class="container_14"> <div class="grid_12"> <a href="index.html"> <p align="center"><img src="images/logo2.png"></p> </a> </div> </div> css: .container_14 { margin-left: auto; margin-right: auto; width: 1200px; } .container_14 .grid_12 { width:97.5%; height:90px; } img { max-width: 100%; } link code random same size images.. http://jsfiddle.net/hac4cfrn/ if want .container_14 adapt various screens stay @ 1200px width if there’s enough space, use @media query:

eclipse - The moment I add glew.h in my code glut related errors start appearing -

i new c/c++ environment setup. right using eclipse ide. below steps have followed after installing mingw , running basic helloworld, c program 1) copied glew32.dll , glut32.dll "c:\mingw\bin" 2) copied gl.h, glew.h, glu.h , glut.h "c:\mingw\include\gl" 3) copied glew32.lib, glut32.lib , opengl32.lib "c:\mingw\lib" 4) in project->properties->c/c++ build->settings->tool settings->mingw c linker->libraries(-l) added "glew32", "glut32","glu32" , "opengl32" 5) copied below code compiles properly. the moment uncomment first line, ie glew.h, glut related compile errors (added below) appear, can 1 tell me going wrong during setup? //#include <gl/glew.h> #include <gl/gl.h> #include <gl/glut.h> void changeviewport(int w, int h) { glviewport(0, 0, w, h); } void render() { glclear(gl_color_buffer_bit | gl_depth_buffer_bit); glutswapbuffers(); } int main(int argc, char

c++ - 3 errors: error: 'Entry' was not declared in this scope. error: template argument 1 is invalid. error: invalid type in declaration before '(' token -

noob here, sorry error filled title. i'm trying compile segment of code bjarne stroustrup's 'the c++ programming language' codeblocks keeps throwing me error. the code range checking array held in vector function. #include <iostream> #include <vector> #include <array> using namespace std; int = 1000; template<class t> class vec : public vector<t> { public: vec() : vector<t>() { } t& operator[] (int i) {return vector<t>::at(i); } const t& operator[] (int i) const {return vector<t>::at(i); } //the at() operation vector subscript operation //that throws exception of type out_of_range //if argument out of vector's range. }; vec<entry> phone_book(1000); //this line giving me trouble int main() { return 0; } it's giving me these errors: error: 'entry' not declared in scope. error: template argument 1 invalid. error: invalid type in declaration bef

node.js - Node resize image and upload to AWS -

i'm relatively new node, , want write module takes image s3 bucket, resizes , saves temporary directory on amazon's new lambda service , uploads images bucket. when run code, none of functions seem called ( download , transform , upload ). using tmp create temporary directory , graphicsmagick resize image. what wrong code? i have defined dependencies , array outside of module, because have depends on these. // dependencies var aws = require('aws-sdk'); var gm = require('gm').subclass({ imagemagick: true }); var fs = require("fs"); var tmp = require("tmp"); // reference s3 client var s3 = new aws.s3(); var _800px = { width: 800, destinationpath: "large" }; var _500px = { width: 500, destinationpath: "medium" }; var _200px = { width: 200, destinationpath: "small" }; var _45px = { width: 45, destinationpath: "thumbnail" }; var _sizesarray = [_800px, _500

SQL Server performance of copied database -

i encountered problems sql server performance. i have daily process using 15gb size database. i'm executing lot of scripts. the thing is, first step copy original database, , work on copy. , surprising me, queries on copy executing few times slower on original one. i'm not expert in databases, don't know might reason. to compare: query "a" took: 50 seconds on original database 600 seconds on copied database thank interest, dejvid

javascript - How can I check field exist or not in mongo db before querying to mongodb? -

i have run dynamic query on collections in such way user enters collection name, field name , field value , have first of check whether field name supplied user exists in collection , if not have run query shown in example below. for example: if user enters collection name user , field name type , field value article . , based on parameters have query follows: 1) if type field exists in collection user , query be: query = user.find({type:'article'}) 2) if type not field of collection user , query be: query = user.find() i tried $exists not working me. , how can use $exists before querying? because collection, field name , field value dynamic. , how can check type field exists or not in user collection? i tried solution $exists , want know if there way it. as @philipp mentioned in comment, bound bump performance issues need perform full-collection scan without use of indexes. using $exists , query return fields equal null. suppose want first fin

java - Comparing two set of strings -

here problem. i'm trying compare 2 different string using && , .equals seems cannot give me result should be. here code (starting think problem is) : for(int = 0; < datalist.size(); i+=3) { string temp1 = datalist.get(i); string temp2 = datalist.get(i+1); system.out.println(temp1); system.out.println(temp2); if (temp1.equals(dataquery1)) { system.out.println("true"); if (temp2.equals(dataquery2)) { system.out.println("true"); array2.add((datalist.get(i))); array2.add((datalist.get(i+1))); array2.add((datalist.get(i+2))); } } } system.out.println("\n\narray2 size : " + array2.size()); (int j = 0; j < array2.size(); j++) { system.out.println("array2 : " + array2.get(j)); } this array : [0] lipase b [1] x-33 [2] ppicz?a [3] candida

python - Pandas appending .0 to a number -

i'm having issues pandas i'm little baffled on. have file lot of numeric values not need calculations. of them coming out fine, have couple getting ".0" appended end. here sample input file: id1 id2 age id3 "sn19602","1013743", "24", "23523" "sn20077","2567897", "28", "24687" and output being generated: id1 id2 age id3 "sn19602","1013743.0", "24", "23523" "sn20077","2567897.0", "28", "24687" can explain why not of numeric values getting .0 appended, , if there way can prevent it? problem when perform next step of process csv output. i have tried convert data frame , column string did not make impact. ideally not want list each column convert because have large number of columns , manually have go through output file figure out ones getting .0 appended , code it.

javascript - animate div movement relative to another div size change -

having issue making animation work me. essentially have vertical scrolling page several div elements vary in size based on content being displayed. what's happening these size changes occur other elements jumping abruptly based. i'd make these bit more smooth. this part of massive project (angular) can't bring in external libraries. i've created jfiddle illustrates problem. $('.close').click(function () { $(this).parent().parent().height(0); $(this).parent().parent().slideup(500);// in case if want move second div up. }); http://jsfiddle.net/zberq/5/ so summarize, issue not element who's height changing. issue elements below instantly jumping or down in response height change. i first removed line $(this).parent().parent().height(0); - not sure if u need or not. then in remaining removed .parent , seems smoother, margin jump. fiddle https://jsfiddle.net/hastig/zberq/17/ js $('.close').click(function() {

node.js - Selenium Standalone server NodeJS, remote browsers -

i'm trying set selenium test environment having little trouble due fact browsers launched remotely via virtualization launcher service. path looks this: "c:\program files (x86)\microsoft application virtualization client\sfttray.exe" /launch "mozilla firefox 32 32.0.0.5350" my problem, can guess, server can't find path of browser binaries. i'd direct find webdrivers (iedriver.exe, chromedriver.exe, etc.) nice. has else run problem? there way set through nodejs co-workers don't have configure launch setup individually too? for chrome when launching hub or node command line use flag: -dwebdriver.chrome.driver=path_to_chromedriver where path_to _chromedriver directory put chromedriver. me /vagrant/bin/chromedriver giving: -dwebdriver.chrome.driver=/vagrant/bin/chromedriver for binaries- in java looks can use this: firefoxbinary binary = new firefoxbinary(new file("path/to/binary")); firefoxprofile profile = new fir

java - Union By Size Infinite Loop -

i working on implementing union-find data structure scratch , encountering problem infinite loop results in find method if attempting repeat union call. i implementing union size , find using path compression . have created test implementation of 10 elements (0 n-1) example: u 3 1 //union 1 -> 3 u 0 2 //union 2 -> 0 u 0 2 //union 2 -> 0 , infinite loop results u 1 4 //union 4 -> 1 , results in infinite loop when doing second u 0 2 , loop gets caught because value @ index 2 zero, , root zero, repeating loop cyclically. same logic follows when attempt u 1 4 . 2nd loop in find has incorrect logic. my question is : how can handle theses cases don't caught in infinite loop? this find method: /* * search element 'num' , returns key in root of tree * containing 'num'. implements path compression on each find. */ public int find (int num) { totalpathlength++; int k = num; int root = 0; // find root while (sets[k] >

Nuget with Artifactory. Key not valid for use in specified state -

i using artifactory nuget repository store nuget packages. when use artifactory link source, package manager in visual studio prompts credentials , worked fine. moved build machine (with out vs) , try build application throwing error : .nuget\nuget.targets(100,9): error : key not valid use in specified state. i added source -user -password , put config @ local user location. tried cleartext password , encrypted password both throwing same error. am missing here? please advice. i believe error isn't related artifactory. issue nuget reports related encrypting/decrypting user credentials in nuget.config files. i encountered error when tried set apikey repo: nuget setapikey user:pwd -config .\nuget.test.config -source .\packages nuget reported "key not valid use in specified state". had nuget.config file located near nuget.test.config. nuget.config contained packagesourcecredentials section credentials of other user (than 1 passed setapikey

php - Order one table based on column of another using MySQL -

i trying implement join can order results of 1 table based on column of table. sql works when records exists in both tables. sql works when there more records in table1 there in table2, providing not use order by clause. sql: select * table1 join table2 b on table1.col1 = b.col1 col3 != 0 order b.col2 asc; table 1 col1 | col2 | col3 __________________ 1 foo 1 2 foo 1 5 foo 1 9 foo 0 10 foo 1 17 foo 0 14 foo 1 12 foo 1 table 2 col1 | col2 ___________ 1 2 b 17 e 14 g 12 l the part of query order b.col2 asc causing fail when records between 2 tables not matching. i cannot guarantee record present in both. there way of still implementing this? i using mysqli can use pdo if needed. like @maximus2012 mentioned, try left join . give of records table1 , records table2 match col1 table1. select * table1 left join table2 b on table1.col1 = b.col1 col3 != 0 order b.co

haskell - How do I gain access to environment variables in a subsite that is in a separate package? -

my yesod subsite needs write files relative application's root directory. looking @ this , appears scaffolded yesod site of plumbing, how can access in subsite doesn't know app record? approot defined in scaffolded yesod project using reference appsettings , also element of app : approot = approotmaster $ approot . appsettings is there function gives me application root (or @ least valid file path root directory) without having know implementation details? being able reuse existing yesod functionality nicest, of course. you can't access master site's fields without knowing type of master site itself, defeats purpose of having subsite. typical options are: make data you're looking explicit argument subsite require typeclass constraint master site must instance of, gets data master site yesod-static example of former approach; yesod-auth example of latter.

grails 3.0.0 I can not create an application -

i downloaded grails 3.0.0 (hoping see problems cas magically disappearing ;) ) installed under windows , then: d:\grailsprojects> grails -version | grails version: 3.0.0 | groovy version: 2.4.3 | jvm version: 1.7.0_51 and then: d:\intellijprojects>grails create-app helloworld | error command not found create-app did mean: create-script or create-taglib or create-unit-test? also clean , compile don't work what missing? ok trivial (and rather stupid). in "project directory" among other projects there directory called grails-app, leftover of porting. caused create-app fail. removed directory works fine.

git - Undo changes (commited and pushed) -

i have 2 commit's have commited , pushed. need return code state 'two commits ago'. i can use git reset --hard <hash> locally, can not push changes: hint: updates rejected because tip of current branch behind how can return code previous commit in central repository? update: ms-app-actual/mobile-application » git reset --hard e50fa38c4865bd82fce7ddcf1e05d94012266364 ‹master› head @ e50fa38 move attachment class separate project ms-app-actual/mobile-application » git push --force ‹master› total 0 (delta 0), reused 0 (delta 0) remote: gitlab: don't have permission ssh://git@aaa.bb.cc.dd:2222/ms-mobile-app/mobile-application.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'ssh://git@aaa.bb.cc.dd:2222/ms-mobile-app/mobile-application.git' but can pull: ms-app-actual/mobile-application » git pull

winforms - Readonly richtextbox changing color of keyword C# -

Image
i have rich text box using display example of hello world program , want keywords such 'using' 'namespace' 'class' 'static' 'void' 'string' display blue. i have got 'using' display blue when user starts type or types 'using' want richtextbox read not allowing user input here code: private void rtb_textchanged(object sender, eventargs e) { string find = "using"; if (rtb.text.contains(find)) { var matchstring = regex.escape(find); foreach (match match in regex.matches(rtb.text, matchstring)) { rtb.select(match.index, find.length); rtb.selectioncolor = color.blue; rtb.select(rtb.textlength, 0); rtb.selectioncolor = rtb.forecolor; }; } } i having trouble figuring out how readonly rtb. how edit code display blue text on initialize in readonly rtb th

java - How to escape slashes in Gson -

according json specs, escaping " / " optional. gson not default, dealing webservice expecting escaped " / ". want send " somestring\\/someotherstring ". ideas on how achieve this? to make things clearer: if try deserialize " \\/ " gson, send " \\\\/ ", not want! answer: custom serializer you can write own custom serializer - have created 1 follows rule want / \\/ if string escaped want stay \\/ , not \\\\/ . package com.dominikangerer.q29396608; import java.lang.reflect.type; import com.google.gson.jsonelement; import com.google.gson.jsonprimitive; import com.google.gson.jsonserializationcontext; import com.google.gson.jsonserializer; public class escapestringserializer implements jsonserializer<string> { @override public jsonelement serialize(string src, type typeofsrc, jsonserializationcontext context) { src = createescapedstring(src); return new jsonprimitive(src

Complete C++11 support on Android -

i'm trying cross-compile cross-platform library have developed in order use on android. so, use arm-linux-androideabi-g++ (4.9) compiler provided ndk, , link gnu-libstdc++ present in ndk. unfortunately, compilation won't succeed due use of c++11 features. such features specific methods present in "string.h" std::to_string or std::stof, replaced other ones if have to. use more complex ones, things "future.h" such std::future , std::async. i've located reason of compilation error "string.h", in file "ndk/sources/cxx-stl/gnu-libstdc++/4.9/bits/basic_string.h", following statement returning false (_glibcxx_use_c99 isn't defined): //basic_string.h #if ((__cplusplus >= 201103l) && defined(_glibcxx_use_c99) \ && !defined(_glibcxx_have_broken_vswprintf)) //methods want use #endif from understood, these restrictions induced android bionic libc. what options have solve ? i tried use crystax nd