text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I am automating my build process using TeamFoundation and I need to choose what projects to compile according to the .proj file from the build. Here is the full scenario: I have a .proj file which uses a .sln file in order to compile a solution which contains 2 websites. The .sln file is configured to compile both web...
[ 0.35433781147003174, 0.19555824995040894, 0.29305994510650635, -0.1260032057762146, -0.2081899344921112, -0.1446933150291443, 0.43858498334884644, -0.15295998752117157, -0.1645943522453308, -0.8040520548820496, -0.0365694984793663, 0.38341742753982544, -0.2037281095981598, -0.1240293979644...
unmark one of the websites to compile? Since it is an automated process, I can't change the .sln manually every time I want to compile only one website. Here is a [Delphi internal error guide](https://web.archive.org/web/20131023045517/http://www.stevetrefethen.com/wiki/Default.aspx?Page=InternalErrors&AspxAutoDetectCo...
[ 0.020883366465568542, 0.10205818712711334, 0.4909735321998596, 0.06761843711137772, 0.00544827850535512, -0.26206961274147034, 0.39275485277175903, -0.19960853457450867, -0.023690521717071533, -0.561658501625061, 0.11490467190742493, 0.8611833453178406, 0.003954605665057898, 0.186116054654...
version dcc32 crashing (IDE compiled fine) when I increased a variable with Inc and using addition instead of Inc solved the problem...
[ -0.3031315803527832, -0.24433155357837677, 0.30401548743247986, 0.19965142011642456, -0.19811365008354187, -0.07586360722780228, 0.39539414644241333, -0.14572763442993164, -0.08842500299215317, -0.03462819382548332, 0.18189425766468048, 0.7540408372879028, -0.6464649438858032, -0.054620210...
i was wondering how to trace a certain object in VC++6. It can be done by tracing the unique object ID with "Trace Points", in more recent versions of visual studio. I still haven't figured out how to do this in VC++ 6. Maybe you guys can point me in the right direction. Thanks in advance! Best regards, zhengtonic c...
[ -0.014160415157675743, 0.07591741532087326, 0.3209100663661957, 0.2796570956707001, 0.14298202097415924, -0.10679159313440323, -0.021217502653598785, 0.176334947347641, -0.21319903433322906, -0.6404651999473572, 0.13061076402664185, 0.23915553092956543, 0.09185858815908432, -0.253091067075...
I've been reading articles on how to program in a functional (i.e F#) style in C#, for example, foregoing loops for recursion and always returning a copy of a value/object instead of returning the same variable with a new state. For example, what sort of code inspection things should I watch out for? Is there any way ...
[ 0.4043852984905243, -0.05640311539173126, -0.21135178208351135, 0.1995948851108551, -0.07023786753416061, -0.1668795496225357, 0.2329074740409851, 0.11215152591466904, -0.4455699622631073, -0.5578417181968689, 0.20245282351970673, 0.6826804280281067, -0.3264053463935852, 0.2749239802360534...
to collections) but depending on what you're looking for, they may be helpful. 1. Make all of your fields readonly; then they can only be set from the constructor, and not changed thereafter. 2. Pick up a copy of [ReSharper](http://www.jetbrains.com/resharper/). It expands on Visual Studio's syntax highlighting, and h...
[ 0.2408336102962494, -0.48426926136016846, 0.4376077353954315, 0.3478776812553406, -0.09804589301347733, -0.09942835569381714, 0.157192662358284, -0.2983498275279999, -0.46028316020965576, -0.6708042025566101, -0.33427801728248596, 0.5967812538146973, -0.2912270128726959, 0.0107149481773376...
How to load flex components using XML. The scenario is simple as like this, i need three buttons to appear in my panel, but the option true or false whether to appear should be in xml. You're not exactly clear in your question, so I'll answer in two ways: **1. You need to have an external MXML** In this case, you nee...
[ 0.49392735958099365, -0.23066912591457367, 0.4767409861087799, -0.023620475083589554, -0.05838300287723541, 0.038880206644535065, -0.2249199002981186, -0.39555075764656067, -0.31954678893089294, -0.7354204654693604, -0.0223882794380188, 0.8225460052490234, -0.29958444833755493, -0.38576188...
up to you to look it up. **2. You need to set the properties of the components through an external XML** Create a HTTPService, assign an ID to it, and use the url property to point it to your XML file. Do not assign a result format. Then, use the result event and point to a function that will execute when your XML is...
[ 0.1604260802268982, 0.008158271200954914, 0.8598637580871582, -0.1628369837999344, -0.13508743047714233, -0.1144033744931221, -0.17851263284683228, -0.2987089157104492, -0.12505845725536346, -0.7232668399810791, -0.16752076148986816, 0.3076907992362976, -0.19145439565181732, -0.05708482861...
will be executed when the HTTPServices finishes loading myXml.xml. ``` private function Foo (e : ResultEvent) : void { myButton.enabled = e.result.properties.button1Enabled; // false myOtherButton.visible = e.result.properties.button2Visible; // true myLastButton.label = e.result.button3Text; // "TEXT" } ...
[ 0.12171556055545807, -0.07871340215206146, 0.8878772258758545, -0.34990766644477844, 0.19935807585716248, 0.18250449001789093, 0.3818501830101013, -0.1730860322713852, -0.23341713845729828, -0.8775424361228943, -0.37640950083732605, 0.45972946286201477, -0.2099263221025467, -0.009241685271...
I wrote the follwing function: ``` let str2lst str = let rec f s acc = match s with | "" -> acc | _ -> f (s.Substring 1) (s.[0]::acc) f str [] ``` How can I know if the F# compiler turned it into a loop? Is there a way to find out without using Reflector (I have no experience with Refl...
[ 0.06536442041397095, -0.07604355365037918, 0.543180525302887, -0.07548123598098755, -0.14330574870109558, -0.34192073345184326, 0.47837120294570923, -0.3374022841453552, -0.06560959666967392, -0.2584231197834015, 0.08974537998437881, 0.5860682129859924, -0.5069103240966797, -0.156070575118...
without using an inner function, or is it necessary for the loop to reside in? Also, Is there a function in F# std lib to run a given function a number of times, each time giving it the last output as input? Lets say I have a string, I want to run a function over the string then run it again over the resultant string ...
[ 0.4536777138710022, -0.05863082781434059, 0.22564633190631866, -0.1552572101354599, -0.16094660758972168, -0.13497881591320038, 0.42798495292663574, -0.29057416319847107, -0.2473517507314682, -0.3305094838142395, 0.002113070571795106, 0.6496694087982178, -0.33515653014183044, 0.00570072745...
and not in a 'try' block), but people second-guess themselves and make mistakes. There's no simple automated way (other than e.g. inspecting the generated code). Of course, you can just try your function on a large piece of test data and see if it blows up or not. The F# compiler will generate .tail IL instructions f...
[ 0.3916487693786621, -0.011920023709535599, 0.01910695806145668, 0.3678003251552582, -0.029663171619176865, -0.2917843759059906, 0.38439273834228516, -0.3338187336921692, -0.02545621618628502, -0.39719951152801514, -0.248285710811615, 0.515726625919342, -0.6391306519508362, -0.2761222720146...
fails to emit .tail in cases where it can prove there are no recursive loops through this call site; this is an optimization given that the .tail opcode is a little slower on many platforms.) 'tailcall' is a reserved keyword, with the idea that a future version of F# may allow you to write e.g. ``` tailcall func args...
[ 0.10273054987192154, -0.06723667681217194, 0.3872067332267761, -0.24951796233654022, -0.23114025592803955, -0.3837440013885498, 0.4243254065513611, -0.16160579025745392, 0.029613181948661804, -0.10987312346696854, -0.3206914961338043, 0.651008129119873, -0.610731840133667, -0.0135524151846...
= if n = 0 then x else nTimes (n-1) f (f x) let r = nTimes 3 (fun s -> s ^ " is a rose") "A rose" printfn "%s" r ```
[ -0.26677483320236206, -0.1942959725856781, 0.7358415722846985, -0.374614953994751, -0.26967787742614746, 0.18198513984680176, 0.5412212610244751, -0.8403987884521484, -0.08897606283426285, -0.20833605527877808, -0.3339853584766388, 0.3747251629829407, -0.025401929393410683, 0.2168307453393...
I have created a custom TitleWindow whcih i use as a popup. The contents of the popup are created dynamically depending on a selection a user makes from a datagrid. My problem is, my datagrid is in another custom component whcih is toward the bottom of my page so when a user clicks one of the items the popup is displ...
[ 0.2723783850669861, 0.006644066423177719, 0.7198922038078308, 0.1341545283794403, 0.06692531704902649, -0.10970669984817505, -0.09236472845077515, 0.09489919990301132, -0.2582782208919525, -0.5902822613716125, -0.09494088590145111, 0.21923145651817322, -0.27862703800201416, 0.5814668536186...
my $source = shift; my $result; Perl::Tidy::perltidy( source => \$source, destination => \$result, argv => [qw(-pbp -nst)] ); return $result; } ```
[ -0.05376226082444191, -0.008621863089501858, 0.6668437123298645, -0.567670464515686, 0.2882983684539795, 0.24599239230155945, 0.34664613008499146, -0.1639629602432251, -0.13217230141162872, -0.3787723481655121, -0.21547509729862213, 0.2801523506641388, -0.30322885513305664, 0.4359412193298...
I often come across web applications that expose internal database primary keys through forms like select boxes. And occasionally I see javascript matching against an int or guid magic value that switches the logic. Is is a best practice to avoid leaking all internal identifiers of rows in your web application to prev...
[ 0.48842930793762207, 0.12378092110157013, -0.10064436495304108, 0.4204489588737488, 0.07760478556156158, -0.19880272448062897, 0.6366296410560608, 0.11795086413621902, -0.2638714015483856, -0.53182053565979, -0.041050318628549576, 0.40924525260925293, -0.1038721576333046, 0.261728823184967...
your application would be 100% secure so it wouldn't matter if you obscured things. Obviously that's not the case so should we error on the side of caution and not expose this information? Some have pointed out that Stackoverflow is probably exposing a key in the Url which is probably fine. However are considerations ...
[ 0.4216313064098358, 0.19026559591293335, 0.22758106887340546, 0.21598349511623383, 0.06362435966730118, -0.55959552526474, 0.6368404030799866, 0.0028022178448736668, -0.19244426488876343, -0.4668181836605072, -0.22569473087787628, 0.4870212972164154, -0.12045938521623611, 0.106312818825244...
as the value for combo box list items? Go for it I say. What's the point in doing a translation to and from some intermediate value? You may not have a unique key to use. Such a translation introduces more potential for bugs. Just don't neglect security. If say you present the user with 6 items (ID 1 to 6), never ass...
[ 0.5132980942726135, -0.1324900984764099, 0.2709752321243286, 0.22504067420959473, -0.17418713867664337, 0.043261535465717316, 0.24639517068862915, -0.3836667537689209, -0.4092099666595459, -0.29637500643730164, -0.1713443547487259, 0.5591815114021301, -0.1477138251066208, 0.322351485490798...
a comment on another answer says, look at the URL here. That includes what no doubt is the primary key for the question in the SO database. It's entirely fine to expose keys for technical uses. Also, if you do use some surrogate value instead, that's not necessarily more secure.
[ 0.33616697788238525, 0.16024497151374817, -0.00037932355189695954, 0.4763433039188385, 0.06441063433885574, -0.4312167763710022, 0.04553690180182457, 0.22520314157009125, -0.24199004471302032, -0.16100840270519257, -0.30993643403053284, 0.22837352752685547, 0.13367381691932678, 0.219662114...
HI Folks, I'm using the Struts 2 validation. And for displaying the custom error messages I'm overriding the css\_xhtml.. and the validation.js for client side validation. Every thing is going well but the validation is on form submit.. can i do it for all the form fields Onblur event.. Any suggestion highly appreciat...
[ 0.2610911726951599, 0.1783808469772339, 0.8935908675193787, -0.0011524992296472192, -0.32917070388793945, -0.2365623265504837, 0.3271811604499817, -0.5714800357818604, -0.054090216755867004, -0.2381482720375061, 0.14590711891651154, 0.5460735559463501, -0.19238506257534027, -0.037227153778...
xmlLoader:URLLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded); xmlLoader.load(new URLRequest("links.xml")); function xmlLoaded(event:Event):void { var pages:XML = new XML(event.target.data); var i:int = 0; for each (var page:XML in pages.page) { var button:LinkButton ...
[ -0.20546108484268188, -0.3104393184185028, 0.7383306622505188, -0.28943341970443726, -0.37018492817878723, 0.24419309198856354, -0.08633504807949066, -0.4259985387325287, -0.36703234910964966, -0.6242170929908752, -0.6024776101112366, 0.5126199126243591, -0.31617802381515503, 0.11538992822...
trace(i++); } } ``` And you'll need a custom button class: ``` package { import fl.controls.Button; import flash.events.MouseEvent; import flash.net.URLRequest; import flash.net.navigateToURL; public class LinkButton extends fl.controls.Button { public var url:String; public ...
[ 0.36789122223854065, -0.39000967144966125, 0.595285952091217, -0.3323523998260498, 0.5036710500717163, -0.08438974618911743, 0.4183915853500366, -0.30642175674438477, -0.046442579478025436, -0.550225019454956, -0.2595691978931427, 0.6186363697052002, -0.5989606380462646, 0.0117087922990322...
private function clickHandler(mouseEvent:MouseEvent) { flash.net.navigateToURL(new URLRequest(url), "_blank"); } } } ``` Maybe I need to explain this in a bit more detail: 1. create a new Flash File (`Ctrl-N`) 2. open the Components panel (`Ctrl-F7`) 3. open the Library panel (`Ctrl-L`) 4. dr...
[ 0.08853581547737122, -0.06191440299153328, 0.5969371795654297, 0.010595912113785744, 0.055221978574991226, 0.03720100596547127, 0.17427104711532593, -0.11027269065380096, -0.10803565382957458, -0.5436204671859741, -0.15831533074378967, 0.9020991921424866, -0.5486580729484558, -0.2399400770...
bit of code here 11. Save your file in the same folder as "LinkButton.as" (`Ctrl-S`) 12. Go back to your Movie (`Ctrl-Tab`) 13. test the movie (`Ctrl-Enter`) I strongly recommend you take some more training. [Lee Brimelows site](http://www.gotoandlearn.com) is a good place to start.
[ 1.098518967628479, -0.24658802151679993, 0.01539055909961462, 0.4297230839729309, 0.05164426937699318, -0.6647765040397644, 0.47952598333358765, -0.22904708981513977, 0.017182784155011177, -0.3076781630516052, 0.23510225117206573, 0.5361500382423401, 0.5283948183059692, 0.06436923891305923...
I just can't figure out how do I make sure an argument passed to my script is a number or not. All I want to do is something like this: ``` test *isnumber* $1 && VAR=$1 || echo "need a number" ``` Any help? One approach is to use a regular expression, like so: ``` re='^[0-9]+$' if ! [[ $yournumber =~ $re ]] ; then...
[ 0.07319831848144531, 0.30605894327163696, 0.1997068077325821, -0.20530200004577637, -0.14781714975833893, 0.04158801957964897, 0.6277596354484558, -0.41175025701522827, -0.10026668757200241, -0.3910808265209198, -0.06541984528303146, 0.6758607029914856, -0.20776478946208954, -0.24352343380...
Some of my recent web projects that I worked on, use a flow engine as the central abstraction in the presentation and/or (more or less the) business layer. Reflecting on my experiences, I can honestly say that I am not a fan of the flow-centric approach. On the contrary even. I see the same symptoms pop up in projects ...
[ 0.3459121584892273, -0.02438306249678135, 0.05668116360902786, 0.1946515142917633, -0.01157203409820795, -0.3107396066188812, 0.26931923627853394, 0.45156481862068176, -0.24438734352588654, -0.6617407202720642, -0.31060805916786194, 0.51676344871521, -0.16747961938381195, -0.07915398478507...
flows as such. Some use cases keep popping up everywhere and need to be included at various points in other use cases (LookupCustomer, ...), but for flow-centric people *everything* is a flow, even things that are... not flows. * **Fragmentation.** Flow-based applications tend to have many pieces of logic (actions, com...
[ 0.046893708407878876, -0.10315145552158356, 0.17434775829315186, 0.40663355588912964, -0.06887181103229523, -0.11868748813867569, 0.22232426702976227, 0.0705297440290451, -0.10946015268564224, -0.7868489623069763, -0.19150201976299286, 0.13240931928157806, -0.31694188714027405, -0.05477098...
another thing. While every style of application allows people to write bad and inconsistent code, flow-centric applications make it particularly easy to do so. * **Config files.** Most applications use some XML format to declare flows and actions that accompany state changes. The language in which the application is wr...
[ 0.2337079495191574, -0.006021091248840094, 0.28661400079727173, 0.34288156032562256, -0.20095877349376678, -0.321248859167099, 0.27169269323349, -0.09827272593975067, -0.2401067167520523, -0.570159912109375, 0.06919020414352417, 0.5662899613380432, -0.5425946712493896, -0.17638835310935974...
external abstraction. In other words: the flow is part of the component and the component is self-contained. It is a detail. Sure, it can be parameterized and stuff, but a component should "just work". People writing a Swing, GWT, or whatever fat or rich interface application, don't bother with explicit flow abstractio...
[ 0.40032362937927246, -0.06874334812164307, 0.21853449940681458, 0.3317270874977112, -0.22204305231571198, -0.10988163948059082, 0.20105575025081635, -0.068507619202137, -0.1454879343509674, -0.6305618286132812, 0.2092529833316803, 0.7336771488189697, -0.5160752534866333, -0.181475430727005...
So you *can* do better than the rigid "do this, then that, and that, and ..." way from the time when punchcards and assembler were in fashion. Examples of frameworks that promote flow-centric development are Struts, BTT, Spring Webflow, and JSF. I've also come across homegrown flow engines built on top of ordinary ser...
[ 0.4589298367500305, -0.08665729314088821, 0.04141717031598091, 0.3124837279319763, -0.10309477150440216, -0.35968637466430664, 0.029490942135453224, 0.0436432845890522, -0.2693454623222351, -0.4284198582172394, 0.1484059989452362, 0.4103148579597473, -0.13285623490810394, -0.03906928002834...
one of several particular paths through our application. What's more instructive and insightful is to examine *why* we need this path to occur. Is it because... * ... we don't want them to interact with our application except in rigidly predefined ways? Then we've limited the utility of our application, and we make ou...
[ 0.22426755726337433, 0.11535521596670151, 0.057658400386571884, 0.33170825242996216, -0.032479945570230484, 0.016901975497603416, 0.5120365023612976, -0.04655953869223595, -0.10491311550140381, -0.6119862794876099, -0.032576099038124084, 0.4640440046787262, -0.20624807476997375, 0.19213275...
... we can't envision a scenario other than the predefined ones under which someone would use the site? Then we are implicitly assuming that only we know how best to use it; we limit the ability of the user to control their interaction. Notice how each of these underscores an issue intrinsic to the application's devel...
[ 0.1318640410900116, 0.3758072257041931, 0.11745047569274902, 0.28100886940956116, 0.11714408546686172, -0.1304255872964859, 0.5116032958030701, 0.09045930951833725, -0.13685202598571777, -0.5547958612442017, -0.0865149050951004, 0.5992220640182495, -0.36264804005622864, 0.03525115922093391...
example, to achieve a rule like "you need to fill out your order form before you confirm checkout", don't make a workflow; have a better `CustomerOrder` model that knows when it doesn't have all the information necessary to allow an `OrderConfirmation`. If you try to skip ahead, your model and controller should take ca...
[ 0.11613047122955322, -0.16785968840122223, -0.06629391759634018, 0.18271644413471222, 0.02703852392733097, -0.2884506285190582, 0.0928858071565628, -0.03146202117204666, -0.3646129369735718, -0.4539569020271301, -0.12191092222929001, 0.13403330743312836, -0.37931060791015625, 0.10000746697...
on too much responsibility to begin with if that sort of path was so easy to define separately. For example, if you previously had `OrderConfirmation`, `CustomerOrder`, and `OrderCheckout` controllers, and you're thinking about an `Order` flow to link all three together, **what you should probably be thinking about is ...
[ 0.11826366931200027, -0.2599027156829834, 0.275024950504303, 0.21662917733192444, -0.1114426702260971, -0.14375364780426025, -0.1428304761648178, -0.14507274329662323, -0.34493616223335266, -0.43880388140678406, 0.10191360861063004, 0.6492968201637268, -0.192058265209198, 0.305884391069412...
**Hi All** I am currently having an issue calling a WCF service from a windows service. My Application Solution looks like this. * Web Administration Console (Web Project) * Central Control (Windows Service) + WCF service so the Web Administration Console can connect to it and configure it + Several Calls to use WC...
[ 0.19853593409061432, -0.023716041818261147, 0.7324382066726685, -0.014079884625971317, -0.3363651931285858, -0.13424663245677948, 0.5137120485305786, -0.18159691989421844, -0.12336061894893646, -0.7531778216362, -0.21809640526771545, 0.43961623311042786, -0.30556032061576843, 0.58492136001...
which is a simple Windows Form Project which creates an instance of each service and has a couple of buttons which use a WCF function in each of the windows services (just to see what was failing) this Launcher app couldn’t speak to either of the Windows Services. This was confused me so I added the same buttons to a W...
[ 0.14655044674873352, 0.08458355069160461, 0.3272717297077179, 0.08735490590333939, -0.36517152190208435, -0.034720487892627716, 0.42344096302986145, -0.25293901562690735, -0.006579860113561153, -0.7554097771644592, 0.1773354560136795, 0.40432965755462646, -0.4744277596473694, -0.0544679537...
the fact that the calls work from the web app are a good indication of it being up and running) **In short** My web apps can use the WCF services in my Windows Services but Windows Forms and Windows services cannot. Why is this!? I have pretty much already run out of time on this project so speedy replies would be a...
[ 0.7217232584953308, 0.08240919560194016, 0.5669406056404114, 0.22718290984630585, -0.07992500066757202, -0.3175922632217407, 0.5629210472106934, -0.15038760006427765, -0.38377252221107483, -0.8262203335762024, -0.03866339102387428, 0.6524887084960938, -0.20783182978630066, 0.16119997203350...
case that was the issue. Also I am using the same **svcutil** generated proxy files everywhere as well to keep it all consistent **Example of a call to the Node** ``` Dim Bind As New WSHttpBinding(SecurityMode.None, True) Bind.CloseTimeout = New TimeSpan(0, 0, 10) Bind.OpenTimeout = New TimeSpan(0, 0, 10) Bind.SendTi...
[ 0.1338459849357605, -0.14894376695156097, 0.8156739473342896, -0.13379314541816711, -0.03960404917597771, -0.21320857107639313, 0.7625256776809692, -0.508277177810669, -0.19476459920406342, -0.5380656719207764, -0.40423017740249634, 0.5020626187324524, -0.27168598771095276, 0.5069980621337...
BNodeHost.Description.Behaviors.Add(metadataBehavior) Else BNodeHost.Description.Behaviors.Add(metadataBehavior) End If BNodeHost.Open() ``` This was all working before I made the different bits proper Windows Services and tried to add installers to it. The installers work fine and install the services which sta...
[ 0.525460422039032, 0.13675746321678162, 0.3349812924861908, -0.27570948004722595, -0.3225349485874176, -0.3923054337501526, 0.4545612335205078, -0.2963423430919647, -0.23770759999752045, -0.7334685921669006, 0.07522033154964447, 0.5562084317207336, -0.6060735583305359, 0.1492653340101242, ...
and 'ssh'.
[ 0.2092214971780777, 0.324817955493927, 0.28904345631599426, -0.22161231935024261, -0.6006255745887756, 0.31727367639541626, 0.5736790299415588, 0.2862335741519928, -0.25861841440200806, -0.35272112488746643, -0.2600674033164978, 0.2303696721792221, -0.03595643490552902, 0.41457730531692505...
What is the reason for declaring noncreatable coclasses like the following in IDL? ``` [ uuid(uuidhere), noncreatable ] coclass CoClass { [default] interface ICoClass; }; ``` I mean such class will not be registered to COM anyway. What's the reason to mention it in the IDL file and in the type library pr...
[ 0.038863468915224075, 0.12297187745571136, 0.11785480380058289, 0.006186114624142647, 0.032026614993810654, -0.2908129394054413, 0.20350880920886993, 0.4267294406890869, -0.3108430504798889, -0.6628727316856384, -0.19963127374649048, 0.2845692038536072, -0.3631000518798828, 0.4307404756546...
some bits remain stashed away in some part of the RAM (physical or otherwise), the OS sees that memory block as free (unless it has already been taken again). I doubt you can get access to it without hacking the OS somehow. Let me clarify my point in regards to your comment: Let's assume you opened a file, read it to...
[ 0.5569645166397095, 0.3898470997810364, 0.039860136806964874, 0.2937876284122467, 0.26626312732696533, -0.23670385777950287, 0.4638737738132477, 0.1482064425945282, -0.5694351196289062, -0.13296574354171753, -0.3477661907672882, 0.37026551365852356, -0.2524721324443817, 0.2837519347667694,...
program that comes along and demands some RAM might receive that memory block. So, first of all, **nothing resides in that memory block anymore**. It's empty. Free for the OS to use at its discretion. Now, even if some random bits of data are left hanging around (remember, you have no way of knowing if it's physical o...
[ 0.3629021644592285, 0.07999622076749802, -0.013601644895970821, 0.3483467400074005, 0.23107950389385223, -0.08741138875484467, 0.23661178350448608, 0.542878270149231, -0.47075438499450684, -0.47959551215171814, -0.4128227233886719, 0.425204336643219, -0.08029191195964813, 0.143486827611923...
I write a lot of little scripts that process files on a line-by-line basis. In Perl, I use ``` while (<>) { do stuff; } ``` This is handy because it doesn't care where the input comes from (a file or stdin). In Python I use this ``` if len(sys.argv) == 2: # there's a command line argument sys.stdin = file(...
[ 0.2921600043773651, -0.15963439643383026, 0.23415349423885345, -0.09178343415260315, -0.2723565697669983, -0.0030526863411068916, 0.10219608247280121, 0.015678035095334053, -0.2061605155467987, -0.7262066006660461, -0.07210850715637207, 0.5442453026771545, -0.38680148124694824, -0.04623859...
A slug is part of a URL that describes or titles a page and is usually keyword rich for that page improving SEO. e.g. In this URL [PHP/JS - Create thumbnails on the fly or store as files](https://stackoverflow.com/questions/103707/php-js-create-thumbnails-on-the-fly-or-store-as-files) that last section "php-js-create-t...
[ 0.7601442933082581, 0.3413821756839752, 0.36185020208358765, 0.09760741144418716, -0.28421318531036377, -0.3720077872276306, -0.15771818161010742, -0.09722951799631119, -0.07032211124897003, -0.23650793731212616, 0.09468428045511246, 0.14589382708072662, -0.20947760343551636, 0.26075068116...
is better and what others have done. So far I've come up with these pro points for each one: Store slug: - "Faster" processor doesn't need to generate it each time (is generated once) Generate-on-the fly: - Flexible (can adjust slug algorithm and don't need to regen for whole table). - Uses less space in DB - Less d...
[ 0.21957819163799286, -0.24300244450569153, 0.3027873933315277, 0.2488928586244583, -0.18628811836242676, 0.09938453137874603, 0.0784861147403717, -0.46262916922569275, -0.07261906564235687, -0.6486489772796631, 0.2837246060371399, 0.5947728753089905, -0.14256645739078522, -0.23467047512531...
of the slug on this site. e.g.: [PHP/JS - Create thumbnails on the fly or store as files](https://stackoverflow.com/questions/103707/php-js-create-thumbnails-on-the-fly-or-store-as-files) [PHP/JS - Create thumbnails on the fly or store as files](https://stackoverflow.com/questions/103707/php-js-create-thumbnails-on-t...
[ 0.48662981390953064, 0.2850554585456848, 0.2700158655643463, 0.144833505153656, -0.026898514479398727, -0.4066929221153259, 0.09499610215425491, -0.0803583487868309, -0.2652267515659332, -0.5287768244743347, 0.18103700876235962, 0.4069109857082367, -0.37620946764945984, 0.01948248222470283...
links with truncated slugs above, it would compare the slug in the url to the one generated by the current slug algorithm and if different it would do a 301 redirect to the same page but with the new slug. Remember that all internally generated links would immediately be using the new algorithm and only links from out...
[ 0.44390925765037537, 0.1539028435945511, 0.3267260789871216, 0.18944206833839417, -0.4723566174507141, -0.10704070329666138, -0.07129416614770889, 0.09545231610536575, -0.17141610383987427, -0.5771735310554504, 0.4460079073905945, 0.2250330001115799, -0.3609788715839386, 0.4062826037406921...
store it in the database anyhow. If not I don't think it matters much, you could generate them on the fly, but if you are unsure whether you want to change them or not let them be in the database. In my eyes there is no real performance issue with either method (unless the on-the-fly generation is very slow or somethi...
[ 0.854558527469635, -0.22365817427635193, -0.15119966864585876, 0.559897780418396, 0.0011908788001164794, -0.013516290113329887, -0.5525307059288025, 0.09462721645832062, -0.13715355098247528, -0.42029330134391785, 0.2585800588130951, 0.8872426152229309, -0.23199675977230072, 0.057253923267...
### Background I have a business idea, one component of which involves a client that would be downloaded & installed by thousands of users via a web page. ### Application Requirements Version 1: The application must: * monitor internet usage on the user's desktop with the following areas monitored: + browser us...
[ 0.7857957482337952, 0.16847339272499084, 0.7205409407615662, -0.27538424730300903, 0.13805803656578064, -0.07208213955163956, 0.27853870391845703, 0.10190615057945251, -0.3324149250984192, -0.4452667832374573, -0.18944543600082397, 0.5330618619918823, -0.5088387131690979, -0.40418201684951...
Easily upgradable via automatic updates. * Needs to be lightweight with regards to memory usage. * Needs to be easily and quickly installed, + Must be able to be uninstalled completely. * Cannot adversely impact browser or user's system performance experience For Version 2: * be able to present graphical outputs (pi...
[ -0.189979687333107, -0.0660846158862114, 0.5068826079368591, 0.06787991523742676, -0.07975766807794571, -0.08203662931919098, 0.19184273481369019, -0.06553440541028976, -0.106756791472435, -0.8248904943466187, -0.5221362113952637, 0.6524978876113892, -0.28967952728271484, -0.21818573772907...
this last year. I used C#. Initially it leveraged some of the 3.5 framework, but I had to scale it back to the 2.0 framework due to installation size restrictions. It's currently monitoring about 13,000 machines. collecting and sending back to a report server around 3MB of data per minute. The client machines range f...
[ 0.37514159083366394, 0.2827261984348297, 0.6569532155990601, -0.24242784082889557, 0.09696874022483826, 0.22681571543216705, 0.34274405241012573, -0.01270147692412138, -0.47573402523994446, -0.536596417427063, 0.18285124003887177, 0.42935314774513245, 0.09287875145673752, 0.007460680790245...
for IE. The BHO was necessary to capture exactly what was going on in the browser. The only real challenges were in making it work under XP and Vista (all service pack levels) and in IE 6 and 7. XP and Vista have different security implications to take into account; IE 6 and 7 also have different access models. Fina...
[ 0.49146199226379395, 0.06041981279850006, 0.5255513191223145, -0.27642005681991577, -0.1958761066198349, -0.21513108909130096, 0.3939725160598755, 0.004544160794466734, 0.011054649017751217, -0.6230950951576233, -0.2036263644695282, 0.7685156464576721, -0.5140141248703003, -0.2186149954795...
do what I needed just because it's easier. As far as Chrome, they only recently started supporting extensions ([March 19,2009](http://www.chromeplugins.org/extensions/google-chrome-gets-premilinary-support-for-extensionsplugins/)). You have to change the shortcut startup properties to even be able to run them. So, I'd...
[ 0.2948828339576721, 0.08904683589935303, 0.9158856272697449, -0.06648050993680954, -0.05671416223049164, -0.03516087308526039, 0.41419464349746704, -0.0049622561782598495, -0.6600102186203003, -0.5308954119682312, 0.06754120439291, 0.5546660423278809, -0.08126761019229889, -0.3330290913581...
pretty low and has no impact on the user experience. **Firewalls** The reason a firewall really doesn't matter for us is that the data is transmitted back to our reporting server over port 80 using web services. If 80 is blocked, then they can't browse anyway so there's nothing to collect... As far as bandwidth, limi...
[ 0.17000135779380798, 0.19515995681285858, 0.6769785284996033, 0.17621953785419464, -0.205172598361969, -0.40643736720085144, 0.45328471064567566, 0.3536459505558014, -0.2424197793006897, -0.6541213989257812, -0.0980888083577156, 0.6393679976463318, -0.04831133037805557, 0.10246780514717102...
I've got a f(x) that returns a collection of user controls. .Net lets me just treat the f(x) name as the collection. Is there something wrong with doing so? ex) ``` Private Function GetCcB() As Collection(Of Reports_ucColumn) Dim cc As New Collection(Of Reports_ucColumn) cc.Add(Me.ucColumn0) cc.Add(Me.ucC...
[ 0.32419589161872864, 0.17426647245883942, 0.6742947697639465, 0.15721143782138824, 0.09024093300104141, -0.23315761983394623, -0.19281429052352905, -0.09272412955760956, -0.2831472158432007, -0.4366796612739563, -0.16978123784065247, 0.45412498712539673, -0.3960097134113312, 0.423598587512...
GetCcB.Item(i).isValid = False GetCcB.Item(i).title = csB(i) If csB(i).Contains("Invalid") Then : GetCcB.Item(i).errCode = "005W" Else : GetCcB.Item(i).errCode = "005W" 'todo - chg this once we get a duplicate col err code End If Else
[ 0.11045797914266586, 0.2525007128715515, 0.6603593230247498, -0.00744261872023344, 0.27238526940345764, -0.08890066295862198, 0.349636435508728, -0.3438853621482849, -0.14074474573135376, -0.49312523007392883, -0.29152360558509827, 0.32943540811538696, -0.1551779806613922, 0.52683973312377...
GetCcB.Item(i).isValid = True GetCcB.Item(i).title = csB(i) GetCcB.Item(i).errCode = String.Empty End If ``` [boost::program\_options](http://www.boost.org/doc/libs/1_38_0/doc/html/program_options.html) provides unified (and cross platform) support for configuration from command line, e...
[ -0.21072456240653992, -0.20181380212306976, 0.43988287448883057, -0.042133718729019165, -0.014107918366789818, -0.05523400753736496, 0.013950182124972343, -0.16907678544521332, -0.42694562673568726, -0.45242705941200256, -0.23972530663013458, 0.6217379570007324, -0.2688141167163849, -0.029...
what's wrong with editing a config file with a text editor ?).
[ 0.08382357656955719, 0.1618098020553589, 0.06000261753797531, 0.2434387058019638, 0.39161932468414307, -0.3515303134918213, 0.0500762052834034, 0.0358402393758297, -0.0899813324213028, -0.12719184160232544, -0.002261717803776264, 0.5517002940177917, -0.1887849122285843, 0.03612018004059791...
I would like to launch a Fancybox (e.g. [Fancybox's](http://fancy.klade.lv/) version of a modal or light box) on page load. I could bind it to a hidden anchor tag and fire the click event of that anchor tag via JavaScript, but I would rather just launch the Fancybox directly and avoid the extra anchor tag. Fancybox cur...
[ 0.3994106948375702, -0.23151764273643494, 0.4893453121185303, -0.051575999706983566, -0.07956267148256302, -0.30540817975997925, 0.12320178002119064, -0.13687162101268768, -0.016726918518543243, -0.5334228873252869, -0.3622056245803833, 0.3053787350654602, -0.4148111939430237, -0.151159316...
JS files are included. The code I used is as follows: This sample script is embedded directly in the HTML, but it could also be included in a JS file. ``` <script type="text/javascript"> $(document).ready(function() { $("#hidden_link").fancybox().trigger('click'); }); </script> ```
[ 0.40824663639068604, -0.05412055179476738, 0.284260630607605, -0.24388499557971954, 0.14415091276168823, -0.21705549955368042, 0.13708899915218353, -0.31377947330474854, 0.11771455407142639, -0.6358089447021484, -0.43477755784988403, 0.3546929657459259, -0.5779065489768982, -0.293250322341...
i'm new with python.. Actually, i'm trying to send featured email with python: html body, text alternative body, and attachment. So, i've found this [tutorial](http://code.activestate.com/recipes/67083/ "tutorial 1") and adapted it with the gmail authentication (tutorial found [here](http://kutuma.blogspot.com/2007/08...
[ -0.003462032647803426, 0.1927921175956726, 0.5263235569000244, -0.25007158517837524, 0.09757312387228012, 0.11423853039741516, 0.4593747556209564, -0.3267727196216583, -0.026789264753460884, -0.8718355894088745, 0.047354113310575485, 0.7401838302612305, -0.4320562779903412, -0.400652766227...
headers... we put subject here # because smtplib.sendmail expects it to be in the # message body # writer.addheader("Subject", subject) writer.addheader("MIME-Version", "1.0") # # start the multipart section of the message # multipart/alternative seems to work better # on some MUAs than multipart/mixed # writer.startmu...
[ -0.13387340307235718, -0.027863383293151855, 0.999788761138916, -0.11085940897464752, -0.0017890679882839322, 0.16554950177669525, 0.46417486667633057, -0.6070994734764099, -0.12710623443126678, -0.5269360542297363, -0.6166369318962097, 0.48412710428237915, -0.4378414750099182, -0.26219427...
email html da python, con allegato!" message = createhtmlmail(html, text, subject) gmail_user = "thegmailaccount@gmail.com" gmail_pwd = "thegmailpassword" server = smtplib.SMTP("smtp.gmail.com", 587) server.ehlo() server.starttls() server.ehlo() server.login(gmail_user, gmail_pwd) server.sendmail(gmail_user, "example@e...
[ -0.042449723929166794, 0.34986209869384766, 0.662065863609314, -0.29298287630081177, -0.4467436373233795, -0.03442130610346794, 0.48288631439208984, -0.09552686661481857, -0.26479533314704895, -0.4476097822189331, -0.047759320586919785, 0.23990081250667572, -0.5203801393508911, -0.02995864...
that be useful for someone? If you can excuse some blatant self promotion, I wrote a [mailer module](http://pypi.python.org/pypi/mailer/0.3) that makes sending email with Python fairly simple. No dependencies other than the Python smtplib and email libraries. Here's a simple example for sending an email with an attach...
[ 0.4681346118450165, 0.24531859159469604, 0.12174031883478165, -0.05371164157986641, -0.2251417189836502, -0.06471902132034302, 0.21334503591060638, -0.4836735129356384, -0.37994861602783203, -0.24711018800735474, 0.07921204715967178, 0.3708484172821045, -0.4670095145702362, 0.0211254041641...
Message message = Message(From="me@example.com", To="you@example.com", charset="utf-8") message.Subject = "An HTML Email" message.Html = """This email uses <strong>HTML</strong>!""" message.Body = """This is alternate text.""" sender = Mailer('smtp.example.com') sender.send(message...
[ 0.27674901485443115, 0.04012814909219742, 0.472651869058609, -0.20104578137397766, -0.2324884831905365, 0.3528979420661926, 0.4080316424369812, 0.023649075999855995, -0.44295385479927063, -0.9013558626174927, -0.0729692280292511, 0.26956629753112793, -0.5544500350952148, 0.199036106467247,...
I have several classes that conceptually belong to one tier. They have no common properties which is why they have no need to inherit from some base class. I also have a few methods that deal with these classes. Some of them are templates of the following style: ``` public SomeClass { public void SomeMethod<T> (T...
[ 0.6131155490875244, -0.07923907041549683, -0.2719360888004303, 0.04428974911570549, -0.04445115476846695, -0.2533152997493744, 0.337407648563385, 0.12410120666027069, -0.10861155390739441, -0.5989007353782654, -0.016278080642223358, 0.43473124504089355, -0.16635029017925262, 0.293686866760...
to this method something else. Naturally I made those other classes derive from BaseClass which is empty and has no other purpose (at least for now) than to group other classes. This is probably not that good approach but anyway I'm using it. Is there a better way to do this? EDIT: After consideration I decided not...
[ 0.22702929377555847, -0.06914146989583969, -0.04161077365279198, 0.18389028310775757, 0.015676388517022133, -0.18249422311782837, 0.2740727961063385, 0.055248718708753586, -0.05643413960933685, -0.43273845314979553, 0.28254789113998413, 0.4332495331764221, -0.4805307984352112, 0.2184166014...
: ISomeInterface ```
[ 0.0077013419941067696, 0.4660049080848694, 0.15661831200122833, -0.15194565057754517, -0.3797614276409149, -0.3487056791782379, 0.49561285972595215, -0.06085290014743805, 0.02771148830652237, -0.36897075176239014, -0.42174282670021057, -0.03849666193127632, -0.1801358312368393, 0.069464482...
I have a WPF application that has a 3rd party data grid with a border around it. I've used the `DropShadowEffect` to put a shadow behind the border, but this seems to affect performance somewhat (not nearly as much as a `BitmapEffect`, but still noticeable) and makes the font rendering fuzzy. Is there a way to somehow ...
[ 0.3981969356536865, -0.007951988838613033, 0.5047791600227356, 0.0925641804933548, -0.14042052626609802, 0.05928706005215645, 0.3810420334339142, -0.23741577565670013, -0.225685715675354, -0.5579552054405212, 0.18430504202842712, -0.00941474735736847, -0.1596369445323944, -0.04578823596239...
shadow behind each line of text. I want the shadow behind the border, but not the text. ``` <Window x:Class="WpfEffectTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> ...
[ -0.1762893944978714, -0.2524394094944, 0.8222869038581848, -0.20006637275218964, -0.15207722783088684, 0.14351888000965118, 0.07747640460729599, -0.28713080286979675, -0.15466168522834778, -0.44285720586776733, -0.09002635627985, 0.2963542640209198, 0.01596447266638279, -0.1178925111889839...
<StackPanel> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock>
[ -0.21194328367710114, 0.25729450583457947, 0.14955437183380127, -0.19105973839759827, -0.18127068877220154, -0.1772795468568802, 0.15983819961547852, -0.3568164110183716, -0.6824823617935181, -0.44275200366973877, -0.4600455164909363, 0.07268335670232773, -0.3287961184978485, -0.4727243185...
<TextBlock>This is some text</TextBlock> </StackPanel> </Border> </Grid> </Window> ``` The link from gcores had the answer, which is to put the border and its content together in the same grid so the content overlays the border. ``` <Window x:Class="WpfEffectTest.Window1" xmlns="http://sc...
[ -0.11210504919290543, -0.08667577058076859, 0.8771530985832214, -0.019393907859921455, -0.18601416051387787, -0.008805678226053715, -0.008960212580859661, -0.37830018997192383, -0.27690762281417847, -0.630891740322113, -0.0802091732621193, 0.04144095629453659, -0.03076624684035778, 0.10063...
<Border.Effect> <DropShadowEffect BlurRadius="10" ShadowDepth="5" /> </Border.Effect> </Border> <StackPanel Margin="35"> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This
[ -0.24384304881095886, -0.2536217272281647, 0.7641605138778687, -0.06797882169485092, -0.24959124624729156, -0.051011960953474045, 0.12808260321617126, -0.3489602208137512, -0.4758470952510834, -0.40571165084838867, 0.04212743043899536, -0.09937494993209839, -0.24552130699157715, -0.2005794...
is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> <TextBlock>This is some text</TextBlock> </StackPanel> </Grid> </Window> ```
[ -0.14184896647930145, 0.12950652837753296, 0.25834140181541443, -0.18212659657001495, -0.15143993496894836, -0.3110676109790802, 0.06842666864395142, -0.05841894820332527, -0.5375675559043884, -0.7402526140213013, -0.6358667612075806, 0.22749356925487518, -0.32107019424438477, -0.314186066...
I am building my own CRM access database that will contain a list of contacts. I would like to have an opportunity reference one contact as an employee, and another as the customer. Is there a way that I can add employees using their internal user ID (always 4 digits) and autonumber customer contacts? I don't plan on ...
[ 0.33728423714637756, 0.09589353948831558, 0.9516746997833252, -0.10005766153335571, 0.3818690776824951, 0.234779492020607, -0.16622184216976166, -0.24188394844532013, -0.31705018877983093, -0.7243817448616028, 0.1437024027109146, 0.7051454782485962, 0.010003436356782913, -0.063099525868892...
TileMode="Tile"> <DrawingBrush.Drawing> <DrawingGroup> <GeometryDrawing Geometry="M0,0 L1,0 1,0.1, 0,0.1Z" Brush="Green" /> <GeometryDrawing Geometry="M0,0 L0,1 0.1,1, 0.1,0Z" Brush="Green" /> </DrawingGroup> </DrawingBrush.Drawing> </DrawingBrush> ```
[ -0.4175238609313965, -0.09884639084339142, 0.37045443058013916, -0.105244480073452, 0.0005401576054282486, 0.24475473165512085, -0.07234562933444977, -0.44730344414711, -0.22151802480220795, -0.6741381883621216, 0.08589768409729004, 0.33439770340919495, 0.07163563370704651, -0.078013725578...
Somebody that I work with and respect once remarked to me that there shouldn't be any need for the use of reflection in application code and that it should only be used in frameworks. He was speaking from a J2EE background and my professional experience of that platform does generally bear that out; although I have wri...
[ 0.48430150747299194, 0.4304545223712921, -0.5296542048454285, 0.019266730174422264, -0.3233335614204407, -0.019907431676983833, 0.5648185610771179, 0.18270184099674225, -0.329068124294281, -0.4508136212825775, 0.28562378883361816, 0.765268862247467, 0.07772909104824066, -0.1054156273603439...
the same techniques are equally as applicable and useful to your application code. * Do you agree with the viewpoint that reflection is for frameworks only? I'd be interested to hear your opinions and experiences. There's the old joke that any sufficiently sophisticated system written in a statically-typed language co...
[ 0.45274847745895386, 0.3045444190502167, -0.07483795285224915, 0.21551822125911713, -0.3584766387939453, -0.04873096942901611, 0.4850015938282013, -0.06479621678590775, -0.1783168613910675, -0.5455474853515625, 0.09159785509109497, 0.756937563419342, -0.08413650095462799, -0.41733941435813...
but the implicit reflection in Ruby often makes for simpler, easier-to-read code. (Depending on the metaprogramming magic required, sometimes harder to write). In C#, I've found problems that couldn't be solved without reflection, because of information I didn't have until runtime. One example: When trying to manipula...
[ 0.3753300607204437, 0.08203360438346863, -0.24865758419036865, 0.06331870704889297, -0.5937100648880005, -0.17147208750247955, 0.5869928598403931, -0.24350300431251526, -0.01075414102524519, -0.38686662912368774, 0.36635342240333557, 0.4734354615211487, -0.42761340737342834, -0.13290530443...
data we needed from it, and C# doesn't allow the "type" of the generic method invocation to be specified at run time (except with reflection techniques). I guess you could argue our tool was kind of a framework, but I could easily imagine a case in an ordinary application facing a similar problem.
[ 0.16582493484020233, -0.00513441301882267, -0.20438195765018463, 0.4891773462295532, -0.17895177006721497, -0.33717623353004456, 0.1851588487625122, -0.004161265213042498, 0.16403624415397644, -0.03156452253460884, 0.1603459268808365, 0.60106360912323, -0.19332356750965118, -0.173333495855...
Given the following xml: ``` <container> <val>2</val> <id>1</id> </container> <container> <val>2</val> <id>2</id> </container> <container> <val>2</val> <id>3</id> </container> <container> <val>4</val> <id>1</id> </container> <container> <val>4</val> <id>2</id> </container> <cont...
[ -0.2850962281227112, -0.02582317776978016, 0.3037339746952057, -0.09169632196426392, 0.015399498865008354, 0.14065241813659668, 0.1303349882364273, -0.16950616240501404, -0.16914306581020355, -0.7985294461250305, -0.14442835748195648, 0.19595691561698914, 0.053696054965257645, 0.2271144986...
group, you can use an `<xsl:key>` like this: ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="text" /> <xsl:key name="ContainerGroupByVal" match="container" use="val" /> <xsl:variable name="ContainerGroupFirstLast" select="//container[ generate-i...
[ -0.0015098777366802096, -0.3166642487049103, 0.3923102021217346, -0.012816059403121471, -0.3398560583591461, -0.1798885613679886, -0.11473189294338226, -0.6139959692955017, -0.2074921578168869, -0.31629079580307007, -0.1091662347316742, 0.471994012594223, -0.11537796258926392, 0.0167426262...
an explanation since this might not be obvious right away: * The `<xsl:key>` returns all `<container>` nodes having a given `<val>`. You use the `key()` function to query it. * The `<xsl:variable>` is where it all happens. It reads as: + for each of the `<container>` nodes in the document ("`//container`") check… + ...
[ 0.04819750413298607, -0.25149962306022644, 0.35713884234428406, 0.04505915939807892, 0.09791526943445206, -0.40179821848869324, -0.24257433414459229, -0.07115563750267029, 0.005637662019580603, -0.652186393737793, -0.3258235454559326, 0.3944914937019348, -0.13466519117355347, 0.31147757172...
It could just as well be a `<xsl:apply-templates>`. --- EDIT #2: As Dimitre Novatchev rightfully points out in the comments, you should be wary of using the "`//`" XPath shorthand. If you can avoid it, by all means, do so — partly because it potentially selects nodes you don't want, and mainly because it is slower th...
[ -0.061335064470767975, -0.008264106698334217, 0.23855049908161163, -0.004078097175806761, -0.0702509954571724, -0.24340644478797913, 0.16982634365558624, -0.07997602224349976, 0.04782632365822792, -0.5392719507217407, -0.3768676221370697, 0.22154387831687927, -0.5119841694831848, 0.1377225...
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="text" /> <xsl:key name="ContainerGroupByVal" match="container" use="val" /> <xsl:variable name="ContainerGroupFirstLast" select="//container[ count( . | key('ContainerGroupByVal', val)[1] | key('ContainerGroupByVal', ...
[ -0.3892090916633606, -0.38013756275177, 0.5821383595466614, -0.07598315924406052, -0.32350578904151917, -0.1600266993045807, -0.37689244747161865, -0.36795252561569214, -0.2826535403728485, -0.5613335371017456, -0.4698653519153595, 0.42709434032440186, -0.07740224152803421, 0.0948461219668...
</xsl:template> </xsl:stylesheet> ``` Explanation: The XPath union operator "`|`" combines it's arguments into a node-set. By definition, a node-set cannot contain duplicate nodes — for example: "`. | . | .`" will create a node-set containing exactly one node (the current node). This means, if we create a union nod...
[ -0.08686724305152893, 0.13525502383708954, 0.3858410716056824, -0.05322553217411041, 0.1754584014415741, -0.08707879483699799, 0.14049001038074493, -0.36092880368232727, 0.10809703916311264, -0.6644510626792908, -0.32180431485176086, 0.3875526785850525, -0.6250651478767395, 0.1232606098055...
I have a table on SQL Server 2005 that was about 4gb in size. (about 17 million records) I changed one of the fields from datatype `char(30)` to `char(60)` (there are in total 25 fields most of which are `char(10)` so the amount of char space adds up to about 300) This caused the table to double in size (over 9gb) ...
[ -0.08586149662733078, 0.11686798185110092, 0.5192223191261292, -0.403689444065094, -0.43217238783836365, 0.33532336354255676, 0.2659723162651062, -0.1618463695049286, -0.43218210339546204, -0.5370225310325623, 0.39546820521354675, 0.5017719864845276, -0.19388891756534576, 0.256680786609649...
the database did not help either. Short of actually recreating the table structure and copying the data over (that's 17 million records!) is there a less drastic way of getting the size back down again? Well it's clear you're not getting any space back ! :-) When you changed your text fields to CHAR(60), they are all...
[ 0.06696226447820663, -0.005382210481911898, 0.16868476569652557, 0.12493002414703369, -0.2889745831489563, 0.39334943890571594, 0.36808642745018005, 0.10101118683815002, -0.37953996658325195, -0.28813090920448303, 0.2033974528312683, 0.29781603813171387, -0.02647971548140049, 0.21212251484...
reduce them back to their trimmed length, and then do a database shrinking. After you've done that, you need to REBUILD your clustered index in order to reclaim some of that wasted space. The clustered index is really where your data lives - you can rebuild it like this: ``` ALTER INDEX IndexName ON YourTable REBUILD...
[ -0.20946352183818817, 0.1377684623003006, 0.19799022376537323, -0.08387598395347595, 0.2103527933359146, -0.08185494691133499, 0.1518212854862213, 0.1793394386768341, -0.21382693946361542, -0.9648256301879883, -0.1493709534406662, 0.5855186581611633, -0.1190311461687088, 0.3600213527679443...
I have the following simple function: ``` private void EnableDisable941ScheduleBButton() { if (this._uosDepositorFrequency.Value != null) this._btnScheduleB.Enabled = ((int)this._uosDepositorFrequency.Value == 0); } ``` It's a member of a Winform class which I'm trying to split into a...
[ 0.10767943412065506, 0.030050715431571007, 0.6086877584457397, -0.3619416654109955, 0.028424426913261414, 0.17299498617649078, 0.2745501697063446, -0.10727216303348541, -0.11434843391180038, -0.8051449656486511, -0.0623786635696888, 0.6188675165176392, -0.42982879281044006, 0.4269347786903...
\_uosDepositorFrequency is a radiobutton group with only two buttons. Any ideas? Update: Ok, maybe it isn't as obvious as I thought. The business rule states that if an employer makes semiweekly deposits (\_uosDepositorFrequency.Value = 0) they are required to fill out a Schedule B form. First I'd like to thank all ...
[ 0.36504480242729187, 0.17415305972099304, 0.32910725474357605, -0.06997407227754593, 0.10655031353235245, -0.21353857219219208, 0.0180832426995039, -0.0360320545732975, -0.13624654710292816, -0.3975848853588104, -0.09767330437898636, 0.9162152409553528, -0.07070692628622055, 0.084073126316...
EnableScheduleB { get { return _btnScheduleB.Enabled; } set { _btnScheduleB.Enabled = value; } } public DepositFrequency DepositorFrequency {
[ -0.033180851489305496, -0.0004202799464110285, 0.46612322330474854, -0.11352583020925522, 0.3762010335922241, 0.13900771737098694, 0.4683435559272766, -0.09870791435241699, -0.18325132131576538, -0.9005170464515686, -0.4557900130748749, 0.42492592334747314, -0.1943860948085785, 0.002199258...
get { return (DepositFrequency)_uosDepositorFrequency.Value; } set { _uosDepositorFrequency.Value = (int)value; } } ``` Then I copied the body of the original function to my presenter and modified it to use the properties I just created. The null che...
[ 0.24737471342086792, -0.02803974039852619, 0.6991158723831177, 0.1466732621192932, 0.10438253730535507, -0.01028865110129118, 0.3411887586116791, -0.0004477418842725456, -0.15638954937458038, -0.5562806129455566, -0.4692516624927521, 0.636305034160614, -0.22773560881614685, -0.095620714128...
function turned out to be unnecessary because the \_uosDepositorFrequency control is initialized elsewhere. ``` public void UpdateScheduleBStatus() { ReturnView.EnableScheduleB = ReturnView.DepositorFrequency == DepositFrequency.Semiweekly; } ``` Finally the \_uosDepositorFrequency\_ValueChanged ...
[ -0.09909290820360184, -0.012842163443565369, 0.769754946231842, -0.11732089519500732, -0.12420468777418137, -0.039611656218767166, 0.38726136088371277, 0.15404711663722992, -0.232621431350708, -0.7159093022346497, -0.30060574412345886, 0.7349961996078491, -0.13501743972301483, 0.3199791014...
I like the pattern I saw in this blog post (<http://marekblotny.blogspot.com/2009/04/conventions-after-rewrite.html>), where the author is checking to see if a table name alteration has already been made before applying a convention. ``` public bool Accept(IClassMap target) { //apply this convention if table wasn'...
[ -0.05464773252606392, 0.03178879991173744, 0.6857178807258606, -0.024448180571198463, 0.01431303471326828, -0.0859384536743164, -0.0505787692964077, -0.4859544634819031, -0.3094792664051056, -0.4121299684047699, 0.09909366071224213, 0.6614809036254883, -0.37353330850601196, 0.2103766947984...
?? } public void Apply(IProperty property) { property.WithLengthOf(50); } } ``` I don't see where IProperty exposes anything that tells me if the property has already been set. Is this possible? TIA, Berryl To clarify in code what Stuart and Jamie are saying, here's what works: ``` public class...
[ 0.25012263655662537, 0.07684258371591568, 0.5440963506698608, -0.08933433890342712, 0.29953864216804504, -0.05643617361783981, 0.32040390372276306, -0.7129769921302795, -0.21988710761070251, -0.5838603377342224, -0.16966943442821503, 0.7944809794425964, -0.3276830017566681, 0.0614195205271...
.WithLengthOf(emailStringLength) // actually set it .SetAttribute("length", emailStringLength.ToString()); // flag it is set ... } } public class DefaultStringLengthConvention: IPropertyConvention { public bool Accept(IProperty property) { return true; }...
[ 0.13354714214801788, -0.07802274078130722, 0.6743833422660828, -0.13492758572101593, 0.1004369929432869, -0.06395677477121353, 0.5130207538604736, -0.912947952747345, 0.020235853269696236, -0.27238452434539795, -0.17286668717861176, 0.8575388789176941, -0.36536914110183716, -0.014322066679...
// only for strings if (!property.PropertyType.Equals(typeof(string))) return; // only if not already set if (property.HasAttribute("length")) return; property.WithLengthOf(50); } } ```
[ 0.1900995671749115, -0.049817342311143875, 0.3022574782371521, -0.31684610247612, 0.20895591378211975, -0.20930279791355133, 0.24362094700336456, -0.6873700022697449, -0.06758691370487213, -0.4816835820674896, -0.38847973942756653, 0.6536892652511597, -0.17968563735485077, 0.14533101022243...