text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
hash = (hash * 7) + field1.GetHashCode(); hash = (hash * 7) + field2.GetHashCode(); ... return hash; } ``` Oh - for convenience, you might also consider providing `==` and `!=` operators when overriding `Equals` and `GetHashCode`. --- A demonstration of what happens when you get this wrong is [here](htt...
[ -0.144572451710701, 0.09508508443832397, 0.35883256793022156, -0.18959060311317444, 0.11703547835350037, -0.4589141607284546, 0.4009894132614136, -0.3663053810596466, -0.4452347457408905, -0.0717216432094574, -0.35813629627227783, 0.6895200610160828, -0.27725985646247864, 0.225049242377281...
I've several textboxes. I would like to make the Enter button act as Tab. So that when I will be in one textbox, pressing Enter will move me to the next one. Could you please tell me how to implement this approach without adding any code inside textbox class (no override and so on if possible)? Here is the code that I ...
[ -0.015037407167255878, -0.05277585983276367, 0.5849901437759399, -0.2820044457912445, 0.17044007778167725, -0.1340486854314804, 0.3937459886074066, -0.4106438159942627, 0.03497831150889397, -0.5350562930107117, -0.16925734281539917, 0.8522465229034424, -0.29578277468681335, -0.189119860529...
bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Enter)) { SendKeys.Send("{TAB}"); } return base.ProcessCmdKey(ref msg, keyData); } ```
[ 0.04013703018426895, 0.12660543620586395, 0.5832791328430176, -0.6446947455406189, -0.14100904762744904, 0.10612595081329346, 0.4278367757797241, -0.32093316316604614, -0.05704549327492714, -0.3689422905445099, -0.5516290068626404, 0.373989462852478, -0.4908232092857361, 0.5243820548057556...
What is the best way to print stuff from c#/.net? The question is in regard to single pages as well as to reports containing lots of pages. It would be great to get a list of the most common printing libs containing the main features and gotchas of each of them. [Update] for standard windows clients (or servers), n...
[ 0.5859228372573853, 0.04954332113265991, 0.4552867114543915, 0.12549170851707458, -0.21975857019424438, -0.30106231570243835, -0.1349060833454132, -0.13955065608024597, -0.20897555351257324, -0.7961090207099915, -0.019450955092906952, 0.5702255964279175, -0.15519076585769653, -0.2477282136...
application, it is to these objects that you're turning over control. The fundamental concept is that you're drawing to the printer. The simplest form of this is: ``` Sub MyMethod() Dim x as New PrintDocument AddHandler x.PrintPage, AddressOf printDoc_PrintPage x.Print End Sub Sub printDoc_PrintPage( s...
[ 0.06155838444828987, -0.236407071352005, 1.1508150100708008, -0.005576697178184986, -0.03932267054915428, -0.16726401448249817, -0.13398109376430511, -0.3204696774482727, -0.27788224816322327, -0.5828015208244324, -0.23433110117912292, 0.7791983485221863, -0.33116599917411804, -0.181063815...
as int = e.MarginBounds.Top e.Graphics.DrawString(textToPrint, printFont, Brushes.Black, leftMargin, topMargin) End Sub ``` What's happening here is that when my object (x) is sent the print command, it raises the "PRINT PAGE" event (which is designed to print 1 page at a time). This event then uses the Graphic...
[ 0.0039145126938819885, -0.03684191405773163, 0.8813819885253906, -0.15200772881507874, -0.36291009187698364, 0.14586028456687927, 0.062479786574840546, -0.258061945438385, -0.3364523649215698, -0.6962727904319763, -0.05976768955588341, 0.4002411961555481, -0.14819936454296112, 0.0961863473...
I have an Access 2003 file that contains 200 queries, and I want to print out their representation in SQL. I can use Design View to look at each query and cut and paste it to a file, but that's tedious. Also, I may have to do this again on other Access files, so I definitely want to write a program to do it. Where are...
[ 0.0660700649023056, 0.39664822816848755, 0.38982051610946655, 0.09367168694734573, -0.07257353514432907, 0.019837260246276855, 0.27412331104278564, -0.11691532284021378, -0.2568104565143585, -0.869092583656311, -0.019628675654530525, 0.6614121198654175, -0.4787381887435913, 0.4777728021144...
= conn.GetOleDbSchemaTable(OleDbSchemaGuid.Procedures, null); conn.Close(); ``` This will give you a DataTable with the following columns in it (among others): PROCEDURE\_NAME: Name of the query PROCEDURE\_DEFINITION: SQL definition So you can loop through the table like so: ``` foreach(DataRow row in queries.Ro...
[ -0.07029326260089874, -0.13061191141605377, 0.47464218735694885, -0.08314967155456543, 0.10216217488050461, 0.02104598470032215, 0.14778997004032135, -0.2739529311656952, -0.20179226994514465, -0.28567105531692505, -0.23664161562919617, 0.35481151938438416, -0.5895284414291382, 0.204877167...
I've recently found out about protocol buffers and was wondering if they could be applied to my specific problem. Basically I have some CSV data that I need to convert to a more compact format for storage as some of the files are several gig. Each field in the CSV has a header, and there are only two types, strings ...
[ 0.3632936477661133, 0.3741310238838196, 0.07083983719348907, 0.22891342639923096, -0.07702948898077011, -0.021820509806275368, -0.23915596306324005, -0.0931142196059227, -0.3451482355594635, -0.5758527517318726, 0.24493038654327393, 0.2422429472208023, -0.23806697130203247, -0.041135530918...
be able to add extra information to the file before saving. And I was hoping to make this future proof by handling different file versions. So, is it possible to use protocol buffers to capture a random number of randomly named columns of data, like a CSV file? Well, it's certainly representable. Something like: ``` ...
[ 0.16682837903499603, -0.032376497983932495, 0.3381878733634949, 0.1199827641248703, -0.025972239673137665, -0.06083458662033081, 0.12850818037986755, -0.16810692846775055, -0.4597468078136444, -0.5480649471282959, -0.027816053479909897, 0.05570688471198082, -0.41652944684028625, 0.18297584...
= 2; } message CsvRow { repeated CsvValue value = 1; } // Note that the column is implicit based on position within row message CsvValue { optional string string_value = 1; optional Decimal decimal_value = 2; } message Decimal { // However you want to represent it (there are various options here)...
[ 0.17557215690612793, 0.12332714349031448, 0.4634065330028534, -0.17966832220554352, -0.19573692977428436, 0.1893736869096756, 0.24186888337135315, -0.06202356889843941, -0.39184102416038513, -0.19411171972751617, -0.1877625286579132, 0.11306015402078629, -0.1439085751771927, -0.01844907552...
I'm looking to build a query that will use the non-clustered indexing plan on a street address field that is built with a non-clustered index. The problem I'm having is that if I'm searching for a street address I will most likely be using the 'like' eval function. I'm thinking that using this function will cause a tab...
[ 0.5152866244316101, 0.2806711792945862, 0.3173731565475464, 0.2443738430738449, -0.017179712653160095, -0.08680211752653122, 0.26587948203086853, 0.06310544162988663, -0.15561453998088837, -0.6602941155433655, 0.26442620158195496, 0.4048636853694916, -0.2839202880859375, 0.3089393675327301...
database server are you using, what are you really trying to achieve, and what is your LIKE statement going to be like? For instance, where the wildcard characters are can make a difference to the query plan that is used. Other possibilities depending on what you want to achieve are performing some pre-processing of t...
[ 0.10558030009269714, -0.06520664691925049, 0.16819405555725098, 0.3135213851928711, -0.146537646651268, -0.2788258492946625, 0.04515879601240158, 0.0016224700957536697, -0.37691769003868103, -0.3584837019443512, 0.29827064275741577, 0.48015499114990234, -0.35494139790534973, 0.040082745254...
I have been looking for a quadtree/quadtree node implementation on the net for ages. There is some basic stuff but nothing that I would be able to really use it a game. My purpose is to store objects in a game for processing things such as collision detection. I am not 100% certain that a quadtree is the best data str...
[ -0.08405157178640366, 0.034501321613788605, -0.1495845466852188, 0.1949538141489029, -0.09110689908266068, -0.1347111314535141, 0.274671733379364, 0.1669968068599701, -0.22893355786800385, -0.7498190402984619, 0.19762097299098969, 0.19583819806575775, -0.40253564715385437, 0.05582065135240...
Ankh). How would I write a basic but complete quadtree class (or octree) in C++? How would you use the quad tree for collisions? Quadtrees are used when you only need to store things that are effectively on a plane. Like units in a classic RTS where they are all on the ground or just a little bit above it. Essentially...
[ -0.20740553736686707, -0.05369344353675842, 0.05070563405752182, 0.4800691604614258, -0.2511497437953949, 0.36014121770858765, 0.29866957664489746, -0.24147868156433105, -0.4832507371902466, -0.7245268821716309, -0.26139265298843384, -0.454547643661499, -0.16473104059696198, 0.252585232257...
eights. They should be used when the game entities are distributed more evenly among all three dimensions. If you are looking for a binary tree - like a red-black tree - then you want to use a data structure called a binary space partitioning tree (BSP tree) or a version of it called the KD Tree. These partition space...
[ 0.21780216693878174, -0.28416091203689575, -0.09835012257099152, 0.22699308395385742, -0.25736770033836365, 0.13257890939712524, -0.2509007453918457, -0.1568344533443451, -0.781146228313446, -0.6146270036697388, -0.11848475784063339, 0.14358192682266235, -0.4083364009857178, 0.253647536039...
be quite useful, and they were used as far back as Doom. Now because you've partitioned the game space you now don't have to test every game entity against every other game entity to see if they collide, which is an O(n^2) algorithm at best. Instead you query the data structure to return the game entities within a sub...
[ -0.16417881846427917, 0.03474481776356697, 0.07983896136283875, 0.1186600849032402, 0.017316924408078194, -0.16176821291446686, 0.12446294724941254, 0.03979155048727989, -0.56184321641922, -0.6569928526878357, 0.2572968900203705, 0.437679260969162, -0.21771863102912903, 0.24951930344104767...
game entities from adjacent nodes, not just the ones in the current node, since they could still collide. * Rebalance the data structure after the entities have moved since you may have empty nodes in the data structure now, or ones that contain too many entities for good performance (also the degenerate case of all en...
[ -0.29802972078323364, -0.3116537928581238, 0.07453365623950958, 0.4041406512260437, 0.19988887012004852, -0.1808786392211914, 0.08443014323711395, -0.025228332728147507, -0.34136322140693665, -0.6906224489212036, -0.2552551329135895, 0.38256606459617615, -0.26175710558891296, 0.29152727127...
We have a database that persist our metadata and data. Our metadata is produced buy a dedicated team, using a Web application on the development server, and is a critical part of our application. Then the customer generates data according to this metadata. We already version the database schema, and all schema chang...
[ 0.4999779462814331, 0.20542941987514496, 0.2810772955417633, 0.4384728968143463, 0.3486524820327759, -0.2905275821685791, 0.11585862934589386, -0.32148516178131104, -0.11939918249845505, -0.24506914615631104, -0.06674079596996307, 0.7712866067886353, -0.060884781181812286, 0.30204027891159...
incremental solution (only version diffs). Text dumps Another solution is to export all metadata tables in text format (like XML), and then version those text files. But then you have to find a way to reimport them. So, is your metadata under version control? Why? How? Well as another answerer pointed out already the...
[ 0.024779008701443672, -0.14683765172958374, 0.7956150770187378, 0.028022412210702896, -0.05585750564932823, -0.12001729011535645, 0.30870360136032104, -0.37388134002685547, -0.37681037187576294, -0.585089921951294, -0.048226527869701385, 0.7368291616439819, -0.40939125418663025, 0.23865821...
allow to initialize a reference using a literal, when the reference is a reference to const: ``` void taking_refc(int const& v); taking_refc(10); // valid, 10 is an rvalue though! ``` Why do we introduce an rvalue at all you may ask. Well, these terms come up when building the language rules for these two situations...
[ 0.20325781404972076, 0.1248893290758133, 0.6813812851905823, -0.1921672821044922, -0.1521364003419876, -0.19210036098957062, -0.04117460921406746, -0.12116462737321854, -0.10701543092727661, -0.31952914595603943, -0.13852785527706146, 0.6298191547393799, -0.27155911922454834, -0.0244283471...
originally > from the assignment expression E1 = > E2, in which the left operand E1 is > required to be a (modifiable) lvalue. > It is perhaps better considered as > representing an object ‘‘locator > value’’. What is sometimes called > ‘‘rvalue’’ is in this International > Standard described as the ‘‘value of >...
[ -0.14425523579120636, -0.1370004564523697, 0.5639815926551819, -0.1297866553068161, -0.12726567685604095, 0.2338300496339798, 0.1913318783044815, -0.3850456178188324, -0.0016621132381260395, -0.3810517489910126, -0.20405274629592896, 0.6844874620437622, -0.288570761680603, 0.15309868752956...
is the rvalue > result. ### Conclusion Using the above semantics, it is clear now why `i++` is no lvalue but an rvalue. Because the expression returned is not located in `i` anymore (it's incremented!), it is just the value that can be of interest. Modifying that value returned by `i++` would make not sense, because...
[ -0.3342009484767914, 0.1319742500782013, 0.8088335394859314, -0.15644080936908722, -0.2976512014865875, 0.059992846101522446, 0.25490957498550415, -0.17251533269882202, 0.12113358825445175, -0.38102689385414124, -0.4397597014904022, 0.625018835067749, -0.18482168018817902, 0.28174328804016...
an lvalue-to-rvalue conversion, like in `int a = ++i;` will read the value out of it. Alternatively, we can make a reference point to it, and read out the value later: `int &a = ++i;`. Note also the other occasions where rvalues are generated. For example, all temporaries are rvalues, the result of binary/unary + and...
[ -0.18564003705978394, -0.06744231283664703, 0.8810884356498718, -0.29548150300979614, -0.1143777146935463, 0.21955429017543793, -0.036561932414770126, -0.44874799251556396, 0.16808074712753296, -0.6333363652229309, -0.16678674519062042, 0.7355077862739563, -0.3892538547515869, -0.084291212...
include so-called `rvalue references` that, even though they point to nonconst, can bind to an rvalue. The rationale is to be able to "steal" away resources from those anonymous objects, and avoid copies doing that. Assuming a class-type that has overloaded prefix ++ (returning `Object&`) and postfix ++ (returning `Obj...
[ -0.0666193887591362, 0.07857359945774078, 0.19150254130363464, -0.05308929830789566, 0.11867287009954453, 0.012095917016267776, 0.1866775006055832, -0.31161949038505554, -0.015384291298687458, -0.5556127429008484, -0.32616332173347473, 0.7519358992576599, -0.46965453028678894, 0.0643218606...
I'm trying to adress the following issue: 1. I have a server side .net application holding a Dictionary of PONO: the cache. 2. I have many client side .net User interfaces which can query some of these PONO, either by using the key or by asking the server to filter only PONO with a specific attribute value: the client...
[ 0.37532946467399597, 0.12208957970142365, 0.15071186423301697, 0.03618278354406357, -0.35966214537620544, -0.19503991305828094, -0.1459466814994812, 0.2947324216365814, -0.18360808491706848, -0.7617937326431274, 0.14807797968387604, 0.5719676613807678, -0.23854286968708038, 0.0142511771991...
the server to be smart enough to notify all the client already holding this PONO with the new value, and even send the PONO to all the client which have a filter matching the new PONO value. 4. I don't really care about transactional aspect. In my case, the last one to speak is always right. I think such a functionali...
[ 0.3941047489643097, 0.077815942466259, 0.3796341121196747, 0.11630197614431381, -0.38582801818847656, -0.18022878468036652, -0.15513156354427338, 0.1328270435333252, -0.1757967621088028, -0.5667808651924133, 0.18623851239681244, 0.6792287230491638, -0.2314845323562622, 0.10332179069519043,...
used as roadmaps and might be helpful to you: * <http://www.codeproject.com/KB/WCF/WCFWPFChat.aspx> * <http://www.codeproject.com/KB/WCF/WCF_Duplex_UI_Threads.aspx>
[ 0.5850945115089417, -0.1390514075756073, 0.3967974781990051, 0.24591869115829468, -0.09573943167924881, -0.031748153269290924, 0.20908638834953308, -0.12151075899600983, -0.6270608305931091, -0.6770657896995544, 0.000623723492026329, 0.07310514152050018, -0.24657005071640015, 0.46924090385...
Which IDE if any, are people using to develop Ironruby in? Visual Studio? According to the [IronRuby website](http://www.ironruby.net/) Visual Studio C# Express can be used (and in turn, any commercial version of Visual Studio 2005+ I'll assume). From the IronyRuby.net home page: > Today, you must check the source c...
[ 0.19263260066509247, 0.20706015825271606, -0.05280883237719536, -0.1225251778960228, -0.32342472672462463, 0.19586904346942902, 0.36637142300605774, -0.011137214489281178, -0.19423168897628784, -0.5495926141738892, 0.03336958587169647, 0.7766351103782654, -0.057909902185201645, -0.25506398...
own a copy, you can download a free copy of Visual C# Express 2008.
[ 0.23782698810100555, 0.09909375011920929, -0.349715918302536, 0.009362578392028809, -0.5111932754516602, -0.28634488582611084, 0.13187353312969208, 0.4987433850765228, -0.0667424127459526, -0.3894837200641632, -0.12009046226739883, 0.35044553875923157, -0.21511930227279663, -0.126248553395...
I am novice in sharepoint programming. I have a following code: ``` SPWorkflowTask task = some_getter(); task["Status"] = "Canceled"; task.Update(); ``` and I am getting SPException: ``` Microsoft.SharePoint.SPException: "This task is currently locked by a running workflow and cannot be edited." at Microsoft.S...
[ -0.14141876995563507, 0.41616541147232056, 0.15534283220767975, -0.25540539622306824, 0.08114910870790482, -0.040862519294023514, 0.697737991809845, -0.07525651156902313, -0.175515815615654, -0.32183513045310974, -0.16998377442359924, 0.6622704267501831, -0.1994628608226776, 0.186076924204...
the task list, this link may help : <http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/8ec834b6-5408-4079-bdfb-b88d341b36bf/> hope this helps
[ 0.1735449582338333, -0.11299177259206772, 0.09465250372886658, 0.3595598042011261, 0.11034178733825684, -0.029870163649320602, 0.3553798794746399, 0.3908388018608093, -0.5858141779899597, -0.8432652950286865, 0.03720175474882126, 0.2947048544883728, 0.3784940540790558, 0.18101204931735992,...
I am trying to get simple jQuery to execute on my Content page with no luck below is what I am trying to do: ``` <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script> <script type="text/javascript"> $(do...
[ 0.22424998879432678, 0.1122901439666748, 0.5104241371154785, -0.36615481972694397, -0.20440785586833954, -0.26426804065704346, 0.4585285186767578, -0.3444248139858246, 0.05131884291768074, -0.7343695163726807, -0.19942113757133484, 0.6583239436149597, -0.37194114923477173, -0.1501085013151...
{ $("#myDiv").css("border", "1px solid green"); } </script> <div id="myDive"> Hello </div> </asp:Content> ``` It may be that the JQuery file can't be found, try this for the script reference: ``` <script src="<%= Url.Content ("~/Scripts/jquery-1.2.6.js") %>" type="text/javascript"></...
[ 0.0705626830458641, -0.012532304041087627, 0.7089144587516785, 0.00149015081115067, 0.10114771872758865, -0.13604380190372467, 0.37201282382011414, -0.03623228892683983, -0.10203685611486435, -0.9138672351837158, -0.3265659511089325, 0.663280189037323, -0.33534932136535645, -0.096769765019...
<!-- Don't wrap this is a Url.Content call, it's like this so we get intellisense! --> <script src="../../Scripts/jquery-1.2.6-vsdoc.js" type="text/javascript"></script> <% } %> ``` **Edit:** Since the release of the RC 1 Refresh, there's been a know bug about placing elements with code blocks in the header, Phi...
[ -0.06547380238771439, 0.04590703547000885, 0.36049559712409973, 0.015053501352667809, -0.0997566506266594, -0.4822229743003845, 0.3745726943016052, -0.3666903078556061, -0.4280928373336792, -0.28000542521476746, -0.13303746283054352, 0.2917422950267792, -0.47692936658859253, -0.04068170487...
and is available [here](http://code.msdn.microsoft.com/KB958502/Release/ProjectReleases.aspx?ReleaseId=1736) - check out the blog post by the VS Web Dev Team [here](http://blogs.msdn.com/webdevtools/archive/2008/02/08/jscript-intellisense-working-with-jquery.aspx) for details. VS2010 has it built in.
[ -0.1313139945268631, -0.7255249619483948, 0.5186498761177063, 0.20355962216854095, -0.2137654721736908, -0.479230672121048, 0.08552868664264679, -0.12426880747079849, 0.06242607161402702, -0.8227872848510742, -0.06278195977210999, 0.30461201071739197, -0.0693477988243103, -0.15588724613189...
I'm trying to use the StringEscapeUtils.escapeXML() function from org.apache.commons.lang... There are two versions of that function, one which expects (Writer, String) and one which just expects (String).... <http://commons.apache.org/lang/api/org/apache/commons/lang/StringEscapeUtils.html#escapeXml(java.lang.String...
[ -0.06684914231300354, 0.003635162254795432, 0.2867857813835144, -0.3058202564716339, -0.03364579752087593, 0.13723960518836975, 0.5418311953544617, -0.47045716643333435, -0.09232938289642334, -0.6408389210700989, 0.050796300172805786, 0.7105368375778198, -0.6253130435943604, -0.34759300947...
with this? Thanks, Matt The error message is telling you that you are passing an Object into the method, not a String. If you are sure that the Object is a String, then you'll need to cast it to a String first. If this doesn't work, please post the actual code that is giving you trouble.
[ 0.5114405751228333, -0.096173495054245, 0.09086697548627853, 0.24804048240184784, -0.19663478434085846, -0.26325252652168274, 0.8022716641426086, 0.15137867629528046, 0.007274695672094822, -0.4639359414577484, 0.32822179794311523, 0.4661477208137512, -0.5241748690605164, 0.1767858117818832...
GCC 3.4.5 (MinGW version) produces a warning: parameter has incomplete type for line 2 of the following C code: ``` struct s; typedef void (* func_t)(struct s _this); struct s { func_t method; int dummy_member; }; ``` Is there a way to fix this (or at least hide the warning) without changing the method argument's si...
[ -0.10150313377380371, 0.034109797328710556, 0.24895113706588745, -0.11779618263244629, 0.0050981612876057625, -0.26518404483795166, 0.427903413772583, -0.014342064037919044, -0.11197217553853989, -0.16087311506271362, -0.17721772193908691, 0.4183099567890167, -0.5803536772727966, 0.2611454...
reference (as it is usually done)... The warning seems to be a bug with the current MinGW version of gcc. Contrary to what Adam said, it *is* valid C99 - section 6.7.5.3, paragraph 12 explicitly allows this: > If the function declarator is not part of a definition of that function, parameters may have incomplete type ...
[ 0.43761569261550903, 0.3078436553478241, 0.5844702124595642, -0.026245981454849243, 0.1617063581943512, -0.3314046859741211, 0.4489179253578186, -0.3625320494174957, -0.08385521173477173, -0.03717392310500145, -0.08947045356035233, 0.49665164947509766, -0.40715450048446655, 0.2833568155765...
so I'm just ignoring it for now.
[ 0.6069862246513367, 0.46047019958496094, 0.040126871317625046, -0.27524587512016296, -0.06884291023015976, -0.2784179747104645, 0.0382319800555706, 0.4456976652145386, -0.06438024342060089, -0.23399324715137482, 0.3278381824493408, 0.4606386125087738, 0.13909277319908142, 0.215516403317451...
I'm in the design stage for an app which will utilize a REST web service and sort of have a dilemma in as far as using asynchronous vs synchronous vs threading. Here's the scenario. Say you have three options to drill down into, each one having its own REST-based resource. I can either lazily load each one with a sync...
[ 0.31638243794441223, -0.008822559379041195, 0.32884088158607483, 0.13196344673633575, 0.29265910387039185, 0.24925152957439423, 0.26796960830688477, -0.03995707258582115, -0.16744600236415863, -0.807624876499176, -0.021971391513943672, 0.6069337129592896, -0.14466550946235657, 0.0547987520...
synchronous HTTP requests vs asynchronous because of that reason alone. The only time it makes sense is to have a worker thread make your synchronous request, and notify the main thread when the request is done. This will prevent the block. The question then is bench marking your code and seeing which has more overhead...
[ 0.08182124048471451, -0.0960371345281601, 0.14612817764282227, 0.41349974274635315, -0.06315607577562332, -0.16142240166664124, 0.3456372320652008, -0.08829902112483978, -0.35401439666748047, -0.7038121223449707, -0.0024742132518440485, 0.3973343074321747, -0.5017623901367188, 0.1752448678...
I have a class, say a singleton which is handling all of my data, I can't use asynchronous requests in a getter method. Meaning the following won't go: ``` - (NSArray *)users { if(users == nil) users = do_async_request // NO GOOD return users; } ``` whereas the following: ``` - (NSArray *)user...
[ -0.16362367570400238, -0.20229572057724, 0.16657696664333344, 0.2828172445297241, 0.1890130192041397, -0.11536846309900284, 0.06781145930290222, -0.007834064774215221, -0.29638925194740295, -0.5710281729698181, -0.25312086939811707, 0.3973955512046814, -0.29755696654319763, 0.4860081374645...
at Apple's Mail application on the iPhone, you'll notice they first suck down your entire POP/IMAP tree before making a second request to retrieve the first 2 lines (the default) of your message. I suppose my question to you experts is this. When are you using asynchronous, synchronous, threads -- and when are you usi...
[ 0.34280556440353394, -0.04227099195122719, 0.14626680314540863, 0.2749764025211334, 0.05494029447436333, 0.010312295518815517, 0.33781275153160095, 0.4516744911670685, -0.44463104009628296, -0.8009865283966064, -0.0924287885427475, 0.27190953493118286, -0.40507662296295166, -0.014633970335...
The problem is, I don't want to hack and I want to have something that's simple and easy to maintain. I don't think that there's a "right" answer. It seems that you understand the compromises involved and you just need to make your design around those. A few extra random points: sometimes your application forces a par...
[ 0.44480422139167786, 0.2236916422843933, 0.08710315823554993, 0.12382896989583969, 0.08636979013681412, -0.09367737919092178, 0.1984168142080307, 0.21173329651355743, -0.056424591690301895, -0.6293074488639832, 0.01370635163038969, 0.5196238160133362, -0.24334140121936798, 0.22567078471183...
using call backs). Since it's all event driven and each unit is small it allows the GUI to be pretty fluid without having the complexity of threading. I use a state machine to figure out why I'm getting a particular response, and a queue so that I only need to have a single operation "in flight" at any given time. The...
[ -0.018309002742171288, -0.13602635264396667, 0.36930105090141296, 0.31793609261512756, 0.136189267039299, -0.007995030842721462, 0.19959409534931183, 0.10522495210170746, -0.336113303899765, -0.5561999082565308, -0.2538827955722809, 0.6978517770767212, -0.30012843012809753, -0.168141618371...
If I update an Assembly that holds a workflow, I have to restart the appropriate Windows Process to pick up the new Assemblies. For Web parts & stuff, this is just the IIS Application Pool in question (iisapp /r), and for Timer Jobs it is OWSTIMER.exe (net stop/start SPTimerV3) But who runs the workflows? Are they ra...
[ 0.21518005430698395, 0.09651656448841095, 0.497406929731369, -0.02541685663163662, 0.26138827204704285, 0.10033772885799408, 0.26216012239456177, -0.3369298279285431, -0.24371588230133057, -0.6719881296157837, -0.2898460030555725, 0.48173487186431885, -0.17354708909988403, -0.0662951394915...
debugger to the server, and at least Workflows that are Scope="Site" in the feature.xml indeed run in the w3wp.exe of the Application Pool. I have not tested farm-level workflows though. The hierarchy is like this: * Application Pool * Web Application * Site Collection * Site The workflows for a certain SharePoint we...
[ 0.37971439957618713, 0.09483997523784637, 0.10446950793266296, 0.10143303871154785, 0.06575149297714233, -0.09326714277267456, 0.13306419551372528, -0.13049820065498352, -0.2763156592845917, -0.5887463092803955, -0.28770288825035095, 0.3525635898113251, -0.0668516457080841, 0.1864788830280...
I'm trying to convert an openGL [edit: "card that I drew"(?):) thx unwind]containing a lot of textures (nothing moving) into one PNG file that I can use in another part of the framework I'm working with. Is there a C++ library that does that? thanks! If you simply mean "take a scene rendered by OpenGL and save it as a...
[ 0.3157968521118164, -0.1864311248064041, 0.45606908202171326, 0.14412187039852142, -0.3239172101020813, 0.1003253161907196, -0.27605730295181274, -0.03616221249103546, -0.43491995334625244, -0.8677111864089966, 0.018218694254755974, 0.5308089256286621, -0.17767266929149628, -0.098729416728...
rendering the scene directly into the framebuffer, you can render it to a texture via an FBO, then render that texture as a full-screen quad. You can then take this texture and save it to a file (using [glGetTexImage](http://www.opengl.org/sdk/docs/man/xhtml/glGetTexImage.xml), for example).
[ -0.014761252328753471, -0.14121219515800476, 0.7352190017700195, 0.16528603434562683, -0.2627807557582855, 0.15893049538135529, 0.06545237451791763, -0.0626683235168457, -0.06764780730009079, -0.8729203343391418, -0.2973370850086212, 0.4456409513950348, -0.28626447916030884, 0.067786879837...
I have made some code which exports some details of a journal article to a reference manager called [Endnote](http://www.endnote.com/enhome.asp) The format of which is a list of items like below (an author): ``` %A Schortgen Frédérique ``` Unfortunately, I am having some encoding problems somewhere, as when endnote...
[ 0.1884259283542633, 0.33849960565567017, 0.5302273631095886, -0.01812296360731125, -0.3596230447292328, -0.45232725143432617, 0.23518085479736328, 0.20109552145004272, -0.009946268051862717, -0.7199981808662415, -0.13077467679977417, 0.2292584925889969, -0.11752772331237793, 0.251349806785...
= ""; if (_citation.GetFileExtension() != null) fileExtension = "." + _citation.GetFileExtension(); Response.AddHeader("content-disposition", "attachment; filename=citation" + fileExtension); Response.ContentType = _citation.GetFileReferrer(); Response.Charset = "UTF-8"; ...
[ -0.4149903655052185, -0.032377541065216064, 0.7486332058906555, -0.3169322907924652, -0.2919541597366333, 0.09244570881128311, 0.40445926785469055, -0.3614349961280823, -0.35116812586784363, -0.7831156253814697, -0.6870889663696289, 0.4383004307746887, -0.37752389907836914, 0.0847687497735...
(which are Western codepage 1252 and ISO-8859-1 respectively) might work. Btw, you're setting Response.ContentType twice. That sounds unlikely to be a good thing.
[ 0.5424860119819641, -0.2989575266838074, 0.24767142534255981, -0.11173798143863678, -0.44412288069725037, 0.014843123033642769, 0.3256135880947113, -0.19914984703063965, -0.3463210463523865, -0.6737656593322754, -0.09005840122699738, 0.5474262237548828, -0.11525488644838333, 0.063479125499...
After I downloaded the [Google Mail](http://mobile.google.com) and [Google Maps](http://mobile.google.com) application into my mobile phone I got an idea about a service that I want to implement. My problem is that I never did any programming for the mobile platform and I need someone to point me out some resources fo...
[ 0.4994795024394989, 0.17256692051887512, 0.1806480586528778, -0.12132930755615234, -0.07886361330747604, 0.16297753155231476, 0.2570544481277466, 0.23058706521987915, -0.09806492924690247, -1.009079098701477, 0.1683594137430191, 0.49534285068511963, -0.03814007714390755, 0.1034491434693336...
the best J2ME programmers have started before you...
[ 0.33424317836761475, 0.21430674195289612, -0.33123818039894104, 0.0790068581700325, -0.19181545078754425, -0.37386786937713623, 0.24753329157829285, 0.2521335780620575, -0.07329285889863968, -0.5208620429039001, -0.11656792461872101, 0.5798652172088623, 0.17273539304733276, -0.475406169891...
Just installed AnkhSVN and I see the equivalent of "svn up" but I'd prefer to run "svn st" first so that I don't just blindly update. The next release of AnkhSVN will enable the 'Recent Changes' tab in the pending changes window. This allows the equivalent of 'svn st -u' (It shows outgoing and incoming changes). We ar...
[ 0.40767765045166016, 0.041932113468647, 0.8564271926879883, -0.045554667711257935, -0.21445006132125854, -0.3197871446609497, 0.40939444303512573, 0.3792540729045868, -0.274904727935791, -0.8338079452514648, -0.29048290848731995, 0.6388270854949951, -0.06221451237797737, 0.144680455327034,...
Let me set the stage here. I'm a very junior developer who's recently made the transition from Network Admin who does some WinForms for his employer to a full-time development position working on an ASP.NET product that will be transitioning to Silverlight. I have precious little web development experiences. Some basic...
[ 0.5486863255500793, 0.3030328154563904, -0.11720290035009384, -0.07503017038106918, 0.07608737051486969, -0.1255928874015808, 0.17804141342639923, 0.31160208582878113, -0.02007794752717018, -0.7205243110656738, 0.3088568150997162, 0.24848531186580658, 0.2071937769651413, 0.2255383282899856...
Create a real web presence for the chapter. Currently they have only a single page on the local town website. 2. Provide a PR platform for the chapter. Here are some of the community services we provide, here are some upcoming events, etc... 3. Help drive membership. They're a small chapter and want to use the site as ...
[ 0.5999689698219299, 0.32382550835609436, 0.07176434993743896, 0.08794672787189484, -0.32721853256225586, -0.2453041970729828, 0.7101487517356873, 0.14304815232753754, -0.42619210481643677, -0.5771055221557617, 0.303894966840744, 0.17191720008850098, 0.30755582451820374, 0.2710226774215698,...
knowledge of HTML. 3. Improve my knowledge of CSS. 4. Provide a reasonably searchable (from Google, et al.) site. So, here are the basic high-level architectures (without consideration of DB, etc...) that come to mind for me. 1. Host an entire silverlight app in an HTML or ASPX page and buid the entire site in Silver...
[ 0.2960697412490845, 0.12092723697423935, 0.540450394153595, 0.2375631481409073, -0.37147921323776245, -0.18715021014213562, 0.32157671451568604, -0.2982233762741089, -0.4193812310695648, -0.7672560214996338, -0.27325424551963806, 0.33601051568984985, -0.23326164484024048, -0.31251844763755...
etc...) in appropriate locations. - This strikes me as easiest to maintain overall look & feel while still maintaining some searchability. 3. Build a primarily HTML site, using CSS as the primary mechanism to manage look & feel and host appropriate Silverlight controls where I want a rich interaction (as #2 above). - T...
[ 0.3294844329357147, 0.3178936839103699, 0.51402348279953, 0.13955458998680115, -0.35063353180885315, -0.2493201196193695, 0.3768288791179657, -0.2538844645023346, -0.10454408824443817, -0.9641688466072083, -0.3660617470741272, 0.3596269190311432, -0.2755192220211029, -0.3153826892375946, ...
to use this in part as a vehicle to learn that technology, which means that an all HTML, CSS, JavaScript/JQuery options doesn't really provide that for me. I'd also like hear what you all say regarding good resources (paid or free) to learn CSS and any aditional technologies I'd need to learn based on the choice made....
[ 0.6096903085708618, 0.09664315730333328, -0.006271801423281431, 0.3003697693347931, -0.20161065459251404, -0.3544774651527405, 0.16362743079662323, 0.5377122759819031, -0.11144690960645676, -0.7681291103363037, 0.17368493974208832, 0.3829320967197418, 0.3901613652706146, -0.180162504315376...
less (in my spare time), I'd like to limit the number of new things I need to learn. I'd LOVE to have the time to learn JavaScript, MVC, maybe a DotNetNuke framework, but from the perspective of a very junior developer and even MORE junior web developer, it's too much all at once. Baby steps first, and preferably baby ...
[ 0.724780797958374, -0.010268669575452805, 0.096040278673172, 0.18491606414318085, 0.016900595277547836, -0.0741429477930069, 0.2857905328273773, 0.21841968595981598, -0.2387927919626236, -0.9401658177375793, -0.03382205218076706, 0.557394802570343, 0.27888670563697815, 0.07778532803058624,...
that will host these platforms and learn it. Don't reinvent the wheel.
[ 0.5055519938468933, 0.1608097404241562, 0.050469204783439636, 0.6057104468345642, -0.02177547663450241, -0.5546476244926453, 0.2526010274887085, 0.31935131549835205, 0.07648912817239761, -0.6692841053009033, 0.48598983883857727, 0.5741939544677734, 0.18843373656272888, 0.3069022297859192, ...
Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring [Adobe AIR](http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime). Specifically, I'd like to read the contents from a file and write those contents to another...
[ 0.47440260648727417, 0.23282596468925476, 0.2151106745004654, -0.009839113801717758, 0.05202484503388405, -0.4403456449508667, 0.2122429758310318, -0.19412730634212494, -0.22811785340309143, -0.5855161547660828, -0.3248388469219208, 0.6291276216506958, -0.19587233662605286, 0.0363815315067...
-> Javascript -> Security](http://en.wikipedia.org/wiki/JavaScript#Security): > JavaScript and the DOM provide the > potential for malicious authors to > deliver scripts to run on a client > computer via the web. Browser authors > contain this risk using two > restrictions. First, scripts run in a > sandbox in w...
[ 0.24992071092128754, 0.15908315777778625, 0.30379518866539, -0.043396033346652985, -0.1174306869506836, -0.18710742890834808, 0.48936769366264343, -0.35152074694633484, -0.11823128908872604, -0.7575634121894836, -0.4144982099533081, 0.47790318727493286, -0.10189017653465271, -0.09812116622...
see [Kevin's answer](https://stackoverflow.com/questions/371875/local-file-access-with-javascript/38254151#38254151).
[ -0.2204250693321228, 0.1012277826666832, 0.25976505875587463, 0.19019164144992828, 0.2141779065132141, -0.23486581444740295, 0.23601564764976501, -0.1784386783838272, -0.6698180437088013, -0.11423937231302261, -0.3875599503517151, 0.18658167123794556, -0.3684787452220917, -0.03994961827993...
I'm just starting out with F# and I can't find the syntax to do object initialization like in C# 3. I.e. given this: ``` public class Person { public DateTime BirthDate { get; set; } public string Name { get; set; } } ``` how do I write the following in F#: ``` var p = new Person { Name = "John", BirthDate = ...
[ -0.18527022004127502, -0.06933028995990753, 0.3633682429790497, -0.2949807345867157, 0.31070399284362793, 0.10153324156999588, 0.11936735361814499, -0.026581065729260445, -0.17681154608726501, -0.5861610770225525, -0.1695670634508133, 0.4334111511707306, 0.15919376909732819, 0.119799926877...
I've seen a few mentions of this on Stack Overflow, but staring at Wikipedia (the relevant page has since been deleted) and at an [MFC dynamic dialog demo](http://sourceforge.net/projects/dyndlgdemo/) did nothing to enlighten me. Can someone please explain this? Learning a fundamentally different concept sounds nice. ...
[ 0.30487799644470215, 0.17366251349449158, -0.06294658780097961, 0.15953418612480164, 0.023327428847551346, -0.2277773916721344, 0.4808197617530823, -0.2177015095949173, -0.6091222167015076, -0.6649633646011353, 0.036945514380931854, 0.5056185126304626, -0.03909500688314438, -0.019171373918...
and running (that is, setting it up in your language of choice) is not easy (I'm sure it would be if I understood it better)...though I guess the toolbox for it need only be made once, then expanded as necessary. I think in order to really understand it, I'll probably need to try implementing it in another language. Ge...
[ 0.38412654399871826, 0.016963237896561623, -0.44498583674430847, 0.13291870057582855, -0.15555931627750397, -0.04964175820350647, 0.5474007725715637, 0.26266971230506897, -0.4371640980243683, -0.27870267629623413, -0.043216727674007416, 0.24374842643737793, -0.4038752019405365, -0.16503950...
a > ball in the air and catching it, then > differential execution is like > juggling. @windfinder's explanation is different from mine, and that's OK. This technique is not easy to wrap one's head around, and it's taken me some 20 years (off and on) to find explanations that work. Let me give it another shot here:...
[ 0.24317246675491333, -0.5646562576293945, -0.2964654564857483, 0.15297995507717133, -0.545952320098877, -0.15873782336711884, 0.6315498948097229, -0.045633479952812195, -0.30960536003112793, -0.35126298666000366, 0.17943450808525085, 0.10149898380041122, -0.27654317021369934, -0.2290983796...
statements, basic structured conditionals, simple loops, and subroutine calls. (Forget about functions returning values for now.) Now imagine two computers executing that same code in lock-step with each other, and able to compare notes. Computer 1 runs with input data A, and Computer 2 runs with input data B. They ru...
[ 0.18464726209640503, 0.02190396562218666, -0.31174489855766296, 0.10494600981473923, -0.28051817417144775, 0.13289648294448853, 0.4064505398273468, -0.11320296674966812, -0.008341203443706036, -0.09943852573633194, -0.17122918367385864, 0.2806018888950348, -0.12248469144105911, 0.147595986...
up. (This is why the code is structured, so we know the sister will eventually get to the ENDIF.) Since the two computers can talk to each other, they can compare notes and give a detailed explanation of how the two sets of input data, and execution histories, are different. Of course, in differential execution (DE) ...
[ 0.2368253767490387, 0.02065282128751278, 0.12372849881649017, 0.32434457540512085, 0.057556089013814926, 0.14214211702346802, -0.05620603263378143, -0.3779763877391815, -0.6381306052207947, -0.694505512714386, -0.004155533388257027, 0.4349273145198822, -0.22569072246551514, 0.4033352732658...
(write out) the current data and deserialize (read in) the past data (which was written the last time you did this). Now you can easily see what the differences are between what the data was last time, and what it is this time. The file you are writing to, and the old file you are reading from, taken together constitu...
[ 0.2648422122001648, -0.04003344848752022, 0.24667316675186157, 0.005676651373505592, 0.11818946152925491, 0.021844392642378807, -0.1599241942167282, 0.009372735396027565, -0.2617539167404175, -0.5207521319389343, 0.03890632838010788, 0.15345297753810883, -0.26970982551574707, 0.02600526250...
assembled into larger routines to paint things like diagrams of pipes, tanks, valves, stuff like that. We wanted to have the diagrams be "dynamic" in the sense that they could incrementally update themselves without having to redraw the entire diagram. (The hardware was slow by today's standards.) I realized that (for ...
[ 0.36399751901626587, -0.08907168358564377, 0.29904162883758545, 0.14667019248008728, 0.12694203853607178, 0.289093941450119, 0.09122470021247864, -0.12084822356700897, -0.567527711391449, -0.5078837275505066, 0.17810644209384918, 0.28719353675842285, -0.3152203857898712, -0.034876856952905...
the bar's height in a sequential byte-stream. Then to update the image, I could just run the procedure in a mode where it sequentially reads its old parameters while it writes the new parameters so as to be ready for the next update pass. This seems stupidly obvious and would seem to break as soon as the procedure con...
[ 0.43354618549346924, 0.07769009470939636, 0.7170141935348511, -0.08096465468406677, -0.3271762728691101, 0.2944639325141907, 0.3708672821521759, -0.45171311497688293, -0.2808363735675812, -0.4134068787097931, 0.38268017768859863, 0.5748322010040283, -0.1735311895608902, 0.01422982010990381...
while to convince myself, and then to prove, that this would *always* work, provided a simple rule (the "erase mode rule") is followed. The net result is that the user could design these "dynamic symbols" and assemble them into larger diagrams, without ever having to worry about how they would dynamically update, no m...
[ 0.41831105947494507, -0.12782491743564606, 0.2983512282371521, 0.1017773225903511, 0.10922930389642715, -0.05074303224682808, 0.5871086716651917, 0.13651368021965027, -0.2487185150384903, -0.6181522607803345, 0.06318404525518417, 0.4384060204029083, -0.24147763848304749, -0.248407542705535...
what does it achieve? It means I can build a dialog by writing a procedure to paint the controls, and I do not have to worry about actually remembering the control objects or dealing with incrementally updating them, or making them appear/disappear/move as conditions warrant. The result is much smaller and simpler dial...
[ 0.1451498568058014, -0.14965833723545074, 0.48041853308677673, 0.2711556851863861, -0.060192398726940155, 0.19206920266151428, 0.19449561834335327, -0.09979604184627533, -0.1933547705411911, -0.6371191143989563, 0.20143742859363556, 0.3784444332122803, -0.262793630361557, -0.27751681208610...
editing, and it will always be provably correct, and I never have to deal with its events. Putting in an edit field for an application string variable is a one-line edit. * Why is it hard to understand? What I have found hardest to explain is that it requires thinking differently about software. Programmers are so fi...
[ 0.23948772251605988, 0.19417719542980194, 0.027353422716259956, 0.18248936533927917, -0.3707526922225952, -0.04233236983418465, 0.24749848246574402, 0.10595119744539261, -0.1742907464504242, -0.6779855489730835, -0.08283994346857071, 0.45453235507011414, -0.14753806591033936, 0.01954489015...
What I try to convey is that what really matters is *what do you need to say?* Imagine you are building a domain-specific language (DSL) where all you need to do is tell it "I want to edit variable A here, variable B there, and variable C down there" and it would magically take care of it for you. For example, in Win32...
[ 0.22287499904632568, -0.012119284830987453, 0.2084120810031891, 0.09362775087356567, -0.20391233265399933, -0.23782822489738464, 0.2554076910018921, 0.26115086674690247, -0.01525208167731762, -0.5643017292022705, -0.3496514856815338, 0.46129336953163147, -0.3454754948616028, 0.010590177960...
it means well, and Dynamic Dialogs tries to finish the job. **So, the different mode of thinking is:** to write a program, you first find (or invent) an appropriate DSL, and code as much of your program in that as possible. Let **it** deal with all the objects and actions that only exist for implementation's sake. If...
[ 0.13355696201324463, 0.20014365017414093, 0.28666555881500244, -0.02357490360736847, -0.09959745407104492, -0.14188578724861145, 0.405243456363678, -0.011949713341891766, 0.0650496780872345, -0.5860496163368225, -0.16748158633708954, 0.4961584210395813, -0.1798018217086792, -0.582033097743...
programmer discipline to avoid the pitfalls. Sorry to be so long-winded. If I haven't made sense, I'd appreciate it if you'd point it out and I can try and fix it. Added: In [Java Swing](http://en.wikipedia.org/wiki/Swing_%28Java%29), there is an example program called TextInputDemo. It is a static dialog, taking 27...
[ 0.059229638427495956, -0.36322909593582153, 0.5466642379760742, 0.016133958473801613, -0.0129676079377532, 0.11397796124219894, 0.39907771348953247, -0.12264381349086761, -0.2848450243473053, -0.5123466849327087, -0.5088991522789001, 0.2807411253452301, -0.4047774374485016, -0.204743936657...
sWholeAddress = sStreet = sCity = sZip = ""; } void CDDDemoDlg::deContentsTextInputDemo(){ int gy0 = P(gy); P(www = Width()*2/3); deStartHorizontal(); deStatic(100, 20, "Street Address:"); deEdit(www - 100, 20, &sStreet); deEndHorizontal(20); deStartHorizontal(); deStatic(100, 20, "City...
[ 0.35131627321243286, -0.35143816471099854, 0.6569374203681946, -0.015734968706965446, 0.15161125361919403, 0.47708651423454285, 0.30087465047836304, -0.3992471992969513, 0.001233057351782918, -0.8816461563110352, -0.6149176955223083, 0.30800071358680725, -0.17224211990833282, 0.29796963930...
iState = (iState+NSTATE - 1) % NSTATE; DD_THROW; } if (deButton(20, 20, ">")){ iState = (iState+NSTATE + 1) % NSTATE; DD_THROW; } deEndHorizontal(20); deStartHorizontal(); deStatic(100, 20, "Zip:"); deEdit(www - 100, 20, &sZip); deEndHorizontal(20); deStartHor...
[ 0.31008508801460266, -0.48344624042510986, 0.3621702790260315, -0.26476842164993286, -0.09681595116853714, 0.4360687732696533, 0.269015908241272, -0.8033557534217834, -0.008322121575474739, -0.5801762342453003, -0.4590921401977539, 0.41763436794281006, -0.23129716515541077, -0.043578587472...
Address")){ SetAddress(); DD_THROW; } if (deButton((www-100)/2, 20, "Clear Address")){ ClearAddress(); DD_THROW; } deEndHorizontal(20); P((gx = www, gy = gy0)); deStatic(P(Width() - gx), 20*5, (sWholeAddress != "" ? sWholeAddress : "No address set.")); } ``` Add...
[ 0.2363303005695343, -0.019190281629562378, 0.9119316935539246, -0.25184518098831177, 0.1499352753162384, 0.5526127219200134, 0.17462711036205292, -0.4094865918159485, -0.0122048519551754, -0.8641767501831055, -0.3130530118942261, 0.3267441987991333, -0.20737946033477783, 0.4004616439342499...
define the overall contents of the UI. Lines 30-48 define the controls for editing a single patient's record. Note the form of the program takes almost no notice of events in time, as if all it had to do was create the display once. Then, if subjects are added or removed or other structural changes take place, it is si...
[ 0.44538724422454834, 0.04355897381901741, 0.49818381667137146, 0.12150309979915619, 0.002858482301235199, 0.16391129791736603, 0.059252094477415085, -0.3743370473384857, -0.08763538300991058, -0.902374804019928, 0.16197285056114197, 0.03607238829135895, -0.04556410014629364, 0.027487937361...
incremental updates of the UI happen, and they are guaranteed correct. It might seem that this re-execution would be a performance problem, but it is not, since updating controls that do not need to be changed takes on the order of tens of nanoseconds. ``` 1 class Patient {public: 2 String name; 3 double age; 4...
[ 0.3688982129096985, 0.07319092005491257, 0.7723615169525146, -0.25512608885765076, 0.471110075712204, 0.17060045897960663, 0.337201327085495, -0.4107462167739868, -0.06657454371452332, -0.744106650352478, -0.3431720733642578, 0.7277160286903381, -0.119035504758358, 0.20570263266563416, 0...
For each patient, have a row of controls 14 FOR(i=0, i<patients.Count(), i++) 15 deEditOnePatient( P( patients[i] ) ); 16 END 17 // Have a button to add a patient 18 if (deButton(50, 20, “Add”)){ 19 // When the button is clicked add the patient 20 patients.Add(new Patient); 21 DD_THROW; 22 } 2...
[ 0.23693469166755676, -0.3138117492198944, 0.772555947303772, -0.30746185779571533, 0.10643764585256577, 0.6560876369476318, -0.0036521833389997482, -0.8018473982810974, -0.11816366761922836, -0.6792941689491272, -0.0568060539662838, 0.43499982357025146, -0.11444612592458725, 0.168728247284...
Have a button to remove this patient 36 if (deButton(50, 20, “Remove”)){ 37 patients.Remove(p); 37 DD_THROW; 39 } 40 // Edit fields for name and age 41 deEdit(w, 20, P(&p->name)); 42 deEdit(w, 20, P(&p->age)); 43 // If age >= 50 have a checkbox for smoker boolean 44 IF(p->age >= ...
[ 0.10715387761592865, 0.02551381289958954, 0.4771747291088104, -0.4514147639274597, 0.40955281257629395, 0.40355855226516724, 0.21083270013332367, -0.45715731382369995, -0.09370201081037521, -0.4870290458202362, -0.2868058383464813, 0.3141350746154785, -0.36305463314056396, 0.39568558335304...
Brian asked a good question, and I thought the answer belonged in the main text here: @Mike: I'm not clear on what the "if (deButton(50, 20, “Add”)){" statement is actually doing. What does the deButton function do? Also, are your FOR/END loops using some sort of macro or something? – Brian. @Brian: Yes, the FOR/END ...
[ 0.26680538058280945, -0.2403874695301056, -0.19170400500297546, -0.19104862213134766, 0.06111949682235718, 0.25801247358322144, 0.30265679955482483, -0.003655119799077511, -0.2830184996128082, -0.25465628504753113, -0.20939739048480988, 0.6121482253074646, -0.4440566599369049, -0.338524729...
returning TRUE. Thus, the "if(deButton(...)){... action code ...} is a way of attaching action code to the button, without having to create a closure or write an event handler. The DD\_THROW is a way of terminating the pass when the action is taken because the action may have modified application data, so it is invalid...
[ 0.2758431136608124, -0.29023370146751404, 0.3908376693725586, -0.031160863116383553, 0.09319043159484863, -0.1993413269519806, 0.7010226249694824, -0.2366430014371872, 0.007626958657056093, -0.18591934442520142, -0.15716102719306946, 0.7938401699066162, -0.22838036715984344, 0.178584992885...
is first executed (in SHOW mode), deButton creates a button control and remembers its id in the FIFO. On subsequent passes (in UPDATE mode), deButton gets the id from the FIFO, modifies it if necessary, and puts it back in the FIFO. In ERASE mode, it reads it from the FIFO, destroys it, and does not put it back, thereb...
[ 0.06534960865974426, -0.4307602345943451, 0.17562335729599, 0.09000701457262039, 0.14908094704151154, 0.13341549038887024, 0.1180402860045433, -0.15160878002643585, -0.113568514585495, -0.22326315939426422, -0.5203405618667603, 0.5174350738525391, -0.2665225863456726, -0.11555498838424683,...
character or clicks a button, that event is caught and recorded, and then the deContents procedure is executed in EVENT mode. deButton gets the id of its button control from the FIFO and askes if this is the control that was clicked. If it was, it returns TRUE so the action code can be executed. If not, it just returns...
[ -0.14230504631996155, -0.2313697636127472, 0.43046173453330994, -0.0627027153968811, 0.1387472301721573, 0.30705028772354126, -0.000934735347982496, -0.05268673226237297, -0.06291931122541428, -0.3754255175590515, -0.4623737931251526, 0.5357177257537842, -0.18283763527870178, -0.3102928102...
processing, myStringVar always equals the contents of the edit control. That is how "binding" is done. The same idea applies to scroll bars, list boxes, combo boxes, any kind of control that lets you edit application data. Here's a link to my Wikipedia edit: <http://en.wikipedia.org/wiki/User:MikeDunlavey/Difex_Articl...
[ -0.09847792237997055, 0.0915212482213974, 0.6666543483734131, -0.020156625658273697, -0.36272260546684265, -0.004298566374927759, -0.05167416110634804, -0.20934374630451202, -0.17311517894268036, -0.447713166475296, 0.02117607183754444, 0.5930911302566528, -0.22893203794956207, 0.193871214...
Environment is VS2008, .Net 3.5 The following C# code (note the specified encoding of UTF8) ``` XmlWriterSettings settings = new XmlWriterSettings (); StringBuilder sb = new StringBuilder(); settings.Encoding = System.Text.Encoding.UTF8; settings.Indent = false; settings.NewLineChars = "\n"; settings.ConformanceLe...
[ -0.036832503974437714, 0.08637657761573792, 0.8271399736404419, -0.15313200652599335, 0.39238932728767395, -0.3047807514667511, 0.46146151423454285, -0.384416401386261, 0.027981624007225037, -0.899641215801239, -0.11889471858739853, 0.8106292486190796, -0.33984535932540894, 0.0034787941258...
suspect it's because it's writing to a StringBuilder, which is inherently UTF-16. An alternative to get round this is to create a class derived from StringWriter, but which overrides the Encoding property. I believe I've got one in [MiscUtil](http://pobox.com/~skeet/csharp/miscutil) - but it's pretty trivial to write ...
[ 0.31818822026252747, 0.2474634051322937, 0.2517106235027313, -0.07830394804477692, 0.2820773720741272, -0.4652658700942993, 0.395789235830307, -0.2548713684082031, 0.11524756997823715, -0.3228209316730499, 0.19205835461616516, 0.4125956594944, -0.3669857680797577, -0.07371893525123596, -...
get { return encoding; } } } ```
[ -0.19850173592567444, 0.16889029741287231, -0.15195564925670624, -0.09296476095914841, 0.386050283908844, -0.04616803675889969, 0.2968997061252594, 0.004208070691674948, 0.2195906788110733, -0.697297215461731, -0.6198807954788208, 0.6688838005065918, -0.41405293345451355, 0.001640686648897...
How are you supposed to unit test a web service in C# with Visual Studio 2008? When I generate a unit test it adds an actual reference to the web service class instead of a web reference. It sets the attributes specified in: <http://msdn.microsoft.com/en-us/library/ms243399(VS.80).aspx#TestingWebServiceLocally> Yet, ...
[ 0.5034869909286499, 0.0763419046998024, 0.16534362733364105, 0.1096290722489357, -0.1318328082561493, -0.14312762022018433, 0.3118768036365509, -0.5785768032073975, 0.23711398243904114, -0.49480828642845154, 0.16524502635002136, 0.5719746947288513, -0.0504646860063076, -0.1800021231174469,...
class which does all the real work. Then I write unit tests for that other class. It turns out that class can sometimes be useful outside of the web-service context, so this way - you gain twice.
[ 0.3170149624347687, -0.2643016278743744, -0.14473602175712585, 0.327478289604187, -0.38493743538856506, 0.020123139023780823, 0.06711782515048981, -0.12279678136110306, -0.12500976026058197, -0.5509729385375977, 0.14743532240390778, 0.5622695088386536, 0.4208666682243347, -0.03687042742967...
I doubt I am the only one who has come up with this solution, but if you have a better one please post it here. I simply want to leave this question here so I and others can search it later. I needed to tell whether a valid date had been entered into a text box and this is the code that I came up with. I fire this wh...
[ 0.21458342671394348, -0.07363151013851166, 0.522225022315979, -0.21388214826583862, 0.11178847402334213, -0.30158793926239014, 0.3569723069667816, -0.15023955702781677, -0.05354413017630577, -0.7856997847557068, -0.17116478085517883, 0.6768777370452881, -0.37474414706230164, -0.16714373230...