text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
It's at least common practice to treat null BSTR (null WCHAR\* pointer) as an empty string and design all the code manipulating BSTRs accordingly. Answers to [this question](https://stackoverflow.com/questions/171641/should-there-be-a-difference-between-an-empty-bstr-and-a-null-bstr) say the same. Where is this practi...
[ -0.03234326094388962, 0.20550303161144257, -0.13461263477802277, -0.1638001948595047, -0.34322836995124817, -0.2015034705400467, 0.40570712089538574, 0.017454633489251137, -0.4866688549518585, -0.33435454964637756, -0.1601138561964035, 0.1691487729549408, -0.538796067237854, 0.225856423377...
elements is either an empty BSTR or a NULL BSTR. An empty BSTR indicates a present, but zero-length, data value. A NULL BSTR indicates a data value that is not present. So, officially they are both `BSTR`s with no data elements, but with slightly different semantics (though there's nothing to say that those 2 cases ne...
[ -0.22701455652713776, 0.31260979175567627, 0.12211891263723373, 0.10563419759273529, -0.20556490123271942, -0.24155573546886444, 0.448580801486969, -0.07062718272209167, -0.22905682027339935, -0.27591314911842346, -0.29236266016960144, -0.03091321885585785, -0.285397469997406, 0.2846474051...
I need the JavaScript code to iterate through the filled attributes in an HTML element. This [Element.attributes](http://reference.sitepoint.com/javascript/Node/attributes) ref says I can access it via index, but does not specify whether it is well supported and can be used (cross-browser). Or any other ways? (witho...
[ 0.011338239535689354, 0.18998120725154877, 0.6429728865623474, -0.18271316587924957, -0.03216969594359398, 0.004257600288838148, 0.31667932868003845, -0.46214771270751953, -0.02439061738550663, -0.8318645358085632, -0.013182378374040127, 0.7377756834030151, -0.13051563501358032, 0.06230335...
question supports, no matter whether they have actually been defined in HTML or not. You must look at the `attrib.specified` Boolean property to find out if the attribute actually exists. Firefox and Chrome seem to support this property as well: ``` for (var i = 0; i < elem.attributes.length; i++) { var attrib =...
[ 0.16412866115570068, 0.11549480259418488, 0.5168021321296692, 0.10301867127418518, 0.15722991526126862, 0.007394194137305021, 0.06628397852182388, -0.7476019859313965, -0.016468388959765434, -0.4498894214630127, -0.29835543036460876, 0.6672185063362122, -0.27892592549324036, -0.21360020339...
I've looked in various resources regarding this topic, and it seems to me that I need a Loader for every Sprite which contains an image file (png). I'm trying to make a Tile Rendering System, and have created a grid of X by Y sprites, but all of them actually reference the same image file. Is there any other way to do...
[ 0.4859338104724884, 0.1712479144334793, 0.47733747959136963, -0.036666978150606155, -0.5805047154426575, 0.3137563169002533, 0.0061049251817166805, -0.5021159052848816, -0.3032872974872589, -0.7657294273376465, 0.0508287288248539, 0.32938557863235474, -0.5259025692939758, 0.043072808533906...
new Array( 100 ); var nIndex:int = 0; var nImgLoadCount:int = 0; for ( ; 100 > nIndex; ++nIndex ) { cTileLoaders[ nIndex ] = new Loader(); cTiles[ nIndex ] = new Sprite(); // perform more sprite initialization .... cTileLoaders[ nIndex ].contentLoaderInfo.addEventListener( Event.COMPLETE, ImageLoade...
[ 0.042695753276348114, -0.27172648906707764, 0.9264577031135559, -0.176400825381279, -0.3096439242362976, 0.24176402390003204, 0.2678767442703247, -0.8057159781455994, -0.0899377316236496, -0.5240516066551208, -0.2003660798072815, 0.5938304662704468, -0.30701929330825806, 0.0006088420632295...
i/o error if ( 100 == nImgLoadCount ) { cTiles[ nIndex ].addChild( cTileLoaders[ nIndex ].content ); } } ``` I think the answer in your case is to utilise the Bitmap data contained within the image you're loading like this: ``` var tilesWide:uint = 10; var tilesHigh:uint = 10; var tileHolder:Sprite ...
[ -0.09116432815790176, -0.10507720708847046, 0.5841080546379089, -0.12168276309967041, 0.07943470031023026, 0.06601881980895996, 0.36168962717056274, -0.42306846380233765, -0.24971511960029602, -0.6520704627037048, -0.28694573044776917, 0.6653410792350769, -0.2830495238304138, -0.0509969368...
Loop through your tiles */ for (var a:uint = 0; a < tilesWide; a++) { for (var b:uint = 0; b < tilesHigh; b++) { var tile:Sprite = new Sprite(); /* Attach the template BitmapData to each tile */ var tileBitmap:Bitmap = new Bitmap(templateBitmapData);
[ 0.3885385990142822, -0.5541397929191589, 0.3805646598339081, -0.034962620586156845, -0.01343974657356739, -0.0369289331138134, 0.7637038826942444, -0.6356385350227356, -0.21645285189151764, -0.414081335067749, 0.026613229885697365, 0.0941632091999054, -0.44111883640289307, 0.06523706018924...
tile.addChild(tileBitmap); tile.x = a * tile.width; tile.y = b * tile.height; tileHolder.addChild(tile); } } } ```
[ -0.0073043531738221645, 0.03160834312438965, 0.17192116379737854, -0.3055843114852905, -0.08864699304103851, -0.08118030428886414, 0.302256315946579, -0.21457132697105408, -0.07103628665208817, -0.7537815570831299, -0.27132755517959595, 0.3661072552204132, -0.2185811698436737, 0.3571209609...
I need a way in Perl to strip naughty things, such as XSS, image interjection, and the works. I found [HTML::StripScripts](http://search.cpan.org/dist/HTML-StripScripts) but it hasn't updated in close to two years, and I'm not up to date with all the new exploits. Is it safe? What other markups languages (in Perl) w...
[ 0.6127779483795166, -0.19754496216773987, 0.5520579814910889, 0.032778721302747726, -0.27471569180488586, -0.199302539229393, 0.1666032373905182, 0.09419675171375275, -0.28907671570777893, -0.62481290102005, -0.263248473405838, 0.3845326602458954, -0.25841039419174194, -0.26798009872436523...
we're running ARMailer in one of our projects right now. It's working fine but as different customers are allowed to send confirmation emails via this service we want to offer them the possibility to use their own SMTP settings for that. Is there a way to change ARMailer settings on the fly? Or is there an ARMailer a...
[ 0.6903509497642517, 0.0062643070705235004, 0.5070763826370239, 0.2133619487285614, -0.26805591583251953, -0.03560727462172508, 0.6251992583274841, -0.1050034612417221, -0.06327375769615173, -0.3652830123901367, 0.37393221259117126, 0.4853348135948181, -0.15236283838748932, -0.2213335484266...
I've taken my first baby steps into Unit Testing and, due to a better understanding of the domain, have made a change to a domain model that has broken a unit test. So this brought up the question: **When is it permissible to change previously working unit tests?** I figure I'm missing an important aspect of unit tes...
[ 0.6551805734634399, 0.27151739597320557, 0.03430766239762306, -0.010683847591280937, -0.11985716968774796, -0.27753323316574097, 0.46011531352996826, -0.20631811022758484, -0.19387391209602356, -0.16091260313987732, 0.07459937036037445, 0.6141980886459351, 0.2504878044128418, 0.51555895805...
functionality, and as such are, a priori, correct.
[ 0.16608664393424988, 0.5552185773849487, -0.0005011815228499472, -0.21740370988845825, 0.17910000681877136, -0.07793570309877396, 0.4045879542827606, -0.45090585947036743, 0.1518908143043518, -0.24452731013298035, -0.6835518479347229, 0.8272852301597595, 0.028321504592895508, -0.1361895650...
When running Sharepoint (WSS 3.0) with Windows Authentication (NTLM), external users must supply their usernames in the form of *DOMAIN\username*. This makes sense, because you could have multiple domains, trusts between them, etc. However in my case, I only have one domain, and I want my users to be able to logon with...
[ 0.27019068598747253, 0.1250932663679123, 0.49498996138572693, -0.04215270280838013, -0.18313845992088318, -0.36463072896003723, 0.4413871169090271, 0.0034405102487653494, -0.03981570154428482, -0.5872582197189331, -0.11179684847593307, 0.32396212220191956, -0.31639376282691956, 0.190237522...
explanation at <http://forums.iis.net/t/1151401.aspx> but basically it's impossible due to the the design of integrated authentication - the client has to know the domain before the server is contacted. The closest you get to a default domain is local logins on the server - potentially a solution if users are truly e...
[ -0.057231392711400986, -0.1678432673215866, 0.2860168218612671, 0.17845450341701508, 0.13441738486289978, -0.4857730567455292, 0.5788170695304871, 0.13850554823875427, -0.26286545395851135, -0.6200317740440369, 0.03616819158196449, 0.2828383147716522, -0.07677612453699112, 0.22904172539710...
This supposedly easy task gave me some headache. I simply want to let the user enter any text that succeeds `float.TryParse` into a Textboxish control. I could use a normal TextBox and check the Text in some btnOK\_Click, but this is obviously lame. Also, there is a nice built-in MaskedTextBox control, but I failed to...
[ 0.30154117941856384, 0.22642764449119568, 0.2673853039741516, 0.2662196755409241, -0.09581615775823593, -0.19460201263427734, 0.6400500535964966, -0.05813898891210556, -0.12837056815624237, -0.520196795463562, 0.24303005635738373, 0.39500126242637634, -0.15370920300483704, -0.1593797653913...
simply miss an obvious solution, or do I have to implement this functionality myself? I'm aware of a few similar threads on SO, but there was no feasible solution to be found. **Update:** Yes, WinForms. **Edit** Well that makes it alot easier... Just add a `Validating` Event Handler to your textbox and do the `TryPa...
[ 0.2500527501106262, -0.1881752759218216, 0.2757844924926758, 0.21621137857437134, 0.08349641412496567, -0.38173747062683105, 0.46702009439468384, -0.03693629056215286, 0.08925314992666245, -0.740273118019104, -0.19755065441131592, 0.7884706854820251, -0.3045436143875122, -0.186605289578437...
in asp.net or winforms/wpf If its asp.net, you could use a combination of `RegularExpressionValidator` (to account for comma seperation, 1 decimal point, etc...) and a `RangeValidator` to set the min/max values for a float. Aside from that, the only way to guarantee it would be to wrap the textbox in an updatepanel,...
[ 0.17579153180122375, -0.35500067472457886, 0.5668704509735107, 0.17290331423282623, 0.11103574931621552, -0.09700760990381241, 0.1228165477514267, -0.1321844905614853, -0.0045714532025158405, -0.49140655994415283, -0.11829497665166855, 0.5363381505012512, -0.04491676762700081, -0.171135917...
How to add mnemonic character to a regular button in Flex? Show me some examples. Here is an extended button component, that can help you deal with the task: ``` package test { import mx.controls.Button; import flash.text.TextFormat; public class ShortcutButton extends Button { private static const underlineTF:Te...
[ 0.3639167547225952, -0.4813779890537262, 0.5264357328414917, -0.3828792870044708, -0.09714285284280777, 0.35729309916496277, 0.40225347876548767, -0.5391631126403809, -0.13075074553489685, -0.5980802178382874, -0.2504791021347046, 0.5815544724464417, -0.515631914138794, -0.2432789355516433...
= value.indexOf("~"); if (shortcutPosition >= 0) value = value.substring(0, shortcutPosition) + value.substring(shortcutPosition + 1); super.label = value; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDis...
[ -0.014775262214243412, -0.5033202171325684, 0.7706183791160583, -0.2140951156616211, 0.38619962334632874, -0.17124933004379272, 0.36009296774864197, -0.4951722323894501, -0.15292684733867645, -0.4714818000793457, -0.5194955468177795, 0.7753686308860779, -0.4195542335510254, -0.030067242681...
} } } ``` Just place "~" symbol before the symbol you want to underline to show it's a shortcut mnemonic character. Example (you'll have to add `xmlns:test="test.*"` to the container component): ``` <test:ShortcutButton label="~Update" /> ```
[ 0.10727409273386002, -0.1019945815205574, 0.23334260284900665, -0.023654431104660034, 0.24078291654586792, -0.19783176481723785, 0.010184197686612606, -0.10886885225772858, 0.19678184390068054, -0.6849254369735718, -0.28563377261161804, 0.5197863578796387, -0.16743825376033783, -0.02580178...
The title speaks for itself. I'm building a **winforms** C# 2.0 app. Any tutorials or inspiring ideas? ADO.NET is a big topic - but the keywords to search for here are `SqlConnection`, `SqlCommand`, `SqlDataReader`, etc. If you like `DataSet` (I'm not a fan, but some people love them), then the dataset designer will d...
[ 0.2107892781496048, 0.06390030682086945, 0.36721518635749817, 0.3217454254627228, -0.31782540678977966, -0.31057098507881165, 0.1134847104549408, 0.25269877910614014, -0.15944534540176392, -0.5388984680175781, 0.01751451939344406, 0.4143287241458893, 0.12705345451831818, 0.0296636968851089...
become options.
[ 0.3556252419948578, -0.12573592364788055, -0.2327478677034378, 0.32721301913261414, 0.35712477564811707, 0.13200470805168152, 0.24045631289482117, 0.2837229073047638, -0.06973371654748917, -0.9493096470832825, -0.46591195464134216, 0.26476430892944336, -0.021753456443548203, 0.210636273026...
I've seen some samples of using 'T' to make a method reuseable for generic collections of different classes, but I've never really gotten into it or understood the samples. I wonder if it would be possible to put the 2 methods below into one and what the downsides of doing this would be (performance-wise). Anyone? ...
[ 0.4306704103946686, -0.11766058206558228, 0.04000962898135185, 0.15227662026882172, 0.3241540193557739, 0.06801002472639084, 0.2489464432001114, -0.14453443884849548, -0.3870182931423187, -0.4820265769958496, -0.2544497847557068, 0.4931720197200775, -0.08375055342912674, 0.2192101478576660...
new SelectListItem() { Text = d.Code + " - " + d.Description, Value = d.Id.ToString() }).ToList(); items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" }); return items; } [NonAction] public List<SelectListItem> ToSelectList(IEnumerable<Function> fun...
[ -0.21688483655452728, -0.5413692593574524, 0.8296100497245789, -0.42071396112442017, 0.38891029357910156, 0.3039722442626953, 0.05963188782334328, -0.6681894063949585, -0.3624926507472992, -0.5906645059585571, -0.6036299467086792, 0.6738184690475464, -0.2844310402870178, 0.1740687489509582...
items = functions.Select(f => new SelectListItem() { Text = f.Description, Value = f.Id.ToString() }).ToList(); items.Insert(0, new SelectListItem() { Text = defaultOption, Value = "-1" }); return items; } ``` --- **SOLUTION** The solution that I used: *usage* ``` var departmentIte...
[ -0.1745419055223465, -0.07006340473890305, 0.8134932518005371, -0.07110492140054703, 0.2519516348838806, 0.6189323663711548, 0.14623460173606873, -0.43145719170570374, -0.4917609393596649, -0.4244881868362427, -0.5544920563697815, 0.6251499652862549, -0.19068463146686554, 0.530769824981689...
public static List<SelectListItem> ToSelectList<T>(this IEnumerable<T> enumerable, Func<T, string> text, Func<T, string> value, string defaultOption) { var items = enumerable.Select(f => new SelectListItem() { Text = text(f), Value = value(f) }).ToList(); items.Insert(0, new SelectListIt...
[ -0.32327285408973694, -0.4094657003879547, 0.5640017986297607, -0.1763947606086731, 0.17054317891597748, 0.11966731399297714, 0.03814596310257912, -0.35495081543922424, -0.3856905698776245, -0.46039944887161255, -0.6009345650672913, 0.5143594741821289, -0.5698254704475403, 0.17300957441329...
a common interface like @Grzenio suggested, you could use a generic method like this: ``` public List<SelectListItem> ToSelectList<T>(IEnumerable<T> enumerable, Func<T, string> text, Func<T, string> value, string defaultOption) { var items = enumerable.Select(f => new SelectListItem() { Text = text(f),...
[ -0.09772814810276031, -0.48643365502357483, 0.46899551153182983, -0.06488735973834991, -0.03427460044622421, -0.0027240205090492964, -0.044881872832775116, -0.4954080879688263, -0.37785768508911133, -0.7069040536880493, -0.36123189330101013, 0.494784951210022, -0.3967275023460388, 0.190044...
" - " + d.Description, d => d.Id.ToString(), "default"); t.ToSelectList(functions, f => f.Description, f => f.Id.ToString(), "default"); ```
[ -0.009108873084187508, -0.24793368577957153, 0.4065472185611725, -0.22182075679302216, 0.2715112864971161, -0.041966862976551056, 0.2032695710659027, -0.3820839524269104, 0.24476613104343414, -0.3893696963787079, -0.7247035503387451, 0.7556211948394775, -0.4592520296573639, 0.2113398313522...
I am trying to implement a Workflow, where the user needs to select a destination document library. I could figure out two possible ways: 1. Once the user manually starts the workflow, we would display a webpage where he would select the destination document library. 2. we would initially display a webpage. where Us...
[ 0.030017124488949776, -0.3389712870121002, 0.7221048474311829, 0.08678494393825531, -0.1428329050540924, 0.07821346819400787, 0.1762995570898056, -0.2574924826622009, -0.15393418073654175, -0.8112053275108337, -0.0035572366323322058, 0.6008437871932983, -0.13645270466804504, 0.183661714196...
implementiong a common interface like @Grzenio suggested, you could use a generic method like this: ``` public List<SelectListItem> ToSelectList<T>(IEnumerable<T> enumerable, Func<T, string> text, Func<T, string> value, string defaultOption) { var items = enumerable.Select(f => new SelectListItem() { T...
[ -0.014931969344615936, -0.4720936119556427, 0.4232901334762573, -0.10814916342496872, 0.04295119270682335, -0.08455510437488556, 0.04438766837120056, -0.6504741311073303, -0.301887571811676, -0.527971088886261, -0.16952262818813324, 0.581927478313446, -0.5684913992881775, 0.095606088638305...
+ " - " + d.Description, d => d.Id.ToString(), "default"); t.ToSelectList(functions, f => f.Description, f => f.Id.ToString(), "default"); ```
[ 0.022287636995315552, -0.257354199886322, 0.3587925136089325, -0.25097888708114624, 0.2485194355249405, -0.020900629460811615, 0.24401436746120453, -0.43651053309440613, 0.26897871494293213, -0.40054214000701904, -0.6852158308029175, 0.8098551034927368, -0.4126991033554077, 0.1372173130512...
So I have some PHP code that looks like: ``` $message = 'Here is the result: %s'; ``` I just used %s as an example. It's basically a placeholder for whatever will go there. Then I pass the string to a function and I want that function to replace the %s with the value. What do I need to do to achieve this? Do I need...
[ 0.17756687104701996, 0.10252426564693451, 0.16928276419639587, -0.047551099210977554, -0.04609311744570732, -0.007909387350082397, 0.21239539980888367, 0.08413423597812653, 0.027258077636361122, -0.5556812882423401, 0.003815273055806756, 0.23583509027957916, -0.3439282774925232, 0.11758060...
the placeholders. It also gives you great powers over how you want your string to be formatted and displayed. ``` $output = sprintf("Here is the result: %s for this date %s", $result, $date); ```
[ -0.18600048124790192, -0.2702789902687073, 0.30063900351524353, -0.19738848507404327, 0.21717701852321625, 0.05357958748936653, -0.04157897084951401, 0.16418568789958954, -0.10122855752706528, -0.5479593873023987, -0.24159298837184906, -0.11029572039842606, -0.1836872100830078, 0.054470535...
I am trying to see from an SQL console what is inside an Oracle BLOB. I know it contains a somewhat large body of text and I want to just see the text, but the following query only indicates that there is a BLOB in that field: ``` select BLOB_FIELD from TABLE_WITH_BLOB where ID = '<row id>'; ``` the result I'm gett...
[ 0.26862141489982605, 0.5464321374893188, 0.18607085943222046, -0.0874473825097084, -0.0364740788936615, 0.0800648108124733, -0.05163951963186264, 0.071518175303936, -0.02821478247642517, -0.6277634501457214, -0.025395909324288368, 0.3051242232322693, -0.152640700340271, -0.0505970008671283...
of the BLOB from an SQL console (Eclipse Data Tools), not use it in code. First of all, you may want to store text in CLOB/NCLOB columns instead of BLOB, which is designed for binary data (your query would work with a CLOB, by the way). The following query will let you see the first 32767 characters (at most) of the t...
[ -0.023076314479112625, 0.03911852464079857, 0.6649941802024841, -0.20878678560256958, -0.10778601467609406, 0.3039238750934601, -0.18375059962272644, -0.1950402557849884, -0.21518252789974213, -0.5495718717575073, -0.37662073969841003, 0.23372061550617218, -0.5696498155593872, -0.044001232...
Exactly what the title says...........any thoughts on other good options for relational database implementation aside from SQL Server DB's. It's necessary for the .Net Framework to be able to communicate with it also. Typically the timeout is set on the command that issues the SQL statement. If that's in C# for exampl...
[ 0.2258366048336029, 0.03181302547454834, 0.3713010549545288, 0.08140801638364792, 0.13689079880714417, -0.43376412987709045, 0.22548583149909973, -0.18290162086486816, 0.037306047976017, -0.3702491521835327, -0.23454692959785461, 0.7702372074127197, 0.09168220311403275, 0.14812767505645752...
allows you to change the timeout of the job. I think the terminology in SQL Server is a "Execution Timeout" but I don't know how to set it I'm afraid. The point is - look at the thing running the statement, rather than the actual statement itself.
[ 0.3848176598548889, -0.06040804088115692, -0.0764281153678894, 0.11748487502336502, 0.06711756438016891, -0.14457960426807404, 0.14011026918888092, 0.1437930166721344, -0.2758841812610626, -0.34854310750961304, 0.21477775275707245, 0.48933953046798706, -0.14689409732818604, -0.133705884218...
Where does Railo store files created by when using the file attribute? I.e. ``` <cflog file="mylogfile" text="SOME ALERT HERE"> ``` The 'Tag Reference' in the Web Administrator does not give an indication, and neither does <http://wiki.getrailo.org/wiki/3-1-Tags:CFLog> I tracked it down with a *find* command: ```...
[ 0.30449557304382324, -0.35733503103256226, 0.20624475181102753, -0.04450658708810806, 0.1524600237607956, 0.1610223948955536, 0.038721345365047455, -0.22469562292099, -0.21193720400333405, -0.4578845500946045, 0.03524237498641014, 0.18504178524017334, -0.4160941243171692, -0.03121441043913...
I am parsing some HTML source. Is there a regex script to find out whether alt tags in a html document are empty? I want to see if the alt tags are empty or not. Is regex suitable for this or should I use string manipulation in C#? You have to parse the HTML and check tags, use the following link, it includes a C# li...
[ 0.44187813997268677, 0.13206976652145386, 0.32556599378585815, -0.01931358128786087, -0.18027259409427643, -0.1879757195711136, 0.30362915992736816, -0.21731765568256378, -0.21738432347774506, -0.5998514294624329, 0.15420740842819214, 0.48623988032341003, -0.39011821150779724, -0.023148359...
Trying to use [GnuPG](http://gnupg.org/) with Delphi (Win32). I need to sign some file with such console command: > `"C:\Program Files\GNU\GnuPG\gpg.exe" -a -u Alex --passphrase secretpassword --yes --clearsign -o C:\Result.asc C:\InputFile.txt` First I created normal VCL Forms App and used `CreateProcess` function, ...
[ 0.036300450563430786, 0.22606949508190155, 0.4798033833503723, -0.0019329596543684602, -0.0033890404738485813, -0.13116592168807983, 0.3929014801979065, -0.20424707233905792, -0.17255394160747528, -0.7996159195899963, -0.09855303913354874, 0.6721391081809998, -0.4347502589225769, 0.2926916...
if you get anything. You may be able to pipe the message in. It could be a problem reading the passphrase. I sort of remember having to pipe the passphrase into gpg instead of specifying it as a parameter.
[ 0.5374187231063843, -0.057832881808280945, 0.09493617713451385, 0.12759710848331451, -0.05319710075855255, -0.365165114402771, 0.4701475501060486, 0.17068706452846527, -0.13167686760425568, -0.6509662866592407, -0.16081532835960388, 0.23508723080158234, -0.21048523485660553, -0.00577345862...
I have a class like this: ``` class MyClass{ public: MyClass(int Mode); private: std::map < int, std::string, CompFunc > data; }; ``` The data member must use different comparison function according to Mode argument. ``` if Mode == 1, then use CompFunc1. if Mode == 2, then use CompFunc2. etc. ``` but the ...
[ -0.1513833850622177, -0.2868203818798065, 0.5350812077522278, -0.06479989737272263, 0.1267508864402771, -0.05644182115793228, 0.284548282623291, -0.22877393662929535, -0.1334407925605774, -0.7416303157806396, -0.09811398386955261, 0.6225547194480896, -0.39556577801704407, 0.233929291367530...
case 1: return CompFunc1(lhs, rhs); break; case 2: return CompFunc2(lhs, rhs); break; // etc. } } private: int mode_; }; class MyClass { public: explicit MyClass(int Mode) : cmp(mode), data(cmp) {} private: Cmp cmp; std::map<int, std::string, Cmp> data; }; ```
[ -0.543662428855896, -0.330667108297348, 0.5964159369468689, 0.015763532370328903, 0.13942043483257294, 0.14339488744735718, 0.15640558302402496, -0.2172999083995819, -0.2980533838272095, -0.54322350025177, -0.6177113652229309, 0.3751974403858185, -0.3659255802631378, -0.023406503722071648,...
We have a client application that needs to send messages to a server for various notifications. In order that the client can run occasionally connected I'm going to go with a message-queue approach. The queue processing will take messages off the queue and call a web service that will put them on another queue to final...
[ 0.28302550315856934, 0.15516819059848785, 0.4496554732322693, 0.023698050528764725, 0.12557482719421387, -0.12827454507350922, 0.12600046396255493, 0.069511778652668, -0.381841778755188, -0.6618373394012451, 0.04299478605389595, 0.4609239399433136, -0.4650542736053467, 0.24845941364765167,...
challenging due to the quality of tooling for investigating the contents of MSMQ queues. SQL Server 2005 Express is on all the machines, and is used to store data for our application. I currently have it down to two options: 1. Write a fairly basic persistent message-queue that stores the messages in a table after se...
[ -0.7022448778152466, -0.07142728567123413, 0.39531466364860535, -0.11765836924314499, -0.2696121633052826, -0.05331169441342354, 0.3425827920436859, 0.02005814015865326, -0.20476524531841278, -0.5559223890304565, 0.4005765914916992, 0.3247236907482147, -0.4221830666065216, 0.08221516758203...
so MassTransit etc aren't options) on the client, with a Service Broker transport that uses the local database. I have little experience with service buses (I still don't really get service bus terminology) so I'm concerned about the learning curve compared to writing something much more simple that meets my requireme...
[ 0.32952481508255005, -0.3068753778934479, 0.42909008264541626, -0.02746954746544361, -0.05502134561538696, 0.21044152975082397, 0.22240054607391357, 0.21225005388259888, -0.17334182560443878, -0.7921989560127258, 0.37887731194496155, 0.3815486431121826, -0.298111230134964, -0.1297891139984...
signalled to process the messages.
[ 0.1277085542678833, 0.33695197105407715, 0.3347553312778473, 0.05688983201980591, -0.31731557846069336, 0.19608034193515778, 0.324127733707428, 0.14513111114501953, -0.18300458788871765, -0.37062889337539673, -0.3116302192211151, 0.2998730540275574, -0.31493645906448364, 0.0134616885334253...
Say I want to have a method that takes any kind of number, is there a base class (or some other concept) that I can use? As far as I know I have to make overloads for all the different numeric types (`Int32`, `Int16`, `Byte`, `UInt32`, `Double`, `Float`, `Decimal`, etc). This seems awfully tedious. Either that or use ...
[ 0.7566463351249695, 0.30464908480644226, 0.00972271803766489, 0.12340482324361801, -0.08815537393093109, -0.10319068282842636, 0.28498005867004395, 0.20719386637210846, -0.2413012683391571, -0.2898644506931305, 0.15073885023593903, 0.41637104749679565, -0.1966162472963333, 0.32756891846656...
`Double` actually works for all except `Decimal`. So the answer I was looking for is `Double` - it acts like a base class here since most numeric types are assignable to it. (I guess `Decimal` is not assignable to `Double`, as it could get too big.) ``` public void TestFormatDollars() { int i = 5; string str ...
[ 0.6030316948890686, 0.07778868824243546, 0.24097470939159393, -0.2291632741689682, -0.06807240098714828, -0.08250913769006729, 0.23045839369297028, -0.36372122168540955, -0.18620043992996216, -0.11123285442590714, -0.2985403537750244, 0.48910102248191833, -0.360713928937912, 0.154304176568...
= FormatDollars(d); // this does not compile - decimal is not assignable to double } public static string FormatDollars(double num) { return "$" + num; } ``` The answer is: you don't need to provide overloads for ALL the numeric types, just for **Double** and **Decimal**. All others (except maybe some very un...
[ 0.5146909952163696, 0.13436289131641388, 0.3326382040977478, -0.22603163123130798, -0.08544056117534637, -0.1595364212989807, 0.054011087864637375, 0.011104432865977287, -0.1419311761856079, -0.25323405861854553, -0.16518634557724, 0.6098619699478149, -0.41833969950675964, 0.08432652801275...
confused in the first place :) (I was just looking for who to attribute the answer to and it was a combination of Scarecrow and Marc Gravell, but since they were comments i have put the answer here)
[ 0.04719885438680649, 0.2075943946838379, -0.19913050532341003, 0.09304115921258926, -0.44680556654930115, 0.2854413390159607, 0.4440852999687195, 0.12015320360660553, -0.29092422127723694, -0.29706767201423645, -0.0876716896891594, 0.3254082202911377, -0.2647481858730316, 0.231094777584075...
I have to submit a HTML form to a 3rd party website and one of the hidden fields is an XML string. The XML needs escaping before it is sent to the 3rd party. However when I add the plain XML to the form field it semi-escapes it for me. So then when I use HTMLEncode myself part of the XML is double-escaped. How do I pr...
[ -0.015071084722876549, 0.2860802412033081, 0.3273170590400696, -0.07653939723968506, -0.06453510373830795, 0.21668536961078644, 0.6080641746520996, -0.6336351037025452, -0.005034873262047768, -0.7294757962226868, -0.5366615653038025, 0.2215566337108612, -0.5409877300262451, -0.005483912769...
see what's happening - but I don't know how to prevent it? In the end I used a literal and then HTMLEncoding the XML string before assigned a HTML form variable to the literal text field. A little bit like below: ``` portalReq.Text = "<input type=""hidden"" name=""portalReq"" value='" & HTMLENCODE(RequestXML) & "' />"...
[ 0.1359667330980301, -0.04538756608963013, 0.548937976360321, -0.028022101148962975, -0.15301091969013214, -0.3278270959854126, 0.36762988567352295, -0.1846799999475479, 0.1274491399526596, -0.45878341794013977, 0.1055242195725441, 0.49373605847358704, -0.38069257140159607, 0.04953470081090...
I need help on regex or [`preg_match`](http://php.net/preg_match) because I am not that experienced yet with regards to those so here is my problem. I need to get the value "get me" but I think my function has an error. The number of html tags are dynamic. It can contain many nested html tag like a bold tag. Also, the...
[ 0.20010197162628174, -0.18842878937721252, 0.48950687050819397, -0.20464257895946503, -0.09638720005750656, -0.001102728070691228, 0.6366209983825684, -0.4816838204860687, -0.13899250328540802, -0.5643485188484192, -0.15088355541229248, 0.586428165435791, -0.5135965943336487, -0.1014349386...
"/<$tagname ?.*>(.*)<\/$tagname>/"; preg_match($pattern, $string, $matches); return $matches[1]; } $str = '<textformat leading="2"><p align="left"><font size="10">get me</font></p></textformat>'; $txt = getTextBetweenTags($str, "font"); echo $txt; ?> ``` That should do the trick
[ 0.101734958589077, -0.13130062818527222, 0.8121761083602905, -0.31706950068473816, 0.1543002724647522, 0.016739457845687866, 0.38429996371269226, -0.6064987778663635, -0.050540145486593246, -0.45656877756118774, -0.4197860658168793, 0.6259922385215759, -0.30667805671691895, -0.218089744448...
Am wondering if anybody has tried this a technique to get events to the client from the server side. I have an environment that uses Unix based servers and so can't use WCF duplex / callbacks etc. The idea being that my clients are windows boxes running a thick .net app would spin up a WCF self host and register thei...
[ 0.5608806610107422, 0.14021018147468567, 0.4055909216403961, -0.1040986105799675, -0.30012670159339905, -0.31867045164108276, 0.08797329664230347, 0.09958077222108841, -0.3337181806564331, -0.5095771551132202, 0.2988140285015106, 0.46052947640419006, -0.21346734464168549, 0.448418378829956...
server for it and the client would then get it etc. I still trying to get my head round WCF so not sure if this is a good way to go, are there any security implications I should worry about ? are there ways to get the Duplex calls to work across platform. I have done something similar before using sockets or maybe a ...
[ 0.3581344783306122, -0.004599051084369421, 0.46075448393821716, 0.14001889526844025, -0.38754045963287354, -0.3810718357563019, 0.3040379583835602, 0.2238987237215042, -0.20741495490074158, -0.5052333474159241, 0.05651582032442093, 0.6890242099761963, -0.3042350709438324, 0.221118241548538...
I am trying to write a worm filtering utility on application layer. i have setup following rule to drop tcp packet with specific substring. **iptables -A INPUT -p tcp -m string --string "test" -j DROP --algo kmp** however,once a packet with matching string is found all the subsequent packets, even with non matching ...
[ 0.1171557828783989, -0.1977076232433319, 0.3237974941730499, 0.27876341342926025, -0.3295014798641205, -0.42702943086624146, 0.15146607160568237, 0.23049505054950714, -0.3532654047012329, -0.5985341668128967, 0.008319901302456856, 0.30704089999198914, -0.4016570448875427, 0.341834753751754...
so you cannot send other subsequent payload until the older one is reached, that's why you feel that all the subsequent packets are being dropped. If you set the similar rule for udp this won't happen you will be able to receive all the subsequent packets that do not match the string. this is because udp is a connecti...
[ 0.06671150773763657, -0.18113663792610168, 0.3502137362957001, 0.10317102074623108, -0.010060282424092293, -0.5224972367286682, 0.35188642144203186, 0.18659381568431854, -0.5488850474357605, -0.35382404923439026, -0.16903120279312134, 0.20242571830749512, -0.6214123964309692, 0.44184893369...
I have [CakePHP](https://en.wikipedia.org/wiki/CakePHP) (cake\_1.2.2.8120) and [EasyPHP](https://de.wikipedia.org/wiki/EasyPHP) (3.0) installed on [Windows Vista Ultimate](https://en.wikipedia.org/wiki/Windows_Vista_editions#Editions_for_personal_computers). I followed the "baking" tutorials online and successfully set...
[ 0.17102043330669403, 0.1988106369972229, 0.6923213005065918, -0.12201720476150513, -0.20433670282363892, 0.10210135579109192, 0.2711990773677826, -0.14158177375793457, -0.28646183013916016, -0.6692609786987305, -0.19264209270477295, 0.62347412109375, -0.0520378053188324, 0.1181891113519668...
from the command line) even though I've uncommented the "extension=php\_mysql.dll" line in the php.ini file. How can I fix this? Grab [XAMPP](https://en.wikipedia.org/wiki/XAMPP) which has Apache with the MySQL and PHP modules setup and working together, as well at the MySQL and command-line versions. It just unzips t...
[ 0.24716274440288544, 0.0022478573955595493, 0.5111810564994812, 0.12202677130699158, -0.025491969659924507, -0.26498809456825256, 0.4112074375152588, -0.0511142872273922, -0.541508674621582, -0.6070155501365662, -0.40422505140304565, 0.6440579295158386, -0.18113107979297638, 0.007271469570...
``` double? test = true ? null : 1.0; ``` In my book, this is the same as ``` if (true) { test = null; } else { test = 1.0; } ``` But the first line gives this compiler error: > Type of conditional expression cannot > be determined because there is no > implicit conversion between '`<null>`' > and '`double...
[ 0.400107204914093, 0.15568827092647552, -0.29289016127586365, -0.2542867660522461, -0.1852891445159912, -0.003907734993845224, 0.8727942705154419, -0.3058932423591614, 0.011613945476710796, -0.34200623631477356, -0.2569051682949066, 0.42022618651390076, -0.49578550457954407, -0.03312591835...
is no implicit conversion between `Struct` and `null`). What you can do is explicitly tell the compiler that one of the two expressions that are convertible to each other. ``` double? test = true ? null : (double?) 1.0; // 1 double? test = true ? (double?)null : 1.0; // 2 double? test = true ? default(double?...
[ 0.3707434833049774, 0.1771446317434311, -0.07142417132854462, -0.32160666584968567, -0.17465347051620483, 0.03907313942909241, 0.7814598083496094, -0.43588772416114807, 0.11403457075357437, -0.27144744992256165, -0.36129504442214966, 0.7120268940925598, -0.4626927375793457, -0.376052051782...
Is it possible for a Non-Interpreted language to have a Garbage collector. Interpreted languages have the Interpretor executing the Program line by line so the Interpretor might just as well provide a runtime with a GC. But is it possible to have a Garbage collector for any other language without building the GC in you...
[ 0.11783773452043533, 0.08911081403493881, -0.1667468100786209, 0.2464798092842102, -0.2554943859577179, -0.159950390458107, 0.14670167863368988, 0.09494262933731079, -0.24592076241970062, -0.12814608216285706, 0.03149595484137535, 0.47997212409973145, -0.710949718952179, -0.207918792963027...
Until now I've always used the ASP.NET MVC framework source for debugging ASP.NET MVC. On my laptop I just tried a different approach, namely bringing up the "Modules" window in VS while I am debugging and right-clicking System.Web.Mvc, then select "Load Symbols From" > "Microsoft Symbol Servers". VS seemed to actual...
[ 0.5004001259803772, -0.12586678564548492, 0.23598429560661316, -0.24493487179279327, -0.1346692591905594, 0.004113045521080494, 0.42962124943733215, 0.11480776220560074, -0.35249239206314087, -0.7270945310592651, 0.09475035220384598, 0.3185200095176697, -0.3183997571468353, 0.4314538538455...
System.Web.Mvc. So, I loaded the symbols, but still no source code. Not a big problem since I can still debug it the old way. But I am wondering what the Microsoft Symbol Servers are useful for then? They make stack traces work properly for native DLLs - without symbols, your stack traces often only go as far as the n...
[ 0.27603113651275635, 0.07750330120325089, 0.33436742424964905, -0.05657721310853958, 0.10432571172714233, -0.3184657394886017, 0.21954229474067688, 0.10690945386886597, -0.5183854103088379, -0.8013811111450195, 0.10984919220209122, 0.19650836288928986, -0.24900655448436737, 0.2007761299610...
some_windows_dll.dll some_other_windows_dll.dll some_other_windows_dll.dll myexe.exe myexe.exe ``` Without the symbols for the Windows DLLs, you'll find that the stack only gets this far: ``` mydll.dll mydll.dll some_windows_dll.dll ``` and you don't get to see all the way back to the start.
[ 0.2192104309797287, 0.17393726110458374, 0.5173248052597046, -0.31023940443992615, -0.050717901438474655, -0.1072956919670105, 0.07309103012084961, 0.5627424120903015, -0.40673545002937317, -0.6098604798316956, -0.1565430611371994, 0.275848388671875, -0.053020138293504715, 0.43724873661994...
I'm doing some weird reporting from a JPA data store. I need to select (using EJBQL) a list of objects. These objects contain collection of entities. I have a class that is constructed by: ``` FOOBean(String param1, String param2, List<Entity> listParam) ``` (notice that third parameter is a list) And I...
[ 0.2298211306333542, 0.3915998637676239, 0.28238436579704285, -0.11835592240095139, -0.2769939601421356, 0.07971378415822983, 0.14671310782432556, -0.07990171015262604, -0.2805018126964569, -0.3848309814929962, 0.1033790186047554, 0.35516947507858276, -0.5639348030090332, 0.1398405581712722...
e1.param1, e1.param2, e1) FROM Entity e1 GROUP BY e1.param1, e1.param2 ``` So that grouped entities are fetched into a list and inserted into the third parameter. Is it possible to do it that way or do I have to create two
[ 0.08166542649269104, 0.04877075180411339, 0.3516644239425659, 0.09079998731613159, -0.09554696828126907, 0.22896338999271393, 0.09046685695648193, -0.8591194748878479, -0.32239583134651184, -0.2562802731990814, -0.20724806189537048, 0.23219148814678192, -0.4323815107345581, -0.093558065593...
queries that selects distinct pairs of `param1` and `param2`; and fetches all entities with appropriate param values respectively? It is not possible, at least in JPA 1.0 (and I doubt that in JPA 2.0 it is different).
[ -0.3099064230918884, -0.096134252846241, 0.16098792850971222, 0.3843482732772827, -0.4245752692222595, 0.3263498842716217, 0.4284050464630127, -0.22653208673000336, -0.22601169347763062, -0.2816930115222931, -0.40102967619895935, 0.2210165113210678, -0.2623441219329834, -0.1520723849534988...
I have a couple of Divs with class='CCC'. I want to take all these divs in an array using jQuery and then loop through the array. How to do so. ``` // get an array of the divs (will act like one anyway) var divs = $('div.CCC'); // do something for each div divs.each(function() { // this refers to the current div as...
[ 0.5866090655326843, -0.19791807234287262, 0.3670458495616913, -0.07903338968753815, 0.09173059463500977, 0.045408014208078384, 0.25393739342689514, -0.4052668809890747, -0.1491928994655609, -0.5084007382392883, 0.134620800614357, 0.5206162333488464, -0.4653792083263397, 0.17148075997829437...
// this refers to the current div as we loop through doSomethingWith(this); }); LoopThroughDivs($('div.CCC')); ```
[ 0.2989945411682129, -0.022004347294569016, 0.7101168036460876, -0.18660899996757507, 0.485542356967926, -0.20255069434642792, 0.2433958500623703, -0.2597405016422272, -0.19009236991405487, -0.44041481614112854, 0.019802626222372055, 0.6502398252487183, -0.10178563743829727, 0.4560133814811...
My previous understanding of the decorator pattern was that you inherit `Window` with `WindowDecorator`, then in the overridden methods, do some additional work before calling the `Window`'s implementation of said methods. Similar to the following: ``` public class Window { public virtual void Open() { ...
[ 0.45032384991645813, -0.007306122221052647, 0.18400155007839203, -0.24579627811908722, 0.33487555384635925, -0.1952667534351349, 0.17528676986694336, -0.36795181035995483, 0.1109013631939888, -0.514380693435669, -0.40605562925338745, 0.6400772333145142, -0.31426411867141724, 0.543278336524...
} } ``` However this essentially hardcodes the decoration, so how would this be refactored to use composition instead of inheritance? Sorry, my C# is a a bit (OK, very) rusty, so there may be a few syntax errors, but the basic idea is right. ``` public interface IWindow { void Open(); } public class Window : IW...
[ 0.3489384353160858, 0.22826078534126282, 0.5683737993240356, -0.17023393511772156, 0.06195548549294472, 0.003498159348964691, 0.2737945020198822, -0.20756188035011292, -0.27360278367996216, -0.669285774230957, -0.2984990179538727, 0.6588637828826904, -0.18951894342899323, 0.398371756076812...
_wrappedWindow = wrappedWindow; } public virtual void Open() { // TODO Unlock window if necessary _wrappedWindow.open(); } } ``` The key thing to notice is the new `IWindow` interface; that's what allows you to keep using polymorphism.
[ 0.19698522984981537, -0.26846379041671753, 0.18158826231956482, -0.0729876458644867, -0.09374796599149704, -0.4374105632305145, 0.4081379175186157, -0.1847476065158844, -0.3969011604785919, -0.8057546615600586, -0.12108771502971649, 0.43079784512519836, -0.3548659086227417, 0.4468937516212...
Say I have ``` var i = 987654321; ``` Is there an easy way to get an array of the digits, the equivalent of ``` var is = new int[] { 9, 8, 7, 6, 5, 4, 3, 2, 1 }; ``` without `.ToString()`ing and iterating over the chars with `int.Parse(x)`? ``` public Stack<int> NumbersIn(int value) { if (value == 0) return n...
[ -0.04184998944401741, -0.0028014422859996557, 0.6017080545425415, -0.37252530455589294, 0.05550570413470268, 0.3015420734882355, 0.22386667132377625, -0.5319708585739136, -0.2466929703950882, -0.3310689628124237, -0.32509446144104004, 0.42752063274383545, -0.2238532304763794, 0.20619307458...
/= 10) numbers.Push(value % 10); return numbers.ToArray(); } ```
[ 0.1790369302034378, -0.19464515149593353, 0.46731504797935486, -0.6130956411361694, 0.2634003460407257, 0.42111095786094666, 0.20559583604335785, -0.18326370418071747, -0.24436530470848083, -0.5718235969543457, -0.2958836257457733, 0.6332944631576538, -0.39746272563934326, 0.21227011084556...
It's highly likely that there is a limitation on how many synchronization objects - semaphores, events, critical sections - can one process and all processes on a given machine use. What exactly is this limitation? For windows, the per-process limit on kernel handles(semaphores, events,mutex) is `2^24`. From [MSDN](ht...
[ -0.24386264383792877, -0.02158144861459732, 0.3940122127532959, 0.19352124631404877, -0.07709115743637085, 0.19133521616458893, 0.2568393349647522, -0.07436059415340424, -0.32486969232559204, -0.7838439345359802, -0.23443011939525604, 0.3772744834423065, -0.2435498684644699, 0.334630757570...
handles you > can create is based on available > memory. The number of handles that you > can create on 32-bit Windows is > significantly lower than 2^24.
[ -0.28357967734336853, 0.1058250144124031, 0.25123199820518494, 0.324160635471344, -0.4359119236469269, 0.24469482898712158, 0.2343418300151825, 0.09110503643751144, -0.2855137586593628, -0.9760599732398987, 0.028133660554885864, 0.3845321238040924, 0.00539481220766902, 0.10791414231061935,...
I am fading a DIV slowly, ``` $(ele).fadeIn('slow'); ``` How can i create a very good animation along with the fadeIn to show real animation power of jquery You could also check out [JQuery UI](http://jqueryui.com/) as this allows you to animate colours too or read [this article](http://devsnippets.com/jquery-posts...
[ 0.2704412639141083, -0.3440057635307312, 0.55181485414505, -0.03301316499710083, -0.31077542901039124, -0.09441787004470825, 0.19894425570964813, 0.20732930302619934, -0.11320078372955322, -0.9141252636909485, -0.12693314254283905, 0.33141496777534485, 0.04268840700387955, 0.34365588426589...
In my Delphi7 app, I can connect to the database when logged in as Administrator ("Dave"), but not when logged in as a standard or limited user ("Paris"). Happens on XP Home & Vista Business Ultimate 64. I use an alias for the db, and have tried placing the .fdb file in Program Files, in an app folder on the C drive, a...
[ 0.20840811729431152, 0.36661437153816223, 0.623626172542572, -0.2927974760532379, -0.0019651874899864197, -0.38665035367012024, 0.43329304456710815, 0.2298765778541565, -0.10081959515810013, -0.6321119070053101, -0.2739863097667694, 0.8132822513580322, -0.19119077920913696, -0.081955432891...
access, but now know that Firebird runs as a service - it should be able to r/w any file anyplace. And, mghie, your suggestion that I try to access with isql was genius. I can connect as a limited user. I'm probably breaking something in my app., & IBO trips over it. Rephrased question: What is the generally accepted ...
[ 0.08956897258758545, 0.2123994380235672, 0.6232403516769409, 0.31987494230270386, 0.3134746849536896, 0.030565889552235603, 0.3946854770183563, 0.20160815119743347, -0.30990657210350037, -0.6727994680404663, -0.2754684090614319, 0.3634742796421051, -0.4730086624622345, 0.18829305469989777,...
database (&alias) is in all these places. You can do this by defining a record with known packing rules and check it using SizeOf. Tested in Delphi 2009: ``` type TTestRec = record A: Byte; B: Int64; end; {$IF SIZEOF(TTestRec) = 9} {$MESSAGE HINT '$A1'} {$ELSEIF SIZEOF(TTestRec) = 10} {$MESSAGE HINT '...
[ -0.46192696690559387, -0.03666616603732109, 0.20563408732414246, -0.26460227370262146, -0.11589909344911575, 0.0720726028084755, 0.23417320847511292, -0.272705078125, -0.27695122361183167, -0.4516517221927643, 0.34068071842193604, 0.2747214734554291, -0.4861583709716797, -0.047224584966897...
I am interested to know what specifically Page.IsPostBack means. I am fully aware of it's day to day use in a standard ASP.NET page, that it indicates that the user is submitting data back to the server side. See [Page:IsPostBack Property](http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx) B...
[ 0.05731429532170296, 0.05975274369120598, 0.5401905179023743, 0.03185039758682251, -0.5097664594650269, -0.10103116929531097, 0.13774961233139038, -0.2923755943775177, 0.05262860283255577, -0.7222963571548462, 0.09440165013074875, 0.0791015774011612, -0.16955043375492096, 0.147422611713409...
do I tell the difference between the pages first load, and a Request caused by the client hitting submit? **update** I've added in `<input type="text" value="aa" name="ctrl" id="ctrl" />` so the Request.Form has an element, and Request.HTTPMethod is POST, but IsPostBack is still false? One way to do this is to exte...
[ 0.1896212249994278, 0.23023481667041779, 0.6785656213760376, -0.10872615873813629, -0.29459452629089355, -0.06748901307582855, 0.3074706196784973, -0.5778879523277283, 0.05377710238099098, -0.6163458824157715, -0.07285945862531662, 0.4136943221092224, -0.36997807025909424, 0.18097250163555...
{ return Request.Form.Keys.Count > 0 && Request.RequestType.Equals("POST", StringComparison.OrdinalIgnoreCase); } } } ```
[ -0.11649049818515778, -0.02103135548532009, 0.6358797550201416, -0.1580679714679718, 0.12520959973335266, -0.07138463854789734, 0.2704523205757141, -0.3333314061164856, -0.10801823437213898, -0.4004717171192169, -0.32633480429649353, 0.480915904045105, -0.2812565267086029, 0.19410687685012...
would you create 3 list(of coordinate) for * empty position * black position * white position or just looping though the array when needed and play with the result every time? what would be best? (speed wise) Your two main choices are between speed and code clarity. If speed is your priority then you must use a 64 ...
[ -0.023532049730420113, -0.3203614354133606, -0.0172845758497715, 0.3856498897075653, -0.15719909965991974, 0.14617663621902466, -0.1945134550333023, -0.7297800183296204, -0.4320157468318939, -0.7052856087684631, 0.0008781985379755497, 0.5534323453903198, -0.15692104399204254, -0.1443650275...
data types like others have already suggested. Just remember that if you go this way you will probably hit a performance ceiling. To start you off, look at the code for [Crafty](http://en.wikipedia.org/wiki/Crafty) (C) and [SharpChess](http://sharpchess.com/) (C#). (Originally posted [here](https://stackoverflow.com/...
[ 0.031684864312410355, -0.051362697035074234, 0.25571879744529724, 0.24596963822841644, -0.07285241037607193, -0.13221286237239838, 0.11453234404325485, -0.2595902383327484, -0.4834389090538025, -0.5251106023788452, -0.006776826921850443, 0.4149186611175537, 0.05253652483224869, 0.061543032...
I its default configuration [fitnesse automatically adds the Test property to all pages ending in "Test".](http://fitnesse.org/FitNesse.PageProperties) However, in the project I'm working I have to add the Test property to all pages ending in "Tests". Unfortunately, renaming all pages so that they end in "Test" is not...
[ 0.8913925290107727, 0.18089918792247772, 0.45304566621780396, 0.08482813835144043, -0.08639335632324219, -0.2735905945301056, 0.6192740797996521, -0.3941999077796936, 0.3626600205898285, -0.8843997120857239, -0.01356117520481348, 0.11081163585186005, -0.15615272521972656, 0.142207518219947...
just renaming the page. Note: If you have a large number of test pages to retrofit, you could use wingrep/grepwin (or some other tool that can do large scale file search and replace, I personally use grepwin) and manipulate the properties.xml by inserting ``` <Test>true</Test> ```
[ 0.4027197062969208, -0.04365836828947067, 0.1840447187423706, 0.36005768179893494, -0.13187040388584137, -0.6065310835838318, 0.1399548053741455, -0.09756400436162949, 0.1779269129037857, -0.8208572268486023, -0.12491913139820099, 0.1908903867006302, 0.0616319477558136, 0.19089627265930176...
I'm using WatiN testing tool and i'm writing c#.net scripts. I've a scenario where i need to change the theme of my web page, so to do this i need to click on a image button which opens a ajax popup with the image and "Apply Theme" button which is below the image now i need to click on the button so how to do this plea...
[ 0.3190784454345703, -0.029054678976535797, 0.7576309442520142, 0.14541016519069672, -0.14707405865192413, -0.31332290172576904, 0.2446519136428833, 0.04951087012887001, -0.07506666332483292, -0.7748993039131165, -0.17495350539684296, 0.7060956358909607, -0.37245768308639526, 0.110847383737...
but is hidden from view. In that case you could try the .WaitUntil() and specify an attribute to look for. ``` IE.Button("ButtonID").WaitUntil("display","") ```
[ 0.10417009890079498, -0.42561066150665283, 0.5516350865364075, -0.07901155948638916, 0.5864824056625366, 0.15946035087108612, 0.2231951802968979, -0.023429112508893013, -0.04843011870980263, -0.627039909362793, -0.08611048012971878, 0.4629857838153839, -0.38250136375427246, 0.0560626611113...
Does anyone know how to get the current build configuration `$(Configuration)` in C# code? **Update** Egors answer to this question ( [here](https://stackoverflow.com/a/60545278/18797) in this answer list) is the correct answer. ~~You can't, not really. What you can do is define some "Conditional Compilation Symbo...
[ 0.3884144127368927, 0.18665888905525208, 0.1577373445034027, 0.02615324966609478, 0.44738397002220154, -0.2299250364303589, 0.4831256866455078, 0.0034682038240134716, -0.19701987504959106, -0.6957670450210571, -0.13133816421031952, 0.8628702759742737, 0.012170826084911823, -0.0627395808696...
RunMyRELEASERoutine(); #endif ``` However, don't do this unless you've good reason. An application that works with different behavior between debug and release builds is no good to anyone.
[ 0.6522225141525269, -0.21855370700359344, 0.20300406217575073, -0.045945726335048676, 0.10823414474725723, -0.7303726673126221, 0.7373288869857788, 0.1266477257013321, 0.1441866010427475, -0.5051791071891785, -0.2348310351371765, 0.6003164052963257, -0.6450381278991699, 0.09463610500097275...
Where can I get a code snippets for VC++ that can be used with the code snippet manager in Visual Studio 2008? I have SnippetEditor installed how to create snippet for **VC++**. > This is not possible in VS2008 without > using 3rd party software. However it > is possible in VS2005 with the "Power > Pack installer"....
[ 0.38123923540115356, -0.31814345717430115, 0.5038483738899231, 0.08993156254291534, -0.1378314197063446, 0.033134929835796356, 0.3183499574661255, 0.05818221718072891, -0.4276674687862396, -0.8404111862182617, -0.02317126654088497, 0.7018665671348572, -0.09624934941530228, 0.05002090334892...
Is it possible to have an ExtJsToolBar with multiple lines? I want a few controls on the first line and 3 ExtJsButtons on the 2nd. The toolbar is the top toolbar of a Panel. You haven't mentioned to what widget you like to add toolbars, but in general you may add as many toolbars as you want: ``` var panel = new Ext.P...
[ 0.1093815267086029, -0.2960030436515808, 0.6787448525428772, -0.0931939110159874, -0.07312062382698059, 0.3515273630619049, 0.01641075499355793, -0.4586801826953888, -0.25774577260017395, -0.9211921691894531, -0.07726585865020752, 0.5908127427101135, -0.4499020576477051, -0.368662089109420...
top toolbar's container panel tPanel.add(anotherToolbar); ```
[ 0.012463655322790146, 0.027567129582166672, 0.5105027556419373, -0.05032968148589134, 0.15904410183429718, 0.1858481466770172, -0.31037136912345886, -0.0017662504687905312, -0.22195208072662354, -0.5511611700057983, -0.19133402407169342, 0.6610341668128967, -0.1942109614610672, 0.037903517...
I recently answered this question [how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by](https://stackoverflow.com/questions/829089/how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by/829106#829106) My answer was to use an inline view to perform the function and t...
[ 0.1221817284822464, 0.00046935188584029675, 0.37270602583885193, -0.04650421440601349, -0.4251232147216797, 0.22001390159130096, -0.01516703236848116, -0.22337348759174347, -0.1485372632741928, -0.2734968662261963, -0.17032738029956818, 0.7410670518875122, -0.43969082832336426, -0.29174476...
queries by removing join operations and condensing several separate queries into a single query.
[ -0.16395319998264313, 0.14622122049331665, 0.12055405974388123, 0.3520669937133789, -0.10697975754737854, 0.10441327095031738, 0.42336055636405945, -0.06292743980884552, 0.08170841634273529, -0.3642103672027588, -0.41904160380363464, -0.06785766035318375, -0.46120941638946533, 0.4900514483...