text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Alright, I think we all agree that what happens with the following code is undefined, depending on what is passed, ``` void deleteForMe(int* pointer) { delete[] pointer; } ``` The pointer could be all sorts of different things, and so performing an unconditional `delete[]` on it is undefined. However, let's ass...
[ 0.36673447489738464, -0.040048256516456604, 0.23991316556930542, -0.28217944502830505, 0.05267876759171486, -0.10062865912914276, 0.4969998300075531, -0.22590194642543793, -0.2486283928155899, -0.2203332930803299, -0.07651933282613754, 0.8101049661636353, -0.3510047197341919, 0.18856021761...
point of view, it has no idea whether or not `arr` is an array pointer versus a pointer to a single int. Heck, it doesn't even know whether `arr` was dynamically created. Yet, if I do the following instead, ``` int main() { int* num = new int(1); deleteForMe(num); return 0; } ``` The OS is smart enoug...
[ -0.07949111610651016, -0.10683243721723557, 0.21527673304080963, -0.14106135070323944, -0.03065025806427002, -0.0851341262459755, 0.5692610740661621, -0.010130698792636395, -0.19524064660072327, -0.30510780215263367, -0.10286489129066467, 0.6996331810951233, -0.25460028648376465, 0.2418130...
going until it hits 0). So whose job is it to remember these things? Does the OS keep some type of record in the background? (I mean, I realise that I started this post by saying that what happens is undefined, but the fact is, the 'killing spree' scenario doesn't happen, so therefore in the practical world *someone* ...
[ 0.1719818115234375, -0.10861125588417053, 0.3492339551448822, 0.06716828048229218, 0.16256816685199738, -0.3433058261871338, 0.5211830735206604, 0.08382507413625717, -0.4676381051540375, -0.3068336546421051, -0.31748855113983154, 0.6685936450958252, -0.17240561544895172, 0.2494593560695648...
keep track of how many objects need to be deleted somehow. It may do this by over-allocating enough to store the array size. For more details, see the [C++ Super FAQ](https://isocpp.org/wiki/faq/freestore-mgmt#num-elems-in-new-array).
[ 0.07456379383802414, 0.006069913040846586, -0.0009031078079715371, 0.07129532098770142, 0.08050013333559036, -0.2239789515733719, 0.2125639021396637, -0.20684896409511566, -0.5351443886756897, -0.41602736711502075, -0.5026751756668091, 0.2013271450996399, -0.25580257177352905, -0.022916072...
I'm trying to build database application using GWT 1.5.3. I use JPA annotations with my objects. It seems in hosted mode GWT's RPC works fine. But when I try to compile my app using GWT-compiler I get errors like: "The import javax.persistence cannot be resolved", "Entity cannot be resolved to a type". toplink-essentia...
[ 0.11086761951446533, 0.23100979626178741, 0.26920878887176514, 0.07273774594068527, -0.1738586723804474, -0.14708060026168823, 0.5066199898719788, 0.007820564322173595, -0.35354310274124146, -0.70976722240448, 0.24293093383312225, 0.5386331677436829, -0.25466853380203247, 0.106132790446281...
the origin of this jpa-annotations-source.jar file?
[ 0.2625139355659485, 0.22841235995292664, 0.018222002312541008, 0.13802415132522583, -0.32714879512786865, -0.09952768683433533, -0.05037539079785347, 0.041375476866960526, -0.15861240029335022, -0.007659947965294123, 0.10135246813297272, 0.07365003228187561, -0.00888888444751501, 0.3555874...
I want to implement a business directory in WordPress and I am looking for feedback on the best approach: 1. I have a categories and a businesses table 2. Do I create a page for every business together with it's category relationship 3. Do I create a page and assign it a template? 4. What are the ups and downs with ea...
[ 0.550988495349884, 0.105961374938488, 0.4799880087375641, 0.06841056048870087, 0.06406284123659134, -0.017272286117076874, -0.07085485011339188, -0.17062856256961823, -0.03865072503685951, -0.7547574639320374, 0.2239799201488495, 0.5458527207374573, -0.14000661671161652, 0.0679030567407608...
I was wondering if there are any source control systems that allow administrators to define custom keywords which are replaced on check in with different behaviours (i.e. similar to $Id$ or $Author$ etc.) I'm only familiar with SVN and CVS which have a set list of keywords, but there would be applications for somethin...
[ 0.635097086429596, -0.1042848601937294, 0.16390790045261383, 0.04968206584453583, -0.09002334624528885, -0.12706531584262848, 0.2645004391670227, 0.09301906824111938, -0.38320666551589966, -0.4122832417488098, 0.012743827886879444, 0.62763512134552, -0.24035169184207916, 0.1940631419420242...
something like that? Edit: Doing it as a part of the build is a valid way of solving the problem, however would cause issues if a developer did not do a build prior to check-in. Imagine for something like $LineNo$, if the build was not in sync with the source exactly, the value could easily be incorrect. For keywords ...
[ 0.4941277503967285, -0.5462662577629089, 0.01940063014626503, -0.04954202100634575, -0.12174917757511139, -0.12677323818206787, 0.4861013889312744, -0.06062864139676094, -0.2913614511489868, -0.7725456953048706, -0.017370332032442093, 0.5002036094665527, -0.4893159866333008, 0.080324977636...
let you transform a file in any arbitrary way when you check it out and transform it back again when you check it in.
[ 0.17502696812152863, -0.2678607702255249, -0.2346232682466507, 0.07664845883846283, 0.03412085399031639, -0.24627795815467834, 0.05116196349263191, -0.02355923317372799, -0.006232902407646179, -0.8281019926071167, -0.31057682633399963, 0.41155293583869934, -0.44480735063552856, 0.053946562...
I am working on a consumer facing web application built on .Net/C# MSSQL as the databse We have been following general good coding practices to prevent bugs and SQL/JS query injections but non of us are experts on security. What would be a good checklist to find out how really secure is the application we are buildin...
[ 0.3696703314781189, 0.33135953545570374, 0.051681339740753174, 0.12617340683937073, 0.12138409912586212, -0.23091809451580048, 0.18253006041049957, -0.13662907481193542, 0.07265349477529526, -0.7935012578964233, 0.06347479671239853, 0.560785710811615, -0.051218848675489426, -0.052106883376...
all the three needs - * [OWASP Development Guide](http://www.owasp.org/index.php/Category:OWASP_Guide_Project) * [OWASP Code Review Guide](http://www.owasp.org/index.php/Category:OWASP_Code_Review_Project) * [OWASP Testing Guide](http://www.owasp.org/index.php/Category:OWASP_Testing_Project) And then to top it off, ...
[ 0.49755358695983887, -0.015326089225709438, 0.1942591518163681, 0.21850816905498505, 0.00856201071292162, -0.0877925306558609, 0.32116439938545227, -0.1631729006767273, -0.038224074989557266, -0.744391918182373, 0.0014690515818074346, 0.8490729928016663, -0.07423975318670273, -0.2497187554...
I want to implement the usual cooperative mechanism for canceling a thread. However the java memory model was only fixed in JDK5 while I'm in a pre-JDK5 environment. I understand, this means that doing something like this, as espoused in SCIP, will not be correct. ``` class Worker implements Runnable { private vol...
[ 0.48160871863365173, -0.08188983798027039, -0.08771158754825592, -0.14264866709709167, 0.19472260773181915, -0.21891184151172638, 0.23837068676948547, 0.22193920612335205, -0.24758164584636688, -0.2596410810947418, -0.011329888366162777, 0.9189348816871643, -0.6170990467071533, 0.346137642...
// do my Stuff } } } ``` I'm thinking of using an AtomicBoolean to encapsulate the \_canceled variable. Any other alternatives ? `AtomicBoolean` was also added in JDK5, so this isn't available unless you are using the [backport](http://backport-jsr166.sourceforge.net/). However, yes, the atomic class from...
[ 0.3006865978240967, 0.24924400448799133, 0.03261344134807587, -0.08797832578420639, 0.06546803563833237, -0.43460193276405334, 0.22554923593997955, 0.06267901510000229, -0.12141167372465134, -0.3068646192550659, -0.12121579051017761, 0.6748837232589722, -0.3184455335140228, -0.203071549534...
On my page, I have custom styled hyperlinks, and I also have alot of hyperlinked images. I don't want these custom styles to appear on the hyperlinks that only contain images. Instead of adding a separate class (i.e "nostyle") to each hyperlinked image, can I somehow target the hyperlinked images from my stylesheet? Yo...
[ 0.5712040066719055, -0.005455922335386276, 0.26248207688331604, 0.13852456212043762, -0.3331203758716583, 0.07125075161457062, 0.384084552526474, 0.13220687210559845, -0.03798406571149826, -0.7971176505088806, 0.010080545209348202, 0.25026735663414, -0.022367320954799652, 0.248849734663963...
This runs in ActionScript 3 and JavaScript. Why? I know how `&&` and `||` work, but a list? Is this AS3 specific? Is this in other languages? I'm a mouth breathing PHP/AS2 programmer. Or did everyone already know this and I'm a tool for not reading documentation properly? AS3 ``` if (true, true, true) { trace("t...
[ 0.14938867092132568, -0.09231103211641312, 0.277854859828949, -0.2615237534046173, 0.15163201093673706, -0.11190561205148697, 0.4008665978908539, -0.42739221453666687, -0.09598812460899353, -0.4339789152145386, 0.08797454088926315, 0.6771637797355652, -0.3660337030887604, -0.51741510629653...
{ alert("false"); } //result - "false" alert message popped up ``` I presume JavaScript has a comma operator like C, which takes multiple arguments and returns the last one. It's typically used to for loops where you want to initialize more than one value: ``` for(i=0, j=0; j< 10; j++) { ... } ```
[ 0.12176725268363953, -0.16314125061035156, 0.03840314596891403, -0.36044779419898987, -0.08805042505264282, -0.2146860510110855, 0.3730165660381317, -0.17562922835350037, -0.07757929712533951, -0.26218003034591675, -0.3116472363471985, 0.45347294211387634, -0.6948466897010803, -0.262523710...
I setup PyDev with this path for the python interpreter /System/Library/Frameworks/Python.framework/Versions/2.5/Python since the one under /usr/bin were alias and Eclipse won't select it. I can run my python script now but cannot run the shell as an external tool. The message I get is variable references empty select...
[ 0.07322919368743896, -0.0004794567357748747, 0.4827812612056732, -0.2347690761089325, -0.12465360015630722, 0.0605955608189106, 0.2659885883331299, -0.16894856095314026, 0.13221679627895355, -0.8166186213493347, 0.12735037505626678, 0.5914750695228577, -0.6389213800430298, 0.12515828013420...
From the following site: <http://crfdesign.net/programming/top-10-differences-between-java-and-c> > Unfortunately, `List<>` is not thread-safe (C#’s `ArrayList` and Java’s > `Vector` are thread-safe). C# also has a `Hashtable`; the generic version is: What makes `List<T>` not thread-safe? Is it implementation probl...
[ 0.07625160366296768, -0.20666716992855072, 0.10840322077274323, 0.006374938413500786, -0.5810151696205139, -0.17676469683647156, 0.12342894077301025, -0.20664821565151215, -0.40057137608528137, -0.5883222818374634, 0.14653998613357544, 0.44551393389701843, -0.5841167569160461, 0.1060143858...
vector ``` Vector vector = getVector(); if ( vector.size() > 0 ) { object first = vector.get(0); } ``` This method will not corrupt the state of the vector, but it also is not correct. There is nothing stopping another thread from mutating the vector in between the if statement an the get() call. This code can an...
[ 0.0978064090013504, -0.3491804003715515, 0.4707036316394806, 0.33345526456832886, -0.1506681889295578, -0.026599932461977005, 0.23986297845840454, -0.00009136182779911906, -0.13470183312892914, -0.7338515520095825, 0.15372446179389954, 0.6534069776535034, -0.7150165438652039, 0.12147539108...
by default for a scenario of only limited usefulness. Instead it chose to implement a lock free List. Authors are responsible for adding any synchronization. It's closer to C++'s model of "pay only for what you use" I recently wrote a couple of articles on the dangers of using collections with only internal synchroni...
[ 0.09386328607797623, -0.08900581300258636, 0.17268678545951843, 0.08758505433797836, -0.2316918671131134, -0.25736743211746216, 0.2284628003835678, -0.10234812647104263, -0.6954012513160706, -0.48595955967903137, -0.31985366344451904, 0.6821339726448059, -0.3712359070777893, 0.015253770165...
I have a data structure something like this: ``` typedef struct tagSUB_DATA { double measuredValue; double standardDeviation; double calculatedValue; double weightedError; } SUB_DATA; typedef struct tagALL_THE_DATA { int aNumber; double aDouble; SUB_DATA measurements1; SUB_DATA measur...
[ 0.22222107648849487, 0.09303896874189377, 0.289267361164093, 0.01965339668095112, -0.23617611825466156, -0.005331436172127724, 0.03889027610421181, -0.4943675100803375, -0.12975220382213593, -0.6059637665748596, -0.09588152170181274, 0.0848567858338356, -0.3419705629348755, 0.3060921430587...
Key) Field: aNumber (int) Field: aDouble (double) Field: measurements1 (int, Foreign Key referencing SUB_DATA) Field: measurements2 (int, Foreign Key referincing SUB_DATA) Table: SUB_DATA Field: ID (int, Primary Key) Field: measuredValue (double) Field: standardDeviation (double) Field: calculatedValue (double) Field:...
[ 0.14386294782161713, -0.04091421142220497, 0.01108885370194912, 0.21819540858268738, -0.23049093782901764, 0.257515013217926, -0.13749659061431885, -0.4869335889816284, -0.11187750846147537, -0.27886927127838135, -0.38408562541007996, 0.32529303431510925, -0.08156238496303558, -0.030655309...
that rockets and apples have their own (identically-designed) tables? ``` Table: ALL_THE_DATA Field: ID (int, Primary Key) Field: aNumber (int) Field: aDouble (double) Field: appleMeasurements (int, Foreign Key referencing APPLE_MEASUREMENTS) Field: rocketMeasurements (int, Foreign Key referencing ROCKET_MEASUREMENTS)...
[ -0.0038636724930256605, 0.6877967715263367, 0.18461336195468903, 0.11619196832180023, 0.03305775299668312, 0.3756779432296753, -0.15560078620910645, -0.18265922367572784, -0.2539200484752655, -0.3541423976421356, -0.25595560669898987, 0.6097006797790527, -0.028858289122581482, -0.240942299...
I can't really post actual code here) **Extra Information:** In this case, we can be certain that rockets and apples will not change their fields later, so I'm not too worried about the case of "what if the fields in either rocket or apple change later". If your SUB\_DATAs really are Apples and Rockets (and always ...
[ 0.3566080629825592, 0.1794820874929428, 0.05871085822582245, 0.5348253846168518, 0.1602115035057068, 0.1759229451417923, 0.03557339683175087, 0.4652729034423828, -0.3087899088859558, -0.5300711393356323, -0.3226909637451172, 0.4065658748149872, 0.01732303388416767, 0.0796780064702034, -0...
you mix both into the same table, you run the risk that wanting to change the structure of one of them, but not the other, just as you would if you used the same class. If that is a possibility for the future, then obviously don't share them in the same table. Or, if they share something in common and may have differen...
[ 0.2772189974784851, -0.11550832539796829, -0.5701718330383301, 0.25795912742614746, -0.2528097629547119, 0.004174820147454739, 0.16809216141700745, 0.006983099039644003, -0.30228349566459656, -0.7742259502410889, 0.007622473407536745, 0.12940993905067444, -0.4281548261642456, 0.06691914796...
you do, don't start your database before you're 100% sure what is going to stay in common and what may change.
[ 0.6990913152694702, 0.23612985014915466, -0.07535095512866974, 0.3173596262931824, 0.5056068897247314, -0.5128414034843445, 0.1652827113866806, 0.34231334924697876, -0.0845511183142662, -0.27501094341278076, 0.20610803365707397, 0.2818903923034668, 0.151849627494812, 0.21841378509998322, ...
I use vim as my editor but I would like to get some of the same power of the IDE's for java when it comes to refactoring. Are there any commandline tools for refactoring java? I could probably hack something together using perl or vim scripting but if there is something already out there I'd rather use that. Check out ...
[ 0.3100322186946869, 0.04184304550290108, 0.27905911207199097, -0.025309015065431595, -0.21734772622585297, -0.17401175200939178, 0.17320360243320465, 0.12527117133140564, -0.22477670013904572, -0.8991529941558838, 0.09417007118463516, 0.5265741944313049, -0.14246146380901337, -0.0304831452...
Ideally you want a schedule that's accommodating and flexible but when it comes to paying the bills and working in a business, that's rarely a luxury programmers have. I have been fortunate to have the grace of Steve McConnell and Frederick Brooks to tell me what to do if I want to screw up my project and I take their...
[ 0.9381288290023804, 0.2010398954153061, -0.22578437626361847, 0.07733692228794098, 0.14121682941913605, 0.16169099509716034, 0.06126517429947853, -0.023267637938261032, -0.3295462727546692, -0.5390227437019348, -0.035779405385255814, 0.7784874439239502, 0.27908390760421753, -0.149798914790...
possible? I consider learning good practices to be of higher value than learning the actual code so no "be a better coder" answers. That's a given. Arrange my tasks in some sort of list of small independent tasks (or, tasks where the dependencies are already taken care of in the order). Then, just sit down and clear o...
[ 0.42494720220565796, 0.03546346351504326, 0.07865465432405472, 0.32647472620010376, 0.17018507421016693, 0.02076459676027298, 0.4554116427898407, -0.08830878138542175, -0.18964071571826935, -0.6523059606552124, -0.1659400314092636, 0.29071468114852905, -0.04419363662600517, -0.147512659430...
Then I deal with all of my coordination with other people, re-planning, and so on in one batch, and go heads down into straight coding again. Also, prioritize and cut everything that's optional. If you get the required stuff done in time, then go back to the optional stuff, but do what is absolutely required first. Th...
[ 0.8365314602851868, 0.1414896547794342, -0.26406699419021606, 0.12010180950164795, 0.04746418073773384, -0.04637010022997856, 0.12319954484701157, 0.08381619304418564, -0.17675238847732544, -0.6304918527603149, -0.08649738878011703, 0.8617804646492004, 0.08448180556297302, -0.3893920779228...
just take one task off your list, do it, and move on to the next. As I said, batch up all of the non-coding work into chunks so it doesn't slow your coding down. Anyhow, that's what I do when I'm up against a wall. Not sure how well it works for anyone else.
[ 0.8432022929191589, 0.1636151671409607, -0.5362668037414551, 0.11137248575687408, -0.11061640083789825, 0.0390125997364521, 0.19297757744789124, 0.16572146117687225, -0.31360936164855957, -0.3934672772884369, 0.27610304951667786, 0.36943939328193665, -0.06466566771268845, -0.23569308221340...
What are the different ways to handle animations for 3D games? Do you somehow program the animations in the modeler, and thus the file, than read and implement them in the game, or do you create animation functions to animate your still vectors? Where are some good tutorials for the programming side of this? Google on...
[ 0.4318843185901642, -0.11672456562519073, 0.21873998641967773, 0.4960865378379822, 0.12812814116477966, 0.4809873402118683, -0.15528221428394318, -0.009046853519976139, -0.02851940132677555, -0.38480159640312195, 0.1782873123884201, 0.585603654384613, -0.1407860964536667, -0.15645915269851...
out into the game's data format. The game then loads these keyframes, and to animate the model at a particular time, it picks the two nearest keyframes and interpolates between them to give a smooth animation, even with a small number of keyframes. Animated models are typically constructed with a bone hierarchy. Ther...
[ -0.07318226248025894, -0.1021336242556572, 0.14983545243740082, 0.2505459785461426, 0.2601539194583893, 0.5560178756713867, 0.10322301089763641, -0.09721192717552185, -0.3845534026622772, -0.47559669613838196, -0.3065620958805084, -0.03654469549655914, 0.04005904495716095, 0.21257460117340...
a much smaller number of parameters: the relative positions, orientations, and scales of each bone. Smooth skinning is a technique used to improve the quality of animations. With smooth skinning, a vertex is not tied to just one bone, but it can be tied to multiple bones (usually a hard limit, such as 4, is set; verti...
[ 0.1875924915075302, -0.017270341515541077, 0.05633609741926193, 0.526248574256897, -0.04920324310660362, 0.459741473197937, 0.18265971541404724, -0.08736687898635864, -0.5810005068778992, -0.7537439465522766, -0.007290804758667946, 0.37626883387565613, 0.12732331454753876, -0.2050069719552...
*procedural animation*, whereby the animation data is constructed at runtime. The bone positions and orientations are computed according to some algorithm, such as [inverse kinematics](http://en.wikipedia.org/wiki/Inverse_kinematics) or [ragdoll physics](http://en.wikipedia.org/wiki/Ragdoll_physics). Other options are ...
[ 0.22107379138469696, 0.14854498207569122, 0.13818325102329254, 0.4509012997150421, -0.2859712839126587, 0.5723276138305664, 0.17850810289382935, -0.2691369950771332, -0.2127169817686081, -0.8322802782058716, 0.13451674580574036, 0.3487823009490967, -0.09604281187057495, 0.01246224809437990...
i need to add JavaScript calls in some controls attributes, i am using master pages but in order to obtain the contentplaceholder client id i am iterating over the forms controls. is there another way to obtain in the server side code of the content page? ``` foreach (Control control in this.Form.Controls) ...
[ 0.0007079094648361206, 0.1128445491194725, 0.4814479649066925, 0.09164852648973465, 0.10424918681383133, -0.30325284600257874, 0.20755714178085327, -0.32332971692085266, 0.0033164883498102427, -0.6178401708602905, -0.08960668742656708, 0.4450376331806183, -0.3059779703617096, -0.0019832095...
{ contentPlaceHolderID = control.ClientID; break; } } ``` If there's only few controls
[ 0.045086756348609924, -0.11125066876411438, 0.5449501276016235, 0.2009810507297516, 0.24607323110103607, -0.5256140232086182, 0.11487124115228653, -0.12426073849201202, 0.04567025974392891, -0.42709794640541077, -0.44949865341186523, 0.6644411087036133, -0.18660162389278412, 0.129959121346...
like this you can set up a global variable: ``` var contentPlaceholderId = '<%= this.ContentPlaceholder1.ClientId %>' ```
[ -0.31742310523986816, -0.16715390980243683, 0.5312116146087646, 0.010811494663357735, 0.07877754420042038, -0.23179951310157776, -0.06656493246555328, 0.2886674106121063, -0.04610636085271835, -0.536372184753418, -0.11750069260597229, 0.47652867436408997, -0.4907758831977844, 0.28593832254...
I am fairly new to this discussion but I HAVE to ask this question even at the risk of sounding 'ignorant'. Why is it that we now stress so much on 'DDD'. The more I look into 'DDD' the more complex it seems to make my application. Whereas modeling my domain with the database helps keep my application consistent across...
[ 0.47410061955451965, 0.07862727344036102, 0.1869233399629593, 0.12746992707252502, -0.30165114998817444, -0.3145170509815216, -0.030839109793305397, 0.18059690296649933, -0.3203199803829193, -0.657894492149353, 0.3067166805267334, 0.42788776755332947, -0.04141669347882271, 0.45969948172569...
we have a tried and tested one? I am willing to hear from the purists here. This is actually a really excellent question, and the short answer is "you can." We used to do it that way, and there was a whole area of enterprise (data) modeling. In fact, the common OOD notations evolved from ERD. What we discovered, howe...
[ 0.677477240562439, 0.12495344877243042, -0.028149675577878952, 0.44730132818222046, 0.2870268225669861, -0.0762472078204155, 0.03713029623031616, 0.133943572640419, -0.12610696256160736, -0.3340146541595459, -0.02044506184756756, 0.3704507052898407, 0.26175981760025024, -0.0883575305342674...
easier to find a code structure that has a couple of desirable properties: * it should be easy to think out the design * it should be robust under changes. The ease to think out design comes originally from Simula, which used what we now think of as "objects" for simulation specifically; it was convenient in simulati...
[ -0.009286587126553059, 0.16391511261463165, -0.34234437346458435, 0.10960929840803146, -0.4113142490386963, -0.12305759638547897, 0.12620140612125397, -0.28157684206962585, -0.14942912757396698, -0.7495327591896057, 0.09932063519954681, 0.5318536162376404, -0.6113631725311279, -0.213759273...
them was Dave Parnas, you wrote several papers that identified a basic rule for modularization, which I call Parnas' Law: every module should keep a secret, and that secret is a requirements that is likely to change. It turns out that by combining Parnas' Law with the Simula idea of a "object" as corresponding to some...
[ 0.5064795017242432, 0.14856980741024017, -0.1785735934972763, 0.12016672641038895, 0.043601371347904205, 0.016693120822310448, -0.0025829141959547997, -0.3198888599872589, -0.6257299184799194, 0.0931512787938118, -0.25941166281700134, 0.5125396251678467, -0.09742408990859985, -0.3442523479...
nouns, thing that have persistent existence. In the Command pattern, the ideal objects are *verbs*, things you *do*.) However, it also turns out that that structure isn't necessarily a good way to represent the underlying data in a relational database, so we end up with the "object relational impedance mismatch" probl...
[ -0.25902870297431946, -0.281610906124115, -0.0369398333132267, 0.19867607951164246, -0.3608299493789673, 0.3846208155155182, 0.725745439529419, 0.0512252077460289, -0.2899005711078644, -0.7317378520965576, -0.12521274387836456, 0.36851364374160767, -0.06577741354703903, 0.03644072264432907...
In my project I often encounter Java heap space errors, i.e., there isn't enough space to run the program any more. Is there any way I can increase virtual memory? I am not using the command-line. I am using Net Beans. In NetBeans, you can add command line options using the Properties of the Project, the Run option. T...
[ 0.4364131987094879, 0.03516886383295059, -0.14437372982501984, -0.19737230241298676, -0.029923273250460625, -0.1286974847316742, 0.2229308933019638, 0.1993962973356247, -0.29100149869918823, -0.8203039169311523, 0.010791346430778503, 0.43067866563796997, -0.20655779540538788, -0.0101557793...
Using the adapter pattern, combined with IoC (specificly Unity), I would like to create a new instance of a object of which the properties point back to the adaptee's propeties (basicly mapping the adaptee to a target object). As a example I have the following class structures: ``` public class Adaptee { private ...
[ 0.307869017124176, -0.21547137200832367, 0.37281936407089233, -0.26384487748146057, 0.20092158019542694, 0.24576400220394135, 0.09258149564266205, -0.36682623624801636, -0.11768679320812225, -0.8861620426177979, -0.21559932827949524, 0.44394344091415405, -0.5355106592178345, 0.238690778613...
set; } } public class Adapter : Target { public Adapter(Adaptee adaptee) { this.MyProperty = adaptee.MyProperty; } } public class MyTestClass { public Target MyTarget { get; set; } } ``` The problem is that the Adaptee is not under my control and it has no public constructor, hence the use o...
[ 0.12296297401189804, -0.12342867255210876, 0.48059359192848206, -0.351843923330307, 0.20355433225631714, 0.2910996675491333, 0.25217393040657043, -0.44794532656669617, 0.013228640891611576, -0.901741087436676, -0.4551433026790619, 0.5319073796272278, -0.7221651077270508, 0.1597545742988586...
UnityContainer()) { container .RegisterType<MyTestClass>( new InjectionProperty("MyTarget")); container.RegisterInstance<Adaptee>(adaptee, new ExternallyControlledLifetimeManager()); MyTestClass myTestClass = container.Resolve<MyTestClass>(); } ``` I would like the execution of the c...
[ -0.5009820461273193, -0.19259583950042725, 0.5168763995170593, -0.3568028211593628, 0.3330884575843811, 0.42121991515159607, 0.37172988057136536, -0.4456784725189209, 0.1764698624610901, -0.5901311635971069, -0.08564340323209763, 0.7361711859703064, -0.5980587601661682, 0.08701610565185547...
new InjectionProperty("MyTarget")); ``` should actually result in this: ``` container .RegisterType<MyTestClass>( new InjectionProperty("MyTarget", container.Resolve<Adapter>())); ``` This does not seem to be possible, since no instance of Adapter exist yet and it has a private constructor. Should I u...
[ -0.16090476512908936, -0.040012311190366745, 0.45238491892814636, -0.19901812076568604, 0.234627828001976, 0.267934650182724, 0.3785022795200348, -0.4338209331035614, -0.07913295179605484, -0.6168021559715271, -0.16860473155975342, 0.7862489819526672, -0.5428969264030457, 0.015912301838397...
UnityContainer()) { container .RegisterType<MyTestClass>( new InjectionProperty( "MyTarget", new ResolvedParameter<Adapter>())); container.RegisterInstance<Adaptee>(adaptee, new ExternallyControlledLifetimeManager()); MyTestClass myTestClass = container.Reso...
[ -0.3658653199672699, -0.1361156851053238, 0.44793701171875, -0.1234302744269371, 0.1578279435634613, 0.22937817871570587, 0.4053044319152832, -0.43031027913093567, 0.01432113628834486, -0.5639334321022034, -0.10676266252994537, 0.6725759506225586, -0.22010968625545502, 0.07951153069734573,...
To open a file in vim, I usually type ":e " and then hit tab until the file I want appears. However, I always get in a rhythm and inadvertently go ONE past the desired file. Without knowing how to move backwards, I end up tabbing all the way to the end and repeating the whole process. Is there a way to perform the fi...
[ 0.4474529027938843, -0.22999031841754913, 0.6971338391304016, -0.16282406449317932, -0.05157875269651413, -0.169389009475708, 0.34512510895729065, -0.3258781433105469, -0.31021109223365784, -0.4720761477947235, -0.09403729438781738, 0.6830236315727234, -0.18264265358448029, 0.1699865162372...
name with the arrow keys from this list.
[ -0.03237205371260643, 0.3104966878890991, 0.06576262414455414, 0.09007946401834488, -0.29191598296165466, 0.06259731948375702, 0.09555371850728989, -0.003951946273446083, -0.38837361335754395, -0.13958387076854706, -0.06196212023496628, 0.16903474926948547, -0.13870804011821747, 0.49680992...
I want to show my progressbar in the center of the screen when a processing happens on a button click. But I just want the progressbar without the dialog box.. Is there any way I can do this? It's explained in full in ApiDemos inside the SDK. The example that you want is named: ProgressBar3.java and can be found in \A...
[ 0.34280315041542053, 0.19273070991039276, 0.6330886483192444, -0.3295576572418213, 0.10702858865261078, 0.3805331885814667, 0.025707799941301346, -0.1494540572166443, -0.20187152922153473, -0.9147017002105713, 0.13336913287639618, 0.35790979862213135, -0.37640801072120667, -0.1968443989753...
Here is the begining of my .htaccess ``` # invoke rewrite engine RewriteEngine On RewriteBase /~new # force non domain.com to www.domain.com RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L,NC] ``` everytime I request <http://www.example.com/~ne...
[ 0.2800450623035431, 0.292532742023468, 0.7320101261138916, -0.14995735883712769, -0.015538272447884083, 0.09173842519521713, 0.27437809109687805, -0.3804951012134552, -0.008020875044167042, -0.5848299860954285, 0.08244107663631439, 0.5447227954864502, -0.2699414789676666, 0.360425055027008...
put in front of the $1 to make the redirection work? Well, that's kind how RewriteBase works: it blows away all leading path information from your request, and then reinserts the RewriteBase afterward. But in your example, it can't perform the reinsertion because you're giving it a redirect to a fully-qualified URL. I...
[ 0.4138082265853882, 0.05085299164056778, 0.34789496660232544, 0.12600652873516083, -0.04633903503417969, -0.34973734617233276, 0.4236428737640381, 0.00009543694613967091, 0.01852763071656227, -0.31766048073768616, -0.0589330829679966, 0.47029322385787964, -0.3824418783187866, 0.19920428097...
with it.
[ -0.08610658347606659, 0.25261154770851135, 0.082940973341465, 0.16096770763397217, -0.5575160384178162, -0.30468130111694336, -0.07766856998205185, -0.29013144969940186, -0.035432104021310806, -0.060013413429260254, 0.24472469091415405, 0.333356112241745, -0.03985057398676872, 0.1709763854...
Have to remove the logs and schema.rb from the svn as that is machine dependent.My schema is not migrating after the update as the schema revision on different machine is of different order. > I know that line 2 will still point to "Monday" and have a new String object with the offset and count set to 0,3. That is cur...
[ 0.4293955862522125, -0.0788898766040802, 0.6010328531265259, -0.1286897361278534, -0.4130497872829437, -0.43896204233169556, 0.5206066966056824, -0.08012382686138153, -0.49749866127967834, -0.6290256381034851, -0.10686857253313065, 0.6843430399894714, -0.2549203634262085, 0.344589322805404...
classpath might copy the array (I can't remember off hand what ratio is uses to decide when to copy, but it does copy if the copy is a small enough fraction of the original, which turned one nice O(N) algorithm to O(N^2)). > The line 4 will create a new String "Mon" in string pool and point to it. No, it creates a ne...
[ 0.12871691584587097, -0.584892749786377, 0.15655912458896637, 0.13113540410995483, -0.0812607929110527, 0.015533811412751675, 0.3465881645679474, 0.011906440369784832, -0.0008319593034684658, -0.8230634331703186, 0.1009766012430191, 0.6404556632041931, -0.6949886679649353, -0.0330907516181...
[`String(String)`](http://java.sun.com/javase/6/docs/api/java/lang/String.html#String(java.lang.String)) constructor says: > Initializes a newly created String object so that it **represents the same sequence of characters** as the argument; in other words, the newly created string is a copy of the argument string. T...
[ -0.11424445360898972, 0.20996855199337006, 0.4299439787864685, -0.28245681524276733, 0.13298828899860382, 0.15646302700042725, -0.08741409331560135, -0.3377927243709564, -0.19191880524158478, -0.5560389161109924, -0.5537822246551514, 0.30273035168647766, -0.3359374701976776, 0.124271005392...
specification of `String` requires operations on an character array. Those operations which take an array as input specify that the **contents** of the array are copied to whatever internal storage is used in the String. A string could use UTF-8 or LZ compression internally and conform to the API. However, if your JVM...
[ 0.21771502494812012, 0.07257987558841705, 0.12601986527442932, -0.15656618773937225, 0.0009743474656715989, -0.21826428174972534, 0.0824044719338417, -0.34037265181541443, -0.0374733991920948, -0.6649836301803589, -0.2564355731010437, 0.45441940426826477, -0.33128106594085693, -0.110079117...
obtain a string in the string pool which is `equal` to a string, use the [`intern()`](http://java.sun.com/javase/6/docs/api/java/lang/String.html#intern()) method. This will either retrieve a string from the pool if one with the value already has been interned, or create a new string and put it in the pool. Note that p...
[ -0.1219363734126091, -0.05068526044487953, 0.09413886070251465, -0.035161342471838, -0.04137050732970238, -0.21904943883419037, -0.11091240495443344, -0.7159578204154968, -0.20695281028747559, -0.5296177864074707, 0.011318099685013294, 0.4054375886917114, -0.33499500155448914, -0.044911760...
Lets say I have a custom data type that looks something like this: ``` public class MyDataType { public string SimpleProp1; public string SimpleProp2; public List<SomeType> ComplexProp; } ``` now I hava a data bound control (i.e. ItemsControl or DataGrid), that is created dynamically. How would the binding def...
[ 0.1472526341676712, -0.08656420558691025, 0.4953058958053589, 0.11125494539737701, 0.023139916360378265, -0.17871259152889252, 0.20432639122009277, -0.536906898021698, -0.3107270300388336, -0.4181990325450897, -0.29734688997268677, 0.47589540481567383, -0.6661028265953064, 0.26382640004158...
in souch a way? If it is not, what other options do I have? EDIT, The scenario doesn't seem to be clear enough: I have an ``` IEnumberable<MyDataType> ``` that is bound to an ItemsControl, inside the DataTemplate I have multiple TextBoxes that need to refer to subproperties of an object in the List of the complex ...
[ -0.04111901670694351, 0.08383965492248535, 0.4347735047340393, -0.11044957488775253, 0.18942223489284515, -0.11132479459047318, 0.3981037437915802, -0.3323419690132141, -0.24016276001930237, -0.25139519572257996, -0.13394781947135925, -0.02752002701163292, -0.2600441575050354, 0.4063668251...
<UserControl.Resources> <sm:SomeTypeConverter x:Key="MySomeTypeConverter" /> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <TextBlock x:Name="myTextBlock" Text="{Binding Path=SomeDates, Converter={StaticResource MySomeTypeConverter}}" /> </Grid> </UserControl> `...
[ 0.18492606282234192, 0.21244296431541443, 0.5908811092376709, -0.36410829424858093, 0.12049151211977005, 0.020809877663850784, 0.3761295676231384, -0.5106861591339111, -0.16960322856903076, -0.675508975982666, -0.2590850293636322, 0.22299538552761078, -0.27753135561943054, 0.40870681405067...
myTextBlock.DataContext = m_mySomeType; } } } ``` C# SomeType.cs ``` namespace Silverlight.Mine { public class SomeType { public List<DateTime> SomeDates { get; set; } public SomeType() { SomeDates = new List<DateTime>(); SomeDates.Add(DateTime.Now...
[ 0.6583013534545898, 0.04228722304105759, 0.5199344158172607, -0.4169784486293793, 0.1754976361989975, -0.09488511085510254, 0.3325214087963104, 0.0817113071680069, 0.06274445354938507, -0.44034048914909363, -0.32233938574790955, 0.16525840759277344, -0.08411597460508347, 0.3726882338523865...
SomeDates.Add(DateTime.Now); SomeDates.Add(DateTime.Now.AddDays(1)); } } public class SomeTypeConverter : IValueConverter { public object Convert(object value, Type targetType,
[ 0.5953381657600403, -0.2533963918685913, 0.3976019024848938, -0.38879019021987915, 0.005224085412919521, 0.08265545219182968, 0.08609160035848618, 0.0050053903833031654, -0.04841384291648865, -0.2967643141746521, -0.1059652641415596, 0.428788959980011, -0.17159420251846313, 0.2125298529863...
object parameter, CultureInfo culture) { if (value != null) { List<DateTime> myList = (List<DateTime>)value; return myList[0].ToString("dd MMM yyyy");
[ 0.2071317434310913, -0.2521398365497589, 0.7942788004875183, -0.3617303967475891, 0.41706112027168274, 0.0825745239853859, 0.2867586314678192, 0.11887536942958832, -0.03715609386563301, -0.3841402530670166, -0.37409403920173645, 0.6274133324623108, -0.25466814637184143, 0.43437105417251587...
} else { return String.Empty; } } public object ConvertBack(object value,
[ -0.3729148507118225, -0.1408986896276474, 0.07607072591781616, -0.22893275320529938, -0.12606683373451233, 0.036373309791088104, 0.2199636697769165, -0.14283426105976105, 0.19044707715511322, -0.45083072781562805, -0.3303126394748688, 0.6929348111152649, -0.40567460656166077, 0.29105773568...
Type targetType, object parameter, CultureInfo culture) { if (value !=
[ 0.31953030824661255, -0.31790414452552795, 0.39311715960502625, -0.3179576098918915, 0.22609449923038483, 0.03949114307761192, 0.30811092257499695, -0.22593094408512115, 0.32934728264808655, -0.543023407459259, 0.011636454612016678, 0.48562294244766235, -0.5590044260025024, 0.1567848771810...
null) { return (List<DateTime>)value; } return null; } } } ```
[ 0.20705653727054596, -0.12657521665096283, 0.39981943368911743, -0.3808787763118744, 0.17562620341777802, -0.08743613213300705, 0.43026426434516907, -0.20637385547161102, -0.0013142715906724334, -0.2549254298210144, -0.7188182473182678, 0.45696747303009033, -0.5196049809455872, 0.506508708...
I always wondered why automatic setting of the pointer to NULL after *delete* is not part of the standard. If this gets taken care of then many of the crashes due to an invalid pointer would not occur. But having said that I can think of couple of reasons why the standard would have restricted this: > 1. Performance: ...
[ 0.17357997596263885, 0.08023536205291748, -0.06995642185211182, 0.1424504667520523, -0.23561526834964752, -0.2494874745607376, 0.5901622772216797, 0.09137235581874847, -0.292643278837204, -0.44891056418418884, 0.21724852919578552, 0.4544559121131897, -0.2825266122817993, 0.3713424503803253...
this? [Stroustrup himself](http://www.stroustrup.com/bs_faq2.html#delete-zero) answers. An excerpt: > C++ explicitly allows an > implementation of delete to zero out > an lvalue operand, and I had hoped > that implementations would do that, > but that idea doesn't seem to have > become popular with implementers. ...
[ 0.0856592059135437, 0.25889983773231506, 0.12089811265468597, -0.09120037406682968, -0.09878671169281006, -0.03476129472255707, 0.2474127858877182, -0.396472305059433, -0.21760223805904388, -0.011271011084318161, -0.07605250179767609, 0.5065873861312866, -0.4559181034564972, 0.218488812446...
I've developed an Excel 2003 addin in C#, using VSTO and VS 2008. The addin works just fine on my machine (HP NC6320 laptop, 3gb RAM T5600 1.8ghz Core2 cpu), however when it is tested on another users machine (HP nc6710b laptop 2gb RAM, T7200 2ghz Core2 cpu), it is substantially slower. I've also tried it on another la...
[ -0.08139125257730484, 0.2712245583534241, 0.4554562270641327, 0.04259682819247246, -0.17807674407958984, -0.14502443373203278, 0.2590494751930237, -0.033955320715904236, 0.15304596722126007, -0.6408372521400452, 0.0740789920091629, 0.8531262874603271, -0.3415660560131073, -0.36744618415832...
Server 2005 database 2. Do some manipulation on it 3. Display it on a worksheet, and format it appropriately The slow bit is the displaying on the worksheet. I'm stumped as to why it would be slower on a newer machine.. Just to really confuse myself, I tried it on a VM (VMware Workstation v6.5) with 256mb RAM, and 1 ...
[ -0.45173943042755127, 0.1478482186794281, 0.5508530139923096, -0.19203044474124908, -0.4615726172924042, -0.23327231407165527, 0.3321235477924347, -0.08138696104288101, 0.10259222239255905, -0.4963117837905884, 0.1841118186712265, 0.8310675621032715, -0.29825714230537415, -0.42312863469123...
slower. Any suggestions would be gratefully recieved ? Many thanks Nick **edit:** Ok, I've checked the printer drivers, they are the same... I've checked the fragmentation levels, and if anything, the faster machine is less fragmented than the slower one.. Am looking at the events settings.. You can also add `...
[ 0.3534546494483948, 0.1192222461104393, 0.5162209272384644, 0.24849410355091095, -0.31388193368911743, 0.011993732303380966, 0.48095986247062683, 0.03470626100897789, -0.3359861373901367, -1.1360828876495361, -0.20985877513885498, 0.8450870513916016, -0.10262293368577957, -0.16724155843257...
I'm working on a small little thing here for school. After hours of researching, and a ton of errors and logic reworking I've almost completed my little program here. I'm trying to take user input, store it into the string, get a character array from the string ( dont ask why, I just have to put this into a character ...
[ 0.1923801451921463, 0.36273425817489624, 0.43425682187080383, -0.43410393595695496, 0.17140136659145355, 0.2633644938468933, 0.6092935800552368, -0.16629773378372192, -0.016535867005586624, -0.7495912313461304, -0.12958240509033203, 0.4461926519870758, -0.4122822880744934, -0.2251866906881...
int sSize = 0; string sReversed = ""; char* cPhrase = NULL; cout << "Welcome to the You Type It & We'll Reverse it! [Version 1.0] " << endl; cout << "This program will reverse your phrase, and count how many characters are in it!" << endl; cout << "To begin just enter a phrase." << endl; cout <...
[ -0.1549014449119568, -0.148979052901268, 0.6138587594032288, -0.43745601177215576, -0.01596776954829693, 0.4238414764404297, 0.5730830430984497, 0.11637062579393387, 0.0464688278734684, -0.4671815037727356, -0.46291086077690125, 0.3284534215927124, -0.5045148134231567, 0.08717852085828781,...
endl; cPhrase = getCharArray(sPhrase); sReversed = reversePhrase( sSize, cPhrase ); cout << sReversed; system("pause"); } string reversePhrase(int size , char* cPhrase) { string sReversed = ""; int place = size; for ( int i = 0; i < size ; i ++ ) { sReversed.append(1, cPhr...
[ -0.40196338295936584, -0.22263574600219727, 0.5868157744407654, -0.5365617275238037, 0.09065660089254379, 0.6557705402374268, 0.4862309992313385, -0.44404420256614685, -0.04431847855448723, -0.19911697506904602, -0.4810250997543335, -0.032285720109939575, -0.32712459564208984, 0.2375326603...
character: " << cPhrase[place] << endl; place--; } return sReversed; } char* getCharArray(string sPhrase) { int size = 1; size = sPhrase.length(); char* cArray = NULL; cArray = new char[size]; for (int i = 0 ; i < size ; i++) { cArray[size] = sPhrase.at(i); } ...
[ -0.173368439078331, 0.07133914530277252, 0.36762112379074097, -0.35859107971191406, 0.23425278067588806, 0.6501526832580566, 0.4247216284275055, -0.4072244167327881, -0.07768040895462036, -0.2120993733406067, -0.2786944806575775, 0.479348748922348, -0.11133125424385071, 0.25210699439048767...
get returned: ![Error Screenshot](https://i.stack.imgur.com/tJOHZ.jpg) It is almost like my Character Array is getting garbage collected before it can use all of the characters. This is probably an easy fix but, I just don't see how I can get around this one. Try rewriting getCharArray like this ``` char* getCha...
[ -0.11495804041624069, -0.13241742551326752, 0.3714558780193329, -0.14443789422512054, -0.028840070590376854, 0.3298964500427246, 0.6051321625709534, -0.3087853789329529, -0.2471436858177185, -0.4124711751937866, -0.21982839703559875, 0.6652007699012756, -0.22894145548343658, 0.297282993793...
for (int i = 0 ; i < size ; i++) { cArray[i] = sPhrase.at(i); // NOTE } } cArray[size]=0; // NOTE return cArray; } ``` Note that the assignment in the loop now uses the index variable. Also, you need to allocate one extra char in the array to set the null terminator for th...
[ -0.0909406766295433, -0.09076228737831116, 0.177497997879982, -0.29567113518714905, -0.09244668483734131, 0.1807304471731186, 0.37004557251930237, -0.3242391347885132, -0.17297597229480743, -0.15733511745929718, -0.07176822423934937, 0.5497287511825562, -0.23533391952514648, 0.300602108240...
set it at the end. You'll also need to think about deallocating the array at some point
[ 0.598696231842041, -0.011056612245738506, 0.4172283411026001, 0.01004711538553238, 0.26584216952323914, -0.18933190405368805, -0.40153250098228455, -0.16454997658729553, -0.1223871186375618, -0.44487160444259644, 0.14618796110153198, 0.32552167773246765, 0.012260985560715199, -0.1326495260...
For some reason neither the accepted answer nor any others work for me for "[Sending email in .NET through Gmail](https://stackoverflow.com/questions/32260/sending-email-in-c-net-through-gmail)". Why would they not work? UPDATE: I have tried all the answers (accepted and otherwise) in the other question, but none of t...
[ 0.03619509935379028, -0.1265641748905182, 0.5354486107826233, 0.07613354921340942, -0.4015195369720459, -0.12004115432500839, 0.7237508296966553, -0.020167451351881027, -0.25499963760375977, -0.5674318671226501, -0.16694305837154388, 0.21734164655208588, -0.42182496190071106, 0.19149805605...
> 5.5.1 Authentication Required. Learn more at" <-- seriously, it ends there. **UPDATE:** This is a question that I asked a long time ago, and the accepted answer is code that I've used many, many times on different projects. I've taken some of the ideas in this post and other EmailSender projects to create an [Emai...
[ 0.6165734529495239, -0.053243037313222885, 0.4248855710029602, -0.04510777071118355, -0.19587825238704681, -0.2834061086177826, 0.6202352046966553, 0.15043289959430695, 0.06097916513681412, -0.6755983233451843, 0.028346175327897072, 0.1799723356962204, -0.0784045159816742, 0.08661990612745...
it works. Actually, at some point I had an issue on my code. I didn't spot it until I had a simpler version on a console program and saw it was working (no change on the Gmail side as you were worried about). The below code works just like the samples you referred to: ``` using System; using System.Collections.Generi...
[ 0.18373610079288483, 0.02452993392944336, 0.5392442345619202, -0.2553654909133911, 0.33321571350097656, 0.10774634778499603, 0.16492925584316254, -0.14892682433128357, 0.015544083900749683, -0.5948044061660767, 0.004315148573368788, 0.7334619760513306, -0.3262386918067932, 0.23451636731624...
client = new SmtpClient("smtp.gmail.com", 587) { Credentials = new NetworkCredential("myusername@gmail.com", "mypwd"), EnableSsl = true }; client.Send("myusername@gmail.com", "myusername@gmail.com", "test", "testbody"); Console.WriteLine("S...
[ -0.0900711789727211, -0.11249665170907974, 0.7317690849304199, -0.06924526393413544, 0.07443520426750183, 0.23444023728370667, 0.5731062889099121, -0.05942739173769951, -0.03499365597963333, -0.6836572289466858, -0.16547013819217682, 0.45865973830223083, -0.38275015354156494, 0.32533806562...
Console.ReadLine(); } } } ``` I also got it working using a combination of web.config, <http://msdn.microsoft.com/en-us/library/w355a94k.aspx> and code (because there is no matching `EnableSsl` in the configuration file :( ). ### 2021 Update By default you will also need to enable access for "less secur...
[ -0.2308739721775055, 0.07132479548454285, 0.9709142446517944, 0.32024088501930237, 0.37613463401794434, -0.2282642275094986, 0.3436163365840912, -0.16361786425113678, 0.16671770811080933, -0.9333552718162537, -0.18768391013145447, 0.9354060292243958, -0.12492691725492477, 0.099498540163040...
I just implemented a thread pool like described here [Allen Bauer on thread pools](http://blogs.embarcadero.com/abauer/2007/09/19/38822) Very simple implementation, works fine, but my application no longer shuts down. Seems that two worker threads (and one other thread, I guess the queuing thread) stuck in the functi...
[ 0.26903921365737915, 0.08984734863042831, 0.3838213086128235, -0.12020181119441986, 0.22685971856117249, -0.19761838018894196, 0.2698463797569275, 0.06526848673820496, -0.5436492562294006, -0.6439179182052612, 0.5067013502120972, 0.6944060921669006, -0.2596036195755005, 0.1825663447380066,...
finish. Some of the tasks assigned to the worker threads perform some I/O stuff. I tried to use WT\_EXECUTEINIOTHREAD but it does not seem to help. I should mention that the main thread waits for entry to a critical section witht the call stack being ``` System.Halt0, System.FinalizeUnits, Classes.Finalization, TThre...
[ 0.4845503270626068, 0.2373165786266327, 0.34219422936439514, 0.034253038465976715, 0.18443496525287628, -0.09818121045827866, 0.4960557520389557, 0.21625342965126038, -0.30984511971473694, -0.6593097448348999, -0.1338232308626175, 0.5390855669975281, -0.010417256504297256, 0.32984468340873...
code. I didn't spot it until I had a simpler version on a console program and saw it was working (no change on the Gmail side as you were worried about). The below code works just like the samples you referred to: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Ne...
[ 0.06420227885246277, 0.013413972221314907, 0.6873772740364075, -0.20982472598552704, 0.09565740823745728, 0.07939938455820084, 0.5653809905052185, 0.001759285805746913, -0.237357497215271, -0.7052237391471863, -0.07572657614946365, 0.53788161277771, -0.45277151465415955, 0.3982767760753631...
{ Credentials = new NetworkCredential("myusername@gmail.com", "mypwd"), EnableSsl = true }; client.Send("myusername@gmail.com", "myusername@gmail.com", "test", "testbody"); Console.WriteLine("Sent"); Console.ReadLine();
[ -0.010649379342794418, -0.006817398127168417, 0.6712983250617981, -0.04540366306900978, 0.16954205930233002, 0.12072788178920746, 0.5939626097679138, -0.028285156935453415, 0.21758976578712463, -0.8309617638587952, -0.22116893529891968, 0.6379181742668152, -0.24823704361915588, 0.245770111...
} } } ``` I also got it working using a combination of web.config, <http://msdn.microsoft.com/en-us/library/w355a94k.aspx> and code (because there is no matching `EnableSsl` in the configuration file :( ). ### 2021 Update By default you will also need to enable access for "less secure apps" in your gmail settin...
[ 0.03489158675074577, 0.12148895859718323, 0.5701979994773865, 0.2181244194507599, 0.08562187850475311, -0.255889356136322, 0.6746470928192139, -0.14555872976779938, -0.21560096740722656, -0.7149153351783752, -0.17259778082370758, 0.766968846321106, -0.22668340802192688, -0.0808879807591438...
I'm pretty new to Rails and have an issue which I can't quite get my head around as to the architecturally 'correct' way of doing it. Problem relates to what I kinda call sub-controllers. The scenario is this: I have a series of pages, on which is a panel of some form containing some information (think the user panel...
[ 0.43734586238861084, 0.03681611642241478, 0.35849958658218384, 0.40516990423202515, -0.13458703458309174, 0.1414673924446106, -0.06534992903470993, 0.07393229007720947, -0.2709616422653198, -0.7021726369857788, 0.1683284342288971, 0.4413433372974396, 0.024828551337122917, -0.13950808346271...
panel and it's view. Question is, how do you go about doing this? How do I render a 'sub controller' from within a view? I would put the logic in a helper or a module. (<http://api.rubyonrails.org/classes/ActionController/Helpers/ClassMethods.html>) Then render partials where you want these things displayed. (<http:/...
[ 0.16168195009231567, -0.3891889154911041, 0.4127449691295624, -0.05049997568130493, -0.540550172328949, 0.4846610426902771, -0.20071376860141754, -0.3681415319442749, -0.2278841882944107, -0.5295321941375732, 0.08615570515394211, 0.6613511443138123, -0.1355104297399521, -0.0066145942546427...
When developing a Data Flow I don't always want to output the results to a destination - but I would like to see the data. Is there a way to attach a Data viewer to an output without having to have a destination? The file and raw destination have limitations on the data type they accept - and I don't want to attach c...
[ 0.4804450571537018, -0.045712463557720184, 0.08205163478851318, 0.21048346161842346, -0.1483416110277176, 0.03554762527346611, -0.09313470125198364, -0.0874682143330574, -0.09711714088916779, -0.5081377625465393, 0.09770435094833374, 0.3885757029056549, -0.26021507382392883, 0.047714278101...
In JavaScript, how would you check if an element is actually visible? I don't just mean checking the `visibility` and `display` attributes. I mean, checking that the element is not * `visibility: hidden` or `display: none` * underneath another element * scrolled off the edge of the screen For technical reasons I can...
[ 0.3153674602508545, 0.18727460503578186, -0.2794498801231384, -0.2415660172700882, -0.35944223403930664, -0.243083193898201, 0.2910434603691101, -0.19993844628334045, 0.08521507680416107, -0.8391867876052856, 0.17264948785305023, 0.25390389561653137, -0.42712926864624023, -0.45466554164886...
targetted element to the function. Here's PPK test page on [elementFromPoint](http://www.quirksmode.org/dom/tests/elementfrompoint.html). From [MDN's documentation](https://developer.mozilla.org/en-US/docs/Web/API/DocumentOrShadowRoot/elementFromPoint): > The `elementFromPoint()` method—available on both the Documen...
[ -0.1639871448278427, -0.3854176700115204, 0.5793243050575256, -0.07210484892129898, 0.13736563920974731, 0.11899274587631226, 0.23544391989707947, -0.4866856038570404, 0.0061942702159285545, -0.12512485682964325, -0.1795356720685959, 0.4746856093406677, -0.4637298583984375, -0.480074018239...
If you browse a web page through Firefox, any image on the page can be dragged anywhere on the screen—but you can't drop it. Other browsers such as IE or Chrome do not allow dragging images. Is this a issue? Why does Firefox allow dragging? You can drag the image (like your favorite unicorn picture, I assume) to an ex...
[ -0.006564371287822723, -0.11476833373308182, 0.2894033193588257, 0.19024920463562012, -0.032081238925457, -0.25481218099594116, 0.055235665291547775, 0.40031081438064575, -0.494527131319046, -0.51914381980896, -0.17185768485069275, 0.4789900481700897, -0.3807768225669861, 0.082124128937721...
I'm trying to use python ctypes to use these two C functions from a shared library: ``` bool decompress_rgb(unsigned char *data, long dataLen, int scale) float* getRgbBuffer() ``` The first function is working fine. I can tell by putting some debug code in the shared library and checking the input. The problem is g...
[ 0.10706436634063721, 0.4474918842315674, 0.39980751276016235, -0.20438708364963531, -0.1150650680065155, 0.07378976792097092, 0.050109270960092545, -0.1712886095046997, -0.2991005778312683, -0.6381152272224426, 0.018818635493516922, 0.6104575991630554, -0.39321255683898926, 0.3404313623905...
buffer size is (720 \* 288 \* sizeof(float)) so I guess this has to come into play somewhere. There's no `c_float_p` type so I thought I'd try this: ``` getRgbBuffer.restype = c_char_p ``` Then I do: ``` ptr = getRgbBuffer() print "ptr is ", ptr ``` which just outputs: ``` ptr = 3078746120 ``` I'm guessing that'...
[ -0.04440268501639366, 0.19733202457427979, 0.4618333876132965, -0.19720326364040375, 0.10519060492515564, 0.10758481174707413, 0.1649589091539383, 0.0424521341919899, -0.4049622118473053, -0.48454853892326355, -0.12241031974554062, 0.3011965751647949, -0.30104511976242065, 0.07223013043403...