Posts

Showing posts from July, 2012

mysql - Updating a phpmyadmin table through Php using a url varible -

im having problem when trying implement edit page in php. getting items database doesent pose problem, yet trying update tells me have missed field , trying skip check leaves me unedited table. to explain more, there page directs 1 while passing on id (propertyid) veriable , use grab desired variables. can @ code , tell me have done wrong, have prevously got similar page working , getting quite flustered trying figure out why 1 isent. <?php // start sessions include('includes/security.inc.php'); authorise(); if (!isset($_get['propertyid']) || !is_numeric($_get['propertyid'])) { header('location:./houselist.php'); } else { // include connection file include('includes/connection.inc.php'); // details connect(); $propertyid = $_get['propertyid']; $sql = "select * properties propertyid='$propertyid' limit 1"; $result = @mysql_query($sql) or die('unable run query');

windows - Links displaying as full urls -

Image
i through quick wordpress site friend. they're in different state , don't have access friend's device. when goes website sees what's in image below; links displaying full urls. looked @ in ie, chrome, safari, , firefox, , none of them me. setting in browser or in windows show full url? he's not tech savvy, wouldn't have firebug or developer tools installed. happens him in both ie , chrome, i'm wondering if accessibility setting on device. doubt it's theme, i'm willing swap out if is. it looks friend viewing site in way displays print stylesheet information. in chrome, opened developer tools, went emulation, , turned on print styles, , ended this:

css - Angular Material - Missing classes (ex: md-2-line) -

i trying use md-list <md-list-item class="md-2-line"> <md-icon md-svg-icon="communication:phone"></md-icon> <div class="md-list-item-text"> <h3>title</h3> <p>text</p> </div> </md-list-item> but normal font , when search in code classes, can not find them (for example md-2-line seen). i did bower install angular-material assuming in components->list->js->list.css should see these classes in scss on github. what missing? thanks maybe take code actual examples, think 0.9.0-rc2 version. when install bower 0.8.3 latest available. in changelog of 0.9.0-rc1 , 0.9.0-rc2 can see breaking changes in md-list directive. i didn't tested myself, hope helps solve issue, try adding following classes styles: md-list-item.md-2-line, md-list-item.md-2-line > .md-no-style, md-list-item.md-3-line, md-list-item.md-3-line > .md

excel - If VBA multiple conditions -

i have problem vba code , instructions if , have use multi-conditionig, vba, if check condition 4 true ignores other conditions. ((condition 1) or (condition 2)) , (condition 3 or condition 4) needs macro accepts specified options: ((true) or (false)) , (true or false) ((true) or (false)) , (true or true) ((false) or (true)) , (true or false) ((false) or (true)) , (true or true) there real code: if ((raport_glowny.cells(i, r_delivedate_c).value = cdate(arkusz6.deliverydaysms)) _ , (raport_glowny.cells(i, r_deliverytime_c).value >= cdate(arkusz6.deliveryhoursms.value))) _ or ((raport_glowny.cells(i, r_delivedate_c).value = cdate(arkusz6.deliverydaysms) + 1) _ , (raport_glowny.cells(i, r_deliverytime_c).value < cdate(arkusz6.deliveryhoursms.value))) _ , ((raport_glowny.cells(i, r_deliverytime_c).value > 0) _ or (arkusz6.cbsmsforecast = true)) if can grateful

Addition of matching array key params in PHP -

i have following array, in array there same dates key 112. need addition of arrays dates same. array ( [0] => array ( [112] => 2015-02-17 [97] => 20.00 [84] => 13.00 ) [1] => array ( [112] => 2015-02-17 [97] => -5 [84] => 0 ) [2] => array ( [112] => 2015-02-17 [97] => -5 [84] => 0 ) [3] => array ( [112] => 2015-03-17 [97] => 10 [84] => 0 ) [4] => array ( [112] => 2015-03-17 [97] => -5 [84] => 0 ) [5] => array ( [112] => 2015-03-17 [97] => -5 [84] => 0 ) [6] => array ( [112] => 2015-01-17 [97] => 2 [84] => 0 ) [7] => array ( [112] => 2015-01-17 [97] => 13 [84] => 0 ) [8] => array ( [112] => 2015-01-17

C# Excel interop get names all cells of sheet -

on sheet there cells given names. how names of cells in worksheet, given name. trying so foreach(excel.worksheet wsheet in excelpattern.worksheets) { treeview1.nodes.add(wsheet.name,wsheet.name); foreach(excel.name n in wsheet.names){ treeview1.nodes[wsheet.name].nodes.add( n.name); } } but not need i not understand problem correctly needed workbook.names , looking worksheet.names cells names not attached sheet, global cell names you can it // var workbook = ...; foreach(var n in workbook.names) { string name = n.name; // name of cell string ref = n.refersto; // refers cell (sheet1!$e$29) // ... }

angularjs - Create Angular directive that keeps original element's attributes -

i've seen other questions kind of ask this, have unique complication thrown in, , answer seems surprisingly complicated in proportion simplicity of desired result. i'd ask simplest possible version of question. let's have directive looks this: <my-input type="text" placeholder="foo"> i want output this: <input type="text" placeholder="foo" class="bar"> all want output new element , add new attributes, keep original element's attributes. how can achieved? use attribute directive rather element: <input type="text" placeholder="foo" my-directive> and make mydirective add desired new attributes element.

java - MongoDB query update nested list of objects -

i have users table in mongodb format looks this: { "_id" : objectid("id"), "user" : { "id" : "userid", "info" : "user info", "subscriptions" : [ { "subname" : "sub1", "frequency" : 1, "contentid" : "contentid" } ] } } i add subscription object array named "subscriptions." here code looks , doesn't work. jsonparser in case work , returns correct array. querybuilder builder = querybuilder.start("user.id").is("userid"); dbcursor cursor = mongoclient.find(builder.get()) while (cursor.hasnext()){ dbobject user = cursor.next(); basicdblist subscriptions = (basicdblist)jsonparser.parseobject(user

excel - Loop through file names and merge select files -

so i'm new vba , have been hitting head against wall on 3 days now. in sheet4, have list of file names in column c , "file type" in column h (ie. production, test, etc). combobox various file types. i need able select file type combobox , have files file type merged onto different tab review. below code have far it's complete mess , i'm beyond stuck. sub mergefiles() dim rw long dim strsourcepath string dim strfile string dim filename string dim filetype string dim selectedtype string dim r long dim strdata string dim fi worksheet dim wkst worksheet dim lastrow string ' folder path files merged located strsourcepath = sheet1.textbox1.text if right(strsourcepath, 1) <> "\" strsourcepath = strsourcepath & "\" rw = 9 'row number first file name set fi = worksheets("fileinfo") filename = fi.cells(rw, "c").text filetype = fi

linq - Assign two tables join result to List in c# -

i'd return 2 tables result list . public list<dynamic> getstatistics(datetime startdate , datetime enddate) { try { list<dynamic> result = new list<dynamic>(); using (xactetlentities xactctxt = new xactetlentities()) { var query = (from in xactctxt.xactetl_activity_log join b in xactctxt.xactetl_shred_mode on a.shredmodeid equals b.shredmodeid a.createddate >= startdate && a.createddate <= enddate select new { a, b }); result = query.tolist(); } } i not able assign result query.tolist() the problem query not ienumerable tolist() function not returning correct list type. also, anonymous types can not cast object, , internal. best bet trying make select more explicit. instead of: select new { a, b }); you use: select (dynamic)new tuple<dat

c - Trouble Resolving Deadlock in MPI Program dealing with a Cartesian mesh -

i implementing cannon's algorithm. run using 4 processors. hit dead lock when enter loop: (i=0; i<dims[0]; i++) { multiply(nlocal, a, b, c); mpi_sendrecv_replace(a, nlocal*nlocal, mpi_double,leftrank, 1, rightrank, 1, comm_2d, &status); mpi_sendrecv_replace(b, nlocal*nlocal, mpi_double,uprank, 1, downrank, 1, comm_2d, &status); } the entire code here: #include <math.h> #include <mpi.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> void multiply(int n, double *a, double *b, double *c); double* readmatrix(char* filename, int* size); void writematrix(double* matrix, char* filename, int size); int main(int argc, char* argv[]) { mpi_init(&argc, &argv); double* a,*b,*c; int i, t, n; int nlocal; int npes, dims[2], periods[2]; int myrank, my2drank, mycoords[2]; int uprank, downrank, leftrank, rightrank, coords[2]; in

laravel 4 - Re-use the static method called in Blade template -

let's have static method called message::countnew() , method used count new message database. and then, want display number of new messages in 1 page twice. <!-- on top menu --> <nav>{{ message::countnew }} new message(s)</nav> <!-- on other location of page (still on same page) --> <div>you have {{ message::countnew }} message(s) if that, laravel call static method (message::countnew()) twice? or have sort of mechanism maybe second call fetch value kind of cache. or there best practice case? thanks! yes, execute query twice. executing query not duty of view layer. you should execute queries in controller or in view composer. there's handy tool trace how laravel app works. https://github.com/barryvdh/laravel-debugbar

A peculiar bug while reading and printing strings of *char in C -

i've encountered odd. string of char (let's call word ) turns out have additional letters when print it. contatenated letter varies depending on: the length of proper prefix word. the number of spaces after word. i'm parsing word line 1 line form standard input. i'm using function readword word out of line : void readword(char **linepointer, char **wordpointer){ char *line = *linepointer; char *word = *wordpointer; while (!isendofline(line) && islowercaseletter(*line)){ *word = *line; word++; line++; } word++; *word = '\0'; printf("the retrieved word is: %s.\n", *wordpointer) *linepointer = line; } my inputs/outputs (please note call readword function after taking care of insert , whitespace between): // input 1 : insert foo insert ba // several spaces after 'ba' // output 2: retrieved word foo. retrieved word bas. // input 1 : insert foo insert ba // several spaces after &

Plone/z3c.form 3.2.1- How can I make an autocomplete widget (that is not a required field) use a custom binded source object? -

i'm trying autocomplete widget render in form (z3c.form), using binded source object. in interface class: parent = schema.choice(title=u'a parent', source=parentsourcebinder(), required=false, default=none) in form.form class: fields['parent'].widgetfactory = autocompletefieldwidget i'm using custom source binder because need pull data database. class parentsource(object): implements(iquerysource) vocabulary = simplevocabulary([]) session = none __iter__ = vocabulary.__iter__ def __init__(self, context): self.context=context if self.session none: db_utility = queryutility(imydbutility,name="mydbutility") self.session = db_utility.session self.vocabulary = simplevocabulary([simpleterm(title='temp',value='temp',token='temp'),]) then have __contains__, getterm, gettermbytok

ios - Swift - Delegate not calling method from other class -

i'm trying change label's text in view controller when button pressed. here's how i'm setting delegate: in firstviewcontroller under import uikit @objc protocol mydelegate{ optional func makescore() } in firstviewcontroller under class firstviewcontroller: uiviewcontroller var delegate:mydelegate? in firstviewcontroller when button pressed delegate?.makescore!() in secondviewcontroller (where makescore() located) class secondviewcontroller: uiviewcontroller, mydelegate the makescore() method in secondviewcontroller func makescore() { println("worked") } it's not logging when button pressed. i'm pretty sure set delegates , protocols correctly. see missing? note: firstviewcontroller , secondviewcontroller not connected segues. both in scrollview . i can see added second view controller programmatically these lines: let vc6 = storyboard.instantiateviewcontrollerwithidentifier("second") as! secon

java - When inserting a parent and its children can Hibernate set the parent id when inserting the child rather than having to update after? -

i have 2 objects public class parent { int id; string name; int set<child> children; } public class child { int id; string name; int parentid; } with following mapping file <hibernate-mapping> <class name="parent" table="parent"> <id column="id" access="field"> <generator class="identity"/> </id> <property name="name" column="name" access="field" /> <set name="children" access="property" cascade="all" lazy="true" > <key><column name="parent_id"/></key> <one-to-many class="com.hp.autonomy.corepolicy.common.dto.lexiconexpression"/> </set> </class> <class name="child" table="child"> <id column="id&

php - Can someone help me out with this mysql query -

you have error in sql syntax; check manual corresponds mysql server version right syntax use near ')' $sql = "insert topics(topic_subject, topic_date, topic_cat, topic_by) values('" . mysql_real_escape_string($_post['topic_subject']) . "', now(), " . mysql_real_escape_string($_post['topic_cat']) . ", " . $_session['fullname'] . " )"; you missing quotes around string values here new sql ql = "insert topics(topic_subject, topic_date, topic_cat, topic_by) values('" . mysql_real_escape_string($_post['topic_subject'

sql - WITH RECURSIVE query to choose the longest paths -

i new with recursive in postgresql. have reasonably standard recursive query following adjacency list. if have, example: 1 -> 2 2 -> 3 3 -> 4 3 -> 5 5 -> 6 it produces: 1 1,2 1,2,3 1,2,3,4 1,2,3,5 1,2,3,5,6 what have just: 1,2,3,4 1,2,3,5,6 but can't see how in postgres. seem "choose longest paths" or "choose paths not contained in path". can see how join on itself, seems quite inefficient. an example query is: with recursive search_graph(id, link, data, depth, path, cycle) ( select g.id, g.link, g.data, 1, array[g.id], false graph g union select g.id, g.link, g.data, sg.depth + 1, path || g.id, g.id = any(path) graph g, search_graph sg g.id = sg.link , not cycle ) select * search_graph; you have solution @ fingertips cycle , add predicate @ end. but adjust break condition 1 level, appending 1 node many: with recursive search ( select id, link, data, array[g.id] path, (link = id) cycle gr

php - can laravel & wordpress play together? -

this problem laravel & wordpress: need put blog inside laravel installation. want use wordpress can't figure out. put wp files inside public/blog/ can't install it. redirect error part. need apache: if( $url = public/blog/* ){ ignore normal laravel routing system & redirect wordpress inside (public/blog/*) } to keep laravel .htaccess clean, copy .htaccess active wordpress project using clean urls (or in wordpress doc) , copy clean wordpress folder in public/bloc (it's same laravel). without .htaccess in blog folder laravel "public/.htaccess" redirect not specific , existing files url "public/index.php"

nlp - how to treat with <s> and </s> in calculating unigram LM? -

i beginner in nlp , i'm confused how treat <s> , </s> symbols calculate counts unigram model? should count them or ignore? if understand correctly <s> , </s> mean special (fake) unigrams first , last unigrams (actually, pre-first , after-last) each text, there no need in them unigrams, because string contains these unigrams , provide no additional information. such special unigrams can useful in case of high-order n-grams: example, allows extract 1-word string hello 2 bigrams: <s> hello , hello </s> or 3 trigrams: <s0> <s1> hello , <s1> hello </s1> , hello </s1> </s0> .

Embedding Python in a C++ class -

hope guys can help. searched , googled not find solution. firstly code: main.cpp #include <iostream> #include <iomanip> #include "togglelights.h" using namespace std; int main () { bool lightson; lights lightsgo(50); lightson=lightsgo.lightschanged(); return 0; } togglelights.cpp #include "togglelights.h" using namespace std; lights::lights(const int getbrightness) { } bool lights :: lightschanged() { setenv("pythonpath",".",1); py_initialize(); state=pygilstate_ensure(); //pname = pystring_fromstring("lights"); pmodule = pyimport_importmodule("lights"); parg = py_buildvalue("(iii)", l_leftlightpin, l_rightlightpin,l_brightness); // pdict = pymodule_getdict(pmodule); pfunc = pyobject_getattrstring(pmodule,"setlights"); pret = pyeval_callobject(pfunc,parg); if (pystring_check(pret)) { py_decref(pvalue);

bash - Sed command is making changes to the original script -

can suggest how make sure particular command in shell script not effect script called? example in case replacing occurrences of particular word other word, using "sed" command. don't want changing in original script. use basename $0 in script. example current directory: #!/bin/bash files="*" current=`basename $0` f in $files if [ -f $f ] && [ $f != $current ] #some sed action file fi done

sql - Creating a Composite Foreign key, based on the SAME primary key in another table -

first of all, i'm not sure worded title correctly, let me explain in detail i'm trying do. i'm trying link 2 tables (outfits , items) in sql server; primary keys outfit_id , item_id (an auto incrementing int) respectively. an outfit made of combination of items; therefore want primary key ( outfits_id ) ( item_id,item_id,item_id ) or how many ever items takes make outfit. is possible, , if how go it? for composite key, need table outfit_item , have outfit_id , item_id. can add many records each. outfit 1 can have multiple items , 1 item can have multiple outfits. can restrict these using relationships.

multithreading - handling concurrency for last item in inventory -

we've 1 book left in inventory. , 2 people trying same book ( person x , person y ). person x has added book cart , make payment , person y has added book cart. how solve concurrency problem ? based on description, looks allowing users add last item cart mean there no hold on item while in cart, can add check during check out, checking item availability database constraint stock can not less 0 in case database transaction fail , return error. can reply message saying item out of stock.

javascript - Jquery fire 2 trigger events asynchronously -

i have 2 events need fire asynchronously because 2nd event relies on first event. currently have: $(document).ready(function() { $("#courseid").trigger('change'); $("#clearall").trigger('click'); }); here 2 events: $('#courseid').change(function() { alert('inside courseid change event'); required(document.getelementbyid('courseid').value, 'courseid', 'err_courseid'); // hole information & display in holes var courseid = document.getelementbyid('courseid').value; document.getelementbyid('db_courseid').value = courseid; if(courseid.length<1) { var holes = document.getelementbyid('num_holes').value; for(i=1; i<=holes; i++) { id = "holes_"+i; $('#'+id).prop('checked', false); } document.getelementbyid('num_hol

grails - listener that groups jms messages then sends to next queue / batching messages -

i need implement listener receives multiple messages groups them base on criteria send grouped messages next queue. in other words batching them in logical way. i'm using grails , jms integration plugin. in mind, can implemented in listener runs single thread runs infinite loop forever consume messages queue grouping logic there. runnable runnable = new runnable() { @override public void run() { while(true) { def obj = consumer.receive() //group messages , store on list send them in groups next queue producer.send(groupedobjlist) } } } def thread = new thread(runnable); thread.start(); i'm not sure if clean way it. i'm looking alternatives on how implement this.

ionic framework - no smooth springy scroll effect on Android -

Image
my problem when deploy ionic app on android, smooth springy scroll effect (see .gif below) is missing . not occur when serve app locally on development environment. why missing , how can enable it? my development environment: ionic 1.3.20 , 1.0.0-rc.3 bower dependency android sdk 22 ubuntu 14.10 java version 1.8.0_25 ant version 1.9.4 this .gif illustrates i'm referring smooth springy scroll effect: you experiencing because on ios , local-browser default setting effect enabled while on android default disabled. to change that , add has-bouncing="true" attribute ion-content tag for example: <ion-content has-bouncing="true"> ...

networking - Connection Refused Exception when trying to connect Iphone to Windows using Xamarin -

i'm using xamarin , https://github.com/rdavisau/sockets-for-pcl plugin connect iphone windows via tcp. followed examples on github. i'am listening windows forms application , making iphone client. i'm using usb cable , making iphone hotspot. however, when try connect i'am getting exception connection refused. i'am using localhost ip. maybe that's problem don't know. greatfull if can help. have day.

owin - No conversion available between HelloWorldComponent and System.Func`2[System.Collections.Generic.IDictionary`2 // Parameter name: signature -

i working through scott allen's mvc 5 fundamentals course on pluralsight i error @ "using (webapp.start(uri)) " in code below. the error an unhandled exception of type 'system.argumentexception' occurred in microsoft.owin.dll system.argumentexception unhandled hresult=-2147024809 message=no conversion available between consoleapplication1.helloworldcomponent , system.func`2[system.collections.generic.idictionary`2[system.string,system.object],system.threading.tasks.task]. parameter name: signature source=microsoft.owin paramname=signature stacktrace: @ microsoft.owin.builder.appbuilder.convert(type signature, object app) @ microsoft.owin.builder.appbuilder.buildinternal(type signature) @ microsoft.owin.builder.appbuilder.build(type returntype) @ microsoft.owin.hosting.serverfactory.serverfactoryadapter.create(iappbuilder builder) @ microsoft.owin.hosting.engine.hostingengine.startserver(startcontext context)

jquery - 403 Error when testing azure Blob Storage upload -

i read , implemented following article chunking files between javascript client , azure blob storage: http://gauravmantri.com/2013/02/16/uploading-large-files-in-windows-azure-blob-storage-using-shared-access-signature-html-and-javascript . seem able generate shared access signature , create permissions, when try "put" chunks azure following sas url, receiving error: "403 (server failed authenticate request. make sure value of authorization header formed correctly including signature.)". please doing wrong. here code , url , code: //sas url generated http://testing.blob.core.windows.net/image-container?sr=c&si=perms1&sig=uowbdvclffdivkttzuoupj6bimuzlrxf3wezlxkmjca%3d&comp=block&blockid=ymxvy2stmdawmdaw //upload blocks azure storage if (evt.target.readystate == filereader.done) { // done == 2 var uri = submituri + '&comp=block&blockid=' + blockids[blockids.length - 1]; var requestdata = new uint8array(evt.target.resu

class - OOP PHP: Using parent's static element in declaration of child static element? -

i'm trying write class uses parent's static declared array add new value to. below kind of feel of how i'm trying run it... class superclass { protected static $array_name = array('value1'); } class subclass extends superclass { protected static $array_name = array_push(parent::$array_name, 'value2'); } is there way implement without __construct() function? i'm trying implement static working model superclass , parents... i'm not entirely sure if want static classes completely, want give or take : <?php class superclass { static $array_name = array('value1'); } class subclass extends superclass { static $array_name = 'foo'; function __construct(){ self::$array_name = array_push(parent::$array_name, 'value2'); } } $foo = new subclass(); var_dump($foo::$array_name); // prints int 2 - push returns number of elements in array. ?>

Visual Studio Code Analysis Deadlock -

i getting deadlock error when run code analysis vs2013. i'm pretty sure need increase or disable deadlock timeout because can run code analysis standalone fx cop 10. there can csproj file disable deadlock protection? would ? vs2013 fxcop ca0001 : fxcop appears have hung or deadlock

html - Issue with aligning back arrow with dropdown -

having issues spacing arrow next dropdown. issue is centering arrow if dropdown active. want on left of dropdown not aligned how is. i included jsfiddle show display. html <div id="portfolio"> <table> <tr> <td> <a href="index.html"><div class="back-arrow-left" ></div></a> </td> <td> <dropdown> <input id="toggle2" type="checkbox"> <label for="toggle2" class="animate">portfolio<i class="fa fa-list float-right"></i></label> <ul class="animate"> <li class="animate">websites</li> <li class="animate">computer animations</li> <li class="animate">c/c++ programs</li> </ul> </dropdown> </td> </tr> </table> </div> css .back-arrow-left { width:

OpenStack Swift client for the fastest synchronisation of huge amount of files? -

i have folder lot of files (~50k, 3gb). need sync folder recursively container in openstak swift-like storage. i have tried use cli duck (cyberduck), crashes on huge list of files in prepare process. trying use supload utility, slow :( may recommends me best approach (some cli better) situation? you should use official python-swiftclient package , : # load openstack credentials source openrc.sh cd path_to_directory_you_want_to_sync # upload files recursively keeping paths swift upload --changed your_container * swift not support rsync-like synchronization, use little script delete in container files deleted locally , upload new files without asking swift compare each files : #!/bin/bash cd $2 diff <(find * -type f -print | sort) <(swift list $1 | sort) | while read x; if [[ $x == \>* ]]; echo "need delete ${x:2}" swift delete $1 "${x:2}" elif [[ $x == \<* ]]; echo "need upload ${x:2}"

Setting up MySQL trigger syntax correctly and carefully -

i've been doing lot of new learning mysql , triggers. think understand concept , realise there lot of possible dangers in using them. believe limited use of them correct function want perform. i have 9 tables correspond 9 different web based ajax engined forms. i've worked hard on these, being first time using ajax, , i'm reasonably happy them. each time user makes change whichever form filling out, change ajaxed db , confirmation or error response. straight forward. each forms respective table has "status" field, "lastmodified" field , field call "agref" sort of status null until form reaches stage, further along process. i have additional table called "records" entries in of other tables, listed can see forms have been started, when last changes made , status's have. here believe trigger part should work, don't have make updates "records" table in php on every single transaction. the "records"

c# - Thread blocked after await -

with code: static void main(string[] args) { console.writeline("main thread pre - " + getnativethreadid(system.threading.thread.currentthread)); task.run(() => asyncmethod()).wait(); console.writeline("main thread post - " + getnativethreadid(system.threading.thread.currentthread)); console.readkey(); } static async task asyncmethod() { console.writeline("asyncmethod thread pre - " + getnativethreadid(system.threading.thread.currentthread)); await task.delay(4000).configureawait(false); console.writeline("asyncmethod thread post - " + getnativethreadid(system.threading.thread.currentthread)); } the output is: main thread pre - 8652 asyncmethod thread pre - 4764 asyncmethod thread post - 1768 main thread post - 8652 using concurrency visualizer, can see during 4 second delay, thread 4764 stuck in synchronization. unblocked main thread on shutdown. sh