text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
#endregion } #endregion ``` But I'd prefer not to have to write all this extra code. The `DefaultModelBinder` works fine with such hiearchies, so I suppose the `DataAnnotationsModelBinder` should as well. **Second Edit:** It looks like this is indeed a bug in `DataAnnotationsModelBinder`. However, there is hope thi...
[ -0.1334248185157776, -0.17586417496204376, 0.6652464270591736, -0.10756511986255646, 0.053432002663612366, -0.25790634751319885, 0.29463812708854675, 0.2593553066253662, -0.25021442770957947, -0.7437877058982849, 0.10031501948833466, 0.6430695056915283, -0.2970180809497833, -0.026451332494...
sent of to the view. I ended up modifying `BindProperty` on the DataAnnotationsModelBinder to circumvent the `NullReferenceException`, and I personally didn't like properties only being bound if they were valid (see reasons below). ``` protected override void BindProperty(ControllerContext controllerContext, ...
[ -0.20651775598526, -0.30180782079696655, 0.5711081624031067, 0.2912551462650299, -0.21865831315517426, -0.33071622252464294, 0.2103281021118164, -0.11779623478651047, -0.09561479091644287, -0.5056297779083252, -0.10274214297533035, 0.4529113471508026, -0.4929129481315613, 0.569561243057251...
PropertyDescriptor propertyDescriptor) { string fullPropertyKey = CreateSubPropertyName(bindingContext.ModelName, propertyDescriptor.Name); // Only bind properties that are part of the request if (bindingContext.ValueProvider.DoesAnyKeyHavePrefix(fullPropertyKey)) { var innerContext = new ModelBind...
[ -0.20713023841381073, -0.28070107102394104, 0.8661753535270691, -0.06581728905439377, 0.24513301253318787, -0.008525463752448559, 0.3374081552028656, -0.6078774333000183, -0.13892848789691925, -0.5214712023735046, -0.4353131949901581, 0.7055061459541321, -0.18886563181877136, 0.48610979318...
ModelState = bindingContext.ModelState, ModelType = propertyDescriptor.PropertyType, ValueProvider = bindingContext.ValueProvider }; IModelBinder binder = Binders.GetBinder(propertyDescriptor.PropertyType); object newPropertyValue = ConvertValue(propertyDescriptor, binde...
[ -0.5660873651504517, -0.44682008028030396, 0.7705995440483093, -0.0914098396897316, 0.2097492665052414, 0.06511152535676956, 0.28072842955589294, -0.5702151656150818, -0.10568677634000778, -0.6377453207969666, -0.35971948504447937, 0.6067025065422058, -0.4617844223976135, 0.348235905170440...
var keys = bindingContext.ValueProvider.FindKeysWithPrefix(fullPropertyKey); if (keys != null && keys.Count() > 0) modelState = bindingContext.ModelState[keys.First().Key]; } // Only validate and bind if the property itself has no errors //if (modelState.Errors.Count ...
[ -0.15511584281921387, -0.3634273111820221, 0.8085396885871887, -0.14862707257270813, 0.32607150077819824, -0.16605736315250397, 0.4517028331756592, -0.6814091205596924, -0.07072476297616959, -0.4097956418991089, -0.4847464859485626, 0.8042638897895813, -0.42573025822639465, 0.2497231662273...
if (OnPropertyValidating(controllerContext, bindingContext, propertyDescriptor, newPropertyValue)) { OnPropertyValidated(controllerContext, bindingContext, propertyDescriptor, newPropertyValue); } //} // There was an error getting the value from the binder, which was probab...
[ -0.4683372974395752, -0.2541618347167969, 0.6163274049758911, 0.04088977351784706, 0.2852967083454132, -0.15786835551261902, 0.1235760748386383, -0.30280113220214844, -0.14031457901000977, -0.21049804985523224, -0.35161179304122925, 0.3738110363483429, -0.34568360447883606, 0.2850959599018...
if (modelState.Errors.Count != 0) { foreach (var error in modelState.Errors.Where(err => err.ErrorMessage == "" && err.Exception != null).ToList()) { for (var exception = error.Exception; exception != null; exception = exception.InnerException) { if (exception is FormatEx...
[ -0.2412973791360855, -0.12416645884513855, 0.3637256920337677, -0.15884117782115936, 0.530642032623291, 0.10248126834630966, 0.4535648226737976, -0.5379138588905334, -0.014863352291285992, -0.2996424734592438, -0.30808019638061523, 0.8050653338432312, -0.312784343957901, -0.114016532897949...
string displayName = GetDisplayName(propertyDescriptor); string errorMessage = InvalidValueFormatter(propertyDescriptor, modelState.Value.AttemptedValue, displayName); modelState.Errors.Remove(error); modelState.Errors.Add(errorMessage);
[ -0.34702861309051514, -0.08115258067846298, 0.18565510213375092, -0.21886436641216278, -0.04394588619470596, 0.14517268538475037, 0.5158170461654663, -0.28990697860717773, -0.10635453462600708, -0.38108518719673157, -0.49806976318359375, 0.49742376804351807, -0.5198118090629578, 0.32404723...
break; } } } } } } ``` I also modified it so that it **always** binds the data on the property no matter if it's valid or not. This way I can just pass the model back
[ 0.34327414631843567, 0.017442923039197922, 0.47217676043510437, 0.1332554817199707, 0.279832661151886, -0.22910159826278687, 0.24173417687416077, -0.2719189524650574, -0.2875944674015045, -0.20841875672340393, -0.12026426196098328, 0.31699857115745544, -0.37597641348838806, 0.2528950572013...
to the view withouth invalid properties being reset to null. **Controller Excerpt** ``` [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(ProfileViewDataModel model) { FormCollection form = new FormCollection(this.Request.Form); wsPerson service = new wsPerson(); Person newPerson = service.Select(1, ...
[ -0.16601142287254333, -0.5160905122756958, 0.8554016947746277, -0.13249090313911438, -0.09076765179634094, 0.2011416256427765, 0.22121192514896393, -0.4226168096065521, -0.3511628210544586, -0.6151841878890991, -0.2083401381969452, 0.5453929305076599, -0.17105670273303986, 0.35512715578079...
I solved this is as follows: **Example with nested DataAnnotations** ``` [Validation.MetadataType(typeof(PersonValidation))] public partial class Person : IPersonBindable { } //force partial. public class PersonValidation { [Validation.Immutable] public int Id { get; set; } [Validation.Required] publ...
[ -0.3953743875026703, -0.3157251179218292, 0.5403047800064087, 0.018400177359580994, -0.14835107326507568, 0.20814548432826996, 0.18542994558811188, -0.3511658310890198, -0.05541975423693657, -0.33654093742370605, -0.289308100938797, 0.3238745331764221, 0.08406231552362442, 0.07094814628362...
public string Value { get; set; } } ``` Now if I bind a form field to `[ViewDataModel.]Person.NearestGeographicRegion.Text` & `[ViewDataModel.]Person.NearestGeographicRegion.Value` the ModelState starts validating them correctly and DataAnnotationsModelBinder binds them correctly as well. This answer is not definiti...
[ -0.07992178201675415, 0.19372625648975372, 0.4501667022705078, 0.0018886857433244586, -0.16576145589351654, -0.22979050874710083, 0.3953125476837158, -0.4165574014186859, -0.11903250962495804, -0.5605006814002991, 0.19497375190258026, 0.2514442801475525, -0.29024291038513184, -0.0140780285...
Can anyone provide a Code Snippet, Tutorial link or information on how to create a report in Microsoft Report from a List of objects? I have the following Dog class: ``` namespace MyNS { public class Dog { public int Legs { get; set; } public string Name { get; set; } public string Breed { get...
[ 0.6253847479820251, 0.18793156743049622, 0.1518753170967102, 0.11609327048063278, -0.4471583962440491, 0.015584086999297142, 0.17493145167827606, -0.13392944633960724, -0.12327107787132263, -0.6594712734222412, 0.021259106695652008, 0.3664749562740326, -0.38668134808540344, -0.037296798080...
= new List<MyNS.Dog>(); // populate array here // and use it as datasource for ReportViewer ``` Any ideas? Thanks! For a local report, you can specify your data source like this: ``` var reportViewer = New ReportViewer(); var reportDataSource = New ReportDataSource("MyNS_Dog", MyDogs); reportViewer.LocalReport.Data...
[ 0.23355679214000702, -0.056627627462148666, 0.5814670920372009, -0.04578924924135208, -0.015745513141155243, -0.10260304808616638, 0.39505746960639954, -0.07546377182006836, -0.4060311019420624, -0.6458849310874939, -0.26219889521598816, 0.6159192323684692, -0.4275708794593811, 0.065686509...
When I ssh into my ubuntu-box running Hardy 8.04, the environment variables in my `.bashrc` are not set. If I do a source `.bashrc`, the variables are properly set, and all is well. How come `.bashrc` isn't run at login? `.bashrc` is not sourced when you log in using SSH. You need to source it in your `.bash_profile`...
[ 0.24400679767131805, 0.30893474817276, 0.2925470173358917, -0.21204210817813873, -0.05896729603409767, -0.3057454228401184, 0.41316235065460205, -0.17201940715312958, 0.04184592515230179, -0.7818679213523865, -0.22169412672519684, 0.629389762878418, -0.3482251763343811, 0.01196379028260707...
I have a (C#) class called Hit with an ItemID (int) and a Score (int) property. I skip the rest of the details to keep it short. Now in my code, I have a huge List on which I need to do the following select (into a new List): I need to get the sum of all Hit.Score's for each individual Hit.ItemID, ordered by Score. So ...
[ -0.05964083597064018, 0.25189241766929626, 0.34455060958862305, 0.2123844027519226, -0.3137146234512329, 0.39237940311431885, 0.3594631850719452, -0.3803001344203949, -0.246804878115654, -0.489743173122406, 0.03042222559452057, 0.5936670899391174, -0.08438601344823837, 0.12625397741794586,...
group h by new { h.ItemID } into hh select new { hh.Key.ItemID, Score = hh.Sum(s => s.Score) }).OrderByDescending(i => i.Score); ```
[ -0.38278523087501526, -0.19534403085708618, 0.5356159210205078, 0.0038068206049501896, 0.17056524753570557, 0.004814030136913061, 0.21979478001594543, -0.8162354826927185, -0.15778909623622894, -0.535595715045929, -0.49850356578826904, 0.31538158655166626, -0.40445584058761597, 0.356175690...
Any good links are highly appreciated! This goes to community wiki. Some good samples with the basic functionalities covered * [very simple uiscrollview demo](http://halmueller.wordpress.com/2008/10/08/a-very-simple-uiscrollview-demo/) * [Scrolling](http://developer.apple.com/iphone/library/samplecode/Scrolling/index....
[ -0.23894312977790833, -0.2505786418914795, 0.6223134994506836, 0.02841392531991005, -0.19951333105564117, 0.029069460928440094, 0.2753763198852539, -0.22734110057353973, -0.5795260667800903, -0.374347060918808, -0.0739612877368927, 0.5869739651679993, -0.203363299369812, -0.593458235263824...
I'm using Visual Studio Team Foundation Server 2008 Team Suite to create a webtest for a site. On some pages the response is a file download (usually a PDF), and I just need to test that the response comes back with the right status code and content type, ignoring the body. When I run the webtest in Visual Studio, or r...
[ 0.391778826713562, 0.13696607947349548, 0.21221640706062317, -0.015521609224379063, -0.28861305117607117, -0.10942613333463669, 0.24684132635593414, -0.17130514979362488, 0.03848054260015488, -0.7963545322418213, 0.00959727168083191, 0.6045265197753906, 0.013623319566249847, -0.25509661436...
was closed. ``` And the Details tab contains the exception: ``` System.IO.IOException: Unable to read data from the transport connection: The connection was closed. at System.Net.ConnectStream.EndRead(IAsyncResult asyncResult) at Microsoft.VisualStudio.TestTools.WebStress.DataCaptureStream.EndRead(IAsyncResult ...
[ -0.12167064845561981, -0.0729467049241066, 0.6768773198127747, -0.022893741726875305, -0.5104371309280396, 0.14411233365535736, 0.5715740919113159, -0.4967285692691803, -0.4983680546283722, -0.40308237075805664, -0.32391825318336487, 0.5393055081367493, -0.22572356462478638, -0.07934398204...
I was reading this morning the book [The Pragmatic Programmer](http://www.pragprog.com/the-pragmatic-programmer) Chapter 3 on Basic Tools every programmer should have and they mentioned Code Generation Tools. They mentioned one Perl script for C++ programs which helped automate the process of implementing the get/set()...
[ 0.5631130933761597, 0.11379306763410568, 0.03746498003602028, 0.2854296565055847, -0.14411437511444092, -0.2925237715244293, 0.10558890551328659, -0.11226435750722885, -0.08187402039766312, -0.36447736620903015, 0.06669185310602188, 0.44638657569885254, 0.02951154112815857, -0.014094631187...
declare and use properties conveniently: ``` // Declare your class containing a few properties class my_class { public: property<int> x; property<string> y; ... }; ... my_class obj; cout << obj.x(); // Get obj.y("Hello, world!"); // Set ``` Here is the code: ``` // Utility template to choos...
[ 0.051397137343883514, -0.024572249501943588, 0.36496952176094055, -0.17319193482398987, 0.03342130780220032, 0.15874464809894562, 0.2946588695049286, -0.40680742263793945, -0.0423288531601429, -0.926053524017334, -0.2530639171600342, 0.44976988434791565, -0.3688814043998718, 0.220369905233...
replace_void<D, property>::type derived_type; derived_type& derived() { return static_cast<derived_type&>(*this); } public: property() {} // May be safer to omit the default ctor explicit property(T const& v) : _v(v) {} property(property const& p) : _v(p._v) {} property& operator=(property const...
[ 0.26791512966156006, -0.35019001364707947, 0.4703027009963989, -0.23742914199829102, 0.3126266300678253, 0.16215743124485016, 0.2385043501853943, -0.6901062726974487, 0.22778582572937012, -0.3708997666835785, -0.47162023186683655, 0.9435113072395325, -0.5045726299285889, 0.0692119598388671...
v; } // Setter protected: // Default no-op check (derive to override) void check(T const& v) const { (void)v; //avoid unused variable warning} private: T _v; }; ``` `check()` is a function that tests whether the value being assigned is valid. You can override it in a subclass: ``` class nonnegative_i...
[ 0.32793793082237244, 0.0905475914478302, 0.12433841824531555, -0.050857026129961014, 0.28437069058418274, -0.22669735550880432, 0.2360193133354187, -0.583432674407959, 0.07967445254325867, -0.16046062111854553, -0.3399355411529541, 0.7384302616119385, -0.33627232909202576, 0.22834751009941...
0) { throw "Yikes! A negative integer!"; } } }; ``` There you have it -- all of the advantages of externally-generated getter/setter functions, with none of the mess! :) You could choose to have `check()` return a `bool` indicating validity instead of throwing an exception. And you could in p...
[ 0.22771351039409637, 0.2350272238254547, 0.03614163026213646, -0.0714002326130867, 0.14666438102722168, -0.31646034121513367, 0.3376651406288147, -0.24685347080230713, -0.12506352365016937, -0.15192556381225586, -0.24602991342544556, 0.5761445760726929, -0.32627302408218384, 0.195182576775...
of the class (e.g. by replacing the `property<int> x` member with a pair of `x()` methods), although binary compatibility is lost so users will need to recompile their client code whenever such a change is made. *This ability to painlessly incorporate future changes is actually the main reason people use getter/setter ...
[ 0.10089968144893646, -0.09578081965446472, -0.06841130554676056, 0.28349363803863525, -0.004707341082394123, -0.46863654255867004, 0.49972736835479736, 0.010239497758448124, -0.390488862991333, -0.6058761477470398, -0.3079621195793152, 0.3557577431201935, -0.5093218088150024, 0.28512772917...
I have about 50 images of 50 x 50 pixel size each. I want the user to pick one of them. So first I thought about an UITableView, but that's just not the right thing. It wastes a lot of screen space. Rather than putting all images one below the other, it would be better to show a grid of lets say 6 columns and n rows. ...
[ 0.6096872091293335, -0.0591348260641098, 0.6731645464897156, 0.0625198557972908, -0.22048860788345337, 0.26985302567481995, -0.21211421489715576, -0.12612763047218323, -0.21946236491203308, -0.9922488331794739, 0.35547757148742676, 0.3002147972583771, -0.19603316485881805, 0.35044926404953...
something very similar in my app- an NxN grid with an image underneath, and another subview on top to draw the "lines", all owned by a UIScrollView. I recommend having a separate view to draw the images, something like: ``` -(void) drawRect(CGRect rect) { CGRect smallerRect = CGRectMake(x, y, width, height); [...
[ 0.3942295014858246, -0.2846183478832245, 0.7045015096664429, 0.023780232295393944, 0.05155893787741661, -0.099116250872612, 0.11570055782794952, 0.06765004247426987, -0.1974877119064331, -0.7383490800857544, 0.2849315106868744, 0.5240839719772339, -0.25551390647888184, 0.1093161478638649, ...
need to set the following though: ``` [yourScrollView setUserInteractionEnabled: YES] [yourGridView setUserInteractionEnabled: YES] ```
[ 0.08210630714893341, 0.25167617201805115, 0.6543376445770264, 0.023147588595747948, 0.11694599688053131, -0.3498097360134125, 0.18100956082344055, -0.11854319274425507, -0.09473489224910736, -0.6326606273651123, 0.06406702846288681, 0.7111237645149231, 0.09340434521436691, -0.1682012975215...
I would like to trace performance inside a c# mobile application, in order to know the amount of time needed by some long-running methods. The goal is to know the performance at the level of methods. This tracing would be decided at runtime. First idea that came is to maintain a global variable "doWeHaveToTrace", to c...
[ 0.4928821325302124, 0.10143829137086868, 0.2406439185142517, 0.3399859666824341, 0.16453377902507782, -0.3188095688819885, 0.05030055716633797, -0.24459068477153778, 0.08919460326433182, -0.47601866722106934, 0.4633461534976959, 0.5825768113136292, -0.12269638478755951, 0.06037428602576256...
a variable has to be checked in each method, and the logger calls have to be coded. I also thought about aspect programming (insert tracing code in `before()` and `after()` methods), but I don't think aspect programming could be allowed inside this project. So I was wondering, is there any other good mechanisms that ...
[ 0.3587910830974579, -0.25661709904670715, 0.04222720116376877, 0.42387688159942627, -0.012603449635207653, -0.06428776681423187, 0.14849354326725006, -0.09411020576953888, -0.285870760679245, -0.1935497373342514, 0.20919913053512573, 0.49352625012397766, -0.2309449315071106, -0.00074604799...
better off hooking into the [.NET Profiling API](http://msdn.microsoft.com/en-us/library/bb384358.aspx). Here is a [tutorial on usage.](http://www.blong.com/Conferences/DCon2003/Internals/Profiling.htm) A commerical profiler would be another, simpler option.
[ 0.2391699254512787, -0.4841999113559723, 0.18631739914417267, 0.41430652141571045, -0.21504910290241241, -0.382582426071167, 0.11567361652851105, -0.19244693219661713, -0.1826939582824707, -0.4109051525592804, 0.12443749606609344, 0.47068294882774353, -0.24563615024089813, 0.00460212258622...
Another way to ask this question is: what is Inversion of Control according to you? I ask this question because the Wikipedia article on [IoC](http://en.wikipedia.org/wiki/Inversion_of_control) has been hijacked by a non-OO explanation. This is taken from the [discussion page](http://en.wikipedia.org/wiki/Talk:Inversi...
[ -0.04423213005065918, 0.10383925586938858, -0.09245168417692184, 0.3550041913986206, -0.2540477216243744, -0.42588505148887634, 0.017459003254771233, -0.07945960760116577, -0.4026305079460144, 0.04355436936020851, -0.05176588147878647, 0.05713751167058945, -0.26103541254997253, 0.203547045...
a concept like Inversion of Control since they have higher-order functions. Also, in the [article](http://martinfowler.com/articles/injection.html) where Martin Fowler elaborates on IoC he exclusively handles OO examples. So, is IoC exclusively an OO concept, and what is it exactly? To me, IoC tries to turn functio...
[ -0.02133222483098507, 0.12627948820590973, -0.22416913509368896, 0.41444340348243713, -0.0020909220911562443, -0.19646024703979492, -0.021464670076966286, -0.10792476683855057, -0.20171768963336945, 0.016498330980539322, -0.6218164563179016, 0.03995851054787636, -0.5184531807899475, -0.050...
concept. What's your answer? You look at the theoretical problem from a implementational viewpoint. The first question that arises should be **exactly what Control do you Invert** ? Then you will realize that it doesn't matter wether its an object, method, function or whatnot that is passed around, but what actually ...
[ 0.4929352104663849, 0.0028734062798321247, -0.10741275548934937, 0.5220178961753845, -0.07252675294876099, -0.3692491352558136, -0.030562734231352806, -0.11591576039791107, 0.019127532839775085, -0.4916423559188843, -0.1307292878627777, 0.7358670234680176, -0.3105029761791229, 0.1880618780...
a theoretical concept, and ofcourse, there can be different practical implementations of it.
[ 0.1868925541639328, 0.05281723290681839, -0.16525079309940338, 0.35139527916908264, 0.14085157215595245, 0.27758991718292236, -0.18286831676959991, -0.3033898174762726, 0.1392223834991455, -0.6038517355918884, -0.32339560985565186, 0.5552038550376892, 0.09150531888008118, 0.251229375600814...
I'm sure I have done this before in the past, but I've been in the docs for a bit, and can't seem to find it again. I need to be able to determine at run time in my business domain what context my application is running in. So that I may do some switching with config files, and use the proper method to determine if I a...
[ 0.14797547459602356, 0.060599587857723236, 0.3981940746307373, -0.07059827446937561, 0.13589997589588165, -0.3898507058620453, 0.4239133298397064, 0.0999416634440422, -0.15024177730083466, -0.8454623222351074, -0.23649165034294128, 0.5465840101242065, -0.3835912048816681, 0.244128152728080...
time.
[ 0.21704621613025665, -0.0339919738471508, 0.4872570037841797, 0.2487746626138687, 0.21128876507282257, 0.16310308873653412, -0.31121158599853516, 0.12122748792171478, -0.07917571812868118, -1.049433946609497, 0.3179613947868347, 0.004204780329018831, -0.05548129975795746, 0.604989767074585...
I can't wrap my head around the differences among these terms. Are COM and ActiveX synonyms? Is ActiveX object just a COM object that exposes IDispatch? Lots of older MSDN pages mention IDispatch without any COM context. Does it have a separate history, and was just introduced under the COM 'umbrella' later in its...
[ 0.27860069274902344, 0.06820705533027649, 0.28514364361763, 0.06379612535238266, -0.3572158217430115, -0.18282778561115265, 0.03433002904057503, 0.026985421776771545, -0.2403276562690735, -0.5262294411659241, -0.10283230245113373, 0.3629111349582672, -0.3575463593006134, 0.3797487020492553...
COM is that marketing had a field trip > day with the terminology. Rather then > helping to promote understanding, > you'll find in most cases it promotes > mystery. ... OLE, ActiveX, Remotable > Objects - which one means what this > week? ... > > > COM evolved out of the solution to a > specific problem - how...
[ 0.27450916171073914, -0.20766253769397736, 0.453572541475296, -0.158744677901268, -0.36215686798095703, 0.03721395507454872, -0.1648460179567337, 0.20996835827827454, -0.32864144444465637, -0.6644411087036133, 0.07648685574531555, 0.3747243285179138, -0.4347650110721588, 0.1485309898853302...
release of OLE (OLE2), > its creators modified OLE32.DLL to > expose more of the basic functionality > of OLE so that its API could be used > to allow any application to acess the > functionality of another. This API, > which hasn't changed much since 1993, > is what is considered to be the COM > API. > ... >...
[ -0.22585798799991608, -0.14869463443756104, 0.7201172113418579, -0.05097215250134468, -0.1411256045103073, 0.06719047576189041, 0.04970609024167061, -0.14538094401359558, -0.3073793053627014, -0.5367118120193481, 0.1301766186952591, 0.3870229423046112, -0.7967987656593323, 0.12142455577850...
in Visual C++ to be > accessible to Visual Basic > applications. Eventually this same > technology was used to allow a control > to be downloaded and used by your web > browser. At this point, the name > changed to ActiveX controls or just > plain ActiveX purely for marketing > reasons. Although you can package...
[ 0.2044716477394104, -0.0753369852900505, 0.496110737323761, -0.1701766401529312, -0.20024989545345306, 0.10571743547916412, -0.1577170491218567, 0.3361755311489105, -0.11781463772058487, -0.5436376333236694, -0.11052791774272919, 0.4533814787864685, -0.7196665406227112, 0.12557411193847656...
control? - but its enough to let it go. Thanks for your answers!
[ -0.030139029026031494, -0.18679873645305634, 0.33308857679367065, 0.9044769406318665, 0.025935713201761246, -0.06835547834634781, -0.1063011959195137, -0.19171908497810364, 0.12076378613710403, -0.020377807319164276, -0.0624069981276989, 0.36447861790657043, -0.17117883265018463, -0.002896...
I need to write a program that, when minimized, lives in the System Tray, and I'll use Java 6's SystemTray API to do that. **How can I make that application comes to the foreground when the user presses some hotkey?** For example, the app is running but minimized. When the user presses CTRL-SHIFT-Y or something (or, ...
[ 0.3520081043243408, 0.08772081881761551, 0.24992267787456512, -0.16784003376960754, -0.09300291538238525, -0.024697320535779, 0.26061639189720154, -0.07191508263349533, -0.2577020525932312, -0.8935027122497559, -0.1736137717962265, 0.7306572794914246, -0.24282880127429962, -0.0331831909716...
check out [an example](http://www.codingforums.com/showthread.php?t=147913). Here's [another nice example](http://forums.sun.com/thread.jspa?threadID=632369) from Sun's forums.
[ 0.5122502446174622, 0.00939498096704483, -0.1290169209241867, 0.16954320669174194, 0.04227018356323242, -0.3065718710422516, 0.11860223114490509, 0.26772624254226685, -0.5539242029190063, -0.5555166602134705, -0.13166414201259613, -0.05700329691171646, -0.41903507709503174, 0.1860746294260...
Can anyone help, seem to have an issue placing a onclick event of an anchor tag, it works on an image.. I have this ``` this.whereAreWe = document.getElementById('where_are_we'); this.whereAreWe.onclick = this.whereAreWe; ``` I have placed a A tag using the id of "where\_are\_we" ... but it never executes.. if I ch...
[ 0.18912765383720398, 0.05569307506084442, 0.47136548161506653, -0.011546357534825802, 0.3022277057170868, -0.04079946130514145, 0.43140822649002075, -0.18740272521972656, -0.1614033579826355, -0.6951408982276917, -0.19538797438144684, 0.6317806243896484, -0.28785574436187744, -0.0059372233...
using the anchor it doesn't Any ideas? > I also tried removing the href, If i remove the href it doesn't show me the little hand icon. You need the 'href' attribute for the 'a' tag in order to specify the URL of the destination document or web resource. In case you do not specify it - mouseover doesn't change the cur...
[ 0.1002194955945015, -0.12215359508991241, 0.5989289879798889, 0.0068575856275856495, -0.10103247314691544, 0.07930849492549896, 0.013374530710279942, 0.009973541833460331, -0.07841244339942932, -0.4367445409297943, 0.062239229679107666, 0.5155079364776611, -0.311683714389801, 0.19163282215...
It seems as if the jboss teams doesn't want to say that the Java 6 compile of Jboss AS 4.2.3 is a GA, they write that it shouyld be considered expiremental. Anyone using it in production? we're using it in test and plan to move it to prod as it hasn't shown any problems. > I also tried removing the href, If i remove ...
[ 0.18504539132118225, 0.13776199519634247, 0.37898993492126465, -0.3966919779777527, -0.1941763460636139, -0.16952328383922577, 0.40652257204055786, -0.16923947632312775, -0.12336303293704987, -0.24353712797164917, -0.11227075010538101, 0.5389707088470459, -0.34530383348464966, 0.3271285593...
it - mouseover doesn't change the cursor. Of course you could use CSS to modify that but that is a different question.
[ -0.2846730053424835, -0.05753830447793007, 0.2649124264717102, 0.3506315350532532, 0.0611807145178318, -0.14760297536849976, 0.1681881844997406, 0.4514300525188446, 0.0156059879809618, -0.3685414493083954, -0.13572032749652863, 0.42724722623825073, -0.2568355202674866, 0.0710764154791832, ...
I use Mathematica with JLink for a research project, which involves a lot of computation. Mathematica is used as a graphical frontend for entering the parameters, and later plotting the results. The actual algorithms are located in Java Classes, which are called via JLink. The "link" is an instance named evalFrontend....
[ -0.11985442042350769, -0.20854723453521729, 0.5908178091049194, 0.25933220982551575, -0.16300565004348755, -0.13385401666164398, 0.47127416729927063, -0.21506066620349884, -0.07966388016939163, -0.6338475346565247, -0.1277221292257309, 0.6583325862884521, -0.0910186916589737, -0.1392946392...
not responding to a dynamic evaluation. You can either choose to abort and restart the kernel or continue waiting. [..] While this is displayed, Java is still running. However, after some more time, another dialog is displayed: > Disable Dynamic: On or more dynamic objects are taking excessively long to finish evalua...
[ -0.1469724029302597, -0.18971562385559082, 0.3683082163333893, 0.021938219666481018, -0.1879124939441681, -0.02319762483239174, 0.8066117167472839, -0.003973162733018398, -0.22297170758247375, -0.5247992277145386, -0.35954365134239197, 0.649354100227356, -0.6098312735557556, 0.083827622234...
I'm trying to get notepad++ to regex find all instances of "abc" and "def" in the following sentence: > The abc went to the def. None of the following syntaxes seem to work: * abc|def * [abc|def] * (abc)|(def) * (abc|def) NOTE: "[a|d]" matches any instance of "a" or "d" when I tested Upgrade to Notepad++ v6. From t...
[ 0.1540258824825287, 0.13399910926818848, 0.2212669551372528, -0.12166128307580948, -0.04542781412601471, 0.18406206369400024, 0.6606020927429199, -0.2635866403579712, -0.09424350410699844, -0.628940999507904, -0.014164125546813011, 1.0078489780426025, -0.2294628769159317, -0.07319079339504...
How can I use Dev C++ to compile C source file. I thought it would automatically do it, but for some reason it compiles with several errors and I think its because you have to make changes for it to compile a C file. **Example test code:** ``` #include <stdio.h> main () { int i,j; double x,x_plus_one(); cha...
[ 0.5964638590812683, -0.09478944540023804, 0.2436351478099823, -0.25946149230003357, -0.09166678041219711, -0.041014574468135834, 0.5375232696533203, -0.4004019796848297, 0.14059899747371674, -0.601958155632019, -0.09005294740200043, 0.8174812197685242, -0.4728389084339142, -0.0035018152557...
int j; { return (2*j + 3); } ``` That is pre-ANSI code. I'm not sure the gcc compiler supports it, and in any case it is bad practice to use it. Change your function to: ``` double x_plus_one( double x) { x = x + 1; return (x); } ``` and you will need to declare it as: ``` double x_plus_one( do...
[ 0.4349006414413452, -0.014299427159130573, 0.11767226457595825, -0.6035669445991516, -0.18213635683059692, -0.31536173820495605, 0.36925432085990906, -0.014983211643993855, -0.131484717130661, -0.349796324968338, -0.23783306777477264, 0.69671630859375, -0.8121070861816406, 0.00721704261377...
How do you set a field to DBNull in Entity Framework? The fields are strongly typed so you cannot set it equal to DBNull.Value and I did not find any method to set a field to DBNull. It seems like this is a necessary thing to do, but after much Google research I found nothing about it. I am trying to set a datetime fi...
[ 0.22582772374153137, -0.29199543595314026, 0.4599296748638153, -0.1637655347585678, -0.03711614012718201, -0.22761380672454834, -0.009744834154844284, -0.0502081997692585, -0.17751304805278778, -0.39505621790885925, 0.16163849830627441, 0.3515903651714325, -0.35557493567466736, 0.313718736...
in SQL Server. If a column is nullable in the database the result class will have a nullable property too. For example if a `Order` table has a nullable `Datetime` column called `CreatedDate`, then the resulting `Order` class will looks something like this: ``` public partial class Order: EntityObject { ... priva...
[ 0.1742568016052246, -0.04453500360250473, 0.15117774903774261, -0.11698465049266815, 0.09549854695796967, -0.15210120379924774, 0.1488315910100937, 0.07466790825128555, -0.25368237495422363, -0.6785171627998352, -0.16756732761859894, 0.14356744289398193, -0.4129596948623657, 0.319598317146...
A process on my Linux system, strace tells me, is talking on a socket which has file descriptor 10. lsof tells me that this is a unix socket with inode 11085, and netstat further tells me that inode 11085 a stream socket, and that it's connected. Given that this process doesn't have any other threads, there must there...
[ 0.07481767237186432, 0.06124304234981537, 0.32142746448516846, -0.14120864868164062, 0.10140527039766312, 0.06717967242002487, -0.022482600063085556, 0.3743952512741089, -0.5776280164718628, -0.7096474170684814, -0.03983057662844658, 0.13900123536586761, -0.11771804839372635, 0.49971443414...
the socket is not owned by the kernel itself.)
[ 0.261602520942688, 0.04689091071486473, -0.01775337941944599, 0.15404772758483887, -0.00399653660133481, 0.36912253499031067, 0.0910017192363739, 0.5221737623214722, 0.2486496865749359, -0.13209907710552216, -0.35608533024787903, 0.43854379653930664, -0.23811215162277222, 0.277679204940795...
I wonder if and how it's possible to control the RS-232 handshaking lines directly from win32 (the old C-API). I'd like to interface with an external piece of hardware, and two simple data-lines would be sufficient for my needs. So - is there a API for win32 that lets me read and write the state of the four status ...
[ 0.24013961851596832, 0.16212888062000275, 0.6494115591049194, 0.4162352681159973, -0.17521406710147858, 0.08574718981981277, -0.13711735606193542, 0.18341878056526184, -0.25984448194503784, -0.31708094477653503, 0.11183452606201172, 0.7183435559272766, -0.24214467406272888, 0.0978632420301...
somehow? You can control RTS and DTR using `SetCommState()`. You can also set things up to have hardware or the driver handle hardware flowcontrol (CTS and/or DSR), or you can set things up using `SetCommMask()` so you get events when those signals change. A decent overview is here: <http://msdn.microsoft.com/en-us/li...
[ 0.35836705565452576, -0.3096258044242859, 0.35287633538246155, 0.4191973805427551, 0.29492005705833435, -0.37619227170944214, 0.21646974980831146, -0.09167560935020447, -0.3624565005302429, -0.5803677439689636, -0.1753169447183609, 0.656895101070404, -0.21788226068019867, 0.081784866750240...
I have the following classes: ``` abstract class DTO{ } class SubscriptionDTO extends DTO { } ``` and the following generic method: ``` protected void fillList(ResultSet rs, ArrayList<? extends DTO> l) throws BusinessLayerException { SubscriptionDTO bs; try { while (rs.next()){ ...
[ 0.37901508808135986, -0.06311848759651184, 0.5387794375419617, -0.30575114488601685, 0.0576070137321949, -0.08306341618299484, 0.09307033568620682, -0.3421018719673157, 0.11261053383350372, -0.6319558024406433, -0.13056938350200653, 0.4183547794818878, -0.45822736620903015, 0.2424822002649...
e.printStackTrace(); } } ``` I can't seem to understand why you can't create a generic method for filling DTO subtypes. Am I doing something wrong or is this by design? If so, is there any workaround? Thanks in advance. You should be using `<? super DTO>` (or `<? super SubscriptionDTO>`, as [Tom Hawtin - tacklin...
[ 0.4013073444366455, -0.22151227295398712, 0.29219701886177063, 0.1164378747344017, -0.19856929779052734, -0.08032432943582535, 0.2125866562128067, -0.24080441892147064, -0.3858029246330261, -0.38605955243110657, -0.15025489032268524, 0.2775786221027374, -0.5110635161399841, 0.0632180348038...
> > In other words, if a parameterized type represents a `T` producer, use `<? extends T>`; > if it represents a `T` consumer, use `<? super T>`. In this case, `l` is a consumer (you are passing objects to it), so the `<? super T>` type is appropriate.
[ 0.3718685507774353, -0.3934457302093506, 0.055792976170778275, -0.17580439150333405, -0.19027014076709747, 0.2531399428844452, -0.1865866631269455, 0.13734011352062225, 0.04929034411907196, -0.5777096748352051, -0.6346212029457092, 0.4969434142112732, -0.34918415546417236, 0.44772416353225...
I'm trying to implement basic auditing with some of my models (like CreatedAt, UpdatedAt, CreatedBy and UpdatedBy). The date/time part is done. I'm throwing events on my models when a property is changed (implementing `INotifyPropertyChanging, INotifyPropertyChanged`) and can update the correspondent fields just fine....
[ 0.30676063895225525, -0.04069972038269043, 0.5651712417602539, 0.0867631807923317, -0.05037105455994606, -0.21865472197532654, 0.29332229495048523, -0.12576410174369812, -0.2340852916240692, -0.8092243075370789, 0.1782010942697525, 0.4792746603488922, -0.03755863755941391, 0.18682497739791...
I have a a low pass filter described by the following transfer function: h[n] = (w\_c/Pi) \* sinc( n \* w\_c / Pi ), where is w\_c is the cutoff frequency I have to convert this low-pass filter to a band-pass filter. You `h[n]` transforms into a `rect` in frequency domain. To make it band pass you need to move its ce...
[ -0.2062411606311798, -0.618954598903656, 0.4726918637752533, -0.424622505903244, -0.21672168374061584, 0.21550782024860382, -0.11926174908876419, -0.6038231253623962, 0.15690788626670837, -0.8661174178123474, 0.019587496295571327, 0.611743152141571, -0.353315532207489, 0.17406408488750458,...
`w_offset`, the multiplication shifts the `H(w)` by `w_offset`. See [Discrete Time Fourier Transform](http://en.wikipedia.org/wiki/DTFT) for more details. **Note**: such a filter will not be symmetric about 0, which means it will have complex values. To make it symmetric, you need to add `h[n]` multiplied by `exp(-j...
[ 0.10982894152402878, -0.36519932746887207, 0.4746900200843811, -0.1872618943452835, -0.16225604712963104, -0.07597047835588455, -0.009889594279229641, -0.5816908478736877, -0.04889289662241936, -0.8143517971038818, -0.20417314767837524, 0.5517299771308899, -0.3897234797477722, 0.0615775398...
I am using CodeCharge Studio to finish a large PHP application. This question isn't really CCS related, but a bit more general. I have a web form that is supposed to allow CRUD capabilities with a certain SQL Server table, but the Inserts keep failing without throwing any errors. What would be the best way to debug thi...
[ 0.6278331875801086, 0.3013033866882324, 0.0404617004096508, 0.15230463445186615, -0.15059472620487213, -0.25408145785331726, 0.14593049883842468, -0.08445874601602554, 0.013466833159327507, -0.3407996594905853, 0.4727044403553009, 0.43494850397109985, -0.14499002695083618, 0.22603787481784...
that way you don't have to display the query directly on your page, but instead in a log file.
[ 0.2990293800830841, 0.06685291230678558, 0.2885500490665436, 0.2975616157054901, -0.02336658537387848, -0.37842094898223877, -0.0691225677728653, 0.03127782791852951, -0.24089093506336212, -0.6248612403869629, -0.3082146942615509, 0.1383070945739746, 0.0742470994591713, 0.2760665714740753,...
I have the matrix system: A x B = C `A` is `a` by `n` and `B` is `n` by `b`. Both `A` and `B` are unknown but I have partial information about `C` (I have some values in it but not all) and `n` is picked to be small enough that the system is expected to be over constrained. It is not required that *all* rows in `A` o...
[ 0.026637524366378784, 0.1658017635345459, 0.16655047237873077, -0.09372705966234207, -0.054723337292671204, 0.223213329911232, -0.04341984912753105, -0.4009019732475281, -0.18461693823337555, -0.5956124663352966, 0.2627391219139099, 0.27467384934425354, -0.16529084742069244, 0.244207456707...
solution but all I want is one of the best solutions) --- To make a concrete example; all the a's and b's are unknown, all the c's are known, and the ?'s are ignored. I want to find *a* least squares solution only taking into account the know c's. ``` [ a11, a12 ] [ c11, c12, c13,...
[ -0.46694618463516235, 0.2947194576263428, 0.15087328851222992, 0.09090381860733032, 0.09408371895551682, 0.13905729353427887, 0.37197527289390564, -0.5808066725730896, -0.2568748891353607, -0.41469067335128784, -0.20630085468292236, 0.11186639219522476, -0.45312342047691345, 0.085259273648...
[ b11, b12, b13, b14, b15] [ c21, c22, c23, c24, c25 ] [ a31, a32 ] x [ b21, b22, b23, b24, b25] = C ~= [ c31, c32, c33, ?, c35 ] [ a41, a42 ] [ ?, ?, c43, c44, c45 ] [ a51, a52 ]
[ -0.2730875611305237, 0.2988251745700836, 0.19859787821769714, 0.01326224859803915, -0.055935636162757874, 0.904851496219635, 0.29103899002075195, -0.37577658891677856, -0.4281477630138397, -0.557299017906189, -0.35554543137550354, 0.005793960299342871, -0.14463648200035095, 0.2855933606624...
[ c51, c52, c53, c54, c55 ] ``` --- Note that if B is trimmed to b11 and b21 only and the unknown row 4 chomped out, then this is almost a standard least squares linear regression problem. I have no idea on how to deal with your missing values, so I'm going to ignore that problem. There are no unique solutions. To...
[ 0.16267073154449463, 0.11782755702733994, -0.05881710350513458, -0.09886839985847473, 0.09815152734518051, 0.24916303157806396, -0.03944305703043938, -0.28800925612449646, -0.4301896393299103, -0.33907365798950195, 0.16939282417297363, 0.35169506072998047, -0.2534956932067871, 0.4183466136...
metric to judge them by. I'm going to suppose you want to use a least squares metric, i.e. the best guess values of A and B are those that minimize sum of the numbers [C\_ij-(A B)\_ij]^2. One thing you didn't mention is how to determine the value you are going to use for n. In short, we can come up with 'good' solutio...
[ -0.17044861614704132, 0.07766274362802505, 0.3093714714050293, 0.09650905430316925, -0.09496734291315079, 0.2226007729768753, 0.04223908111453056, -0.3208470940589905, -0.32608693838119507, -0.7798753380775452, 0.06586915999650955, 0.5654281377792358, -0.07504591345787048, 0.05558477342128...
would write 1 <= rank(span(C)) <= min(a,b). Now, supposing that you have chosen n such that 1 <= n <= b. You are going to minimize the residual sum of squares if you chose the columns of A such that span(A) = span(First n eigen vectors of C). If you don't have any other good reasons, just choose the columns of A to be...
[ -0.037183959037065506, -0.3312625586986542, 0.3049863576889038, -0.07873855531215668, -0.23457825183868408, 0.38019588589668274, 0.13454793393611908, -0.6827729344367981, -0.149039164185524, -0.5480154752731323, 0.05083335563540459, 0.5819690227508545, -0.2318473607301712, 0.09807551652193...
I have a design problem which I would like some input on. Here are the constraints: 1. Each user must have a working e-mail address when registering their account. When registering their user account an activation email should be sent, containing a link with an activation code which must be followed for the account to...
[ 0.5816639065742493, 0.45880240201950073, 0.840494692325592, -0.07006202638149261, 0.21290168166160583, 0.0946851521730423, -0.07077302783727646, -0.029018234461545944, -0.3090280592441559, -0.5972558856010437, -0.3476865887641907, 0.24596667289733887, -0.22572390735149384, 0.02336277812719...
with each other, but only if the companies first users are activated (i.e. they clicked their respective activation links after registering). Here is a small UML-diagram of how it could be solved: [![alt text](https://i.stack.imgur.com/57X9f.png)](https://i.stack.imgur.com/57X9f.png) In the above diagram some detail...
[ -0.10204942524433136, -0.12261677533388138, 0.3427217900753021, 0.008848925121128559, 0.14323976635932922, 0.016432680189609528, 0.07162579149007797, -0.09282944351434708, -0.2069423347711563, -0.6284689903259277, -0.004493182525038719, 0.3869597315788269, -0.30424201488494873, 0.294212877...
account isn't activated after a certain time it should be removed. If it was the first user, which also created the users Company and Office both of these should be removed too. Do we need NotActivatedOffice and NotActivatedCompany as well? (For clean separation in the database.) How would you design this kind of solu...
[ -0.0882411077618599, 0.07798305153846741, 0.2269744575023651, 0.15664386749267578, 0.025008510798215866, -0.20303820073604584, 0.20325061678886414, 0.005133356899023056, -0.3694831132888794, -0.5032777786254883, 0.12007559090852737, 0.46616458892822266, -0.44494274258613586, 0.265368193387...
may wish to model the Activation with a class instead of polluting the User class with activation related attributes. This way you get a nice and clean object model. At the database level you can still decide to store the two objects in the same table/record, known as [Component mapping](http://docs.jboss.org/hiberna...
[ 0.16614997386932373, -0.0976424366235733, 0.6801900863647461, -0.07917369902133942, -0.27079540491104126, -0.1603904664516449, 0.20366701483726501, -0.4985054135322571, -0.1895812451839447, -0.7006579637527466, -0.13857930898666382, 0.48204946517944336, -0.24480454623699188, 0.002193777821...
attributes: * activationCode (string) * sentOn (when was the email sent) * activatedOn (defaults to null, set to current date/time when the user clicks the activation link, tells the system if the user has activated his account when not null) You could use an HQL Query to know which company has at least one activate...
[ -0.14303341507911682, -0.019512824714183807, 0.5550752878189087, -0.07136677205562592, 0.10588699579238892, 0.21348336338996887, -0.06102835014462471, 0.14456042647361755, -0.3725133240222931, -0.7116174101829529, -0.0376269705593586, 0.4532410800457001, -0.3445199131965637, 0.066377870738...
table has a foreign key to a User record. By modeling the relationship this way, you may change the Administrator of an Office (example, he left or got fired from the Office/Company). It all depends on your use cases ... I also added a sentOn attribute to the Activation class used to cleanup inactivated account afte...
[ -0.1880710870027542, 0.022063123062253, 0.41497188806533813, 0.0751207023859024, 0.261832594871521, 0.07112889736890793, -0.1041276827454567, 0.14887988567352295, -0.3248876631259918, -0.7007842659950256, -0.0474238283932209, 0.17399361729621887, -0.20475712418556213, 0.24036414921283722, ...
What is the simplest way in WPF to enable a `Button` when the user types something into a `TextBox`? Use the Simple Command ``` <TextBox Text={Binding Path=TitleText}/> <Button Command="{Binding Path=ClearTextCommand}" Content="Clear Text"/> ``` Here is the sample code in the View Model ``` public class MyViewMode...
[ -0.12919187545776367, -0.41270342469215393, 0.5386501550674438, -0.02648448385298252, 0.13339626789093018, -0.09135247021913528, 0.02895069681107998, -0.3361968696117401, -0.017005357891321182, -0.7066397070884705, -0.31645309925079346, 0.5967158079147339, -0.1710936278104782, -0.040647283...
if (value == _titleText) return; _titleText = value; this.OnPropertyChanged("TitleText"); } } public MyViewModel() { ClearTextCommand = new SimpleCommand {
[ -0.24026380479335785, -0.26325589418411255, 0.5923862457275391, -0.21854868531227112, 0.31808987259864807, -0.2320401817560196, 0.5265305042266846, -0.08272307366132736, 0.07214316725730896, -0.6640756726264954, -0.515036404132843, 0.7251834869384766, -0.14257894456386566, 0.41409862041473...
ExecuteDelegate = x => TitleText="", CanExecuteDelegate = x => TitleText.Length > 0 }; } public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler =
[ 0.39830729365348816, -0.4207195043563843, 0.0032861055806279182, 0.005303549580276012, 0.3381779193878174, 0.058360062539577484, 0.6085228323936462, -0.36483144760131836, -0.14114072918891907, -0.02492646872997284, -0.18345606327056885, 0.4604489207267761, -0.28352656960487366, 0.490839481...
this.PropertyChanged; if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName)); } } ``` For more information see Marlon Grechs [SimpleCommand](http://marlongrech.wordpress.com/2008/11/26/avoiding-commandbinding-in-the-xaml-code-behind-files/) Also check out the MVVM...
[ -0.09583843499422073, -0.3122805058956146, 0.40416988730430603, -0.0024065079633146524, -0.16689857840538025, -0.3185022175312042, 0.2636844217777252, -0.42447689175605774, -0.36744406819343567, -0.4288141429424286, -0.06963701546192169, 0.41277122497558594, -0.5682677626609802, 0.36231043...
Are there any open source frameworks to help build a .NET GUI? I would also be fine with free frameworks. There are quite a few of them. Most of the larger ones are [listed here](http://mono-project.com/Gui_Toolkits).
[ 0.78557288646698, 0.1227775290608406, -0.3132586181163788, 0.2463497519493103, -0.06324440240859985, -0.19970840215682983, -0.0012421447318047285, 0.09072975069284439, -0.36951231956481934, -0.43177956342697144, 0.11570624262094498, 0.744558572769165, -0.32027295231819153, -0.0481109656393...
I've got a `shared` class (`static` in C#) which mostly carries some settings data that any class in the application can read and sometimes write. Also there are some static properties which holds some internal states. Now I want to revert this class to initial stage of it. With all default variables etc. *Assume that...
[ 0.11593598127365112, 0.01167030818760395, 0.3805456757545471, -0.0005849885055795312, 0.20401844382286072, -0.11898370087146759, 0.4687730073928833, 0.09939531981945038, -0.2894623279571533, -0.6932114958763123, -0.13866578042507172, 0.6898945569992065, -0.231244295835495, 0.34777563810348...
Is there any idea about how can I accomplish this? Or should I switch **back** to Singleton? There is no way to do it in the same way the singleton model you just pointed out. The reason being that there is no backing data store to "reset". What you could do though is simulate this by using an explicit method to initia...
[ 0.28798234462738037, -0.032467830926179886, 0.16991554200649261, -0.008244629018008709, 0.18102334439754486, 0.009060860611498356, 0.28808414936065674, -0.3052505850791931, -0.29368340969085693, -0.574533998966217, 0.04997086897492409, 0.7188794016838074, -0.35210728645324707, 0.2030926942...
with a class vs. a module ```vb Public Class MyClass Shared Sub New() Reset End Sub Private Sub New() ' Prevent instantiation of the class End Sub Public Sub Reset() Field1 = 42 Field2 = "foo" End Sub Public Shared Field1 As Integer Public Shared Field2 As String End Class ```
[ -0.014487055130302906, -0.0791279673576355, 0.1670088917016983, -0.17883972823619843, -0.033695533871650696, -0.060904789716005325, 0.3932129740715027, -0.3287147283554077, -0.20753033459186554, -0.16337312757968903, -0.3388526439666748, 0.5544754862785339, -0.3244403302669525, 0.304216116...
I have a Merge Replication setup between a central server and 200 clients. The vast majority of the clients do not need all 5000 client records. Only the 50 or so that are assigned to them. How would I go about applying a Filter based on who's logged in? Should I create a NEW DB that maps user names to Client Records ...
[ 0.6691869497299194, 0.2068672776222229, 0.10315708816051483, 0.1711491495370865, -0.2577616274356842, -0.03394864872097969, 0.15787382423877716, -0.1656697690486908, -0.23826009035110474, -0.5872161388397217, 0.3771430253982544, 0.19528912007808685, -0.053257763385772705, 0.329201459884643...
the designers were thinking in set-based terms, they didn't think that the ordinary type of debugging that other languages have is important. However, I think some of this is changing. You can set breakpoints in SQL Server 2008. I haven't used it really as you must have SQL Server 2008 databases before it will work and...
[ -0.10023228079080582, 0.14901916682720184, 0.2043386995792389, 0.10275814682245255, -0.26779305934906006, -0.27876850962638855, 0.34004130959510803, 0.021091431379318237, -0.24603456258773804, -0.30388975143432617, -0.11404778808355331, 0.34261852502822876, -0.4233056604862213, -0.16128095...
but it can't point out exactly where as it is all one command. Personally when I am writing a long procedural SP, I build in a test mode that includes showing me the results of things I do, the values of key variables at specific points I'm interested in, and print staments that let me know what steps have been compl...
[ 0.3354490101337433, 0.0005185594200156629, 0.1926073133945465, 0.20054937899112701, -0.1483662873506546, 0.031434718519449234, 0.15137030184268951, -0.10490933060646057, -0.13907699286937714, -0.3824006915092468, 0.09986456483602524, 0.5472010970115662, 0.22353073954582214, -0.231971472501...
wrong. I find this very useful. It can vastly increase the size of your proc though. I have a template I use that has most of the structure I need set up in it, so it doesn't really take me too long to do. Especially since I never add an insert. update or delete to a proc without first testing the associated select to ...
[ 0.5397775769233704, 0.27648258209228516, 0.104000523686409, -0.1262616068124771, 0.307984858751297, -0.16047219932079315, -0.05480159819126129, 0.308614581823349, -0.2505670189857483, -0.3503227233886719, 0.2062668353319168, 0.47823670506477356, -0.19437262415885925, 0.28097766637802124, ...
I noticed this code when i was playing around with smallbasic showing it to a freind that it has a built in option to download a image from fliker based on a keyword I was wondering if someone had an example in C# of doing this so that i can get an idea of how to use the api. Try moving the line: ``` webBrowser1.Docu...
[ 0.6627359986305237, -0.07155876606702805, 0.7062724232673645, -0.17175538837909698, 0.07202637195587158, -0.3658654987812042, 0.36113253235816956, -0.09094852954149246, -0.22821025550365448, -0.5018110275268555, 0.1833367943763733, 0.7626640200614929, -0.4446941316127777, 0.242859035730361...
be ok. **UPDATE:** Tried your sample, and your event handler IS getting called, however I suspect it's being called from another thread. Therefore, it gets to the line where the Exception is thrown, but you're never actually seeing it, because it's in another thread. Take out the line that throws the exception, and re...
[ 0.5671135783195496, -0.21367846429347992, 0.38097912073135376, -0.07117169350385666, 0.35036590695381165, -0.36461710929870605, 0.7099679112434387, 0.03793606162071228, -0.08489274233579636, -0.6810473203659058, -0.16424745321273804, 0.8445263504981995, -0.5479722619056702, -0.152923867106...
One part of domain-driven design that there doesn't seem to be a lot of detail on, is how and why you should isolate your domain model from your interface. I'm trying to convince my colleagues that this is a good practice, but I don't seem to be making much headway... They use domain entities where ever they please in...
[ 0.4060637652873993, 0.05712946504354477, 0.2244124859571457, 0.11766203492879868, -0.06572253257036209, -0.15584591031074524, 0.07724165171384811, 0.2787313759326935, -0.12043590098619461, -0.600177526473999, 0.2870551645755768, 0.719982922077179, -0.43360936641693115, 0.35515618324279785,...
because now you have a UI object to maintain as well as the original domain object. So I'm looking for some concrete reasons I can use to back this up. Specifically: 1. Why should we not use domain objects in our presentation layer? (if the answer is the obvious one, 'decoupling', then please explain why this is ...
[ 0.3048486113548279, 0.15441451966762543, 0.33726510405540466, 0.1504432111978531, -0.12251242250204086, -0.17006812989711761, 0.17170193791389465, 0.033011727035045624, -0.34557753801345825, -0.5185166597366333, -0.04289811849594116, 0.4594517648220062, -0.41005000472068787, 0.461989015340...
represent them properly. Yes, initially it looks like there is a lot of overlap between the implementation of the two types of objects. The problem is, as time goes on, things get added on both sides. Presentation changes, and the needs of the presentation layer evolve to include things that are completely independent ...
[ 0.578606903553009, 0.20582030713558197, 0.37646952271461487, 0.27659177780151367, 0.07896343618631363, 0.20105057954788208, 0.23150630295276642, -0.05137019231915474, -0.4497317373752594, -0.8390873670578003, 0.018193228170275688, 0.5799893140792847, -0.4629300534725189, 0.2584214806556701...
way to approach things is through the strictly enforced interface paradigm; that is, your business object layer exposes an interface that is the only way that it can be communicated with; no implementation details (i.e. domain objects) about the interface are exposed. Yes, this means that you have to implement your dom...
[ 0.0785248652100563, -0.06977448612451553, 0.6035407781600952, -0.02079145237803459, 0.04507219046354294, -0.12585945427417755, 0.4675919711589813, -0.018648356199264526, -0.3213396668434143, -0.8557100892066956, -0.25186866521835327, 0.38635149598121643, -0.22426173090934753, -0.2087750136...
I have a WIX file that I need to modify using MSBuild. It starts like this: ``` <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"> <?--... Removed Params ...--> <?define ProductVersion = "1.0.1"?> <?--......
[ 0.3203568756580353, 0.11348184198141098, 0.7198425531387329, -0.4772036671638489, 0.0028566259425133467, 0.159641832113266, 0.27860257029533386, -0.4187961220741272, 0.21161724627017975, -0.9109235405921936, -0.1938496083021164, 0.42555296421051025, -0.2951402962207794, 0.2261343151330948,...
reference that via XPath so I can use the SDC SetValue MSBuild Task to change it? It is not a node (I think) so I am not sure how to reference it. Vaccano It looks like `/Wix/processing-instruction('define')` may work for an XPath (whether or not MSBuild recognizes that, I don't know). By plugging that into [SketchPa...
[ 0.2508242726325989, -0.2534591257572174, 0.3853139877319336, 0.049066752195358276, 0.13738860189914703, -0.07077433913946152, 0.135221466422081, 0.2763347029685974, -0.007512216456234455, -0.6206420063972473, 0.33163973689079285, 0.36719971895217896, -0.4832488000392914, 0.0743805021047592...