text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'd say. 5. Blob data in databases is typically opaque. You can't filter it, sort by it, or group by it. That lessens the value of storing it in the database. 6. On the flip side, databases understand concurrency. You can use your standard model of transaction isolation to ensure that two clients don't try to edit the ...
[ 0.4023788571357727, -0.011450976133346558, 0.3195781409740448, 0.26829060912132263, -0.08496399968862534, -0.2929592728614807, -0.09077765047550201, 0.14633749425411224, -0.8337016701698303, -0.7058092951774597, -0.12064581364393234, 0.5607650279998779, -0.3438561260700226, 0.1699353009462...
need. This can be convenient. How are you gonna open that word document out of a blob field? 8. Permissions. Filesystems have permissions, and they can be a pain in the rear. Conversely, they might be useful to your application. Permissions will really bite you if you're taking advantage of 7, because it's almost guara...
[ 0.38256990909576416, -0.011254055425524712, -0.03540467098355293, 0.23885495960712433, 0.3758307099342346, -0.13095827400684357, 0.3139432370662689, 0.1567326933145523, -0.2829606831073761, -0.6882333755493164, -0.07161609828472137, 0.4918574392795563, 0.021992163732647896, 0.0831928998231...
very well-understood and optimized access pattern. Large blob fields may or may not be optimized well by your database, and you're almost guaranteed to have an additional network trip from the database to the web server as well. In short, people tend to use filesystems for files because they support file-like idioms t...
[ 0.23130041360855103, 0.015490606427192688, 0.10475059598684311, 0.46833810210227966, 0.12576693296432495, -0.28588560223579407, 0.024818753823637962, 0.4520593583583832, -0.47715768218040466, -0.8521060347557068, -0.21367131173610687, 0.3956443667411804, -0.19313748180866241, 0.07714249938...
I am using Hudson as a continuous integration server to test C/C++ code. Unfortunatly, I have a bug somewhere that causes memory corruption, so on some Windows machines I will sometimes get a "Application Error" dialog box explaining that an instruction referenced memory that could not be read. This dialog box pops up ...
[ 0.30494144558906555, 0.2603711783885956, -0.2757244408130646, 0.026632610708475113, 0.42244604229927063, -0.05920425429940224, 0.4301636815071106, -0.061981722712516785, -0.07639987021684647, -0.20050230622291565, 0.41448765993118286, 0.5158733129501343, -0.37337827682495117, 0.23518119752...
the dialog? 1. Use "Disable error reporting", as Mr. Gently suggests. See also [this PC World article](http://www.pcworld.com/article/108734/window_tips_xp_error_messagesyou_decide_what_to_report.html). 2. If you happen to have MS Visual Studio on your build machine, it will catch Application Errors and pop up a dialog...
[ 0.17705237865447998, 0.2272278219461441, 0.46415629982948303, 0.175889253616333, 0.08156285434961319, -0.14983706176280975, 0.2703718841075897, -0.02571295015513897, -0.19602711498737335, -0.35206419229507446, -0.41313526034355164, 0.714618980884552, -0.7102532386779785, 0.0583261884748935...
How can I access an inherited protected field from an object by reflection? Two issues you may be having issues with - the field might not be accessible normally (private), and it's not in the class you are looking at, but somewhere up the hierarchy. Something like this would work even with those issues: ``` public c...
[ 0.27344802021980286, -0.14607322216033936, 0.14199396967887878, -0.004914806690067053, 0.24963009357452393, -0.283273309469223, 0.45246008038520813, -0.22305290400981903, -0.08361615240573883, -0.43004298210144043, -0.2295665591955185, 0.6620259284973145, -0.13244156539440155, 0.1921255141...
System.out.println("value: " + myField.get(myObj)); } private static Field getField(Class clazz, String fieldName) throws NoSuchFieldException { try { return clazz.getDeclaredField(fieldName); } catch (NoSuchFieldException e) { Class superClass = clazz.getSuperclass(); if (superCl...
[ -0.1177300438284874, -0.5254333019256592, 0.43320244550704956, -0.09822095930576324, 0.4151708781719208, 0.05542897433042526, 0.40630337595939636, -0.23670876026153564, -0.12237921357154846, -0.4794166088104248, -0.4223819971084595, 0.6489079594612122, -0.3427649438381195, 0.22783105075359...
} } class SomeBaseClass { private Integer value; SomeBaseClass(Integer value) { this.value = value; } } class SomeDerivedClass extends SomeBaseClass { SomeDerivedClass(Integer value) { super(value); } } ```
[ -0.0034352613147348166, -0.27030041813850403, 0.3594498634338379, -0.013235940597951412, -0.005179896950721741, -0.3707617521286011, 0.26826998591423035, -0.05565805733203888, -0.062276195734739304, -0.35461753606796265, -0.34651973843574524, 0.41322237253189087, -0.2683682143688202, 0.061...
I assume I need to use the method call syntax instead of the query expression form, and I know the basics of grouping in the latter. Maybe some gurus can give caveats and advice on using group fields and aggregates obtained at runtime from a configuration, for use in a reporting like structure. Have you looked at Dynam...
[ 0.29407811164855957, -0.07488860189914703, -0.10506138950586319, 0.053652506321668625, -0.18983900547027588, -0.4285934567451477, -0.07910879701375961, 0.12285540252923965, -0.4201364815235138, -0.10969322174787521, -0.11147575080394745, 0.2658998668193817, -0.2598676085472107, -0.15796393...
This is really annoying when you try to follow the documentation [Squeak by Example](http://squeakbyexample.org/). Instead of calling the mouse buttons left, right, and middle, like in any other documentation, they give them colors. It's even suggested to label the mouse to help you learning. It's 2009 and there are ...
[ 0.014803331345319748, -0.03604397922754288, 0.4127366244792938, 0.09059572219848633, 0.24324654042720795, 0.08220067620277405, 0.17591746151447296, 0.5733613967895508, -0.3550456166267395, -0.4478277564048767, 0.27120673656463623, 0.27667489647865295, -0.029000556096434593, 0.4553273916244...
users will need to press different > physical buttons to achieve the same > effect. Instead, the mouse buttons are > labeled with colors. The mouse button > that you pressed to get the “World” > menu is called the red button; it is > most often used for selecting items in > lists, selecting text, and selecting >...
[ -0.03114350512623787, -0.3288571238517761, 0.41525396704673767, -0.07646936923265457, 0.18929323554039001, 0.19624803960323334, -0.06624835729598999, 0.10497824102640152, -0.30017155408859253, -0.8210539817810059, 0.18111149966716766, 0.4352791905403137, -0.4750847816467285, 0.102332510054...
invented). So maybe the question should be “why do current computers have colorless mouse buttons?” :D As for sticking with the colors in the book, I think the reason was that the colors are still mentioned in the code, and colors don't always get mapped to the same fingers depending on the platform. But I agree, the ...
[ 0.08691016584634781, -0.25806018710136414, 0.34314554929733276, 0.2878662645816803, 0.4236488938331604, 0.03837079554796219, -0.10478022694587708, 0.15797726809978485, -0.2942342758178711, -0.48181140422821045, 0.07385829091072083, 0.5447874665260315, -0.36003777384757996, 0.05157168954610...
I am trying to write a batch script and trying to wait 10 seconds between 2 function calls. The command: ``` sleep 10 ``` Does not make the batch file wait for 10 seconds. I am running Windows XP. **Note:** This is not a complete duplicate of [Sleeping in a batch file](https://stackoverflow.com/questions/166044) ...
[ 0.42182525992393494, 0.1338833123445511, 0.44778913259506226, -0.34418341517448425, 0.17016182839870453, 0.07220718264579773, 0.4328739047050476, 0.010997968725860119, -0.18808098137378693, -0.9072864651679993, -0.04437290504574776, 0.4779551327228546, 0.007914150133728981, 0.0002337268815...
specifies the desired timeout in milliseconds. * The `-n 1` part tells ping that it should only try *once* (normally it'd try 4 times). * The `> nul` part is appended so the ping command doesn't output anything to screen. You can easily make a sleep command yourself by creating a sleep.bat somewhere in your PATH and u...
[ 0.34494754672050476, -0.28594285249710083, 0.7874990105628967, -0.16731344163417816, 0.208415687084198, -0.25267717242240906, 0.4368916451931, -0.3380117118358612, -0.3155464828014374, -0.9847843050956726, -0.042177654802799225, 0.41543883085250854, 0.025266367942094803, -0.094292312860488...
- This block is assigned as "TEST-NET" for use in > documentation and example code. It is often used in conjunction with > domain names example.com or example.net in vendor and protocol > documentation. Addresses within this block should not appear on the > public Internet.
[ 0.7851641178131104, 0.05164603143930435, -0.140667125582695, 0.3767814636230469, -0.07230711728334427, -0.2971632182598114, 0.05043361708521843, -0.027729859575629234, 0.009832547046244144, -0.6882279515266418, -0.1566312164068222, -0.22549764811992645, -0.28916704654693604, 0.612882494926...
I need a way of sorting a string I have in PHP, the string is formatted like the one below, but is much bigger. ``` { 1, 3, 1, 2, }, { 2, 3, 2, 1, }, { 3, 3, 2, 2, }, { 1, 2, 3, 1, }, ``` What I would need it to do is turn each set of numbers that is in the brackets into an array. So in this case there would be four...
[ 0.046717725694179535, 0.17204847931861877, 0.15306267142295837, -0.01104986947029829, -0.34062787890434265, 0.4089134633541107, 0.1891723871231079, -0.6561262011528015, -0.2027890980243683, -0.5895603895187378, 0.32048311829566956, 0.33271360397338867, -0.12209638208150864, 0.0566360205411...
to do this? ``` $inbound = "{ 1, 3, 1, 2, }, { 2, 3, 2, 1, }, { 3, 3, 2, 2, }, { 1, 2, 3, 1, }"; $inbound = trim(preg_replace("/,\\s*}/i", "}", $inbound), " ,"); $inbound = str_replace("{", "[", $inbound); $inbound = str_replace("}", "]", $inbound); $array_of_arrays = json_decode('[' . $inbound . ']'); ```
[ 0.14783331751823425, -0.09039571136236191, 0.3908732831478119, -0.18696974217891693, 0.2744017541408539, -0.03231906145811081, 0.26388126611709595, -0.48514050245285034, -0.17174452543258667, -0.3815346956253052, -0.5346363186836243, 0.6276124119758606, -0.4811558425426483, -0.260749340057...
Standard EAV schema : One column for Entity ID, one for Attribute ID, one for Value ID. Historical EAV schema : Add an additional column(s) for times/date-ranges At run time, certain rows will be excluded. There may be 0, 1, or many rows returned per entity, per attribute. We only want the most recent value for each ...
[ -0.05680451914668083, 0.1400262415409088, 0.6865894794464111, -0.01891554333269596, 0.02327602170407772, -0.08872707933187485, -0.022269930690526962, -0.45036032795906067, -0.007811236195266247, -0.38128194212913513, 0.045169271528720856, 0.2431873232126236, -0.24224361777305603, 0.0310740...
however doing the where clause against the rank requires a second scan of the data, and keeps the entire data set in RAM. What is the fastest way to rank the remaining attribute rows, and return only the latest? * Autogrows on the database? Check for messages in the SQL error logs. * Page splits due to inserted record...
[ 0.24088118970394135, -0.019215980544686317, 0.14643758535385132, 0.24615156650543213, -0.07982776314020157, -0.28552767634391785, 0.40960097312927246, -0.3267326354980469, -0.25026199221611023, -0.6498411297798157, 0.049096643924713135, 0.6448376178741455, -0.1625828742980957, 0.0935875326...
duration, only capturing events with duration > 10 seconds, look for patterns in parameters, clients, time of day.
[ 0.18012145161628723, -0.5982296466827393, 0.1588255763053894, 0.49005943536758423, -0.10147060453891754, -0.22000005841255188, 0.2850209176540375, 0.07602289319038391, -0.4914306402206421, -0.47588786482810974, -0.17651209235191345, 0.2785806953907013, -0.14947864413261414, -0.189451649785...
Using the standard English letters and underscore only, how many characters can be used at a maximum without causing a potential collision in a hashtable/dictionary. So strings like: ``` blur Blur b Blur_The_Shades_Slightly_With_A_Tint_Of_Blue ``` ... There's no guarantee that you won't get a collision between sing...
[ 0.08713443577289581, -0.05603131279349327, 0.2656093239784241, 0.08588548004627228, -0.21398989856243134, -0.08472373336553574, 0.28632524609565735, 0.07288031280040741, -0.1438324749469757, -0.8551397919654846, -0.011029270477592945, 0.3408575654029846, -0.3348899483680725, -0.05687468871...
key using equality if they've got the same hash code. Any dictionary which relies on hash codes being unique is missing important information about hash codes, IMO :) (Unless it's operating under *very* specific conditions where it absolutely *knows* they'll be unique, i.e. it's using a [perfect hash function](http://...
[ -0.2272159457206726, 0.018305817618966103, 0.001218824414536357, 0.059862881898880005, 0.024966401979327202, -0.3561290502548218, 0.45085710287094116, -0.2842540144920349, -0.12523411214351654, -0.6085562109947205, -0.41999682784080505, 0.49585601687431335, -0.21972711384296417, 0.11475601...
I need to export data into an Access database. My code works, but it works with the assumption the client machine has the Microsoft.Jet.OLEDB.4.0 as a valid provider. I want to test to see if this is true or not, in code. My problem is that I don't have the location of an existing access database and I don't want to c...
[ 0.14295350015163422, 0.3756667673587799, 0.3327362537384033, 0.038496438413858414, 0.004008533898741007, -0.184308722615242, 0.16878075897693634, 0.2452806532382965, -0.12382840365171432, -0.7546442747116089, -0.05420776084065437, 0.6394277811050415, -0.3862519860267639, 0.3504328727722168...
The ways I can think of are: 1. Measure the time between actions. 2. Compare the posts' content (if they're too similar to each other) or, better yet, only the posted links. 3. Checking the distribution over a period of time the user is active (if the user is active, say posting once every hour, for a week, then eith...
[ 0.516274631023407, -0.14438217878341675, 0.5256494283676147, 0.4285675585269928, -0.3354983925819397, 0.040803488343954086, 0.21217302978038788, -0.010943773202598095, -0.6083676218986511, -0.5968878865242004, -0.07003365457057953, 0.2074720412492752, -0.06912601739168167, -0.1052388995885...
a post. 6. Not heuristic. Use some async JS for user login. (Just makes life a bit harder on the bot programmer). 7. (added by Alekc) Not heuristic. User-agent values. 8. And, How could I forget Google's approach (mentioned down by Will Hartung). Give users the ability to mark someone as Spam, enough Spam votes means t...
[ 0.4866301715373993, 0.10999928414821625, 0.45936042070388794, 0.32301586866378784, -0.33271339535713196, -0.18816664814949036, 0.5339238047599792, 0.03121998906135559, -0.1722995936870575, -0.5092224478721619, -0.015735726803541183, 0.23577600717544556, -0.4400363564491272, 0.0667012259364...
pretty much render 6 useless. From what I've seen with that type of software that's a pretty common approach. Validating on the useragent is pretty much useless too all of the blog spam I use to get was from bots appearing to be valid web browsers. I use to get a lot of blog spam. I would literally be deleting hundr...
[ 0.8319424986839294, 0.3005388379096985, 0.3110155165195465, 0.1521986573934555, -0.4678676724433899, -0.47648894786834717, 0.712927520275116, 0.6020799875259399, -0.24614517390727997, -0.5330286622047424, 0.17103265225887299, 0.4659091830253601, -0.20268093049526215, 0.3241742253303528, ...
url. After X number of posts have been analyzed in relation to the other posts in the thread then give them access to post urls. The users activity on the site, the post quality, and what ever other factors you deem necessary will be a reputation for that users IP. Then based the reputation of the IP and the other ...
[ 0.6226361989974976, -0.05519429221749306, 0.46029967069625854, 0.288823664188385, -0.35632821917533875, -0.19911259412765503, 0.051956262439489365, 0.39355623722076416, -0.29163897037506104, -0.6311923265457153, 0.14666789770126343, 0.25735196471214294, -0.0732927992939949, 0.4381780028343...
[>My previous thread<](https://stackoverflow.com/questions/734140/c-crash-when-loading-c-dll) I created this one,because I installed WinXP on VMBox and I cannot get it working again. This time I created an OnLoad Event on my form ``` if (LoadLibrary("blowfish.dll") == 0) { Misc.LogToFile(...
[ 0.17641858756542206, 0.15358957648277283, 0.49222612380981445, -0.38797545433044434, 0.06401972472667694, -0.28478118777275085, 0.30550533533096313, -0.012056844308972359, -0.24689514935016632, -0.6044104099273682, 0.1570778638124466, 0.6044615507125854, -0.5144197940826416, 0.411079138517...
older NET Framework(2.0) with dlls made on newest MS Visual studio(2008 SP1) so I took action and now the program properties it's set to work with NET 3.5 On the VMBox I have NET 2.0,but this is not the problem - the program itself runs fine.I also have C++ Redistributable(2005,2005 SP1 and 2008). What could be the p...
[ 0.3136798143386841, 0.1598643958568573, 0.46820399165153503, -0.021351950243115425, -0.26726147532463074, -0.5003026127815247, 0.44533050060272217, -0.48784974217414856, -0.31838473677635193, -0.6199384927749634, 0.027157431468367577, 0.8840112090110779, -0.39917072653770447, 0.05237713083...
a different set of dlls to be present on the target system. It obviously works on your development machine because all debug versions of the required libraries come with Visual Studio. This is how you would get the message belonging to an error code: ``` [DllImport("kernel32.dll")] private static extern int FormatM...
[ -0.07555373758077621, -0.39567041397094727, 0.5854558944702148, -0.08517809212207794, -0.028443144634366035, -0.1122707650065422, 0.19555872678756714, -0.3000533878803253, -0.11560171842575073, -0.8293366432189941, -0.41149967908859253, 0.7599449753761292, -0.5875123143196106, -0.029298514...
int dwFlags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; int retVal = FormatMessage(dwFlags, IntPtr.Zero, errorCode, 0, out lpMsgBuf, 0, IntPtr.Zero); if (0 == retVal) { return null; } return lpMsgBuf;...
[ -0.044519778341054916, -0.09604234993457794, 0.7588589787483215, -0.41629043221473694, 0.2306661158800125, 0.1946500986814499, 0.20622418820858002, -0.3098222315311432, -0.49533769488334656, -0.4503253996372223, -0.6122310757637024, 0.5461469292640686, -0.4375186264514923, 0.09960704296827...
I'm pretty new with *TeamCity* but have 2-3 years experience with *CC.NET*-t. I'm familiar with MSBuild but maybe *TeamCity* has other ways to build things. I see that *TeamCity* has a nice UI and great plug-in framework. But I have no idea how can I configure an installer package build. **My questions:** * I've che...
[ 0.6180609464645386, 0.06029742211103439, -0.2892892062664032, 0.4355762004852295, -0.49581968784332275, -0.3114895224571228, 0.18038317561149597, 0.02603888511657715, 0.08193156123161316, -1.1152583360671997, 0.1424655020236969, 0.5927670001983643, 0.008663462474942207, -0.3068012595176697...
choice just MSBuild? There are some [build runner plugins](http://www.jetbrains.net/confluence/display/TCD4/Build+Runner+Plugin) for TeamCity and you can roll your own but I believe the "TeamCity way" is to do that in your build script... since it's a build server right? And you might want to check out the [MSBuild Ex...
[ 0.31926557421684265, -0.40936407446861267, 0.14341136813163757, 0.19088564813137054, -0.15537305176258087, -0.24706429243087769, 0.12732818722724915, 0.05928075313568115, -0.06255871802568436, -0.9245521426200867, 0.13133573532104492, 0.7306257486343384, -0.10586632043123245, -0.3742867410...
I am looking for best, easiest way to do something like: ``` $var1="value"; bunch of code..... **print allVariablesAndTheirValuesCurrentlyDefined;** ``` Package variables? Lexical variables? Package variables can be looked up via the symbol table. Try [Devel::Symdump](http://search.cpan.org/perldoc?Devel::Symdump): ...
[ -0.06004893407225609, -0.026361076161265373, 0.6189122200012207, -0.21794147789478302, 0.15049223601818085, 0.1285448968410492, 0.8383744955062866, -0.2813120186328888, 0.10785603523254395, -0.7092890739440918, -0.4674026072025299, 0.48525330424308777, -0.4103619158267975, -0.1779557317495...
$hash_ref = peek_my(0); print Dumper($hash_ref); ```
[ -0.028230641037225723, 0.16361385583877563, 0.18768343329429626, -0.5789890289306641, 0.06002117320895195, 0.12395855039358139, 0.5290852785110474, 0.19714489579200745, -0.08683445304632187, -0.37230390310287476, -0.36055028438568115, 0.5524231791496277, -0.5377134084701538, 0.256551444530...
How can I add an image to some text via css? I've got this: ``` <span class="create">Create something</span> ``` and I want to add a 16x16 image to the left of that by using css. Is this possible or should i just manually add this image like so: ``` <span class="create"><img src="somewhere"/>Create something</span...
[ 0.22711172699928284, 0.17032209038734436, 0.4304235875606537, 0.0601736456155777, -0.06726914644241333, 0.16544422507286072, -0.13657903671264648, -0.16226458549499512, -0.34943336248397827, -0.8693050742149353, 0.0049672513268888, 0.3802943229675293, 0.03660641238093376, -0.24000343680381...
until you get your desired result. You can also play with the position of the background image (\*nod to Tom Wright) with "background-position" or doing a completely definition of "background" ([link to w3](http://www.w3schools.com/css/css_background.asp)).
[ 0.34779638051986694, -0.11551977694034576, 0.4621049463748932, 0.12312818318605423, 0.23640777170658112, -0.12787193059921265, 0.25404542684555054, -0.10217935591936111, -0.4717181622982025, -0.3129502236843109, -0.41614118218421936, 0.1469946801662445, -0.012634478509426117, -0.2144763171...
I'm working on a public site which will use DB backed user sessions keyed to a session ID. I'm trying to prevent session hijacking and tampering; the session data I return to the client has limited value in and of itself, but I'd like to prevent wholesale theft. I've worked out a little scheme here, but I'd like to get...
[ 0.6291210651397705, 0.24477751553058624, 0.42913034558296204, -0.25367259979248047, -0.3590839207172394, -0.14643128216266632, 0.5453770160675049, -0.10250627249479294, -0.04930591955780983, -0.46445295214653015, -0.2690381109714508, 0.6658940315246582, 0.05640989542007446, 0.2812622785568...
the session data is modified, the client is provided with a new hash value reflecting their session data. * If a request for comes in with an incorrect hash that does not match the database, the session is flagged as compromised. The request and all subsequent requests for the session result in a new session being crea...
[ 0.30680546164512634, 0.08309865742921829, 0.19184647500514984, 0.09563210606575012, 0.004049902316182852, -0.13029024004936218, 0.6387766599655151, 0.20977821946144104, -0.42027074098587036, -0.5411636233329773, -0.12740275263786316, 0.6837124228477478, -0.19353601336479187, 0.298943430185...
of ways this can be circumvented: * If the session key is stolen, the hash can be stolen too. As long as the legitimate client doesn't do anything, the hijacker can just take over, and maintain key/hash/data consistency. You won't see a thing until the legitimate client wakes up... if ever. * In any case, if your hash...
[ 0.27397146821022034, -0.07127448916435242, 0.10150250047445297, 0.18004269897937775, 0.04640357196331024, -0.5149152874946594, 0.4489617943763733, 0.0741414874792099, -0.4521216154098511, -0.47996774315834045, -0.08576741069555283, 0.32166147232055664, -0.12286166101694107, 0.3608841896057...
as can be.
[ 0.2491845190525055, -0.14542251825332642, 0.18710875511169434, -0.17925135791301727, 0.2358606904745102, -0.06453851610422134, 0.6046877503395081, 0.2229980230331421, -0.17188149690628052, -0.3890453577041626, -0.24885155260562897, 0.4306696653366089, 0.13314510881900787, 0.113557711243629...
I need to include an html page (table of contents) on a CD/DVD. I'd like the html page to open automatically when the user puts the CD/DVD in their machine. Is there a way to do this (the MSDN cds do this) either by purchasing software or otherwise? I used (the free version of) [AutoRunPro](http://www.longtion.com/auto...
[ 0.2884083092212677, 0.0983811616897583, 0.28880515694618225, -0.16748982667922974, 0.022171033546328545, -0.20762556791305542, 0.2043229043483734, -0.17435553669929504, -0.03447491303086281, -0.48384496569633484, 0.03587525337934494, 0.9938364624977112, -0.5327292084693909, -0.082594625651...
order until it doesnt find one. Run1=index.htm Run2=. ``` Moreover, you can open several programs, pages, ... with this method in one go. In either case : test your method beforehand, you don't actually have to burn a CD/DVD in order to do that : [look here](http://www.cryer.co.uk/brian/windows/howtotcdaurwobacd.ht...
[ 0.29331013560295105, 0.009936224669218063, 0.34674060344696045, -0.09992925077676773, 0.16796351969242096, -0.35256069898605347, 0.38288843631744385, -0.3962699770927429, -0.34225231409072876, -0.3617348372936249, -0.6241750717163086, 0.5950413346290588, -0.21633712947368622, 0.23574480414...
I have a query roughly like this: ``` select * from A_TABLE where A_COLUMN = '&aVariable' union select * from A_TABLE where B_COLUMN = '&aVariable'; ``` But when I run it, SQL Developer prompts me for the variable twice, even though it's the same variable. If there's a way to make it prompt only o...
[ 0.2196500152349472, 0.1629181206226349, 0.15812912583351135, -0.23143845796585083, -0.2879028022289276, -0.06523354351520538, 0.0909663662314415, -0.10878799855709076, -0.0831870436668396, -0.7331613898277283, 0.213861346244812, 0.39873331785202026, -0.5482914447784424, 0.11994023621082306...
:a_var select * from A_TABLE where A_COLUMN = :a_var union select * from A_TABLE where B_COLUMN = :a_var; ``` SQL Developer will then prompt for a bind variable, you can enter it and hit apply.
[ 0.18380147218704224, 0.0701642856001854, 0.3958936631679535, -0.3592078387737274, -0.12159312516450882, -0.22802546620368958, 0.24777530133724213, -0.4655226171016693, 0.039724480360746384, -0.4248926341533661, -0.19526028633117676, 0.4743548035621643, -0.5740295648574829, 0.24816811084747...
How can I properly access the web browser control from within myFunct()? Main.myWebBrowserControl & Main::myWebBrowserControl don't work. ``` namespace foo{ public partial class Main : Form{ public Main(){ InitializeComponent(); // Do some things... MyFunct(); }...
[ 0.0068463427014648914, -0.015933644026517868, 0.4971280097961426, -0.0825086161494255, 0.31719422340393066, -0.048982251435518265, 0.5323089957237244, -0.12309582531452179, 0.20190727710723877, -0.6401129364967346, -0.37806031107902527, 0.4228520393371582, -0.35277432203292847, 0.192744612...
myWebBrowserControl.Navigate("http://www.google.com"); // causing an error. } } } ``` You can't access instance members from static functions, change you function declaration to ``` public void MyFunct(){ myWebBrowserControl.Navigate("http://www.google.com"); } ```
[ -0.3668460547924042, 0.16166281700134277, 0.5111695528030396, -0.11097647249698639, 0.08914174884557724, -0.03280380740761757, 0.32433363795280457, 0.2134094089269638, 0.025193097069859505, -0.8371042013168335, -0.1969078928232193, 0.34038400650024414, -0.5894149541854858, 0.37752193212509...
Does anyone have an extension method to quickly convert the types in a `LinkedList<T>` using a `Converter<TInput, TOutput>`? I'm a bit surprised, where is the `ConvertAll<TOutput>(delegate)`? The `ConvertAll` equivalent in extension methods for Linq is called `Select`! ``` var result = myLinkedList.Select(x => FancyC...
[ 0.3044756352901459, -0.2031000554561615, 0.35582301020622253, 0.1366003304719925, -0.08184651285409927, -0.16100142896175385, -0.03905155509710312, -0.03567976877093315, -0.3778490722179413, -0.49287381768226624, 0.05824790522456169, 0.3137553930282593, -0.11903723329305649, 0.091492190957...
I have an element that can have an arbitrary background colour (set via a CMS). I want to highlight it by brightening it on mouse over and darkening it on mouse out. I tried using .css('background-color') to get and set the value but it seemed to be a lot more fiddly than I expected. What's the non-dumb way to do th...
[ 0.24653282761573792, -0.10736685991287231, 0.29836705327033997, -0.153595969080925, 0.018741875886917114, 0.0702199935913086, 0.10617930442094803, 0.20941145718097687, -0.1424770951271057, -0.38660547137260437, 0.016706278547644615, 0.29890403151512146, -0.4150567352771759, -0.117243468761...
had to do some donkey work. In the end I went with a fast 'fadeTo' but need to confirm that opacity animation works properly in IE6. Have you checked out the [jQuery Color plugin](http://plugins.jquery.com/files/jquery.color.js.txt)? I think color operations do not exists in the core jQuery code but maybe recent vers...
[ 0.10791777819395065, -0.16522537171840668, 0.1591597944498062, 0.022129887714982033, -0.15793001651763916, 0.22842437028884888, -0.06383539736270905, 0.04749945178627968, -0.1933426409959793, -0.45955491065979004, -0.01151919737458229, 0.7407834529876709, -0.19712552428245544, -0.134513005...
I'm wondering if it's possible to have something similar to ActionScript 3's `Dictionary` object with weak keys in Objective-C. I want to be able to 'attach' an instance of a class to other arbitrary instances. Example; ``` MetaData *meta = [MetaData metaDataForObject:someObject]; meta.whatever = foo; ``` And later...
[ 0.12314633280038834, 0.0741138681769371, 0.4243103861808777, -0.27660784125328064, -0.09741710871458054, -0.2515830993652344, 0.07366227358579636, -0.23471491038799286, -0.30027514696121216, -0.34419122338294983, -0.12063728272914886, 0.7239233255386353, -0.38996607065200806, 0.23455426096...
query `-[NSValue nonretainedObjectValue]` it seems like I would get a pointer to garbage (how could NSValue zero the pointer when the object was dealloc'd?). Thanks, benjamin **Update 23 September 2011:** I believe the way to do this is with `objc_setAssociatedObject` and related functions. See the [Objective-C Runt...
[ -0.3872509002685547, -0.07717199623584747, 0.3999423086643219, -0.04436803609132767, -0.4386206865310669, -0.39887964725494385, 0.3260239064693451, -0.2967299520969391, -0.27435919642448425, -0.382551908493042, -0.18960341811180115, 0.544352114200592, -0.42260152101516724, 0.05237126722931...
your best bet is to use the same mechanism Apple's Key-Value Observing uses: method swizzling. Maintain a global table (such as a `NSHashMap` or `NSMapTable`) mapping objects to their corresponding metadata objects, then replace the `dealloc`/`finalize` methods in the class of the object you're attaching to with versio...
[ 0.1330680549144745, -0.207620307803154, 0.33073514699935913, -0.007514534052461386, 0.1724705696105957, -0.5612318515777588, -0.2522701919078827, -0.18725764751434326, -0.42777347564697266, -0.6676831841468811, -0.2074335217475891, 0.4287300109863281, -0.20427662134170532, 0.00971677526831...
for all objects of the target class, you can create a proxy class and reassign the `isa` pointer for just that class, such that there's no performance hit on deallocation for the objects you're not watching. (KVO does this, too.)
[ 0.14184202253818512, -0.44087162613868713, 0.14732913672924042, 0.016477204859256744, 0.0050100828520953655, -0.17022275924682617, 0.10690852254629135, -0.026480792090296745, -0.16153396666049957, -0.3944322168827057, -0.10108767449855804, 0.5976163148880005, -0.26428845524787903, -0.15032...
Is there extra overhead in using the `object.ReferenceEquals` method verses using `((object)obj1 == (object)obj2)`? In the first case, there would be a static method call involved, and in both cases some form of casting to an object would be involved. Even if the compiler balances out those methods, what about inequa...
[ -0.1032201275229454, 0.1862931102514267, 0.06357363611459732, 0.09531403332948685, -0.32711154222488403, 0.1796562820672989, 0.29309916496276855, -0.25286513566970825, -0.03251097351312637, -0.3945053517818451, -0.13695120811462402, 0.47427013516426086, -0.4239969849586487, 0.0307971499860...
one might miss the **`!`** preceding `object.ReferenceEquals`, whereas the **`!=`** in the first variation is hard to overlook. > Is there extra overhead in using the object.ReferenceEquals method No. The method directly contains the minimal IL description to perform the reference equality check (for the record: it's ...
[ 0.20976249873638153, 0.12031711637973785, 0.1609855592250824, 0.07673805207014084, -0.3705797791481018, -0.12585097551345825, 0.18720462918281555, -0.2631947100162506, -0.04124608263373375, -0.5988422632217407, -0.03882896527647972, 0.6569819450378418, -0.2872124910354614, 0.01910781115293...
discussing this. It prefers `(object)x == y` because the IL footprint is smaller. It argues that this might facilitate inlining of method `X` using this comparison. However (without any detailed knowledge of the JIT but logically and intuitively) I believe this is wrong: if the JIT behaves anything like an optimizing C...
[ 0.2548971176147461, 0.18667343258857727, -0.10840819031000137, 0.055313386023044586, -0.275953084230423, -0.012834141962230206, 0.0042771040461957455, -0.20414288341999054, 0.05255967751145363, -0.5501288175582886, 0.10047346353530884, 0.5592421889305115, -0.27019399404525757, 0.1568975001...
consequently on performance.
[ 0.12971146404743195, 0.1690465807914734, 0.2926856577396393, 0.29887446761131287, -0.05504699423909187, 0.08748507499694824, 0.2504259943962097, -0.10919973254203796, 0.06514366716146469, -0.5063406229019165, -0.21253235638141632, 0.9516131281852722, 0.28576037287712097, -0.245907932519912...
I [currently have another question](https://stackoverflow.com/questions/735523/pathfinding-2d-java-game) to do with path finding in Java. However I feel this is a separate question. I'm making a game. The path-finding will need to be able to deal with multiple possible end points. All the path finding algorithms and t...
[ 0.3065023720264435, 0.06149160861968994, 0.15938638150691986, 0.1501426249742508, -0.0920104905962944, -0.12356896698474884, 0.1731383502483368, -0.3221087157726288, -0.45632535219192505, -0.7218427062034607, 0.3632497787475586, 0.3182038366794586, -0.2065284252166748, 0.13606612384319305,...
goal, and use the minimum. `A*` will work as long as you don't over-estimate the true distance to the goal. This special behavior might lead you to write your own `A*` implementation, however. It isn't a lot of code; maybe a day or two of homework for a college student, IIRC.
[ 0.2605760395526886, -0.0457896925508976, 0.011219398118555546, 0.13626734912395477, -0.0953916385769844, -0.22985491156578064, 0.5822350382804871, -0.06371995061635971, -0.06942342966794968, -0.5817832350730896, 0.35657939314842224, 0.5421203374862671, 0.20440246164798737, -0.5466014146804...
I want to create transition animation within a UIView (not from one UIView to another). I have one UIView that has two UITextView fields with some text in them that comes from a database record. There are next/back buttons on the screen also. When the user pressed the next button, the next record contents are shows. ...
[ 0.4043886661529541, -0.2752400040626526, 0.5269342064857483, 0.06998346000909805, -0.18442364037036896, 0.36045631766319275, -0.14045749604701996, -0.023375580087304115, -0.11443745344877243, -1.0798529386520386, 0.1886189728975296, 0.21084818243980408, -0.3406490981578827, 0.2947575747966...
subview) just by changing supported properties within a UIView beginAnimations/commitAnimations block. That said I don't know whether a text is a supported property. Instead you may have to "fake" the text change by having overlaid UITextView's with one fading out and the next fading in. So yes, you can definitely do...
[ 0.42736655473709106, -0.3055620491504669, 0.5491461157798767, 0.24459761381149292, 0.07797233015298843, -0.0020724358037114143, 0.6315596699714661, 0.03887176513671875, -0.07496459037065506, -0.864132821559906, -0.1478133499622345, 0.2718842327594757, -0.16759321093559265, 0.43284174799919...
I have a web application (.NET, if it matters) where when one of the pages is loaded, a file on the users local machine needs to be copied (uploaded) to the webserver. This upload needs to be without user intervention. This web application will be running on a kiosk where I would be setting up the original permissions ...
[ 0.6737497448921204, 0.3866675794124603, 0.39068183302879333, 0.23898813128471375, 0.14700967073440552, -0.3182891011238098, 0.10871381312608719, 0.12250262498855591, -0.28959691524505615, -0.7763436436653137, -0.04683958366513252, 0.3081807792186737, 0.015237098559737206, 0.256345123052597...
advance. Update: Yeah, I know this could be used maliciously. I was hoping there was a way of doing this, but really, it shouldn't be allowed. Bah, thanks for confirming my suspicions. Update 2: See comment to Guy Starbuck. This is not a good idea, there must be a better design for your requirements. In any case, if...
[ 0.3512718975543976, -0.027938999235630035, 0.19541792571544647, 0.4682791531085968, 0.1389644294977188, -0.04568145051598549, -0.4182818830013275, 0.13006170094013214, -0.37518003582954407, -0.49987009167671204, -0.47636163234710693, 0.6077671647071838, -0.13302645087242126, 0.007216219790...
I have an array with some info. For example: > (writer) & or > with (additional dialogue) I want to clean this so I only get the text between the parenthesis () and clear everything else result: > writer or > additional dialogue ``` $string = "this (is (a) test) with (two parenthesis) duh"; ``` For a string l...
[ 0.08181416243314743, 0.12232956290245056, 0.4289950728416443, -0.11452428996562958, -0.17192578315734863, 0.22602887451648712, 0.4348543882369995, -0.33133822679519653, 0.10749691724777222, -0.4621725380420685, -0.11737874895334244, 0.623153030872345, -0.3702279031276703, 0.012158071622252...
whitespace between them. ``` $regex = '#[^()]*\((([^()]+|(?R))*)\)[^()]*#'; $replacement = '\1'; echo preg_replace($regex, $replacement, $string); ``` I got a lot of help from this page, [Finer points of PHP regular expressions](http://www.skdevelopment.com/php-regular-expressions.php).
[ -0.18018579483032227, -0.0033523994497954845, 0.012299605645239353, 0.12491822242736816, -0.020982371643185616, 0.15928030014038086, 0.26777383685112, -0.19634124636650085, -0.2986873984336853, -0.4125646650791168, 0.045354537665843964, 0.32900887727737427, -0.3576173186302185, 0.018894316...
I have a Master Page in the root of my project. I have Content Pages throughout my project and in subfolders referencing this Master Page. What is the correct way to reference my .CSS and .JS files if I always want them to be relative to the root? Here is how I'm doing it now: ``` link href="/common/css/global.css"...
[ 0.08627267926931381, 0.2359287291765213, 0.49961766600608826, -0.06668603420257568, -0.27869558334350586, -0.22375014424324036, 0.23400583863258362, 0.05259699746966362, -0.40740203857421875, -0.7958676218986511, -0.008640690706670284, 0.32957303524017334, -0.04200548678636551, 0.295422315...
href='<%= Server.ResolveClientUrl("~/common/css/global.css") %>' /> ``` According to comments, other validated usage, no "error CS1061: 'System.Web.HttpServerUtility' does not contain a definition" error: ``` <script type="text/javascript" src="<%= Page.ResolveUrl("~/Scripts/YourScript.js") %>" ></script> ``` ...
[ -0.470944344997406, 0.24016626179218292, 0.809192419052124, -0.2856281101703644, -0.013959737494587898, -0.11616889387369156, 0.3842252492904663, -0.2526077926158905, -0.019542695954442024, -0.5604627132415771, -0.49971747398376465, 0.452728271484375, -0.11195948719978333, 0.00888988934457...
Is there a reliable way of preventing my actionscript code (as2 or as3) from being copied (e.g. if there's some IP in it)? I know there are tools that can decompile flash code so it's easily reverse-engineered and I've also seen a few tools that claim to be able to obfuscate actionscript code in such a way that it's n...
[ 0.014744618907570839, 0.1271728128194809, 0.3844747245311737, 0.22217372059822083, 0.05817493051290512, -0.38417086005210876, 0.2544022500514984, 0.14080527424812317, -0.21571512520313263, -0.46272486448287964, -0.03706100583076477, 0.5219659805297852, -0.18676698207855225, -0.110805645585...
%>' /> ``` According to comments, other validated usage, no "error CS1061: 'System.Web.HttpServerUtility' does not contain a definition" error: ``` <script type="text/javascript" src="<%= Page.ResolveUrl("~/Scripts/YourScript.js") %>" ></script> ``` Also is important to always put the closing tag .
[ -0.19796711206436157, 0.17992258071899414, 0.5637583136558533, -0.36420002579689026, 0.11079278588294983, -0.2863594591617584, 0.5470579862594604, -0.12482690811157227, 0.21211284399032593, -0.5385743379592896, -0.4315906763076782, 0.4109467566013336, -0.1627686470746994, -0.03040075674653...
How do you store third party libraries that you use in your project in your source control? When would you store binaries in your source control? When would you store the code in your source control? Would you ever store both? In what situations would you do this? (Btw, I'm using .NET but it doesn't really matter f...
[ 0.25043565034866333, -0.21305134892463684, -0.14204838871955872, 0.08366133272647858, -0.09829109907150269, -0.1351233273744583, 0.19652003049850464, -0.18443462252616882, -0.22864194214344025, -0.6259779334068298, -0.16187158226966858, 0.4607095718383789, -0.18551497161388397, -0.24584095...
environment (development - integration - homologation - preproduction - production) * **When (code)**: for managing the complexity of the changes, when you know updates and fixes for current versions running into production will be needed *while* new development are in progress. * **Why (store both)**: for **[deploymen...
[ 0.36660632491111755, 0.13194987177848816, 0.020680483430624008, 0.06174974888563156, 0.22729694843292236, -0.2508668005466461, 0.04325566813349724, -0.452230840921402, -0.28523385524749756, -0.8115516901016235, -0.10556137561798096, 0.5761069059371948, -0.4912770688533783, -0.2607499659061...
workspace with + production: you identify exactly what goes into production from one source: your SCM. For test and production environments, that also mean your own product (the *packaged* result of what you are building) should also go into your SCM (only the official releases, not the intermediate ones used interna...
[ 0.7491734027862549, -0.07483743131160736, 0.18053384125232697, 0.07638465613126755, 0.025041421875357628, 0.08572350442409515, -0.011005515232682228, -0.12534411251544952, -0.2756034731864929, -0.6969504356384277, -0.34922829270362854, 0.16902567446231842, -0.18673619627952576, 0.069398462...
not your "source code re-compiled". Hence the importance to make all your test with the target final form of your product, clearly stored and tagged in your SCM. --- [Martin Lazar](https://stackoverflow.com/users/82569/martin-lazar) raises a legitimate point in [his answer](https://stackoverflow.com/questions/735699/...
[ 0.6541908979415894, 0.17086845636367798, 0.0550406388938427, 0.3992043435573578, 0.4278946816921234, -0.38467055559158325, -0.04927239567041397, -0.3460444509983063, -0.08308114856481552, -0.1726544052362442, -0.3738260269165039, 0.5285331010818481, -0.41780611872673035, 0.2214427292346954...
SCM to propose S"C"M feature (as in [Source *Configuration* Management](http://en.wikipedia.org/wiki/Configuration_management)). That SCM (Configuration) not only stores any kind of "set of files", but also their *relationships* (aka *dependencies*) between those sets, in order for you to query one set of file, and ...
[ 0.2091003805398941, -0.20175041258335114, 0.47078078985214233, 0.05250518023967743, 0.4960024058818817, -0.07876766473054886, -0.19398021697998047, -0.25583988428115845, -0.5968594551086426, -0.5259719491004944, -0.5090579986572266, 0.1151168942451477, -0.10957059264183044, 0.2667075693607...
I am not using a tab bar or any other control -- I want to basically change the current view to a different view controller dynamically (i.e. via code). I'm not using Interface Builder at all... For example, let's say we create three view controllers: (this may not be the best example, but I'm trying to make it simpl...
[ -0.0768352597951889, -0.2344435751438141, 0.9752804040908813, 0.06655240058898926, -0.061992403119802475, -0.08760328590869904, 0.0002785550896078348, 0.10413240641355515, -0.4161796569824219, -0.8427276015281677, -0.03933082893490791, 0.6093428730964661, -0.29130545258522034, 0.3261111974...
you need to use xxx interface element for this example". I need to be able to randomly change views based on programatic control within the view of the application I'm working on) I'm been surfing through Google and StackOverflow for the past week, and gone through my three O'Reilly Cocoa books (plus three iPhone deve...
[ 0.30488866567611694, 0.27199915051460266, 0.34555959701538086, 0.15079841017723083, 0.2175418585538864, -0.1495661437511444, 0.20056948065757751, -0.20141823589801788, -0.5915750861167908, -0.565291702747345, -0.25655096769332886, 0.5532217621803284, -0.6209183931350708, -0.035135339945554...
Dickison) Brilliant -- that worked! ``` - (void)applicationDidFinishLaunching:(UIApplication *)application { [window addSubview:viewController.view]; [window makeKeyAndVisible]; // create the second view, remove the first, and then display the second viewCiao = [[ViewCiao alloc] init]; [vie...
[ 0.02594824694097042, -0.1914931684732437, 0.710118293762207, 0.12161140143871307, 0.3555797040462494, -0.09069613367319107, 0.31435951590538025, -0.3374880850315094, -0.32177969813346863, -0.5473657250404358, -0.14880713820457458, 0.5193108320236206, -0.2186533659696579, -0.018526909872889...
[currentView.view removeFromSuperview]; [window addSubview:goodbye.view]; currentView = goodbye; } ... etc. @end ``` You may need to resize the view before adding it to the window, and call `viewWillDisappear:`, `viewDidDisappear:`, `viewWillAppear:` and `viewDidAppear:` on currentView and the new view contro...
[ -0.1649283766746521, -0.2001885175704956, 1.0574737787246704, -0.29885193705558777, 0.004634034354239702, 0.12850283086299896, 0.24466685950756073, 0.0814739465713501, -0.150796577334404, -0.5189530253410339, -0.5245774984359741, 0.6152017712593079, -0.10953402519226074, 0.5782724618911743...
I'm having difficulty figuring out how to have StructureMap cache a non-default instance. I can cache the default instance with code like this ``` ForRequestedType<ISession>() .CacheBy(InstanceScope.HttpContext) .TheDefault.Is.ConstructedBy(() => ObjectFactory.GetInstance<ISessionFactory>().Ope...
[ -0.22639060020446777, 0.20241162180900574, 0.45609748363494873, -0.18001584708690643, 0.26286059617996216, -0.19979892671108246, 0.5761314630508423, -0.16516375541687012, -0.14848779141902924, -0.9725694060325623, -0.009313302114605904, 0.4323914051055908, -0.3220168948173523, 0.5899145007...
default, which I don't want. Add a separate line with: ``` ForRequestedType<User>().CacheBy(... InstanceOf<User>().Is.ConstructedBy(... ``` You can't currently configured caching for specific instances. The same happens if you had an IUser, and you wanted different caching for User than for another class, say PerReq...
[ -0.25929421186447144, -0.10303433239459991, 0.305693656206131, -0.0033820406533777714, 0.028516095131635666, 0.056883662939071655, 0.24477547407150269, -0.03763917088508606, -0.08584979921579361, -0.6777982711791992, 0.0025292441714555025, 0.502566933631897, -0.4599616527557373, 0.22499012...
from session, if it isn't gets a new one saving it in the session.
[ 0.4132097363471985, -0.21060466766357422, 0.20572516322135925, 0.052251704037189484, -0.13944563269615173, -0.08755991607904434, 0.04642035812139511, -0.3105735182762146, -0.15172825753688812, -0.48321008682250977, 0.02220514975488186, 0.5462218523025513, 0.278109610080719, 0.0838992595672...
I have a table DEAL and a table DEAL\_TYPE. I would like to map this code: ``` public class Deal { DealType type; } public enum DealType { BASE("Base"), EXTRA("Extra"); } ``` The problem is that the data already exist in the database. And I'm having a hard time mapping the classes to the database. The databa...
[ 0.1706523448228836, 0.13306981325149536, 0.2922791838645935, -0.2797883450984955, -0.06022491678595543, -0.11443887650966644, -0.44475775957107544, -0.66661536693573, -0.3214087188243866, -0.7971661686897278, 0.017597217112779617, 0.4360954761505127, -0.3395269215106964, 0.0517129078507423...
} ``` I know I could use a simple @OneToMany relationship from deal to deal type, but I would prefer to use an enum. Is this possible? I almost got it working by using a EnumType.ORDINAL type. But unfortunately, my IDs in my deal type table are not sequential, and do not start at 1. Any suggestions? Hibernate is ki...
[ 0.37399592995643616, 0.08323604613542557, 0.22521623969078064, -0.29700616002082825, -0.08389171212911606, -0.11245032399892807, -0.04345913603901863, 0.016166048124432564, -0.14392155408859253, -0.7211294174194336, -0.01964154653251171, 0.47547879815101624, -0.3231489360332489, 0.19303888...
app: <http://www.hibernate.org/265.html> They even include instructions on how to use it. This is the pattern I use whenever I end up with the need to persist enums.
[ 0.4928877055644989, 0.3196409344673157, 0.4834989905357361, -0.07002588361501694, -0.20865438878536224, -0.1820700764656067, 0.5780446529388428, -0.2699280381202698, -0.18702179193496704, -0.5452739000320435, -0.10215285420417786, 0.33451005816459656, -0.21245461702346802, -0.4393361210823...
I'm trying to unit test a class with 2 constructors. Each constructor has multiple parameters that set public properties. My question is, should I have only 2 unit tests with multiple asserts to check that each property was set OR a test for each parameter for each constructor? ``` Public Person(string name, string ph...
[ 0.018637169152498245, 0.04205135628581047, -0.2750350534915924, 0.06878376752138138, -0.14102089405059814, 0.19733236730098724, 0.33595290780067444, -0.30089518427848816, 0.10789349675178528, -0.5575519800186157, -0.16356609761714935, 0.6415634155273438, -0.08511403948068619, 0.27091562747...
1 test per constructor, with multiple asserts on each, to ensure that all members are properly set.
[ 0.29635417461395264, 0.2739163935184479, -0.2144322395324707, 0.5348981618881226, -0.20255541801452637, 0.12659206986427307, 0.4957025647163391, -0.8713706731796265, 0.2828793525695801, -0.2749539911746979, -0.27804869413375854, 0.40651756525039673, 0.09918942302465439, -0.1601876914501190...
Is there any way to generate words based on characters and checking if a domain exists with this word (ping)? What I want to do is to generate words based on some characters, example "abcdefgh", and then ping generatedword.com to check if it exists. You don't want to use the ping command, but you can use Python's [`so...
[ 0.3209967017173767, 0.36352598667144775, 0.27069830894470215, -0.13267506659030914, -0.0038205310702323914, 0.05392913147807121, 0.2470107525587082, -0.19471381604671478, -0.052749939262866974, -0.6611451506614685, 0.12307790666818619, 0.5633824467658997, -0.4145370423793793, 0.17261748015...
'yahoo.com', 'google.com', 'nosuchagency.gov'] filter(is_valid_host, hosts) ``` This is going to take tons of time and maybe make your ISP mad at you. You're better off either: 1. Using a lower-level DNS interface such as [dnspython](http://www.dnspython.org/), or 2. Finding a direct interface to domain registrars, ...
[ 0.3534441292285919, -0.028521820902824402, 0.1843082308769226, 0.09429489076137543, -0.23382975161075592, -0.5030916929244995, 0.40047410130500793, 0.06394848227500916, -0.33365997672080994, -0.5389741659164429, -0.2093387246131897, 0.3799580931663513, -0.4066605269908905, 0.06799375265836...
In MSVC 2008, I have the following code: ``` class Foo { // Be a little smarter about deriving the vertex type, to save the user some typing. template<typename Vertex> inline void drawVertices( Elements vCount, RenPrim primitiveType, PixMaterial *mtl, Vertex const *vertices) { this->drawVertices(vCount,...
[ -0.2682644724845886, 0.17370276153087616, 0.8295190930366516, -0.42571577429771423, -0.27325496077537537, 0.1562192440032959, 0.2849837839603424, -0.3775388300418854, 0.1454778015613556, -0.6762564182281494, 0.26964330673217773, 0.5948538780212402, -0.2733491361141205, 0.06434706598520279,...
RenVbufVertexComponentsPc }; float x; float y; float z; GraVideoRgba8 c; // Video format, not external! }; PixMaterial *material; struct Pc : RenFlexibleVertexPc { void set(Triple t, uint cl) { x = (float)t.x_; y = (float)t.y_; z = (float)t.z_; c = cl; } } vpc[4]; ... Fo...
[ 0.20916126668453217, -0.08006598055362701, 1.0013458728790283, -0.34411394596099854, -0.009489268064498901, 0.17372015118598938, 0.13128995895385742, -0.3456779420375824, -0.1683698296546936, -0.1356847733259201, -0.28175270557403564, 0.9506770968437195, -0.1588028222322464, 0.232188284397...
a "no matching function for call to function" error, apparently not seeing the template when there is a non-template function with more arguments. Is GCC broken, or is my code broken, and if so, why? There is no problem with overloading or inheritance: ``` #include <iostream> #include <memory> namespace { struct...
[ -0.03989139199256897, 0.09517022967338562, 0.37213197350502014, -0.36237311363220215, 0.1547425091266632, 0.12684370577335358, 0.4163217842578888, -0.2816412150859833, 0.06150220334529877, -0.48754894733428955, -0.1801610141992569, 0.6931363344192505, -0.6715443730354309, -0.06507443636655...
void f(T t) { std::cout<<T::i<<'\t'; this->f(); } }; struct B : A { void f() { std::cout<<"hello\t"; A::f();
[ -0.1499459147453308, -0.2801685929298401, 0.14312011003494263, -0.6749380826950073, 0.08840438723564148, 0.3092523515224457, 0.27219051122665405, 0.16628596186637878, 0.155423104763031, -0.49249473214149475, -0.7868689298629761, 0.5362098217010498, -0.7197561264038086, -0.10234888643026352...
} }; struct C { static const unsigned int i = 5; }; struct D { enum { i = 6 }; }; } int main() { std::auto_ptr<A> b(new B()); b->f(C()); b->f(D()); } ``` Works correctly. On the other hand, the smallest example I can find that exhibits your problem does not have inhe...
[ -0.14554385840892792, 0.13893266022205353, 0.46606478095054626, -0.44682344794273376, 0.4514676034450531, 0.20803886651992798, 0.5226156115531921, -0.22600781917572021, -0.19800671935081482, -0.49931949377059937, -0.370799720287323, 0.6805931925773621, -0.6171504855155945, -0.0192774906754...
template<class C> void print(C c) { c.print(); } }; } int main() { struct B { void print() { std::cout << "whee!\n"; } }; A a;
[ 0.5135625600814819, -0.16107989847660065, 0.1223999634385109, -0.37896308302879333, 0.13215401768684387, 0.030189502984285355, 0.3708833158016205, -0.3945058584213257, 0.017487667500972748, -0.43628087639808655, -0.4954649806022644, 0.5146659016609192, -0.8527239561080933, 0.25549918413162...
B b; a.print(b); } ``` Note that if `struct B` is defined in a namespace (whether it's an unnamed namespace, or a completely different namespace, or the global namespace) instead of inside `main()` that this compiles without error. I don't know enough of the standard to say if this is a bug, but it appears to be...
[ 0.11901203542947769, 0.3479314148426056, -0.004356893710792065, -0.31591784954071045, -0.09184940159320831, -0.2791886627674103, 0.37570756673812866, -0.018690822646021843, -0.208846777677536, -0.3502444326877594, -0.4090794324874878, 0.5081321597099304, -0.7736289501190186, 0.334355711936...
this restriction. I noticed the line > Note that the code works in GCC if I explicitly cast vpc to (RenFlexibleVertexPc \*) And since `RenFlexibleVertexPc` is not a local class this makes sense. However `Pc` is a local class/struct, so it is not allowed.
[ -0.05344795063138008, 0.0004668642650358379, 0.43558984994888306, -0.12057680636644363, 0.023448145017027855, -0.3744911253452301, 0.061545975506305695, 0.15836359560489655, -0.07209417968988419, -0.1621914505958557, -0.2386368364095688, 0.5538083910942078, -0.40917620062828064, 0.50734585...
I have two radio buttons like so ``` <input type="radio" name="rush" value="yes" /> <input type="radio" name="rush" value="no" checked="checked" /> ``` What I want to do is when the form submit button is clicked, check if 'yes' is selected. If it is, show a javascript confirm dialog I've gotten this far, but am st...
[ 0.308263897895813, 0.2726409435272217, 0.4650172293186188, -0.012197047472000122, 0.15701331198215485, -0.38120409846305847, 0.2551136910915375, -0.5627515912055969, 0.15661676228046417, -0.5375361442565918, 0.24752843379974365, 0.872285008430481, -0.3994421660900116, -0.2620779871940613, ...
return true; } else { return false; } } }); ``` You are binding something to the `click` event of a button. You probably want to bind it to the `submit` event of the form. Besides that, you misspelled `input.sumbit-button` in your selector. **EDIT**: [Here](http://jsbi...
[ 0.04044121503829956, -0.08477089554071426, 0.1272224485874176, -0.1335642784833908, 0.009784305468201637, -0.22046220302581787, 0.2659817934036255, -0.28757232427597046, -0.1521746814250946, -0.6233423352241516, -0.011743898503482342, 0.32903268933296204, -0.49164533615112305, 0.1948488503...
errors were: * You were probably not wrapping your code around `document.ready`. This is important if your script is included at the top of the page, as anything you write that is not wrapped in this event will execute before the DOM elements are created. So you would be binding events to nothing. The `document.ready`...
[ 0.3051099181175232, 0.10285628587007523, 0.16366834938526154, -0.1112055853009224, 0.0833611935377121, -0.2925246059894562, 0.6855977773666382, -0.25620391964912415, -0.45193424820899963, -0.3737289309501648, -0.13751064240932465, 0.5965262055397034, -0.2384408414363861, 0.0798178464174270...