text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I couldn't find a proper discussion thread on this topic, so I'm going to go ahead and ask here.
Problem: I have a select query that returns a result of size 100,000+. The user wants to view all this data, but obviously I can't give it to him all at once. I also don't want to store so much data on the client's memory.... | [
0.20625096559524536,
0.2277551293373108,
0.21614938974380493,
0.38337385654449463,
-0.0300300233066082,
0.16455213725566864,
-0.08602912724018097,
-0.18781058490276337,
-0.5515441298484802,
-0.47930532693862915,
0.25653573870658875,
0.14003682136535645,
-0.15281130373477936,
0.579113841056... | |
a time?
You need refresh yourself on how binary works. 5 is not represented as 0001 1111 (5 bits on), it's represented as 0000 0101 (2^2 + 2^0), and 4 is likewise not 0000 1111 (4 bits on) but rather 0000 0100 (2^2). The numbers you wrote are actually in *unary*.
[Wikipedia, as usual, has a pretty thorough overview.](... | [
0.1528739333152771,
-0.06055609881877899,
0.020199406892061234,
0.20323537290096283,
0.10364856570959091,
0.6136995553970337,
-0.07715841382741928,
-0.09758992493152618,
-0.6160330772399902,
-0.47234871983528137,
0.05068632587790489,
-0.1561557650566101,
-0.02532266080379486,
0.32352420687... | |
I want to set a path variable cp to one of two values depending on the value of an property.
E.g. the following is what I'm trying to achieve, but I'm not sure about how to get it working properly...
```
<if>
<contains string="${jboss.home}" substring="jboss-4.2.3.GA"></contains>
<then>
<echo message=... | [
0.3420562148094177,
0.16242945194244385,
0.15882420539855957,
-0.33498483896255493,
0.2306026965379715,
0.09086406975984573,
0.0844271332025528,
-0.5425710082054138,
-0.3389417827129364,
-0.5806897878646851,
0.24486713111400604,
0.47698718309402466,
-0.48794201016426086,
0.2047953009605407... | |
<echo message="Using JBoss 4.0.5 classpath"/>
<path id="cp">
...
</path>
</else>
</if>
```
```
<condition property="usejboss423">
<contains string="${jboss.home}" substring="jboss-4.2.3.GA"/>
</condition>
<target name="build.jboss.cp" depends="build.jboss.cp.423,build.jboss.cp.405"/>
... | [
0.3099939525127411,
0.51654052734375,
0.0437777079641819,
-0.6044988632202148,
0.004844712559133768,
0.2095126360654831,
0.5439499020576477,
-1.0018059015274048,
-0.4111689329147339,
-0.3594260811805725,
0.0733889564871788,
0.5040276646614075,
-0.5136470198631287,
-0.06391191482543945,
0... | |
My team member made a reference to a DLL on his local drive (e.g., `C:\mystuff\thirdparty.dll`) and checked in the project with the reference. I refreshed my local copy of the project and now I have a broken reference: `<The system cannot find the reference specified>`. I have the thirdparty.dll on my local machine, bu... | [
0.018367014825344086,
0.11848164349794388,
0.4165584146976471,
-0.04480978474020958,
0.22777950763702393,
-0.13545149564743042,
0.3356184959411621,
-0.19557273387908936,
-0.04262354224920273,
-0.8150641322135925,
-0.11198952794075012,
0.6385149955749512,
-0.3320992887020111,
0.171644300222... | |
**even if** the developer didn't "install" the DLL beforehand?
Thanks.
If you create a "lib" or "assemblies" directory under the solution, or at least in the source control project, and add all 3d party assemblies and reference them there, it should eliminate many problems like yours.
Generally, you won't have to use... | [
0.6273265480995178,
0.15520770847797394,
0.12065441161394119,
0.21844184398651123,
-0.07339883595705032,
-0.2748197913169861,
0.15333160758018494,
0.19599877297878265,
-0.24898342788219452,
-0.5186150074005127,
-0.32895588874816895,
0.6338726878166199,
-0.027245059609413147,
-0.08642899245... | |
Database: MS SQL 2005
Table:
> EmployeeNumber | EntryDate | Status
Sample Data:
200 | 3/1/2009 | P
200 | 3/2/2009 | A
200 | 3/3/2009 | A
201 | 3/1/2009 | A
201 | 3/2/2009 | P
Where P is present, A is absent.
I have tried row\_number over partion. But it does not generate the sequence which I expect.
F... | [
-0.37173211574554443,
0.045696988701820374,
0.5619064569473267,
-0.10021276772022247,
-0.10680138319730759,
0.14138707518577576,
0.07849886268377304,
-0.08269473165273666,
-0.1687116026878357,
-0.33750882744789124,
0.0723724290728569,
0.0409870482981205,
-0.037969544529914856,
0.2979302108... | |
be able to do this with a CTE in SQL 2005. Stealing Lievens data:
```
DECLARE @Attendance TABLE (EmployeeNumber INTEGER, EntryDate DATETIME, Status VARCHAR(1))
INSERT INTO @Attendance VALUES (200, '03/01/2009', 'P')
INSERT INTO @Attendance VALUES (200, '03/02/2009', 'A')
INSERT INTO @Attendance VALUES (200, '03/03/2... | [
0.07184036076068878,
0.04008381813764572,
0.32204151153564453,
0.1439824104309082,
0.082010917365551,
0.035416681319475174,
0.10949445515871048,
0.019146395847201347,
0.10601228475570679,
-0.11887537688016891,
-0.008542667143046856,
0.27699077129364014,
0.05192101374268532,
0.1466083526611... | |
EmployeeNumber,
Status,
Days
)
AS
(
SELECT
a.EntryDate,
a.EmployeeNumber,
a.Status,
1
FROM | [
0.1940239816904068,
-0.1186572015285492,
0.3735986649990082,
-0.04877907410264015,
0.25438258051872253,
0.26690995693206787,
0.16454045474529266,
0.13257545232772827,
-0.27413201332092285,
-0.4154123365879059,
-0.3508308231830597,
-0.02755942940711975,
0.03348773717880249,
0.44080916047096... | |
@Attendance a
WHERE
a.EntryDate = (SELECT MIN(EntryDate) FROM @Attendance)
-- RECURSIVE
UNION ALL
SELECT
a.EntryDate,
a.EmployeeNumber, | [
0.4161737263202667,
-0.18853037059307098,
0.19953133165836334,
-0.002093811286613345,
0.09129293262958527,
0.34117910265922546,
0.06641587615013123,
-0.014854773879051208,
0.034696195274591446,
-0.37919798493385315,
-0.16245843470096588,
0.2817486524581909,
0.05216176435351372,
0.497287809... | |
a.Status,
CASE WHEN (a.Status = Parent.Status) THEN Parent.Days + 1 ELSE 1 END
FROM
@Attendance a
INNER JOIN
Dates parent
ON
datediff(day, a.EntryDate, DateAdd(day, 1, parent.EntryDate)) = 0 | [
0.2595371901988983,
-0.16661174595355988,
0.809289276599884,
-0.05853115767240524,
0.13885942101478577,
0.14636161923408508,
0.4122051000595093,
0.2907261550426483,
-0.11624328792095184,
-0.42285388708114624,
-0.12333929538726807,
-0.10187238454818726,
0.01615554466843605,
0.51768940687179... | |
AND
a.EmployeeNumber = parent.EmployeeNumber
)
SELECT * FROM Dates order by EmployeeNumber, EntryDate
```
Although as a final note the sequence does seem strange to me, depending on your requirements there may be a better way of aggregating the data? Never the less, this will produce the sequence... | [
0.36698469519615173,
0.1250307559967041,
0.4767169654369354,
-0.05177115648984909,
0.4220181703567505,
0.1253807097673416,
-0.062025051563978195,
-0.06876382976770401,
0.008050845004618168,
-0.5341368913650513,
0.002515600062906742,
0.15181800723075867,
0.07419442385435104,
0.5145078301429... | |
I would like to redirect the output from a command to a file and to stdout. I am using Windows XP command line.
I realize that there is a command in linux called tee which will do this, but I want this in windows.
Use [tee for windows](http://www.google.com/search?q=tee+for+windows). | [
0.6136703491210938,
-0.04695149511098862,
0.3921809792518616,
-0.41661569476127625,
-0.17619116604328156,
-0.35592198371887207,
0.032377906143665314,
-0.028339112177491188,
-0.04257166013121605,
-1.0516343116760254,
-0.01581489108502865,
0.8867090940475464,
-0.3658866286277771,
-0.06303185... | |
how do you create a new database user with password in sql server 2005?
i will need this user/password to use in the connection string eg:
```
uid=*user*;pwd=*password*;
```
```
CREATE LOGIN [user] WITH PASSWORD='password',
DEFAULT_DATABASE=[your_db], CHECK_POLICY=OFF
GO
CREATE USER [user] FOR LOGIN [user]
... | [
-0.34770438075065613,
0.021868234500288963,
0.478458046913147,
0.02682732231914997,
-0.12142651528120041,
-0.17301473021507263,
0.0892454981803894,
-0.2655944526195526,
-0.16641700267791748,
-0.7227813601493835,
0.0678577646613121,
0.5629842281341553,
-0.3179425001144409,
0.329899907112121... | |
I have a Gridview, which is bound to an IList.
I'd like to have paging " the safer way" (only fetching the Items I Need), so I created a metod on my repository like this
```
public Ilist<Item> GetItems(int from, int number){ ... }
```
The thing is that wheen I bind it, it only shows me the n items, and doesn't show ... | [
0.1453830897808075,
-0.010665172711014748,
0.3842102885246277,
0.002441365271806717,
-0.053058069199323654,
-0.014880874194204807,
0.10719197988510132,
-0.27062615752220154,
-0.024624157696962357,
-0.682788074016571,
0.2982065975666046,
0.33028578758239746,
-0.4384590685367584,
0.017177090... | |
strategy here? Is it necessary to have an ObjectDS? I refuse to belive so!
What can I do to have Paging?
Unfortunately you do need an Object DataSource or implementing a custom datasource. Here is a link to the msdn doc that mentions it <http://msdn.microsoft.com/en-us/library/5aw1xfh3.aspx>. Datagrid did supported do... | [
0.14315666258335114,
-0.4058208763599396,
0.0863977000117302,
0.1825983226299286,
-0.22070494294166565,
-0.14111816883087158,
0.24174004793167114,
0.10046248883008957,
-0.16572190821170807,
-0.7395691871643066,
0.2549792528152466,
0.9105110764503479,
-0.08061891794204712,
-0.08244370669126... | |
I am trying to create a Stored procedure (or query expression) that Pivots on a grouping ID. After looking at the examples here and elsewhere I have failed to get my pivot statements to work in a stored procedure, and I am looking my help.
Also, if this could be done with LINQ on a LIST that would be a solution for me... | [
0.20827673375606537,
0.17342863976955414,
0.22907014191150665,
-0.13170073926448822,
-0.020800502970814705,
-0.28167155385017395,
-0.17258495092391968,
-0.23641321063041687,
-0.2540007531642914,
-0.5760006904602051,
0.16863112151622772,
0.6911910176277161,
-0.6620329022407532,
-0.279669493... | |
2 Blue
3 2 Green
1 3 10
2 3 24
3 3 30
1 | [
0.16472125053405762,
0.4633035957813263,
-0.20180445909500122,
-0.32552289962768555,
-0.16424638032913208,
0.06912362575531006,
0.4365019202232361,
-0.06606623530387878,
-0.034391630440950394,
-0.5971304774284363,
-0.07580280303955078,
-0.29542917013168335,
-0.4205593764781952,
0.112125396... | |
4 1
2 4 2
3 4 3
```
the Group #2 means a CHOICE, the group # 3 means COUNT, the Group #4 means SORT so I want to name those columns (I realize this is a shortcoming of PIVOT but that's OK).
```
ID CHOICE COUNT | [
-0.07653328776359558,
0.2399793118238449,
0.28973397612571716,
-0.1906411200761795,
-0.3673366904258728,
0.4727349877357483,
-0.22855718433856964,
-0.5160751342773438,
-0.35423457622528076,
-0.4214034676551819,
0.01577969267964363,
0.06639079004526138,
-0.5677452683448792,
-0.2030600458383... | |
SORT
1 Red 10 1
2 Blue 24 2
3 Green 30 3
```
OK, looks like I'm answering my own question.
The correct way to do it is to use "\n" for line breaks. Outlook did not recognize this because I had "ENCODING=quoted-printable" on the description. Once | [
0.22184713184833527,
0.1711963266134262,
0.2862688899040222,
-0.2493426352739334,
0.10929550230503082,
0.28975480794906616,
0.0443555973470211,
0.23848670721054077,
-0.34170037508010864,
-0.5977610945701599,
-0.07004497200250626,
0.22983205318450928,
-0.5397844910621643,
-0.088165655732154... | |
I removed that, Outlook displayed the new lines correctly.
Also, to get the file to open correctly in Apple iCal, you need to use "VERSION:2.0" for the file version. If you use "VERSION:1.0", it will tell you it can't read the file (even though it conforms to the 1.0 spec).
NOTE: As others have mentioned, the file ac... | [
0.06153565272688866,
0.24088169634342194,
0.41542890667915344,
-0.15233324468135834,
0.4199132025241852,
-0.0741257295012474,
0.5593708753585815,
0.35847437381744385,
-0.12773273885250092,
-0.6585521697998047,
-0.2024994045495987,
0.5075806975364685,
-0.27748769521713257,
0.319744616746902... | |
According to *[Professional ASP.NET MVC 1.0](http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx)*, page 8, "If you are using VS 2008 Standard Edition or Visual Web Developer 2008 Express you will need to download and install the NUnit, MBUnit or XUnit extensions for ASP.NET MVC in or... | [
0.5174863934516907,
-0.026376616209745407,
0.351173996925354,
0.04471387341618538,
-0.30959731340408325,
0.12055103480815887,
0.1886492520570755,
-0.19159889221191406,
-0.19612109661102295,
-0.42959335446357727,
-0.09028686583042145,
0.6559814810752869,
-0.08654100447893143,
-0.01148748490... | |
MVC Test Framework Integration Walkthrough](http://blogs.msdn.com/webdevtools/archive/2008/03/06/asp-net-mvc-test-framework-integration-demo.aspx). But they all refer to running `devenv /setup` which doesn't seem to be available for Visual Web Developer 2008 Express. Has anyone gotten the Create Unit Test Project dialo... | [
0.3010731041431427,
-0.08930707722902298,
0.3123456537723541,
0.07473607361316681,
-0.4819815456867218,
-0.1099310964345932,
0.4481792747974396,
-0.3109935522079468,
-0.15957383811473846,
-0.48431074619293213,
-0.013704258017241955,
0.6608456969261169,
-0.02976764738559723,
-0.041263744235... | |
I'm trying to display Japanese characters on a PHP page. No loading from the database, just stored in a language file and echo'ed out.
I'm running into a weird scenario. I have the page properly setup with UTF-8 and I test a sample page on my local WAMP server and it works.
The moment I tested it out our development... | [
0.4294312000274658,
0.26382365822792053,
0.0406230129301548,
0.035641103982925415,
-0.1525454819202423,
0.1284019947052002,
0.32938069105148315,
0.24907007813453674,
0.10932253301143646,
-0.7283907532691956,
0.20985785126686096,
0.16627950966358185,
-0.17420512437820435,
0.1043996587395668... | |
fundamental I'm missing?
Thanks
Since you've stated that it is working in your development environment and not in your live, you might want to check Apache's [AddDefaultCharset](http://httpd.apache.org/docs/2.0/mod/core.html#AddDefaultCharset) and set this to UTF-8, if it's not already.
I tend to make sure the follow... | [
0.2570626437664032,
-0.13894255459308624,
0.40476980805397034,
0.01727204956114292,
-0.2935321033000946,
-0.35043489933013916,
0.45250585675239563,
-0.36605846881866455,
-0.08737078309059143,
-0.3081095814704895,
-0.07622228562831879,
0.8012650609016418,
-0.05987928807735443,
0.40953084826... | |
I want to check the results of an operation in the Net::FTP Perl module rather than die.
Typically you would do:
```
$ftp->put($my_file)
or die "Couldn't upload file";
```
But I want to do something else instead of just dying in this script so I tried:
```
$ftp->put($my_file)
or {
log("Couldn't upload $m... | [
0.3718767464160919,
0.02954007312655449,
0.23177854716777802,
-0.15584255754947662,
-0.14028599858283997,
0.01311047375202179,
0.26692306995391846,
-0.11522611230611801,
-0.47360292077064514,
-0.6793688535690308,
-0.15326951444149017,
0.4363243579864502,
-0.142446368932724,
-0.115914002060... | |
log("Couldn't upload $my_file");
return(-1);
};
log("$my_file uploaded");
```
But *this* is probably better style:
```
unless( $ftp->put( $my_file )) { # OR if ( !$ftp->put...
log("Couldn't upload $my_file");
return(-1);
}
```
If you just want to return an error condition, then you can [`die`... | [
0.10378725826740265,
0.01892833597958088,
0.2958938181400299,
-0.08538813889026642,
-0.07176406681537628,
0.03836510330438614,
0.3769121468067169,
-0.22663000226020813,
-0.308810293674469,
-0.25958818197250366,
-0.4304322600364685,
0.5431188941001892,
-0.2706054151058197,
0.142428025603294... | |
put_a_file {
my ( $ftp, $my_file ) = @_;
$ftp->put( $my_file ) or die "Couldn't upload $my_file!";
log( "$my_file uploaded" );
```
} | [
0.4170631170272827,
-0.2014612853527069,
0.08690522611141205,
-0.2915816903114319,
0.1567329615354538,
0.17980201542377472,
0.2715459167957306,
-0.05363191291689873,
-0.26085206866264343,
-0.5821520090103149,
-0.14603202044963837,
0.40437906980514526,
-0.36728644371032715,
0.32542285323143... | |
I have a scanned image which is basically black print on some weird (non-gray) background, say, green or yellow (think old paper).
How can I get rid of the green/yellow and receive a gray picture with as much of the gray structure of the original image intact? I.e. I want to keep the gray around the letters for the an... | [
0.45367980003356934,
0.28335532546043396,
0.042320411652326584,
0.2192423790693283,
0.06732098013162613,
-0.14241771399974823,
0.09890511631965637,
0.11958527565002441,
-0.10820391774177551,
-0.6558988690376282,
-0.033953793346881866,
0.33567675948143005,
-0.1771780401468277,
0.23097549378... | |
or a color range.
For bonus points: How can I automatically determine the background color?
I'd like to use Python with the Imaging Library or maybe ImageMagick.
Note: I'm aware of packages like [unpaper](http://unpaper.berlios.de/). My problem with unpaper is that it produces B&W images which probably look good for... | [
0.5426000952720642,
-0.19314560294151306,
0.20918942987918854,
0.11349016427993774,
-0.17514315247535706,
-0.1333695948123932,
-0.03428901359438896,
0.007107476703822613,
-0.23911285400390625,
-0.8291333317756653,
-0.026421761140227318,
0.542294442653656,
-0.334833025932312,
-0.16379834711... | |
I have a web page that shows lots of tabular data and each of these tables needs to be placed on one horizontal line. I have mocked up an example below:
```
<html>
<style>
.outer{width:300px;height:300px;overflow: scroll;}
.inner{white-space: nowrap;}
.inline{float: left;}
</style>
<body>
<div class="outer">
... | [
0.1693815290927887,
0.1851019561290741,
0.35970669984817505,
-0.1180768683552742,
-0.5087456107139587,
0.28317272663116455,
0.32517921924591064,
-0.30445241928100586,
-0.02418017014861107,
-0.8558664321899414,
0.22030779719352722,
0.3082132339477539,
-0.2847072184085846,
0.320820689201355,... | |
<div class="inline"><table><tr><td>stuff</td></tr></table></div>
<div class="inline"><table><tr><td>stuff</td></tr></table></div>
<div class="inline"><table><tr><td>stuff</td></tr></table></div>
</div>
</div>
</body>
</html>
```
I am having problems that the inner div wraps the table divs unless I... | [
0.11658491939306259,
0.018932946026325226,
0.5766986012458801,
0.033592067658901215,
-0.4881243407726288,
0.1876676082611084,
0.14804938435554504,
-0.5234401226043701,
-0.22367778420448303,
-0.8035055994987488,
0.009529069066047668,
0.3929116129875183,
-0.3992050886154175,
-0.1240390092134... | |
I'm trying to determine the best way to implement a 404 page in a standard ASP.NET web application. I currently catch 404 errors in the Application\_Error event in the Global.asax file and redirect to a friendly 404.aspx page. The problem is that the request sees a 302 redirect followed by a 404 page missing. Is there ... | [
-0.010353920981287956,
-0.018072597682476044,
0.1040847897529602,
0.04158496484160423,
-0.2518553137779236,
-0.10349393635988235,
0.3832799792289734,
0.23000472784042358,
-0.27016663551330566,
-0.8077846169471741,
0.10400313884019852,
0.4196930527687073,
-0.3462160527706146,
0.042444333434... | |
event:
```
protected void Application_Error(object sender, EventArgs e){
// An error has occured on a .Net page.
var serverError = Server.GetLastError() as HttpException;
if (serverError != null){
if (serverError.GetHttpCode() == 404){
Server.ClearError();
Server.Transfer("/Errors/404.aspx");
... | [
-0.3670690059661865,
-0.2108912616968155,
0.4565483629703522,
-0.1862211674451828,
-0.05746026709675789,
0.00401622848585248,
0.4872645437717438,
-0.1858695149421692,
-0.34179961681365967,
-0.736102819442749,
-0.4296804368495941,
0.6571043133735657,
-0.22229710221290588,
0.0572558641433715... | |
= "Page not found";
```
You can also handle the various other error codes in here quite nicely.
Google will generally follow the 302, and then honour the 404 status code - so you need to make sure that you return that on your error page. | [
0.23550252616405487,
0.4318211078643799,
0.0720251202583313,
0.10738745331764221,
0.1316537857055664,
-0.34802481532096863,
0.5280312299728394,
0.3805684745311737,
-0.039583709090948105,
-0.38336890935897827,
-0.06308978796005249,
0.5065749883651733,
-0.10521162301301956,
-0.16263879835605... | |
I know there are a number of threads on here about how to use the using statement and calling the Dispose() method. I have read the majority of these threads.
If I call Dispose(), does it call Close()?
If I want to use an object (say SqlDataReader), but then use it again in another code block, should I not call Dispo... | [
0.4466525912284851,
-0.1062055453658104,
0.13899628818035126,
-0.05849949270486832,
0.14823998510837555,
-0.2674306631088257,
-0.09840504080057144,
-0.06490175426006317,
-0.04062967747449875,
-0.5919829607009888,
0.26230737566947937,
0.6583614349365234,
-0.2731020748615265,
0.2039636969566... | |
Likewise, if I call Close on the FileStream, this will only call Flush() and Close() on the FileStream.
Is checking IL a good way to answer these questions about what is happening under the hood?
> If I call Dispose(), does it call Close()?
Calling [`Dispose`](http://msdn.microsoft.com/en-us/library/system.idisposabl... | [
0.5597781538963318,
-0.02866738848388195,
0.3455025255680084,
-0.09950783103704453,
0.04058615490794182,
-0.5206528306007385,
0.14442496001720428,
-0.5750304460525513,
-0.003289832966402173,
-0.5851808190345764,
-0.047942016273736954,
0.715682327747345,
-0.24910281598567963,
0.008648499846... | |
block, should I not call Dispose()? Which also means to omit the using statement.
If you want to use the object again, you definitely should not dispose it. However, you should typically use two separate connections if you're going to the database two separate times. It's generally not a good idea to keep an [IDataRea... | [
0.20021098852157593,
-0.17579609155654907,
0.09900811314582825,
0.20417824387550354,
0.0462784618139267,
-0.1731054037809372,
0.09323479235172272,
-0.18086382746696472,
-0.24469991028308868,
-0.5789517760276794,
-0.0011572838993743062,
0.16902406513690948,
-0.4238947331905365,
0.2574361562... | |
if I call Close on the FileStream, this will only call Flush() and Close() on the FileStream.
Disposing an object that wraps another disposable object should call `Dispose` on the interior object. Calling `Close` on a `FileStream` will call its `Dispose` method under the good, so it will also act on both streams.
> I... | [
0.613994300365448,
-0.0035384998191148043,
0.258539617061615,
-0.13455316424369812,
-0.016336502507328987,
-0.5558291673660278,
0.1777896285057068,
-0.5138270854949951,
-0.05187724903225899,
-0.5632624626159668,
-0.08997246623039246,
0.7881049513816833,
-0.30799251794815063,
-0.11303049325... | |
with before you try to figure it out yourself, and Reflector if you don't want to muck around in IL. | [
0.7258334755897522,
-0.05210239067673683,
0.27533987164497375,
0.10432447493076324,
-0.44638922810554504,
-0.05091148242354393,
-0.24456606805324554,
-0.09372834861278534,
-0.026963016018271446,
-0.45585814118385315,
0.03956715762615204,
0.7259624004364014,
-0.18274898827075958,
0.18547177... | |
I have a node tree built out of Node objects.
They are more complex than the code I am showing but only have primitive or Serializable instance members.
Assuming each Node can have up to 10 children the code looks a bit like so.
```
public class Node implements Serializable{
private static final long serialVersi... | [
-0.012757345102727413,
0.1292838156223297,
0.36790844798088074,
-0.017777593806385994,
0.32472944259643555,
0.30699586868286133,
0.25858911871910095,
-0.08876758813858032,
-0.2936619818210602,
-0.7438149452209473,
-0.16976667940616608,
0.16573846340179443,
-0.16656114161014557,
0.653636991... | |
tree is quite expensive to build but once it is done I write it to a file:
```
ObjectOutputStream serializedOuput = new ObjectOutputStream(new FileOutputStream(cacheFile));
serializedOuput.writeObject(tree);
serializedOuput.close();
```
When I am done caching the tree I make some irreversable changes to like trimmin... | [
0.12113042920827866,
0.057588499039411545,
0.4745176136493683,
-0.09002509713172913,
-0.06826409697532654,
-0.030843591317534447,
0.4546256959438324,
-0.19680580496788025,
-0.15634773671627045,
-0.657972514629364,
0.10130772739648819,
0.3533138334751129,
-0.3182641267776489,
0.224420368671... | |
the app and try reading in the serialized file it returns null.
So I seem to be serializing object references rather than the object itself, any ideas where I am going wrong?
Works for me, GNU/Linux with gij 4.3.2.
Make sure all of your fields in the Node class are serializable as well.
This is the code I tried (sho... | [
0.3113429546356201,
0.08941984921693802,
0.34460172057151794,
-0.07570882886648178,
0.08069013804197311,
0.2079753428697586,
0.5722452402114868,
-0.2616743743419647,
-0.05686640739440918,
-0.725767970085144,
-0.00764328520745039,
0.7956395745277405,
-0.6875202655792236,
-0.0821379721164703... | |
ObjectInputStream ois = new ObjectInputStream(
new FileInputStream("File.log")
);
Node root = (Node) ois.readObject(); | [
-0.34040528535842896,
-0.5195471048355103,
0.5002613663673401,
0.04207351803779602,
0.08781465888023376,
0.1371287703514099,
0.18418563902378082,
0.07221068441867828,
-0.2961594760417938,
-0.814547061920166,
-0.09014420956373215,
0.11071255058050156,
-0.32830575108528137,
0.333412617444992... | |
ois.close();
System.out.println("Root value: " + root.getValue());
for(Node n : root.children())
System.out.println("Child: " + n.getValue());
return;
} | [
-0.6754147410392761,
-0.19524620473384857,
0.46628186106681824,
-0.29646167159080505,
0.570054829120636,
0.4930837154388428,
0.28895050287246704,
0.07617579400539398,
-0.14791715145111084,
-0.7011582255363464,
-0.532869815826416,
0.21574170887470245,
-0.26629015803337097,
0.213837221264839... | |
Node root = new Node(null, "First");
root.add(
new Node(root, "Second.Child.1"),
new Node(root, "Second.Child.2")
);
ObjectOutputStream oos = new ObjectOutputStream( | [
-0.3531767725944519,
-0.2515733540058136,
0.507085919380188,
0.06671188771724701,
0.42045947909355164,
0.2935333251953125,
0.3603737950325012,
0.10640338063240051,
-0.1898280531167984,
-0.7487905621528625,
-0.17884038388729095,
0.15880604088306427,
-0.18417835235595703,
0.10374937951564789... | |
new FileOutputStream("File.log")
);
oos.writeObject(root);
oos.close();
} catch(Exception e) {
System.err.println(e.getMessage());
e.printStackTrace();
} | [
-0.0683629959821701,
-0.3236108124256134,
0.5680888891220093,
-0.337013304233551,
0.4787036180496216,
0.0773833766579628,
0.3532586395740509,
-0.3917137086391449,
-0.2776520252227783,
-0.721297562122345,
-0.44128963351249695,
0.42965924739837646,
-0.364292711019516,
0.16943120956420898,
... | |
}
}
class Node implements Serializable {
private static final long serialVersionUID = 2304728943L;
private Node _parent;
private Node[] _children;
private String _value;
public Node(Node parent, String value) {
this._parent = parent;
this._value = value;
this._children = ne... | [
-0.2751878798007965,
-0.25349870324134827,
0.33405017852783203,
-0.14107628166675568,
0.4791949987411499,
0.2931109368801117,
0.3726833462715149,
-0.05256316065788269,
-0.26952046155929565,
-0.5163573026657104,
-0.25266897678375244,
0.31847113370895386,
-0.25495150685310364,
0.645063757896... | |
this._children[1] = child2;
}
public String getValue() {
return this._value;
}
public Node[] children() {
return this._children;
}
public Node parent() {
return this._parent;
}
}
``` | [
-0.052122656255960464,
0.026085885241627693,
0.2100590169429779,
-0.016103222966194153,
0.5563125014305115,
0.10738510638475418,
0.285569429397583,
-0.09304118901491165,
-0.18096233904361725,
-0.7014272809028625,
-0.5087267756462097,
0.39188095927238464,
-0.3201809823513031,
0.434495478868... | |
Apart from the google/bigtable scenario, when shouldn't you use a relational database? Why not, and what should you use? (did you learn 'the hard way'?)
In my experience, you shouldn't use a relational database when any one of these criteria are true:
* your data is structured as a hierarchy or a graph (network) of ar... | [
0.06777165085077286,
0.07718860357999802,
-0.29432258009910583,
0.5761272311210632,
-0.047095656394958496,
-0.2774946391582489,
0.2841928005218506,
0.05638545751571655,
-0.3373207449913025,
-0.5503547191619873,
-0.049872007220983505,
0.5672176480293274,
-0.2633836567401886,
0.0450476817786... | |
databases add a lot of overhead for simple read access. Transactional and referential integrity are powerful, but overkill for some applications. So for read-mostly applications, a file metaphor is good enough.
Finally, you simply don’t need a relational database with its full-blown query language if there are no unex... | [
0.3361421823501587,
0.3022155463695526,
-0.09527002274990082,
0.7809255719184875,
-0.053834155201911926,
-0.2423134446144104,
0.18174082040786743,
0.08513811230659485,
-0.24446788430213928,
-0.39579614996910095,
0.010581476613879204,
0.6686130166053772,
-0.10377347469329834,
0.315026700496... | |
I'm new to iphone development, and I wanted to know. exactly what does the UITouch instance method view do
```
[touch view];
```
I read up on the documentation and understand that it returns the view that the touch was 'in', but what if there exists a view hierarchy. I had originally assumed it would return the subv... | [
-0.2595531940460205,
0.0811334028840065,
0.8190410137176514,
-0.1976395845413208,
-0.017007675021886826,
0.23189517855644226,
0.2275049090385437,
-0.11382437497377396,
0.02569974958896637,
-0.23593440651893616,
0.1001211404800415,
0.6998637318611145,
-0.02043079026043415,
-0.22774651646614... | |
only exception I can think of would be if the top-most view was invisible. | [
0.38173723220825195,
-0.0038495552726089954,
0.27236852049827576,
0.07081082463264465,
0.1505896896123886,
-0.23740185797214508,
0.20838555693626404,
0.4357825219631195,
-0.3359130620956421,
-0.5411957502365112,
0.04876925051212311,
0.4298289716243744,
0.052410103380680084,
-0.170370146632... | |
This is an unusual question, but I'd like to dynamically generate the `__slots__` attribute of the class based on whatever attributes I happened to have added to the class.
For example, if I have a class:
```
class A(object):
one = 1
two = 2
__slots__ = ['one', 'two']
```
I'd like to do this dynamicall... | [
0.1333560198545456,
-0.04086168482899666,
-0.17160269618034363,
-0.14226607978343964,
-0.23792289197444916,
0.2153768092393875,
0.11227865517139435,
-0.2189386934041977,
-0.5982915163040161,
-0.5002368092536926,
0.06397952139377594,
0.6292867660522461,
-0.5410075187683105,
0.27659633755683... | |
want, use a metaclass to introspect the definition of A and add a slots attribute.
```
class MakeSlots(type):
def __new__(cls, name, bases, attrs):
attrs['__slots__'] = attrs.keys()
return super(MakeSlots, cls).__new__(cls, name, bases, attrs)
class A(object):
one = 1
two = 2
__meta... | [
-0.053670745342969894,
-0.016824236139655113,
0.08878346532583237,
-0.20744840800762177,
0.2863783538341522,
0.3165607750415802,
0.30026063323020935,
-0.26227447390556335,
-0.30515536665916443,
-0.6098709106445312,
-0.21245159208774567,
0.6483156085014343,
-0.5175102949142456,
0.1332668066... | |
I need to create a service that will return XML containing data from the database. So I am thinking about using an ASHX that will accept things like date range and POST an XML file back. I have dealt with pages pulling data from SQL Server and populating into a datagrid for visual display but never into XML for deliver... | [
0.41876956820487976,
0.012017346918582916,
0.23026911914348602,
0.38965415954589844,
-0.22631080448627472,
-0.1873438060283661,
0.1562129408121109,
0.23502972722053528,
-0.1635884940624237,
-0.7075405120849609,
0.18998968601226807,
0.002940647304058075,
0.12054939568042755,
0.2445721328258... | |
that the XML format has already been decided so I can't use any automatically generated one.
Combining linq2sqlwith the XElement classes, something along the lines:
```
var xmlContacts =
new XElement("contacts",
(from c in context.Contacts
select new XElement("contact",
new XElement... | [
0.35797885060310364,
0.2501792311668396,
0.7636103630065918,
0.00258546881377697,
0.21302834153175354,
-0.15998761355876923,
-0.12835468351840973,
-0.22022664546966553,
-0.08409944921731949,
-0.3613419532775879,
-0.17528274655342102,
0.7076894044876099,
-0.32530561089515686,
0.193500503897... | |
new XElement("phone", c.Phone),
new XElement("postal", c.Postal)
)
)
).ToArray()
)
);
```
Linq2sql will retrieve the data in a single call to the db, and the processing of the XML will be done at the business server. This splits the load | [
0.4946924149990082,
0.043803922832012177,
0.828718900680542,
0.17224964499473572,
0.2073376625776291,
0.09555158019065857,
-0.08798586577177048,
-0.48949286341667175,
0.20229028165340424,
-0.49082139134407043,
-0.6995453834533691,
0.503626823425293,
-0.3777102530002594,
0.15640100836753845... | |
better, since you don't have the sql server doing all the job. | [
0.2093198150396347,
0.07515594363212585,
-0.1855468899011612,
0.2882072627544403,
-0.0009926476050168276,
-0.26843515038490295,
-0.035882458090782166,
0.3510573208332062,
-0.15563097596168518,
-0.35208573937416077,
0.2066156417131424,
0.5748794078826904,
0.25207990407943726,
-0.08770432323... | |
I am in need of an absolute value function for floats in OCaml and the core language doesn't seem to possess one, so I wrote the following:
```
let absF (f:float) = if f > 0.0 then f else (f *. -1.0);;
```
which seems to work for positives but not for negatives, citing:
This expression has type float -> float but ... | [
-0.01720607839524746,
0.18829049170017242,
0.6036369800567627,
-0.2986268103122711,
0.1024240255355835,
-0.12065945565700531,
0.26194143295288086,
-0.2630734145641327,
0.08743389695882797,
-0.2292371541261673,
-0.15991751849651337,
0.5829654335975647,
-0.44739213585853577,
-0.2510270178318... | |
I have an asp.net website on a server and the db MS SQL 2005 on another server, the last few days the website show me this error message:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is... | [
-0.14365440607070923,
0.31422188878059387,
0.14046484231948853,
-0.04152435064315796,
-0.19911633431911469,
-0.060125164687633514,
0.4626205563545227,
-0.13006319105625153,
-0.4199727177619934,
-0.5304131507873535,
0.31466951966285706,
0.3787590265274048,
-0.08058153837919235,
0.2184846401... | |
fail login to the sql server from strange IPs, which are not ours, i think they are trying to hack the db,
Note the db is window authentication.
My Question is, how to stop that?
The best thing you can do is deny access to your server's SQL port on your firewall. The request will never reach your sever and you'll be g... | [
0.38845592737197876,
0.395500510931015,
0.40982165932655334,
0.15861627459526062,
0.0008391041192226112,
-0.18799233436584473,
0.6523211002349854,
0.0735735148191452,
-0.11860563606023788,
-0.43535375595092773,
0.21101413667201996,
0.2718629539012909,
-0.18967267870903015,
0.33203452825546... | |
Is it possible to detect if the iPod Touch/iPhone has any headphones or other accessories connected to it?
I'm building an app that requires a microphone, and need to know if the "iSomething" has one connected or not, either via the dock connection, or using the headphone port, such as with the inline headphone/microp... | [
-0.037602927535772324,
0.2585168480873108,
0.4812676012516022,
0.15357933938503265,
0.20195461809635162,
-0.1176275908946991,
0.28249984979629517,
-0.15330876410007477,
0.02721077762544155,
-0.45365390181541443,
-0.3845818340778351,
0.9892657995223999,
-0.2169000208377838,
0.08658215403556... | |
updateMicStatus:micConnected]; // user-created method
```
According to the docs for Audio Session Services, this should be used rather than using the device model (iPhone vs. iPod Touch) to determine if an audio input is available to use. You can also set up a callback function to monitor changes to this property via... | [
0.07992469519376755,
-0.18779247999191284,
0.5338521003723145,
0.17244566977024078,
0.30668169260025024,
-0.3331584930419922,
0.24504324793815613,
-0.33035677671432495,
0.08269428461790085,
-0.798681378364563,
-0.04888251796364784,
0.9620713591575623,
-0.2526484429836273,
0.128592267632484... | |
I have yet to find a "nice" way to do two way databinding in .Net.
The one thing I don't like for example in the present asp.net two way databinding is doing the binding in the aspx page is no compile time checking, ie:
```
<asp:TextBox ID="TitleTextBox"
runat="server" Text='<%# Bind("Title_... | [
0.18952830135822296,
0.024731168523430824,
0.3422067165374756,
0.10591188073158264,
-0.26769906282424927,
-0.46236452460289,
0.14119309186935425,
-0.10812855511903763,
-0.09888223558664322,
-0.8114402294158936,
-0.05287347733974457,
0.3716273009777069,
-0.24216118454933167,
0.2584647536277... | |
don't know is possible is, how to receive the objectProperty in my example; I want to receive a *reference* (ie: a pointer) to the property, so later, via this reference, I can either read from or write to the property.
Can this somehow be done with delegates perhaps??
UPDATE:
Note, I want to add the control *refe... | [
0.42156460881233215,
-0.11895150691270828,
0.10641591995954514,
0.39777031540870667,
0.4568760395050049,
-0.31947562098503113,
0.33383211493492126,
-0.18982647359371185,
-0.1104063168168068,
-0.38148388266563416,
0.033954307436943054,
0.17176342010498047,
-0.36020493507385254,
0.5781425237... | |
rich design-time support.
You can interface with the data binding engine in two ways: either programatically or through the designer. To do basic data binding programatically is trivial. Say I have a class named "FooClass" with a string property named "MyString". I have a TextBox named myTxtBox on a form with an insta... | [
0.1779862344264984,
-0.00702705467119813,
0.17781244218349457,
0.11089353263378143,
-0.16697381436824799,
-0.21541421115398407,
0.020149800926446915,
-0.15644675493240356,
0.10251150280237198,
-0.8302103877067566,
-0.09628048539161682,
0.8957952260971069,
-0.4024270474910736,
0.08561635017... | |
probably want to create an Object Data Source in your project and put a BindingSource on your form. If you need help with specific steps in creating the data source I can help, but in general you'll create the source in your project and select the class to which you want to bind. You can then place a BindingSource on y... | [
0.4082885980606079,
-0.14474506676197052,
0.05363684892654419,
0.41648754477500916,
0.04874382168054581,
-0.0731525793671608,
-0.2586541771888733,
-0.0380668006837368,
0.009190759621560574,
-0.9898808598518372,
0.06224943324923515,
0.4257429242134094,
-0.34541988372802734,
0.16866359114646... | |
the class or collection to which you want to bind.
As a side note, as far as I am aware there is no "property delegate", as properties are actually function pairs (a get\_ and a set\_).
UPDATE:
As I read your comments, I'd like to point out that .NET data binding, even at the control level, does NOT automatically us... | [
0.44077807664871216,
-0.15574964880943298,
-0.18861444294452667,
0.36381569504737854,
-0.4740402102470398,
-0.4443415403366089,
0.10763709992170334,
-0.23135803639888763,
-0.15516282618045807,
-0.6113700866699219,
0.006560584530234337,
0.46632567048072815,
-0.34545233845710754,
0.177150219... | |
but either side is more than free to provide its own description profile which would NOT use reflection. | [
0.2829126715660095,
0.11725996434688568,
0.14161723852157593,
0.23022203147411346,
-0.17021043598651886,
-0.11431007087230682,
0.053620584309101105,
-0.051122527569532394,
0.03281650319695473,
-0.5798730850219727,
-0.08925016969442368,
0.4925639033317566,
0.28022682666778564,
-0.1696827113... | |
I have a YUI datatable set up, with about 90 rows of data in it and I want the user to order the columns as they see fit and then print the page.
I have all the YUI stuff set up and it works great. However when printing, it removes all the coloring, and plays with the table layout.
I added this:
```
[
H1 {
text... | [
0.09010237455368042,
-0.04970453307032585,
0.5669837594032288,
-0.07673487067222595,
-0.24090497195720673,
0.3708343803882599,
-0.010966815054416656,
-0.37917056679725647,
-0.051307518035173416,
-0.7216101884841919,
-0.2184358537197113,
0.3862777054309845,
-0.10876026749610901,
-0.28578868... | |
font-family:"Lucida Grande","Verdana",sans-serif;
font-size:12px;
font-weight:bold;
font-style:italic;
display: table-header-group;
}
.yui-skin-sam tr {
border:1px solid #888888;
}
]
```
It prints fine in Firefox 3 now, however, it does not work well in IE7.
Firefox 3 takes the table which is ab... | [
-0.29981210827827454,
0.10322872549295425,
0.8600789308547974,
-0.3263290524482727,
-0.2117641121149063,
0.19190190732479095,
0.27720674872398376,
-0.30869054794311523,
-0.08984772861003876,
-0.7562639713287354,
-0.17997920513153076,
0.5265434384346008,
-0.2993737459182739,
-0.283233404159... | |
YUI markup, or if IE needs some special settings, or what.
this is the page:
```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Intercom List</title>
<link rel="stylesheet" type="... | [
0.16630293428897858,
-0.07779891788959503,
0.45545822381973267,
-0.1833927035331726,
-0.5566285848617554,
0.2997438907623291,
0.24799324572086334,
-0.4352114498615265,
0.3086835741996765,
-0.5987374782562256,
-0.3361748456954956,
0.33282777667045593,
0.18737033009529114,
-0.274298280477523... | |
filter: alpha(opacity=100);margin:0;padding:2,3,2,3;text-align:center;font-family:"Lucida Grande","Verdana",sans-serif;font-size:11px;border-collapse:separate;*border-collapse:collapse;border-spacing:0;}
.yui-skin-sam .yui-dt thead {border-spacing:0;border:none;border-right:0px solid #CBCBCB;} /* for safari bug */
.yui... | [
-0.4579950273036957,
-0.21823064982891083,
0.47384878993034363,
0.028352754190564156,
-0.18189075589179993,
0.4624008536338806,
0.46128129959106445,
-0.2794363796710968,
-0.1598271280527115,
-0.787208080291748,
-0.5362484455108643,
0.36381739377975464,
-0.3038366138935089,
-0.2277440130710... | |
font-family:"Lucida Grande","Verdana",sans-serif;
font-size:12px;
font-weight:bold;
font-style:italic;
display: table-header-group;
}
.yui-skin-sam tr {
border:1px solid #888888;
}
</STYLE>
<script type="text/javascript" src="http://yui.yahooapis.com/2.7.0/build/yahoo-dom-event/yahoo-dom-event.js"... | [
-0.29237258434295654,
-0.08144941926002502,
0.46487125754356384,
-0.30995145440101624,
-0.3778396546840668,
0.5548619627952576,
0.10740391910076141,
-0.5022785067558289,
-0.1292332261800766,
-0.6156440377235413,
-0.3899931013584137,
0.5485156178474426,
-0.1255323886871338,
-0.2744294404983... | |
and dragging left or right.</h2></div>
<div id="intercomList"></div>
<script type="text/javascript" src="employee data.js"></script>
<script type="text/javascript">
YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.Basic = function() {
var sortLastName = function(a, b, desc) {
... | [
-0.2909315824508667,
-0.2954232692718506,
0.46230974793434143,
-0.2916810214519501,
-0.028845541179180145,
0.450128972530365,
0.07037816196680069,
-0.4674716591835022,
-0.3163186311721802,
-0.6003503203392029,
-0.22146916389465332,
0.550144612789154,
-0.36947351694107056,
-0.09082208573818... | |
else if(!YAHOO.lang.isValue(b)) {
return -1;
}
// First compare by lastname
var comp = YAHOO.util.Sort.compare;
var compState = comp(a.getData("lastname"), b.getData("lastname"), desc);
// If | [
-0.23033536970615387,
-0.31675517559051514,
0.31813111901283264,
-0.2862718403339386,
-0.0019265464507043362,
0.21597671508789062,
0.29326921701431274,
-0.42912957072257996,
0.027039285749197006,
-0.6835375428199768,
-0.3824514150619507,
0.5722026824951172,
-0.3095444142818451,
-0.05964611... | |
states are equal, then compare by firstname
return (compState !== 0) ? compState : comp(a.getData("firstname"), b.getData("firstname"), desc);
};
var sortFirstName = function(a, b, desc) {
// Deal with empty values
if(!YAHOO.lang.isValue(a)) {
return ... | [
-0.06929231435060501,
-0.04745905473828316,
0.2398461103439331,
-0.08918324112892151,
0.11974883079528809,
0.37095072865486145,
0.3624228537082672,
-0.45756247639656067,
-0.010404949076473713,
-0.5508406758308411,
-0.2575710713863373,
0.5118046998977661,
-0.4267573952674866,
0.178301036357... | |
}
else if(!YAHOO.lang.isValue(b)) {
return -1;
}
// First compare by firstname
var comp = YAHOO.util.Sort.compare;
var compState = | [
-0.1083916500210762,
-0.25029173493385315,
0.3234010636806488,
-0.3336017429828644,
-0.020897844806313515,
0.2972709834575653,
0.2129250019788742,
-0.4556715190410614,
0.18915937840938568,
-0.8089526891708374,
-0.18740543723106384,
0.45664843916893005,
-0.3889736533164978,
-0.0714512169361... | |
comp(a.getData("firstname"), b.getData("firstname"), desc);
// If states are equal, then compare by lastname
return (compState !== 0) ? compState : comp(a.getData("lastname"), b.getData("lastname"), desc);
};
var sortBuildingName = function(a, b, desc) {
// Deal wit... | [
-0.20132410526275635,
-0.060012806206941605,
0.2006978988647461,
-0.30291834473609924,
0.1441970020532608,
0.39580199122428894,
0.3182416558265686,
-0.5142973065376282,
-0.15713950991630554,
-0.6350904107093811,
-0.40400630235671997,
0.5171171426773071,
-0.34078657627105713,
0.082808516919... | |
return (!YAHOO.lang.isValue(b)) ? 0 : 1;
}
else if(!YAHOO.lang.isValue(b)) {
return -1;
}
// First compare by firstname
var comp | [
-0.2896377444267273,
-0.04201203212141991,
0.1933436542749405,
-0.40301865339279175,
-0.06302576512098312,
0.24740512669086456,
0.2066670060157776,
-0.47313499450683594,
0.2533542513847351,
-0.7404435873031616,
-0.15389405190944672,
0.5439947843551636,
-0.32920005917549133,
0.0648123472929... | |
= YAHOO.util.Sort.compare;
var compState = comp(a.getData("building"), b.getData("building"), desc);
var compState2 = (compState !== 0) ? compState : comp(a.getData("firstname"), b.getData("firstname"), desc);
// If states are equal, then compare by lastname
return (com... | [
0.06260477006435394,
-0.043389976024627686,
0.2543751299381256,
-0.0820087194442749,
0.12755705416202545,
0.4827696681022644,
0.35511231422424316,
-0.42099106311798096,
-0.18465112149715424,
-0.7334383130073547,
-0.3462502360343933,
0.27955761551856995,
-0.3575713634490967,
0.2595353424549... | |
= function(a, b, desc) {
// Deal with empty values
if(!YAHOO.lang.isValue(a)) {
return (!YAHOO.lang.isValue(b)) ? 0 : 1;
}
else if(!YAHOO.lang.isValue(b)) {
return -1; | [
-0.30462467670440674,
-0.009355604648590088,
0.29062619805336,
-0.4842607080936432,
0.021312948316335678,
0.13551391661167145,
0.2726263701915741,
-0.53582364320755,
-0.05960811674594879,
-0.17788997292518616,
-0.6844600439071655,
0.7656961679458618,
-0.7073144912719727,
-0.085236489772796... | |
}
// First compare by firstname
var comp = YAHOO.util.Sort.compare;
var compState = comp(a.getData("company"), b.getData("company"), desc);
var compState2 = (compState !== 0) ? compState : comp(a.getData("firstname"), b.getData("firstname"), desc);
// If sta... | [
0.006803779397159815,
-0.04054410755634308,
0.21090801060199738,
-0.002186259487643838,
0.15650877356529236,
0.4015263020992279,
0.10101819783449173,
-0.28766322135925293,
-0.03389415517449379,
-0.7350763082504272,
-0.23053090274333954,
0.4412190318107605,
-0.4799637198448181,
0.2547980844... | |
lastname
return (compState2 !== 0) ? compState2 : comp(a.getData("lastname"), b.getData("lastname"), desc);
};
var myColumnDefs = [
{key:"extension", width: 65, sortable:true, resizeable:true},
{key:"firstname", width: 100, sortOptions:{sortFunction:sortFirstName}, s... | [
-0.542371928691864,
-0.372457355260849,
0.6962935328483582,
-0.17171916365623474,
0.5006033778190613,
0.3467028737068176,
0.046791836619377136,
-0.07157289981842041,
-0.2166604995727539,
-0.7715675234794617,
-0.4185720980167389,
0.4190726578235626,
-0.028577152639627457,
-0.027222184464335... | |
{key:"company", width: 100, sortOptions:{sortFunction:sortCompanyName}, sortable:true, resizeable:true},
{key:"building", width: 100, sortOptions:{sortFunction:sortBuildingName}, sortable:true, resizeable:true}
];
var myDataSource = new YAHOO.util.DataSource(YAHOO.Data.employees);
m... | [
-0.20366477966308594,
-0.35149717330932617,
0.5869609117507935,
0.050619058310985565,
0.1235862746834755,
0.5168041586875916,
0.42582884430885315,
-0.39080628752708435,
-0.2053665816783905,
-0.43262866139411926,
-0.4338087737560272,
0.4425491690635681,
-0.11901523172855377,
0.0512515529990... | |
myColumnDefs, myDataSource, {draggableColumns:true});
return {
oDS: myDataSource,
oDT: myDataTable
};
}();
});
</script>
<!--END SOURCE CODE FOR EXAMPLE =============================== -->
</body>
</html>
```
This is the employee data file:
```
YAHOO.Data = {
employ... | [
-0.16076479852199554,
0.2119332253932953,
0.7058010697364807,
-0.04510178416967392,
0.2700892686843872,
-0.052868518978357315,
-0.0704779401421547,
0.17908403277397156,
0.1292455792427063,
-0.650242269039154,
-0.4779519736766815,
0.3040788173675537,
-0.20006589591503143,
-0.024397717788815... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"s... | [
-0.29327842593193054,
0.8602988719940186,
0.5219201445579529,
-0.5254981517791748,
-0.08438821136951447,
0.8560904264450073,
0.33680403232574463,
0.00844383705407381,
-0.056443456560373306,
-0.41086241602897644,
-0.868597149848938,
0.2729823589324951,
0.000795027706772089,
0.40099960565567... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"s... | [
-0.2945081889629364,
0.8729708790779114,
0.5312339067459106,
-0.5164695978164673,
-0.052632249891757965,
0.8717122673988342,
0.341903418302536,
0.0418003685772419,
-0.06904137879610062,
-0.40027138590812683,
-0.8548036813735962,
0.24867890775203705,
-0.022655537351965904,
0.408754050731658... | |
building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname... | [
-0.2441137731075287,
0.9114388823509216,
0.5441415309906006,
-0.45754274725914,
-0.00649346224963665,
0.9193841814994812,
0.4210405647754669,
0.033776670694351196,
-0.017476165667176247,
-0.6057355403900146,
-0.8504281640052795,
0.22421231865882874,
0.007973084226250648,
0.4799433052539825... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"s... | [
-0.29327842593193054,
0.8602988719940186,
0.5219201445579529,
-0.5254981517791748,
-0.08438821136951447,
0.8560904264450073,
0.33680403232574463,
0.00844383705407381,
-0.056443456560373306,
-0.41086241602897644,
-0.868597149848938,
0.2729823589324951,
0.000795027706772089,
0.40099960565567... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"s... | [
-0.28906330466270447,
0.8716976642608643,
0.5361582040786743,
-0.5155463814735413,
-0.07381003350019455,
0.8891920447349548,
0.3733937442302704,
0.04681963473558426,
-0.08040699362754822,
-0.41095224022865295,
-0.8826205730438232,
0.263089656829834,
-0.015041053295135498,
0.406113326549530... | |
addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"c... | [
-0.30821937322616577,
0.8166615962982178,
0.5151312351226807,
-0.41118156909942627,
0.05489916354417801,
0.8944291472434998,
0.3362691104412079,
0.04421352595090866,
-0.04022841155529022,
-0.5566014647483826,
-0.8734865188598633,
0.2141384333372116,
0.0010363396722823381,
0.399661034345626... | |
firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
... | [
-0.2911429703235626,
0.7708302736282349,
0.46404939889907837,
-0.38926056027412415,
0.11224929988384247,
0.9184668064117432,
0.3449513912200928,
0.1344713270664215,
-0.03618780896067619,
-0.6041275262832642,
-0.9092232584953308,
0.18316750228405,
-0.030234437435865402,
0.3966374695301056,
... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"},
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"s... | [
-0.29327842593193054,
0.8602988719940186,
0.5219201445579529,
-0.5254981517791748,
-0.08438821136951447,
0.8560904264450073,
0.33680403232574463,
0.00844383705407381,
-0.056443456560373306,
-0.41086241602897644,
-0.868597149848938,
0.2729823589324951,
0.000795027706772089,
0.40099960565567... | |
{extension:"265", firstname:"firstname", lastname:"lastname", company:"company", building:"st addresss"}
]
}
```
Yes, the word "schema" unfortunately has become overloaded among database vendors.
"[SQL-99 Complete, Really](https://rads.stackoverflow.com/amzn/click/com/0879305681)" says:
> An SQL Catalog is a nam... | [
0.018711669370532036,
0.5965026617050171,
0.16727158427238464,
0.13246600329875946,
-0.17869755625724792,
-0.5159150958061218,
0.028035541996359825,
-0.5691198110580444,
-0.23773150146007538,
-0.2519327700138092,
-0.4264692962169647,
0.31403589248657227,
-0.123628631234169,
0.4249525070190... | |
UDTs
> * Constraints and Assertions
> * Character sets
> * Collations
> * Translations
> * Triggers
> * SQL-server Modules
> * SQL-invoked routines
Oracle uses "schema" and "user" interchangeably, which always makes my eyebrows raise.
MySQL uses `SCHEMA` as a synonym for `DATABASE`.
PostgreSQL uses "schema" but uses... | [
0.028805021196603775,
0.029733331874012947,
0.17423339188098907,
0.11010270565748215,
-0.28582870960235596,
-0.23681312799453735,
-0.24260520935058594,
-0.10739971697330475,
-0.43097132444381714,
-0.4296480715274811,
-0.3335724174976349,
0.27183544635772705,
-0.39502039551734924,
0.1657297... | |
My goal is to create a system monitoring application using Java. I would like to know when a user is doing activity on a Windows PC. The result would be something like this:
8:00 - 8:15 activity
9:12 - 10:29 activity
12:24 - 15:34 activity
I'm not interested in any other information (which key was pressed, applicat... | [
0.5009962320327759,
0.017401374876499176,
0.4924430251121521,
-0.20943325757980347,
-0.1548597514629364,
-0.3359776437282562,
0.5285238027572632,
0.03789820894598961,
-0.3091026842594147,
-0.6258600354194641,
0.2703205645084381,
0.5513168573379517,
-0.44861435890197754,
-0.3000022768974304... | |
of the activity, only that a user has moved the mouse or pressed a key. I don't care which key was pressed, as long as I know that a key was pressed in an application somewhere. I also don't care for any other activity except key pressed and mouse movement (for example, I am not interested if a USB key is inserted in a... | [
0.7016841769218445,
-0.1568736881017685,
0.6643505096435547,
0.030851908028125763,
0.06880638748407364,
-0.4088740050792694,
0.27645206451416016,
0.2814347445964813,
-0.48277413845062256,
-0.36397331953048706,
-0.1145082488656044,
0.7814597487449646,
-0.44328469038009644,
-0.19327859580516... | |
through filter drivers that would need to be written in C).
So you will need a client application that runs in the user's desktop and hooks into the keyboard and mouse activity. You would do that via two calls to the Windows API [SetWindowsHookEx](http://msdn.microsoft.com/en-us/library/ms644990(VS.85).aspx) (for low... | [
0.47126421332359314,
-0.671746551990509,
0.1731976866722107,
0.04113257676362991,
-0.05489136651158333,
-0.2587338089942932,
0.09837304055690765,
-0.12605197727680206,
-0.21592383086681366,
-0.9239041805267334,
0.1049327626824379,
0.5710930228233337,
-0.5533211827278137,
-0.101885706186294... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.