text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
overnight. I'd recommend you check in with our [mailing list](http://groups.google.com/group/fluent-nhibernate), we usually post updates there. Sorry I can't be more helpful.
[ 0.14485198259353638, 0.09558409452438354, 0.17755654454231262, -0.020388517528772354, -0.2454027533531189, -0.2188868522644043, 0.9772564172744751, 0.693706214427948, -0.0019332050578668714, -0.46770134568214417, -0.15787118673324585, 0.621513307094574, 0.07579993456602097, -0.146690860390...
I'm trying to use `gdb` in postmortem mode with the core dump of a crashed process. I can get a stack trace, but instead of showing me the actual location in the offending function, `gdb` shows me the line number of a two-line inlined function that the offending function calls. The inlined function is called many, man...
[ 0.26626095175743103, 0.004739522002637386, 0.15373753011226654, 0.15459272265434265, 0.15086759626865387, -0.01458368357270956, -0.03947091102600098, -0.05848044529557228, -0.12922899425029755, -0.4070570468902588, -0.14972904324531555, 0.3845944106578827, -0.3539671003818512, -0.060858562...
-e -i 0x84564756". This doesn't scale, but at least it works.
[ 0.0030865524895489216, -0.022404532879590988, 0.49212396144866943, 0.3248158395290375, -0.10519981384277344, 0.006017315201461315, 0.16478686034679413, -0.10049815475940704, 0.05857310816645622, -0.5080782771110535, 0.21509002149105072, 0.5347792506217957, 0.20905527472496033, 0.3952664434...
> **Possible Duplicate:** > > [Complex CSS selector for parent of active child](https://stackoverflow.com/questions/45004/complex-css-selector-for-parent-of-active-child) How would I make a css selector with that applies style to a table cell that has an input child element? Unfortunately, you can't target parent e...
[ 0.22230425477027893, 0.051479823887348175, -0.06801894307136536, 0.027622945606708527, -0.008207695558667183, 0.38519129157066345, 0.3042277991771698, -0.2084575742483139, -0.20289868116378784, -0.7899587750434875, 0.012165306136012077, 0.2242642492055893, -0.0820169448852539, 0.0837203711...
It seems like many OO discussions use Java or C# as examples (e.g. Head First Design Patterns). Do these patterns apply equally to Python? Or if I follow the design patterns, will I just end up writing Java in Python (which apparently is a very bad thing)? The biggest differences are that Python is duck typed, meaning...
[ 0.18206050992012024, -0.06356949359178543, 0.07287866622209549, -0.1138448491692543, -0.17158715426921844, -0.17617405951023102, -0.04397578909993172, 0.15170978009700775, -0.3245197832584381, -0.5228144526481628, -0.08423320949077606, 0.30393481254577637, -0.310566246509552, -0.3390998244...
interfaces, etc. just to simulate higher order functions. More generally, Python has syntactic sugar for a lot of common design patterns, such as the iterator and the aforementioned strategy. It might be useful to understand these patterns (I've read Head First and found it pretty useful), but think about Pythonic ways...
[ -0.06138378381729126, -0.12998314201831818, -0.18096256256103516, 0.24151015281677246, -0.39422041177749634, 0.034268178045749664, 0.09531422704458237, 0.26161837577819824, -0.16522781550884247, -0.6809528470039368, 0.13033607602119446, 0.6532344818115234, -0.375682532787323, -0.5094969272...
I've an issue with a project I try to deliver using the [one-jar](http://one-jar.sourceforge.net/) packager to simplify the deployment process. Without the packaging, everything works fine and the logging configuration is perfectly loaded, but within the packaging, only part of the configuration is appied. So, here...
[ 0.21764366328716278, 0.19227707386016846, 0.4548482298851013, -0.32329893112182617, 0.1837097853422165, -0.05393753945827484, 0.312999963760376, -0.48422104120254517, -0.45103225111961365, -0.621175229549408, -0.14691418409347534, 0.6495664715766907, -0.573355495929718, -0.0935085788369178...
new MainClass().getClass().getResourceAsStream("logging.properties")); // main process goes here. } catch(Exception e) { // Exception handling } } } ``` The log level as well as the FileHandler pattern are well understood because the logging ends up in the correct file, but as row XML output, wh...
[ 0.020418385043740273, -0.1947757750749588, 0.412479043006897, -0.0572916641831398, 0.08344247192144394, -0.32948195934295654, 0.39103084802627563, -0.14438284933567047, -0.5102807283401489, -0.6448454260826111, -0.36848554015159607, 0.46355077624320984, -0.33645451068878174, 0.324917048215...
I have a ASP.NET MVC page of Events of a specific day. I'm also using jQuery datepicker and when I select a day, I create a function that send this selected day via **Ajax** to a MVC ActionResult method and this method will treat this day, will do all the database stuff and will return me all the Events of this selecte...
[ 0.11231264472007751, -0.35735705494880676, 0.6017287969589233, 0.0625084787607193, -0.23262666165828705, 0.0584777407348156, 0.256076455116272, 0.033405642956495285, -0.399183064699173, -0.7089765071868896, 0.012515772134065628, 0.29132264852523804, -0.13438259065151215, -0.045950744301080...
in all first times), the tips worked great and all the Ajax stuff! And in all first time loadings, the page will show the Events of today and this is not via Ajax, it's just a ViewData["events"] sending information for the page. But, if I select a day, the page is updated via Ajax, but the tips don't work anymore!! The...
[ 0.21821850538253784, -0.3575122356414795, 0.5307226181030273, 0.1968718022108078, -0.13685548305511475, -0.35285112261772156, 0.13515883684158325, 0.06257060915231705, -0.23948732018470764, -0.8398159146308899, 0.06954130530357361, 0.4075404703617096, -0.3316628932952881, -0.03052310459315...
first time, this code works, but if I select another day and the page is updated, this jQuery code doesn't work anymore!! The click function doens't work at all!! So, finishing this doubt... does anyone know what could be happening? Why my jQuery codes don't work in ASP.NET MVC updated page via Ajax?? Thanks all!! Ad...
[ 0.15145522356033325, -0.347491979598999, 0.721298336982727, 0.09905003756284714, -0.2107006311416626, -0.3942685127258301, 0.5326993465423584, -0.19267819821834564, -0.3184528052806854, -0.6557177305221558, 0.07267795503139496, 0.8499091863632202, -0.1624497026205063, 0.017621006816625595,...
doMyPopupEtc(); }); }); ```
[ -0.2978498935699463, -0.08567218482494354, 0.4741324484348297, -0.3068016767501831, 0.31981149315834045, -0.24534650146961212, 0.3177500069141388, 0.051231857389211655, -0.0835486650466919, -0.3604247570037842, -0.5923947691917419, 0.775314211845398, -0.5615389347076416, 0.431383341550827,...
I know the basic principles about memory management (retain count, autorelease pools etc) in Cocoa, but once you go past simple retain/release, it's getting a bit more confusing. I couldn't find decent answers for those, as most tutorials cover simple scenarios. I would like to ask about best practices in how to write ...
[ 0.10506165772676468, 0.215698704123497, 0.29710641503334045, -0.04292150214314461, 0.402435302734375, -0.031687311828136444, 0.10632584989070892, -0.19378343224525452, -0.32606515288352966, -0.3345964252948761, -0.14831861853599548, 0.7150543332099915, -0.054640837013721466, 0.194652646780...
last line the code will work fine, but there's leak. What's the rule here? The object is already there in objectArray. I'm assigning it directly, to get the type. Should I do this some other way? Is this assignment increasing retainCount of currentItem? (is it something like [[alloc] initWithObject] ?) How to know if t...
[ -0.061133984476327896, -0.1856316477060318, 0.9187659621238708, 0.16594479978084564, 0.154449924826622, -0.012434595264494419, 0.2612730860710144, -0.08451870083808899, -0.34423208236694336, -0.34829220175743103, -0.15295565128326416, 0.44871336221694946, -0.2317982316017151, 0.28096491098...
that I need to instantly call retain on returned value, or I will bump into null on next assignment? I couldn't find anything like this in documentation. According to retain/release rules, I would expect that decodeObjectForKey returns autorelased object, but it will take some time until the control goes back to app an...
[ -0.06469213217496872, 0.11039207875728607, 0.5168022513389587, -0.23081865906715393, 0.028590498492121696, -0.055019475519657135, 0.33683937788009644, -0.4746769666671753, -0.41241782903671265, -0.2680126130580902, -0.06511195749044418, 0.8729857206344604, -0.35158687829971313, 0.075898565...
NSArray *objectArray = [self loadData]; // 2 - objectArray is local var // loadXMLButtonClicked is called on button click, here the method finishes // and control goes back to application, autorelease pool is cleaned? // case 1 - objectArray stays retained in instance variable? (because setter was used) ...
[ -0.27158042788505554, -0.4018310308456421, 0.5459769368171692, 0.008072585798799992, 0.012674639001488686, -0.2126433551311493, 0.46164295077323914, -0.16001421213150024, -0.321960985660553, -0.19210651516914368, -0.28772592544555664, 0.5918030738830566, -0.6591206192970276, 0.185190543532...
init]; // populate array here return [objectArray autorelease]; } ``` --- 4th question - (bear with me, last one) parser xml best practice : (I don't want to use other solutions, using standard parser is to practice objective-c memory management and flow) Basically this code here works, works good and have ...
[ -0.10442714393138885, 0.23304437100887299, 0.36772438883781433, 0.1845356971025467, -0.24420610070228577, -0.05781897157430649, 0.28027835488319397, -0.2157803177833557, -0.05023320019245148, -0.6340844035148621, 0.01898735761642456, 0.7580251693725586, -0.19485725462436676, -0.21441803872...
(is copying the array and releasing whole parser good idea?). Please run through the code and see the comments. I've debug this code many times, using `gdb` for printing retainCounts, zombies, etc. and while I can manage to get this running and without leaks, I don't know 100% why and would like to hear a good reasoni...
[ 0.09449861943721771, -0.05884985253214836, 0.39395907521247864, 0.17014184594154358, 0.10237229615449905, -0.3298991620540619, 0.5149589776992798, -0.3049781620502472, -0.43887290358543396, -0.42538008093833923, -0.11951733380556107, 0.5695450901985168, -0.5164849162101746, 0.3048315048217...
think I should get rid of it // and copy the data. How this copy works, is it shallow (only new reference to array) // or deep copy (objects allocated again as well)? // how to do deep copy of NSArray? [parserDelegate release]; [parser release]; } ``` **ModelXMLParser.m (simplified)** ``` @implementation ModelXMLPa...
[ -0.17248903214931488, -0.12411048263311386, 0.49880462884902954, -0.13189178705215454, 0.27831050753593445, 0.11542484164237976, 0.2140142023563385, -0.37948188185691833, -0.2623237371444702, -0.4150715172290802, -0.034738313406705856, 0.5917395949363708, -0.36087730526924133, 0.2020390480...
isEqualToString:@"object"]) { currentObject = [[Model alloc] init]; } else if ([elementName isEqualToString:@"name"]) { // do I have to init currentObject.name (NSString) here? I guess not [self setParseChars:YES]; // just set the flag to make parse control easier } else if ([ele...
[ -0.6082930564880371, -0.07043258845806122, 0.5047113299369812, -0.0651422068476677, 0.18921586871147156, -0.03705322742462158, 0.4425787627696991, -0.33926185965538025, -0.2798444330692291, -0.3167222738265991, 0.12738724052906036, 0.4837646484375, -0.26085561513900757, 0.1554371863603592,...
just set the flag to make parse control easier } } - parser foundCharacters (...) { if (parseChars) { currentChars = [[NSString alloc] initWithString:string]; // why is currentChars retainCount = 2 here? // is it like currentChars = [NSString new] and then currentChars = string? (so ...
[ -0.24911582469940186, -0.05081913247704506, 0.3999499976634979, -0.020424406975507736, 0.30538463592529297, -0.34319302439689636, 0.5064951181411743, -0.30694055557250977, -0.21516752243041992, -0.19217528402805328, -0.07589897513389587, 0.7130874991416931, -0.29400548338890076, -0.0616338...
this one) // should I just do currentChars = string here? [currentChars autorelease]; // this is currently my solution, because there's no leak, but I feel it's incorrect } } - parser didEndElement (...) { if ([elementName isEqualToString:@"object"]) { [objectArray addObject:[currentO...
[ -0.3424561321735382, -0.1096375584602356, 0.6912819147109985, 0.002229725243523717, 0.2491120845079422, -0.13647450506687164, 0.17803852260112762, -0.5217205286026001, -0.07196986675262451, -0.23756250739097595, 0.014999809674918652, 0.6296882033348083, -0.43972477316856384, 0.285403549671...
guess retainCount goes to 0 here? } else if ([elementName isEqualToString:@"name"]) { currentObject.name = currentChars; // is this correct, or shoud I do [currentChars copy] as well? [self setParseChars:NO]; [currentChars release]; // as before, initialized, now releasing, but is this r...
[ -0.020957130938768387, -0.14935781061649323, 0.542845606803894, -0.18876104056835175, 0.6154778599739075, 0.0266022440046072, 0.06280754506587982, -0.304052472114563, 0.02259817160665989, -0.23626433312892914, 0.1495475023984909, 0.8213996887207031, 0.10468955338001251, 0.06007173657417297...
[currentChars copy] as well? [self setParseChars:NO]; [currentChars release]; // as before, initialized, now releasing, but is this really correct? } } - (void) dealloc { // I shouldn't release currentChars or currentObject, those (I suppose) should be freed after parsing done, // as a r...
[ -0.055767759680747986, -0.26971814036369324, 0.7294122576713562, -0.2348024696111679, 0.5014434456825256, -0.28073105216026306, 0.10291515290737152, -0.31859326362609863, -0.40827587246894836, -0.34428277611732483, -0.27827441692352295, 0.72855144739151, -0.4829101860523224, 0.256940990686...
Model *copy = [[[self class] allocWithZone:zone] init]; copy.name = [self.name copy]; copy.number = self.number; return copy; } - (void) dealloc { [name release]; // I don't have to release int, right? it's not an object [super dealloc]; } ``` I'm especially confused with question 4. Sorry fo...
[ 0.3552730977535248, -0.21639664471149445, 0.6291860342025757, 0.11279349029064178, 0.29079514741897583, -0.34769555926322937, -0.04431809484958649, -0.2607491612434387, -0.4083653390407562, -0.23082436621189117, -0.22228144109249115, 0.660743236541748, -0.3918657600879669, 0.36597409844398...
release an object if you are an owner of it. See the [Memory Management Guide for Cocoa](http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html). You are only an owner of an object if you call a method whose name begins with `init`, `new`, or contains `copy` in its name. Since the for loo...
[ 0.18300028145313263, 0.02333996817469597, 0.3480541706085205, 0.03908728063106537, 0.0983632430434227, -0.5848643779754639, 0.2197180539369583, -0.06908322870731354, -0.5564685463905334, -0.10041878372430801, -0.38745254278182983, 0.6482862830162048, -0.23232945799827576, 0.094916611909866...
call it before the autorelease pool next empties. This will probably be shortly after your method returns to the main event loop. Since you don't know exactly when this will happen, you have to make sure that if you want to be able to access the object after the function (`loadXMLButtonClicked:` in this case) returns, ...
[ 0.193462535738945, -0.3609432280063629, 0.6756556034088135, -0.0784284695982933, 0.36578547954559326, -0.4522475004196167, 0.36156347393989563, -0.16520296037197113, -0.25501394271850586, -0.387246698141098, -0.22576767206192017, 0.8148919343948364, -0.149898961186409, 0.18869292736053467,...
to shadow a class member with a local variable of the same name. Secondly, unless `loadData` is being used as a multi-purpose utility function (which I'm guessing it isn't since it doesn't take any parameters), it should just assign the result directly to the member variable `objectArray`. It's pointless and error-pron...
[ 0.12087263911962509, -0.4723038971424103, 0.26968449354171753, -0.08880463987588882, -0.01673542708158493, -0.0391605980694294, 0.3280700147151947, 0.029470717534422874, -0.40170562267303467, -0.2577737867832184, -0.006508320104330778, 0.6630341410636902, -0.6637789011001587, 0.22937549650...
in front of it). Thus, `objectArray` is never retained, so it's going to be deallocated the next time the autorelease pool clears itself out, which is not what you want. You must retain it at some point, or conversely, just don't autorelease it at the end of `loadData`, and assign it the class member variable `objectAr...
[ 0.05900736153125763, -0.22466076910495758, 0.5289803743362427, 0.03254958987236023, 0.29701122641563416, -0.3723917007446289, 0.08119383454322815, -0.08245301246643066, -0.3189373016357422, -0.1386597454547882, -0.32963013648986816, 0.7581529021263123, -0.202437162399292, 0.474667102098464...
be copied every time you assign to it, and you will become an owner of the new object. 4th question - parser xml best practice: ======================================== You're making a shallow copy of the object array. If you want to make a deep copy, you can use the [`initWithArray:copyItems:`](http://developer.appl...
[ -0.022824425250291824, 0.11403223127126694, 0.7384293675422668, 0.21081453561782837, 0.4107206463813782, -0.299160897731781, -0.014921998605132103, 0.0404014065861702, -0.4157235324382782, -0.31777745485305786, -0.04487922787666321, 0.44957253336906433, -0.09832379966974258, 0.297973811626...
time as well. If you follow all of the rules from the Memory Management Guide for Cocoa, you won't have any problems. You should never rely on retain counts, since you don't know how many times an object has been autoreleased. They're a debugging aid, not something that should be used for program control flow. > this ...
[ 0.02509141154587269, -0.019474249333143234, 0.6379831433296204, 0.1287999451160431, 0.2513948976993561, -0.07250518351793289, 0.1806928962469101, 0.05219830945134163, -0.5499951839447021, -0.5026504993438721, -0.1163933128118515, 0.807239294052124, 0.05246859788894653, 0.24000465869903564,...
it here, and then release it when you're sure you're done with it. > should I copy here or just addObject, it retains anyway? Just `addObject`: when you add items into an `NSArray`, `NSSet`, or `NSDictionary`, they are automatically `retain`ed by the data structure. When you remove them, they're `release`d. Most of ...
[ 0.1861286461353302, -0.02535923384130001, 0.42092862725257874, 0.2506364583969116, 0.2136472910642624, -0.2583959400653839, 0.17772740125656128, -0.031346965581178665, -0.3786395490169525, -0.38360318541526794, -0.38734373450279236, 0.4456998109817505, -0.17735879123210907, 0.0093061653897...
... and thanks for reading... I'm still learning the ropes so please be forgiving... ;-) I am writing a function that meshes a solid in space. The mesh is done by using objects of a "Node" class and each node is represented by: ``` int id double p double r ``` Initially I thought that a map would be the way to go...
[ -0.1107553243637085, -0.22692009806632996, 0.4623912572860718, -0.07347547262907028, -0.042943987995386124, 0.2223138064146042, 0.28598129749298096, -0.37094566226005554, -0.0293875802308321, -1.1675031185150146, 0.15023356676101685, 0.28888508677482605, -0.4674421548843384, -0.01245266478...
loop I do something like this: ``` node = new Node(i); // the node constructor sets the id to the value of i. ``` and I add the new node to the map: ``` NodeMap[i] = node; ``` But.... I realized that I will need to do a lookup in the map not by first key (the id) but by the p and r parameters (the coordinates of ...
[ 0.044326696544885635, -0.18171162903308868, 0.07337404042482376, 0.017004530876874924, 0.13202990591526031, -0.2418341040611267, 0.1914384812116623, -0.11143432557582855, -0.07882345467805862, -0.6002521514892578, -0.015496904961764812, -0.06299126148223877, -0.4119228422641754, 0.19376334...
a suggestion on how to solve this particular problem? Thanks much! AsvP. A map<> won't work. C++ associative containers work on the basis of key equality, and comparing floating-point numbers for equality doesn't work at all well. It sounds like you need to find a node, given x and y. The best way will depend on what...
[ -0.07121782749891281, 0.002488975878804922, 0.06773380190134048, 0.4787174463272095, -0.07036658376455307, 0.11478147655725479, 0.21570821106433868, 0.01973041333258152, -0.28783532977104187, -0.5972928404808044, 0.05820639431476593, 0.10396479070186615, -0.11399053782224655, -0.0742591246...
on either the x or y coordinate (I'll assume the x), and doing a binary search to find which nodes have x coordinates very close to your given x. That will generally select a small number of nodes, which can be searched for the approximately correct y. (Of course, if the nodes are in some sort of predictable grid, you...
[ 0.07351569831371307, 0.006015114486217499, 0.29985159635543823, 0.15935491025447845, 0.0005405364208854735, 0.031391456723213196, -0.026851361617445946, -0.06326770782470703, -0.07565849274396896, -0.6532929539680481, -0.03702625259757042, 0.18892867863178253, -0.0478435754776001, 0.094829...
about this to help much, but there are resources for geometric algorithms.
[ 0.12836414575576782, 0.08899405598640442, -0.08151740580797195, 0.23703619837760925, 0.09407594799995422, -0.3058897852897644, 0.12971603870391846, 0.31443649530410767, -0.2119399756193161, -0.5752847790718079, 0.11469373106956482, 0.23308736085891724, 0.12085448205471039, 0.22602677345275...
Consider the following SQL Server 2005/2008 query: ``` Select [UID], [DESC] From SomeTable Order By [Desc]; ``` If Desc is a fairly long field (Varchar(125) with many entries > 70 chars) and you don't need a strict sorting, would it would be more efficient to do this: ``` Select [UID], [DESC] From SomeTable Order B...
[ -0.34830087423324585, 0.017107538878917694, 0.3023131191730499, -0.133809894323349, -0.45910975337028503, 0.11776003241539001, 0.24394571781158447, -0.4520195722579956, -0.1103038564324379, -0.45278850197792053, -0.06738479435443878, 0.4505966007709503, -0.1602144092321396, 0.0582372806966...
rare operation. Which option would you choose? Note 2: I'm asking mostly out of curiosity here. In my application, Desc *is* an indexed field and I am not using Substring. However, I briefly considered using Substring and it occurred to me that I didn't truly know which of the above approaches would be more efficient....
[ 0.08482659608125687, -0.3123733103275299, -0.06279416382312775, 0.04759959131479263, 0.07673761993646622, 0.007737187668681145, 0.11841897666454315, 0.059443119913339615, -0.17554216086864471, -0.6663585305213928, -0.20733053982257843, 0.7378367781639099, -0.28921452164649963, -0.234686955...
but I am a bit too busy to test it out right now. However, if you know differently, please correct me! **Update/clarification:** you should be assuming that the Desc field is *not* indexed for purposes of the original question. If it is indexed, the answer is pretty easy. Use of a `non-clustered index` implies an impl...
[ 0.21858428418636322, -0.036639463156461716, 0.17818668484687805, 0.2831348776817322, 0.019751615822315216, -0.3552605211734772, 0.13809551298618317, -0.13410963118076324, -0.29619845747947693, -0.6421940922737122, -0.12031234800815582, 0.5612505674362183, -0.3877587616443634, 0.09308639913...
is about `10` times as costly as the `TABLE SCAN`. If you need all the results of an ordered query, especially as a part or a more complex query implying the `nested loops`, it's sometimes more efficient to perform a `TABLE SCAN` and sort the results. Table needs to be sorted only once and results of the sort will be...
[ -0.07245686650276184, -0.3004416227340698, 0.23716670274734497, 0.2789906859397888, -0.06470799446105957, 0.15997864305973053, 0.12313131988048553, -0.17602083086967468, -0.45132794976234436, -0.5650758147239685, -0.15949299931526184, 0.2847788631916046, -0.27431681752204895, -0.0263815894...
more responsive, as you get the first rows faster.
[ -0.008273144252598286, -0.3023588955402374, 0.4648968577384949, -0.002569702221080661, -0.5482236742973328, 0.48597291111946106, -0.15266914665699005, 0.308342844247818, -0.38990288972854614, -0.8944032192230225, -0.059090521186590195, 0.6830223798751831, 0.3636234700679779, -0.22837582230...
I am working on some code to load some bootstrapping data into my Grails app. Something is not working with one of the classes I am trying to create, so it would be very convenient to be able to run that code interactively against the grails runtime environment and I am wondering if there is a way to do that. I know ...
[ 0.3504292070865631, 0.2653684616088867, -0.0803660973906517, 0.2617788314819336, 0.11981425434350967, -0.07904904335737228, 0.25390625, 0.18518759310245514, -0.3153274655342102, -0.25881361961364746, 0.3143761456012726, 0.6606147885322571, 0.01815919205546379, -0.058576442301273346, -0.0...
It seems like [Debug Plugin](http://grails.org/Debug+Plugin) has plans to offer this, but is not there yet. I found [this script](http://naleid.com/blog/2008/03/31/using-gant-to-execute-a-groovy-script-within-the-grails-context-updated/#more-11) that allows you to execute a script from Grails context, but I'd like s...
[ 0.11636535823345184, 0.14952847361564636, 0.033404119312763214, -0.24104639887809753, -0.35143283009529114, -0.08859310299158096, 0.5681596398353577, 0.0055225989781320095, 0.013610107824206352, -0.5434879064559937, 0.24998202919960022, 0.639622151851654, -0.17601455748081207, -0.091207109...
Bit stuck about how to go about this one. Given the current month, I need to to return the date of the fourth saturday of each month. e.g. This month would be Feb 20th, next would be March 27th. Thanks I'm not a PHP coder, however, it seems strtotime is what you're after. You can use strtotime("fourth Saturday") an...
[ 0.3449871838092804, 0.1914684921503067, 0.7799936532974243, 0.22744102776050568, -0.4307638704776764, 0.22159452736377716, 0.6532593965530396, 0.21027138829231262, -0.457163006067276, -0.2684672772884369, -0.10843510925769806, 0.19906924664974213, -0.014341463334858418, 0.22264821827411652...
We installed SP1 on our Team Foundation Server 2008 server. Everything seems fine after the install, except there is a red X on the Reports folder in the Team Explorer in Visual Studio. If we attempt to access the Reporting Services web site, we get a message that says that the "report server is unavailable". There wer...
[ 0.1693422943353653, -0.08995917439460754, 0.41792795062065125, 0.18256936967372894, -0.11012914031744003, -0.3936377763748169, 0.39816898107528687, -0.11374031752347946, -0.3592846691608429, -0.6007590889930725, -0.07065578550100327, 0.3451215326786041, -0.4845138490200043, -0.467412978410...
no errors but still no report availability. The SQL Server instance where our data lives is up and running fine and we can query the OLAP cube and the relational side with no problem. All of our developer machines are already at VSTS 2008 SP1. Visual Studio is not installed on the server. We looked at the logs files...
[ 0.21284742653369904, 0.16493470966815948, 0.2841477394104004, 0.2340206354856491, -0.16283456981182098, -0.09639135748147964, 0.4222652018070221, 0.3067024052143097, -0.3318213224411011, -0.63083815574646, 0.3049083650112152, 0.6144093871116638, 0.0266567375510931, 0.15545521676540375, -...
greatly appreciated. I'll post any updates on other things we try here. UPDATE: There is a login error showing up the ReportServer(timestamp).log file. The login on the reporting services service is not the login that is showing up in this error, so I'm not yet sure what process is actually trying to make the connecti...
[ 0.4291605055332184, 0.1831550896167755, 0.199225053191185, 0.11789770424365997, -0.11445116251707077, -0.23372888565063477, 0.37126338481903076, -0.07676021754741669, -0.3806973695755005, -0.5261670351028442, 0.004678287077695131, 0.35588210821151733, -0.08525695651769638, 0.17716853320598...
on the Reporting Services application pool * Click on the Identity tab * Change the account from NetworkService to our TFS domain account * Edit the rsreportserver.config located in "\Program Files\Microsoft SQL Server\MSSQL.1\Reporting * Change the "NT Authority\NetworkService" to "OurDomain\TFSDomainAccount" * Restar...
[ 0.3678528368473053, 0.0704793781042099, 0.5734120011329651, -0.11835110187530518, -0.07318179309368134, -0.4374427795410156, 0.5213862061500549, 0.13740673661231995, -0.3392547070980072, -0.7027485966682434, -0.09756401926279068, 0.34385570883750916, -0.27426934242248535, 0.261723935604095...
I'm currently in the process of learning C++, and because I'm still learning, I keep making mistakes. With a language as permissive as C++, it often takes a long time to figure out exactly what's wrong -- because the compiler lets me get away with a lot. I realize that this flexibility is one of C++'s major strength...
[ 0.3486977815628052, 0.3156752586364746, -0.1605909913778305, 0.05912775918841362, -0.09267716109752655, -0.15907438099384308, 0.25433585047721863, -0.016023805364966393, -0.04636106267571449, -0.48539477586746216, -0.005125426221638918, 0.6351345777511597, -0.02720589190721512, -0.04611781...
maximum compiler warnings (that's the `-Wall` option if you're using the Gnu compiler). 'Lint' is the archetypical static analysis tool. `valgrind` is a good run-time analyzer.
[ -0.03041689284145832, -0.13724714517593384, -0.03100280649960041, -0.01839682087302208, -0.3733925223350525, -0.15583142638206482, 0.10205724090337753, 0.09280551970005035, -0.2432248294353485, -0.37104132771492004, -0.15609531104564667, 0.7374266386032104, -0.40766552090644836, -0.1734849...
I've got a layout bug that shows up in IE6, and **I'm trying to come up with a way to give some clues to this content in our content area so that it won't drop down below the navigation menu.** Sadly, while this would probably be relatively easy to fix if I could redesign the whole page, I can't do that...it's a live s...
[ 0.4456482529640198, 0.2979593873023987, 0.3925909101963043, -0.038613881915807724, 0.15370392799377441, -0.2694389224052429, 0.4862441420555115, 0.43519458174705505, -0.356660395860672, -0.8860132694244385, -0.0980396717786789, 0.3125295042991638, -0.09485131502151489, 0.2588137984275818, ...
The layout is supposed to look something like this: ``` +-------+ +-------------------+ | Menu | | Content chunk 1 | | | +-------------------+ | | +-------------------+ +-------+ | Content chunk 2 | +-------------------+ Footer ``` But in IE 6, it looks like: ``` +-------+ | ...
[ -0.39900222420692444, -0.012062348425388336, 0.6696045398712158, -0.06281370669603348, -0.021572191268205643, -0.03522894158959389, 0.031008539721369743, 0.10237454622983932, -0.12937532365322113, -0.9457423686981201, -0.17698784172534943, 0.6191124320030212, -0.12524127960205078, 0.005118...
| Content chunk 2 | +-------------------+ Footer ``` I've been looking at trying to fix this and am going through some of the references suggested [here](https://stackoverflow.com/questions/83696/strategy-for-fixing-layout-bugs-in-ie6), but I'm hoping a css guru might be able to easily see some light th...
[ -0.10329565405845642, 0.2716769874095917, 0.5305447578430176, -0.18513326346874237, -0.14801129698753357, -0.17804394662380219, -0.06242135167121887, -0.14487121999263763, -0.37941163778305054, -0.6633006930351257, -0.36721742153167725, 0.42598241567611694, -0.34203821420669556, -0.0950889...
Menu Item 2<br /> </div> <!-- Main content area --> <div style="position: relative; width: 565px; float: left; margin-right: -222px"> <!-- I'm able to start modifying here. --> <!-- Content chunk 1 --> <table border="1"> <tr> <td>This is data
[ -0.3347664475440979, -0.33331888914108276, 0.7052602767944336, -0.10545920580625534, -0.25578197836875916, 0.11721757054328918, -0.1268986463546753, -0.0015351794427260756, -0.21654587984085083, -0.7278106212615967, -0.30732712149620056, 0.34559860825538635, -0.21096457540988922, 0.0066391...
chunk 1 withALongChunkThatDoesn'tDivideWell</td> <td>This is data chunk 2 withALongChunkThatDoesn'tDivideWell</td> <td>This is data chunk 3 withALongChunkThatDoesn'tDivideWell</td> <td>This is data chunk 4 withALongChunkThatDoesn'tDivideWell</td> <td>This ...
[ -0.04729696363210678, 0.22499608993530273, 0.19131796061992645, 0.0883999764919281, -0.28117117285728455, 0.24947813153266907, 0.050639938563108444, -0.4524857997894287, -0.007495662663131952, -0.1346733719110489, -0.685610830783844, 0.461243212223053, -0.15220105648040771, -0.067014910280...
</table> <!-- I'd like to be able to stop modifying here. --> <!-- Content chunk 2 --> <table border="1"> <tr> <td>This is data chunk 1</td> <td>This is data chunk 2</td>
[ 0.17768540978431702, -0.031264644116163254, 0.45758721232414246, 0.10018312931060791, -0.12250516563653946, -0.06567824631929398, -0.024645445868372917, -0.01523561216890812, -0.26661425828933716, -0.6354714035987854, -0.0725809708237648, 0.3374655842781067, -0.25705963373184204, 0.0248328...
<td>This is data chunk 3</td> <td>This is data chunk 4</td> <td>This is data chunk 5</td> </tr> </table> <!-- I have to stop modifying here. --> <!-- Footer -->
[ 0.28550076484680176, 0.032520849257707596, 0.4232311546802521, -0.086097851395607, -0.1530558168888092, 0.15790919959545135, 0.04609541594982147, -0.30868127942085266, -0.2286718785762787, -0.5278367400169373, -0.17911116778850555, 0.42107224464416504, -0.13328702747821808, 0.1204490885138...
<div style="float: clear; text-align: center;"> Here's a footer of some kind. I don't want to be overlapped. </div> </div> </body> </html> ``` As an aside, I know the css style statements in the areas surrounding the content area aren't ideal. I didn't code them, I just have to deal with them. I haven...
[ 0.3644017279148102, 0.19310106337070465, 0.23708727955818176, 0.07781851291656494, -0.3522464334964752, 0.0038326315116137266, 0.003727961564436555, -0.0454399548470974, -0.17253722250461578, -0.6951997876167297, 0.18130455911159515, 0.28971177339553833, 0.00405091792345047, -0.14600817859...
to those of you that have already responded...I'm going to start going through those responses now to evaluate them. I can't see any way of correcting this using only CSS. IE6's wrapping calculation is going to be preformed in such a way that unless the main content area is expanded, the content will be moved under the...
[ 0.2679036557674408, 0.05047661438584328, 0.43506285548210144, -0.20540755987167358, 0.17032814025878906, -0.092209592461586, 0.5076209306716919, -0.16969022154808044, -0.3556642234325409, -0.7767330408096313, -0.4801316559314728, 0.5756919980049133, -0.4237758219242096, 0.25317367911338806...
( "content" ); if ( main && content ) main.style["width"] = ( content.clientWidth + 160 ) + "px"; } ``` I used IDs for clarity, but if you couldn't modify the markup, you could get the elements using relatives.
[ 0.07282537966966629, 0.0098080700263381, 0.44613200426101685, -0.10771778970956802, 0.1064973846077919, -0.1640676110982895, 0.18210448324680328, -0.14844053983688354, -0.1401778906583786, -0.38378065824508667, -0.3264784812927246, 0.40576934814453125, -0.266094446182251, 0.099246092140674...
I am particularly interested in a how [hide folders](http://www.cleanersoft.com/hidefolder/free_hide_folder.htm) work or how can it be achieved programatically (.net). How can I create a folder such a way that 1. its hidden 2. Does not appear in search (even if hidden folders are opted) 3. No files system structure m...
[ 0.6615424752235413, -0.01904660277068615, 0.26347815990448, 0.144476518034935, -0.05674484372138977, -0.3989619314670563, 0.3796304762363434, -0.0155149195343256, -0.07411804795265198, -0.7701875567436218, -0.08790645003318787, 0.21243399381637573, -0.045200079679489136, -0.002578222425654...
I have a strong need to start implementing database driven graphs on a couple of projects and the only library I have really played with is PEAR's Image\_Graph. On the surface this seems fairly limited and like it may not be the best solution. I am going to need to generate both bar/pie charts, nothing overly fancy for...
[ 0.7036258578300476, 0.39087992906570435, -0.2128278613090515, 0.2255888134241104, -0.19004885852336884, -0.07044125348329544, 0.1459873616695404, 0.5020884275436401, -0.3091021478176117, -0.6941890716552734, 0.14355403184890747, 0.27276375889778137, -0.297850102186203, -0.21538770198822021...
great.
[ 0.33854052424430847, 0.21423454582691193, 0.14216764271259308, 0.06862836331129074, 0.20263546705245972, -0.3871140778064728, 0.17752300202846527, 0.31986188888549805, -0.04624022915959358, -0.1483263224363327, 0.17986761033535004, 0.14291538298130035, 0.28308629989624023, 0.42820698022842...
Can someone explain this OOP javascript structure? I realize it is how you create 'objects' in javascript, just need some explanation on the notation and what it means: ``` var vote = function(){ return { P1: function() { alert('P1'); }, P2: function() {
[ 0.22209468483924866, -0.13303294777870178, 0.3175714910030365, -0.041016850620508194, -0.07969235628843307, -0.1117539033293724, 0.044222138822078705, -0.30864080786705017, -0.2483454942703247, -0.42391249537467957, -0.2558903098106384, 0.41926029324531555, -0.5999811291694641, -0.36164945...
alert('P2'); } }; }(); vote.P1(); vote.P2(); ``` 1. Why are the public methods in the return call? How is this possible? Separated by commas? 2. Why does the end of the 'object' have to be (); ? 3. Naming convention for internal methods and public methods? 4. Are public pr...
[ -0.10219302028417587, -0.24891942739486694, 0.20957821607589722, -0.022145580500364304, 0.032748084515333176, -0.008811939507722855, 0.01608026586472988, -0.4234660267829895, -0.1493312567472458, 0.025838062167167664, -0.3480599522590637, 0.4439106285572052, -0.610832929611206, -0.04395862...
= function(){ var privateMember = 3; // lets define a private member, this will only be available inside the function scope, so we can't do "vote.privateMember" because we're not returning it below // It's returning an object, {} // these are considered public because they are returned by the function, mak...
[ -0.11922678351402283, -0.42839646339416504, 0.618419885635376, -0.3951914608478546, 0.2202209234237671, 0.21490585803985596, 0.14524103701114655, -0.63187575340271, -0.3275030851364136, -0.506939172744751, -0.39659473299980164, 0.3721897304058075, -0.5626970529556274, -0.023459400981664658...
so we can call this like "vote.P1()" // we're calling a privateMember in here P1: function() { alert('P1'); alert(privateMember); }, // second value of the object is a function // so we can call this like "vote.P2()"
[ -0.11044267565011978, -0.5334377884864807, 0.27377477288246155, -0.07688780128955841, -0.02048001065850258, 0.06972422450780869, -0.11406176537275314, -0.37353071570396423, -0.45174866914749146, -0.35341066122055054, -0.3747824728488922, 0.342681884765625, -0.7088207006454468, -0.351739555...
P2: function() { alert('P2'); } }; }(); // () means it will execute the function, so "vote" will store the return value of this function, it's a shorthand for `var vote = function(){}; vote = vote(); ``` Naming convention for private methods is usually to put an underscore before the...
[ -0.05193296819925308, -0.4739152789115906, 0.22208577394485474, -0.29821062088012695, -0.011620884761214256, 0.18436333537101746, -0.05229949951171875, -0.549502432346344, -0.12475208193063736, -0.06503234058618546, -0.31855151057243347, 0.3183329403400421, -0.5919435620307922, -0.24957674...
Given the following code: ``` void foo( int* array ) { // ... } void bar( int** matrix ) { // ... } int main( void ) { int array[ 10 ]; int matrix[ 10 ][ 10 ]; foo( array ); bar( matrix ); return 0; } ``` I don't understand why I get this warning: > warning: passing argument 1 of ‘...
[ 0.41410478949546814, 0.28714120388031006, 0.0884874016046524, -0.3658355176448822, 0.00016480048361700028, -0.3407011926174164, 0.6074017286300659, -0.3136812150478363, -0.07336147874593735, 0.0004540751688182354, -0.22251100838184357, 0.5758492946624756, -0.6947304606437683, 0.10671991109...
magic is, **all of the following are totally, 100%, equivalent**: ``` void foo(int (*array)[10]); void foo(int array[][10]); void foo(int array[10][10]); void foo(int array[42][10]); ``` It is *very* important to draw the distinction of a pointer and an array. *An array is not a pointer*. An array can be converted t...
[ 0.09496569633483887, -0.11315592378377914, 0.4806838035583496, 0.2699098289012909, -0.2061433643102646, -0.06366053223609924, 0.3021082282066345, -0.32774749398231506, -0.36775466799736023, -0.27143487334251404, -0.13205580413341522, 0.46632346510887146, -0.22249382734298706, 0.11728514730...
the data itself. Now, **a multi-dimensional array is just an array of arrays.** The arrays are nested into a parent array. So, the sizeof of your array is: ``` (sizeof(int) * 10) * 10 ``` That is because you have 10 arrays, all of which are arrays of 10 integers. Now, if you want to pass that array, it is converted....
[ -0.16567061841487885, 0.08434266597032547, 0.396940678358078, 0.09280569851398468, -0.13133452832698822, 0.15498296916484833, 0.07909082621335983, -0.4686681628227234, -0.2789286971092224, -0.7244312763214111, -0.11740259826183319, 0.14193657040596008, -0.44677478075027466, -0.013580235652...
of `int*`, nor a `int**`. You may ask why the array is not passed as an `int**`. It's because the compiler has to know the row-length. If you do an `array[1][0]`, the compiler will address a place `sizeof(int) * 10` bytes apart from the begin of the 2 dimensional array. It decodes that information in the pointer-to-arr...
[ -0.06041713431477547, 0.21052078902721405, 0.10148850828409195, -0.0887698382139206, -0.22951315343379974, 0.2665988802909851, 0.1169571802020073, -0.21100015938282013, -0.3349429965019226, -0.6326767206192017, -0.10029621422290802, 0.2382909655570984, -0.348287433385849, 0.123832821846008...
array. So i would also not use the second last version. Best is to use the first or second version. What is important to remember is that **C has no (real) array parameters**! The parameter will be a pointer in the end (pointer to array in this case). Note how the multi-dimensional case of above is similar to the dege...
[ 0.17372329533100128, 0.06657340377569199, 0.2992308735847473, -0.30299416184425354, -0.20569805800914764, -0.04429389908909798, 0.35670006275177, -0.19145925343036652, -0.16728302836418152, -0.36805832386016846, -0.18923760950565338, 0.7096784114837646, -0.6109172701835632, 0.1190936565399...
When you select, for example, a Size of 8 in a Font Dialog for Microsoft Sans Serif, it returns a font that .NET displays as having a size 8.25? Why is this exactly? A point is 1/72 of an inch, so the font should be 8/72 (0.111111) inches high. Windows assumes a standard display is 96 DPI, unless you take pains to co...
[ 0.026940392330288887, 0.09809041023254395, 0.5985043048858643, -0.31795239448547363, -0.3264457881450653, 0.40943577885627747, 0.29626166820526123, -0.19254525005817413, -0.39729270339012146, -0.5738422274589539, -0.015081782825291157, 0.21991552412509918, -0.03852299600839615, -0.15754354...
For some reason, my SQL installation isn't working :) ``` SELECT DATEADD(s,1234567890, '19700101') ``` Maybe [this site](http://coolepochcountdown.com/) would help (link from [Moose](https://stackoverflow.com/users/19032/moose)). Total awesomeness!
[ 0.16180814802646637, 0.28817659616470337, 0.17445416748523712, 0.317283570766449, 0.24222084879875183, -0.6684446930885315, 0.4958966076374054, 0.1694825440645218, -0.5277990102767944, -0.3129841685295105, -0.17028118669986725, 0.2284044474363327, 0.08160996437072754, 0.2324637770652771, ...
I'm looking to detect local connection loss. Is there a mean to do that, as with the events on the Corelabs components ? Thanks EDIT: Sorry, I'm going to try to be more specific: I'm currently designing a prototype using datasnap 2009. So I've got a thin client, a stateless server app and a database server. What I w...
[ -0.07593373209238052, 0.02972082979977131, 0.30722880363464355, 0.1832985132932663, 0.004004243295639753, -0.042710985988378525, 0.2953011989593506, 0.10043996572494507, -0.443999320268631, -0.8345710039138794, 0.20050832629203796, 0.41299423575401306, -0.19590190052986145, 0.0121904937550...
2-tier I used to manage that with ODAC components, the TOraSession have some events to handle this issues. Normally there is no event fired when a connection is broken, unless a statement is fired against the database. This is because there is no way of knowing a connection loss unless there is some sort of is-alive pi...
[ 0.022709010168910027, -0.2761547565460205, 0.2341027706861496, 0.17428205907344818, -0.054029423743486404, -0.7902169227600098, 0.410179078578949, -0.3877447545528412, -0.1979181468486786, -0.4882916212081909, -0.20201542973518372, 0.37332630157470703, -0.21995732188224792, 0.0324661843478...
of the database events (beforeexecute?). Or make a timer that checks every 10 seconds.
[ 0.37869471311569214, -0.001054737949743867, 0.4163944721221924, 0.2071240246295929, 0.3814743161201477, -0.22074294090270996, 0.17675136029720306, 0.19488930702209473, -0.1266459971666336, -0.41625112295150757, 0.027745069935917854, 0.7015442848205566, 0.08438699692487717, -0.0443797595798...
Is there a way to get an automatic feedback if an error (even syntax errors) occurs when running a JavaScript on the client side? I was thinking of something like this: ``` <script src="debugger.js"></script> <script> // some script with an error in it </script> ``` And every time the debugger notices an error ...
[ 0.07342744618654251, -0.11458472907543182, 0.374268114566803, -0.23836997151374817, -0.14629881083965302, -0.07721509784460068, 0.17582406103610992, -0.022284770384430885, -0.09174603223800659, -0.5338582992553711, -0.10787881165742874, 0.7070879340171814, -0.47364118695259094, -0.00195485...
txt+="Line: " + l + "\n\n"; //Insert AJAX call that passes data (txt) to server-side script return true; }; ``` As for syntax errors, you're out of luck. Javascript simply dies when there's a syntax error. There's no way to handle it at all.
[ 0.13796378672122955, 0.10437354445457458, 0.19252370297908783, -0.05720143020153046, -0.04379170015454292, -0.11615050584077835, 0.5325104594230652, 0.08960787206888199, -0.1271963268518448, -0.7870774865150452, -0.3400212228298187, 0.5997910499572754, -0.29144981503486633, -0.118294470012...
Are there any language lawyers in the house? Should the following code compile? ``` include <set> bool fn( const std::set<int>& rSet ) { if ( rSet.find( 42 ) != rSet.end() ) return true; return false; } ``` On one of the platforms (Sun Workshop) this does not compile. It reports that the find function returned...
[ -0.10987762361764908, 0.43559011816978455, 0.25454336404800415, -0.28415003418922424, 0.11904837191104889, 0.32536712288856506, 0.5755906701087952, -0.6779457926750183, -0.18887796998023987, -0.5476080179214478, -0.2117312103509903, 0.9795063734054565, -0.28409966826438904, -0.124660708010...
functions and 2 end() functions (const and non-const versions). It sort of sounds like Sun's STL is broken somehow. Since you are passing in a const reference, the compiler should be able to select the correct find() and end() functions.
[ -0.21855109930038452, -0.07764145731925964, 0.2722255289554596, -0.003212985582649708, -0.059014204889535904, -0.3043002486228943, 0.20815110206604004, -0.10698927193880081, 0.21575914323329926, -0.43793779611587524, -0.14722897112369537, 0.5692965388298035, -0.42672136425971985, -0.017389...
i want to send the xml of an `XmlDocument` object to the HTTP client, but i'm concerned that the [suggested soltuion](https://stackoverflow.com/questions/543319/how-to-return-xml-in-asp-net/543431#543431) might not honor the encoding that the `Response` has been set to use: ``` public void ProcessRequest(HttpContext c...
[ -0.05193600058555603, -0.014406824484467506, 0.7418124675750732, -0.01394698116928339, -0.005937023088335991, 0.13462848961353302, 0.4018824100494385, -0.46907296776771545, 0.047955527901649475, -0.6548060178756714, -0.6296236515045166, 0.5942502617835999, -0.11721299588680267, 0.152476817...
doc.Save(context.Response.OutputStream); } ``` Will the `Response.OutputStream` translate the binary data that's being written to it on the fly, and make it Unicode? Or is the `Response.ContentEncoding` just *informative*? If the ContentEncoding is just informative, what content encoding will the follow text string...
[ -0.17927683889865875, 0.010299485176801682, 0.5573186874389648, -0.11239641159772873, 0.29622218012809753, -0.04265594854950905, 0.21727445721626282, -0.12382141500711441, 0.08595707267522812, -0.6449249982833862, -0.6736505627632141, 0.5942566990852356, -0.5187999606132507, -0.00588699476...
will use the encoding specified by the `TextWriter`. The `XmlDocument` will automatically change any xml declaration node, i.e.: <?xml version="1.0" encoding="ISO-8859-1"?> to match the encoding used by the `Response.Output`'s encoding setting. 2. The `Response.Output` `TextWriter`'s encoding settings comes from the ...
[ -0.08692953735589981, -0.13602782785892487, 1.0409119129180908, -0.11539506167173386, 0.1956557035446167, 0.020513353869318962, 0.17366237938404083, -0.5841264724731445, 0.2705830931663513, -0.7991126775741577, -0.3242872655391693, 0.8784037828445435, -0.29492953419685364, -0.3248405754566...
//Note: We add IRequiesSessionState so that we'll have access to context.Session object //Otherwise it will be null public void ProcessRequest(HttpContext context) { XmlDocument doc = GetXmlToShow(context); //GetXmlToShow will look for parameters from the context if (doc != null) {...
[ -0.08627624064683914, -0.1784704178571701, 0.535139799118042, 0.0009608206455595791, -0.021650860086083412, 0.06846297532320023, 0.49916714429855347, -0.3992461562156677, -0.08227464556694031, -0.672685980796814, -0.1429612785577774, 0.8375446200370789, -0.38193461298942566, 0.134151220321...
= System.Text.Encoding.UTF8; //we'd like utf-8 doc.Save(context.Response.Output); //doc save itself to the textwriter, using the encoding of the text-writer (which comes from response.contentEncoding) } #region Notes /* * 1. Use Response.Output, and NOT Response.OutputStrea...
[ -0.14086087048053741, -0.4953618347644806, 0.5839652419090271, -0.21691414713859558, 0.28015366196632385, 0.16121526062488556, 0.10570844262838364, -0.02159852348268032, -0.06746602803468704, -0.9713215827941895, -0.4398326873779297, 0.31136244535446167, -0.16526690125465393, 0.23157003521...
* When an XmlDocument saves itself to a TextWriter, it will use the encoding * specified by the TextWriter. The XmlDocument will automatically change any * xml declaration node, i.e.: * <?xml version="1.0" encoding="ISO-8859-1"?> * to match the encoding used by the ...
[ 0.09886781126260757, -0.1314963400363922, 0.6332751512527466, 0.06368020921945572, 0.15721718966960907, -0.048064205795526505, -0.10593576729297638, 0.018081575632095337, 0.17300249636173248, -0.920069694519043, -0.5320074558258057, 0.3241172432899475, -0.19764098525047302, -0.005837046541...
* 2. The Response.Output TextWriter's encoding settings comes from the * Response.ContentEncoding value. * 3. Use doc.Save, not Response.Write(doc.ToString()) or Response.Write(doc.InnerXml) * 3. You DON'T want to Save the xml to a string, or stuff the xml into a string * and ...
[ 0.12885041534900665, -0.20722323656082153, 0.5842989683151245, -0.2202931046485901, -0.12308424711227417, 0.10476376861333847, 0.24040518701076508, -0.2547829747200012, 0.10049521178007126, -0.7239109873771667, -0.27334079146385193, 0.6076586246490479, -0.421832799911499, -0.32491156458854...
- doesn't follow the encoding specified * - wastes memory * * To sum up: by Saving to a TextWriter: the XML Declaration node, the XML contents, * and the HTML Response content-encoding will all match. */ #endregion Notes }
[ -0.1580381989479065, -0.12921394407749176, 0.7527649998664856, 0.058931268751621246, 0.14137449860572815, -0.06517219543457031, 0.3695167005062103, 0.05189259350299835, 0.23508165776729584, -0.8358832001686096, -0.12937898933887482, 0.41207706928253174, -0.22116628289222717, -0.24405550956...
public bool IsReusable { get { return false; } } } ``` --- The encoding that the XmlDocument will use when saving to a stream depends on the encoding specified in the **xml declaration node**. e.g.: ``` <?xml version="1.0" encoding="UTF-8"?> ``` If "UTF-8" encoding is specified in the xml declaration, then S...
[ -0.09010566771030426, 0.06054570898413658, 0.28290924429893494, -0.06121077388525009, -0.10490846633911133, -0.3687366247177124, 0.12766782939434052, 0.13785727322101593, 0.1464020311832428, -0.48896101117134094, -0.6246423721313477, 0.6000481247901917, -0.466640830039978, 0.12525178492069...
encodings strings](http://msdn.microsoft.com/en-us/library/system.xml.xmldeclaration.encoding.aspx), that you could also use in the xml declaration, are: * UTF-8 * UTF-16 * ISO-10646-UCS-2 * ISO-10646-UCS-4 * ISO-8859-1 * ISO-8859-2 * ISO-8859-3 * ISO-8859-4 * ISO-8859-5 * ISO-8859-6 * ISO-8859-7 * ISO-8859-8 * ISO-88...
[ -0.0749824047088623, 0.0021249004639685154, 0.4621930420398712, 0.12650702893733978, 0.07259847223758698, 0.1361953318119049, -0.14857152104377747, -0.1589328944683075, -0.22794006764888763, -0.9505580067634583, -0.5681182742118835, 0.04292399808764458, -0.4516041874885559, -0.002342787338...
doc.CreateXmlDeclaration("1.0", null, null); xmldecl.Encoding="UTF-8"; // Add the new node to the document. XmlElement root = doc.DocumentElement; doc.InsertBefore(xmldecl, root); ``` If the XmlDocument does not have an xml declaration, or if the xml declaration does not have an encoding attribute, the saved documen...
[ -0.18302519619464874, 0.09862051904201508, 0.633806586265564, -0.04740403965115547, 0.23179028928279877, -0.186761274933815, -0.04567958414554596, -0.19364099204540253, 0.14652347564697266, -1.009094476699829, -0.51975417137146, 0.5552138686180115, -0.3045695424079895, 0.05607115477323532,...
written out (The encoding of the > XmlDeclaration node is replaced by the > encoding of the TextWriter). If there > was no encoding specified on the > TextWriter, the XmlDocument is saved > without an encoding attribute. If saving to a string, the encoding used is determined by the xml declaration node's encoding...
[ -0.042606156319379807, -0.012047437019646168, 0.4603273570537567, -0.16041839122772217, -0.113472118973732, 0.0826793760061264, 0.14696386456489563, -0.08100377768278122, 0.11982014775276184, -0.8133386969566345, -0.4463118314743042, 0.2258349061012268, -0.3099648356437683, -0.030256433412...
to save the xml to the Response.Output, rather than the Response.OutputStream. The Response.Output is a TextWriter, who's Encoding value follows what you set for the Response.Encoding. In other words: ``` context.Response.ContentEncoding = System.Text.Encoding.ASCII; doc.Save(context.Response.Output); ``` results i...
[ -0.024894006550312042, -0.1220707818865776, 0.7130934596061707, 0.03505846485495567, 0.06284768134355545, 0.3742690086364746, -0.06273802369832993, -0.20188425481319427, -0.0022186189889907837, -0.5983523726463318, -0.5588712692260742, 0.6223166584968567, -0.3198847770690918, -0.1631712168...
I'm working on a simple hello world TCP/IP client server app in C# and am unable to get my client to connect. Can anyone offer any additional troubleshooting steps? I'm starting to run out of ideas... Here are the relevant sections of code: server: ``` Console.Out.WriteLine("About to bind address"); IPAddress ipAd =...
[ -0.47699761390686035, 0.11477919667959213, 1.0880825519561768, -0.2875009775161743, 0.06018601357936859, 0.2741701006889343, 0.4369737505912781, -0.23471462726593018, -0.23810337483882904, -0.9076555371284485, -0.1863228678703308, 0.47465309500694275, -0.5253304839134216, 0.352949678897857...
port); tcpclnt.Connect(address, port); ``` I am able to ping the server from the client machine, however I am unable to telnet to the server using the bound port. I've tried a variety of ports (a few in the low 8000s and a few up around 40000). I have disable windows firewall on both systems. The systems are connecte...
[ 0.29749053716659546, 0.151315376162529, 0.5756080746650696, -0.0493752583861351, -0.00874193012714386, -0.014444089494645596, 0.3297506868839264, 0.14245282113552094, -0.49944671988487244, -0.7269446849822998, 0.025251569226384163, 0.6833045482635498, -0.43081867694854736, 0.41649860143661...
> No connection could be made because > the target machine actively refuses > it. I checked for an `InnerException` but it seems that there are none - that is the base exception. Could that be right? Not sure what else I should be looking at - any additional troubleshooting steps would be helpful. Thanks! The code...
[ 0.19235670566558838, 0.22327765822410583, 0.4557051956653595, 0.1652860790491104, -0.1277041882276535, -0.10989901423454285, 0.597202718257904, -0.0931306779384613, -0.22409012913703918, -0.6515711545944214, 0.04827427119016647, 0.8990357518196106, -0.0726701021194458, 0.1835477501153946, ...
network it should be something like 192.168.x.x or 10.x.x.x
[ 0.4879470467567444, 0.028133412823081017, 0.6026319861412048, 0.272285521030426, 0.09912800788879395, -0.3876103460788727, 0.2568049132823944, 0.4871657192707062, -0.2885657846927643, -0.8696140050888062, 0.13063743710517883, 0.44838348031044006, -0.37229475378990173, -0.0798543393611908, ...