text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
any resources out there that could possibly help with this kind of decision making? Bare in mind that I haven't even started a CS or software engineering course, and that a teaching resource is fairly limited in real-life. A real eye-opener to me was [Refactoring: Improving the Design of Existing Code](https://rads.s...
[ 0.1275830864906311, 0.4173908829689026, -0.38202884793281555, 0.03537226840853691, -0.17276570200920105, 0.1008910983800888, 0.3479141294956207, -0.3371419310569763, -0.15224148333072662, -0.6399409174919128, 0.22615762054920197, 0.6702700257301331, -0.059076353907585144, -0.21398036181926...
into a good one. [Refactoring http://ecx.images-amazon.com/images/I/519XT0DER6L.\_SL160\_PIlitb-dp-arrow,TopRight,21,-23\_SH30\_OU01\_AA115\_.jpg](http://ecx.images-amazon.com/images/I/519XT0DER6L._SL160_PIlitb-dp-arrow,TopRight,21,-23_SH30_OU01_AA115_.jpg) It helped me to efficiently and systematically refactor code...
[ -0.14248895645141602, -0.05334784463047981, 0.05461977422237396, -0.008350959047675133, 0.16898773610591888, -0.1534799039363861, 0.6738451719284058, -0.210018590092659, 0.15555736422538757, -0.539214551448822, 0.0008014634950086474, 0.6548064351081848, 0.0021311305463314056, -0.1345240771...
Assuming I have an open source web server or proxy I can enhance, let's say apache or squid. Is there a way to determine the time each client spends on a web page? HTTP is of course stateless, so it's not trivial, but maybe someone has an idea on how to approach this problem? Not without having some javascript const...
[ 0.5305149555206299, 0.2558833062648773, 0.3195881247520447, 0.07859288156032562, -0.2270730882883072, -0.3334597051143646, 0.5227465033531189, 0.09467433393001556, -0.2913116216659546, -0.7435774207115173, 0.04314250871539116, 0.4796193540096283, -0.07276467978954315, 0.060527823865413666,...
trigger. eg. browser crash. I sort of wonder why you want this anyway. What if a person looks at the web page for 3 seconds, gets distracted by another tab/window but leaves your page open for 2 hours? The answer you get is 2 hours, the answer you (probably) want is 3 seconds.
[ 0.5579357743263245, -0.23235154151916504, 0.4994460642337799, 0.2006387859582901, -0.1162094697356224, -0.2909276783466339, 0.5619456171989441, -0.27362486720085144, -0.3884247839450836, -0.5377753973007202, 0.2716991603374481, 0.3474884331226349, -0.0631766989827156, 0.03420979529619217, ...
I have a Nant build file which executes NUnit after compiling the dll's. I am executing the NAnt build file with a task in CruiseControl. So NAnt is running the tests not CruiseControl. How do I configure it so that the CruiseControl web dashboard can be used to view the NUnit output ? --- This fixed it: ``` <publi...
[ 0.120882548391819, -0.017043134197592735, 0.26916587352752686, 0.10005196183919907, -0.3264274597167969, 0.1506059467792511, 0.3087015450000763, -0.28464317321777344, -0.13579349219799042, -0.48093071579933167, 0.3194725811481476, 0.549609363079071, 0.0855964943766594, 0.04798738285899162,...
</publishers> ``` You want to use the merge capabilities of CruiseControl to grab your NUnit XML output. This is the situation my company has going, and it seems to work fairly well. Here is a config snippet (This goes in the <publishers> element in CCNet.config): ``` <merge> <files> <file><path to XML...
[ -0.01355332788079977, -0.15201836824417114, 0.8014371991157532, 0.18418864905834198, -0.04755843058228493, -0.3615337610244751, 0.021549304947257042, 0.18903310596942902, -0.4108990728855133, -0.5749825239181519, 0.04859209805727005, 0.40645265579223633, 0.16467340290546417, 0.094322033226...
There seem to many ways to skin this particular cat - but which is the best and easiest to implement. It would seem that the ASP.net Membership Provider is the one that will save more time, so my questions are: 1. What are the pros/cons of Membership? 2. How do you integrate the auto generated user db with your own cu...
[ 0.4835855960845947, -0.15859508514404297, 0.16332949697971344, 0.3040773570537567, -0.3354882597923279, -0.20173279941082, 0.28516826033592224, -0.17808544635772705, -0.12109360098838806, -0.3406916558742523, 0.07590415328741074, 0.37037932872772217, -0.18192067742347717, 0.003805157262831...
Directory or some other member location. You shouldn't need to integrate the databases, you can use one to authenticate users and then as long as they are valid, go query another database for the data. This is a good way to keep information seperate for security reasons. For a good tutorial, I'd suggest: <http://msd...
[ 0.7190318703651428, -0.26541006565093994, 0.7485252022743225, 0.5273316502571106, 0.17119069397449493, -0.4056827127933502, 0.045944735407829285, 0.029159042984247208, -0.5532444715499878, -0.2764718532562256, -0.01406488660722971, 0.24360588192939758, 0.05533610284328461, 0.27162608504295...
Let's face it. The Singleton Pattern is [highly controversial](https://stackoverflow.com/questions/11831/singletons-good-design-or-a-crutch#11839) topic with hordes programmers on *both* sides of the fence. There are those who feel like the Singleton is nothing more then a glorified global variable, and others who swea...
[ 0.7039728164672852, 0.2829716205596924, 0.059710919857025146, 0.0374777726829052, -0.6684560179710388, -0.4246651232242584, 0.17796704173088074, 0.13051991164684296, -0.07006967067718506, -0.42163124680519104, 0.020185576751828194, 0.5162819027900696, -0.14169462025165558, 0.37613138556480...
I am simply interested in *singleton-alternatives* when I ask the question: **Are their any specific alternatives to the GOF Singleton Pattern?** For example, many times when I have used the singleton pattern in the past, I am simply interested in preserving the state/values of one or several variables. The state/val...
[ 0.2756795287132263, -0.2141185849905014, -0.31008443236351013, 0.2453034222126007, -0.2582077980041504, 0.2232818603515625, 0.1258881390094757, 0.28914034366607666, -0.47195565700531006, -0.7080639600753784, 0.166279137134552, 0.5170332789421082, -0.14089179039001465, 0.3194792568683624, ...
ok? I guess I'm asking a purely academic question in your best movie trailer voice, "In a parallel universe where there is no singleton, what could we do?" Alex Miller in "[Patterns I Hate](http://tech.puredanger.com/2007/07/03/pattern-hate-singleton/)" quotes the following: "When a singleton seems like the answer, I ...
[ 0.8323554992675781, 0.06616076081991196, -0.12322627007961273, 0.3271544575691223, 0.1408112347126007, -0.07297417521476746, 0.20342853665351868, -0.05240640416741371, -0.198567196726799, -0.39135539531707764, 0.039138633757829666, 0.25326183438301086, -0.5132355093955994, 0.11629913002252...
component that needs it (dependency injection)
[ 0.12681175768375397, -0.36148226261138916, 0.19754652678966522, 0.09026974439620972, 0.06115803122520447, -0.03297611325979233, 0.027713727205991745, -0.3294536769390106, 0.3737729787826538, -0.42421406507492065, -0.23292072117328644, 0.860328197479248, -0.28879743814468384, -0.25854772329...
in web.xml i set my welcome file to a jsp within web.xml ``` <welcome-file>WEB-INF/index.jsp</welcome-file> ``` inside index.jsp i then forward on to a servlet ``` <% response.sendRedirect(response.encodeRedirectURL("myServlet/")); %> ``` however the application tries to find the servlet at the following path ...
[ -0.006975891999900341, 0.12340079993009567, 0.8164061903953552, -0.14951375126838684, -0.43895024061203003, -0.1130489706993103, 0.18449071049690247, -0.2783535420894623, -0.13087165355682373, -0.7978699207305908, -0.3082040548324585, 0.12438858300447464, -0.3439367711544037, 0.13328480720...
deploy the JSPs without pre-compile and modification of the web.xml. ``` <?xml version="1.0"?> <project name="jspc" basedir="." default="all"> <import file="${build.appserver.home}/bin/catalina-tasks.xml"/> <target name="all" depends="jspc,compile"></target> <target name="jspc"> <jasper validateXml="fals...
[ 0.03223607689142227, 0.10687319189310074, 0.47785040736198425, -0.11091464012861252, 0.06445076316595078, -0.07769705355167389, 0.05371100828051567, -0.45600539445877075, -0.2578003406524658, -0.460514098405838, -0.5060026049613953, 0.7236692309379578, -0.33977022767066956, -0.421566724777...
/> </fileset> <fileset dir="${build.appserver.home}/lib"> <include name="*.jar" /> </fileset> <fileset dir="${build.appserver.home}/bin"> <include name="*.jar"/> </fileset> </classpath> <include name="**" /> <exclude name="tags/**"/> </javac> </target> <target name="cle...
[ 0.12446938455104828, -0.25385111570358276, 0.2551150619983673, -0.2149040699005127, -0.24397915601730347, -0.022244684398174286, 0.1615597903728485, -0.9406549334526062, -0.11315993219614029, -0.7936273217201233, -0.16730964183807373, 0.2806105315685272, -0.36716893315315247, -0.2121365815...
mappings) from the newly generated web,xml into your original.
[ 0.21224595606327057, -0.24670745432376862, 0.45291370153427124, 0.4128166139125824, 0.2480614185333252, 0.03892771527171135, -0.10753872990608215, 0.004970818292349577, -0.015164468437433243, -0.9671446084976196, -0.4593413174152374, 0.23316045105457306, -0.02228515036404133, 0.17020376026...
I just recently got my first mac. I do lots of programming on windows but now I want to get into Mac development. What are some languages i should know or tools i should use to get started with mac development? [Cocoa(R) Programming for Mac(R) OS X (3rd Edition) by Aaron Hillegass](https://rads.stackoverflow.com/amzn/c...
[ 0.12568789720535278, 0.26667267084121704, -0.08802671730518341, 0.21308434009552002, 0.16399946808815002, -0.033494893461465836, 0.2676825225353241, 0.059774838387966156, -0.47456640005111694, -0.5101140141487122, -0.06769035756587982, 0.4850802719593048, -0.10225221514701843, -0.354463666...
What's a good method of programatically generating etag for web pages, and is this practice recommended? Some sites recommend turning etags off, others recommend producing them manually, and some recommend leaving the default settings active - what's the best way here? ETags do help when you use some kind of caching me...
[ 0.37375354766845703, -0.041314855217933655, 0.04760464280843735, 0.22825604677200317, 0.12303130328655243, -0.2687024176120758, 0.02859136462211609, -0.02002117596566677, -0.14456939697265625, -0.5066007375717163, -0.0042426977306604385, 0.4592781960964203, -0.24201366305351257, -0.2128816...
the file and the timestamp of the file and do a md5-hash over this data. We, as an example, built a simple but effective etag with our software. Every "content unit" (i.e. html, jpegs, gifs...) in our software has a unique id and a version number (i.e. a jpeg has the id "17" and version "2", this means it was changed ...
[ 0.11882247030735016, 0.0037747672758996487, 0.23616312444210052, 0.053597450256347656, 0.12462808191776276, -0.23893950879573822, 0.022834086790680885, -0.28531962633132935, -0.11384851485490799, -0.6089438199996948, -0.2985990047454834, 0.4601534903049469, -0.21858496963977814, -0.0661719...
you could probably use the URL and a timestamp (i.e. the timestamp of the file), too.
[ 0.46351826190948486, 0.06010522320866585, 0.13626354932785034, 0.3911905586719513, 0.18842247128486633, -0.26597124338150024, -0.22937306761741638, 0.35676220059394836, -0.2927035093307495, -0.2496587485074997, 0.12942318618297577, 0.2112322896718979, 0.2749793231487274, 0.0960048064589500...
`fopen` is failing when I try to read in a very moderately sized file in `PHP`. `A 6 meg file` makes it choke, though smaller files around `100k` are just fine. i've read that it is sometimes necessary to recompile `PHP` with the `-D_FILE_OFFSET_BITS=64` flag in order to read files over 20 gigs or something ridiculous,...
[ 0.06672345846891403, 0.05223522335290909, 0.5465582013130188, -0.10701792687177658, -0.3442017436027527, -0.04474738612771034, 0.4729093611240387, 0.013494057580828667, -0.2110571712255478, -0.4857548773288727, -0.05732601881027222, 0.6255135536193848, 0.19761057198047638, -0.1002588942646...
I'm able to do with smaller files. What are your tricks/solutions for reading and doing operations on very large files in `PHP`? Update: Here's an example of a simple codeblock that fails on my 6 meg file - PHP doesn't seem to throw an error, it just returns false. Maybe I'm doing something extremely dumb? ``` $rawf...
[ 0.2568419277667999, 0.22728458046913147, 0.16579708456993103, 0.11952013522386551, 0.08204255253076553, -0.42133599519729614, 0.7940381765365601, -0.01640651375055313, -0.3199085295200348, -0.6040611863136292, -0.16303646564483643, 0.5489030480384827, -0.21017469465732574, -0.0350511483848...
sure that it's `fopen` that's failing and not your script's timeout setting? The default is usually around 30 seconds or so, and if your file is taking longer than that to read in, it may be tripping that up. Another thing to consider may be the memory limit on your script - reading the file into an array may trip ove...
[ 0.18143980205059052, -0.11713198572397232, 0.4377690851688385, -0.18987306952476501, -0.02305571362376213, -0.024162156507372856, 0.8261412978172302, -0.04200911894440651, -0.23854275047779083, -0.635084867477417, -0.15064206719398499, 0.6784768104553223, 0.0757613554596901, -0.22764863073...
{ while (!feof($handle)) { $buffer = fgets($handle, 4096); // Process buffer here.. } fclose($handle); } ``` **Edit** > PHP doesn't seem to throw an error, it just returns false. Is the path to `$rawfile` correct relative to where the script is running? Perhaps try setting an absolute pa...
[ 0.051461003720760345, -0.0849187821149826, 0.7030842900276184, -0.1706378012895584, -0.06001190096139908, 0.08569677174091339, 0.4568336009979248, -0.3486090898513794, -0.12223634123802185, -0.5173496007919312, 0.08082970231771469, 0.6452035307884216, -0.11632156372070312, -0.0127635439857...
I hit this error while my web application was trying to execute a SELECT INTO on a MSSQL 2005 database. I really have two questions: 1. What does this error mean and how does this happen? 2. Is there a way to prevent these errors by coding in a different way? Besides the obvious, that somebody changed the table while ...
[ 0.3951626420021057, 0.10724779218435287, -0.22460447251796722, 0.1272900104522705, -0.11670861393213272, -0.13613884150981903, 0.2207796424627304, 0.07005873322486877, -0.3303917646408081, -0.5635169148445129, 0.5443776845932007, 0.2775956690311432, -0.4282013475894928, 0.3932057321071625,...
I've got an XML document containing news stories, and the body element of a news story contains p tags amongst the plain text. When I use XSL to retrieve the body, e.g. ``` <xsl:value-of select="body" /> ``` the p tags seem to get stripped out. I'm using Visual Studio 2005's implementation of XSL. Does anyone have ...
[ 0.7131507396697998, 0.07135680317878723, 0.488156795501709, 0.11379636824131012, -0.21134816110134125, -0.11704076826572418, 0.026697129011154175, -0.26647236943244934, -0.2721126973628998, -0.5564872026443481, -0.24409478902816772, 0.3381316363811493, -0.0506925992667675, -0.3338975906372...
What level of CPU usage should be considered high for SQL Server? ie 80% 90% 100%? if under normal loads the CPU averages above 40% I start to get nervous. However, that's because I know the nature of our traffic and the spikes we get. Your mileage may vary.
[ 0.3274567425251007, 0.2822133004665375, 0.507610559463501, 0.3018353283405304, 0.1196366399526596, -0.20935432612895966, 0.2797977924346924, 0.21864855289459229, -0.22566261887550354, -0.45868924260139465, 0.4666229784488678, 0.49416622519493103, -0.25433894991874695, -0.09407244622707367,...
What's the best way, using SQL, to check the maximum number of connections that is allowed for an Oracle database? In the end, I would like to show the current number of sessions and the total number allowed, e.g. "Currently, 23 out of 80 connections are used". There are a few different limits that might come in to pla...
[ 0.42084363102912903, 0.08904910087585449, 0.06157205253839493, 0.36786511540412903, 0.11954600363969803, 0.005289076361805201, 0.13850244879722595, -0.25488072633743286, -0.5014120936393738, -0.4331301748752594, 0.17762187123298645, 0.6448644399642944, -0.14028336107730865, 0.2056739330291...
number of sessions currently active ``` SELECT COUNT(*) FROM v$session ``` As I said, though, there are other potential limits both at the database level and at the operating system level and depending on whether shared server has been configured. If shared server is ignored, you may well hit the limit of the PROC...
[ 0.6214349269866943, 0.2513664662837982, 0.46853020787239075, 0.08373163640499115, 0.12012425065040588, -0.3301474452018738, 0.2904215455055237, -0.12567636370658875, -0.7398204803466797, -0.4639556109905243, 0.13127148151397705, 0.7267670631408691, -0.17649592459201813, 0.200153186917305, ...
I have a basic ActiveRecord model in which i have two fields that i would like to validate. The requirement is that at least one of the fields must have a value. Both can have values, but at least one needs a value. How do i express this with ``` validates_presence_of ``` statements? For example: ``` validates_p...
[ -0.14914070069789886, 0.08402401953935623, 0.30961671471595764, -0.181052103638649, 0.009015625342726707, 0.04423275962471962, 0.3853781223297119, -0.17779730260372162, -0.07082435488700867, -0.4336893558502197, -0.026421651244163513, 0.7210171818733215, -0.3265805244445801, -0.08623789995...
What role is Spring taking in Struts + Spring + Hibernate? Spring provides many different "modules" and different programmers will use different parts of Spring. However, commonly in this sort of stack, you will see Spring being used as a provider of * An inversion of control container for dependency injection * An a...
[ 0.15340261161327362, -0.393890380859375, -0.005352127365767956, 0.15162964165210724, -0.2842150628566742, 0.05848221853375435, -0.024621618911623955, -0.4236416816711426, -0.29050394892692566, 0.2029297649860382, -0.08065377920866013, 0.2999155819416046, -0.250406414270401, -0.155399143695...
I use FB1.5.3 and need to eventually add some FK to the database. It happens that if I try to do it while anyone else is connected to the DB I get an exception. Is there a way to add an FK while the system is running? There's no way. It's a known limitation that has been removed in Firebird 2.0. You should either upg...
[ 0.4456099569797516, 0.3706364035606384, 0.06938284635543823, -0.06698792427778244, 0.002419500146061182, -0.12850165367126465, 0.4109148681163788, -0.1437985897064209, -0.134159117937088, -0.32451045513153076, 0.19043757021427155, 0.14868639409542084, -0.30456581711769104, 0.09556767344474...
I'm developing an application targeting .NET Framework 2.0 using C# for which I need to be able to find the default application that is used for opening a particular file type. I know that, for example, if you just want to open a file using that application you can use something like: ``` System.Diagnostics.Process.S...
[ 0.44356298446655273, 0.3468082845211029, 0.36503979563713074, -0.20538154244422913, 0.105576291680336, -0.19225841760635376, 0.13602779805660248, 0.10017058253288269, -0.10076439380645752, -0.9569808840751648, -0.20364739000797272, 0.6061695218086243, -0.3712257146835327, 0.104179359972476...
I need to be able to find out the default application for opening *.txt* files, which will allow me to invoke it directly. I'm guessing there's some Win32 API that I'll need to P/Invoke in order to do this, however a quick look with both Google and MSDN didn't reveal anything of much interest; I did find a very large ...
[ 0.34298256039619446, 0.25860288739204407, 0.012517709285020828, 0.20682726800441742, -0.06464331597089767, -0.17230921983718872, 0.17359082400798798, 0.27848193049430847, -0.37553006410598755, -0.8148316740989685, -0.29820752143859863, 0.45880642533302307, 0.0835811197757721, 0.28379806876...
We're trying to put together kiosk solution where we can charge people by hour for applications they use. As such, we need a way to figure out when an application is started, when it is closed and log this information for billing. I am a reasonably experienced .NET programmer so a managed code solution would be great. ...
[ 0.6959050893783569, -0.18786920607089996, 0.13218005001544952, 0.3056550621986389, 0.25125694274902344, -0.19206632673740387, 0.12997601926326752, 0.18512657284736633, -0.2537625730037689, -0.6125487089157104, 0.1592048555612564, 0.6543278694152832, -0.02267756126821041, 0.0179928131401538...
long it was running, how much memory it used, etc. Here is one example of monitoring process creating, deletion, etc. <http://weblogs.asp.net/whaggard/archive/2006/02/11/438006.aspx>
[ 0.03847100958228111, 0.03222746402025223, -0.2031184881925583, 0.05890130624175072, 0.4028262794017792, -0.30708861351013184, 0.3147568106651306, 0.18204881250858307, -0.569673478603363, 0.07792949676513672, 0.03972001373767853, 0.2434631586074829, 0.09410116821527481, 0.4035634994506836, ...
There is a select dropdown and I want to add "No selection" item to the list which should give me 'null' when submitted. I'm using SimpleFormController derived controller. ``` protected Map referenceData(HttpServletRequest httpServletRequest, Object o, Errors errors) throws Exception { Map<String, Object> map = ne...
[ -0.11491607874631882, -0.14538250863552094, 0.4616563320159912, -0.016632840037345886, -0.18661348521709442, -0.14109644293785095, 0.3359801769256592, -0.33568817377090454, -0.40299171209335327, -0.7519086599349976, -0.3442405164241791, 0.2425522655248642, -0.295403391122818, 0.24104601144...
this with a custom validation annotation which checks if the selected value is "No Selection". Is there a more standard and easier solution? One option: ```html <form:select path="country" title="country" > <form:option value="">&nbsp;</form:option> <form:options items="${countryList}" /> </form:select> ```
[ 0.14741885662078857, -0.4583113193511963, 0.5024937987327576, 0.18972992897033691, 0.2481994330883026, -0.20169802010059357, 0.12978655099868774, -0.21680504083633423, -0.48113515973091125, -0.55816251039505, -0.1964784413576126, 0.27532491087913513, -0.08031975477933884, -0.19667884707450...
It's possible to create digrams in SQL Server 2000 that can be useful to show the relationships between tables. The problem we run into is that when somebody refreshes our development database, the diagrams get lost. We can load tables, stored procedures, views, etc. with SQL scripts, but we have to create the diagrams...
[ 0.010181938298046589, 0.08665251731872559, 0.12247492372989655, 0.3452397286891937, -0.0519704632461071, -0.2319270372390747, 0.18566106259822845, -0.13503260910511017, -0.44120925664901733, -0.5512356162071228, 0.2996496260166168, 0.3571208417415619, -0.22920598089694977, 0.09679172188043...
I just upgraded a VS 2005 project to VS 2008 and was examining the changes. I noticed one of the .Designer.cs files had changed significantly. The majority of the changes were simply replacements of *System* with *global::System*. For example, ``` protected override System.Data.DataTable CreateInstance() ``` became ...
[ 0.010598967783153057, -0.09221259504556656, 0.283753365278244, 0.09643586724996567, -0.2790432870388031, -0.18688088655471802, 0.3280908167362213, -0.12137353420257568, -0.1045038029551506, -0.7395377159118652, 0.04418843612074852, 0.4983115792274475, -0.40186259150505066, 0.20597051084041...
public class System { } // Define a constant called 'Console' to cause more problems. const int Console = 7; const int number = 66; static void Main() { // Error Accesses TestApp.Console //Console.WriteLine(number); } } ``` However: ``` global::System.Console.Writeline("Thi...
[ -0.30867376923561096, -0.1482914239168167, 0.22051067650318146, -0.007090266328305006, 0.20747630298137665, 0.0983806625008583, 0.36673274636268616, -0.009642462246119976, -0.11348431557416916, -0.6206368207931519, -0.25789621472358704, 0.42270028591156006, -0.58222496509552, 0.36573231220...
How do you perform delete and put operations restfully in rails? I have read the documentation and thought I was doing everything properly, but I can't seem to get it to work. For example, if I wanted to delete an employee I would create a controller called "EmployeesController" and create a destroy method to perform ...
[ 0.012105025351047516, -0.14758269488811493, 0.11574143916368484, 0.2099081426858902, -0.016637105494737625, -0.4308931231498718, 0.10521315038204193, 0.005895168520510197, -0.12462401390075684, -0.783056378364563, 0.1982709765434265, 0.6310140490531921, -0.229648157954216, -0.0230927839875...
on the link, it is still is sending a POST operation, so it does nothing. What am I missing or doing wrong? Try ``` :url => employee_url(@employee) ``` IIRC, \*\_path is a named route generated by the :resource directive which includes the method, thus overwriting your :method => :delete
[ -0.0002347246918361634, -0.02233513630926609, 0.25613734126091003, 0.0756334513425827, 0.1578126698732376, -0.2856851816177368, 0.6172276735305786, 0.15865033864974976, -0.06255443394184113, -0.720114529132843, 0.07778804749250412, 0.2178342640399933, -0.40548282861709595, 0.57583397626876...
What tools do you use to find unused/dead code in large java projects? Our product has been in development for some years, and it is getting very hard to manually detect code that is no longer in use. We do however try to delete as much unused code as possible. Suggestions for general strategies/techniques (other than...
[ 0.435829758644104, 0.10663624852895737, -0.25940579175949097, 0.18946495652198792, 0.04359640181064606, -0.3085854947566986, 0.17677287757396698, 0.08538989722728729, -0.3512733578681946, -0.6355404853820801, 0.12151676416397095, 0.4190615713596344, 0.010550386272370815, -0.059230521321296...
little other code depending on it, allowing for docues manual inspection. I would instrument the running system to keep logs of code usage, and then start inspecting code that is not used for months or years. For example if you are interested in unused classes, all classes could be instrumented to log when instances a...
[ 0.5363119840621948, -0.014661205932497978, 0.07645855098962784, 0.27693042159080505, -0.08061207830905914, -0.15651609003543854, 0.45657825469970703, -0.07688236236572266, -0.17577916383743286, -0.6392027139663696, 0.4549877941608429, 0.7364352345466614, 0.09701718389987946, -0.11993966996...
how this is best done in Java. We have done this in Smalltalk, which is a dynamic language and thus allows for code modification at runtime. We instrument all methods with a logging call and uninstall the logging code after a method has been logged for the first time, thus after some time no more performance penalties ...
[ 0.08816683292388916, -0.18023617565631866, 0.1483938992023468, 0.1478032022714615, 0.07701036334037781, -0.4550195634365082, 0.3522164523601532, -0.20047004520893097, -0.40407630801200867, -0.3555231988430023, -0.021893227472901344, 0.5757035613059998, -0.47288644313812256, -0.213534280657...
When creating a new file with vim, I would like to automatically add some skeleton code. For example, when creating a new xml file, I would like to add the first line: ``` <?xml version="1.0"?> ``` Or when creating an html file, I would like to add: ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "h...
[ 0.6108349561691284, 0.13544505834579468, 0.4481636583805084, -0.011083702556788921, -0.06944473087787628, -0.13581626117229462, 0.004131990019232035, -0.3804078698158264, -0.30615904927253723, -0.5869425535202026, -0.24230602383613586, 0.5655027031898499, -0.21530254185199738, 0.0669333264...
Firebug is the most convenient tool I've found for editing CSS - so why isn't there a simple "save" option for CSS? I am always finding myself making tweaks in Firebug, then going back to my original .css file and replicating the tweaks. Has anyone come up with a better solution? **EDIT:** I'm aware the code is stor...
[ 0.3724345862865448, 0.36664441227912903, 0.16135846078395844, 0.035471443086862564, -0.16552238166332245, -0.28019264340400696, 0.20366784930229187, 0.3202142119407654, -0.2424359917640686, -0.6905319690704346, -0.018801899626851082, 0.3586287796497345, -0.2329820990562439, -0.099057555198...
"export" or "save" option, which allows you to store the new .css file. (Which I could then replace the remote one with). I have tried looking in temporary locations, and choosing *File* > *Save...* and experimenting with the output options on Firefox, but I still haven't found a way. **EDIT 2:** The official discuss...
[ 0.1690060943365097, 0.11528109759092331, 0.2022503912448883, -0.18838392198085785, -0.04868477210402489, -0.07035598903894424, 0.20724895596504211, 0.14141738414764404, -0.3436885178089142, -0.743636965751648, -0.14065681397914886, 0.47965407371520996, -0.42330026626586914, -0.027528179809...
there's [CSS Updater](http://www.cssupdater.com/) but you have to register and it's a paid extension...) I gave up on Firefox + Firebug and looked for something similar for Google Chrome. Guess what... I just found this great post that shows a nice way of getting this to work ( built into Chrome - there's no need for a...
[ 0.32969173789024353, -0.032639093697071075, 0.5026865601539612, -0.03944433853030205, -0.5089014768600464, -0.04976971447467804, 0.37071463465690613, -0.03386374190449715, -0.3425971269607544, -0.7372136116027832, 0.14088216423988342, 0.38358014822006226, -0.19923660159111023, 0.0977965518...
Chrome Dev Tools Reloaded](http://www.youtube.com/watch?v=N8SS-rUEZPg&feature=player_detailpage#t=515s) I hope it helps if it doesn't matter to you changing browser while editing your CSS files. I made the change already for now, but I would really love to have this functionality built into Firebug. :) --- **[Update...
[ 0.4061957895755768, 0.020947687327861786, 0.3726542294025421, -0.02574620395898819, -0.6740391850471497, -0.1255417913198471, 0.40825390815734863, -0.13463139533996582, -0.2053128182888031, -0.7936029434204102, 0.1241539716720581, 0.8734898567199707, -0.11459194123744965, -0.26711130142211...
How would I write a Perl CGI script that receives a file via a HTTP post and saves that to the file system? Just a note: however you will write it, **don't** save it in a place accessible from your web-server. And now to the point: below is a script which I was using for some time for photo-uploading. It might need so...
[ 0.776690661907196, 0.2092515528202057, 0.30451759696006775, 0.008253442123532295, -0.23708276450634003, -0.14181941747665405, 0.060144729912281036, 0.028264930471777916, -0.2613711655139923, -0.6594246625900269, -0.007171996869146824, 0.3695577383041382, -0.14671096205711365, 0.06699299812...
( fatalsToBrowser ); use File::Basename; $CGI::POST_MAX = 1024 * 5000; my $safe_filename_characters = "a-zA-Z0-9_.-"; my $upload_dir = "/home/www/upload"; my $query = new CGI; my $filename = $query->param("photo"); my $email_address = $query->param("email_address"); if ( !$filename ) { print $query->header ( ); pr...
[ -0.022344008088111877, -0.02023702673614025, 0.44715186953544617, -0.0687161386013031, -0.24034157395362854, 0.28045693039894104, 0.637844979763031, -0.6404980421066284, -0.03153831511735916, -0.28306347131729126, -0.33917251229286194, 0.7525317668914795, -0.46839094161987305, 0.0665830969...
"-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Thanks!</title> </head> <body> <p>Thanks for uploading your photo!</p> </body> </html> END_HTML...
[ 0.3817335069179535, 0.027306636795401573, 0.8626022934913635, 0.18312060832977295, -0.5200148224830627, -0.3469403088092804, 0.15926532447338104, -0.37904804944992065, -0.3154881000518799, -0.19860582053661346, -0.12001677602529526, 0.3916010558605194, 0.004214020445942879, -0.292923331260...
Given the email address: "Jim" <jim@example.com> If I try to pass this to MailAddress I get the exception: > The specified string is not in the form required for an e-mail address. How do I parse this address into a display name (Jim) and email address (jim@example.com) in C#? EDIT: I'm looking for C# code to parse...
[ 0.06458261609077454, 0.48250171542167664, 0.2396155744791031, -0.34070104360580444, -0.09225413203239441, -0.1389436274766922, 0.2854688763618469, 0.012069758959114552, -0.3558233380317688, -0.5929874777793884, -0.004161159507930279, 0.2132156491279602, -0.4246531128883362, -0.063612535595...
email addresses correctly is not easy and `MailAddress` should be able to handle most scenarios. According to the MSDN documentation for `MailAddress`: <http://msdn.microsoft.com/en-us/library/591bk9e8.aspx> It should be able to parse an address with a display name. They give `"Tom Smith <tsmith@contoso.com>"` as an...
[ 0.19395767152309418, 0.6653733253479004, 0.3268980085849762, -0.04791934788227081, -0.06827741116285324, -0.12364619970321655, 0.465091735124588, -0.21480777859687805, -0.18049493432044983, -0.6921969652175903, 0.0033331208396703005, 0.3541240394115448, -0.4797625243663788, 0.0993595644831...
I have a table column that needs to be limited to a certain width - say 100 pixels. At times the text in that column is wider than this and contains no spaces. For example: ``` a_really_long_string_of_text_like_this_with_no_line_breaks_makes_the_table_unhappy ``` I would like to calculate the width of text server-si...
[ 0.07733091711997986, 0.19150061905384064, 0.7018004059791565, -0.2140977680683136, -0.22820785641670227, 0.19410592317581177, 0.10011815279722214, -0.08392844349145889, -0.2997237741947174, -0.6881537437438965, 0.1524246484041214, 0.20327018201351166, -0.14034150540828705, -0.0207537207752...
data showing the pixel width of each character? Or a program to generate it? I think a clever one-time javascript script could do the trick. But I don't want to spend time re-inventing the wheel if someone else has already done this. I am surely not the first person to come up against this problem. This would not only...
[ 0.4229930341243744, 0.14608444273471832, 0.12166272103786469, 0.3366416096687317, -0.07348226010799408, 0.09774487465620041, 0.041792649775743484, -0.05962184816598892, 0.004088046960532665, -0.5803596377372742, 0.49904897809028625, 0.6256020665168762, -0.11038579791784286, 0.1769660711288...
You might think that you're using absolute positioning pixels in your style properties, but the client could simply be ignoring those or using some plugin to zoom everything because the client uses a high-dpi screen. Using fixed widths is generally a bad idea.
[ 0.46573740243911743, -0.29944145679473877, 0.3376573622226715, 0.3978521227836609, 0.045641954988241196, -0.221103698015213, 0.08182308077812195, 0.03808286786079407, -0.23949898779392242, -0.5635798573493958, 0.00976564735174179, 0.5700205564498901, -0.18037822842597961, -0.28158059716224...
Is it possible to code a Dojo DnD target to accept external objects, such as files or folders from a file explorer? Windows Explorer, for example. I doubt it, because it will be the browser that will receive the DnD event... At best you can count on a plugin or extension to handle it, like the excellent [DragDropUpl...
[ 0.4024677872657776, -0.1987900286912918, 0.34650614857673645, 0.055746957659721375, -0.2523534297943115, -0.5089967846870422, -0.13186770677566528, -0.21486784517765045, 0.07877217233181, -0.288615882396698, -0.04596235975623131, 0.5144813060760498, -0.42177921533584595, 0.0912490040063858...
I am looking for an algorithm to calculate the next set of operations in a sequence. Here is the simple definition of the sequence. 1. Task 1A will be done every 500 hours 2. Task 2A will be done every 1000 hours 3. Task 3A will be done every 1500 hours So at t=500, do 1A. At t=1000, do both 1A and 2A, at t=1500 do 1...
[ 0.26680952310562134, -0.016370147466659546, 0.15779712796211243, -0.31094515323638916, -0.0031852377578616142, 0.3596958518028259, 0.47064754366874695, -0.5526760220527649, -0.5585936903953552, -0.7264060974121094, 0.055139124393463135, 0.42115578055381775, -0.025833556428551674, -0.085348...
tasks (eg last time a [1A+2A] was done). Knowing last time (eg [1A+2A]) is not enough to decide: * [1A+2A] could be at t=1000: next is [1A+3A] at t=1500 * [1A+2A] could be at t=5000: next is [1A] at t=5500 Is there an algorithm for this? It looks like a familiar problem (some sort of sieve?) but I can't seem to fin...
[ 0.06982201337814331, 0.05546485632658005, 0.13089530169963837, -0.06324204057455063, -0.2279767394065857, 0.4794251024723053, 0.5871232151985168, -0.3936556875705719, -0.7137638926506042, -0.6670151948928833, 0.12692312896251678, 0.46418219804763794, -0.0715387612581253, -0.216481864452362...
timestamp] lastTaskTime = {} taskIntervals = {} for timestamp, tasks in history: for task in tasks: if task not in lastTaskTime: lastTaskTime[task] = timestamp else: lastTimestamp = lastTaskTime[task] interval = abs(timestamp - lastTimestamp) if task ...
[ -0.4413031339645386, -0.6080979108810425, 0.38980287313461304, -0.16269910335540771, 0.24758973717689514, 0.34609633684158325, 0.28088459372520447, -0.34922200441360474, -0.7034947276115417, -0.6249232292175293, -0.2005007416009903, 0.340961217880249, -0.20666421949863434, -0.1756818443536...
taskIntervals[task] = interval # Found a shorter interval # Always remember the last timestamp lastTaskTime[task] = timestamp # taskIntervals contains the shortest time intervals of each tasks executed at least twice in the past # lastTaskTime contains the last time each task was executed ``...
[ -0.2804996967315674, -0.44680729508399963, 0.4969307780265808, -0.1180681362748146, 0.19214577972888947, 0.06280004233121872, 0.5665168762207031, -0.13788357377052307, -0.5799505710601807, -0.8662194013595581, -0.06996197998523712, 0.3665926456451416, -0.12771499156951904, -0.1574318259954...
lastTime = lastTaskTime[task] interval = taskIntervals[task] if not nextTime or lastTime + interval < nextTime: nextTime = lastTime + interval nextTasks = [task] elif lastTime + interval == nextTime: nextTasks.append(task) # nextTime contains the time when the next set of tasks wil...
[ -0.212615504860878, -0.6736686825752258, 0.6023028492927551, -0.19969551265239716, 0.45287907123565674, 0.040465909987688065, 0.2351122498512268, -0.17449428141117096, -0.47470247745513916, -0.9526621103286743, -0.20506365597248077, 0.5182785987854004, -0.12808358669281006, -0.264866054058...
I am using a multi-dimensional dynamic array in delphi and am trying to figure this out: I have 2 seperate values for the first index and second index that are totally seperate of each other. As new values come I want to grow the array if that new value is outside of either bound. For new values x, y I check: ``` ...
[ 0.16414685547351837, -0.17785099148750305, 0.5639284253120422, -0.3950842022895813, -0.11312427371740341, -0.09204275906085968, 0.1680317521095276, -0.45113927125930786, -0.32081344723701477, -0.5621569752693176, -0.005036028102040291, 0.5678420066833496, -0.4803665578365326, 0.19966590404...
needed? I think you forgot to use the second index on the second dimension; Your code should probably read like this : ``` if Length(List) < (x + 1) then SetLength(List, x + 1); if Length(List[x]) < (y + 1) then SetLength(List[x], y + 1); ``` Note the use of 'x' as the first dimension index when growing the s...
[ 0.12376188486814499, -0.23367346823215485, 0.44176343083381653, -0.1817978471517563, -0.09416066110134125, -0.2865948975086212, 0.09111990034580231, -0.43702825903892517, -0.346932977437973, -0.5781132578849792, -0.05844873562455177, 0.8329142332077026, -0.4029318690299988, -0.165755808353...
the *old* copy of it! The only way around this, is keeping track of these array's with one extra level of indirection - ie. : Use a pointer to the dynamic array (which is also a pointer in itself, but that's okay). Also note that any of those 'external' pointers should be updated in any situation that the address of ...
[ 0.17022791504859924, -0.11992910504341125, 0.34168991446495056, 0.021796798333525658, 0.1794101744890213, -0.36214059591293335, 0.40059489011764526, 0.07479707151651382, -0.28176990151405334, -0.7150697112083435, -0.06847858428955078, 0.5280119180679321, -0.3215750455856323, 0.087932020425...
I deleted millions of rows of old data from a production SQL database recently, and it didn't seem to shrink the size of the .MDF file much. We have a finite amount of disk space. I am wondering if there is anything else I can do to "tighten" the file (like something analogous to Access' Compact and Repair function)? ...
[ 0.38607901334762573, 0.038469430059194565, 0.4724462032318115, 0.13298307359218597, 0.15493328869342804, -0.21698790788650513, -0.07985779643058777, 0.03779298812150955, -0.3851591944694519, -0.6713897585868835, 0.15068183839321136, 0.6386170387268066, -0.14231683313846588, 0.3630926907062...
Does anyone know of an application or system out there for tracking changes (files added/removed, diffs on text files) to a *non-source controlled* directory over time? Something that would let you 1. Take a snapshot of a certain directory tree at time A 2. Come back at time period B and see what has changed 3. Come b...
[ 0.48562830686569214, -0.004346388392150402, 0.4608055353164673, 0.2761186361312866, 0.30153873562812805, -0.09984226524829865, 0.1584639996290207, 0.16108255088329315, -0.5418500900268555, -0.5021716952323914, 0.20801740884780884, 0.43237578868865967, 0.1445714682340622, 0.3894766569137573...
isn't in control of the servers or directory trees in question, but changes to those trees impact us and we'd like to keep track of them. The objects to "source control" are 1. Objections to any kind of centralized repository that requires document authors to check-in, check-out. 2. Objections to having to hand-roll/a...
[ 0.27954530715942383, 0.2048465758562088, 0.1075935810804367, 0.17956188321113586, 0.023280132561922073, -0.48416033387184143, 0.1375655233860016, 0.11063076555728912, -0.29041966795921326, -0.30418694019317627, -0.11404918879270554, 0.7267998456954956, -0.17298336327075958, 0.2168304473161...
copies the directory tree to another place, perhaps on a different machine, which is part of a version controlled repostiory. Then, the scheduled task would automatically commit changes, using the version control system of your choice (Mercurial should work nicely for this system, since `hg commit -A -m "automated snap...
[ 0.12232842296361923, -0.01914817839860916, 0.6105936169624329, 0.11985843628644943, 0.25997573137283325, -0.21973782777786255, 0.14667923748493195, 0.15335166454315186, -0.5613768696784973, -0.8583284616470337, -0.3640499711036682, 0.7193126678466797, -0.4154053330421448, 0.141580104827880...
directory.
[ 0.1510956883430481, 0.016335148364305496, 0.31127166748046875, 0.12343490123748779, 0.639334499835968, -0.13039951026439667, -0.10402681678533554, 0.24387773871421814, -0.15415458381175995, -0.2660801410675049, -0.11948665231466293, 0.15008288621902466, -0.22049884498119354, 0.226594865322...
If I can do this, how do I call Java code (methods for instance) from within JavaScript code, in Wicket. erk. The correct answer would be ajax call backs. You can either manually code the js to hook into the wicket js, or you can setup the callbacks from wicket components in java. For example, from AjaxLazyLoadPanel: ...
[ 0.35858210921287537, -0.19050738215446472, 0.07557739317417145, 0.1131705716252327, -0.20409747958183289, -0.09309777617454529, 0.235309436917305, -0.4309072196483612, -0.15244664251804352, -0.7940519452095032, 0.33071470260620117, 0.42704084515571594, -0.18061654269695282, -0.070218540728...
here } @Override public void renderHead(IHeaderResponse response) { super.renderHead( response ); response.renderOnDomReadyJavascript( getCallbackScript().toString() ); } } ``` This example shows how to add call back code to any Component in Wicket. Af...
[ -0.07056359946727753, -0.34519925713539124, 0.4023495316505432, -0.019506921991705894, -0.21837103366851807, -0.0877842828631401, 0.49051910638809204, -0.18927349150180817, -0.1715794801712036, -0.7351097464561462, -0.18666087090969086, 0.4302421808242798, -0.26878824830055237, 0.257141232...
cause it's js enging, to call back into your code, using Ajax, to the 'respond' method shown above, at which point you can execute Java code on the server, and potentially add components to the ajax target to be re-rendered. To do it manually, from js, you can hook into wicket's system by printing out getCallbackScrip...
[ 0.16434557735919952, -0.25155648589134216, 0.31695887446403503, -0.007824684493243694, -0.11648888140916824, 0.1179291233420372, 0.4370936453342438, -0.40566927194595337, -0.29116612672805786, -0.6383564472198486, 0.22366487979888916, 0.3306312561035156, -0.30369290709495544, 0.05234414711...
We have some COBOL programs in our financial applications which need to interact with some of our backend systems. One of the available interfaces is through a web service. Can a program written in Cobol make requests to a web service? [Microfocus](http://www.microfocus.com/) provide a tool called Enterprise Server whi...
[ 0.4470374584197998, 0.38126713037490845, 0.3901977241039276, -0.06075684726238251, 0.1511877030134201, -0.045498766005039215, -0.16301873326301575, 0.18823793530464172, -0.18485301733016968, -0.33022141456604004, 0.09512865543365479, 0.5060704946517944, -0.484637588262558, -0.1359642893075...
B via a web service. Of course, because B now has a web service any other type of program (command line, Windows application, Java, ASP etc.) can now also call it.
[ 0.48160886764526367, -0.13652464747428894, 0.15912353992462158, -0.30278798937797546, -0.2802926301956177, -0.1868814080953598, 0.20118820667266846, 0.14331071078777313, -0.2689001262187958, -0.2548792064189911, -0.5485532283782959, 0.21642884612083435, -0.4955011010169983, 0.2411843389272...
I'm involved in a project that is attempting to use the Eclipse RCP splash screen to gather user credentials, language, etc. If this screen loses focus, it is not available (under Windows at least) through the ALt-Tab functionality, and can only be found by minimizing all other windows and uncovering it. Any way of hav...
[ 0.5352346897125244, -0.01243099570274353, 0.17634011805057526, 0.15842700004577637, -0.04396006092429161, -0.37843841314315796, 0.23389649391174316, 0.10327848047018051, -0.1383732110261917, -0.7750036120414734, 0.18144607543945312, 0.8258822560310364, 0.040096256881952286, -0.056768238544...
to prompt for information, it opens a new dialog to ask for it. Good luck. **[Edit]** I stand corrected. [This thread](http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/msg26519.html) seems to have a solution to this. Good luck, I'm no SWT/RCP guru.
[ 0.15289920568466187, -0.028907129541039467, 0.5130670070648193, 0.19856984913349152, -0.24983558058738708, -0.1764005422592163, 0.6556709408760071, 0.8164663910865784, -0.3793197572231293, -0.5064759850502014, 0.19821375608444214, 0.6489574313163757, 0.04917952045798302, -0.103279471397399...
How does one dynamically load a new report from an embedded resource? I have created a reporting project that contains a report as an embedded resource. I added a second report file and use the following code to switch reports: ``` this.reportViewer1.LocalReport.ReportEmbeddedResource = "ReportsApplication2.Report2.rd...
[ 0.05923568829894066, -0.2641614079475403, 0.4470486044883728, -0.032013796269893646, -0.12263613939285278, -0.15238171815872192, 0.20545224845409393, -0.2884173095226288, -0.3668901324272156, -0.577081024646759, -0.2678358852863312, 0.7749047875404358, -0.3242199420928955, 0.08030550926923...
I'd like to do some basic profiling of my code, but found that the DateTime.Now in C# only have a resolution of about 16 ms. There must be better time keeping constructs that I haven't yet found. Here is a sample bit of code to time an operation: ``` Dim sw As New Stopwatch() sw.Start() //Insert Code To Time sw.Stop()...
[ 0.18325257301330566, -0.14333973824977875, 1.247074842453003, -0.21839843690395355, 0.22343353927135468, 0.05011982470750809, 0.3845483064651489, -0.236815944314003, -0.607990026473999, -0.6407432556152344, -0.11540338397026062, 0.8349414467811584, 0.04819907620549202, 0.1956276297569275, ...
class will use a high-resolution counter if one is available on your system.
[ 0.10431092232465744, -0.5195602774620056, 0.07699326425790787, 0.3925137519836426, 0.03220178931951523, -0.07502856850624084, 0.16440290212631226, 0.2471018135547638, -0.0035958047956228256, -0.7439680099487305, -0.2962415814399719, 0.370361864566803, 0.31781601905822754, 0.036553625017404...
Is there a tool to migrate an [SQLite](http://en.wikipedia.org/wiki/SQLite) database to [SQL Server](http://en.wikipedia.org/wiki/Microsoft_SQL_Server) (both the structure and data)? [SQLite](http://en.wikipedia.org/wiki/SQLite) does have a .dump option to run at the command line. Though I prefer to use the [SQLite Dat...
[ 0.3020161986351013, 0.06142456829547882, 0.05682893097400665, 0.1921621859073639, -0.12125586718320847, -0.23457024991512299, -0.2724151015281677, 0.14933811128139496, -0.348345011472702, -0.5183960795402527, -0.015735413879156113, 0.32384705543518066, -0.26989907026290894, 0.1664161086082...
I need to call a method that accepts a stream argument. The method loads text into the stream, which would normally be a file. I'd like to simply populate a string with the contents of the stream, instead of writing it to a file. How do I do this? Use a MemoryStream with a StreamReader. Something like: ``` using (Memo...
[ -0.04586945101618767, -0.0049625481478869915, 0.49191519618034363, -0.04489801824092865, 0.12798002362251282, 0.1299440711736679, 0.04607025161385536, -0.16557203233242035, 0.11035164445638657, -0.7255938053131104, 0.02107575349509716, 0.6900907158851624, -0.390032559633255, 0.129260420799...
I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe r...
[ 0.3831430673599243, 0.05942138656973839, 0.30307522416114807, 0.07109840214252472, -0.18694157898426056, -0.1129150390625, 0.06871357560157776, 0.06570710241794586, -0.32942870259284973, -0.5324448347091675, 0.11439147591590881, 0.4814029932022095, -0.15019404888153076, -0.2034724503755569...
plugin](http://jquery.thewikies.com/browser/)). Regarding other HTTP Headers, [this wikipedia article](http://en.wikipedia.org/wiki/List_of_HTTP_headers) is a good place to start.
[ 0.39157214760780334, -0.09098027646541595, -0.08054453879594803, 0.019956815987825394, -0.1525096893310547, -0.46525460481643677, -0.009311809204518795, 0.18405687808990479, -0.030595878139138222, -0.5635281801223755, -0.14166779816150665, 0.25350621342658997, -0.23764482140541077, -0.0690...
I am using an asp:Calander and I have an object that has a beginning date and an ending date. I need to get all the dates between these two dates and place them in an array so i can then render corresponding dates on the calander with different CSS I voted up AlbertEin because he gave a good answer, but do you really n...
[ 0.20889025926589966, 0.1276610940694809, 0.4757121503353119, 0.4075721502304077, -0.20922762155532837, 0.26245781779289246, -0.2614782452583313, -0.008905169554054737, -0.44078269600868225, -0.5659805536270142, -0.03775341808795929, 0.1683584451675415, 0.24121801555156708, 0.21030521392822...
code to demonstrate ``` DateTime RangeStartDate,RangeEndDate; //Init as necessary DateTime CalendarStartDate,CalendarEndDate; //Init as necessary DateTime CurrentDate = CalendarStartDate; String CSSClass; while (CurrentDate != CalendarEndDate) { if(CurrentDate >= RangeStartDate && CurrentDate <= RangeEndDate) ...
[ 0.029148109257221222, 0.08470150828361511, 0.6185464859008789, -0.23140397667884827, 0.15507501363754272, 0.12494293600320816, 0.38729414343833923, -0.10636680573225021, -0.11700006574392319, -0.5928384065628052, -0.22504891455173492, 0.45747053623199463, -0.09186837077140808, 0.1086042970...
Let's say that for some reason you need to write a macro: `MACRO(X,Y)`. **(Let's assume there's a good reason you can't use an inline function.)** You want this macro to emulate a call to a function with no return value. --- ### Example 1: This should work as expected. ``` if (x > y) MACRO(x, y); do_something(); ...
[ 0.24976688623428345, -0.1062692254781723, 0.11517123132944107, -0.22816063463687897, 0.11381615698337555, -0.18285496532917023, 0.2205749750137329, -0.002862504217773676, 0.020485294982790947, -0.5951856970787048, -0.13194622099399567, 0.860439121723175, -0.575519323348999, -0.106700792908...
\ cout << "1st arg is:" << (X) << endl; \ cout << "2nd arg is:" << (Y) << endl; \ cout << "Sum is:" << ((X)+(Y)) << endl; ``` This is a very bad solution which fails all three examples, and I shouldn't need to explain why. **Ignore what the macro actually does, that's not the point.** --- Now, the way I most...
[ 0.04428548365831375, 0.2554503083229065, 0.39214277267456055, -0.4944901168346405, -0.020757386460900307, 0.1535547971725464, 0.15931470692157745, 0.01294748391956091, -0.035871267318725586, -0.6205704212188721, -0.3051813244819641, 0.6128705143928528, -0.5761615037918091, -0.2322000265121...
\ { \ cout << "1st arg is:" << (X) << endl; \ cout << "2nd arg is:" << (Y) << endl; \ cout << "Sum is:" << ((X)+(Y)) << endl; \ } ``` This solves example 1,
[ -0.5389353036880493, -0.0076406290754675865, 0.5002927780151367, -0.6874232888221741, -0.26811206340789795, 0.03277170658111572, 0.005636713467538357, -0.5213699340820312, 0.057960301637649536, -0.43597158789634705, -0.4419634938240051, 0.3089454770088196, -0.5878279805183411, -0.053771052...
because the macro is in one statement block. But example 2 is broken because we put a semicolon after the call to the macro. This makes the compiler think the semicolon is a statement by itself, which means the else statement doesn't correspond to any if statement! And lastly, example 3 compiles OK, even though there i...
[ 0.1430475115776062, 0.07402440160512924, 0.5627079606056213, 0.20020174980163574, -0.23995628952980042, -0.2253713607788086, 0.017875749617815018, -0.5262095332145691, -0.30493488907814026, -0.3310438096523285, 0.09800110757350922, 0.5998392701148987, -0.3957277238368988, -0.31782925128936...
has a better solution feel free to post it here, it may get more votes than my method. :)* Macros should generally be avoided; prefer inline functions to them at all times. Any compiler worth its salt should be capable of inlining a small function as if it were a macro, and an inline function will respect namespaces an...
[ -0.07252783328294754, 0.09022308140993118, 0.2007410079240799, -0.026690809056162834, 0.1522572636604309, -0.026976551860570908, 0.3444890081882477, -0.016694864258170128, -0.1716880053281784, -0.6696621775627136, -0.09287349134683609, 0.6933314204216003, -0.4396381378173828, -0.1527042835...
endl), \ (cout << "2nd arg is:" << (Y) << endl), \ (cout << "3rd arg is:" << ((X) + (Y)) << endl), \ (void)0 \ ) ``` The `(void)0` causes the statement to evaluate to one of `void` type, and the use of commas rather than semicolons allows it to be used inside a statement, rather than only as a standalone. I wo...
[ -0.15725646913051605, 0.16821466386318207, 0.5703556537628174, -0.3129771053791046, -0.244828000664711, -0.01374589093029499, 0.2928161323070526, -0.11738775670528412, 0.1173950731754303, -0.2615314722061157, -0.5652964115142822, 0.5011531710624695, -0.3500410318374634, 0.01221511885523796...
I have a web application where users enter arbitrary sql queries for later batch processing. We want to validate the syntax of the query without actually executing it. Some of the queries will take a long time, which is why we don't want to execute them. I'm using Oracle's dbms\_sql.parse to do this. However, I now ha...
[ 0.45709580183029175, 0.3732428252696991, -0.039994001388549805, 0.08514095842838287, -0.05603501945734024, -0.040331628173589706, 0.2076321542263031, -0.18830987811088562, 0.0016941830981522799, -0.6053076386451721, 0.23079143464565277, 0.34932875633239746, -0.3460776209831238, 0.361838638...
be returned when the query is actually executed? I'm using Oracle 10g and and it's a Java 1.5/Servlet 2.4 application. Edit: The users who enter the queries are already users on the database. They authenticate to my app with their database credentials and the queries are executed using those credentials. Therefore the...
[ 0.17416556179523468, 0.2492651492357254, 0.2842513620853424, -0.015675107017159462, -0.11746655404567719, 0.11798363924026489, 0.29874420166015625, -0.5991295576095581, 0.12991595268249512, -0.6088994145393372, -0.2415016144514084, 0.4430968761444092, -0.15577653050422668, 0.16394680738449...
foo"); ResultSetMetadata rsmd = ps.getMetaData(); int numberOfColumns = rsmd.getColumnCount(); ``` Then you can get metadata about each column of the result set.
[ 0.3726550340652466, 0.15595771372318268, 0.7107340097427368, -0.1859821230173111, 0.2471696138381958, -0.1986880600452423, 0.30922797322273254, -0.45691031217575073, -0.2512824833393097, -0.15520279109477997, -0.22284932434558868, 0.4394284188747406, -0.539600133895874, 0.00120492221321910...
Are there any good resources (books, authoritative guides, etc.) for design patterns or other best practices for software that includes financial accounting features? Specifically, where is good information about handling issues like the following: * Internal representations of money quantities * Internal representat...
[ 0.22551223635673523, 0.3557528853416443, 0.04409748688340187, 0.43895649909973145, 0.13063164055347443, -0.3374568223953247, -0.05510726943612099, 0.1960345357656479, -0.6319326758384705, -0.2430659532546997, 0.004006792791187763, 0.6726098656654358, 0.26129841804504395, -0.355185776948928...
have tried, making the topic very subjective. Martin Fowler's [Analysis Patterns](https://rads.stackoverflow.com/amzn/click/com/0201895420) covers some of those topics.
[ 0.7061084508895874, 0.09291431307792664, -0.2510150074958801, -0.08796156197786331, 0.225906103849411, -0.0013778965221717954, 0.1638014316558838, -0.37908807396888733, -0.5120798349380493, -0.010855386964976788, 0.12118561565876007, 0.2918720245361328, -0.06665372103452682, -0.12530204653...