text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
one of my views “UserAdminIndex.aspx” and this seemed to fix the problem. However, this doesn’t feel like it should be an issue. Surely the MVC framework support similarly named views? I am missing something? Any help gratefully received. Sandy Please note, I have seen the question "In ASP.NET MVC I encounter an inc...
[ -0.02505924366414547, 0.045389290899038315, 0.4758942425251007, -0.05274708941578865, -0.17991948127746582, -0.08484907448291779, 0.3075212836265564, 0.030993293970823288, -0.20747573673725128, -0.7096953988075256, 0.06918685883283615, 0.6457568407058716, -0.24603433907032013, 0.1339846253...
value) +231 System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary viewDataDictionary) +99 System.Web.Mvc.ViewPage`1.SetViewData(ViewDataDictionary viewData) +60 System.Web.Mvc.WebFormView.RenderViewPage(ViewContext context, ViewPage page) +64 System.Web.Mvc.WebFormView.Render(ViewContext viewContext, T...
[ -0.3995514512062073, -0.009060483425855637, 1.08274245262146, -0.1414090245962143, -0.2226179540157318, 0.3735326826572418, 0.5117329359054565, -0.9045863747596741, -0.5327398777008057, -0.7984508872032166, -0.1585695892572403, 0.5457085967063904, -0.3431256115436554, 0.28702235221862793, ...
System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +39 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +7 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep s...
[ -0.18373514711856842, 0.06383410096168518, 0.7662445306777954, -0.16886290907859802, 0.05405421555042267, 0.06522872298955917, 0.6897348165512085, -0.47891977429389954, -0.24636930227279663, -0.7430496215820312, -0.587579607963562, 0.5868301391601562, -0.41375014185905457, 0.18992507457733...
In PHP I can name my array indices so that I may have something like: ``` $shows = Array(0 => Array('id' => 1, 'name' => 'Sesame Street'), 1 => Array('id' => 2, 'name' => 'Dora The Explorer')); ``` Is this possible in Python? This sounds like the PHP array using named indices is very similar to a pyt...
[ 0.23568767309188843, 0.04761296883225441, 0.36160799860954285, 0.11756782233715057, -0.6900545954704285, -0.04153117910027504, 0.04331635311245918, -0.10718154162168503, -0.1303558647632599, -0.5376987457275391, 0.15231060981750488, 0.12979747354984283, -0.28758668899536133, 0.018453594297...
We are building a multi-tenant website in ASP.NET, and we must let each customer configure their own security model. They must be able to define their own roles, and put users in those roles. What is the best way to do this? There are tons of simple examples of page\_load events that have code like: ``` if (!user.I...
[ 0.06883296370506287, -0.03974383324384689, 0.45353859663009644, 0.03315827250480652, 0.11095486581325531, -0.07207024097442627, 0.3209168314933777, -0.03898882120847702, -0.17431983351707458, -0.6984245181083679, -0.20013175904750824, 0.3535545766353607, -0.28205615282058716, 0.10426193475...
in another table, for example: ``` Table "Role" RoleId, TenantId, Role Table "PagePermissions" PageId, RoleId Table "UserRoles" UserId, RoleId ``` Then in the page load check whether the User is in a RoleId that has permissions for that page, for example: ``` Select PageId FROM UserRoles UR INNER JOIN PagePermis...
[ -0.5491968393325806, -0.1188296526670456, 0.7216415405273438, 0.08093271404504776, -0.05924735963344574, 0.1191057413816452, -0.12013264000415802, -0.34648939967155457, -0.1398233026266098, -0.6456899046897888, -0.4062716066837311, 0.36596032977104187, -0.19178566336631775, 0.1554865837097...
I have minified my javascript and my css. Now, Which is better? ``` <script type="text/javascript"> <? $r = file_get_contents('min.js'); if($r) echo $r; ?> </script> ``` OR ``` <script type="text/javascript" src="min.js"></script> ``` Same question for CSS. If the answer is 'sometimes because browsers fetch...
[ 0.011129643768072128, 0.12530021369457245, 0.423211932182312, -0.2835681438446045, 0.04357203096151352, 0.19036370515823364, 0.30334508419036865, -0.3774366080760956, -0.27747857570648193, -0.797927975654602, -0.15193188190460205, 0.517508327960968, 0.06863663345575333, 0.08932618051767349...
I've read a lot of people saying that some things shouldn't be written in an object orientated style - as a person learning the OO style coming from a C background, what do they mean by this? What shouldn't be OO, why do some things fit this design better, and how do we know when it's best to do what? The real world i...
[ 0.550845742225647, 0.28387144207954407, -0.18160128593444824, 0.43895816802978516, 0.020995570346713066, -0.14080111682415009, 0.16487589478492737, 0.06518635153770447, -0.24908939003944397, -0.3354121744632721, -0.10571902245283127, 0.534588098526001, -0.05781670659780502, 0.1642170399427...
and behaviors, they have associations. If you're looking for **proof** that OO is *better*, there isn't any. Nothing is *better* because *better* is a gloriously vague term. Anyone who's clever can write any program in any style. You could adopt functional, procedural, object-oriented, or anything you feel like. I us...
[ 0.22461766004562378, 0.2943195700645447, -0.14305521547794342, 0.27871841192245483, -0.145469069480896, 0.07765346765518188, 0.6882691383361816, 0.2259165495634079, -0.28174257278442383, -0.7474591135978699, 0.016907213255763054, 0.5369108319282532, 0.04934863746166229, -0.4528287351131439...
isolate responsibility and structure an architecture, I'd still be writing single-file "hello world" variants.
[ 0.3358968496322632, 0.25188708305358887, -0.22101259231567383, 0.04987511783838272, -0.28553658723831177, 0.14498665928840637, 0.03787071257829666, -0.20897771418094635, -0.03905192017555237, -0.3182174861431122, 0.09783409535884857, 0.18019616603851318, -0.04762771725654602, -0.0624672584...
I have a SQL Server 2005 database and I have 4 GB of text files that I need to import into it. The question is, if these 4 GB of text files are 1.2 GB when they are zipped, how big would the database be if they are imported? Does SQL Server shrink data by default, or how would I set this (think create a database as a d...
[ 0.10502539575099945, 0.2551232576370239, 0.2573123276233673, -0.03491992875933647, -0.13936632871627808, 0.139409601688385, 0.054038770496845245, -0.38153403997421265, -0.4641219973564148, -0.18621312081813812, 0.17225980758666992, 0.34237366914749146, -0.36707159876823425, 0.2310982644557...
more space. If you really must store those files in the DB (it is recommended that you don't), take a look at this [article](http://mitch-wheat.blogspot.com/2007/05/save-and-restore-filesimages-to-sql.html) I blogged a while back. In SQL Server 2008, they have introduced the FILESTREAM type.
[ 0.2755405604839325, 0.020869022235274315, 0.28806790709495544, -0.10805366188287735, -0.41898494958877563, -0.44999635219573975, 0.127324640750885, 0.06834372133016586, -0.19874250888824463, -0.643688976764679, 0.0862099751830101, 0.4938160181045532, -0.019624808803200722, 0.29268524050712...
In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so: ``` function foo(&$bar) { // ... } ``` Now, I am aware that this is *not* designed to improve performance, but to allow functions to change variables that are normally out of t...
[ 0.37433311343193054, 0.1639363318681717, 0.39278554916381836, -0.21915313601493835, -0.4088989496231079, -0.25289157032966614, 0.2145778387784958, -0.026341963559389114, -0.1190842017531395, -0.13267849385738373, 0.013297266326844692, 0.550411581993103, -0.5603981018066406, -0.013029089197...
Copy On Write logic maybe is shortcircuited on pass-by-reference and whether that has any performance impact. *ETA: To be sure, I assume that it's not faster, and I am well aware that this is not what references are for. So I think my own guesses are quite good, I'm just looking for an answer from someone who really k...
[ 0.43581774830818176, 0.14969322085380554, 0.13121691346168518, 0.29799342155456543, -0.308691143989563, -0.18448646366596222, 0.14315848052501678, -0.030758604407310486, 0.02415376529097557, -0.34984445571899414, 0.2696759104728699, 0.8939440250396729, -0.05212974175810814, -0.245451122522...
a little extra overhead. Can only find [this mention](http://web.archive.org/web/20130406174901/http://www.thedeveloperday.com/php-lazy-copy/) at time of writing though, and comments in [the manual](http://www.php.net/references) contain other links. (EDIT) The manual page on [Objects and references](http://www.php.ne...
[ 0.05184222012758255, 0.028734030202031136, 0.17221945524215698, 0.3303377628326416, -0.03808223456144333, -0.0847422257065773, 0.3313502073287964, 0.08866780996322632, -0.30908769369125366, -0.43794095516204834, -0.07190491259098053, 0.6417509913444519, 0.013597995042800903, -0.06144414097...
Since multiple inheritance is bad (it makes the source more complicated) C# does not provide such a pattern directly. But sometimes it would be helpful to have this ability. For instance I'm able to implement the missing multiple inheritance pattern using interfaces and three classes like that: ``` public interface I...
[ 0.011129280552268028, -0.6741812229156494, 0.20378515124320984, -0.136323019862175, -0.18795828521251678, 0.006381597835570574, 0.08411183953285217, -0.4100784957408905, 0.08165881782770157, -0.8459339737892151, -0.09233462065458298, 0.5687543749809265, -0.5623269081115723, 0.2707302570343...
Second second = new Second(); public void FirstMethod() { first.FirstMethod(); } public void SecondMethod() { second.SecondMethod(); } } ``` Every time I add a method to one of the interfaces I need to change the class *FirstAndSecond* as well. Is there a way to inject multiple existing classes into one new ...
[ -0.22699189186096191, -0.6305327415466309, 0.0008124388987198472, -0.056700222194194794, -0.14529085159301758, -0.14380712807178497, 0.13857139647006989, -0.1606515794992447, -0.05699574947357178, -1.1804053783416748, -0.051290445029735565, 0.399585098028183, -0.48445940017700195, 0.232058...
I modify one of the interfaces. --- ### EDIT Maybe it would be better to consider a practical example: You have an existing class (e.g. a text based TCP client based on ITextTcpClient) which you do already use at different locations inside your project. Now you feel the need to create a component of your class to b...
[ 0.5320590138435364, -0.32228270173072815, 0.14640748500823975, 0.16275635361671448, -0.33869650959968567, -0.4440244734287262, 0.30827802419662476, -0.15338020026683807, 0.042119596153497696, -0.9800987839698792, 0.19706480205059052, 0.675422191619873, -0.5140042901039124, 0.35980105400085...
Write a new class that inherits from TextTcpClient and somehow implements IComponent (haven't actually tried this yet). In both cases you need to do work per method and not per class. Since you know that we will need all the methods of TextTcpClient and Component it would be the easiest solution to just combine those ...
[ 0.29276520013809204, -0.1972406804561615, 0.12449852377176285, 0.3702552914619446, -0.2298211008310318, -0.22153079509735107, 0.3691381812095642, -0.17732620239257812, -0.13177047669887543, -0.5245389938354492, 0.2146899402141571, 0.7919125556945801, -0.4992423951625824, -0.092169374227523...
provide such a pattern directly. But sometimes it would be helpful to have this ability. C# and the .net CLR have not implemented MI because they have not concluded how it would inter-operate between C#, VB.net and the other languages yet, not because "it would make source more complex" MI is a useful concept, the un...
[ 0.4045003354549408, -0.16139362752437592, -0.03366032615303993, 0.1810416579246521, -0.15885628759860992, -0.3452998101711273, 0.2412189394235611, 0.2458718717098236, -0.0986296534538269, -0.6038223505020142, -0.04858575761318207, 0.38186323642730713, -0.3413788080215454, -0.15732288360595...
already support MI but as I've said, there are no language constructs for it beyond that yet. Until then you are stuck with Proxy objects and multiple Interfaces instead :(
[ -0.003159178653731942, 0.03281215950846672, 0.192005455493927, 0.12987945973873138, 0.29561200737953186, -0.17107418179512024, 0.35460904240608215, 0.41052311658859253, 0.2027209997177124, -0.5555580854415894, -0.057498905807733536, 0.11990243196487427, -0.2067442089319229, 0.1331158429384...
I need to edit the web.config file on a live Sharepoint environment, but I'm unsure what will happen if I do (I want to output custom errors). Will this cause the IIS6 worker process to recycle? Will active users lose their session state because of this? Or can I safely edit the file? The application pool will resta...
[ 0.12541773915290833, -0.015174475498497486, 0.24003760516643524, 0.0019010200630873442, 0.1601223200559616, -0.21578726172447205, 0.5458172559738159, -0.08562599867582321, -0.30916622281074524, -0.9062259793281555, -0.047371864318847656, 0.5251943469047546, -0.2147497683763504, 0.441715657...
Say I have the following: ``` <ul> <li>First item</li> <li>Second item</li> <li>Third item</li> </ul> ``` How would I select all the child elements after the first one using jQuery? So I can achieve something like: ``` <ul> <li>First item</li> <li class="something">Second item</li> <li class="something">Third...
[ -0.04183313995599747, -0.09357894957065582, 0.08179167658090591, 0.09205257147550583, -0.03981314226984978, 0.5120505094528198, -0.2410452663898468, -0.3519268333911896, -0.07206381112337112, -0.8731638193130493, -0.2719578444957733, 0.16776469349861145, 0.04180886968970299, 0.103593952953...
I need to get existing web pages into an existing ASP.NET web site project in Visual Studio 2008. I simply tried to drag and drop the whole file folder content into the Visual Studio Solution Explorer or even to copy them into the web site folder. Both ways, Visual Studio seems unable to map the .designer.cs files to ...
[ -0.014510939829051495, 0.18311579525470734, 0.24427936971187592, -0.06674172729253769, -0.2503543198108673, 0.0214375089854002, 0.2149025946855545, -0.08857903629541397, -0.3747304081916809, -0.9393288493156433, 0.15781287848949432, 0.35526421666145325, -0.32661402225494385, 0.337442487478...
strongly hope there is a simpler way than manually creating each file and copying and pasting the contents into each file by hand. It sounds like you are trying to bring web application files into a web site. *IIf that is the case*, The designer files are not even needed. Just dont include them. They are generated and ...
[ 0.5989575982093811, 0.3422201871871948, 0.127472385764122, 0.2139773666858673, 0.11466608941555023, -0.5308910012245178, 0.33120661973953247, 0.2096458524465561, 0.00010412972187623382, -0.8624711036682129, 0.05985516309738159, 0.42528605461120605, -0.07698139548301697, 0.05068344250321388...
I am in a project where we are starting refactoring some massive code base. One problem that immediately sprang up is that each file imports a lot of other files. How do I in an elegant way mock this in my unit test without having to alter the actual code so I can start to write unit-tests? As an example: The file wit...
[ 0.638981819152832, 0.29686933755874634, -0.20843859016895294, -0.0247294083237648, -0.09563682228326797, -0.005113862454891205, 0.08110770583152771, -0.17259252071380615, -0.2244229018688202, -0.5692843794822693, 0.2927796542644501, 0.47466176748275757, -0.10678599029779434, 0.258426755666...
am only going to test functions that does not depend on things from the files that are being imported. Thanks for all the answers. I didn't really know what I wanted to do from the start but now I think I know. Problem was that some imports was only possible when the whole application was running because of some t...
[ 0.8342658877372742, 0.11692951619625092, -0.07284069061279297, 0.156142458319664, -0.09928876161575317, -0.07218337059020996, 0.3727862238883972, -0.415939599275589, -0.009404173120856285, -0.4052577018737793, 0.0452972874045372, 0.6615467667579651, -0.15432190895080566, -0.039829049259424...
about missing modules. If you want to import a module while at the same time ensuring that it doesn't import anything, you can replace the `__import__` builtin function. For example, use this class: ``` class ImportWrapper(object): def __init__(self, real_import): self.real_import = real_import def w...
[ 0.19120541214942932, -0.01326674409210682, 0.05421818420290947, -0.21264950931072235, 0.31339696049690247, -0.14532038569450378, 0.39210817217826843, -0.24969105422496796, -0.5744721293449402, -0.39814308285713196, -0.23015080392360687, 0.9584110379219055, -0.5660656690597534, 0.0137572465...
self.real_import(*args, **kwargs) else: print "NOT IMPORTING MODULE", moduleName return inner def mock_import(self, moduleName, wantedModules): __builtins__.__import__ = self.wrapper(wantedModules) try: __import__(moduleName, globals(), locals(), [], ...
[ -0.08552462607622147, 0.08814740180969238, 0.40463531017303467, -0.4008462727069855, 0.17165188491344452, 0.2544533610343933, 0.5037901997566223, -0.5226587057113647, -0.14811670780181885, -0.7008399963378906, 0.027801552787423134, 1.018572449684143, -0.4449109435081482, -0.220347955822944...
finally: __builtins__.__import__ = self.real_import ``` And in your test code, instead of writing `import myModule`, write: ``` wrapper = ImportWrapper(__import__) wrapper.mock_import('myModule', []) ``` The second argument to `mock_import` is a list of module names you *do* want to import in inner mod...
[ 0.313147634267807, 0.4192461669445038, 0.3297722637653351, -0.1579553782939911, -0.04577910527586937, 0.14561836421489716, 0.3329365849494934, -0.2111661583185196, -0.06856986880302429, -0.5408302545547485, -0.03068644553422928, 0.9065475463867188, -0.11561217159032822, -0.0633580833673477...
I'm creating a low level keyboard hook in c# using SetWindowsHookEx, question is how can I make the on keyboard event function run on a thread other from the main thread? Also I currently don't have a thread other then the main thread, so how can I create one that will halt until a keyboard hook event will occur? Here ...
[ 0.2676342725753784, -0.20489385724067688, 0.18704243004322052, -0.1675427109003067, 0.3822626769542694, -0.003131542121991515, 0.20976994931697845, -0.031938016414642334, -0.016790155321359634, -0.4711489975452423, 0.25991055369377136, 0.6063838005065918, -0.31456443667411804, 0.1896981149...
I have three TextBox controls on the page ``` <asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="1"> <asp:TextBox ID="TextBox2" runat="server" AutoPostBack="True" OnTextChanged="TextBox_TextChanged" TabIndex="2"> <asp:TextBox ID="TextBox3" runat=...
[ -0.3344801366329193, 0.02146163396537304, 0.7631943225860596, 0.07980174571275711, 0.013225273229181767, 0.42107564210891724, 0.19384357333183289, -0.42178159952163696, 0.13985136151313782, -0.8105984926223755, 0.07165779918432236, 0.38481608033180237, -0.41047170758247375, -0.001963643589...
orderby control.TabIndex select control; next_controls.DefaultIfEmpty(changed_control).First().Focus(); } ``` The meaning of this code is to automatically select TextBox with next TabIndex after page post back (see [Little JB's problem](https://stackoverflow.com/questions/173810/autopostb...
[ -0.1897529661655426, -0.012934212572872639, 0.6681208610534668, -0.1282360851764679, 0.03663291409611702, 0.014188503846526146, 0.24252302944660187, -0.12149973213672638, -0.033500391989946365, -0.7152833342552185, -0.25876736640930176, 0.5294838547706604, -0.35161536931991577, 0.053278442...
to receive working solution? Thank you! [OfType](http://msdn.microsoft.com/en-us/library/bb360913.aspx) ``` from control in changed_control .Parent .Controls .OfType<WebControl>() ```
[ 0.10110258311033249, 0.026189500465989113, 0.7532128691673279, 0.10727158188819885, 0.2838572561740875, -0.05957767739892006, 0.30366984009742737, -0.4474347233772278, 0.08130065351724625, -0.5359379649162292, -0.2837691009044647, 0.18941885232925415, -0.16151268780231476, 0.12981809675693...
How can I round a decimal number (floating point) to the nearest integer? e.g. ``` 1.2 = 1 1.7 = 2 ``` Output of [`perldoc -q round`](http://perldoc.perl.org/perlfaq4.html#Does-Perl-have-a-round%28)-function%3f--What-about-ceil()-and-floor()%3f--Trig-functions%3f) > Does Perl have a round() function? What about ce...
[ -0.4629737436771393, 0.23374365270137787, 0.6130308508872986, -0.0333639495074749, -0.2899034917354584, 0.22411589324474335, -0.0725509524345398, -0.6136613488197327, -0.3427894115447998, -0.2374776005744934, -0.30408141016960144, 0.05959485098719597, 0.08327756822109222, 0.042344722896814...
trigonometric > functions. > > > ``` > use POSIX; > $ceil = ceil(3.5); # 4 > $floor = floor(3.5); # 3 > > ``` > > > In 5.000 to 5.003 perls, trigonometry was done in the [`Math::Complex`](http://perldoc.perl.org/Math/Complex.html) > module. With 5.004, th...
[ -0.11712663620710373, 0.060589149594306946, 0.6051748991012573, 0.20068897306919098, -0.3283740282058716, 0.33453696966171265, 0.22867806255817413, -0.37113016843795776, -0.19319020211696625, -0.630577027797699, -0.05310017988085747, 0.1567879617214203, 0.019862236455082893, 0.136182159185...
the standard Perl > distribution) implements the trigonometric functions. Internally it > uses the [`Math::Complex`](http://perldoc.perl.org/Math/Complex.html) module and some functions can break out from the > real axis into the complex plane, for example the inverse sine of 2. > > Rounding in financial applications ...
[ 0.02008698135614395, -0.23073230683803558, 0.44353875517845154, 0.10501941293478012, -0.37836021184921265, 0.11596538871526718, -0.1205318346619606, -0.4801590144634247, -0.22349831461906433, -0.4822615385055542, 0.03194926306605339, 0.6147937774658203, -0.1508701890707016, 0.0281664971262...
for ($i = 0; $i < 1.01; $i += 0.05) { printf "%.1f ",$i} > > 0.0 0.1 0.1 0.2 0.2 0.2 0.3 0.3 0.4 0.4 0.5 0.5 0.6 0.7 0.7 > 0.8 0.8 0.9 0.9 1.0 1.0 > > ``` > > > Don't blame Perl. It's the same as in C. IEEE says we have to do > this. Perl numbers whose absolute values are integers under `2**31` (on > 32 bit...
[ 0.09451046586036682, 0.05774933844804764, 0.29324010014533997, 0.054311707615852356, -0.05028323456645012, -0.05891905725002289, 0.29707497358322144, -0.2816406190395355, -0.03421030193567276, -0.29192298650741577, 0.0891183540225029, 0.49975359439849854, -0.38411247730255127, 0.0621210783...
When Instantiating a class, Windsor by default treats all public properties of the class as optional dependencies and tries to satisfy them. In my case, this creates a rather complicated circular dependency which causes my application to hang. How can I explicitly tell Castle Windsor that it should not be trying to s...
[ -0.13545598089694977, -0.00018134953279513866, 0.014001896604895592, 0.07293733954429626, -0.09544975310564041, -0.16206777095794678, 0.26422759890556335, 0.05709030479192734, -0.2449776530265808, -0.2040787786245346, -0.4478859007358551, 0.2937116026878357, -0.3310590386390686, 0.16728784...
since the specific library where this is happening has to date not needed a dependency on castle. I created a facility to help with this: * [Castle.Facilities.OptionalPropertyInjection](http://using.castleproject.org/display/Contrib/Castle.Facilities.OptionalPropertyInjection)
[ -0.10683934390544891, -0.1779230237007141, 0.12438546121120453, -0.3612806797027588, 0.16582930088043213, -0.08748950064182281, 0.17811253666877747, -0.08687000721693039, -0.39359205961227417, -0.4498205780982971, -0.25078797340393066, 0.36591070890426636, -0.21641503274440765, 0.148518919...
I have the following code: ``` import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants; public class ScratchPad { public static void main(String args[]) throws Exception { String html ="<html>"+ "<head>"+ "<meta http-equiv=\"Conten...
[ -0.006334484554827213, 0.0908442959189415, 0.7107852697372437, -0.12228651344776154, 0.08469259738922119, 0.13927902281284332, 0.10565496236085892, -0.724961519241333, -0.010360618121922016, -0.5167192220687866, -0.20605644583702087, 0.3915790319442749, -0.3081110417842865, -0.057440642267...
no difference either way editor.setContentType( "text/html" ); editor.setText( html ); f.add( new JScrollPane(editor, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER) ); f.pack(); f.setVisible( true...
[ 0.48116445541381836, -0.11648682504892349, 0.9596580266952515, -0.2059587687253952, 0.007133611477911472, -0.14804551005363464, 0.30450910329818726, -0.4084915518760681, -0.048864077776670456, -0.5764869451522827, -0.5449649095535278, 0.5307760834693909, -0.4435899257659912, -0.24909415841...
if I remove the "; charset=ISO-8859-1" from the meta tag, the HTML shows up. Any ideas why and what I can do to prevent this (other than manually hacking the HTML string over which I have no control...). **Edit #1** - putProperty( "Ignore-Charset", "true" ) makes no difference unfortunately. Use the follow line before...
[ 0.40042394399642944, 0.15373742580413818, 0.6184658408164978, -0.1711803376674652, -0.04533527418971062, -0.23921659588813782, 0.8111389875411987, -0.31039920449256897, -0.11791965365409851, -0.5287443399429321, -0.3652929365634918, 0.7635622024536133, -0.6464560031890869, 0.08142100274562...
I've got the following JavaScript on my web page... ``` 64 var description = new Array(); 65 description[0] = "..." 66 description[1] = "..." ... 78 function init() { 79 document.getElementById('somedivid').innerHTML = description[0]; 80 } 81 82 window.onload = init(); ``` In Microsoft Inter...
[ 0.010086879134178162, 0.21470355987548828, 0.6043146848678589, -0.47865718603134155, 0.13205155730247498, -0.11088360846042633, 0.7498263716697693, -0.14757706224918365, -0.15651142597198486, -0.7948467135429382, -0.47924014925956726, 0.47089913487434387, -0.4268532991409302, -0.0646990835...
still throws the error. If I comment out line 82, then the function does not execute and there is no error. Shouldn't line 82 read: ``` window.onload = init; ``` When you do "init()" it's a call to a function that returns void. You end up calling that function before the page loads.
[ 0.1607937216758728, 0.2761203944683075, 0.4604502022266388, -0.3524661064147949, 0.09597107768058777, -0.034953001886606216, 0.6213107705116272, 0.026261674240231514, -0.22672687470912933, -0.6175474524497986, -0.224620059132576, 0.35185009241104126, -0.4878382682800293, -0.149092659354209...
While simple, interface-driven event notification frameworks in Java have been around since pre-Cambrian times (e.g. java.beans.PropertyChangeSupport), it is becoming increasingly popular for frameworks to use annotation-driven event notification instead. For an example, see [JBossCache 2.2](http://www.jboss.org/file...
[ 0.2306441217660904, -0.00040295071084983647, -0.03754055127501488, -0.4090985357761383, -0.43338215351104736, -0.13403141498565674, 0.15148743987083435, -0.26703080534935, -0.22528061270713806, -0.2894666790962219, -0.02541561983525753, 0.5018197298049927, -0.3156457245349884, -0.022724468...
public void cacheStartStopEvent(Event e) { switch (e.getType()) { case Event.Type.CACHE_STARTED: System.out.println("Cache has started"); break; case Event.Type.CACHE_STOPPED: System.out.println("Cache has
[ 0.01020170096307993, -0.2614955008029938, 0.23411180078983307, -0.052761390805244446, 0.5192870497703552, -0.01027650572359562, 0.4529260993003845, 0.09344273060560226, -0.2476140260696411, -0.5001571178436279, -0.4476844370365143, 0.5200889706611633, -0.1330518126487732, 0.386089622974395...
stopped"); break; } } @NodeCreated @NodeRemoved @NodeVisited @NodeModified @NodeMoved public void logNodeEvent(NodeEvent ne) { log("An event on node " + ne.getFqn() + " has occured"); } ``` } The problem with this, is that it's very much more of a...
[ 0.07451147586107254, -0.17009304463863373, 0.4276161193847656, -0.09821034967899323, 0.3918481469154358, -0.32575786113739014, 0.4676492214202881, 0.22585715353488922, -0.27899274230003357, -0.48648324608802795, -0.4900508224964142, 0.42608270049095154, -0.11452822387218475, 0.259570419788...
to support this sort of thing, due to the annotation-reflection nature of it. So, before I charge off down the road of writing a generic framework, I was hoping someone had done it already. Has anyone come across such a thing? You can already do this today with [EventBus](http://eventbus.org "EventBus"). Following ex...
[ 0.03903629258275032, -0.09441418945789337, 0.3596835434436798, -0.02493209019303322, -0.08715301752090454, -0.4367672801017761, 0.1251250058412552, -0.007367268670350313, -0.16244949400424957, -0.7469717264175415, -0.21707960963249207, 0.5084659457206726, -0.45893681049346924, 0.1633543074...
public StatusBar() { AnnotationProcessor.process(this); } @EventSubscriber(eventClass=StatusEvent.class) public void updateStatus(StatusEvent statusEvent) { this.setText(statusEvent.getStatusText(); } } ``` A similar project is [ELF (Event Listener Framework)](https://elf.dev.java.net/...
[ -0.024836350232362747, -0.13854172825813293, 0.4825120270252228, -0.19408953189849854, -0.1113671213388443, -0.3179815411567688, 0.3424346148967743, 0.1982594132423401, -0.2764541804790497, -0.6530722975730896, -0.4200815260410309, 0.6933494806289673, -0.188137486577034, -0.068581797182559...
I am reading an XML file into a DataSet and need to get the data out of the DataSet. Since it is a user-editable config file the fields may or may not be there. To handle missing fields well I'd like to make sure each column in the DataRow exists and is not DBNull. I already check for DBNull but I don't know how to m...
[ 0.2762141525745392, 0.14367076754570007, 0.32525578141212463, 0.13665395975112915, -0.1780288964509964, -0.2745346128940582, 0.09112148731946945, 0.17315445840358734, -0.13617849349975586, -0.5002084374427795, 0.19492201507091522, 0.25375738739967346, -0.21817459166049957, 0.34581154584884...
that they have their underlying table linked to them. With the underlying table you can verify that a specific row has a specific column in it. ``` If DataRow.Table.Columns.Contains("column") Then MsgBox("YAY") End If ```
[ 0.12677326798439026, 0.5032735466957092, 0.436680406332016, -0.12547190487384796, 0.34392184019088745, -0.09293051809072495, -0.10868487507104874, 0.1756100356578827, -0.3675316572189331, -0.6192105412483215, -0.47424396872520447, 0.281175434589386, -0.35217317938804626, 0.3399269580841064...
I have to lock user accounts in Active Directory programmatically in C#. Unfortunately it doesn't work via the userAccountControl attribute. Every time I set userAccountControl to 528 (=normal account w/ lockout flag), Active Directory won't accept the value and resets it without further notice to 512 (=normal accoun...
[ -0.028099531307816505, -0.02721567451953888, 0.7969006896018982, -0.29454636573791504, 0.2324601411819458, 0.020062219351530075, 0.8304994702339172, -0.41210877895355225, -0.13731250166893005, -0.6244073510169983, -0.31816524267196655, 0.6335307359695435, -0.38401684165000916, 0.2662373781...
} catch (Exception) { /* ... */ } adsUser.GetInfo(); } ``` Any ideas? Make sure the account you're using to disable the account has sufficient privileges to disable accounts. See [this example](http://msdn.microsoft.com/en-us/library/ms696026(VS.85).aspx) from Microsoft.
[ 0.40105339884757996, 0.10203053057193756, 0.07926830649375916, -0.1868145614862442, 0.3646136522293091, -0.48243802785873413, 0.30918005108833313, 0.11924311518669128, -0.36716923117637634, -0.5773371458053589, -0.3143622577190399, 0.5697591304779053, -0.5241966843605042, 0.052345890551805...
Here is the sample: ``` Dim TestString As String = "Hello," & Chr(0) & "World" MsgBox(TestString, , "TestString.Length=" & TestString.Length.ToString) ``` Result - Messagebox shows "Hello," with title says TestString.Length=12 I guess the chr(0) is treated as the end of zero terminated string, but it's not...
[ 0.2976857125759125, 0.2939474582672119, 0.19977305829524994, -0.18860477209091187, -0.049819350242614746, -0.01184381078928709, 0.3440943956375122, -0.12281613796949387, -0.04382218047976494, -0.4118533134460449, -0.0396391861140728, 0.3799239993095398, -0.36529541015625, 0.304840534925460...
it. What comes up really on the message window doesn't bother me. I used the above as an example. I just need when putting the multiple variables that it adds correctly to the string. Another example of it would be ``` "SCORE".ToString.PadRight(8, chr(0)) & "3.0".ToString.PadRight(10, chr(0)) & "0".ToString.PadRight(...
[ -0.05544430390000343, -0.22419576346874237, 0.6055867671966553, 0.20442931354045868, 0.0064484733156859875, -0.2891690135002136, 0.17282810807228088, -0.17923270165920258, -0.056655317544937134, -0.33634230494499207, 0.13138093054294586, 0.6269641518592834, 0.06091839447617531, -0.10056715...
the debugger wrongly says so or your output string is not long enough to include all the padding.
[ 0.3603753447532654, 0.1332724690437317, 0.4287170469760895, -0.08543096482753754, 0.176693394780159, -0.13956423103809357, 0.3603975474834442, -0.08743377774953842, -0.11023886501789093, -0.418639212846756, -0.5041105151176453, 0.2948949635028839, -0.039159320294857025, -0.0334064476191997...
I have seen arguments for using explicit interfaces as a method of locking a classes usage to that interface. The argument seems to be that by forcing others to program to the interface you can ensure better decoupling of the classes and allow easier testing. Example: ``` public interface ICut { void Cut(); } pub...
[ 0.2620730996131897, -0.19671480357646942, 0.04928400740027428, 0.02999408356845379, -0.2472892552614212, 0.15785227715969086, 0.022445371374487877, -0.1793610006570816, -0.15997889637947083, -0.8930504322052002, 0.024259258061647415, 0.7414705157279968, -0.40877678990364075, 0.079022556543...
I am using an explicit interface the following would NOT work. ``` Knife obj = new Knife(); obj.Cut(); ``` To quote GoF chapter 1: * "Program to an interface, not an implementation". * "Favor object composition over class inheritance". As C# does not have multiple inheritance, object composition and programming to ...
[ 0.15015669167041779, 0.061229150742292404, 0.09631097316741943, 0.014337931759655476, -0.5154066681861877, 0.14442528784275055, 0.22807268798351288, -0.2900572419166565, 0.0464070662856102, -0.736000120639801, 0.2811085879802704, 0.8618323802947998, -0.34049415588378906, -0.189167961478233...
I am looking for a regex that will find repeating letters. So any letter twice or more, for example: ``` booooooot or abbott ``` I won't know the letter I am looking for ahead of time. This is a question I was asked in interviews and then asked in interviews. Not so many people get it correct. You can find any let...
[ 0.2506064176559448, 0.5186029672622681, 0.1802963763475418, -0.3438350558280945, 0.10644692927598953, 0.3320302963256836, 0.6626440286636353, -0.22756393253803253, -0.009612665511667728, -0.5686925649642944, -0.13576599955558777, 0.46542876958847046, -0.6728954911231995, 0.2258972227573394...
'o' print $1 . $2; # prints 'oooooo' ```
[ 0.35603606700897217, 0.5815313458442688, 0.47113290429115295, -0.09964901953935623, 0.2980445325374603, 0.2662884294986725, -0.0816742479801178, 0.014852382242679596, -0.35141831636428833, -0.2961498200893402, -0.08950228989124298, 0.2550243139266968, -0.5116369128227234, 0.211189478635787...
I installed the ReSharper evaluation version and uninstalled it. Afterwards Visual Studio's Intellisense stopped working. I have restarted computer but I still have this problem. Can anyone please help me here? I am using Visual Studio 2005. Thanks. Try opening Visual Studio Command Prompt and entering: ``` devenv....
[ 0.24769462645053864, 0.06829217821359634, 0.16710008680820465, -0.12551777064800262, -0.1833154559135437, 0.021573178470134735, 0.5644584894180298, 0.08060015738010406, -0.19353468716144562, -0.8750835061073303, -0.04329178109765053, 1.109135627746582, -0.005929578095674515, -0.02601349167...
Is it possible to get the text of an `OleDbCommand` with all parameters replaced with their values? E.g. in the code below I'm looking for a way to get the query text ``` SELECT * FROM my_table WHERE c1 = 'hello' and c2 = 'world' ``` after I finished assigning the parameters. ``` var query = "SELECT * FROM my_tabl...
[ -0.22945038974285126, 0.03315787389874458, 0.44080179929733276, -0.12920989096164703, 0.16681130230426788, -0.006341705564409494, 0.42437469959259033, -0.027477076277136803, -0.4232141375541687, -0.5809658765792847, -0.23891183733940125, 0.5425207018852234, -0.3521990478038788, 0.294810056...
syntax rather than the `@parametername` syntax. The reason for this is that the full string is *never* assembled. The parameters and sent to the server and treated as data, and are never included in the string. All the same, I for one understand your pain. It would have been nice if they included some kind of `.Compo...
[ 0.35341566801071167, 0.1517362743616104, 0.1269555389881134, -0.06893455982208252, -0.20268653333187103, 0.026957493275403976, 0.6676756739616394, 0.22399167716503143, -0.18720659613609314, -0.34599000215530396, -0.11095136404037476, 0.4102447032928467, -0.439444363117218, 0.19667266309261...
In this asp.net I'm cleaning up it's possible for deadlocks to occur. I want to make sure that the code deals with them properly, so I'm trying to write NUnit tests which trigger a deadlock..... The DAO is split by entity. Each entity has a set of tests which are surrounded by Startup() and Teardown() methods which cr...
[ 0.26873332262039185, -0.11951006203889847, 0.016445927321910858, 0.2499263435602188, -0.027493372559547424, -0.27821868658065796, -0.008148064836859703, -0.3359118402004242, -0.1832553595304489, -0.504059374332428, -0.04253818467259407, 0.2745511531829834, -0.2348516285419464, -0.003911725...
reliably reproduced? More detail: I know there is a situation whereby if two users call two functions with different, specific, data values then a deadlock *can* result. How can I simulate this within NUNIT - and make the deadlock *always* happen? And yes, I did start with the "Why don't you stop the deadlocks happeni...
[ 0.5282092094421387, -0.1366230547428131, -0.024271588772535324, 0.32628440856933594, -0.03346503898501396, -0.004222889430820942, 0.1336904913187027, 0.1054181307554245, -0.45894771814346313, -0.2652886211872101, 0.06337139755487442, 0.6640028953552246, -0.32773682475090027, 0.146086901426...
the exception being thrown. The basic idea is that you tell your Mock Object framework (I like [TypeMock](http://www.typemock.com/)) to throw an exception instead, something like this: ``` MockObject mo = MockManager.MockObject(typeof(MyDeadlockException)); mock.ExpectAndThrow("MyMethod", (MyDeadlockException)mo.Obje...
[ 0.4016135334968567, 0.17774933576583862, 0.08818773180246353, -0.19979558885097504, 0.035155702382326126, -0.1649164855480194, 0.5957526564598083, -0.08855180442333221, -0.017159301787614822, -0.5188302993774414, -0.1125958189368248, 0.8468150496482849, -0.33524438738822937, -0.24184593558...
Here's the jist of the problem: Given a list of sets, such as: ``` [ (1,2,3), (5,2,6), (7,8,9), (6,12,13), (21,8,34), (19,20) ] ``` Return a list of groups of the sets, such that sets that have a shared element are in the same group. ``` [ [ (1,2,3), (5,2,6), (6,12,13) ], [ (7,8,9), (21,8,34) ], [ (19,20) ] ] ``` ...
[ -0.35823485255241394, 0.37501513957977295, -0.10001172125339508, -0.032776687294244766, -0.424286425113678, 0.28017479181289673, 0.44407832622528076, -0.594560980796814, -0.17132413387298584, -0.5109362006187439, -0.1747717410326004, 0.1180945560336113, -0.4176875352859497, 0.2561221718788...
looks like: ``` element | set_id ---------------- 1 | 1 2 | 1 3 | 1 5 | 2 2 | 2 6 | 2 ``` and so on. So I would love a way to do it in SQL, but I would be happy with a general direction for the solution. **EDIT**: Changed the table column names to (element, set\_id) instead of (k...
[ -0.1261051446199417, 0.23735278844833374, 0.47830718755722046, -0.1913096308708191, 0.03172598406672478, -0.0946088582277298, 0.05313988775014877, -0.5387190580368042, 0.07128103077411652, -0.44440382719039917, -0.15400472283363342, 0.34300461411476135, -0.22181785106658936, 0.058228749781...
the old column names. The problem is exactly the computation of the connected components of an hypergraph: the integers are the vertices, and the sets are the hyperedges. A usual way of computing the connected components is by flooding them one after the other: * for all i = 1 to N, do: * if i has been tagged by some ...
[ -0.26431143283843994, -0.4084206819534302, 0.38607388734817505, 0.031194107607007027, -0.19321511685848236, -0.049713823944330215, 0.24264536798000336, -0.27121686935424805, -0.4101758301258087, -0.8252054452896118, -0.17229063808918, 0.0490848608314991, -0.6712403297424316, 0.151329785585...
k of S, if k is not already tagged by j, then tag it by j, and call flood\_from(k,j) The tags of the sets then give you the connected components you are looking for. --- In terms of databases, the algorithm can be expressed as follows: you add a TAG column to your database, and you compute the connected component o...
[ -0.08360033482313156, -0.3895307779312134, 0.41318559646606445, 0.036343879997730255, 0.030948827043175697, 0.17401011288166046, 0.14745619893074036, -0.4761747419834137, -0.2035171240568161, -0.7475842833518982, -0.11112996190786362, 0.064820796251297, -0.6194376945495605, 0.1108975186944...
not empty, do * ---- set TAG to i for the rows in S' * ---- S'' = select all rows where TAG is not set and where element is in element(S') * ---- S = S union S' * ---- S' = S'' * return set\_id(S) --- Another (theoretical) way of presenting this algorithm would be to say that you are looking for the fixed points of a...
[ -0.3179445266723633, -0.2579083740711212, 0.411803275346756, -0.03644152730703354, -0.09614621847867966, 0.25700631737709045, -0.1642678827047348, -0.4579259157180786, -0.28169485926628113, -0.7411144971847534, -0.40417158603668213, 0.3562410771846771, -0.49071815609931946, -0.027230352163...
which intersect K Then if S is a set, the connected component of S is obtained by iterating (incidences)o(union) on S until a fixed point is reached: 1. K = S 2. K' = incidences(union(K)). 3. if K == K', then return K, else K = K' and go to 2.
[ -0.09548380970954895, -0.0593610554933548, 0.7129479646682739, -0.08037397265434265, -0.32193174958229065, 0.18873664736747742, 0.3392537832260132, -0.41447922587394714, -0.2583105266094208, -0.6949529647827148, -0.5795801281929016, 0.23191018402576447, -0.46441829204559326, 0.276393711566...
I am working on a build system. The build system posts the results as a zip file in a directory. Unfortunately I have no easy way to know the name of the zip file, because it is timestamped. For the next operation, I must decompress this zip file to some specific location and then do some more file operations. I guess...
[ 0.5906372666358948, 0.34086260199546814, 0.4854079484939575, -0.13023518025875092, 0.2505461275577545, -0.18057332932949066, 0.14475016295909882, -0.19855032861232758, -0.14221562445163727, -0.8009570240974426, -0.13054758310317993, 0.18061211705207825, 0.1307351440191269, 0.31388685107231...
(if the previous process is successful). How can I issue an unzip command that will only take effect on the newest zip file in the directory, ignoring all others? EDIT: I decided to use the capabilities in ANT for this task instead. However, it is still a neat trick to have up the sleve... Thanks for the answer! Thi...
[ 0.16671009361743927, 0.002420054515823722, 0.4459993243217468, -0.1922021210193634, 0.2421499639749527, -0.17085474729537964, 0.31777387857437134, -0.17950820922851562, -0.1860312521457672, -0.71230149269104, -0.47611695528030396, 0.2357608675956726, -0.2033105492591858, 0.2348862290382385...
format. * `FOR /F usebackq` is used to loop over the output of the command. * `&& GOTO DONE || GOTO DONE` makes sure the `UNZIP` is only run for the first file. You need both `&&` (and) and `||` (or) in case the unzip fails for some reason. You'll need to change `UNZIP %%i` for whatever unzip command you want to use. ...
[ 0.16668705642223358, -0.047190550714731216, 0.4178735613822937, -0.1494179517030716, 0.046310000121593475, 0.10929553955793381, 0.21869680285453796, -0.4112553298473358, -0.16082477569580078, -0.5239119529724121, -0.31954365968704224, 0.5299649238586426, -0.22312477231025696, -0.0288424212...
GOTO DONE :DONE ``` The differences are: * The "tokens=\*" option returns the whole of the filename even if it contains spaces. * The filename passed to UNZIP is quoted * This variant uses single quotes for the DIR command so doesn't need the "usebackq" option.
[ 0.043311718851327896, -0.25637805461883545, 0.1418696492910385, -0.22071409225463867, -0.2130352258682251, -0.014060514979064465, 0.21684114634990692, -0.34984371066093445, 0.018211206421256065, -0.19125057756900787, -0.3298700153827667, 0.5120771527290344, -0.153237447142601, -0.054224248...
I have this working definition: ``` IDENTIFIER [a-zA-Z][a-zA-Z0-9]* ``` I don't want to keep repeating the [a-zA-Z] and [0-9], so I made two new definitions ``` DIGIT [0-9] VALID [a-zA-Z] ``` How can I rewrite the IDENTIFIER rule to use the DIGIT and VALID definitions? I don't know how to do the "second"...
[ 0.24256408214569092, 0.33407020568847656, 0.24388843774795532, -0.0008240813622251153, -0.058085013180971146, -0.04990094527602196, 0.41321104764938354, -0.17614594101905823, -0.029961079359054565, -0.6342639923095703, -0.09797080606222153, 0.3761362135410309, -0.2954045832157135, 0.463133...
I am wondering what everyone thinks the best method of handling results from your own database is. Other teams may be involved and there is always the chance the procedure/data could be altered and erroneous results would occur. My question is this. Is it better to let and exception occur, catch and log it or try to ha...
[ 0.14683854579925537, 0.22317634522914886, 0.03995813801884651, 0.07379251718521118, -0.025450000539422035, -0.2192832976579666, 0.33244115114212036, -0.155331552028656, -0.13087482750415802, -0.5088347792625427, 0.09600425511598587, 0.3589603006839752, -0.214726060628891, 0.110763013362884...
recovering from, but something like a column you expect to be non-null being null sounds more significant to me. Of course, I'd also try to set up some smoke tests to make sure you find out about it before production :)
[ 0.3783692717552185, 0.14641276001930237, 0.28391844034194946, -0.037977080792188644, 0.14792385697364807, 0.03595821186900139, 0.16170451045036316, 0.0635882318019867, -0.09224501997232437, -0.08291446417570114, 0.10515228658914566, 0.16613604128360748, 0.1780906766653061, -0.0671106725931...
I'm writing an app which for various reasons involves Internet Explorer (IE7, for the record), ActiveX controls, and a heroic amount of JavaScript, which is spread across multiple .js includes. One of our remote testers is experiencing an error message and IE's error message says something to the effect of: ``` Line...
[ 0.38086068630218506, 0.11615929752588272, 0.5799616575241089, -0.04351694881916046, -0.17109480500221252, 0.19670557975769043, 0.33734217286109924, 0.195482075214386, 0.013415257446467876, -0.852347731590271, -0.12085842341184616, -0.03908242657780647, -0.4218160808086395, -0.0170123223215...
of a server-side-include thing), at least as IE shows from "View Source" does have 719 or more lines - but line 719 (in this case) is a closing table row tag (no JavaScript, in other words). The results of "View Generated Source" is only 310 lines in this case. I would imagine that it could possibly be that the entir...
[ 0.2342061549425125, -0.04678906500339508, 0.8019729256629944, -0.07636339217424393, -0.19380562007427216, 0.012361541390419006, 0.6352312564849854, -0.16587698459625244, -0.0007814692799001932, -0.4570598602294922, -0.18850603699684143, 0.16137875616550446, -0.22174403071403503, -0.0338399...
Internet Explorer **where the line number is the only hint** but the page is actually spread across multiple files? **UPDATE:** The issue is exacerbated by the fact that the user experiencing this is remote and for various network reasons, debugging it using something like Visual Studio 2008 (which has awesome JavaScr...
[ 0.35217034816741943, 0.10253974795341492, 0.16452345252037048, 0.14917227625846863, -0.03901516646146774, -0.4410536289215088, 0.4092349112033844, 0.4036821126937866, -0.21054880321025848, -0.8909343481063843, -0.12302567809820175, 0.2621522545814514, -0.34775471687316895, 0.20304487645626...
Walker's bit about it being off by one did get me pointed in the right direction as I think it was the offending line. But since that's not really what I'd call good or reliable (IE's fault, not Robert J. Walker's fault) I'm going to accept the "no, not really" answer. I'm not sure if this is proper SO etiquette. Pleas...
[ 0.7165247797966003, 0.6135039925575256, 0.07211171090602875, -0.05271272733807564, -0.20569969713687897, -0.036665577441453934, 0.5793045163154602, -0.11600399762392044, -0.20940402150154114, -0.39453598856925964, 0.3395472466945648, 0.5075815916061401, -0.29871341586112976, -0.27970656752...
for the most part.
[ 0.26498541235923767, 0.1598125696182251, -0.1039566919207573, -0.05228498950600624, -0.13400527834892273, 0.00702112028375268, 0.1392620950937271, 0.26781392097473145, -0.13363011181354523, -0.012368417344987392, -0.03503372147679329, 0.46891093254089355, 0.07454126328229904, -0.0350464507...
Or would a conventional client-server VCS be more appropriate? I'm currently using TortoiseSVN, but I'm interested in a DVCS, but I'm not sure if it's even a good idea to try to use something like that solo. Since you can still push to another machine also running Git/Mercurial/Bzr/etc you still have the multi-computer...
[ 0.3481748402118683, -0.13148070871829987, 0.2535935938358307, 0.28820282220840454, 0.11352957040071487, -0.10704818367958069, 0.15210676193237305, 0.23041337728500366, -0.5783954858779907, -0.6082016229629517, -0.0019299376290291548, 0.7425684332847595, 0.14490970969200134, 0.1397654414176...
I have an XmlDocument that already exists and is read from a file. I would like to add a chunk of Xml to a node in the document. Is there a good way to create and add all the nodes without cluttering my code with many .CreateNote and .AppendChild calls? I would like some way of making a string or stringBuilder of a ...
[ 0.39815235137939453, 0.15483331680297852, 0.05347312241792679, 0.11896590888500214, 0.09603745490312576, 0.297492116689682, -0.30305641889572144, -0.06477013975381851, -0.02358916960656643, -0.6889171004295349, -0.0004736451664939523, 0.11340253055095673, -0.01970278099179268, 0.0460936725...
<Demographic> <Age/> <DOB/> </Demographic> </Employee> </MyXml> ``` I suggest using [XmlDocument.CreateDocumentFragment](http://msdn.microsoft.com/en-us/library/system.xml.xmldocument.createdocumentfragment.aspx) if you have the data in free form strings. You'll still have to use AppendChild...
[ 0.20217370986938477, -0.002958533354103565, 0.03897475078701973, 0.14174288511276245, -0.05070679634809494, 0.10709508508443832, 0.06542717665433884, -0.4075264036655426, -0.114896759390831, -0.77875816822052, -0.33275094628334045, 0.02385820262134075, -0.09212455153465271, 0.1750753670930...
The problem is that the compiler says that there is a redefinition of a function between a library that belongs to MySQL and math.h from the std library. I have been over this for two days and I still can't figure it out. Has this ever happened to anyone? This is the output from the compiler --- ``` C:\mingw\bin...
[ -0.262893944978714, 0.4011700749397278, 0.4343089163303375, 0.10194478183984756, 0.1415308713912964, -0.06646846234798431, 0.24256640672683716, -0.27247321605682373, -0.171412855386734, -0.4685417115688324, -0.05919748544692993, 0.5734303593635559, -0.3000119626522064, 0.1751488745212555, ...
from c:/Archivos de programa/MySQL/MySQL Server 5.0/include/my_global.h:73, from ../src/interfaz/../gestiondb/gestordb.h:6, from ../src/interfaz/../gestiondb/operacionesdb.h:5, from ../src/interfaz/ventanamodulos.h:20, from ../src/interfaz/ventanaconf....
[ -0.5062168836593628, 0.17607413232326508, 0.8331782221794128, 0.18131795525550842, 0.129361093044281, 0.32295283675193787, 0.07217168062925339, 0.024434654042124748, -0.46773234009742737, -0.4219355583190918, -0.525493323802948, 0.5257568955421448, -0.16928239166736603, -0.1175645142793655...
**In function `double rint(double)': c:/Archivos de programa/MySQL/MySQL Server 5.0/include/config-win.h:228: error: redefinition of `double rint(double)' C:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:620: **error: `double rint(double)' previously defined here** C:\mingw\bin\mingw32-make.exe: *** [sr...
[ 0.0715227872133255, -0.18664979934692383, 0.17910414934158325, -0.11411336809396744, 0.07932037115097046, -0.1840040683746338, 0.4593944251537323, 0.07501384615898132, 0.003735055448487401, -0.39795172214508057, -0.2480330616235733, 0.6610279083251953, -0.3785398602485657, 0.11334664374589...
As I'm [riding the wave of resurgence of Smalltalk](http://methodsandmessages.vox.com/library/post/the-year-of-smalltalk.html) (especially because many Ruby-on-Rails people are rediscovering Smalltalk and seeing [Seaside](http://seaside.st) as their next upgraded web framework), I get questions like "yeah, but how do I...
[ -0.07920408248901367, 0.13450223207473755, 0.4396803379058838, -0.3227840065956116, -0.12836049497127533, -0.14015895128250122, 0.33144521713256836, 0.133345827460289, -0.3583584427833557, -0.5160462260246277, -0.05066852271556854, 0.5583314895629883, 0.0914054587483406, 0.0429667122662067...
an external editor or debugger or change control manager would seem very awkward. So what is it that scares you the most about not being able to edit the five-line methods in Smalltalk with your favorite editor, or use your favorite non-Smalltalk-aware change control system? Everything's different. Want to go to the e...
[ -0.48787084221839905, 0.16287998855113983, 0.3832651674747467, 0.0792778730392456, -0.4502545893192291, -0.0964658185839653, 0.1610240936279297, -0.10728596150875092, -0.5076999664306641, -0.24502654373645782, 0.19742724299430847, 0.5891621112823486, -0.560684084892273, 0.06676197797060013...
I have an ASP.Net 3.5 platform and windows 2003 server with all the updates. There is a limit with .Net that it cannot handle more than [260 characters](http://forums.iis.net/p/1105360/1689855.aspx). Moreover if you look it up on web, you will find that IE 6 fails to work if it is not patched at above 100 charcters. ...
[ -0.1811452955007553, 0.26664891839027405, 0.4758765697479248, -0.20886798202991486, -0.4057125151157379, 0.1956823170185089, 0.6763296127319336, -0.16503135859966278, -0.1468379944562912, -0.7460840344429016, -0.11728274822235107, 0.4656639099121094, -0.22072191536426544, -0.06085963919758...
Therefore, if you're using asp.net, don't exceed a path of 260 characters. Less than 260 will always work, and asp.net has no troubles with long querystrings. ``` http://somewhere.com/directory/filename.aspx?id=1234 ^^^^^^^- querystring ^^^^^^^^^^^^^^^^^...
[ -0.2300630658864975, 0.2244400680065155, 0.6833052039146423, -0.049804214388132095, -0.012058176100254059, -0.03217555582523346, 0.3299129009246826, -0.054717157036066055, -0.3404766917228699, -0.7804301381111145, -0.32195329666137695, 0.4386982321739197, -0.10466136038303375, -0.318531364...
Long ago I did tests and recall that many browsers support 4k url's, except for IE which limits it to 2083, so for all practical purposes, limit it to 2083. I don't know if IE7 and 8 have the limitation, but if you're going to broad compatibility, you need to go for the lowest common denominator.
[ 0.31561967730522156, 0.0005723350332118571, 0.6096035838127136, -0.09699328988790512, -0.2806495726108551, -0.42572230100631714, 0.4813747704029083, 0.18981105089187622, -0.10909231752157211, -0.215694859623909, -0.10489315539598465, 0.3729825019836426, -0.18406595289707184, 0.227916687726...
Let's say I have an existing trivial XML file named 'MyData.xml' that contains the following: ``` <?xml version="1.0" encoding="utf-8" ?> <myElement>foo</myElement> ``` I want to change the text value of 'foo' to 'bar' resulting in the following: ``` <?xml version="1.0" encoding="utf-8" ?> <myElement>bar</myElement...
[ 0.3591107726097107, 0.18980588018894196, 0.8235836029052734, -0.2556806802749634, -0.04810187593102455, 0.10285394638776779, -0.16717374324798584, -0.47985461354255676, -0.07126639783382416, -0.5821218490600586, -0.06320811063051224, 0.6404392719268799, -0.10965409874916077, 0.017949173226...
I'm implementing a class that wraps around an xml document with a very strictly defined schema. I don't control the schema. One of the properties in the class is for an element value that the schema indicates must match a certain regular expression. In the setter for the property, if a string doesn't match the expres...
[ 0.017202770337462425, 0.02487071044743061, 0.11025649309158325, 0.13537317514419556, -0.0638526976108551, -0.4115011692047119, 0.006585299037396908, -0.175542414188385, 0.051545754075050354, -0.3949710428714752, -0.14032620191574097, 0.4687056839466095, -0.40789908170700073, -0.06621830910...
exception? What other options do I have? Thanks for the advice. One idea I had while thinking about this was creating a new class named something like MatchedString to enforce the constraint. It'd have a constructor that required a regex string, and after construction the expression would only be exposed to users vi...
[ 0.21203717589378357, -0.23487022519111633, 0.10284475982189178, 0.22557513415813446, -0.12191922217607498, -0.041643545031547546, 0.3737795650959015, -0.290725976228714, -0.2614375650882721, -0.11947257816791534, 0.23576879501342773, 0.6291805505752563, -0.54784095287323, -0.24929130077362...
specify which they want: * set to empty string * set to empty string and throw exception * set bad value anyway * set bad value anyway, and throw excpetion * just throw exception * do nothing Also, I was thinking that this would allow my class user to do some basic tests without having to duplicate the RegEx object i...
[ 0.7007530927658081, -0.08453047275543213, 0.07648814469575882, 0.04483218863606453, -0.04010377824306488, 0.0031097468454390764, 0.21909816563129425, -0.029013384133577347, 0.07536479830741882, -0.5246644616127014, 0.2484293133020401, 0.6761125326156616, -0.41790395975112915, -0.0585027523...