text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
way to read an XML document is by using XPath. ### Reading an XML Document using XPath (Using XmlDocument which allows us to edit) ``` XmlDocument document = new XmlDocument(); document.LoadXml("<People><Person Name='Nick' /><Person Name='Joe' /></People>"); // Select a single node XmlNode node = document.SelectSing...
[ 0.19332611560821533, -0.031121019273996353, 0.6471126675605774, 0.2565939128398895, 0.02084999531507492, -0.11978168040513992, 0.1547454595565796, -0.5370597243309021, -0.19161422550678253, -0.6726167798042297, -0.32032182812690735, 0.3274449110031128, -0.00104506965726614, -0.107699252665...
XML against XSD at each Node (UPDATE 1) ``` XmlReaderSettings settings = new XmlReaderSettings(); settings.ValidateType = ValidationType.Schema; settings.Schemas.Add("", pathToXsd); // targetNamespace, pathToXsd settings.ValidationEventHandler += new ValidationEventHandler(settings_ValidationEventHandler); XmlReader ...
[ 0.0310367364436388, 0.07844986766576767, 0.5730454325675964, -0.06318820267915726, -0.12722639739513397, 0.02835392951965332, 0.3337094485759735, -0.5217059254646301, 0.021052498370409012, -0.5570159554481506, -0.3316773772239685, 0.6166985630989075, -0.2612718641757965, -0.075157128274440...
data you need. With the addition of object initializers you can create a query that even returns objects of your own definition right in the query itself. ``` XDocument doc = XDocument.Load(pathToXml); List<Person> people = (from xnode in doc.Element("People").Elements("Person") select n...
[ -0.013597057200968266, -0.30209028720855713, 0.43259990215301514, 0.3093944191932678, 0.24008509516716003, 0.06391441822052002, 0.011958285234868526, -0.1837080866098404, -0.24867932498455048, -0.5999398827552795, -0.16084396839141846, 0.47118017077445984, -0.2963140606880188, 0.1504338979...
Name = xnode.Attribute("Name").Value }).ToList(); ``` ***(UPDATE 2)*** A nice way in .NET 3.5 is to use XDocument to create XML is below. This makes the code appear in a similar pattern to the desired output. ``` XDocument doc = new XDocument( new XDeclaration("1.0", Enc...
[ 0.15677765011787415, -0.1683177649974823, 0.5488253235816956, -0.17842894792556763, 0.0014773901784792542, -0.2539277672767639, -0.056596703827381134, -0.17158693075180054, -0.01020857971161604, -0.6338268518447876, -0.4876019060611725, 0.42249545454978943, -0.45814138650894165, 0.15520901...
new XComment("Xml Document"), new XElement("catalog", new XElement("book", new XAttribute("id", "bk001"), new XElement("title", "Book Title")
[ 0.3823721706867218, 0.1152319684624672, 0.7142398357391357, 0.24225932359695435, 0.07802125811576843, -0.08775260299444199, -0.3086492419242859, -0.14305084943771362, -0.18255893886089325, -0.5103445053100586, -0.6411628723144531, -0.06063326820731163, -0.4526553153991699, 0.15450300276279...
) ) ); ``` creates ``` <!--Xml Document--> <catalog> <book id="bk001"> <title>Book Title</title> </book> </catalog> ``` All else fails, you can check out this MSDN article that has many examples that I've discussed here and more. <http://msdn.microsoft.com/en-us/library/aa468556.aspx...
[ -0.04149056226015091, 0.3629610538482666, 0.406241238117218, 0.014058252796530724, 0.2921542823314667, -0.2341536581516266, 0.3267107307910919, -0.2546731233596802, -0.3152919411659241, -0.44481366872787476, -0.5707418322563171, 0.6837988495826721, -0.28306883573532104, 0.3542988896369934,...
Should my program support IA64, or should it only support x64? I haven't been able to easily find IA64 computers myself. Is IA64 dead? MS seems to have a wide support for IA64, but it took me a long time to be able to find an IA64, and I had to end up getting it on eBay. What kind of software do you develop? If it's ...
[ 0.3760218620300293, 0.3366564214229584, 0.04093174263834953, 0.07520695775747299, -0.04569985345005989, -0.13722224533557892, 0.19450032711029053, 0.3518769145011902, -0.3169436454772949, -0.32892119884490967, 0.16674762964248657, 0.45458677411079407, -0.19044649600982666, 0.37470260262489...
you have to ask if you should support it, you probably don't need to. A couple things off the top of my head that might hamper an ia64 port: * any third party tools or libraries you're depending on need to support it * unaligned accesses that go largely unnoticed on x86 and x64 will cause headaches on ia64 Of course...
[ 0.7277742028236389, 0.45389315485954285, -0.037619370967149734, -0.0017806104151532054, -0.10131607204675674, -0.31423646211624146, 0.12336535006761551, 0.5116775631904602, -0.14812064170837402, -0.3081951141357422, 0.1267222762107849, 0.6731650829315186, 0.07156762480735779, 0.18112109601...
I'm building a python application from some source code I've found [Here](http://code.google.com/p/enso) I've managed to compile and fix some problems by searching the web, but I'm stuck at this point: When running the application this message appears. [alt text http://img511.imageshack.us/img511/4481/loadfr0.png](h...
[ 0.18181751668453217, 0.24196381866931915, 0.32959750294685364, -0.243120014667511, -0.35847023129463196, 0.03667539730668068, 0.5031253099441528, 0.08624984323978424, -0.404855877161026, -0.5043829679489136, 0.2384684681892395, 0.3862636089324951, -0.4596773684024811, 0.06845828890800476, ...
read in here: <http://msdn.microsoft.com/en-us/library/ms235591(VS.80).aspx> The solution is to run MT with the manifest and the dll file. I did it already and doesn't work either. Could anyone point me to the correct direction? This is the content of the manifest fie: ``` <?xml version='1.0' encoding='UTF-8' stand...
[ 0.0833231657743454, -0.05908510833978653, 0.5328288078308105, -0.012075782753527164, -0.0011953043285757303, 0.11470461636781693, 0.40836840867996216, -0.3680388033390045, -0.15257489681243896, -0.32503101229667664, 0.10717790573835373, 0.7087398767471313, -0.5125486850738525, -0.164530247...
to do. ps. if only everything was as easy as jar files :( This is the stack trace for completeness ``` None INFO:root:Skipping provider enso.platform.osx. INFO:root:Skipping provider enso.platform.linux. INFO:root:Added provider enso.platform.win32. Traceback (most recent call last): File "scripts\run_enso.py", l...
[ 0.19251610338687897, -0.20154829323291779, 0.323041170835495, -0.1317400336265564, 0.24955633282661438, 0.03794343024492264, 0.16246725618839264, -0.32963716983795166, -0.461141437292099, -0.5931956171989441, -0.36543071269989014, 0.10546857118606567, -0.4113411009311676, -0.21318630874156...
"C:\oreyes\apps\enso\enso-read-only\enso\platform\win32\__init__.py", line 48, in provideInterface import enso.platform.win32.input File "C:\oreyes\apps\enso\enso-read-only\enso\platform\win32\input\__init__.py", line 3, in <module> from InputManager import * File "C:\oreyes\apps\enso\enso-read-only\enso\pl...
[ -0.1709778755903244, 0.5602433085441589, 0.30688294768333435, 0.008939915336668491, 0.2179587334394455, 0.1619318425655365, 0.14484652876853943, -0.08755628019571304, -0.16366185247898102, -0.480781227350235, -0.42637985944747925, 0.49103298783302307, -0.4436904788017273, -0.29363846778869...
[Greenspunning](http://en.wikipedia.org/wiki/Greenspun%27s_Tenth_Rule). We've all had occasion to hack around a language's missing features to get what we need. Implementing pseudo-monadic patterns in Java, Y Combinators in Javascript, variable immutability in C... What do you consider your most impressive workaround...
[ -0.025920212268829346, -0.03931651636958122, 0.098264180123806, 0.02786918915808201, -0.07581237703561783, -0.1334548145532608, 0.201032817363739, 0.18412530422210693, -0.5352658629417419, -0.22150583565235138, -0.23316605389118195, 0.4614294767379761, -0.39217841625213623, -0.260203421115...
My company has developed (and still continues to develope) a large ASP.NET business application. Our platform is ASP.NET 2.0 using some ASP.NET Ajax. We're **extensively using third-party components**, like webgrids, comboboxes, treeviews, calendar and scheduling controls etc. Now, I don't know a lot of ASP.NET MVC an...
[ 0.36675262451171875, 0.24290405213832855, 0.24528226256370544, 0.13048142194747925, -0.008295414038002491, -0.12913759052753448, -0.16161982715129852, 0.048327866941690445, -0.17331653833389282, -0.6655016541481018, -0.03778168186545372, 0.4157341718673706, -0.07224933803081512, 0.00165120...
have to rewrite their controls. How much work there is in that, is very different depending of there arhitecture of their controls - the more ajax they already use, the more posible it is that they easily can change it to MVC. ASP.NET AJAX Control toolkit for exsample can work with MVC. You can see how to do this in a...
[ 0.12820686399936676, 0.1124882623553276, 0.5164187550544739, 0.19018246233463287, 0.06839654594659805, -0.14546766877174377, 0.3446904122829437, -0.09338859468698502, -0.3178529739379883, -0.6926491856575012, -0.25782665610313416, 0.5579876899719238, -0.12275685369968414, 0.024746775627136...
`termios.h` defines: ``` #define TIOCM_OUT1 0x2000 #define TIOCM_OUT2 0x4000 ``` But what are the flags good for? I believe this will produce the right results where it returns anything, but may reject valid integers. I dare say that can be worked around with a bit of effort though... (Oh, and it will also...
[ 0.02711116522550583, 0.06310020387172699, 0.29116275906562805, -0.26104238629341125, 0.14414095878601074, 0.02551264315843582, 0.14453180134296417, -0.437228798866272, 0.18073217570781708, -0.47996291518211365, -0.21491000056266785, 0.6431050300598145, -0.4286141097545624, -0.1384937763214...
} return string.Format("{0:x8}{1:x8}{2:x8}", (uint)bits[2], (uint)bits[1], (uint)bits[0]); } ```
[ -0.14239932596683502, 0.11495596915483475, 0.34390196204185486, -0.13329163193702698, 0.14059579372406006, -0.18478742241859436, 0.07232135534286499, -0.10771521180868149, 0.07725385576486588, -0.3464260399341583, -0.3607802093029022, 0.6537975668907166, -0.2660827040672302, 0.209417864680...
How can I access Ethernet statistics from C/C++ code like **netstat -e**? ``` Interface Statistics Received Sent Bytes 21010071 15425579 Unicast packets 95512
[ 0.24864943325519562, -0.17581740021705627, 0.45150333642959595, 0.35197579860687256, 0.16033247113227844, -0.20243002474308014, 0.03959684073925018, 0.038443975150585175, -0.2767174243927002, -0.8980002403259277, 0.21444973349571228, 0.6809700727462769, -0.17280080914497375, -0.15258142352...
94166 Non-unicast packets 12510 7 Discards 0 0 Errors
[ -0.1930566132068634, 0.11187638342380524, -0.038331251591444016, 0.38593730330467224, -0.08126881718635559, 0.3010360896587372, 0.5489926934242249, 0.21227575838565826, -0.2960048019886017, -0.5521512031555176, -0.007242437917739153, 0.27641168236732483, -0.3123624324798584, 0.006482203956...
0 3 Unknown protocols 0 ``` A good place to start for network statistics would be the [GetIpStatistics](http://msdn.microsoft.com/en-us/library/aa365959(VS.85).aspx) call in the Windows IPHelper functions. There are a couple of other approaches that are possibly more portable:- * SNMP. ...
[ 0.3518894910812378, -0.31502893567085266, 0.23158952593803406, 0.17164954543113708, -0.1706233024597168, -0.30421924591064453, 0.13444136083126068, -0.21477267146110535, -0.018454667180776596, -0.737501323223114, 0.09300538152456284, 0.32941749691963196, -0.41556668281555176, 0.04765471443...
Consider the following code snippet ``` private void ProcessFile(string fullPath) { XmlTextReader rdr = new XmlTextReader("file:\\\\" + fullPath); while (rdr.Read()) { //Do something } return; } ``` Now, this functions fine when passed a path like: "C:\Work Files\Technical Information\Dummy....
[ -0.030869135633111, 0.00019483163487166166, 0.34822946786880493, -0.1565675437450409, 0.2047457993030548, -0.06270208954811096, 0.3163049817085266, -0.3734951913356781, -0.28588417172431946, -0.70900958776474, -0.06952586770057678, 0.5760546922683716, -0.13664540648460388, 0.07740846276283...
mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY\_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownlo...
[ -0.11182928830385208, -0.30449581146240234, 0.7263835072517395, 0.062251780182123184, 0.0320914164185524, -0.037113528698682785, 0.39537423849105835, -0.3482682406902313, -0.15856793522834778, -0.4025092124938965, -0.468851774930954, 0.7771387100219727, -0.2647397220134735, 0.3277909755706...
URL. This is only a guess based on the error message but it seems logical considering that the part after the `#` character isn't processed by the server but rather by the client in other scenarios (e.g. web browsers).
[ -0.10431583225727081, 0.08173384517431259, 0.37175482511520386, 0.0629633367061615, -0.17718999087810516, -0.3613976240158081, 0.1703539490699768, 0.37664058804512024, -0.019717596471309662, -0.17308281362056732, -0.4889592230319977, 0.14318248629570007, -0.16546256840229034, 0.55633324384...
I'm trying to do XHTML DOM parsing with JTidy, and it seems to be rather counterintuitive task. In particular, there's a method to parse HTML: ``` Node Tidy.parse(Reader, Writer) ``` And to get the <body /> of that Node, I assume, I should use ``` Node Node.findBody(TagTable) ``` Where should I get an instance of...
[ 0.12814810872077942, 0.16903182864189148, 0.5861325860023499, -0.11972396820783615, -0.2749654948711395, -0.14289240539073944, 0.17029035091400146, -0.36181679368019104, -0.08119311183691025, -0.607620358467102, 0.008573777973651886, 0.5308151841163635, -0.4422925114631653, -0.049361228942...
I like to keep my shell sessions named with useful titles as I work, this helps me keep track of what I'm using each of the many tabs for. Currently to rename a session I double click its name on the tabbed part of the console - is there any command that I can use to do this from within the shell? It would save me a b...
[ 0.3937607407569885, 0.13505424559116364, 0.005728580988943577, 0.06768573075532913, -0.08480941504240036, -0.28463590145111084, 0.40069982409477234, 0.17518159747123718, -0.26995348930358887, -0.6478263139724731, -0.10740362107753754, 0.7984777688980103, -0.1864193081855774, 0.367705732583...
Is this true? If so, in KDE 3: ``` dcop $KONSOLE_DCOP_SESSION renameSession "I am renamed!" ``` In KDE 4, the old DCOP interfaces haven't been ported over to the new D-BUS IPC yet, but you can change the settings for tabnames to follow the window name set by each screen, and set the window name as described by the ...
[ -0.1277976930141449, -0.025881893932819366, 0.32753124833106995, -0.2030930072069168, -0.12253732234239578, -0.19808423519134521, -0.05588103085756302, 0.27050313353538513, -0.26984351873397827, -0.6661050319671631, -0.1506461352109909, 0.3442341387271881, -0.3384552001953125, 0.6815809607...
[PySmell](http://github.com/orestis/pysmell/tree/master) seems like a good starting point. I think it should be possible, PySmell's `idehelper.py` does a majority of the complex stuff, it should just be a case of giving it the current line, offering up the completions (the bit I am not sure about) and then replacing t...
[ -0.34283649921417236, 0.06696976721286774, 0.819097101688385, 0.007006107363849878, 0.09017018228769302, 0.4317089319229126, 0.20172671973705292, -0.26386985182762146, -0.12303337454795837, -0.6002196073532104, -0.44975724816322327, 0.17492857575416565, -0.19551998376846313, 0.029727034270...
would be extremely useful (even if just for completing the stdlib modules, which should never change, so you wont have to constantly regenerate the PYSMELLTAGS file whenever you add a function) --- Progressing! I have the utter-basics of completion in place - barely works, but it's close.. I ran `python pysmells.py ...
[ -0.3082653880119324, -0.04399257153272629, 0.9804286956787109, -0.058110687881708145, 0.05392267554998398, 0.013378133997321129, 0.37473738193511963, -0.2938200831413269, -0.102699413895607, -0.672238290309906, -0.47658348083496094, 0.3351684808731079, -0.07225454598665237, -0.043754693120...
cur_col, "", PYSMELLDICT) completions = idehelper.findCompletions(CUR_WORD, PYSMELLDICT, options) if len(completions) > 0: new_word = completions[0]['word'] new_word = new_word.replace(CUR_WORD, "", 1) # remove what user has already typed print new_word ``` Then I made a new python document, typed "impor...
[ -0.059382837265729904, 0.17780868709087372, 0.7084663510322571, -0.047205328941345215, -0.11218823492527008, 0.06439331918954849, 0.21084262430667877, -0.23400194942951202, -0.2750059962272644, -0.6636480689048767, -0.18074193596839905, 0.6927171945571899, -0.2012837827205658, 0.1653941571...
for you to choose. You can grab it here: <http://github.com/orestis/pysmell/tree/master> (hit download and do python setup.py install). It's rough but it works. - please report any errors on <http://code.google.com/p/pysmell/> -- Hi, I'm the developer of PySmell. I also use a Mac, so if you can send me an email (con...
[ 0.24256421625614166, -0.13694638013839722, 0.5062347054481506, 0.23401492834091187, -0.03781263902783394, 0.2929212152957916, -0.07877998054027557, 0.31940510869026184, -0.3583473861217499, -0.6094197630882263, 0.13443034887313843, 0.33246350288391113, -0.3401826322078705, -0.2106177359819...
What is the arrow operator (`->`) a synonym for? The following two expressions are equivalent: ``` a->b (*a).b ``` (subject to operator overloading, as Konrad mentions, but that's unusual).
[ -0.032842185348272324, 0.14172229170799255, -0.004130192566663027, -0.3752550780773163, -0.710420548915863, 0.2932818830013275, 0.4970828592777252, -0.22465205192565918, -0.026163239032030106, -0.15086673200130463, -0.5064884424209595, 0.2029852420091629, -0.4012536108493805, -0.0754986107...
I need to include a copyright statement at the top of every Python source file I produce: ``` # Copyright: © 2008 etc. ``` However, when I then run such a file I get this message: SyntaxError: Non-ASCII character '\xa9' in file MyFile.py on line 3, but no encoding declared; see <http://www.python.org/peps/pep-026...
[ 0.2730006277561188, 0.6227970123291016, 0.24712622165679932, -0.190858393907547, -0.13899289071559906, -0.0761755183339119, 0.03855288028717041, 0.40576276183128357, -0.1654244214296341, -0.36708173155784607, -0.3351544439792633, 0.2885889708995819, -0.3212752938270569, 0.05440313741564751...
2008 etc. ``` which just possibly doesn't have the same legal standing. Is there a more elegant solution? The copyright symbol in ASCII is spelled `(c)` or "`Copyright`". See circular 61, [Copyright Registration for Computer Programs](http://www.copyright.gov/circs/circ61.pdf). While it's true that the legal form...
[ 0.08537197858095169, 0.4312876760959625, 0.6723656058311462, 0.15778490900993347, -0.04660128802061081, -0.45850327610969543, -0.4825136959552765, -0.01388880331069231, -0.37275615334510803, 0.08953884243965149, -0.4614305794239044, 0.37402352690696716, 0.29116615653038025, 0.4459873139858...
not acceptable) You can dig through circular [3](http://www.copyright.gov/circs/circ03.html) and [38a](http://www.copyright.gov/circs/circ38a.html). This has, however, already been tested in court. It isn't an interesting issue. If you do a search for "(c) acceptable for c-in-a-circle", you'll find that lawyers all a...
[ 0.6453966498374939, 0.2523033022880554, 0.3699512779712677, 0.35449865460395813, 0.10348276793956757, -0.36259856820106506, -0.06871290504932404, -0.31967222690582275, -0.20788149535655975, -0.2541777491569519, -0.04564019665122032, 0.28419187664985657, -0.17480003833770752, 0.218985468149...
How can I put up a "File Open" dialog from some VBA running in Excel? I'm using Excel 2003. You want the `Application.GetOpenFilename` function. Copying from VBA Object Browser: > Function GetOpenFilename([FileFilter], [FilterIndex], [Title], [ButtonText], [MultiSelect]) > > Member of Excel.Application
[ -0.001012051827274263, -0.04292865842580795, 0.7220450043678284, -0.03535636141896248, -0.15392060577869415, -0.2732235789299011, 0.19852766394615173, -0.2745707929134369, -0.4509853720664978, -0.7294718623161316, -0.13221918046474457, 0.70545494556427, -0.54118812084198, -0.14961418509483...
The following Code does not compile ``` Dim BasicGroups As String() = New String() {"Node1", "Node2"} Dim NodesToRemove = From Element In SchemaDoc.Root.<Group> _ Where Element.@Name not in BasicGroups For Each XNode In NodesToRemove XNode.Remove() Next ``` It is supposed to Remove any Immedi...
[ -0.08637861907482147, -0.14178580045700073, 0.5025188326835632, -0.22987891733646393, 0.16578365862369537, -0.08868426084518433, 0.42126551270484924, -0.3161868453025818, -0.27219319343566895, -0.3983249068260193, -0.2439325898885727, 0.370796799659729, -0.3526420295238495, 0.3163253664970...
I'm creating several RSS feeds from a database to publish things like job openings, volunteer opportunities, and links in general. My question is, how many items should be returned in the feed so that it is most likely that someone will get all the items in their reader without any gaps? SELECT TOP 100 ? (obviously wo...
[ 1.11907958984375, -0.27038872241973877, 0.5495482087135315, 0.20338180661201477, 0.16175183653831482, -0.032814498990774155, 0.08458111435174942, -0.14029380679130554, -0.2853812277317047, -0.6016697883605957, 0.26297417283058167, 0.3471132516860962, -0.1216592788696289, -0.074570387601852...
be assured that the Feedburner feed will contain all items? I personally would try to keep it to something under 25 or so. I know that the number of people using iGoogle for RSS feed viewing is going up, and there is a max display limit of 9 entries there. Many other RSS feed displays are limiting at 10-15 entries. I ...
[ 0.7570874094963074, 0.08907619118690491, 0.4190870225429535, 0.07798442989587784, -0.04218536987900734, -0.2705172598361969, 0.35392889380455017, 0.16247785091400146, -0.4634871482849121, -0.3994446396827698, 0.07667817920446396, 0.5191698670387268, -0.24141623079776764, 0.1031042933464050...
size down.
[ 0.05327295511960983, 0.03471693396568298, 0.05518055707216263, -0.1269715130329132, -0.25874245166778564, 0.05340586602687836, 0.14535509049892426, -0.01759825274348259, -0.31998664140701294, -0.49887368083000183, 0.16168572008609772, 0.5190432667732239, 0.04771116003394127, 0.151503562927...
I have some products that belongs to the some category. Each category can have different properties. For example, * category *cars* has properties *color*, power, ... * category *pets* have properties *weight*, *age*, ... Number of categories is about 10-15. Number of properties in each category is 3-15. Number of...
[ 0.24892179667949677, 0.3141229748725891, 0.30530038475990295, 0.01560039259493351, -0.028347257524728775, -0.043263763189315796, -0.0033110626973211765, -0.2633179724216461, -0.09555262327194214, -0.7170735001564026, -0.1851983666419983, 0.43075138330459595, -0.030126823112368584, 0.661263...
Name Property PropertyId* Name Type CategoryProperty CategoryId*: FK to Category.CategoryId PropertyId*: FK to Property.PropertyId ProductProperty ProductId*: FK to Product.ProductId PropertyId*: FK to Property.PropertyId ValueAsString ``` If you can live with the fact that every property value wou...
[ -0.23258183896541595, 0.2723115086555481, 0.3571091592311859, -0.041193682700395584, -0.18348060548305511, 0.19151397049427032, 0.12178760766983032, -0.43671873211860657, 0.017360102385282516, -0.3416929841041565, -0.4857473075389862, 0.40562736988067627, -0.010312715545296669, 0.821027219...
ProductProperty.ValueAsString FROM Product INNER JOIN Category ON Category.CategoryId = Product.CategoryId INENR JOIN CategoryProperty ON CategoryProperty.CategoryId = Category.CategoryId INNER JOIN Property ON Property.PropertyId = CategoryProperty.PropertyId INNER JOIN ProductProperty ...
[ -0.6019489765167236, 0.21584203839302063, 0.4091395437717438, -0.3653305470943451, -0.10067914426326752, 0.23395438492298126, 0.06570399552583694, -0.39700981974601746, 0.012881523929536343, -0.4598079323768616, -0.6982343196868896, 0.4995379149913788, -0.04283514618873596, 0.6013866066932...
more WHERE conditions you supply (conjunctively, e.g. using AND), the faster the query will be. If you have properly indexed your tables, that is. As it is, the solution is not ideal for a full text indexing situation. An additional table that stores all the text associated with a ProductId in a more denormalized way...
[ 0.25771743059158325, -0.15170086920261383, 0.33864617347717285, 0.13395440578460693, 0.21212266385555267, -0.1965951919555664, -0.17344126105308533, -0.2250828593969345, -0.05049431696534157, -0.8595353960990906, -0.22858461737632751, 0.6247047781944275, -0.2510633170604706, 0.167093172669...
I have a sample file for BASIC page authentication that works perfectly in tomcat but it wont work at all in websphere. Any ideas what needs to be done differently in Websphere? Thanks Damien Damien, Please review Chapter 7 of the Websphere 6.1 Security Handbook titled "Securing a Web application": <http://www.redboo...
[ 0.3221825957298279, 0.13261042535305023, 0.0877404436469078, 0.23728691041469574, 0.05642319843173027, -0.20291417837142944, 0.49710938334465027, -0.285256952047348, -0.030927222222089767, -0.563118577003479, 0.018217653036117554, 0.5696930289268494, 0.016863297671079636, -0.33117309212684...
I want to make a generic class that accepts only serializable classes, can it be done with the where constraint? The concept I'm looking for is this: ``` public class MyClass<T> where T : //[is serializable/has the serializable attribute] ``` Nope, I'm afraid not. The only things you can do with constraints are: * ...
[ -0.0632382482290268, 0.061451684683561325, 0.17370834946632385, 0.11363556236028671, -0.05125310271978378, -0.16468071937561035, 0.09041161090135574, 0.17300620675086975, -0.24084891378879547, -0.7492772340774536, -0.11742294579744339, 0.5121002197265625, -0.44332244992256165, 0.4192050695...
- T must have a public parameterless constructor Various combinations are feasible, but not all. Nothing about attributes.
[ 0.3220071792602539, -0.09580022841691971, -0.13941390812397003, 0.6388060450553894, -0.24085068702697754, -0.04309559985995293, 0.09164394438266754, 0.028819475322961807, 0.20942065119743347, -0.2582426369190216, -0.23441492021083832, 0.49325618147850037, -0.27320724725723267, -0.056801080...
If this is true, I'd like to know why. Do we see a great percentage of secure and high traffic web applications built in LAMP? It's all about support. A large company buying from Microsoft will get a hotline through to their support team. Because any downtime could be incredibly expensive to a large company, the abilit...
[ 0.649656355381012, -0.0036806906573474407, 0.3719998002052307, 0.5023894906044006, 0.22407686710357666, -0.24667048454284668, -0.019172213971614838, 0.10788992047309875, -0.19719144701957703, -0.14072032272815704, -0.0015217448817566037, 0.4927496612071991, -0.25224268436431885, 0.08622124...
I've been searching a lot but couldn't find a solution. How do you deal with a DateTime that should be able to contain an uninitialized value (equivalent to null)? I have a class which might have a DateTime property value set or not. I was thinking of initializing the property holder to DateTime.MinValue, which then co...
[ 0.26408660411834717, -0.2422572672367096, 0.2156333029270172, 0.0687967985868454, 0.13177751004695892, -0.0778314396739006, -0.17468371987342834, 0.22179563343524933, -0.212886780500412, -0.6092067360877991, 0.11762791872024536, 0.42125049233436584, -0.21334002912044525, 0.3354015350341797...
a nullable DateTime, like this: ``` DateTime? MyNullableDate; ``` Or the longer form: ``` Nullable<DateTime> MyNullableDate; ``` And, finally, there's a built in way to reference the default of any type. This returns `null` for reference types, but for our DateTime example it will return the same as `DateTime.Min...
[ -0.09290526807308197, -0.18966612219810486, 0.3425973057746887, -0.1682848334312439, 0.1356692761182785, -0.21244162321090698, 0.16264328360557556, 0.4099505543708801, -0.09323456138372421, -0.3038981556892395, -0.46269699931144714, 0.43316009640693665, -0.4519968330860138, 0.1844010949134...
I'm in the process of designing a small website and was curious when an XML file can/should be substituted for a database table. There are some cases where I think using a database table may be overkill and was just wondering if anyone else has come across making this decision. Thanks! If you think you'll end up needi...
[ 0.7697843909263611, 0.21519935131072998, -0.1314847320318222, 0.40525469183921814, 0.15394076704978943, -0.3978891968727112, 0.23503658175468445, 0.4110720455646515, -0.2096397876739502, -0.6481366753578186, 0.30047842860221863, 0.5650473833084106, 0.05079979449510574, 0.07475847750902176,...
Can anbyody tell me how to include a certain folder when running unit tests in visual studio. In the folder are xml-files needed by the tests. I can't seem to find anymore where I need to add this folder. Thx, Lieven Cardoen aka Johlero If you click on properties on the XML file, you can tell it to copy to the output ...
[ 0.473240464925766, 0.18254472315311432, -0.23853547871112823, -0.014498438686132431, -0.14803443849086761, -0.04663201794028282, 0.25795552134513855, -0.06870774179697037, -0.11606540530920029, -0.4374786913394928, 0.21397759020328522, 0.13618244230747223, 0.16834238171577454, -0.054442483...
I have a MySQL database of keywords that are presently mixed-case. However, I want to convert them all to lowercase. Is there an easy command to do this, either using MySQL or MySQL and PHP? ``` UPDATE table SET colname=LOWER(colname); ```
[ -0.0815090760588646, 0.377349853515625, 0.44111329317092896, -0.1435234397649765, 0.061828795820474625, 0.021801890805363655, 0.015974784269928932, 0.08982781320810318, -0.006810478866100311, -0.610332727432251, -0.06432147324085236, 0.4818699061870575, -0.4368950426578522, -0.030255876481...
What does this option do? It is accessible from the Build menu. It deletes all the compiled and temporary files associated with a solution. It ensures that the next build is a full one, rather than only changed files being recompiled.
[ -0.0568905808031559, -0.09945676475763321, 0.27064642310142517, 0.03995019942522049, 0.30071812868118286, -0.029109172523021698, 0.40206024050712585, -0.03705252707004547, -0.017199991270899773, -0.5832274556159973, -0.32773205637931824, 0.6269627213478088, -0.09449406713247299, 0.01944407...
I am working on a Visual Studio 2008 project that is already added to TFS server. I am not sure which settings and policies have been configured for the TFS (this is done by a separate dept, not developers) Every time I make an edit to a code file , the file is checked out automatically (without explicitly checking ou...
[ 0.5778511166572571, 0.07592539489269257, 0.1743072122335434, -0.11939269304275513, -0.005173428449779749, -0.28305932879447937, 0.2659236490726471, 0.01324675977230072, -0.3808361291885376, -0.9255956411361694, 0.04424765706062317, 0.6845434904098511, -0.1570962518453598, 0.029430311173200...
Checked out Items: **Check out automatically** change it to > Checked out Items: **Prompt for exclusive checkouts** ![enter image description here](https://i.stack.imgur.com/68oke.png) or your preferred action.
[ 0.3156019449234009, -0.2730659544467926, 0.4133285880088806, 0.0732792392373085, 0.13025979697704315, -0.09437646716833115, 0.33527830243110657, 0.03757036104798317, -0.6658360362052917, -0.4247150719165802, -0.25000259280204773, 0.4853407144546509, -0.060923248529434204, -0.25032097101211...
Is there a difference between the two examples below for beginning a Perl script? If so, when would I use one over the other? example 1: ``` #!/usr/bin/perl use warnings; ``` example 2: ``` #!/usr/bin/perl -w ``` Using the switch will enable all warnings in **all** modules used by your program. Using the pragma ...
[ 0.41418543457984924, 0.0008262965711764991, 0.18703751266002655, -0.1339077353477478, 0.018163898959755898, -0.34653031826019287, 0.433754026889801, -0.08174514770507812, -0.19281502068042755, -0.53831547498703, -0.16423721611499786, 0.7711985111236572, -0.2674916386604309, -0.212998583912...
not to use the switch but the pragma.
[ -0.01877199113368988, -0.05274141952395439, -0.16321641206741333, 0.22569487988948822, -0.22320842742919922, -0.10406368225812912, 0.3983026444911957, -0.2608407735824585, 0.0638846606016159, -0.29551559686660767, 0.24799516797065735, 0.6863490343093872, 0.039767131209373474, -0.1029257178...
I'm looking for the string `foo=` in text files in a directory tree. It's on a common Linux machine, I have bash shell: ``` grep -ircl "foo=" * ``` In the directories are also many binary files which match `"foo="`. As these results are not relevant and slow down the search, I want grep to skip searching these files...
[ 0.15923763811588287, 0.3311942219734192, 0.1596692055463791, 0.044896166771650314, -0.11181977391242981, -0.22729133069515228, 0.1854306161403656, -0.04362289980053902, -0.33181095123291016, -0.6835151314735413, -0.19393205642700195, 0.3408902585506439, -0.35378140211105347, 0.078616596758...
Recurse in directories skip file matching PATTERN. ``` Searching on *grep include*, *grep include exclude*, *grep exclude* and variants did not find anything relevant If there's a better way of grepping only in certain files, I'm all for it; moving the offending files is not an option. I can't search only certain di...
[ -0.13204129040241241, 0.07954320311546326, 0.3472701907157898, 0.046360909938812256, -0.19423019886016846, -0.1726841777563095, 0.5351277589797974, -0.22845304012298584, -0.44204944372177124, -0.3748856782913208, -0.6604645848274231, 0.4259178042411804, -0.4482143521308899, 0.3200067281723...
a backslash to prevent it from being expanded by the shell (quoting it, such as `--include="*.cpp"`, would work just as well). Otherwise, if you had any files in the current working directory that matched the pattern, the command line would expand to something like `grep pattern -r --include=foo.cpp --include=bar.cpp r...
[ 0.2026934027671814, 0.19990798830986023, 0.43023964762687683, -0.44876953959465027, 0.10509689897298813, 0.1281142234802246, 0.447752982378006, -0.11658439040184021, -0.6679868102073669, -0.31025439500808716, -0.27998092770576477, 0.644209623336792, -0.4666675627231598, -0.0901790559291839...
brace expansion is not POSIX shell-compliant. The original example was: ``` grep pattern -r --include=\*.{cpp,h} rootdir ``` to search through all `.cpp` and `.h` files rooted in the directory `rootdir`.
[ -0.05293833464384079, 0.0754043310880661, 0.217085063457489, -0.3765605092048645, 0.1204415038228035, 0.18843364715576172, 0.2583101987838745, -0.2591021656990051, -0.17878234386444092, -0.18372222781181335, 0.084695965051651, 0.24645403027534485, -0.7082659602165222, 0.10332126915454865, ...
I want to provide silverlight app to my customer while hosting the app at my own site for streamlined maintenance. * my Silverlight .xap is hosted in, let say, domain *me-supplier.com* * i want to embed it in, let say, domain *my-customer.com* It works perfectly for *<http://my-customer.com>*, not for ***https***://m...
[ 0.8634926080703735, 0.4426250457763672, 0.43845656514167786, -0.2481575608253479, -0.3791073262691498, 0.0685943141579628, 0.1960745006799698, -0.028587892651557922, -0.021813323721289635, -0.7508161664009094, 0.1888771504163742, 0.4636753499507904, -0.21974064409732819, 0.2440437525510788...
short story is that it isn't [easily](http://forums.asp.net/p/1006669/1336527.aspx) accomplished. That code is added to the header by the menu during the prerender phase. A possible workaround might be overriding the menu's onprerender in a custom menu control and don't call base. You could then replace the default m...
[ 0.23486731946468353, -0.14797335863113403, 0.3427702784538269, 0.22657527029514313, 0.19017016887664795, -0.24391916394233704, 0.3630759119987488, 0.08575018495321274, -0.19611980020999908, -0.4322774112224579, -0.16616776585578918, 0.5452964305877686, -0.08385705947875977, -0.148271679878...
I am creating an application in java which will be the part of an external application. My application contains a viewport which shows some polygons and stuff like that. The external application needs to get the image of the viewport in gif format. For that it calls a method in an interface (implemented by my applicati...
[ 0.23101583123207092, 0.4530266523361206, 0.2950979173183441, 0.13951654732227325, -0.20272468030452728, 0.05420985445380211, 0.015400371514260769, -0.06829652190208435, -0.05974344536662102, -0.9491505026817322, 0.07263777405023575, 0.22621563076972961, -0.27678418159484863, 0.065270759165...
it to the external application? I mean what should be the return type of the method? Currently my gif encoder class returns a byte array. Is there any other 'better' option? A byte array could be appropriate if you expect the GIFs to be small, but you might consider using an `OutputStream` so you can stream bits more e...
[ 0.22655504941940308, -0.22619441151618958, 0.2896326780319214, 0.12862130999565125, -0.11881785094738007, -0.0753876268863678, 0.1673908680677414, -0.03251304477453232, -0.13312982022762299, -0.537817656993866, 0.10075006633996964, 0.5844247937202454, -0.23318123817443848, 0.34332844614982...
I'm looking for (simple) examples of problems for which JMS is a good solution, and also reasons why JMS is a good solution in these cases. In the past I've simply used the database as a means of passing messages from A to B when the message cannot necessarily be processed by B immediately. A hypothetical example of s...
[ 0.3498298227787018, 0.12145659327507019, 0.33929014205932617, 0.008538656868040562, -0.08305063843727112, -0.2737422585487366, 0.4302014112472534, -0.14050644636154175, -0.25485900044441223, -0.5422308444976807, -0.07415223121643066, 0.11866633594036102, -0.19044330716133118, 0.31578266620...
to each new user is stored in the pending\_email table. The e-mail sender job runs once every 24 hours, sends an e-mail to all the users in this table, then deletes all the pending\_email records. This seems like the kind of problem for which JMS should be used, but it's not clear to me what benefit JMS would have ove...
[ 0.243758887052536, 0.18601347506046295, 0.6565870046615601, -0.17031225562095642, 0.046905260533094406, 0.023509643971920013, 0.5034047961235046, 0.0012778866803273559, -0.2267327606678009, -0.6442118287086487, -0.2217760533094406, 0.6174642443656921, -0.3004710078239441, 0.263143807649612...
as message queue" approach I've described? What am I missing? - Don JMS and messaging is really about 2 totally different things. * publish and subscribe (sending a message to as many consumers as are interested - a bit like sending an email to a mailing list, the sender does not need to know who is subscribed * high...
[ 0.2893507182598114, -0.2642461061477661, 0.48996293544769287, 0.11064779758453369, -0.5604124665260315, -0.050162173807621, 0.021000416949391365, -0.08118052035570145, -0.5153961181640625, -0.6580246090888977, 0.3460487425327301, 0.5735923647880554, -0.35442546010017395, -0.024191828444600...
queue is a high performance highly concurrent load balancer designed for huge throughput; you can send usually tens of thousands of messages per second to many concurrent consumers in many processes and threads. The reason for this is that a message queue is basically highly asynchronous - a [good JMS provider will str...
[ 0.1304948925971985, -0.29799720644950867, 0.33360549807548523, 0.1731303334236145, -0.3265760838985443, 0.1888277679681778, 0.17491674423217773, 0.06791878491640091, -0.6941137909889221, -0.4565123915672302, 0.09113956242799759, 0.1777142584323883, -0.33526986837387085, 0.389210045337677, ...
using a database table, typically one thread tends to lock the whole table so you tend to get very low throughput when trying to implement a high performance load balancer. But like most middleware it all depends on what you need; if you've a low throughput system with only a few messages per second - feel free to use...
[ 0.1442640870809555, -0.0744478702545166, 0.016732309013605118, 0.32869693636894226, -0.06267441064119339, -0.32202771306037903, 0.09613506495952606, 0.1083269789814949, -0.5133141875267029, -0.7535039186477661, -0.24231179058551788, 0.16006027162075043, -0.4285179078578949, 0.1156517714262...
this is my first question here so I hope I can articulate it well and hopefully it won't be too mind-numbingly easy. I have the following class *SubSim* which extends *Sim*, which is extending *MainSim*. In a completely separate class (and library as well) I need to check if an object being passed through is a type of...
[ 0.3053969442844391, -0.23210319876670837, 0.40042686462402344, -0.09792613983154297, -0.049669936299324036, -0.30094000697135925, 0.427759051322937, -0.29718703031539917, -0.14603197574615479, -0.6285715103149414, -0.25936609506607056, 0.3301240801811218, -0.4674797058105469, 0.29753458499...
of having to do *t.BaseType.BaseType* to get *MainSub*, is there any other way to get the proper type using .NET libraries? Or are there overrides that can be redefined to return the main class? Thank you in advance There are 4 related standard ways: ``` sim is MainSim; (sim as MainSim) != null; sim.GetType().IsSub...
[ 0.12265538424253464, -0.01126174721866846, 0.5178629159927368, 0.050286732614040375, 0.18263202905654907, -0.14364300668239594, 0.6304526925086975, -0.5150689482688904, -0.2053031176328659, -0.37003543972969055, -0.3012896180152893, 0.6060649156570435, -0.47896134853363037, 0.0562381818890...
[The fixnum question](https://stackoverflow.com/questions/106597/why-are-fixnums-in-emacs-only-29-bits) brought my mind to an other question I've wondered for a long time. Many online material about garbage collection does not tell about how runtime type information can be implemented. Therefore I know lots about all ...
[ 0.23009110987186432, -0.03474883735179901, 0.18366046249866486, 0.14143456518650055, -0.1628561168909073, 0.12413483113050461, -0.06895321607589722, -0.022976361215114594, -0.3415818214416504, -0.2570561170578003, -0.01665673777461052, 0.49097734689712524, -0.34083160758018494, -0.07102706...
there some sort of workaround for getting full 64-bit integers? Basically to achieve accurate marking you need meta-data indicating which words are used as pointers and which are not. This meta-data could be stored per reference, as emacs does. If for your language/implementation you don't care much about memory use, ...
[ 0.12287682294845581, 0.18087004125118256, 0.23566047847270966, 0.32337111234664917, -0.3251368999481201, 0.31484854221343994, 0.07332485169172287, -0.09446599334478378, -0.27787598967552185, -0.5012988448143005, 0.1856423169374466, 0.4669801890850067, -0.24308042228221893, -0.0637191161513...
could be stored along with other type information. So for example a class could contain, as well as the usual function pointer table, one bit per word of the data layout indicating whether or not the word contains a reference that should be followed by the garbage collector. If your language has virtual calls then you ...
[ 0.27771759033203125, -0.3065474331378937, 0.09456824511289597, 0.4244386851787567, -0.09951289743185043, 0.03556884452700615, 0.38527944684028625, -0.026670318096876144, -0.08253585547208786, -0.4685131311416626, -0.16077177226543427, 0.40283095836639404, -0.2223341464996338, 0.11180379986...
single object, pointing to the class which constitutes its runtime type. Obviously with certain dynamic languages the type data pointed to would need to be copy-on-write, since it is modifiable. The stack can do similar - store the accurate marking information in data sections of the code itself, and have the garbage ...
[ -0.0029204448219388723, 0.044385697692632675, -0.02015337534248829, 0.2773653268814087, -0.35560569167137146, -0.13199155032634735, 0.19280560314655304, -0.22232286632061005, -0.19681139290332794, -0.5028645992279053, -0.49741965532302856, 0.10263980180025101, -0.5101751685142517, 0.190911...
thing to store information about where try/catch occurs in the code, and of course debuggers need to be able to interpret the stack too, so this can quite possibly be folded in with a bunch of other stuff you'd already be doing to implement any language, including ones with built-in garbage collection. Note that garba...
[ 0.4988945722579956, -0.23738378286361694, -0.35269972681999207, 0.3003218472003937, 0.11274894326925278, -0.2157643437385559, 0.4919552803039551, 0.011668083257973194, -0.22049953043460846, -0.4984552562236786, 0.0076665510423481464, 0.1344171017408371, -0.28438451886177063, -0.12363198399...
yet been marked, and if so treat it as a reference to that object. This is simple, but the cost of course is that it's somewhere between "quite slow" and "very slow", depending on what data structures your gc uses for the lookup. Furthermore, sometimes an integer just so happens to have the same value as the address of...
[ 0.3640960454940796, -0.07155244052410126, 0.2536633014678955, 0.31951600313186646, 0.02852226048707962, -0.16279035806655884, 0.13208961486816406, 0.0026678661815822124, -0.37044885754585266, -0.3414440453052521, 0.1296650767326355, 0.2606372535228729, 0.09541217237710953, 0.27924403548240...
or first working version, but is unlikely to be popular with users. A mixed approach might, say, do accurate marking of objects, but not of regions of the stack where things get particularly hairy. For example if you write a JIT which can create code where a referenced object address appears only in registers, not in...
[ 0.22393456101417542, -0.20323556661605835, 0.26207977533340454, 0.04519527032971382, -0.2293982058763504, -0.03176042065024376, 0.28021445870399475, 0.1398167908191681, -0.2562915086746216, -0.6275695562362671, 0.08323740214109421, 0.11142659932374954, -0.353185772895813, 0.011241544038057...
resulting in slower code) would be to require the JIT to always keep a copy of all pointer values it's using on the accurately marked stack.
[ -0.016310710459947586, 0.12683121860027313, 0.3637062907218933, 0.1592499017715454, -0.16807320713996887, 0.06213078647851944, 0.35279443860054016, -0.2145969271659851, -0.10491931438446045, -0.7121354937553406, -0.17014428973197937, 0.1593429148197174, -0.10196440666913986, 0.111749783158...
I'm working on a web application that will return a variable set of modules depending on user input. Each module is a Python class with a constructor that accepts a single parameter and has an '.html' property that contains the output. Pulling the class dynamically from the global namespace works: ``` result = global...
[ 0.23532912135124207, 0.10006241500377655, 0.4123017489910126, -0.08364865183830261, -0.17187190055847168, 0.1857878416776657, 0.23604901134967804, -0.3671012818813324, -0.2465650737285614, -0.39957621693611145, -0.1657712459564209, 0.4091331958770752, -0.37116318941116333, 0.00570503994822...
give the user the ability to to more than you want them to. They can call *any* single-parameter function in that namespace just by providing the name. You can help guard against this with a few checks (eg. isinstance(SomeBaseClass, theClass), but its probably better to avoid this approach. Another disadvantage is that...
[ 0.2000592052936554, -0.2582753896713257, 0.1721848100423813, 0.07686028629541397, -0.13584265112876892, -0.1789933443069458, 0.2399742752313614, -0.2564999461174011, -0.33498987555503845, -0.8533430099487305, -0.31426769495010376, 0.433410108089447, -0.2650904953479767, 0.1394847184419632,...
the disadvantage that you have to re-list all the classes. 2. Nest the classes in an enclosing scope. Eg. define them within their own module, or within an outer class: ``` class Namespace(object): class Class1(object): ... class Class2(object): ... ... result = getattr(Namespace, className)(pa...
[ -0.04682067409157753, -0.08596158027648926, 0.06605447083711624, 0.034446150064468384, -0.10731350630521774, -0.16266779601573944, 0.37415340542793274, -0.46275416016578674, -0.13577322661876678, -0.6501042246818542, -0.14985385537147522, 0.5229978561401367, -0.3789249062538147, -0.0609165...
have been created, examine all baseclasses and populate a dict from them. This has the advantage that you can define your classes anywhere (eg. in seperate modules), and so long as you create the registry after all are created, you will find them. ``` def register_subclasses(base): d={} for cls in base.__subcl...
[ 0.6229410171508789, 0.02551303245127201, 0.33448678255081177, -0.16824841499328613, 0.09697358310222626, -0.33311933279037476, 0.25622206926345825, -0.034327711910009384, -0.3555362820625305, -0.7990207672119141, -0.35813185572624207, 0.300816148519516, -0.26202157139778137, 0.570464849472...
classes in a dict. This is probably overkill for this case - its useful in some "user-plugins" scenarios though.
[ -0.09582345932722092, -0.4306672215461731, -0.19818653166294098, 0.31938982009887695, -0.4607243835926056, -0.591621994972229, 0.39495986700057983, 0.4562847912311554, 0.18823780119419098, -0.5837752819061279, -0.44094589352607727, 0.4328671991825104, -0.29946354031562805, -0.1156807839870...
I have this piece of code (summarized)... ``` AnsiString working(AnsiString format,...) { va_list argptr; AnsiString buff; va_start(argptr, format); buff.vprintf(format.c_str(), argptr); va_end(argptr); return buff; } ``` And, on the basis that pass by reference is preferred where possible,...
[ -0.054920170456171036, 0.47788071632385254, 0.5457572340965271, -0.4593891501426697, -0.12188205868005753, 0.12359319627285004, 0.5725647807121277, -0.20170193910598755, -0.3373679220676422, -0.5044007301330566, -0.29055821895599365, 0.5318045616149902, -0.41105765104293823, 0.488636076450...
way va\_start works, but I'm not exactly sure what's going on. If you look at what va\_start expands out to, you'll see what's happening: ``` va_start(argptr, format); ``` becomes (roughly) ``` argptr = (va_list) (&format+1); ``` If format is a value-type, it gets placed on the stack right before all the variadi...
[ -0.10624006390571594, 0.13105610013008118, 0.8494834303855896, -0.27056941390037537, 0.02315550670027733, 0.04630415886640549, 0.11205999553203583, -0.4301528334617615, -0.37391048669815063, -0.7511096596717834, -0.3827850818634033, 0.7125736474990845, -0.32739269733428955, 0.3839685916900...
classes, your options are to either pass by pointer, or put in a dummy argument: ``` AnsiString working_ptr(const AnsiString *format,...) { ASSERT(format != NULL); va_list argptr; AnsiString buff; va_start(argptr, format); buff.vprintf(format->c_str(), argptr); va_end(argptr); return buff...
[ -0.04337989166378975, -0.06204216182231903, 0.22937925159931183, 0.07373712956905365, -0.021042468026280403, 0.33006712794303894, 0.3619372844696045, -0.30941179394721985, -0.2834400236606598, -0.40133118629455566, -0.5895611643791199, 0.42239630222320557, -0.30299437046051025, 0.422384530...
How can I use command line arguments in a *creationComplete* event handler? It seems the *invoke* event happens in my AIR app **after** creationComplete gets called, so I can't use the args in that function, although I really would like to. Any other event that might always fire ***after*** the *invoke* event happens? ...
[ 0.22382986545562744, 0.18424741923809052, 0.2948445975780487, 0.14994782209396362, -0.04552924633026123, -0.1205376386642456, 0.2844480574131012, 0.16578398644924164, -0.054773103445768356, -0.575030505657196, -0.11002282053232193, 0.8103561401367188, -0.12061993032693863, 0.21227468550205...
it is implemented that way. You can find the WindowedApplication.as file in [FLEX\_DIR]\sdks\3.1.0\frameworks\projects\airframework\src\mx\core Interesting comment on line 2942: > Because of the behavior with the nativeApplication invoke event > > > we queue events up until windowComplete
[ -0.15852388739585876, -0.4447368383407593, 0.4094531536102295, 0.024256762117147446, -0.26213279366493225, -0.26407498121261597, 0.17717662453651428, 0.17921295762062073, -0.28075507283210754, -0.7697219252586365, -0.11636804789304733, 0.4535001218318939, -0.23667603731155396, 0.0704601034...
I have something similar to the following method: ``` public ActionResult Details(int id) { var viewData = new DetailsViewData { Booth = BoothRepository.Find(id), Category = ItemType.HotBuy }; return View(viewData); } ``` and the following Route: ...
[ 0.15639619529247284, -0.32075175642967224, 0.6171552538871765, 0.1971483826637268, -0.05274953693151474, -0.08164390921592712, -0.07707220315933228, -0.22629033029079437, -0.10319048166275024, -0.8033076524734497, 0.15593546628952026, 0.4483763575553894, -0.13951730728149414, -0.0423793047...
Beta, when I had Preview 3. Now the method will fill the id correctly the first time I execute the action. However the second time the controller's `ModelState` contains the last-use id value. This causes the `ActionInvoker` to use it in the method's parameter instead of the `Route` value. So if I call the action twic...
[ 0.33935630321502686, -0.4306732416152954, 0.2947617769241333, -0.0989493802189827, -0.14743869006633759, 0.13345658779144287, 0.03818570077419281, -0.46083006262779236, -0.18607710301876068, -0.5865446329116821, 0.32519879937171936, 0.2848561108112335, -0.5679881572723389, -0.1226742789149...
as I can tell the ModelState should not contain anything. Is this a bug in the Beta, possibly a bug somewhere in my code, or is there some design feature that I am ignorant of? Any insight into the nature of ModelState and why this happens is appreciated. EDIT: I discovered that this issue is actually a symptom of...
[ 0.3563937544822693, -0.07112348824739456, 0.12946543097496033, 0.04686790704727173, 0.10274696350097656, -0.5896241664886475, 0.3480589985847473, 0.026505880057811737, -0.15180695056915283, -0.5444515943527222, -0.17437738180160522, 0.5696255564689636, -0.1957552582025528, 0.09528248757123...
never updates it until the controller is recreated. This causes old RouteData to be used for method parameters instead of the current RouteData. It's hard for me to tell what you expect to happen and what is happening from your post. Is it possible there's an error in your BoothRepository.Find method such that it retur...
[ 0.10847964882850647, -0.46899208426475525, 0.6590806245803833, 0.5534195899963379, 0.12741978466510773, -0.20304915308952332, 0.37010103464126587, 0.03017199970781803, -0.4671224057674408, -0.6849932074546814, 0.16324523091316223, 0.5618834495544434, -0.42756590247154236, 0.035559635609388...
it to philha - microsoft dot com? EDIT: The problem ended up being that the developer was attempting to re-use the valueprovider across requests (by having Castle Windsor manage the lifecycle of Controllers). Right now, there's no support for re-using controller instances across requests like you would with IHttpHandl...
[ 0.21744711697101593, -0.1272822469472885, 0.5291171073913574, 0.38619911670684814, 0.2256324291229248, -0.2818790078163147, 0.21939189732074738, 0.06804832816123962, -0.12301294505596161, -0.217693492770195, -0.03093792498111725, 0.3150012493133545, -0.27008771896362305, 0.266838937997818,...
I have an ActiveRecord model that I would like to convert to xml, but I do not want all the properties rendered in xml. Is there a parameter I can pass into the render method to keep a property from being rendered in xml? Below is an example of what I am talking about. ``` def show @person = Person.find(params[:id...
[ -0.023546840995550156, 0.22272810339927673, 0.5350021123886108, -0.18191887438297272, 0.07827327400445938, 0.224729523062706, 0.14704833924770355, -0.4928991198539734, 0.04502570629119873, -0.7329487204551697, -0.17722468078136444, 0.3768993318080902, 0.033204708248376846, 0.08745203167200...
render method that excludes properties from being rendered in xml? Kind of like the following example ``` def show @person = Person.find(params[:id]) respond_to do |format| format.xml { render :xml => @person, :exclude_attribute => :phone } end end ``` which would render the following xml ``` <person> ...
[ -0.1612805873155594, 0.07728487998247147, 0.37144356966018677, -0.03666369989514351, 0.0625641718506813, 0.3857731223106384, 0.36754414439201355, -0.5521310567855835, 0.20045682787895203, -0.8307782411575317, -0.15952762961387634, 0.34104734659194946, 0.004826790653169155, 0.19168578088283...
If you provide `0` as the `dayValue` in `Date.setFullYear` you get the last day of the previous month: ``` d = new Date(); d.setFullYear(2008, 11, 0); // Sun Nov 30 2008 ``` There is reference to this behaviour at [mozilla](http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/setFullYea...
[ 0.11822763085365295, -0.002167735481634736, 0.7523642182350159, -0.3997476398944855, -0.05825143679976463, -0.2634752094745636, 0.6416453123092651, -0.08461520820856094, -0.292839378118515, -0.3971463739871979, -0.24221459031105042, 0.42365139722824097, -0.14825588464736938, 0.157050669193...
Thu Jan 31 00:00:00 CST 2008 IE 8: Beta 2: Thu Jan 31 00:00:00 CST 2008 Opera 8.54: Thu, 31 Jan 2008 00:00:00 GMT-0600 Opera 9.27: Thu, 31 Jan 2008 00:00:00 GMT-0600 Opera 9.60:
[ -0.7005364894866943, 0.12508001923561096, 0.40534836053848267, -0.08755792677402496, -0.6127690076828003, 0.4386410117149353, 0.51820969581604, -0.01662532053887844, 0.24255554378032684, -0.5529605746269226, -0.23335355520248413, 0.46138107776641846, 0.07725188881158829, -0.263365656137466...
Thu Jan 31 2008 00:00:00 GMT-0600 Firefox 2.0.0.17: Thu Jan 31 2008 00:00:00 GMT-0600 (Canada Central Standard Time) Firefox 3.0.3: Thu Jan 31 2008 00:00:00 GMT-0600 (Canada Central Standard Time) Google Chrome 0.2.149.30: Thu Jan 31 2008 00:00:00 GMT-0600 (Canada Central Standard Time) Safari for Wi...
[ -0.018923891708254814, 0.5845909714698792, 0.8654435873031616, 0.02633773721754551, -0.26806750893592834, 0.05864100903272629, 0.6351169347763062, 0.29630929231643677, -0.12072140723466873, -0.8317928910255432, -0.20981740951538086, 0.4223037660121918, -0.25328555703163147, -0.094474472105...