Posts

Showing posts from September, 2011

design patterns - javascript polymorphism refactoring -

i have object maps properties functions, this: var objfunctions = { prop1: func1, prop2: func2, prop3: func3, }; now, need valid prop name call adequate function, example var callfuncprop = 'prop1' objfunctions[callfuncprop]('value1'); this works fine, however, let's new function came up, , needs additional arguments. dynamically calling function additional arguments means other functions receive them objfunctions[callfuncprop]('value1', 'value2', 'value3'); // calls func1 defined 1 parameter this works, have problem kind of design. how refactor code can still dynamically call functions pass additional arguments functions expects them ? avoid switch statement...

Google analytics vs Adwords conversions -

i wonder if can help. we have ecommerce site. integrate both paypal , worldpay our payments, , have added both secure.worldpay.com , paypal.com list of referral exclusions in analytics. have added adwords conversion tracking receipt page of our checkout process. the problem experiencing conversions being shown in adwords, not same analytics telling us. if take monday example. had 14 orders. adwords tells converted 13 of orders, yet analytics attributes 7 cpc , 7 organic. we find ourselves in awkward position dont know google product trust! spend more on adwords believing converts of our orders, or spend less considering accounts 50% of conversions! we have 1 final weird issue, whereby every ecommerce data not sent analytics. there anyway of getting ecommerce tracking data call check if there error? many in advance dotdev google adwords , google analytics measure conversions in different ways. google adwords tracks clicks on ads, , when coupled google analytics

php - Join query in Moodle only returns last column only while mysql returns correctly -

Image
i have 2 tables in moodle database such equiz_details , equiz_responses follows: mdl_equiz_details: mdl_equiz_details i have used join query fetch result desired form follows: select distinct ed.quizid,ed.questionnumber,ed.questiontext,ed.optiontext1,ed.optiontext2,ed.optiontext3,ed.optiontext4, ed.correctanswer,er.studentanswer `mdl_equiz_details` ed inner join `mdl_equiz_responses` er on ed.quizid = er.quizid , ed.questionnumber = er.questionnumber , er.studentid=4 , er.quizid=25 i fired query in mysql database annd got result follows: result in mysql i using same query inside moodle page , try fetch result follows:: <?php require_once('../../config.php'); global $db; $quizresdetails = $db->get_records_sql("select ed.quizid,ed.questionnumber,ed.questiontext,ed.optiontext1,ed.optiontext2,ed.optiontext3,ed.optiontext4, ed.correctanswer,er.studentanswer {equiz_details} ed inner join {equiz_responses} er on ed.quizid = er.quizid , ed.questio

android.app.Fragment$InstantiationException: Trying to instantiate a class ScannerFragment that is not a Fragment -

i updated few libraries in app.gradle support library 22.2.0 -> 23.0.0 , versions of few third party libraries, , i'm getting following runtime error in 1 particular activity: java.lang.runtimeexception: unable start activity componentinfo{com.example.shubhamkanodia.bookmybook/com.example.shubhamkanodia.bookmybook.addbooksactivity_}: android.view.inflateexception: binary xml file line #155: error inflating class fragment @ android.app.activitythread.performlaunchactivity(activitythread.java:2339) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2413) @ android.app.activitythread.access$800(activitythread.java:155) @ android.app.activitythread$h.handlemessage(activitythread.java:1317) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:135) @ android.app.activitythread.main(activitythread.java:5343) @ java.lang.reflect.

ios - Sort UITableView content (Address Book) alphabetically -

below using retrieve contacts list device. want displayed alphabetically using other examples seen on stack overflow have been unable work. code below tutorial, need sort according alphabetical order? - (void)getpersonoutofaddressbook { //1 cferrorref error = null; abaddressbookref addressbook = abaddressbookcreatewithoptions(null, &error); if (addressbook != nil) { nslog(@"succesful."); //2 nsarray *allcontacts = (__bridge_transfer nsarray *)abaddressbookcopyarrayofallpeople(addressbook); //3 nsuinteger = 0; (i = 0; < [allcontacts count]; i++) { person *person = [[person alloc] init]; abrecordref contactperson = (__bridge abrecordref)allcontacts[i]; //4 nsstring *firstname = (__bridge_transfer nsstring *)abrecordcopyvalue(contactperson, kabpersonfirstnameproperty); nsstring *lastname = (__bridge_transfer nss

excel - Find duplicates and delet them while conserving the rest of the data and associated column -

i have excel file containing list of articles , references need work arranged ways: matched: article: barcode: code: aa01123 aa01123 23459544 4533 aa06789 kk01234 30493282 45643 bb20443 aa06789 12304123 453 cc30313 bb20443 12123434 646453 dd22890 cc30313 12341344 433245 jh01241 12312312 4324 /end dd22890 34343442 22244 gf06789 12341434 24621 xy12306 12341213 2344 /etc../ the matched column articles have been treated, , article contain complete list of both article have been treated (so ones in matched column) , 1 still need work on. i'd substrate 1 in matched complete list remains ones have treat. i need function find duplicate between matched , article , delete them corresponding barcode , code . don't need sort other column barcode , code need keep them aligned corresponding articles. it give this: matched: a

digest error on sucess() over then() angularjs with typescript -

i created angular js service in typescript post file , when successful used alert() notify user. uploadfiletourl = (file, uploadurl) => { var fd = new formdata(); fd.append('file', file); this.$http.post(uploadurl, fd, { transformrequest: angular.identity, headers: { 'content-type': undefined } }) .success(() => { alert("file uploaded"); }) .error(() => { alert("some error occured."); }); } i can debug code , verify call indeed successful, when call returns, shows success , theres digest error if return promise service , in controller use then() , works fine. uploadfiletourl = (file, uploadurl) => { var fd = new formdata(); fd.append('file', file); return this.$http.post(uploadurl, fd, { transformrequest: angular.identity, headers: { 'content-type': undefined } }) } i wanted know problem success() , if then() s

c++ - Converting binary to hex: error only on 2-7 -

i'm converting 4digit binary single digit hex using basic switch-case statement , code not run digits 0010-0111 reason , have no idea why. here have: void binhex() { int binin; cout << "enter binary(####): " << endl; cin >> binin; switch(binin){ case 0000: cout << "hex: 0" << endl; break; case 0001: cout << "hex: 1" << endl; break; case 0010: cout << "hex: 2" << endl; break; ... } } all numbers 0,1,8-15 work fine middle numbers not. ideas on causing error out/not run? this case: case 0010: cout<<"hex: 2\n"; break; will not fire binin == 10 . fire binin == 8 , because 0010 octal literal. drop leading 0 s value gets interpreted decimal literal instead.

Using Electron vs. Offline HTML5 for an offline application -

when looking electron , offline html5, have found difficult make decision between 1 use project. assuming user have go website download electron application, , have go same website offline html5 loaded, pros , cons between using 1 on other? some think of: offline html5 can updated without user consciously updating application making user go online page again. electron eliminate need code around multiple browser/browser version dependencies , quirks it depends on exact requirements. following list of came with: electron supports module system (i.e. require ) both in main , renderer processes. electron provides access os apis (e.g. fs ). without such many node modules not work in js runtime of browser (e.g. ip ). updating app electron easy sending http request. (or better described here ) an html 5 offline app requires browser , user might give ie6 . electron integrates native desktop environment (see dialog , power-save-blocker , shell or app examples) e

javascript - Filter as you type, search for name of Div ID -

any expert out there know if there search jquery plugin allows filter type in search box , search based on name of div id? also if instant refresh filter best. very broad question , not sure mean. input meant search div itself? in case, use few lines of jquery search. have included example below. https://jsfiddle.net/cshanno/m0pchv1j/1/ jquery $('#search').keyup(function(){ var input = $(this).val(); $('div').each(function(i) { if (input === $(this).attr('id')) { $(this).addclass('show'); // run code after find div } else { $(this).removeclass('show'); // else whatever } }); });

wordpress - Redirect only the homepage for IE users using .htaccess -

i in process of creating wordpress site , have issue internet explorer. homepage gets jacked because of image slider. fix issue have created alternate homepage doesn't have image slider in it. trying figure out how redirect current homepage ( http://whencancercomesback.com/wordpress ) alternate homepage ( http://whencancercomesback.com/wordpress/index.php/alt-home/ ) ie users (6-10). .htaccess keep having adjust functions php file. below current .htaccess code. thanks! # begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^contactform - [l,nc] rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress instead of redirect better target these browsers ("mainly ie 8 , 9") using conditional comment , serve additional snippet of css hides element in these browsers. in head of homepage, after main css file: <!-

json - REST: Updating Multiple Resources With One Request - Is it standard or to be avoided? -

a simple rest api: get: items/{id} - returns description of item given id put: items/{id} - updates or creates item given id delete: items/{id} - deletes item given id now api-extension in question: get: items?filter - returns item ids matching filter put: items - updates or creates set of items described json payload [[ delete: items - deletes list of items described json payload ]] <- not correct i being interested in delete , put operation recycling functionality can accessed put/delete items/{id}. question: common provide api this? alternative: in age of single connection multiple requests issuing multiple requests cheap , work more atomic since change either succeeds or fails in age of nosql database change in list might have happend if request processing dies internal server or whatever due whatever reason. [update] after considering white house web standards , wikipedia: rest examples following example api purposed: a simple rest api: get: i

qt - Return response of GET request from c++ to QML string -

i'm trying simple request (with modified user-agent), return response qml , json parsing. actually returns page content when loading complete doesn't return qml. sorry noob question. i'm new language , i'm trying learn :) here's code: home.qml function getrequest() { [...] console.log('request...') var jsonresult = json.parse(connectnet.connecturl("http://myurl.com/index.php").tostring()) lboutput.text = jsonresult.predictions[0].description.tostring() } } connectnet.cpp #include "connectnet.h" #include "stdio.h" #include <qdebug> #include <qnetworkrequest> #include <qnetworkreply> #include <qnetworkaccessmanager> #include <qurl> connectnet::connectnet(qobject *parent) : qobject(parent) { } void connectnet::connecturl(qstring url) { qnetworkaccessmanager *manager = new qnetworkaccessmanager(); qnetworkrequest request; qnetworkreply *reply = null; reque

http - chart.apis.google.com returns error 400 -

yesterday have run extensive dns tests namebench , since current dns server giving me lots of problems. problem resulting google charts failing load. never happened me, though. looked @ source html page returned namebench, , opened links graphs, , return http error 400. one sample url: http://chart.apis.google.com/chart?chxt=y%2cx%2cx&chd=e%3aeme8fxfefffqfwfxfxfzf9gegggkglgogqgrgsgsgtgwgygcgdgdgdgeghgigjglgqgqgqgqgvgwgxgxg0g0g0g1g2g4g5g7g9g-g-hahahehghkhlhmhmhnhphrhwhwhyhyhzhahehihihjhkhkhlhmhnhnhohohphqhshththuhwhxhyhzhzh0h1h2h2h7h9h9h-h-h.h.iaiaibibicidieigihilinininioiqiririsiwiwiziaididihiiiiiliminioiqiqisisiwiyiyizi0i0i4i4i8i9i.jbjbjbjcjcjcjcjgjgjhjjjkjmjpjrjsjujujxjxjyjyjzjajbjdjdjejfjgjgjnjojpjpjpjqjsjsjtjujvjvjxjzj3j7j-j-j.kakakbkckckdkekfkfkgkiklkmkmkokpkqkqkrksksksktkukvkwkxkakakckjkjkmkrksktkukxkzkzk2k3k3k4k4k5k6k7lalalblblelflglhlililmlolplrlvlvlalaldleljlplplrlslvlxlzlzl1l4l4l6l6l8l-mbmbmbmcmgmhmimjmjmlmumwmamcmcmcmgmimimmmomqmvmym2m2m5m7m8m8m-m.nanmnzndnonqnrn

Paypal Adaptive Chained Payment - Set Primary Receiver Payment Type -

i'm using adaptive payments on website. when buyer purchases product 1 of merchants, commission , seller gets rest of profit. the issue payment seller receives of payment type services, instead of goods. when happens, sellers lose seller protection. i have tried setting paymenttype property of reciever class no luck, transaction still comes seller paymenttype services. please advise. can set receiver paymenttype = goods possible? thanks! receiverlist receiverlist = new receiverlist(); decimal merchantfee = new decimal(0.04); decimal basecommission = (orderamount * merchantfee); double finalcommission = convert.todouble(basecommission); finalcommission = globalhelper.roundup(finalcommission, 2); receiverlist.receiver = new list<receiver>(); receiver primaryreceiver = new receiver(); primaryreceiver.amount = orderamount; primaryreceiver.email = primaryrecieveremail; primaryreceiver.

Find the date given the year, the month and the "nth" occurrance of day within the month C/C++ -

in order device (with limited memory) able manage own timezone , daylight savings, i'm trying calculate daylight savings triggers 85 time zones based on simplified description of each timezone. have access minimal c , c++ libraries within device. format of timezone (inc. dst) description each time zone follows: utc - base time , date system clock gmtoffsetminutes - offset gmt dst inactive dstdeltaminutes - modifier above dst active (as applicable tz) dststartmonth - month in dst becomes active dststartnthoccurranceofday - nth occurrence of day name in month dstdayofweek - sun = 0 through sat = 6 dststarthour - hour @ dst becomes active dststartminute - minute @ dst becomes active and corresponding endmonth, endnth..., endhour, endminute i have found numerous examples going other way, i.e. starting date, involve using modulus, keeping remainder , dropping quotient hence have been unable transpose formula suit needs. i tried reuse standard "jan = 6, feb = 2,

ASP.NET Core 1.0 WebSocket Setup? -

i'm struggling find example setup websockets in asp.net core 1.0; seem previous versions of asp.net , rely on properties don't seem exist under context (for me). main documentation has placeholder too. http://docs.asp.net/en/latest/ for example: app.usewebsockets(); app.use(async (context, next) => { if (context.iswebsocketrequest) { websocket websocket = await context.acceptwebsocketasync(); await echowebsocket(websocket); } else { await next(); } }); doesn't work because iswebsocketrequest doesn't exist now. correct approach in asp.net core 1.0? after disassembly looks been moved around little; , there new websocketmanager app.usewebsockets(); app.use(async (context, next) => { var http = (httpcontext) context; if (http.websockets.iswebsocketrequest) { websocket websocket = await http.websockets.acceptwebsocketasync(); } }); also turns out because there compile

Go channels: why two different outputs? -

i'm trying understand channels in go. here code example: package main import "fmt" func main() { m := make(map[int]string) m[2] = "first value" c := make(chan bool) go func() { m[2] = "second value" c <- true }() fmt.printf("1-%s\n", m[2]) fmt.printf("2-%s\n", m[2]) _ = <-c fmt.printf("3-%s\n", m[2]) fmt.printf("4-%s\n", m[2]) } sometimes output of above code (result 1): 1-first value 2-first value 3-second value 4-second value but got (result 2): 1-first value 2-second value 3-second value 4-second value after changing c := make(chan bool) c := make(chan bool, 1) , same occurred: result 1, result 2. why? your results makes perfect sense. go routine run independent of each other, never know when go routine start executing. line m[2] = "second value" is executed reflected on main go routine. hence when above

Access multidimensional list value by tuple of indices in python -

i have complex multidimensional utterable object (say, list). want write function access value of element represented tuple of indices. number of dimensions variable. should return none if element not exist: l = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] access(l, (0, 0, 0)) # prints 1 access(l, (0, 1, 1)) # prints 4 access(l, (1, 1)) # prints [7, 8] access(l, (0, 1, 2)) # prints none access(l, (0, 0, 0, 0)) # prints none how achieve this? you can using reduce() : def access(obj, indexes): return reduce(lambda subobj, index: subobj[index] if isinstance(subobj, list) , index < len(subobj) else none, indexes, obj) or pointed @chepner, can use def make more readable: def access(obj, indexes): def _get_item(subobj, index): if isinstance(subobj, list) , index < len(subobj): return subobj[index] return none return reduce(_get_item, indexes, obj)

c++ - How to correctly specify the copy constructor -

assume have class matrix, constructor follows: matrix::matrix(int rows, int cols) { nrows = a; //here nrows number of rows each matrix ncols = b; //here ncols number of cols each matrix p = new double [rows*cols]; for(int i=0;i<rows*cols;i++) { *p++ = 0.0; } } suppose have 'copy' constructor follows: matrix::matrix(const matrix& mat) { p = new double[mat.nrows*mat.ncols]; for(int i=0;i<mat.nrows*mat.ncols;i++) { p[i] = mat.p[i]; } } now suppose have following lines in main function: int main() { matrix a(2,2); matrix b(2,2); = matrix(b); //call overloaded assignment operator, , copy ctor/ } here '=' operator overloaded assign elements in b a. issue once call copy constructor made, matrix object new object. is there better way of writing copy constructor if matrix exists calling = matrix(b) results in error? instead of

c++ - Qt moving a QWidget without triggering the moveEvent method? -

i trying set widget remain fixed @ location created , never move. doing setting position old position in overridden moveevent method. problem way move to...call move , triggers moveevent , entering infinite loop. there way set position directly , bypass events? bool m_firsttimemove; // class member qmywidget qmywidget::qmywidget(qobject* parent) : qwidget(parent), m_firsttimemove(true) { } void qmywidget::moveevent(qmoveevent* event) { if (m_firsttimemove) { onlyforfirsttimemove(); // 1 time move action m_firsttimemove = false; } event->accept(); }

iOS(Swift) App hangs after calling a struct's static var -

so i've got subclass of nsobject in implemented this: struct sharedstruct { static var sharedinstance = taskcoordinator() } class var sharedinstance:taskcoordinator { { return sharedstruct.sharedinstance } set { sharedstruct.sharedinstance = newvalue } } when call anywhere, app hangs without error. known issue or doing wrong here? maybe kind of loop, did halt execution , @ stack?

javascript - The web application do not function properly after using the sencha build command -

i using asp.net mvc4 back-end , extjs 4.2.1 front-end. after finish developing, use sencha app build of sencha cmd pack front-end code production. working ok, when press 1 specific button in web app, there error indicating "e.redraw() not function". in development environment, works properly. so, wonder why error occur because did not change section of code. i did not obey scaffolding of sencha cmd(sencha -sdk pathtosdk generate app test pathtoapp, add models, views or controller using specific command) below workflow: when develop, follow best practice of extjs's official documentation. using sencha -sdk pathtosdk generate app test pathtoapp generate template app. , create every view , controller using sencha generate controller testcontroller , sencha generate view testview command. copy content of previous file newly created files. did not models' file, because model file has created sencha generate model id:int, name me not practical because have 30

linux - How to run multiple composed commands (with multiple arguments) in gnu parallel? -

i want run following scripts different input arguments using gnu parallel in parallel: rscript svmrscript_v2.copy.r 0.1 1 #(1) 0.1 , 1 input arguments rscript svmrscript_v2.copy.r 0.1 2 #(2) rscript svmrscript_v2.copy.r 0.1 5 #(3) rscript svmrscript_v2.copy.r 0.1 10 #(4) so wanna run 'commands' (1),(2),(3),(4) in parallel using gnu parallel. my best guess parallel rscript < svmrscript_v2.copy.r ::: 0.1 1 ::: 0.1 2 ::: 0.1 5 ::: 0.1 10 i know entirely wrong , i'm getting following error: fatal error: cannot open file ':::': no such file or directory . any suggestion need change? thanks in advance. the obvious is: parallel rscript svmrscript_v2.copy.r 0.1 ::: 1 2 5 10 but have feeling might want 0.1 , 0.2 later: parallel rscript svmrscript_v2.copy.r ::: 0.1 0.2 ::: 1 2 5 10 if order of arguments wrong: parallel rscript svmrscript_v2.copy.r {2} {1} ::: 0.1 0.2 ::: 1 2 5 10 did have chance watch the intro videos , walk throu

python - Using datetime and dateutils to calculate a journey -

i using dateutils forecast arrival time on journey. i can represent start time datetime object. that's nice. i can represent journey_time timedelta. that's nice problem : what's unclear me how shall represent meeting time applies weekday? considerations : if use datetime object, have declare meeting time particular date. means have update every day. rather tedious. i'd prefer notation allows me "any {mon,tue,wed,thu,fri,sat,sun}-day" @ '09:00:00' pseudo example import datetime import dateutils # setting start time datetime object. start = '2015-08-19t08:00:00' # going home work: mondays = 3000 # seconds timedelta. arrival = start + journey_time # calculating arrival time. # recording first meeting... meeting = '09:00:00' # <--------------how should represent value? arrival < meeting: # <------------- important check. # should return true, if can make it. i suggest represent meeting time datet

asp.net - Could not load file or assembly 'DotNetOpenAuth.Core' Version=4.1.0.0 -

i keep getting error message whenever try run web forms application. could not load file or assembly 'dotnetopenauth.core, version=4.1.0.0, culture=neutral, publickeytoken=2780ccd10d57b246' or 1 of dependencies. system cannot find file specified. i these details in assembly binding log: assembly manager loaded from: c:\windows\microsoft.net\framework\v4.0.30319\clr.dll running under executable c:\program files (x86)\iis express\iisexpress.exe --- detailed error log follows. === pre-bind state information === log: displayname = dotnetopenauth.core, version=4.1.0.0, culture=neutral, publickeytoken=2780ccd10d57b246 (fully-specified) log: appbase = file:///e:/myapplication/ log: initial privatepath = e:\my\re subversion\my application v2\myapplication\bin calling assembly : microsoft.aspnet.membership.openauth, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35. === log: bind starts in default load context. log: using application configuration

mysql - PHP search SQL data base -

i have mysql database on domain, made table called accountinformation. in table things accountid , accountname , firstname , secondname etc. i made php program connects database , able fetch rows , display them, thats not want do. want fetch information row depending on id. pseudo-example : $username string $searchid = 1 $username = fetchrow 'accountid' = $searchid , 'accountname' of row so have username of account id 1 in $username . ok, should you're looking for... /* put value of $number id number want other info from*/ $number = "1"; $sql = mysql_query("select * `accountinformation` `id`='$number';"); $result = mysql_fetch_assoc($sql); echo $result["accountname"];

How to set php ini settings from nginx for just one host -

one can set error_reporting in nginx.conf so: fastcgi_param php_value error_reporting=e_all; but if in 1 server block, affect others well? should change php settings in server blocks simultaneously? you can set php_value per server , affect server only. if need equal php_value servers php, use include files. for example (debian), create /etc/nginx/conf.d/php_settings.cnf : fastcgi_param php_value "upload_max_filesize=5m;\n error_reporting=e_all;"; then include file server or location config need: server { ... location ~ \.php$ { ... include /etc/nginx/conf.d/php_settings.cnf; } ... }

php - Wordpress Search Query - Meta Queries & Custom Fields -

question of ya. have current query running on search page template, , seems working fine if search query seems included in title of post, when include meta query try , in spot search term, doesn't gather results, same results had before. second question, reason still displaying 6 (the number of posts set in wp admin) posts, , not listening query. <?php // wp_user_query arguments $search_term = get_search_query(); $args = array ( 'post_type' => 'courses', 'order' => 'asc', 'orderby' => 'title', 'posts_per_page' => -1, 'nopaging' => true, 's' => '*'.$search_term.'*', 'meta_query' => array( array( 'key' => 'course_id', 'value' => $search_term, 'c

java - Passing Attributes from startElement to EndElement in SAX -

we trying parse xml using sax parser. our environment: java version: 1.7 <wrappercell borderwidth="0.9f" border="no_border" colspan="1"> <phrase font="bold_arial"> <token>1234</token> </phrase> </wrappercell> in our startelement doing below public void startelement(string uri, string localname, string qname, attributes attributes){ if("wrappercell".equals(qname)){ elemenstack.push(attributes); }else if("phrase".equals(qname)){ elemenstack.push(attributes); } } in our endelement wanted refer attributes pushed during startelement public void endelement(string uri, string localname, string qname) throws saxexception { if("wrappercell".equals(qname)){ system.out.println(((attributes)elemenstack.pop()).getlength()); }else if("phrase".equals(qname)){ system.out.println(((attributes)elemenstack.pop()).getlengt

Silverlight to Javascript API -

i started move esri web mapping application silverlight javascript api.i dont know java. silverlight issues pushing me go javascript api. without cannot move. i wanted map display in java. rest code need write vb.net. i added dynamic map through javascript api successfully. write other code in vb.net. trying code behind below imports esri.arcgis.client partial class default2 inherits system.web.ui.page protected sub button1_click(sender object, e eventargs) handles button1.click dim displayextent new esri.arcgis.client.geometry.envelope(23, 34, 33, 44) dynamicmapservicelayer.zoomto(displayextent) end sub end class here getting error below. how can solve this? error 11 reference required assembly 'system.windows, version=2.0.5.0, culture=neutral, publickeytoken=7cec85d7bea7798e' containing base class 'system.windows.dependencyobject'. add 1 project. my default.aspx page design below <%@ page language="vb"

javascript - Blurry background on modal -

Image
how have blurred background instead of white background when popup opened ? add : -webkit-filter: blur(8px); -ms-filter: blur(8px); filter: blur(8px); -moz-filter: blur(8px); -o-filter: blur(8px); on .splash { background-color: rgba(255, 255, 255, 0.9);} blur in fullpage, popup included. can help, here jsfiddle demo: https://jsfiddle.net/kodjoe/dgykn78o give blur properties .wrapper. you'll achieve want. .wrapper{ -webkit-filter: blur(8px); -ms-filter: blur(8px); -moz-filter: blur(8px); -o-filter: blur(8px); filter: blur(8px); }

logging - Can I configure startup and shutdown logs for Spring Boot applications? -

for ability verify startup , shutdown of our spring boot applications want configure startup.log , shutdown.log capturing events bootstrap , shutdown application. for startup to: root webapplicationcontext: initialization completed in {x} ms and shutdown from: closing org.springframework.boot.context.embedded.annotationconfigembeddedwebapplicationcontext@53bd8fca: startup date [wed aug 19 09:47:10 pdt 2015]; root of context hierarchy to end. is container specific? (tomcat vs jetty vs undertow) you can create event listener watches applicationreadyevent , contextstoppedevent , log whatever want. @service public class foo { @eventlistener public onstartup(applicationreadyevent event) { ... } @eventlistener public onshutdown(contextstoppedevent event) { .... } }

c# - Multi nested FirstOrDefault -

i have following model: public class stredisko { public string name { get; set; } public observablecollection<substredisko> pracoviska { get; set; } public observablecollection<substredisko> dohodari { get; set; } } public class substredisko { public string name { get; set; } public string code { get; set; } public vyplatnepasky vyplatnapaska { get; set; } public mzdovenaklady mzdovenaklady { get; set; } public poistne poistne { get; set; } } i trying run super simple linq query should return first element matches following condition: var sstredisko = strediska.firstordefault( n => n.pracoviska.firstordefault(x=>x.name == "somename")); i run condition against: observablecollection<stredisko> strediska however unknown reason (to me) gives me following error: cannot implicitly convert type 'substredisko' 'bool' . what doing wrong? you're looking enumerable.a

c++ - win32 Child EDIT is not modified when typing, but can be modified with mouse (copy/paste) -

i developping win32 application (not mfc). main window includes child dialog, has listview (report mode) control. adding in place editing sub items of listview. that, detect double-click (nm_dblclk) in dialog procedure , create child edit window way: rect rect; listview_getsubitemrect(listview,item,subitem,lvir_bounds,&rect); hwnd edit = createwindowex(ws_ex_clientedge | ws_ex_right, l"edit", l"", ws_child|ws_visible /*|es_wantreturn*/, rect.left, rect.top, rect.right - rect.left, 1.5*(rect.bottom - rect.top), listview, 0, getmodulehandle(null), null); setwindowtextw(edit, buffer); edit_limittext(edit, 12); edit_enable(edit, true); assert(edit != null); setfocus(edit); m_oldeditproc = (wndproc)setwindowlong(edit, gwl_wndproc, (long)editproc); editproc: if(msg == wm_killfocus) { d

angularjs - how to use angular oboe without "oboe is not defined" -

i want use "angular oboe" http requests returning large json. included library , put function in controller, "error: oboe undefined". dont know if miss include other libreĆ­a or may problem. my code var app = angular.module('dataview', ['ngoboe']) app.controller('dataviewctrl', function($scope, oboe){ $scope.oboeget = function(uri) { //in uri pass url retun json $scope.data = []; oboe({ url: uri, pattern: '{timestamp}', start: function(stream) { $scope.stream = stream; $scope.status = 'reading....'; }, done: function() { $scope.status = 'done'; } }).then(function() { // not used }, function(error) { // error }, function(record) { $scope.data.push(record); }); }