text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
it would be nice not to have to supply the "foo" bit. Unfortunately, there's just no way of doing it. You could probably write a post-build IL rewriter which determined how the method was called and rebuilt it from that, but that's rather more work than the benefit, I suspect :)
[ 0.7060999870300293, 0.5476445555686951, 0.07057715207338333, -0.16732604801654816, -0.014814536087214947, 0.30715319514274597, 0.15840493142604828, -0.05767480656504631, 0.36026930809020996, 0.010750086046755314, -0.03310241922736168, 0.8050475120544434, -0.08125751465559006, -0.2690528333...
If I have the following function: ``` def intercept(func): # do something here @intercept(arg1=20) def whatever(arg1,arg2): # do something here ``` I would like for intercept to fire up only when **arg1** is 20. I would like to be able to pass named parameters to the function. How could I accomplish this? Her...
[ -0.07050520926713943, -0.13026010990142822, 0.4108079671859741, -0.02980654686689377, -0.22001008689403534, -0.08522848784923553, 0.1081278845667839, -0.17632092535495758, -0.02806027978658676, -0.3898051381111145, 0.08663371205329895, 0.6275478601455688, -0.4925864040851593, -0.2201970070...
unexpected keyword argument 'a'** ``` from functools import wraps def intercept(target,**trigger): def decorator(func): names = getattr(func,'_names',None) if names is None: code = func.func_code names = code.co_varnames[:code.co_argcount] @wraps(func) def de...
[ -0.084455706179142, -0.10093914717435837, 0.356776624917984, -0.1570672243833542, -0.16173483431339264, 0.1651161015033722, 0.1886388212442398, -0.46678560972213745, -0.34705856442451477, -0.22600197792053223, -0.37561270594596863, 0.6029931306838989, -0.2243100255727768, -0.09273247420787...
for n,v in zip(names,args): all_args[n] = v for k,v in trigger.iteritems(): if k in all_args and all_args[k] != v: break else:
[ 0.13319753110408783, -0.15855301916599274, 0.3232725262641907, -0.3423537015914917, 0.27498048543930054, 0.16519048810005188, 0.2876920700073242, -0.7631797194480896, -0.5227637887001038, -0.03195369616150856, -0.26168128848075867, 0.5000446438789368, -0.5770857930183411, -0.13413034379482...
return target(all_args) return func(*args,**kwargs) decorated._names = names return decorated return decorator ``` Example: ``` def interceptor1(kwargs): print 'Intercepted by #1!' def interceptor2(kwargs): print 'Intercepted by #2!' def interceptor3(kwargs): print 'Inte...
[ 0.025550033897161484, -0.0725817084312439, 0.5445809960365295, -0.0023820814676582813, -0.09743182361125946, 0.3001241385936737, 0.4704815447330475, -0.4159528911113739, -0.14453551173210144, -0.5839875340461731, -0.22399315237998962, 0.6452931761741638, -0.5651640295982361, -0.19567967951...
# elif arg2 == 5 def foo(arg1,arg2): return arg1+arg2 >>> foo(3,4) 7 >>> foo(20,4) Intercepted by #2! >>> foo(3,5) Intercepted by #3! >>> foo(20,5) Intercepted by #1! >>> ``` `functools.wraps` does what the "simple decorator" on the wiki does; Updates `__doc__`, `__name__` and other attribute of the decorator.
[ -0.1140921488404274, -0.28605058789253235, 0.23076289892196655, -0.03546753525733948, 0.07071130722761154, -0.011112583801150322, 0.6702304482460022, -0.5086700916290283, 0.058408208191394806, -0.4385835826396942, -0.4400267004966736, 0.5440263152122498, -0.7725926041603088, -0.08810236304...
Previous versions of sIFR allowed users to enter "sWmode: 'transparent'" to avoid the common problem of Flash objects being overlayed on regular HTML objects on screen, no matter the z-index of either elements. How do I replicate this behavior in sIFR 3.0? Indeed, you can use ``` wmode: 'transparent' ``` or ``` wm...
[ 0.5197601914405823, -0.23868298530578613, 0.7668600678443909, 0.06722670793533325, -0.20163485407829285, -0.3198586106300354, 0.008366898633539677, 0.22189070284366608, -0.1755179464817047, -0.6549515128135681, 0.07930891215801239, 0.5782842636108398, -0.21803973615169525, -0.2611398100852...
I'm using Symfony 1.2 in a standard Propel form class. ``` public function configure() { $this->setWidgets(array( 'graduate_job_title' => new sfWidgetFormInput( array(), array( 'maxlength' => 80, 'size' => 30, 'value' => '' ) ) )); //etc } ``` However, I want the value of this field to come from the use...
[ 0.21293936669826508, 0.08672162145376205, 0.7618821263313293, -0.17927508056163788, 0.09272664040327072, -0.30894723534584045, 0.1271308958530426, -0.2793920636177063, -0.0883704125881195, -0.5236676335334778, -0.24940495193004608, 0.8491343259811401, -0.35190197825431824, -0.1853876858949...
The iPhone app I'm working on uses html help files and special characters such as ``` ü and ê ``` are being mangled my iPhone's mobile Safari. Anything I can do to correct this? If you're using XHTML, ensure that the content of your files really is the encoding specified in the doctype. If you're using just pl...
[ 0.5263406038284302, 0.2205611765384674, 0.275970995426178, 0.10830896347761154, 0.18146803975105286, 0.1501803994178772, 0.4688016176223755, 0.15845128893852234, -0.13921670615673065, -0.641759991645813, -0.22945092618465424, 0.6034325361251831, -0.4531364142894745, -0.5325237512588501, ...
I'm building an application in Flex and I have few windows with scroll. When I'm trying to use mouse scrollwheel the window does not scroll up/down. Plus if it is possible to make the window to scroll up/down then is it possible to make to scroll right/left. in as3 there is a mouseevent.mouse\_wheel event. Listening fo...
[ 0.04816605523228645, -0.11117184907197952, 0.3787009119987488, 0.04451068863272667, -0.12678754329681396, -0.05693261697888374, 0.38380637764930725, -0.10787178575992584, -0.1281234323978424, -1.1389927864074707, 0.19213537871837616, 0.7529219388961792, 0.030477318912744522, 0.065566465258...
you could harness an up/down motion to move a scroller left/right, but i dont think thats what your after.
[ 0.0992046520113945, -0.0832979679107666, 0.1845257431268692, 0.3686979115009308, -0.07875798642635345, -0.2767484784126282, 0.018891792744398117, -0.4445042312145233, 0.047920435667037964, -0.33919423818588257, 0.4036347568035126, 0.47755756974220276, 0.05525537580251694, -0.55963176488876...
I have a website in Sharepoint 2007. I want to make a query where the field "home" of the webpages is equal to 1 in one specific SPWeb and (this is the important part) its sub-SPwebs. I can make this work with the site in question and not with the subsites. That is to say: It is not recursive but I indicate it in the "...
[ 0.08977141976356506, 0.3611770570278168, 0.5224936008453369, -0.23668263852596283, -0.3100869655609131, -0.25535470247268677, 0.14329545199871063, -0.24454529583454132, -0.20925778150558472, -0.4728454649448395, 0.2966001331806183, 0.4053341746330261, -0.15741543471813202, 0.15322355926036...
code I am using is this (i have tried with other methods with the same query and the result is the same): > ``` > string campo="home"; > SPSiteDataQuery qry = new SPSiteDataQuery(); > > qry.Query = "<Where><Eq><FieldRef Name='"; > qry.Query += campo + "'/><Value > > ``` ``` T...
[ 0.38830962777137756, 0.18722562491893768, 0.3894197642803192, -0.37001195549964905, 0.012854878790676594, -0.1088637039065361, 0.017108503729104996, -0.5166404843330383, 0.06722133606672287, -0.4880777597427368, -0.059478942304849625, 0.37815263867378235, -0.3991410732269287, -0.0198894683...
qry.Query += "</Where><OrderBy><FieldRef > > ``` > > Name='Modified' Ascending='false'> />"; ``` qry.Webs = "<Webs Scope='Recursive'/>"; ``` > ``` > qry.ViewFields = "<FieldRef Name='Title'/><FieldRef > > ``` > > Name='Modified'/>"; > > > > ``` > //this gives me system pri...
[ -0.30682462453842163, -0.20805047452449799, 0.7293215990066528, 0.15030738711357117, -0.046029891818761826, -0.11357899010181427, 0.0016317813424393535, -0.46698999404907227, -0.17005035281181335, -0.7120121717453003, -0.07786595821380615, 0.11292407661676407, -0.19983018934726715, 0.30556...
> ``` > using (SPWeb web = site.OpenWeb("/News/")) > { > > StringBuilder sb = new StringBuilder(); > >
[ 0.26254960894584656, -0.07638289779424667, 0.48826315999031067, -0.3521896004676819, -0.19724249839782715, 0.03305283933877945, 0.720177948474884, -0.572079598903656, -0.354078084230423, -0.8079355359077454, -0.3739694654941559, 0.011643397621810436, -0.34818634390830994, 0.192366421222686...
sb.Append("<Lists>"); > > foreach (SPList list in web.Lists) > { > >
[ 0.17427915334701538, -0.007648089434951544, 0.214720219373703, -0.28744077682495117, -0.3394608795642853, 0.0985565334558487, 0.5779657959938049, -0.6674034595489502, -0.4978563189506531, -0.8757411241531372, -0.33275243639945984, -0.15056653320789337, -0.7476380467414856, -0.1045507490634...
if (list.BaseTemplate.ToString() == > > ``` > > "850") > { > > > > ``` > sb.Append("<List ID=\"" + > > ``` > > list.ID.ToString() + "\"/>"); > > > > ``` > } > >
[ -0.29046306014060974, -0.25124338269233704, 0.4174734652042389, -0.4977208971977234, 0.22115345299243927, -0.10964004695415497, 0.119219571352005, -0.8487145304679871, 0.02270677499473095, -0.5256251096725464, -0.297443151473999, 0.3384794592857361, -0.2807426154613495, -0.1552864611148834...
} > > sb.Append("</Lists>"); > qry.Lists = sb.ToString(); > >
[ 0.027452798560261726, -0.09862542152404785, 0.17305876314640045, -0.3161951005458832, -0.0014518689131364226, 0.16866186261177063, 0.45595574378967285, -0.6886609792709351, -0.2732285261154175, -0.6613576412200928, -0.16837090253829956, 0.1837884932756424, -0.6814484000205994, -0.060605965...
dt = web.GetSiteData(qry); > > .................. > > ``` So, the only solution I found was to make a loop after the precedent code through the Webs but i don't think this is a very optimized way: ``` foreach (SPWeb w2 in web.Webs) {
[ 0.21738894283771515, -0.19746431708335876, 0.2200688123703003, -0.029482310637831688, -0.12732654809951782, -0.08617821335792542, 0.5283429026603699, -0.11492966115474701, -0.15921850502490997, -0.6651268005371094, 0.024712078273296356, 0.44701695442199707, -0.28962257504463196, 0.07239364...
sb = new StringBuilder(); sb.Append("<Lists>");
[ -0.005549125373363495, -0.14279310405254364, 0.32774418592453003, -0.5435954332351685, -0.1744888424873352, 0.12027458101511002, 0.5714292526245117, -0.7571324110031128, -0.30578842759132385, -0.5992859601974487, -0.4868178367614746, 0.019310638308525085, -0.7972182035446167, 0.13066101074...
foreach (SPList list in w2.Lists) { if (list.BaseTemplate.ToString() == "850")
[ -0.10847816616296768, 0.20538000762462616, 0.35714641213417053, -0.6839972138404846, 0.256738543510437, 0.1234026774764061, 0.269788533449173, -0.7837564945220947, -0.24068792164325714, -0.3582431674003601, -0.1682368516921997, 0.5328885912895203, 0.05714593455195427, -0.1367024928331375, ...
{ sb.Append("<List ID=\"" + list.ID.ToString() + "\"/>"); }
[ -0.10643111914396286, -0.19556297361850739, 0.3383266031742096, -0.5821440815925598, -0.003189707873389125, 0.2016466110944748, 0.5478445291519165, -0.7689410448074341, -0.18117867410182953, -0.5723310708999634, -0.37803125381469727, 0.2219613790512085, -0.802505612373352, -0.0586498193442...
} sb.Append("</Lists>");
[ -0.06457245349884033, 0.05926905944943428, -0.060332365334033966, -0.508112907409668, 0.08897081762552261, 0.12332768738269806, 0.5282120704650879, -0.33865538239479065, -0.1335565149784088, -0.6032839417457581, -0.3641648590564728, 0.42357438802719116, -0.9047322273254395, -0.078255131840...
qry.Lists = sb.ToString(); DataTable dttmp = w2.GetSiteData(qry);
[ 0.041981860995292664, -0.277850866317749, 0.21329404413700104, 0.13011740148067474, -0.304347425699234, -0.018964963033795357, 0.3739495873451233, -0.4223695397377014, -0.3272364139556885, -0.5107964873313904, -0.5076772570610046, -0.004833502229303122, -0.47091376781463623, 0.394381374120...
if (dttmp != null && dttmp.Rows.Count > 0) {
[ -0.13297168910503387, -0.09273933619260788, 0.26258644461631775, -0.2745407223701477, 0.15265946090221405, 0.12878580391407013, 0.22471143305301666, -0.3695688247680664, 0.04343079775571823, -0.2559635639190674, -0.42703157663345337, 0.4911806583404541, -0.3248160183429718, -0.230495199561...
dt.Merge(dttmp); } w2.Dispose();
[ -0.059480391442775726, -0.4318906366825104, -0.10347948968410492, -0.28173694014549255, 0.07504510879516602, 0.005623709410429001, 0.3738732635974884, -0.4209527373313904, 0.1930069625377655, -0.7770094871520996, -0.3325696587562561, 0.4792982041835785, -0.5681918859481812, 0.1437097340822...
} ``` Finally I did the following, i don't know what has worked finally, i have changed the way I ask the Lists and i have included RowLimit: DataTable dt = null; DataView dv = null; ``` SPSiteDataQuery qry = new SPSiteDataQuery(); qry.Query = "<Where><Eq><FieldRef Name='"; qry.Query += campo + "'/><Va...
[ -0.03398676961660385, -0.022273534908890724, 0.7945828437805176, -0.1554889976978302, -0.16592273116111755, -0.067618228495121, 0.1340307593345642, -0.5137473344802856, -0.42657798528671265, -0.5473230481147766, -0.1205255314707756, 0.5318213105201721, -0.5083930492401123, -0.0069849579595...
= 3; qry.ViewFields = "<FieldRef Name='Title'/><FieldRef Name='Modified'/><FieldRef Name='FileRef'/>"; using (SPSite site = new SPSite(CurrentSite.ID, GetSystemToken(CurrentSite))) { using (SPWeb web = site.OpenWeb(webUrl)) { dt = web.GetSiteData(qry); dv = dt.D...
[ 0.1991957277059555, -0.45431432127952576, 1.0104568004608154, -0.3498411774635315, -0.1133149042725563, 0.08660883456468582, 0.3854699730873108, -0.6534153819084167, -0.27691754698753357, -0.439165860414505, -0.26159602403640747, 0.1988278180360794, -0.21103039383888245, 0.2422432154417038...
Consider this method signature: ``` public static void WriteLine(string input, params object[] myObjects) { // Do stuff. } ``` How can I determine that the WriteLine method's "myObjects" pararameter uses the params keyword and can take variable arguments? Check for the existence of `[ParamArrayAttribute]` on it....
[ -0.2518504858016968, 0.1059817522764206, 0.43957456946372986, -0.011559312231838703, -0.026236437261104584, 0.01240785513073206, 0.3283810019493103, -0.2760298252105713, -0.2514505088329315, -0.1251063495874405, -0.3561924695968628, 0.2728757858276367, -0.4852694571018219, 0.11166537553071...
I am trying to write a Perl script using the `utf8` pragma, and I'm getting unexpected results. I'm using Mac OS X 10.5 (Leopard), and I'm editing with TextMate. All of my settings for both my editor and operating system are defaulted to writing files in utf-8 format. However, when I enter the following into a text fi...
[ 0.21762222051620483, 0.2894201874732971, 0.3950181305408478, -0.2082022875547409, 0.08236651122570038, -0.1837497502565384, 0.47097307443618774, -0.025810832157731056, -0.15039929747581482, -0.32841673493385315, -0.330145001411438, 0.7580603361129761, -0.342450886964798, -0.163641318678855...
the output, but I get '�ir��s' instead. `use utf8;` does not enable Unicode *output* - it enables you to type Unicode in your program. Add this to the program, before your `print()` statement: ``` binmode(STDOUT, ":utf8"); ``` See if that helps. That should make `STDOUT` output in UTF-8 instead of ordinary ASCII.
[ -0.04052218049764633, 0.21912404894828796, 0.4411776065826416, -0.12094347923994064, -0.0029538560193032026, 0.016296135261654854, 0.18986065685749054, -0.09965373575687408, 0.0646863728761673, -0.5992105603218079, -0.35598641633987427, 0.5540686845779419, -0.28683310747146606, -0.09023571...
I have a string input to my program of the form: con\*.cc I want this to represent the regular expression, con.\*.cc. How can I do this inside a C program? Is there something like sed that I can use? I'm guessing you really just want [globbing](http://en.wikipedia.org/wiki/Glob_(programming)) rather than full on reg...
[ 0.6081972718238831, 0.12856799364089966, 0.30745208263397217, -0.2344519942998886, -0.1607671082019806, -0.0450822152197361, -0.19291606545448303, 0.43788787722587585, -0.20844712853431702, -0.34694862365722656, 0.1258338987827301, 0.5868039727210999, -0.3769056797027588, 0.161155089735984...
Does anyone have any idea what the practical differences are between the System.Collections.Specialized.StringDictionary object and System.Collections.Generic.Dictionary? I've used them both in the past without much thought as to which would perform better, work better with Linq, or provide any other benefits. Any th...
[ 0.3049371540546417, -0.08706176280975342, 0.31860360503196716, -0.026833461597561836, -0.2329469621181488, -0.20041993260383606, -0.13952435553073883, 0.16601257026195526, -0.07130230218172073, -0.4736669063568115, 0.14853957295417786, 0.6076055765151978, -0.11998442560434341, 0.1610145568...
I am trying to compare two long bytearrays in VB.NET and have run into a snag. Comparing two 50 megabyte files takes almost two minutes, so I'm clearly doing something wrong. I'm on an x64 machine with tons of memory so there are no issues there. Here is the code that I'm using at the moment and would like to change. ...
[ 0.2726201117038727, 0.13216599822044373, 0.27866384387016296, -0.03941187635064125, -0.12033882737159729, 0.11715120077133179, 0.17945045232772827, -0.2062513530254364, -0.10027530044317245, -0.8189783692359924, 0.34454357624053955, 0.4213995039463043, -0.1212937980890274, 0.46106719970703...
Exit For End If I += 1 Next ``` I need to be able to compare as fast as possible files that are potentially hundreds of megabytes and even possibly a gigabyte or two. Any suggests or algorithms that would be able to do this faster? `Item.bytes` is an object taken from the database/filesystem that is returned t...
[ -0.07756143808364868, 0.10129907727241516, 0.4128217101097107, 0.02627062052488327, -0.08645839244127274, 0.10807766765356064, 0.07759198546409607, -0.2263779491186142, 0.09670564532279968, -0.798675537109375, 0.005347945261746645, 0.23280394077301025, -0.09600593894720078, 0.4056523740291...
can just map them to the other file and not waste hard disk drive space. [Update] I converted the arrays to local variables of Byte() and then did the same comparison, same code and it ran in like one second (I have to benchmark it still and compare it to others), but if you do the same thing with local variables and...
[ 0.2598261535167694, -0.1303907334804535, 0.18945881724357605, 0.1628505438566208, -0.25536268949508667, 0.00773500045761466, 0.02430840954184532, 0.0040809339843690395, -0.5775072574615479, -0.6357046365737915, 0.3897278308868408, 0.6594401001930237, -0.13730299472808838, 0.159181416034698...
Even with buffering, that would be bad news! There will be plenty of ways to *micro-optimise* this in terms of looking at longs at a time, potentially using unsafe code etc - but I'd just concentrate on getting *reasonable* performance first. Clearly there's something very odd going on. I suggest you extract the comp...
[ 0.3656509816646576, -0.2008853703737259, 0.19347602128982544, 0.16683842241764069, -0.07063709944486618, 0.12563566863536835, 0.20100601017475128, -0.08210383355617523, -0.3702133595943451, -0.5532720685005188, 0.1000303104519844, 0.5775932669639587, -0.3019316494464874, -0.048542063683271...
Here's the code (untested, but simple enough) that I'd use. It's in C# for the minute - I'll convert it in a sec: ``` public static bool Equals(byte[] first, byte[] second) { if (first == second) { return true; } if (first == null || second == null) { return false; } if (fir...
[ -0.10058709233999252, 0.028521567583084106, 0.3586962819099426, -0.11987438052892685, 0.03045680932700634, -0.09769405424594879, 0.16497887670993805, -0.147700697183609, -0.0039087943732738495, -0.40245112776756287, 0.032798536121845245, 0.47398459911346436, -0.22874437272548676, 0.1742732...
false; } for (int i=0; i < first.Length; i++) { if (first[i] != second[i]) { return false; } } return true; } ``` EDIT: And here's the VB: ``` Public Shared Function ArraysEqual(ByVal first As Byte(), _
[ 0.03248229995369911, -0.06048339977860451, 0.4188055396080017, -0.31292760372161865, -0.2647658586502075, 0.10346947610378265, 0.035975683480501175, -0.46390706300735474, -0.288725346326828, -0.3534170389175415, 0.06198779121041298, 0.7164878845214844, -0.21310938894748688, 0.3491875827312...
ByVal second As Byte()) As Boolean If (first Is second) Then Return True End If If (first Is Nothing OrElse second Is Nothing) Then Return False End If If (first.Length <> second.Length) Then
[ -0.27147752046585083, -0.0834423303604126, 0.332141637802124, -0.30347180366516113, -0.250634104013443, 0.22381216287612915, 0.2757304608821869, -0.23685766756534576, -0.06796003878116608, -0.28539595007896423, -0.22593362629413605, 0.25409138202667236, -0.005178424529731274, 0.39779970049...
Return False End If For i as Integer = 0 To first.Length - 1 If (first(i) <> second(i)) Then Return False End If Next i Return True End Function ```
[ -0.14285962283611298, -0.07521815598011017, 0.3964228332042694, -0.4813941419124603, -0.06481845676898956, -0.13308048248291016, 0.4123653173446655, -0.5045129656791687, 0.24776813387870789, -0.171138733625412, -0.1055004894733429, 0.5722838044166565, -0.1776544451713562, 0.372265160083770...
Anybody knows if actually exists a wrapper or ported library to access to Unix dynamic linker on Python? Would [ctypes](http://docs.python.org/library/ctypes.html) do what you want?
[ 0.6928125023841858, -0.1396111100912094, 0.19132071733474731, 0.35873305797576904, -0.010160868056118488, -0.3382017910480499, -0.00023460043303202838, 0.16646628081798553, -0.3044355809688568, -0.21532286703586578, 0.12278788536787033, 0.7737734317779541, -0.41981983184814453, -0.27861753...
I'm building a collapsible grouping grid using Matt Berseth's example from [mattberseth.com/blog/2008/01/building\_a\_grouping\_grid\_with.html](http://mattberseth.com/blog/2008/01/building_a_grouping_grid_with.html) It has an inner listview "lvInner" nested in an outer listview "lvOuter". I'm trying to access a tex...
[ -0.2225448191165924, -0.0852297767996788, 0.6422584056854248, -0.22664929926395416, -0.23971262574195862, 0.3149322271347046, 0.204571932554245, -0.717515230178833, -0.174982950091362, -0.8138746023178101, 0.04910140112042427, 0.028489358723163605, -0.44743141531944275, 0.09456675499677658...
explained [here](http://www.discussweb.com/c-programming/13643-advertised-shortcuts-installers-how-avoid.html), the Visual Studio can only create "advertised shortcuts" that uses the MSI file to check that all the files and registry values are present. In the same link you can find the solution : edit the MSI database...
[ 0.47377678751945496, -0.053121745586395264, 0.11662636697292328, -0.09130775183439255, 0.07845187932252884, -0.1478474736213684, 0.11330597847700119, -0.11768817156553268, -0.2124837338924408, -0.5925378203392029, -0.020356127992272377, 0.7534970045089722, -0.3514630198478699, -0.023783357...
line and a VBS script provided by the Window Installer SDK : ``` Cscript WiRunSQL.vbs Test.msi "INSERT INTO `Property` (`Property`.`Property`,`Property`.`Value`) VALUES ('DISABLEADVTSHORTCUTS',1)" ``` Now you just have to set a post build event for your setup project (it's a little different from "regular" projects,...
[ 0.28529784083366394, -0.14339767396450043, 0.6490226984024048, -0.0857795998454094, -0.019454410299658775, 0.024301040917634964, 0.5365872979164124, -0.3540070354938507, 0.021670831367373466, -0.6646032333374023, -0.40906697511672974, 0.4266689717769623, -0.1618671864271164, -0.04698678106...
Coming from a C++ background I have to master the complexity of the Java world and its frameworks. Looking at the spring framework for DI I am finding it difficult to believe that I have to make each setter function which will be subject for DI public. Doesn't that requirement break the principle of information hid...
[ 0.3973439931869507, 0.004812875762581825, -0.3038407862186432, 0.03468220308423042, -0.39779844880104065, -0.2263920158147812, 0.3030933439731598, -0.18849705159664154, -0.19996391236782074, -0.3695312440395355, 0.12248391658067703, 0.5695255994796753, -0.3751717805862427, 0.00315439747646...
setters on the implementations. As you inject the interfaces into other parts of the system, they cannot access the implementation details or state of the objects.
[ 0.5336166024208069, -0.1553730070590973, 0.18672452867031097, 0.3695719540119171, -0.15977399051189423, 0.00301842181943357, 0.0331379696726799, -0.062352798879146576, -0.07664605230093002, -0.77021324634552, -0.0973554328083992, 0.5071148872375488, -0.5267592668533325, 0.1357521116733551,...
What are the advantages and disadvantages for Spring vs. Jboss for an enterprise web application. As already said, but let me just restate the point. JBoss is an application server. Some Java application servers include * Websphere * Glassfish * JBoss Spring is a framework. A rather large framework which offers quite...
[ 0.19402875006198883, -0.1267639398574829, 0.2111818790435791, 0.08152588456869125, -0.206720232963562, -0.013531032018363476, -0.30316147208213806, -0.14278647303581238, -0.7950941324234009, -0.21169650554656982, 0.15464918315410614, 0.24619193375110626, -0.08555096387863159, 0.01519874949...
view the model. This can be either web frontend or a windows application. The user will interact with the view. The user will express their desire for the model to be updated. This is where the controller comes in. We use the contoller to tell the model to update. And because the view is based on the model the view the...
[ 0.32979169487953186, -0.58042973279953, 0.5350173711776733, 0.37988021969795227, -0.3773847818374634, -0.027513813227415085, -0.13391701877117157, -0.25295355916023254, -0.4043622612953186, -0.3441447615623474, 0.171708881855011, 0.6199266314506531, -0.2857835292816162, 0.22403569519519806...
Injection
[ -0.012779160402715206, 0.28381332755088806, -0.18152989447116852, -0.10391446202993393, 0.035117004066705704, -0.03076045773923397, 0.10600101202726364, -0.5018059015274048, -0.03712422400712967, -0.5981889367103577, -0.2652587294578552, 0.3984261751174927, 0.08248371630907059, -0.12348416...
I have a collection of MyClass that I'd like to query using LINQ to get distinct values, and get back a Dictionary<string, string> as the result, but I can't figure out how I can do it any simpler than I'm doing below. What would some cleaner code be that I can use to get the Dictionary<string, string> as my result? `...
[ -0.03442441299557686, 0.25639230012893677, 0.8635766506195068, -0.09556078165769577, 0.21245986223220825, 0.2880302667617798, 0.12235896289348602, -0.7037609815597534, -0.05005275085568428, -0.6481019854545593, 0.1899227350950241, 0.5384155511856079, 0.019140392541885376, 0.338018983602523...
select new KeyValuePair<string, string>(mc.KeyProp, mc.ValueProp)).Distinct(); foreach (var item in queryResults) { desiredResults.Add(item.Key.ToString(), item.Value.ToString()); } ``` Use the `ToDictionary` method directly. ``` var result = // as Jon Skeet pointed out, OrderBy is useless here, I just leave ...
[ -0.34459188580513, -0.23448319733142853, 0.6895895600318909, -0.3101755678653717, 0.214887335896492, 0.247450590133667, 0.276798278093338, -0.7073061466217041, -0.18620237708091736, -0.3684026002883911, -0.37629812955856323, 0.5306681394577026, -0.2738824486732483, 0.37406882643699646, -...
mc => mc.ValueProp.ToString(), StringComparer.OrdinalIgnoreCase); ```
[ -0.11637147516012192, 0.10805214941501617, 0.667634129524231, -0.22646841406822205, 0.3116051256656647, 0.1573970466852188, 0.2644495666027069, -0.5332391858100891, -0.2565019726753235, -0.28324687480926514, -0.36329522728919983, 0.5883627533912659, -0.23206932842731476, 0.4384570121765136...
I would like to know if I'm safe against SQL injection when I use something like that with PostgresSQL: ``` CREATE or REPLACE FUNCTION sp_list_name( VARCHAR ) RETURNS SETOF v_player AS ' DECLARE v_start_name ALIAS FOR $1; r_player v_player%ROWTYPE; v_temp VARCHAR; BEGIN v_temp := v_start...
[ -0.03155970945954323, -0.05904313176870346, 0.4172200858592987, -0.20576418936252594, 0.022800331935286522, -0.06446725875139236, 0.2275884747505188, -0.2054644674062729, -0.07693135738372803, -0.40518173575401306, -0.050496578216552734, 0.7045924663543701, -0.2516123056411743, 0.376115709...
RETURN NEXT r_player; END LOOP; RETURN; END; ' LANGUAGE 'plpgsql' VOLATILE; ``` I want to use this function to list player's name beginning with a letter. ``` select * from sp_list_name( 'A' ); ``` gives me players with last name beginning with A. I tried to inject sql with ``` select * from sp_li...
[ -0.34460633993148804, -0.20324663817882538, 0.5033649206161499, -0.3996284008026123, -0.03126827999949455, 0.0776873230934143, 0.19249677658081055, -0.6104927062988281, -0.28432416915893555, -0.32335323095321655, -0.23107916116714478, 0.7118528485298157, -0.5001270174980164, 0.197215512394...
be expanded into code, but you can still expose yourself if you don't use a parameterized query like "*`SELECT * FROM sp_list_name(?);`*" in your *appplication code*. Something like "*`SELECT * FROM sp_list_name('$start_name');`*" could be subverted by a user passing a start name of "**`');delete from t_player where la...
[ 0.15064333379268646, -0.1648205816745758, 0.19296151399612427, -0.0004444131627678871, 0.1577763557434082, -0.04433230310678482, 0.3077715039253235, -0.06464909762144089, -0.5269548892974854, -0.7602972984313965, -0.34107083082199097, 0.7331637144088745, -0.4449397921562195, 0.297680169343...
hand-rolled *`replace`* functions) so replacing ; or ' is totally unnecessary (in the stored procedure, the application using it is a different story, of course) and would prevent you from always finding the "`tl;dr`" or "`O'Grady`" teams. **Leo Moore, Karl, LFSR Consulting**: `v_temp_name` in the stored procedure wil...
[ 0.3213256001472473, 0.1988414227962494, 0.2598823308944702, -0.25115177035331726, 0.25431081652641296, 0.2519001364707947, 0.1438966989517212, -0.5817167162895203, -0.5226530432701111, -0.4042454659938812, -0.33465197682380676, 0.4415324628353119, -0.5222426056861877, -0.025082146748900414...
= $bar; ``` actually running the unlink in the absence of an eval.
[ 0.056903909891843796, 0.07332830131053925, 0.3635111153125763, -0.27969446778297424, 0.06845767796039581, -0.15982843935489655, 0.523145854473114, -0.2261400669813156, 0.05689855292439461, 0.01020500622689724, -0.4240962564945221, 0.4910110533237457, -0.41934648156166077, 0.122754804790019...
Grails grails-1.0.4 , TomCat 6.0.14 , Tomcat error log: ``` SEVERE: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappCla...
[ -0.6240413188934326, 0.31338146328926086, 0.35101160407066345, 0.0672524943947792, -0.25102996826171875, 0.4825553894042969, 0.6229875087738037, -0.3893424868583679, -0.43405213952064514, -0.16866061091423035, -0.1665726751089096, 0.7470642328262329, -0.15903423726558685, -0.13229627907276...
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect....
[ -0.08435040712356567, 0.4714292585849762, 0.32422447204589844, -0.04867182672023773, -0.2212771326303482, 0.16176842153072357, 0.683180034160614, -0.4431074261665344, -0.3020170331001282, -0.27588725090026855, 0.04435224086046219, 0.8187724351882935, 0.08080338686704636, -0.123318456113338...
you aren't specifying dependencies explicitly: ``` grails.war.dependencies grails.war.java5.dependencies ```
[ 0.1301020383834839, 0.4020594358444214, -0.20455525815486908, -0.22475267946720123, -0.13264089822769165, -0.189124196767807, 0.3202105164527893, -0.1198309063911438, -0.31657674908638, -0.3203088343143463, -0.26578739285469055, 0.5375285744667053, -0.6105813980102539, 0.13572512567043304,...
Qt uses signals and slots normally in a single thread, so calling a signal will call a slot in the same thread signal called. Is it any way to use a signal-slot mechanism to pass a message to qt thread ( so slot will be called later in specified thread's context )? [Signals and slots across threads](http://qt-project.o...
[ -0.014528580941259861, -0.307735413312912, 0.2105010598897934, -0.1382693201303482, -0.030805261805653572, -0.006851135287433863, 0.0982428565621376, -0.1648372858762741, 0.07483163475990295, -0.7930511236190796, -0.2334713190793991, 0.2829006612300873, -0.4791835844516754, 0.2068101018667...
I'm just starting to get my mind around this whole Object Oriented thing, so bear with me. So, I saw an example of an object function (for Javascript) where you assign a new value and that value gets assigned as that property's actual value. Example: ``` function Meat (name, color, price) { function newPrice (new...
[ 0.9143378734588623, 0.11639728397130966, -0.19619838893413544, -0.17638638615608215, -0.07150653749704361, 0.20261190831661224, -0.23312689363956451, -0.32716819643974304, -0.332870215177536, -0.6359950304031372, 0.00014295913570094854, 0.8717370629310608, -0.10162114351987839, 0.328456491...
this seems like the highest order of semantics, since functionally it does the same thing. But as an advocate for semantic coding, I'll let it slide. Here's what I want: When I change the value of Bacon.price, the object should include a function to store the old value in a property called oldprice automatically. I pl...
[ 0.6679432392120361, 0.29716306924819946, -0.12218700349330902, -0.27140602469444275, 0.2395215481519699, 0.3437090516090393, -0.09750369936227798, -0.09176041930913925, -0.23635058104991913, -0.6732239127159119, -0.0062440321780741215, 0.8074336051940918, -0.1228303462266922, 0.19999660551...
= oldPrice; this.price = price; } /////////////////////// function Meat (name, color, price) { this.name = name; this.color = color; this.oldprice = this.price; this.price = price; } ``` More or less variations of that. I thought that referring to the already assigned value (which would be nothing...
[ 0.566343367099762, 0.46635010838508606, -0.019730819389224052, -0.3045858144760132, 0.24755139648914337, 0.06241423264145851, 0.12332147359848022, 0.005785275716334581, -0.2283494919538498, -0.7868828177452087, -0.0903061181306839, 0.7173249125480652, -0.08971499651670456, 0.38466370105743...
out. --- Okay, maybe the problem is with my eyes or fingers then. Because I thought I had tried the suggestions before asking (I know, I didn't mention them!) Unless I'm really confused, this should work: ``` function Meat(price) { function setPrice(price) { this.oldprice = this.price; this....
[ 0.35183605551719666, 0.2786116600036621, 0.46308770775794983, -0.4001385271549225, 0.13729290664196014, 0.32068464159965515, -0.005925566889345646, -0.5863020420074463, -0.19031381607055664, -0.7201120853424072, -0.3050009310245514, 1.0115201473236084, -0.47746676206588745, 0.0020665761549...
eyesight and poor spelling as the root. But I can't figure it out. This will store it when you call `obj.newPrice(xxx);` - I don't think you can do it automatically when using `obj.price = xxx;` ``` function Meat (name, color, price) { function newPrice (new_price) { this.oldprice = this.price this...
[ 0.39366528391838074, 0.18946048617362976, 0.056031860411167145, -0.18029074370861053, -0.03251136466860771, 0.19395500421524048, 0.22858449816703796, -0.0857553631067276, -0.25318408012390137, -0.7875498533248901, -0.23241302371025085, 0.856353223323822, -0.2503320276737213, 0.082133054733...
of them as methods disguised as properties. Using these, your code would look like this: ``` function Meat (name, color, price) { function newPrice (new_price) { this.oldprice = this.price this.price = new_price; } this.name = name; this.color = color; this.__defineSetter__("price", functi...
[ 0.5046374201774597, 0.035588588565588, 0.003065329510718584, -0.3009958565235138, 0.1725071221590042, 0.24704504013061523, -0.0797320231795311, -0.2665257155895233, -0.08176746964454651, -0.7325193285942078, -0.25830817222595215, 0.8588302135467529, -0.29601359367370605, 0.4152238965034485...
I've tried to create a generic Observable class that I can use in my program: ``` public class GeoGolfObserver<T> extends Observable { public GeoGolfObserver() { super(); } public void passObject(T object) { setChanged(); notifyObservers(object); } } ``` It is created...
[ 0.10537690669298172, 0.03660302236676216, 0.8133611679077148, -0.1435960978269577, 0.051737718284130096, 0.12105514109134674, 0.12270695716142654, -0.1957262009382248, -0.08714450895786285, -0.7455623745918274, -0.4192757308483124, 0.2582109570503235, -0.7414476275444031, 0.205705136060714...
bindList(); this.cacheObserver = cacheObserver; } ``` However, the line marked [1] above throws an error: ``` Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Common/GeoGolfObserver ``` Why? **FIXED** The problem was fixed by simply telling netbeans to do a clean rebuild of my applicatio...
[ 0.11276472359895706, 0.09369933605194092, 0.09711785614490509, -0.20718766748905182, 0.10824007540941238, -0.16962528228759766, 0.7428823113441467, 0.07269522547721863, -0.2764888405799866, -0.7522388696670532, 0.026191258803009987, 0.6095523238182068, -0.4211553633213043, 0.27554118633270...
I have some link buttons in which I am dynamically adding a style to it. I am doing the following in a method: ``` LinkButton lb = new LinkButton(); lb.Style["font-weight"] = "bold"; ``` When the another link is clicked, it should unbold the link button that is bold and bold the currently clicked one, so in the meth...
[ 0.2894701063632965, 0.19192983210086823, 0.5897241830825806, -0.26597341895103455, -0.27116960287094116, -0.04027698189020157, 0.04699892923235893, -0.24880538880825043, -0.3375023305416107, -0.6211880445480347, 0.06409277766942978, 0.5108160376548767, -0.687404990196228, 0.120370566844940...
the bold. I am trying to think of a way for it to remember the previously selected link and to only unbold that one. Can I suggest an alternative approach? Set a CSS Style: ``` .selected { font-style: bold; } ``` When a link is clicked set that link's CSS class to "selected" and the others to ""; **EDIT: To accomm...
[ 0.016732238233089447, -0.12551043927669525, 0.3937512934207916, -0.12859241664409637, -0.2334630936384201, -0.11115697771310806, -0.07385782152414322, -0.19360452890396118, -0.2270141988992691, -0.8107247948646545, -0.0635882094502449, 0.648696780204773, -0.42816007137298584, 0.02488807588...
through all the LinkButtons in the list, but I don't think so. I'd just turn off ViewState on the LinkButtons. ``` // container for links. so you can reference them // outside of the creation method if you wish. I'd probably call this method in the // Page_Init Event. List<LinkButton> listOfLinks = new List<LinkBu...
[ 0.3755374550819397, -0.1216055378317833, 0.6261515617370605, -0.38792309165000916, -0.08219140022993088, 0.1191689670085907, 0.2602192163467407, -0.37660837173461914, -0.47642752528190613, -0.6960057616233826, -0.08284218609333038, 0.2974852919578552, -0.6393909454345703, 0.345083832740783...
{ ID = "lb" + i, CssClass = MY_LB_CLASS }; lb.Click += new EventHandler(lb_Click); // Add the click event } // You can bind the List of LinkButtons here, or do something with them. } void lb_Click(Object sender, EventArgs e) { LinkButton lb = sender as LinkButto...
[ -0.11863815039396286, -0.5614714026451111, 0.4760506749153137, -0.25619643926620483, -0.007087585981935263, -0.1098218634724617, -0.011283425614237785, -0.2650342881679535, -0.3177357614040375, -0.5219311118125916, -0.4622601568698883, 0.5466381907463074, -0.6226928234100342, 0.11584751307...
// cast the sender as LinkButton if (lb != null) { // Make the link you clicked selected. lb.CssClass = MY_LB_CLASS + " selected"; } } ```
[ 0.047321345657110214, -0.2556995153427124, 0.26372137665748596, -0.2608436346054077, -0.10322341322898865, -0.003731813980266452, 0.16693435609340668, 0.17078284919261932, -0.2967464327812195, -0.309091717004776, -0.38790738582611084, 0.18233844637870789, -0.6720980405807495, 0.54636633396...
For some reason, it seems the `Add` operation on a `HashSet` is slower than the `Contains` operation when the element already exists in the `HashSet`. Here is proof: ``` Stopwatch watch = new Stopwatch(); int size = 10000; int iterations = 10000; var s = new HashSet<int>(); for (int i = 0; i < ...
[ 0.3705127537250519, -0.45947492122650146, 0.851575493812561, -0.3394923508167267, 0.502531111240387, 0.14872346818447113, 0.329947292804718, -0.5708258152008057, -0.35124269127845764, -0.6708059310913086, -0.0815124586224556, 0.5260735750198364, -0.2767861485481262, 0.16906778514385223, ...
for (int i = 0; i < size; i++) { s.Add(i); } }, iterations)); s = new HashSet<int>(); for (int i = 0; i < size; i++) { s.Add(i); } // outputs: 47,074,764 Console.WriteLine(watch.Time(() => { for (int i = 0; i < size; i++) {
[ 0.3748123049736023, -0.5564101338386536, 0.8365777730941772, -0.27319276332855225, 0.5418583154678345, 0.35284313559532166, 0.3828688859939575, -0.470480740070343, -0.1160799190402031, -0.5897705554962158, -0.12087283283472061, 0.34149622917175293, -0.25834718346595764, 0.23236294090747833...
if (!s.Contains(i)) s.Add(i); } }, iterations)); // outputs: 41,125,219 ``` Why is `Contains` faster than `Add` for already-existing elements? Note: I'm using this `Stopwatch` extension from another SO question. ``` public static long Time(this Stopwatch sw, Action action, int ...
[ 0.32643693685531616, -0.5096667408943176, 0.5857870578765869, -0.39558616280555725, 0.4413185119628906, 0.09025231003761292, 0.23517465591430664, -0.5246118903160095, -0.35619792342185974, -0.34949591755867004, -0.22754919528961182, 0.3887467384338379, -0.2647033929824829, 0.23391486704349...
for (int i = 0; i < iterations; i++) { action(); } sw.Stop(); return sw.ElapsedTicks; } ``` **UPDATE**: Internal testing has revealed that the big performance diff only happens on the x64 version of the .NET framework. With the 32 bit version of the framework Contains seems ru...
[ 0.13496319949626923, -0.33828410506248474, 0.5362755060195923, -0.16720111668109894, 0.016089903190732002, -0.07606954127550125, 0.4749623239040375, -0.5263612270355225, -0.16451334953308105, -0.5042217969894409, -0.10028482973575592, 0.5604651570320129, -0.248033344745636, -0.012828334234...
percent slower in some test runs) On X64 versions of the framework, the version with the contains seems to run about 15% faster. AddIfNotPresent does an additional divide that Contains doesn't perform. Take a look at the IL for Contains: ``` IL_000a: call instance int32 class System.Collections.Generic.HashSet`...
[ -0.11983786523342133, -0.1783100813627243, 0.4382118582725525, -0.09374650567770004, -0.3426257073879242, 0.09691642969846725, 0.3197237551212311, -0.7002759575843811, -0.16965234279632568, -0.8266623020172119, 0.028421273455023766, 0.4566378891468048, -0.5498877763748169, -0.0813355669379...
IL_001f: rem IL_0020: ldelem.i4 IL_0021: ldc.i4.1 IL_0022: sub IL_0023: stloc.1 ``` This is computing the bucket location for the hash code. The result is saved at local memory location 1. AddIfNotPresent does something similar, but it also saves the computed value at location 2, so that it can insert t...
[ 0.0846298411488533, -0.015188034623861313, 0.41566047072410583, -0.13637182116508484, -0.31873619556427, 0.22587956488132477, 0.23559315502643585, -0.35131800174713135, -0.27909761667251587, -0.8206385970115662, 0.029669594019651413, 0.3505582809448242, -0.5439491271972656, -0.163107708096...
instance int32 class System.Collections.Generic.HashSet`1<!T>::InternalGetHashCode(!0) IL_0016: stloc.0 IL_0017: ldloc.0 IL_0018: ldarg.0 IL_0019: ldfld int32[] class System.Collections.Generic.HashSet`1<!T>::m_buckets IL_001e: ldlen IL_001f: conv.i4 IL_0020: rem IL_0021: stloc.1 IL_0022:...
[ -0.5361581444740295, 0.19043391942977905, 0.35375311970710754, -0.12305345386266708, -0.33268028497695923, 0.4040531516075134, 0.42901256680488586, -0.5135420560836792, -0.45323553681373596, -0.665790319442749, -0.14733470976352692, 0.6179946660995483, -0.6286746263504028, 0.08230849355459...
ldelem.i4 IL_0033: ldc.i4.1 IL_0034: sub IL_0035: stloc.2 ``` Anyway, I think the extra divide is what's causing Add to take more time than Contains. At first glance, it looks like that extra divide could be factored out, but I can't say for sure without spending a little more time deciphering the IL.
[ 0.4910082221031189, 0.10614075511693954, 0.2998540699481964, -0.05335499718785286, -0.15902405977249146, -0.05088140070438385, -0.2248430848121643, -0.27593761682510376, -0.20682837069034576, -0.6737558841705322, 0.16058072447776794, 0.4195145070552826, -0.510339617729187, 0.13893467187881...
When accessing an application I've written FireBug shows that each call to a web service or HTTP handler is attempted three times, and the first two times show as '401 Unauthorized' even though they return the correct result. This consistent. Every call does this same thing. Any ideas why this happens? It is performin...
[ 0.3046678602695465, 0.2844792604446411, 0.5085960030555725, 0.05945775657892227, 0.3369872272014618, -0.2397473156452179, 0.5956850647926331, -0.17266924679279327, -0.2554117441177368, -0.4596390128135681, 0.11083409935235977, 0.39806443452835083, -0.07194267958402634, 0.07181904464960098,...
I always wondered why Microsoft chose such a strange, search-engine-unfriendly name for such a great platform. Couldn't they have come up with something better? Apparently the codename was NGWS: > Microsoft started development on the > .NET Framework in the late 1990s > originally under the name of Next > Generati...
[ 0.26537230610847473, 0.056954510509967804, 0.15889690816402435, 0.13108420372009277, -0.14704671502113342, -0.17293845117092133, -0.12149146944284439, 0.6079441905021667, -0.31195780634880066, -0.5608583688735962, 0.16100694239139557, 0.3277107775211334, -0.4407610595226288, 0.326284736394...
was synonymous with the Internet that time, and "Dot-NET" was a play on that term. I don't think it is a bad name at all, the problem was that Microsoft named so many products with the ".Net" nomenclature like .NET My Services and Microsoft .NET Enterprise Servers where the latter had nothing to do with the Internet. ...
[ 0.5394958257675171, -0.08400248736143112, 0.10461631417274475, 0.08730664104223251, -0.4103877544403076, -0.4358600974082947, -0.0005647401558235288, 0.7529252171516418, -0.12640655040740967, -0.5035457611083984, 0.18352149426937103, 0.26812392473220825, -0.2972079813480377, 0.631318271160...
Can someone please give me a recursive command that will go through a directory and make all normal files permission 644 and all sub directories 755? I am really getting tired of doing this manually every time I have to install something on my host. I don't know enough BASH (Shell?) command to do this. First line chan...
[ 0.2129848152399063, 0.3051603138446808, 0.3097825050354004, 0.058659426867961884, 0.25277286767959595, -0.15646789968013763, 0.3332062065601349, -0.29697710275650024, -0.32193872332572937, -0.8354614973068237, -0.2704732418060303, 0.8450576066970825, -0.34620916843414307, 0.060748364776372...
I have managed to install Team Foundation Server 2008 and I created a separate build server (which works because my builds are currently failing). I have created a simple "Hello World" Web application (all is the standard Default.aspx page) and have it in TFS's source control system. ***Previously, prior to TFS, I'd...
[ 0.12610597908496857, 0.1967145949602127, 0.32496941089630127, -0.17531470954418182, -0.08741963654756546, -0.11534088850021362, 0.6583847403526306, -0.019682038575410843, 0.11589708924293518, -0.9309806227684021, 0.002869308926165104, 0.40310919284820557, 0.0158354714512825, -0.09191201627...
Build falls into this equation, so any guidance would be helpful. I have seen bits and pieces about deployments, with folders such as \_PublishedWebSites mentioned, but have yet to find anything step by step. I've had success using a exec task in the AfterDropBuild target in the TFSBuild.proj file. ``` <Target Name=...
[ 0.2375568449497223, 0.22831657528877258, 0.6413323879241943, -0.26550593972206116, 0.208726167678833, -0.08907556533813477, 0.37053975462913513, -0.28689834475517273, 0.11322988569736481, -0.6952638626098633, -0.17364472150802612, 0.7066901326179504, -0.07324817031621933, -0.00419632159173...
Imagine someone coding the following: ``` string s = "SomeString"; s.ToUpper(); ``` We all know that in the example above, the call to the “ToUpper()” method is meaningless because the returned string is not handled at all. But yet, many people make that mistake and spend time trying to troubleshoot what the problem...
[ 0.2227807641029358, 0.1021481454372406, 0.13373582065105438, -0.017599422484636307, -0.027918677777051926, -0.10130666941404343, 0.3635706305503845, -0.06886304169893265, -0.04373994469642639, -0.3287773132324219, -0.37329572439193726, 0.45541873574256897, -0.2920691967010498, 0.1888442039...
code to compile correctly the user would have to handle the return value like this: ``` string s = "SomeString"; string uppers = s.ToUpper(); ``` I think this would make it crystal clear that you must handle the return value otherwise there is **no point** on calling that function. In the case of the string example...
[ 0.4191821813583374, 0.20219817757606506, -0.1339697241783142, 0.08765838295221329, -0.08963478356599808, -0.2345140278339386, 0.6430824995040894, -0.17890740931034088, 0.09347221255302429, -0.3186289966106415, -0.07000381499528885, 0.7539606094360352, -0.38107064366340637, -0.1680759042501...
compute a return value) would be good to annotate as such, both to eliminate the type of error you describe, as well as to enable some potential optimizations/analyses. Maybe in another 5 years we'll see this happen. (Note that the F# compiler will warn any time you implicitly ignore a return value. The 'ignore' funct...
[ 0.018050827085971832, -0.10000282526016235, 0.37155812978744507, 0.2031467705965042, 0.2669278085231781, -0.12672704458236694, 0.58438640832901, 0.027289249002933502, -0.17933052778244019, -0.3922644555568695, -0.06149603798985481, 0.6226823329925537, -0.21822750568389893, -0.3375385403633...
**Edit - Original Title:** Is there an alternative way to achieve `border-collapse:collapse` in `CSS` (in order to have a collapsed, rounded corner table)? Since it turns out that simply getting the table's borders to collapse does not solve the root problem, I have updated the title to better reflect the discussion. ...
[ -0.3906623125076294, 0.22201016545295715, 0.4623739719390869, -0.1045127660036087, -0.10573143512010574, -0.1649552881717682, 0.29601746797561646, 0.054973822087049484, -0.4416731894016266, -0.7741254568099976, -0.022620489820837975, 0.32579120993614197, -0.11517051607370377, 0.10716824978...
set `border-radius` no longer works. Is there a CSS-based way I can get the same effect as `border-collapse:collapse` without actually using it? **Edits:** I've made a simple page to demonstrate the problem [here](http://vamin.net/examples/rounded_tables.html) (Firefox/Safari only). It seems that a large part of the...
[ 0.27449822425842285, 0.06900767982006073, 0.3518162667751312, 0.025315629318356514, -0.09115716069936752, 0.033822014927864075, 0.3135756850242615, -0.08371713012456894, -0.3780025243759155, -0.7470777034759521, 0.3047826886177063, 0.6126079559326172, -0.21698103845119476, 0.06838288903236...
table to differentiate the headings and for striping, so the inner `td` elements would show their rounded corners as well. **Summary of proposed solutions:** Surrounding the table with another element with round corners doesn't work because the table's square corners "bleed through." Specifying border width to 0 doe...
[ 0.12202462553977966, 0.1412280946969986, 0.5330498814582825, 0.026097165420651436, -0.21884721517562866, 0.11525214463472366, 0.1884770691394806, -0.4918660521507263, -0.09239692240953445, -0.6728817820549011, 0.15990370512008667, 0.2913491427898407, -0.06052934005856514, -0.15032836794853...
a bit of a pain to apply to multiple tables, so please keep suggestions coming. Possible solution 2 is to use JavaScript (jQuery, specifically) to style the corners. This solution also works, but still not quite what I'm looking for (I know I'm picky). I have two reservations: 1. this is a very lightweight site, and...
[ 0.21222999691963196, 0.2618568241596222, 0.564196765422821, -0.007499012630432844, -0.19817115366458893, 0.005888297222554684, -0.013211543671786785, 0.04432786628603935, -0.17613844573497772, -0.9902435541152954, 0.3602542281150818, 0.45050662755966187, -0.02878095768392086, -0.0795396119...
consistently square site in others (I'm looking at you, IE). I know that trying to do this with CSS3 today may seem needless, but I have my reasons. I would also like to point out that this problem is a result of the w3c specification, not poor CSS3 support, so any solution will still be relevant and useful when CSS3 ...
[ 0.010866206139326096, -0.08988317847251892, -0.01004165131598711, 0.035965245217084885, -0.5690508484840393, -0.12222559005022049, 0.17326413094997406, -0.2654760479927063, -0.27842408418655396, -0.5240705609321594, 0.25712963938713074, 0.324068546295166, -0.3013473153114319, -0.0436638593...
table tr:last-child td:first-child { border: 2px solid orange; border-bottom-left-radius: 10px; } table tr:last-child td:last-child { border: 2px solid green; border-bottom-right-radius: 10px; } ``` ```html <table> <tbody> <tr> <td> 1 </td> <...
[ -0.517695963382721, -0.12913569808006287, 0.7431126236915588, -0.07262460142374039, 0.27477169036865234, 0.7270062565803528, -0.07648395001888275, -0.15826824307441711, -0.09389545023441315, -0.4432763159275055, -0.4377153813838959, 0.25576746463775635, 0.030851636081933975, 0.002616328420...
2 </td> </tr> <tr> <td> 3 </td> <td> 4 </td> </tr> </tbody> </table> ``` Now everything rounds properly, except that there's still the issue of `border-collapse: collapse` breaking everything. A workaround is to [add `border-spacing: 0`](https://developer.mo...
[ 0.014826851896941662, -0.130133718252182, 0.6560364365577698, -0.08163280785083771, 0.13615846633911133, -0.3118559420108795, 0.3214341104030609, -0.5271574258804321, -0.34068313241004944, -0.3342652916908264, -0.29720669984817505, 0.33881884813308716, -0.1479853093624115, 0.10914235562086...
I have a JavaScript widget (a piece of embedded JS and HTML code) that's embedded on other sites. What should I do to make sure it's variable names don't clash with the hosting page variables? I'd like this widget to be "inlined" meaning on the same page as the hosting page, **not** in an iframe, what's the best way t...
[ 0.5921023488044739, 0.2831633687019348, 0.2824678122997284, 0.13059191405773163, -0.3572988510131836, -0.19741058349609375, 0.13380004465579987, -0.039459601044654846, -0.1286781132221222, -0.5306218266487122, 0.17628192901611328, 0.5881119966506958, -0.19544796645641327, 0.353417396545410...