text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
into a separate library for the main and the test app. If you can't then I don't see that what you are doing is too bad an alternative.
If you are having to link other object files not under test then that is a sign of dependencies that need to be broken, for which you have the perfect book.
We have similar problems a... | [
0.5474449992179871,
0.021267559379339218,
-0.080839604139328,
0.5186854004859924,
0.16431684792041779,
-0.3625424802303314,
0.18407876789569855,
0.029848214238882065,
-0.1394074708223343,
-0.4757665991783142,
-0.01990875042974949,
0.4409829378128052,
-0.23701655864715576,
0.241184651851654... | |
Aspell-net is a port of the GNU Aspell for .Net Framework. The library itself is open source, and is under the LGPL license, but the english dictionary for aspell is mentioned as copyrighted on the sourceforge.net project home page at <http://aspell-net.sourceforge.net/>
Did any of you guys use aspell-net before? and ... | [
0.1557931751012802,
0.17984287440776825,
0.4379230737686157,
-0.09222117811441422,
-0.5433529615402222,
-0.1576525866985321,
0.3897514343261719,
0.26952171325683594,
-0.19887450337409973,
-0.3368506133556366,
-0.3009640872478485,
0.316618949174881,
-0.4326767027378082,
-0.13733696937561035... | |
y) (x y))`; call `x` with `y` as only parameter.
* `(lambda (x) (* x x))`; evaluate to the square of its parameter.
* `(* 3 3)`; evaluate to 9
So the whole thing means: "call the square function with the 9 as parameter".
EDIT: The same thing could be written as
```
((lambda (x) (* x x))
(* 3 3))
```
I guess the i... | [
0.11899720132350922,
-0.12471513450145721,
0.34712648391723633,
-0.2897907793521881,
-0.426376074552536,
0.13789644837379456,
0.22031693160533905,
-0.46164923906326294,
-0.12698057293891907,
-0.12051883339881897,
-0.35905590653419495,
0.3963058292865753,
-0.45087930560112,
-0.2434606403112... | |
I'm setting up my first site using the asp authentication provider and using the built in asp.net login control.
My question, is the password encrypted or hashed as it's sent to the server using the asp.net login control? or do I need to use https/ssl to accomplish this?
Thanks
Go with HTTPS.
Per [MSDN](http://msdn.... | [
0.26271358132362366,
-0.0653151124715805,
0.15183879435062408,
0.08118976652622223,
0.18407627940177917,
-0.13994674384593964,
0.0664224773645401,
0.1027405634522438,
-0.12438786029815674,
-0.7849557399749756,
-0.27688276767730713,
0.43775036931037903,
-0.156752347946167,
0.001668425044044... | |
Simple question that keeps bugging me.
Should I HTML encode user input right away and store the encoded contents in the database, or should I store the raw values and HTML encode when displaying?
Storing encoded data greatly reduces the risk of a developer forgetting to encode the data when it's being displayed. Howe... | [
0.5135529041290283,
0.2788408398628235,
0.15978620946407318,
0.23535500466823578,
-0.19833537936210632,
-0.19144868850708008,
0.14948487281799316,
0.006517787929624319,
0.020530899986624718,
-0.7979326248168945,
0.192486971616745,
0.37298738956451416,
-0.09648408740758896,
-0.0058107748627... | |
it's viewed at a certain point. the flow should be something similar to:
```
sanitize user input -> protect against sql injection -> db -> encode for display
```
think about a situation where you might want to display the information as an RSS feed instead. having to redo any HTML specific encoding before you re-dis... | [
0.732015073299408,
-0.03155723586678505,
0.0668618381023407,
0.19342216849327087,
-0.20446988940238953,
-0.6141678094863892,
0.25911638140678406,
0.10076659917831421,
0.3595220446586609,
-0.40937599539756775,
-0.25731873512268066,
0.5222378969192505,
-0.4310963451862335,
-0.201944395899772... | |
There are multiple values I have been storing in ASP.NET configSections sections for each "module". I have been wondering if they even belong in these files at all.
The background stands at: These are multiple instances of the web application deployed. All use the same database but have their own settings.
I'm sure t... | [
0.5565614104270935,
0.04207807034254074,
-0.03756795823574066,
0.3527024984359741,
0.11897233873605728,
0.1890089511871338,
-0.005339269060641527,
-0.12710034847259521,
-0.3643013834953308,
-0.5537202954292297,
-0.03474312648177147,
0.0795900970697403,
-0.03646872937679291,
0.3049730956554... | |
settings for each module in each site. Some of the options I'm unsure of include:
* For ModuleA, Show/Hide Option
* For ModuleB, What is the terminology to be used for this field
* For ModuleC, Allow end user to perform X action
Mmm these sounds like things that you might want be able to change at runtime for your app... | [
0.6457265019416809,
-0.20699527859687805,
0.5959421992301941,
-0.10852058976888657,
0.20445987582206726,
-0.14533723890781403,
0.23151855170726776,
-0.26396268606185913,
-0.39428645372390747,
-0.425108939409256,
-0.21552205085754395,
0.7725489139556885,
-0.4287843704223633,
-0.213305696845... | |
would probably move them into the DB if it is not alot of effort. | [
0.25280341506004333,
0.08846882730722427,
0.3439424932003021,
0.14144867658615112,
0.07712022215127945,
0.07516483962535858,
0.2384032905101776,
-0.28330886363983154,
-0.01593383215367794,
-0.7440506815910339,
0.026890911161899567,
0.2656879425048828,
0.14577406644821167,
0.267770379781723... | |
Our company has thousands of PDF documents. How do we create a simple search engine using Lucene, Solr or Nutch? We'll provide a basic Java/JSP web page were people can type in words and perform basic and/or queries then show them the document links of all matching PDF's.
None of the projects in the Lucene family can n... | [
0.29474300146102905,
0.1597198098897934,
0.3587535619735718,
0.4273455739021301,
0.2311560958623886,
-0.22118215262889862,
-0.5201442837715149,
0.3426876664161682,
-0.04595768824219704,
-0.5940777063369751,
-0.20332671701908112,
0.5353924036026001,
0.2439740151166916,
0.1800096184015274,
... | |
Thousands of documents really isn't *that* many, so you might be able to get away with a lighter weight alternative.
That said, I would still recommend looking at Solr - it's much, much easier to set up than Lucene, has support for backups, replication, etc., as well as a nifty JSON interface which would fit your use ... | [
0.24000172317028046,
0.002631061477586627,
0.42741858959198,
0.4326436519622803,
-0.07627614587545395,
-0.3041093051433563,
-0.01881805807352066,
0.16022241115570068,
-0.49333852529525757,
-0.5374375581741333,
-0.13767170906066895,
0.1518496870994568,
0.24525676667690277,
0.097658306360244... | |
I have been reading the [MSDN](http://msdn.microsoft.com/en-us/library/ms997565.aspx) documentation on subclassing and I have been successful in handling events in a subclass
My issue is with passing messages back to the original WndProc.
As an example, if I have a window, with a sub-classed groupbox control and a bu... | [
-0.308493971824646,
-0.08152750879526138,
0.04787822812795639,
-0.36727631092071533,
-0.03463813662528992,
-0.1052403375506401,
0.32098710536956787,
0.1433563083410263,
-0.23819555342197418,
-0.5836068391799927,
-0.27453023195266724,
0.4938187599182129,
-0.38837486505508423,
0.213150322437... | |
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
return CallWindowProc(oldProc, hwnd, uMsg, wParam, lParam);
}
```
Where oldProc is:
```
FARPROC oldProc = (FARPROC)SetClassLong(group_box, GCL_WDPROC, (DWORD)SubCLassFunc);
```
And where the window and groupbox and button are:
```
HWND... | [
-0.40250155329704285,
0.0028686088044196367,
0.8293322324752808,
-0.2943483591079712,
0.2865901291370392,
0.28990358114242554,
0.23991018533706665,
-0.2562698423862457,
0.17290310561656952,
-0.8040992617607117,
-0.44465652108192444,
0.5752245187759399,
-0.16919220983982086,
0.1837211549282... | |
NULL,
NULL,
hInstance,
0);
HWND group_box = CreateWindowEx(
0,
TEXT("BUTTON"),
TEXT("Group Box"),
WS_CHILD | WS_VISIBLE | BS_GROUPBOX,
8,
8,
275,
350,
window,
NULL,
hInstance,
0);
HWND push_button = CreateWindowEx(
0,
TEXT("BUTTON"),
TEXT("Push B... | [
-0.10902619361877441,
0.1526249796152115,
0.3638875484466553,
-0.3188193440437317,
0.10647787898778915,
0.6954762935638428,
0.3365480601787567,
-0.43959978222846985,
-0.3636918067932129,
-0.5520261526107788,
-0.46011415123939514,
-0.06916434317827225,
-0.523429811000824,
0.2742507457733154... | |
50,
100,
100,
25,
group_box,
(HMENU)PUSH_BUTTON,
hInstance,
0);
```
I can handle the button events in the SubClassFunc, but what I want to do is pass them back to the window WndProc. It seems that CallWindowProc isn't doing this, or I may be totally wrong in how CallWindowProc works.
The b... | [
0.055955857038497925,
-0.05797227844595909,
0.6277002096176147,
-0.32531630992889404,
0.13448059558868408,
0.4044157862663269,
0.142035111784935,
-0.2696722447872162,
-0.10314983874559402,
-0.6317108273506165,
-0.24602769315242767,
0.3134812116622925,
-0.38774681091308594,
0.22905652225017... | |
original window procedure using `CallWindowProc`.
If you want the button notifications to go to the parent window (i.e, `window` in your code), you could either set the button's parent to `window` instead of `group_box`, or use `PostMessage` from within `SubClassFunc` to post the message (`WM_COMMAND` or `WM_NOTIFY` a... | [
-0.035535506904125214,
-0.3970576524734497,
0.39156320691108704,
-0.2978722155094147,
0.012862634845077991,
0.09986969083547592,
0.04373611509799957,
-0.08402553200721741,
-0.21904736757278442,
-0.6477742195129395,
-0.18439118564128876,
0.47605374455451965,
-0.5125004649162292,
0.220161288... | |
instead, to subclass individual windows rather than the entire class.
Edit: The group box's original window procedure doesn't send `WM_COMMAND` messages to its parent. This is explained in Charles Petzold's [Programming Windows](http://www.charlespetzold.com/pw5/) book:
> The group box, which has the `BS_GROUPBOX` s... | [
-0.1842673271894455,
0.056830648332834244,
0.11916069686412811,
-0.32794445753097534,
-0.07110718637704849,
0.19312693178653717,
0.4168957471847534,
-0.19889822602272034,
-0.39241793751716614,
-0.5148797035217285,
-0.1962832808494568,
0.036140359938144684,
-0.765904426574707,
0.29413598775... | |
First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built for MSWin32-x86-multi-thread).
I've just emerged from a three hour long debugging session, trying to find the source of an error. I found there was simply no error, but for some reason ADO's connection object was getting the `Errors.Co... | [
0.05412866175174713,
0.15877529978752136,
0.6453549265861511,
-0.2501859962940216,
-0.1439611166715622,
0.11030804365873337,
0.08127643167972565,
-0.6786521673202515,
-0.22474457323551178,
-0.40637364983558655,
0.23527565598487854,
0.6978995203971863,
-0.46578460931777954,
0.11396466940641... | |
a Perl sub more or less like:
```
sub execute_SQL {
# $conn is an already opened ADO connection object
# pointing to my SQL Server
# $sql is the T-SQL statement to be executed
my($conn, $sql) = @_;
$conn->Execute($sql);
my $error_collection = $conn->Errors();
my $ecount = $error_collection->Count;
if (... | [
-0.14293958246707916,
-0.2862413227558136,
0.7431092262268066,
-0.06403043866157532,
-0.26918795704841614,
0.20673209428787231,
0.34976327419281006,
-0.19699570536613464,
-0.01029370166361332,
-0.22533810138702393,
-0.3484155237674713,
0.08619630336761475,
-0.5235201716423035,
0.2911515831... | |
$error->{Description} . "\n";
}
return 1;
}
```
Somewhere else, in the main Perl code, I'm calling the above sub as:
```
execute_SQL( $conn, 'EXEC dbo.My_Sample' );
```
In the end I got it that *every* PRINT statement causes a new pseudo-error to be appended to the ADO Errors collection. The quick fix I implem... | [
0.18839402496814728,
0.12054745852947235,
0.2253015786409378,
-0.3345649838447571,
-0.26912176609039307,
-0.08962184935808182,
0.5276071429252625,
-0.0608011819422245,
-0.2578684091567993,
-0.28362712264060974,
-0.014117973856627941,
0.5416421294212341,
-0.6492354869842529,
0.1184613332152... | |
knowledge base [note that the RAISERROR and PRINT statements are returned through the ADO errors collection](http://support.microsoft.com/kb/194792) | [
0.0637136697769165,
0.33604684472084045,
0.09831695258617401,
0.3019360601902008,
0.31833621859550476,
-0.22007235884666443,
0.1986505389213562,
-0.17067205905914307,
-0.10894865542650223,
-0.2379882037639618,
-0.35274243354797363,
0.007301228120923042,
0.09616483002901077,
0.2277449667453... | |
The other day I set up an Ubuntu installation in a VM and went to gather the tools and libraries I figured I would need for programming mostly in C++.
I had a problem though, where to put things such as 3rd party source libraries, etc. From what I can gather, a lot of source distributions assume that a lot of their de... | [
0.42512306571006775,
0.2737964987754822,
-0.011803281493484974,
-0.12214881181716919,
0.019127167761325836,
-0.32192984223365784,
0.06619936227798462,
0.2524775266647339,
-0.22468985617160797,
-0.6243739724159241,
0.040994592010974884,
0.5663200616836548,
-0.33454445004463196,
0.3539211153... | |
all source code. `C:\code`. In this directory, I have a directory for all 3rd party libraries, `c:\code\thirdparty\libs`. This way I can easily set up relative paths for all of the dependencies of any projects I write or come across and wish to compile. The reason I am interested in setting up a linux programming envir... | [
0.14914406836032867,
0.39469555020332336,
0.32863858342170715,
-0.016742950305342674,
-0.07879243046045303,
-0.2999529540538788,
0.22621533274650574,
0.2371007800102234,
-0.18902082741260529,
-0.8533879518508911,
-0.22336025536060333,
0.5200880169868469,
-0.3758350610733032,
0.238733947277... | |
projects and libraries on linux that is easy to maintain and easy to use.
Short answer: don't do a "heaps of code in local dir" thing.
Long answer: don't do a "heaps of code in local dir" thing, because it will be nightmare to keep up-to-date, and if you decide to distribute your code, it will be nightmare to package ... | [
0.6744048595428467,
-0.12053636461496353,
-0.3141748309135437,
0.21431705355644226,
-0.1544487625360489,
-0.32249021530151367,
0.2392808347940445,
0.14274924993515015,
-0.40858709812164307,
-0.6826968789100647,
-0.2949441075325012,
0.3235434591770172,
-0.2694150507450104,
0.022294852882623... | |
about upgrades and DONT do that).
Better, use "stow" or "installwatch" (or both) to install to per-library dirs (/usr/local/stow/libA-ver123) and then symlink files from there to /usr/local or /usr/ (stow does the simlinking part). Or just package the lib for your distribution. | [
0.6356565952301025,
-0.1967080682516098,
0.3716540038585663,
0.1515437662601471,
0.17210061848163605,
-0.48446908593177795,
0.19197805225849152,
0.11296692490577698,
0.09016016125679016,
-0.8034851551055908,
-0.38579031825065613,
1.083797812461853,
-0.0751316100358963,
-0.22496768832206726... | |
We have 2 new GIS programmer/analyst in our department (new to programming and ArcObjects) and I don't feel I'm qualified enough or have the time to teach them. So I'm looking for entry level books/tutorials for them to use as reference.
The only books I can find for developing Extensions for ArcMap are written for VB... | [
0.7146162986755371,
0.19089803099632263,
-0.17211072146892548,
0.07855749130249023,
-0.04453492909669876,
-0.018966026604175568,
0.21080221235752106,
0.2124471515417099,
-0.07401882112026215,
-0.5970445871353149,
0.3232749402523041,
0.8055437207221985,
0.3099449872970581,
-0.06689481437206... | |
problem right now. You run the risk of getting two developers who program neither ArcObjects nor C# very well.
Teach them to be good developers first. Do this by having them work on non-ArcObjects code (whether that means high-level ArcGIS ADF or complete non-GIS apps is up to you). Make sure they understand the basic... | [
0.3246646821498871,
0.10321839898824692,
-0.08663290739059448,
0.29783740639686584,
-0.11719802767038345,
-0.25246065855026245,
0.11843720823526382,
-0.2586801052093506,
-0.05729031562805176,
-0.7187477946281433,
-0.14409607648849487,
0.9975334405899048,
-0.08950933068990707,
-0.2402129769... | |
the modern tools. A bright developer can do it, but your average one will probably learn a lot of bad habits.
Your best bet is to bite the bullet and send them to the developer workshops. Sometimes, ESRI offers classes at a regional office that might be more local to you. Alternatively, send them to the Developer Summ... | [
0.3939467966556549,
-0.1478172391653061,
0.07724875211715698,
0.5151469707489014,
0.0704975351691246,
-0.1810983419418335,
0.1527760624885559,
0.012653928250074387,
-0.06083623692393303,
-0.7454812526702881,
-0.27494868636131287,
1.0403708219528198,
0.5361184477806091,
-0.29772326350212097... | |
learn how to use ArcMap***. The single most important useful thing they can do to learn ArcObjects is to learn ArcMap. Understanding how it works in the desktop product can frequently reveal how to use the API. An easy example is projecting data. In ArcMap, you must use a tool to explicitly project data. Simply "settin... | [
0.572949230670929,
-0.17450961470603943,
0.0947660580277443,
0.6162939071655273,
-0.15071776509284973,
-0.21228481829166412,
0.013249944895505905,
-0.2355930060148239,
-0.014735202305018902,
-0.6532303094863892,
0.13587656617164612,
0.7491353750228882,
-0.17941245436668396,
-0.258406847715... | |
Given the hash of a blob, is there a way to get a list of commits that have this blob in their tree?
Both of the following scripts take the blob’s SHA1 as the first argument, and after it, optionally, any arguments that [`git log`](http://git-scm.com/docs/git-log) will understand. E.g. `--all` to search in all branches... | [
-0.060778431594371796,
0.0638587474822998,
0.34200701117515564,
-0.422008216381073,
-0.3338121175765991,
0.07531015574932098,
0.29586175084114075,
-0.012040688656270504,
-0.3444526493549347,
-0.6875167489051819,
-0.4082057774066925,
0.34150174260139465,
-0.3938838243484497,
0.0885874181985... | |
git ls-tree -r $tree | grep -q "$obj_name" ; then
echo $commit "$subject"
fi
done
```
And an optimised version in Perl, still quite short but much faster:
```perl
#!/usr/bin/perl
use 5.008;
use strict;
use Memoize;
my $obj_name;
sub check_tree {
my ( $tree ) = @_;
my @subtree;
{
op... | [
-0.11490491032600403,
-0.008704355917870998,
0.7381599545478821,
-0.49321773648262024,
-0.05907462537288666,
0.3950749337673187,
0.4461025297641754,
-0.21283869445323944,
-0.04559454321861267,
-0.6382676959037781,
-0.45440319180488586,
0.45944923162460327,
-0.5276415348052979,
-0.022301068... | |
while ( <$ls_tree> ) {
/\A[0-7]{6} (\S+) (\S+)/
or die "unexpected git-ls-tree output";
return 1 if $2 eq $obj_name;
push @subtree, $2 if $1 eq 'tree';
}
}
check_tree( $_ ) && return 1 for @subtree; | [
-0.31194278597831726,
-0.23118330538272858,
0.34976550936698914,
-0.5890210866928101,
0.1784714013338089,
0.31202372908592224,
0.4536736011505127,
-0.13888391852378845,
-0.0869193747639656,
-0.35597366094589233,
-0.5888115167617798,
0.4437682032585144,
-0.462417870759964,
0.105345115065574... | |
return;
}
memoize 'check_tree';
die "usage: git-find-blob <blob> [<git-log arguments ...>]\n"
if not @ARGV;
my $obj_short = shift @ARGV;
$obj_name = do {
local $ENV{'OBJ_NAME'} = $obj_short;
`git rev-parse --verify \$OBJ_NAME`;
} or die "Couldn't parse $obj_short: $!\n";
chomp $obj_name;
open my $log, ... | [
-0.16542524099349976,
0.2896018624305725,
0.45939844846725464,
-0.3416931927204132,
0.24031463265419006,
0.2942865192890167,
0.6150824427604675,
-0.23579467833042145,
-0.12245739251375198,
-0.5287174582481384,
-0.5443708896636963,
0.529482901096344,
-0.2624291181564331,
0.18386393785476685... | |
I am trying to prevent data races in a multihreaded server. My problem is the following: there is a `List<RServer>`, the type `RServer` is a class with several fields. Now, the server has several threads all running at the same time and they can modify both the `List` (adding more items) and the individual `RServer` in... | [
0.10906457155942917,
0.147088885307312,
0.31489887833595276,
0.025943554937839508,
-0.09607153385877609,
-0.09292470663785934,
0.14001868665218353,
-0.2693711221218109,
-0.43355226516723633,
-0.5636862516403198,
0.10939870029687881,
0.3110169470310211,
-0.7336795926094055,
0.37882068753242... | |
`RServer` instance) in a `lock`. Is this safe? What happens if a thread tries to lock a `RServerLock` *while* another one is locking it?
If you have a contended lock, the second thread has to wait until the first releases the lock.
Your plan sounds *nearly* okay - but you need to lock when *reading* data as well, to m... | [
0.21575459837913513,
0.061890117824077606,
0.5366526246070862,
0.12344758212566376,
0.21132424473762512,
-0.33849576115608215,
0.44120875000953674,
-0.24963624775409698,
-0.5124026536941528,
-0.5250034928321838,
-0.07124442607164383,
0.39507925510406494,
-0.4375385046005249,
0.105283096432... | |
the same time in a different thread.
If you can avoid doing this as much as possible, your life will be easier :) Immutable types make threading a lot simpler.
Don't forget that if you ever have code which will need two locks at the same time (e.g. adding one RServer and modifying another, atomically) you *must* make... | [
0.4858023226261139,
-0.20765239000320435,
0.22887735068798065,
0.25229883193969727,
0.12860287725925446,
-0.38603830337524414,
0.37906700372695923,
-0.00665139127522707,
-0.6984276175498962,
-0.6963306665420532,
-0.1032344177365303,
0.3590036630630493,
-0.4342300295829773,
0.21871548891067... | |
[threading tutorial](http://pobox.com/~skeet/csharp/threads) or [Joe Albahari's](http://www.albahari.com/threading/default.aspx) for more details. Also, if you're interested in concurrency, Joe Duffy has an [excellent book](https://rads.stackoverflow.com/amzn/click/com/032143482X) which is coming out very soon. | [
-0.07042613625526428,
0.22413483262062073,
0.014928285963833332,
0.10730723291635513,
0.12041563540697098,
-0.2615503668785095,
0.3233654797077179,
0.18580152094364166,
-0.6910938024520874,
-0.29601290822029114,
0.06591543555259705,
0.24209390580654144,
-0.1562810242176056,
-0.104277260601... | |
I have a class that I need to binary serialize. The class contains one field as below:
```
private T[,] m_data;
```
These multi-dimensional arrays can be fairly large (hundreds of thousands of elements) and of any primitive type. When I tried standard .net serialization on an object the file written to disk was larg... | [
0.29305166006088257,
0.11102178692817688,
-0.04140093922615051,
0.07803056389093399,
-0.09950386732816696,
-0.001975006191059947,
0.12097184360027313,
0.05434642732143402,
-0.2964724004268646,
-0.5401877760887146,
0.05756315216422081,
0.43705934286117554,
-0.3791024088859558,
0.38814532756... | |
a byte array of the memory stream following serializing with some success, but not as quick / compressed as I had hoped.
My question is, should I try and write a custom serializer to optimally serialize this array for the appropriate type (this seems a little daunting), or should I use standard .net serialization and ... | [
0.1895831823348999,
-0.07157548516988754,
0.10663372278213501,
0.1203509196639061,
-0.18663322925567627,
0.002403568709269166,
-0.004485319368541241,
-0.17125746607780457,
-0.4010438024997711,
-0.6695787906646729,
-0.10785488039255142,
0.5319663882255554,
-0.3208302855491638,
-0.0250959582... | |
makes an int[1000][10000] and writes it out using the BinaryFormatter to 2 files - one zipped and one not.
The zipped file is 1.19 MB (1,255,339 bytes)
Unzipped is 38.2 MB (40,150,034 bytes)
```
int width = 1000;
int height = 10000;
List<int[]> list = new List<int[]>();
for (int i = 0... | [
-0.07410871982574463,
0.004686544183641672,
0.6746944785118103,
-0.2393050342798233,
0.08397942781448364,
0.6992654800415039,
0.18429186940193176,
-0.51041179895401,
-0.374429315328598,
-0.6714679002761841,
-0.2741848826408386,
0.1007302924990654,
-0.09440185129642487,
-0.00457152444869279... | |
list.Add(Enumerable.Range(0, width).ToArray());
}
int[][] bazillionInts = list.ToArray();
using (FileStream fsZ = new FileStream("c:\\temp_zipped.txt", FileMode.Create))
using (FileStream fs = new FileStream("c:\\temp_notZipped.txt", FileMode.Create))
using (GZipStream gz = new G... | [
0.2916337549686432,
-0.3357042670249939,
0.6158641576766968,
-0.21274857223033905,
0.14022743701934814,
0.3565790057182312,
0.16520744562149048,
-0.5244457721710205,
-0.49227651953697205,
-0.7609941959381104,
-0.6523504257202148,
0.6213402152061462,
-0.7133782505989075,
-0.0318826921284198... | |
bazillionInts);
f.Serialize(fs, bazillionInts);
}
```
I can't think of a better/easy way to do this. The zipped version is pretty damn tight.
I'd go with the BinaryFormatter + GZipStream. Making something custom would not be fun at all.
---
[edit by MG]
I hope you won't be offended by an edit, ... | [
0.11930261552333832,
-0.15906159579753876,
0.5042270421981812,
-0.11684462428092957,
0.10974390804767609,
0.26016736030578613,
0.4120432734489441,
-0.005644033197313547,
-0.3523404896259308,
-0.5914044380187988,
-0.42264437675476074,
0.4525397717952728,
-0.6541255712509155,
0.0121757006272... | |
Random rand = new Random(123456);
int[,] bazillionInts = new int[width, height];
for(int i = 0 ; i < width;i++)
for (int j = 0; j < height; j++)
{
bazillionInts[i, j] = rand.Next(50000);
}
```
And try | [
0.2302687168121338,
-0.39067646861076355,
-0.00651715649291873,
-0.09631898999214172,
0.03882434591650963,
0.4427861273288727,
0.07922375947237015,
-0.5074127912521362,
-0.2700251638889313,
-0.4667125642299652,
0.04240361601114273,
0.337948203086853,
-0.15632601082324982,
0.385134428739547... | |
it; you'll see `temp_notZipped.txt` at 40MB, `temp_zipped.txt` at 62MB. Not so appealing... | [
0.18689516186714172,
-0.5449604988098145,
0.4992988109588623,
0.3197106420993805,
0.23346556723117828,
0.16110347211360931,
0.0527447871863842,
0.42974361777305603,
-0.32158756256103516,
-0.508068323135376,
-0.06296587735414505,
0.3797156512737274,
-0.18729914724826813,
-0.1851169764995575... | |
I'm pretty sure stackoverflow.com is created with ASP.NET, but no matter where I click I see no .aspx extension in the address bar.
How it is done and is there a particular reason for this?
In the case of stackoverflow, they use ASP.NET MVC rather than ASP.NET web forms. With web forms, the url is pointing to a file on... | [
0.2850205600261688,
0.04719744250178337,
0.5244495868682861,
0.12512336671352386,
-0.019334595650434494,
-0.3785835802555084,
-0.05552038177847862,
-0.3295980989933014,
-0.4207589030265808,
-0.3246471881866455,
0.22309599816799164,
0.415017306804657,
-0.28060200810432434,
0.096055023372173... | |
I am new to MySQL and PHP(as you can probably tell) and I was wondering if anybody knew an easy way to import a CSV file into a MySQL table.
> "There are any number of ways to input
> csv into mysql depending in what kind
> of access you have, if you can use the
> mysql client directly there is a
> command to load... | [
0.5695328712463379,
0.3061034679412842,
0.22126954793930054,
0.07196654379367828,
-0.2720067799091339,
-0.1921650916337967,
-0.11261475086212158,
0.23432692885398865,
-0.3456224799156189,
-0.6939098834991455,
0.2809392809867859,
0.4239580035209656,
0.01899070478975773,
0.16361956298351288,... | |
thing."
That is something a friend told me to do, is that the easiest/best way to do it? If it is would someone mind explaining it to me?
Thank you
here's the step-by-step to extend Mrgreen's answer :
1. install phpmyadmin
2. choose your database
3. choose your table
4. 'Import'
5. select your CSV file
6. set 'Forma... | [
0.4588240683078766,
-0.06751495599746704,
0.46698901057243347,
0.23203584551811218,
0.15043796598911285,
-0.48598355054855347,
0.22527505457401276,
-0.188093900680542,
-0.28748488426208496,
-0.43949201703071594,
0.01028612069785595,
0.4319491982460022,
-0.29035893082618713,
-0.199170872569... | |
Suppose you have two models, User and City, joined by a third model CityPermission:
```
class CityPermission < ActiveRecord::Base
belongs_to :city
belongs_to :user
end
class City < ActiveRecord::Base
has_many :city_permissions
has_many :users, :through => :city_permissions
end
class User < ActiveRecord::Base... | [
-0.21473485231399536,
-0.11893624812364578,
0.7186599373817444,
0.1307043731212616,
0.18840520083904266,
0.14328882098197937,
-0.19214192032814026,
-0.454799622297287,
-0.12337636202573776,
-0.8845875263214111,
-0.028475303202867508,
0.20174938440322876,
-0.23603855073451996,
0.11675855517... | |
the join table, as well as quick lookups within the table itself, or is there some other better way? To restate this a bit differently, will these indexes, given `city` and `user` are instance variables of class City and User, allow `city.users`, `city.city_permissions`, `user.cities`, and `user.city_permissions` to al... | [
0.05264071002602577,
-0.08835691213607788,
0.6370040774345398,
0.33012640476226807,
-0.13694851100444794,
-0.1610269397497177,
-0.03953684866428375,
-0.11857165396213531,
-0.173185795545578,
-0.6189481616020203,
0.05976441130042076,
0.08789147436618805,
-0.3003960847854614,
0.0409405827522... | |
database you're on you could then run that SQL through an Explain plan (or whatever tool exists, I'm thinking Oracle here)
To simplify your code, you could look at using [`has_and_belongs_to_many`](http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#M001114) as well. That would let you get r... | [
0.7403313517570496,
-0.18096598982810974,
0.14526857435703278,
0.40381795167922974,
-0.08614024519920349,
-0.3687114417552948,
0.11319779604673386,
-0.043815501034259796,
-0.18430861830711365,
-0.5007191896438599,
0.3533785045146942,
0.3591724634170532,
-0.5695590972900391,
0.3074576556682... | |
I'm looking at opening up a website in the near future and aside from the standard domain registration costs, I'm unsure of how to proceed. I'm expecting the volume of data to be quite significant and looking at many webhosts it seems that while they might offer extreme bandwidth caps, I've been told they often suspend... | [
0.7661060094833374,
0.20484381914138794,
0.35166963934898376,
0.15802089869976044,
0.04192064329981804,
-0.31401416659355164,
0.39438769221305847,
0.2837439179420471,
-0.3614099323749542,
-0.3288671672344208,
0.15038305521011353,
0.4591623842716217,
0.14593534171581268,
0.35994672775268555... | |
my own set of server's would be best, I'm trying to find a relatively cost efficient way to do it at the start.
Check out [Amazon S3](http://aws.amazon.com/s3/), I think they just revised their pricing model... | [
0.5975968241691589,
-0.0948651134967804,
0.14586874842643738,
-0.010722777806222439,
-0.03161412104964256,
0.17564436793327332,
0.15299193561077118,
0.36304599046707153,
0.07336054742336273,
-0.6089139580726624,
0.48218026757240295,
0.32010331749916077,
0.3700738847255707,
-0.0436348915100... | |
This is what I have, which works in IE7, but not in Firefox:
```
@media screen { @import 'screen.css'; }
```
It works outside of the @media block in Firefox:
```
@import 'screen.css';
```
**UPDATE:**
This works:
```
@media screen {
.yui-d3f
{
border: 1px solid #999;
height: 250px;
... | [
0.17544034123420715,
-0.03359653428196907,
0.8167941570281982,
-0.2331860214471817,
0.03517208620905876,
-0.6125448346138,
0.047706786543130875,
-0.19836397469043732,
-0.2626223564147949,
-0.7541933059692383,
-0.30358004570007324,
0.7579406499862671,
-0.2626078426837921,
0.0089194234460592... | |
appear inside of any block. If you want an `@import` to apply to only one media type, specify that after the imported URI.
Here is the pertinent section of the CSS2 specification: [6.3 The `@import` rule](http://www.w3.org/TR/CSS2/cascade.html#at-import "6.3 The @import rule"). | [
0.2814760208129883,
0.0338258296251297,
0.4636191427707672,
-0.20128050446510315,
-0.11706315726041794,
-0.1007024496793747,
0.1497563272714615,
-0.040285225957632065,
-0.36206135153770447,
-0.4886409640312195,
-0.420155793428421,
0.23293201625347137,
-0.6813831925392151,
0.068968936800956... | |
I am starting to develop an Eclipse plugin (technically, an OSGi plugin) and one of the first problems I've run into is that I can't seem to control the commons-logging output as I normally would.
I've included the commons-logging package in the plugin dependencies, and indeed, when I log something (at INFO or higher ... | [
0.1956380158662796,
0.05017315223813057,
0.15050089359283447,
-0.1604761779308319,
-0.11221197992563248,
-0.37195929884910583,
0.23615634441375732,
-0.07191348075866699,
-0.2131045013666153,
-0.8469895124435425,
0.05476729944348335,
0.7604967951774597,
-0.19260749220848083,
-0.038523662835... | |
in that properties file have any impact on the behavior of the logger.
Here's the log4j.properties file:
```
# Log4j Logging levels, in order of decreasing importance are:
# FATAL, ERROR, WARN, INFO, DEBUG, TRACE
#
# Root logger option
log4j.rootLogger=ERROR,stdout
#,LOGFILE
# Direct log messages to stdout
log4j... | [
-0.3005572259426117,
0.3484761714935303,
0.3833300471305847,
-0.013658244162797928,
0.0041804006323218346,
0.0084611801430583,
0.882095217704773,
-0.6162209510803223,
-0.2692079544067383,
-0.6414328813552856,
0.007986986078321934,
0.611833930015564,
-0.1818550080060959,
0.01750918850302696... | |
start
WARNING: warn_message
Oct 21, 2008 11:01:23 PM com.stottlerhenke.sentinel.client.Activator start
INFO: info_message
```
**Update:**
I have now tried various combinations of:
* org.osgi.service.log.LogService et al.
* [slf4j](http://www.slf4j.org/)
* [Log4J](http://logging.apache.org/log4j/)
* [Commons-logging... | [
0.34436672925949097,
0.27057603001594543,
0.6800468564033508,
-0.2668747901916504,
-0.2659439444541931,
-0.39828255772590637,
0.867692768573761,
-0.15968568623065948,
-0.16865365207195282,
-0.5055385231971741,
0.04674653336405754,
0.6959853768348694,
-0.37549689412117004,
-0.16017787158489... | |
as suggested [here](http://www.eclipsezone.com/eclipse/forums/t99588.html), and still, the same result happens.
I've implemented a custom LogListener, and traced the entire path of a log message (as well as I know how, anyway) with System.out.println's, and debug messages *are* present right up until they are output b... | [
0.2088894248008728,
-0.17745882272720337,
0.4033310115337372,
0.16171427071094513,
-0.28893885016441345,
0.05574836581945419,
0.16283346712589264,
-0.10783714056015015,
-0.40534135699272156,
-0.6456291079521179,
0.11220084130764008,
0.4755673110485077,
-0.4755559265613556,
0.00221567461267... | |
com.acme.client.translation.interfaces,
com.acme.shared.osgi,
com.acme.utilities,
org.apache.log4j
```
The key difference is that the log4j was being used as a package, when it should have been used as a bundle. (I had a log4j jar in my lib dir from when I had expected Log4j to "just work" with OSGi.) The jar *doe... | [
0.16708514094352722,
0.009768291376531124,
0.1277157962322235,
-0.029383251443505287,
-0.4287720024585724,
-0.2911209166049957,
0.09259766340255737,
-0.17333151400089264,
-0.3237825036048889,
-0.521202564239502,
0.003247661981731653,
0.4680328965187073,
-0.2999732792377472,
0.0613036230206... | |
a bundle fragment to specify the logging config. [This link](http://www.eclipsezone.com/eclipse/forums/t99588.html) from [VonC](https://stackoverflow.com/questions/223875/logging-in-eclipseosgi-plugins#224821) gave me the info to do that. That entailed doing a number of things, unfortunately, the package with the incor... | [
0.5568724274635315,
-0.26993444561958313,
0.31754299998283386,
0.2107875645160675,
-0.3281852602958679,
-0.20463179051876068,
0.3341195285320282,
-0.4012451171875,
-0.5128294229507446,
-0.36789005994796753,
0.15471084415912628,
0.5372276902198792,
-0.18102508783340454,
-0.17160026729106903... | |
in the same OSGi environment, each with different log4j behavior -- one using my fragment settings, another using some random Eclipse logging settings, and finally the new bundle that didn't have any logging config.) Detailed comparisons of these three bundles revealed the difference in the Manifest.MF files, and now t... | [
0.47461408376693726,
-0.09879906475543976,
0.3032052218914032,
0.08486686646938324,
-0.4820258617401123,
-0.20686405897140503,
0.1937570720911026,
-0.12690193951129913,
-0.510246992111206,
-0.5883578062057495,
0.07031912356615067,
0.3708694577217102,
-0.07092855870723724,
-0.08732742071151... | |
How do you get Pro\*c to work within MSVC 6?
In otherwords compile a .pc file into a .cpp file.
In the **custom build tab** for the **.pc** file.
I pop this in the **outputs**. The output of **proc**, is a cpp file
```
$(ProjDir)\$(InputName).cpp
```
There are 2 lines in the **commands** window. One to set the MS... | [
0.09078438580036163,
-0.04098797217011452,
0.7112188935279846,
-0.18304826319217682,
0.1534373015165329,
0.40809524059295654,
0.2852246165275574,
-0.2856571078300476,
-0.13074593245983124,
-0.5665856599807739,
-0.13750667870044708,
0.45978593826293945,
-0.5330485701560974,
0.02100686542689... | |
to your project in order to compile it. If you need to debug, set your breakpoints in the .cpp file.
That pretty much covers it. | [
0.5974875688552856,
0.1693120002746582,
0.06498847156763077,
0.25852206349372864,
0.3706607520580292,
-0.4329577386379242,
-0.07322445511817932,
0.26691320538520813,
-0.3916456401348114,
-0.21446190774440765,
-0.2496362328529358,
0.28607630729675293,
-0.11129400879144669,
-0.09713213145732... | |
What are your favorite ways to encapsulate LINQ to SQL entity classes and data-context classes into business objects?
What have you found to work in a given situation?
Have you invented or taken to any specific patterns?
I've found a pattern which I think works best--In my case, at least.
I extend entity classes usi... | [
0.23301726579666138,
0.17037510871887207,
0.2766847312450409,
0.11773988604545593,
0.17889650166034698,
-0.06321675330400467,
-0.08391526341438293,
-0.22449994087219238,
-0.2075776755809784,
-0.3713501989841461,
0.06537606567144394,
0.5137215852737427,
-0.1139218881726265,
-0.1145374476909... | |
business logic:
```
/// <summary>
/// This class extends BusinessLogicDataContext.Products entity class
/// </summary>
public partial class Product
{
/// <summary>
/// New up a product by column: dbo.Products.ProductId in database
/// </summary>
public Product(Int32 id)
{
var dc = new Busin... | [
0.1761300265789032,
-0.07389861345291138,
0.6781594157218933,
-0.34180957078933716,
0.1574568748474121,
0.11161227524280548,
-0.0335015133023262,
-0.529049813747406,
-0.12651053071022034,
-0.2972445785999298,
-0.47325587272644043,
0.27462098002433777,
-0.28832945227622986,
0.50838011503219... | |
where p.ProductId == id
select p
).FirstOrDefault();
// if database-entry does not exist in database, exit
if (query == null) return;
/* if product exists, populate self (this._ProductId and
this._ProductName are both auto-generated private | [
-0.22616919875144958,
-0.26625001430511475,
0.5403152108192444,
-0.15674710273742676,
0.2767787277698517,
0.035963572561740875,
0.06125007942318916,
-0.13892754912376404,
0.13017447292804718,
-0.6762387752532959,
-0.07551783323287964,
0.23452621698379517,
-0.5449077486991882,
0.22582089900... | |
variables of the entity class which corresponds to the
auto-generated public properties: ProductId and ProductName) */
this._ProductId = query.ProductId;
this._ProductName = query.ProductName;
}
/// <summary>
/// Delete product
/// </summary>
public void Delete()
{
... | [
-0.18833208084106445,
-0.2826462686061859,
0.24638591706752777,
-0.3126455545425415,
0.1190541461110115,
0.40689295530319214,
-0.17876772582530975,
-0.3012281060218811,
-0.1270044595003128,
-0.17458021640777588,
-0.07471273094415665,
0.5824608206748962,
-0.44777241349220276,
0.259852558374... | |
if (this._ProductId == 0) return;
var dc = new BusinessLogicDataContext();
// delete entry in database
dc.Products.DeleteOnSubmit(this);
dc.SubmitChanges();
// reset self (you could implement IDisposable here)
this._ProductId = 0;
this._ProductName = "";
}
... | [
0.12057474255561829,
-0.04785306751728058,
0.6413132548332214,
-0.16853895783424377,
0.3172706365585327,
0.18671326339244843,
0.1324518471956253,
-0.47034797072410583,
-0.3179575800895691,
-0.5613951086997986,
-0.30303701758384705,
0.5758114457130432,
-0.43861064314842224,
0.29738810658454... | |
"A car"
// delete the product
p.Delete(); // p.ProductId: 0, p.ProductName: ""
```
Furthermore: LINQ to SQL entity classes are very open in nature. This means that the property corresponding to the *dbo.Products.ProductId* column implements both a getter and a setter--this field should not be changeable.
To my know... | [
0.15919668972492218,
0.3458942770957947,
0.3040832281112671,
0.17221014201641083,
0.1166314110159874,
0.2569682002067566,
-0.11124581098556519,
-0.24551185965538025,
-0.01774609088897705,
-0.44013872742652893,
-0.2644783556461334,
0.5596812963485718,
-0.15767204761505127,
0.248825922608375... | |
I have a web user control that contains several other (web user) controls and subscribes to events the children raise.
I saw someone somewhere in a similar situation providing Dispose() on the containing control and unregistering the events it had subscribed to.
Isn't it all going to be blown away when the request p... | [
0.21493637561798096,
0.10648815333843231,
0.22341075539588928,
0.5378444194793701,
0.14580495655536652,
-0.23105502128601074,
-0.2160772979259491,
-0.15112577378749847,
-0.24775469303131104,
-0.31840798258781433,
0.04935387894511223,
0.22202502191066742,
-0.09232605993747711,
0.34495624899... | |
are all in the same generation, I don't see how the container could be collected any sooner. The unregistering of the event handlers doesn't seem to be necessary. If the event publishers were longer lived objects than the container, then it would make some sense.
For more information, reference this [discussion](http:... | [
-0.017878210172057152,
-0.15060573816299438,
0.09726125001907349,
0.3820262551307678,
0.12043631821870804,
-0.31763285398483276,
-0.1040380448102951,
0.16495850682258606,
-0.5009636282920837,
-0.5304904580116272,
0.005138734821230173,
0.08120465278625488,
-0.15330958366394043,
0.3801182508... | |
I researched this a while ago and can't remember how to do it. I want to be able to prevent Firefox from running it's spell-checking functionality on certain input fields from within the page. I know it's possible but can't remember how to set it up.
Talk about having a big "duh" moment! I found the answer after some t... | [
0.30516836047172546,
0.4688720107078552,
0.4746186137199402,
-0.13815630972385406,
0.13600832223892212,
-0.2141817808151245,
0.7402722239494324,
-0.4300117790699005,
0.17511239647865295,
-0.35487982630729675,
-0.15127579867839813,
0.21652473509311676,
-0.26484552025794983,
-0.0426767878234... | |
Note: I am just consuming webservice I have no control over webservice code.
So in .net 2.0 I reference the webservice and see a class in the webservice namespace, say foobar. It's defined as:
```
public class foobar : System.Web.Services.Protocols.SoapHttpClientProtocol
```
but in .net 3.5 when i add a reference t... | [
0.38561350107192993,
0.409584641456604,
0.21695666015148163,
-0.23129521310329437,
-0.31046262383461,
-0.23555099964141846,
0.2559729218482971,
-0.015675591304898262,
-0.08026112616062164,
-0.9474003911018372,
0.05482764169573784,
0.7448713183403015,
-0.5539145469665527,
0.0316020511090755... | |
a similar problem when I upgraded from 2005 to 2008. I think what you are missing, when you click "Add Service Reference", a newer dialog comes up. click the Advanced button at the bottom, then on the next dialog that comes up, click the Add Web Reference button at the bottom, in the compatibility section. Then you'll ... | [
0.32409313321113586,
0.05841231718659401,
0.6477779746055603,
0.08813439309597015,
0.0445263609290123,
-0.13917309045791626,
0.2505275011062622,
-0.03181006386876106,
-0.07822426408529282,
-0.7141346335411072,
0.027170103043317795,
0.6536037921905518,
-0.33659884333610535,
0.13269986212253... | |
I am currently running gdb version 6.7.1 on Ubuntu Linux, and working in a C++ project.
Surprisingly I was trying to debug a constructor and I have found that local variables declared within the scope of the constructor are not followed or noticed by gdb. Is this a bug ?
Thanks for any information ..
It is a [bug](ht... | [
0.31631919741630554,
0.33227282762527466,
0.4521370828151703,
-0.37465718388557434,
-0.11695748567581177,
-0.36267051100730896,
0.16641679406166077,
0.3340633511543274,
-0.36838775873184204,
-0.6807869076728821,
-0.14857256412506104,
0.42524096369743347,
-0.6842699646949768,
0.405285030603... | |
I'm about to enter the 1st phases of designing a commodities trading application.
A major function of this application is the capture and evaluation of pricing information.
Pricing in this market is not fixed. It is usually a market benchmark +/- a premium. For example: (A and B are market benchmarks)
* Price = A + $1... | [
0.6055729985237122,
-0.23424257338047028,
0.6185080409049988,
-0.07584521174430847,
0.0291390772908926,
-0.10576660931110382,
-0.45813727378845215,
0.018560657277703285,
-0.08410245180130005,
-0.7933530211448669,
0.2466888427734375,
0.6387526988983154,
0.27865883708000183,
0.38574883341789... | |
the traders are capturing this detail in Excel which allows them the flexibility to setup the formulas required, but this information never makes it into our accounting systems and the spreadsheets are not connected to live predictions of the market benchmarks making price forecasting a manual and slow task.
**I'm loo... | [
0.6706211566925049,
-0.04187960550189018,
0.4139634668827057,
0.2534034252166748,
0.09444728493690491,
-0.21998685598373413,
-0.3380523920059204,
0.01855510100722313,
-0.08808781951665878,
-0.6794320940971375,
0.3150228261947632,
0.9461503624916077,
0.2561469078063965,
-0.08910791575908661... | |
is a pretty broad question, but we're not far enough along to be more specific as to what technologies will be used.
Thanks
I bet your users like the flexibility of entering the formulas into Excel, so I'd suggest an approach like this:-
1. Write something to allow them to enter formulas into your application using t... | [
0.6514947414398193,
0.09247689694166183,
-0.022582998499274254,
0.37694403529167175,
0.21467053890228271,
-0.2254023253917694,
0.01323031447827816,
-0.14379726350307465,
0.2877436578273773,
-0.6145113706588745,
0.14003416895866394,
0.6372752785682678,
0.011919469572603703,
-0.4970438480377... | |
allow: + - / \* ( ) {numeric constants} {keywords for base prices}.
3. Translate these formulas into something that your database can understand in the SELECT list. If the formulas that they enter are similar to what you can do in SQL this might not be too difficult. The keywords get turned into column names and everyt... | [
0.1315348893404007,
-0.01612427830696106,
0.2607005834579468,
0.24068166315555573,
0.16959920525550842,
-0.19546762108802795,
0.08922597020864487,
-0.4153329133987427,
0.10794541239738464,
-0.6159507036209106,
-0.2438899576663971,
0.5969730615615845,
-0.3469684422016144,
-0.157710626721382... | |
make everything else easy (and efficient). | [
0.6539697647094727,
0.25834909081459045,
-0.10232314467430115,
0.28918009996414185,
0.07014963030815125,
-0.16941103339195251,
0.1507878303527832,
0.45882338285446167,
0.028445646166801453,
-0.680276095867157,
-0.13797307014465332,
0.6831535696983337,
-0.1540919691324234,
-0.21623234450817... | |
I'm experimenting with a personal finance application, and I'm thinking about what approach to take to update running balances when entering a transaction in an account.
Currently the way I'm using involves retrieving all records more recent than the inserted/modified one, and go one by one incrementing their running ... | [
0.1430796980857849,
-0.18453900516033173,
0.3807013928890228,
0.09795283526182175,
0.35207077860832214,
0.11602548509836197,
-0.2280990481376648,
-0.20215751230716705,
-0.5354577302932739,
-0.21001878380775452,
0.15052542090415955,
0.4687351882457733,
0.28705888986587524,
0.248690381646156... | |
need their running balances adjusted.
Hehe, now that I wrote this question, I think I know the answer... so I'll leave it here in case it helps someone else (or maybe there's even a better approach?)
First, I get the running balance from the previous transaction, in this case, t1. Then I update all following transact... | [
0.36878708004951477,
-0.05127115547657013,
0.5780029892921448,
0.16111913323402405,
0.35776638984680176,
0.09222040325403214,
-0.26497846841812134,
-0.07028749585151672,
-0.6046645045280457,
-0.5407013297080994,
0.09656942635774612,
0.5055432319641113,
-0.26053810119628906,
0.1069060936570... | |
date/time?
PS: I'd prefer solutions not involving propietary features, as I'm using both PostgreSQL and SQLite... Although a Postgre-only solution would be helpful too.
I think this might work:
I was using both the date and the id to order the transactions, but now I'm going to store both the date and the id on one c... | [
0.07477083057165146,
-0.16318118572235107,
0.5036572217941284,
0.08822641521692276,
0.2237212210893631,
0.27381259202957153,
-0.200034037232399,
0.10652326792478561,
-0.0201750248670578,
-0.8062065243721008,
0.01937256194651127,
0.14802242815494537,
-0.058116041123867035,
0.089498147368431... | |
Another poster asked about [preferred syntax for infinite loops](https://stackoverflow.com/questions/224138/infinite-loops-top-or-bottom).
A follow-up question: *Why* do you use infinite loops in your code? I typically see a construct like this:
```
for (;;) {
int scoped_variable = getSomeValue();
if (scoped_vari... | [
0.5116494297981262,
-0.3027516007423401,
-0.15058544278144836,
0.1280878782272339,
0.033442702144384384,
-0.2955341637134552,
0.5334282517433167,
0.07175902277231216,
-0.5405204892158508,
-0.39255720376968384,
-0.05139654129743576,
0.25608864426612854,
-0.5355679988861084,
0.06603182852268... | |
loop in the middle, rather than at the start (while/for) or end (do-while).
If you've got a complex condition, you might also want to use this style to make the code clearer. | [
0.38480979204177856,
-0.33473989367485046,
-0.1630866825580597,
0.16421708464622498,
-0.0956682562828064,
-0.2980603873729706,
0.2136499434709549,
-0.13150262832641602,
-0.21248525381088257,
-0.4024520218372345,
-0.33352744579315186,
-0.1200762540102005,
-0.2403295338153839,
0.123854942619... | |
> **Possible Duplicate:**
>
> [How costly is .NET reflection?](https://stackoverflow.com/questions/25458/how-costly-is-net-reflection)
I am currently in a programming mentality that reflection is my best friend. I use it a lot for dynamic loading of content that allows "loose implementation" rather than strict inte... | [
0.5404847860336304,
0.06985339522361755,
0.32222336530685425,
-0.0015105399070307612,
-0.6045131087303162,
-0.14094692468643188,
0.4400119483470917,
-0.08972230553627014,
-0.04061143472790718,
-0.8327628374099731,
0.4172588288784027,
0.5753268599510193,
0.04954845458269119,
0.1773832738399... | |
to be loaded and then processed. This can result in a larger memory overhead and slower execution. According to [this article](http://www.west-wind.com/WebLog/posts/351.aspx) property modification is about 2.5x-3x slower and method invocation is 3.5x-4x slower.
Here is an excellent [MSDN article](http://web.archive.or... | [
0.4515940546989441,
0.19247132539749146,
-0.08961239457130432,
0.13892343640327454,
-0.28702232241630554,
-0.09302119165658951,
0.511105477809906,
-0.5966113805770874,
-0.25016260147094727,
-0.5739748477935791,
0.15573209524154663,
0.632561206817627,
0.05384005606174469,
0.1176940351724624... | |
you solve. This is especially the case if your teams is mostly junior devs.
You may be better off looking into the DLR (Dynamic Language Runtime) if you need alot of dynamic behaviour. With the new changes coming in .NET 4.0 you may want to see if you can incorporate some of it into your solution. The added support fo... | [
-0.08656646311283112,
-0.144754096865654,
0.25449734926223755,
0.26171961426734924,
-0.09840486943721771,
-0.40618735551834106,
0.695182204246521,
0.003580777905881405,
-0.6199751496315002,
-0.5531984567642212,
-0.07038075476884842,
0.4682995676994324,
-0.20043981075286865,
-0.205973729491... | |
but it might be worth while. | [
0.18587973713874817,
0.11025990545749664,
0.007115755695849657,
0.17301638424396515,
-0.002395068062469363,
0.041078876703977585,
-0.04762837663292885,
0.12163858115673065,
0.10404261201620102,
0.03495870158076286,
0.43495604395866394,
0.13394519686698914,
0.26956045627593994,
0.0279286764... | |
I'm using an istream which could be stringstream, ifstream or a user-defined stream type and I need to know if, in the case of an ifstream, it was not opened in binary mode (so I can throw an exception). I have tried the following method:
```
if ((_is.flags() & ios::binary) == 0)
throw exception(...)
```
but no ... | [
-0.058256007730960846,
0.08097822219133377,
0.4124181568622589,
-0.08457041531801224,
-0.08899013698101044,
-0.06728553771972656,
0.2295522838830948,
-0.26567405462265015,
-0.28094059228897095,
-0.70960533618927,
-0.15915973484516144,
0.33395904302597046,
-0.29253122210502625,
0.0258137714... | |
flag. I'm not sure if there is a way to find these out once the stream is already open. I was thinking that maybe there was a virtual member of the streambuf class that could help, but there doesn't really seem to be. | [
0.8953651189804077,
-0.25481152534484863,
-0.0002282390632899478,
0.4140722453594208,
-0.26325926184654236,
-0.16326715052127838,
0.34995511174201965,
0.35449469089508057,
-0.3982090651988983,
-0.42124316096305847,
0.23942437767982483,
0.052653513848781586,
0.13821004331111908,
0.057990528... | |
Does anyone have some guidelines or links to articles when designing a website that needs to be localized in 20+ languages?
The initial translation isn't so much the problem, rather ongoing maintenance (i.e. when an update is made on the English site, how are people notified that new translations are required).
Thank... | [
0.655570924282074,
0.01966329663991928,
0.14562921226024628,
0.20503784716129303,
-0.2673252820968628,
-0.41317179799079895,
0.3392758071422577,
0.3790368139743805,
-0.4353794753551483,
-0.6038941144943237,
-0.08237124234437943,
0.3916398584842682,
0.017524713650345802,
-0.1598473191261291... | |
In general, you want to reuse as much as possible. That means:
1. Separating all text into resource files (.Net handles this naively, in PHP you can use a template to sub in text, your language may vary)
2. (Really 1-a) Don't put text in images. This will just cause headaches later since images will cease to be reusab... | [
-0.20348775386810303,
0.035369712859392166,
0.23652386665344238,
0.12261634320020676,
-0.23004023730754852,
-0.11759577691555023,
0.5048900246620178,
-0.07644803822040558,
-0.22308018803596497,
-0.9787769317626953,
-0.39997580647468567,
0.3818491995334625,
-0.2006046026945114,
-0.458235234... | |
web pages (i.e. utf-8). That will minimize rendering problems between the languages.
That's sort of the easy part. The hard part is managing it. Depending on your source control system, you can likely write or acquire a tool that will alert the appropriate party.
Content management systems are built to help you mana... | [
0.1959325522184372,
0.18137004971504211,
0.6112077832221985,
0.4297163188457489,
-0.20662206411361694,
-0.3754296600818634,
0.3290958106517792,
0.35010582208633423,
-0.6618460416793823,
-0.8994275331497192,
-0.5029448866844177,
0.3021785616874695,
-0.25867652893066406,
0.003384074429050088... | |
I have a string.
```
string strToProcess = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@";
```
I need to add a newline after every occurence of "@" symbol in the string.
My Output should be like this
```
fkdfdsfdflkdkfk@
dfsdfjk72388389@
kdkfkdfkkl@
jkdjkfjd@
jjjk@
```
Use `Environment.NewLine` whene... | [
-0.0003091779653914273,
0.1622581034898758,
0.45996198058128357,
-0.15138530731201172,
-0.12055359780788422,
-0.08206558972597122,
0.4590919315814972,
-0.4508051574230194,
-0.12068423628807068,
-0.65322345495224,
-0.0887162983417511,
0.12238580733537674,
-0.30764204263687134,
0.28633439540... | |
We have just 'migrated' an SQL Server 2005 database from DEVEL into TEST. Somehow during the migration process the DB was changed from case insensitive to sensitive - so most SQL queries broke spectacularly.
What I would like to know, is - are there any clear benefits to having a case sensitive schema?
NOTE: By this... | [
0.10157272964715958,
0.1912849247455597,
0.07171106338500977,
0.02161554992198944,
-0.2609342932701111,
-0.25786224007606506,
0.11327878385782242,
-0.13787253201007843,
0.12486343085765839,
-0.38261452317237854,
0.21204502880573273,
0.39469122886657715,
-0.09760317951440811,
0.336573690176... | |
sensitive. It is to ensure that when we deploy it on the client site, our DB works regardless whether the client's SQL Server is set up case sensitive or not.
That is one answer I wasn't expecting. | [
-0.024909069761633873,
0.3221002221107483,
0.32058703899383545,
0.17303408682346344,
-0.1354217678308487,
-0.07751164585351944,
-0.011745312251150608,
-0.12167651206254959,
0.2965606153011322,
-0.3700433671474457,
-0.0027355991769582033,
0.5951968431472778,
-0.2826140224933624,
0.007917055... | |
This should a quick question for some easy rep.
I'm doing some PHP Website development, decided to check out and play around with jQuery as well. I don't want to install and manage a local PHP server/service, but I would like a quick one click method for automatically uploading the PHP file I'm working on to my hostin... | [
0.7481327056884766,
-0.13835468888282776,
0.510811984539032,
0.24504214525222778,
-0.2489902824163437,
0.012807264924049377,
-0.009636529721319675,
0.174556165933609,
-0.1603131741285324,
-0.5365883111953735,
0.5229971408843994,
0.6316036581993103,
-0.003306991420686245,
-0.067636877298355... | |
Aptana allows you to upload to their "Cloud", but you have to purchase the cloud space. I already have my own server. I'll have look into BlueFish a bit more....Thanks for the help guys.
I'm thinking I might try using Notepad++ and just write a batch file to run windows built in FTP, make a connection and copy all the... | [
0.17607605457305908,
-0.08526530861854553,
0.6722393035888672,
-0.16652345657348633,
-0.4344059228897095,
0.050305258482694626,
-0.11635282635688782,
0.196175217628479,
0.014237507246434689,
-1.0168495178222656,
0.2338877022266388,
0.563481330871582,
-0.3841879665851593,
0.1874902546405792... | |
file I am working on at that time, it automatically uploads those changes to the server.
You will be able to edit the preferences within FileZilla (<http://filezilla-project.org>) to set your default text editor, this is something you should be able to do with any FTP program.
Check out this post for more information... | [
0.487946480512619,
-0.2851487696170807,
0.6953644752502441,
0.11578066647052765,
0.1528395116329193,
-0.3604656755924225,
-0.28772738575935364,
-0.022171728312969208,
-0.4402373433113098,
-0.6121857762336731,
0.15495289862155914,
0.4557402729988098,
-0.0937553271651268,
-0.1179055720567703... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.