Posts

.net - c++/cli ref class and dynamic allocation using handles? -

in .net's version of c++, can declare class in following way: ref class coolclass { public: string^ getname() { return name;} void setname(string^ n) {name = n;} private: string^ name; } when create class way, instances of class created , managed on managed heap clr's garbage collector. now, lets created 2 instances of animal class. animal cat; animal ^dog = gcnew animal(); both of these classes operate same. there real important difference between creating instances of classes 1 way or other? both should managed code right? first way seems easier , prevents me having use "->" operator. the first syntax called stack semantics . simulates stack allocation in standard c++. upon leaving scope, including when exception raised, object automatically disposed. nice syntactic convenience, under hood both objects instantiated on managed heap. use first syntax disposable types only, such database connections. as d...

asp.net - DropdownList Selected Value as Parameter for another DropdownList -

i'm having bit of difficulty trying accomplish goal here, i have 2 dropdowns, i'd able change values available within dropdown_objective according selected value within dropdown_parent. these dropdowns contained within templatefield, <asp:gridview id="gridview1" runat="server" allowpaging="true" allowsorting="true" pagesize="20" autogeneratecolumns="false" datakeynames="visitobjectivekey" onsorting="gridview1_sorting" onpageindexchanging="gridview1_pageindexchanging" width="100%"> <columns> <asp:templatefield headertext="parentid" sortexpression="parentid"> <edititemtemplate> <asp:dropdownlist id="updparentid" runat="server" width="100%" skinid="-1" cssclass="text ui-widget-content ui-corner-all" appenddatabounditems="true...

How to test registration pages in Protractor, with multiple browsers? -

i'm trying use multicapabilities define multiple browser drivers, when try running test registrates same user in different browsers, first browser tries register returns error (user exists). is there way run parallel e2e tests in protractor information cannot duplicated (like user name, user e-mail , such)? i found way test them, creating different configs each browser , defining different params (like user name) each of them. there better way of doing this? you might @ answer help: how can use command line arguments in angularjs protractor? i think can on per-browser basis in config, should able pass in different usernames , passwords way.

Heroku CLI error -

unable use heroku cli anymore: error installing heroku toolbelt v4... done. more information on toolbelt v4: https://github.com/heroku/heroku-cli setting node-v4.1.1... ! rename c:\users\me\appdata\local\heroku\tmp\download200968087\file c:\users\me\appdata\local\heroku\node-v4.1.1-windows-x86\bin\node.exe: access denied. error loading plugin commands error loading plugin topics error loading plugin commands i reinstalled git heroku toolbelt. ran git bash admin. im on windows 8.1 delete executable under c:\users\me\appdata\local\heroku\node-v4.1.1-windows-x86\bin\node.exe , should able proceed. this permission error. environment under script runs doesn't have permission delete file. you, however, do.

sql server - Port Error While Connect MSSQL with Android Device? -

i developing software , work in android. also, android app, i'm developing windows app , need connect mssql server. i configure sql server , can connect sql server windows app , android emulator. can't connect sql server real android device. app throwing error; "network error ioexception: failed connect /'my computer static ip' (port 1433): connect failed: econnrefused (connection refused)" already i'm setup 1433 port sql server, can't connect. please me... why can connect emulator can't connect real android device? thanks answer. have day.

javascript - Why do we recycle table view cells in iOS or Domain Objects in html? -

when write ios application, way new table view cell recycle disappeared cell , repopulate it. similarly, when implement infinite scroll in javascript, recycle top object , repopulate bottom. what's reasoning behind that? why can't remove old 1 , insert? tradeoffs?

jquery - Iterate over javascript object such that key variables are used as methods to call the object -

right i'm hard-coding new properties javascript application , horrible code smell don't know better when comes javascript implementation. code looks now: $.getjson(url, function(data) { $("#total_population_2013").html(data.table.total_population_2013); $("#median_age_2013").html(data.table.median_age_2013); //etcetera, long time might add }); its ruby openstruct object converted json i'm sending getjson method. trial , error solution, can access properties shown above. i'm add many more variables i'll writing html id tags, , prefer more professional manner. here i've tried far not working: $.getjson(url, function(data) { for(var k in data) { var value = data[k]; var id_str = "#"+k; $(id_str).html(value); }); } thanks i notice 2 things. 1 for..in iterates on properties of object, can include stuff gets prototype chain. typically not want, want instead: for(var k in data) if (data.haso...