text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'm following the tutorial's that come with the SDK for Microsoft Virtual Earth, and when I try to create a plugin like it says, the compiler won't let me. I'm extending the class Microsoft.MapPoint.PlugIn.PlugIn and it has two abstract methods (that the tutorial doesn't talk about) which I have implemented. However, ...
[ 0.22083821892738342, 0.1728947013616562, 0.1480865180492401, -0.156134232878685, -0.07001908868551254, -0.09891264885663986, 0.2073783576488495, 0.056321389973163605, -0.05385689064860344, -0.8231682181358337, 0.05411262437701225, 0.6084834933280945, -0.34415701031684875, 0.140868827700614...
type `base(`, intellisense should tell you what you need to give the base-constructor. --- **edit** from searching, you need: ``` public Foo (Host host) : base(host) { } ```
[ -0.007380699273198843, 0.2623986601829529, 0.13296127319335938, -0.11147907376289368, 0.2171589583158493, -0.22498059272766113, 0.1925237625837326, 0.059769898653030396, 0.12736991047859192, -0.42579755187034607, -0.16925309598445892, 0.5330435037612915, -0.5302559733390808, 0.131418809294...
Is there a way to stream MP3s stored on Amazon S3 via a Flash widget embedded in a website, or some other method? Yes it is. Firstly, you need to create a bucket in your S3 account which is all in lower case, is globally unique and is DNS-compatible; so for example I created a bucket called ‘media.torusknot.com’. Then...
[ 0.40129756927490234, -0.11227613687515259, 0.32991644740104675, 0.3202928304672241, -0.21080629527568817, -0.07805640250444412, -0.015774713829159737, 0.3061770796775818, -0.6718333959579468, -0.5473973751068115, 0.1535470336675644, 0.503609299659729, -0.21926039457321167, 0.25369578599929...
just need to set the ACLs on the files & the bucket to make sure public access is allowed. Finally, if you want to stream video files via a Flash player from S3 to another domain, you also have to tell Flash that it’s ok for the content to be pulled in from a different domain. Create a file called ‘crossdomain.xml’ in...
[ 0.4374729096889496, -0.24000801146030426, 0.6390068531036377, 0.25076302886009216, -0.21669861674308777, -0.3385295569896698, -0.08538810163736343, 0.00010206268780166283, -0.533286988735199, -0.639384388923645, -0.10774212330579758, 0.3695881962776184, -0.25741907954216003, 0.105523556470...
I have a varbinary(MAX) field in a SQL Server 2005 database. I'm trying to figure out how to insert binary data (ie. an image) into that field using PHP. I'm using ODBC for the connection to the SQL Server database. I have seen a number of examples that explain this for use with a MySql database but I have not been abl...
[ 0.764214038848877, 0.04056328162550926, -0.15129497647285461, 0.07354852557182312, -0.21906742453575134, -0.21766456961631775, 0.1406572312116623, 0.2871849834918976, -0.37799981236457825, -0.2187395840883255, 0.26035746932029724, 0.6389284133911133, -0.6037289500236511, 0.1479770541191101...
their filenames (possibly rename the files to prevent confliction) and then store that in the database. If security is an issue, then put them in a non web folder and use your code to retrieve the file and only serve the file if the user has access to it. Storing images or files inside a database is a waste of file sp...
[ 0.5769107937812805, 0.23924560844898224, 0.2353474199771881, 0.4078221917152405, 0.5165075659751892, -0.17440618574619293, 0.17748114466667175, -0.08460524678230286, -0.23905488848686218, -0.7448403239250183, -0.4145790636539459, 0.5342984199523926, -0.10691972076892853, 0.1998713016510009...
I have a table that has several nullable integer columns. This is undesirable for several reasons, so I am looking to update all nulls to 0 and then set these columns to `NOT NULL`. Aside from changing nulls to `0`, data must be preserved. I am looking for the *specific SQL syntax* to alter a column (call it `ColumnA`...
[ -0.05467194691300392, 0.2929598093032837, 0.30373331904411316, -0.18847377598285675, -0.053064290434122086, -0.14765845239162445, 0.3089127838611603, -0.275703102350235, -0.29984068870544434, -0.535526692867279, -0.044134557247161865, 0.57444828748703, -0.467526376247406, 0.160138100385665...
NOT NULL ```
[ 0.32371044158935547, 0.6111794114112854, -0.2307058721780777, 0.15330564975738525, -0.041039902716875076, -0.23627029359340668, 0.21768692135810852, 0.4294668734073639, -0.1796492040157318, -0.17638802528381348, -0.4066421687602997, 0.13812121748924255, -0.47998806834220886, 0.328018337488...
I've noticed a strange behavior in two different sites when using IE8. The first site is in the site that I maintain [xebra.com](http://www.xebra.com/). The second site is google analytics. The behavior is that when an address is typed directly into the address bar of IE8, both sites display correctly, But when o...
[ 0.2965736389160156, -0.06542987376451492, 0.4616876244544983, -0.0015447575133293867, -0.046622324734926224, -0.29689911007881165, 0.38775062561035156, 0.24135872721672058, -0.1443326324224472, -0.6995598077774048, 0.24469536542892456, 0.2894448935985565, -0.3471134305000305, 0.16703024506...
I'm learning Objective-C through Cocoa (And loving it). I'm following a tutorial. Theres a class called Menu and the interface looks something like this. ``` @interface Menu: MenuObject {} @end @interface MenuLayer : LayerObject {} -(void) someMethod:(id)sender -(void) someOtherMethod:(id)sender @end ``` and the i...
[ 0.27816328406333923, 0.11630679666996002, 0.3297208845615387, -0.04843371734023094, -0.27307143807411194, -0.08138363063335419, -0.007620935793966055, 0.017899775877594948, -0.11328372359275818, -0.7553279995918274, 0.16356731951236725, 0.5118045806884766, -0.39161667227745056, -0.21166111...
I split the .h and .m files up into Menu.h/.m and MenuLayer.h/.m ? Or am I misunderstanding something fundamental? It should be fine if you split those into separate files. Most of the time when you see things implemented that way it's just because the 2 classes are so tightly coupled together that you would really nev...
[ 0.6494579315185547, -0.18395055830478668, -0.0442618727684021, 0.145582377910614, -0.14134955406188965, -0.14689373970031738, 0.11818040907382965, 0.03558658808469772, -0.2832026183605194, -0.7241168022155762, -0.04496896266937256, 0.3570444583892822, -0.27967944741249084, 0.19523286819458...
I have been unsuccesfully attempting to upload an encrypted file to an FTP server, without writing it to the filesystem first (which has security implications) I have been attempting to use `proc_open` and then `ftp_fput` but to no avail, I guess because the stream created in `proc_open` isn't `fstat`able Here is th...
[ -0.0032511046156287193, 0.042687300592660904, 0.6109815835952759, -0.3757779002189636, 0.37619656324386597, 0.09572403877973557, 0.681306779384613, -0.3931586444377899, -0.21557502448558807, -0.8570669293403625, -0.32751429080963135, 0.5173283219337463, -0.36524492502212524, 0.178036153316...
that $pipes[1] is a valid stream //while(!feof($pipes[1])) { // $content .= fgets($pipes[1],1024); //} //FTP connection etc etc OMMITTED to save space. $upload = @ftp_fput($conn_id,$dir."/".$ftp_file.$extenstion,$pipes[1],FTP_BINARY); fclose($pipes[1]); // Check upload status echo ('upload '. ($upload ? 'true'...
[ 0.3616582751274109, 0.1010173112154007, 0.6805402636528015, 0.13600526750087738, 0.05172080174088478, -0.17300386726856232, 0.589460015296936, -0.14787541329860687, -0.05321517586708069, -0.429847776889801, -0.1627073585987091, 0.5955233573913574, -0.28692275285720825, -0.06046678125858307...
According to an answer for [Why are we not allowed to specify a constructor in an interface?](https://stackoverflow.com/questions/689474/why-are-we-not-allowed-to-specify-a-constructor-in-an-interface/689488#689488), > Because an interface describes behaviour. Constructors aren't behaviour. How an object is built is a...
[ 0.06715811043977737, -0.06687074899673462, 0.19638359546661377, 0.10704298317432404, -0.14363889396190643, 0.025556253269314766, 0.23816005885601044, -0.18906573951244354, -0.26165035367012024, -0.7122991681098938, -0.012109849601984024, 0.3401717245578766, -0.43684691190719604, 0.19265829...
gets compiled to the following IL: ``` .class private interface abstract auto ansi IFoo { .property instance object Foo { .get instance object IFoo::get_Foo() .set instance void IFoo::set_Foo(object) } } ``` As you can see, even the interface sees the property as methods.
[ 0.14281713962554932, 0.029542390257120132, 0.140972301363945, 0.095843605697155, -0.19960230588912964, -0.10820663720369339, 0.13300886750221252, -0.20690548419952393, -0.024386653676629066, -0.6762508749961853, -0.17075620591640472, 0.6628143191337585, -0.5609630346298218, 0.0953149199485...
**complaining {** I always end up incredibly frustrated when I go to profile my code using Visual Studio 2008's profiler (from the Analyze menu option). It is one of the poorest designed features of VS, in my opinion, and I cringe every time I need use it. **}** I have a few questions concerning it's use, I'm hoping...
[ 0.6304070353507996, 0.1882953643798828, 0.10748881846666336, -0.014236717484891415, -0.3335717022418976, -0.19511690735816956, 0.2779838442802429, 0.18419089913368225, -0.10037514567375183, -0.7802390456199646, 0.15012472867965698, 0.43832769989967346, -0.23733507096767426, 0.0026557382661...
that - when I go to run the code, it tells me I'm missing PDB files. Awesome. So I go back to Debug mode, and I try to run it, and it tells me that half of my projects need to be recompiled with the /PROFILE switch on. 2. Is it possible to profile C++/CLI projects? With the /PROFILE switch on, half of the time I get ab...
[ 0.4580821394920349, 0.15407460927963257, 0.2198716551065445, -0.016868991777300835, -0.17278261482715607, -0.3209168016910553, 0.31749075651168823, 0.0758483037352562, -0.4231652021408081, -0.4954487681388855, -0.033772002905607224, 0.7644675970077515, -0.22443455457687378, 0.1114831268787...
You can't take a guess at the names of my modules? 4. For that matter, why are function names reported as 0x0A000011, 0x06000009, 0xA0000068, etc? 5. Why, oh why, does VS rebuild EVERYTHING in the dependency tree of the executable being profiled? It might not be a problem if you have 5-6 projects in your solution, but ...
[ 0.7074681520462036, -0.14436674118041992, 0.15000692009925842, 0.10214654356241226, -0.22834892570972443, -0.2458881139755249, 0.37330660223960876, -0.2955619990825653, -0.40014582872390747, -0.7366201877593994, -0.08408825844526291, 0.6728006601333618, -0.14206348359584808, 0.161170989274...
you recommend any good guides on using the VS2008 profiler? Step 1, download [ANTS Profiler](http://www.red-gate.com/Products/ants_profiler/index.htm). Step 2, follow the easy to use on screen instructions. Step 3, look at the easy to read reports. Seriously, the Microsoft profiler is garbage compared to ANTS.
[ 0.1809350848197937, -0.21370704472064972, 0.024561161175370216, 0.19319941103458405, -0.2692795693874359, -0.5307111740112305, 0.42034265398979187, -0.32751020789146423, -0.020886311307549477, -0.8580790758132935, 0.1649589240550995, 0.6082261800765991, -0.3773307204246521, -0.391727954149...
Imagine the next architecture: 1. We have Java application over Spring framework (let's call it Manager). 2. It accepts requests and can launch other applications to handle them (let's call them Containers). These Containers exists for a long time. They has rather complex structure and consist of several different app...
[ 0.20276163518428802, -0.11314057558774948, 0.5061671137809753, 0.07109516859054565, 0.06807423382997513, 0.0915454551577568, 0.14331015944480896, -0.31735536456108093, -0.3184523582458496, -0.5108553171157837, 0.21525773406028748, 0.12473785877227783, -0.10564832389354706, -0.0839769914746...
somewhere further by Heartbeat on regular basis. What are your advices on implementing such thing? Please, provide point-outs to some frameworks or open sources addressing similar problem or some general considerations from your experience. [UPDATE] * Target OS: Solaris * Mentioned 2000 processes are native applica...
[ 0.6842769384384155, -0.052964288741350174, 0.2868785560131073, 0.033122677356004715, 0.2699587941169739, -0.19355937838554382, 0.0715402215719223, 0.25492990016937256, -0.4303927421569824, -0.18524864315986633, -0.3579519987106323, 0.054236724972724915, -0.16454696655273438, -0.20153442025...
prototype works then you can merge it back into a trunk for primary development 3. You can continue to work on the prototype if works on the primary project needs to begin Subversion is well suited to handle all of these scenarios. You can also use labels to help control your code as well. These should be descriptive ...
[ 0.4069160223007202, -0.34617820382118225, -0.18698714673519135, 0.2412910908460617, -0.15170468389987946, -0.19324791431427002, 0.2807387709617615, 0.04566040635108948, -0.34214866161346436, -0.5423576831817627, 0.13322488963603973, 0.3689217269420624, -0.10316495597362518, -0.010010210797...
I'm basically looking for a way to access a hashtable value using a two-dimensional typed key in c#. Eventually I would be able to do something like this ``` HashTable[1][false] = 5; int a = HashTable[1][false]; //a = 5 ``` This is what I've been trying...hasn't worked ``` Hashtable test = new Hashtable(); test.A...
[ 0.14023859798908234, -0.020677708089351654, 0.17582249641418457, -0.0960126742720604, -0.05021199211478233, 0.015790952369570732, 0.4036528766155243, -0.47838374972343445, 0.13369496166706085, -0.5736707448959351, -0.14158904552459717, 0.508306622505188, -0.2883818447589874, 0.040786806493...
public Key(int p1, bool p2) { Dimension1 = p1; Dimension2 = p2; } // Equals and GetHashCode ommitted } ``` Now you can create and use a normal HashTable and use this wrapper as a Key.
[ -0.18897879123687744, -0.03745854273438454, 0.4712684452533722, 0.06215478852391243, 0.021090885624289513, -0.4186021685600281, 0.1472543179988861, -0.11185809969902039, -0.04708709940314293, -0.44007495045661926, -0.324984073638916, 0.49406498670578003, -0.3026866912841797, 0.217661917209...
I need to pass an IntPtr to IStream.Read, and the IntPtr should point to a ulong variable. How do I get this IntPtr that points to my ulong variable? The best way is to change the IStream definition: ``` void Read([Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, /*IntPtr*/ ref i...
[ 0.05071170628070831, 0.21970829367637634, 0.6627938747406006, -0.16500446200370789, 0.24560889601707458, 0.1729719489812851, 0.25345438718795776, -0.24572253227233887, -0.17001917958259583, -0.6807048916816711, -0.09795090556144714, 0.6534369587898254, -0.3351579010486603, 0.27315726876258...
I have an image inside a span tag, the span has a set width and height, and is set to overflow hidden. so it only reveals a small portion of the image. This works but the small portion of the image that is visible is the top left corner. I would like it to be the center of the image that is visible. I think I need to a...
[ 0.6610768437385559, -0.11574939638376236, 0.9198933243751526, -0.15540622174739838, -0.13127443194389343, -0.07434993237257004, -0.06116558238863945, -0.18641643226146698, -0.21456307172775269, -0.8134987950325012, 0.1532050371170044, 0.5904380083084106, -0.04619475454092026, -0.0509544759...
<h6>Alternate Views</h6> <span> <a href="http://www.kranichs.com/mothers_rings/mothers_rings_txt2.jpg" rel="lightbox[product_alternate_views]" title="This is my captions 1"> <img src="http://www.kranichs.com/mothers_rings/mothers_rings_txt2.jpg" />
[ -0.011808611452579498, 0.28519630432128906, 0.646582841873169, -0.31962209939956665, -0.1456133872270584, 0.05062224343419075, 0.12587806582450867, -0.5255715250968933, -0.28788861632347107, -0.3175998628139496, -0.37043842673301697, -0.03187870979309082, -0.28725025057792664, 0.1193651035...
</a> </span> <span> <a href="https://www.kranichs.com/product_images/Simon-G@346_M_346_M.jpg" rel="lightbox[product_alternate_views]" title="This is my captions 2"> <img src="https://www.kranichs.com/product_images/Simon-G@346_M_346_M.jpg" />
[ -0.09348495304584503, 0.04610975831747055, 0.506829023361206, -0.32266485691070557, -0.2595284581184387, 0.21966350078582764, 0.29485657811164856, -0.33255186676979065, -0.26791495084762573, -0.39299827814102173, -0.7008135318756104, 0.17461033165454865, -0.3733353316783905, -0.15016566216...
</a> </span> <span> <a href="http://www.kranichs.com/images/simong/sim_banner_01.jpg" rel="lightbox[product_alternate_views]" title="This is my captions 3"> <img src="http://www.kranichs.com/images/simong/sim_banner_01.jpg" />
[ 0.0386144295334816, 0.0057020350359380245, 0.5789282917976379, -0.44938501715660095, -0.41398587822914124, -0.023581910878419876, 0.3726966977119446, -0.5237340927124023, -0.34600886702537537, -0.3994307816028595, -0.5684564709663391, 0.007112869992852211, -0.3488710820674896, -0.216786086...
</a> </span> <span> <a href="http://www.kranichs.com/images/psu/psu_banner.jpg" rel="lightbox[product_alternate_views]" title="This is my captions 4"> <img src="http://www.kranichs.com/images/psu/psu_banner.jpg" />
[ 0.1397601068019867, -0.017455367371439934, 0.5413821339607239, -0.4039565920829773, -0.40694740414619446, 0.16322733461856842, 0.2534310221672058, -0.4091034531593323, -0.4713263213634491, -0.27087125182151794, -0.6253252625465393, -0.05083944648504257, -0.2334776669740677, -0.131649836897...
</a> </span> </div> ``` Here is the CSS: ``` .lightbox_images{ background-color:#F9F9F9; border:1px solid #F0F0F0; } .lightbox_images h6{ font-family:Verdana, Arial, Helvetica, sans-serif; color:#333333; font-size:14px; font-weight:bold; font-style:italic; ...
[ -0.128024160861969, 0.06856568902730942, 0.6564247012138367, -0.21436166763305664, -0.30085816979408264, 0.607556164264679, 0.10796625912189484, -0.2273215800523758, -0.1782233864068985, -0.7429273128509521, -0.4885082244873047, 0.07612557709217072, -0.45745086669921875, 0.0222119316458702...
background-color:#DFDFDF; margin:5px; display:inline-block; border:1px solid #CCC; } .lightbox_images a{ display:inline-block; width:60px; height:60px; overflow:hidden; position:relative; } .lightbox_images a img{ position:absolute; left:-50%; top:-50%; } .lightbox_images s...
[ -0.16650331020355225, -0.1869724988937378, 0.78693026304245, -0.30117738246917725, -0.17288453876972198, 0.2977096438407898, 0.025862183421850204, -0.1925038844347, -0.5610733032226562, -0.8187412023544312, -0.2716050446033478, 0.3567836880683899, -0.45999085903167725, -0.15152937173843384...
overflow: hidden; border: 1px solid #000; } span img { position: absolute; left: -10px; /* Change this */ top: -10px; /* Change this */ } ``` You can then center the image based on its exact dimensions. Alternatively, if you're able to modify the HTML, you could instead use something like this: ``` <div> ...
[ -0.16460594534873962, -0.18324828147888184, 1.0238569974899292, -0.019959451630711555, -0.19937001168727875, 0.18962693214416504, 0.20156492292881012, -0.3534408211708069, -0.3571048676967621, -0.6079626679420471, -0.46924734115600586, 0.3990439474582672, -0.08001689612865448, -0.030427398...
the background will be automatically centered regardless of its dimensions, and it'll still be clickable.
[ 0.4405798316001892, -0.04877911135554314, 0.5295753479003906, 0.21503448486328125, 0.31881028413772583, 0.04526284709572792, -0.18919381499290466, 0.3468089997768402, -0.2680427134037018, -0.6173350214958191, -0.22005610167980194, 0.2519945204257965, 0.04570968449115753, -0.222232237458229...
One such program that uses a wait function like this is this one: ``` #include<stdio.h> #include<stdlib.h> int main() { int pid,fd[2]; int n; char line[20]; if(pipe(fd)<0) { printf("Error creating pipe"); } else { pid=fork(); if(pid<0) { printf("Error wh...
[ 0.4199059009552002, -0.4969604015350342, 0.12229574471712112, -0.5360485315322876, 0.08146350085735321, 0.18147830665111542, 0.27531635761260986, -0.23236657679080963, 0.03334522619843483, -0.28660163283348083, -0.06438424438238144, 0.3739111125469208, -0.6948699951171875, 0.33475160598754...
} else { if(pid>0) { close(fd[0]); write(fd[1],"Hello\n",6); while(wait((int *)0)!=pid); } else { close(fd[1]);
[ -0.13505199551582336, -0.11888062208890915, 0.4254307746887207, -0.6322913765907288, 0.39180806279182434, -0.01097120065242052, 0.1501883864402771, -0.23478494584560394, 0.33375465869903564, -0.29458609223365784, -0.4978441596031189, 0.619394838809967, -0.4229471683502197, 0.01711275056004...
n=read(fd[0],line,20); if(n<0) printf("Error reading a file"); write(1,line,n); } } }
[ -0.07829073071479797, -0.28333377838134766, 0.0692240372300148, -0.5086805820465088, 0.3184172511100769, 0.06770408898591995, 0.37528225779533386, -0.33748534321784973, -0.20905660092830658, -0.21250031888484955, -0.31624162197113037, 0.4800272285938263, -0.2988452613353729, 0.037773955613...
return 0; } ``` stager's answer is correct. Though it should be noted that the cast is entirely unnecessary since according to the standard, 0 used in a pointer context is the NULL pointer.
[ -0.19089357554912567, 0.3693527281284332, 0.2301284521818161, -0.40366294980049133, 0.11199266463518143, -0.16251948475837708, 0.26253610849380493, -0.22831924259662628, 0.42145249247550964, 0.03110341541469097, -0.34634914994239807, 0.47352299094200134, -0.3163270652294159, 0.108149304986...
I need to parse complex expresion from string to bool. It can only contain: \* boolean values (true/false), \* parenthesis, \* AND/OR operands (&&, ||) Eg: ``` bool.Parse("((true || false) && (false || false)) || (true || false)" ``` Any idea how to achieve this? Here's a cunning evaluator class that giv...
[ 0.19571033120155334, 0.18964150547981262, 0.1455179899930954, -0.11044754832983017, 0.023714710026979446, 0.13991424441337585, 0.6660285592079163, -0.6969671845436096, 0.20546644926071167, -0.37453052401542664, -0.027619995176792145, 0.7345859408378601, -0.423061341047287, -0.0167056657373...
{ public function Eval(expr : String) : String { return eval(expr); } } }"; static
[ -0.26998382806777954, -0.24178647994995117, 0.42503559589385986, -0.1602112501859665, 0.11438228189945221, 0.2804182767868042, 0.3005130887031555, -0.17870303988456726, -0.1314038187265396, 0.14237982034683228, -0.5444881916046143, 0.7299197316169739, -0.47711485624313354, 0.11430926620960...
private object _evaluator; static private Type _evaluatorType; [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline", Justification = "Can't be done inline - too complex")] static Evaluator() { InstantiateInternalEvaluator(); } static priv...
[ -0.2917611598968506, -0.04528820514678955, 0.2644084095954895, -0.09464099258184433, -0.17285825312137604, 0.29925337433815, 0.6341602206230164, -0.7190243005752563, -0.007881873287260532, -0.19104234874248505, -0.34756770730018616, 0.4187198877334595, -0.39288291335105896, 0.0316360332071...
parameters.GenerateInMemory = true; CompilerResults results; results = compiler.CompileAssemblyFromSource(parameters, _jscriptSource); Assembly assembly = results.CompiledAssembly; _evaluatorType = assembly.GetType("Evaluator.Evaluator"); _evaluator = Activator.CreateInstance(...
[ -0.0347989983856678, -0.20969340205192566, 0.07985899597406387, -0.19491539895534515, -0.16635465621948242, 0.5387507081031799, 0.6527969837188721, -0.8605323433876038, -0.17443977296352386, -0.2766323983669281, -0.19714267551898956, 0.382341206073761, -0.34411105513572693, 0.2786668241024...
public double EvaluateToDouble(string statement) { string s = EvaluateToString(statement); return double.Parse(s); } static public decimal ForceEvaluateToDecimal(string statement) { decimal result; bool s = Decimal.TryParse(statement, out result); return result; ...
[ 0.2057545930147171, -0.029546741396188736, 0.17331717908382416, -0.32804927229881287, -0.24360182881355286, 0.34028491377830505, 0.6193892955780029, -0.4244024157524109, 0.06363776326179504, 0.05139612406492233, -0.5002371668815613, 0.5269239544868469, -0.23328165709972382, -0.175530344247...
= EvaluateToString(statement); return decimal.Parse(s); } static public string EvaluateToString(string statement) { object o = EvaluateToObject(statement); return o.ToString(); } static public bool EvaluateToBool(string statement) { object o = EvaluateToObject(s...
[ -0.37315207719802856, 0.35251814126968384, 0.19181634485721588, -0.42257294058799744, -0.003668770659714937, 0.3560863435268402, 0.1818138062953949, -0.2230473905801773, 0.17201626300811768, 0.1953778862953186, -0.6893189549446106, 0.6659351587295532, -0.1904294490814209, -0.04735842347145...
try { return _evaluatorType.InvokeMember( "Eval", BindingFlags.InvokeMethod, null, _evaluator,
[ -0.12049383670091629, -0.07980989664793015, 0.29816314578056335, -0.1301472783088684, 0.44918498396873474, 0.20393122732639313, 0.8070968985557556, -0.66082763671875, -0.038968853652477264, -0.37615546584129333, -0.33863183856010437, 0.4180677533149719, -0.5438166856765747, 0.0941098183393...
new object[] {statement} ); } catch (Exception) { InstantiateInternalEvaluator(); return null; } } } ``` You just then call Evaluator.EvaluateToBool(string). Lifted from an existing project, so you may
[ 0.21388520300388336, -0.1726062297821045, 0.1444765031337738, -0.1320594996213913, 0.10666672885417938, 0.07084187865257263, 0.4229404032230377, -0.4495449662208557, -0.4426654577255249, -0.2753848433494568, -0.3574070930480957, 0.39304882287979126, -0.28727707266807556, 0.2828337252140045...
want to tweak!
[ 0.5982038378715515, 0.2245599329471588, -0.2280474156141281, -0.19275124371051788, -0.06310956925153732, 0.02059253118932247, 0.06083288788795471, 0.05808892101049423, -0.29288408160209656, -0.24307261407375336, 0.03471238538622856, 0.023826688528060913, -0.2079528570175171, 0.310060590505...
Is it possible to detect if an incoming request is being made through a proxy server? If a web application "bans" users via IP address, they could bypass this by using a proxy server. That is just one reason to block these requests. How can this be achieved? IMHO there's no 100% reliable way to achieve this but the pre...
[ 0.3914729058742523, 0.10530657321214676, 0.23848240077495575, 0.2283172756433487, -0.12315361946821213, -0.44503864645957947, 0.3294961452484131, 0.0038218863774091005, -0.4171280264854431, -0.4761008322238922, -0.0609247200191021, 0.21971015632152557, -0.3130468428134918, 0.20548714697360...
This is what I'm trying to do: I'm reading a file in from the command line. The file contains a list of data,below this paragraph is what it looks like. The problem I'm having is with the if statements. ``` import java.util.*; import java.io.*; public class VehicleTest { public static void main(String[] args) thr...
[ 0.21692250669002533, 0.26441705226898193, 0.17421165108680725, -0.1628291755914688, 0.04652293398976326, 0.22584958374500275, 0.14875395596027374, -0.06623335927724838, 0.024595383554697037, -0.3914887309074402, -0.05091481655836105, 0.8324351906776428, -0.14742645621299744, 0.407408356666...
String truck = "truck"; String bicycle = "bicycle"; File file = new File(args[0]); Scanner input = new Scanner(file); String[] autos = new String[100]; ArrayList allVehicles = new ArrayList(); for (int i = 0; i < autos.length; i++) { autos[i] = input.nextLi...
[ 0.23381450772285461, -0.4417358636856079, 0.7178671956062317, -0.4479670226573944, 0.23889654874801636, 0.5126223564147949, -0.031897544860839844, -0.6149613261222839, -0.5109143853187561, -0.6350498795509338, -0.22912900149822235, 0.6642868518829346, -0.33506184816360474, 0.02052201330661...
} int j = 0; int i = 0; while (i++ < autos.length) { if (vehicle.equalsIgnoreCase(autos[j++])) { Vehicle v = new Vehicle(); v.setOwnerName(autos[j]);
[ 0.2790987491607666, -0.2560921907424927, 0.7966943383216858, -0.1371442973613739, 0.09778396785259247, 0.557814359664917, 0.23992523550987244, -0.568936288356781, 0.10838750004768372, -0.4335632026195526, -0.33189281821250916, 0.9830066561698914, 0.05111182853579521, 0.22115840017795563, ...
allVehicles.add(v); }else if(car.equalsIgnoreCase(autos[j++])){ Car c = new Car(); c.setOwnerName(autos[j]); allVehicles.add(c); } }
[ 0.13272224366664886, 0.05231749266386032, 0.4930613040924072, -0.004364805296063423, 0.17218442261219025, 0.4015316069126129, 0.02906329371035099, -0.3269517123699188, 0.023626606911420822, -0.4221191108226776, -0.2822975516319275, 0.831192672252655, -0.20239941775798798, 0.255446285009384...
for(Object a: allVehicles){ System.out.println(a); } } } ``` In pseudo code this would be: ``` while i is less than the length of the string array if you see the word vehicle create a new vehicle object and add it to the arrayList. if you see the word car create a new car object and ad...
[ 0.21574079990386963, 0.15353505313396454, 0.3019294738769531, -0.15757335722446442, 0.10457322001457214, 0.31647923588752747, 0.23380132019519806, -0.3286980390548706, 0.059163983911275864, -0.42052996158599854, 0.0029687487985938787, 0.7282568216323853, -0.1241830587387085, 0.208447739481...
what is wrong, but how else am I supposed to iterate through the string array so that I can read each line and create the appropriate objects? I'm at a loss as to what to do. I need some help. ``` foreign car aMarioy Mario's house (777) 777-7777 gmario@mario.com false black Italy 4415.91 truck aDo...
[ 0.39264601469039917, 0.4324305057525635, 0.39586788415908813, 0.11992993205785751, 0.34932443499565125, 0.4024101197719574, 0.33951684832572937, 0.09046445786952972, -0.46192988753318787, -0.18015429377555847, 0.19876010715961456, 0.8189051747322083, 0.1377977579832077, 0.00143118039704859...
jtom@tom.com 7 truck bGeorge George's house (666) 666-6666 kgeorge@george.com 25 51234.56 12/4/2004 vehicle bTim Tim's house (111) 111-1111 tim@tim.com bicycle bJim Jim's house (555) 555-5555 Ajim@jim.com 5 american car bJohn John's house (888) 888-8888 Bjohn@john.c...
[ 0.3864099085330963, 0.16741734743118286, 0.2807624936103821, 0.0904652401804924, 0.018627742305397987, 0.5886234045028687, 0.5698562264442444, -0.22010838985443115, -0.1277814358472824, 0.09776957333087921, 0.17591631412506104, 0.441524863243103, 0.267137736082077, 0.13715574145317078, -...
black Italy 4415.91 american car gSam Sam's house (333) 333-3333 Hsam@sam.com false blue true false ``` A couple of problems: * You're incrementing j in both "if" tests. I haven't checked to be certain (it's quite convoluted code, to be honest) but if you make sure that you only increment j w...
[ 0.5523040890693665, 0.3018708825111389, 0.2931576371192932, 0.02840321883559227, 0.4340165853500366, 0.444365531206131, 0.2187722772359848, -0.09706594049930573, -0.2501150667667389, -0.19550754129886627, 0.12813621759414673, 0.46430179476737976, 0.07449457794427872, -0.01682273857295513, ...
file. Basically you don't need `i` here. Here's one changed version: ``` while (j < autos.length) { if (vehicle.equalsIgnoreCase(autos[j])) { j++; Vehicle v = new Vehicle(); v.setOwnerName(autos[j++]); allVehicles.add(v); } else if(car.equalsIgnoreCa...
[ 0.38128551840782166, -0.270195871591568, 0.7287544012069702, 0.039468392729759216, 0.13550685346126556, 0.49028700590133667, 0.08897215873003006, -0.3671362102031708, -0.051999371498823166, -0.6047513484954834, -0.1279277503490448, 0.8885538578033447, -0.09187839925289154, 0.17271964251995...
j++; Car c = new Car(); c.setOwnerName(autos[j++]); allVehicles.add(c); } } ``` It would be slightly cleaner to extract the type once though - then you can do the comparisons separately: ``` while (j < autos.length) { String type = autos[j++]; if (v...
[ 0.3268602192401886, 0.07003814727067947, 0.4448927342891693, -0.16309788823127747, -0.1024777814745903, 0.4723399579524994, 0.2177594155073166, -0.553088903427124, 0.11258424073457718, -0.3999771177768707, -0.10160557925701141, 0.8797071576118469, -0.1407536119222641, 0.18863676488399506, ...
{ Vehicle v = new Vehicle(); v.setOwnerName(autos[j++]); allVehicles.add(v); } else if(car.equalsIgnoreCase(type)){ Car c = new Car(); c.setOwnerName(autos[j++]); allVehicles.add(c); }
[ 0.18591001629829407, 0.03788088262081146, 0.7152007818222046, -0.011440685950219631, 0.013370233587920666, 0.7142374515533447, -0.013945036567747593, -0.37873828411102295, -0.0006926797213964164, -0.3992954194545746, -0.30362796783447266, 0.9118351936340332, 0.2052617371082306, 0.423715114...
} ``` It's still not quite how I'd do it, but it's closer... My next step would be to use the scanner more appropriately: ``` while (scanner.hasNext()) { String type = scanner.nextLine(); if (type.equalsIgnoreCase("vehicle")) { allVehicles.add(new Vehicle(scanner)); } else if (type.equalsIgnoreC...
[ 0.15941984951496124, 0.1917739361524582, 0.7044768333435059, -0.11174912005662918, 0.08185756951570511, 0.4101063907146454, -0.08852329850196838, -0.47696253657341003, -0.13138991594314575, -0.9583269357681274, 0.10623811185359955, 0.6934311389923096, 0.022816240787506104, 0.08762203902006...
a new method: ``` // Use a base type in real code private static Object parseNextVehicle(Scanner scanner) { String type = scanner.nextLine(); if (type.equalsIgnoreCase("vehicle")) { return new Vehicle(scanner); } else if (type.equalsIgnoreCase("car")) { return new Car(scanner); } //...
[ 0.07562756538391113, 0.011971216648817062, 0.652772068977356, 0.06484967470169067, 0.0036836182698607445, 0.1952448934316635, 0.033009447157382965, -0.4607294499874115, -0.11762470006942749, -0.6135814189910889, -0.2167455554008484, 0.5390608310699463, -0.2212909609079361, 0.38591220974922...
Instead of passing many arguments to a method, I was encapsulating it into an argument object. *note*: simplied for demo ![alt text](https://farm4.static.flickr.com/3461/3390095308_6f5dccc4cd_o.png) For such a case, what would be a better practice? > • Create a class and **name** it as `InventorySaveArgs`? > ...
[ -0.00801096297800541, -0.10171173512935638, -0.15385769307613373, 0.01216599065810442, 0.01860830746591091, 0.17921660840511322, 0.282421350479126, -0.13524465262889862, -0.3234100043773651, -0.5688894391059875, 0.013051235117018223, 0.3044455647468567, -0.3234679102897644, -0.073631227016...
to a single object by chance. **[UPDATE]**: [Found Nested Type Usage Guidelines](http://msdn.microsoft.com/en-us/library/tdz1bea9(VS.71).aspx) on MSDN `InventorySaveArgs` should be available from another assemblies, so I am going with a regular class. There is currently no full mono support for the MSP430. Mono do...
[ 0.3453158438205719, -0.09413207322359085, -0.15447847545146942, 0.17890135943889618, -0.20056231319904327, -0.1161331757903099, 0.4263657331466675, -0.1298697590827942, -0.41245266795158386, -0.27170246839523315, -0.22193314135074615, 0.5064941644668579, -0.43716418743133545, 0.03097441047...
process: <http://www.mono-project.com/Embedding%5FMono> I don't know what the requirements of the Mono VM are, though. It may be easy to compile and use, or you may have to write a lot of supporting code, or dig deep into mono to disable code you won't be using, or can't support on the chosen microcontroller. Further...
[ 0.6355133652687073, 0.3212072253227234, -0.1339707374572754, 0.046831727027893066, -0.27675601840019226, -0.06446494907140732, 0.1964075267314911, -0.5221189260482788, -0.19588549435138702, -0.2255762219429016, -0.3125200867652893, 0.519829511642456, -0.4064357876777649, 0.1989929676055908...
should make your job easier. Good luck, and please let us know what you decide to do, and how it works out! -Adam
[ 0.6966156959533691, 0.20176959037780762, 0.027091961354017258, 0.24966877698898315, 0.48137959837913513, -0.10089617222547531, 0.22996385395526886, 0.5315479636192322, 0.10521583259105682, -0.4292004704475403, -0.21086247265338898, 0.57781583070755, 0.380634069442749, -0.05646498128771782,...
my proble is to avoid that users upload some malicious file on my web-server. Im working on linux environment (debian). Actually the uploads are handled via php by this code: ``` function checkFile($nomeFile, $myExt = false){ if($myExt != false){ $goodExt = "_$myExt"."_"; }else{ $goodExt = "_.jpg_.bmp_.zip_.pdf_.gif_...
[ 0.06544538587331772, 0.18116208910942078, 0.8883687853813171, -0.2938404977321625, 0.047084029763936996, 0.1653413325548172, 0.5772131681442261, 0.1515345573425293, -0.15863552689552307, -0.3274384140968323, -0.17647142708301544, 0.7133812308311462, -0.6349256038665771, 0.16885916888713837...
me; even if a file.exe (for example) wont never be executed if is renamed in file.jpg (am i right?), i dont want to have potential danger files on my server. There is a way, in php, python, or whatelse can a unix system run easly, to check the truly type of a file? I've tried the python mimetypes module, but it retri...
[ 0.526524007320404, 0.19140854477882385, 0.2241881936788559, 0.14736537635326385, 0.14937515556812286, -0.1387404501438141, 0.4451427161693573, 0.026910535991191864, -0.22833716869354248, -0.41299232840538025, 0.04716077446937561, 0.7184140682220459, -0.28201380372047424, -0.126610666513443...
is via the `file` command. I don't know if it has an API. You can try it out yourself in the shell. For your example of file.exe that was renamed to file.jpg before being uploaded, run `file file.jpg` and it will print out something telling you it's an executable. It can be fooled, however. I'm guessing you don't know...
[ 0.4875803291797638, -0.13700227439403534, 0.36323118209838867, 0.04105931892991066, 0.09303537011146545, -0.4521333873271942, 0.15070386230945587, 0.2497343271970749, -0.21740327775478363, -0.5712226629257202, -0.3880694806575775, 0.9067187309265137, -0.34844648838043213, 0.239860072731971...
set it on any uploaded files and you should be safe from executing them. You may still be serving them back up to your site's visitors, so it could still be a vector for XSS attacks, so watch out for that.
[ 0.775658369064331, -0.19201458990573883, 0.23144054412841797, 0.36976370215415955, 0.10223247110843658, -0.5193287134170532, 0.024309847503900528, 0.3209364414215088, -0.19905805587768555, -0.43258026242256165, 0.013157726265490055, 0.2845964729785919, -0.36211803555488586, -0.085201911628...
If I have the option of using `.Net` and can do data `transformations` just fine in .Net, when would I need `SSIS`? Is there a certain task that `SSIS` would be better for? Are the added benefits of transparency worth it? Is it just what I am more comfortable with? What are the best practices for determining this? good...
[ 0.15441781282424927, -0.06569086760282516, 0.25996580719947815, 0.3919350206851959, -0.055560603737831116, -0.1980232298374176, -0.02026841975748539, -0.15030735731124878, -0.7048279643058777, -0.9212123155593872, 0.045999929308891296, 0.3465763032436371, -0.06567618995904922, 0.2210032492...
answers to above are yes then go ahead with ssis. basically .net is cool with small data import / export jobs, but when you have anything more complex, ssis is a definite winner the other thing which i look at is - is it worth writing .net code when everything is available inside ssis. (dont mistake me - i love coding...
[ 0.23109395802021027, -0.06573080271482468, 0.07790779322385788, 0.4240213632583618, -0.007696796674281359, -0.3929235339164734, 0.3564600348472595, 0.14290392398834229, -0.1116732656955719, -1.0536900758743286, -0.08188746124505997, 0.6234450340270996, 0.08867106586694717, -0.2593688070774...
I have a weird quirk in ActionScript. I need to pass the index to a callback function. Here is my code ``` for (var i:Number = 0; ((i < arrayQueue.length) && uploading); i++) { var lid:ListItemData=ListItemData(arrayQueue[i]); var localI:Number= new Number(i); // to copy? var errorCallback:Function = fun...
[ 0.0854111760854721, -0.2456657886505127, 0.8172294497489929, -0.024754969403147697, 0.047570765018463135, -0.06630975753068924, 0.605713427066803, -0.12479562312364578, -0.18674366176128387, -0.5173490643501282, -0.0024869884364306927, 0.2877599596977234, -0.5149628520011902, 0.35459762811...
lid.fileRef.addEventListener(Event.COMPLETE, completeCallback); lid.fileRef.addEventListener(ProgressEvent.PROGRESS, progressCallback); lid.fileRef.addEventListener(HTTPStatusEvent.HTTP_STATUS, errorCallback); lid.fileRef.addEventListener(IOErrorEvent.IO_ERROR, errorCallback); lid.fileRef.addEventListen...
[ -0.13355699181556702, -0.18720565736293793, 0.36118409037590027, -0.2093488872051239, -0.00008718968456378207, -0.0008063533459790051, 0.3168879747390747, -0.4238828420639038, -0.2265848070383072, -0.5380663871765137, -0.3247860074043274, 0.7497283220291138, -0.4163031280040741, -0.0113094...
TimerEvent) { trace(ind); }; } for (var i = 0; i < 10; i++) { var tm : Timer = new Timer(100*i+1, 1); tm.addEventListener(TimerEvent.TIMER, getTimerClosure(i)); tm.start(); } ``` This will continuously trace numbers from 0 to 9. **Edit2:** here is a sample of creating a delegate based on a f...
[ 0.37981030344963074, -0.2971950173377991, 0.21423038840293884, -0.12484192848205566, 0.15961763262748718, 0.1586184948682785, 0.21907395124435425, -0.8392825722694397, -0.3327108323574066, -0.47921690344810486, 0.04928693547844887, 0.4194786250591278, -0.2751080393791199, 0.269621372222900...
func.apply(scope, args.concat(rest)); } } var tm : Timer = new Timer(1000, 1); tm.addEventListener(TimerEvent.TIMER, Delegate(this, this.timerHandler, 1, 2, 3)); tm.start(); ``` However this is a bad approach since unsubscribing for such a listener is a hell pain. This in turn will probably cause some memory lea...
[ 0.09333623945713043, 0.10953155159950256, 0.3838343024253845, -0.18280836939811707, 0.022991538047790527, -0.2943635880947113, 0.682083249092102, -0.44486716389656067, -0.25071802735328674, -0.6209071278572083, -0.18386977910995483, 1.0174665451049805, -0.2044118046760559, -0.0271184928715...
E.g. in your case you could create a `Dictionary` that matches your `FileReference` objects to appropriate indices. Something like that: ``` var frToInd : Dictionary = new Dictionary(false); // false here wouldn't prevent garbage collection of FileReference objects for (var i : int = 0; i < 10; i++) { // blah-bla...
[ 0.22889375686645508, -0.23240108788013458, 0.5391890406608582, -0.17253290116786957, -0.08135487884283066, -0.25768476724624634, 0.13762938976287842, -0.3825734555721283, -0.2649904191493988, -0.7316295504570007, -0.16380882263183594, 0.979777455329895, -0.2558344304561615, 0.0525500923395...
var ind : int = frToInd[event.target]; } else { // Shouldn't happen since all FileReferences should be in // the Dictionary. But if this happens - it's an error. } } ``` *-- Happy coding!*
[ 0.4287126660346985, -0.07278677821159363, 0.05554777756333351, -0.1603904366493225, 0.24911026656627655, -0.08721233904361725, 0.3737066388130188, -0.06491028517484665, -0.20654277503490448, -0.6189113259315491, -0.15385779738426208, 0.8715657591819763, -0.4327146112918854, -0.299928009510...
I am creating a WCF Service that will be consumed by both .NET and Java client applications. We do not have any Java experience in the team, so are looking for guidelines or rules to follow to ensure that we do not accidentally include any types in our WCF Service interface or do anything else that would preclude it f...
[ 0.5997771620750427, 0.12221419811248779, 0.18725796043872833, -0.11537139117717743, -0.009585155174136162, -0.37018463015556335, 0.026422301307320595, -0.014757673256099224, -0.09088879078626633, -0.6385490894317627, 0.24371659755706787, 0.3877321779727936, -0.5616028308868408, 0.144353419...
understood by a Java client. Edit2 ----- A second example of a concern is the use of any nullable value types (`bool?`, `int?` etc). Edit3 ----- At present some of our development teams are hand-writing .xsd files to define the various objects that the WCF interface methods will take as arguments and return as retu...
[ 0.23448733985424042, 0.1272713989019394, 0.20436112582683563, -0.1374293714761734, -0.2673475444316864, -0.3402133285999298, 0.3764238655567169, -0.10900143533945084, -0.12609273195266724, -0.6247049570083618, -0.13506503403186798, 0.5362066626548767, -0.44840314984321594, -0.0720331966876...
javadoc comments). The recommendation to start with XSD is a good one. That will not guarantee compatibility on each side, as XML Schema is really big and no web services stack supports all of it. (Example: lists). So, start with XSD, but confine yourself to mainstream types. Primitives, complextypes composed of prim...
[ 0.0762953832745552, 0.06204212084412575, 0.10380974411964417, 0.04866403713822365, -0.22358502447605133, -0.5083436965942383, 0.28956544399261475, -0.2083442360162735, -0.16892831027507782, -0.6952772736549377, 0.05689411237835884, 0.39014488458633423, -0.5981572866439819, -0.2299878746271...
are formatting concerns as well. The .NET DateTime is a higher resolution quantity than a Java Calendar and as a result, shipping a .NET time to Java can result in de-serialization exceptions on the Java side. (**EDIT:** using the DataType="dateTime" decorator in the XmlElement attribute on the .NET side can make sure ...
[ 0.07858091592788696, -0.15790753066539764, 0.32535621523857117, -0.0224603321403265, -0.11314573884010315, -0.2533308267593384, 0.0644102469086647, 0.038648996502161026, -0.3737804889678955, -0.7626751661300659, -0.14880092442035675, 0.5594731569290161, -0.2984285354614258, 0.0063706068322...
the code, your partial class code will remain unchanged. **EDIT:** When you compile, the doc will appear on the classes. **EDIT:** Someone asked, if using XSD-first is not enough to guarantee interop, why use it? My answer: it is not a guarantee but it is a good step, it helps. It keeps you away from designing interfa...
[ 0.3920319378376007, -0.06988082081079483, 0.2169654816389084, 0.22347670793533325, -0.10383987426757812, -0.15570782124996185, 0.2389817237854004, 0.20449626445770264, -0.15002143383026123, -1.0121198892593384, -0.06910785287618637, 0.639925479888916, -0.3926478624343872, -0.15196581184864...
with thoughtful design. I should have mentioned in my original answer that you can apply an iterative process to the development of the interface. Design in XSD, then generate (client) stub and (server) skeleton code from the XSD+WSDL, then adjust and do it again.
[ 0.5715538859367371, -0.021249035373330116, 0.39382117986679077, 0.1841220259666443, -0.11077240109443665, 0.055425792932510376, -0.23540931940078735, -0.5740476846694946, -0.11245837062597275, -0.7837215065956116, 0.1742471605539322, 0.6315639019012451, -0.09901224821805954, -0.17388190329...
Has anyone found a good way of embeding CSS in a programatically produced email. The best way I have found is to put the style code into a resource file and call it into the code. An emample would be ``` Dim objBuilder objBuilder = New StringBuilder objBuilder.Append(Resources.SystemEmail.CSSStyle) objBuilder.Appen...
[ 0.3861904442310333, 0.06906026601791382, 0.7103148698806763, -0.11776039004325867, -0.15899766981601715, 0.2876223921775818, 0.21019384264945984, -0.3591392934322357, -0.12716402113437653, -0.6148051023483276, -0.18156690895557404, 0.2444172203540802, -0.422330766916275, 0.0052242688834667...
font-size: 10pt; padding: 3px 0px 0px 0px; margin: 0px 0px 0px 0px; } --> </STYLE> ``` And calling this into the string would call this inline And with the answers below to send the message I would use this ``` Dim client As New SmtpClient("localhost") Dim toAddr As New MailAddress(MailRecipients) Dim from...
[ 0.1531708687543869, -0.1473316252231598, 1.1502865552902222, -0.18157264590263367, -0.3934185802936554, 0.07696415483951569, 0.4843285381793976, -0.47628912329673767, -0.19284577667713165, -0.6099935173988342, -0.23861266672611237, 0.5459308624267578, -0.3273966312408447, 0.064079031348228...
good option. The KEY point of that statement is the Content-type being set to text/html
[ -0.010114331729710102, -0.08976143598556519, 0.4876939654350281, -0.041913438588380814, -0.12549003958702087, -0.38954710960388184, 0.23994939029216766, 0.2796535789966583, -0.07119115442037582, -0.5939106941223145, -0.5773903131484985, 0.6176748871803284, -0.059122975915670395, -0.3348403...
One of my favorite features about python is that you can write configuration files in python that are very simple to read and understand. If you put a few boundaries on yourself, you can be pretty confident that non-pythonistas will know exactly what you mean and will be perfectly capable of reconfiguring your program....
[ 0.40661656856536865, 0.03008454106748104, -0.334036648273468, 0.028458617627620697, -0.24631978571414948, -0.32146137952804565, 0.6318630576133728, 0.26489073038101196, -0.18113550543785095, -0.25089994072914124, 0.06689687818288803, 0.7601011395454407, -0.4057755470275879, -0.518691599369...
your statements execute. 2. Stick to literal assignments. Methods and functions called on objects are harder to think through. Anything implicit is going to be a mess. If there's something complicated that has to happen with your parameters, change how they're interpreted. 3. Language keywords and error handling are ri...
[ 0.48708489537239075, 0.22024837136268616, 0.045039549469947815, 0.18143177032470703, -0.3040483891963959, -0.06336039304733276, 0.7077317237854004, -0.17042161524295807, -0.2867147922515869, -0.29117968678474426, 0.003242124803364277, 0.6392161250114441, -0.31522148847579956, -0.2559713423...
all be configured the same (some will share a database, some won't, for example). So, I throw a hook at the end: ``` try: from settings_overrides import * LOCALIZED = True except ImportError: LOCALIZED = False ``` where settings\_overrides is on the python path but outside the working copy. What do you t...
[ 0.4763757884502411, -0.006309112533926964, 0.1376192718744278, 0.00439508818089962, -0.080422542989254, -0.44380488991737366, -0.03626164421439171, -0.2873309254646301, -0.28019899129867554, -0.5429930090904236, 0.024836746975779533, 0.7106464505195618, -0.41956132650375366, -0.12262973189...
know Python.
[ 0.3464776873588562, 0.35338377952575684, -0.5206524133682251, -0.09552279859781265, -0.4463116228580475, -0.12551984190940857, 0.2762148678302765, 0.7096379995346069, -0.3321009576320648, -0.1724281758069992, -0.28405603766441345, 0.533097505569458, -0.5993081331253052, -0.4284659922122955...
* So I have my edmx made. * Then I change my database a little bit, changing a column to from being a NOT NULL to allowing NULL. * I go into my edmx, right click and choose "Update Model from Database" Now I go into my program and it hasnt actually updated... I can't put a null in the column. What do I have to do to u...
[ 0.6454238891601562, 0.3874601423740387, 0.5727556347846985, 0.022498082369565964, -0.16745135188102722, 0.029572609812021255, 0.41623789072036743, 0.1303771436214447, -0.2785851061344147, -0.7872886061668396, 0.5476114153862, 0.6134982705116272, 0.05703094229102135, 0.07805182784795761, ...
layer has been updated by viewing it in the Model Viewer toolbox. If the Store has properly been updated then you're okay, and your database is in sync. If so, go into the visual designer, click the field, go to properties, and update the NotNull property on the Conceptual side.
[ 0.5258442759513855, -0.470517098903656, 0.8427848815917969, 0.25727224349975586, 0.29034894704818726, -0.3911097049713135, -0.12789320945739746, -0.14303180575370789, -0.15828508138656616, -0.9313476085662842, -0.06813471019268036, 0.7189469337463379, 0.1948065608739853, -0.049954261630773...
I am currently using [Aptana RadRails](http://www.aptana.com/rails) for Ruby on Rails development on my local system. Now I want to work on a Rails-Application that is hosted on my dedicated server, but unfortunatly RadRails does not provide support for Remote File Access (apart from SVN). Is there an IDE for Rails-Ap...
[ 0.18114928901195526, 0.030678153038024902, -0.10593016445636749, -0.28538984060287476, -0.2975104749202728, 0.016276223585009575, 0.4517081379890442, -0.10863791406154633, -0.26339149475097656, -0.5546737909317017, 0.27610835433006287, 0.4848538339138031, -0.304999977350235, 0.380279660224...
I used to access individual characters of a string using string[n]. But when I do this in IE8 it always returns undefined when I do this. I can use string.substr(n, 1) to do the same thing, but the syntax is much longer. Why did they do this? That form of character access is not part of the ECMAScript standard, but...
[ -0.05051383376121521, 0.19724564254283905, 0.19669753313064575, -0.12579193711280823, -0.10381724685430527, -0.053385183215141296, 0.2318788319826126, 0.1325274407863617, -0.18520069122314453, -0.6791442632675171, 0.10784219205379486, 0.3459230363368988, -0.26177647709846497, 0.19942283630...
Am I a bad person if I use `use Test::More qw(no_plan)`? The Test::More [POD](http://search.cpan.org/~mschwern/Test-Simple-0.86/lib/Test/More.pm) says > Before anything else, you need a testing plan. This basically declares how many tests your script is going to run to protect against premature failure... > > > `...
[ 0.18809032440185547, 0.18572938442230225, 0.18299078941345215, -0.2936609387397766, 0.17942531406879425, -0.010370400734245777, 0.4835928976535797, -0.6322566866874695, -0.13680242002010345, -0.605217456817627, -0.021734369918704033, 0.48708441853523254, -0.1622801125049591, -0.03223316743...
seen when there are no results printed at the end of a test run. It just doesn't seem that helpful. So I have 3 questions: 1. What is the reasoning behind requiring a test plan by default? 2. Has anyone found this a useful and time saving feature in the long run? 3. Do other test suites for other languages support t...
[ 0.422583669424057, 0.08427554368972778, 0.07523180544376373, 0.07682116329669952, -0.09846729785203934, -0.30516064167022705, 0.40507879853248596, -0.25490227341651917, 0.024663427844643593, -0.4572765529155731, -0.07165968418121338, 0.41738420724868774, 0.019857341423630714, 0.00582853099...
up every once in a while on the [perl-qa](http://qa.perl.org/) list and is a bit of a contentious issue. Here are the highlights: ### Reasons to not use a test plan 1. Its annoying and takes time. 2. Its not worth the time because test scripts won't die without the test harness noticing except in some rare cases. 3. ...
[ 0.8409790992736816, -0.08057540655136108, 0.20667925477027893, 0.34450671076774597, -0.20606812834739685, -0.4311405420303345, 0.4234180748462677, -0.3909921944141388, -0.44381844997406006, -0.4735177755355835, 0.1594090759754181, 0.2069936841726303, -0.18857957422733307, -0.13978600502014...
longer, your test logic is too complex. 2. If there is an exit(0) in the code somewhere, your test will complete successfully without running the remaining test cases. An observant human may notice the screen output doesn't look right, but in an automated test suite it could go unnoticed. 3. A developer might accidenta...
[ 0.5769695043563843, 0.19793139398097992, 0.13973066210746765, 0.14504659175872803, 0.11684513092041016, -0.11812561750411987, 0.7686744928359985, -0.5100956559181213, -0.17147792875766754, -0.37325236201286316, 0.009342151693999767, 0.4505300223827362, 0.0031620117370039225, -0.12962333858...
at the end of the test script. This is the approach I take currently. This fixes the problem where code has an `exit(0)` in it. It doesn't fix the problem of logic which unintentionally skips tests though. In short, its safer to use a plan, but the chances of this actually saving the day are low unless your test sui...
[ 0.4305174946784973, -0.052984483540058136, 0.003625160548835993, 0.2695706784725189, 0.15267392992973328, -0.27286356687545776, 0.3184110224246979, 0.07046980410814285, -0.10452346503734589, -0.5164405107498169, 0.03813885524868965, 0.4417779743671417, 0.11180457472801208, -0.0285135786980...
been useful to them in the real word. This includes Larry Wall. Michael Schwern [says](http://www.nntp.perl.org/group/perl.qa/2009/03/msg12104.html) the feature originates with Larry, more than 20 years ago. Do other languages have this feature? ------------------------------------- None of the xUnit type testing sui...
[ 0.5913047790527344, 0.33193063735961914, -0.030725520104169846, -0.03756902739405632, 0.2176070362329483, -0.10826609283685684, 0.1362609565258026, 0.4032776951789856, -0.07966088503599167, -0.393236368894577, 0.10242386162281036, 0.3817547559738159, 0.19097086787223816, -0.122210346162319...