Posts

javascript - Nested function and else condition not working -

i practicing js doing project , have run issues (again). upfront, explain want. have top level buttons nation names, on click pic fade container that. gets pic first array on line 1.this works well. however... when container visible, want click handler on "next" button right. handler 1 function (line 29-42) animates second div(.containsnext) changing opacity , rotate values. function calls function (next, should change target div background pics new array) , has if else statement. if condition works supposed to. else condition not run, if take out nested next() function. i think error (console doesn't return one) on next function lines 15 , 16, know lines "funny":-) and if statement in wrapper function not work either. how fix this? please make sure select france, italy or croatia buttons, or next button not respond @ (do not know why either). 1 more question on side, economical way store pics nations arrays selected/triggered next button? how impleme...

javascript - Multiple dynamic maps in same page using maps api v3 -

i have system keep addresses, have loop , return of of them loop script passing id of div , address each one, works, not render correctly maps. can me? http://quax.com.br/clientes/silvaesilva/escritorio i did , ended iframes going right, pass parameter address desire , renderizo in iframe. thank you.

css - How can i set style to QLayout -

i'm trying add stylesheet script using css, looks fine can't set style qlayout. how can change it's background color example of i'm done. def main_style(self): self.setstylesheet(""" .qvboxlayout{ background-color: #616161; } .qmenubar{ background-color: #212121; color: #f5f5f5; } .qmenu{ background-color: #212121; } .qtextedit{ background-color: #424242; color: #f5f5f5; border: 1px #9e9e9e solid; } """) the program running no errors , changes happen except qvboxlayout it's still default

sql server - Importing Large Excel Sheet into SQL -

monthly i'm given spreadsheets need import sql. use sql server import , export wizard , import temp table call stored procedures complete import process. working fine on production server , working fine on development machine until last week when did clean install of windows 10. now, i'm still able import smaller spreadsheets few thousand rows, however, if attempt import data spreadsheets have 500,000+ rows of data takes couple minutes on both "setting source connection" , "setting destination connection" seems hang on "copying". i've checked logs , run sql profiler , see nothing regarding failures. i've let process run upward of hour , killed out, viewed temp table , shows no records imported. data format i'm able import on production server without issue. now here's kicker... i'm able import these large sheets on development server if have spreadsheet open in excel @ same time, (note smaller spreadsheets don't need h...

python 3.x - Print and UnicodeEncodeError -

i know there lots of similar questions, none seem answer question. getting error: print('dimming', device.name, 'to', level) unicodeencodeerror: 'ascii' codec can't encode character '\xe5' in position 3: ordinal not in range(128) if test print character, works: $ python3 python 3.4.3 (default, oct 14 2015, 20:33:09) [gcc 4.8.4] on linux type "help", "copyright", "credits" or "license" more information. >>> print('\xe5') å >>> print('å') å if add .encode('utf-8') outputs dimming b'byr\xc3\xa5' 100 this process running on ubuntu via upstart. how can make output correct character? add env lang=en_us.utf-8 upstart script conf file.

asp.net mvc - Linq to return true or false if a set contains distinct values -

if set returning contains 1 distinct value, return value (string). otherwise, return "multiple". i have set ternary operator , know if can use linq sql determine whether or not set contains distinct value or multiple different values. something following: name = h.namelistings.select(a=>a.nameid).checkfordistinct() ? h.namelistings.select(a=>a.nameid).first() : "multiple" i realize checkfordistinct() not linq method; using explain behavior looking for. var name=h.namelistings.select(a=>a.nameid).distinct().count()==1 ? h.namelistings.select(a=>a.nameid).first(): "multiple"; here's 1 trip database solution, catching exception if there more 1 (may work in english versions -- don't know if exception messages can translated). string result=""; try { result=h.namelistings.select(a=>a.nameid).distinct().single(); } catch(invalidoperationexception ex) { if (ex.message.contains("more one")...

javascript - AngularJS div background color with ngStyle -

one of div s observing background color variable ngstyle. anytime change the value, error. please see below, think more or less consistent example https://docs.angularjs.org/api/ng/directive/ngstyle <div class="item item-divider" ng-style="scorecolor"><b>rate</b>&nbsp;{{score}}</div> <input type="range" name="rate" min="1" max="10" value="5" step="1" ng-model="score" ng-change="changescorecolor(score)"/> $scope.changescorecolor = function(score){ $scope.scorecolor = "{background-color:" + colorfromscore(score) + ";}"; }; typeerror: name.replace not function @ camelcase (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11098:5) @ foreach.css (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11541:12) @ object.jqlite.(anonymous function) [as css] (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11667:9)...