text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
For some reason after I installed Boot Camp, my os x terminal started to point to the Boot Camp drive instead of my os x home directory by default! Once in the terminal I know how to switch back an forth and am able to do that, but I was wondering how to make my terminal default back to my os x home folder? I've check...
[ 0.2701336443424225, 0.14888791739940643, 0.3744041323661804, -0.000292256532702595, 0.10328367352485657, 0.07330912351608276, 0.26864248514175415, 0.20251844823360443, -0.2571437656879425, -0.6719977855682373, 0.10781331360340118, 0.677344560623169, -0.12526866793632507, 0.2591709494590759...
line: <https://superuser.com/questions/154193/setting-a-users-home-directory-on-mac-os-x-server-from-the-command-line> Basically, use the **dscl** command line tool to see what the system thinks your home directory is set to, or to try and reset it....
[ 0.07935856282711029, 0.006625482812523842, 0.5772179365158081, -0.03523102402687073, 0.19002710282802582, -0.3786311149597168, 0.11523979157209396, 0.1645592898130417, -0.08479684591293335, -0.700215220451355, -0.3419789969921112, 0.5995739698410034, -0.2596604824066162, -0.019248304888606...
I know how to lighten the colors for certain commands, however I'd like to lighten the standard ansi colors across all commands. I found instructions for doing it for Xterm and aterm here: <http://gentoo-wiki.com/TIP_Linux_Colors_in_Aterm/rxvt> From those I was able to get brighter colors by adding: ``` rxvt*backgro...
[ 0.17442536354064941, -0.07648826390504837, 0.591486930847168, -0.17969650030136108, 0.025555269792675972, 0.17271743714809418, 0.21566055715084076, -0.178678959608078, -0.20013932883739471, -0.7694716453552246, -0.028606221079826355, 0.8517411947250366, -0.2089756727218628, -0.274419546127...
#cf6171 rxvt*color10: #c5f779 rxvt*color11: #fff796 rxvt*color12: #4186be rxvt*color13: #cf9ebe rxvt*color14: #71bebe rxvt*color15: #ffffff ``` to the bottom of my `~/.Xdefaults` file
[ 0.10342198610305786, 0.1742820143699646, 0.2555028796195984, -0.20596376061439514, 0.11537434905767441, 0.33272427320480347, 0.14207574725151062, -0.2520836889743805, -0.6124048829078674, -0.6477013230323792, -0.34899866580963135, 0.3580808937549591, -0.45025771856307983, -0.07113625854253...
1. What is the most efficient way to check if an array is **a flat array of primitive values** or if it is a **multidimensional array**? 2. Is there any way to do this without actually looping through an array and running `is_array()` on each of its elements? The short answer is no you can't do it without at least loop...
[ 0.30716386437416077, -0.05105837062001228, -0.13902197778224945, 0.21822868287563324, -0.2577487528324127, -0.032822705805301666, 0.3314514458179474, -0.34269437193870544, -0.19620192050933838, -0.4166228771209717, 0.16026689112186432, 0.33145424723625183, -0.2940462827682495, -0.167857110...
found (at least the implicit loop is better than the straight for()): ``` $ more multi.php <?php $a = array(1 => 'a',2 => 'b',3 => array(1,2,3)); $b = array(1 => 'a',2 => 'b'); $c = array(1 => 'a',2 => 'b','foo' => array(1,array(2))); function is_multi($a) { $rv = array_filter($a,'is_array'); if(count($rv)>0...
[ 0.09318914264440536, 0.09196434915065765, 0.5393167734146118, -0.35641568899154663, 0.20811226963996887, 0.1492297500371933, 0.2517588138580322, -0.7190354466438293, -0.12149953842163086, -0.31954240798950195, -0.08512460440397263, 0.5873156189918518, -0.38036805391311646, 0.29551485180854...
if (is_array($a[$i])) return true; } return false; } $iters = 500000; $time = microtime(true); for ($i = 0; $i < $iters; $i++) { is_multi($a); is_multi($b); is_multi($c); } $end = microtime(true); echo "is_multi took ".($end-$time)." seconds in $iters times\n"; $time = microtime(true); for ($i = 0...
[ 0.32999518513679504, -0.2390758991241455, 0.42305299639701843, -0.4571453928947449, 0.12997005879878998, 0.22825650870800018, 0.41997796297073364, -0.8194013237953186, -0.5158891081809998, -0.3602185547351837, -0.32711970806121826, 0.2255854457616806, -0.5296116471290588, 0.488937228918075...
is_multi3($b); is_multi3($c); } $end = microtime(true); echo "is_multi3 took ".($end-$time)." seconds in $iters times\n"; ?> $ php multi.php is_multi took 7.53565130424 seconds in 500000 times is_multi2 took 4.56964588165 seconds in 500000 times is_multi3 took 9.01706600189 seconds in 500000 times ``` Implicit ...
[ 0.26888176798820496, -0.12292609363794327, 0.4672839641571045, -0.19274860620498657, -0.22624842822551727, 0.1863309144973755, 0.6827555298805237, -0.8752069473266602, -0.653724193572998, -0.30996233224868774, 0.009420708753168583, 0.41986408829689026, -0.4913230836391449, 0.28864735364913...
After searching online, the best solution I've found so far is to just make a symbolic link in either "/Library/logs/" or "~/Library/logs/" to get it to show up in the Console application. I'm wondering if it would be possible to add a new directory or log file to the "root" level directly under the "LOG FILES" sectio...
[ 0.1520593911409378, -0.02426859922707081, 0.2483167052268982, 0.23855645954608917, 0.3777161240577698, 0.047314371913671494, 0.10660647600889206, 0.2403992861509323, -0.2822563946247101, -0.8396181464195251, 0.05070261284708977, 0.4958452582359314, 0.09281117469072342, 0.17717088758945465,...
How do I connect to an SQL Server remotely and administer my database objects? I need to connect to my database located on the web hosting company's server. I have the server name, IP address, my database username & password. I have an installation of SQL Server 2000 in my machine. Can I use SQL Server Enterprise Man...
[ 0.329081267118454, 0.22755074501037598, 0.3378848135471344, 0.2885648310184479, 0.055686209350824356, -0.13161495327949524, 0.2372702658176422, -0.040893081575632095, -0.34411314129829407, -0.7975947260856628, 0.10073776543140411, 0.5091482400894165, -0.02016579359769821, 0.339135378599166...
you're using) you have TCP/IP connectivity to. Just launch it, enter the DNS host name or IP address in the 'Server Name' box and hit Connect. Two things may prevent this from working: * Your SQL Server isn't set up for TCP/IP connectivity. This is the default setting from version 2005 onwards, and can be changed usi...
[ 0.07757672667503357, -0.11752983927726746, 0.38761910796165466, 0.1462879329919815, 0.12258964031934738, -0.4013634920120239, 0.12289876490831375, 0.15580734610557556, -0.388363778591156, -0.5947161316871643, -0.27951693534851074, 0.5171526074409485, -0.3627554178237915, 0.3964639902114868...
In fact, if your hosting company allows this kind of access by default, I'd be looking for a different provider... Anyway, what seems to be needed in your scenario is: a) the hosting company enabling TCP/IP on your SQL Server instance, b) them providing you with *secure* access to the IP address that instance is runni...
[ -0.1491842269897461, 0.2108302265405655, 0.24288563430309296, 0.33408400416374207, 0.05952319875359535, -0.2528397738933563, 0.020891407504677773, 0.17806218564510345, -0.4177636206150055, -0.7055670022964478, -0.024493739008903503, 0.45172303915023804, -0.23971112072467804, 0.263339847326...
have to discuss these requirements with your hosting company.
[ 0.7241714000701904, 0.3980064392089844, 0.3441844880580902, 0.16849449276924133, 0.3133142292499542, -0.5454941391944885, 0.03265509754419327, 0.09316190332174301, -0.06103476136922836, -0.595576822757721, -0.22472600638866425, 0.3305671811103821, 0.16970078647136688, -0.02594439685344696,...
As I am using for-loops on large multi-dim arrays, any saving on the for-loop mechanism itself is meaningful. Accordingly, I am looking for any tips on how to reduce this overhead. e.g. : counting down using uint instead of int and != 0 as stop instead of >0 allows the CPU to do less work (heard it once, not sure it ...
[ 0.6793423295021057, -0.19672676920890808, -0.07043517380952835, 0.021886490285396576, -0.07567252963781357, 0.11646527051925659, 0.46409592032432556, 0.04122123867273331, -0.26621517539024353, -0.6846579909324646, 0.1400134563446045, 0.6070933938026428, -0.17543868720531464, -0.22420780360...
little or no attention to any part of the loop that is not repeated, unless the profiler says otherwise. Remember that what is written in an inner loop is not necessarily executed in an inner loop, as modern compilers are pretty smart about avoiding unnecessary repetition. That being said, be very wary of unrolling lo...
[ 0.392160028219223, 0.10765159130096436, -0.3369717299938202, 0.02363681234419346, 0.00020428434072528034, -0.14107951521873474, 0.7301589846611023, 0.14753100275993347, -0.4712272584438324, -0.54384446144104, -0.14380349218845367, 0.5752972960472107, -0.47429028153419495, -0.39701783657073...
the function in question took up 80% of the run time. I also benchmarked times over typical input, so I knew the changes helped.) Moreover, there's no harm in developing habits that favor efficient code. In C++, you should get in the habit of using pre-increment (++i) rather than post-increment (i++) to increment loop...
[ 0.036424670368433, -0.19405695796012878, 0.09512902796268463, 0.19716055691242218, -0.1903911530971527, 0.11669605225324631, 0.3750755190849304, -0.31421151757240295, -0.04863559827208519, -0.1927734613418579, -0.10194718837738037, 0.8115403652191162, -0.1486068069934845, -0.46370205283164...
How do I dictate the destination folder of a clickOnce application? This is not possible with ClickOnce. ClickOnce applications are always installed in the `Apps` subdirectory of local application data.
[ 0.27586108446121216, -0.1834069788455963, 0.6004419326782227, 0.14204329252243042, 0.26655313372612, -0.49757179617881775, -0.06597976386547089, 0.2192816436290741, -0.25159502029418945, -0.7834758758544922, -0.14518427848815918, 0.4528965950012207, -0.4936457574367523, 0.12665176391601562...
I tried GNUBOX which use bluetooth to connect to my computer then to the internet. It's very painful to set up (under windows more than under linux, but it's still painful, it works 1 time on 3). I own a Nokia 6630 so there is no WLAN support. Is there any emulator? I'd need to know something like max width, max heigh...
[ 0.727100133895874, -0.005063218995928764, 0.33441194891929626, 0.33317139744758606, 0.10173392295837402, -0.09684709459543228, 0.6399255990982056, -0.13854162395000458, -0.18413984775543213, -0.5523020029067993, 0.14810076355934143, 0.7232581377029419, -0.4076351225376129, -0.1383007615804...
solid experience from any emulator.
[ -0.02898571267724037, 0.010959535837173462, 0.13996469974517822, 0.048414282500743866, -0.10721991211175919, -0.235917329788208, 0.14572395384311676, 0.19457799196243286, -0.3038302958011627, -0.3867642283439636, -0.0665179044008255, 0.47814807295799255, 0.15252764523029327, -0.14771066606...
If I use multiple repositories, all located under a single root folder, how can I set it up so that they will use a single master `svnconf`/`passwd` file for setup but still allow me to customize each if the need arises? This is on Windows, but I guess the process would be similar on other systems. **Update:** I am u...
[ 0.5080592036247253, -0.09069612622261047, 0.4557274878025055, -0.05915558338165283, -0.11546611040830612, -0.41339027881622314, 0.4520454406738281, -0.20026935636997223, -0.3094361424446106, -0.8919228315353394, -0.14768852293491364, 0.45703190565109253, 0.06248210743069649, 0.252096503973...
we need reports in our web application and there is the free ReportViewer Control from microsoft (normally used, to display reports from the reporting services). I like the fact, that the Report Format (.RDL-Format) from the ReportViewer is a documented XML-Format. But the functionality is somewhat limited, when the Re...
[ 0.8697057366371155, 0.24659207463264465, 0.49270862340927124, 0.3781236410140991, -0.14601688086986542, -0.4433945417404175, -0.03789195790886879, -0.24608241021633148, -0.1442214548587799, -0.4883265197277069, 0.06113213673233986, 0.629451334476471, -0.045271437615156174, -0.1175563409924...
are. Is your application a web application or a desktop application? If your application is a **web application** then you can use any other reporting service. I like **[i-net Clear Reports](http://www.inetsoftware.de/products/crystalclear/)**. There is also a free and fully functional GUI [report designer](http://w...
[ 0.6253029108047485, 0.20720896124839783, 0.5021809935569763, 0.1847551167011261, -0.25993308424949646, -0.09362530708312988, 0.2465912252664566, -0.07378169149160385, -0.17711922526359558, -0.6013753414154053, -0.25170961022377014, 0.6031983494758606, -0.6488807201385498, 0.068940334022045...
I've got a lot of small DLLs which I would like to make into one big(er) DLL (as [suggested here](https://stackoverflow.com/questions/127029/comparing-cold-start-to-warm-start#129090)). I can do so by merging my projects but I would like a less intrusive way. Can several DLLs be merged into one unit? A quick search...
[ 0.39177241921424866, -0.08856131881475449, 0.1352159082889557, -0.008169257082045078, -0.07767357677221298, -0.21995608508586884, 0.21940003335475922, 0.15951724350452423, -0.47705283761024475, -0.8564211130142212, 0.15811634063720703, 0.23114638030529022, -0.07298517972230911, 0.521934390...
If you think it shouldn't, explain why. If yes, how deep should the guidelines be in your opinion? For example, indentation of code should be included? I think a *team* (rather than a *company*) need to agree on a set of guidelines for reasonably consistent style. It makes it more straightforward for maintenance. Ho...
[ 0.6721661686897278, 0.025876058265566826, -0.16821575164794922, 0.1938493549823761, -0.03335396945476532, -0.2792665362358093, 0.50306636095047, 0.25972995162010193, -0.07020002603530884, -0.5204982161521912, 0.050552479922771454, 0.5934892296791077, 0.33409836888313293, -0.332235842943191...
I basically want to do this: ``` grep 'example.com' www_log > example.com.YYYY-MM-DD-H:i:S.log ``` ...with of course the filename being **example.com.2008-09-27-11:21:30.log** I'd then put this in crontab to run daily. The verbose method: ``` grep 'example.com' www_log > `date +example.com.%Y-%m-%d-%H:%M:%S.log` ...
[ -0.12485027313232422, 0.45327162742614746, 0.5491588711738586, 0.003197532147169113, -0.33399081230163574, 0.13107824325561523, 0.28888988494873047, 0.35942137241363525, -0.36607277393341064, -0.4520585834980011, -0.4110410809516907, 0.4626859128475189, -0.22686955332756042, 0.176928535103...
The following have been proposed for an upcoming C++ project. * C++ Coding Standards, by Sutter and Alexandrescu * JSF Air Vehicle C++ coding standards * The Elements of C++ Style * Effective C++ 3rd Edition, by Scott Meyers Are there other choices? Or is the list above what be should used on a C++ project? Some rel...
[ 0.7400259375572205, 0.4276047348976135, -0.10575014352798462, 0.02011069282889366, -0.20092074573040009, -0.19979776442050934, -0.0806865319609642, -0.19402819871902466, 0.001064539304934442, -0.40094712376594543, -0.2156696766614914, 0.4688495099544525, -0.1644447147846222, -0.37837857007...
it comes down to arguing about whether prefixing all member variable with `m_` is *pretty* or not. I have been using and modifying the [Geosoft](http://geosoft.no/development/cppstyle.html) standards for a while, these are for C++. There are some other at the [what-is-your-favorite-coding-guidelines-checklist](https:/...
[ 0.3310871720314026, 0.07616530358791351, 0.24515143036842346, -0.31384366750717163, 0.07999066263437271, 0.009235600009560585, -0.09992136061191559, 0.14908552169799805, -0.31055694818496704, -0.3937777280807495, 0.0012537711299955845, 0.3803986608982086, -0.15204791724681854, 0.0378705449...
I need an algorithm that can compare two text files and highlight their difference and ( even better!) can compute their difference in a meaningful way (like two similar files should have a similarity score higher than two dissimilar files, with the word "similar" defined in the normal terms). It sounds easy to impleme...
[ 0.09564495086669922, 0.161739781498909, 0.5632235407829285, -0.22132472693920135, -0.29634490609169006, 0.13864396512508392, 0.09202548861503601, -0.3581392168998718, 0.389643132686615, -0.8806825876235962, 0.18573181331157684, 0.6871713995933533, -0.3801470994949341, 0.11712191998958588, ...
I was just browsing through questions on stack overflow, and i've come up to a post where it suggests of deploying database by simply copying the mdf file in the app\_data folder and modifying your connection string. I know that some people do create an mdf file in the app\_code during development, but for going live...
[ 0.7449278235435486, 0.31521493196487427, 0.13465334475040436, 0.022374635562300682, 0.07728738337755203, -0.16725845634937286, 0.1413494199514389, 0.09110850840806961, -0.26997071504592896, -0.6325239539146423, 0.12050039321184158, 0.5363056063652039, -0.3550325334072113, 0.018589960411190...
is about to go live I run the script on the target server and set my site to talk to the database. To be honest I've never utilize the app\_code folder for storing the database, I usually use it to store my data access layer logic.. Am I doing the wrong thing here? Is it really a good practice to utilize the app\_data...
[ 0.8857889175415039, -0.028891516849398613, 0.41054412722587585, -0.23282591998577118, 0.05809042230248451, -0.3317818343639374, 0.5866039395332336, 0.16237413883209229, 0.03313569724559784, -0.7953612208366394, 0.18627318739891052, 0.645376980304718, -0.20409107208251953, -0.01103736367076...
Looking forwards to hear your thoughts and experience on this matters. Cheers. I personally prefer your method of deploying Databases and I see one big advantage with this: usually the Web and the DBServer should not be one machine (Security, Maintainability, ...) and utilizing the app\_code folder to hold your Databas...
[ 0.5815383791923523, 0.34545671939849854, 0.2894175350666046, -0.0024464717134833336, -0.3198174238204956, -0.03721408173441887, 0.1435564160346985, 0.29988041520118713, -0.37894734740257263, -0.59621661901474, 0.06637805700302124, 0.787543535232544, 0.14212234318256378, 0.05954622849822044...
Design patterns are usually related to object oriented design. **Are there [design patterns](http://en.wikipedia.org/wiki/Design_pattern_(computer_science)) for creating and programming [relational databases](http://en.wikipedia.org/wiki/Relational_database)?** Many problems surely must have reusable solutions. ...
[ 0.6404778361320496, 0.10094629228115082, -0.035123731940984726, 0.3049389719963074, -0.07355301827192307, -0.022491609677672386, 0.11282552778720856, -0.19071446359157562, -0.4426054358482361, -0.9378653168678284, 0.044939618557691574, -0.056500740349292755, -0.694647490978241, 0.103906467...
called [Refactoring Databases](http://www.ambysoft.com/books/refactoringDatabases.html). That provides a list of techniques for refactoring databases. I can't say I've heard a list of database patterns so much. I would also highly recommend David C. Hay's [Data Model Patterns](//www.amazon.com/dp/0120887983) and the f...
[ 0.48313984274864197, 0.28226059675216675, -0.008388395421206951, 0.30322834849357605, -0.15158532559871674, 0.07979007065296173, -0.2170371562242508, -0.3402458131313324, -0.477839857339859, -0.22820277512073517, 0.10931136459112167, 0.44296276569366455, -0.33662503957748413, 0.18092055618...
provides data model patterns. Finally, while this book is ostensibly about UML and Object Modelling, Peter Coad's [Modeling in Color With UML](//www.amazon.com/dp/013011510X) provides an "archetype" driven process of entity modeling starting from the premise that there are 4 core archetypes of any object/data model
[ -0.10685212165117264, -0.1490093171596527, 0.1296439915895462, 0.4719596803188324, -0.0012109880335628986, 0.2845992147922516, -0.03387626260519028, -0.13305938243865967, -0.31905949115753174, -0.3273402750492096, -0.30629679560661316, 0.3315424919128418, -0.36575084924697876, 0.0367510765...
I'm interested in finding out what people would consider the most useful data structures to know in programming. What data structure do you find yourself using all the time? Answers to this post should help new programmers interested in finding a useful data structure for their problem. Answers should probably includ...
[ 0.4925266206264496, 0.1438676416873932, -0.05748540908098221, 0.7953166365623474, -0.2346375286579132, -0.018301839008927345, 0.025397196412086487, 0.3173113465309143, -0.16484329104423523, -0.5886947512626648, -0.11771851032972336, 0.15744900703430176, 0.14908108115196228, 0.1069421395659...
experience people can share. One of the data structures I use the most (beyond vectors, of course) is the Hashtable. Its about the only choise if you need to be able to search large quantities of data in O(1) time, that means the time to search does not grow as the size of the collection grows. The catch is that the i...
[ -0.2406800538301468, -0.0025101895444095135, 0.3679116666316986, 0.23805154860019684, -0.01646512933075428, 0.0834689512848854, 0.07479824870824814, 0.09978996962308884, -0.14816762506961823, -0.42957165837287903, -0.0604870542883873, 0.5185815095901489, 0.10433022677898407, -0.19626936316...
hash code that indicates the slot in the hash table in which to search. Then depending on the implementation it either follows a list of items that fell on that bucket to find your item or it searches nearby buckets. The size of the hastable is determinant to the efficiency of the hash that is quite affected by the amm...
[ -0.11741069704294205, -0.016234353184700012, 0.15706397593021393, 0.14414305984973907, -0.2202419638633728, -0.16904316842556, -0.026810020208358765, -0.26291507482528687, -0.3964541554450989, -0.6643790006637573, 0.06369076669216156, 0.15415263175964355, -0.04358796775341034, 0.1799035966...
in the table to be efficient. C# has a great implementation of it with `Dictionary<keytype, valuetype>` and even has a HybridDictionary that decides internally when to use a hashtable or a vector. Any good programming book describes it but you will be well served by wikipedia: <http://en.wikipedia.org/wiki/Hashtable>
[ -0.11118224263191223, -0.1348171830177307, 0.1102067083120346, 0.012937750667333603, -0.21746815741062164, -0.06398086249828339, -0.06656037271022797, 0.09391801804304123, -0.28135597705841064, -0.7632013559341431, 0.16189686954021454, 0.185837984085083, -0.42557236552238464, -0.0796180516...
I have an array of integers: ``` int[] number = new int[] { 2,3,6,7 }; ``` What is the easiest way of converting these into a single string where the numbers are separated by a character (like: `"2,3,6,7"`)? I'm using C# and .NET 3.5. ``` var ints = new int[] {1, 2, 3, 4, 5}; var result = string.Join(",", ints.Sele...
[ 0.1748659312725067, 0.17455574870109558, 0.5412589311599731, -0.23847363889217377, 0.08184849470853806, -0.05909828841686249, 0.24057891964912415, -0.7176372408866882, -0.17096693813800812, -0.39984428882598877, -0.012735327705740929, 0.5393919348716736, -0.33578360080718994, 0.08263586461...
array for a single reason - performance. The Join method needs to know the size of the data to effectively preallocate the necessary amount of memory. Here is a part of the internal implementation of String.Join method: ``` // length computed from length of items in input array and length of separator string str = Fa...
[ -0.1422542780637741, -0.07432356476783752, 0.2156182825565338, -0.2459798902273178, -0.03367699682712555, 0.177434042096138, 0.20515331625938416, -0.6147022247314453, -0.2803099453449249, -0.4075831174850464, 0.040704164654016495, 0.49940159916877747, -0.3297015428543091, -0.02549833990633...
buffer.AppendString(separator); buffer.AppendString(value[j]); } } ```
[ -0.4358806014060974, 0.28510406613349915, 0.3996679484844208, -0.6784049272537231, 0.23294413089752197, 0.3321554660797119, 0.2676180899143219, -0.05658227950334549, -0.07346964627504349, -0.48230618238449097, -0.37879520654678345, 0.4899921417236328, -0.5213385224342346, 0.209382563829422...
The Objective Caml language will only produce stack traces if you ask for them just right - what are the requirements for both bytecode and native code? Compile with -g and set environment variable OCAMLRUNPARAM=b
[ 0.17757010459899902, 0.21392245590686798, 0.4157482981681824, 0.006816750392317772, 0.09820719808340073, -0.05455537885427475, -0.12751634418964386, -0.2805090844631195, -0.09023673832416534, -0.06770818680524826, 0.11169566959142685, 0.6721241474151611, -0.6998918056488037, -0.56787115335...
I want to display a thumbnail image in a `cell` of `tableViewController`, this thumbnail image is located at some remote place (URL of address is in XML file) so which format of image is cost effective? It's mostly the same as on the Web, really. For graphics, PNG is generally more efficient; for photos, you'll want to...
[ 0.25115591287612915, 0.08690005540847778, 0.37432098388671875, 0.32369691133499146, -0.024734536185860634, 0.1558321863412857, -0.2985895276069641, 0.0682910606265068, -0.27301865816116333, -0.7753826975822449, 0.1117413341999054, 0.6592657566070557, -0.04970682039856911, -0.06575098633766...
I've managed to get a memory 'leak' in a java application I'm developing. When running my JUnit test suite I randomly get out of memory exceptions (java.lang.OutOfMemoryError). What tools can I use to examine the heap of my java application to see what's using up all my heap so that I can work out what's keeping refer...
[ 0.26428917050361633, 0.037469282746315, -0.14173036813735962, -0.09789827466011047, -0.3949248194694519, -0.11371865123510361, 0.15844489634037018, 0.015759911388158798, -0.3556695282459259, -0.8397021293640137, 0.16124065220355988, 0.2917763292789459, -0.3152431845664978, -0.0914441794157...
(in your jdk/bin dir): ``` jmap -dump:format=b,file=heap.bin <pid> ``` You can even use this to get a quick histogram of all objects ``` jmap -histo <pid> ``` I can recommend Eclipse Memory Analyzer (<http://eclipse.org/mat>) for advanced analysis of heap dumps. It lets you find out exactly why a certain object o...
[ 0.2084796279668808, 0.1955341398715973, -0.21432363986968994, 0.09020047634840012, -0.36903756856918335, -0.4200061857700348, 0.02696717157959938, -0.07612688094377518, -0.09096241742372513, -0.6883518099784851, -0.07963073998689651, 0.5436563491821289, -0.16084633767604828, -0.15754355490...
I'm doing some Android development, and I much prefer Visual Studio, but I'll have to use *Eclipse* for this. Has anyone made a tool which can make *Eclipse* look and behave more like visual studio? I mainly can't stand its **clippyesqe** suggestions on how I should program (Yes, I know I have not yet used that privat...
[ 0.4812086522579193, 0.03956964239478111, 0.28722772002220154, -0.035390667617321014, -0.45554667711257935, -0.220866397023201, 0.2704586088657379, 0.2089972198009491, -0.04877199977636337, -0.8694703578948975, -0.06078723818063736, 0.8506321310997009, 0.005036438349634409, -0.0953660011291...
ENTER to complete, I could switch everything by hand but that would take hours, and I was hoping someone had some sort of theme or something that has already done it. There are also other choices for Java IDEs. You've obviously found Eclipse, but you also may want to check out [IntelliJ](http://www.jetbrains.com/idea/i...
[ 0.17083752155303955, -0.19930627942085266, 0.24577130377292633, 0.3301478922367096, 0.1580658107995987, -0.3900845944881439, 0.2935750186443329, 0.014107163064181805, 0.15551862120628357, -0.8648306131362915, -0.18525835871696472, 0.4542630612850189, -0.10403706878423691, -0.32322582602500...
get comfortable with it.
[ 0.313362181186676, 0.27115732431411743, -0.2866555154323578, 0.02488238550722599, -0.11124003678560257, -0.43793731927871704, -0.12134648859500885, 0.1749613732099533, 0.09897497296333313, -0.6130222678184509, -0.16859589517116547, 0.28949370980262756, 0.08915594220161438, -0.0043099452741...
Is there a prebuilt tool that would integrate with BEA/Oracle Weblogic 10.0 and trace on a database table each call to a web service exposed by the server? UPDATE: the goal is **not** to debug the web services (they are working well). The objective is to **trace each call** on a table, using an existing add-on. This i...
[ 0.20868606865406036, -0.07403526455163956, 0.05371903255581856, 0.32493045926094055, 0.1701989769935608, -0.36001595854759216, 0.1204238086938858, -0.11615676432847977, 0.022053563967347145, -0.3776595890522003, 0.04418268799781799, 0.519355833530426, -0.21632543206214905, -0.0827338322997...
(e.g. the N+1 SELECT problem). I can't be any more specific without knowing what your application platform is - the actual DBMS used isn't really relevent to the problem.
[ 0.3126581609249115, 0.1254485696554184, -0.06621701270341873, -0.07324418425559998, -0.20961406826972961, -0.2660413384437561, 0.2049991488456726, 0.027204733341932297, -0.16868264973163605, -0.48734092712402344, -0.0993814542889595, 0.40184083580970764, -0.2719183564186096, 0.138980984687...
I have been asked to standardize the screen saver and desktop background used by everyone in my company and, aside from going around to each PC individually, I'm looking for a programmatic way to accomplish this. I am not a systems admin, so have never crossed this bridge before. It is also worth noting that most PCs a...
[ 0.43419408798217773, 0.27268272638320923, 0.5452088713645935, -0.09714233875274658, 0.1091332659125328, -0.21260587871074677, 0.08543255925178528, 0.055728938430547714, -0.3342767059803009, -0.6151849627494812, -0.19054485857486725, 0.8649869561195374, 0.13030268251895905, 0.13783608376979...
This question is about organizing the actual CSS directives themselves within a .css file. When developing a new page or set of pages, I usually just add directives by hand to the .css file, trying to refactor when I can. After some time, I have hundreds (or thousands) of lines and it can get difficult to find what I n...
[ 0.75480055809021, -0.02005811035633087, 0.24839141964912415, 0.11873060464859009, -0.09663249552249908, -0.05523811653256416, 0.02258916385471821, -0.15432578325271606, -0.2090601623058319, -0.7618919610977173, 0.03320671245455742, 0.3883383572101593, 0.028636235743761063, -0.0673548355698...
I just sort everything alphabetically by selector? * Some combination of these approaches? Also, is there a limit to how much CSS I should keep in one file before it might be a good idea to break it off into separate files? Say, 1000 lines? Or is it always a good idea to keep the whole thing in one place? Related Que...
[ 0.462330162525177, -0.08354979753494263, 0.1644992232322693, 0.1134166419506073, -0.23119063675403595, -0.13007479906082153, 0.09486515074968338, -0.29494425654411316, -0.42316633462905884, -0.38560304045677185, -0.10090719908475876, 0.10392167419195175, -0.14244884252548218, -0.0729862973...
consistent and document it. Describe at the top of each file what is in that file, perhaps providing a table of contents, perhaps referencing easy to search for unique tags so you jump to those sections easily in your editor. If you want to split up your CSS into multiple files, by all means do so. Oli already mention...
[ 0.4387018084526062, -0.16098062694072723, 0.41703757643699646, 0.22255870699882507, -0.3833516240119934, -0.2319127321243286, 0.04415382072329521, 0.04230396822094917, -0.2909187078475952, -0.5850082039833069, -0.08683418482542038, 0.6721923351287842, -0.05659252405166626, 0.08413247764110...
the compression. In contrast with what others have said so far, I prefer to write each property on a separate line, and use indentation to group related rules. E.g. following Oli's example: ```css #content { /* css */ } #content div { /* css */ } #content span { /* css */ } #co...
[ 0.14906927943229675, -0.04727860167622566, 0.2962898313999176, 0.0822436511516571, -0.14524807035923004, -0.06988389045000076, -0.2473156899213791, -0.3141164481639862, 0.00426043476909399, -0.8659561276435852, -0.32538163661956787, 0.4004833698272705, -0.15266643464565277, 0.2767289876937...
/* css */ } #header etc { /* css */ } ``` That makes it easy to follow the file structure, especially with enough whitespace and clearly marked comments between groups, (though not as easy to skim through quickly) and easy to edit (since you don't have to wade through single long lines of CSS for each...
[ 0.576285719871521, 0.15838651359081268, 0.1713448464870453, -0.03522181510925293, 0.03316953778266907, -0.18194882571697235, 0.10450266301631927, -0.2526627480983734, -0.5353261232376099, -0.6060007810592651, -0.1544681340456009, -0.003491121344268322, -0.08862446248531342, 0.1204999163746...
and complexity of the site and the CSS. I always at least have a [`reset.css`](https://meyerweb.com/eric/tools/css/reset/). That tends to be accompanied by `layout.css` for general page layout, `nav.css` if the site navigation menus get a little complicated and `forms.css` if I've got plenty of CSS to style my forms. O...
[ 0.4172545075416565, 0.23904676735401154, 0.32908231019973755, -0.19601935148239136, -0.19074441492557526, 0.1505172699689865, 0.30769580602645874, 0.11865899711847305, -0.4892446994781494, -0.9476233720779419, -0.0800468847155571, 0.4493705928325653, -0.13784581422805786, -0.08848901093006...
From time to time I read that Fortran is or can be faster then C for heavy calculations. Is that really true? I must admit that I hardly know Fortran, but the Fortran code I have seen so far did not show that the language has features that C doesn't have. If it is true, please tell me why. Please don't tell me what la...
[ -0.0155458003282547, 0.17170488834381104, 0.027427835389971733, 0.1009017825126648, -0.1096903532743454, -0.20732872188091278, 0.1747267246246338, 0.5217904448509216, -0.50717693567276, -0.6726740002632141, -0.041852474212646484, 0.550663411617279, -0.05374198779463768, -0.1584863066673278...
aliasing is not allowed, unless an EQUIVALENCE statement is used. Any code that has aliasing is not valid Fortran, but it is up to the programmer and not the compiler to detect these errors. Thus Fortran compilers ignore possible aliasing of memory pointers and allow them to generate more efficient code. Take a look at...
[ 0.09121555835008621, -0.2584511935710907, 0.23246657848358154, 0.07236214727163315, 0.14432184398174286, -0.20601223409175873, 0.5156999826431274, 0.02611398883163929, 0.2102370709180832, -0.3017464876174927, -0.29746586084365845, 0.6553764343261719, -0.4357629716396332, -0.184351712465286...
float y = input[i*2+1]; output[i*2+0] = matrix[0] * x + matrix[1] * y; output[i*2+1] = matrix[2] * x + matrix[3] * y; } } ``` This function would run slower than the Fortran counterpart after optimization. Why so? If you write values into the output array, you may change the values of matrix. Afte...
[ 0.04302108660340309, 0.24288034439086914, 0.2923671305179596, -0.21200904250144958, 0.025234512984752655, -0.14729581773281097, 0.29100409150123596, -0.43936195969581604, 0.23111224174499512, -0.2174050211906433, -0.08301402628421783, 0.4867587089538574, -0.4930132031440735, -0.01637317426...
four matrix values from memory for all computations. In Fortran the compiler can load the matrix values once and store them in registers. It can do so because the Fortran compiler assumes pointers/arrays do not overlap in memory. Fortunately, the [`restrict`](https://en.wikipedia.org/wiki/Restrict) keyword and strict...
[ 0.17374612390995026, 0.18982306122779846, 0.37701690196990967, -0.0378204770386219, -0.12135766446590424, -0.2491404414176941, 0.23840992152690887, -0.16874246299266815, -0.3769437074661255, -0.25447776913642883, -0.22466367483139038, 0.6626651287078857, -0.6078031659126282, -0.12947662174...
will never overlap, for example a `double*` will not overlap with an `int*` (with the specific exception that `char*` and `void*` can overlap with anything). If you use them you will get the same speed from C and Fortran. However, the ability to use the `restrict` keyword only with performance critical functions means...
[ 0.452736496925354, -0.09972868859767914, 0.3513981103897095, 0.02790190279483795, 0.05064669996500015, -0.38137346506118774, 0.2563982307910919, -0.3802166283130646, -0.095802441239357, -0.6446047425270081, -0.4181152284145355, 0.7952151894569397, -0.47570106387138367, -0.00218631722964346...
on some hardware and with some optimization options.
[ -0.239059180021286, 0.261825293302536, 0.21554607152938843, 0.1470130980014801, 0.3283796012401581, 0.23137101531028748, 0.013705654069781303, -0.1637345552444458, 0.1308957040309906, -0.6078668832778931, -0.17182601988315582, 0.5401822924613953, 0.08027790486812592, -0.2424129843711853, ...
Are there any dictionary classes in the .NET base class library which allow duplicate keys to be used? The only solution I've found is to create, for example, a class like: ``` Dictionary<string, List<object>> ``` But this is quite irritating to actually use. In Java, I believe a MultiMap accomplishes this, but cann...
[ 0.07071653753519058, 0.13359110057353973, 0.0675429180264473, 0.0684087797999382, 0.10499018430709839, -0.03577852621674538, 0.21311146020889282, 0.012563846074044704, -0.21730144321918488, -0.8051908016204834, -0.026708269491791725, 0.5706942081451416, -0.46122002601623535, -0.16089254617...
framework which will help - and using the dictionary is as good as it gets :(
[ 0.13253609836101532, 0.22582511603832245, 0.331981360912323, 0.06320666521787643, -0.008942621760070324, -0.36181026697158813, 0.36698347330093384, -0.14646893739700317, 0.2708553075790405, -0.6866222023963928, 0.024096272885799408, 0.6315587162971497, 0.1416081041097641, -0.27045884728431...
What number of classes do you think is ideal per one namespace "branch"? At which point would one decide to break one namespace into multiple ones? Let's not discuss the logical grouping of classes (assume they are logically grouped properly), I am, at this point, focused on the maintainable vs. not maintainable number...
[ 0.17308612167835236, -0.1521884799003601, -0.08267925679683685, 0.058444876223802567, -0.10103894025087357, 0.1322137713432312, 0.22990906238555908, -0.3639654219150543, -0.3908923864364624, -0.5439220070838928, -0.014768379740417004, 0.5955240726470947, -0.32105401158332825, -0.0187635198...
ns, typenames in itertools.groupby(sorted_exported_types, get_ns)) counts = sorted(counts_per_ns.values()) print 'Min:', counts[0] print 'Max:', counts[-1] print 'Avg:', sum(counts) / len(counts) print 'Med:', if len(counts) % 2: print counts[len(counts) / 2] else: # ignoring len == 1 case print (counts[len(coun...
[ -0.22296732664108276, -0.25497108697891235, 0.29497507214546204, 0.0488458126783371, -0.14517490565776825, 0.598129391670227, 0.27299773693084717, -0.45179396867752075, -0.7279161810874939, -0.6414178609848022, 0.00629384396597743, 0.42865777015686035, -0.05989295244216919, 0.0259751453995...
I keep reading about C99 and C++11 and all these totally sweet things that are getting added to the language standard that might be nice to use someday. However, we currently languish in the land of writing C++ in Visual Studio. Will any of the new stuff in the standard ever get added to visual studio, or is Microsoft...
[ 0.5144161581993103, 0.2580122947692871, 0.21926136314868927, 0.1638890504837036, -0.2953259348869324, -0.2158762812614441, 0.119809091091156, 0.35109472274780273, -0.3221767544746399, -0.5146980285644531, -0.21454794704914093, 0.5343395471572876, 0.17211662232875824, 0.1699708104133606, ...
their users. Like this one: <https://devblogs.microsoft.com/cppblog/iso-c-standard-update/> > Now, the Visual C++ compiler team receives the occasionally question as to why we haven’t implemented C99. It’s really based on interest from our users. Where we’ve received many requests for certain C99 features, we’ve trie...
[ 0.5467838644981384, -0.02206931822001934, 0.17083467543125153, 0.196162149310112, -0.358126699924469, -0.18260809779167175, -0.04971691220998764, 0.28211361169815063, -0.3500417470932007, -0.3436060845851898, -0.20435917377471924, 0.5685667395591736, -0.08042304217815399, 0.165472045540809...
our users is that they would prefer that we focus on C++-0x instead of on C-99. We have "cherry-picked" certain popular C-99 features (variadic macros, `long long`) but beyond this we are unlikely to do much more in the C-99 space (at least in the short-term). > > > Jonathan Caves > > > Visual C++ Compiler Team. T...
[ 0.42959877848625183, 0.28092437982559204, -0.008217374794185162, -0.005903382319957018, 0.055494215339422226, -0.20627841353416443, 0.21316125988960266, 0.26715797185897827, -0.3077496886253357, -0.4150318205356598, -0.2921549677848816, 0.5037887096405029, -0.21450193226337433, -0.03803690...
Intel is much more enlightened on this. the Intel C compiler can handle C99 code and even has the same flags as gcc, making it much easier to port code between platforms. Also, the Intel compiler works in visual studio. So by scrapping MS COMPILER you can still use the MS IDE that you seem to think has some kind of val...
[ 0.37295475602149963, 0.2567867636680603, -0.2273731231689453, 0.1641111969947815, -0.5362570881843567, -0.27234676480293274, -0.09618671983480453, 0.2653602361679077, -0.04769996553659439, -0.6458724141120911, -0.15201331675052643, 0.5118973255157471, -0.32021772861480713, 0.05738030746579...
and that is not at all supported by MS tools, unfortunately.
[ 0.004836341831833124, 0.3662467896938324, 0.23219291865825653, 0.3202861249446869, 0.14820502698421478, -0.21085156500339508, 0.14163433015346527, 0.35575568675994873, -0.07006236910820007, -0.41029584407806396, -0.10707209259271622, 0.5482221245765686, 0.030374662950634956, 0.171132341027...
I am trying to call a webservice using ssl. How do i get the relevant server cert so that i can import it into my truststore? I know about the use of property com.ibm.ssl.enableSignerExchangePrompt from a main method but i would add the server cert to my truststore manually. I dont want this property set in any of my ...
[ 0.6410433650016785, 0.3221963346004486, 0.058162759989500046, 0.09724991023540497, -0.3109549880027771, -0.46294742822647095, 0.5733401775360107, -0.6874747276306152, 0.2555151581764221, -0.6467100381851196, 0.24997039139270782, 0.4848913848400116, -0.4911706745624542, 0.07954410463571548,...
//do nothing } public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { // do nothing } public X509Certificate[] getAcceptedIssuers() { //just return an empty issuer return new X509Certificate[0];
[ 0.25786060094833374, 0.09734207391738892, 0.3131134808063507, -0.12344279885292053, 0.08379814028739929, -0.36694905161857605, 0.6068302989006042, -0.12658560276031494, 0.047391705214977264, -0.13194464147090912, -0.48505350947380066, 0.5589030981063843, -0.5067402124404907, 0.351944893598...
} } ``` Then you can use this trust manager to create a SSL sockect ``` SSLContext context = SSLContext.getInstance("SSL"); context.init(null, new TrustManager[] { new dummyTrustManager() }, new java.security.SecureRandom()); SSLSocketFactory factory = context.getSocketFactory(); I...
[ 0.08181487023830414, 0.0406617671251297, 0.45237329602241516, -0.15019559860229492, 0.005974146071821451, -0.13507717847824097, 0.7608243823051453, -0.4309542179107666, -0.1808963268995285, -0.9109647870063782, -0.07591631263494492, 0.5643039345741272, -0.41458776593208313, 0.3166932165622...
I'd like to get **uniform distribution** in range [0.0, 1.0) If possible, please let the implementation make use of random bytes from **/dev/urandom.** It would also be nice if your solution was **thread-safe**. If you're not sure, please indicate that. See [some solution](https://stackoverflow.com/questions/146387#...
[ 0.08299659192562103, -0.16337627172470093, 0.3627135157585144, -0.11523980647325516, -0.07745036482810974, -0.007677617948502302, -0.06119542568922043, -0.17557236552238464, -0.3094868063926697, -0.588628351688385, 0.004973400849848986, 0.18338826298713684, -0.3753776550292969, 0.137357011...
I can't figure out a use case for being able to annotate interfaces in Java. Maybe someone could give me an example? I've used it in Spring to annotate interfaces where the annotation should apply to all subclasses. For example, say you have a Service interface and you might have multiple implementations of the inter...
[ 0.1789337396621704, 0.009658469818532467, 0.020730359479784966, 0.11959794908761978, -0.20235182344913483, -0.17620603740215302, 0.30154550075531006, 0.0553802028298378, -0.24538196623325348, -0.8644185662269592, 0.38093018531799316, 0.6125009655952454, -0.2022278606891632, 0.0012155002914...
I have a [Nintendo Wii](http://en.wikipedia.org/wiki/Wii), and I've got [devkitpro](http://www.devkitpro.org/) working to load some simple programs. The example source code that I've been able to find is very simplistic, such as drawing and rotating a simple shape. I've been looking for more in depth tutorials, and I...
[ 0.7648236155509949, -0.1189182847738266, 0.3547002971172333, 0.29145535826683044, -0.28187522292137146, -0.006630974356085062, -0.009867986664175987, 0.03349726274609566, -0.26185357570648193, -0.35420817136764526, 0.14134204387664795, 0.5029368996620178, 0.16121439635753632, 0.43375596404...
Currently I'm stuck at just getting alpha (translucent) colours to work, but I'm also interested in getting lighting and other more advanced graphics techniques working. I'm going to provide you with some nice links: * [Getting started](http://www.wii-boss.symbiote.org/files/Programming%20your%20wii-boss.pdf) (dead) *...
[ 0.5966889262199402, 0.18678341805934906, 0.15926219522953033, 0.031190071254968643, -0.32296037673950195, -0.5046569108963013, 0.3749636709690094, 0.35881537199020386, -0.246812641620636, -0.5477833151817322, -0.005162634886801243, 0.3496765196323395, 0.33344683051109314, 0.523482918739318...
have fun programming for Wii! (But please, don't make another Fitness-game ;) )
[ 0.5189264416694641, -0.28578105568885803, 0.3999336361885071, 0.48635128140449524, 0.04452434182167053, -0.744865357875824, 0.43271106481552124, 0.19299452006816864, -0.303438276052475, -0.3692619502544403, -0.10610965639352798, 0.7016518115997314, -0.04702109098434448, -0.1169234514236450...
I'm looking for: * documentation * blogs * books * ready-to-use pre-configured slice images * services * wrappers * libraries * tutorials ...anything that would make it easier to start using EC2 to host a Rails application. There is a Rails image for EC2 at <http://ec2onrails.rubyforge.org/>
[ 0.33136579394340515, -0.27332445979118347, 0.02433720976114273, 0.1479257047176361, 0.004885636270046234, -0.1511109471321106, 0.18374070525169373, 0.1239442527294159, -0.1355617642402649, -0.6681534647941589, 0.06686846911907196, 0.21593783795833588, 0.07889010012149811, -0.13482977449893...
Say I'm writing some ruby code and I want to use the standard Date type to get the current date. Instead of using a search engine, is there a faster way to find the documentation for this class? I know I can get the methods for Date by typing `Date.methods`, but as far as I know this doesn't provide details about argum...
[ 0.30122295022010803, 0.21539044380187988, 0.4120733439922333, 0.13209249079227448, 0.0625738650560379, -0.18691742420196533, 0.17706863582134247, 0.21804441511631012, -0.05375910922884941, -0.4539586901664734, -0.0672491267323494, 0.36460447311401367, -0.15463939309120178, 0.18765579164028...
reason seems to take ages to start up. It is also much better than `ri` because the HTML page lists all the documentation for all the methods on a single page. Often methods are related to others, and switching between 2 `ri`'s is painful
[ 0.27005141973495483, 0.06918293982744217, 0.24408748745918274, 0.23338665068149567, -0.13743902742862701, -0.126219242811203, 0.32921093702316284, -0.6113712787628174, 0.049666065722703934, -0.2734794020652771, 0.08212532848119736, 0.41686147451400757, -0.32571861147880554, -0.113594189286...
I have a SQL table with news stories and Unix timestamps. I'd like to only keep the 50 newest stories. How would I write an SQL statement to delete any amount of older stories? I ended up using two queries since MySQL5 doesn't yet support LIMIT's in subqueries ``` SELECT unixTime FROM entries ORDER BY unixTime DESC LI...
[ 0.3123771846294403, 0.20503300428390503, 0.3442598283290863, 0.22112981975078583, 0.047809381037950516, -0.1367359310388565, 0.12098333984613419, 0.06677564978599548, -0.2250533103942871, -0.4484163224697113, 0.016564616933465004, 0.7634244561195374, 0.037855759263038635, 0.368315905332565...
The method signature of a Java `main`method is: ``` public static void main(String[] args) { ... } ``` **Is there a reason why this method must be static?** The method is static because otherwise there would be ambiguity: which constructor should be called? Especially if your class looks like this: ``` public c...
[ -0.16650596261024475, -0.027407612651586533, 0.1822098344564438, -0.1953149288892746, -0.0609433688223362, -0.2686048746109009, 0.3071518838405609, 0.034505244344472885, -0.2978595793247223, -0.25631919503211975, -0.25062403082847595, 0.27086541056632996, -0.4253957271575928, 0.38200968503...
hasn't been initialized, and you have to check for it in every method that could be called. There are just too many edge cases and ambiguities for it to make sense for the JVM to have to instantiate a class before the entry point is called. That's why `main` is static. I have no idea why `main` is always marked `publ...
[ 0.0229911208152771, -0.05622920021414757, -0.06497708708047867, 0.17095613479614258, -0.12357568740844727, -0.4168955385684967, 0.26543235778808594, 0.6020635366439819, -0.1551664173603058, -0.18964625895023346, -0.3077647089958191, 0.041388627141714096, -0.060808345675468445, 0.6315231919...
I have a new object with a collection of new objects within it on some property as an IList. I see through sql profiler two insert queries being executed.. one for the parent, which has the new guid id, and one for the child, however, the foreign-key on the child that references the parent, is an empty guid. Here is my...
[ -0.17538344860076904, -0.021910380572080612, 0.3867493271827698, -0.13716517388820648, -0.01520975399762392, 0.23378990590572357, -0.3282526731491089, -0.3018125295639038, -0.0629621222615242, -0.8215463161468506, 0.02809501811861992, 0.18605175614356995, -0.19406171143054962, 0.2568175792...
``` IList<BackerEntry> ``` When I try to SaveOrUpdate the passed in entity I get the following results in sql profiler: exec sp\_executesql N'INSERT INTO Backer (Name, PostCardSizeId, ItemNumber, BackerId) VALUES (@p0, @p1, @p2, @p3)',N'@p0 nvarchar(3),@p1 uniqueidentifier,@p2 nvarchar(3),@p3 uniqueidentifier',@p0=...
[ -0.41040557622909546, 0.11853732168674469, 0.4660326838493347, 0.09802695363759995, -0.018990851938724518, 0.35514670610427856, 0.023014413192868233, -0.46657511591911316, -0.09983691573143005, -0.5837437510490417, 0.04290327802300453, 0.2728022336959839, -0.27552786469459534, 0.1199864596...
Description, MaxLength, IsRequired, Priority, BackerEntryId) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] ---\u003e System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint ``` EDIT: SOLVED! The first answer below pointed me into the correct direction. I needed to add that back referenc...
[ -0.1879260390996933, 0.03209623321890831, 0.32334035634994507, 0.19685862958431244, 0.1931869089603424, 0.3087473213672638, 0.19220378994941711, -0.25144079327583313, -0.1278044581413269, -0.5716869831085205, -0.12615475058555603, 0.439026802778244, -0.29040610790252686, 0.2993512153625488...
<one-to-many class="BackerEntry" /> </bag> ``` as well as make sure that you have the reverse of the mapping defined for the child class: ``` <many-to-one name="parent" column="PARENT_ID" not-null="true"/> ``` I had similar issues with hibernate on my current project with parent-child relationships, and this was a...
[ 0.1399100124835968, -0.18105630576610565, -0.12375666946172714, -0.002421078272163868, -0.24745924770832062, -0.05432472378015518, -0.07659948617219925, 0.13386809825897217, 0.353476881980896, -0.8277697563171387, 0.1096186563372612, 0.6501056551933289, -0.126187264919281, 0.00287819979712...
Has anyone successfully built an Adobe Air application with Maven? If so, what are the steps to get it working? I have been trying to use [flex-mojos](http://code.google.com/p/flex-mojos/) to build an Air applications. When I set the packaging type to "aswf", as suggested in the [DashboardSamplePom](http://code.google...
[ 0.4443950951099396, 0.45653602480888367, 0.19474291801452637, -0.1838039606809616, -0.09660468995571136, -0.11985570937395096, -0.3632451295852661, -0.30789318680763245, -0.0860852524638176, -0.3067406415939331, -0.26196593046188354, 0.2013726830482483, -0.2644396126270294, -0.059692919254...
In ruby I am parsing a date in the following format: 24092008. I want to convert each section (year, month, date) into a number. I have split them up using a regex which produces three Strings which I am passing into the Integer constructor. ``` date =~ /^([\d]{2})([\d]{2})([\d]{4})/ year = Integer($3) month = ...
[ -0.10851552337408066, 0.15583159029483795, 0.4519195556640625, -0.263676255941391, -0.1218145415186882, -0.10045173019170761, 0.5490707159042358, -0.04781474173069, -0.125602588057518, -0.2769928574562073, -0.22355109453201294, 0.19388119876384735, -0.20255953073501587, 0.2167482078075409,...
there an elegant solution to this or should I just test for numbers less than 10 and remove the zero first? Thanks. I'm not familiar with regexes, so forgive me if this answer's off-base. I've been assuming that $3, $2, and $1 are strings. Here's what I did in IRB to replicate the problem: ``` irb(main):003:0> Intege...
[ -0.5313017964363098, 0.2718476355075836, 0.5462700128555298, -0.14673085510730743, -0.054893333464860916, 0.21056269109249115, 0.29721805453300476, -0.2850934565067291, -0.2040702849626541, -0.48057568073272705, 0.0621950738132, 0.6562507152557373, -0.3273070752620697, 0.047772862017154694...
Within SQL Server Integration Services (SSIS) there is the ability to setup a connection to a flat file that can hold millions of records and have that data pushed to a SQL DB. Furthermore, this process can be called from a C# app by referencing and using the Microsoft.SqlServer.Dts.Runtime namespace. Would a flat fi...
[ 0.15840788185596466, -0.15746992826461792, 0.32787325978279114, 0.33996644616127014, 0.12557777762413025, 0.1386181116104126, -0.027932673692703247, -0.06559775024652481, -0.4920591711997986, -0.914818286895752, -0.04655764251947403, 0.047338832169771194, -0.2776302993297577, 0.24299786984...
threads? (the dev box has two cpu's) I have seen this data ([sql team blog](http://weblogs.sqlteam.com/mladenp/articles/10631.aspx)) stating that for a flat file with a million lines, SSIS is the fastest: ``` Process Duration (ms) -------------------- ------------- SSIS - FastParse ON 7322 ms...
[ -0.052750252187252045, -0.30735278129577637, 0.46867960691452026, 0.39195823669433594, -0.011996805667877197, 0.29254817962646484, 0.1667390763759613, 0.23911119997501373, -0.7771364450454712, -0.8635632991790771, -0.06324754655361176, 0.012712297029793262, -0.17901945114135742, 0.30086746...
10687 ms BCP 14922 ms ``` What are your thoughts? I can only speak for myself and my experience. I would go with SSIS, since this is one of those cases where you might be re-inventing the wheel unnecessarily. This is a repetitive task that has already been solved by SSIS. I have about 57 jobs...
[ 0.45016515254974365, 0.4807513952255249, 0.16740521788597107, -0.02091924659907818, 0.21328511834144592, 0.5744693875312805, -0.01153609063476324, 0.22548438608646393, -0.46161773800849915, -0.6247251629829407, -0.10543710738420486, 0.48245179653167725, -0.13496087491512299, 0.259950548410...
routinely handle exporting between 5 to 100 million records. The database I manage has about 2 billion rows. I made use of a script task to append the date, down to the millisecond, so that I can run jobs several times a day. Been doing that for about 22 months now. It's been great! SSIS jobs can also be scheduled. So...
[ 0.5497390031814575, 0.27590474486351013, 0.27892959117889404, 0.005487213376909494, 0.1746496856212616, -0.1368691623210907, 0.2712574303150177, 0.3124813735485077, -0.6511838436126709, -0.5559597015380859, 0.2252042442560196, 0.6914202570915222, -0.01545241754502058, 0.06859388202428818, ...
very large files into smaller chunks. SSIS is dog slow for that sort of stuff. A one gig text file took about one hour to split, using the script task. The C# custom program handled that in 12 minutes. In the end, just use what you feel comfortable using.
[ 0.402741938829422, -0.22541259229183197, -0.1127457469701767, 0.2756921648979187, -0.16583546996116638, -0.22766026854515076, 0.055493440479040146, -0.01063560601323843, -0.1966528296470642, -0.509901762008667, 0.20628464221954346, 0.5959564447402954, 0.13724197447299957, -0.17320407927036...
I need to store a list of key value pairs of (integer, boolean) in .NET When I use a dictionary it re-orders them. Is there a built in collection that will handle this. ``` List<KeyValuePair<int, bool>> l = new List<KeyValuePair<int, bool>>(); l.Add(new KeyValuePair<int, bool>(1, false...
[ 0.030186966061592102, -0.011812803335487843, 0.2960992157459259, -0.2953893542289734, 0.3753446936607361, 0.1250704973936081, 0.33397841453552246, -0.25297683477401733, 0.13717415928840637, -0.8563173413276672, -0.08494707196950912, 0.5279052257537842, -0.38415810465812683, -0.036687459796...
Specifically, when you create an interface/implementor pair, and there is no overriding organizational concern (such as the interface should go in a different assembly ie, as recommended by the s# architecture) do you have a default way of organizing them in your namespace/naming scheme? This is obviously a more opini...
[ 0.6072763204574585, 0.17130789160728455, -0.14692795276641846, 0.0758623257279396, -0.2904949486255646, -0.03945787250995636, 0.07674715667963028, -0.12504728138446808, -0.1732119917869568, -0.9071677923202515, -0.06772872805595398, 0.5690075755119324, -0.24779900908470154, -0.139935493469...