Posts

Showing posts from September, 2014

Keyboard response VERY slowly when debugging TypeScript in Visual Studio -

i have created simple typescript project in visual studio , i'm using vs debug in internet explorer. i can set breakpoints, modify code, add/remove files without problems before starting debugging, when debugger running keyboard responds incredibly - on order of 4-5 seconds type single character. pressing shortcut key won't respond long time, , extends in os. however, ui not hang, , can still interact mouse without delay. stopping debugging resolves issue instantly. example: if press f9 enable or disable breakpoint, can enable , disable manually mouse (by clicking in margin) multiple times instantly. after stop, f9 received , breakpoint toggle again. example: open notepad, type word no problems. start debugging, switch notepad, , hit 3 characters wait 5 seconds each character appear. any thoughts? there configuration in vs need check. ie configuration that's causing problems? couldn't debugging working chrome through visual studio can't confirm

Is it possible to make android and or IOS phones microphone and transmit to Bluetooth -

i want "convert" phone microphone, when talk phone, , phone connect speaker want hear sound on speaker. in other words convert phone microphone. my question if passible? or possible 1 of platforms? or not. yes possible use phone microphone transmit speech, on android can if dig tutorials, , not sure ios depends on it's permissions

gridview style in shieldui -

i try create gridview shieldui try <table id="grid"> <tr> <th> name </th> <th> name </th> <th> name </th> </tr> <tr> <td> abc </td> <td> abc </td> <td> abc </td> </tr> </table> js <script type="text/javascript"> $(document).ready(function () { $("#grid").shieldgrid i add links when build , check show simple grid no style soultion? from documentation, sheildui grid expects javascript array of objects datasource. sample code var sampledata = [ { "id": 0, "name": "sue sharpe", "gender": "female", "company": "mitroc", "email": "suesharpe@mitroc.com" }, { "id": 1, "name": "nieves hubbard", "gender":

php - Modifying / Adding extra stuff to PDO bindParam()? -

does know chance if there clean way (or way @ all) change pdo's bindparam? we're implementing security measures our websites (filters inputs) , far seems best way add every single website have efficiently (every website have different thing have in common use pdo) somehow make pdo bindparam call our function on it's parameters, every single input in bindparam filtered appropriately. thanks! solved extending pdo classes: class customdbconnection { private static $conn; // either create new connection or return existing 1 public static function getinstance() { if (self::$conn == null) { global $db_hostname, $db_database, $db_username, $db_password; // better store these within class quicker self::$conn = new custompdo("mysql:host=$db_hostname;dbname=$db_database;charset=utf8", $db_username, $db_password, array(pdo::attr_emulate_prepares => false, pdo::attr_errmode => pdo::errmode_exception));

ios - FBNativeAd not loading App Store redirections -

Image
tl;dr fbnativeads, when tapping action button goes app store, explodes. i'm integrating fbnativeads ios indicated here . integration super simple , working fine. but, whenever i'm served "install app" ad, redirection app store explodes , fills stack instructions framework. every other action ("learn more", "open app") seem working properly , i'm assuming integration correctly done. not 1 ad going app store works. anybody had issue this? i'd glad provide code of integration needed. please, comment or suggestion might us. in advance!

html - text flows out of bootstrap 4 card -

Image
i trying place 2 words on left , right side of bootstrap 4 card... however problem : the text "choro" flows out of card body... here code: <!doctype html> <html lang="en"> <head> <!-- required meta tags come first --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <!-- bootstrap css --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" integrity="sha384-y3tfxazxuh4hwsyylfb+j125mxis6mr5fohampbg064zb+afewh94ndvacbm8qnd" crossorigin="anonymous"> <link href="custom.css" rel="stylesheet"> </head> <body> <div class="align-middle"> <div class="container"> <div cla

xpath - Schematron assert statement had been fired; where did that happen in the document? -

i highlight parts of xml documents after using multiple validation techniques. locating xsd validation failures in xml poses no problem, erroneous lines can tracked. however, validation steps done schematron assert , report statements. when send current xpath location when assert/report statement fired using diagnostic elements can root when context specific statement. is there way either line number or xpath string locate schematron assert statement fired? in svrl (schematron validation report language) report there 'location' attribute returns context of assert/report statement. last bit of path can collected utilizing diagnostic elements , returning current node. way cleaning report text , combining diagnostic still possible save user lengthy error messages , getting parts can used assemble xpath of fired assert/report statement. <sch:diagnostics> <sch:diagnostic id="testdiagnostic"> <sch:name path="."/>

ibm datapower - how to enable connect direct DMZ -

we have application sftp external customers. goes through ibm datapower acts dmz proxy lookups actual destination/user id password sftp used in sftp of files. datapower box sits on dmz. replacing sftp ibm connect direct. datapower doesnt seem have fsh connect direct. thoughts on how working datapower? if have/use mqfte v7.4+, can use perform connect:direct operation via datapower.

r - org-mode: add a header to a table programmatically -

i have table definied in org-mode: `#+results[4fc5d440d2954e8355d32d8004cab567f9918a64]: table | 7.4159 | 3.0522 | 5.9452 | | -1.0548 | 12.574 | -6.5001 | | 7.4159 | 3.0522 | 5.9452 | | 5.1884 | 4.9813 | 4.9813 | ` and want produce following table: #+caption: caption of table | | group 1 | group 2 | group 3 | |--------+---------+---------+---------| | plan 1 | 7.416 | 3.052 | 5.945 | | plan 2 | -1.055 | 12.574 | -6.5 | | plan 3 | 7.416 | 3.052 | 5.945 | | plan 4 | 5.1884 | 4.9813 | 4.9813 | how can accomplish that? here tried (in r): ` #+begin_src r :colnames yes :var table=table :session data.frame(table) #+end_src ` but of course doesn't work, here get: `#results: | x7.4159 | x3.0522 | x5.9452 | |---------+---------+---------| | -1.0548 | 12.574 | -6.5001 | | 7.4159 | 3.0522 | 5.9452 | | 5.1884 | 4.9813 | 4.9813 |` any suggestions? thanks! this gets pretty close. first define function: #+begin_src emacs-

Create and import a custom python package - import doesn't work in the root -

i'm totally new python, , want create first python library peronal uses. i'm using python 2.7.5, , running idle interface. so far, understood documentation , related questions that: python goes through list of directories listed in sys.path find scripts , libraries the package directory must contain __init__.py file, can empty the module want create should modulename.py file code inside package directory (sources: http://www.johnny-lin.com/cdat_tips/tips_pylang/path.html --- https://docs.python.org/2/tutorial/modules.html ) and here tried fails: created personal package directory c:\....\pythonlibs created subpackage dir c:\....\pythonlibs\package created __init__.py file inside both folders created mymodule.py file in packacge dir and in idle used code: import sys sys.path.append(r'c:\....\pythonlibs') first issue: currently have append every time enter idle. how can keep

c++ - Creating library on Mac OS X -

i trying create dynamic library on mac os x. use qmake generate makefile platform. dylib builds fine, creates version-specific name , 3 symlinks different version specifiers: libsimplezip.1.0.0.dylib @libsimplezip.1.0.dylib --> libsimplezip.1.0.dylib @libsimplezip.1.dylib --> libsimplezip.1.0.0.dylib @libsimplezip.dylib --> libsimplezip.1.0.0.dylib this default behavior , would, maybe, not care, problem appears when try using library in project: libs += -lpath/to/lib -lsimplezip thus xcode links library libsimplezip.dylib , in order run program, dynamic library has placed inside bundle. in order achieve use copy files build phase. unfortunately, doesn't work, because xcode resolves symlink , copies file giving same name symlink, i.e. libsimplezip.dylib , while library's install name libsimplezip.1.dylib . consequently program unable find library. so how supposed done? should change install name of library libsimplezip.dylib , doesn't have versio

sql server 2008 - "Error converting data type nvarchar to int." -

using sql 2008, trying setup etl , run error below while running dtsx package. description: ssis error code dts_e_oledberror. ole db error has occurred. error code: 0x80004005. ole db record available. source: "microsoft sql server native client 10.0" hresult: 0x80004005 description: "error converting data type nvarchar int.". the dtsx running smoothly sql 2005. searched possible answers through web none helpful. hope can share ideas error. answer! :)

email - How to display Microsoft Outlook mail content using the _IECreateEmbeded function? -

i working on designing functional automation software job using autoit. going great i've run little issue using _iecreateembedded function. my issue: what part of program supposed embed microsoft outlook's webpage inside of gui. part works fine. webpage loaded fine , displayed should be. able view message titles , subjects on left side of screen normal, however, when click on message open read, nothing happens. unable compose new message or search inbox. assumed had outlook using script autoit doesn't commonly support, i'm not entirely sure. tried loaded gmail gui , works perfectly. ideas? here's current code: (the important parts @ least) ; includes #include <guiconstantsex.au3> #include <ie.au3> #include <windowsconstants.au3> ; create gui window $windowmain = guicreate("embedded outlook client", 1001, 701, 242, 88, bitor($ws_maximizebox,$ws_minimizebox,$ws_sysmenu,$ws_caption,$ws_popup,$ws_popupwindow,$ws_group,$ws_tabstop

javascript - Why can I not see all the expected headers from a Fetch Response? -

i using fetch api make http request. fetch(url, options) .then(response => console.log(...response.headers.keys())); // "content-type" but can see chrome there more headers in inbound http response (date, server, transfer-encoding, x-foo). why might not able see them in output above code? i running chrome following flags: c:\path\chrome.exe --disable-web-security --user-data-dir=c:\path\tmp\chrome response: body: (...) bodyused: false headers: headers ok: true status: 200 statustext: "ok" type: "cors" url: "http://origin?query" i note making non-cors request retains headers. cors strip them? body: (...) bodyused: false headers: headers ok: true status: 200 statustext: "ok" type: "basic" url: "http://origin?query"

javascript - React Native : reload app or force rerender -

in code after user clicked on button want redirect first page (login) page. i tried navigator.push , works still shows top header , tabbarios in bottom. how can reload app 1 button , or force render index.ios? (rerender root page) i want same tabbarios. whenever scroll or go deeper in tab, when go tab , come first tab, it's not rerendering. showing last status of it. thanks in advance! it's bit hard seeing without code. you want refresh screen, under condition ? if screen component , if change component state ( this.setstate() ), change state value accordingly in page. [update] thanks clarification : so, in index render can : render(){ if(this.state.logout){//whatever condition want met. return (<login />); } else{ return (<tabbarios ... />); } } it should remove tabbar , show login.

git - Can a github ReadMe.md be different in different master branches of same product? -

i develop in master branch. colleagues develop in personal master branches. merge organisation master branch (this simplifies appveyor, travisci , other services use, allows have parallel branches devoted documentation each developer). merge of readme.md pain. possible to: not automerge readme.md file? make parts of readme.md conditional (eg if readme in b/master , if in b/master that)? there strategies working around ( git merge --strategy ours , git update-index --assume-unchanged ), they'll still retain maintenance burden. better option rethink requirements: why making local-specific changes global file? configuration should consistent across developers, if you're using versioned development environments through vagrant. if have notes specific (e.g. todo list remind things), should go in separate, untracked file.

Get count of one day, seven days and thirty days in MySQL -

i'm wondering if it's possible query like: select count(distinct `user`) `test_table` `createddate` >= now() - interval 1 day day && select count(distinct `user`) `test_table` `createddate` >= now() - interval 7 day week && select count(distinct `user`) `test_table` `createddate` >= now() - interval 30 day month the query ideally return amount of users created in past month/week/day. select ifnull(sum(case when `createddate` >= curdate() - interval 1 day 1 else 0 end),'0') 'lastday', ifnull(sum(case when `createddate` >= curdate() - interval 7 day 1 else 0 end),'0') 'lastsevendays', ifnull(sum(case when `createddate` >= curdate() - interval 30 day 1 else 0 end),'0') 'lastthirtydays' test_table `createddate` >= curdate() - interval 30 day;

javascript - Angular ng-Route doesn't work in a very simple example -

i learning angular.js , found example on w3c.school http://www.w3schools.com/angular/tryit.asp?filename=try_ng_routing but when try test it doesn't work, made 2 .htm files containing 1 word, example "red", or "green". simple example cannot work. think might libraries using <!doctype html> <html> <!-- javascript files --> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-route.js"></script> <body ng-app="myapp"> <p><a href="#/">main</a> </p> <a href="#red">red</a> <a href="#green">green</a> <a href="#blue">blue</a> <div ng-view></div> <script> var app = angular.module("myapp", ["ngroute"]); app.con

How to get rid of <U+FEFF> in a R data.table column name? -

in order import large dataset i've used data.table option integer64 = "character" because columns have large numbers truncated otherwise, , identifiers. my <- fread("mydata.csv", encoding="utf-8",integer64 = "character") with option enabled columns imported characters have problem, columnnames have being automatically modified start these character <u+feff> for example first column called <u+feff>id_2006_2011 the problem can't work names, example: > minidt[1,"<u+feff>id_2006_2011", with=f] error in `[.data.table`(minidt, 1, "<u+feff>id_2006_2011", = f) : column(s) not found: <u+feff>id_2006_2011 > minidt[1,"id_2006_2011", with=f] error in `[.data.table`(minidt, 1, "id_2006_2011", = f) : column(s) not found: id_2006_2011 how can work them? how can change them simpler? i've tried setnames(minidt, "id_2006_2011", "i

reminders - Reminds And Send me Email -

i'm trying develop reminds app. code framework need. have 3 spreadsheets, , intend, in each spreadsheets, monitor deadlines. when deadline less 5 days, should send e-mail. has worked in following manner: function sendemails() { var sheet = spreadsheetapp.getactivespreadsheet().getsheetbyname('2016.2'); var clientesinfo = sheet.getrange(2, 7, sheet.getlastrow() - 1, 2).getvalues(); //data de hoje na coluna g2; (var = 0; < clientesinfo.length; i++) { if (clientesinfo[i][1] < 5 && clientesinfo[i][1] >= 0 ) { mailapp.sendemail("roger@tr.br", "atenção! prazo se esgotando(isso é apenas um teste)", "verifique tarefas que estão próximas de vencer, em: https://g.gl/plgtru7"); } `enter code here` } } but want that same code, can monitor multiple spreadsheets, spreadsheet 2016.2. how should do? create multiple ifs? if have 100 sheets? 100 ifs?

scripting - Calculation of hours between two time stamp using unix script -

i have requirement calculate hours between 2 time stamp, example: date1 : 2016-02-24 08:30:10 date2 : 2016-02-26 11:25:10 the script should consider date , time while calculating hours. please provide information....

c# - ASP.Net5 get current Ilogger -

i using interfaces happens use microsoft.extensions.logging.ilogger . i want know how instantiate 1 interface using ilogger noting iloggerfactory in here have done don't know if right or not services.addsingleton<iservicecache, cache>( iapp => new cache(_loggerfactory.createlogger("debug")) ); or can do: #if debug services.addsingleton<ilogger>(_loggerfactory.createlogger("debug")); #else // here add logger release or whatever other mode #endif the ilogger injected automatically in dependent services. should enough: services.addsingleton<iservicecache, cache>();

android - show 10 items in each row of recycler view with grid layout similar to flipkart app -

Image
i working on e-commerce app. want design home page similar flipkart app.i have used recycler view.i able display data want display first 10 elements list in 1 row i.e. 1 10. in 2 row items shouls 11 20. right showing 1 15 items in rows list size 15. screenshot attached. code adapter- public class recyclerviewadapter3 extends recyclerview.adapter<recyclerviewadapter3.recyclerviewholders> { //private list<itemobject> itemlist; private list<string> itemlist2; private context context; private static final int item_view_type_header = 0; private static final int item_view_type_item = 1; private view header; private gridlayoutmanager llayout; public recyclerviewadapter3(context context) { // this.itemlist = itemlist; // this.itemlist2=itemlist2; this.context = context; } @override public recyclerviewholders oncreateviewholder(viewgroup parent, int viewtype) { log.i("pos on create holder",""+viewtype); /*

javascript - HTTP post from angularjs controller to Nodejs -

this angular controller code clientapp.controller('formctrl',function($scope,$http){ $scope.statuses = ["active", "inactive"]; $scope.cluster = ["east coast","west coast","paypal"] //when submit button clicked $scope.submit = function() { alert("submit clicked"); $http.post('/clientpost', $scope.formdata).success(function(response) { console.log('data posted successfully'); }) .error(function(data){ console.log('error: ' + data); }); }; }); this code takes set of values frontend form in $scope.formdata , trying pass on backend nodejs file using $http.post.. node js - server side controller app.post('/clientpost', function(req, res) { alert("posted successfully"); var cope = req.body.params; var query = "insert lv_billing.c

java - How to remove duplicates from array using for loop -

in code have found duplicates array , want remove them. output unique generated numbers. required use math.random , modulo. have clues? tried store them in array original array has 0's , 0 part of domain random number generation (from 0 52). public class decks { public static void main(string[] args) { generate(); } public static void generate() { int deckofcard[] = new int[52]; (int counts = 0; counts < 52; counts++) { deckofcard[counts] = (int) (math.random() * 51); } (int = 0; < deckofcard.length - 1; i++) { (int j = + 1; j < deckofcard.length; j++) { if ((deckofcard[i] == (deckofcard[j])) && (i != j)) { system.out.println("duplicate " + deckofcard[i]); } } } (int count = 0; count < deckofcard.length; count++) { system.out.print("\t" + deckofcard[count]); } } you must validate numbers generated during random number generation this: import java.util.random; publ

python - A function with itself as a default argument -

defaults parsed @ definition. not work def f(x, func = f): if x<1: return x else: return x + func(x-1) i did find way, though. start dummy function def a(x): return x def f(x, func=a): if x < 1: return x else: return x + func(x-1) and issue f.__defaults__ = (f,) obviously awkward. there way or bad python? if it's bad, can explain why? break things? in case, works: in [99]: f(10) out[99]: 55 in [100]: f(10, f) out[100]: 55 in [101]: f(10, lambda x : 2*x) out[101]: 28 to elaborate on andrea corbellini's suggestion, can this: def f(x, func=none): if func none: func = f if x < 1: return x else: return x + func(x-1) it pretty standard idiom in python implement actual defaults inside of function , defining default parameter none (or private sentinel object in case none valid input), due problems mutable default values such list objects.

objective c - View not updating when it's properties change in custom delegate -

i have acpdownloadview instance of appdelegate. it's showing downloading progress. when update it's progress value in view controller, works fine. appdelegate.downloadvew=[[acpdownloadview alloc] initwithframe:cgrectmake(0, 0, 30, 30)]; appdelegate.downloadvew.backgroundcolor=[uicolor clearcolor]; progressbtn= [[uibarbuttonitem alloc] initwithcustomview:appdelegate.downloadvew]; acpindeterminategooglelayer * layer = [acpindeterminategooglelayer new]; [layer updatecolor:[uicolor bluecolor]]; [appdelegate.downloadvew setindeterminatelayer:layer]; [appdelegate.downloadvew setindicatorstatus:acpdownloadstatusrunning]; [appdelegate.downloadvew setprogress:0.0 animated:no]; now, have delegate method called when progress updated. -(void)progressaddchannel:(nsprogress *)uploadprogress{ float prog=uploadprogress.fractioncompleted; [appdelegate.downloadvew setprogress:prog animated:yes]; [appdelegate.downloadvew layoutifneeded]; nslog(@"%f",pr

keydown - Using Jquery, why is this function being called when I only click one of the two keys? -

i have code: $(document).bind('keydown', 'ctrl+1', function () { alert('you found hotkey ctrl+1!'); }); but if click on either control or 1 key, code seems fire. want code fire when both keys pressed. can clarify missing? as can see in documentation , second argument bind function eventdata , an object containing data passed event handler. this used access variables outside inner function use handler, avoid problem accessing mutable variables closure. if want filter keys trigger action handle inside of function. $(document).bind("keydown", function(ev){ // notice function argument if(ev.ctrlkey && ev.keycode == 49){ // 49 being keycode "1" alert("foo!"); } });

How to run a command in cmd, and open it up to allow input? (Java) -

i'm making swing program used run c++ programs g++, i'm stuck on running program. tried using runtime.getruntime() or that, didn't seem work. , also, using runs command, , doesn't allow input. obviously, it'll run program, need able receive command line input, there way run command opening cmd , executing command in instance of program, allowing user type things in? have @ processbuilder class, think you're asking: https://docs.oracle.com/javase/7/docs/api/java/lang/processbuilder.html

Get xml value based on another value in javascript -

i have gml looks this: <gml:featuremember> <a:location>abcd</a:location> <a:elevatedpoint> <gml:pos>44.0 1.2</gml:pos> <a:elevation uom="ft">23</a:elevation> </a:elevatedpoint> </gml:featuremember> <gml:featuremember> <a:location>efjh</a:location> <a:elevatedpoint> <gml:pos>33.3 -6.9</gml:pos> <a:elevation uom="ft">244</a:elevation> </a:elevatedpoint> </gml:featuremember> i want gml:pos based on value of a:location . example, want position related location abcd . i'm guessing using xpath way forward not sure start. any appreciated. let me know if need more information. update this i've go far: var positions = document.evaluate("/featuremember/location[abcd]/elevatedpoint/pos", xml, null, xpathresult.any_type, null); never used xpath on gml, i'd d

drupal 7 - Mysql query to check nodes created in last 3 month -

i want query table node in want check records created in last 3 months. created field in table data type timestamp tried select * node created >= date_format(curdate(), '%y-%m-01') interval -3 month and select count(*),date_add((date_format(from_unixtime(created), '%e %b %y')),interval -3 month) daterange node but both not working the following simplest method date operations: select * node created >= now() - interval 3 month;

angular - Angular2 Directive - selector with multiple ids -

i'm implementing custom directive in angular 2, directive form validation, , in many places see in directive definition selector property associated multiple ids - example: @directive({ selector: '[my-custom-validator][ngmodel]' }) what multiple '[...]' (brackets) selection mean? as in css, selector [attr] matches elements have attribute named attr . when multiple attribute selectors chained together, all attributes must exist on element. note: unlike css, angular ignores [...] or [(...)] binding brackets on target attribute when performs match. thus, selector [my-custom-validate][ngmodel] matches elements have both my‑custom‑validate attribute , ngmodel attribute (including [ngmodel] , [(ngmodel)] ). example, selector matches <input type="text" name="username" my-custom-validate [(ngmodel)]="model.username"> but not <input type="text" name="username" my-custom-valid

SQL Server 2012 and NULL comparison -

Image
can explain me why these 2 statements returns different results? select case when not((null = null) or (1 != 1)) 1 else 0 end select case when not((null = null) , (1 != 1)) 1 else 0 end i know null compared gives false , wanted use property stopped @ commands similar above. real statements instead of nulls use variables can null simplified them show problem. thought has operation order seems that's not it. i know null compared gives false this isn't correct, null compared evaluates unknown, not false, quick example: select case when (null = null) 'true' when not(null = null) 'false' else 'other' end will give third option of other . if rewrite logic (still same meaning, becomes more clear): select case when (null <> null) , (1 = 1) 1 else 0 end select case when (null <> null) or (1 = 1) 1 else 0 end so in first instance have when [unknown] , [true] false, in second have whe

sql - Detach and re-attach from db2 partitioned tables -

i created partioned table. used incorrect quotation syntax 'maxvalue' . needs maxvalue below. how can fix problem? create table rmobjectspar ( "obj_libraryid" smallint not null , "obj_itemid" char(26 octets) not null , "obj_version" smallint not null default 1 , "obj_collectionid" integer not null , "obj_mgtclassid" smallint not null , "obj_stgclassid" smallint not null , "obj_attributes" smallint not null default 0 , "obj_retention" integer not null default 0 , "obj_volumeid" integer not null , "obj_stagedvolumeid" integer not null default -1 , "obj_path" integer not null , "obj_status" char(1 octets) not null ,

javascript - Issue with dirty form jQuery plugins -

i having trouble using 2 plugins. have tried: https://github.com/snikch/jquery.dirtyforms https://github.com/codedance/jquery.areyousure in code using: <script> $(funtion() { $('form').dirtyforms(); }); </script> or <script> $(funtion() { $('form').areyousure(); }); </script> within header , when change elements of form , try refresh no dialouge. struggling work out how can tell if it's being called @ all. i can't life of me work. ideas? below view source example of page in: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="stylesheet" href="styles/header.css?v=1.0"> <link rel="stylesheet" href="styles/content.css?v=1.0"> <link

ispostback - C# Page Fields not populating as expected -

could please tell me doing wrong? trying call method automatically when page loads, however, not work. protected void page_load(object sender, eventargs e) { if (!page.ispostback) { customerinformation(); } } protected void ddnames_selectedindexchanged(object sender, eventargs e) { customerinformation(); } private void customerinformation() { string dbstring = configurationmanager.connectionstrings["techsupportdbconstring"].connectionstring; string query = "select * customers name='" + ddnames.text + "'"; sqlconnection connection = new sqlconnection(dbstring); connection.open(); sqlcommand com = new sqlcommand(query, connection); sqldatareader reader = com.executereader(); if (reader.read()) { lblname.text = reader["name"].tostring() + "'s personal information"; lbladdress.text = reader["address"].tostring() + "\n" + reader

html - Accordion navigation in JavaScript / CSS: "Jumping" content-container -

i've made these accordion navigation , works (mainly) expected. but: if 1 opens text-sections clicking on expand-/contract-buttons 1 can see whole content-container moves left, respectively right. currently i've got no idea these moving comes or how prevent it. perhaps has idea goes wrong there? // span-"buttons". var buttons = document.queryselectorall('.sign'); buttons = array.prototype.slice.call(buttons); // toggles visibility of text-paragraphs. function toggledisplayed() { var section = this.parentnode; var paragraphs = section.getelementsbytagname('p'); // storing context. var = this; // removes class , adds opposite class. // --- parameter ------- // 1.: paragraph-element on add / remove. // 2.: class remove. // 3.: class add. // 4.: text-node of span-element. var manageclasses = function(paragraphobject, toremove, toadd, newsign) { paragraphobject.classlist.remove(toremove);

c++ - TBB parallel_for compile error -

i want use tbb parallel_for had code testing #include <tbb/parallel_for.h> #include <tbb/blocked_range.h> #include <tbb/tbb.h> std::vector<std::tuple<std::string, unsigned int, std::string>> commands; auto n = commands.size(); tbb::parallel_for(0, n, [&](int i) { const auto &tuple = commands[i]; } ); my compile line is: g++ -std=c++11 -wall -wextra -g -og textminingapp.cpp -ltbb -o textminingapp and compiler error is: textminingapp.cpp: in function ‘int main(int, char**)’: textminingapp.cpp:184:7: error: no matching function call ‘parallel_for(int, long unsigned int&, main(int, char**)::<lambda(int)>)’ } ); ^ in file included textminingapp.cpp:15:0: /usr/include/tbb/parallel_for.h:185:6: note: candidate: template<class range, class body> void tbb::parallel_for(const range&, const body&) void parallel_for( const range& ^ do have idea solve this? the problem of code 0 of t

Custom view outlets in iOS swift are not working in view controller -

hi have taken view controller , 1 custom view in swift viewcontroller import uikit class viewcontroller: uiviewcontroller { var genderview : genderoptionview! override func viewdidload() { super.viewdidload() loadgendercustomview() } func loadgendercustomview() { genderview = genderoptionview(frame: cgrectmake(0,0,rectis.size.width * 0.95, rectis.size.height * 0.355)) { (screeentype) -> () in if(screeentype == 0) { print("show gender"); //self.showloginscreen() } }; self.view.addsubview(genderview) } } custom view import uikit class genderoptionview: baseview { //static let sharedgenderoptionviewinstance = genderoptionview() @iboutlet weak var maleimgview: uiimageview! @iboutlet weak var malebtn: uibutton! @iboutlet weak var malelbl: uilabel! internal init(frame: cgrect, onactions:(screeentype:nsinteger) -> ()){ super.init(frame: frame) let myview = nsbundle.mainbundle().loadnibname

c# - svcutil.exe xsd code genereation for objects with nested arrays -

Image
i've got , xsd use generate datacontracts wcf service. here visual represantation of xsd when use xsd.exe generation fine , object so public partial class messagetype { private messageinfotype messageinfofield; private lottype[] lotslistfield; /// <remarks/> public messageinfotype messageinfo { { return this.messageinfofield; } set { this.messageinfofield = value; } } /// <remarks/> [system.xml.serialization.xmlarrayitemattribute("lot", isnullable=false)] public lottype[] lotslist { { return this.lotslistfield; } set { this.lotslistfield = value; } } } and here generated code nested lot object public partial class lottype { private lotgeneralinfotype lotgeneralinfofield; private productinfotype[] productinfofield; //other generated fields } but when try generated classes

FIWARE IoT Agent: can the IoT agent send data to multiple context broker -

i using mqtt iot agent send data fiware context broker , wondering if can send data iot agent multiple context brokers. possible? if yes how to? thanks in advance help! the mqtt iot-agent connected specific context broker instance depending on service provision. if service context broker instance not configured, "ngsi_urls" parameter used. therefore, yes, can deliver information multiple contextbroker instances 1 per defined fiware service. if want send information of 1 single service multiple instances of context brokers think may send 1 , federate other instances. learn context broker instances federations should check contextbroker related documents. thanks using idas , sorry delayed response (we have been slower regading support due internal migration process).

excel formula - Criteria selection -

Image
i have table has phase name, name, , stage completion (which has dates , blanks) in separate part of worksheet each name, want phase name based on latest date in stage completion. e.g 'closure' latest stage complete 3 july, b execution, , on. want use formula rather advanced filter or dbase function. possible? thought half way there max if got stuck. b c 1 phasename name stage completion 2 initiation 1/7 3 execution 2/7 4 closure 3/7 5 initiation b 1/7 6 execution b 4/7 7 closure b 8 initiation c 1/7 9 execution c 10 closure c you want following array formula: =index($a$2:$a$10,match(max(if($b$2:$b$10=f2,$c$2:$c$10)),if($b$2:$b$10=f2,$c$2:$c$10),0)) being array formula must confirmed ctrl-shift-enter when exiting edit mode instead of enter. if done excel put {} around formula.

asp.net - loop throught data in DSN connection -

i set netsuite (our business management program) web service , odbc connection. configure odbc in server connect web service via system dsn , file dsn. tested connection user id , password , worked. in vs2013 asp.net (vb) page, can't loop through records in table: dim cn odbcconnection cn = new odbcconnection("driver=cdata odbc driver netsuite 2015;dsn=odbc1;uid=myemail.com;pwd=mypassword") cn.open() dim cmdstring33 string = "select * customlist" dim cmd33 new odbccommand(cmdstring33, cn) dim rds33 = cmd33.executereader 'while rds33.read ' response.write(rds33("internalid")) 'end while cn.close() but following error: error [hy000] account must specified in order login netsuite. in "dim rds33 = cmd33.executereader" account works when test connection in odbc administration window what doing wrong? advice with odbc .net managed provider, should either specify dsn wish use: cn = new odbcconnection("dsn

SQL Server Objects (Schema Compare with Merge) -

Image
we trying maintain 2 sql environment, let's development , staging. on staging did bug fix on 1 stored procedure called example sproc1, @ same time on development doing changes on same sp. need apply bug fix on development without losing changes on development. using sql schema compare on visual studio 2015 doesn't merge of code, it's replace version directly. my question is, other tools on market maintain kind of scenarios? there no correct answer here. you've created conflict between environments , way resolve compare source of each version , merge differences manually. while strictly off-topic stack overflow, i'd recommend application called beyond compare kinds of file comparisons. excel @ text comparisons though. alternatively, you've mentioned using tfs. assuming development changes have been checked in development branch, create branch off hotfix although previous check in, apply changes, merge back. present conflict need manually rec

eclipse - Simple MergeSort Java -

i have class lab due tomorrow , absolutely stumped. requirement simply: make mergesort algorithm sorts given arraylist using comparables. "a" have final sorted list. throwing following: exception in thread "main" java.lang.indexoutofboundsexception: index: 1, size: 1 @ java.util.arraylist.rangecheck(arraylist.java:653) @ java.util.arraylist.get(arraylist.java:429) @ sorts.merge(sorts.java:142) @ sorts.mergesort(sorts.java:161) @ sorts.mergesort(sorts.java:160) @ sorts.mergesort(sorts.java:159) @ sortstep.sortmenu(sortstep.java:65) @ sortstep.main(sortstep.java:168) anything helps! thanks! (i know line numbers don't guys. sorry!) /** * takes in entire vector, merge following sections together: * left sublist a[first]..a[mid], right sublist a[mid+1]..a[last]. * precondition: each sublist in ascending order * * @param * reference array of integers sorted * @param first * starting index of range of values sorted * @param mi