text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
blank out a value if one already exists! [age] => 33 [lastname] => griffin [nation] => usa ) */ ``` **UPDATE:** 2016-06-17T11:51:54 the question was updated with clarifying context and rename of variables. ``` array_replace_recursive($array, $array2); ``` This is the solution.
[ 0.15726204216480255, 0.1282591074705124, 0.23680974543094635, -0.18996097147464752, 0.3724572956562042, 0.20984552800655365, 0.36891409754753113, -0.24531300365924835, -0.22858700156211853, -0.40245571732521057, -0.4161255359649658, 0.2650007903575897, -0.24057477712631226, 0.2373299598693...
Where do struts come under in three tier architecture in real time projects? Please I need explanation? Struts is an entire framework and isn't really going to only be one layer of the typical "three tier" architecture (presentation, application, and data storage). Struts is going to provide you an MVC framework in Ja...
[ 0.2143770009279251, 0.004113044124096632, 0.47923514246940613, 0.36491426825523376, -0.3013348877429962, -0.10631974786520004, 0.2958146929740906, -0.30538052320480347, -0.27951857447624207, -0.6306494474411011, -0.017333222553133965, 0.23407138884067535, -0.33418625593185425, 0.0878996923...
I wrote a small test program with a sample class containing also self-defined constructor, destructor, copy constructor and assignment operator. I was surprised when I realized that the copy constructor was not called at all, even though I implemented functions with return values of my class and lines like `Object o1; ...
[ -0.24201174080371857, 0.1295071691274643, 0.27202269434928894, -0.21858574450016022, 0.3428092896938324, 0.42068222165107727, 0.4283421039581299, -0.24537423253059387, -0.057367246598005295, -0.5374980568885803, -0.15109384059906006, 0.6160563230514526, -0.3791256844997406, -0.278275400400...
InnerClass() : m_int(0) { std::cout << "InnerClass Constructor" << std::endl; } InnerClass(const InnerClass & rhs) : m_int(rhs.m_int) { std::cout << "InnerClass Copy" << std::endl; } InnerClass & operator=(const InnerClass & rhs) { std::cout << "InnerClass Assignment"...
[ -0.29698777198791504, -0.23524482548236847, 0.47952404618263245, -0.19996610283851624, 0.3392731249332428, 0.18483993411064148, 0.5072814226150513, -0.5008376240730286, 0.018356449902057648, -0.5978528261184692, -0.3575877547264099, 0.7512593865394592, -0.40977033972740173, -0.079773649573...
return *this; } ~InnerClass() { std::cout << "InnerClass Destructor" << std::endl; } void sayHello() { std::cout << "Hello!" << std::endl; } private: int m_int; }; InnerClass innerClass() { InnerClass ic; std::cout << "innerClass() method" << std::endl; retu...
[ -0.5699198842048645, -0.1228058785200119, 0.5671383142471313, -0.046583391726017, 0.3818034529685974, 0.3425651490688324, 0.10060827434062958, -0.05666845291852951, -0.40260761976242065, -0.5753129124641418, -0.40266653895378113, 0.3133889138698578, -0.22230620682239532, 0.2904599010944366...
= oc.innerClass(); } ``` Output: ``` 1st try: OuterClass Constructor OuterClass Copy InnerClass Constructor innerClass() method Hello! InnerClass Destructor 2nd try: InnerClass Constructor innerClass() method InnerClass Constructor innerClass() method InnerClass Assignment InnerClass Destructor Inner...
[ -0.14617794752120972, 0.2275197058916092, -0.10291799157857895, -0.09466959536075592, 0.034980785101652145, -0.1299443542957306, 0.28817451000213623, -0.16436244547367096, -0.28825923800468445, -0.5271530747413635, -0.22388845682144165, 0.8154903054237366, -0.6398118734359741, 0.0421088114...
self-defined copy constructor? Just for completeness with the other answers, the standard allows the compiler to omit the copy constructor in certain situations (what other answers refer to as "Return Value Optimization" or "Named Return Value Optimization" - RVO/NRVO): > 12.8 Copying class objects, paragraph 15 (C++9...
[ 0.22943370044231415, 0.1627947837114334, 0.048143867403268814, -0.06829580664634705, -0.2051398754119873, -0.23999710381031036, 0.21553216874599457, -0.2977510392665863, -0.14404292404651642, -0.015755921602249146, 0.08340248465538025, 0.9024289846420288, -0.4420042634010315, -0.0357820391...
class copy constructor or destructor have side effects. For a function with a class return type, if the expression in the return statement is the name of a local object, and the cv-unqualified type of the local object is the same as the function return type, an implementation is permitted to omit creating the temporary...
[ 0.20079335570335388, -0.1920958161354065, -0.06556568294763565, 0.03344978019595146, 0.304242342710495, -0.29616981744766235, 0.30492278933525085, 0.24017414450645447, -0.21858784556388855, -0.36043792963027954, -0.34890156984329224, 0.7176254391670227, -0.40068089962005615, 0.335975259542...
`innerClass()` method, the copy constructor you might think would be called at the return is permitted to be optimized away: ``` InnerClass innerClass() { InnerClass ic; std::cout << "innerClass() method" << std::endl; return ic; // this might not call copy ctor } ```
[ -0.11314225196838379, -0.06940421462059021, 0.2674373388290405, -0.023950934410095215, 0.46407052874565125, -0.12373607605695724, -0.045592110604047775, -0.11209101229906082, -0.05749927833676338, -0.42076370120048523, -0.18716339766979218, 0.7020956873893738, -0.48276302218437195, 0.03577...
In the process of transforming a given efficient pointer-based hash map implementation into a generic hash map implementation, I stumbled across the following problem: I have a class representing a hash node (the hash map implementation uses a binary tree) ``` THashNode <KEY_TYPE, VALUE_TYPE> = class public Key ...
[ -0.3552829325199127, 0.15917310118675232, -0.13240817189216614, -0.1935110092163086, -0.18631576001644135, 0.14182640612125397, -0.02144443616271019, -0.18920321762561798, 0.0276472270488739, -0.7435417771339417, -0.18778486549854279, 0.21267840266227722, -0.7299618124961853, 0.36696875095...
<KEY_TYPE, VALUE_TYPE> ``` but that doesn't compile (';' expected but '<' found). How can I have a pointer to a generic type? And adressed to Barry Kelly: if you read this: yes, this is based on your hash map implementation. You haven't written such a generic version of your implementation yourself, have you? That ...
[ 0.2805293798446655, 0.13102124631404877, -0.027959099039435387, -0.07030349224805832, -0.22866569459438324, -0.34386876225471497, 0.6099230647087097, 0.0050960686057806015, -0.39752519130706787, -0.2940179407596588, -0.09343063831329346, 0.3621666431427002, -0.6094877123832703, 0.335768938...
update in case we break someone's code. The limitation on generic pointer types ought to be removed in the future, but I can't make promises when. If the type in question is the one in `JclStrHashMap` I wrote (or the ancient `HashList` unit), well, the easiest way to reproduce it would be to change the node type to be...
[ 0.2481311857700348, -0.16300027072429657, 0.3774869441986084, 0.0973539799451828, -0.07648978382349014, -0.06794215738773346, 0.32073307037353516, 0.0011445913696661592, -0.3044842779636383, -0.7393131852149963, 0.14758434891700745, 0.5003571510314941, -0.3547472059726715, 0.09242852777242...
with all the other Delphi compiler work time was too tight before shipping for solid QA, and generic feature support itself was in flux until fairly late. I would prefer to implement the hash map buckets as one of double-hashing, per-bucket dynamic arrays or linked lists of cells from a contiguous array, whichever cam...
[ -0.14008410274982452, -0.18010221421718597, 0.43175259232521057, -0.048260398209095, -0.4050145149230957, 0.03301306068897247, 0.18084466457366943, -0.2872982919216156, 0.0269290953874588, -0.6009495854377747, 0.20796386897563934, 0.596275806427002, -0.42733779549598694, -0.055904097855091...
it was relatively easy to implement and worked with the available set of primitive generic operations. That said, the binary tree buckets should have been an effective hedge against poor hash functions; if they were balanced binary trees (`=>` even more modification cost), they would be O(1) on average and O(log n) wo...
[ -0.48099955916404724, -0.13648933172225952, -0.15042802691459656, 0.1361623853445053, -0.3145360052585602, 0.2566669285297394, 0.34565314650535583, -0.3398837149143219, -0.0571594312787056, -0.28865259885787964, 0.04544138163328171, 0.6506299376487732, -0.39780500531196594, -0.018974497914...
I need to compare the table structure of two datasets to check for any discrepencies, is this possible? I had though of converting to XML and comparing but is there a better way? Thanks Access files can become problematic when opened by multiple users at the same time. I would have a copy of the file on each user's m...
[ 0.30601438879966736, 0.20384427905082703, 0.4843060374259949, 0.24689871072769165, -0.08204562216997147, -0.2060249149799347, -0.008041816763579845, -0.10087782889604568, -0.07459087669849396, -0.7245501279830933, 0.07733765989542007, 0.3416976034641266, -0.20760208368301392, 0.10855520516...
This question is *not* asking what revision control software I should use. Rather, I would like to hear what you think are the downsides of some of the SCMs you've used. Websites and marketing material only highlight the advantages, but I want to hear from people who have actually used it what they think are the downs...
[ 0.27772900462150574, 0.28437191247940063, -0.08397158235311508, 0.1782740354537964, 0.028900232166051865, 0.0131743885576725, -0.04918952286243439, 0.24400395154953003, 0.09013662487268448, -0.415770947933197, 0.21740208566188812, 0.6676442623138428, -0.1111731082201004, 0.2554327547550201...
saps my will to live on a daily basis would take me at least a week. Off the top of my head my main complaints are: 1. No concept of a unit of work. If I check in ten changed files to fix a bug or add a feature there is no way of viewing those changes as a group ever again. Even if they have the same check in comments...
[ 0.45232877135276794, -0.10611128062009811, 0.42427510023117065, 0.06189901754260063, -0.06090107560157776, -0.001013280008919537, 0.49420440196990967, 0.09285824745893478, -0.5621618628501892, -0.34015053510665894, 0.08986905962228775, 0.5499651432037354, -0.3345014750957489, 0.10971102118...
there still when you restart your machine. 3. If I check in code into my branch and then merge back into main it won't automatically check it into main with the same comment. This means that if I want well commented checkins on the main branch I'm constantly repeating myself. 4. Practically no integration with Visual S...
[ 0.0644880086183548, -0.28459200263023376, 0.538407027721405, 0.16338996589183807, -0.09170394390821457, 0.04322206228971481, 0.41125819087028503, 0.2954469323158264, -0.4905792772769928, -0.7142131924629211, 0.037192393094301224, 0.6396712064743042, -0.12516966462135315, -0.090378411114215...
to be resizeable (contain long filenames) aren't. 6. Rarely (but often enough that this has happened at least once to everyone I've spoken to in both companies) ClearCase will decide to add a random character into the middle of XML files. 7. The fact that IBM change $4,600 per license for this, and people pay it. Ther...
[ 0.440084844827652, 0.06628884375095367, 0.36688271164894104, -0.02428966388106346, 0.10623355209827423, -0.18885798752307892, 0.14781565964221954, 0.2908862829208374, -0.2063736915588379, -0.4390977919101715, -0.0310656800866127, 0.2429238259792328, -0.04679643735289574, 0.4403180480003357...
Is it possible to split an F# module across files? According to the book I have it is, but the book is probably outdated (Foundations of F#) Apparently not: ``` C:\temp\Tim>type 1.fs 2.fs 1.fs #light module Module let sayHello1 = printfn "Hello, " 2.fs #light module Module let sayHello2 = printfn "world!" C:\t...
[ 0.3300146758556366, 0.02314305305480957, 0.4161110520362854, -0.1315658986568451, 0.24690155684947968, -0.23012691736221313, 0.19623014330863953, -0.2915200889110565, -0.5723855495452881, -0.2148774415254593, -0.44182372093200684, 0.5895053148269653, -0.5437065362930298, 0.1413093954324722...
of your assembly, including the namespace part.
[ 0.2432619035243988, 0.3403514325618744, -0.18435218930244446, -0.16421376168727875, 0.06059853360056877, -0.05922813341021538, -0.2504960000514984, 0.03622102737426758, -0.21411709487438202, -0.4429543912410736, -0.4165829122066498, 0.4359927177429199, -0.2503897547721863, -0.0244711544364...
I understand lambdas and the `Func` and `Action` delegates. But expressions stump me. In what circumstances would you use an `Expression<Func<T>>` rather than a plain old `Func<T>`? When you want to treat lambda expressions as expression trees and look inside them instead of executing them. For example, LINQ to SQL ...
[ 0.3042924404144287, 0.17546363174915314, -0.10708081722259521, 0.27993249893188477, -0.16144976019859314, -0.1313016712665558, -0.11350803077220917, -0.20928454399108887, -0.07723132520914078, -0.19899840652942657, -0.1372670829296112, 0.6440320611000061, -0.20089755952358246, -0.176027625...
This tree structure **describes what a lambda expression does** rather than doing the actual thing. It basically holds data about the composition of expressions, variables, method calls, ... (for example it holds information such as this lambda is some constant + some parameter). You can use this description to convert...
[ 0.23694410920143127, 0.028768623247742653, 0.21199871599674225, 0.07520335912704468, -0.026956362649798393, -0.061474185436964035, -0.00032326552900485694, -0.2062673717737198, -0.08682788163423538, -0.15895435214042664, -0.1031588762998581, 0.2413632720708847, -0.502110481262207, -0.16326...
effectively compile to an IL method that gets nothing and returns 10. ``` Expression<Func<int>> myExpression = () => 10; ``` will be converted to a data structure that describes an expression that gets no parameters and returns the value 10: [![Expression vs Func](https://i.stack.imgur.com/gwU0E.jpg) *larger image*...
[ 0.008948537521064281, 0.057696383446455, 0.24186615645885468, -0.10290754586458206, 0.10735385119915009, 0.0875827819108963, 0.2864689528942108, -0.40723419189453125, -0.1847841888666153, -0.7519792914390564, -0.32849764823913574, 0.6574732065200806, -0.45805981755256653, -0.26241564750671...
Suppose I had a **1-by-12** matrix and I wanted to resize it to a **4-by-3** matrix. How could I do this? My current solution is kind of ugly: ``` for n = 1:(length(mat)/3) out(n,1:3) = mat( ((n-1)*3 + 1):((n-1)*3 + 3) ); end ``` Is there a better way to do this? `reshape` is of course the proper solution, as s...
[ 0.11189568787813187, 0.20974770188331604, 0.4853983521461487, -0.29072263836860657, 0.0007224804139696062, 0.24870337545871735, 0.3587190508842468, -0.5947694778442383, -0.32220739126205444, -0.6882179379463196, -0.09718882292509079, 0.5311902761459351, -0.09285333752632141, 0.311828911304...
10 3 7 11 4 8 12 ``` So if you don't know how many columns there will be, `reshape` will compute it for you. Likewise, `reshape` will fill in the number of rows, if you leave that out. ``` C = reshape(A,[],4) C = 1 4 7 10 2 5 8
[ 0.014610016718506813, 0.4795832633972168, 0.4632653295993805, -0.28561413288116455, 0.21806541085243225, 0.5768975615501404, 0.2648000419139862, -0.4393281936645508, -0.5871565937995911, -0.36696067452430725, -0.3003597855567932, 0.2452891767024994, -0.3070319592952728, 0.04452854767441749...
11 3 6 9 12 ```
[ 0.053587406873703, 0.8571217656135559, 0.14165359735488892, -0.29448962211608887, 0.08269614726305008, 0.014742974191904068, 0.16024614870548248, 0.2507043778896332, -0.21885670721530914, -0.6280487775802612, -0.13036002218723297, 0.5245234370231628, 0.037992607802152634, -0.05599574372172...
I'm trying to get more into LINQ-to-XML, so I've made myself a neat little example XML-document to try things out on. In addition, I tried (and successfully) made my own XML-schema for that file, just to test things out. The XML-document is pretty straightforward, and pretty much looks like this: ``` <cars xmlns="/car...
[ 0.3276468813419342, 0.35690614581108093, 0.6479345560073853, 0.3737488389015198, -0.10264226049184799, -0.054396916180849075, -0.17915168404579163, -0.28135842084884644, -0.10093756765127182, -0.41447216272354126, 0.2509036660194397, 0.6277070641517639, 0.19747187197208405, 0.0064259795472...
fine if i remove the `xmlns`-attribute from the root element. When i add it back in, the query returns null and nothing. I've tried to find out by myself, but I've yet to find a sollution that fixes my problem. Here's the C#-bit: ``` XDocument xmlDoc = XDocument.Load(currentDir + "\\Cars.xml"); // XNamespace...
[ 0.2495194971561432, 0.16775350272655487, 0.5350400805473328, 0.13751614093780518, 0.10406722873449326, 0.09230116754770279, 0.02163632959127426, -0.3389219343662262, -0.3756296932697296, -0.5134371519088745, -0.022594086825847626, 0.5676679611206055, 0.08970803022384644, 0.2498739212751388...
select (string)car.Element("brand") + ": " + (string)car.Element("model"); ``` Anyone sees what's wrong? And why should LINQ really care *that* much about the namespace? Can't it just query my file and don't care about it? Thanks in advance! :-) When you're searching by descendants and element, you need to specify t...
[ 0.1720864474773407, 0.20677894353866577, 0.5032783150672913, 0.23321865499019623, 0.11270210146903992, -0.05070209130644798, -0.24841991066932678, -0.2446211278438568, -0.03306078910827637, -0.3334762156009674, -0.062048058956861496, 0.4872160255908966, -0.02747645042836666, 0.290889948606...
- // for a proof of concept, I suggest you use a namespace of // http://dummy.com/dummy.xsd XNamespace ns = "/carSchema.xsd"; var carInfo1 = from car in xmlDoc.Descendants(ns + "car") select (string)car.Element(ns + "brand") + ": " + (string)car.Element(ns + "model"); ```
[ 0.35692715644836426, 0.2597472071647644, 0.3900393843650818, 0.3464447855949402, -0.07562752813100815, 0.3025067150592804, -0.052109282463788986, -0.21861326694488525, -0.17885366082191467, -0.27881333231925964, 0.012401029467582703, 0.2956564724445343, 0.23395299911499023, 0.5868037939071...
I found the following code in [someone's .bashrc](http://www.pixelbeat.org/settings/.bashrc) ``` # Source global definitions [ -f /etc/bashrc ] && . /etc/bashrc ``` It apparently caused my Bash duplicate a lot. What does the one-liner mean? What might be confusing you: `[` is actually a Unix shell command. You can...
[ 0.640609085559845, 0.30898961424827576, 0.08368700742721558, 0.22756236791610718, -0.17021401226520538, -0.09555363655090332, 0.047630902379751205, 0.15182781219482422, -0.4262692332267761, -0.769496500492096, 0.346047043800354, 0.4987014830112457, -0.20735876262187958, 0.09086419641971588...
to the Unix host and the teletype would print the result. The rumor goes like this: Since the early Unix developers were tired of all the racket the teletypes created, they tried to shorten all the commands to two letters and all options to a single letter. If you're green, then the rumor is: To save paper and ink rib...
[ 0.4092135727405548, -0.19198733568191528, 0.11437533795833588, 0.023536384105682373, -0.09739131480455399, -0.16662749648094177, 0.10998373478651047, 0.3196919858455658, -0.4215857982635498, -0.45835110545158386, -0.1903875768184662, 0.5000404715538025, -0.2946859300136566, 0.1795523613691...
figure out that that `[` and `test` are the same thing: This is a two-step process. `ls -il [ test echo` gives: ``` 356954 -r-xr-xr-x 2 root wheel 46K May 31 2008 [ 356954 -r-xr-xr-x 2 root wheel 46K May 31 2008 test 67392 -rwxr-xr-x 1 root wheel 18K Sep 22 2007 echo ``` First, you notice the "2" before "root". Th...
[ -0.16549964249134064, 0.334745317697525, 0.062020279467105865, -0.02072135917842388, 0.03540841117501259, -0.13767601549625397, 0.35787463188171387, -0.33535638451576233, -0.10267175734043121, -0.3322446644306183, -0.014745171181857586, 0.6546307802200317, -0.04184769093990326, 0.033159267...
see that `[` and `test` share the same inode but `echo` doesn't. Note that there is no fast way to get all directory entries which point to the same inode. You have to search the whole filesystem for an entry with the same inode (using `find /path -inode 356954`) [EDIT2] As for the tty "files": These are in fact devi...
[ 0.04175771027803421, 0.19625374674797058, 0.23256175220012665, 0.18299132585525513, 0.3389211595058441, -0.2825567424297333, 0.14288924634456635, -0.3914337456226349, -0.19692568480968475, -0.3886096179485321, -0.34760504961013794, 0.3409728407859802, -0.16245633363723755, 0.23758584260940...
program. You can talk to it by sending data to it ("writing" something in the "file") or read data from it. The concept seemed so close to real files that the Unix inventors used a the file API plus something called "IO control" (or ioctl) to send special commands (like querying a terminal for its size). If you switch...
[ 0.05375809594988823, -0.3518355190753937, 0.25127077102661133, 0.12426082789897919, 0.045334022492170334, -0.21451863646507263, -0.058877307921648026, 0.34348347783088684, -0.11824582517147064, -0.6888644695281982, -0.3186112642288208, 0.7994726300239563, -0.3797951936721802, 0.11559826135...
appear on the console connected to `tty1`. Reading from a tty is a not so easy since there is already a program reading from it (either `mingetty` as long as you're not logged in and `login` or `bash` after log in). If you try `read line < /dev/tty1`, that would conflict with the program which is already running on tha...
[ 0.21526391804218292, -0.279180645942688, 0.3823222517967224, 0.012767691165208817, -0.12109307944774628, -0.07306897640228271, 0.12491236627101898, 0.2781998813152313, -0.19422480463981628, -0.8486417531967163, -0.4029091000556946, 0.5228843688964844, -0.07688415795564651, -0.0511003769934...
I'm looking at changing our Auditing process for our SQL Server 2005 databases and I came across Change Data Capture in SQL Server 2008. This looks like a good idea, and I'm tempted to try it, but before I do has anyone used it in a commercial environment and what are your thoughts? I noticed when I was reading abou...
[ 0.6700444221496582, -0.0963781327009201, 0.3194057047367096, 0.22661197185516357, 0.14252930879592896, -0.29552850127220154, 0.1257474571466446, 0.11814112961292267, -0.5746436715126038, -0.33956387639045715, 0.888615071773529, 0.42623698711395264, -0.230323925614357, 0.18273745477199554, ...
good solution for reasons I'm unaware of, have you any other solutions for auditing of data changes. I'm keen to use a system that can be implemented across the board on any tables I desire. I'm after the basic: "Before, After, Who By, When" information for any changes. The CDC should is just a means to an end in my o...
[ 0.38249528408050537, 0.08655703812837601, 0.2884189486503601, 0.518509030342102, 0.11350202560424805, -0.4423544108867645, 0.04500293359160423, -0.14332209527492523, -0.40018200874328613, -0.357977032661438, 0.45611491799354553, 0.4700367748737335, -0.12519638240337372, -0.2159295827150344...
data without the use of triggers, but you still need a means to take that data into a permanent table. This can be done with a mirror table for each table to be audited or a single table that tracks all the changes to all the tables (I have done the latter). **Here are some links with additional information on how it ...
[ 0.3931039571762085, 0.03705865889787674, 0.6773989200592041, 0.3190784454345703, -0.005471456330269575, -0.2951886057853699, -0.10833177715539932, -0.3716868460178375, -0.7554548978805542, -0.24574774503707886, 0.041118934750556946, 0.4129687547683716, -0.06724300980567932, -0.117200590670...
I just got a heaping pile of (mostly undocumented) C# code and I'd like to visualize it's structure before I dive in and start refactoring. I've done this in the past (in other languages) with tools that generate call graphs. Can you recommend a good tool for facilitating the discovery of structure in C#? **UPDATE** ...
[ 0.4046878516674042, 0.10738036036491394, 0.1778339296579361, -0.04890568181872368, -0.35559576749801636, -0.26646342873573303, 0.06024905666708946, -0.11734256893396378, -0.5993642210960388, -0.5641571283340454, 0.26854318380355835, 0.43978554010391235, -0.1467411369085312, 0.0102241281419...
track of cyclomatic complexity but its much more basic than NDepend. (Run code analysis)
[ -0.035933323204517365, -0.04360306262969971, -0.03458043187856674, 0.33769774436950684, 0.23107211291790009, 0.06699267774820328, -0.001244959537871182, -0.21820572018623352, 0.022591324523091316, -0.37586089968681335, -0.09637188166379929, 0.7634626626968384, -0.14923571050167084, -0.2645...
i give an error when connect my wcf service, The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8) My wcf service config file below this: ``` <?xml version="1.0"?> <configuration> <customErrors mode="Off"> </customErrors> <sy...
[ 0.08437084406614304, 0.18367940187454224, 0.8109871745109558, -0.3870960474014282, -0.18928077816963196, 0.14538000524044037, 0.5833539962768555, -0.5525034666061401, -0.10035237669944763, -0.8246284127235413, -0.03784665837883949, 0.39538338780403137, -0.2562773823738098, 0.40799912810325...
<dns value="127.0.0.1"/> </identity> </endpoint> <host> <baseAddresses> <add baseAddress="http://127.0.0.1/"/> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WcfService1.Servic...
[ 0.0670347660779953, -0.26904788613319397, 0.19630910456180573, -0.0959586352109909, -0.17942415177822113, 0.008335021324455738, 0.45862817764282227, -0.3344418704509735, -0.4993788003921509, -0.9256923794746399, 0.009413733147084713, 0.2838813364505768, -0.14902454614639282, 0.187347114086...
<serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration> ``` How can i solve this problem? Try changing this: ``` <serviceDebug includeExceptionDetailInFaults="fal...
[ 0.17324213683605194, 0.05775535851716995, 0.129399374127388, -0.22203917801380157, -0.011225653812289238, -0.00044522344251163304, 1.0385069847106934, -0.11463876068592072, -0.03730413317680359, -0.6265568137168884, -0.18279148638248444, 0.8392579555511475, -0.10885883867740631, 0.25326040...
This is almost similar question to this one: - [Dealing with timezones in PHP](https://stackoverflow.com/questions/346770/dealing-with-timezones-in-php) I read that thread, and have some more issues, and not sure of how to elegantly build timezone support in PHP/MySQL application. I am writing an application in PHP,...
[ 0.14483578503131866, -0.00417144363746047, 0.384978324174881, 0.17704488337039948, 0.06933669745922089, 0.047386378049850464, 0.005055584013462067, 0.1338629126548767, -0.31156888604164124, -0.7383504509925842, 0.21177205443382263, 0.20766384899616241, -0.12092030793428421, 0.1712689995765...
I want to implement something like windows time zone list. Offset with region info. 2) The PHP and MySQL may have different set of list. 3) Where should I convert timezones, in PHP or in MySQL? I have combination of coding. Sometimes it is easy to select a column converted from MySQL, sometimes it is easy to convert ...
[ 0.1606259047985077, -0.25693097710609436, 0.3982233703136444, 0.11229030042886734, 0.022346802055835724, 0.19261658191680908, -0.12944994866847992, 0.05941859632730484, -0.3100025951862335, -0.8328936100006104, 0.017466619610786438, -0.28812265396118164, -0.25735998153686523, 0.19700774550...
a subset of the ridiculously exhaustive Unix-style timezone list. Users are presented with a dropdown of these windows-style names (e.g., (GMT-05:00) Eastern Time (US & Canada)), and their selection is stored in the db in the unix-style format (e.g. America/New\_York) The work of applying the user's timezone prefere...
[ 0.2781878113746643, -0.30070993304252625, 0.5350972414016724, 0.25994208455085754, 0.17835544049739838, -0.006995006464421749, -0.09800656139850616, 0.28854724764823914, -0.011898618191480637, -0.6105275750160217, -0.1621226966381073, 0.15131449699401855, -0.04693033546209335, 0.1190197095...
I am writing a shell script to run under the KornShell (ksh) on AIX. I would like to use the `mkdir` command to create a directory. But the directory may already exist, in which case I do not want to do anything. So I want to either test to see that the directory does not exist, or suppress the "File exists" error that...
[ 0.23577816784381866, 0.45619964599609375, 0.16802072525024414, -0.3914174437522888, 0.010339654982089996, 0.0033167018555104733, 0.3677324950695038, -0.008334869518876076, 0.03414859622716904, -0.6557090282440186, -0.09616193175315857, 0.5743316411972046, -0.4932161867618561, -0.0067425617...
`foo`, `foo/bar`, and `foo/bar/baz` if they don't exist. Some implementation like GNU `mkdir` include `mkdir --parents` as a more readable alias, but this is not specified in POSIX/Single Unix Specification and not available on many common platforms like macOS, various BSDs, and various commercial Unixes, so it should...
[ 0.38233694434165955, 0.39927563071250916, -0.008231346495449543, -0.06919553875923157, 0.04161578789353371, -0.17174510657787323, 0.39013907313346863, -0.018144449219107628, 0.046897657215595245, -0.42194196581840515, -0.16086776554584503, 0.4372318387031555, -0.4516476094722748, 0.3375970...
I find java starts up and runs practically instantly for me - but javac takes a few seconds, and ant makes it slower again. It's only a few seconds, but my edit-compile-test loop would be smoother without it. :-) BTW: I've already used vim's ":make" with ant. Is there a way to speed up javac and/or ant? I'm thinking ...
[ 0.33986836671829224, 0.0013730296632274985, 0.10554582625627518, -0.02670043148100376, -0.08859559148550034, -0.15660293400287628, 0.3118645250797272, -0.1464788317680359, -0.1307753622531891, -0.8179906010627747, 0.19171130657196045, 0.561537504196167, -0.1392192840576172, -0.402870982885...
two approaches: 1. Run the java compiler from within ant (instead of creating a new process). Not sure if ant already does that; if not, that will save you a bit of time. Look at the [Java 6 compiler API](http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html) for details. 2. Run javac in a server process...
[ 0.357420951128006, -0.12526533007621765, -0.32526952028274536, -0.19593536853790283, -0.3844648599624634, -0.011630994267761707, 0.30015233159065247, -0.3156623840332031, -0.09750301390886307, -0.8139957785606384, -0.010849539190530777, 0.6102604866027832, -0.6931072473526001, -0.258366167...
it can produce class files even when they contain errors. That doesn't seem to mean much but it allows you to compile all the time in the background. When you do your last save (wrapping everything up), the compiler will have been able to compile *everything else* and will just have to look at a single file.
[ 0.14473439753055573, -0.24594488739967346, -0.2830367684364319, 0.37218084931373596, 0.05153828114271164, -0.13610243797302246, 0.2927393913269043, 0.21343626081943512, -0.22093772888183594, -0.5295215845108032, 0.11686935275793076, 0.4266219437122345, -0.039796121418476105, 0.042947478592...
Is anybody know how to enable Direct2D and DirectWrite features in XP and Vista? Direct2D and DirectWrite were introduced in Windows 7. From what Microsoft has announced at this point, neither of these will be available in XP, but will be added to Vista upon their release. For details on DirectWrite (in particular, be...
[ 0.40384864807128906, 0.21205030381679535, 0.8034406900405884, 0.39811041951179504, 0.09783158451318741, -0.4502459466457367, 0.147707998752594, 0.3850717842578888, 0.14355003833770752, -0.708591878414154, 0.00924129132181406, 0.7686429619789124, -0.08071042597293854, -0.4368441104888916, ...
preview) in Vista and Windows 7.
[ -0.20809529721736908, -0.5130621194839478, 0.34452614188194275, 0.11680467426776886, -0.1209179013967514, -0.23085041344165802, 0.39540836215019226, 0.05435693636536598, -0.12976641952991486, -0.5666351318359375, -0.5547725558280945, 0.49207159876823425, -0.2859576344490051, 0.125997677445...
The following `DataTemplate.DataTrigger` makes the age display red if it is **equal to** 30. How do I make the age display red if it is **greater than** 30? ``` <DataTemplate DataType="{x:Type local:Customer}"> <Grid x:Name="MainGrid" Style="{StaticResource customerGridMainStyle}"> <Grid.ColumnDefinitions...
[ -0.17307548224925995, 0.16647136211395264, 0.7339984774589539, -0.3283618092536926, 0.2135833203792572, 0.32935631275177, -0.3324044942855835, -0.28625252842903137, -0.344143271446228, -1.0409342050552368, 0.027984265238046646, 0.6762307286262512, 0.23925526440143585, 0.2128993570804596, ...
<RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <TextBlock Grid.Column="0" Grid.Row="0" Text="First Name" Margin="5"/> <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding FirstName}" Margin="5"/> <TextBlock Grid.Column="0" Grid.Row="1" Text="Last Name" Margin="5"/...
[ -0.5046411156654358, 0.13835923373699188, 0.5019251108169556, -0.18172308802604675, -0.08644208312034607, 0.19284215569496155, -0.22044868767261505, -0.7194597125053406, -0.22733376920223236, -0.7507234811782837, 0.0692964419722557, 0.18840883672237396, 0.12508060038089752, 0.2929087877273...
<TextBlock x:Name="Age" Grid.Column="1" Grid.Row="2" Text="{Binding Age}" Margin="5"/> </Grid> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=Age}"> <DataTrigger.Value>30</DataTrigger.Value> <Setter TargetName="Age" Property="Foreground" Value="Red"/> </Dat...
[ -0.11135672777891159, 0.1571977734565735, 0.5786285996437073, -0.17610730230808258, -0.09358036518096924, 0.0917152613401413, 0.012391075491905212, -0.6427022814750671, -0.06933803111314774, -0.547978401184082, -0.0566210076212883, 0.3789657950401306, 0.008579518646001816, 0.23114378750324...
I remember correctly. So something similar to: ``` public class CutoffConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return ((int)value) > Cutoff; } public object ConvertBack(object value, Type targetType, object paramet...
[ 0.44351446628570557, -0.06789112836122513, 0.4916822910308838, -0.24697022140026093, 0.13473783433437347, -0.003933057188987732, 0.03205399587750435, -0.386028915643692, -0.07809621095657349, -0.5718793272972107, -0.206113800406456, 0.4838729500770569, -0.39283424615859985, 0.3873823583126...
Converter={StaticResource AgeConverter}}"> <DataTrigger.Value>true</DataTrigger.Value> <Setter TargetName="Age" Property="Foreground" Value="Red"/> </DataTrigger> </DataTemplate.Triggers> ```
[ 0.11559881269931793, 0.01683887466788292, 0.42826908826828003, -0.1790904402732849, 0.2856370210647583, 0.04532893747091293, -0.23808757960796356, -0.5130748152732849, -0.10923893749713898, -0.6479716300964355, -0.23234394192695618, 0.4974328279495239, 0.004465765785425901, 0.4182504713535...
I've got to make a function which is given a key (as a `String`), a value (as a `String`) and an association list of keys and values (as `[(String, String)]`). The function is meant to add the key/value pair on to the end of the list, and, if the key is already present in the list with an associated value, delete the o...
[ 0.05190950259566307, 0.15339066088199615, 0.2706674635410309, -0.08014650642871857, 0.20921285450458527, 0.26960939168930054, -0.08120180666446686, -0.14447706937789917, -0.11010678112506866, -0.2873520851135254, -0.12648338079452515, 0.4085375666618347, -0.2557911276817322, 0.456410199403...
do list functions (like dropping elements) on it. Is there any way I can look through the list and delete any list element with a given key without knowing the value associated with it? You should probably write a recursive function that takes the new key/value-pair and the existing list as parameters, and loops throug...
[ 0.28321367502212524, -0.1517304629087448, 0.06373776495456696, 0.0861210748553276, 0.004014576319605112, -0.013323385268449783, 0.1058758795261383, -0.34322622418403625, -0.4158068001270294, -0.1899249106645584, 0.17659886181354523, 0.545941948890686, -0.5556899905204773, 0.087088041007518...
new item instead of the old one. If you reach the end of the list without finding the key you just insert the new item there at the end.
[ 0.2715570330619812, -0.3272837996482849, 0.3726061284542084, 0.2300887256860733, 0.12725193798542023, -0.08897418528795242, 0.1499471366405487, -0.2703189551830292, -0.5567624568939209, -0.6060269474983215, -0.1556742936372757, 0.5116106867790222, -0.04067347198724747, 0.3825049102306366, ...
I'm a student of computer science in Germany. My professor gave use the following question to think about: 'Given a reference to a node in a single linked list (which is not the last node). Give an algorithm to delete this element from the list which has O(1) complexity while maintaining the integrity'. I thought abo...
[ 0.17747730016708374, 0.3562411069869995, 0.05640449747443199, 0.11509577929973602, 0.18482139706611633, -0.2022104412317276, 0.09240279346704483, 0.08576513826847076, -0.5474179983139038, -0.35099056363105774, -0.20293858647346497, -0.014044998213648796, -0.4076307713985443, 0.601286351680...
before the deleted. Which would lead to O(n) complexity. Am I missing anything? It depends on whether or not the nodes are mutable (in value). There *is* a way of doing it, if you can do what you like with the nodes: ``` toDelete.value = toDelete.next.value toDelete.next = toDelete.next.next ``` All the informatio...
[ -0.35232308506965637, -0.06565331667661667, 0.19463104009628296, -0.17038336396217346, 0.06891729682683945, 0.1592363864183426, 0.3035941421985626, 0.2846081852912903, -0.3794124722480774, -0.523063063621521, -0.1361188441514969, 0.20784235000610352, -0.44186651706695557, 0.304332077503204...
to work out a way of hinting at it without giving it away, but it's kinda tricky... It does rely on this not being the last node in the list though.
[ 0.30630460381507874, -0.07471957802772522, 0.19221383333206177, 0.19689705967903137, 0.0989706814289093, -0.10971106588840485, 0.3494722545146942, 0.34871765971183777, 0.011622936464846134, -0.2824176549911499, 0.32340919971466064, 0.051998380571603775, 0.04966846853494644, 0.0724932998418...
Apparently this used to be a way in VB6 and VBA to short circuit and execute the first true case: ``` Select Case True End Select ``` Is this still in use (VB.NET) ? This syntax is often used instead of an `If...ElseIf` statement. Some people find it a little easier to read. For example: ``` Select Case True Ca...
[ 0.0797896534204483, -0.03043377585709095, 0.341142475605011, -0.167676642537117, -0.03275004029273987, -0.2662281394004822, 0.07020799815654755, -0.13242672383785248, -0.006415257696062326, -0.4235498011112213, -0.10877718776464462, 0.5048073530197144, -0.17532967031002045, 0.2090735435485...
Call DoWork(testVariable) End Select ``` The answer is that yes, this still works in VB.NET. Just take care with when you use it, because it's not a "standard programming construct" and may be unfamiliar to people that have to maintain your code in the future.
[ 0.598541796207428, 0.2555570602416992, 0.3425215184688568, -0.06342462450265884, 0.000779920956119895, -0.6802548170089722, 0.43380793929100037, -0.14305426180362701, 0.1885366290807724, -0.5492029190063477, 0.020133594051003456, 0.7643083333969116, -0.1551026701927185, 0.19097396731376648...
I know most commercial games development is done in assembly or C/C++ but has anyone tried using XNA with VS 2008 to create a real time intensive application that would be fit for release in the high street as oppose to just on XBOX Live. What are the limitations you encountered and what sort of frame rates were you ge...
[ 0.4677494466304779, 0.13214562833309174, -0.2764754295349121, 0.24564163386821747, -0.15814177691936493, -0.5424920320510864, -0.16391272842884064, 0.12348052114248276, -0.016221875324845314, -0.25007519125938416, 0.5409879088401794, 0.8739013075828552, -0.17999951541423798, -0.08904530107...
from other peoples experiences with XNA and Visual Studio 2008. XNA as a technology is certainly capable of delivering performant applications. In some circumstances, such as absolute bleeding edge games, I think it's fair to say that the performance of XNA hasn't been tested. The larger issue is one of licensing. Mic...
[ 0.541448175907135, 0.16801320016384125, -0.15748515725135803, 0.20260515809059143, -0.29868635535240173, -0.19523008167743683, 0.08534453064203262, 0.2796367406845093, 0.02540537901222706, -0.23937952518463135, 0.04364480450749397, 0.6994678974151611, -0.0021166354417800903, 0.189894676208...
Some friends and I have had an idea for a website and have started working on it. It will rely on people contributing to a shared knowledgebase, and people will also be able to create personal profiles with reasonable amounts of data. We intend people should be able to leverage their content on other sites (e.g.: flick...
[ 0.8633689880371094, 0.15830278396606445, 0.36262527108192444, 0.1554821878671646, 0.1664881557226181, -0.21978577971458435, 0.22932006418704987, 0.30794987082481384, -0.3141562342643738, -0.47924259305000305, 0.18408498167991638, 0.3089264929294586, 0.6555836796760559, 0.004486586898565292...
that any data people contribute to our site is not 'locked in' and is available to other sites appropriately. Are there any specific practices we should follow, and similarly ones we should avoid? Thanks! Query the CMS database first, and build a BitSet with all the matching documents (you'll need a FieldCache to tra...
[ 0.3783304989337921, -0.09534331411123276, 0.3987128436565399, 0.6649571657180786, 0.1273326277732849, -0.005620141513645649, -0.06349816173315048, -0.0674290880560875, -0.12345997989177704, -0.6867157816886902, -0.18126638233661652, 0.49689480662345886, -0.020210420712828636, -0.0316661186...
will run very fast as well. P.S. I've only used the Java version of Lucene, but this should work fine in Lucene.NET
[ 0.28852322697639465, -0.12703539431095123, 0.3577045202255249, 0.11439092457294464, 0.1690685749053955, -0.1551676094532013, 0.03024470806121826, 0.32976850867271423, 0.065026193857193, -1.007147192955017, -0.07850956916809082, 0.4083292484283447, 0.1272636502981186, -0.25330716371536255, ...
How can I shorten the definition of my custom routes in Zend Framework? I currently have this as definition: ``` $route = new Zend_Controller_Router_Route( ":module/:id", array( "controller" => "index", "action" => "index" ), array("id" => "\d+") ); self::$frontController->getRouter()-...
[ 0.015247986651957035, -0.2525515556335449, 0.7903352379798889, -0.16457587480545044, 0.002505125943571329, 0.16441038250923157, 0.17952989041805267, -0.4743095338344574, -0.23502840101718903, -0.8119929432868958, -0.11480008065700531, 0.35937047004699707, -0.2235690802335739, 0.13369368016...
there a way to better combine these rules? And what are your best practices in where to place these? I currently have them in my bootstrap class right after the Front Controller initialization. When it comes to setting up routes like this, I use a config file. As a preference, I use XML to store my config data, however...
[ 0.22813139855861664, -0.060703981667757034, 0.7009692788124084, 0.14857612550258636, 0.18874026834964752, -0.2693389654159546, -0.12686210870742798, -0.2468453347682953, -0.13348567485809326, -0.8889042735099792, 0.19204722344875336, 0.24966943264007568, -0.1258736550807953, -0.14040486514...
<route>:module/:id</route> <defaults> <controller>index</controller> <action>index</action> </defaults> <reqs id="\d+"> </shortcutone> <shortcuttwo type="Zend_Controller_Router_Route">
[ -0.1976109743118286, -0.7935939431190491, 0.22400785982608795, 0.06805550307035446, -0.11079806834459305, 0.15322278439998627, -0.05396342650055885, -0.5797255635261536, -0.6451950669288635, -0.5085538029670715, -0.07070030272006989, 0.2257205992937088, -0.16574732959270477, 0.104469075798...
<route>:module/:controller/:id</route> <defaults> <controller>index</controller> </defaults> <reqs id="\d+"> </shortcuttwo> <shortcutthree type="Zend_Controller_Router_Route"> <route>:module/:controller/:action/:id</route>
[ -0.2048073559999466, -0.6035624146461487, 0.2431633174419403, -0.058552514761686325, -0.11281745135784149, 0.2822752296924591, 0.02216986194252968, -0.7022938132286072, -0.7436482906341553, -0.45800378918647766, -0.1964605301618576, 0.3851775825023651, -0.06947145611047745, -0.033024840056...
<defaults> <controller>index</controller> <action>index</action> </defaults> <reqs id="\d+"> </shortcutthree> </routes> </config> ``` **Bootstrap** ``` $config = new Zend_Config_Xml('config.xml'); $router = Zend_Controller_Front::getInstance()->getR...
[ 0.09014024585485458, -0.5303896069526672, 0.5926564931869507, 0.15366607904434204, -0.0649639144539833, -0.19896170496940613, 0.12932612001895905, -0.3720625936985016, -0.5059124231338501, -0.8583570122718811, -0.17045411467552185, 0.48038214445114136, -0.2893465459346771, -0.0172127354890...
I am developing in python a file class that can read and write a file, containing a list of xyz coordinates. In my program, I already have a Coord3D class to hold xyz coordinates. My question is relative to the design of a getCoordinate(index) method. Should I return a tuple of floats, or a Coord3D object? In the fi...
[ 0.19464802742004395, 0.1259039044380188, 0.41806021332740784, 0.14922477304935455, -0.24285632371902466, -0.04823220521211624, -0.20638573169708252, -0.13793876767158508, 0.15918251872062683, -0.6815093159675598, 0.2115255892276764, 0.4748048782348633, -0.44825753569602966, 0.2579252421855...
Coord3D class. Please note that I think there's not a huge difference between the two solutions, but I would like to read your answer and the reason behind it. --- **Edit**: to recap the answers I got until now, it looks like there's no clearcut choice. It has been said (appropriately) that python is not Java, and y...
[ 0.13461095094680786, -0.028644604608416557, 0.02990075759589672, -0.09077323973178864, -0.3124525249004364, -0.3303753137588501, 0.2923894226551056, 0.033202074468135834, -0.08313479274511337, -0.4776360094547272, -0.15750367939472198, 0.6045718193054199, -0.41082850098609924, -0.110031552...
my library, as the data types will be uniformly used. 2. The Coord3D object has state and behavior. Indeed, the Coord3D object aggregate the coordinates and the units in a single entity. Operations among Coord3D objects will keep into account the potentially different units, and act accordingly. 3. I can put centralize...
[ -0.08345241099596024, 0.04193967580795288, 0.26164406538009644, 0.14566239714622498, -0.2266884744167328, -0.06390903890132904, 0.2506808340549469, -0.1979498714208603, 0.057900816202163696, -0.7056405544281006, -0.09368275105953217, 0.49544623494148254, -0.31916344165802, 0.15550668537616...
for isinstance, or check the interface). A tuple can contain invalid data. Although python approach to error handling is done where the trouble happen, a class preventing me to have an xyz coordinate made out of three strings is somehow beneficial (correct me if wrong, please) On the other hand, using a tuple has the ...
[ 0.018192559480667114, -0.21230095624923706, 0.24554790556430817, 0.3133902847766876, -0.3331512212753296, -0.25548437237739563, 0.4267748296260834, -0.16324642300605774, -0.03723856806755066, -0.697859525680542, -0.5744695663452148, 0.24363596737384796, -0.47611764073371887, 0.044724386185...
class is totally decoupled from the rest of the library (because it does not use the Coord3D object). This means that it can be reused totally as an independent entity. further comments very welcome! I've asked myself the same question, albeit while doing 2D geometry stuff. The answer I found for myself was that if I...
[ 0.03218281641602516, -0.31026148796081543, -0.06410907208919525, 0.41619402170181274, -0.2672351896762848, -0.13390854001045227, 0.2689023017883301, 0.3273370862007141, -0.07484208792448044, -0.4901236891746521, -0.22611567378044128, 0.27201980352401733, 0.016858195886015892, 0.20976606011...
do with it, and is it worth the effort.
[ 0.3597867786884308, 0.47769269347190857, -0.19571219384670258, -0.09466733038425446, 0.12086142599582672, -0.09885868430137634, 0.026332883164286613, -0.052176862955093384, 0.044616542756557465, -0.5217571258544922, 0.0690964087843895, 0.20833592116832733, 0.3657049536705017, -0.5073833465...
I need to look up thousands of rows by ID, but the IDs come from outside the DB, so I can't get them from other tables like so: > SELECT \* FROM some\_table WHERE ID IN ( > SELECT KnownID FROM some\_other\_table WHERE someCondition > ) Is there anything better than this: > SELECT \* FROM some\_table WHERE ID IN (...
[ 0.12952543795108795, 0.0343741774559021, 0.051184870302677155, 0.10716791450977325, -0.2523024380207062, 0.1578095257282257, 0.07441412657499313, -0.49802520871162415, 0.04498280957341194, -0.7124675512313843, 0.3542753756046295, 0.3280661702156067, -0.3274577558040619, 0.16744627058506012...
temp table with the variable values and do a "`select were in`".
[ -0.09696386009454727, -0.19805359840393066, 0.18300969898700714, 0.0410333089530468, -0.09286580234766006, -0.019667908549308777, 0.09678735584020615, -0.20095206797122955, 0.1163584366440773, -0.11878034472465515, -0.017302902415394783, 0.3870766758918762, -0.28122982382774353, -0.0586466...
I'm looking at refactoring a lot of large (1000+ lines) methods into nice chunks that can then be unit tested as appropriate. This started me thinking about the call stack, as many of my rafactored blocks have other refactored blocks within them, and my large methods may well have been called by other large methods. ...
[ 0.11178086698055267, 0.21394765377044678, 0.05090424418449402, -0.057262126356363297, -0.23018260300159454, -0.0727081224322319, 0.2350963056087494, -0.18715357780456543, -0.29833275079727173, -0.2812943458557129, 0.077309750020504, 0.25285056233406067, -0.32235097885131836, 0.071317069232...
I wouldn't worry about call stack issues until they appear (which they likely won't). Regarding recursion: it must be carefully implemented and carefully tested no matter how it's done so this would be no different.
[ 0.1925215870141983, -0.05177420750260353, -0.01741425320506096, 0.24149973690509796, -0.16099609434604645, -0.28109726309776306, 0.5003505945205688, -0.07473823428153992, -0.3351818323135376, -0.31764477491378784, -0.18599767982959747, 0.5431153178215027, -0.05383824557065964, -0.355843156...
What is the best way to transform large bunches of very similar web pages into a newer css-based layout programatically? I am changing all the contents of an old website into a new css-based layout. Many of the pages are very similar, and I want to be able to automate the process. What I am currently thinking of do...
[ 0.48245736956596375, 0.002705070422962308, 0.07605751603841782, 0.11101939529180527, -0.07283896952867508, -0.054172854870557785, 0.06840641796588898, -0.010371921584010124, -0.3505740761756897, -0.9244692325592041, 0.27256959676742554, 0.3610524535179138, -0.3234267234802246, 0.0580343194...
which .jpg file is used for the image, or how many groups of heading-image-text there are on that particular page EDIT: I cannot use any other file type than .html, as that is all I am authorized to do. Any suggestions? EDIT2: Ideally, I would also be able to make this be generic enough that I could use it for many d...
[ 0.5059821009635925, -0.05096668004989624, 0.36791232228279114, 0.06518001109361649, -0.16970396041870117, -0.17208191752433777, 0.01104797888547182, -0.14353960752487183, -0.19823916256427765, -0.3726048469543457, -0.17220711708068848, 0.23088379204273224, -0.34079188108444214, -0.13255183...
Do you know of any open-source Zend Framework applications besides Magento that show in a good OOP-way how to develop big apps with Zend Framework? My problem right now is, that I'm pretty good at PHP and OOP, but I don't have enough knowledge of the Zend Framework and how things should be solved in it. So do you kno...
[ 0.14448462426662445, 0.27477940917015076, 0.06063706427812576, 0.025740206241607666, -0.36616015434265137, -0.17550836503505707, 0.07672237604856491, -0.16540372371673584, -0.32373520731925964, -0.3849666118621826, -0.11425656825304031, 0.744452178478241, -0.08293464779853821, -0.329339414...
I have a site, e.g. `example.com`, where users can set their own subdomains (one user - one subdomain) and upload their own scripts, e.g. `http://somedomain.example.com/xyzzy.php` would map to `/www/somedomain/xyzzy.php` Now, on some of those domains, Internet Explorer 7 won't/can't accept cookies. Checked with Fiddle...
[ 0.5285537242889404, 0.09763378649950027, 0.5315328240394592, -0.1548643708229065, -0.014640552923083305, -0.3371092975139618, 0.4360515773296356, 0.08145800232887268, 0.004298724699765444, -0.8140832781791687, -0.15618184208869934, 0.07208478450775146, -0.14682826399803162, 0.3020511567592...
and Chrome all work without problems. Why does IE ignore the cookies? Does one of the subdomains use an underscore? IE has problems accepting cookies from subdomains that don't follow the [URI RFC](http://www.ietf.org/rfc/rfc2396.txt).
[ 0.4842565059661865, 0.23217341303825378, 0.10293690860271454, -0.02021300233900547, -0.3390483856201172, -0.3630729019641876, 0.32308265566825867, 0.06481222063302994, -0.0032934239134192467, -0.6758847236633301, -0.22792908549308777, 0.5597267746925354, -0.4582482874393463, -0.08557458221...
I have an array of doubles and need to do a calculation on that array and then find the min and max value that results from that calculation. Here is basically what I have: ``` double * array; double result; double myMin; double myMax; // Assume array is initialized properly... for (int i = 0; i < sizeOfArray; ++i) {...
[ 0.24197053909301758, -0.3681604266166687, 0.574099063873291, -0.24438253045082092, 0.1671202927827835, 0.22100162506103516, 0.38915038108825684, -0.6563770174980164, -0.12800157070159912, -0.26847201585769653, 0.075264573097229, 0.5068604946136475, -0.1627955287694931, 0.22707599401474, ...
myMin = result; } else if (result > myMax) { myMax = result; } } ``` I'm getting a warning that the value computed for `result` is never used, and since we treat all warnings as errors, this doesn't compile. How can I fix this code to avoid the warning? I'm using g++ for my compiler. Here's the w...
[ 0.049959950149059296, 0.17679086327552795, 0.607143223285675, 0.09989450871944427, 0.23566851019859314, -0.16696643829345703, 0.32384541630744934, -0.023547695949673653, -0.12718656659126282, -0.38546621799468994, -0.014928223565220833, 0.5796442031860352, -0.44598132371902466, 0.193433105...
I've got things working now. Thanks to everyone for taking the time to help me out. Assuming you don't need `result` outside of the loop, you could declare `result` inside the loop thusly: ``` for( int i=0; i < sizeOfArray; ++i ) { double result = transmogrify( array[i] ); ... } ```
[ 0.33710044622421265, -0.2701471447944641, 0.4626414477825165, -0.32173073291778564, 0.08419983088970184, 0.07050839066505432, 0.5034577250480652, -0.5179622173309326, -0.33428075909614563, -0.4012303054332733, 0.07850732654333115, 0.3920723497867584, -0.17698787152767181, 0.343961328268051...
This isn't about the different methods I could or should be using to utilize the queues in the best manner, rather something I have seen happening that makes no sense to me. ``` void Runner() { // member variable queue = Queue.Synchronized(new Queue()); while (true) { if (0 < queue.Count) { ...
[ 0.05917597934603691, -0.4605603814125061, 0.2571401000022888, 0.051284875720739365, 0.10320847481489182, -0.20565056800842285, 0.386990487575531, -0.10995873063802719, -0.3408980369567871, -0.4357343316078186, 0.11486317962408066, 0.39026105403900146, -0.5502851605415344, 0.469379752874374...
true; t.Start(); ``` Other events are "Enqueue"ing else where. What I've seen happen is over a period of time, the Dequeue will actually throw InvalidOperationException, queue empty. This should be impossible seeing as how the count guarantees there is something there, and I'm positive that nothing else is "Dequeue"i...
[ 0.28749528527259827, -0.1987103819847107, 0.1721045821905136, -0.03217049315571785, 0.28007468581199646, -0.12320469319820404, 0.5130097270011902, 0.05628896504640579, -0.38601601123809814, -0.4509322941303253, -0.12272798269987106, 0.3730967044830322, -0.11794743686914444, 0.4327799081802...
that implements the background helper thread. The Dequeue here is the only Dequeue, and all Enqueue/Dequeue are on the Synchronized member variable (queue). Using Reflector, you can see that no, the count does not get increased until after the item is added. As Ben points out, it does seem as you do have multiple peo...
[ 0.32154273986816406, -0.2948208153247833, 0.3231864869594574, -0.04083157330751419, 0.07040511816740036, 0.21451576054096222, 0.23331761360168457, 0.011795906350016594, -0.4246025085449219, -0.3796887695789337, 0.062443725764751434, 0.3720729351043701, -0.6151467561721802, 0.27527353167533...
just kept running and running without any exceptions. How long was it running before you got errors? Maybe you can share a bit more of the code. ``` class Program { static Queue q = Queue.Synchronized(new Queue()); static bool running = true; static void Main() { Thread producer1 = new Thread...
[ 0.8274030685424805, -0.24188296496868134, 0.32821789383888245, -0.006799658294767141, 0.18873906135559082, 0.016179809346795082, 0.20912429690361023, 0.41380271315574646, -0.6135461926460266, -0.11351443082094193, 0.25638118386268616, 0.5178506970405579, -0.42927077412605286, 0.57485240697...