text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Our development uses lots of open-source code and I'm trying to figure out what the best way to manage these external dependencies. Our current configuration: * we are developing for both linux and windows * We use svn for our own code * external dependencies (boost, log4cpp, etc) are not stored in svn. Instead I put...
[ 0.47734516859054565, 0.2745305597782135, 0.31432509422302246, 0.09120151400566101, 0.3345901668071747, 0.06814450770616531, 0.18365424871444702, 0.18315650522708893, 0.04137458652257919, -0.8169877529144287, 0.0008061969419941306, 0.5643892884254456, -0.09557342529296875, 0.250382900238037...
a folder in my svn repository called extern\_hacks and that is where I put the modified external code. I then link (or copy on windows) the files into the external directory structure. This solution is problematic since it is hard to keep track of copying the files, and very hard to update from svn when files are sitti...
[ 0.37061256170272827, 0.22442342340946198, 0.4804169535636902, -0.15024185180664062, -0.07535184174776077, 0.03557698428630829, 0.2610807418823242, -0.0025581964291632175, -0.2851903736591339, -0.7142921090126038, -0.05807659402489662, 0.5874642133712769, 0.034257035702466965, 0.20132760703...
them loose externally makes it very hard to go back to a previous build, or fix bugs in a previous build (especially if the bug is from a change to the external dependency) Keeping them in svn has saved me lots of headache, and also allows you to get a new workstation able to work on your codebase quickly.
[ 0.43940281867980957, 0.3186328113079071, 0.46884557604789734, 0.04852185398340225, -0.2268938571214676, -0.10139910131692886, 0.4390048086643219, 0.014744220301508904, -0.44344988465309143, -0.36006486415863037, 0.018095802515745163, 0.589478075504303, -0.10017342120409012, 0.2711910903453...
I am trying this: ``` Provider=MSDASQL.1;Persist Security Info=False;User ID=sys;Password=pwd;Initial Catalog=DATABASE;Data Source=OdbcDataSource;DBA Privilege=SYSDBA ``` But I get the error: ``` [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ``` I'm using Delphi, but answers in any language a...
[ 0.07190261036157608, 0.12209811061620712, 0.25269579887390137, 0.12247231602668762, -0.17331983149051666, -0.021909499540925026, 0.46244385838508606, 0.04828481748700142, -0.2014908343553543, -0.9665611982345581, -0.22410030663013458, 0.3788878917694092, -0.2810497581958771, 0.081812001764...
I have a poorly designed database. One of the most important tables has 11,000+ entries. We would like to expand our system, and I am wondering if this table grew to 5x its size, would this be a problem? It's 15360 kB in size... if that matters. --- I'm using phpMyAdmin, the server is a Fedora Linux box (nothing fanc...
[ 0.4054098427295685, 0.4398707151412964, 0.18232254683971405, 0.27940088510513306, 0.26545247435569763, 0.022546324878931046, 0.11766137182712555, 0.20673178136348724, -0.310604453086853, -0.7346867322921753, 0.38531115651130676, 0.32202139496803284, -0.13298241794109344, 0.4178998768329620...
should be fine with 50.000 records as well unless you have some slight performance issues already. As most people mentioned 50k records is a very small number in relation to database table size and even with not normalized database there should be no performance issues. If you are planning to expand the functionalit...
[ 0.3901805877685547, -0.07596704363822937, 0.06981309503316879, 0.6892590522766113, 0.1457536369562149, -0.26311156153678894, 0.20605112612247467, 0.05233429744839668, -0.5696494579315186, -0.46819818019866943, 0.3376626670360565, 0.29511696100234985, 0.17216801643371582, 0.1548692733049392...
Can anyone explain what this mod\_rewrite rule is doing? I'm trying to comment the file, but the code seems to state the opposite of what I think it's doing ``` # Enable rewriting of URLs RewriteEngine on # Allow specified file types to be accessed # Thing to test = URL # Condition = not starting with RewriteCond ...
[ 0.4076938331127167, -0.05304267629981041, 0.6750889420509338, -0.16377578675746918, 0.020314931869506836, -0.1450320929288864, 0.5771329998970032, -0.18812349438667297, -0.046593088656663895, -0.6418313980102539, -0.10412249714136124, 0.574961245059967, -0.42279964685440063, 0.091571584343...
``` ``` ^ = begin of line ( = begin group .* = any character, any number of times ) = end group ``` The $1 in the second part is replaced by the group in the first part. Is this a Symfony rule? The idea is to pass the whole query string to the index.php (the front controller) as a parameter, so that the front contro...
[ -0.1765011101961136, -0.03570171073079109, 0.5359728932380676, 0.016655942425131798, -0.14137260615825653, -0.09746120870113373, -0.1560305655002594, -0.10381156951189041, 0.007591055706143379, -0.1983633041381836, -0.357326477766037, 0.30432888865470886, -0.37253445386886597, 0.1470371186...
Seems like the subtraction is triggering some kind of issue and the resulting value is wrong. ``` double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d; ``` 78.75 = 787.5 \* 10.0/100d ``` double netToCompany = targetPremium.doubleValue() - tempCommission; ``` 708.75 = 787.5 - 78.75 ``` doub...
[ 0.4989643692970276, -0.15646786987781525, 0.48756125569343567, 0.11740002781152725, -0.001621235627681017, -0.1102263480424881, 0.07395582646131516, -0.26380592584609985, -0.45492929220199585, -0.23267687857151031, -0.10605958849191666, 0.6859245300292969, -0.4199477434158325, -0.025282917...
= " + premium + " - " + netToCompany); ``` This results in the following output. ``` 877.85 = 1586.6 - 708.75 ```
[ 0.31472620368003845, -0.2326977550983429, 0.6485280990600586, -0.32290148735046387, 0.20653113722801208, -0.058077648282051086, -0.10917282104492188, -0.36369121074676514, 0.1442883461713791, -0.26477134227752686, -0.33347025513648987, 1.0330172777175903, -0.33327895402908325, 0.0750115290...
Can VBA code instantiate and use .NET objects? The specific class I'm interested in is System.IO.Compression.GZipStream. **For Info** GAC is the .NET Global Assembly Cache I think Andy nailed this answer, but I'm not certain that the aspect regarding the CLR loading rules is exactly right. The .NET Assembly that hol...
[ 0.2701353430747986, 0.05404697358608246, 0.09568233042955399, 0.013864048756659031, -0.3012946546077728, -0.07068350166082382, -0.0446920283138752, -0.04703659191727638, -0.446560263633728, -0.6529088020324707, 0.07249031960964203, 0.3938608765602112, -0.22908565402030945, 0.33444780111312...
so that it can't move (since moving the assembly would invalidate the registry info), but so long as the registry points to the right place, it should be fine. A good beginner's tutorial on the subject is [here](http://richnewman.wordpress.com/2007/04/15/a-beginner%E2%80%99s-guide-to-calling-a-net-library-from-excel/)...
[ 0.36666348576545715, -0.12551189959049225, 0.31496885418891907, 0.0584954135119915, 0.1851576268672943, -0.13665567338466644, 0.22665441036224365, -0.09476329386234283, -0.30407270789146423, -0.49639084935188293, -0.32452303171157837, 0.4144703149795532, -0.14674098789691925, 0.02018321305...
What I want to do is set the focus to a specific control (specifically a `TextBox`) on a tab page when that tab page is selected. I've tried to call `Focus` during the Selected event of the containing tab control, but that isn't working. After that I tried to call focus during the `VisibleChanged` event of the control...
[ 0.08043811470270157, -0.237249955534935, 0.3296707570552826, 0.16209173202514648, -0.007112967781722546, 0.04591823369264603, -0.11684063076972961, 0.02440999448299408, -0.20265717804431915, -0.4430004358291626, -0.17252884805202484, 0.294086217880249, -0.26247459650039673, 0.2012981474399...
does make it the `ActiveControl`. I did this and it seems to work: Handle the `SelectedIndexChanged` for the `tabControl`. Check if `tabControl1.SelectedIndex` == the one I want and call `textBox.Focus();` I'm using VS 2008, BTW. --- Something like this worked: ``` private void tabControl1_selectedIndexChanged(ob...
[ -0.31401127576828003, -0.5726320147514343, 0.5663561224937439, -0.16927769780158997, -0.10572823882102966, -0.006367847323417664, 0.12316110730171204, -0.02860448509454727, -0.16778162121772766, -0.5424023270606995, -0.20080408453941345, 0.6983354687690735, -0.4052157998085022, -0.01578270...
I'm curious if anyone have any really good tutorials/articles/books for learning about stack machines in general, and the JVM in particular. I know these ones: <http://www.artima.com/insidejvm/applets/EternalMath.html> <http://www.ibm.com/developerworks/ibm/library/it-haggar_bytecode/> <http://www.theserverside.com/...
[ 0.4404161870479584, 0.3202245831489563, 0.06422224640846252, 0.13471339643001556, -0.0009929791558533907, -0.09695388376712799, 0.37666088342666626, 0.08444349467754364, -0.548477053642273, -0.23211929202079773, 0.3336183726787567, 0.3559449017047882, -0.006060498300939798, -0.217731371521...
do.
[ 0.5471833348274231, 0.23601074516773224, 0.2636502981185913, 0.40719860792160034, 0.4796382486820221, -0.4674076437950134, -0.05121469125151634, -0.11323505640029907, 0.4448205828666687, -0.6628522872924805, -0.4668425917625427, 0.2762487828731537, -0.018516361713409424, 0.1640074402093887...
Is there a way to get rid of the selection rectangle when clicking a link which does not refresh the current page entirely? Do you mean the dotted outline of a target? Try: ``` :focus { outline: 0; } ``` This would remove all focus outlines. IT's essentially the same as onclick in JavaScript terms. You might pr...
[ 0.37876853346824646, -0.3100605905056, 0.32673323154449463, -0.11346284300088882, -0.30984020233154297, -0.18298499286174774, -0.02337067574262619, 0.13832278549671173, -0.13895803689956665, -0.6105419397354126, 0.02550877444446087, 0.5164797902107239, -0.562378466129303, -0.12239782512187...
Currently, primary keys in our system are 10 digits longs, just over the limit for Java Integers. I want to avoid any maintenance problems down the road caused by numeric overflow in these keys, but at the same time I do not want to sacrifice much system performance to store infinitely large numbers that I will never n...
[ -0.06851419061422348, 0.07872893661260605, 0.2041880339384079, 0.04923210293054581, 0.05647484213113785, 0.11619406193494797, 0.11059355735778809, -0.11210744082927704, -0.4667675197124481, -0.27874690294265747, 0.13750974833965302, 0.4559246301651001, -0.005734896287322044, 0.082986533641...
for most of my PKs, and never have to worry about overflowing the sequence size? I've always gone with long keys (number(18,0) in database) because they simply remove the possibility of this situation happening in pretty much all situations (extreme data hoarding style applications aside). Having the same data-type acr...
[ 0.2682626247406006, 0.009543556720018387, 0.17775630950927734, 0.17605869472026825, -0.013661539182066917, 0.051084499806165695, 0.004867365583777428, 0.12893427908420563, -0.3874155282974243, -0.32637158036231995, 0.11092046648263931, 0.31248539686203003, -0.0009079198352992535, 0.3374905...
Like the title says, If I place an `app_offline.htm` in the application root, will it cut off currently running requests, or just new ones? Here is my lame experiment; I created an ASPX page with the following code: ```cs protected void Page_Load(object sender, EventArgs e) { Response.BufferOutput = false; Res...
[ 0.13368985056877136, 0.2959142029285431, 0.6357911229133606, -0.31906986236572266, -0.04278729110956192, 0.2332320213317871, 0.5564146637916565, -0.32560995221138, -0.5239136815071106, -0.6819218397140503, -0.3321811556816101, 0.36279362440109253, -0.5780768394470215, 0.14052903652191162, ...
browser and confirmed the application was offline. I then re-visited my "loading" request...it completed all the way to step 3. This confirms that current requests finish loading and new requests are turned away.
[ 0.03897465392947197, -0.021339036524295807, 0.8284670114517212, -0.012489191256463528, -0.09091652184724808, -0.16350866854190826, 0.7614850997924805, -0.06193287670612335, -0.20305143296718597, -0.7479706406593323, -0.1238505020737648, 0.2739514708518982, -0.09763194620609283, -0.03329676...
According to Wikipedia, on the Comparison of programming languages page, it says that F# uses CLI. Does that mean that F# is designed for the purpose of making command-line applications and not graphical applications, or is there another meaning of CLI? in .NET it's the Common Language Infrastructure. <http://en.wikip...
[ 0.15485799312591553, 0.26553741097450256, 0.08320010453462601, 0.003458730410784483, -0.10166589915752411, -0.2144409418106079, -0.1649623066186905, 0.256353497505188, -0.35013237595558167, -0.32138416171073914, -0.1032007560133934, 0.40633970499038696, -0.5451959371566772, -0.135737955570...
If yes, on which operating system, shell or whatever? Consider the following java program (I'm using java just as an example, any language would be good for this question, which is more about operation systems): ``` public class ExitCode { public static void main(String args[]) { System.exit(Integer.parse...
[ -0.12149905413389206, 0.093699611723423, 0.178033247590065, -0.49036380648612976, -0.01327083446085453, -0.014709661714732647, 0.37546125054359436, -0.49256768822669983, -0.03483698144555092, -0.17191268503665924, -0.19411136209964752, 0.3389182388782501, -0.5230311751365662, 0.20824971795...
echo $? 0 > java ExitCode 65536; echo $? 0 ``` --- EDITED: the (only, so far) answer below fully explain what happens on UNIXes. I'm still wondering about other OSes. ### Using `wait()` or `waitpid()` It is not possible on Unix and derivatives using POSIX functions like [`wait()`](http://pubs.opengroup.org/onlinep...
[ 0.03588157147169113, -0.020398514345288277, 0.06932974606752396, -0.08662501722574234, 0.27670618891716003, 0.14209884405136108, 0.33987921476364136, -0.2656645178794861, -0.13130031526088715, -0.20054353773593903, -0.16947992146015167, 0.16173839569091797, -0.23405978083610535, 0.17917376...
POSIX specification of [`sigaction()`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigaction.html) and [`<signal.h>`](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html) and [Signal Actions](https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04_03), you wi...
[ -0.31495410203933716, -0.05341024324297905, 0.6179459691047668, -0.2701077461242676, -0.1543758511543274, 0.40771907567977905, 0.12890733778476715, -0.5183238387107849, -0.23600885272026062, -0.32338619232177734, -0.36610114574432373, -0.0731976255774498, -0.37920403480529785, -0.107402801...
sa.sa_sigaction = catcher; sigemptyset(&sa.sa_mask); if (sigaction(signum, &sa, 0) != 0) { int errnum = errno; fprintf(stderr, "Failed to set signal handler (%d: %s)\n", errnum, strerror(errnum)); exit(1); } } static void prt_interrupt(FILE *fp) { if (sig_num != 0) { ...
[ -0.2509145438671112, -0.41008231043815613, 0.42720678448677063, -0.43976420164108276, 0.016794655472040176, 0.6149337887763977, 0.8326795697212219, -0.28442588448524475, -0.12430378794670105, -0.4626002907752991, -0.3783397078514099, 0.20218265056610107, -0.39457839727401733, 0.22999811172...
sig_info.si_signo, (int)sig_info.si_pid, sig_info.si_status, (int)sig_info.si_uid); sig_num = 0; } } static void five_kids(void) { const int base = 0xCC00FF40; for (int i = 0; i < 5; i++) { pid_t pid = fork(); if (pid < 0) break;
[ 0.4025961458683014, -0.31562918424606323, 0.40102478861808777, -0.1745840162038803, 0.42275941371917725, 0.17972253262996674, 0.2666751444339752, -0.17493736743927002, 0.0553089864552021, -0.4290984869003296, -0.21977394819259644, 0.3770516514778137, -0.008322141133248806, 0.42069032788276...
else if (pid == 0) { printf("PID %d - exiting with status %d (0x%.8X)\n", (int)getpid(), base + i, base + i); exit(base + i); } else
[ -0.1660069078207016, -0.20384091138839722, 0.2266540378332138, -0.3835807740688324, 0.5685285329818726, 0.3513416647911072, 0.3147720992565155, -0.20682841539382935, 0.12165068089962006, -0.545051097869873, -0.33883020281791687, 0.42194315791130066, -0.25439783930778503, 0.0103013198822736...
{ int status = 0; pid_t corpse = wait(&status); if (corpse != -1) printf("Child: %d; Corpse: %d; Status = 0x%.4X - waited\n", pid, corpse, (status & 0xFFFF)); struct timespec nap = { .tv_sec = 0, .tv_nsec = 1000000 }; // 1
[ 0.4312196671962738, -0.7388854026794434, 0.7309399843215942, -0.06897050142288208, 0.5932760238647461, 0.47717809677124023, -0.14961488544940948, 0.008500471711158752, -0.37262094020843506, -0.600379228591919, -0.28499236702919006, 0.44789284467697144, -0.21585597097873688, 0.3529022634029...
millisecond nanosleep(&nap, 0); prt_interrupt(stdout); fflush(0); } } } int main(void) { set_handler(SIGCHLD); five_kids(); } ``` When run (program `sigexit73` compiled from `sigexit73.c`), this produces output like: ``` $ sigexit73 PID 26599 - exiting with st...
[ -0.12283985316753387, -0.5048940777778625, 0.5870766639709473, 0.007988682948052883, 0.03878791257739067, 0.4099864065647125, 0.20265783369541168, -0.05071938410401344, -0.48677656054496765, -0.4158843457698822, -0.018469838425517082, 0.19617104530334473, -0.18175704777240753, 0.3926182687...
20 from PID 26600 (status 0xCC00FF41; UID 501) Child: 26601; Corpse: 26600; Status = 0x4100 - waited PID 26601 - exiting with status -872349886 (0xCC00FF42) Signal 20 from PID 26601 (status 0xCC00FF42; UID 501) Child: 26602; Corpse: 26601; Status = 0x4200 - waited PID 26602 - exiting with status -872349885 (0xCC00FF43)...
[ -0.08106186240911484, -0.2838900685310364, 0.5687612891197205, -0.21305623650550842, 0.08787854760885239, 0.5403252840042114, -0.034652236849069595, -0.6043639183044434, -0.4240049719810486, -0.6168658137321472, -0.1270780861377716, 0.12286277115345001, -0.04714576154947281, 0.240520104765...
from PID 26621 (status 0xCC00FF40; UID 501) Child: 26622; Corpse: 26621; Status = 0x4000 - waited PID 26622 - exiting with status -872349887 (0xCC00FF41) PID 26623 - exiting with status -872349886 (0xCC00FF42) Signal 20 from PID 26622 (status 0xCC00FF41; UID 501) Child: 26624; Corpse: 26623; Status = 0x4200 - waited Si...
[ -0.06878048181533813, -0.37334030866622925, 0.4781150817871094, 0.10698320716619492, 0.1245996356010437, 0.8277266621589661, 0.4764067232608795, -0.11751708388328552, -0.21729983389377594, -0.2532288730144501, -0.15545806288719177, -0.22342774271965027, 0.08168317377567291, 0.4102193117141...
This is likely to be because of timing issues between the `SIGCHLD` signals being set to the parent process. However, the key point is that 4 bytes of data can be transmitted in the `exit()` status when the code uses `sigaction()`, `SIGCHLD`, `SA_SIGINFO` to track the status. Just for the record, the testing was perf...
[ -0.1682855486869812, -0.16729964315891266, 0.4833858907222748, 0.14190874993801117, 0.3964976966381073, -0.22850468754768372, 0.6138401627540588, -0.22606261074543, -0.07715673744678497, -0.7496128678321838, -0.37462928891181946, 0.32270362973213196, -0.030132479965686798, 0.01096078753471...
We are using Hibernate 3.1 with Spring MVC 2.0. Our problem occurs when data is updated on the database directly (not in the application). We use a Filter to filter a collection of results by whether the orders are opened or closed. If we change an order on the DB to be closed, the filter returns the correct list, howe...
[ 0.14607805013656616, -0.286603718996048, 0.5582002997398376, 0.09711022675037384, -0.0648910328745842, -0.11280231177806854, 0.3819442689418793, -0.3594299256801605, -0.2529679536819458, -0.5800479054450989, -0.1704186350107193, 0.4092469811439514, -0.5278440117835999, -0.0147866141051054,...
application. The only time the object displays the correct status result is when the server is restarted--which we'd prefer not to have to do on a regular basis. The Session always has a "first-level" cache, so if you're using one Session everything you read through it is going to be cached. Hibernate will execute the...
[ 0.024217618629336357, -0.029748475179076195, 0.6760147213935852, 0.04138898849487305, 0.18022248148918152, -0.38661712408065796, 0.503585934638977, -0.020882710814476013, -0.23058724403381348, -0.8246653079986572, -0.1829880177974701, 0.49881136417388916, -0.5902010202407837, 0.07744347304...
object from the database on the next query.
[ -0.056490276008844376, 0.19255296885967255, 0.5017136335372925, 0.19193077087402344, -0.048349302262067795, -0.006389659363776445, -0.1362493634223938, 0.14587394893169403, -0.12488896399736404, -0.5339560508728027, -0.4952351450920105, 0.41569289565086365, 0.006646806839853525, 0.49599713...
I have an array `NSMutableArray` with happy objects. These objects viciously turn on (leak) me whenever I try to clear the array of all the objects and repopulate it. It's allocated in the init function like so ``` self.list = [NSMutableArray array]; ``` The different methods I have used to clear it out include: `...
[ 0.1890411227941513, 0.09033296257257462, 0.2577941417694092, -0.17436514794826508, -0.041635408997535706, -0.059943318367004395, 0.30477288365364075, -0.23110505938529968, -0.28099584579467773, -0.6417955756187439, -0.14842218160629272, 0.5583118796348572, -0.5488594174385071, 0.2624742090...
{ [list addObject:[[MyClass alloc] init]; OtherClass *anotherObject = [[OtherClass alloc] init]; [list addObject:anotherObject]; } ``` then you will leak two objects when list is deallocated. You should replace any such code with: ``` - (void)addObjectsToArray { MyClass *myObject = [[MyClass allo...
[ 0.11591987311840057, -0.10931360721588135, 0.06427709758281708, -0.1867409646511078, 0.13054388761520386, -0.25582268834114075, 0.1329641044139862, -0.3375144898891449, -0.5694615244865417, -0.5244379639625549, -0.3194407820701599, 0.3334394097328186, -0.3208204507827759, -0.08739653974771...
responsibility to relinquish ownership. If you don't, the object will never be deallocated and you'll see a leak. You don't see a leak immediately, though, because you pass the objects to the array, which also takes ownership of them. The leak will only be recognised when you remove the objects from the array or when ...
[ 0.2953069508075714, -0.15791736543178558, 0.43369773030281067, 0.25688907504081726, -0.07759478688240051, -0.4731944799423218, -0.02561243250966072, -0.48847174644470215, -0.74934321641922, 0.06325918436050415, -0.23117420077323914, 0.5036308765411377, 0.012057743035256863, 0.2846946418285...
I wrote a C# application for a client a couple of years ago, but I no longer have the source code. All I have is the EXE that I deployed on the client's PC. Is there a way I can generate C# source code from the EXE? [Reflector](http://www.red-gate.com/products/reflector/index.htm) and its add-in [FileDisassembler](http...
[ 0.44491201639175415, 0.005384195130318403, 0.6891425848007202, -0.07835355401039124, -0.007726710289716721, 0.010953834280371666, 0.12290624529123306, -0.10058887302875519, -0.007760321721434593, -0.5693421959877014, 0.12358446419239044, 0.4854463040828705, -0.23838667571544647, 0.14074592...
In my understanding of Servlet, the Servlet will be instantiated by the Container, its `init()` method will be called once, and the servlet will live like a singleton until the JVM shuts down. I do not expect my servlet to be serialized, since it will be constructed new when the app server recovers or is starts up nor...
[ -0.03360139951109886, 0.06579963117837906, 0.41069188714027405, 0.12274794280529022, -0.03919914364814758, -0.022240562364459038, 0.2718832194805145, -0.01475923415273428, -0.2607457637786865, -0.5386844873428345, -0.3776238262653351, 0.4553811252117157, -0.5022228360176086, 0.454118043184...
mysteriously fail in a production environment where a different sort of session replication will take place. Technically, I believe the servlet container is allowed to "passivate" the servlet object to disk, in a similar way that EJB session beans can be. So you're correct to ask the question if your app will fail due ...
[ 0.06826826930046082, 0.41066792607307434, 0.1827869415283203, 0.018097495660185814, 0.3332065939903259, -0.19275878369808197, 0.5983240604400635, 0.5591433644294739, -0.341268926858902, -0.37870559096336365, -0.2730511426925659, 0.2967602014541626, -0.3154143691062927, 0.3929411470890045, ...
I've got an UberJar with all my java classes, but want to execute this jar with an external persistence.xml file. Per the specification, Hibernate (or any other JPA provider) looks for the persistence.xml file in any META-INF folder that's on the classpath, but I haven't been able to make this work with an UberJar. Any...
[ 0.15586408972740173, -0.026358075439929962, 0.10121950507164001, 0.02143106609582901, -0.576583206653595, -0.12765339016914368, 0.5538674592971802, 0.29321083426475525, 0.18607887625694275, -0.763945460319519, 0.24046951532363892, 0.5359417796134949, -0.47050392627716064, 0.061342786997556...
the direct answer is no. You could write your own bootstrap class that uses the usual java classpath (including your persistence.xml) and then bootstrap the UberJar, although you are probably using UberJar to avoid this...
[ 0.19345077872276306, -0.22074341773986816, 0.247453510761261, 0.3205083906650543, -0.19649624824523926, -0.13633331656455994, 0.3723374009132385, 0.015871742740273476, 0.1524798721075058, -0.5727660655975342, 0.015187736600637436, 0.37225380539894104, -0.4907803535461426, -0.22814236581325...
I am writing code for a search results page that needs to highlight search terms. The terms happen to occur within table cells (the app is iterating through GridView Row Cells), and these table cells may have HTML. Currently, my code looks like this (relevant hunks shown below): ``` const string highlightPattern = @"...
[ 0.1331794410943985, 0.3074479401111603, 0.8503027558326721, -0.31266146898269653, -0.0833495706319809, 0.2639177739620209, 0.35019993782043457, -0.47602516412734985, -0.012827146798372269, -0.6421627998352051, 0.01750335656106472, 0.49385327100753784, -0.22089757025241852, -0.0802935808897...
is HTML that looks like this: ``` <span class="CustomerName">Fred</span> was a classy individual. ``` And if you search for "class" I want the highlight code to wrap the "class" in "classy" but of course not the HTML attribute "class" that happens to be in there! If you search for "Fred", that should be highlighted....
[ 0.19867748022079468, 0.07717914879322052, 0.22336550056934357, 0.0320357084274292, -0.4277369976043701, -0.5400844812393188, 0.2182455062866211, 0.0970396101474762, -0.37130144238471985, -0.5741288065910339, -0.030951466411352158, 0.5446534752845764, -0.48814520239830017, -0.13093653321266...
It checks that it is impossible to match the regex `<[^>]*` going backward starting from a matching string. Modified code below: ``` const string notInsideBracketsRegex = @"(?<!<[^>]*)"; const string highlightPattern = @"<span class=""Highlight"">$0</span>"; DataBoundLiteralControl litCustomerComments = (DataBoundLit...
[ -0.27959755063056946, -0.04943064972758293, 0.8369412422180176, -0.0433550663292408, 0.18798881769180298, -0.05258968845009804, 0.2560739517211914, -0.5550459027290344, -0.132896289229393, -0.41136714816093445, -0.2519828677177429, 0.5386967062950134, -0.14443419873714447, 0.05262564495205...
I have a multi-timezone web application that stores all of the datetime values in UTC in the database, when actions happen on the server, I can easily convert the time into UTC. However, when a client enters a time or time span, what is the best way to detect and store it? I am currently doing the following: 1. Get ...
[ 0.4437723159790039, -0.08800787478685379, 0.5120318531990051, 0.01533079519867897, 0.25293445587158203, -0.05188558250665665, 0.2478029727935791, -0.013642904348671436, -0.19633054733276367, -0.7325497269630432, 0.047345440834760666, 0.45028114318847656, -0.17750079929828644, 0.08999380469...
in-elegant solution. Does anyone have a better method? I was doing something very similar, but I now think I prefer to use *javascript* to convert all times to local on the client-side. The server will give all times in UTC in the generated page, and the *javascript* will convert it once the page loads. This eliminate...
[ -0.37728679180145264, -0.2584365904331207, 0.4805013835430145, -0.06509946286678314, -0.26627013087272644, 0.053795017302036285, 0.15001070499420166, -0.049201127141714096, -0.10311266034841537, -0.9983673095703125, -0.07891228049993515, 0.4081668555736542, -0.05302365869283676, -0.0128366...
field to make this easy to process with *jquery*. The only problems I see with this method is that: a) I don't have a really good date/time formatting routine yet in *javascript*, and b) if the user has *javascript* turned off, then it doesn't work.
[ 0.3538084626197815, -0.09523832052946091, 0.21898943185806274, -0.14703121781349182, -0.1346738040447235, -0.42008593678474426, 0.26060009002685547, 0.2413855642080307, 0.0007830364047549665, -0.4046335518360138, 0.15723638236522675, 0.6998635530471802, -0.16476674377918243, -0.06161370128...
Basically, I'm trying to selectively copy a table from one database to another. I have two different [Oracle] databases (e.g., running on different hosts) with the same schema. I'm interested in a efficient way to load Table A in DB1 with the result of running a select on Table A in DB2. I'm using JDBC, if that's relev...
[ 0.27134472131729126, 0.12032835930585861, 0.09895714372396469, -0.0551665797829628, -0.2061072587966919, -0.01816810853779316, -0.12202081084251404, -0.08309575170278549, -0.14624600112438202, -0.7774971127510071, 0.030161209404468536, 0.334150105714798, -0.5071977972984314, 0.519880890846...
I've been recently asked to learn some MATLAB basics for a class. What does make it so cool for researchers and people that works in university? I saw it's cool to work with matrices and plotting things... (things that can be done easily in Python using some libraries). Writing a function or parsing a file is just pa...
[ 0.12208426743745804, -0.09772556275129318, 0.11918849498033524, 0.18965904414653778, -0.22526311874389648, -0.4749053716659546, 0.10837903618812561, 0.19173504412174225, -0.2188960313796997, -0.6304861307144165, 0.14654695987701416, 0.6396541595458984, 0.011204486712813377, -0.384435385465...
to know the most is "Am I missing something?" :D **UPDATE 2:** Thank you for your answers. My question is not about buy or not to buy MATLAB. The university has the possibility to give me a copy of an old version of MATLAB (MATLAB 5 I guess) for free, without breaking the license. I'm interested in its capabilities an...
[ 0.5678539276123047, -0.13545161485671997, -0.10062480717897415, 0.2807328999042511, -0.038794100284576416, -0.15815025568008423, -0.08323369920253754, 0.38799792528152466, -0.4238572418689728, -0.08285138010978699, -0.12848393619060516, 0.3231341540813446, 0.4082197844982147, 0.09312967956...
partially right. Many, if not most, mathematicians will never touch it. If there is a computer tool used at all, it's going to be something like [Mathematica](http://en.wikipedia.org/wiki/Mathematica) or [Maple](http://en.wikipedia.org/wiki/Maple_(software)). Engineering departments, on the other hand, often rely on it...
[ 0.30364593863487244, -0.1796911060810089, 0.007876291871070862, 0.2739509642124176, -0.5328623652458191, -0.2874724864959717, -0.21079382300376892, 0.3778310716152191, -0.22488194704055786, -0.29170721769332886, 0.1355505734682083, 0.3139277696609497, -0.15203404426574707, 0.20443937182426...
has grown very organically, and there are some flaws that are very much baked in, if you look at it just as a programming language. However, if you look at it as an environment for doing certain types of research in, it has some real strengths. It's about as good as it gets for doing floating point linear algebra. The...
[ 0.254081666469574, 0.06012333929538727, 0.3344738483428955, 0.12307057529687881, 0.16672436892986298, -0.2825654447078705, -0.5326284766197205, 0.2824234962463379, -0.3196830451488495, -0.5651730298995972, 0.037367478013038635, 0.12652362883090973, 0.3348405957221985, 0.17244192957878113, ...
community of users that share numerical codes (Python + [NumPy](http://en.wikipedia.org/wiki/NumPy) has nothing in the same league, at least yet) Python, warts and all, is a much better programming language (as are many others). However, it's a decade or so behind in terms of the tools. The key point is that the majo...
[ 0.030769119039177895, -0.1258580982685089, 0.07458484172821045, 0.28416404128074646, -0.38138043880462646, -0.09709321707487106, 0.14542149007320404, 0.37482744455337524, -0.2332221120595932, -0.717448353767395, 0.2735709846019745, 0.42973771691322327, 0.045190755277872086, -0.042688045650...
hand, for the things it is good at, it is very very good. Very few things compare. There's a company with reasonable support and who knows how many man-years put into it. This can matter in industry. Strictly looking at your Python vs. MATLAB comparison, they are mostly different tools for different jobs. In the areas...
[ -0.33769577741622925, -0.25832563638687134, -0.256050169467926, -0.2153058499097824, -0.31314682960510254, 0.20480599999427795, -0.24513457715511322, 0.17548193037509918, -0.14643260836601257, -0.5727794170379639, 0.3488284647464752, 0.6507411003112793, 0.49015143513679504, -0.188922256231...
I am in the start up of a project using ASP.NET MVC and have started creating my models. Since I know *some* Ruby On Rails and would like to use a system as similar to Rails **Active Record** as possible. Have anyone used **Castle Projects Active Record** in a ASP.NET MVC application (or any application that is releva...
[ 0.32185328006744385, 0.006411035545170307, 0.2528485357761383, -0.0608610063791275, 0.017802266404032707, -0.23090071976184845, 0.3079564571380615, 0.12600165605545044, -0.5709469318389893, -0.6044645309448242, 0.08583094924688339, 0.44987279176712036, 0.0596977174282074, 0.079921059310436...
background but have looked a little at Rails and love how easy you can create the ORM I have used Castle Active Record with ASP.NET MVC. I highly encourage this model, as ActiveRecord/NHibernate are much more mature that LINQ to SQL or the Entity Framework. I think that ASP.NET MVC has a bright future and would recomm...
[ 0.13323286175727844, -0.06949105113744736, 0.49237093329429626, 0.008672055788338184, -0.02089346945285797, -0.3143935203552246, -0.001721491338685155, 0.19042930006980896, -0.24920080602169037, -0.5641066431999207, 0.19354888796806335, 0.6462686657905579, -0.09818542003631592, -0.05043950...
We have a database library in C# that we can use like this: ``` DatabaseConnection conn = DatabaseConnection.FromConnectionString("..."); ``` This library hides many of the differences between different database engines, like SQL function names, parameter names and specifications, etc. Internally, the `DatabaseConn...
[ 0.11718183755874634, 0.05622769892215729, 0.20075854659080505, 0.21541067957878113, 0.04413791373372078, -0.37034597992897034, -0.12471449375152588, -0.041745252907276154, 0.10399816185235977, -0.49521690607070923, 0.051785435527563095, 0.6256094574928284, -0.41807085275650024, 0.414077430...
contains information about what kind of database engine and version this connection is for. I'd like to create a similar library in Python. Is the right approach to make something that can be constructed like this? ``` conn = DatabaseConnection("...") ``` or using a class method? ``` conn = DatabaseConnection.From...
[ 0.07951901108026505, 0.04980190470814705, 0.02125639282166958, 0.020417287945747375, -0.04826516658067703, -0.4307394325733185, -0.11319909989833832, 0.18115182220935822, -0.08876468986272812, -0.6232587099075317, 0.059847090393304825, 0.48863649368286133, -0.5229148268699646, 0.1537355333...
specialize in derived classes, and have a method or function somewhere that based on the connection string constructs and returns the right type of object. This is possible in Python, but is probably not the best way to do it. The class factory pattern is essentially a workaround for languages that don't have first cla...
[ 0.36012545228004456, -0.08226921409368515, -0.12504880130290985, -0.15610410273075104, -0.3171878159046173, -0.23217444121837616, 0.32033029198646545, -0.13930562138557434, -0.20316557586193085, -0.7069812417030334, -0.044251441955566406, 0.6678794622421265, -0.5333281755447388, 0.00864234...
"hi" class class2: def greet(self): print "hello" maker = class1 obj1 = maker() maker = class2 obj2 = maker() obj1.greet() # prints "hi" obj2.greet() # prints "hello" ```
[ -0.17734162509441376, 0.19489124417304993, 0.5137091279029846, -0.19578148424625397, -0.23614099621772766, 0.2865650951862335, 0.25705933570861816, -0.5905694365501404, -0.05021238699555397, -0.5137871503829956, -0.12432032078504562, 0.14553634822368622, -0.5220836997032166, 0.223995372653...
Wanted to see peoples thoughts on best way to organize directory and project structure on a project / solution for a winforms C# app. Most people agree its best to seperate view, business logic, data objects, interfaces but wanted to see how different people tackle this. In addition, isolate third party dependencies ...
[ 0.03556684032082558, 0.1312592476606369, 0.5525776743888855, 0.13794200122356415, -0.027766795828938484, 0.36015936732292175, -0.20432136952877045, -0.2789934277534485, -0.36465901136398315, -0.6732684969902039, 0.0016577023779973388, 0.2935696542263031, -0.5029451847076416, -0.08067863434...
---Impl/Product Foo ---Impl/Foo ---Interfaces/IFoo All trying to push for decoupled dependencies on abstractions and quick ability to changed implementations. Thoughts? Best practices? For me it depends on the model I'm following. If I'm using MVC it would be ``` Project -Models -Controllers -Views ``` O...
[ -0.14371010661125183, 0.19851092994213104, 0.492792546749115, -0.01233141403645277, -0.18658535182476044, 0.2502223551273346, -0.04558068513870239, 0.07731369137763977, -0.2199205756187439, -0.9486736059188843, 0.005504536908119917, 0.4917934238910675, -0.2519955635070801, 0.20515176653862...
I would like a code sample for a function that takes a tDateTime and an integer as input and sets the system time using setlocaltime after advancing that tDateTime by (int) months. The time should stay the same. pseudo code example ``` SetNewTime(NOW,2); ``` The issues I'm running into are rather frustrating. I can...
[ 0.1431298404932022, -0.24947911500930786, 0.6063405275344849, -0.1468328982591629, -0.049997199326753616, -0.0959874838590622, 0.2587631940841675, -0.5399784445762634, 0.021353360265493393, -0.5284584760665894, 0.12309718132019043, 0.6982337832450867, -0.45950302481651306, -0.0530496351420...
DateTimeToSystemTime(settotime,SystemTime); SetLocalTime(SystemTime); //tell windows that the time changed PostMessage(HWND_BROADCAST,WM_TIMECHANGE,0,0); end; begin try SetLocalSystemTime(IncMonth(Now,1)); except on E:Exception do Writeln(E.Classname, ': ', E.Message); end; end. ```
[ -0.06128914654254913, -0.5710286498069763, 0.6890170574188232, -0.052429649978876114, 0.6227443218231201, -0.10221012681722641, 0.21073198318481445, 0.15962132811546326, -0.16281069815158844, -0.6679944396018982, -0.3940848410129547, 0.4861852526664734, -0.2973662316799164, 0.2269652038812...
How would you configure/handle extraneous/optional URLs entities (aliases, maybe)? SO is a good example: * stackoverflow.com/questions/99999999/ * stackoverflow.com/questions/99999999/**question-goes-here** (bad example, but I couldn't think of better) Amazon URLs are even more confusing (e.g., the [Kindle](https://...
[ -0.10447661578655243, -0.18823392689228058, 0.25099363923072815, 0.16468408703804016, -0.24009935557842255, -0.18798068165779114, 0.34651869535446167, -0.29542624950408936, -0.3606158196926117, -0.5126867294311523, -0.25224998593330383, 0.5019700527191162, -0.20733654499053955, 0.009831491...
I've written a simple multi-threaded game server in python that creates a new thread for each client connection. I'm finding that every now and then, the server will crash because of a broken-pipe/SIGPIPE error. I'm pretty sure it is happening when the program tries to send a response back to a client that is no longer...
[ 0.08113579452037811, 0.25063425302505493, 0.2855193316936493, 0.05348163843154907, -0.10427726805210114, -0.01149823423475027, 0.25294947624206543, -0.07845094054937363, -0.4566626250743866, -0.40236085653305054, 0.10347249358892441, 0.262645959854126, -0.21582113206386566, 0.2891496121883...
solve it? Read up on the try: statement. ``` try: # do something except socket.error, e: # A socket error except IOError, e: if e.errno == errno.EPIPE: # EPIPE error else: # Other error ```
[ -0.6434198021888733, 0.1442040205001831, 0.15006394684314728, 0.0949547067284584, 0.35114917159080505, 0.4320819079875946, 0.366682767868042, -0.18686819076538086, -0.1371186077594757, -0.4780934751033783, -0.32223713397979736, 0.48466038703918457, -0.5703622102737427, -0.5739940404891968,...
Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++? ``` MyObject object; // ok - default ctor MyObject object(blah); // ok MyObject object(); // error ``` I seem to type "()" automatically everytime. Is there a good reason this isn'...
[ 0.1761317402124405, 0.07583224773406982, 0.3214927911758423, -0.2972661554813385, -0.14971619844436646, -0.2831180691719055, 0.2167394608259201, -0.17721626162528992, -0.1478351354598999, -0.308427095413208, -0.37172171473503113, 0.6454955339431763, -0.5764309167861938, 0.11878973245620728...
function with 2 parameters. The workaround is to add another pair of parentheses: ``` std::vector<T> v((std::istream_iterator<T>(ifs)), std::istream_iterator<T>()); ``` Or, if you have C++11 and list-initialization (also known as uniform initialization) available: ``` std::vector<T> v{std::istream_iterator<T>{ifs}...
[ -0.13588213920593262, -0.37725162506103516, 0.47626063227653503, -0.22240659594535828, -0.2105904519557953, 0.15641412138938904, -0.07466916739940643, -0.41144686937332153, -0.10293716937303543, -0.30475786328315735, -0.31911495327949524, 0.8440319299697876, -0.5663432478904724, -0.0846832...
We are making a Ruby On Rails webapp where every customer gets their own database. The database needs to be created after they fill out a form on our website. We have a template database that has all of the tables and columns that we need to copy. How can I do this in programatically from ruby on rails? From any co...
[ 0.5870200991630554, 0.231297105550766, 0.1263107806444168, 0.00801125168800354, -0.022320982068777084, -0.10953254997730255, 0.08732873946428299, -0.03697581589221954, -0.25009018182754517, -0.6426081657409668, 0.21191397309303284, 0.464138388633728, -0.38522884249687195, 0.280794382095336...
#connect to template database to copy. Note that this will override any previous #connections for all Models that inherit from ActiveRecord::Base ActiveRecord::Base.establish_connection({:adapter => "mysql", :database => template_name, :host => "olddev", :username => "root", :password => "passw...
[ 0.021592864766716957, -0.1519051045179367, 0.57062828540802, 0.08895757049322128, 0.1075214147567749, -0.12520691752433777, 0.10464536398649216, -0.35677096247673035, -0.329294353723526, -0.8631120920181274, -0.14141924679279327, 0.25497564673423767, -0.6492701768875122, 0.5175328254699707...
= sql_connection.select_all("Show Tables") #the results are an array of hashes, ie: # [{"table_from_customerdb1" => "customers"},{"table_from_customerdb1" => "employees},...] table_names = Array.new tables.each { |hash| hash.each_value { |name| table_names << name }} table_names...
[ -0.33539772033691406, 0.051158081740140915, 0.5403426289558411, -0.17578749358654022, 0.15088795125484467, 0.12348295003175735, -0.13476698100566864, -0.560919463634491, -0.3771515190601349, -0.3100154995918274, -0.39380714297294617, 0.3687211275100708, -0.30209195613861084, 0.354368805885...
* FROM #{template_name}.#{name}") } #This statement is optional. It connects ActiveRecord to the new database ActiveRecord::Base.establish_connection({:adapter => "mysql", :database => new_name, :host => "olddev", :username => "root", :password => "password" }) end ``` Note that I...
[ 0.14641325175762177, -0.23136010766029358, 0.6562026739120483, -0.1552138328552246, 0.12010915577411652, -0.32505205273628235, 0.3659723699092865, -0.16749462485313416, -0.11481083184480667, -0.6679430603981018, -0.10509645938873291, 0.4792514443397522, -0.3344271183013916, 0.3290027976036...
How do you think, is it a good idea to have such an enum: ``` enum AvailableSpace { Percent10, Percent20, SqF500, SqF600 } ``` The question is about the semantics of the values names, i.e. both percentage and square feet. I really believe that it's not a good idea, but I could not find and guidelines, et...
[ 0.1955600380897522, 0.25579264760017395, 0.377056747674942, 0.21230164170265198, 0.08719706535339355, 0.0809999480843544, -0.09827259182929993, -0.4329335391521454, -0.17936939001083374, -0.5847038626670837, -0.11799304187297821, 0.008665800094604492, 0.18454448878765106, 0.370281964540481...
it), we have the option to convert internally, so we either have only percentage, or square feet, or both. The argument is, that "both" is not a good idea. The above is an example of course, but the real problem is that some data providers send us totals (sq.f.), and others percentage, and my goal is to unify the UI. ...
[ 0.4698994755744934, 0.09625120460987091, 0.43863776326179504, 0.3313584625720978, 0.12318173795938492, 0.07452800124883652, -0.12072831392288208, -0.3106779456138611, -0.18672746419906616, -0.48098957538604736, -0.07478954643011093, 0.30614331364631653, 0.2626981735229492, 0.00415279483422...
a good idea to put percentage in an (potential) int enum. **The answer**: No, it is not a good idea to use enums for representing values. Especially values in two semantically distinct scales. You should not use enums for values. **The reason**: What's the relation between the enum values from the two scales, like Per...
[ 0.19250552356243134, -0.25384753942489624, -0.05080072209239006, 0.2542308270931244, -0.19476068019866943, 0.38690993189811707, 0.07761961221694946, -0.3483206033706665, 0.0050693415105342865, -0.7371253967285156, 0.12254220992326736, 0.3817855417728424, 0.1799725443124771, -0.061181835830...
be better reflected by a struct that contains two fields - one for absolute area and one for percentage available of that absolute area. With such structure you can represent anything you can represent with the enums above. For example, data providers that give you absolute area, are represented with a struct with the ...
[ 0.06284552067518234, -0.520595133304596, 0.6105974316596985, 0.23592543601989746, 0.03850523754954338, 0.0695113092660904, -0.17153236269950867, -0.07732639461755753, -0.2236243486404419, -0.7377856969833374, -0.4229346513748169, 0.37419450283050537, 0.10712794214487076, 0.1009856238961219...
of the data from both type of providers and you can add couple of operators to enable comparison and arithmetic calculations with instances.
[ 0.48915135860443115, 0.07834691554307938, 0.09244702011346817, 0.511798083782196, 0.20072899758815765, 0.045399103313684464, -0.13575243949890137, -0.09449251741170883, -0.3258609175682068, -0.6498433947563171, 0.08156608790159225, 0.5803314447402954, -0.07752882689237595, -0.0364101193845...
I have a memory of talking to people who have got so far in using Ruby on Rails and then had to abandon it when they have hit limits, or found it was ultimately too rigid. I forget the details but it may have had to do with using more than one database. So what I'd like is to know is what features/requirements fall ou...
[ 0.3790759742259979, 0.1544642299413681, -0.1309909224510193, 0.07777823507785797, -0.18461863696575165, -0.19830945134162903, 0.29563120007514954, 0.11169487237930298, -0.08989492803812027, -0.5249987244606018, 0.1259268820285797, 0.5698004961013794, -0.17690467834472656, 0.072577700018882...
itself) is proud to be "Opinionated Software". What this means in practice is that the authors of rails have a certain target audience in mind (themselves basically) and aim rails specifically at that. If X feature isn't needed for that target audience, it doesn't get added. Off the top of my head, things that rails ...
[ 0.386668860912323, -0.02037496119737625, 0.2625827193260193, 0.08383919298648834, -0.22157981991767883, -0.35152360796928406, 0.2893812358379364, -0.1563255786895752, 0.02492261305451393, -0.5233654975891113, -0.0020217280834913254, 0.4294242262840271, -0.35126927495002747, 0.0284738000482...
all of the above functionality to rails, and a lot more, so I wouldn't really count these as limits. The only other caveat is that rails is *built* around the idea of creating CRUD web applications using MVC. If you're trying to do something which is NOT a CRUD web app (like twitter, which is actually a messaging syst...
[ 0.7228310704231262, 0.0020741508342325687, 0.026265079155564308, 0.6352534294128418, -0.2488187551498413, -0.05548271909356117, 0.028097335249185562, 0.14095836877822876, -0.40450990200042725, -0.479592502117157, 0.4887630045413971, 0.3862799108028412, -0.31306350231170654, -0.154620632529...
likelihood, the problems you will run into that can't just be fixed with a quick plugin or a day or 2 of coding are all inherent problems with the underlying C Ruby runtime (memory leaks, green threads, crap performance, etc).
[ 0.42918384075164795, 0.29408323764801025, -0.05055622756481171, 0.2083095908164978, 0.03900007903575897, -0.11307135224342346, 0.438854843378067, 0.05383402481675148, -0.14427606761455536, -0.47783011198043823, -0.19760620594024658, 0.6586160659790039, -0.3507174253463745, -0.0857109278440...
I have a number of child tables that have a foreign key to a parent table. How do I add an entry in the parent table and get the primary key of that entry, so that I can then enter rows in the child tables that point to the entry in the parent table? I'm doing this in a MS Access Database from a C# application. Micro...
[ 0.08634358644485474, 0.205403134226799, 0.27473655343055725, 0.046510133892297745, 0.20656825602054596, -0.0011942852288484573, 0.13450001180171967, -0.06393131613731384, -0.26331281661987305, -0.4929678440093994, -0.08222530037164688, 0.476184219121933, -0.05433454364538193, 0.16728304326...
So lets say I have a dataset based on: ``` SELECT TopicLink.*, Topic.Name AS FromTopicName, Topic_1.Name AS ToTopicName FROM TopicLink INNER JOIN Topic ON TopicLink.FromTopicId = Topic.TopicId INNER JOIN Topic AS Topic_1 ON TopicLink.ToTopicId = Topic_1.TopicId ...
[ -0.37407079339027405, 0.09530429542064667, 0.5359686017036438, 0.0016299182316288352, -0.26561054587364197, -0.055551521480083466, -0.03500024601817131, -0.042615581303834915, -0.33116430044174194, -0.6859830021858215, -0.04403315484523773, 0.2605932354927063, -0.33331099152565, 0.19608986...
and the invoke Save() on the recordset and it would make it back into the database. Is this functionality in no way possible anymore in ADO.Net, presumably with a CommandBuilder? Or is there a workaround? (Yes I know I could "simply" write a stored procedure...but I am looking for a quick and easy solution, basically ...
[ 0.3594668209552765, 0.2211092859506607, 0.1518058329820633, -0.04976398125290871, 0.09614994376897812, -0.2399148792028427, 0.18346993625164032, -0.10102447867393494, -0.2288694977760315, -0.4860817492008209, 0.16848859190940857, 0.5429985523223877, -0.31576335430145264, 0.2223774343729019...
want to manually write the INSERT, UPDATE, and DELETE statements. I think you can achive this by providing your own update command for the ADO.net DataAdaptor. Check out the sample provided [here](http://www.ondotnet.com/pub/a/dotnet/excerpt/progvisbasic_ch08-2/index.html?page=4).
[ 0.2469826638698578, -0.07617924362421036, 0.2577107548713684, 0.04948718100786209, 0.09599977731704712, -0.15513132512569427, 0.2582935690879822, -0.0008813884342089295, -0.20066134631633759, -0.5002200603485107, 0.004784927703440189, 0.5144259333610535, -0.39559993147850037, -0.1979928612...
In our program, each customer gets their own database. We e-mail them a link that connects them to their database. The link contains a GUID that lets the program know which database to connect to. How do I dynamically and programatically connect ActiveRecord to the right db? You can also do this easily without hardcod...
[ 0.32370302081108093, 0.13561296463012695, 0.5867690443992615, -0.039784323424100876, 0.15805597603321075, -0.053948137909173965, -0.13883359730243683, -0.2528277635574341, -0.2262149453163147, -0.8094545006752014, -0.09819778054952621, 0.5668611526489258, -0.24880582094192505, 0.2721380889...
I'm a pretty experienced Java programmer that's been doing quite a bit of Win32 stuff in the last couple of years. Mainly I've been using VB6, but I really need to move to something better. I've spent a month or so playing with Delphi 2009. I like the VCL GUI stuff, Delphi seems more suited to Windows API calls than V...
[ 0.12452365458011627, 0.10898495465517044, 0.2344537079334259, -0.18440209329128265, -0.24860955774784088, -0.22549419105052948, 0.2116786390542984, 0.2541898190975189, -0.22361618280410767, -0.646122395992279, 0.11478030681610107, 0.7389894723892212, -0.028859887272119522, 0.09308014065027...
to free every object manually or use interfaces for everything seems to have a pretty big impact on the way that you can do things effectively in an object oriented way. Also I'm not particularly keen on the syntax, or the fact that you have to declare variables all at the top of a method. I can handle Delphi, but I'm...
[ 0.07645747065544128, -0.08408389985561371, 0.08572482317686081, 0.06829677522182465, -0.4174664318561554, -0.24762746691703796, 0.34612300992012024, 0.053933482617139816, -0.3822701573371887, -0.47132986783981323, -0.06593775749206543, 0.6414180397987366, -0.29836490750312805, -0.067712038...
I suspect it's only necessary to know a subset of it to get things done productively... I have heard that the C++ of today is a lot more productive to program in than the C++ of 10 years ago. I'll be doing new development only so I wouldn't need to master every aspect of the C++ language - if I can find an equivalent...
[ 0.20458082854747772, 0.22604553401470184, -0.021125664934515953, 0.04354941099882126, 0.03545176982879639, -0.16865074634552002, 0.3365928530693054, 0.1268599033355713, -0.24319569766521454, -0.6308939456939697, 0.2099776268005371, 0.7093467712402344, -0.013853482902050018, -0.273956030607...
set me straight!) So, for a Java programmer that's new to both Delphi and C++ Builder, which would you consider to be a better choice for productive development of Win32 exes and dlls, and why? What do you see to be the pros and cons of each? Delphi or C++ Builder - it's a difficult choice! As you're aware, they're b...
[ 0.8512531518936157, 0.23718146979808807, 0.03621872887015343, 0.23288965225219727, -0.26398295164108276, -0.2540772259235382, 0.04183831438422203, -0.30265986919403076, 0.015737665817141533, -0.2155940681695938, 0.15314556658267975, 0.6842105388641357, -0.1052175834774971, 0.27236229181289...
development. **Delphi:** * FOR: Large, active, enthusiastic community * FOR: Delphi 2009 is the best version for many years * FOR: Delphi "units" make C source/header file pairs seem archaic * AGAINST: No automatic destruction as objects leave scope, hence lots of 'finally's in your code * AGAINST: Language can be 'w...
[ -0.3312314450740814, -0.1577388495206833, 0.3044629991054535, -0.05973753705620766, -0.46599137783050537, -0.0693134292960167, 0.3484124541282654, -0.022815659642219543, -0.35985925793647766, -0.79653000831604, -0.16871915757656097, 0.43251773715019226, 0.06744794547557831, -0.356148153543...
bugs with them. * FOR: Support for BOOST and other modern template-based libraries (even though the Boost support is not 100%) * FOR: Great interop with Delphi means most Delphi components can easily be used. * FOR: Easy to use with third-part DLLs/libraries with C/C++ headers. * FOR: C++ may look better on a CV than D...
[ 0.11360678821802139, 0.24181675910949707, 0.19873814284801483, -0.08318404108285904, -0.2504807114601135, -0.15242114663124084, 0.3733660578727722, -0.1275869607925415, -0.17134860157966614, -0.23580485582351685, -0.014849703758955002, 0.20733648538589478, -0.44718942046165466, -0.19163683...
resurrected after major efforts from the community. (However, Codegear/Embarcadero commitment does seem impressive) * AGAINST: C++Builder is not top of the pile within Codegear. * AGAINST: Third-party component vendors don't always understand/support C++Builder That's about it. Just to state my position, I'm a happy B...
[ 0.4508007764816284, 0.011914161965250969, 0.20853526890277863, -0.3662991523742676, -0.5631439685821533, -0.1093912422657013, 0.5224103331565857, -0.07861681282520294, -0.3136512041091919, -0.5916210412979126, -0.1286662518978119, 0.5992196202278137, 0.002680378034710884, -0.07781918346881...
I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition. How about these examples: 1. `int* test;` 2. `int *test;` 3. `int * test;` 4. `int* test,test2;` 5. `int *test,test2;` 6. `int * test,test2;` Now, to my...
[ 0.2873927354812622, 0.20540520548820496, -0.12640616297721863, -0.19989782571792603, -0.2049412876367569, -0.016881098970770836, 0.30028456449508667, -0.16759829223155975, 0.07410917431116104, -0.5868297815322876, -0.1619468331336975, 0.4409596025943756, -0.2829625606536865, -0.19065418839...
is a "real" int. What about case 6? Same as case 5? 4, 5, and 6 are the same thing, only *test* is a pointer. If you want two pointers, you should use: ``` int *test, *test2; ``` Or, even better (to make everything clear): ``` int* test; int* test2; ```
[ 0.25205862522125244, -0.017056718468666077, 0.039527151733636856, -0.18064343929290771, -0.17816439270973206, 0.15709970891475677, 0.30181384086608887, -0.08710037171840668, -0.023336082696914673, -0.5295484066009521, -0.017279447987675667, 0.40699344873428345, -0.2675077021121979, -0.1325...
Classes that use other classes (as members, or as arguments to methods) need instances that behave properly for unit test. If you have these classes available and they introduce no additional dependencies, isn't it better to use the real thing instead of a mock? I say use real classes whenever you can. I'm a big belie...
[ 0.40835869312286377, 0.01883077248930931, -0.423823744058609, 0.31079062819480896, -0.29260706901550293, 0.12711124122142792, 0.5645513534545898, 0.025235114619135857, 0.17391081154346466, -0.6251857280731201, 0.12890149652957916, 0.6253376007080078, 0.017019856721162796, 0.125255495309829...