text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
What's the best strategy to use when writing JMeters tests against a web application where the values of certain query-string and post variables are going to change for each run. Quick, common, example 1. You go to a Web Page 2. Enter some information into a form 3. Click Save 4. Behind the scenes, a new record is en...
[ 0.49365949630737305, -0.26730889081954956, 0.07172957062721252, 0.35907235741615295, 0.24575857818126678, -0.18339134752750397, 0.3407813012599945, -0.29581600427627563, 0.03546508774161339, -0.6536954045295715, 0.46420085430145264, 0.5568416714668274, -0.13719657063484192, -0.261791914701...
the page parameter/Database ID is going to change each time. The workflow/strategy I'm currently using is 1. Record a test using the above actions 2. Make a note of each place where a query string variable may change from run to run 3. Use a XPath or Regular Expression Extractor to pull the value out of a response a...
[ 0.30164584517478943, -0.057270850986242294, 0.4155116677284241, 0.3362349569797516, -0.07839766889810562, -0.06427158415317535, 0.27346527576446533, -0.36982467770576477, -0.07405999302864075, -0.7219094038009644, 0.09907597303390503, 0.5141552090644836, -0.4217609763145447, 0.002303772373...
(Or is this why most people just use JMeter to play back logs? (-;) Sounds to me like your on the right track. The best that can be achieved by JMeter is to extract page variables with a regular expression or xpath post processor. However your absolutely correct in that this is not a scalable solution and becomes incre...
[ 0.36532068252563477, -0.12480493634939194, 0.3440392017364502, 0.4376111626625061, -0.16310517489910126, -0.3204393684864044, 0.38716867566108704, -0.10493769496679306, -0.1078544482588768, -0.556633710861206, 0.1741243153810501, 0.5432918071746826, -0.03701242431998253, -0.070830121636390...
parameters; but you would still need to extract parameters if you need to do a database update but using Watir allows for better code reuse making the problem less painful.
[ -0.10816111415624619, -0.18613283336162567, 0.1437498927116394, 0.35780686140060425, -0.3205842077732086, -0.14616547524929047, 0.4162556827068329, -0.47054848074913025, -0.2354470193386078, -0.33703678846359253, 0.0031424795743077993, 0.8579434752464294, -0.19329214096069336, 0.0168705433...
I want to insert something into a STL list in C++, but I only have a reverse iterator. What is the usual way to accomplish this? This works: (of course it does) ``` std::list<int> l; std::list<int>::iterator forward = l.begin(); l.insert(forward, 5); ``` This doesn't work: (what should I do instead?) ``` std::list...
[ -0.19916127622127533, 0.2058352828025818, 0.466594398021698, -0.6144172549247742, 0.12238568067550659, 0.4550657868385315, 0.18474821746349335, -0.309192419052124, 0.19046588242053986, -0.34650468826293945, -0.0676037147641182, 0.5666073560714722, -0.43502211570739746, -0.03589794784784317...
I have the following code: ``` for attribute in site.device_attributes device.attribute end ``` where I would like the code to substitute the value of "attribute" for the method name. I have tried `device."#{attribute}"` and various permutations. Is this completely impossible? Am I missing something? I have con...
[ -0.14972487092018127, 0.31521478295326233, 0.49620378017425537, -0.29646191000938416, 0.014425329864025116, 0.10143862664699554, 0.19623661041259766, -0.20825253427028656, -0.19572532176971436, -0.6056234836578369, 0.1276044398546219, 0.8075746893882751, -0.3083425760269165, 0.247527092695...
name in variable "attribute" you can read object's attribute with ``` object.send(attribute.to_sym) ``` and write attribute's value with ``` object.send("#{attribute}=".to_sym, value) ``` In Ruby 1.8.6 #send method can execute any object's method regardless of its visibility (you can e.g. call private methods). ...
[ -0.044463418424129486, -0.0010883877985179424, 0.5226117372512817, -0.03244747221469879, -0.41731083393096924, 0.033885616809129715, 0.15709394216537476, -0.2940915822982788, -0.04873473569750786, -0.2843396067619324, -0.04803885892033577, 0.6106757521629333, -0.42811205983161926, 0.188618...
I have a collection of custom entity objects one property of which is an `ArrayList` of byte arrays. The custom entity is serializable and the collection property is marked with the following attributes: `[XmlArray("Images"), XmlArrayItem("Image",typeof(byte[]))]` So I serialize a collection of these custom entities ...
[ 0.25427600741386414, 0.06503876298666, 0.6146168112754822, 0.007973386906087399, -0.12139064073562622, 0.07363311201334, 0.10700380057096481, -0.4911893904209137, -0.09912822395563126, -0.6921529173851013, -0.2559778690338135, 0.4195094108581543, -0.21714302897453308, 0.3498843312263489, ...
foreach (myChildCollection c in entities.ChildCollection { // .. do some more stuff.... } } ``` I've checked the XML resulting from the initial serialization and it does contain byte array - the child collection, as does the StringReader built above. After the deserialization process, the resulting c...
[ 0.18186913430690765, 0.4489503800868988, 0.3697953224182129, -0.05141114816069603, 0.17462898790836334, 0.030859820544719696, 0.08375249803066254, -0.23075030744075775, 0.07414044439792633, -0.5313897728919983, 0.06498000025749207, 0.44158661365509033, 0.06283613294363022, 0.32752543687820...
possible to serialize ArrayLists within a generic collection of custom entities? Properties of serializable classes, that are to be serialized, must be Read/Write. In my case above, the ArrayList property to read only, It was returning byte arrays based on a separate function where file names were added to it. Once a...
[ 0.2234470397233963, -0.3034544587135315, 0.1712864339351654, 0.3348998725414276, -0.23429907858371735, -0.16938845813274384, 0.14937350153923035, -0.0897207111120224, -0.3641414940357208, -0.6437910199165344, 0.05537666380405426, 0.6842512488365173, -0.31853216886520386, 0.0968205109238624...
Maybe it's the really late night I had but I can't figure this one out. First the html: ``` <div> <a href="#internal">Internal Link</a> <a href="http://external.com">External Link</a> <a href="#internal2">Internal Link2</a> </div> ``` in order to do something on the page instead of going to the link I need to filter...
[ 0.2986340820789337, -0.09048286080360413, 0.4176664650440216, 0.0016475620213896036, -0.5113421678543091, 0.1865990310907364, 0.32531219720840454, -0.07873457670211792, 0.06339414417743683, -0.8438410758972168, 0.2253246158361435, 0.8055635690689087, 0.06420670449733734, 0.2525321245193481...
with a local proxy that can record traffic and is scriptable with Python. <http://grinder.sourceforge.net/>
[ 0.12679657340049744, -0.032587930560112, 0.3209971487522125, 0.18530972301959991, -0.22580356895923615, 0.11457996070384979, 0.2617128789424896, 0.16258354485034943, -0.17840084433555603, -0.5658280253410339, -0.03319859504699707, 0.5282207131385803, -0.2830697298049927, 0.134148970246315,...
I have been working on a legacy C++ application and am definitely outside of my comfort-zone (a good thing). I was wondering if anyone out there would be so kind as to give me a few pointers (pun intended). I need to cast 2 bytes in an unsigned char array to an unsigned short. The bytes are consecutive. For an examp...
[ 0.49665072560310364, 0.041458066552877426, -0.028159283101558685, -0.3510543704032898, -0.16771307587623596, -0.032458338886499405, 0.5162760019302368, 0.03680935129523277, -0.1471112072467804, -0.5213252902030945, 0.09375844150781631, 0.2799268960952759, -0.3154427111148834, 0.25649386644...
This will be on windows only so there are no Big/Little Endian issues (that I am aware of). Here is what I have now (not working obviously): ``` //packetBuffer is an unsigned char array containing the string "123456789" for testing //I need to convert bytes 2 and 3 into the short, 2 being the most significant byte //...
[ 0.2503108084201813, 0.1566912978887558, 0.3077094554901123, -0.2481263279914856, -0.07806432992219925, -0.07044440507888794, 0.1918601244688034, -0.15834887325763702, -0.21111159026622772, -0.6137039661407471, 0.18586423993110657, 0.4454006552696228, -0.3135165274143219, 0.0489989109337329...
an short. `static_cast` cannot cast from `unsigned char*` to `unsigned short*`. You have to cast to `void*`, then to `unsigned short*`: ``` unsigned short *p = static_cast<unsigned short*>(static_cast<void*>(&packetBuffer[1])); ``` Now, you can dereference p and get the short value. But the problem with this approac...
[ 0.11649126559495926, -0.08865270018577576, 0.3837343454360962, -0.2582726776599884, -0.22729313373565674, 0.057845257222652435, 0.22540074586868286, -0.1432347595691681, -0.1372792273759842, -0.3413483798503876, -0.08927597850561142, 0.5345127582550049, -0.3998001515865326, 0.1425086408853...
We have some integer arithmetic which for historical reasons has to work the same on PHP as it does in a few statically typed languages. Since we last upgraded PHP the behavior for overflowing integers has changed. Basically we are using following formula: ``` function f($x1, $x2, $x3, $x4) { return (($x1 + $x2) ^ ...
[ -0.29179489612579346, 0.3105888068675995, 0.73457270860672, -0.15487106144428253, -0.26448488235473633, 0.237175852060318, 0.3009738326072693, -0.33607929944992065, -0.12041348963975906, -0.5162824392318726, 0.2255607694387436, 0.5374981760978699, -0.12809030711650848, 0.23895759880542755,...
up with -30512150 in PHP and 1617621783 in C#. Just adding together $x1 and $x2 I cannot get the right answer: In C# I get ``` (-1580033017 + -2072974554) = 641959725 ``` In PHP: ``` intval(intval(-1580033017) + intval(-2072974554)) = -2147483648 ``` which is the same as: ``` intval(-1580033017 + -2072974554) ...
[ -0.6403740644454956, 0.1787729263305664, 0.6796711683273315, -0.0856626033782959, -0.14342084527015686, 0.4066060185432434, 0.20944228768348694, -0.4827917814254761, -0.3612861633300781, -0.7878425121307373, 0.15502911806106567, 0.4809264540672302, -0.3890271484851837, -0.1351965218782425,...
and discovered a lot about PHP (at least in the way it handles Integer overflow). 1) It completely depended on a cross between which platform the machine was running on, which version of PHP, whether or not it had Suhosin Hardened PHP running, and how many bits it was compiled for (32 or 64). 6 machines behaved the w...
[ -0.07440008223056793, 0.17986370623111725, 0.1726294606924057, 0.13430339097976685, -0.30622929334640503, 0.263742059469223, 0.3056556284427643, -0.39691421389579773, -0.11403872817754745, -0.4586316645145416, 0.329877108335495, 0.6488879323005676, -0.1453670859336853, -0.25950372219085693...
is supposed to return PHP\_INT\_MAX when int > PHP\_INT\_MAX (not int & 0xffffffff), but this only happens on some versions of PHP4 and PHP5. Different versions of PHP return different values when int > PHP\_INT\_MAX. 3) The following code can return 3 different results (see 1): ``` <?php echo "Php max int: ".PHP_INT...
[ -0.2387682944536209, -0.03666345402598381, 0.612600564956665, -0.19836539030075073, -0.19320480525493622, 0.3115506172180176, 0.6463078260421753, -0.7248154878616333, -0.1648167371749878, -0.04401521012187004, -0.02969628944993019, 0.4294174611568451, -0.23135367035865784, -0.0705834031105...
PHP documentation for intval): ``` Php max int: 2147483647 The Val: -3653007571 Intval of the val: -641959725 And of the val: -641959725 ``` And on 64 Bit machines it returns (which is correct): ``` Php max int: 2147483647 The Val: -3653007571 Intval of the val: -3653007571 And of the val: -641959725 ``` **Soluti...
[ -0.3406442105770111, 0.18850073218345642, 0.5577734708786011, -0.1650054007768631, -0.19330546259880066, 0.2734350562095642, 0.4165344536304474, -0.502128541469574, 0.14168033003807068, -0.4808523952960968, 0.16174471378326416, 0.7779713273048401, -0.28903627395629883, -0.13077178597450256...
0xffffffff); } elseif ($value > 2147483647) { return ($value & 0xffffffff); } return $value; } ``` *Comment* I do think the designers of PHP should have said an Int is a 32 Bit Int no matter whether it is running on a 32 or 64 or 128 bit machine (like the DotNet CLR for example), and didn...
[ 0.0485592857003212, 0.0757930725812912, 0.5981832146644592, -0.2089231163263321, -0.3281627893447876, -0.09294752031564713, 0.1857134997844696, -0.34867486357688904, -0.13647006452083588, -0.06121904402971268, 0.12665562331676483, 0.31926149129867554, -0.3801044821739197, 0.043124470859766...
I've looked into and considered many JavaScript unit tests and testing tools, but have been unable to find a suitable option to remain fully TDD compliant. So, is there a JavaScript unit test tool that is fully TDD compliant? [Karma](http://karma-runner.github.io) or [Protractor](http://angular.github.io/protractor/#/)...
[ 0.25976961851119995, -0.04326021298766136, 0.011142137460410595, 0.310393363237381, -0.2556772530078888, 0.18584506213665009, 0.14704923331737518, -0.5691232681274414, 0.07918740808963776, -0.3624141812324524, 0.02865605801343918, 0.6366106867790222, 0.20015357434749603, -0.167589664459228...
be used together?](https://stackoverflow.com/questions/17070522/can-protractor-and-karma-be-used-together) **pros**: * Uses Node.js, so compatible with Win/OS X/Linux * Run tests from a browser or headless with PhantomJS * Run on multiple clients at once * Option to launch, capture, and automatically shut down browse...
[ 0.41033342480659485, -0.20738300681114197, -0.10263466835021973, 0.24696162343025208, -0.2391902506351471, -0.026742462068796158, 0.3865078389644623, -0.5171239972114563, -0.1826990395784378, -0.5830875635147095, -0.04828828573226929, 0.43228569626808167, -0.26629123091697693, -0.185335069...
support Node.js (i.e. backend)](https://stackoverflow.com/a/16660909/1175496) testing * No plugin for Eclipse (yet) * No history of previous test results [mocha.js](http://mochajs.org) ============================== I'm totally unqualified to comment on mocha.js's features, strengths, and weaknesses, but it was just ...
[ 0.2868571877479553, 0.1439119428396225, 0.14265111088752747, 0.029176009818911552, -0.09025483578443527, -0.34403523802757263, 0.704284131526947, -0.06027040630578995, 0.023153839632868767, -0.4300062358379364, -0.2791764438152313, 0.6433380246162415, -0.2052951157093048, -0.42693191766738...
slow tests * file watcher support * global variable leak detection * optionally run tests that match a regexp * auto-exit to prevent "hanging" with an active loop * easily meta-generate suites & test-cases * mocha.opts file support * clickable suite titles to filter test execution * node debugger support * detects mult...
[ 0.20824554562568665, -0.3813246786594391, 0.32603728771209717, 0.3157369792461395, -0.01986726187169552, 0.012163699604570866, 0.31609824299812317, -0.1154283806681633, -0.11274450272321701, -0.4942818582057953, -0.2930823266506195, 0.3208921253681183, -0.395377516746521, -0.11823686212301...
to write their use cases to show and tell their API. Such use cases forms the basis of regression tests. [AVA](https://github.com/sindresorhus/ava) ------------------------------------------ [![AVA logo](https://i.stack.imgur.com/43HiK.png)](https://github.com/sindresorhus/ava) Futuristic test runner with built-in s...
[ 0.31692957878112793, -0.11561335623264313, 0.09189285337924957, 0.2824329137802124, 0.07054997235536575, 0.07532734423875809, 0.2640228867530823, -0.427672803401947, 0.09008295834064484, -0.8415716290473938, -0.08820180594921112, 0.4722535014152527, -0.23611792922019958, -0.078161440789699...
No implicit globals * Isolated environment for each test file * Write your tests in ES2015 * Promise support * Generator function support * Async function support * Observable support * Enhanced asserts * Optional TAP o utput * Clean stack traces [Buster.js](http://busterjs.org/) --------------------------------- A J...
[ -0.052942369133234024, -0.2508181035518646, 0.24295242130756378, 0.16932906210422516, -0.07106176763772964, -0.15685343742370605, 0.5612870454788208, -0.2915133237838745, 0.14648497104644775, -0.6266429424285889, 0.17828093469142914, 0.4472343325614929, -0.15165798366069794, -0.29662716388...
QUnit style static HTML page testing, testing in headless browsers (PhantomJS, jsdom, ...), and more. Take a look at [the overview](http://docs.busterjs.org/en/latest/overview/)! > > > A Node.js testing toolkit. You get the same test case library, assertion library, etc. This is also great for hybrid browser and Node...
[ 0.10814576596021652, -0.3848564624786377, 0.05726256221532822, 0.2012753039598465, -0.13709531724452972, -0.037446413189172745, 0.20466090738773346, 0.16377447545528412, 0.08538176864385605, -0.8558344841003418, 0.020198194310069084, 0.7313542366027832, -0.3622245788574219, 0.1261174976825...
development computer (no need for IE) * Run tests from a command line (can be integrated into ant/maven) * Write tests xUnit or BDD style * Supports multiple JavaScript test frameworks * Defer tests instead of commenting them out * SinonJS built-in * [Auto-run tests on save](http://www.youtube.com/watch?v=gKVej9SAzH4) ...
[ 0.27189669013023376, 0.02782428078353405, -0.043169327080249786, 0.2871656119823456, 0.0064035626128315926, -0.013279114849865437, 0.06697224080562592, -0.06368394196033478, 0.32326051592826843, -0.890292763710022, -0.1481863260269165, 0.44157636165618896, -0.16478106379508972, -0.12281676...
os/browser/version like TestSwarm \*. It does, however, print out the browser name and version in the test results. * No history of previous test results like TestSwarm \* * Doesn't fully work on windows [as of May 2014](http://docs.busterjs.org/en/latest/developers/windows/) \* TestSwarm is also a Continuous Integrat...
[ 0.12400331348180771, -0.18432728946208954, 0.5375663042068481, 0.26694899797439575, 0.16129375994205475, 0.009610473178327084, 0.2569880187511444, 0.14849761128425598, -0.09568417072296143, -0.5852845311164856, -0.00432854937389493, 0.389173686504364, -0.1356513500213623, 0.040678121149539...
below) that might interest developers familiar with Ruby or Ruby on Rails. The syntax is based on [RSpec](http://rspec.info/) that are used for testing in Rails projects. Jasmine specs can be run from an HTML page (in qUnit fashion) or from a test runner (as Karma). > Jasmine is a behavior-driven development framewor...
[ 0.6404592990875244, -0.26777300238609314, -0.040456317365169525, 0.48212116956710815, -0.0066423434764146805, -0.10649647563695908, 0.24685831367969513, -0.2956591248512268, 0.2481222152709961, -0.24990005791187286, 0.05555104836821556, 0.5827552676200867, 0.01923183910548687, -0.219123527...
as possible. Blurb from the site: > QUnit is a powerful, easy-to-use JavaScript unit test suite. It's used by the jQuery, jQuery UI, and jQuery Mobile projects and is capable of testing any generic JavaScript code QUnit shares some history with TestSwarm (above): > QUnit was originally developed by John Resig as par...
[ 0.4122714698314667, -0.18124648928642273, -0.085464708507061, 0.16395510733127594, -0.06909582763910294, 0.014878969639539719, -0.054628416895866394, -0.1690548062324524, 0.20964913070201874, -0.6999295949935913, 0.20256458222866058, 0.3638268709182739, -0.12532219290733337, 0.199200406670...
Testing specification, which was to some degree influenced by QUnit. Project home: <http://qunitjs.com/> [Sinon](http://sinonjs.org) --------------------------- Another great tool is [sinon.js](http://sinonjs.org) by Christian Johansen, the author of [Test-Driven JavaScript Development](http://tddjs.com/). Best desc...
[ 0.5611742734909058, 0.1915622502565384, -0.1927991807460785, 0.21690499782562256, -0.32498955726623535, -0.2457311898469925, 0.17677943408489227, -0.33104872703552246, 0.05482019856572151, -0.6345992088317871, 0.11188524961471558, 0.2819936275482178, 0.1292579621076584, -0.3150415122509002...
terms of testing Check out one of their talks: <https://www.youtube.com/watch?v=cAKYQpTC7MA> Better yet: [Getting Started](https://jestjs.io/docs/en/getting-started.html)
[ 0.7779673337936401, -0.06474971771240234, 0.1373516470193863, 0.07369525730609894, 0.1063767522573471, -0.47992846369743347, 0.5506851673126221, 0.00040011026430875063, 0.09425563365221024, -0.43447330594062805, 0.09851905703544617, 0.04659554734826088, 0.6666022539138794, 0.05143953487277...
For a deleted file what's the command to use to view the content of a old revision ``` E:\Downloads\eeli\eel\eel>svn cat eel-scalable-font.h -r 2 svn: warning: 'eel-scalable-font.h' is not under version control ``` You need to use a repository URL (not working copy), and use the @rev syntax. Something like: ``` svn ...
[ -0.20828108489513397, 0.16656619310379028, 0.49942490458488464, -0.2339855283498764, 0.21164120733737946, -0.12434830516576767, 0.479832261800766, -0.00660137040540576, -0.4650299549102783, -0.3049147129058838, -0.439655065536499, 0.5263366103172302, -0.3539024293422699, 0.4575977027416229...
So, I've spent enough time using ASP.NET webforms to know that I'd almost rather go back to doing classic ASP than use them. But I'm hesitant to move to ASP.NET MVC until it becomes more mature. Are there any open source alternatives? The main thing I'm looking for is something that's easy to learn and to get a protot...
[ 0.6655591726303101, -0.07259070873260498, -0.0570068322122097, 0.07902305573225021, 0.14283327758312225, 0.023588381707668304, -0.12620282173156738, 0.18145209550857544, -0.2710735499858856, -0.4323378801345825, 0.08698010444641113, 0.46156373620033264, -0.2789508104324341, 0.1018951982259...
18 months. It replaced a 7 year old disaster of classic ASP pages. MonoRail RC2 has worked well for us, serving an average of ~14,000 page requests per day. It enabled me to develop the site very quickly, was free, and holds up well. For that, I am thankful to the MonoRail team. I just used the MonoRail bit. I chose i...
[ 0.331390380859375, -0.27256399393081665, 0.3603450655937195, 0.15612399578094482, -0.41485196352005005, -0.24236328899860382, 0.574927568435669, -0.0646844208240509, -0.21296991407871246, -0.5331777930259705, 0.03058491088449955, 0.3205104172229767, 0.15800824761390686, 0.07784441113471985...
to get in there and modify things. For example, the default routing implementation didn't preserve the query string when rerouting (I needed this to preserve backwards compatibility with the old URL formats used by the now defunct classic ASP site for SEO reasons) and it didn't support issuing HTTP 301 Permanent Redire...
[ 0.33556756377220154, -0.3638068735599518, 0.20795729756355286, 0.27358266711235046, -0.03907831758260727, -0.46018439531326294, 0.7486298680305481, 0.01800181157886982, -0.2739134430885315, -0.45457348227500916, 0.13255202770233154, 0.030404552817344666, -0.09090443700551987, 0.22932639718...
with it for over year, I haven't had too many days where I've cursed at MonoRail. That's a pretty good litmus test. Some of the helper classes (FormHelper) can behave a little strangely, the wizard framework is outright bizarre, and parameter binding can sometimes throw you for a loop, but it doesn't happen often. * Ch...
[ 0.4143255054950714, -0.2651072144508362, 0.1018238291144371, 0.4101364314556122, -0.26866891980171204, -0.30371713638305664, 0.29413166642189026, -0.03566190227866173, -0.33519113063812256, -0.6361892819404602, 0.2240840494632721, 0.6513485312461853, 0.07892236858606339, 0.2282733321189880...
and RC3 was beyond ridiculous; a lot of protected virtual methods disappeared, a lot of helpers changed (which is a big deal when your view engine isn't statically typed), even the mechanism for unit testing controllers and views changed. For this reason, we're probably just going to stay on RC2 forever. Now that ASP.N...
[ 0.454432874917984, -0.1367693394422531, 0.1781514585018158, 0.2670970857143402, -0.3273903429508209, -0.41503363847732544, 0.3503304719924927, 0.22730529308319092, -0.46558988094329834, -0.257559597492218, 0.19945865869522095, 0.4175613820552826, -0.28385111689567566, 0.2542472183704376, ...
with an unhealthy implementation and maintenance outlook. (Does it work? well enough. But being a CTRL+C CTRL+V port from the Java version, don't read the source for that library because your eyes will bleed.) * NVelocity and RC2 shipped with an extremely severe threading bug where multiple users accessing the site at ...
[ 0.41045209765434265, 0.16040489077568054, 0.47214457392692566, -0.0626947209239006, 0.14558322727680206, -0.29269319772720337, 0.44442975521087646, 0.26917555928230286, -0.5515158772468567, -0.3516223132610321, 0.1589556783437729, 0.4330924153327942, -0.25396260619163513, 0.332829236984252...
to encounter, one that would be highly unlikely to be encountered on a Microsoft framework. Caveat emptor. MonoRail provided an excellent opportunity for us in June 2007 by giving us a way to migrate an existing site on the Microsoft stack to the .NET platform in a way that avoided WebForms (which is great for intrane...
[ -0.0008249609381891787, -0.3689684271812439, 0.3205474019050598, 0.35879459977149963, -0.3372320234775543, -0.1176220178604126, 0.24076513946056366, 0.07873153686523438, -0.06256196647882462, -0.6136191487312317, 0.26114338636398315, 0.31061238050460815, -0.1771754026412964, 0.154254019260...
that point in time. Now that ASP.NET MVC does exist, however, and given that Microsoft is positioning it as an alternative to WebForms, I know that I personally will strongly consider it for any future project. MonoRail is a great project, it served us well, and I'm grateful to the open source community for it, but I ...
[ 0.23975534737110138, -0.20247377455234528, 0.14469675719738007, 0.2793217897415161, -0.0526103712618351, -0.28189483284950256, -0.08668213337659836, 0.5492382049560547, -0.12514568865299225, -0.706473171710968, 0.2655085027217865, 0.32019805908203125, -0.005876713898032904, 0.3374354243278...
Joomla has a built-in function on its login screen "I've forgotten my user name", so that you can type in your email address and the username is sent to you via email. I was thinking of changing it so that the username was displayed on screen immediately, without any form of authentication. This would greatly reduce t...
[ -0.15223638713359833, 0.27679014205932617, 0.49367329478263855, -0.17677442729473114, -0.0739164724946022, -0.19894279539585114, 0.2513628304004669, 0.3660788834095001, -0.4745684862136841, -0.3133171796798706, -0.07444445788860321, 0.0196823850274086, -0.13935261964797974, 0.1955971121788...
at all? I would say it is a *slight* security risk for your less savvy users. For a user with a weak password, particularly if it is related to their username or e-mail address, exposing their user name leaves them open to having their account hijacked. Other than that, I can't think of a reason it would be a problem. ...
[ 0.41138359904289246, 0.1710156351327896, -0.020326655358076096, 0.15062198042869568, 0.06386429071426392, -0.491559773683548, 0.5315771102905273, 0.1205170601606369, -0.3656167984008789, -0.1982702612876892, -0.06716792285442352, 0.4165315330028534, -0.14708644151687622, -0.063044942915439...
case they could take my e-mail and get it. But whether that is an issue depends on your site and your user base.
[ 0.5583488941192627, 0.09420479089021683, 0.21875354647636414, 0.009138708934187889, -0.021939748898148537, -0.050911203026771545, 0.18376487493515015, 0.3091745674610138, -0.15711019933223724, -0.558620274066925, 0.16799595952033997, 0.2536768913269043, 0.1822972446680069, -0.0899558812379...
I love grids - especially the cool third party ones like Devex, C1 etc.. Our programmer doesn't think end users can handle them - so he always designs his forms with read-only grids (with read-only classes). Choosing to edit an item in the grid opens up a detail form that allows editing. This app is going to be used...
[ 0.6276087760925293, 0.03685851767659187, 0.05322735756635666, 0.4844188392162323, -0.07639061659574509, -0.169313445687294, -0.11727908998727798, 0.21088770031929016, -0.028657298535108566, -0.7913403511047363, 0.14484693109989166, 0.4778880178928375, -0.058293044567108154, -0.360204577445...
which the grid does much better than the detail forms? I do want to have a consistent feel to the application, so prefer not to mix it up too much. This is mainly a matter of taste, but my preference is in line with your developer's (and Corey's answer, above.) I much prefer a read-only/edit model over a big editable g...
[ 0.5275149345397949, 0.1070970967411995, -0.027937885373830795, 0.10854560136795044, -0.21494543552398682, 0.08603677898645401, 0.1457851380109787, -0.018855836242437363, -0.2560730576515198, -0.6332776546478271, 0.1403859257698059, 0.5968999266624451, -0.17328599095344543, -0.1734520643949...
I'd stick with a grid. For everything else (including sequential entry) I'd use a read-only model with a break-out form. Various apps I've worked on have shown that users can deal with either in the appropriate context.
[ 0.3082951307296753, 0.10679689049720764, -0.08127496391534805, -0.023501301184296608, -0.19498848915100098, 0.11907046288251877, 0.06589525192975998, 0.10277165472507477, -0.15977366268634796, -0.5824626684188843, -0.11301802098751068, 0.2612009048461914, -0.1251305192708969, -0.0222944486...
To calculate a top position for an element of variable height, I was thinking of doing the following: 1. Move the element 1000px off the top of the viewport 2. Set the element to display: block 3. Get the height of the element 4. Set the element to display: none 5. Continue on as if everything is normal and good Any ...
[ 0.05516088753938675, -0.18649882078170776, 0.7484679222106934, -0.08461767435073853, -0.020714739337563515, -0.12376425415277481, 0.29780250787734985, -0.3842773735523224, -0.06706427782773972, -0.3046032786369324, -0.05017774924635887, 0.41629138588905334, -0.10220194607973099, -0.2844670...
element, but it's a bit shonky in some edge cases.
[ -0.0019392844988033175, -0.1764725148677826, -0.023086851462721825, 0.0964643582701683, -0.22680841386318207, -0.3225114345550537, 0.05418841540813446, -0.30772262811660767, 0.2707814872264862, -0.2627285122871399, 0.04938812926411629, 0.43260958790779114, 0.19931873679161072, -0.291191279...
We were using stringstream to prepare select queries in C++. But we were strongly advised to use QUERY PARAMETERS to submit db2 sql queries to avoid using of stringstream. Can anyone share what exactly meant by query parameter in C++? Also, share some practical sample code snippets. Appreciate the help in advance. Ed...
[ 0.44042885303497314, -0.009326481260359287, -0.0008539546397514641, 0.11398734897375107, -0.3334854543209076, -0.12328405678272247, 0.17472074925899506, 0.05097033455967903, -0.13985835015773773, -0.4439917504787445, -0.25335821509361267, 0.43792960047721863, -0.4823054075241089, -0.094819...
* FROM Customers WHERE CustomerId = " + _customerId; ``` Is bad, while this: ``` "SELECT * FROM Customers where CustomerId = @CustomerId" ``` is good. The catch is that you have to add the parameters to the query object (I don't know how this is done in C++. References to other questions: * <https://stackoverf...
[ 0.34423500299453735, 0.05364181846380234, 0.2757990062236786, -0.04464719444513321, -0.03434278443455696, -0.23930585384368896, 0.14022980630397797, -0.4515792727470398, -0.14909948408603668, 0.004368974361568689, -0.0443035326898098, 0.738378643989563, -0.158036470413208, -0.0865867137908...
I recently started diving into low level OS programming. I am (very slowly) currently working through two older books, XINU and Build Your Own 32 Bit OS, as well as some resources suggested by the fine SO folks in my previous question, [How to get started in operating system development](https://stackoverflow.com/quest...
[ 0.3931323289871216, 0.25311458110809326, -0.13842108845710754, 0.015678169205784798, 0.11924608051776886, -0.20191146433353424, -0.0567983016371727, 0.52068030834198, -0.28317418694496155, -0.8102434873580933, 0.043285757303237915, 0.5668892860412598, 0.18386635184288025, 0.028886491432785...
read operation is complete. Which processor/core acknowledges that an interrupt was signaled? Is it the processor/core that initiated the file read? Is it whichever processor/core that gets to it first? Looking into the [IoConnectInterrupt](http://msdn.microsoft.com/en-us/library/ms801597.aspx) function you can find th...
[ -0.048271019011735916, 0.04995161294937134, 0.5262503623962402, 0.0001122417306760326, 0.1470961719751358, -0.37308812141418457, 0.23233799636363983, 0.09426385164260864, -0.3451906740665436, -0.6636772155761719, -0.16943450272083282, 0.5936157703399658, -0.06117096543312073, 0.10013307631...
that translated to something low level depend on which bus you filesystem located it might be IDE or SATA disk or it might be even usb storage in this case sector read will be translated to 3 logical operation over usb bus, there will be interrupt served by usb host controller driver, but it's not really related to ori...
[ 0.045098382979631424, -0.4731309115886688, 0.3710409998893738, 0.29258695244789124, -0.07041500508785248, -0.06341110169887543, -0.12314258515834808, 0.39141446352005005, -0.27921393513679504, -0.564935564994812, 0.11327455192804337, 0.471943736076355, -0.17896054685115814, 0.4216745197772...
I'm writing a function for an installer DLL to verify the Authenticode signature of EXE files already installed on the system. The function needs to: > A) verify that the signature is valid. > > B) verify that the signer is our organization. Because this is in an installer, and because this needs to run on older...
[ 0.5528532862663269, 0.1627579778432846, 0.4901447296142578, 0.13604889810085297, 0.29687103629112244, -0.6204810738563538, 0.2023526132106781, -0.22615785896778107, -0.05349739268422127, -0.6312346458435059, 0.018124548718333244, 0.4998215138912201, -0.2127612680196762, -0.0479447469115257...
EXE in question. You should use [CryptQueryObject](http://msdn.microsoft.com/en-us/library/aa380264(VS.85).aspx). This KB-article demonstrates the use: [How To Get Information from Authenticode Signed Executables](https://support.microsoft.com/kb/323809). To the commenter that asked about how to do it without the Win...
[ 0.1904519647359848, 0.15992677211761475, 0.35728105902671814, 0.1869121640920639, -0.0025650125462561846, -0.385331928730011, 0.2551702857017517, -0.15621444582939148, -0.13772031664848328, -0.574343204498291, -0.25436079502105713, 0.28858789801597595, -0.0972941443324089, 0.05986986309289...
How can I determine if a Win32 thread has terminated? The documentation for **[GetExitCodeThread](http://msdn.microsoft.com/en-us/library/ms683190(VS.85).aspx)** warns to not to use it for this reason since the error code STILL\_ACTIVE can be returned for other reasons. Thanks for the help! :) MSDN mentions that "Whe...
[ -0.04585902765393257, -0.1702498495578766, 0.42900413274765015, -0.16302268207073212, 0.051912881433963776, -0.39232969284057617, 0.33531472086906433, -0.0488661527633667, -0.36953628063201904, -0.39404428005218506, -0.2739364504814148, 0.34164685010910034, -0.07351616024971008, 0.44393074...
- the thread has terminated } else { // the thread handle is not signaled - the thread is still alive } ```
[ 0.24971625208854675, -0.13700053095817566, 0.5291078686714172, 0.03948575258255005, 0.17418190836906433, -0.13683690130710602, 0.39176374673843384, 0.39613568782806396, -0.33190247416496277, -0.14100542664527893, -0.4242589771747589, 0.22033220529556274, -0.25814422965049744, 0.57856345176...
I'm trying to create routes which follow the structure of a tree navigation system, i.e I want to include the entire path in the tree in my route. So if I had a tree which looked like this * Computers + Software - Development - Graphics + Hardware - CPU - Graphics cards Then I would like to be able to have ...
[ 0.6903436183929443, 0.20432424545288086, 0.3138936161994934, 0.08363105356693268, -0.044759415090084076, -0.004676800221204758, 0.018808133900165558, 0.04574468359351158, -0.4246642291545868, -0.5132690072059631, 0.019843054935336113, 0.27937445044517517, -0.08767013251781464, -0.048160489...
I would requite routes that were defined like the following examples * site.com/{\*categories}/title={name} * site.com/{\*categories} However the first of these routes are invalid since nothing else can appear after a greedy parameter such as {\*categories} so I'm a bit stuck. I've been thinking of implementing regex...
[ 0.42293599247932434, 0.09382382035255432, 0.408263236284256, 0.10901445895433426, -0.35896825790405273, -0.1656493991613388, 0.5502370595932007, 0.11820626258850098, -0.24421395361423492, -0.667674720287323, 0.20591017603874207, 0.294179767370224, -0.10493223369121552, 0.2918236553668976, ...
was deleted, by me, since I've since given it more thought and the old question contained incomplete descriptions of my problem* **UPDATE 2008/11/26** I posted the solution at <http://thecodejunkie.blogspot.com/2008/11/supporting-complex-route-patterns-with.html> Routes ignore query string parameters. But at the same ...
[ -0.10810690373182297, 0.08377594500780106, 0.43420761823654175, -0.13392166793346405, 0.15963061153888702, 0.13493721187114716, 0.6498058438301086, -0.04929521307349205, -0.2703346610069275, -0.4504454433917999, -0.062282465398311615, 0.1239689439535141, -0.5705547332763672, 0.103002429008...
of "categories" (something like RouteData.Values["categories"] and then add the parsed data to the route value dictionary (RouteData.Values["title"] = parsedTitle.
[ 0.15771597623825073, 0.08341256529092789, 0.5366283655166626, 0.08407773822546005, 0.15721900761127472, -0.4288420081138611, 0.20171530544757843, -0.19160330295562744, 0.06970444321632385, -0.3120870590209961, -0.1551765501499176, 0.2739974856376648, -0.34628841280937195, 0.147201865911483...
I am getting a web host and i have projects with teammats. I thought it be a nice idea to have my own paste site that has no expiry date on paste (i know <http://pastie.org/> exist) and other things. i wanted to know. Whats a simple highlight lib i can use on code? i would be only using C/C++. The question is tagged "p...
[ 0.39942070841789246, -0.044360142201185226, 0.27406036853790283, -0.16324719786643982, -0.5320842266082764, -0.21158051490783691, 0.17586563527584076, 0.3106344938278198, -0.3014221489429474, -0.6273369789123535, 0.08290553838014603, 0.29989129304885864, -0.19792532920837402, 0.05555448308...
The **`fuser`** command lets me know which processes are using a file or directory. I'm looking for command that does the opposite: lets me know which files are being used by a process. --- Update ------ Forgot to mention that it's for a Solaris system. While I wouldn't begrudge anyone learning Dtrace or gaining ex...
[ 0.26851439476013184, -0.0022899527102708817, 0.39353808760643005, 0.03425060585141182, 0.1456616073846817, 0.08278349786996841, 0.016504662111401558, -0.22110912203788757, -0.46971872448921204, -0.8711774349212646, -0.35750433802604675, 0.6585023403167725, -0.4650379717350006, 0.0631467476...
gid:3 size:54 O_RDONLY|O_LARGEFILE /etc/motd 1: S_IFCHR mode:0620 dev:299,0 ino:718837882 uid:101 gid:7 rdev:24,3 O_RDWR|O_NOCTTY|O_LARGEFILE /dev/pts/3 2: S_IFCHR mode:0620 dev:299,0 ino:718837882 uid:101 gid:7 rdev:24,3 O_RDWR|O_NOCTTY|O_LARGEFILE ...
[ -0.7206341028213501, 0.319614440202713, 0.5224587321281433, -0.23923653364181519, -0.2707168757915497, 0.5845456123352051, 0.3060508370399475, -0.6248689889907837, -0.3686600923538208, -0.6126121282577515, -0.45330873131752014, 0.7399512529373169, -0.16055546700954437, -0.08043406158685684...
I am developing a Java desktop application and would like to have an external configuration.xml. I am developing the application using Netbeans and tried to add the configuration.xml file in the dist directory so that it resides in the application work folder. But when Netbeans executes its clean operation it delete...
[ 0.367668092250824, 0.19672515988349915, 0.28431040048599243, -0.27960458397865295, 0.05870268493890762, -0.018405966460704803, 0.038643624633550644, -0.1489039957523346, 0.11272923648357391, -0.9556356072425842, 0.022861963137984276, 0.6892521977424622, -0.3165108859539032, 0.3229434192180...
</copy> </target> ``` You can now put your configuration.xml file in the folder 'resources' (that you need to create) in your project and all files in it will be copied to the dist folder during the build process.
[ 0.6993829011917114, 0.0868738442659378, 0.4916285574436188, 0.021153323352336884, 0.17605559527873993, -0.40820929408073425, -0.10454016178846359, 0.07724471390247345, 0.05095747113227844, -1.074074625968933, -0.36491718888282776, 0.4617964029312134, -0.08660892397165298, -0.00196980242617...
I have example of code below. ``` <script type="text/javascript" src="assets/scripts/somescript.php">. </script> ``` So, will my browser still cache this just by not setting this scripts headers meta tag cache to must-revalidate? Some browsers are more agressive with default caching than others. However, there are...
[ 0.3952685594558716, 0.11693201214075089, 0.49024665355682373, -0.001925220713019371, 0.15349958837032318, -0.31801700592041016, 0.5685758590698242, -0.05311279743909836, -0.09782564640045166, -0.7582922577857971, -0.1849076896905899, 0.27243688702583313, -0.06782076507806778, 0.27517631649...
the only ones that eliminate extra server calls.
[ 0.16319730877876282, 0.06668734550476074, 0.2529667317867279, 0.2696617543697357, 0.19294212758541107, -0.13704288005828857, 0.23785074055194855, 0.19506782293319702, -0.39658451080322266, -0.3965166509151459, -0.08133482933044434, 0.4248045086860657, -0.1476719081401825, -0.23022778332233...
Is there a way to execute a query(containing built in DB function) using PreparedStatement? Example: insert into foo (location) values (pointfromtext('12.56666 13.67777',4130)) Here pointfromtext is a built in function. By what I've seen, the first parameter on pointfromtext function is a string, and the second a numb...
[ -0.12136915326118469, -0.05783711373806, 0.4741153120994568, -0.3029838502407074, 0.1844460517168045, -0.06016996130347252, 0.22112895548343658, -0.6485260725021362, 0.04488493502140045, -0.5667548775672913, -0.3265080749988556, 0.3523293137550354, -0.23800283670425415, 0.02627229690551757...
I wonder if [MailMessage](http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx) class is protected from [e-mail injection](http://en.wikipedia.org/wiki/E-mail_injection). For example, should I check values before passing them to its constructor: ``` MailMessage message = new MailMessage(fromTextBox...
[ 0.07498986274003983, 0.012294206768274307, 0.1511530876159668, -0.138849139213562, -0.10186532139778137, 0.04350997880101204, 0.4225166440010071, -0.37597617506980896, -0.07665824890136719, -0.7175703048706055, -0.1970079243183136, 0.37494343519210815, -0.4459042251110077, 0.09527174383401...
Is there any regular expression library that i can use with CString of vc6? Opensource/Free library is needed Version 3.1.3 of the [Regular Expression Component Library](http://www.tropicsoft.com/Components/RegularExpression/) based on boost regex supports VC6 and even version below than that.
[ 0.2232017070055008, -0.15323284268379211, 0.2946855127811432, 0.2429407387971878, -0.09906728565692902, -0.1901392787694931, 0.18221180140972137, 0.05421185865998268, -0.31290245056152344, -0.33769863843917847, -0.28592273592948914, 0.8126860857009888, -0.33220675587654114, -0.376670420169...
In a PHP application I am writing, I would like to have users enter in text a mix of HTML and text with pointed-brackets, but when I display this text, I want to let the HTML tags be rendered by the non-HTML tags be shown literary, e.g. a user should be able to enter: ``` <b> 5 > 3 = true</b> ``` when displayed, the...
[ 0.5854504108428955, 0.47850465774536133, 0.437179833650589, -0.25390374660491943, -0.5278722047805786, -0.16301338374614716, 0.3171519637107849, -0.2867093086242676, 0.127515971660614, -0.5847749710083008, 0.12415068596601486, 0.5128365159034729, -0.2707544267177582, -0.14839638769626617, ...
the html tags: ``` [b]This is bold[/b] [i]this is italic with a > 'greater than' sign there[/i] ``` This gives you more control over how you parse user's input into html, though I admit it looks like an unnecessary burden.
[ 0.22136788070201874, 0.24534247815608978, 0.3781947195529938, -0.24556180834770203, -0.523270845413208, -0.15601803362369537, 0.2480677217245102, -0.3096289038658142, -0.15546345710754395, -0.6365070343017578, -0.22169451415538788, 0.3986082673072815, -0.30682095885276794, -0.3730701804161...
Coming from a java background, one of the things I am used to is telling the JVM what the maximum heap size should be. If the running program tries to swallow more than is allowed, and the garbage collector cannot free any more resources, then OutOfMemoryError is thrown and it all goes bang. So setting the maximum heap...
[ 0.37499743700027466, 0.16366225481033325, 0.03814208135008812, -0.2013007551431656, -0.17602726817131042, -0.4058407247066498, 0.07957404106855392, -0.010289084166288376, -0.6114726066589355, -0.28687819838523865, 0.03558517247438431, 0.4628983736038208, -0.2029811292886734, -0.11292202770...
reason that my Java blinkers stop me from seeing? You can't set max heap size in .Net unless you host the CLR yourself in a process. Edit: To control the memory allocations of CLR including the max heap size, you need to use the hosting api to host the clr and specifically use the "Memory manager interfaces", some st...
[ 0.31769707798957825, 0.1476159393787384, 0.340361088514328, 0.08897087723016739, -0.11248049139976501, -0.2942105829715729, 0.14756329357624054, 0.16701844334602356, -0.4778789281845093, -0.4319985508918762, -0.05669673904776573, 0.6190918684005737, -0.43402284383773804, -0.009650681167840...
application that is like SQL Server or IIS or some real time application then you'd have a pretty good reason to have control over memory and specifically, avoid paging, otherwise the CLR itself and the OS already do a pretty good job for you, and what is left is to ensure your that application uses minimum resources f...
[ -0.06446783244609833, 0.3215320110321045, 0.31938040256500244, 0.41280487179756165, 0.11611771583557129, -0.42585012316703796, -0.006161965895444155, 0.3021058738231659, -0.16883546113967896, -0.3893967866897583, 0.0836811289191246, 0.5949561595916748, -0.11351381242275238, -0.182062953710...
I have a form I am submitting via AJAX (using prototype and the built-in rails 'form\_remote\_tag' helper). What I would like is to update one div (a status area) if there are form validation errors but a different div (the div where the form lives) if the submit goes through sucessfully. My code looks something li...
[ 0.36229610443115234, 0.1649031639099121, 0.44354167580604553, -0.15686149895191193, 0.014160308055579662, -0.29100504517555237, 0.19738878309726715, -0.4009968638420105, 0.27649179100990295, -0.9384225010871887, -0.020695006474852562, 0.24516728520393372, -0.14429932832717896, 0.0408618710...
=> visual_effect(:appear, "recipe-status"), :url => { :action => 'import', :id => @recipe.id }, :failure => "alert('Unable to import recipes at present')") %> <-- Form goes here, I want this to be replaced if the submit succeeds --> </div> ``` The only way I can think of doing this is to return a H...
[ 0.4602711796760559, 0.14706963300704956, 0.3610577881336212, -0.18886396288871765, -0.20788869261741638, 0.013224138878285885, 0.4292672872543335, -0.3521491587162018, -0.08915282785892487, -0.7567791938781738, -0.035361398011446, 0.42705580592155457, -0.26266247034072876, 0.04788219183683...
as I thought - but the real issue was that the app was only INCLUDING the .NET 3.5 assemblies and not being compiled using the 3.5 compiler, was missing some entries from web.config which I realised when I created an empty project and tried it (successfully) in there! Error messages can be so misleading sometimes...
[ 0.21965643763542175, 0.4821440577507019, -0.06721848994493484, -0.0679929107427597, 0.0003197620972059667, -0.05140836909413338, 0.5783802270889282, -0.05282453075051308, -0.10695567727088928, -0.12983107566833496, 0.09311635792255402, 0.4612433910369873, -0.3373068571090698, -0.2263396233...
I have a ListBox control that I want to change into having a toggle selection. i.e. Click once on an item selects it, click again it deselects it. Also, clicking another item in the list should do the default action of deselecting the previous item and selecting the new one. What's the best way of achieving this? What...
[ 0.6034718751907349, -0.36331114172935486, 0.5492422580718994, 0.2134092003107071, 0.05023738741874695, -0.15688098967075348, 0.07263290137052536, -0.27593231201171875, -0.24555952847003937, -0.5889336466789246, 0.3933059573173523, 0.7608886361122131, -0.47851550579071045, 0.363783717155456...
We have developers with knowledge of these languages - Ruby , Python, .Net or Java. We are developing an application which will mainly handle XML documents. Most of the work is to convert predefined XML files into database tables, providing mapping between XML documents through database, creating reports from database ...
[ 0.35814228653907776, 0.04107983410358429, 0.30656322836875916, 0.4096207916736603, 0.12491592019796371, -0.2015458196401596, -0.07116245478391647, 0.013740181922912598, -0.13303616642951965, -0.7891719937324524, -0.14028331637382507, 0.5159111022949219, -0.25885331630706787, -0.07615209370...
DB table-field" mappings as disjoint blocks of Python code that your main application imports. The block of Python code **is** your configuration file. It's not an `.ini` file or a `.properties` file that describes a configuration. It **is** the configuration. We use Python, xml.etree and the SQLAlchemy (to separate ...
[ 0.18697038292884827, 0.2093474119901657, 0.2975213825702667, 0.033099085092544556, -0.3226558268070221, -0.07181253284215927, -0.031200293451547623, -0.5063061714172363, 0.0870843231678009, -0.5855641961097717, -0.06762609630823135, 0.4163174331188202, -0.3936520218849182, 0.00609485805034...
def __init__( self, aFileName, *sheets ): """Initialize a XML source. XXX - Create better sheet filtering here, in the constructor. @param aFileName: the file name. """ super( SSXML_Source, self ).__init__( aFileName ) self.log= logging.getLogger( "source.PCIX_XLS" ) ...
[ 0.059995345771312714, -0.04176860302686691, 0.6010369658470154, 0.013082247227430344, -0.02842899039387703, 0.043386153876781464, 0.2551407516002655, -0.5567518472671509, -0.397565633058548, -0.5715951323509216, -0.34318622946739197, 0.6253057718276978, -0.25360745191574097, -0.12682290375...
for wb in self.dom.getiterator("{%s}Workbook" % ( self.ns0, ) ): for ws in wb.getiterator( "{%s}Worksheet" % ( self.ns0, ) ): yield ws def rows( self ): for s in self.sheets(): print s.attrib["{%s}Name" % ( self.ns0, ) ] for t in
[ -0.17031578719615936, -0.32237353920936584, 0.26814964413642883, -0.2054680585861206, -0.12825343012809753, 0.5499061346054077, 0.433556467294693, -0.5019968748092651, -0.05614210665225983, -0.794386088848114, -0.21928469836711884, 0.44001972675323486, -0.059592582285404205, 0.132082626223...
s.getiterator( "{%s}Table" % ( self.ns0, ) ): for r in t.getiterator( "{%s}Row" % ( self.ns0, ) ): # The XML may not be really useful. # In some cases, you may have to convert to something useful
[ 0.07886160910129547, -0.20682722330093384, 0.29499903321266174, 0.09441206604242325, -0.23649270832538605, 0.07556057721376419, 0.27707451581954956, 0.00716549064964056, 0.08301170915365219, -0.6338310241699219, -0.5039832592010498, 0.3858037292957306, -0.20311442017555237, -0.171472504734...
yield r ``` **model.py** ``` """This is your target object. It's part of the problem domain; it rarely changes. """ class MyTargetObject( object ): def __init__( self ): self.someAttr= "" self.anotherAttr= "" self.this= 0 self.that= 3.14159 def aMethod( self ): """et...
[ -0.28304800391197205, 0.0025327166076749563, 0.27465084195137024, -0.15023082494735718, 0.14192165434360504, 0.07544737309217453, 0.3234078586101532, -0.08054064214229584, -0.12093518674373627, -0.8593799471855164, -0.14546312391757965, 0.6517907977104187, -0.15059033036231995, 0.231505557...
many builders. This changes all the time to fit specific needs and situations. The goal is to keep this short and to-the-point so that it has the mapping and nothing but the mapping. """ import model class MyTargetBuilder( object ): def makeFromXML( self, element ): result= model.MyTargetObject() ...
[ 0.07312095910310745, -0.2415306568145752, 0.19465167820453644, -0.028039997443556786, 0.17932015657424927, -0.004024716094136238, 0.23055416345596313, -0.29564759135246277, -0.0679418072104454, -0.591251790523529, 0.0014263711636886, 0.5572102069854736, -0.18294821679592133, 0.005578808952...
) return result ``` **loader.py** ``` """An application that maps from XML to the domain object using a configurable "builder". """ import model import source import builder_1 import builder_2 import builder_today # Configure this: pick a builder is appropriate for the data: b= builder_today.MyTargetBuilde...
[ 0.15277352929115295, -0.0630078911781311, 0.5237005352973938, -0.23670968413352966, 0.00708807585760951, 0.09276437014341354, 0.3226803243160248, -0.6902063488960266, 0.08139009028673172, -0.8171598315238953, -0.2085503190755844, 0.5628684759140015, -0.28209608793258667, 0.3017306923866272...
builder a command-line parameter. Dynamic imports in dynamic languages seem like overkill to me, but they are handy.
[ 0.4042419195175171, -0.2961414158344269, -0.20435361564159393, 0.0514708086848259, -0.4183443486690521, 0.2117869257926941, 0.36915323138237, -0.2750823497772217, 0.019511863589286804, -0.505256175994873, -0.07226788997650146, 0.8558897376060486, -0.1662747710943222, 0.04631282016634941, ...
Does anyone know how to unit test SiteMapNode? We’re building some custom navigation controls, which renders unordered html lists from Site Maps with custom attributes. I’m trying to follow a test first approach but am finding that SiteMapNode has internal dependencies on HttpContext. To traverse the site map file it ...
[ 0.5927985906600952, 0.3139665126800537, 0.16059209406375885, 0.188750222325325, -0.23392131924629211, -0.33106276392936707, 0.3033718764781952, -0.056424859911203384, -0.0060519385151565075, -0.43419915437698364, 0.2619650363922119, 0.5870248675346375, 0.04048522934317589, 0.22709414362907...
a response! For anyone else who may stumble across this problem, here's my preferred solution: I've found the best way to handle this is to load the physical site map into an xml document. I then have a NavigationNodeFactory, which validates and builds my own composite NavigationNode tree from the xml document. My N...
[ -0.04669586569070816, -0.0005861046374775469, 0.5679813027381897, -0.0830732136964798, -0.2422863095998764, 0.1144493892788887, 0.31722602248191833, -0.11559517681598663, -0.10999809950590134, -0.8770091533660889, 0.07470997422933578, 0.4216986298561096, -0.046135637909173965, -0.022371498...
I am working on a big C++ project. It is building using single Ant script which makes possible to compile the same source targeting more than one platform and compiler. But, I have to work only for Windows platform and Visual Studio 2005 C++ compiler. It would be really nice if I could write code and compile in Visual...
[ 0.23673485219478607, 0.22412556409835815, -0.386181116104126, -0.1369229257106781, -0.4925132691860199, 0.18274708092212677, 0.19490081071853638, 0.0817592442035675, -0.3204534649848938, -0.8011274933815002, 0.4571492373943329, 0.6033061146736145, -0.2141125351190567, 0.020771650597453117,...
there any way to convert Ant script to Nant? Is any other approach to the problem at all, or I must create Visual Studio solution and projects manually? I would try to avoid such solution because I have a bunch of tests that I don't know how to use in that case. To my knowledge, there is no *automatic* way of converti...
[ 0.306448757648468, 0.0814608559012413, -0.3243095278739929, 0.06811251491308212, -0.4715679883956909, 0.26115819811820984, 0.2118513435125351, 0.2551712691783905, -0.15563169121742249, -0.7979835271835327, 0.1855754256248474, 0.6434038877487183, -0.4187358021736145, 0.04260946437716484, ...
on the Ant scripts to convert to NAnt as both are XML. If one were to go down this path the conversion should be done *dynamically* based of the original Ant scripts, so that only one set of scripts would have to be maintained. If you would like to write and compile your C++ code inside of Visual Studio it's tough to...
[ 0.5188100934028625, -0.059955235570669174, -0.31618326902389526, 0.033127561211586, -0.5502679944038391, -0.0026445589028298855, 0.24678702652454376, 0.05861208587884903, -0.12017790228128433, -0.9093847274780273, 0.27510204911231995, 0.574887216091156, -0.2600652575492859, -0.195513874292...
call out through a [custom build step](http://msdn.microsoft.com/en-us/library/e85wte0k(VS.80).aspx) to run them.
[ 0.41407760977745056, -0.06560022383928299, 0.07974518090486526, 0.06421460956335068, 0.362691193819046, 0.12192452698945999, 0.33222371339797974, -0.13424238562583923, -0.07678587734699249, -0.4208495616912842, -0.5079637765884399, 0.41659966111183167, -0.14852525293827057, -0.062118683010...
I've got this date time string: ``` post["date"] = "2007-07-18 10:03:19" ``` I'd like to extract just "2007-07-18" as a date. I've seen some reference to `strptime` but I'm not sure how to use it. How can I extract the date from this string? The other two answers are fine, but if you actually want the date for somet...
[ 0.2704180181026459, -0.03911283239722252, 0.8161627650260925, 0.0596911795437336, 0.05858524516224861, -0.029110101982951164, 0.025065381079912186, 0.1978624165058136, -0.039248570799827576, -0.42502662539482117, -0.18634264171123505, 0.625276505947113, -0.019366001710295677, 0.21616654098...
**PHP has a [var\_dump()](http://php.net/var_dump) function which outputs the internal contents of an object, showing an object's type and content.** For example: ``` class Person { private $firstName; private $lastName; public function __construct($firstName, $lastName) { $this->firstName = $firstName; ...
[ -0.29194557666778564, -0.06378550082445145, 0.02319498360157013, -0.26979079842567444, -0.1640544980764389, 0.17261163890361786, 0.22405202686786652, -0.2270747423171997, -0.20653606951236725, -0.574135959148407, -0.18009337782859802, 0.41123971343040466, -0.07677033543586731, 0.0419514141...