text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
let me iterate through results, so i'll implement some cute caching (read: memoization) over it...
[ 0.08161234855651855, 0.30690860748291016, -0.01249026507139206, 0.39575931429862976, 0.06736232340335846, -0.052343644201755524, -0.14524215459823608, 0.13525019586086273, 0.15449027717113495, -0.6249068379402161, -0.15719108283519745, 0.2687559723854065, -0.00149788788985461, -0.330563575...
Before you start firing at me, I'm NOT looking to do this, but someone in [another post](https://stackoverflow.com/questions/154698/how-can-i-keep-a-class-from-being-inherited-in-c) said it was possible. How is it possible? I've never heard of inheriting from anything using reflection. But I've seen some strange things...
[ 0.2614361643791199, 0.0019264159491285682, -0.2212466299533844, 0.11402434855699539, 0.24736171960830688, -0.5121884942054749, 0.34962156414985657, 0.062197133898735046, -0.5094255805015564, -0.3046876788139343, -0.28321942687034607, 0.4795757234096527, -0.14077137410640717, 0.470395594835...
abstract class Animal { private readonly string m_name; public virtual string GetName() { return m_name; } public Animal( string name ) { m_name = name; } } public sealed class Seal : Animal { public Seal( string name ) : base(name) {} } ``` The problem still remains though, I can't see how you...
[ 0.28039267659187317, -0.04987203702330589, -0.025368746370077133, -0.1501065492630005, -0.11767036467790604, -0.16237489879131317, 0.497280478477478, -0.18255099654197693, -0.14255741238594055, -0.33290818333625793, 0.018637055531144142, 0.6177723407745361, -0.5322390794754028, 0.311843305...
I'd guess that the CLR itself actually enforces this. You'd have to load the code, dissassemble it, remove the 'sealed' bit, then reassemble it, and load the new version.
[ 0.46152737736701965, 0.24350090324878693, 0.45793572068214417, 0.14948195219039917, 0.23141725361347198, -0.2535886764526367, 0.20073628425598145, -0.20742137730121613, -0.20158250629901886, 0.12559162080287933, -0.4277074933052063, 0.6182810664176941, -0.27103444933891296, 0.0290716774761...
I am programmatically exporting data (using PHP 5.2) into a .csv test file. Example data: `Numéro 1` (note the accented e). The data is `utf-8` (no prepended BOM). When I open this file in MS Excel is displays as `Numéro 1`. I am able to open this in a text editor (UltraEdit) which displays it correctly. UE repor...
[ 0.24710741639137268, 0.06093566119670868, 0.15702767670154572, -0.21216794848442078, -0.26135218143463135, 0.03801782429218292, 0.10179880261421204, -0.008618206717073917, -0.05048404261469841, -0.6357811093330383, -0.11132022738456726, 0.14145568013191223, -0.11664855480194092, 0.03907677...
Mark](http://en.wikipedia.org/wiki/Byte_order_mark) as its first three octets. These are the hex values 0xEF, 0xBB, 0xBF. These octets serve to mark the file as UTF8 (since they are not relevant as "byte order" information).[1](http://en.wikipedia.org/wiki/Byte_order_mark) If this BOM does not exist, the consumer/reade...
[ -0.021433871239423752, 0.22587615251541138, 0.9758231043815613, -0.21377038955688477, -0.2904180884361267, 0.2916077971458435, -0.21755552291870117, -0.47890087962150574, -0.0776151716709137, -0.3757893443107605, -0.41379207372665405, 0.22022131085395813, 0.07901537418365479, 0.21597132086...
**disregarding** the presence of the UTF8 BOM. This can **not** be fixed by any system default codepage or language setting. The BOM will not clue in Excel - it just won't work. (A minority report claims that the BOM sometimes triggers the "Import Text" wizard.) This bug appears to exist in Excel 2003 and earlier. Most...
[ -0.06843096762895584, 0.3147358000278473, 0.5843373537063599, -0.15210191905498505, 0.12569499015808105, -0.5064452886581421, 0.2699452340602875, 0.3249729871749878, -0.44575127959251404, -0.43451419472694397, -0.4429903030395508, 0.7737500667572021, -0.6069958806037903, 0.1416934877634048...
course this is much less convenient. Readers of this answer are most likely in a situation where they don't particularly support Excel < 2007, but are sending raw UTF8 text to Excel, which is misinterpreting it and sprinkling your text with `Ã` and other similar Windows-1252 characters. **Adding the UTF8 BOM is probab...
[ 0.0734756588935852, 0.3711872398853302, 0.4627939462661743, -0.018330655992031097, -0.26497405767440796, -0.2450517863035202, 0.21541884541511536, 0.06229231879115105, -0.3584066927433014, -0.38235989212989807, -0.2671738862991333, 0.5996993184089661, -0.33307620882987976, -0.0738004148006...
with UTF16, so you may have to weigh your options carefully.) --- \* Except when you can't, (at least) Excel 2011 for Mac's Import Wizard does not actually always work with all encodings, regardless of what you tell it. </anecdotal-evidence> :)
[ -0.07144521176815033, -0.022727137431502342, 0.21660341322422028, -0.24317243695259094, -0.0376790352165699, -0.08488894253969193, 0.4609123468399048, 0.17410102486610413, -0.027000995352864265, -0.756492555141449, -0.36760467290878296, 0.7086334228515625, -0.49938902258872986, -0.29465499...
I am getting the following error when I put class files in subfolders of my App\_Code folder: errorCS0246: The type or namespace name 'MyClassName' could not be found (are you missing a using directive or an assembly reference?) This class is not in a namespace at all. Any ideas? You need to add codeSubDirectories to...
[ 0.07946884632110596, 0.2228226363658905, 0.11654098331928253, 0.03415942192077637, 0.15008124709129333, 0.15298159420490265, 0.501645028591156, 0.08295423537492752, -0.33331331610679626, -0.9963522553443909, -0.07336434721946716, 0.42645740509033203, -0.2829447388648987, 0.1596782058477401...
</compilation> </system.web> </configuration> ```
[ 0.27605485916137695, 0.3575059473514557, -0.10127998143434525, 0.13930697739124298, 0.16229130327701569, -0.23066836595535278, 0.028695300221443176, -0.15672613680362701, -0.37759026885032654, -0.6522740721702576, -0.48206913471221924, 0.3577381670475006, -0.246658593416214, 0.258312433958...
I have one text input and one button (see below). How can I use JavaScript to **trigger the button's click event** when the `Enter` key is pressed inside the text box? There is already a different submit button on my current page, so I can't simply make the button a submit button. And, I *only* want the `Enter` key to...
[ 0.02075152099132538, -0.09304919093847275, 0.46961086988449097, -0.23435993492603302, -0.2161627560853958, 0.08409134298563004, 0.12760357558727264, -0.4619999825954437, 0.0032156824599951506, -0.7931700348854065, -0.116962730884552, 0.7930428981781006, -0.1140911802649498, -0.007758782245...
$("#id_of_button").click(); } }); ``` ```js $("#pw").keyup(function(event) { if (event.keyCode === 13) { $("#myButton").click(); } }); $("#myButton").click(function() { alert("Button code executed."); }); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery...
[ -0.23670892417430878, -0.08386115729808807, 0.529700756072998, -0.4707637429237366, 0.08778895437717438, 0.11573675274848938, 0.3560340106487274, -0.3968420624732971, -0.1745978444814682, -0.5973499417304993, -0.6890339851379395, 0.7050614953041077, -0.30695226788520813, -0.142914474010467...
document.getElementById("myButton").click(); } }); function buttonCode() { alert("Button code executed."); } ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> Username:<input id="username" type="text"><br> Password:&nbsp;<input id="pw" type="password">...
[ -0.1731499284505844, -0.15855050086975098, 0.6680238246917725, -0.11957919597625732, -0.0931493416428566, -0.1561654806137085, 0.2008788138628006, -0.27826744318008423, -0.1504918485879898, -0.9897650480270386, -0.6020826101303101, 0.5915451049804688, -0.18222633004188538, -0.1008934304118...
I have written something that uses the following includes: ``` #include <math.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <commctrl.h> ``` This code works fine on 2 machines with the Platform SDK installed, but doesn't run (neither debug nor release versions) on clean in...
[ 0.526725172996521, 0.26992449164390564, 0.6205151081085205, -0.006381888408213854, 0.37339067459106445, -0.44997721910476685, 0.5407876372337341, -0.033656101673841476, 0.1228802278637886, -0.8400393724441528, -0.11851033568382263, 0.5209313631057739, -0.09714371711015701, 0.18668654561042...
on why it's isn't with every windows? Further more, if anyone has tips on how to debug such a thing, as my CPP is already rusty, as it seems :) Edit - What worked for me is downloading the Redistributable for Visual Studio 2008. I don't think it's a good solution - downloading a 2MB file and an install to run a simpl...
[ 0.5217210054397583, -0.06689959019422531, 0.3781283497810364, -0.04333057999610901, -0.31684568524360657, -0.1244485005736351, 0.2903628945350647, -0.15508593618869781, -0.35184672474861145, -0.7484742999076843, 0.030549976974725723, 0.9851797819137573, -0.26555365324020386, -0.09331419318...
your executable. The tool will highlight which DLL is missing. Then you can find the redistributable pack which you need to ship with your executable. If you use VS2005, most cases will be covered by <http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en> which in...
[ 0.4412855803966522, -0.2778227627277374, 0.41625115275382996, 0.2187466323375702, 0.02620365284383297, -0.25654885172843933, 0.28016215562820435, 0.25370335578918457, -0.42877110838890076, -0.9273241758346558, -0.03447103500366211, 0.47399652004241943, -0.30861184000968933, 0.1006050035357...
I have a cluster of three mongrels running under nginx, and I deploy the app using Capistrano 2.4.3. When I "cap deploy" when there is a running system, the behavior is: 1. The app is deployed. The code is successfully updated. 2. In the cap deploy output, there is this: * executing "sudo -p 'sudo password: ' mon...
[ -0.494869202375412, -0.11290311068296432, 1.0341761112213135, -0.17400312423706055, 0.2858447730541229, -0.004432228393852711, 0.30836039781570435, -0.1371622532606125, -0.58743816614151, -0.6932922601699829, -0.24798355996608734, 0.8793671727180481, -0.4722020924091339, -0.214622944593429...
\*\* [out :: myip] already started port 9098 3. I check immediately on the server and find that Mongrel is still running, and the PID files are still present for the previous three instances. 4. A short time later (less than one minute), I find that Mongrel is no longer running, the PID files are gone, and it has faile...
[ -0.1592985987663269, 0.06859471648931503, 0.6005858778953552, -0.03091205097734928, 0.048241857439279556, 0.029148085042834282, 0.7639651894569397, 0.24614761769771576, -0.5356072783470154, -0.7130967378616333, -0.04724988713860512, 0.9979414939880371, -0.2654528319835663, 0.25161179900169...
issue? EDIT: Here's the answer: mongrel\_cluster, in the "restart" task, simply does this: ``` def run stop start end ``` It doesn't do any waiting or checking to see that the process exited before invoking "start". This is [a known bug with an outstanding patch submitted](http://rubyforge.org/tracker/in...
[ 0.005129961762577295, 0.19325408339500427, 0.4306226074695587, -0.1521172821521759, 0.12818412482738495, -0.064320407807827, 0.38553500175476074, -0.16479812562465668, -0.34790098667144775, -0.40529000759124756, -0.22292087972164154, 0.9221097230911255, -0.48360440135002136, 0.187829136848...
looked at one of my deployment recipes and noticed that I had also changed the way my restart task worked. Take a look at the following message in the mongrel users group: [mongrel users discussion of restart](http://rubyforge.org/pipermail/mongrel-users/2007-October/004260.html) The following is my deploy:restart ta...
[ -0.007040052674710751, 0.02945321798324585, 0.20954617857933044, -0.06147954240441322, 0.19387979805469513, -0.07741698622703552, 0.43149706721305847, -0.03004603460431099, -0.44728773832321167, -0.6320357918739319, -0.23971809446811676, 0.9874340295791626, -0.3129623830318451, -0.11239714...
I have a test environment for a database that I want to reload with new data at the start of a testing cycle. I am not interested in rebuilding the entire database- just simply "re-setting" the data. What is the best way to remove all the data from all the tables using TSQL? Are there system stored procedures, views,...
[ -0.2731302082538605, 0.16154655814170837, 0.27581873536109924, -0.08907006680965424, -0.2940898835659027, -0.1840507984161377, 0.3390406668186188, -0.08432192355394363, -0.32538703083992004, -0.3068820834159851, 0.15535081923007965, 0.4980181157588959, -0.2672908306121826, 0.18949793279170...
Apparently we use the Scrum development methodology. Here's generally how it goes: Developers thrash around trying to accomplish their tasks. Generally the tasks take most of the sprint to complete. QA pesters Dev to release something they can test, Dev finally throws some buggy code out to QA a day or two before the...
[ 0.6096123456954956, 0.06741232424974442, -0.10929180681705475, 0.29257217049598694, -0.1721421331167221, -0.3346500098705292, 0.4777352809906006, -0.12022615224123001, -0.04479064419865608, -0.1195078194141388, 0.1485421359539032, 0.2934844493865967, -0.09777572005987167, -0.16431967914104...
supposed to work when releasable Dev tasks take up most of the sprint? Thank you everyone for your part in the discussion. As it's a pretty open-ended question, it doesn't seem like there is one "answer" - there are many good suggestions below. I'll attempt to summarize some of my "take home" points and make some cla...
[ 0.5684033632278442, -0.4295833706855774, -0.13323286175727844, 0.3912062644958496, -0.1189059466123581, -0.29073747992515564, 0.4464832842350006, -0.03175583854317665, -0.14349068701267242, -0.5422198176383972, 0.038583118468523026, 0.5772945284843445, -0.07091949880123138, -0.545779407024...
task length (e.g. sprint with 1 week tasks should be at least 4 weeks long) * Team (including QA) needs to work on becoming more accurate at estimating. * Consider doing a separate QA sprint in parallel but off-set if that works best for the team * Unit testing! My opinion is that you have an estimation problem. It see...
[ 0.11488701403141022, -0.3912198841571808, -0.23467209935188293, 0.20311756432056427, -0.3236643373966217, 0.18029718101024628, 0.6510267853736877, -0.15079423785209656, -0.5030389428138733, -0.5074301958084106, 0.12503789365291595, 0.19991251826286316, 0.3642987310886383, -0.42450252175331...
Consider QA as members of the dev team, and include them in the sprint planning and estimating more closely. * 'Releasable Dev tasks' should not take up most of the sprint. Complete working features should. Try to gather metrics about dev time vs QA time for each kind of task and use those metrics when estimating futur...
[ 0.14430823922157288, -0.36107614636421204, 0.12843464314937592, 0.315157026052475, -0.48273733258247375, 0.03848518803715706, 0.6003690958023071, -0.10366015881299973, -0.06583420187234879, -0.7504366040229797, 0.22741223871707916, 0.4109917879104614, 0.0445559062063694, -0.539520204067230...
because there are tasks that are not being considered when doing the estimation and planning for the sprint. But in the end, estimation inaccuracy is a tough project management issue that you find in agile-based or waterfall-based projects. Good luck.
[ -0.22196967899799347, -0.011907115578651428, -0.4569941461086273, 0.5529174208641052, 0.1418938785791397, -0.15727542340755463, 0.32892030477523804, 0.26503339409828186, -0.15186451375484467, -0.5791690349578857, 0.1609600931406021, 0.599470853805542, 0.2774718105792999, -0.388729155063629...
I have been learning about the basics of C# but haven't come across a good explanation of what this is: ``` var l = new List<string>(); ``` I don't know what the `<string>` is doing or if it's the `List` that is doing the magic. I have also seen objects been thrown within the `< >` tags. Can someone explain this to...
[ 0.40621697902679443, 0.038079794496297836, 0.0839134007692337, -0.24413041770458221, -0.325055867433548, -0.19420978426933289, 0.19612839818000793, -0.23800794780254364, -0.07283629477024078, -0.37240543961524963, 0.08240842819213867, 0.5325415730476379, -0.522516131401062, -0.110515549778...
store a list of System.Objects (The base type for all things .NET). So, when adding or retrieving an object from the list, The CLR would have to cast it to object, basically what really happens is this: ``` foos.Add("Test" as System.Object); string s = foos[1] as String. ``` This causes a performance penalty from t...
[ 0.19571901857852936, 0.036556366831064224, 0.5417901873588562, -0.09703236073255539, 0.0687558501958847, -0.08990925550460815, 0.38995102047920227, -0.46288737654685974, -0.28924134373664856, -0.539433479309082, 0.016739020124077797, 0.5384947061538696, -0.5272707939147949, 0.2376349419355...
error. listOfIntegers.add("test"); ``` This provides compile-time type safety, as well as avoids expensive casting operations. The way you leverage this is pretty simple, though there are some advanced edge cases. The basic concept is to make your class type agnostic by using a type placeholder, for example, if I wa...
[ 0.285580575466156, -0.17048266530036926, 0.05605829134583473, -0.11980757862329483, -0.26093897223472595, -0.07069136947393417, 0.3614760935306549, -0.5070573091506958, 0.03190762922167778, -0.556212306022644, 0.049579475075006485, 0.5491329431533813, -0.6898312568664551, 0.170399487018585...
book CLR via C#.
[ -0.2693116068840027, 0.08398479223251343, 0.8654056191444397, 0.19427837431430817, -0.04256007820367813, -0.1785823255777359, -0.08585059642791748, 0.03649858757853508, -0.2888036072254181, -0.3019792437553406, -0.6902177929878235, 0.14125284552574158, -0.08984675258398056, 0.0150933675467...
How do I go from this string: "ThisIsMyCapsDelimitedString" ...to this string: "This Is My Caps Delimited String" Fewest lines of code in VB.net is preferred but C# is also welcome. Cheers! I made this a while ago. It matches each component of a CamelCase name. ``` /([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g ``` For...
[ -0.09940537810325623, 0.09456005692481995, 0.8432900309562683, -0.033976901322603226, -0.3550388813018799, 0.023983094841241837, 0.287553071975708, -0.20460021495819092, -0.007464772555977106, -0.6619666218757629, -0.29545101523399353, 0.8014658093452454, -0.2535029351711273, 0.06279668211...
I'm looking to implement a function that retrieves a single frame from an input video, so I can use it as a thumbnail. Something along these lines should work: ``` // filename examples: "test.avi", "test.dvr-ms" // position is from 0 to 100 percent (0.0 to 1.0) // returns a bitmap byte[] GetVideoThumbnail(string fil...
[ 0.6905209422111511, -0.06638642400503159, 0.6149515509605408, 0.26278987526893616, -0.13777242600917816, -0.0982292890548706, 0.07676341384649277, -0.24969786405563354, -0.1569867879152298, -0.6124064922332764, 0.14640682935714722, 0.7144114375114441, -0.09815530478954315, 0.16233970224857...
is](http://www.mediabrowser.tv) GPL but I am happy for the code I wrote for that file to be Public Domain. Keep in mind it uses interop from the [directshow.net](http://sourceforge.net/projects/directshownet/) project so you will have to clear that portion of the code with them. This class will not work for DVR-MS fi...
[ 0.3318169116973877, -0.3421413004398346, 0.5819911956787109, -0.024754807353019714, -0.04934845492243767, -0.6295175552368164, -0.13073749840259552, -0.2696060836315155, -0.31442081928253174, -0.5306660532951355, -0.21522457897663116, 0.4222550690174103, -0.5884153842926025, 0.417950719594...
I'm an expert C# 3 / .NET 3.5 programmer looking to start doing some runtime codegen using System.Reflection.Emit.DynamicMethod. I'd love to move up to the next level by becoming intimately familiar with IL. Any pointers (pun intended)? The best way to learn it, is to write something you understand, then look at the I...
[ 0.8982799053192139, 0.16573873162269592, -0.14749746024608612, 0.07514204829931259, -0.3748893439769745, -0.1529184728860855, 0.12105563282966614, 0.15283876657485962, 0.04939007759094238, -0.7179445624351501, 0.1855594962835312, 0.6475491523742676, -0.20746619999408722, -0.240667790174484...
Rep steps: 1. create example .NET form application 2. put a TextBox on the form 3. wire a function up to the TextBox's Enter event When you run this application, the **Control.Enter** event fires when focus first goes to the TextBox. However, if you click away into another application and then click back into the tes...
[ 0.3314620554447174, -0.25668442249298096, 0.7513936161994934, 0.05011381208896637, -0.21303558349609375, 0.11798397451639175, 0.5281768441200256, -0.7541586756706238, -0.3649979829788208, -0.6170542240142822, -0.21302416920661926, 1.1651883125305176, -0.3700886368751526, -0.125674635171890...
can undock my component into a new Form without notifying me. If I try your example and click outside the control on another window, desktop, etc, I can get the Got and Lost Focus events to fire, but if you're only trying to click within a form or a control with only 1 control, these event will *never* be fired because...
[ 0.4664393961429596, -0.09437987208366394, 0.5574408173561096, 0.2524528205394745, 0.06337781250476837, -0.11550727486610413, 0.4250304102897644, -0.20297478139400482, -0.2766932249069214, -0.4224201440811157, -0.14725209772586823, 0.5319686532020569, -0.22495952248573303, 0.166958361864089...
Change Data Capture is a new feature in SQL Server 2008. From MSDN: > Change data capture provides > historical change information for a > user table by capturing both the fact > that DML changes were made and the > actual data that was changed. Changes > are captured by using an asynchronous > process that read...
[ 0.02435273490846157, -0.29855188727378845, 0.8524303436279297, 0.1228681355714798, -0.12104588001966476, -0.09316091239452362, -0.1182776540517807, -0.24356040358543396, -0.2836654782295227, -0.5168542265892029, 0.09120429307222366, 0.5083299279212952, -0.4418734610080719, 0.03152832761406...
the business requirements. * Oracle has had something called [Workspace Manager](http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14253/long_intro.htm#ADWSM010) for a long time (8i days) that allows you to version-enable a table and track changes over time. This can be a bit heavyweight, though, because it is ...
[ -0.1673281341791153, 0.05514451861381531, 0.3136289119720459, -0.17969250679016113, -0.43166831135749817, -0.25698840618133545, 0.30711033940315247, -0.03489892557263374, -0.5143880248069763, -0.387567400932312, -0.21664252877235413, 0.6876386404037476, -0.09366655349731445, 0.169299542903...
historical data and automatically takes care of purging the data after a specified data retention period. * Oracle has a LogMiner technology that mines the redo logs and presents transactions to consumers. There are a number of technologies that are then built on top of LogMiner including [Change Data Capture](http://d...
[ 0.32675206661224365, -0.08823566883802414, 0.35165056586265564, 0.4759905934333801, 0.2076820433139801, 0.0571184903383255, -0.24876736104488373, -0.0832848772406578, -0.49561625719070435, -0.5310068130493164, -0.19885708391666412, 0.44432365894317627, -0.15676642954349518, 0.2228534966707...
I want to use XMLHttpRequest in JavaScript to POST a form that includes a file type input element so that I can avoid page refresh and get useful XML back. I can submit the form without page refresh, using JavaScript to set the target attribute on the form to an iframe for MSIE or an object for Mozilla, but this has t...
[ 0.2827877700328827, 0.13914036750793457, 0.5198564529418945, 0.03407646343111992, -0.4847699701786041, -0.3063020706176758, 0.30120134353637695, -0.17213276028633118, 0.07197435945272446, -0.812115490436554, -0.09244342148303986, 0.582743227481842, -0.2417113482952118, -0.05940182507038116...
X Leopard. Besides, XMLHttpRequest would make for prettier response code because the returned data could be XML, not confined to XHTML as is the case with iframe. Submitting the form results in HTTP that looks like: ``` Content-Type: multipart/form-data;boundary=<boundary string> Content-Length: <length> --<boundary...
[ 0.10093898326158524, -0.03535303846001625, 0.6634761691093445, -0.1652429699897766, -0.5825520157814026, -0.12128899246454239, 0.40955832600593567, -0.48266664147377014, 0.054595764726400375, -0.6401061415672302, -0.2810092270374298, 0.28858911991119385, -0.6800667643547058, -0.17265395820...
and Safari 5+) you can use the [FormData](http://hacks.mozilla.org/2010/07/firefox-4-formdata-and-the-new-file-url-object/) interface that helps to construct such requests. The `send` method is good for text content but if you want to send binary data such as images, you can do it with the help of the `sendAsBinary` me...
[ 0.43753528594970703, -0.10981784760951996, 0.5776829719543457, -0.18167276680469513, -0.44750773906707764, -0.3624456226825714, 0.3624960780143738, -0.2443828284740448, -0.3256778419017792, -0.5161124467849731, -0.3111293315887451, 0.49491509795188904, -0.6031584739685059, -0.0481939949095...
What is the difference between a BitmapFrame and BitmapImage in WPF? Where would you use each (ie. why would you use a BitmapFrame rather than a BitmapImage?) You should stick to using the abstract class [BitmapSource](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource.aspx) if you need t...
[ 0.4352661073207855, -0.3224871754646301, 0.4664100408554077, 0.15278078615665436, -0.32029294967651367, -0.13413052260875702, -0.15798726677894592, -0.412937194108963, -0.5190759301185608, -0.6537056565284729, 0.1436852663755417, 0.2783767879009247, -0.38259702920913696, -0.129219114780426...
inherit from BitmapSource: * BitmapFrame * BitmapImage * CachedBitmap * ColorConvertedBitmap * CroppedBitmap * FormatConvertedBitmap * RenderTargetBitmap * TransformedBitmap * WriteableBitmap You can get a BitmapSource from a URI by constructing a BitmapImage object: ``` Uri uri = ...; BitmapSource bmp = new BitmapI...
[ 0.19673176109790802, -0.31659388542175293, 0.29971492290496826, 0.27334558963775635, 0.07028593868017197, -0.2474987953901291, 0.1653626561164856, -0.7166650295257568, -0.19146886467933655, -0.49949535727500916, -0.06683938950300217, 0.5705425143241882, -0.3545008599758148, 0.1585296839475...
Is there any one website which contains many good C# screencasts? I like the [channel 9 screencasts](http://channel9.msdn.com/tags/CSharp/) tagged C#..
[ 0.6150727868080139, 0.20717236399650574, 0.2999318242073059, 0.349354088306427, -0.18233074247837067, -0.38674482703208923, -0.24666477739810944, 0.5841736197471619, -0.5446462631225586, -0.4696885049343109, -0.051052194088697433, 0.4776296317577362, -0.14841099083423615, -0.05610317364335...
We have a series of drop down controls that determine the sort order of columns. The problem we are having is when the user selects a column as the 2nd column the other dropdown lists need to have their values changed so that there is only one "2nd". 1. Column A [1] 2. Column B [2] 3. Column C [3] 4. Column D [4] 5. C...
[ -0.21479837596416473, -0.031247075647115707, 0.6370130777359009, 0.008635318838059902, -0.06714602559804916, 0.1275421679019928, 0.1077193021774292, -0.21290086209774017, -0.4207225441932678, -0.47873929142951965, -0.18397730588912964, 0.19919127225875854, -0.4019870162010193, -0.122613288...
do this on the client side with javascript. Look at Javascript toolkits like [Scriptaculous](http://script.aculo.us/) for client side reordering. You add your elements as "[Sortables](http://github.com/madrobby/scriptaculous/wikis/sortable)" and code your own callbacks to execute when the items are dragged, then dropp...
[ 0.25247400999069214, -0.3235599398612976, 0.08225274085998535, 0.20331302285194397, -0.4159095883369446, -0.16059871017932892, -0.04933517053723335, -0.3130510449409485, -0.45504114031791687, -0.6189789175987244, -0.19564694166183472, 0.32599496841430664, -0.2441626638174057, -0.3018063604...
I tried to set innerHTML on an element in firefox and it worked fine, tried it in IE and got unexpected errors with no obvious reason why. For example if you try and set the innerHTML of a table to " hi from stu " it will fail, because the table must be followed by a sequence. "Apparently firefox isn't this picky" ==>...
[ 0.1966673880815506, 0.11229782551527023, 0.44128933548927307, -0.22022885084152222, -0.4118157625198364, -0.08475226908922195, 0.29079121351242065, -0.07406110316514969, -0.005847373511642218, -0.3531864285469055, -0.06234695762395859, 0.46907109022140503, -0.530144453048706, 0.09079048782...
even an image ,-(
[ 0.021517140790820122, 0.16467314958572388, 0.43461334705352783, 0.28534919023513794, -0.013498162850737572, -0.03286527097225189, 0.2093898504972458, 0.13320410251617432, -0.3266896605491638, -0.3862920105457306, -0.006822983734309673, 0.11942560970783234, -0.24040722846984863, 0.019269859...
In JavaScript, you can do this: ``` var a = null; var b = "I'm a value"; var c = null; var result = a || b || c; ``` And 'result' will get the value of 'b' because JavaScript short-circuits the 'or' operator. I want a one-line idiom to do this in ColdFusion and the best I can come up with is: ``` <cfif LEN(c) GT 0...
[ 0.05025286227464676, 0.11216654628515244, -0.062167078256607056, -0.2900991439819336, -0.47446057200431824, -0.15175767242908478, 0.4145386815071106, -0.25920337438583374, -0.04907829314470291, -0.4224090874195099, -0.09237424284219742, 0.3434785306453705, -0.6377379298210144, -0.211637526...
values, you can do this: ``` <cfset result = ListFirst( "#a#,#b#,#c#" )/> ``` (Which works because the standard list functions ignore empty elements.)
[ 0.20241138339042664, 0.11453213542699814, 0.3220134973526001, -0.10896079987287521, 0.06118198484182358, -0.11391215026378632, 0.050818298012018204, -0.3768291771411896, -0.32761895656585693, -0.12195776402950287, 0.08663403987884521, 0.5666507482528687, -0.4418032765388489, -0.07384692132...
I need to do a comparaison between an object and NULL. When the object is not NULL I fill it with some data. Here is the code : ``` if (region != null) { .... } ``` This is working but when looping and looping sometime the region object is NOT null (I can see data inside it in debug mode). In step-by-step when...
[ -0.23956143856048584, -0.20963971316814423, 0.3587123453617096, -0.04672818258404732, 0.27768808603286743, -0.22338669002056122, 0.4212028682231903, -0.09017317742109299, -0.13492926955223083, -0.7771281003952026, -0.056578099727630615, 0.1901305466890335, -0.01855924353003502, 0.602100133...
that the object was == and != overloaded: ``` public static bool operator ==(Region r1, Region r2) { if (object.ReferenceEquals(r1, null)) { return false; } if (object.ReferenceEquals(r2, null)) { return false;
[ -0.29478347301483154, -0.3668830692768097, 0.3977983295917511, -0.14233845472335815, 0.15637809038162231, -0.023573383688926697, 0.26340147852897644, -0.2542952001094818, 0.023326149210333824, -0.37551596760749817, -0.5176745653152466, 0.48323965072631836, -0.389068603515625, 0.57351565361...
} return (r1.Cmr.CompareTo(r2.Cmr) == 0 && r1.Id == r2.Id); } public static bool operator !=(Region r1, Region r2) { if (object.ReferenceEquals(r1, null)) { return false; } if (object.ReferenceEquals(r2, null)) {
[ -0.2919376492500305, -0.053760726004838943, 0.629662036895752, -0.040121033787727356, 0.032730601727962494, 0.16792424023151398, 0.40750566124916077, -0.5404816269874573, -0.01710994727909565, -0.49374905228614807, -0.3781311810016632, 0.5368684530258179, -0.14891231060028076, 0.6142591238...
return false; } return (r1.Cmr.CompareTo(r2.Cmr) != 0 || r1.Id != r2.Id); } ``` Is the == and/or != operator overloaded for the region object's class? Now that you've posted the code for the overloads: The overloads should probably look like the following (code taken from postings made by [Jon Sk...
[ -0.21765634417533875, 0.15841951966285706, 0.22204722464084625, -0.10859200358390808, 0.01453325990587473, -0.022297080606222153, 0.28311464190483093, -0.2339186668395996, -0.4251193404197693, -0.3540436625480652, -0.4266975522041321, 0.44711577892303467, -0.32224953174591064, 0.4284978806...
object identity return true; } if ((object)r1 == null || (object)r2 == null) { return false; } return (r1.Cmr.CompareTo(r2.Cmr) == 0 && r1.Id == r2.Id); } public static bool operator !=(Region r1, Region r2) { return !(r1 == r2); } ```
[ -0.37750244140625, -0.09808775037527084, 0.5358823537826538, -0.04118674248456955, 0.13780400156974792, -0.14601869881153107, 0.2632350027561188, -0.3546636700630188, -0.05439468100667, -0.3765254020690918, -0.49698033928871155, 0.698419451713562, -0.22758133709430695, 0.46828895807266235,...
Is it possible to cancel out of a long running process in VB6.0 without using DoEvents? For example: ``` for i = 1 to someVeryHighNumber ' Do some work here ' ... if cancel then exit for end if next Sub btnCancel_Click() cancel = true End Sub ``` I assume I need a "DoEvents" before the...
[ 0.24828428030014038, -0.08946879208087921, 0.45051825046539307, -0.09632810205221176, 0.38403600454330444, -0.38701486587524414, 0.2662898898124695, -0.11031918972730637, -0.3471039831638336, -0.19348974525928497, -0.04335382580757141, 0.85091632604599, -0.1438952088356018, 0.2973642945289...
and find that slows down processing too much, try calling the Windows API function `GetQueueStatus` (which is much faster than DoEvents) to quickly determine if it's even necessary to call DoEvents. `GetQueueStatus` tells you if there are any events to process. ``` ' at the top: Declare Function GetQueueStatus Lib "us...
[ -0.016700003296136856, 0.056222811341285706, 0.5273252129554749, -0.1908421814441681, 0.3850081264972687, -0.201254740357399, 0.3435346782207489, -0.15190836787223816, -0.15331430733203888, -0.7796747088432312, -0.13225823640823364, 0.930448591709137, -0.2683158814907074, 0.083988711237907...
I want a function like GetCurrentThread which returns a TThread object of the current executing thread. I know there is a Win32 API call GetCurrentThread, but it returns the thread Id. If there is a possibility to get TThread object from that ID that's also fine. The latest version of Delphi, Delphi 2009, has a Current...
[ -0.024090943858027458, 0.046641621738672256, 0.5731422305107117, -0.07789356261491776, -0.1082257404923439, -0.23562100529670715, 0.03810810297727585, 0.009169593453407288, -0.038752228021621704, -0.7452653646469116, 0.03208446130156517, 0.9050416946411133, -0.271446168422699, 0.0527475588...
wrapper thread around the thread handle.
[ 0.1681283861398697, -0.3060872554779053, 0.4536195695400238, 0.42213526368141174, -0.20420771837234497, 0.1553787738084793, 0.022698909044265747, -0.39639925956726074, -0.1400100737810135, -0.2041129171848297, 0.048247382044792175, -0.12366883456707001, -0.18380263447761536, 0.442972838878...
I recently installed the Eclipse Metrics Plugin and have exported the data for one of our projects. It's all very good having these nice graphs but I'd really like to understand more in depth what they all mean. The definitions of the metrics only go so far to telling you what it really means. Does anyone know of any...
[ 0.867382287979126, 0.04097815603017807, 0.05365687236189842, 0.4844777286052704, -0.26950061321258545, 0.0789400115609169, 0.05319872871041298, 0.20655657351016998, -0.3004906177520752, -0.710458517074585, 0.34778672456741333, 0.42696860432624817, 0.09193956851959229, -0.03549440577626228,...
or lines per method. I don't think that code metrics (sometimes referred to as [software metrics](http://en.wikipedia.org/wiki/Software_metric)) provide valuable data in terms of where you can improve. With code metrics it is sort of nice to see how much code you write in an hour etc., but beyond they tell you nada ab...
[ 0.581173300743103, 0.055216073989868164, -0.06712258607149124, 0.4061020016670227, -0.22741785645484924, -0.01932644471526146, 0.4329450726509094, 0.023084934800863266, -0.16013596951961517, -0.7484859228134155, 0.17024393379688263, 0.42649045586586, 0.36441749334335327, -0.030843989923596...
junior programmer whipping out lots of *crap code* looks good. Another example for using metrics is the very popular [Ohloh](http://en.wikipedia.org/wiki/Ohloh). They employ metrics to put a price tag on an opensource project (using number of lines, etc.), which in itself is an attempt which is *flawed as hell* - as y...
[ 0.7056345343589783, 0.15281623601913452, -0.023430394008755684, 0.4266573488712311, -0.2829761207103729, -0.5502905249595642, 0.24031120538711548, 0.3321104347705841, -0.2449188083410263, -0.22388814389705658, 0.07821895182132721, 0.24453482031822205, 0.45295557379722595, -0.06294063478708...
to help you improve would be continuous integration and adhering to some sort of standard when it comes to code, documentation and so on. That is how you can improve. Metrics are just eye candy for meetings - "look we coded that much already". **Update** Ok, well my point being efferent coupling or even cyclomatic co...
[ 0.3719460070133209, -0.1430298537015915, -0.1188352182507515, 0.28173828125, -0.2036936730146408, -0.17771516740322113, 0.6052060723304749, 0.10740229487419128, -0.21827690303325653, -0.9300107359886169, 0.22623984515666962, 0.38479575514793396, 0.005514578893780708, 0.10034404695034027, ...
are more applicable in most cases. Sometimes it's as simple as that. I give you that much that since cyclomatic complexity is graphed into a flow chart, it can be an eye opener. But again, use carefully.
[ 0.1893157660961151, 0.07480467110872269, 0.20426952838897705, 0.39606064558029175, 0.020096249878406525, 0.0019106609979644418, -0.1162656769156456, 0.04693730175495148, -0.3749212920665741, -0.8436077833175659, -0.031102176755666733, 0.9282559156417847, -0.08701050281524658, -0.0180987920...
What references offer a good summary/tutorial for using RDF/OWL? There seem to be enough tools (Protege, Topbraid, Jena, etc.) that knowing the syntax of the markup languages is not necessary, but knowing the concepts is, of course, still critical. I'm working through the w3c documents (particularly the [RDF Primer](...
[ 0.07752598077058792, 0.16445879638195038, -0.15027034282684326, 0.02340356819331646, -0.28099730610847473, -0.029918743297457695, 0.10620136559009552, 0.20823657512664795, -0.04902803897857666, -0.5408194065093994, 0.14063909649848938, 0.3772270679473877, -0.030699195340275764, -0.23288147...
I understand that server-side validation is an absolute must to prevent malicious users (or simply users who choose to disable javascript) from bypassing client-side validation. But that's mainly to protect your application, not to provide value for those who are running browsers with javascript disabled. Is it reasona...
[ 0.6288231015205383, 0.37515318393707275, 0.2944291830062866, -0.014101052656769753, -0.07136111706495285, -0.6046069860458374, 0.5336157083511353, -0.05730893835425377, 0.007864701561629772, -0.12036599218845367, 0.06640598177909851, 0.4179012179374695, -0.09184732288122177, -0.12027031183...
might not have JavaScript enabled. If you're going for a general audience, JavaScript is probably on.
[ 0.4476805031299591, 0.08524464070796967, -0.0847245380282402, 0.26986339688301086, -0.08273762464523315, -0.3691089451313019, 0.2997087240219116, 0.5894522070884705, -0.34543511271476746, -0.6091611385345459, 0.00596734369173646, 0.5762546062469482, -0.0802759900689125, -0.1864441931247711...
I'm seeing an ambiguous error in Firebug. I don't think it's particularly related to the script I'm writing, however I don't have enough details to be able to determine that from this one error alone. Has anyone seen something similar and have a suggestion? error: > [Exception... "Component is not available" nsresult...
[ -0.2929050326347351, 0.04543985053896904, 0.33519497513771057, -0.08664921671152115, 0.25332537293434143, -0.16896295547485352, 0.6408767700195312, -0.09511438012123108, -0.15856045484542847, -0.7118205428123474, -0.34892165660858154, 0.49660587310791016, -0.44653210043907166, 0.2122779786...
the saving of the FireFox state: According to: <http://blogs.unbolt.net/index.php/brinley/2008/04/26/0x80040111_nssessionstore>, it is caused by a corrupted session state. In short, I don't think there is anything you can do to avoid it (it is a bug in FireFox or perhaps a plugin). However, that link claims you can j...
[ -0.1364545375108719, 0.23414769768714905, 0.176222026348114, -0.06491398811340332, 0.06939021497964859, -0.20097677409648895, 0.7424842715263367, 0.3604886531829834, -0.39835232496261597, -0.44134432077407837, -0.09228302538394928, 0.5563657879829407, -0.33862921595573425, 0.26807621121406...
I've used all three of these when making local programmatic connections to databases. Is there any real difference between them? The final result is the same. The difference is: * 'localhost' resolves at the TCP/IP level and is equivalent to the IP address 127.0.0.1 * Depending on the application "(local)" could be j...
[ -0.33053058385849, -0.10972554236650467, 0.47652173042297363, 0.07602755725383759, 0.2234782576560974, 0.1522577702999115, 0.13446414470672607, 0.14204108715057373, -0.22346961498260498, -1.0139507055282593, 0.10164783895015717, 0.6175757050514221, 0.022865885868668556, 0.38959160447120667...
features if you use either one of them.
[ 0.3134985566139221, -0.05124060437083244, -0.04902762919664383, 0.060395777225494385, -0.08082706481218338, 0.3511328101158142, 0.23750612139701843, 0.41899797320365906, -0.41186803579330444, -0.8024791479110718, 0.010601461865007877, 0.7582592368125916, 0.2027222067117691, -0.090565308928...
I have a requirement to implement an "Unsaved Changes" prompt in an ASP .Net application. If a user modifies controls on a web form, and attempts to navigate away before saving, a prompt should appear warning them that they have unsaved changes, and give them the option to cancel and stay on the current page. The promp...
[ 0.2680007219314575, -0.01946602761745453, 0.4260524809360504, 0.03704752400517464, 0.20198772847652435, -0.20306292176246643, 0.1519446074962616, -0.05282013490796089, -0.3523406386375427, -0.5825312733650208, -0.24185307323932648, 0.46761998534202576, -0.26855096220970154, -0.154830932617...
Ideally I'd like something that can easily be reused across multiple pages with minimal changes. Using jQuery: ``` var _isDirty = false; $("input[type='text']").change(function(){ _isDirty = true; }); // replicate for other input types and selects ``` Combine with `onunload`/`onbeforeunload` methods as required. ...
[ 0.09155171364545822, -0.001944402582012117, 0.39847999811172485, -0.22343933582305908, 0.07061713933944702, 0.19065921008586884, 0.012143976055085659, -0.3095129132270813, 0.0727066695690155, -0.7386816143989563, -0.015876995399594307, 0.5384235978126526, -0.3805778920650482, 0.09578691422...
What is SafeHandle? how does it differ from IntPtr? When should I use one? What are its advantages? I think [MSDN](http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.safehandle.aspx) is pretty clear in definition: > The SafeHandle class provides critical > finalization of handle resources, > prev...
[ -0.36719149351119995, -0.10044227540493011, 0.4387708008289337, 0.13816794753074646, -0.26941028237342834, -0.2932109236717224, -0.17412978410720825, -0.4453693926334381, -0.146114781498909, -0.5602302551269531, -0.008734125643968582, 0.28729692101478577, -0.24654676020145416, 0.0434115640...
closed and is guaranteed to run, > even during unexpected AppDomain > unloads when a host may not trust the > consistency of the state of the > AppDomain. > > > For more information about the > benefits of using a SafeHandle, see > Safe Handles and Critical > Finalization. > > > This class is abstract becau...
[ -0.2247607260942459, 0.010250331833958626, 0.4804946184158325, 0.3368890583515167, -0.10148756951093674, -0.14150190353393555, 0.26253828406333923, -0.08584839105606079, -0.37117865681648254, -0.5688327550888062, -0.35959693789482117, 0.2345782369375229, -0.6477678418159485, 0.339899808168...
for > different handle types because some > use CloseHandle, while others use more > specific methods such as > UnmapViewOfFile or FindClose. For this > reason, you must create a derived > class of SafeHandle for each operating > system handle type; such as > MySafeRegistryHandle, > MySafeFileHandle, and > My...
[ -0.03534558415412903, -0.09726609289646149, 0.39414313435554504, 0.3296511471271515, -0.05435147136449814, -0.17593815922737122, 0.13390016555786133, -0.21576960384845734, -0.10212744772434235, -0.8975939154624939, -0.2354065626859665, 0.27185800671577454, -0.09850047528743744, 0.125916838...
When you double click on a class (in 'solution explorer')... if that class happens to be an .asmx.cs webservice... then you get this... > To add components to your class, drag > them from the Toolbox and use > the Properties window to set their > properties. To create methods and > events for your class, click her...
[ 0.4118055999279022, 0.0062511689029634, 0.009472427889704704, 0.2566668689250946, -0.15218043327331543, -0.16593950986862183, 0.21426373720169067, 0.09142299741506577, -0.12917901575565338, -1.0365922451019287, 0.28538116812705994, 0.5423606634140015, -0.06419061124324799, 0.34375187754631...
code view by default? You can set the default editor for any given file type (.cs, .xml, .xsd, etc). To change the default editor for a given type: 1. Right-click a file of that type in your project, and select "Open With..." 2. Select your preferred editor. You may want "CSharp Editor". 3. Click "Set as Default". I ...
[ 0.5870367288589478, -0.0806775763630867, 0.15855368971824646, 0.09517322480678558, -0.4322854280471802, -0.05006176233291626, 0.39335331320762634, -0.01349209900945425, -0.06176257133483887, -0.8098553419113159, -0.2149411290884018, 0.7004815936088562, -0.4199542999267578, -0.1313323676586...
I am trying to access Outlook 2007 from C#. I have installed the PIA msi after following the directions found on msdn. After a successful install nothing shows up in Visual Studio's references under the .net tab. Office interaction is available through COM objects found on the 'COM' tab of the 'Add Reference' dialog wi...
[ 0.41857847571372986, 0.18553124368190765, 0.40451112389564514, -0.16727514564990997, 0.09309723228216171, 0.22699028253555298, 0.14874063432216644, 0.45512518286705017, 0.1311464160680771, -0.6463649272918701, 0.1505233496427536, 0.4805300235748291, -0.1567791998386383, 0.02456282638013363...
What is a realistic use for VB.Net's MyClass keyword? I understand the [technical usage of MyClass](http://msdn.microsoft.com/en-us/library/b3b35kyk.aspx); I don't understand the practical usage of it in the real world. Using MyClass only makes sense if you have any virtual (overridable) members. But it also means th...
[ 0.06599855422973633, -0.07538493722677231, -0.1401376724243164, 0.20307102799415588, -0.00528857484459877, -0.032431453466415405, 0.32195958495140076, 0.0567670539021492, 0.08070512861013412, -0.34548458456993103, -0.03386043384671211, 0.4556829035282135, -0.29438304901123047, 0.1361157745...
virtual semantics (`callvirt`), you're indicating that you want to use the most derived variation. In cases where you wish to omit the derived variations you utilize `MyClass` (`call`). While you've stated you understand the basic concept, I figured it might help to describe it from a functional viewpoint, rather than ...
[ 0.05822630971670151, -0.3193977177143097, 0.32893651723861694, 0.11222893744707108, -0.004658168647438288, -0.14441901445388794, 0.2913431227207184, 0.3044540584087372, 0.05945168063044548, -0.3936237096786499, -0.3167591691017151, 0.8631371259689331, -0.3628375828266144, 0.066786020994186...
must rely on a specific piece of functionality within your object's hierarchy, and can't rely on the inheritor to call your variation through a base invocation in their implementation. It could also rely on you as a designer deciding that it's the only alternative since you overrode the functionality further in the obj...
[ 0.3159957528114319, 0.18898357450962067, 0.2378416210412979, 0.023778852075338364, 0.020956069231033325, -0.0064043826423585415, 0.2628585696220398, -0.4922496974468231, 0.006662385072559118, -0.36844706535339355, -0.06294748187065125, 0.5840256214141846, -0.2597411870956421, 0.28904661536...
corner cases you could separate the method into a private variation the current level in the hierarchy invokes, and just refer to that private implementation when necessary. It's my personal view that utilizing the segmentation approach is the ideal means to an end since it's explicit about your design choice, and is e...
[ 0.005356782115995884, -0.13215525448322296, 0.14654436707496643, 0.23363225162029266, -0.01911330409348011, 0.09198374301195145, -0.1820840686559677, 0.04962265491485596, -0.0067200493067502975, -0.6422122120857239, -0.06881249696016312, 0.37810495495796204, -0.14905616641044617, -0.086323...
I need to create a photo gallery service that is managed by users. I've done this a million times using just Asp.net but I was wondering if there are any special considerations that I need to make when using Asp.net MVC. Basically, I will be storing the actual images on the filesystem and storing the locations in a da...
[ 0.8493764996528625, 0.09687023609876633, 0.3132827877998352, 0.12108711153268814, -0.11446317285299301, -0.23227086663246155, 0.1299286186695099, 0.02532406896352768, -0.3396911919116974, -0.6358457207679749, 0.14220260083675385, 0.6322740316390991, -0.1749790757894516, 0.32227256894111633...
is not a user of the site. In the past I did this using some generic handlers which authenticated that the request is allowed to access the image resource. Can I use the same pattern but using Controllers instead? I was thinking of perhaps creating a Photo Controller and just a simple Get action. Would this require th...
[ 0.5003759860992432, -0.22218334674835205, 0.2787097692489624, 0.3197624385356903, -0.379852831363678, -0.39643019437789917, 0.28950244188308716, -0.16092507541179657, -0.17323577404022217, -0.5690200328826904, 0.20345863699913025, 0.48175397515296936, -0.29938066005706787, 0.19998483359813...
exactly what I needed following it <https://blog.maartenballiauw.be/post/2008/05/13/aspnet-mvc-custom-actionresult.html>
[ -0.1460064798593521, -0.5203304886817932, 0.5664193034172058, -0.21379786729812622, -0.28263774514198303, -0.008384051732718945, 0.5268676280975342, -0.1896640807390213, -0.582777738571167, -0.01644955761730671, 0.036397650837898254, 0.5423312783241272, 0.020559344440698624, -0.32254001498...
During software development, there may be bugs in the codebase which are known issues. These bugs will cause the regression/unit tests to fail, if the tests have been written well. There is constant debate in our teams about how failing tests should be managed: 1. Comment out failing test cases with a REVISIT or TODO...
[ 0.3199361562728882, 0.27924638986587524, 0.05695487558841705, 0.18013714253902435, 0.23416614532470703, -0.14979875087738037, 0.4950822591781616, -0.06360480934381485, 0.022865839302539825, -0.726388156414032, -0.3301098048686981, 0.7041959166526794, -0.006199318449944258, -0.0216994099318...
forget to fix the defects, as the script failures will constantly reminding you that a defect is present. * **Disadvantage**: Difficult to detect when a *new* defect is introduced, due to failure noise. I'd like to explore what the best practices are in this regard. Personally, I think a tri-state solution is the bes...
[ 0.3237972557544708, 0.2317470908164978, 0.10348847508430481, 0.3463890254497528, 0.04359256476163864, 0.06387249380350113, 0.5811102986335754, -0.03973441570997238, -0.38115644454956055, -0.6791654825210571, 0.09389539062976837, 0.5146941542625427, 0.24208958446979523, -0.06905866414308548...
This ensures you still see the failure result at the end of the test, but immediately know if there is a *new* failure which you weren't expecting. This appears to take the best parts of the 2 proposals above. Does anyone have any best practices for managing this? I would leave your test cases in. In my experience, co...
[ 0.48672738671302795, 0.5046597123146057, -0.13897493481636047, 0.09463117271661758, -0.11284077167510986, -0.27559351921081543, 0.3180218040943146, 0.05239136889576912, -0.12612934410572052, -0.5784741044044495, -0.07206308841705322, 0.9759411215782166, 0.20141124725341797, -0.056244820356...
you are concentrating on fixing other parts of the code. Leave the tests in perhaps with your "tri-state" solution. Howeveer, I would strongly encourage fixing those cases ASAP. My problem with constant reminders is that after people see them, they tend to gloss over them and say "oh yeah, we get those errors all the ...
[ 0.4048997163772583, 0.2552545666694641, -0.3051498532295227, 0.32494473457336426, 0.15484294295310974, 0.015636280179023743, 0.10688849538564682, 0.0036637834273278713, -0.41205236315727234, -0.4146319329738617, -0.058960698544979095, 0.3907991647720337, -0.077815480530262, 0.0694584399461...
come to find out that QA started saying things like "oh yeah, we get that assert all the time and we were told it was skippable" and bugs didn't get reported. I guess what I'm suggesting is that there is another alternative, which is to fix the bugs that your test cases find immediately. There may be practical reasons...
[ 0.6438695192337036, -0.07747062295675278, -0.19843605160713196, 0.2600620985031128, -0.07309813052415848, -0.3694155514240265, 0.1734183430671692, 0.437971293926239, -0.23906880617141724, -0.16522155702114105, 0.4403332471847534, 0.5358384847640991, -0.054036714136600494, 0.118711650371551...
I have an application that launches a webpage in the "current" browser when the user selects it. This part of my app works fine in the Windows version but I can't figure out how to do this in Linux build. Right now the Linux version is hardcoded for Firefox in a specific directory and runs a new instance of it each ti...
[ 0.3539096713066101, 0.3352392911911011, 0.3601956367492676, -0.09449580311775208, -0.09415445476770401, -0.32340216636657715, 0.19001030921936035, 0.1944310963153839, -0.2791198194026947, -0.804694414138794, -0.12432315945625305, 0.46485334634780884, -0.35474297404289246, 0.339772045612335...
I use: ``` ShellExecute(NULL,"open",filename,NULL,NULL,SW_SHOWNORMAL); ``` For Linux I currently use: ``` pid_t pid; char *args[2]; char *prog=0; char firefox[]={"/usr/bin/firefox"}; if(strstri(filename,".html")) prog=firefox; if(prog) { args[0]=(char *)filename; args[1]=0; pid=fork(); if(!pi...
[ -0.056684333831071854, 0.24966652691364288, 0.6951174736022949, -0.49018317461013794, 0.059586066752672195, -0.033828459680080414, 0.17310677468776703, 0.02388353832066059, -0.15488658845424652, -0.6493826508522034, -0.3104168772697449, 0.7121193408966064, -0.6151512861251831, 0.2764356434...
I would like to know how to loop through each line in a text file using a Windows batch file and process each line of text in succession. I needed to process the entire line as a whole. Here is what I found to work. ``` for /F "tokens=*" %%A in (myfile.txt) do [process] %%A ``` The tokens keyword with an asterisk (\...
[ 0.459083616733551, -0.11263059824705124, 0.13884490728378296, 0.019565656781196594, 0.033780328929424286, 0.3434061110019684, 0.19277235865592957, -0.06815926730632782, -0.3313911259174347, -0.5896483659744263, -0.18867388367652893, 0.0945434644818306, -0.20571956038475037, 0.0372691974043...
path, you need to use `usebackq`. For example. ``` for /F "usebackq tokens=*" %%A in ("my file.txt") do [process] %%A ```
[ 0.0008739106706343591, -0.2349374145269394, 0.36747488379478455, 0.03450779244303703, 0.13417713344097137, 0.011255277320742607, 0.17909139394760132, -0.09679068624973297, 0.07784853130578995, -0.7282434701919556, -0.0608215257525444, 0.5973399877548218, -0.0831495076417923, -0.12929150462...
I have the following markup, and I want to make the `All` radio button checked. ``` <ul> <li><input type="radio" value="All" name="Foo"/>All</li> <li><input type="radio" value="New" name="Foo"/>New</li> <li><input type="radio" value="Removed" name="Foo"/>Removed</li> <li><input type="radio" value="Upda...
[ 0.3364214301109314, 0.39521485567092896, 0.5412182211875916, -0.2696712017059326, -0.01869906112551689, -0.31591495871543884, 0.18428854644298553, -0.7468758225440979, 0.13994991779327393, -0.6906482577323914, 0.0023998478427529335, 0.957033634185791, -0.4570242166519165, -0.04037081450223...
$("a").click(function(event){ $("input[name='Foo'][value='All']").attr('checked','checked'); event.preventDefault(); }); }); </script> </head> <body> <ul> <li><input type="radio" value="All" name="Foo" />All</li> <li><input type="radio" value="New" name="Fo...
[ 0.14629718661308289, 0.12189161777496338, 0.4839746356010437, -0.312915176153183, 0.006831747945398092, -0.06931772828102112, 0.3717395067214966, -0.6307826638221741, -0.054296620190143585, -0.3530580699443817, -0.6068840026855469, 1.0094050168991089, -0.7556491494178772, 0.027609713375568...
name="Foo" />Updated</li> </ul> <a href="" >Click here</a> </body> </html> ``` When you click on the link, the desired radio button is selected. The important line is the one setting the `checked` attribute.
[ 0.24395807087421417, 0.16503535211086273, 0.7632103562355042, -0.11525879800319672, 0.13301141560077667, -0.40305668115615845, 0.14199098944664001, -0.2869344651699066, 0.1367243081331253, -0.30825749039649963, -0.32493892312049866, 0.9131510853767395, -0.4022938907146454, -0.0102085461840...