text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have a directory full of files, some which have an ampersand in their names. I would like to rename all the files with ampersands and replace each ampersand with a plus (+). I am working with around 10k files. What would be the best method to do this? ``` import glob, os for filename in glob.glob(os.path.join(yourPat...
[ 0.17553472518920898, 0.017870638519525528, 0.8446927666664124, -0.03808584436774254, 0.2415728121995926, 0.36123305559158325, 0.03144289553165436, -0.15187710523605347, -0.18884916603565216, -0.850394070148468, 0.07391020655632019, 0.7454254627227783, -0.33083203434944153, 0.18760721385478...
After reading through many of the questions here about DB schema migration and versions, I've come up with a scheme to safely update DB schema during our update process. The basic idea is that during an update, we export the database to file, drop and re-create all tables, and then re-import everything. Nothing too fan...
[ 0.42109987139701843, 0.23216308653354645, 0.2897443175315857, 0.007385521661490202, -0.000328449415974319, -0.24708451330661774, 0.3533569574356079, -0.005125499330461025, -0.44297218322753906, -0.5309122204780579, 0.08075152337551117, 0.370889812707901, -0.6247317790985107, 0.135435268282...
that many of the removed items have actually been refactored, and the presence of the old ones in the code fools other programmers into thinking that they can use them. So, I would like to find a way to be able to mark columns or tables as deprecated. In the ideal case, the deprecated objects would be marked while upd...
[ 0.08929454535245895, 0.46967172622680664, 0.22714021801948547, 0.03770776465535164, 0.1542813926935196, -0.3077431619167328, 0.39798691868782043, 0.2776418626308441, -0.24185267090797424, -0.5502829551696777, -0.26878687739372253, 0.26312002539634705, -0.2576974928379059, 0.269721925258636...
other DB platforms too, but this is the one we are using) supports the COLUMN attribute to both fields and tables. This would be perfect, except that I can't figure out how to actually use it in a meaningful manner. How would I go about writing an SQL query to get all column names which do *not* contain a comment match...
[ 0.1591227799654007, 0.027298806235194206, 0.2897397577762604, 0.14081038534641266, -0.48282334208488464, -0.220466747879982, 0.22330091893672943, -0.14679767191410065, 0.015222341753542423, -0.34931203722953796, 0.3052741289138794, 0.5152872800827026, -0.47800523042678833, 0.19510129094123...
columns.
[ -0.3922785520553589, 0.38695594668388367, 0.15119986236095428, -0.10373260825872421, -0.17275449633598328, 0.4232337176799774, -0.10530689358711243, -0.043587811291217804, -0.30826571583747864, -0.6359379887580872, -0.3872701823711395, 0.15943880379199982, -0.2092570662498474, -0.120070859...
I have a class that acts like this at the moment: ``` public class MyClass { public void Method1(){ if (false) { Method2(); } } public void Method2(){ //do something here } } ``` So Method2 is never called (my code looks a bit different but I have this if-clause ...
[ 0.23014657199382782, -0.12902408838272095, 0.196245938539505, -0.07183331251144409, 0.045295022428035736, -0.3739182651042938, 0.5086928606033325, -0.09200768172740936, -0.1878119707107544, -0.399411141872406, 0.010409661568701267, 0.5173981785774231, -0.3854142427444458, 0.180617555975914...
it by debugging to be sure). I want to tell RhinoMocks that I expect Method2 to be called and the test to fail: ``` MockRepository mock = new MockRepository(); MyClass presenter = mock.PartialMock<MyClass>(); Expect.Call(() => presenter.Method2()).IgnoreArguments(); mock.ReplayAll(); presenter.Method1(); mock.Verify...
[ 0.09879326075315475, 0.2325805127620697, 0.35562974214553833, -0.19099128246307373, -0.4316844642162323, 0.15515749156475067, 0.6704986095428467, -0.23989665508270264, -0.06737185269594193, -0.46189525723457336, 0.1010349690914154, 0.6136268973350525, -0.03782914951443672, -0.0712972208857...
I'm testing. I just mock out dependencies, and express those through interfaces instead of concrete classes, avoiding this problem to start with.
[ 0.660780668258667, 0.4691539704799652, -0.12700428068637848, -0.038036856800317764, -0.10794724524021149, 0.2122974991798401, 0.292940229177475, 0.15782380104064941, 0.2911152243614197, -0.7339216470718384, 0.28666284680366516, 0.3684999346733093, -0.07628937810659409, -0.01289151422679424...
I am trying to use myclass.cs from aspx.vb but receive error "myclass not declared" when I give command: Imports myclass any ideas how to make a reference? You cannot mix C# and VB.NET code files in the same project. You need to add a new C# class library project containing myclass.cs and then add a reference to this...
[ 0.8105156421661377, 0.2534506618976593, 0.11076164245605469, 0.11398482322692871, -0.1600686013698578, 0.0020683675538748503, 0.3113425672054291, 0.14961782097816467, -0.14793436229228973, -0.9491307139396667, 0.23760278522968292, 0.4592021107673645, -0.47985026240348816, 0.318753153085708...
I have two schemas: A and B (Oracle 9). At the A there is a dblink to B. At the B there is a package, that i calls from A. Procedures in B package can returns varying count results and i think that returning a collection is a better way for this reason. ``` create type B.tr_rad as object ( name varchar2(64) ,co...
[ 0.14048810303211212, 0.32584822177886963, 0.057725176215171814, -0.22639767825603485, -0.25721222162246704, 0.363115519285202, 0.2467038333415985, -0.5981571674346924, 0.04602694883942604, -0.14859943091869354, 0.1524871587753296, 0.5637272596359253, -0.43818286061286926, 0.204130724072456...
use tt\_rad type because using SQL-types by dblink is not supported. DBMS\_SQL is not supported cursors. Create types with same OID is impossible. I think to use temporary tables. But firstly it is not that good (after the remote function returns the value, calling side must select collection from remote table). And t...
[ 0.4849250912666321, 0.06888669729232788, 0.21828222274780273, 0.07716011255979538, -0.4162371754646301, -0.1506814956665039, 0.28134414553642273, -0.2146948277950287, -0.09024659544229507, -0.5138542056083679, 0.20616726577281952, 0.9151428937911987, -0.5337151288986206, 0.1383016258478164...
as well). If you can get the OID solution working then good luck to you. The solution I resorted to was to use a Java Stored procedure, instead of the DB Link. Characteristics of the Java Stored Procedure: 1. Can return a "rich set of types", just about all of the complex types (UDT's, tables/arrays/varrays) see [...
[ -0.014813781715929508, -0.05588909983634949, 0.17381004989147186, -0.006276548374444246, -0.1543409824371338, -0.21522550284862518, 0.3751414120197296, -0.17101532220840454, -0.24676714837551117, -0.6272391080856323, 0.01268747542053461, 0.555796205997467, -0.3782508671283722, -0.115338116...
issues). 3. Stored Java calls the PL/SQL proc on the remote DB, and the java JDBC layer does the marshaling from the remote DB. 4. Stored Java packages up the result and returns the results to the SQL or PL/SQL layer. It's a bit of work, but if you have a bit of java, you should be able to "cut and paste" a solution t...
[ 0.1506529301404953, 0.2942330539226532, 0.3820227384567261, -0.12129827588796616, -0.07127776741981506, -0.07234544306993484, 0.08819802850484848, -0.3971973657608032, -0.0996701642870903, -0.3654307723045349, -0.21515797078609467, 0.6091506481170654, -0.26575177907943726, -0.1450362354516...
I'm compiling and linking a cpp file against a pre-compiled library, and I'm getting an "undefined reference" error. Firstly, this is the command (the library in question is quicknet3, the program I'm compiling is trapper): `g++ -w -g -I. -g -O3 -pipe -Wall -I/home/install/x86_64/include/quicknet3 -L/home/install/x86...
[ 0.04321875050663948, 0.22653435170650482, 0.5091524720191956, -0.016315804794430733, 0.1627492755651474, 0.11331682652235031, 0.06218953803181648, -0.4286994934082031, -0.27899491786956787, -0.32303985953330994, -0.15455137193202972, 0.31121161580085754, -0.690254271030426, -0.074561543762...
file (QN\_Pfile.h), as follows: `class QN_InFtrLabStream_PFile : public QN_InFtrLabStream { public: QN_InFtrLabStream_PFile(int a_debug, const char* a_dbgname, FILE* a_file, int a_indexed); (... other declarations ...) }` The definition of the constructor is indeed given in QN\_Pfile.cc: `QN_InFtrLabSt...
[ 0.025630813091993332, 0.16747449338436127, 0.43444013595581055, -0.09989341348409653, 0.16471223533153534, 0.04125598818063736, 0.24302272498607635, -0.12773282825946808, -0.19597218930721283, -0.6798208355903625, -0.18084633350372314, 0.4612849950790405, -0.5259472727775574, 0.08339861035...
workaround is to add /home/install/x86\_64/lib/libquicknet3.a to g++ commandline. I you want to investigate further, if g++ is picking another copy of libquicknet3, you can pass -v to g++ so it will output its searching paths.
[ 0.20498564839363098, -0.06104413419961929, 0.44101738929748535, -0.13863298296928406, 0.19326505064964294, -0.24840441346168518, 0.24661625921726227, -0.16829003393650055, -0.07321860641241074, -0.7804900407791138, -0.3061513900756836, 0.657836377620697, -0.4119938015937805, 0.052634809166...
I'm sorting strings that are comprised of text and numbers. I want the sort to sort the number parts as numbers, not alphanumeric. For example I want: abc1def, ..., abc9def, abc10def instead of: abc10def, abc1def, ..., abc9def Does anyone know an algorithm for this (in particular in c++) Thanks I asked [this exac...
[ 0.008713587187230587, 0.14518974721431732, 0.15291784703731537, -0.22992724180221558, -0.20057052373886108, 0.11896242946386337, -0.0049329111352562904, -0.10282112658023834, -0.28536003828048706, -0.5045599341392517, -0.09055466204881668, -0.09713024646043777, -0.43800410628318787, -0.029...
I'm running a SQL SELECT query through an ADO connection to an Excel 2007 workbook with the following code (using a custom version of VBScript) ``` dim ado, rs set ado = CreateObject("ADODB.Connection") ado.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=workbook.xlsx;Extended Properties=""Excel 12.0...
[ -0.007000689394772053, 0.19514915347099304, 0.5157403349876404, -0.27442672848701477, -0.18488095700740814, 0.08835460990667343, 0.25726747512817383, -0.2807363271713257, -0.07883560657501221, -0.6321631669998169, 0.04892995208501816, 0.19995413720607758, -0.42453303933143616, 0.1465689539...
causes an error when executed. Any help would be greatly appreciated. I think you're running into a variant of a long-standing limitation in Excel's data access provider. See <http://support.microsoft.com/default.aspx?scid=kb;EN-US;189897> for an example or google for thousands more.
[ 0.13334685564041138, 0.10444002598524094, 0.00023821632203180343, 0.24698035418987274, 0.24388694763183594, -0.1855207085609436, 0.22962559759616852, 0.4002859890460968, -0.17161697149276733, -0.5713312029838562, -0.11658532917499542, 0.2263936549425125, -0.22316217422485352, 0.02836133167...
The algorithm I'm using at the moment runs into extremely high numbers very quickly. A step in the algorithm I'm to raises **x** to the result of the totient function applied to **y**. The result is that you can run into very large numbers. Eg. When calculating the [multiplicative order](http://en.wikipedia.org/wiki/M...
[ -0.2462618350982666, 0.291550874710083, 0.36451321840286255, -0.20561443269252777, -0.05790482088923454, 0.21305426955223083, 0.26644885540008545, -0.6441067457199097, -0.5170483589172363, -0.6432419419288635, -0.23432019352912903, 0.5310275554656982, -0.06721208244562149, 0.06659705936908...
if mOrder >= i mOrder = 0; break else mOrder = mOrder + 1 ``` Using Modular exponentiation, it is possible to calculate (10 ^ mOrder % 53) or in general, any (a ^ b mod c) without getting values much bigger than c. See [Wikipedia](http://en.wikipedia.org/wiki/Modular_exponentiation)...
[ -0.05284399166703224, -0.05960652232170105, 0.24998879432678223, -0.4647485613822937, 0.011521879583597183, 0.22493651509284973, 0.04371682554483414, -0.5303131341934204, -0.6042143702507019, -0.3214032053947449, -0.575035810470581, 0.49506181478500366, -0.0028884122148156166, 0.0288543216...
while (exponent > 0) { if ((exponent & 1) == 1) { // multiply in this bit's contribution while using modulus to keep result small result = (result * base) % modulus; } // move to the next bit of the exponent, square (and mod) the base accordingly
[ -0.006469040643423796, -0.3363431990146637, 0.44006192684173584, -0.2308182418346405, 0.01380695216357708, 0.24687105417251587, -0.021449262276291847, -0.6783300638198853, -0.08945471793413162, -0.22204343974590302, -0.2234305888414383, 0.4569639265537262, -0.058267030864953995, 0.05458731...
exponent >>= 1; base = (base * base) % modulus; } return result; } ```
[ -0.008234268985688686, -0.17571288347244263, 0.29102352261543274, -0.20188744366168976, 0.043606847524642944, -0.012813333421945572, 0.1420716494321823, -0.4034040868282318, -0.07365165650844574, -0.1561269462108612, -0.5329756736755371, 0.7541265487670898, -0.1950666308403015, 0.311048120...
I need to setup an Apache 2 server with SSL. I have my \*.key file, but all the documentation I've found online, \*.crt files are specified, and my CA only provided me with a \*.cer file. Are \*.cer files the same as \*.crt? If not, how can I convert CER to CRT format? File extensions for cryptographic certificates a...
[ 0.37210193276405334, 0.32324886322021484, 0.46376556158065796, -0.08663568645715714, -0.11941946297883987, -0.3486151397228241, 0.2349366545677185, 0.005420060362666845, -0.23743265867233276, -0.6446347832679749, -0.17814412713050842, 0.3474002480506897, -0.1462523639202118, 0.531537830829...
the sense that Windows has some inherent different meaning for what happens when you double click each type of file. But the way that Windows handles them when you double-click them is about the only difference between the two. Both extensions just represent that it contains a public certificate. You can rename a cer...
[ 0.5807274580001831, 0.2085035890340805, 0.2801779508590698, 0.07073020935058594, 0.24433749914169312, -0.2886815667152405, 0.03482571989297867, 0.1914019137620926, -0.542687177658081, -0.5442922115325928, -0.27842190861701965, 0.2876681983470917, -0.18241873383522034, 0.5617945790290833, ...
them as long as the contents of the file are correct. Making things more confusing is that there are two standard ways of storing certificate data in a file: One is a "binary" X.509 encoding, and the other is a "text" base64 encoding that usually starts with "`-----BEGIN CERTIFICATE-----`". These encode the same data ...
[ 0.28380286693573, 0.4736028015613556, 0.4363027513027191, 0.24688656628131866, 0.20966701209545135, -0.317476361989975, -0.045248642563819885, -0.09943808615207672, -0.12353844940662384, -0.6228009462356567, -0.4587423801422119, 0.2577802240848541, -0.06678304076194763, 0.37322938442230225...
I have this SQL: ``` SELECT * FROM Requisicao r join convenio c on c.idconvenio = r.idconvenio join empresa e on e.idempresa = c.idempresa ``` When I execute it I get this plan of execution: ``` PLAN JOIN (C NATURAL,E INDEX (INTEG_160),R INDEX (INTEG_318)) ``` What means that Convenio's index was not used...
[ -0.016983212903141975, 0.16360445320606232, 0.7575571537017822, 0.007512036710977554, 0.11514900624752045, -0.12878040969371796, -0.12199626863002777, -0.3356993496417999, -0.19645525515079498, -0.5548846125602722, 0.027018195018172264, 0.5401571989059448, -0.46184954047203064, 0.068837821...
one. Taking into consideration index's selectivity served decided that it would be better to read from c and to join records from e and r.
[ 0.1419658362865448, -0.07075623422861099, -0.30167683959007263, 0.23945771157741547, -0.12641774117946625, -0.04823293164372444, -0.19777671992778778, -0.515867292881012, 0.08558865636587143, -0.5178500413894653, 0.024223530665040016, 0.4765484035015106, -0.24792955815792084, -0.0721193403...
I have a textarea html element on my page that gets reloaded via ajax. The whole textarea is returned each time not just its content, and the content grows over time. Along with the textarea i return the following piece of javascript: ``` <script type="text/javascript" > var textArea = document.getElementById('outpu...
[ 0.13992279767990112, 0.12745459377765656, 1.0256842374801636, -0.4345736503601074, -0.2729439437389374, 0.12822715938091278, 0.19768713414669037, -0.48391106724739075, 0.19581614434719086, -0.8141492009162903, -0.23588432371616364, 0.5941942930221558, -0.20451916754245758, -0.1935130655765...
scroll bar no longer moves down. It seems as if IE is remembering the original scroll height of the element, not the new height. I am using the xhtml transitional doctype if that helps. Also if this can be achieved with jQuery that would be fine as I have access to that. Thanks in advance Neil As a quick hack you c...
[ 0.15211844444274902, 0.014705686829984188, 1.053923487663269, -0.38320809602737427, -0.028869232162833214, -0.1860792636871338, 0.34217092394828796, -0.42408624291419983, 0.07708079367876053, -0.7811272740364075, -0.1289118379354477, 0.9323065876960754, -0.1638815551996231, -0.009091701358...
I'm using a threadpool to do some heavy processing and also bits of sql. Currently I open sql connections when I need them, run a query and then close them. This works fine. The application has been running with no issues. As more work is being done by this application it's using more threads. More threads mean more op...
[ 0.22725719213485718, 0.37598446011543274, 0.35442915558815, -0.1785113364458084, -0.12917226552963257, -0.10647747665643692, 0.5460551977157593, 0.036360882222652435, -0.5440704226493835, -0.5873962044715881, 0.2609478533267975, 0.5029792189598083, -0.05448964238166809, 0.40692639350891113...
that each thread has it's own connection and then this connection is passed around the thread. So my question is: If a SQL connection object is created locally in a thread and is then passed by ref to a static function of another class would this be unsafe? ``` void ThreadA() { SqlConnection a = new SqlConnectio...
[ 0.26097628474235535, -0.12465348094701767, 0.5159493088722229, -0.15642838180065155, 0.14689353108406067, 0.04271496459841728, 0.02895374223589897, -0.030656086280941963, -0.23415596783161163, -0.24108824133872986, 0.01542717032134533, 0.5013699531555176, -0.5653349161148071, 0.51034289598...
the same static function at the same time, each passing their own connection object. Previously the static functions opened their own connections and closed them when they were done. If it is unsafe whats the best method to work round this. I need to try and minimize open/close of Sql connections. Thanks Gareth A p...
[ 0.1304086446762085, -0.019377032294869423, 0.18740975856781006, 0.3533581495285034, -0.2623032331466675, -0.018983270972967148, 0.3754037916660309, 0.005942866671830416, -0.473078191280365, -0.3908770680427551, 0.0723038837313652, 0.42267248034477234, -0.4713986814022064, 0.334932446479797...
Platform - ARM9 I have a third party device connected via I2C to the ARM9. My problem is the I2C read/write is getting in a twist. It appears the IRQ line is asserted but never de-asserted when there is data to read. The read fails as the third-party device NACKs the address packet. So any subsequent write fails. I a...
[ -0.2201453149318695, -0.15610696375370026, 0.4219978153705597, 0.19942231476306915, -0.16008682548999786, 0.12473143637180328, 0.2050071358680725, 0.022630928084254265, -0.4682908356189728, -0.728402853012085, 0.17153522372245789, 0.45925113558769226, -0.012314214371144772, -0.006982696242...
the signal posted above, I attempt to read data from the I2C bus but this fails. Finally, I always reregister the ISR after ever read attempt. There is no interrupt disabling/enabling that takes place during handling of the read signal. My question is do I need to disable interrupts when reading/writing to the I2C bus...
[ 0.0799766480922699, 0.20182111859321594, 0.28134843707084656, 0.2938615083694458, -0.012290623970329762, -0.3563303053379059, 0.46374523639678955, 0.09653513133525848, -0.026244360953569412, -0.585232675075531, -0.372210830450058, 0.8206016421318054, -0.1409309208393097, -0.179079532623291...
and re-enabling when leaving. If you want to allow other higher-priority interrupts to occur while you are serving the I2C interrupt, then disable only the I2C interrupt. It is rather unusual to unregister an interrupt handler when entering an ISR. This may lead to unexpected behaviour, when there is no registered han...
[ 0.18521517515182495, -0.06192487105727196, 0.12783828377723694, 0.07044660300016403, 0.012226337566971779, -0.4042113125324249, 0.4357540011405945, -0.20494498312473297, -0.2586914598941803, -0.6256961226463318, -0.4095805287361145, 0.4904632866382599, -0.4190760552883148, 0.33276405930519...
be to try to communicate with the device without interrupts. Try to read/write from it in a serial fashion, doesn't matter if everything blocks - it is just testing. This is much easier to debug and after you are successful you can move to the interrupts version.
[ 0.40126338601112366, -0.11811325699090958, 0.0555877722799778, 0.010429955087602139, -0.0508190393447876, -0.04370574280619621, 0.2143702507019043, 0.05899665132164955, 0.13596108555793762, -0.5378179550170898, 0.03766419366002083, 0.6367663741111755, -0.6496978402137756, 0.162213072180747...
I have a PHP variable that contains a string which represents an XML structure. This string contains ilegal characters that dont let me build a new SimpleXMLElement object from the string. I dont have a way to ask the source of the content to modify their response, so I need to execute some cleaning on this string befo...
[ 0.08498738706111908, 0.3178820013999939, 0.4168804883956909, 0.060715049505233765, -0.3091040551662445, 0.13013510406017303, 0.4660401940345764, -0.18448597192764282, 0.06918823719024658, -0.3479542136192322, 0.26401615142822266, 0.37711310386657715, -0.2865797281265259, 0.2515517771244049...
characters that could break the SimpleXMLElement object. ``` $text = str_replace("\0", "", $text); ``` will replace all null characters in the `$text` string. You can also supply arrays for the first two arguments, if you want to do multiple replacements.
[ -0.11033370345830917, 0.14771537482738495, 0.3599208891391754, -0.24270640313625336, -0.06130228191614151, 0.3494546711444855, 0.3437268137931824, -0.10601937025785446, -0.013657470233738422, -0.38225311040878296, -0.29201218485832214, 0.6351909637451172, -0.5434707403182983, -0.1753473430...
I normally organize my project in multiple files. Now, for the first time I have created a project at code.google.com/hosting. How to add files to the project? The project has got directory structure and many files. I want them to be visible under **trunk** (like it is in other projects). NOTE: I am novice in this a...
[ 0.4291609823703766, 0.05235778167843819, 0.10900701582431793, -0.024604100733995438, -0.38259145617485046, -0.3232131004333496, 0.37817567586898804, 0.26543477177619934, -0.3281782567501068, -0.8486844301223755, -0.09726710617542267, 0.45488297939300537, -0.24646838009357452, 0.33866298198...
you can upload all your project files. * [Getting Started](http://code.google.com/p/support/wiki/GettingStarted) * [Project Hosting FAQ](http://code.google.com/p/support/wiki/FAQ) * [Google Code blog](http://google-opensource.blogspot.com/search/label/project%20hosting)
[ 0.561816394329071, -0.12796969711780548, 0.42860206961631775, 0.28110235929489136, -0.08797557651996613, -0.3440554141998291, 0.06903102248907089, 0.008605822920799255, -0.4638029932975769, -0.43560341000556946, -0.4484468400478363, 0.07176272571086884, 0.12086183577775955, 0.1760056614875...
I've been dabbling in WPF for a couple of months now and I've managed to grasp most of what's about and why/when it's used but I'm still struggling to see the value of the PageFunction class. Can someone give me a simple, but concrete example of when a PageFunction might be the correct tool for the job? Mainly, it see...
[ 0.47856536507606506, -0.30110570788383484, 0.12614969909191132, 0.33229953050613403, -0.07192298769950867, -0.2597557604312897, 0.1835762858390808, 0.005641388241201639, -0.2879510223865509, -0.6091808676719666, 0.2549109160900116, 0.3731643259525299, -0.04035094007849693, -0.1421308517456...
delegating information collection to another component. Moreover, there is kind of a strategy pattern applied, since you could have various subsystems able to collect the same information, all of them inheriting the PageFunction(of T), so that the code actually calling those does not need to know any detail about it. ...
[ 0.3587981164455414, -0.29978084564208984, -0.009724832139909267, 0.5050166249275208, -0.07098140567541122, -0.08009383827447891, -0.260968416929245, 0.007935517467558384, -0.16290879249572754, -0.5520604252815247, 0.06726709008216858, 0.41903412342071533, -0.31719517707824707, 0.0650245398...
I wish to initialize an array of java methods in the child class, **as a class field** like so ``` void callme() {System.out.println("hi!");} Method[] actions = new Method[] {&callme,&callme}; ``` and call all methods in this array at parent class like so: ``` for (meth:actions) {meth.invoke();} ``` However curre...
[ -0.08666330575942993, 0.12758038938045502, 0.18405188620090485, -0.41326603293418884, -0.017529277130961418, 0.002128991996869445, 0.4615423083305359, -0.5449004173278809, -0.10087699443101883, -0.547469973564148, -0.1383235901594162, 0.4019193947315216, -0.3704999089241028, 0.097289681434...
is probably an obvious question, still I found no answer to that at google, any help would be appreciated. Thanks P.S. As Scott below guessed, I "want a superclass to call a specific set of methods defined in a subclass". Create a static method in your class which will return an array of declared methods and do the ...
[ 0.1698523759841919, -0.24740996956825256, 0.2477068305015564, 0.1579812616109848, 0.1892707347869873, -0.15872834622859955, 0.4618324637413025, -0.1750824749469757, -0.12982884049415588, -0.5480773448944092, -0.22050249576568604, 0.41681206226348877, -0.2766527235507965, 0.1435592621564865...
// Respond to the error } return result; } Method[] actions = declaredMethods("count"); ```
[ 0.24564293026924133, -0.1732785552740097, -0.09548187255859375, -0.12603086233139038, 0.047929614782333374, 0.020583711564540863, 0.5210631489753723, -0.6861283183097839, -0.2728992998600006, -0.1802016645669937, -0.16689203679561615, 0.5647968649864197, -0.34864142537117004, 0.00557194044...
I've got a bunch of DLL projects that I'm pulling into my application, each contains their own Settings.settings/app.config. When I compile the app and run for debugging, everything works just fine, but come deployment time I can't get my DLLs to read their own settings files. I've been doing some reading and it has b...
[ 0.3740955591201782, 0.16583696007728577, 0.45499899983406067, 0.07651225477457047, 0.039853040128946304, 0.13791170716285706, 0.049951937049627304, 0.050638943910598755, -0.15653115510940552, -0.9578331112861633, -0.09160585701465607, 0.6545674204826355, -0.413893461227417, -0.087033644318...
I wondered if anyone has any good docs on this - there appears to be a shortage on the Net. I'd like a separate .dll.config for each of the libraries if possible, but in a pinch, getting each of my libraries to read their own section of the process.exe.config will do. Can anyone point me in the right direction becaus...
[ 0.3513467609882355, 0.11098212748765945, 0.28451070189476013, 0.2268904149532318, 0.05673940107226372, 0.005683188326656818, 0.5731034278869629, 0.11047367751598358, -0.4025889039039612, -0.8957781791687012, -0.10075804591178894, 0.33703330159187317, 0.07954437285661697, 0.1002456843852996...
retarded, but does someone have a working example of a merged config file and some basic demonstrative code for reading it from multiple assemblies? What are the "significant issues" you encountered? I started with embedding the dll's config in the exe's config, which worked, but was cumbersome. I now have all the conf...
[ 0.4552553594112396, 0.0876898542046547, 0.1686130315065384, 0.15797488391399384, -0.04183041676878929, 0.0917435735464096, 0.3331535756587982, -0.12538763880729675, -0.3571515381336212, -0.5369170904159546, -0.12984751164913177, 0.4943677484989166, -0.6848820447921753, 0.27710774540901184,...
<configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="SharedConfig.Client.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Vers...
[ -0.2579581141471863, 0.15446193516254425, 0.5748435258865356, 0.14879585802555084, 0.20499490201473236, 0.17322854697704315, 0.18839731812477112, -0.32374900579452515, -0.427844375371933, -0.3981475234031677, -0.24887998402118683, 0.3330243229866028, 0.003906886093318462, 0.307554721832275...
<setting name="Bar" serializeAs="String"> <value>BarFromClient</value> </setting> </SharedConfig.Client.Properties.Settings> <!-- Begin copy from library app.config --> <SharedConfig.Library.Properties.Settings> <setting name="Bar" serializeAs="String"> <value>BarFr...
[ -0.10487616807222366, 0.35481712222099304, 0.9115816354751587, -0.2744929790496826, 0.016746684908866882, 0.1996423304080963, -0.013493495993316174, -0.40382930636405945, -0.2352520078420639, -0.7213080525398254, -0.45585623383522034, 0.4714057445526123, -0.340432733297348, 0.3145274817943...
I am trying to create an object that is capable of handling query-like conditional statements. This is so I can 'join' two conditions together to create a dependency between them based on the type of 'join' being used. I currently have a simple object that contains the following methods: ``` public function addConditi...
[ 0.2368524968624115, 0.20977742969989777, 0.4014318287372589, -0.2557550370693207, 0.1715008169412613, 0.012308538891375065, 0.4436297118663788, -0.3793574273586273, 0.059661101549863815, -0.5464800000190735, -0.12421450763940811, 0.4909140467643738, -0.3735637366771698, 0.3382965624332428,...
} } ``` The problem is, I need to be able to perform a conditional join between two statements, that will affect the return value of the the validate method. The idea is that you could supply a condition as follows: ``` $this->addCondition($condition_1); $this->addCondition($condition_2, 'AND'); $this->addCondition(...
[ 0.05016739293932915, 0.15405185520648956, 0.29436177015304565, -0.3955727517604828, 0.0504843108355999, 0.1220560222864151, 0.19826841354370117, -0.28784874081611633, 0.10455773025751114, -0.43592584133148193, -0.26558396220207214, 0.6292480230331421, -0.3492240309715271, 0.090834818780422...
delicious apple, the result of validate() would be false. The method should fail because the 'join' for condition\_3 is NOT. However, at present there is no way of telling the code that the result of the entire method depends on the result of the previous condition and the way it is joined to it. Any help is greatly ...
[ -0.11836029589176178, 0.057537201792001724, 0.06927365809679031, 0.014605865813791752, 0.264991819858551, 0.49833616614341736, 0.24410705268383026, 0.3425960838794708, -0.33228328824043274, -0.5583934783935547, 0.06288767606019974, 0.5682768821716309, -0.15331490337848663, -0.1289141774177...
true. Create a Condition\_Not class if you feel it is necessary (Apple is NOT Golden Delicious). Stringing these together should get you any query you're looking for. Since they're all subclasses of the same type, you can build them up putting NOTs inside of ORs inside of ANDs inside of ORs and so on.
[ 0.35082393884658813, -0.12887242436408997, -0.2964533865451813, 0.09703230112791061, 0.21968220174312592, 0.10110427439212799, 0.362292617559433, 0.3476954996585846, 0.11608089506626129, -0.8479411005973816, -0.19920234382152557, 0.31144699454307556, -0.3023254871368408, -0.005968883633613...
Is it possible to use a combination of authentication systems in a web app? I want to use OpenId, however I think my potential customers are actually more likely to have a Facebook ID. Therefore I wonder if it is possible to offer both types of authentication? For nearly every language there should be a Framework! Yo...
[ -0.011686357669532299, 0.020426195114850998, 0.10752028226852417, 0.11686831712722778, -0.05764094367623329, -0.17318452894687653, 0.4413653016090393, -0.350296288728714, -0.1799878627061844, -0.7756603956222534, -0.1991279125213623, 0.43677929043769836, -0.35085368156433105, -0.2754697799...
validator for yor own userdb!
[ 0.22432832419872284, 0.30059415102005005, 0.28999215364456177, 0.06367073208093643, -0.37258222699165344, -0.3235642910003662, 0.41450124979019165, -0.21685431897640228, 0.05623939633369446, 0.04169275611639023, -0.0200115367770195, 0.46065640449523926, -0.0220133438706398, -0.048286221921...
I have an address class that uses a regular expression to parse the house number, street name, and street type from the first line of an address. This code is generally working well, but I'm posting here to share with the community and to see if anyone has suggestions for improvement. Note: The STREETTYPES and QUADRAN...
[ 0.21651282906532288, 0.40915387868881226, 0.4262556731700897, 0.09036034345626831, -0.042191289365291595, 0.17521417140960693, 0.1647188663482666, -0.28033438324928284, 0.1018255203962326, -0.920261800289154, -0.2665116488933563, 0.24985623359680176, -0.17450042068958282, 0.395344495773315...
{ HouseNumber = string.Empty; Quadrant = string.Empty; StreetName = string.Empty; StreetType = string.Empty; if (!String.IsNullOrEmpty(line1)) { string noPeriodsLine1 = String.Copy(line1); noPeriodsLine1 = noPeriodsLine1.Replace(".", ""); ...
[ 0.5759868025779724, 0.09269360452890396, 0.6822130680084229, -0.4129794239997864, 0.27158650755882263, 0.38658788800239563, 0.5210342407226562, -0.7656165361404419, 0.009915641508996487, -0.3778018355369568, -0.2801332473754883, 0.5294310450553894, -0.40447989106178284, 0.5263685584068298,...
addressParseRegEx = @"(?ix) ^ \s* (?: (?<housenumber>\d+) (?:(?:\s+|-)(?<quadrant>" +
[ -0.4745980203151703, 0.187714621424675, 0.4699796736240387, -0.015893036499619484, -0.025263765826821327, 0.3482607305049896, 0.38451719284057617, -0.26781031489372253, 0.26696375012397766, -0.7014632225036621, -0.11019960790872574, 0.006778632290661335, -0.5111948251724243, 0.309465616941...
QUADRANTS + @"))? (?:(?:\s+|-)(?<streetname>\S+(?:\s+\S+)*?))?? (?:(?:\s+|-)(?<quadrant>" + QUADRANTS + @"))? (?:(?:\s+|-)(?<streettype>" + STREETTYPES +
[ -0.14472301304340363, 0.09393633157014847, 0.45417192578315735, -0.08670506626367569, -0.06292992830276489, 0.44811075925827026, 0.2199375331401825, -0.5847808718681335, 0.2730611264705658, -0.6285623908042908, -0.3782050609588623, 0.3615812063217163, -0.4562186002731323, -0.05569729581475...
@"))? (?:(?:\s+|-)(?<streettypequalifier>(?!(?:" + QUADRANTS + @"))(?:\d+|\S+)))? (?:(?:\s+|-)(?<streettypequadrant>(" + QUADRANTS + @")))?? (?:(?:\s+|-)(?<suffix>(?:ste|suite|po\sbox|apt)\s*\S*))?
[ -0.07303916662931442, 0.05144728347659111, 0.7769999504089355, -0.003944418393075466, 0.14636766910552979, 0.31538307666778564, 0.22768250107765198, -0.7974236607551575, 0.11594370007514954, -0.7235538363456726, -0.49694162607192993, 0.40864914655685425, -0.3027782738208771, -0.22618202865...
| (?:(?:po|postoffice|post\s+office)\s+box\s+(?<postofficebox>\S+)) ) \s* $ "; Match match = Regex.Match(noPeriodsLine1, addressParseRegEx);
[ -0.23441296815872192, -0.005920616909861565, 0.7098069190979004, -0.19096757471561432, 0.45798617601394653, 0.1336539089679718, 0.29506829380989075, -0.23950769007205963, 0.30163365602493286, -0.4585276246070862, -0.41082215309143066, 0.13146932423114777, -0.5606505274772644, 0.33347100019...
if (match.Success) { HouseNumber = match.Groups["housenumber"].Value; Quadrant = (string.IsNullOrEmpty(match.Groups["quadrant"].Value)) ? match.Groups["streettypequadrant"].Value : match.Groups["quadrant"].Value; if (match.Groups["streetname"].Captures.Count >...
[ -0.035768765956163406, -0.041441891342401505, 0.36865949630737305, -0.2626595199108124, 0.2591003477573395, -0.12224361300468445, 0.4828696846961975, -0.8393983244895935, 0.22744016349315643, -0.47428110241889954, -0.5082232356071472, 0.43318110704421997, -0.3016752004623413, 0.10651547461...
foreach (Capture capture in match.Groups["streetname"].Captures) { StreetName += capture.Value + " "; }
[ -0.104401595890522, 0.08278347551822662, 0.14442585408687592, -0.43226706981658936, 0.23489747941493988, 0.20610302686691284, 0.1637975126504898, -0.7779346704483032, 0.10121194273233414, -0.5972917675971985, -0.34239882230758667, 0.3197799026966095, -0.5408076643943787, -0.046931065618991...
StreetName = StreetName.Trim(); } else { StreetName = (string.IsNullOrEmpty(match.Groups["streetname"].Value)) ? match.Groups["streettypequalifier"].Value : match.Groups["streetname"].Value; }
[ -0.05336847901344299, -0.19081908464431763, 0.12073732167482376, -0.32113057374954224, 0.26014575362205505, 0.08823894709348679, 0.17858822643756866, -0.47437959909439087, 0.12223467975854874, -0.8707829713821411, -0.26080918312072754, 0.57160484790802, -0.32215625047683716, -0.04415270686...
StreetType = match.Groups["streettype"].Value; //if the matched street type is found //use the abbreviated version...especially for credit bureau calls string streetTypeAbbreviation; if (StreetTypes.TryGetValue(StreetType.ToUpper(), out streetTypeAbbrevia...
[ 0.1853058785200119, 0.05521627143025398, 0.14763183891773224, -0.17284640669822693, 0.06642401218414307, 0.03854934126138687, 0.1823873221874237, -0.42825666069984436, 0.11468051373958588, -0.538997232913971, -0.3546878695487976, 0.42603203654289246, -0.37351909279823303, 0.051983077079057...
{ StreetType = streetTypeAbbreviation; } } } } ``` I don't know what country you're in, but if you're in the USA and want to spend some money on address validation, you can buy related USPS products [here](http://www.usps.com/ncsc/addressinfo/addressinfomenu...
[ 0.6463339328765869, 0.07335276901721954, 0.38198819756507874, 0.0523742251098156, 0.3450874388217926, -0.18204112350940704, 0.5964391231536865, 0.10789444297552109, -0.18653486669063568, -0.5646507740020752, -0.207491934299469, 0.051740050315856934, -0.3689437508583069, 0.10351970791816711...
And [here](http://www.usps.com/ncsc/lookups/usps_abbreviations.htm) is a good place to find free word lists from the USPS for expected words and abbreviations. I'm sure similar pages are available for other countries.
[ 0.5076390504837036, 0.36058682203292847, 0.26120543479919434, 0.3363761901855469, 0.09353180974721909, -0.4421902298927307, 0.18953318893909454, 0.42926135659217834, -0.4860825538635254, -0.4670238196849823, -0.08985681086778641, 0.025516128167510033, 0.20200428366661072, 0.002709046704694...
I've programmed in C# for the majority of my .NET career - now I'm working on a VB.net project - when debugging it drives me insane the differences of how the debugging works. two off the top of my head are 1) having to prefix my immediate window queries with ? 2) not being able to mouse over a GUID, I have to ?myGu...
[ 0.05915586277842522, 0.09040533751249313, 0.17115263640880585, -0.2365266978740692, -0.1728576272726059, 0.0038623567670583725, 0.2833405137062073, 0.005962295923382044, 0.09250714629888535, -0.6295956373214722, 0.11935929954051971, 0.710764467716217, -0.03947169706225395, -0.0261483229696...
the abscence of a ?, anything you will type will be evaluated as a statement. This makes a big difference in the following two lines ``` ? a = b a = b ``` The first one is a comparison operation and the second one is an assignment. As for the second issue. Yes, this is an unfortunate experience for the current ver...
[ 0.2710471451282501, -0.04235557094216347, 0.28323444724082947, 0.007058115676045418, -0.33632931113243103, -0.09166381508111954, 0.39641261100769043, -0.18702015280723572, -0.10417797416448593, -0.1938069760799408, 0.2347661852836609, 0.825276255607605, -0.5479385852813721, -0.001951314625...
for GUID that invokes .ToString on the object. I wrote up a blog post awhile back on how to achieve this <http://blogs.msdn.com/jaredpar/archive/2007/09/28/customzing-displays-in-the-debugger-for-system-types.aspx>
[ 0.2831328213214874, -0.1132882758975029, 0.5442104339599609, -0.12757834792137146, -0.2731608748435974, 0.2539893090724945, 0.16282477974891663, 0.11457233875989914, -0.6212424635887146, -0.6054289937019348, 0.1657440960407257, 0.9650188088417053, -0.43181779980659485, -0.08935379236936569...
I have a bit of code, which I can't figure out properly. The problem is that the program is multithreaded and within there is a bit of code that should be synchronized so I wrote this: ``` lock (lockObject) { if (!Monitor.TryEnter(lockObject)) Monitor.Wait(lockObject); //do stuff... Monitor.PulseAll(loc...
[ 0.5115179419517517, 0.06970660388469696, 0.32810115814208984, -0.1335357278585434, 0.3231656551361084, -0.03503130003809929, 0.48952051997184753, -0.16321733593940735, -0.3849194645881653, -0.4165354371070862, 0.22398287057876587, 0.3685357868671417, -0.5280442237854004, 0.2638727426528930...
point no thread is active but a whole lot of them is sleeping. I know the error mostly (in case of a developer - always) sits 0.5m in front of the monitor - but I cannot figure it out myself... maybe in a few minutes ;) can someone please explain that to me - thanks in advance. Is there a difference between `LockObjec...
[ 0.28293076157569885, -0.030898135155439377, 0.35766133666038513, -0.02336473949253559, 0.19652003049850464, -0.24505409598350525, 0.41914600133895874, 0.030278421938419342, -0.2109726369380951, -0.42165207862854004, 0.19135773181915283, 0.2476501613855362, -0.08145944774150848, 0.327133595...
to do? Without more context, it isn't entirely clear what the `PulseAll` and `Wait` are designed to do; for example, [here](https://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net/530228#530228) they are used to block the queue when it is too full (`Wait`), or release it when space becomes availab...
[ 0.4843577444553375, -0.3700227439403534, 0.2414453625679016, -0.17150361835956573, 0.2980395555496216, -0.1788940578699112, 0.1389622688293457, -0.42798754572868347, -0.37975290417671204, -0.15879018604755402, -0.18397246301174164, 0.1788122057914734, -0.6004008054733276, 0.136442512273788...
it right. Second; if all the threads call `Wait`... who is going to wake them up? What are they waiting **for**? As presented: yes, they will all sleep indefinitely.
[ 0.6785653829574585, -0.39065179228782654, 0.7911887168884277, -0.08702032268047333, 0.2041153460741043, -0.00005340015559340827, 0.22739461064338684, 0.09979697316884995, -0.5275624990463257, -0.531583309173584, -0.07320348918437958, 0.19388315081596375, -0.021949555724859238, 0.4912734031...
I have several tabs that are loaded via ajax, and each one has a set of validators. I want to allow the user to change tabs only if the tab is valid I thought setting a validationgroup to the validators and then check for the specific group like this, would work: ``` function validatePage(group) { return Page_Cli...
[ 0.08028344810009003, 0.11469045281410217, 0.7509572505950928, 0.0276067852973938, -0.2181239277124405, 0.05393117666244507, 0.20746596157550812, -0.31139636039733887, 0.06931087374687195, -0.3282938003540039, -0.0727764442563057, 0.6972495317459106, -0.12020696699619293, -0.109486401081085...
/> // (...) ``` In my experience Linq To SQL requires the Primary/Foreign key relationships established in the DB. Otherwise, you'll have to do a join. Not sure if this applies to your situation, but it may... [Linq To SQL Without Explicit Foreign Key Relationships](https://stackoverflow.com/questions/619231/linq-t...
[ 0.036329176276922226, 0.4036155641078949, 0.4720263183116913, -0.18136565387248993, 0.027044320479035378, -0.10885186493396759, 0.3305748403072357, -0.24921435117721558, 0.11238327622413635, -0.35637298226356506, -0.24972958862781525, 0.6526448726654053, -0.25905877351760864, 0.14851246774...
(CLR) to retrieve the value after an insert or update operation.* Link: <http://msdn.microsoft.com/en-us/library/bb386971.aspx>
[ -0.15454046428203583, 0.10928955674171448, 0.7158781290054321, 0.053295236080884933, 0.39133724570274353, -0.06978301703929901, -0.2890523374080658, 0.06420721858739853, -0.6043367385864258, 0.07088105380535126, -0.5049839019775391, 0.3860209286212921, -0.23578305542469025, 0.1857920438051...
I would like to automate a windows app that comes only with as a GUI app (no support for command-line). The automation itself is relatively straightforward with [AutoIt](http://www.autoitscript.com/). Yet, I am wondering, is-it possible to launch the Windows App from with a windows service (that would simply call the...
[ 0.3488445580005646, 0.009891376830637455, 0.30201247334480286, -0.10491946339607239, 0.07346726953983307, -0.03608640283346176, 0.23276840150356293, 0.038966599851846695, -0.25912928581237793, -0.48373350501060486, -0.20555971562862396, 0.9507845044136047, -0.4064415991306305, -0.258667528...
at : [Launching a .Net winforms application interactively from a service](https://stackoverflow.com/questions/564829/launching-a-net-winforms-application-interactively-from-a-service/564874#564874)
[ 0.06049805134534836, -0.23863959312438965, 0.2641899883747101, -0.060795798897743225, -0.07846582680940628, -0.02655121125280857, 0.12808573246002197, 0.007333506364375353, -0.3404550552368164, -0.4549877941608429, -0.5550366044044495, 0.3700900375843048, -0.07005199790000916, 0.0699819400...
I'm trying to play around with netcat to learn more about how HTTP works. I'd like to script some of it in bash or Perl, but I've hit upon a stumbling block early on in my testing. If I run netcat straight from the prompt and type in a HEAD request, it works and I receive the headers for the web server I'm probing. T...
[ 0.6029177308082581, -0.12117626518011093, 0.43345341086387634, -0.17857280373573303, -0.04819020628929138, -0.2350916564464569, 0.4539913237094879, 0.19871708750724792, -0.0309128537774086, -0.7447130084037781, 0.04994185268878937, 0.5472804307937622, -0.22374190390110016, -0.0432027913630...
0 Cache-Control: public Expires: Sat, 01 Jan 2050 18:00:00 GMT [romandas@localhost ~]$ ``` But when I put the same information into a text file and feed it to netcat through a pipe or via redirection, in preparation for scripting, it doesn't return the headers. The text file consists of the HEAD reques...
[ 0.09145685285329819, 0.25799375772476196, 0.8782442808151245, -0.2075512856245041, 0.22761444747447968, -0.2748430371284485, 0.938949704170227, -0.09527874737977982, -0.1938953548669815, -0.5245736241340637, -0.020502913743257523, 0.1388368457555771, -0.17958679795265198, 0.415852606296539...
it's a bash problem, an echo problem, or a netcat problem. I checked the traffic via Wireshark, and the successful request (manually typed) sends the trailing newline in a second packet, whereas the echo, printf, and text file methods keep the newline in the same packet, but I'm not sure what causes this behavior. Yo...
[ 0.11559581756591797, -0.07227639853954315, 0.33921578526496887, -0.09794730693101883, 0.06806109100580215, -0.1296943873167038, 0.25812578201293945, -0.2798275351524353, -0.4318125247955322, -0.5186813473701477, -0.19053180515766144, 0.5167874097824097, -0.45149773359298706, -0.01070482563...
I know how to get an intersection of two flat lists: ``` b1 = [1,2,3,4,5,9,11,15] b2 = [4,5,6,7,8] b3 = [val for val in b1 if val in b2] ``` or ``` def intersect(a, b): return list(set(a) & set(b)) print intersect(b1, b2) ``` But when I have to find intersection for nested lists then my problems starts: ```...
[ -0.2601786255836487, 0.22314171493053436, 0.4753625988960266, -0.06568598002195358, -0.04817724972963333, 0.27766403555870056, 0.33464139699935913, -0.2466689497232437, -0.25808751583099365, -0.6155923008918762, 0.1770835965871811, 0.4617861211299896, -0.2381477653980255, -0.03900095820426...
python](https://stackoverflow.com/questions/406121/flattening-a-shallow-list-in-python) **If you want:** ``` c1 = [1, 6, 7, 10, 13, 28, 32, 41, 58, 63] c2 = [[13, 17, 18, 21, 32], [7, 11, 13, 14, 28], [1, 5, 6, 8, 15, 16]] c3 = [[13, 32], [7, 13, 28], [1,6]] ``` **Then here is your solution for Python 2:** ``` c3 =...
[ -0.16860270500183105, -0.028232049196958542, 0.21219505369663239, -0.3390734791755676, -0.07850678265094757, 0.20505613088607788, 0.13788101077079773, -0.49779558181762695, -0.41509705781936646, -0.24107849597930908, -0.20006144046783447, 0.4913941025733948, -0.5832234621047974, -0.3809133...
the source list c1. The list comprehension is executed for each sublist in c2.
[ -0.21672582626342773, 0.02501540631055832, 0.15285947918891907, -0.10561689734458923, -0.002123975194990635, 0.0016981292283162475, -0.0647362619638443, -0.1516249179840088, -0.3617881238460541, -0.5888476967811584, -0.6059237122535706, 0.3060421645641327, -0.3716309070587158, -0.231858402...
How can i assert that a method on a mocked object was called exactly called n-times? Here is the code snippet from a controller action, i like to test: ``` for (int i = 0; i <= newMatchCommand.NumberOfMatchesToCreate; i++) { serviceFacade.CreateNewMatch("tester", Side.White); } ``` The "service facade" object i...
[ 0.4652399718761444, 0.008376060053706169, 0.3230226933956146, -0.3587350845336914, 0.08383961766958237, 0.08832219988107681, 0.4873339831829071, -0.40270060300827026, -0.012127770110964775, -0.722832202911377, -0.02986249141395092, 0.5918547511100769, -0.1779489815235138, 0.299440234899520...
I noticed that my programs written with wxPython have Win98 button style. But Boa Constructor (that is written using wxPython too) got pretty buttons. How to make buttons look like current Windows buttons style? Are you packaging the app with py2exe? If so you may need to specify a manifest file to make Python use th...
[ 0.3421045243740082, -0.16473360359668732, 0.2520124912261963, 0.16388347744941711, -0.029799072071909904, 0.1208672747015953, -0.006708093453198671, -0.13405266404151917, -0.43407586216926575, -0.37399932742118835, -0.10048795491456985, 0.5291533470153809, -0.30701586604118347, -0.05970037...
Is there any fast (and nice looking) way to remove an element from an array in Java? You could use commons lang's ArrayUtils. ``` array = ArrayUtils.removeElement(array, element) ``` [commons.apache.org library:Javadocs](http://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/ArrayUtil...
[ -0.04102010652422905, -0.05082862079143524, -0.03754384443163872, -0.03899627551436424, -0.1607082337141037, -0.15582001209259033, -0.04496581479907036, -0.3129236698150635, -0.3701150417327881, -0.28234779834747314, -0.1323753297328949, 0.091950424015522, -0.5441393256187439, -0.021782329...
I need to pass a Scripting.Dictionary between my C# app and another app. I would like to be able to create instances of and modify the dictionary in my C# app. I know little about Scripting.Dictionary and ActiveX in general. Various forums suggest that I should use functions like System.Type.GetTypeFromProgID() and Sy...
[ 0.37091270089149475, 0.20356999337673187, 0.27044686675071716, 0.12392468005418777, -0.25961318612098694, -0.050179727375507355, 0.3406713604927063, 0.16856727004051208, -0.15021388232707977, -0.8697946667671204, 0.21292632818222046, 0.5960737466812134, -0.2471693903207779, -0.034550212323...
this possible? [This article](http://asp.dotnetheaven.com/howto/doc/Interop/Building_Samples_NET2COM.aspx) suggests I obtain a "metadata assembly" from the vendor - does anyone know if such an assembly exists for Scripting.Dictionary? I've just tried the easiest approach, and it seems to work: Add a COM reference to ...
[ 0.5175345540046692, 0.022187557071447372, 0.4090481698513031, 0.02639005333185196, 0.23198387026786804, -0.06316309422254562, 0.032976582646369934, -0.1290644258260727, -0.1223551332950592, -0.7367928624153137, -0.021511029452085495, 0.625674843788147, -0.2603018879890442, -0.1085919439792...
I have as ASP.Net 2.0 website with SQL Server as database and C# 2005 as the programming language. The website is almost complete and all the links are working fine. But I want to prevent normal users from opening a couple of pages. When any user clicks on those specific links, another page opens which contains a ASP L...
[ 0.2085309773683548, 0.35974377393722534, 0.37824979424476624, -0.15174759924411774, -0.16437581181526184, -0.3376120924949646, 0.3322761654853821, 0.06482426822185516, -0.31323257088661194, -0.6268832087516785, -0.14528730511665344, 0.33299848437309265, -0.19598613679409027, 0.027985446155...
user gets to know the exact url of the restricted pages, then he/she can bypass the login control and directly access those pages by typing the url into the address bar. I want to prevent this. If the user types the url directly in the address bar, I want that the page itself should check, whether the user has been val...
[ 0.4642358422279358, 0.14227598905563354, -0.09384478628635406, 0.21921901404857635, 0.23996129631996155, -0.13888442516326904, 0.1113041490316391, -0.003845931962132454, -0.3551161289215088, -0.20304733514785767, -0.5032451748847961, 0.21650850772857666, 0.05381866544485092, 0.360536992549...
must control permissions, or simply put the authentication code in a CS file that will be included in all other files. Depending on the authentication architecture that you choose (simply use the session variable, or create a session id with cookies), you must adapt your code accordingly. The simplest way would be t...
[ 0.2727636992931366, 0.09301615506410599, 0.3299335539340973, 0.34655332565307617, 0.26136595010757446, -0.5197478532791138, 0.5083263516426086, -0.20516544580459595, -0.13832157850265503, -0.6469529271125793, -0.3319995701313019, 0.4293564558029175, -0.23196753859519958, 0.0876034572720527...
Page\_Load() function: ``` if (Session["logged_in"] != null && (bool)Session["logged_in"] == true){ Response.Write("I'm logged in!"); }else{ Response.Write("I'm not logged in."); } ``` Please keep in mind that this is okay for simple intranet applications, but if you want to get into more secure login ...
[ 0.2259330153465271, 0.06644275784492493, 0.5358067750930786, -0.2730880379676819, -0.022632719948887825, -0.38337239623069763, 0.6201691627502441, -0.10860053449869156, -0.5070326924324036, -0.7736621499061584, -0.372143030166626, 0.6090211868286133, -0.41920143365859985, 0.187222644686698...
I have a situation where I need to know the current color of an alternating row in a TemplateField of a GridView. UPDATED: How do I retrieve this Color value in a `<%# ??? %>`. (Or an workaround where I get the row number). Create this function in your codebehind page (or in a section in your .aspx page): ``` prote...
[ 0.2532772421836853, -0.44761064648628235, 0.3613291084766388, -0.19425201416015625, 0.3377261757850647, 0.21986158192157745, 0.15304824709892273, -0.05493290722370148, 0.010750402696430683, -0.7498506307601929, 0.0268517155200243, 0.43596959114074707, -0.4602775275707245, 0.041104655712842...
{ ordinal = int.Parse(DataBinder.Eval(container, "DataItemIndex").ToString()); } catch (Exception) { ordinal = int.Parse(DataBinder.Eval(container, "ItemIndex").ToString()); }
[ -0.1309543401002884, -0.30824658274650574, 0.10488506406545639, -0.11850321292877197, -0.06326978653669357, 0.27102819085121155, 0.21453073620796204, -0.21654367446899414, -0.38801300525665283, -0.022237537428736687, -0.4174456000328064, 0.1517404466867447, -0.48439666628837585, 0.05830190...
return (ordinal % 2) == 0 ? "Row" : "Alternate Row"; } ``` Then in your markup, you'd call it like so: ``` <%# GetOrdinal(Container) %> ``` (Note the uppercase "Container").
[ -0.2350306212902069, -0.09735701978206635, 0.28319501876831055, -0.45720383524894714, 0.08804968744516373, 0.0953509658575058, -0.024185197427868843, 0.11385256052017212, 0.0942641943693161, -0.5196728706359863, -0.2805408537387848, 0.48990190029144287, -0.3620494604110718, 0.0578774288296...
When do you use each inheritance? ``` class Base{}; class Derived: protected Base{}; class Derived2: public Base{}; ``` **My case:** I have class called Snapshot which only contains GetXXX methods. It is a light-weight classed used to store current state of the Value class. I also use it for recovery, keeping inst...
[ 0.12132514268159866, -0.12575840950012207, 0.039123959839344025, 0.12041260302066803, -0.012721579521894455, -0.17975834012031555, -0.06300037354230881, -0.2817794680595398, -0.12804356217384338, -0.4643019139766693, 0.13020919263362885, 0.5777666568756104, -0.22966930270195007, -0.0903580...