text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm logged into a SQL Server 2005 database as a non-sa user, 'bhk', that is a member of the 'public' server role only. The following code tries to execute within a stored procedure called by user 'bhk'. This line of code...
```
TRUNCATE TABLE #Table1
DBCC CHECKIDENT('#Table1', RESEED, @SequenceNumber) WITH NO_INFOMSGS... | [
-0.13218674063682556,
0.43871912360191345,
0.5677613615989685,
-0.4418843686580658,
-0.08251415938138962,
-0.01876300759613514,
0.4461855888366699,
0.009825549088418484,
-0.13888956606388092,
-0.4491443634033203,
0.06851591914892197,
-0.009693372994661331,
-0.21436379849910736,
0.397028028... | |
db\_ddladmin fixed database role.
So I have two questions:
1. Since 'bhk' is calling a stored
procedure that creates a temporary
table, shouldn't 'bhk' be the owner
and be allowed to run DBCC
CHECKIDENT?
2. Why does the error
message return that user 'guest'
doesn't have permission? To my knowledge, I'm not
logged... | [
0.057647380977869034,
0.3150421679019928,
0.193841814994812,
-0.16742078959941864,
-0.16054053604602814,
-0.022574331611394882,
0.04116937145590782,
-0.46604490280151367,
0.035788603127002716,
-0.4434957802295685,
0.07591172307729721,
0.3725890815258026,
-0.6015152931213379,
0.387237787246... | |
to set the IDENTITY\_INSERT on your temporary table, to allow you to add a row with an explicit ID. You can then delete this row, but further inserts should start from the last sequence number. | [
0.069412462413311,
0.10352788865566254,
0.2510441839694977,
-0.2030513882637024,
0.5494140982627869,
0.037125252187252045,
-0.008364199660718441,
0.06771973520517349,
-0.023371852934360504,
-0.5257027745246887,
-0.268043577671051,
0.5242934226989746,
-0.3361983895301819,
0.0205374136567115... | |
I have a requirement to hide a process in Task Manager. It is for Intranet scenario. So, everything is legitimate. :)
Please feel free to share any code you have (preferably in C#) or any other techniques or any issues in going with this route.
**Update1**: Most of the users have admin privileges in order to run som... | [
0.7639565467834473,
0.08872682601213455,
0.031193990260362625,
0.17552967369556427,
0.03238636627793312,
-0.5447999835014343,
0.5201818943023682,
0.31817829608917236,
-0.26516667008399963,
-0.5986453890800476,
-0.02754700928926468,
0.42897093296051025,
-0.1726563423871994,
0.20703572034835... | |
supported way to accomplish this. The process list can be read at any privilege level. If you were hoping to hide a process from even Administrators, then this is doubly unsupported.
To get this to work, you would need to write a kernel mode rootkit to intercept calls to [NtQuerySystemInformation](http://msdn.microsof... | [
-0.07986566424369812,
-0.1962515115737915,
0.42860451340675354,
0.25118035078048706,
0.16162444651126862,
-0.25474780797958374,
0.4828839898109436,
0.1066424623131752,
-0.3510277569293976,
-0.6365584135055542,
-0.2731759548187256,
0.5032604932785034,
-0.34104442596435547,
0.124240875244140... | |
to be very difficult on those platforms
[Here](https://blogs.technet.microsoft.com/markrussinovich/2005/10/31/sony-rootkits-and-digital-rights-management-gone-too-far/) is an example of a rootkit that tries to do something similar (and has several serious problems). | [
0.11854356527328491,
-0.09503995627164841,
-0.0595942884683609,
0.25502777099609375,
0.24353937804698944,
-0.6592162847518921,
0.08006341755390167,
-0.006241064518690109,
-0.1981969177722931,
-0.23586750030517578,
-0.3369947671890259,
0.5391373038291931,
0.05760299414396286,
0.036760829389... | |
Is there any way in SQL Server to get the results starting at a given offset? For example, in another type of SQL database, it's possible to do:
```
SELECT * FROM MyTable OFFSET 50 LIMIT 25
```
to get results 51-75. This construct does not appear to exist in SQL Server.
How can I accomplish this without loading al... | [
-0.1538892686367035,
0.15181827545166016,
0.6293221116065979,
-0.09123927354812622,
-0.2857741117477417,
0.06094047799706459,
-0.3044969141483307,
-0.225871279835701,
-0.4376221001148224,
-0.4590478241443634,
0.05744296684861183,
0.5402511954307556,
-0.3164554834365845,
-0.2483582943677902... | |
FROM MyTable
) AS MyDerivedTable
WHERE MyDerivedTable.RowNum BETWEEN @startRow AND @endRow
```
**SQL Server 2000**
[Efficiently Paging Through Large Result Sets in SQL Server 2000](https://web.archive.org/web/20210506081930/http://www.4guysfromrolla.com/webtech/041206-1.shtml)
[A More Efficient Method for Paging Th... | [
-0.5270553231239319,
0.11659319698810577,
0.27921169996261597,
-0.058740947395563126,
-0.3695235550403595,
0.18339405953884125,
-0.11727391928434372,
-0.19671998918056488,
-0.4907025694847107,
-0.6422781348228455,
-0.04480244964361191,
0.3306976556777954,
-0.012672138400375843,
0.275105118... | |
Ok guys just a small game:
I have some specifications for a project. At some point they ask for the following to encrypt a password over the net, saying that it is a challenge response protocol:
```
CLIENT ----------------------------- SERVER
(1)ask for challenge -------------->
(2) <---------------------------... | [
0.12009651213884354,
0.238894522190094,
0.2913723587989807,
0.026420796290040016,
-0.3178703784942627,
-0.34020644426345825,
0.08791737258434296,
0.04757293686270714,
-0.16451291739940643,
-0.4778183698654175,
0.025667831301689148,
0.42425984144210815,
-0.31973937153816223,
-0.045894797891... | |
to SHA1 xor stored password
(4) <---------------------------- Grant access
```
For those who don't know it SHA stands for Secure Hashing Algorithm, a standard algorithm for cryptography.
I hope it's clear. Question is: If I sniff packets 2 and 3 (the "challenge" and the "challenge xor password", I do have the ac... | [
-0.19591736793518066,
0.24447472393512726,
0.2965199947357178,
-0.12787719070911407,
-0.44455966353416443,
-0.24015668034553528,
0.2540434002876282,
-0.42612358927726746,
-0.06138879060745239,
-0.5399568676948547,
-0.09444638341665268,
0.38447827100753784,
-0.34589865803718567,
-0.09848915... | |
I'm working on a large legacy java application for which an important feature was automatic scaling of GUI Components based on monitor resolution. We are upgrading the JVM on which it runs from 1.4.2 to 1.6 and now the scaling is broken due to a change in the implementation of java.awt.Container.getPreferredSize().
ge... | [
0.20051297545433044,
-0.24592934548854828,
0.9983762502670288,
-0.1148221418261528,
-0.17053964734077454,
0.15149858593940735,
0.15453054010868073,
-0.3359179198741913,
-0.33271142840385437,
-0.9705849289894104,
0.31251758337020874,
0.7333899736404419,
-0.16898925602436066,
0.1041921451687... | |
resolution changed.
However in Java 1.6 getPreferredSize returns a copy of the Dimension object you passed it, so it is no longer the right type and nothing gets scaled.
I hacked together a solution pretty quick by overriding the Component class with my own implementation (thank you open source JRE) by placing it in ... | [
-0.2929597795009613,
-0.16087086498737335,
0.910195529460907,
0.12044554203748703,
-0.3139779269695282,
0.11243610829114914,
0.4919104278087616,
-0.28344428539276123,
-0.37241289019584656,
-0.7838776707649231,
0.2543989419937134,
0.7280186414718628,
-0.18453609943389893,
0.2127861976623535... | |
before. Maybe they ran [FindBugs](http://findbugs.sourceforge.net/) on it and fix the [bug](http://findbugs.sourceforge.net/bugDescriptions.html#EI_EXPOSE_REP).
When I first read this question, I thought of Java 1.6u10. It includes a new look and feel called [Nimbus](http://java.sun.com/javase/downloads/ea/6u10/nimbu... | [
0.47037068009376526,
-0.2659410834312439,
0.2815404534339905,
0.07414212822914124,
-0.08399540930986404,
0.045580845326185226,
-0.14343805611133575,
-0.037170011550188065,
-0.4115169048309326,
-0.8911656141281128,
0.32080531120300293,
0.593694806098938,
-0.17603926360607147,
0.115054428577... | |
is really not a good idea. As [jjnguy](https://stackoverflow.com/questions/188046/java-gui-resolution-independant-scaling#188261) suggests, you could use GridBagLayout. There are a number of other choices for Layout Managers. There was a [question posted](https://stackoverflow.com/questions/116957/which-layout-manager-... | [
0.12860335409641266,
-0.379873663187027,
0.31344425678253174,
0.1331365406513214,
0.11918722838163376,
-0.055500760674476624,
-0.06583936512470245,
0.04026151821017265,
-0.3229817748069763,
-0.6033671498298645,
0.38951438665390015,
0.40225860476493835,
-0.13339880108833313,
-0.095108434557... | |
Quick question. What do you think, I have a few sites that use a 3 level drop-down menu that will be broken if IE8 released with its current CSS standards in IE8 beta2. So do I take the time to redo those drop downs now? I realize that the way they rendered CSS changed completely between beta 1 and 2, but 2 was/is supp... | [
0.4503982961177826,
0.09574545174837112,
0.07118438929319382,
0.12044638395309448,
-0.15707235038280487,
-0.22264716029167175,
0.1546420454978943,
0.2815973162651062,
-0.10027357935905457,
-0.5505463480949402,
0.1643073856830597,
0.38207313418388367,
-0.004812975414097309,
0.12051247805356... | |
you wait until 80% (random statistic) of ie7 users automatically update to IE8 and then worry about a broken navigation menu if it still exists. Or do you waste the time now.
... if I had it my way all web developers would just make sure that their page did not work in IE8 and then Microsoft would be forced to proper... | [
0.30170848965644836,
-0.11368798464536667,
0.5565344095230103,
0.004581742454320192,
-0.06394471973180771,
0.06194514408707619,
0.6825538277626038,
0.23083490133285522,
-0.272860586643219,
-0.6360142230987549,
-0.05012037605047226,
0.648801326751709,
-0.24585463106632233,
0.017669582739472... | |
everyone.
That said, i'm curious about the "forced to properly handle CSS" bit; IE8 has been pretty big win for CSS standards, but I could be missing the bandwagon. ;)
HTML change necessary to force emulated IE7 rendering involves adding a meta tag immediately after the head node.
```
<head>
<meta http-equiv="X-... | [
-0.01800692453980446,
-0.12356162071228027,
0.840323805809021,
0.017057372257113457,
-0.25555893778800964,
0.12166441231966019,
0.4496834874153137,
-0.03672529011964798,
-0.11819615960121155,
-0.6352955102920532,
-0.44289711117744446,
0.6745304465293884,
-0.0714612603187561,
-0.01990957558... | |
I have a problem when an unhandeld exception occurs while debugging a WinForm VB.NET project.
The problem is that my application terminates and I have to start the application again, instead of retrying the action as was the case in VS2003
The unhandeld exception is implemented in the new My.MyApplication class found... | [
-0.2763309180736542,
0.0501573421061039,
0.5345485806465149,
-0.028253143653273582,
-0.07884963601827621,
-0.07226094603538513,
0.47014525532722473,
-0.32582637667655945,
-0.09013968706130981,
-0.5973888039588928,
-0.11994501203298569,
0.4908500015735626,
-0.1439993679523468,
0.29860475659... | |
code that used to work in VS2003 but it results in the same behaviour when run in VS2008:
```
AddHandler System.Windows.Forms.Application.ThreadException, AddressOf OnApplicationErrorHandler
AddHandler AppDomain.CurrentDomain.UnhandledException, AddressOf OnUnhandledExceptionHandler
```
OnApplicationErrorHan... | [
-0.0058445860631763935,
0.16546760499477386,
0.5498200058937073,
0.08615516871213913,
-0.06288319826126099,
-0.3709608018398285,
0.5894445776939392,
-0.28591063618659973,
-0.19578634202480316,
-0.3404814898967743,
-0.2154204547405243,
0.29101452231407166,
-0.16485698521137238,
0.0800195336... | |
same behaviour during debug and run mode. Resulting in VS not closing while debugging | [
0.22266753017902374,
-0.1180124506354332,
-0.04135630279779434,
-0.03660741448402405,
-0.1993323117494583,
-0.10375044494867325,
1.0514684915542603,
0.20129266381263733,
-0.2072722613811493,
-0.23485812544822693,
-0.44376441836357117,
0.5233348608016968,
-0.20318575203418732,
0.03717641159... | |
Howdy. Consider the following:
```
SQL> DECLARE
2 b1 BOOLEAN;
3 b2 BOOLEAN;
4 FUNCTION checkit RETURN BOOLEAN IS
5 BEGIN
6 dbms_output.put_line('inside checkit');
7 RETURN TRUE;
8 END checkit;
9
10 PROCEDURE outp(n VARCHAR2, p BOOLEAN) IS
11 BEGIN
12 | [
0.2879129648208618,
0.10718078166246414,
0.3607178032398224,
-0.29038289189338684,
0.18421004712581635,
-0.11502673476934433,
0.40097764134407043,
-0.4392043650150299,
0.20232194662094116,
-0.43316128849983215,
-0.2349720150232315,
0.3991764783859253,
-0.3128736615180969,
-0.13105417788028... | |
IF p THEN
13 dbms_output.put_line(n||' is true');
14 ELSE
15 dbms_output.put_line(n||' is false');
16 END IF;
17 END;
18 BEGIN
19 b1 := TRUE OR checkit;
20 outp('b1',b1);
21 b2 := checkit OR TRUE;
22 outp('b2',b2);
23 END;
24 /
b1 is | [
0.061492662876844406,
-0.18001632392406464,
0.4771766662597656,
-0.409544974565506,
-0.01063510961830616,
0.44489744305610657,
0.5713749527931213,
-0.7972773313522339,
-0.21280792355537415,
-0.21863259375095367,
-0.51846843957901,
0.22088512778282166,
-0.2345457673072815,
-0.06591759622097... | |
true
inside checkit
b2 is true
PL/SQL procedure successfully completed
SQL>
```
Notice that the results of the OR statements are order dependent. If I place the function call first, then the function is executed regardless of the value of the other term. It appears that an OR statement is evaluated left to right u... | [
0.4466170072555542,
0.13079805672168732,
0.4394727647304535,
-0.14333485066890717,
-0.01885344833135605,
-0.28331422805786133,
0.5135226845741272,
-0.3149154782295227,
0.35011976957321167,
-0.2066909223794937,
-0.09501996636390686,
0.6797688603401184,
-0.26718607544898987,
-0.2450058162212... | |
I can rely on (without creating another variable and using a separate assignment statement)?
Yes. PL/SQL performs [short circuit evaluation](http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/fundamentals.htm#sthref481) of logical expressions from left to right. | [
0.18330945074558258,
0.17864000797271729,
0.1636376827955246,
0.08469667285680771,
-0.0959576964378357,
0.015074104070663452,
0.39151352643966675,
-0.47922682762145996,
0.19689418375492096,
-0.2608010470867157,
-0.04122832044959068,
0.44226884841918945,
-0.04787800833582878,
-0.01756689324... | |
In my database, I would like to store a decimal score. A score can have a value from 0 to 10, and values in between, such as 2.3 or 9.4.
I recently learned that **int** only stores whole numbers and not decimals. I found out that you could use either **double** or **decimal**, but what I would like to know is if there... | [
0.3673679232597351,
0.11456459760665894,
0.07711871713399887,
0.35894790291786194,
-0.07254257053136826,
0.13622945547103882,
-0.053233370184898376,
0.06600296497344971,
-0.32454714179039,
-0.43624556064605713,
0.23896588385105133,
0.16935059428215027,
0.12952032685279846,
0.12873370945453... | |
digit count for decimal **and** double, my bad.
Decimals are better for things like money calculations where exactitude is absolutely necessary. Doubles are better suited for your specific case where the exactitude of the score is not critical.
See the [overview of numeric types](http://dev.mysql.com/doc/refman/5.0/e... | [
0.2462725192308426,
0.024493811652064323,
-0.15969021618366241,
0.3203880786895752,
-0.30288729071617126,
0.1067594587802887,
0.04925675317645073,
0.06014245003461838,
-0.38842567801475525,
-0.3652777373790741,
0.17120833694934845,
0.08007442951202393,
-0.13554628193378448,
0.0630723014473... | |
I've seen a number of references to gzipping a javascript to save download time. *But* I also see a number of warnings that certain browsers do not support this.
I have two different methods at my disposal:
1. use `mod_deflate` to make Apache compress JS/CSS files in a given directory through htaccess
2. use `ob_star... | [
-0.21512547135353088,
-0.08051054924726486,
0.3893378674983978,
-0.14288239181041718,
-0.5144317150115967,
-0.30819159746170044,
0.3723776638507843,
-0.42833253741264343,
-0.09857127070426941,
-0.6058794260025024,
-0.2651401460170746,
0.7242491841316223,
-0.8716995120048523,
-0.17637374997... | |
is that there is no definitive answer about how to tell if a browser supports a gzipped script, or stylesheet, and that if it does what mime-type must be given as the content type in the header.
I need some advice. First, which method is more universally accepted by browsers? Second, how do I decay using either method... | [
0.13056248426437378,
0.2828565239906311,
0.0816950798034668,
-0.11625988036394119,
-0.27411824464797974,
-0.13064083456993103,
0.23803766071796417,
-0.20238570868968964,
-0.27238211035728455,
-0.6036392450332642,
-0.06657134741544724,
0.5661712288856506,
-0.3249620795249939,
0.098341234028... | |
YUI. **Edit:** I just went back and looked, but I have only Apache 1.3; I thought I had 2, so sorry for mentioning mod\_deflate when I probably don't have it.
mod\_deflate and php's gzhandler both are based on zlib, so in that sense there is little difference to a browser how the content is being compressed.
in respon... | [
-0.05634015426039696,
0.007726573385298252,
0.25646379590034485,
-0.05028390884399414,
-0.38962113857269287,
-0.4018726944923401,
0.2162829488515854,
-0.10929392278194427,
-0.20725397765636444,
-0.7408555150032043,
-0.17673489451408386,
0.8259106874465942,
-0.33447206020355225,
-0.08785624... | |
should be able to handle negotiation of compressed vs uncompressed .js files: ([source](http://zuble.blogspot.com/2007/02/compressed-js-and-modrewrite.html))
```
<FilesMatch "\\.js.gz$">
ForceType text/javascript
Header set Content-Encoding: gzip
</FilesMatch>
<FilesMatch "\\.js$">
RewriteEngine On
RewriteCond... | [
-0.19118718802928925,
0.0417976900935173,
0.6095793843269348,
-0.09382904320955276,
-0.19071891903877258,
0.0039006697479635477,
0.274505615234375,
-0.7928487062454224,
-0.06725552678108215,
-0.8811439275741577,
-0.37352368235588074,
0.6881917715072632,
-0.323297917842865,
-0.1695904731750... | |
Just wondering what little scripts/programs people here have written that helps one with his or her everyday life (aka not work related).
Anything goes, groundbreaking or not. For me right now, it's a small python script to calculate running pace given distance and time elapsed.
My `o` key fell off on my laptop; so I ... | [
0.36421456933021545,
0.13497987389564514,
0.3696022927761078,
0.06800387054681778,
0.38761430978775024,
-0.0028619100339710712,
0.34110453724861145,
0.19798925518989563,
-0.34451040625572205,
-0.4903944432735443,
0.42705971002578735,
0.14677824079990387,
0.18746496737003326,
-0.16974927484... | |
I didn't know this would be so popular :p
As for how - Microsoft exposes a nice little API feature called [Hooks](http://msdn.microsoft.com/en-us/library/ms644959(VS.85).aspx#wh_keyboard_llhook).
Using that hook; I was able to write a "filter" that did what I needed it to do (hint: if you return 1 with your callback ... | [
0.026648683473467827,
-0.18839862942695618,
0.054689086973667145,
-0.023359252139925957,
-0.09096403419971466,
-0.012340633198618889,
0.0553860105574131,
0.02479139156639576,
-0.3275013267993927,
-0.4456917941570282,
0.10957124084234238,
0.3778662085533142,
-0.43705305457115173,
-0.1286745... | |
:D | [
-0.18038073182106018,
0.17470335960388184,
0.3301892578601837,
0.0033003492280840874,
-0.11381136626005173,
-0.007276210933923721,
0.1186087429523468,
-0.2320055514574051,
0.03536025807261467,
-0.3720104992389679,
-0.3874250650405884,
0.15593238174915314,
0.1815459430217743,
-0.00769478362... | |
Here I have:
```
Public Structure MyStruct
Public Name as String
Public Content as String
End Structure
Dim oStruct as MyStruct = New MyStruct()
oStruct.Name = ...
oStruct.Content = ...
Dim alList as ArrayList = new ArrayList()
alList.Add(oStruct)
```
I'd like to convert the ArrayList to a static strongly-ty... | [
0.15093030035495758,
0.013713528402149677,
0.7733051180839539,
-0.40605103969573975,
-0.2188418060541153,
-0.11150764673948288,
0.20967374742031097,
-0.5471518635749817,
-0.2331637442111969,
-0.46514368057250977,
-0.04941810294985771,
0.7008059620857239,
-0.6490280628204346,
0.144445449113... | |
didn't know about that one, but then, I very rarely [if ever] use ArrayList)
However, if MyStruct really is a struct, then I cannot say strongly enough that mutable structs are a bad idea - i.e. where you can set .Name and .Content after creation. Structs should almost always be immutable. In reality, your MyStruct lo... | [
0.14907044172286987,
0.1383989453315735,
0.39750829339027405,
0.037444960325956345,
-0.2971789240837097,
-0.3193059265613556,
0.20132294297218323,
0.15041066706180573,
-0.15383672714233398,
-0.5587766170501709,
-0.03652580454945564,
0.39320340752601624,
-0.2247476875782013,
0.2550607025623... | |
public string Name {get;set;}
public string Content {get;set;}
}
```
If you are using 2.0 or above, consider List<T> instead of ArrayList. | [
0.3918391764163971,
-0.24654929339885712,
0.2743229568004608,
-0.09070541709661484,
-0.3390134871006012,
-0.4800536632537842,
0.07019747048616409,
-0.08618731796741486,
-0.29116296768188477,
-0.5437207818031311,
-0.32468023896217346,
0.4845336675643921,
-0.43181848526000977,
0.143403783440... | |
There seem to be two bash idioms for redirecting STDOUT and STDERR to a file:
```
fooscript &> foo
```
... and ...
```
fooscript > foo 2>&1
```
What's the difference? It seems to me that the first one is just a shortcut for the second one, but my coworker contends that the second one will produce no output even i... | [
0.45083877444267273,
0.19029371440410614,
0.2826003134250641,
-0.2834332287311554,
-0.5611788034439087,
0.15905532240867615,
0.3502204716205597,
-0.23670382797718048,
-0.30458876490592957,
-0.48758816719055176,
0.007837973535060883,
0.6226806640625,
-0.3501739799976349,
-0.0320389531552791... | |
written above will yield different behavior?
From the [bash manual](http://www.gnu.org/software/bash/manual/bashref.html#Redirections):
> There are two formats for redirecting standard output and standard error:
>
>
>
> ```
> &>word
>
> ```
>
> and
>
>
>
> ```
> >&word
>
> ```
>
> Of the two forms, the first... | [
0.12104959785938263,
0.29305413365364075,
0.20616444945335388,
-0.0772177129983902,
-0.49331071972846985,
0.10444152355194092,
0.39929068088531494,
-0.4500153958797455,
0.005440810229629278,
-0.5971252918243408,
-0.06553933024406433,
1.0328004360198975,
-0.06455876678228378,
-0.37375411391... | |
I have a page something.aspx, with associated codebehind something.aspx.cs. In that codebehind, I want to know the filesystem location of something.aspx. Is there any convenient way to get it?
Update: I got several excellent answers, which unfortunately didn't work because of something else crazy I'm doing. I'm encodi... | [
0.2655982971191406,
-0.15883706510066986,
0.6349276304244995,
0.20761655271053314,
-0.014170524664223194,
-0.10021069645881653,
0.27256491780281067,
0.25726065039634705,
-0.5642033815383911,
-1.0243277549743652,
0.0789417251944542,
0.10669593513011932,
-0.04554427042603493,
0.1961658746004... | |
a valid virtual path.
[Request.PhysicalPath](http://msdn.microsoft.com/en-us/library/system.web.httprequest.physicalpath.aspx) | [
-0.053628385066986084,
-0.34418895840644836,
0.9051297903060913,
0.5159022212028503,
0.2289978563785553,
-0.07462909072637558,
0.3084399402141571,
-0.011120372451841831,
-0.4754076898097992,
-0.7013071775436401,
-0.22458477318286896,
0.10151230543851852,
0.08774076402187347,
0.105394959449... | |
Surely there is a way to store a date value prior than 1-1-1900 in a column other than varchar? Or do I really have to break this out, and perform my own datetime library for date differences, sorting, and such?
Yes, I understand how datetime's are actually stored (an integer value from a specific date), but I remembe... | [
-0.0849916860461235,
-0.040305618196725845,
0.2904769778251648,
0.031119074672460556,
0.19492168724536896,
-0.10870106518268585,
-0.06411392241716385,
0.12443047761917114,
-0.5496026277542114,
-0.5966151356697083,
0.23040570318698883,
0.20259514451026917,
0.003639769973233342,
0.5467825531... | |
Does anyone have any info on creating/drawing a customised ListView object?
Currently Im working on a project that requires a customised look and feel within the application. I am using a standard (Windows.Forms) ListView which is not in the same style as the rest of the GUI. We are NOT using a toolbox for custom cont... | [
0.5576061606407166,
0.044618550688028336,
0.4669814705848694,
0.04937751218676567,
-0.2851991057395935,
0.0701424777507782,
-0.006401259917765856,
-0.22429007291793823,
-0.3749464452266693,
-0.5057258605957031,
0.3328593373298645,
0.36452534794807434,
-0.2209206372499466,
0.130035340785980... | |
the data shown and draw that correctly.
Any and all help would be greatly received.
From what I can tell you will need to actually make some Win32 calls using `NM_CUSTOMDRAW` to actually change the paint behavior of the control. [Here is one](https://web.archive.org/web/20061221082010/http://www.devnewsgroups.net/grou... | [
0.4612385034561157,
-0.2558113634586334,
0.0994616374373436,
0.24169513583183289,
0.011040647514164448,
-0.019611990079283714,
0.09607255458831787,
-0.012082427740097046,
-0.08630935102701187,
-0.3804470896720886,
0.412141889333725,
0.6192421317100525,
-0.17567867040634155,
-0.055329896509... | |
We are thinking of renaming our web directory schema to be more user friendly. However, we need any URL requests for the old directory structure to forward to the new one. so....
How do I forward requests for all of these:
<http://mydomain.com/OLDdirname/>
<http://mydomain.com/OLDdirname/samesubdir/>
<http://mydom... | [
0.34418830275535583,
0.14954422414302826,
0.6376575827598572,
-0.23912768065929413,
0.02048293501138687,
0.0066637820564210415,
0.058974333107471466,
-0.40365171432495117,
-0.1536053568124771,
-0.4713776111602783,
0.11041077226400375,
0.3418225944042206,
0.037358079105615616,
0.20295636355... | |
Over the years as I have gone through school and been working in the industry I have often asked people for advice on commenting. Sadly, as we all know, commenting with many developers is something that is taken as a side note and not much else. With that said I usually get a fairly general answer. Really this does not... | [
0.6940839886665344,
0.4121689200401306,
-0.20717188715934753,
0.02878079190850258,
-0.5623266696929932,
-0.20615212619304657,
0.07974295318126678,
0.40597763657569885,
-0.32598304748535156,
-0.43191635608673096,
0.26593562960624695,
0.7877851724624634,
-0.12042929977178574,
0.0027440534904... | |
a [triple-slash XML comment block](http://www.winnershtriangle.com/w/Articles.XMLCommentsInCSharp.asp). This will make it easy to auto-generate documentation if and when the time comes.
Beyond that, I would comment any particular algorithms or pieces of code which are going to be hard to decipher in six months time. T... | [
0.4437166452407837,
0.16071975231170654,
0.4122527539730072,
0.2232109010219574,
-0.2817499041557312,
-0.3160240650177002,
0.28139421343803406,
-0.24004124104976654,
-0.3726465702056885,
-0.46990954875946045,
-0.20559963583946228,
0.36332693696022034,
-0.013912334106862545,
0.0081162881106... | |
In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes:
```
Exception EAccessViolation in module ntdll.dll at 0003DBBA.
Access violation at address 7799DBBA in module 'ntdll.dll'. Write of
address 00000014.
```
... | [
-0.17129741609096527,
-0.10158567130565643,
0.8092721700668335,
-0.2796781063079834,
-0.17584973573684692,
-0.44854897260665894,
0.56663578748703,
-0.09874043613672256,
-0.2509307563304901,
-0.7322742342948914,
-0.17134134471416473,
0.8343912959098816,
-0.3446812033653259,
-0.0353342965245... | |
fine, but if I *do* click the button I get the above error message when I close the application.
So... I'm wondering if this is a bug, but at the same time I think it's rather likely that I'm simply not understanding something very basic about how you're supposed to work with TThreads in Delphi. I am a bit of a Delphi... | [
0.3408251106739044,
0.3714151084423065,
0.18008571863174438,
0.1293720304965973,
-0.03366081044077873,
-0.3503929376602173,
0.49801698327064514,
0.19970929622650146,
-0.2726467549800873,
-0.7138871550559998,
-0.07939440757036209,
0.6792144179344177,
0.15889057517051697,
-0.0241428893059492... | |
bug in Delphi 2009 at the moment - you can [vote for it here](http://qc.codegear.com/wc/qcmain.aspx?d=67726).**
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
---
**Update: This bug was fixed in Delp... | [
-0.6337806582450867,
-0.17882004380226135,
0.6191391944885254,
-0.07870837301015854,
0.1109030470252037,
-0.14899347722530365,
0.21506905555725098,
0.4679093658924103,
-0.3965972363948822,
-0.5192193388938904,
-0.3400006592273712,
0.6111016869544983,
-0.537588357925415,
0.09756258130073547... | |
Right now, my SVN repository is on my laptop's HDD (although I use a code hosting service for more "critical" personal projects) and I just copy the directory over on a weekly basis (which will eventually be scripted or perhaps I'll make an app for the hell of it). Am I at risk for corrupting my SVN repository? So far,... | [
0.4256035387516022,
0.13726328313350677,
0.2469710111618042,
0.26564884185791016,
-0.04085595905780792,
-0.4470016062259674,
0.38648149371147156,
0.21850164234638214,
-0.2568278908729553,
-0.6536357998847961,
-0.14845341444015503,
0.7125602960586548,
0.04233042523264885,
0.2319022417068481... | |
makes a full “hot” backup of your repository, including all hooks, configuration files, and, of course, database files. If you pass the `--clean-logs` switch, `svnadmin` will perform a hotcopy of your repository, and then remove unused Berkeley DB logs from the original repository. You can run this command at any time ... | [
0.34609895944595337,
-0.08064023405313492,
0.15151475369930267,
0.10150690376758575,
0.3636902868747711,
-0.5059775114059448,
0.4178812801837921,
0.1708884984254837,
-0.13913662731647491,
-0.3993254601955414,
-0.6000566482543945,
0.7282940745353699,
-0.38751694560050964,
0.1734531968832016... | |
I'm attempting to create a custom calendar control that inherits from ASP.Net's built in calendar user control.
the code-behind file for my control looks like this:
```
public partial class WeeklyEventsCalendar : Calendar
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
```
and compiles fi... | [
0.2007455825805664,
0.07443170249462128,
0.5771461129188538,
0.05710369348526001,
-0.15197192132472992,
-0.0007575449417345226,
-0.0059118811041116714,
-0.19258370995521545,
-0.2709013819694519,
-0.6174414157867432,
-0.04133839160203934,
0.31832972168922424,
-0.08169782906770706,
-0.000754... | |
<div>
<mvs:WeeklyEventsCalendar runat="server" />
</div>
</body>
</html>
```
I get a warning **'Element WeeklyEventsCalendar is not a known element. This can occur if there is a compilation error in the web site, or the web.config file is missing.'** Attempting
I don't get any sort of 'file not found' e... | [
0.08752606064081192,
0.05570043995976448,
0.45051413774490356,
-0.023564934730529785,
-0.15380160510540009,
-0.30567628145217896,
0.7072678804397583,
-0.02798127382993698,
-0.5503628849983215,
-0.6510246396064758,
-0.26487571001052856,
0.06461875140666962,
-0.35894903540611267,
0.076113104... | |
my code do I attempt to define such a function.
This should be really simple. Where am I going wrong?
Bryant hit on it. One thing you might consider if all you're doing is customizing the existing control is embedding an instance of the calendar on your user control and exposing the properties you need from it. This ... | [
0.28940290212631226,
0.041716091334819794,
-0.08243793249130249,
0.26693257689476013,
-0.3522687256336212,
0.07257714122533798,
0.21156151592731476,
-0.12999014556407928,
-0.35001227259635925,
-0.6723342537879944,
0.3420925736427307,
0.35089534521102905,
-0.11187747865915298,
0.09160060435... | |
create a standard class which derives from the Calendar control, and then perform your customizations. You'll have no UI design for that, however -- everything you do will need to be custom code. (And if you need to change the HTML being emitted, you'll need to write those custom streams out as well -- which, with a ca... | [
0.5177266001701355,
-0.24544644355773926,
0.21682465076446533,
0.31654655933380127,
0.04382612556219101,
-0.18870647251605988,
0.20590199530124664,
0.019857468083500862,
-0.13229745626449585,
-0.7522473931312561,
-0.1457066684961319,
0.5013986229896545,
-0.4066973328590393,
-0.141113579273... | |
I've created a language pack for a site before, but I'm not sure if what I'm doing is the best method.
Basically, all I have is a file with variables defining string constants. Usually a set of arrays where an array usually refers to a particular elements of the site.
Then the site code just includes the appropriate ... | [
0.6603356599807739,
0.08792279660701752,
-0.11031801253557205,
-0.004350301343947649,
-0.10634605586528778,
-0.14380569756031036,
0.4012984335422516,
-0.4514235854148865,
0.009896090254187584,
-0.3130636215209961,
0.035032521933317184,
0.531417965888977,
-0.4811215400695801,
-0.10434253513... | |
and better designed.
You can switch adapters depending on your preference (supports gettext, csv and a multitude of others), you don't need defines or globals polluting your global scope and it is well documented. | [
0.016305437311530113,
-0.20530644059181213,
0.5188189744949341,
0.28320425748825073,
-0.053280528634786606,
-0.34537187218666077,
-0.17969010770320892,
0.12978392839431763,
-0.426408588886261,
-1.094854712486267,
-0.5112223029136658,
0.4119565188884735,
-0.2303023636341095,
-0.087843768298... | |
I'm using the build-helper-maven-plugin to add it to my build, but I'd
like to see the XREF source for this extra source directory as well.
FYI:
[maven-jxr-plugin](http://maven.apache.org/plugins/maven-jxr-plugin/index.html) - The JXR plugin produces a cross-reference of the project's sources. The generated reports m... | [
0.39648738503456116,
0.3135288655757904,
0.2556762099266052,
-0.05659238249063492,
-0.0712212547659874,
-0.16585981845855713,
0.28898927569389343,
-0.15404686331748962,
-0.1969023048877716,
-0.35896018147468567,
-0.27347317337989807,
0.2507919669151306,
-0.05471057817339897,
-0.02705580182... | |
from the client-side (using AJAX). Ideally, the controllers should not call the DAOs directly, but should instead call service beans (and the service beans should call the DAOs). One advantage of this approach is that you can define your service methods to be transactional, i.e. whenever a service method begins a trans... | [
-0.11722911894321442,
-0.26641368865966797,
0.20483841001987457,
0.29072222113609314,
0.00198753597214818,
-0.2839936316013336,
-0.27945324778556824,
-0.1010863333940506,
-0.5176236033439636,
-0.690371036529541,
-0.2515651285648346,
0.2461555302143097,
-0.33908236026763916,
-0.028070351108... | |
Spring MVC - any web framework would suffice. | [
-0.20097984373569489,
-0.1640809029340744,
0.49581632018089294,
0.37563908100128174,
-0.37069422006607056,
-0.05470578372478485,
0.09403663128614426,
0.022843966260552406,
0.029094405472278595,
0.039757195860147476,
-0.3368197977542877,
0.26474153995513916,
0.09985210001468658,
0.056745588... | |
I have used the XML Parser before, and even though it worked OK, I wasn't happy with it in general, it felt like I was using workarounds for things that should be basic functionality.
I recently saw SimpleXML but I haven't tried it yet. Is it any simpler? What advantages and disadvantages do both have? Any other parse... | [
0.17736336588859558,
-0.0521697998046875,
0.29532569646835327,
-0.12477681040763855,
-0.3611692190170288,
-0.17737877368927002,
0.07187044620513916,
-0.06289396435022354,
-0.14248748123645782,
-0.43815070390701294,
-0.1281101107597351,
0.5354548096656799,
-0.39452147483825684,
-0.047339089... | |
I have been trying to work my way through Project Euler, and have noticed a handful of problems ask for you to determine a prime number as part of it.
1. I know I can just divide x by 2, 3, 4, 5, ..., square root of X and if I get to the square root, I can (safely) assume that the number is prime. Unfortunately this s... | [
0.27617111802101135,
0.10784769058227539,
-0.1120256781578064,
0.10270359367132187,
-0.040928736329078674,
-0.0001839376927819103,
-0.09379138797521591,
-0.18787135183811188,
-0.19717423617839813,
-0.6884771585464478,
0.0023951425682753325,
0.2185993790626526,
-0.23435114324092865,
0.26288... | |
not confuse a mere mortal programmer?
Thanks much!
The first algorithm is quite good and used a lot on Project Euler. If you know the maximum number that you want you can also research Eratosthenes's sieve.
If you maintain the list of primes you can also refine the first algo to divide only with primes until the squa... | [
-0.005259401630610228,
-0.1107599064707756,
-0.00506686931475997,
0.08692318201065063,
-0.2856351435184479,
0.12711702287197113,
-0.08614900708198547,
-0.21451632678508759,
-0.27126437425613403,
-0.5770477652549744,
0.08923172205686569,
0.6004464626312256,
-0.44402578473091125,
0.020157473... | |
Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object?
I know that I can:
```
f = open('c:\file.doc', "w")
f.write(text)
f.close()
```
but Word will read it as an HTML file not a native .doc file.
I'd look into [IronPython](http://ironpython.net/) which intrinsically has... | [
0.1309547871351242,
0.19602322578430176,
0.1754392385482788,
-0.23212188482284546,
0.0354512557387352,
0.2029862254858017,
0.2887915372848511,
0.05708017572760582,
-0.06431133300065994,
-0.4982849657535553,
0.008639668114483356,
0.6924291849136353,
-0.12128112465143204,
-0.0006092694238759... | |
Is it possible to read and write Word (2003 and 2007) files in PHP without using a COM object?
I know that I can:
```
$file = fopen('c:\file.doc', 'w+');
fwrite($file, $text);
fclose();
```
but Word will read it as an HTML file not a native .doc file.
Reading binary Word documents would involve creating a parser acc... | [
0.13888989388942719,
0.1524151712656021,
0.3124154508113861,
0.02699722908437252,
-0.1227869912981987,
0.16412435472011566,
0.26710087060928345,
-0.07310715317726135,
0.1164422333240509,
-0.4058278501033783,
0.06333974003791809,
0.8397172093391418,
-0.20883572101593018,
-0.0893957018852233... | |
Word documents are saved in the correct format (it's called Word 2003 XML-Document in Word 2007). For writing you just have to follow the openly available XML schema. I've never used this format for writing out Office documents from PHP, but I'm using it for reading in an Excel worksheet (naturally saved as XML-Spreads... | [
-0.05703917145729065,
0.11214040219783783,
0.6014785170555115,
0.1351565569639206,
-0.3271811604499817,
-0.19363240897655487,
0.2718989849090576,
0.08406326174736023,
-0.009913165122270584,
-0.7362058162689209,
-0.20526738464832306,
0.8517309427261353,
-0.03336624801158905,
-0.026924364268... | |
not installed in your Word 2003) - would be to ressort to [OpenXML](http://en.wikipedia.org/wiki/Office_Open_XML). As [databyss](https://stackoverflow.com/users/9094/databyss) pointed out [here](https://stackoverflow.com/questions/188452/readingwriting-a-ms-word-file-in-php#191849) the DOCX file format is just a ZIP ar... | [
-0.007298602722585201,
-0.016170911490917206,
0.7385919690132141,
0.05943264439702034,
0.03454472869634628,
-0.2101660966873169,
0.18666677176952362,
0.007636064663529396,
0.013438764028251171,
-0.4697306156158447,
-0.11887802183628082,
0.7399988770484924,
-0.2950301766395569,
0.0791013389... | |
files using the OpenXML standard. You could get an idea of the work involved when trying to read and write OpenXML Word documents.** | [
0.33138811588287354,
0.12320458889007568,
0.3063103258609772,
0.2853040099143982,
-0.0452633760869503,
-0.21708424389362335,
0.20828305184841156,
0.2646793723106384,
-0.3985976278781891,
-0.693461000919342,
-0.43843913078308105,
0.2890133559703827,
-0.1781708151102066,
0.1747751235961914,
... | |
For as long as I can remember I have avoided using switch statement fall-through. Actually, I can't remember it ever entering my consciousness as a possible way to do things as it was drilled into my head early on that it was nothing more than a bug in the switch statement. However, today I ran across some code that us... | [
0.5828758478164673,
0.05984912067651749,
-0.12421856820583344,
-0.06496899574995041,
0.011895806528627872,
-0.3037935793399811,
0.49083444476127625,
0.18879306316375732,
-0.25056886672973633,
-0.3659805357456207,
0.2695704698562622,
0.20067302882671356,
-0.27737659215927124,
0.233090922236... | |
feature of any language that is powerful enough to leave in the programmer's hands?
**Edit:**
I wasn't specific enough to what I meant by fall-through. I use this type a lot:
```js
switch(m_loadAnimSubCt){
case 0:
case 1:
// Do something
break;
case 2:
case ... | [
0.23565438389778137,
-0.09292180836200714,
0.11806005239486694,
-0.20020131766796112,
0.3224130868911743,
-0.2597702145576477,
0.5779980421066284,
0.030273327603936195,
-0.3565956652164459,
-0.3995681703090668,
-0.40746480226516724,
0.5735157132148743,
-0.17024382948875427,
-0.055272400379... | |
case 4:
// Do something
break;
}
```
However, I'm concerned about something like this.
```js
switch(m_loadAnimSubCt){
case 0:
case 1:
// Do something, but fall through to the other cases
// after doing it. | [
0.1720065474510193,
-0.05946667864918709,
0.2178129106760025,
-0.2686959505081177,
0.385234534740448,
-0.42939990758895874,
0.4697500765323639,
-0.08676503598690033,
-0.28578469157218933,
-0.38307490944862366,
-0.5980347394943237,
0.6033084988594055,
-0.4374859929084778,
-0.021125009283423... | |
case 2:
case 3:
case 4:
// Do something else.
break;
}
```
This way whenever the case is 0, 1 it will do everything in the switch statement. I've seen this by design and I just don't know if I agree that switch statements should be used this way. I think the first code examp... | [
0.3236386477947235,
-0.00790402851998806,
-0.07184505462646484,
-0.18345794081687927,
0.04919392988085747,
-0.43110334873199463,
0.16388636827468872,
-0.2934451699256897,
0.14969298243522644,
-0.47632622718811035,
-0.1580795794725418,
0.7342329621315002,
-0.38204678893089294,
0.05787656456... | |
The second seems kind of dangerous.
It may depend on what you consider fallthrough. I'm ok with this sort of thing:
```js
switch (value)
{
case 0:
result = ZERO_DIGIT;
break;
case 1:
case 3:
case 5:
case 7:
case 9:
result = ODD_DIGIT;
break;
case 2:
case 4:
case 6:
case 8:
... | [
-0.16069278120994568,
-0.18827633559703827,
0.16550642251968384,
-0.07348169386386871,
0.039250534027814865,
-0.1484888792037964,
0.3338988721370697,
-0.18931171298027039,
-0.17446690797805786,
-0.3967365622520447,
-0.15062424540519714,
0.5710407495498657,
-0.28447824716567993,
0.096490107... | |
label, I'd pretty much always consider that evil. Perhaps moving the common code to a function and calling from both places would be a better idea.
And please note that I use the [C++ FAQ](https://isocpp.org/wiki/faq) definition of ["evil"](https://isocpp.org/wiki/faq/big-picture#defn-evil) | [
0.5488317012786865,
0.020098673179745674,
0.04626293107867241,
-0.04997213929891586,
-0.23328077793121338,
-0.24832913279533386,
0.4008251130580902,
0.17718809843063354,
-0.4810134172439575,
-0.4005509316921234,
-0.005203366745263338,
0.9407892823219299,
-0.39724200963974,
0.27747780084609... | |
The problem is following: I want to automate the way my emacs starts.
It has to be split in two buffers and the slime-repl has to be started in the smallest (bottom) buffer. Plus, I want my file to be opened in the bigger (upper) buffer.
In my .emacs there are lines:
```
(slime)
...
(split-window-vertically -6)
(switc... | [
-0.20793777704238892,
0.1247859075665474,
0.6284161806106567,
-0.2091047763824463,
0.3259980380535126,
0.18190813064575195,
0.012721807695925236,
0.04635721817612648,
-0.3494518995285034,
-0.7211619019508362,
-0.23363974690437317,
0.671323299407959,
-0.3532218039035797,
0.01983712241053581... | |
a different one. | [
0.03533902019262314,
-0.18860268592834473,
-0.10600246489048004,
-0.06089311093091965,
-0.43165215849876404,
0.08659743517637253,
0.10287152975797653,
-0.19754114747047424,
-0.31525057554244995,
-0.28703707456588745,
0.1761140674352646,
-0.0271423552185297,
-0.3020508885383606,
0.229828134... | |
I am on a committee that would benefit from an online application that allows the members to collaborate w/ members.
I would want the ability to post messages and upload documents.
Is there any free, easy to install on your server apps that you would suggest?
If you really want something similar to BaseCamp, you shou... | [
0.940661609172821,
-0.11306509375572205,
-0.2499227523803711,
0.034112513065338135,
-0.20303262770175934,
-0.4008057713508606,
0.2774880826473236,
-0.08904947340488434,
-0.22347494959831238,
-0.5645236372947693,
0.15832610428333282,
-0.18957598507404327,
0.06811279058456421,
0.093804955482... | |
How do you detect the number of physical processors/cores in .net?
```
System.Environment.ProcessorCount
```
returns the number of logical processors
> <http://msdn.microsoft.com/en-us/library/system.environment.processorcount.aspx>
For physical processor count you'd probably need to use WMI - the following metadat... | [
0.12251454591751099,
-0.1465897411108017,
0.4257351756095886,
0.3143079876899719,
0.16596558690071106,
-0.20626389980316162,
0.15025976300239563,
-0.21426445245742798,
-0.4909490644931793,
-0.9094539284706116,
0.08054307848215103,
0.41464293003082275,
-0.06698814034461975,
-0.0765630975365... | |
that may have multiple **Processor Groups**, which is often seen on computers with a large number of processors. By default [.Net will only using the first processor group](https://stackoverflow.com/questions/27965962/c-sharp-environment-processorcount-does-not-always-return-the-full-number-of-log) - which means that b... | [
-0.24404238164424896,
-0.0713685005903244,
0.30620118975639343,
-0.08821503818035126,
0.28737708926200867,
0.41037717461586,
0.198220357298851,
-0.1189122349023819,
-0.6126253008842468,
-0.45280441641807556,
-0.448671817779541,
0.42084336280822754,
-0.4227505624294281,
0.09646963328123093,... | |
I want to make sure that a set of functions have the same signature in some C code. Ideally I would be able to define a new type that described the return value and arguments of a function and then declare my set of functions using this new type.
Additionally, is there a way to specify default values for the argument... | [
0.40815749764442444,
0.17010581493377686,
0.1481030285358429,
0.1224839985370636,
-0.02976013347506523,
0.30742964148521423,
0.11858001351356506,
-0.5890097618103027,
-0.28228747844696045,
-0.2932918965816498,
0.016575269401073456,
0.4897069036960602,
-0.5250408053398132,
0.025470988824963... | |
use that signature */
function_t foo;
function_t bar;
```
Now when you define the functions there will be an error if they do not use the same signature as in the typedef.
```
void foo( int x, char c)
{
/* do some stuff */
return;
}
/* this will result in a compiler error */
int bar( int x, char c)
{
... | [
0.20850521326065063,
0.18126818537712097,
0.35487231612205505,
-0.12965178489685059,
0.12971001863479614,
-0.20410677790641785,
0.19052885472774506,
-0.16553620994091034,
-0.2455289363861084,
-0.5901398062705994,
-0.23203547298908234,
0.6117875576019287,
-0.5022672414779663,
0.000780952279... | |
default parameters to the typedef. Certainly not in C, which doesn't support default parameters at all. Even in C++ you can't do this because the default value of a parameter is not part of the type. In fact, a class that overrides a virtual method from a base class can specify a different value for a default parameter... | [
-0.007781194522976875,
-0.2652687132358551,
0.25404998660087585,
0.14668115973472595,
-0.0004146244318690151,
-0.23906336724758148,
0.20306861400604248,
0.08932378143072128,
-0.2764289081096649,
-0.4477218687534332,
-0.12157171964645386,
0.6105579137802124,
-0.5115052461624146,
0.108530394... | |
a combination of) the following:
* abstract base classes
* overloading
* template functions
* macros
But it would be difficult to suggest something without knowing more specifics about exactly what you're trying to accomplish. And I think it's likely that the result might well be pretty hacky. | [
0.5477908849716187,
0.08287404477596283,
-0.2790531814098358,
0.2650359570980072,
-0.12294912338256836,
-0.05732566490769386,
0.32807305455207825,
0.058565475046634674,
-0.07877067476511002,
-0.4897851049900055,
0.07466422021389008,
0.4869350492954254,
-0.24381637573242188,
-0.003885649377... | |
In c#, how can I check to see if a link button has been clicked in the page load method?
I need to know if it was clicked before the click event is fired.
```
if( IsPostBack )
{
// get the target of the post-back, will be the name of the control
// that issued the post-back
string eTarget = Request.Param... | [
-0.26793229579925537,
-0.01268142182379961,
0.47221487760543823,
-0.1375012844800949,
0.04130033403635025,
-0.2033662647008896,
0.049641236662864685,
-0.20080424845218658,
-0.27024710178375244,
-0.3052939772605896,
-0.6172354817390442,
0.5450729131698608,
-0.4659568965435028,
-0.0543205030... | |
Is there a way to make running junit test to stop after a test fails?
Yes ... this ability (or the lack of it) is built into the various TestRunners (Console, AWT, Swing, Ant, Maven or the one built into Eclipse, etc). You'll have to look for this control in the documentation for the specific platform you're using. | [
0.27061474323272705,
-0.35559046268463135,
-0.09209044277667999,
0.5921680927276611,
-0.052626919001340866,
-0.2079809457063675,
0.03281673043966293,
0.24907952547073364,
0.1590707153081894,
-0.3856329917907715,
0.18342718482017517,
0.5582313537597656,
-0.04946542903780937,
-0.433688670396... | |
I’m getting an intermittent false negative on the following line of code in an ASP.NET 2 [web site](http://www.BugTracker.net):
```
if (!System.IO.Directory.Exists(folder))
```
The folder clearly exists, and even contains a log file that is written to when the CLR doesn’t lie about the folder’s existence. Any help w... | [
0.45818835496902466,
0.26645877957344055,
0.23691968619823456,
-0.05801539123058319,
0.14343921840190887,
-0.41229137778282166,
0.4249809980392456,
0.34900110960006714,
-0.40014737844467163,
-0.6799241304397583,
0.0074837831780314445,
0.352423757314682,
-0.2504952847957611,
0.1482287496328... | |
Something else perhaps?
I am already using nHibernate, but I get occasional issues where a lazy initialized proxy object won't actually initialize. I'm thinking of trying something else. The site has user accounts, user posts and photos, and filtering of those to certain location names and title/description matches. No... | [
0.3546481132507324,
-0.3539102077484131,
0.34324920177459717,
0.3365035951137543,
-0.32797813415527344,
-0.19280055165290833,
-0.16399531066417694,
0.19103401899337769,
-0.07632822543382645,
-0.5131542682647705,
0.216597318649292,
-0.08573419600725174,
-0.06161166727542877,
0.1448662430047... | |
procedures compensates for when you need to compose objects that are the results of joins. Again, SubSonic is intended to be functional, so it will help you achieve project goals quickly.
That said, you are not able to use SubSonic to "compose objects" - there is no configuration file that describes the relationships ... | [
0.06807638704776764,
-0.06189042329788208,
0.30222055315971375,
0.37133193016052246,
-0.030417246744036674,
-0.10326278954744339,
0.38582873344421387,
-0.30575552582740784,
-0.22283202409744263,
-0.44000616669654846,
-0.13332393765449524,
0.32220518589019775,
-0.09871143847703934,
-0.15318... | |
I'm curious as to if there are any best practices relating to JQuery when constructing encapsulated code blocks.
Generally, when I construct a page I like to encapsulate the functions used within that page inside an object. This allows me some encapsulation when building applications. There's nothing I hate more than ... | [
0.46865084767341614,
0.3315064311027527,
0.1018185243010521,
0.02179802395403385,
-0.24387356638908386,
-0.21271665394306183,
0.1850433349609375,
-0.03747384250164032,
-0.12006368488073349,
-0.7132986783981323,
0.04076322913169861,
0.5569536089897156,
-0.21653003990650177,
0.11960861831903... | |
Notation:
```
var Site = {
// properties and methods
}
```
In YUI they favor the Self Executing Function notation:
```
(function() { // properties and methods })()
```
The nice thing about the second example is that a closure is created, thus allowing you to define private properties and methods.
My ... | [
0.1326475292444229,
0.10590662062168121,
0.3022594749927521,
0.0008841581293381751,
-0.19907589256763458,
-0.29404550790786743,
-0.129821315407753,
0.06174105778336525,
-0.28286001086235046,
-0.7457943558692932,
-0.18585199117660522,
0.402757465839386,
-0.15448659658432007,
0.0343251973390... | |
of the YUI module pattern with a bit of jQuery plugin pattern mixed in.. We ended up using the self executing closure pattern. This is beneficial in a few ways:
1. It keeps code to a minimum
2. It enforces separation of behavior from presentation
3. It provides a closure which prevents naming conflicts
This is what i... | [
0.011351361870765686,
-0.21292847394943237,
0.27117323875427246,
-0.16997142136096954,
-0.16890449821949005,
-0.3281088173389435,
0.6454874873161316,
-0.03294533118605614,
-0.042603448033332825,
-0.40273919701576233,
-0.21036359667778015,
0.6250209212303162,
-0.5805293321609497,
0.27884227... | |
$(init);
})(jQuery);
```
We realized that assigning the result of the function execution, similar to the YUI module pattern, exposes code that could potentially be called from within presentation code. We want to prevent this, so this pattern fits.
Of course we could have written the init method inline, without defi... | [
0.23158951103687286,
-0.07977336645126343,
0.4483663737773895,
-0.017383910715579987,
-0.15576088428497314,
-0.19002041220664978,
0.26634854078292847,
-0.091506727039814,
0.03368945047259331,
-0.3750762343406677,
-0.2409556657075882,
0.6513699293136597,
-0.572237491607666,
0.05953836068511... | |
static, we use $.extend, and if they operate over a wrapped set, we use the $.fn.extend function.
Hope this helps someone. | [
0.558074951171875,
-0.4978640675544739,
0.22520068287849426,
-0.020588383078575134,
0.243971586227417,
-0.1818278431892395,
0.041871052235364914,
0.16398847103118896,
-0.18060480058193207,
-0.2005184143781662,
-0.29082900285720825,
0.507229208946228,
-0.4861277639865875,
-0.264930725097656... | |
Looking for an answer for C# and C++. (in C#, replace 'destructor' with 'finalizer')
Preamble: Herb Sutter has a great article on the subject:
<http://herbsutter.wordpress.com/2008/07/25/constructor-exceptions-in-c-c-and-java/>
C++ : Yes and No
----------------
While an object destructor won't be called if its const... | [
-0.19735845923423767,
0.0913606733083725,
0.12338198721408844,
-0.12148762494325638,
0.22079065442085266,
-0.039181336760520935,
0.441371887922287,
-0.1956007331609726,
0.02112521603703499,
-0.4018157720565796,
-0.4967342019081116,
0.42946839332580566,
-0.33506467938423157,
0.0191051550209... | |
;
Thing * m_pThing ;
Object m_aObject ;
Gizmo * m_pGizmo ;
Data m_aData ;
}
Class::Class()
{
this->m_pThing = new Thing() ;
this->m_pGizmo = new Gizmo() ;
}
```
The order of creation will be:
1. m\_aObject will have its constructor called.
2. m\_aData will have its constructor cal... | [
-0.3204099237918854,
-0.06071994826197624,
0.3192622661590576,
-0.15886478126049042,
-0.01840507611632347,
0.13763631880283356,
0.20921649038791656,
-0.5635105967521667,
-0.15634790062904358,
-0.40961986780166626,
-0.714032769203186,
0.6495527029037476,
-0.33822235465049744,
0.310598969459... | |
are using the following code:
```
Class pClass = new Class() ;
```
Some possible cases:
* Should m\_aData throw at construction, m\_aObject will have its destructor called. Then, the memory allocated by "new Class" is deallocated.
* Should m\_pThing throw at new Thing (out of memory), m\_aData, and then m\_aObject ... | [
-0.28899288177490234,
0.14348316192626953,
0.36889001727104187,
-0.3157787621021271,
0.208429217338562,
0.36862313747406006,
0.2607366740703583,
-0.6650932431221008,
-0.30670320987701416,
-0.7529690265655518,
-0.7293975353240967,
0.5478991866111755,
-0.5227723717689514,
0.04638977348804474... | |
by "new Gizmo" will be deallocated. Then m\_aData, and then m\_aObject will have their destructors called. Then, the memory allocated by new Class is deallocated. **Note that m\_pThing leaked**
If you want to offer the Basic Exception Guarantee, you must not leak, even in the constructor. Thus, you'll have to write th... | [
0.012990999966859818,
0.09728261828422546,
0.511914849281311,
-0.1319747418165207,
0.1854257583618164,
-0.3384883999824524,
0.33286890387535095,
-0.5946280360221863,
-0.0913042277097702,
-0.4689875543117523,
-0.6152239441871643,
0.7722520232200623,
-0.39126062393188477,
0.09394480288028717... | |
m_pGizmo ;
Data m_aData ;
}
Class::Class()
: m_pThing(new Thing())
, m_pGizmo(new Gizmo())
{
}
```
Or even:
```
Class::Class()
{
this->m_pThing.reset(new Thing()) ;
this->m_pGizmo.reset(new Gizmo()) ;
}
```
if you want/need to create those objects inside the constructor.
This way... | [
0.11587503552436829,
-0.1955406218767166,
0.41615694761276245,
0.06596402078866959,
0.40809980034828186,
-0.4016524851322174,
0.3248690664768219,
-0.06371885538101196,
-0.3737611770629883,
-0.4280186593532562,
-0.8671433925628662,
0.8092651963233948,
-0.28932198882102966,
0.1850575953722,
... | |
I'm just learning about SVG, and it seems great but I'm not sure about browser support - have people successfully got around this, or is it still too early?
[Raphael](http://raphaeljs.com/) is a cross-browser vector graphics library which might be worth a look. | [
0.7557960748672485,
-0.18033702671527863,
0.03704654797911644,
-0.0693267360329628,
-0.3136119544506073,
-0.3026127517223358,
0.09675571322441101,
0.38326525688171387,
-0.2728165090084076,
-0.5870651006698608,
0.19664253294467926,
0.24973814189434052,
0.20229189097881317,
-0.29065477848052... | |
I'm trying to show someone a use for interfaces in a crazy situation they've created. They have several unrelated objects in lists, and need to perform an operation on two string properties in each object. I'm pointing out that if they define the properties as part of an interface, they can use the interface object as ... | [
0.1993187665939331,
-0.08001488447189331,
0.41605520248413086,
0.04031393304467201,
0.18838629126548767,
0.14746059477329254,
0.2417905479669571,
-0.36402782797813416,
-0.10062945634126663,
-0.6373329758644104,
0.07964503020048141,
0.5829122066497803,
-0.5645161271095276,
0.109957583248615... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.