Posts

Showing posts from January, 2015

telerik - Reformat image format in PDF -

i got issues in rendering couple of images , texts in pdf in telerik pdf viewer - according telerik's documentation seems texts/images formats incompatible. are there ways convert existing images in pdf , replace pdf make file compatible telerik pdf viewer? many thanks

c# - Finding my ConnectionString in .NET Core integration tests -

i'm building automated integration tests .net core project. somehow need access connection string integration tests database. new .net core no longer has configurationmanager, instead configurations injected, there no way (at least not know of) inject connection string test class. is there way in .net core can @ configuration file without injecting test class? or, alternatively, there way test class can have dependencies injected them? .net core 2.0 create new configuration , specify correct path appsettings.json. this part of testbase.cs inherit in tests. public abstract class testbase { protected readonly datetime utcnow; protected readonly objectmother objectmother; protected readonly httpclient restclient; protected testbase() { iconfigurationroot configuration = new configurationbuilder() .setbasepath(appcontext.basedirectory) .addjsonfile("appsettings.json") .build(); var

Closure Compiler warns "Bad type annotation. Unknown type …" when Ecmascript 6 class is extended -

i'm getting warning every ecmascript 6 class inherits class when compiling closure compiler: i've dumbed things down as possible , still warning: /src/main/js/com/tm/dev/dog.js: warning - bad type annotation. unknown type module$$src$main$js$com$tm$dev$animal.default the compiled code run correctly. (i've tried number of annotations made things worse.) know what's expected here? animal.js: export default class{ constructor(){ this.legs = []; } addleg(legid){ this.legs.push( legid ); } } dog.js: import animal './animal'; export default class extends animal { constructor(){ super(); [1,2,3,4].foreach(leg=>this.addleg(leg)); console.log( 'legs: ' + this.legs.tostring() ); } } a hint in warning message, though confusing if you're not familiar closure compiler's annotation inspection . the closure compiler can use data type information javascript vari

google apps script - sheet.deleteRows() Need to delete all the rows with data from top (preferably 2nd row) -

200-300 rows of data need deleted every day. click of menu item, want delete these rows. have script seems working partially (it deleting few rows..gettinn out of bounds error) , pretty slow should say. hoping can shed light on speeding process or give new code design, ** if possible exclude row_1 function clearrange() { var sheet = spreadsheetapp.getactive().getsheetbyname('test'); var start=1; var end=300; (var = start; <= end; i++) { sheet.deleterow(i); } } sample sheet - take copy don't use for loop. can in 1 line: var start, end; start = 2; end = sheet.getlastrow() - 1;//number of last row content //blank rows after last row content not deleted sheet.deleterows(start, end); apps script documentation

javascript - How can I rearrange an array to be ordered after a tile is dragged and dropped? -

i have array of tiles start off in following position: <div gridster> <ul> <li gridster-item="item" ng-repeat="item in standarditems"></li> </ul> </div> $scope.standarditems = [ { sizex: 2, sizey: 1, row: 0, col: 0 }, { sizex: 2, sizey: 2, row: 0, col: 2 }, { sizex: 1, sizey: 1, row: 0, col: 4 }, { sizex: 1, sizey: 1, row: 0, col: 5 }, { sizex: 2, sizey: 1, row: 1, col: 0 }, { sizex: 1, sizey: 1, row: 1, col: 4 }, { sizex: 1, sizey: 2, row: 1, col: 5 }, { sizex: 1, sizey: 1, row: 2, col: 0 }, { sizex: 2, sizey: 1, row: 2, col: 1 }, { sizex: 1, sizey: 1, row: 2, col: 3 }, { sizex: 1, sizey: 1, row: 2, col: 4 } ]; as gridster layout, 1 "item" can dragged , dropped new located. problem: how can create array ordered layout position? topmost left tile index 0, , bottom-most right tile last indexed item everytime layout reshuffled? plunkr

ios - Latitude and Longitude Returned from the Web Service -

i consuming web service returns json following information: "streetnum": "6400", "streetname": "aldine-bender road", "streettype": " "zip": "77396", "park_acres": 0.00696505, "acresource": "gis value", "editor": "jdegelia", "park_type": "csts/spaceway", "objectid_1": 1, "latitude": 13904515.9456177, "longitude": 3142086.10097251 i interested in both latitude , longitude values, think wrong , not point anything! latitude , longitude correct people? require me divide correct lat , long values? update: web service url: http://cohgis.mycity.opendata.arcgis.com/datasets/59d52cd8fa9d463ea7cf9f3c0a0c6ea2_11.geojson

php - Best Way to get parameter fom external software -

i use php script track , manage payments recepits. in script have fields like: transaction id (erp reference) date furnisher invoice number payment date amount upload (select dialog upload pdf bank transaction) now, have erp software. user first add payment on erp , after submit record user transaction id , bank transaction. after user scan documents, fill fields on script , upload pdf file. i'm send data erp php script, in way user cannot fill forms twice. my idea create button on erp open browser window , submit data url, like: myscript.com/receive.php?erp_transaction=1223232&date=2016-01-01&furnisher=microsoft&invoice_number=a1210&payment_date=2016-06-01&amount=100.00 question: best way? tks all,

java - Ignore a field from a DTO at the Jackson deserialization time -

i tried deserialize dto after receiving request response, need ignore field dto. response in json , i'm using java , objectmapper com.fasterxml.jackson.databind.objectmapper deserialize dto. i can't modify dto ignore field using annotation. how can solve problem? please use @jsonpropertyignore under hood of pojo u dont wanted deserialize. i,e ignore

qtp - HP QTD - ImportSheet with only some columns -

i have test in hp qtd imports sheet excel. code imports columns in sheet: datatable.importsheet("myfile.xls", "plan1", "dest") but myfile.xls has more 200 columns, , need 6. is there way import columns thah want? similar kind of question answered earlier,see if following link helps. how import data excel uft based on condition

typescript - Declaring type based on variable -

in typescript, can have variable implicitly typed based on variable. var json = {foo: 1}; var sometypedvariable = json; // assignment gives implicit type sometypedvariable.bar = 1; // error sometypedvariable.foo = 1; // but there way achieve same result without assigning? know can do: var sometypedvariable: {foo:number}; but like: var json = {foo: 1}; var sometypedvariable: json; // explicitly typing without assignment is there way achieve this? why trying this? have large json structures type checking on. it's easy throw sample data in ts file, , when assign data variable, type checking on variable. don't want maintain class structure json - want able (when json structure changes) copy/paste new json file project , see if of dependent code breaks. sure, there way! the related proposal of type queries implemented: var json = {foo: 1}; var sometypedvariable : typeof json; // type query, not string "object" sometypedvariable.bar = 1;

neo4j - triplestores vs native graph dbs on fast queries -

i'm researching native graph databases , triple stores (rdf stores) our use. we’re focused on marklogic triple store, , neo4j , , maybe orientdb native graph db. part of q below laying out context-- i’m investigating major distinction between these 2 types of dbs. i’m looking verification on first part-- whether i’m missing in picture. the second part-- part b, i’m looking answers on how each db has how of i’m outlining in part a. part a: afaik far, major distinction is-- triple-stores store relationships, or rather edges, based on relationship itself. so, it's "bag" of edges, each specific, designed attributes on them reflect semantics of relationship. native graph dbs on other hand, store graph structure-- nodes , links on them, along attributes you'd define on these nodes , links. i think, following 2 set 2 extremes fair view of these two. following 2 extremes-- i'm pretty sure dbs out there doing more either 1 of these extremes. 1.)

r - ENVVARS for Shiny Appshot -

i'm trying take snapshot of shiny app using webshot user can pre-set input variables. think appshot within webshot package can this...it says envvars argument should : "a named character vector or named list of environment variables , values set shiny app’s r process. these unset after process exits. can used pass configuration information shiny app" basically want this: appdir <- system.file("examples", "01_hello", package="shiny") names = list(bins = 7) appshot(appdir, "picture.png",envvars = names) but doesn't have desired result. should syntax of envvars change desired # of bins 7?

javascript - Node Keystonejs unexpected token export/import -

i'm running keystonejs node webapp , i'm trying include class created reactnative project, i'm getting 'export' unexpected token error , can't find how fix :\, updated node 6.2.0, run node keystone i've tried node --harmony keystone parameter still fails, i've tried installing babel-core babel-cli babel-preset-es2015 , nothing, still can create function (arg) => { /*body*/} form, although don't know in version of ecmascript introduced xd. class declared that: export default class api { ... } api class name, , intend use import api "api"; api.mymethod().then((res)=>{/*etc*/}); actually unexpected token 'import' before can export, changed 'require' instead, , export error (sorry i'm trying xd) i'm working on mac, built keystone project yo keystone , i've set mongod fine, thing works until try add class, help? plz :\ i used async , await keywords in class methods , think may cause trouble

freemarker - Netsuite PDF Templating: get number of pages as attribute -

i templating pdfs in netsuite using freemarker , want display footer on last page. have been doing research, couldn't find solution (since looks environment not allow me include or import libs), thought comparing number of page total pages in if tag nice , easy workaround. know how display numbers using <pagenumber/> , <totalpages/> tags, still cannot them values can use them this: <#if (pagenumber == totalpages) > ... footer html... </#if> any ideas of how or can values from? the approach trying won't work, because mixing bfo , freemarker syntax. netsuite uses 2 different "engines" process pdf templates. first step freemarker, merges record fields template , produces xml file, converted bfo pdf file. <totalpages/> element meaningless freemarker, converted number bfo later. unfortunately, ability add footer last page of document limitation of bfo, per bfo faq : at moment not have facility explicitly assignin

ruby - Rails partial template with collection not rendering correctly -

i have been troubleshooting error hours , have no idea i’m doing wrong. can’t items collection display individual user. each item belongs single user , each user has many items. right now, partial not rendering on users show view. if change <%= render partial: "/users/item", collection: @user.items %> <%= render partial: "/users/item", collection: @items %> partial template rendered, items displayed regardless of user belong to. after checking database, each item entry being stored foreign key user_id, isn’t issue. how correct items display each user? have used partials several times before , i’ve cross-referenced old , new code. can’t see difference , i’m losing mind. i’ve searched general internets, stack overflow, , reviewed rails guides layouts , rendering . i've posted relevant code below , happy post else. please help! views/users/_item.html.erb <div> <h4>item: <%= item.title %></h4> <p class="

html - Vertical spacing textboxes with Bootstrap form-horizontal -

Image
i have form-horizontal created bootstrap 3 looks this: when shrink viewport i'd "start" , "end" textboxes have whitespace gap between them. however, scrunched together: what can add vertical whitespace looks consistent rest of form? here bootply workspace html: http://www.bootply.com/sfb9elzbrc <form class="form-horizontal" method="post" action=""> <div class="form-group"> <div class="col-sm-4"> <label for="user_search">who reservation for?</label> <input id="user_search" name="selected_user_id" class="form-control"> </div> </div> <div class="form-group"> <div class="col-sm-4"> <label for="tool_search">which tool used?</label> <input id="tool_search" name="

Excel 2013 - Look up data and highlight cells -

sheet 1 - performance template (using lookup) sheel 2 - raw data 70 individuals sheet 3 - rota using excel manage performance data on year. have used lookup command use 1 performance template sheet display information individual based on data compiled on separate raw data sheet 70 individuals performance results on. what use sheet in same workbook rota on, , excel highlight individuals shifts through formatting cells, based on who's data showing on performance template. not sure how achieve , grateful if please. in rota sheet have possible shifts listed. if can use visible (or hidden) cell relative shift. can compare shift fixed cell on template sheet shows shift pattern of selected person. if match highlight. voila

javascript - html2canvas + FileSaver browser issues -

i'm working html2canvas , filesaver, save generated canvas when button clicked. dialog popup , user can choose save image , rename if wish. works perfectly... in firefox. can't seem work in either chrome, ie, or safari. the html2canvas part, , create image out of div in of browsers. filesaver dialog box thing not work in aforementioned browsers. any ideas? i've attached script. can see full working code here: https://jsfiddle.net/ticklishoctopus/556etja4/ script (with previous posts): $(function () { $("#btnsave").click(function () { html2canvas($("#testbtn"), { onrendered: function (canvas) { thecanvas = canvas; document.body.appendchild(canvas); canvas.toblob(function (blob) { saveas(blob, "testimage.jpg"); }); } }); }); }); realised toblob not supported in chrome. use instead: possible solution

google app engine - In python, communicating with stackdriver always returns success, doesn't send anything -

Image
for inexplicable reason, google provides no stackdriver api appengine, i'm stuck implementing one. no worries - thought - have worked api builder talk bigquery, built client , started trying send events: credentials = signedjwtassertioncredentials(stackdriver_auth_google_client_email, stackdriver_auth_google_private_key, scope='https://www.googleapis.com/auth/trace.append') http = httplib2.http() credentials.refresh(http) #working around oauth2client bug credentials = credentials.authorize(http) service = build('cloudtrace', 'v1', http=http) batch = service.new_batch_http_request() batch.add(service.projects().patchtraces( body=traces_json, projectid=stackdriver_auth_google_project_id)) print batch.execute() i left out definition of traces_json because no matter send, service responds error. if traces_json = '{}': {u'error': {u&#

Python - Import txt in a sequential pattern -

in directory have say, 30 txt files each containing 2 columns of numbers 6000 numbers in each column. want import first 3 txt files, process data gives me desired output, want move onto next 3 txt files. the directory looks like: file0a file0b file0c file1a file1b file1c ... , on. i don't want import all of txt files simultaneously, want import first 3, process data, next 3 , forth. thinking of making dictionary - though have feeling might involve writing each file name in dictionary, take far long. edit: for interested, think have come work around. feedback appreciated, since i'm not sure if quickest way things or pythonic. import glob def chunks(l,n): in xrange(0,len(l),n): yield l[i:i+n] data = [] txt_files = glob.iglob("./*.txt") data in txt_files: d = np.loadtxt(data, dtype = np.float64) data.append(d) data_raw_all = list(chunks(data,3)) here list 'data' of text files directory, , 'data_r

sql server - SQL average not working as I expected -

below sql query... averages not averaging totals, rather displaying sum. not sure why though. can provide insight? select avg(a.t1) '8:00-9:00', avg(a.t2) '9:00-10:00', avg(a.t3) '10:00-11:00', avg(a.t4) '11:00-12:00', avg(a.t5) '12:00-1:00', avg(a.t6) '1:00-2:00', avg(a.t7) '2:00-3:00', avg(a.t8) '3:00-4:00', avg(a.t9) '4:00-5:00', avg(a.t10) '5:00-6:00', avg(a.t11) '6:00-7:00', avg(a.t12) '7:00-8:00' (select count(case when cast(request_datetime time) between cast('07:00:00' time) , cast('08:00:00' time) 1 end) t1, count(case when cast(request_datetime time)between cast('08:00:00' time) , cast('09:00:00' time) 1 end) t2, count(case when cast(request_datetime time) between cast('10:00:00' time) , cast('11:00:00' time) 1 end) t3, count(case when cast(request_datetime time) between cast('11:00:00' time) , cast('12:00:0

maven - Android Studio Connection Refused -

the problem i'm experiencing: i'm getting following error when gradle script tries build: > not resolve junit:junit:4.12. > not resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'. > not 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'. > connection https://jcenter.bintray.com refused what need know: (1) how resolve android studio's connection issue or (2) put .pom files manually what have done far: (1) access jcenter website manually in browser , download files (2) set android studio's proxy settings , verified connection jcenter via ping in terminal (3) tried using alternate repositories including: mavencentral() , maven { url 'http://repo1.maven.org/maven2' } i solved issue. for whatever reason, proxy settings in android studio's system settings wasn't transferring on gradle build. suspect due fact android studio's proxy setting

ruby on rails - controller not recognized - angularJS -

i have angular controller have @myangular = ($scope) -> $scope.my = [...] @myangular.$inject = ["$scope"] i message error : argument 'myangular' not function, got undefined . in view, have %div{"ng-controller" => "myangular"} i found posts , nothing did trick ok got i, put in more cleaner way app = angular.module "myapp", [] app.controller 'myangular', ['$scope', ($scope) -> $scope.my = [...] ]

batch file - switch xcopy to robocopy -

i using following script. when swap out "move" "robocopy /mov /mt" doesn't work. destination goes 1 level deep , takes name of file destination folder. error below too. how can use robocopy instead? need multithreading. error= error 123 (0x0000007b) accessing source directory d:\source\file.tif\ filename, directory name, or volume label syntax incorrect. @echo off setlocal enabledelayedexpansion set source=d:\source set destination=d:\dest echo gather top 30 files set srccount=0 set srcmax=31 /f "tokens=*" %%a in ('dir /a-d /o-d /b "%source%"\*.*') ( set /a srccount += 1 if !srccount! leq %srcmax% ( move "%source%\%%a" "%destination% ) ) this trying: @echo off setlocal enabledelayedexpansion set source=d:\source set destination=d:\dest echo gather top 30 files set srccount=0 set srcmax=31 /f "tokens=*" %%a in ('dir /a-d /o-d /b "%source%"\*.*') ( set /a s

php - using a div as a radio button -

<div> <table class='accor'> <tr> <td>roll no.</td> <td>12801</td> </tr> <tr> <td>name</td> <td>xxxx</td> </tr> <tr> <td>class</td> <td>ms</td> </tr> </table> </div> i want above code radio button. above code running inside php while loop data supplied database. (i need use checked=checked match predefined value.) using jquery ui buttonset style radio. how can achieve that? $().buttonset takes input type='radio' elements inside selector , makes stylized button set out of them. each of these elements, associated label placed on display of resulting button. have buttons labels aren't single line of text, place contents inside label . <form> <div id="radio"> <i

Access: Fill In value for empty Cell from same row different record -

year| comp |value| ---------------------- 2014| xyz | 12 | 2015| xyz | 15 | 2016| xyz |empty| 2017| xyz | 30 | 2016| abc |empty| 2017| abc |empty| 2018| abc | 12 | i want fill in value of company xyz year(now) year+1 or whatever available next +1 or +2 results should fill in below : year: |2016| comp|xyz| value|30| year: |2016| comp|abc| value|12| i have tried using iff, show error , please help. just loop through recordset in vba recording value each record. if empty value met, edit record , update value recorded value. continue until no more records.

node.js - Firebase change data from server, listen on Android -

i'm playing firebase. updating data in server node.js: var db = firebase.database() var ref = db.ref("game") ref.update({ "state": "state", "counter": counter }) the data in firebase console updated without problem in android, can't retrieve change. want listen "game" node's changes no luck. databasereference database = firebasedatabase.getinstance().getreference(); databasereference ref = database.child("game"); ref.addchildeventlistener(new childeventlistener() { @override public void onchildadded(datasnapshot datasnapshot, string s) { log("1"); } @override public void onchildchanged(datasnapshot datasnapshot, string s) { log("2"); } @override public void onchildremoved(datasnapshot datasnapshot) { log("3"); } @override public void onchildmoved(datasnapshot datasnapshot, string s) { log(

c# - Is it a principle to always have the most abstract parameters and if so does it have a name? -

for example, 1 might have method max on integer array. public static int max(int[] ints) { var max = ints[0]; foreach(var in ints) { if(i > max) { max = i; } } return max; } but didn't utilize fact were using array, iterate on them, , didn't need ints, needed object knows how compare itself. more powerful method might be: public static t mymax<t>(ienumerable<t> ts) t : icomparable<t> { var max = ts.first(); foreach(var in ts) { if(i.compareto(max) > 0) { max = i; } } return max; } and guess above discounts fact ienumerable<t> infinite cause hang indefinitely, why trying find max fo infinite iterable in first place. the point i'm trying make second method more powerful former, makes least assumptions it's parameters needed. there name such principle? thing? thanks in advance. i call programming interfac

javascript - How can I dynamically reorder an array after a tile is dragged and dropped? -

i have application has array (selectedtiles). each tile in array has 2 properties dictate location of tile on page layout ( col (umn) , row ). link plunkr <div gridster> <ul> <li gridster-item="item" ng-repeat="tile in selectedtiles"></li> </ul> </div> problem behavior: when move tile (ex: swap 2 tiles), 'tile.col' , 'tile.row' properties change values each tile correspond new grid position. order of indexed array stays same. makes keyboard navigation unordered if moving next tile next index position. *goal behavior therefore, need create new array pushes each tile in selectedtiles new array takes tile.col , tile.row properties , sorts them, so: $scope.selectedtiles = [ { row: 0, col: 0 }, { row: 0, col: 1 }, { row: 0, col: 2 }, { row: 0, col: 3 }. { row: 1, col: 0 }, { row: 1, col: 1 }, { row: 1, col: 2 }, { row: 1, col: 3 }, { row: 2, col: 0 }, { row: 2, col: 1

c# - WPF Application stealing focus -

what want do: i want wpf app type in keystrokes onto other application has text fields, example, notepad. what problem is: if press button simulates keystroke ('a', example), app steals focus , 'notepad' not focused/active anymore, button not know send keystroke, what im requesting: how wpf app not steal focus of other app can type in keystroke when press app's buttons, here's code: private void button_click(object sender, routedeventargs e) { inputsimulator.simulatetextentry("1"); } 'inputsimulator' comes library got online, makes simulating keystrokes easy. **update, clarification, want surface pro keyboard, keyboard want do, if press on it's keyboard, app active stays focused , sp3 keyboard able enter keystroke, how do app? you'll need p/invoke user32.dll , use findwindow handle application trying write to, use setforegroundwindow . can send keystrokes window. see article on msdn quic

PHP decode of JSON doesn't work from the Google translate API -

i'm trying decode json returned google translation service: $r = '[[["hola mundo","hello world",,,1]],,"en"]' but when this: echo json_decode($r); it returns me null. i got manual maded js, trying made php https://ctrlq.org/code/19909-google-translate-api to clarify issue, json string (and in php should quote encapsulated), in code, have not declared string array, , clear can instantiate array couple methods: $myarray = array(); $myarray2 = []; so fix issue; encapsulate json string, replace echo json_decode($r) var_dump($r) , voila eg $r = '[[["hola mundo","hello world",,,1]],,"en"]'; var_dump(json_decode($r)); but not valid json syntax (check on http://jsonlint.com/ )

node.js - Explain Meteor.js as a Native Android App -

i have couple of questions i've tried google, can't seem find real explanation. i'm developing in node.js (the mean stack). i've looked @ meteor.js content , it's spiked interest. i'm curious couple things though, i've read meteor can android app, point appears in google play , app store. questions below: 1.) true native app , can meteor access android apis camera, bluetooth, wifi module, gps or file system? 2.) can meteor use android's sqlite database? 3.) meteor webview in encapsulated android app? thanks answers this, i'm wondering if it's app copycat without same functionality or if it's realistic way of creating app. while meteor can't build native apps. can access camera, wifi etc modules. magic behind cordova. meteor cannot directly user sqlite feature of android. cordova have additional plugins make workaround. meteor not webview uses mechanism of cordova. just let that, in order have app working data

python - Nested Bazel Projects -

i'm trying build project uses tensorflow serving, made directory my_dir workspace file, cloned serving repo it, put custom files directory my_project, configured tensorflow within tensorflow_serving, built tensorflow serving my_dir/serving with bazel build //tensorflow_serving/... everything builds fine there, try build python file imitating mnist_export , put in my_dir , make build file py_binary( name = "export_cnn", srcs = [ "export_cnn.py", ], deps = [ "@tf//tensorflow:tensorflow_py", "@tf_serving//tensorflow_serving/session_bundle:exporter", ], ) however, when run bazel build //my_project:export_cnn i following errors: error: .../bazel/_bazel_me/3ef3308a843af155635e839105e8da5c/external/tf/tensorflow/core/build:92:1: null failed: protoc failed: error executing command bazel-out/host/bin/external/tf/google/protobuf/protoc '--cpp_out=bazel-out/local_linux-fastbuild/genfiles/extern

ios - UITableView and UITableViewCell with dynamic height which is known only at WillDisplay -

i have uitableview cells content of variable height. if works fine autolayouted content in case content loaded (bound ui) when cell displayed (recycling, reuse, etc) chance can know real uitableviewcell height @ willdisplay of table datasource. at point missed estimatedheight , getheightforrow stages. please advise, how can change uitableviewcell height @ willdisplay stage if set autolayout right, , cell should calculate own hight, doesn't matter when , change content/content height, know adapt. check top of cell content has constraint top of cells contentview, , same bottom. estimatedheight name says, estimate. meaning should have implementation of trying calculate datasource model object height, basic implementation. or can run application 1 time, , keep see how cell height after calculates height autolayout, less "dynamic". if cell changes height after set, can call: [tableview beginupdates]; [tableview endupdates]; and cell recalculat

windows - in c#, how can you disable a button after the 1st click, and enable it again after you click another button? -

i cannot figure out i'm making windows form application visual basic in c# have scan button , scans in folder , lists of files in listbox if click time list of files appear again how can make can press scan button once, , can press again if click browse button? the browse button select folder want scan thanks this pretty trivial private void scanbuttonclick(object sender, eventargs e) { // (sender button).enabled = false; } private void browsebuttonclick(object sender, eventargs e) { scanbutton.enabled = true; }

Android Studio: PHP mysql variable isnt being passed in RegisterAPI when adding 2 variables -

i trying use form , php pass variable php file post mysql. able of variables calculated one. can't work. can make toast show calculated number, not carry forward. in mainactivity: trying calculate emptymilage - loadedmilage . i created private textview or string, have tried everything, , know can't grasp yet. i have attached mainactivity , registerapi class using along sql import. mainactivity: public class mainactivity extends appcompatactivity implements view.onclicklistener { //declaring views private webview webview; private edittext trucksid; private edittext tripreportnumber; private edittext entereddate; private edittext emptymilage; private edittext loadedmilage; private button buttonregister; private string esttotal; private textview estmilage; //this our root url public static final string root_url = "http://rooturl_for_php/php/"; @override protected void oncreate(bundle savedinstanc

shell - Stop WebSphere JVM within time limit? -

i wondering if can stop single jvm within specific time limit. if not stopping within time limit kill process shell script. if executing ./stopserver.sh jvm_name - run till jvm not stopped or till error , exit. what trying :./stopserver.sh jvm_name - if not stopped within 2 min(suppose), kill process (but how figure out not stopped within 2 mins through shell script before process go killing). can write condition kill . not sure how checks if jvm stopped within 2 mins or not can go ahead kill process. can please suggest shell script code identify if jvm stopped within specific time limit or not? a jvm process , such can stopped kill command - kill $processid or more brutal kill -9 $processid if start jvm script using java ... suggest putting & @ end of line , in following line processid=$! which saves id of background process. then sleep 120 will wait 2 min. have 2 options - either kill kill $processid /dev/null 2>&1 or first check if pr

css - How do I prevent a child element from inheriting parent element's attached attribute (in notched navigation)? -

i building notched navigation, in triangle "cut out" used marker active li. i have dropdowns reveal dropdown content on hover. when hovering on "current" (active) li dropdown, dropdown content displays triangle "cut out". how remove triangle "cut out" (notch) dropdown content of active li? . please view codepen , hover on dropdown 2 : http://codepen.io/goatsy/pen/pbvxkr css .nav .current a:before, .nav .current a:after{ content:""; display:block; width:2em; /* let's call our magic number... */ height:2em; /* ...our notch half size. define in ems scale text size. */ position:absolute; bottom:0; left:50%; margin-left:-1em; /* half of our magic number. */ } html <li class="current"> <div class="dropdown"> <a class="dropbtn">dropdown 2</a> <div class="dropdown-content">

C++ Vector Find() Overloaded operator - Error -

i'm receiving undefined symbols architecture error when compiling this. have use vector, find() algorithm, , non-member overloaded operator function. some guidance around error appreciated. #include <stdio.h> #include <iostream> #include <stdexcept> #include <vector> #include <algorithm> #include <string> using namespace std; struct person { char firstinitial; string firstname; person(const char fi, const string fn) { firstinitial = fi; firstname = fn; }; char getinitial() { return firstinitial; }; string getname() { return firstname; }; bool operator==(const person& r); }; bool operator==(const person& r, const person& x) { return x.firstinitial == r.firstinitial; } int main (int argc, char *argv[]) { vector<person> myvector; vector<person>::iterator itr; myvec

sql server - Does IMDF supersede DynamicsPerf for performance monitoring? -

i need troubleshoot poor performance issues in dynamics 2012. per technet article , lists 4 options, here 2 of them: • performance analyzer microsoft dynamics ax (dynamicsperf) – dynamicsperf can used collect information microsoft dynamics ax , sql server. dynamicsperf consists of database , collection of scripts collect information sql server , microsoft dynamics ax. based on information, can find issues such expensive queries , locking/blocking. when have gained experience, can use tool find inefficient code or business processes. • intelligent data management framework microsoft dynamics ax –intelligent data management framework (idmf) provides functionality resembles functionality of dynamicsperf, , includes user interface. idmf provides tools activities related data management, such archiving , purging. dynamicsperf pfes/support teams use, while idmf sounds same thing, gui. does idmf supercede dyanmicsperf? cannot figure out 1 should using.

Why object of python class returns address instead of return data? -

this first program in python , i'm working api used log in or register user. this how class looks like: class myclass: ... def __init__(self, apikey, gameid, securitykey, responseformat, username=none, password=none, email=none) self.apikey = apikey self.gameid = gameid self.securitykey = securitykey self.responseformat = responseformat if username , password: self.userlogin(username,password) if username , password , email: self.userregistration(username, password, email) ''' , there function userlogin , userregistration i'll show 1 of them ''' def userregistration(self, username, password, email): securitypayload = self.buildurl(username, password, email) user = requests.get('url', params = securitypayload) if 'error' in user.text: return user.text else: return &

entity framework - How to create a stored procedure in SQL Server Management Studio -

i have table in sql server, , want create stored procedure insert data table ( userinformation ). i new this, please give me info how create stored procedure. create stored procedure create procedure myprocedure (@id varchar(20),@search varchar(20) ) -- these parameters procedure begin select * yourtable id=@id end or ( without parameters ) create procedure myprocedure begin select * yourtable id=10 end calling stored procedure entity framework // tbl_compmgmt class exctly result returned var mgtlist = db.executestorequery<tbl_compmgmt>("exec getsortedmanagement @companay_id=" + compid).tolist();

How to use a different version of JRE on application run on Bluemix Liberty -

by default jre 8 used ibm bluemix liberty. possible use different version of jre run applications ? use jbp_config_ibmjdk environment variable specify alternative version of ibm jre. example, use ibm jre 7.1 set following environment variable: $ cf set-env myapp jbp_config_ibmjdk "version: 1.7.+"

javascript - ng expression not working in bootstrap modal title -

i have bootstrap model title want use ng-expression. binding happening, not on initial load. ill have click on textbox or dropdown in modal ng-expression load on title. html tag <h4 class="modal-title"><b>feedback - {{name}} </b></h4> modal not open on click of button in html,it opens on click of cell in handsontable. handsontable code: hot.addhook('afteroncellmousedown', function (event, coords, td) {/*pop-up event*/ if ((coords.col == 11 && td.innerhtml != '') || td.innerhtml == undefined) { $scope.name="name"; $("#modal").modal("show"); } }); what issue? way re render modal?

debugging - How can show AJAX response as HTML page? -

Image
i trying upload files server, error server. server sends html page explain error, browser receives ajax response has error not render html page, so, how can render ajax response show html? there way show ajax responses html page? the chrome can render ajax response page html page, can developer tools -> network button -> xhr name.