Posts

javascript - How to run controller code after scope is compiled -

i have router runs controller when go url: #/create . have configured so: $routeprovider .when("/create", { templateurl: "templates/create", resolve: { form: function () { return { fields: [] }; } }, controller: "createcontroller" }) and inside controller load of components asynchroniously inside services , assign respective scope property. .controller(function ($scope, service /* other components */) { // code console.log($scope); // gives $rootscope service.get().load([["forms"]], $scope); // reaso passing scope service assign loaded data }) sometimes when refresh page have request modules, not have them assigned scope. after lots of debugging have found out problem. running trouble when template not compiled , instead of $scope getting $rootscope , modules assigned other/incorrect scope. question here is, how can run controller code after s...

Refresh QueryTable throwing "General ODBC error" - VBA Excel 2011 for Mac -

edit: new mistake found? i may have found out why script wouldn't work anymore. there has been office update , seems have implemented microsoft query gets rid of odbc-manager installed , configured needs. actual problem may microsoft query doesn't have unicode-library , don't know put them microsoft query read/get them. or rather don't know how give microsoft query path unicode-library in manager there no possibility change it, or maybe there , didn't find it? in addition cannot open microsoft query manager unless open directly excel workbook. original question this code worked time. exact same code runtime error. here asked in case , got work. here's code: sub connectsql() dim connstring string dim slogin string dim qt querytable slogon = "uid=*;pwd=*;" sqlstringfirma = "select * gi_kunden.tbl_firma" sqlstringperson = "select * gi_kunden.tbl_person" connstring = "odbc;dsn=kundedb;...

web services - tWebService component - NullPointerException - createPropertyMapper -

i've problem twebservice talend component, impossible me find solution my job i have many ws call in job. can call , response 1 simple ws (2 string param, , 2 string response) but, other ws, more complex (string , object param, , string , object response), twebservice failed. looks ws not call, problem seems talend. mapperfactory failed createpropertymapper. aim moment call ws static parameters , log response tlogrow component stacktrace exception in component twebservice_9 java.lang.nullpointerexception @ org.talend.webservice.mapper.mapperfactory.createpropertymapper(mapperfactory.java:406) @ org.talend.webservice.mapper.mapperfactory.createcomplextypemapper(mapperfactory.java:339) @ org.talend.webservice.mapper.mapperfactory.createtypemapper(mapperfactory.java:220) @ org.talend.webservice.mapper.mapperfactory.createpropertymapper(mapperfactory.java:423) @ org.talend.webservice.mapper.mapperfactory.createcomplextypemapper(mapperfactory.java:339) ...

php - Laravel relationships on a table with two types of flags -

i have 2 tables products , users both of objects has images associated in table images the schema images table id | image_id | resource_id | flag 1 | 567575 | 1 | user 2 | 423423 | 1 | product based on flag identifying whether users image or whether products image. if need eager load users image how do it? user model <?php namespace app\entities; use illuminate\database\eloquent\model; class user extends model implements transformable { use transformabletrait; protected $table = 'users'; protected $primarykey = 'users_id'; public function images() { return $this->hasmany('app\entities\image','resource_id'); } } product model <?php namespace app\entities; use illuminate\database\eloquent\model; class product extends model implements transformable { use transformabletrait; protected $table = 'products'; protected $primarykey = 'products_id';...

changing spinners value based on other spinners from mysql database (Android) -

can point me tutorials or guides on this. how update value of 1 spinner based on selection of previous spinner. data values coming mysql database. have searched around have not found satisfactory answer. pls help. spinner = (spinner) findviewbyid(r.id.spinner); spinner.setonitemselectedlistener(spinnerlistener); spinner2 = (spinner) findviewbyid(r.id.spinnersportcentername); spinner2.setonitemselectedlistener(spinnerlistener); from above have 2 spinners. right im getting data database. , code below. getting data. need update value of second spinner based on item selected in first spinner. how do that? pretty clueless right now. private void getdata(){ //creating string request stringrequest stringrequest = new stringrequest(facilityconfig.data_url, new response.listener<string>() { @override public void onresponse(string response) { jsonobject j = null; try { ...

swift - Read NFC (Mifare Classic 1K) with CryptoTokenKit -

Image
i'm trying read/write milfare classic 1k nfc card (supplied factory) using acr122. can detect card, cannot communicate it. i have been searching web days trying find kind of documentation on (without success). i know these cards encrypted surely there default password or way reset card? here's have far: card.beginsessionwithreply { (result, error) -> void in print("began card session: \(result) \(card.valid) \(card.currentprotocol)"); let aid : [uint8] = [0xff, 0x86, 0x00, 0x00, 0x05, 0x01, 0x00, 0x00, 0x0, 0x00]; var data = nsdata(bytes: aid, length: aid.count) card.transmitrequest(data, reply: { (data, error) -> void in print("transmit: data: \(data) error \(error)"); }) data = "hi".datausingencoding(nsutf8stringencoding)!; card.sendins(0xff, p1: 0x00, p2: 0x00, data: data, le: nil, reply: { (data, uint, error) -> void in if let e = error...

drag and drop in flash cc 2015 with createjs -

can know how simple drag , drop in flash canvas createjs ? this.circle.addeventlistener("pressmove", fl_mouseclickhandler_2.bind(this)); function fl_mouseclickhandler_2() { // start custom code // example code displays words "mouse clicked" in output panel. evt.target.x = evt.stagex; evt.target.y = evt.stagey; } thanks