Posts

Showing posts from February, 2015

objective c - Cannot invalidate launchd kextcache from helper executable -

i've built uninstaller call helper executable elevated permissions remove driver's launchd-plist, won't come again on next boot cycle. in order reflect new stage of /library/launchdaemons , invalidate kextcache using following command touch /library/extensions/ showed in question . however, when helper executable right after plist file removed, wouldn't succeed, , driver still go after reboot. when manually typing command touch /library/extensions right after uninstaller helper finish, trick. here's how code looks in first option (invalidate helper exec). remove(osx_launchd_plist_path); pid_t pid = -1; char const * args[] = {"touch", "/library/extensions", null}; posix_spawn(&pid, "/usr/bin/touch", null, null, (char **)args, null); waitpid(pid, &status, wnohang|wuntraced); perhaps tell me why different behaviour in each of options. update: it seems cache invalidation

insert data into sql database using jquery ajax in asp.net c# -

i using 3 tier architecture , tried store data database using jquery ajax not getting response in success function here code portaldal.cs public datatable insertfeedback(string name, string email, string category, string message) { sqlparameter[] parms = new sqlparameter[]{ new sqlparameter("@name",name), new sqlparameter("@email",email), new sqlparameter("@category",category), new sqlparameter("@message",message) }; return helper.executeparamerizedselectcommand("insert feedback(name,email,category,message) values(@name,@email,@category,@message)", commandtype.text, parms); } portalbal.cs public datatable insertfeedback(string name, string email, string category, string message) { return portaldal.insertfeedback(name, email, category, message); } portal.asmx.cs [webmethod] public string insertfeedback(string name, string email, string category, string message) { datatable dt = detail

java - HttpClient is "reinitialized" after each 100 calls -

i have groovy script has post lot of calls api. using 1 http client calls - for best performance there code: httpclient = new httpclient() def start = new date().gettime() def = 0 (item in items) { post(item) def spend = new date().gettime()- start // usual call takes 100-300 miliseconds start = new date().gettime() if(spend>1000){ logger.debug } ++i } def post(item){ def httpmethod = new postmethod(endpoint) httpmethod.setrequestheader(new header("content-type", "application/json")) httpmethod.setrequestheader(new header("host", aws.host)) httpmethod.setrequestheader(new header("x-amz-date", amzdate)) httpmethod.setrequestheader(new header("authorization", authorizationheader)) def requestentity = new stringrequestentity(item, "application/json", "utf-8") httpmethod.setrequestentity(requestentity) def statuscode = httpclient.executemethod(httpmethod) httpmethod.releasec

Mysql select with IF function sub query -

i trying query work php. should first check specific booking has not been made query database available vehicles , drivers. this query far: if exists(select * bookings left join status bookings.status_id = '.$booking.') begin select * bookings b left join drivers d b.driver_id !="d.driver_id" left join vehicles v b.vehicle_id !="v.vehicle_id" left join status s b.status_id !="'.$booking.'" order b.bookingdate desc end join bookings: select * bookings b left join drivers d b.driver_id !="d.driver_id" left join vehicles v b.vehicle_id !="v.vehicle_id" left join status s b.status_id !="'.$booking.'" cross join ( select 1 bookings bookings.status_id = '.$booking.' limit 1 ) t order b.bookingdate desc

java - Variable number of list (ArrayList) as an argument to method -

there way in java handle variable number of string arguments like public void returnstring(string...args){ //some code } // calling returnstring("abc","def","klm") i wanted know if same can applied collections. if not, alternative. read array of list not possible, wondering how might work. //sample code of trying public void returnlist(list...args){ //some code } i don't know problem.... here example: import java.util.arraylist; import java.util.list; public class main { public static void tryit(list... lists) { system.out.println("you insert " + lists.length + " lists."); } public static void main(string[] args) { list<string> liststrings = new arraylist<>(); liststrings.add("test"); list<integer> listinteger = new arraylist<>(); listinteger.add(1); tryit(liststrings); tryit(liststrings, listinteger); } } result:

python - softlayer api: How to get the status(finish or processing) when copy os image cross IDC? -

when call softlayer_virtual_guest_block_device_template_group:addlocations copy private image_a cross idc , function returns true immediately. known operation asynchronous. the question how can know async operation finished, namely image_a finished copy target idc ? i have found api: softlayer_virtual_guest_block_device_template_group:gettransaction() , 1 returns empty str??what hell ~ ~ ~ you need make following call https://$user:$apikey@api.softlayer.com/rest/v3.1/softlayer_virtual_guest_block_device_template_group/$templategroupid/getchildren?objectmask=mask[transaction] method: replace: $user , $apikey , $templategroupid you need verify children (image template groups clones of image template group) have no pending or current transaction. in case there 1 or more transactions, not able add/remove locations until finishes.

css - Bootstrap - Responsive Navbar-Brand -

is there way have brand text on left when on large screen, centre when on small screen? i'm using atm centre uses width whole bar link. <a href="" target="blank" class="navbar-brand">name of app</a> .navbar-brand { position: absolute; width: 100%; left: 0; top: 0; text-align: center; margin: auto; } .navbar-toggle { z-index: 3; } check css , make use of media queries have different css applied @ different screen sizes @media(max-width: 767px) { .navbar-brand { position: absolute; width: 30%; left: 0; top: 0; text-align: left; margin: auto; } } @media(min-width: 768px) { .navbar-brand { position: absolute; width: 30%; left: 0; top: 0; text-align: center; margin: auto; color: orange; } .nav.navbar-nav { margin-left: 30%; } } jsfiddle

vb.net - Getting names of userproperties in VB script for outlook exchange users -

i have addressbook located on ms exchange server. want read user defined fields every contact. user list , can iterate on exchange users , print standard properties fullname , on. for each addressentry in addresslist.addressentries set user = addressentry.getexchangeuser() if not user nothing debug.print user.name end if next but want read user properties don't know used names. tried iterate on user.userproperties . for each userproperty in user.userproperties debug.print userproperty.name next but not supported. is there way receive names of properties? gal not support arbitrary properties store items (userproperties collection). what user properties mean? in outlook ui see them? if want see mapi properries of specific gal object, can use outlookspy - click iaddrbook | open root container | etc. drill down particular entry.

return - Possible to declare functions that will warn on unused results in Rust? -

does rust have way declare function, not using result warn - types? something gcc's __attribute__((warn_unused_result)); ? it appears #[must_use] attribute applicable struct s, enum s , union s ( union not available in stable rust yet, though): source . think means can't override function.

php - Empty SQL after form submission -

i've searched , searched cannot find answer i've made form here it's basic. somehow it's not submitting final data. code is <form class="form" action="submit.php" method="post"> <table> <tr> <td>team name: </td> <td><input type="text" name="team"></td> </tr> <tr> <td>captains xbox tag: </td> <td><input type="text" name="cap"></td> <tr> <td>captains e-mail:</td> <td><input type="text" name="email"></td> </tr> <tr> <td>team mates: </td> <td><textarea name="teammates" rows="6" cols="50"> please place each team member on new line </textarea><br></td> </tr> <tr> <td>sub team mates: </td> <td><textarea name="subs&q

java - Mock SpringContextHolder using MockMVC -

i writing unit test cases controller layer. have call getting user spring securitycontextholder. when run test case null pointer exception because don't know how mock spring security context. below code, suggestion how it? controller methhod: @requestmapping(method = requestmethod.post) public void savesettings(@requestbody emailsettingdto emailsetting) { user user = ((currentuser) securitycontextholder.getcontext().getauthentication().getprincipal()).getuser(); settings.saveuseremailsetting(user, emailsetting); } my test case : @test public void testsavesettings() throws exception { mockmvc.perform(post(base_url).content(this.objectmapper.writevalueasstring(emaildto)) .contenttype(mediatypes.hal_json)).andexpect(status().isok()); } there spring security test library purpose. you can use @withmockuser achieve this. see post

osx - How to find the directory of the .app that a python script is running from -

i made python script goes through files in whatever directory placed in , renames them based on criteria. script works perfectly, , compiled script os x .app using py2app. worked fine well. when run script, searches through files in ".app/contents/macos" folder (where script located) rather ".app" located. this because has code @ start: src = os.path.dirname(os.path.abspath(__file__)) which assigns the location of ".py" file variable used extensively throughout script. there way can instead add snippet of code tells python path location of ".app" ".py" file executing from? if not, perhaps there way file explorer window open, there possible user select folder who's path assigned "src" variable. i'm new python challenge. try use: import os print(os.getcwd()) from docs: getcwd() return unicode string representing current working directory.

c# - Telerik Reports Table view duplicated -

Image
hi using telerik report view generate report. all good, have mapped data data source , report looks great in design view. but when view in preview pane duplicates table x times number of rows have returned. know why ? you have duplicate table cause datasource bound page item. so lets quick. 2 solutions , choose one! use gui apply filter on table. filter on unique data. : =fields.myfield_id_xyz = =reportitem.dataobject.myfield_id_xyz in code behind : this.table2.filters.add( new telerik.reporting.filter( "= fields.myfield_id_xyz" , telerik.reporting.filteroperator.equal , "=reportitem.dataobject.myfield_id_xyz" )); this prevent duplication of table. filtering on reportitem.dataobject.myfield_id_xyz , current row of detailsection .

c++ - Awesomium Header throws compiler Error "'ProcessHandle' does not name a type" -

i'm trying setup simple web client fetch data remote website. unfortunately, information want being fetched javascript after page loaded ... i decided use awesomium framework first build page view browser, , analyse resulting html. but pretty fast run first problem while building first awesomium program ( namely tutorial 1 - hello awesomium ) when try compile project, compiler exits error message c:\program files (x86)\awesomium technologies llc\awesomium sdk\1.7.5.1\include/awesomium/webview.h:110:11: error: 'processhandle' not name type i'm not experienced 3rd party dependencies in c++, since work java. i appreciate hints , advice resolve problem, if possible explanation why. project description: additionally have included awesomium\include directory. library lookup path includes awesomium\build\lib directory. additional library references awesomium. i use eclipse neon ide, , cygwin , gcc compiler/linker added '-m32' flag c/c++ compi

javascript - window beforeunload is not working as expected in jquery -

basically trying was, whenever user tries close current tab(when on site), want display pop 3 choices why leaving , want store choice where so have written following in main.js loaded through entire site pages $(document).ready(function() { // before closing current tab, ask user reason $(window).on('beforeunload', function(event){ $('#load_choices_up').click(); event.stoppropagation(); event.preventdefault(); debugger; }); }); so have 3 issues above jquery code *.this code executing when click link on same page(i mean if navigate page current page), want code run when current tab/page closed(about close) completely, not when navigating page on site *. after line $('#load_choices_up').click() executed, choices pop opening expected, default processing of browser(that closing functionality) not being stopped 2 lines event.stoppropagation(); , event.preventdefault(); , mean these 2 methods of stopping behaviour no

java - Spring junit NoSuchMethodException -

getting below error junit test case. can please suggest should clear error. using maven build tool spring 4.3.2 , junit 4.12. org.springframework.test.context.support.abstracttestcontextbootstrapper getdefaulttestexecutionlistenerclassnames info: loaded default testexecutionlistener class names location [meta-inf/spring.factories]: [org.springframework.test.context.web.servlettestexecutionlistener, org.springframework.test.context.support.dirtiescontextbeforemodestestexecutionlistener, org.springframework.test.context.support.dependencyinjectiontestexecutionlistener, org.springframework.test.context.support.dirtiescontexttestexecutionlistener, org.springframework.test.context.transaction.transactionaltestexecutionlistener, org.springframework.test.context.jdbc.sqlscriptstestexecutionlistener] 07-sep-2016 18:19:17 org.springframework.test.context.support.abstracttestcontextbootstrapper gettestexecutionlisteners info: using testexecutionlisteners: [org.springframework.test.context.

swift - Core Data: Add a column on a table -

Image
i want add column on table new version of app, , keep filled columns. work core data, momd: on appdelegate: /* core data */ // mark: - core data stack lazy var applicationdocumentsdirectory: nsurl = { let urls = nsfilemanager.defaultmanager().urlsfordirectory(.documentdirectory, indomains: .userdomainmask) return urls[urls.count-1] }() lazy var managedobjectmodel: nsmanagedobjectmodel = { let modelurl = nsbundle.mainbundle().urlforresource("solutis", withextension: "momd")! return nsmanagedobjectmodel(contentsofurl: modelurl)! }() lazy var persistentstorecoordinator: nspersistentstorecoordinator = { let coordinator = nspersistentstorecoordinator(managedobjectmodel: self.managedobjectmodel) let url = self.applicationdocumentsdirectory.urlbyappendingpathcomponent("solutis.sqlite") var failurereason = "there error creating or loading application's saved data." { try coordinator.addpersistents

angularjs - angular inject module into multiple modules -

i'm loading module on base html page called userfromserver . i'd inject both main app module , mixpanel module. i'm getting injection error if try inject userfromserver analytics.mixpanel ( angular mixpanel ). circular dependency error or missing something? should userfromserver available modules? how can inject userfromserver both modules? var app = angular.module('app', ['userfromserver', 'analytics.mixpanel']) // main app currentuser injectable var mixp = angular.module('analytics.mixpanel', ['userfromserver']) mixp.config(['$mixpanelprovider', 'currentuser', function($mixpanelprovider, currentuser) { // use currentuser here }]); userfromserver module <body ng-app="app" ng-cloak> <base href="/"> <div class="container"> <div ng-view=""></div> </div> <script type="text/javascript"> angular.modu

vulkan - Descriptor bindings and binding numbers -

i'm bit confused language used in spec concerning descriptor bindings described vkdescriptorsetlayoutbinding struct. binding element is binding number of entry , corresponds resource of same binding number in shader stages. as stated in 14.5.3 a variable identified descriptorset decoration of s , binding decoration of b indicates variable associated vkdescriptorsetlayoutbinding has binding equal b in psetlayouts [ s ] specified in vkpipelinelayoutcreateinfo so if correctly descriptor bindings described vkdescriptorsetlayoutbinding must have entry every active resource variable in set. resource variable referred each descriptor binding dictated binding variable , binding decoration of each variable. so far good. confusing part when calling vkupdatedescriptorsets . struct vkwritedescriptorset has element dstbindng is descriptor binding within set. i'm confused whether dstbindng 's value must same binding number used decoration in var

angularjs - Badident error when using "as" in ng-repeat -

i have following code filters through table of results: <strong>clients [ {{ results.length }} ]</strong> <thead ng-show="clientsearch"> <tr> <th><i class="fa fa-search"></i></th> <th class="search-box"> <input type="text" placeholder="search name" ng-model="searchresult.firstname"> </th> <th class="search-box"> <input type="text" placeholder="search surname" ng-model="searchresult.lastname"> </th> <th class="search-box"> <input type="text" placeholder="search address" ng-model="searchresult.address"> </th> <th class="search-box"> <input type="text"

php - ( (Where and Where) OR (Where and Where) ) Laravel 5.2 -

i trying create ( (where , where) or (where , where) ) , after lot of searching found $sender = \app\user::where('username','=',$username)->firstorfail(); $receiver = auth::user(); $messages = \app\message::where(function($query) { $query->where("sender",$sender->id) ->where("receiver",$receiver->id); }) ->orwhere(function($query) { $query->where("sender",$receiver->id) ->where("receiver",$sender->id); }) ->get(); but it's showing me $sender , $receiver variables undefined , please , i'm trying show messages of both users, thought can first (wher

javascript - My required field message not showing in proper place -

Image
the above pic resultant screen both , fields mandatory required message showing somewhere else in dom. how can show besides correct field? here gsp <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>report</title> <script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js'></script> <script type="text/javascript"> angular.module("todo", []); function hidecriteria(){ var index = document.getelementbyid('search_criteria').selectedindex if(index=='0'){ document.getelementbyid('employeeidsearch').style.display = 'none' document.getelementbyid('billdatesearch').style.display = 'none' document.getelementbyid('bankdatesearch').style.display = 'none' document.getelementbyid('employeeidsearch').value = 

posix - Convert Date-Time to Milliseconds - C++ - cross platform -

i want convert string in format of "20160907-05:00:54.123" milliseconds. know strptime not available in windows , want run program in both windows , linux. can't use third party libraries well. can tokenize string , convert it. there more elegant way using strptime so? given format of string, easy parse follows (although regex or get_time might more elegant): tm t; t.tm_year = stoi(s.substr(0, 4)); t.tm_mon = stoi(s.substr(4, 2)); t.tm_mday = stoi(s.substr(6, 2)); t.tm_hour = stoi(s.substr(9, 2)); t.tm_min = stoi(s.substr(12, 2)); t.tm_sec = 0; double sec = stod(s.substr(15)); finding time since epoch can done mktime : mktime(&t) + sec * 1000 note fractional seconds need handled differently - unfortunately, tm has integer seconds . (see full code here .) edit as mine , panagiotis kanavos correctly note in comments, visual c++ apparently supports get_time quite while, , it's shorter (note fractional seconds need handled same way, t

oop - When do we return values in PHP functions? -

sorry question don't understand how works: class person { public static $age = 1; public function havebirthday() { static::$age +=1; } } $joe = new person; $joe->havebirthday(); echo person::$age; what i'm not understanding this: public function havebirthday() { static::$age +=1; } isn't supposed return $age otherwise value lost? why still working? thanks! you've defined static , means class level variables instead of instance level. so when call $joe->havebirthday(); updates class level variable of person class can accessed using person::$age; . static variables not need returned, can access directly class.

html - How can I use the exact width of wrapped text rather than that of the full container? -

Image
i have text constrained particular width, wraps. want display border around wrapped text . when add border, wraps text plus unused space around it . there way apply border just text? here's illustration of mean: have drawn red line want right-hand edge of element be: html: <div> supercalifragilistic expialidocious </div> css: div { max-width: 200px; display: inline-block; border: 1px solid black; } jsfiddle could work short text. combining attr() , pseudo . .outer { width: 200px; background-color: #ccc; border: 1px solid black; display: inline-block; } .inner { display: inline; position:relative; } .inner:before { content: attr(data-text) " "; color: transparent; position: absolute; left:0;top:0; border: 1px solid red; pointer-events: none; } <div class="outer"> <div class="inner" data-text="supercalifragilistic expialidocious&

cors - Why does my JavaScript get a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error when Postman does not? -

i trying authorization using javascript connecting restful api built in flask . however, when make request, following error: xmlhttprequest cannot load http://myapiurl/login . no 'access-control-allow-origin' header present on requested resource. origin 'null' therefore not allowed access. i know api or remote resource must set header, why did work when made request via chrome extension postman ? this request code: $.ajax({ type: "post", datatype: 'text', url: api, username: 'user', password: 'pass', crossdomain : true, xhrfields: { withcredentials: true } }) .done(function( data ) { console.log("done"); }) .fail( function(xhr, textstatus, errorthrown) { alert(xhr.responsetext); alert(textstatus); }); if understood right doing xmlhttprequest different domain page on. browser blocking allows request in same origin securi

box2d & canvas and that's all -

my goal draw physics bodies without createjs, in other terms want draw canvas api. here link exellent work box2dweb , createjs. i want without createjs file . can draw blue line, transform in physics red line, delete blue line. my code doesn't work if draw blue line. make work have destroy physics body. i can draw 1 line (shape) want able draw unlimited number of shapes. i'm sure possible simple way. the createjs code: http://jsdo.it/masasgames/ozhb var b2vec2 = box2d.common.math.b2vec2; var b2bodydef = box2d.dynamics.b2bodydef; var b2body = box2d.dynamics.b2body; var b2fixturedef = box2d.dynamics.b2fixturedef; var b2fixture = box2d.dynamics.b2fixture; var b2world = box2d.dynamics.b2world; var b2polygonshape = box2d.collision.shapes.b2polygonshape; var b2circleshape = box2d.collision.shapes.b2circleshape; var b2debugdraw = box2d.dynamics.b2debugdraw; var stage = new createjs.stage("canvas"); var world = new b2world(new b2vec2(0, 5), true); var shape;

function - C++: run-time error from a template class -

hi guys have problem program. i'm new c++ , i'm trying code generic programming but, usual, have lot of errors program. i'm trying best don't understand error is. want template class describe method add() take sum, c'tor , compute() make arithmetic average of sum. nadd number of element. thank much! template<typename t> class accumulatormean { public: accumulatormean() : sum(0), nadd(0), media(0) {}; t add(const t& data); t compute(); private: int nadd; t sum; t media; }; template <typename t> t& accumulatormean::add(const t& data) { sum += data; nadd++; return sum; } template <typename t> t& accumulatormean::compute() { media = sum/nadd; return media; } int main() { accumulatormean a; a.add<int>(5); } there few error in here: first: your main should this: int main() { accumulatormean<int> a; a.add(5); } you s

php - How can I insert more than two option tag value in separated select tag to database -

index.php <!doctype html> </html> <body> <form name="fruits" action="selectexec.php" method="post"> <select name="department"> <option value="apple">apple</option> <option value="mango">mango</option> <option value="orange">orange</option> </select> <select name="company"> <option value="asus">asus</option> <option value="lenovo">lenovo</option> <option value="acer">acer</option> </select> <input type="submit" name="submit" /> </form> </body> </html> selectexe.php <?php include_once('pdo-connect.php'); if(isset($_post['submit'])){ $department=$_post['department']; $company=$_post['company']; // sql statements $sql = "insert selectformtbl (department,company)valu

Aurelia Composition -

i trying create composition not getting i'd expect. in every instance i've tried similar setup different wrong gistrun representative far illustrates @ least "something" wrong. i've searched high , low more information on specific functionality , syntax of compose can't seem solve issues. in before mentioned gistrun can see container element not rendered correctly, h1 not rendered , @containerless being ignored. in similar scenarios i've had containerless ignored on compose element resulting in rendering being ignored , i've had entire thing not working named slots. i have feeling i'm doing wrong , can't quite figure out is. if knows i'm doing wrong or can point me solution obliged. part of reason things aren't working expect gist based off of old version of framework. i've updated gist latest version of jeremy danyow's aurelia bundle here: https://gist.run/?id=1b304bb0c6dc98b23f4a3994acc280e4 old ver

build - Gradle - Suppress gradle to create application.xml -

i trying build ear using gradle. i use meta-inf/application.xml present in project. , not have gradle generate 1 me. i tried following code snippet , archive(ear) has 2 application.xml files in meta-inf instead of copied one. ear { into("meta-inf") { from("meta-inf") } } any appreciated. you can put existing application.xml under meta-inf in source folder. if gradle find file won't generate one. can read more behavior in gradle user guide .

javascript - Include global functions in Vue.js -

in vue.js application want have global functions. example callapi() function can call every time need access data. what best way include these functions can access in components? should create file functions.js , include in main.js? should create mixin , include in main.js? is there better option? your best bet plugin, lets add features global vue system. [from vuejs docs] myplugin.install = function (vue, options) { // 1. add global method or property vue.myglobalmethod = ... // 2. add global asset vue.directive('my-directive', {}) // 3. add instance method vue.prototype.$mymethod = ... } then add vue.use(myplugin) in code before calling function. vue.myglobalmethod(parameters); or in case vue.callapi(parameters);

virtualbox - Docker: Looks something went wrong in step Looking for vboxmanage.exe -

i installed docker toolbox on windows 7 machine. after installing run docker quickstart terminal displays following message: looks went wrong in step nlooking vboxmanage.exen... press key continue.... anyone here knows how solve this? regards, solved problem cleaning .bashrc file. more specific, removed cd , makes sense.

javascript - How to zip file before saving original on drive? -

in code p(file path) , can download it function createcsv(){ return mytmp.gettempdir((tmppath) => { return new promise(function (resolve, reject) { let p = path.resolve(tmppath, "snake_case_users33.csv"); var ws = fs.createwritestream(p); csv .write([ {a: "a1", b: "b1"}, {a: "a2", b: "b2"} ], {headers: true}) .pipe(ws); resolve(p); }); }); } but need zip .csv file, either before formatting date, or @ first format .csv file, after zip , save on drive , path. at beginning need create csv : let p = path.resolve(tmppath, "snake_case_users.csv"); var output = fs.createwritestream(p); csv.write([ {a: "a1", b: "b1"}, {a: "a2", b: "b2"} ], {headers: true}); //below let zippath = path.resolve(tmppath, "snake_case_users.zip"); ,

javascript - asp.net webforms : go to previous page using back browser button -

i working on asp.net web forms solution having several pages accessible using navigation bar. have notice that, after having edited fields autopostback enabled, pressing browser's button show previous state of current page instead of showing previous page. the solutions found issue suggest using redirect() in button's click event handler or using javascript detect button click call window.history.back(). first type of solution not acceptable me because don't want have in ui dedicated button backward navigation. second solution did not work me. so, web forms application, right approach make browser's button showing previous page? thanks help!

How many Product Variant I can push to Google Analytics? and how to do that using Tag manager? -

i'm trying push multiple product variants datalayer , using tag manager pushing these variants google analytics premium. i know how many product variants can add datalayer, , best way push them google analytics? thanks in advance limits short answer: can push number of product variants datalayer, , can send number of variants ga. long answer: you main factor limiting number of variants 8kb hit limit size. limits few dozen products (or product variants) per hit, can around sending multiple hits. but, since ga limits 500 hits per session, technically limit of product variants can track in session somewhere between 10-20k. there table aggregation limit of 50k, means product variants below top 50k appear grouped in ga tables 'other'. how track to track multiple products variants, push each datalayer (and ga) separate product, making sure product id/name , other product data common among variants stays consistent, altering 'variant' field

angularjs - Trying to implement autocomplete Chips with Angular Material. Getting cannot read property 'nextTick' of undefined -

i have followed chips demo autocomplete on demo chips angular material . when removing "chip" error: cannot read propery 'nexttick' of undefined. tutorial page throws error. have solution problem? @mark right if want quick workaround add code in angular-material.js file /** @type {$mdutil} */ this.$mdutil = $mdutil; problem: $mdutils being passed constructor not being saved on this. for reference take issue the commit fixes issue a3b3e7b available in next release.

php - Incorrect integer value: '' for column 'Did' at row 1 -

i have site built 9 years ago , since dedicated server has had many updates, php, myqsl, ect... , database driven site having small issues. know need rebuild it, can issues. when try add product backend, error message: incorrect integer value: '' column 'did' @ row 1 i have column in database called 'did' not sure think. here code add product on backend: <? include("../config.php"); if(isset($_post[are])) { $cid = $_post[cid]; $sid = $_post[sid]; $design_image = $_files[design_image][name]; $dimensionw = $_post[dimensionw]; $dimensiony = $_post[dimensiony]; $model_number = $_post[model_number]; $new_design = $_post[new_design]; $t = time(); function getfileextension($str) { $i = strrpos($str,"."); if (!$i) { return ""; } $l = strle

c++ - CFLAGS not recognised in makefile -

i'm complicating small school assignment uses lambda functions, needs '-std=c++11' in gcc call. output of make file seems show not being added. i'm not having linking problems there no need copy source here. here makefile: cc=g++ cflags= -std=c++11 -i. -wall deps = wordarray.h obj = ayalajl03b.o wordarray.o %.o: %.c $(deps) $(cc) -c -o $@ $< $(cflags) l03b.out: $(obj) $(cc) -o $@ $^ $(cflags) .phony: clean clean: rm -f -v *.o rm -f -v *.out here output: [user@server lab03]$ make g++ -c -o wordarray.o wordarray.cpp wordarray.cpp:28:77: warning: lambda expressions available -std=c++11 or =gnu++11 counter([](char a)->bool{return !isvowel(a) && !isdigit(a) && isalpha(a);}, worount].word); please me understand i'm doing wrong. your rule %.o: %.c $(deps) but compiling .cpp file. the implicit make rule .cpp source files used. either change rule %.o: %.cpp $(deps) or set c

ruby on rails - Can't figure out what's wrong with this error: syntax error, unexpected tLABEL, expecting '=', in my Rspec test? -

i getting error: comments_controller_spec.rb:12: syntax error, unexpected tlabel, expecting '=' ...ate, post_id: post.id, comment: attributes_for(:comment)}.to... ^ when running spec file comments_controller_spec.rb: require 'rails_helper' describe commentscontroller describe "post #create" comment = create(:comment) post = comment.post "properly creates comment" expect{post :create, post_id: post.id, comment: attributes_for(:comment)}.to change(comment, :count).by(1) end end end which can gather reading other posts haven't closed block or hash. i've been looking on again , again , can't find isn't closed properly. seems pointing post method source of problem, believe have passed in of it's arguments. i'm not sure else wrong. can tell going on here? help. updated: i changed test this: it "properly creates comment" expect {post(:

Swift correct break multi-layer switch -

i'm rewriting code java swift , need break multi-layered switches right way. in java looks : block0 : switch (topswithch) { case one: { switch (innerswitch) { case insidecase: { if (something){ break block0; } // etc so, i'm breaking 1 switch another. how do in swift ? this it'd in swift. did in playground hardcoded values variables: let topswitch = 1 let innerswitch = 4 let 1 = 1 let insidecase = 4 let = true block0 : switch (topswitch) { //first switch labeled "block0", switching on topswitch case one: //topswitch 1, 1 one switch (innerswitch) { // switching on innerswitch case insidecase: // both 1 if (something){ // if true break block0; // break "block0" } default: break // else } default: break // else }

electronics - converts numeric values into electric signals? -

suppose, enter 15 in computer. numeric value. how computer can convert numeric value electric signals like: 1 -> true-> pass electricity 0 -> false -> don't pass electricity experts numeric value converted in binary. think 1 thing, computer electric machine , there flow of electron, nothing else. how type of machine can convert number electronic signal? if cannot understand question ask me. there plenty of literature , ressources on how computer works. try wikipedia, youtube, google find suits level of understanding. for question alu might of special interest: https://en.wikipedia.org/wiki/arithmetic_logic_unit also read memory, control unit , transistors. a computer nothing combination of memory, processors , data busses. super miniaturized electronic circuit. a modern cpu alone comprises 3-5 billion!!! transistors. you can store logic states (bits) https://en.wikipedia.org/wiki/flip-flop_(electronics) compare them https://en.wikipedia.org/