text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I was wondering why smartphone/mobile device OSs are not written to allow dynamic languages as the language of choice? iPhone uses Objective-C, Google Android uses Java, Windows Mobile uses any manner of .NET language. What would be the reasoning behind a mobile OS being written in Python, Ruby, or any other dynamic l...
[ 0.1031116396188736, 0.16292622685432434, 0.06227385252714157, 0.14932692050933838, -0.00025122432271018624, 0.1430596262216568, 0.06900841742753983, 0.600006103515625, -0.3799732029438019, -0.4848390221595764, -0.28026679158210754, 0.6891210079193115, -0.552339494228363, -0.303207814693450...
not see more dynamic language support in today's mobile OS's. In general it's all of these things. Memory, speed, and probably most importantly programmer familiarity. Apple has a huge investment in Objective C, Java is known by basically everyone, and C# is very popular as well. If you're trying for mass programmer ap...
[ 0.25414568185806274, 0.26430246233940125, -0.125576451420784, 0.3020172715187073, 0.019575979560613632, -0.02766537107527256, 0.3079887628555298, 0.6320590376853943, -0.36696693301200867, -0.288855642080307, -0.0006957804434932768, 0.731705367565155, -0.383598268032074, -0.1638208329677581...
would be an investment for whatever company is making the mobile OS, and at the end of the day I'm not sure they gain as much from this. Finally, it's the very beginning of mobile devices. In 5 years I wouldn't be at all surprised to see a much wider mobile stack.
[ 0.4897864758968353, 0.2459186166524887, 0.3582378029823303, 0.16976569592952728, 0.42141538858413696, 0.18164367973804474, -0.12746255099773407, 0.49067333340644836, -0.48270300030708313, -0.7065678238868713, 0.3425251543521881, 0.4234154224395752, 0.20123405754566193, 0.2571415305137634, ...
--- ``` int LinkedList::DoStuff() { Node *Current = next_; while ( Current != NULL ) { Current = Current->next_; length_++; } // At the last iteration we have reached the end/tail/last node return length_; } ``` --- there are no more nodes beyond the last. How can i traverse to th...
[ -0.26860523223876953, -0.2866429090499878, 0.39818325638771057, 0.027164099738001823, 0.254216730594635, -0.12686485052108765, 0.5468746423721313, -0.3455202579498291, -0.1977653056383133, -0.5795825123786926, -0.10224880278110504, 0.4576689302921295, -0.17115136981010437, 0.12680515646934...
want a solution for a single-threaded list without requiring O(n) extra storage, the best bet is to reverse the list in place as Michael suggests. I wrote an example for this, [but I'll leave it out given the concern about homework]. One caution about reversing the list: if there are any other data structures that hold...
[ 0.1826593279838562, 0.10047418624162674, 0.12709441781044006, 0.05553137883543968, 0.316329687833786, 0.1441262811422348, 0.2409082055091858, -0.05587778240442276, -0.4590069055557251, -0.37775498628616333, -0.07343577593564987, 0.6412983536720276, -0.33282360434532166, -0.0743188410997390...
(C++) routine to reverse a list in place. It hasn't been tested, though. And I'll note that if this is homework, the poster still needs to figure out how to use this routine correctly to get a complete answer. ``` Node *ReverseList(Node *head) { // Reverse a single-threaded list in place, return new head Node ...
[ -0.15902526676654816, 0.07639404386281967, 0.6029228568077087, -0.4649078845977783, 0.09334699809551239, 0.07118783891201019, 0.4805338680744171, -0.1649402379989624, -0.2872171401977539, -0.30057305097579956, -0.12547703087329865, 0.28373411297798157, -0.4099451005458832, 0.23803283274173...
= next; } cur->next_ = prev; return cur; } ```
[ -0.3264399766921997, 0.023825794458389282, 0.3976936638355255, -0.5218184590339661, 0.3232177793979645, -0.11240451037883759, 0.17706532776355743, -0.0606611967086792, 0.036713987588882446, -0.5416597723960876, -0.350629985332489, 0.6184941530227661, -0.049600064754486084, 0.42760613560676...
I have a string with symbols like this: ``` ' ``` That's an apostrophe apparently. I tried saxutils.unescape() without any luck and tried urllib.unquote() How can I decode this? Thanks! Check out [this question](https://stackoverflow.com/questions/275174/). What you're looking for is "html entity decoding". Ty...
[ 0.17777051031589508, 0.21476826071739197, 0.32492855191230774, 0.1282007247209549, -0.24256591498851776, -0.14084292948246002, 0.11923893541097641, 0.214136004447937, -0.20447368919849396, -0.5925299525260925, 0.0016620152164250612, 0.3444666564464569, -0.33358222246170044, 0.1845471411943...
I have some text that uses Unicode punctuation, like left double quote, right single quote for apostrophe, and so on, and I need it in ASCII. Does Python have a database of these characters with obvious ASCII substitutes so I can do better than turning them all into "?" ? [Unidecode](http://pypi.python.org/pypi/Unideco...
[ 0.2480597198009491, 0.09176687896251678, 0.06887602061033249, 0.19235436618328094, -0.21676360070705414, 0.22755932807922363, -0.012611745856702328, 0.11468835920095444, -0.004526407457888126, -0.5805685520172119, -0.15980243682861328, 0.07641424983739853, -0.21520236134529114, -0.13586255...
a legacy 7-bit ascii system. ``` >>> from unidecode import unidecode >>> print unidecode(u"\u5317\u4EB0") Bei Jing ``` <http://www.tablix.org/~avian/blog/archives/2009/01/unicode_transliteration_in_python/>
[ -0.07119733840227127, 0.020947832614183426, -0.025687232613563538, -0.02300843968987465, -0.0015200020279735327, 0.0721626803278923, -0.24091917276382446, -0.26520413160324097, -0.13850057125091553, -0.11707663536071777, -0.3734275996685028, 0.11452455818653107, -0.45496517419815063, 0.157...
I have a very simple holding page I built centering a div, anchor and image. For some reason it will not center in IE8 (either mode), and I am hoping someone can tell me why. I haven't had a chance to try it in other IE browsers. I have tried this in Chrome and FF3 where it works OK. ``` <html> <head> <title>Welcome</...
[ 0.18395410478115082, -0.25125983357429504, 0.895063579082489, 0.16131919622421265, -0.10594682395458221, -0.19282421469688416, -0.109663225710392, -0.07952656596899033, -0.2262619584798813, -0.8599897027015686, 0.1642051488161087, 0.12295452505350113, 0.005184043664485216, -0.0472561903297...
work in quirks mode? Your HTML centers fine once I added doctype to to force standards mode: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Welcome</title> <style> #pageContainer {wid...
[ 0.3195820748806, -0.24756227433681488, 0.6623633503913879, 0.025976695120334625, -0.3145650625228882, -0.12047816067934036, 0.40595686435699463, -0.5245694518089294, -0.29337725043296814, -0.2944795787334442, -0.15544426441192627, 0.5758885741233826, -0.11476840078830719, -0.20643642544746...
In WPF we have routed events. When should these be used instead of regular events? Routed events have special behavior, but that behavior is largely invisible if you are handling an event on the element where it is raised. Where routed events become powerful is if you use any of the suggested scenarios: defining comm...
[ 0.2598857581615448, -0.3811683654785156, 0.5515519380569458, 0.11436642706394196, -0.20210547745227814, -0.40802258253097534, 0.090572290122509, -0.5317142009735107, -0.26083144545555115, -0.59857577085495, -0.14345796406269073, 0.4174341559410095, -0.1774866133928299, -0.19962261617183685...
event. Therefore, you can use the full set of routed events available throughout the working API set as a conceptual "interface" whereby disparate elements in the application can exchange event information. This "interface" concept for routed events is particularly applicable for input events. Routed events can also ...
[ 0.10986112058162689, -0.3225579559803009, 0.18368978798389435, 0.24172455072402954, -0.07132168859243393, 0.06850540637969971, -0.11257630586624146, -0.045846909284591675, -0.2669890820980072, -0.7253761291503906, -0.07526226341724396, 0.2683383822441101, -0.3082179129123688, 0.01246887259...
other reasons that any given WPF event might be implemented as a routed event instead of a standard CLR event. If you are implementing your own events, you might also consider these principles: * Certain WPF styling and templating features such as [EventSetter](http://msdn.microsoft.com/en-us/library/system.windows.e...
[ 0.13980773091316223, -0.33507096767425537, 0.16211894154548645, 0.24608740210533142, -0.035245370119810104, -0.2781447470188141, 0.09568270295858383, -0.28943750262260437, -0.4919757843017578, -0.5764946341514587, -0.09206770360469818, 0.25400522351264954, -0.3042810559272766, -0.101053789...
your class can enforce event-driven class behaviors that cannot be accidentally suppressed by handling an event on an instance. Source: [MSDN: Routed Events Overview](http://msdn.microsoft.com/en-us/library/ms742806.aspx)
[ 0.0028563158120959997, -0.5169603228569031, -0.4456321597099304, 0.3155502378940582, 0.1459917575120926, -0.44869399070739746, 0.49886512756347656, 0.3489409387111664, -0.16794903576374054, -0.5818521976470947, -0.08885957300662994, 0.41409069299697876, -0.3677021563053131, -0.152339324355...
I have a site that is taking around 20 seconds to load every page (no matter what it does) So i put in a /scripts/test.html that isn't part of a route and it still takes this long... no db hit nothing. I renamed the web.config to \_web.config and it loads instantly, rename it back... back to around 20-30 second load ...
[ -0.22239506244659424, 0.3139631450176239, 0.4378502070903778, -0.1486361026763916, -0.21787002682685852, -0.052521735429763794, 0.3479267358779907, 0.0779954344034195, -0.3439214825630188, -0.8118358254432678, 0.21104520559310913, 0.20659321546554565, -0.15834985673427582, 0.16135144233703...
being hit pretty hard... ANY help please? or things to test/debug? Few things to try: * Try taking a look with FileMon/ProcessMonitor and see if there is a ton of disk activity. * If the above is not an issue, install an instance of Dot Trace by Jet Brains. Profile the app and see if there is some memory or performan...
[ 0.3766886293888092, -0.12840603291988373, 0.21479645371437073, 0.35940417647361755, -0.10342519730329514, -0.2419045865535736, 0.21670304238796234, 0.507615864276886, -0.4353935718536377, -0.8223850131034851, 0.01590794324874878, 0.682424783706665, -0.10519415140151978, -0.2453890442848205...
Q1. Which would be the best resource or tutorial to setup a simple WPF Organization Chart or Tree for an organization object (self referencing).I would like to have a button when clicked which would show an organization chart (hierarchical) tree of the various departments and sub-department.I'm looking for a base to st...
[ 0.2900623679161072, -0.04407887905836105, 0.2990160584449768, 0.15751543641090393, -0.4006665050983429, 0.01374073140323162, 0.07649359852075577, -0.18888135254383087, -0.38345447182655334, -0.24934303760528564, -0.08436216413974762, 0.32918450236320496, -0.2636360228061676, 0.009660321287...
*My code*: <http://jsbin.com/epuxu> With help from SO, I managed to get addresses geocoded and their according pins placed on the map. **The problem is** that I can't select the coordinates in order to append a #message div to it on the map because I don't have the coordinates anymore. I suspect I'm doing something w...
[ 0.12356238812208176, 0.10059154778718948, 0.7032496333122253, -0.36635661125183105, 0.13204003870487213, 0.1873476803302765, 0.5592608451843262, -0.3182600438594818, -0.2743798792362213, -0.816037118434906, -0.10573745518922806, 0.2853260934352875, -0.3648587763309479, 0.17582471668720245,...
$("#message") .fadeIn() .css({ top:markerOffset.y, left:markerOffset.x }); GEvent.removeListener(moveEnd); }); map.panTo(marker.getLatLng()); } ``` it works when I use the original coordinate code (this is commented out on jsbin): ``` var markers = [ ...
[ 0.08043360710144043, -0.10940442234277725, 0.6608326435089111, -0.41950204968452454, 0.2767680585384369, 0.10181769728660583, 0.3467153310775757, -0.24107202887535095, -0.0019545492250472307, -0.7848876118659973, -0.14897361397743225, 0.2550704777240753, -0.3767836093902588, -0.03607052192...
[39.0,-121.0] ]; for (var i = 0; i < markers.length; i++) { var point = new GLatLng(markers[i][0], markers[i][1]); marker = new GMarker(point); map.addOverlay(marker); markers[i] = marker; } ``` but I need help getting it to work with this current code: ``` function showA...
[ -0.005587425548583269, -0.12319532036781311, 0.901960551738739, -0.4687623679637909, -0.04707435518503189, 0.2101590633392334, 0.22770275175571442, -0.4196138083934784, -0.049950115382671356, -0.6192721724510193, -0.19587604701519012, 0.26218366622924805, -0.4461956024169922, 0.22059156000...
function(point) { if (!point) { alert(markers + " not found"); } else { marker = new GMarker(point);
[ -0.3050673007965088, -0.3310105502605438, 0.5481555461883545, -0.38497909903526306, 0.26901933550834656, 0.006602561101317406, 0.4840224087238312, -0.16027864813804626, 0.004417852498590946, -0.4375520646572113, -0.3176151216030121, 0.5498735308647156, -0.3902045786380768, -0.0473728105425...
map.addOverlay(marker); markers[i] = marker; } } ); } } for (var i = 0; i < markers.length; i++) { showAddress(markers[i]); } ``` I'm kinda new to utilizing the google maps api, so any insight on what I'm doing wrong
[ 0.06341764330863953, 0.03606075420975685, 0.6457526683807373, -0.22746071219444275, 0.09844167530536652, -0.11870373785495758, 0.5175372362136841, -0.28023189306259155, 0.08330114930868149, -0.7835365533828735, 0.017147768288850784, 0.3149491846561432, -0.22113166749477386, 0.0650148764252...
would be very helpful. Thanks =] I'm afraid there were quite a few things wrong with your code :P I had to do a bit of plastic surgery but here's the result: <http://jsbin.com/atofe> The following is a description of the changes I made. Let me know if you need help understanding anything. --- ``` <script type="tex...
[ 0.24324117600917816, 0.5203128457069397, 0.33911240100860596, -0.05177973583340645, 0.12166913598775864, 0.36518704891204834, 0.11458770185709, -0.3223094940185547, -0.10296805948019028, -0.8795055747032166, 0.3720979392528534, 0.24667635560035706, -0.10128726810216904, -0.1015469357371330...
["5th and Ivy, Chico CA"] ]; ``` Since we are using addresses instead of coordinates, you don't need to (in fact you shouldn't because it only complicates things) encapsulate each string in an array. I also renamed it to `addresses` to make it more clear and prevent conflicts with the actual markers (more on that lat...
[ 0.14955377578735352, 0.19250042736530304, 0.8910220861434937, 0.06522278487682343, 0.0776430144906044, 0.1590331792831421, -0.14113673567771912, -0.3076474666595459, 0.03840695321559906, -0.5797809958457947, -0.1367974877357483, -0.0565229132771492, -0.3388863801956177, 0.16331855952739716...
if (!point) { alert(markers + " not found"); } else { marker = new GMarker(point); map.addOverlay(marker); markers[i] = marker; } } ); } } for (var i = 0; i < markers.length; i++) { showAddress(markers[i]); } /* Add Markers
[ -0.07778772711753845, -0.09907178580760956, 0.8181602358818054, -0.5231052041053772, 0.03692165017127991, 0.21308229863643646, 0.4150981605052948, -0.40372180938720703, -0.007025554776191711, -0.7063874006271362, -0.20529405772686005, 0.3041093349456787, -0.20642195641994476, 0.07482416182...
to List --------------------*/ $(markers).each(function(i,marker){ $("<li>") .html(i+" - "+marker) .click(function(){ displayPoint(marker, i); }) .appendTo("#list"); GEvent.addListener(marker, "click", function(){ displayPoint(marker, i); }); }); ``` This is where I had to make the mos...
[ 0.029047004878520966, -0.0639335885643959, 0.5145342350006104, -0.3296084403991699, 0.01231504138559103, 0.26877912878990173, 0.3472435474395752, -0.5006917715072632, -0.3432173430919647, -0.6533633470535278, -0.09535203874111176, 0.6171252131462097, -0.5486172437667847, 0.1803565621376037...
to add the markers to the list *before* the geocoder actually returned its response. I think you didn't realize that `getLatLng` is an asynchronous function, so it executes the callback function only after the geocoder returns its response. Since you didn't wait for the response, it rendered the "Add markers to list" s...
[ 0.07587780803442001, -0.2033344805240631, 0.7183483242988586, 0.16279250383377075, -0.10275091230869293, 0.04241392761468887, 0.2778101861476898, -0.4024566411972046, -0.24407795071601868, -0.29738229513168335, -0.32049664855003357, 0.5596858859062195, -0.39323922991752625, 0.1425497978925...
a double-[closure](http://www.kryogenix.org/code/browser/secrets-of-javascript-closures/) since we are using a loop along with an asynchronous function. ``` function handleGeocoderResponse(addr, j) { /* These are closures. We have to return a function that contains our Geocoder repsonse handling code in ...
[ 0.11588240414857864, -0.24070775508880615, 0.4311898350715637, -0.10841911286115646, 0.058570973575115204, 0.03246992453932762, 0.3095322549343109, -0.062466442584991455, -0.4152714014053345, -0.15249669551849365, -0.4072381556034088, 0.19646425545215607, -0.7246159911155701, 0.18530747294...
var marker = new GMarker(point); map.addOverlay(marker); /* Add markers to list ------------------------*/ $("<li>") .html(j + " - " + addr) .click(function(){ displayPoint(marker, j); }) .appendTo("#list"); GEvent.addListener(marker, "click", fu...
[ -0.30371254682540894, -0.13251788914203644, 0.93108731508255, -0.4682179391384125, -0.0018258432392030954, 0.5403038859367371, 0.39321866631507874, -0.4009338617324829, -0.0020185080356895924, -0.7121796607971191, -0.34756940603256226, 0.6980130672454834, -0.4712700843811035, -0.0499753728...
j); }); } }); } for (var i = 0; i < addresses.length; i++) { if (geocoder) { var address = addresses[i]; geocoder.getLatLng( address, handleGeocoderResponse(address, i) ); } } ```
[ -0.25122135877609253, -0.06056220829486847, 0.6041197776794434, -0.25132906436920166, 0.3854077160358429, 0.07105056941509247, 0.22469906508922577, -0.30875033140182495, -0.07800381630659103, -0.7711926102638245, -0.6656807661056519, 0.3483981490135193, -0.29518523812294006, 0.490976005792...
I need a very simple process that listens on a directory and does some operation when a new file is created on that directory. I guess I need a thread pool that does that. This is very easy to implement using the spring framework, which I normally use but I can't use it now. I can only use tomcat, How can I implemen...
[ 0.4753287434577942, -0.049695003777742386, 0.20726265013217926, -0.035357482731342316, -0.3271748125553131, -0.273997038602829, 0.2640783488750458, -0.20251554250717163, -0.3282923996448517, -0.5542095303535461, 0.23298873007297516, 0.38679513335227966, -0.19460992515087128, 0.418762534856...
> my.package.servlet.Daemons < /listener > then implement the Daemons class as an implementation of `ServletContextListener` like this: the code will be called every 5 seconds, tomcat will call contextDestroyed when your app shuts down. note that the variable is volatile, otherwise you may have troubles on shutdown...
[ 0.29303717613220215, -0.04761626198887825, 0.6007896661758423, -0.3546878695487976, 0.1592322140932083, -0.02459019422531128, 0.8500023484230042, -0.4743092656135559, -0.056271836161613464, -0.7418169379234314, -0.3569292426109314, 0.7345656156539917, -0.5018458962440491, 0.204719781875610...
System.out.println("checking changed files..."); Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } } }; public void contextInitialized(ServletContextEvent servletContextEvent) { new Thread(myDeamon).start(); } public...
[ -0.25546324253082275, -0.4630277752876282, 0.5982716679573059, -0.17664828896522522, 0.4791545569896698, 0.16826273500919342, 0.2766942083835602, -0.04243240877985954, -0.49290457367897034, -0.7643595933914185, -0.37319445610046387, 0.33597302436828613, -0.2930471897125244, 0.6653386354446...
active = false; } } ```
[ 0.06451147794723511, 0.06513581424951553, 0.0009959896560758352, -0.45821309089660645, 0.0376427099108696, -0.3741326332092285, 0.5008170008659363, 0.053214702755212784, -0.0098672891035676, -0.18206259608268738, -0.35765793919563293, 0.962932288646698, -0.5237019658088684, 0.0088628381490...
I have a .htaccess file which arranges that all requests go through index.php. Now i would like to make an exception for rss.php. to go straight throuh rss.php. How do I do this? This is how it looks like now: ``` RewriteEngine on RewriteBase / RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php ``` Thanks. Put ...
[ 0.18024414777755737, 0.30812326073646545, 0.7110767364501953, -0.09053380787372589, -0.12460912019014359, -0.14058080315589905, 0.25116902589797974, 0.07099196314811707, -0.21453088521957397, -0.7466854453086853, 0.09384190291166306, 0.31403693556785583, -0.2896198034286499, 0.287922769784...
I would like to use a lighter framework than Rails (Sinatra/Ramaze/Camping) but am concerned that by doing so I will not be able to use a lot of shared libraries that have been tailored to Rails in the form of plugins. Is this a major concern or are most of these plugins usable across different Ruby frameworks? Are th...
[ 0.5980228781700134, 0.1534567028284073, -0.28836625814437866, 0.1618344634771347, 0.020161883905529976, -0.0990070104598999, 0.34017083048820496, -0.17021587491035461, -0.3302249312400818, -0.4912337362766266, 0.11226620525121689, 0.7023685574531555, -0.18704597651958466, -0.01852864213287...
shmacy syntax highlighting, no problems. Rails has been making a huge push to move away from the old plugin model to use gems exclusively. If one of the other frameworks fits your needs better use it. Keep in mind that when it comes to documentation and samples rails has more. If I was learning Ruby and wanted to t...
[ 0.3699984848499298, -0.0963733121752739, -0.2664656341075897, 0.23616072535514832, -0.5332778096199036, -0.08097328990697861, 0.33031249046325684, 0.1278078258037567, -0.20607873797416687, -0.7827497124671936, 0.20225362479686737, 0.7606373429298401, -0.16054213047027588, -0.07289488613605...
On my forum-based website, I have a link below every post for reporting spam or abuse. Whenever this link is clicked, a web service is called on the server, when the call returns, the span containing the link (see the code below) is updated with something like 'Post reported' or if an error occurs it shows something li...
[ 0.30748629570007324, 0.28047704696655273, 0.5346644520759583, -0.3491039276123047, -0.25492194294929504, -0.17925576865673065, 0.6553428173065186, -0.03393232822418213, 0.04075467959046364, -0.7187985181808472, 0.03595137223601341, 0.49970632791519165, -0.3381189703941345, 0.07336513698101...
want to report this post as spam or abuse?")) { spanToUpdate = updateSpan; var proxy = SiteWS.ReportPost(postID, onReportPostSuccess, onReportPostFailure); } } function onReportPostSuccess(sender, e) { spanToUpdate.innerHTML = "Post reported"; } function onReportP...
[ 0.11591154336929321, 0.0367075651884079, 0.7220195531845093, -0.13974273204803467, 0.061710722744464874, -0.013342504389584064, 0.7691217064857483, -0.2515287399291992, 0.0212820116430521, -0.4562240242958069, -0.09742482006549835, 0.4847899377346039, -0.4593190550804138, 0.134903833270072...
is the reporting link: ``` <div class="post"> <p>post text here</p> <span><a href="#" onclick="ReportPost(this.parentNode, <%= post.ID %>);return false;" title="Report spam or abuse">Report Post</a></span> </div> Other posts ... ``` As you can see, I use a variable, spanToUpdate, to hold a reference to the span...
[ 0.2722926139831543, 0.15287534892559052, 0.7163715362548828, -0.1595984250307083, -0.34600934386253357, -0.1443142592906952, 0.14380307495594025, -0.2163068801164627, -0.03647324815392494, -0.5481128692626953, -0.03947122022509575, 0.608787477016449, -0.39001521468162537, 0.228552877902984...
if (confirm("Are you sure you want to report this post as spam or abuse?")) { var proxy = SiteWS.ReportPost( postID, function(sender,e) {updateSpan.innerHTML = "Post reported" }, function(sender,e) {updateSpan.innerHTML = "An error occurred while reporting the post" } ); } } ``` edit: > hm...
[ 0.021935805678367615, -0.06070152670145035, 0.4378893971443176, -0.12449083477258682, 0.013254329562187195, -0.1208789274096489, 0.5342980623245239, 0.07866592705249786, -0.18217720091342926, -0.30980587005615234, -0.1747884303331375, 0.5664920806884766, -0.5147122144699097, 0.332053273916...
{ bar(1, 100); bar(2, 150); bar(3, 200); bar(4, 250); bar(5, 300); document.getElementById("div1").innerHTML += "foo() is done. "; return; } function bar(val, timeout) { window.setTimeout( function() { document.getElementById("div1").innerHTML +=...
[ 0.1165425181388855, 0.012615147978067398, 0.8583391904830933, -0.5851805806159973, 0.2310606688261032, 0.5106379389762878, 0.41768142580986023, -0.5327337980270386, -0.06327258795499802, -0.4928877651691437, -0.6513625383377075, 0.7201254367828369, -0.4285198748111725, 0.18489238619804382,...
}, timeout ); } </script> </head> <body> <button onclick="foo()">click</button> <div id="div1"></div> </body> ``` You will see that each time the anonymous function is called it has preserved "its own" value of val from the time/context when bar() was called.
[ 0.028294842690229416, -0.15727528929710388, 0.45412784814834595, -0.36957788467407227, 0.2110898345708847, 0.11138483136892319, 0.19025444984436035, -0.31527945399284363, 0.00530274398624897, -0.5543400049209595, -0.27962976694107056, 0.7829384207725525, -0.21170589327812195, 0.13676582276...
I'd like to filter a couple of nested xml elements, evaluation of their attributes. For this purposes I'm searching a efficient and lightweight java api or framework. The main requirements are: * filtering of element bodies, based on some pattern or condition * event based XML transformation My first idea was apache...
[ 0.37778860330581665, -0.24574962258338928, 0.16864517331123352, -0.020455455407500267, -0.2790233790874481, -0.393039733171463, 0.13928626477718353, -0.3495258092880249, -0.050473835319280624, -0.7101327776908875, 0.18356940150260925, 0.3026566207408905, -0.5715105533599854, -0.18139490485...
xpath facilitates finding the wanted elements. Thanks for your answers.
[ 0.6557237505912781, 0.20709797739982605, -0.14629527926445007, 0.7406084537506104, -0.2371840626001358, -0.5172115564346313, -0.06598593294620514, 0.4402070641517639, 0.036415018141269684, -0.28017404675483704, -0.01990356855094433, 0.6047963500022888, 0.21041156351566315, -0.1743157058954...
I have multiple files in a folder and each of them have one email message. Each message has a header in the format Subject: formatting fonts To: help@abc.com From: sender name message body I want to get all the unique sender names from all the messages (there is only 1 message per file) . How can I do tha...
[ 0.6403207778930664, 0.13062162697315216, 0.3958311080932617, 0.025861864909529686, -0.12776389718055725, 0.1249583289027214, 0.24478232860565186, -0.15336737036705017, -0.15767155587673187, -0.6353588104248047, 0.12138102948665619, 0.15667220950126648, -0.14611364901065826, 0.2719866633415...
messages, then you just need to make sure you are only getting the first matching line from each message, like so: ``` for f in * ; do cat $f | grep '^From: ' | head -1 | sort -u ; done ``` Obviously you can replace the \* in either command with a different glob or list of file names.
[ -0.20997507870197296, -0.17726017534732819, 0.6305000185966492, -0.0038112406618893147, -0.0903327688574791, 0.2916499376296997, 0.005086122080683708, 0.3518284261226654, -0.3982844352722168, -0.6579237580299377, -0.3960249125957489, 0.4311000108718872, -0.6306679844856262, -0.011376626789...
I want to have some kind of bounce effect in my animation plugin but it isn't working. The callback isn't called at all: ``` $(function() { var offset = $("#first").offset(); var position = $(window).scrollTop(); $(window).scroll(function() { var scroll = $(window).scrollTop(); if (scroll>posit...
[ 0.49076130986213684, -0.3681207299232483, 0.8298249244689941, -0.03606906533241272, -0.022491788491606712, 0.16499395668506622, 0.01051427610218525, -0.5519201755523682, -0.02644096314907074, -0.6289345026016235, -0.10342054814100266, 0.8149545192718506, -0.21117901802062988, -0.0745324343...
}, 1000, "easeInOutQuart", function() { $("body").animate({ scrollTop: offset.top - 150 }, 1000,
[ -0.03559911996126175, -0.13038873672485352, 0.63336580991745, 0.16618481278419495, 0.23129738867282867, 0.6306318044662476, 0.019449744373559952, -0.37621957063674927, 0.3302672505378723, -0.7861154079437256, 0.041137613356113434, 0.7803943753242493, -0.09010763466358185, -0.35164177417755...
"easeOutBounce" ) }) } }) }) ``` Okay.. Here's my HTML code.. I dont know why yours is working great.. But mine isn't.. The $('html') isn't working but yours is working fine.. ``` <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>Bounce Test Pad</titl...
[ 0.1705838292837143, -0.17771390080451965, 0.6856343150138855, 0.06003865227103233, -0.22577396035194397, -0.41291674971580505, 0.007493360433727503, -0.7058261036872864, -0.13332699239253998, -0.6438478231430054, 0.0286434143781662, 0.734176754951477, -0.07917148619890213, -0.4780532717704...
class="images" src="img/nike.jpg" /> <img id ="second" class = "images" src="img/golden.jpg" /> <img id = "third" class ="images" src ="img/a.jpg" /> </div> <script type="text/javascript"> $(window).resize(function() { centerIt(); }); $(function() { centerIt(); }) ...
[ -0.043919458985328674, -0.4687497913837433, 0.6286811828613281, -0.12191567569971085, -0.3645946979522705, 0.22424885630607605, 0.024167777970433235, -0.4430827498435974, -0.0662202388048172, -0.8311089873313904, -0.2574852705001831, 0.4355064630508423, -0.22080174088478088, 0.046663418412...
(viewportWidthSize / 2) - $("#first").width() / 2; $("#wrapper img").css("left", pixels); }; $(function() { var offset = $("#first").offset(); var prevpos = $(window).scrollTop(); var animating = false; $(window).scroll(function() { var curpos = $(window).sc...
[ 0.11498314887285233, -0.34717655181884766, 0.9179975390434265, -0.28094974160194397, -0.026713790372014046, 0.24897532165050507, 0.06313662230968475, -0.47059571743011475, -0.046509455889463425, -0.5272632241249084, -0.21667271852493286, 0.8279477953910828, -0.3385184705257416, -0.04068361...
$('html').animate( {scrollTop: offset.top + $("#first").height()}, 1000, "easeInOutQuart"
[ 0.060721758753061295, -0.21068894863128662, 0.9231005907058716, -0.001503768260590732, 0.12846074998378754, 0.1624716818332672, 0.03632174804806709, -0.19813473522663116, 0.04731697961688042, -0.7262924313545227, -0.2778984606266022, 0.6043938398361206, -0.0507349818944931, -0.268616527318...
) } animating = true; }) }) </script> </body> </html> ``` AnhTu is right about the animation raising the scroll event. Here's a fixed demo: <http://jsbin.com/alede> (You can edit the demo here: <http://jsbin.com/alede/edit>) You have to add code to prevent re-animating while the a...
[ 0.11055684834718704, -0.0850757583975792, 0.8246873021125793, -0.10166279971599579, -0.040626410394907, 0.25184527039527893, 0.1372244656085968, -0.5000734329223633, -0.17371316254138947, -0.7189828753471375, -0.15920059382915497, 0.8018481731414795, -0.08221140503883362, -0.15457329154014...
= $(window).scrollTop(); if (curpos > prevpos && !animating) { $('html').animate( {scrollTop: offset.top + height}, 1000, "easeInOutQuart", function(){ $('html').animate( {scrollTop: offset.top}, 1000, "easeOutBounce", function(){
[ -0.2857101559638977, -0.17789222300052643, 0.9340735077857971, -0.16387520730495453, 0.11069940030574799, 0.2522168457508087, 0.17771759629249573, -0.3627112805843353, 0.11792399734258652, -0.6974849104881287, -0.34541332721710205, 0.7508732080459595, -0.2924692630767822, -0.37503877282142...
animating = false; status.html('Both animations finished.<br />'); } ); status.html('First animation finished.<br />Second animation started<br />'); } ); animating = true; status.html('First animation started<br />'); } prevpos = curpos; }); ``` **Edit** O...
[ 0.10194144397974014, -0.1643436700105667, 0.3158233165740967, -0.12161442637443542, -0.1755978912115097, 0.37280428409576416, 0.3694112002849579, -0.12888678908348083, -0.12913726270198822, -0.848071277141571, 0.12818500399589539, 0.44669389724731445, -0.26519691944122314, -0.1501871347427...
What kind of math do you use to traverse the 4-heap when using an array to store all the elements? Specifically, how do you find the index of a parent node to a specific leaf? Let's say I have the following array: 0|1|2|3|4|5|6|7|8|9|10|... etc. with the heap then constructed from that with 1 being the root, 2..5 it...
[ -0.11069584637880325, 0.3568403422832489, 0.05593392997980118, 0.11322584748268127, -0.05991213768720627, 0.29466408491134644, 0.12723134458065033, -0.271010160446167, -0.14524409174919128, -0.5505303740501404, 0.14542455971240997, 0.07876188308000565, 0.013736567460000515, 0.2746401429176...
last child of a parent: ``` child_first = parent * 4 - 2 child_last = parent * 4 + 1 ``` You can see this in operation since, at each level, you add four times as many elements as you did in the previous level: ``` 1 ( 1) 2 thru 5 ( 4) 6 thru 21 ( 16) 22 thru 85 ( 64) 86 thru 341 ( ...
[ -0.11121536046266556, 0.1267845183610916, 0.30966508388519287, -0.09987276047468185, 0.4898017346858978, 0.3893451690673828, 0.21318159997463226, -0.49140918254852295, -0.08707761019468307, -0.7349939942359924, -0.1278853863477707, 0.00156134192366153, 0.016374429687857628, 0.3377881348133...
2: 2 -> 6 7 8 9 3 -> 10 11 12 13 4 -> 14 15 16 17 5 -> 18 19 20 21 Level 3: 6 -> 22 23 24 25 7 -> 26 27 28 29 8 -> 30 31 32 33 9 -> 34 35 36 37 10 -> 38 39 40 41 11 -> 42 43 44 45 12 -> 46 47 48 49 13 -> 50 51 52 53 14 -> 54 55 56 57 15 -> 58 59 60 61 16 -> 62 63 64 65 17 -> 66 67 68 69 18 -> 70 71 72 73 19 ->...
[ 0.005732160527259111, 0.4020094871520996, 0.7349099516868591, 0.33238422870635986, -0.17912374436855316, 0.4203915596008301, 0.5282620787620544, -0.6098212599754333, 0.031186146661639214, -0.6203140020370483, -0.03904543071985245, 0.5017871856689453, 0.24322809278964996, 0.2247706949710846...
-> 78 79 80 81 21 -> 82 83 84 85 ``` ``` Level 4: 22 -> 86 87 88 89 23 -> 90 91 92 93 24 -> 94 95 96 97 25 -> 98 99 100 101 : : : : 82 -> 326 327 328 329 83 -> 330 331 332 333 84 -> 334 335 336 337 85 -> 338 339 340 341 ``` Examples are: ``` parent of 342 = int(344/4) = 86 (same for 343,344,...
[ -0.2505183815956116, 0.2568427622318268, 0.06086928769946098, -0.12864965200424194, -0.39861860871315, 0.7537596821784973, 0.4098053574562073, -0.6010737419128418, -0.30330124497413635, -0.23219318687915802, -0.12083516269922256, -0.1015700176358223, -0.021410390734672546, 0.42943108081817...
21 * 4 - 2 = 82 last child of 21 = 21 * 4 + 1 = 85 ```
[ 0.04307732358574867, 0.6455819606781006, 0.24123989045619965, -0.4382037818431854, -0.042546436190605164, 0.32131442427635193, 0.5806078910827637, -0.3050369620323181, -0.3222268223762512, -0.32861799001693726, 0.01817835494875908, -0.06201646849513054, -0.043770257383584976, 0.26591908931...
In [this question](https://stackoverflow.com/questions/792660/is-gc-suppressfinalize-guaranteed) @Jon skeet referenced this [old blog post](http://blogs.msdn.com/cbrumme/archive/2003/04/19/51365.aspx) by the authority Chris Brumme. I was wondering, do I need to follow all calls to `GC.SuppressFinalize(this)` with a `...
[ 0.33365851640701294, 0.10326597839593887, 0.1333785355091095, -0.18162335455417633, -0.014584485441446304, -0.6388511657714844, 0.23902200162410736, -0.4420830309391022, -0.2953092157840729, 0.1854805201292038, -0.22284553945064545, 0.5218052268028259, -0.5004579424858093, -0.0110298916697...
will keep an object alive in this way: you could pass it to `Console.WriteLine`, call `ToString`, or even... `GC.SuppressFinalize`. (Or as MSDN puts it: > The KeepAlive method performs no operation and produces no side effects other than extending the lifetime of the object passed in as a parameter.)
[ 0.3733629584312439, -0.22751033306121826, 0.5817571878433228, -0.18878233432769775, 0.3503051996231079, -0.334027498960495, 0.3965326249599457, -0.11668150871992111, -0.06605788320302963, -0.17927245795726776, -0.29940903186798096, 0.738345742225647, -0.49980974197387695, 0.011060593649744...
I'm using dojo and dijit and have an inlineEditBox widget. I'm trying to capture the onchange event and send a key/value post to a php page (to set into a database). The value is the new value just submitted, available from e.target.value. That's easy. I'd like the key value to be the id of the inlineEditBox widget. H...
[ 0.27464941143989563, -0.09844927489757538, 0.5874602198600769, 0.11644696444272995, -0.5732216238975525, 0.015049940906465054, 0.1741451919078827, -0.09886582940816879, 0.018067266792058945, -0.5683155059814453, 0.4188665747642517, 0.6297659277915955, -0.4059341847896576, 0.179304301738739...
console.log(this.id + " changed to value" + value); </script> </span> ```
[ -0.25761550664901733, -0.11459843069314957, 0.7044622898101807, 0.04418444260954857, 0.243768110871315, -0.16711123287677765, -0.09211848676204681, 0.16962075233459473, -0.031196655705571175, -0.8181284070014954, -0.2943590581417084, 0.7090460658073425, -0.22929631173610687, 0.229411959648...
I have multiple linq queries for searching a database of information based on a single specific piece of criteria per query. e.g. by ID or by Name etc. Currently, the user can search by use of only one query method. The problem is that I want the user to be able to search using multiple criteria, without having to wri...
[ 0.27363139390945435, 0.36675870418548584, 0.4280698001384735, 0.28353825211524963, 0.2527693212032318, 0.022601395845413208, -0.18914896249771118, -0.3764960765838623, -0.40095990896224976, -0.6186590790748596, 0.045049652457237244, 0.3570864200592041, -0.046684157103300095, 0.470946520566...
the module title that the questions are stored under. Since currently the user can only search by department name or by module title - e.g. Computer Science or Distributed Systems, I would like to change this so that the user can specify something like: Return all questions that are of DepartmentName == Computer Scien...
[ -0.3235997259616852, -0.13980776071548462, 0.7496896386146545, 0.4024960696697235, -0.08424322307109833, -0.008840675465762615, -0.1610584855079651, -0.19799387454986572, -0.3551056385040283, -0.5025566220283508, -0.23090636730194092, 0.53252112865448, -0.14668554067611694, 0.5611599087715...
where q.Topic.Module.Department.DepartmentName.Equals(deptName) join s in dc.Solutions on q.QuestionID equals s.QuestionID
[ -0.49310392141342163, -0.31427764892578125, 0.6405714750289917, 0.34621891379356384, 0.17443205416202545, 0.3245629370212555, -0.02435685321688652, -0.292375773191452, -0.3093907833099365, -0.5437499284744263, -0.6293250918388367, 0.1841922551393509, -0.006791410967707634, 0.45803773403167...
into qs // note grouping select new {
[ -0.19867011904716492, -0.1582701951265335, -0.09477457404136658, -0.3810690939426422, 0.2748243510723114, -0.08447517454624176, 0.010755511932075024, -0.21817293763160706, 0.20603680610656738, -0.51801598072052, -0.29250532388687134, 0.2667858302593231, -0.25957223773002625, -0.10749450325...
Module = q.Topic.ModuleTitle, Topic = q.TopicName, Question = q.QuestionText,
[ -0.6034879088401794, -0.14630892872810364, 0.3258723318576813, 0.24142710864543915, -0.1933649331331253, 0.012567020021378994, -0.04037483409047127, -0.17292901873588562, -0.2840545177459717, -0.14357814192771912, -0.8270498514175415, 0.22652176022529602, -0.020744062960147858, 0.002044988...
QuestionType = q.QuestionType, }; return queryResult; } //Module Title Query public static IQueryable SearchByModuleTitleInfo(string modTitle) { ExamineDataContext dc = new ExamineDataContext(); var queryResult = from q in dc.GetTable<Question>()
[ -0.2715354859828949, -0.32058200240135193, 0.6993226408958435, 0.159700408577919, -0.07333998382091522, -0.20089709758758545, 0.09872371703386307, -0.5062398314476013, 0.06010573357343674, -0.31390541791915894, -0.45325160026550293, 0.5722180604934692, -0.30143457651138306, 0.3675212860107...
where q.Topic.Module.ModuleTitle.Equals(modTitle) join s in dc.Solutions on q.QuestionID equals s.QuestionID into qs //
[ -0.4163934290409088, -0.20644226670265198, 0.6378373503684998, 0.1901654154062271, 0.06421633064746857, 0.19851088523864746, 0.041566915810108185, -0.5666570663452148, -0.09993290156126022, -0.38795503973960876, -0.6912917494773865, 0.2358831912279129, 0.007738177198916674, 0.0687738135457...
note grouping select new { Module = q.Topic.ModuleTitle,
[ 0.02816220000386238, -0.30284780263900757, 0.2724030911922455, -0.013798979111015797, 0.18687529861927032, -0.19998061656951904, -0.13448277115821838, -0.4211471974849701, -0.30520185828208923, -0.49538710713386536, -0.4032832980155945, 0.4169272184371948, -0.1993483006954193, 0.3583137691...
Topic = q.TopicName, Question = q.QuestionText, QuestionType = q.QuestionType,
[ -0.5371313095092773, 0.01942344382405281, 0.1415896862745285, 0.1874808669090271, -0.5075270533561707, 0.2336471974849701, 0.05756894126534462, 0.05145431309938431, -0.0547293983399868, -0.2545306086540222, -0.640931248664856, 0.3037008047103882, -0.08606628328561783, 0.2140146642923355, ...
}; return queryResult; } ``` You can combine them into a single query, by only applying the condition if it's set: ``` where (cond1 == "" || row.field1 == cond1) && (cond2 == "" || row.field2 == cond2) ... ``` So if you search for cond1="" and cond2="somevalue", in effect you're only searching on cond2....
[ -0.2873044013977051, -0.06195492669939995, 0.19899463653564453, -0.10073494911193848, 0.31168630719184875, -0.06511467695236206, 0.20753248035907745, -0.1731203943490982, -0.1818789541721344, -0.6224996447563171, -0.11712789535522461, 0.4862340986728668, -0.4258618652820587, 0.127782404422...
How can i prevent duplicate rows being selected in a select query? I have a table with the following fields: * name * type * user1 * user2 * user3 * date My query requires me to select data for a particular user only at a time which is entered by the user at front end.. Say user enters 1, then the select query shoul...
[ 0.02494618110358715, 0.14226765930652618, 0.39964285492897034, -0.10460227727890015, 0.19763943552970886, 0.1672123521566391, 0.09393391758203506, -0.06815832108259201, -0.32342085242271423, -0.6412695050239563, 0.05956435576081276, 0.30630794167518616, -0.2929929792881012, 0.4925349056720...
GROUP BY clause. You also have a date column and in Oracle that also means there is time so to be safe you should truncate the date column. Even if you know time is no part of the insert truncate anyways. It good practice that when you see date you consider it has time. The next issue you'll encounter is you can not h...
[ -0.1464022547006607, 0.2694440186023712, 0.18454712629318237, -0.18568919599056244, -0.16260594129562378, 0.11635491997003555, -0.016718832775950432, -0.37352797389030457, -0.2621442377567291, -0.35844361782073975, -0.21187156438827515, 0.2567310035228729, -0.3932104706764221, -0.011101679...
I have my main program window, and I would like to make a foldable panel. What I mean is, a panel which is aligned to one of the sides of the window, with a fold/unfold button. It's important that when the panel gets folded/unfolded, the other widgets change their size accordingly to take advantage of the space they ha...
[ 0.28124022483825684, -0.12408381700515747, 0.4786689281463623, -0.32893964648246765, 0.0687117651104927, 0.3058556020259857, -0.2254946380853653, -0.0780857652425766, -0.42546528577804565, -0.9439568519592285, -0.11403542757034302, 0.41390788555145264, -0.0436740517616272, 0.04250005260109...
self.SetSizer(sizer) self.splitter = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE) left.Reparent(self.splitter) right.Reparent(self.splitter) self.left = left self.right = right self.splitter.SplitVertically(self.left, self.right) self.splitter.SetMinimumPaneSi...
[ -0.17011405527591705, -0.5220685601234436, 0.4164562523365021, -0.17771680653095245, -0.11969665437936783, 0.4883531630039215, 0.11183842271566391, -0.700203537940979, -0.5569571852684021, -0.732272207736969, -0.23426701128482819, 0.35349971055984497, -0.18982699513435364, -0.1523964107036...
size=(10, -1)) fold_button.Bind(wx.EVT_BUTTON, self.On_FoldToggle) sizer.Add(fold_button, 0, wx.EXPAND) def On_FoldToggle(self, event): if self.splitter.IsSplit(): self.sash_pos = self.splitter.SashPosition self.splitter.Unsplit() else: self.split...
[ -0.34042537212371826, -0.3642387092113495, 0.36492425203323364, -0.2475968897342682, -0.06563315540552139, 0.3154686391353607, 0.41331276297569275, -0.781280517578125, -0.4078427851200104, -0.8967466354370117, -0.3582213521003723, 0.32511985301971436, -0.028853274881839752, -0.054893393069...
left = wx.Panel(self, style=wx.BORDER_SUNKEN) right = wx.Panel(self, style=wx.BORDER_SUNKEN) left_sizer = wx.BoxSizer(wx.VERTICAL) left.SetSizer(left_sizer) left_sizer.Add(wx.calendar.CalendarCtrl(left), 1, wx.EXPAND | wx.ALL, 5) left_sizer.Add(wx.Button(left, label="Act"), 0, w...
[ -0.345828652381897, -0.5243561863899231, 0.7291881442070007, -0.3085668683052063, -0.070724718272686, 0.352186381816864, -0.08991476893424988, -0.09998595714569092, -0.6004717946052551, -0.8486119508743286, -0.40673673152923584, 0.31804490089416504, -0.2072726935148239, -0.0053789992816746...
wx.StaticText(right, label="Fold panel", style=wx.BORDER_RAISED), 1, wx.EXPAND | wx.ALL, 5 ) FoldableWindowContainer(self, left, right) app = wx.PySimpleApp() app.TopWindow = FoldTest() app.TopWindow.Show() app.MainLoop() ``` Also, check out wx.CollapsiblePane in the wxPython demos.
[ -0.38952773809432983, -0.1757129430770874, 0.7290008068084717, -0.26567885279655457, -0.04485999420285225, 0.10080664604902267, 0.1460154801607132, -0.17072147130966187, -0.40582722425460815, -0.8666878938674927, -0.5410258769989014, 0.3131662607192993, -0.33592402935028076, 0.032405711710...
I would like to hear if any of you have an idea to do the following: I have one table containing some cardefinitions [id][Company][Mode], this could e.g. be Audi 100, Ford Mustan etc. I then have another field which is a string containing both the car and the model, this could be "Ford Mustang 2.5T", I then need to fin...
[ 0.5912795066833496, 0.517609179019928, 0.30005812644958496, 0.07769045233726501, -0.12199309468269348, 0.10272426158189774, -0.15645036101341248, -0.19199000298976898, 0.22950278222560883, -0.31311601400375366, 0.07710713148117065, 0.47026145458221436, 0.1957579106092453, 0.388574898242950...
*"Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'dbo.CarModelDefinition' because it is not full-text indexed."* Does anyone have an idea of how I can solve this? Search the string with the wildcarded columns values using `LIKE`. ``` @CarDefintion = "Ford Mustang 2.5T" Select top 1 CarDefinition...
[ 0.176986426115036, 0.18370871245861053, 0.3278083801269531, 0.1053256094455719, 0.06661032885313034, 0.15961489081382751, 0.10639362782239914, -0.1892443746328354, 0.09485949575901031, -0.15153934061527252, 0.017624668776988983, 0.7166890501976013, 0.08692826330661774, 0.2791958749294281, ...
I had heard a rumour that the ActiveDirectoryMembershipProvider source code was available. I'm having some difficulty troubleshooting the our setup of the out-of-the-box provider, and stepping through the source would have been really handy. You can get the entire source to the .NET framework using the [.NET Framework...
[ 0.6649507880210876, -0.07093210518360138, 0.2147556096315384, -0.020077085122466087, 0.01772424578666687, -0.2393953651189804, 0.25818878412246704, 0.2858983278274536, -0.09025033563375473, -0.6872791051864624, -0.2725309729576111, 0.6033629775047302, -0.13726632297039032, 0.13303872942924...
I'm working on a script that needs to set up a Xerox Phaser printer using the postscript driver. The computers currently have the PCL driver on them (though the printers aren't set up on them yet.) I want to install the PS driver using the specified INF, and then install the printer using the driver provided after the ...
[ 0.3032790422439575, 0.18205511569976807, 0.5597843527793884, -0.016964105889201164, 0.11628229916095734, -0.10037026554346085, 0.013522240333259106, 0.02432500571012497, -0.18453235924243927, -1.0185555219650269, -0.10374098271131516, 0.7301921844482422, -0.30884552001953125, -0.2176792621...
= 3 ``` And remove the `oPort.HostAddress` line
[ -0.049021922051906586, 0.3861515522003174, 0.6511265635490417, -0.5922703742980957, -0.020532924681901932, -0.09112276136875153, 0.27553874254226685, -0.14873741567134857, -0.1267133355140686, -0.21902762353420258, -0.44960862398147583, 0.24028918147087097, -0.5247043371200562, 0.341636389...
I have to build a web application that's similar to a "branch/store locater". A user types in his address and the web application will plot nearby stores on a map. One of the requirements is: "The web application must support 100 simultaneous users and up to 5GB/day transfer volume." Much of the transferred data wil...
[ 0.41867393255233765, 0.2755470871925354, 0.5601522326469421, 0.17628397047519684, 0.21912582218647003, -0.12099501490592957, 0.022911177948117256, -0.2491554319858551, -0.11708002537488937, -0.7653849720954895, 0.030444364994764328, 0.3039552867412567, -0.2026677280664444, 0.29514220356941...
never the architect. So although I'm aware of some (not all) strategies for managing high-traffic scenarios, I'm not familiar with their actual implementation. Can someone offer me advice, feedback, or suggested research? Did I overlook anything? \*\*Also, I'm building this with LAMP with Smarty. Yes, you're describi...
[ 0.7096611261367798, 0.12539254128932953, -0.016699140891432762, 0.037550464272499084, -0.32023996114730835, 0.14646781980991364, 0.1880597323179245, 0.011058701202273369, -0.17357198894023895, -0.5247790217399597, 0.13406763970851898, 0.5673455595970154, -0.20021215081214905, -0.2131822705...
I'm trying to delete all digits from a string. However the next code deletes as well digits contained in any word, and obviously I don't want that. I've been trying many regular expressions with no success. Thanks! --- ``` s = "This must not b3 delet3d, but the number at the end yes 134411" s = re.sub("\d+", "", s) ...
[ 0.001660374691709876, 0.13369230926036835, 0.4655540883541107, -0.3067099153995514, -0.4341006577014923, 0.1011461690068245, 0.8152602314949036, -0.083551324903965, -0.15600858628749847, -0.4683590233325958, -0.5377606153488159, 0.5316896438598633, -0.4995404779911041, 0.05129154026508331,...
at the end yes ' ``` Edit: After looking at the comments, I decided to form a more complete answer. I think this accounts for all the cases. ``` s = re.sub("^\d+\s|\s\d+\s|\s\d+$", " ", s) ```
[ -0.11697635799646378, 0.27314797043800354, 0.778241753578186, -0.23170579969882965, 0.008192582055926323, 0.19272048771381378, 0.3281055986881256, -0.4856523871421814, 0.008786444552242756, -0.48942479491233826, -0.542926013469696, 0.292884886264801, -0.2450161576271057, 0.1865580976009369...
Is there any way to group tests in JUnit, so that I can run only some groups? Or is it possible to annotate some tests and then globally disable them? I'm using **JUnit 4**, I can't use TestNG. **edit:** @RunWith and @SuiteClasses works great. But is it possible to annotate like this only some tests in test class? O...
[ 0.42927300930023193, -0.10512189567089081, -0.4688328802585602, 0.24550321698188782, -0.26358160376548767, -0.19345256686210632, 0.534656822681427, -0.0042593758553266525, 0.0019627718720585108, -0.660636842250824, 0.2106865793466568, 0.3579258322715759, -0.2893754839897156, -0.17118537425...
by Maven, it is possible to specify exactly what tests you want to include. See [the Maven surefire documentation](http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion-exclusion.html) for this. More generally, though, what I do is that I have a tree of test suites. A test suite in JUnit 4 looks som...
[ 0.6101725101470947, -0.057687584310770035, -0.23714232444763184, 0.006359440740197897, -0.06597486138343811, -0.2516677677631378, 0.4100913405418396, -0.34138813614845276, 0.16307994723320007, -0.7409813404083252, 0.010781706310808659, 0.7042446732521057, -0.13886132836341858, -0.137265056...
than one different way. But it's still possible (you can for example have one set of suites that slice based on module, then another slicing on the type of test).
[ 0.6280502080917358, -0.4288584887981415, -0.017304226756095886, 0.5046672224998474, 0.056085895746946335, -0.22725634276866913, -0.179462268948555, -0.3500736653804779, -0.11614614725112915, -0.9102147817611694, 0.13551606237888336, 0.4378354251384735, 0.11545345932245255, -0.0530524365603...
Let's say I have two applications which have to work together to a certain extent. 1. A web application (PHP, Ruby on Rails, ...) 2. A desktop application (Java, C++, ...) The desktop application has to be notified from the web application and the delay between sending and receiving the notification must be short. (<...
[ 0.5744869709014893, 0.010206302627921104, 0.3718428611755371, 0.15333177149295807, -0.4770641326904297, -0.22014755010604858, 0.06164375692605972, -0.16622914373874664, -0.11512423306703568, -0.6685441732406616, 0.15661081671714783, 0.45309391617774963, -0.34729838371276855, -0.14069217443...
ideas you could give me. I think the "best practice" here will depend on the number of desktop clients you expect to serve. If there's just one desktop to be notified, then polling may well be a fine approach -- yes, polling is much more overhead than an event-based notification, but it'll certainly be the easiest solu...
[ 0.5386790633201599, -0.16068528592586517, 0.22404177486896515, 0.49246764183044434, 0.16077500581741333, 0.11886359006166458, -0.02521282248198986, 0.04516386613249779, -0.4747634530067444, -0.6565141081809998, 0.28523775935173035, 0.2611420750617981, -0.038138456642627716, 0.1567690670490...
and register the address of the service with the web-server. This way, the web-server can call out to the desktop as needed. Be warned, though -- both alternatives are chock full of gotchas. A few highlights: * Keeping a connection open can be tricky, since you want your web-servers to be hot-swappable * Calling out ...
[ 0.2026391625404358, 0.10601664334535599, 0.23800404369831085, 0.25713372230529785, -0.08438576757907867, -0.2847430408000946, 0.6121929883956909, 0.16398821771144867, -0.3924049735069275, -0.6772767305374146, -0.2739659249782562, 0.5531136989593506, -0.09880301356315613, 0.2176012843847274...
an intermediary notification server -- the web-server could post an update somewhere, and the desktop could poll/connect/register there to be notified. To avoid reinventing the wheel here, this could involve some sort of MessageQueue system... This, of course, adds the complexity of needing to maintain the new intermed...
[ 0.11439894139766693, -0.13756729662418365, 0.4349616467952728, 0.3938330113887787, -0.14480265974998474, 0.2003280222415924, -0.16303616762161255, -0.12056604027748108, -0.0007315221009775996, -0.6198248863220215, 0.2546096742153168, 0.46223166584968567, -0.26969224214553833, -0.0715343579...