text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
int[] ints = new int[] { 1,2 };
int[] newArr = Array.ConvertAll<int,int>(ints, AddTen);
```
with:
```
static int AddTen(int i)
{
return i+10;
}
```
This can also be written with an anonymous method:
```
int[] newArr = Array.ConvertAll<int,int>(ints,
delegate (int i) { return i+ 10;});
```
Or in C# ... | [
-0.11885739862918854,
-0.046623412519693375,
0.3901769816875458,
-0.5416310429573059,
-0.10191270709037781,
0.0496346578001976,
0.4462943971157074,
-0.690575897693634,
-0.0791836604475975,
-0.16152982413768768,
-0.2636983394622803,
0.6538748145103455,
-0.36092275381088257,
-0.0279581826180... | |
you change the signature, you can't. | [
0.8389805555343628,
0.14012938737869263,
-0.08213569223880768,
0.1877688318490982,
0.3108226954936981,
-0.13664095103740692,
0.15895698964595795,
-0.16693085432052612,
-0.04548656940460205,
-0.44541871547698975,
0.05411674827337265,
0.0928449034690857,
0.0013269420014694333,
0.076196439564... | |
We have a WebService with a method to upload images, this method accepts a byte array which is a TIFF.
On the client side the TIFF is loaded with `Image.FromFile(path)` and then saved into a `MemoryStream`. Then `memoryStream.ToArray()` is called which results in a byte array which is used in the WebService request.
... | [
0.641386091709137,
-0.16995812952518463,
0.8643710017204285,
0.1706908643245697,
-0.07581034302711487,
0.07291775941848755,
-0.05503608286380768,
-0.08143381029367447,
-0.259725421667099,
-0.6772838234901428,
0.08474297821521759,
0.6155587434768677,
-0.2733173668384552,
0.02192774601280689... | |
this?
Thanks.
Loading the tiff into an Image does remove all of the compression of the TIFF.
If you don't really have a need to load it into the Image, I'd just read it into memory as an arbitrary file and send the byte array that way. | [
0.31762444972991943,
0.21340015530586243,
0.15945862233638763,
0.23668816685676575,
0.021780673414468765,
0.13145515322685242,
-0.1012328565120697,
0.4130299985408783,
-0.2270433008670807,
-0.37562674283981323,
0.07348127663135529,
0.4708845913410187,
0.06689458340406418,
0.044861461967229... | |
I have the following xaml:
```
<DockPanel>
<DockPanel.Resources>
<Style TargetType="Button">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Yellow"></Setter>
</Trigger> | [
-0.036840345710515976,
-0.032138023525476456,
0.5662923455238342,
-0.4594026505947113,
0.2590978145599365,
0.26786649227142334,
-0.18551838397979736,
-0.33631059527397156,
-0.1464126855134964,
-0.9249345660209656,
0.01996574178338051,
0.30717194080352783,
-0.4023914039134979,
0.13323244452... | |
<Trigger Property="IsPressed" Value="True">
<Setter Property="Foreground" Value="Green"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</DockPanel.Resources>
<Button Content="Cut" Height="30" Width="75"/>
</DockPanel>
```
What happens is that when I mou... | [
0.04653221741318703,
-0.08512061834335327,
0.50636225938797,
-0.4995235800743103,
0.6392127871513367,
0.3335258364677429,
-0.2725864350795746,
-0.45174670219421387,
-0.7196140885353088,
-0.7400322556495667,
-0.2729552388191223,
0.8074718713760376,
-0.15345706045627594,
-0.2166292667388916,... | |
I reverse the order of my triggers in the XAML, the foreground changes to yellow when I mouse over it, but when I press the button, the foreground does NOT change to green.
What is the explanation for this? Is one trigger overriding the other?
WPF is processing your triggers in declared order. In the second example th... | [
-0.13948915898799896,
-0.10830523818731308,
0.530509352684021,
-0.2893730700016022,
0.07178378105163574,
-0.047372281551361084,
0.022658562287688255,
-0.20827290415763855,
-0.5206202864646912,
-0.6058835387229919,
-0.05369152873754501,
0.24548889696598053,
-0.4328959584236145,
0.0544625706... | |
We are currently running a Java integration application on a Linux box. First an overview of the application.
The Java application is a standalone application (not deployed on any Java EE application server like OracleAS,WebLogic,JBOSS etc).
By Stand Alone I mean its NOT a DESKTOP application. However it is run from t... | [
0.5034756064414978,
0.03423082455992699,
0.2626073658466339,
-0.19641725718975067,
0.17516963183879852,
-0.20272918045520782,
0.33148226141929626,
0.0989147424697876,
-0.04234970360994339,
-0.7096967101097107,
-0.06988450139760971,
0.22912782430648804,
-0.4509676396846771,
0.20042528212070... | |
has no direct interaction with it.(Not sure if this is the correct reasoning to qualify as one).
It uses Spring and connects to WebSphere MQ and Oracle Database
We use a Spring Listener(Spring Message Driven POJOs) which listens to a queue on WebSphere MQ. Once there is a message in the queue, the application read the... | [
0.17421935498714447,
-0.13855499029159546,
0.11389366537332535,
0.0018853363581001759,
-0.1946820318698883,
0.02525675669312477,
-0.31992244720458984,
-0.2604706287384033,
-0.4073147773742676,
-0.09566017985343933,
0.16776365041732788,
0.32161515951156616,
-0.12531092762947083,
0.100867465... | |
to EJB MDBs? Thereby deploying it on the Application Server. Is there any added benefit by doing so?
3. There is a request to make the application High Available(HA)? What are the suggested methodologies or strategies that can be put in place to make a standalone application HA?
Does "standalone" == "desktop"?
How do... | [
0.3539268374443054,
0.07542287558317184,
0.4539414048194885,
-0.08159971237182617,
-0.3630096912384033,
-0.1589612513780594,
0.17819102108478546,
-0.3447902500629425,
-0.3388415575027466,
-0.6414984464645386,
0.041507188230752945,
0.34736570715904236,
-0.5145728588104248,
0.104363732039928... | |
that would have to increase as well. Do that before adding more servers. Make sure you have enough RAM on hand.
2. I don't see what EJB MDB buys you over Spring MDB. You keep referring to "app servers". Do you specifically mean Java EE app servers like WebLogic, WebSphere, JBOSS, Glassfish? Because if you're deploying ... | [
0.19916953146457672,
-0.17689429223537445,
0.4074835479259491,
0.08713109791278839,
0.004678802564740181,
0.350886732339859,
-0.01444658450782299,
-0.027621114626526833,
-0.7230948805809021,
-0.35480785369873047,
-0.14930905401706696,
0.5708416700363159,
-0.26732301712036133,
-0.1999788433... | |
talk to your infrastructure folks if you have some. | [
0.6721872687339783,
0.18393176794052124,
-0.05821073800325394,
0.21745359897613525,
0.10233943164348602,
-0.2600322961807251,
0.2366056740283966,
0.6772953271865845,
0.1281600147485733,
-0.7098524570465088,
-0.012702454812824726,
0.42377790808677673,
0.1944456547498703,
-0.3319282233715057... | |
I'm trying to access the Version number of my assembly at runtime.
The code I'm using for that requires a FileIOPermission, which I don't want to grant (I'm in the Internet Zone)
```
this.GetType().Assembly.GetName().Version;
```
Is there another way to access the version number which doesn't require elevation?
It'... | [
0.422340452671051,
0.16642801463603973,
0.4139981269836426,
-0.48224928975105286,
0.04778411239385605,
-0.0726214274764061,
0.4761635661125183,
0.010122069157660007,
-0.31434160470962524,
-0.7893871068954468,
-0.19990016520023346,
0.5723232626914978,
-0.22210706770420074,
0.344175875186920... | |
A co-worker and I are disagreeing on this. He thinks we have licenses for SQL Developer because we purchased VS 2005 Professional. It's been a while since I've installed it but I don't recall that being part of the installation whatsoever. It's always been a separate install and license. Been to the MS VS site and can'... | [
0.5268367528915405,
0.4033816456794739,
0.12964078783988953,
0.029330305755138397,
-0.11871528625488281,
-0.4356749653816223,
0.05600353330373764,
0.026901546865701675,
-0.08456641435623169,
-0.28486302495002747,
0.13285908102989197,
0.6349676251411438,
-0.09720716625452042,
0.338131874799... | |
is a difference between sql express and sql developer. I think express has been bundled with all kinds of things. SQL Developer is basically Enterprise edition for developers.
I purchased Microsoft Visual Studio 2005 Professional Edition (C5E-00001). Included in the box are 2 CDs for installing Visual Studio, 3 CDs for... | [
0.10326935350894928,
0.18376067280769348,
0.046422287821769714,
0.2303607314825058,
-0.49452370405197144,
-0.22088980674743652,
0.19694721698760986,
-0.1460331529378891,
0.05728766322135925,
-0.21247032284736633,
0.15599806606769562,
0.5229286551475525,
-0.14048463106155396,
-0.26804021000... | |
2005 product comparison page as it looked in 2006:
<http://web.archive.org/web/20060209025444/msdn.microsoft.com/vstudio/products/compare/default.aspx>
The short of it: You will in fact receive MS SQL 2005 Developer (32 & 64bit) DVD and Key if you purchase the Pro, or Team editions.
Best of luck, I hope that this he... | [
-0.045935552567243576,
0.05331743508577347,
0.04442758858203888,
0.056572075933218,
-0.4079935848712921,
-0.22648078203201294,
0.16100472211837769,
-0.05154787749052048,
-0.25708919763565063,
-0.09103649854660034,
0.15381552278995514,
0.7714507579803467,
0.2140783667564392,
-0.145379826426... | |
I've created a custom control using Expression Blend:
```
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup... | [
-0.095179483294487,
0.21945858001708984,
0.8442168235778809,
0.010997878387570381,
-0.04365897178649902,
0.3970211446285248,
-0.11462049186229706,
-0.564281702041626,
-0.15181876718997955,
-0.2976223826408386,
0.22891852259635925,
0.2685067355632782,
-0.24126411974430084,
0.174045592546463... | |
this:
```
<MyProject:EditableField Margin="30,180,0,0" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" Width="286" x:Name="FaxNumber">
<Label>
<Text>Fax number:</Text>
</Label>
<Value>
<Contents>
111-222-333 | [
-0.2988528907299042,
0.300971120595932,
0.7084866762161255,
-0.18684595823287964,
0.08202501386404037,
0.41455161571502686,
-0.2648845314979553,
-0.3545738756656647,
-0.6069256067276001,
-0.3135571777820587,
0.050431784242391586,
0.05765318498015404,
-0.009531239047646523,
0.14788563549518... | |
</Contents>
</Value>
</MyProject:EditableField>
```
When I say perhaps, this clearly doesn't work. What would be the correct syntax to add them?
The simplest method would be to add two new properties to the code behind, eg LabelText and ContentText. Wire these up to set and get the Text properties... | [
0.08888185024261475,
0.18792665004730225,
0.46931543946266174,
-0.1343896985054016,
0.10111309587955475,
0.008282246068120003,
-0.0013545402325689793,
-0.4020787477493286,
-0.024515369907021523,
-0.8732534050941467,
-0.0038023709785193205,
0.6124013662338257,
-0.44661250710487366,
-0.01835... | |
dependency properties (and thus supporting animation, data binding etc), and binding the control text of the child controls to these properties. | [
-0.04836912080645561,
0.1538555771112442,
0.24177566170692444,
0.4452943503856659,
0.1981625258922577,
0.03326474875211716,
-0.21005845069885254,
-0.24411608278751373,
-0.07248880714178085,
-0.6130254864692688,
-0.4703277349472046,
0.5365641117095947,
-0.13374681770801544,
0.24046586453914... | |
I'm trying to find a way to count the total number of lines in all of the source files of a project I have. I've tried piping `dir -r -name` into `measure-object -line`, but that just counts the number of files I have.
Does anyone have a script to do this?
Thanks to everyone who answered. The way I ended up implementi... | [
0.19780199229717255,
0.041934799402952194,
0.2612186670303345,
0.13107331097126007,
-0.17581196129322052,
0.1931675374507904,
0.13161291182041168,
0.014388415031135082,
-0.2669353485107422,
-0.7252753376960754,
0.07849913090467453,
0.12707141041755676,
-0.16334764659404755,
0.1119487732648... | |
```
class B
{
public:
int a;
void fn();
}
```
If I create an object of B, using
```
B* pb = new B;
```
Where is the memory of fn() locate?
Is there a pointer in object that pointing at the memory loaction of fn()?
If yes, why sizeof(B) returns the value as if there is no pointer in object at all?
>... | [
-0.025454511865973473,
0.19862684607505798,
0.20617450773715973,
-0.28100642561912537,
0.10271493345499039,
0.04978392273187637,
0.3602965176105499,
-0.08723505586385727,
-0.08006089925765991,
-0.5805339813232422,
-0.3263433873653412,
0.4831821918487549,
-0.4527217149734497,
0.311843037605... | |
to do with the instantiation of `B` via `pb`.
> Is there a pointer in object that pointing at the memory loaction of fn()?
No. For a normal member function this isn't required since the address is known at compile time (or, at the latest, at link time); it therefore doesn't have to be stored separately at runtime.
F... | [
-0.33410152792930603,
-0.2686053216457367,
0.2626831829547882,
0.10813887417316437,
-0.09247061610221863,
0.29008233547210693,
-0.005208926275372505,
-0.04817621782422066,
-0.3818702697753906,
-0.43806666135787964,
-0.24096401035785675,
0.4958697557449341,
-0.3557630479335785,
0.2273047268... | |
if a pointer/reference of type `Base` points to a sub-class `Derived`, the compiler has no way of knowing which function to call; rather, the correct function is calculated at runtime by looking it up in the associated vtable. The vtable pointer is also evident in the `sizeof` the object. | [
-0.07585520297288895,
-0.14815257489681244,
0.059810951352119446,
0.0400598905980587,
-0.14660538733005524,
0.14992624521255493,
-0.021981867030262947,
-0.16530871391296387,
0.04960448667407036,
-0.25361549854278564,
-0.21868270635604858,
0.4995516836643219,
-0.23132790625095367,
0.1464067... | |
So what I want to do is to coordinate some effects using jQuery for some AJAX calls that I'm working with. My problem is that the fadeIn for the second div fires at the same time with the fadeOut for the first div.
This could apply to other events as well so I'm curious, is there any way to make fadeId launch ONLY aft... | [
0.32029688358306885,
-0.3051541745662689,
0.5442247986793518,
-0.03617235645651817,
-0.17897669970989227,
-0.3438226878643036,
0.07740818709135056,
-0.15527185797691345,
0.10461761057376862,
-0.5299996733665466,
-0.17556609213352203,
0.8254308104515076,
-0.3772401511669159,
-0.214052870869... | |
over. | [
-0.0018216409953311086,
0.12996041774749756,
0.8757584691047668,
-0.07973791658878326,
-0.0538894385099411,
-0.4595758616924286,
0.016536716371774673,
0.2265203446149826,
-0.12140295654535294,
-0.728319525718689,
-0.10928209871053696,
0.26044487953186035,
0.0582684688270092,
0.312695384025... | |
I am reading in some raw data that has a couple of bad dates. Specifically, someone has keyed in "29th Feb" on a NON leap year. For example:
```
data _null_;
input test :yymmdd8.;
format test date9.;
cards;
20270229
run;
```
The customer would like this to revert to the 28th Feb. Is there a quick / efficient method ... | [
0.0813162624835968,
0.2327500730752945,
0.6612917184829712,
-0.10890331864356995,
0.06245570629835129,
0.022138947620987892,
0.3309115171432495,
0.13748398423194885,
-0.3349938690662384,
-0.302248477935791,
-0.3341754972934723,
0.13648395240306854,
0.11656688898801804,
0.24980475008487701,... | |
and numeric(date).
if the numeric date is missing then check if the
character date ends with "0229," if so, then change it
to "0228" and see if it is a valid date.
If OK, then that is it. otherwise, keep it missing. */
%let FEB29 = 0229;
%let FEB28 = 0228;
data one;
drop temp;
input temp $char8. @1 da... | [
0.23087304830551147,
-0.12467403709888458,
0.48419931530952454,
-0.2615284025669098,
0.18562573194503784,
0.350801944732666,
0.21262051165103912,
-0.06663691997528076,
-0.35547956824302673,
-0.3786475658416748,
-0.4686274230480194,
0.4131931662559509,
-0.20013122260570526,
0.40890443325042... | |
date = input(cat(substr(temp,1,4), "&FEB28"), ?? yymmdd8.);
return;
cards;
20080229 ok
20090229 should be changed to 28th
201XX229 this should be missing
20110229 -> 28
20120229 ok
20130229 -> 28
20270229 -> 28
;
run;
/* on log
temp=20080229 date=20080229
temp=20090229 date=20090228
temp=201XX229 date=.
temp=2... | [
-0.10247205942869186,
0.22333496809005737,
0.8370413184165955,
0.018184391781687737,
0.13831685483455658,
0.23210513591766357,
0.6403213739395142,
-0.05622275918722153,
-0.8297837972640991,
-0.3144204020500183,
-0.1594800353050232,
0.0049997069872915745,
-0.18934553861618042,
0.13765588402... | |
I am trying to join a select disinct statement to a select sum statement. Here is an example of the data
```
CD STDATE ENDDATE PR
F1 01/02/09 01/04/09 $10
F1 01/02/09 01/04/09 $40
F1 01/02/09 01/04/09 $20
F1 01/02/09 01/04/09 $30
F1 01/22/09 01/26/09 $10
F1 01/22/09 01/26/09 $50
F1 01/22/09 0... | [
-0.27442964911460876,
0.1926722526550293,
0.3535396158695221,
-0.35630372166633606,
-0.2589682340621948,
0.34962570667266846,
0.37376654148101807,
-0.30559447407722473,
0.17918965220451355,
-0.5627159476280212,
-0.2100657969713211,
0.3287474513053894,
-0.1639811247587204,
0.127209082245826... | |
ENDDATE, CD FROM TABLE AS A
INNER JOIN (SELECT SUM(PR) FROM TABLE) AS B
ON A.STDATE=B.STDATE
```
How can I do that???
I think you are looking for grouping:
```
select
t.cd,
t.stdate,
t.enddate,
sum(t.pr)
from
table t
group by
t.cd,
t.stdate,
t.enddate
``` | [
0.041535522788763046,
-0.1252269744873047,
0.5596535801887512,
-0.08900586515665054,
-0.38098224997520447,
0.14666134119033813,
-0.18783098459243774,
-0.7479388117790222,
-0.24015019834041595,
-0.26541489362716675,
-0.09534183144569397,
0.11748886108398438,
-0.290628582239151,
0.3132620155... | |
I have the following code which I am are currently using .... Basically, this method assigns the correct boolean flag (TRUE/FALSE) for each Task. As more and more tasks need to be added .. I can see that the switch statement will have to grow to cater for every task.
There has to be an easier way ... to keep the metho... | [
0.3356349766254425,
-0.14718618988990784,
0.14975400269031525,
-0.05365808308124542,
0.036075279116630554,
-0.17306195199489594,
0.4795178174972534,
-0.12817029654979706,
-0.12362251430749893,
-0.6942036747932434,
0.06540197134017944,
0.2219959795475006,
-0.28380531072616577,
0.36976322531... | |
List<ClassStructure.Tasks> TaskStatus)
{
foreach (ClassStructure.Tasks data in TaskStatus)
{
string Task_CallID = data.Task_Call_ID;
switch (Task_CallID)
{
case ClassStructure.Tasks_CallIDs_Strings.TASK1:
User.TASK1 = data.Task_Flag; | [
-0.21996580064296722,
-0.4701900780200958,
0.29005008935928345,
-0.3876795768737793,
0.23592516779899597,
0.3571854829788208,
0.10026469081640244,
-0.43479275703430176,
-0.2136732041835785,
-0.7016592025756836,
-0.39209339022636414,
0.4558097720146179,
-0.40233609080314636,
-0.067128136754... | |
break;
case ClassStructure.Tasks_CallIDs_Strings.TASK2:
User.TASK2 = data.Task_Flag;
break;
case ClassStructure.Tasks_CallIDs_Strings.TASK3:
User.TASK3 = data.Task_Flag; | [
-0.6855091452598572,
-0.21610592305660248,
-0.14798639714717865,
-0.14202535152435303,
0.4179544150829315,
0.30215081572532654,
0.39812055230140686,
-0.13311316072940826,
-0.3416270315647125,
-0.1983863264322281,
-0.5601968169212341,
0.15113630890846252,
-0.25387024879455566,
0.02811615169... | |
break;
}
}
return User;
}
```
ClassStructure.Tasks\_CallIDs\_Strings = String Representation of the Tasks
data.Task\_Flag = boolean
User.TASKX = boolean
Any feedback is welcome. I am sure there is an easy solution.
For a lot of values like these, I would use a map something like this:
```
Dictio... | [
-0.15123333036899567,
0.05598263069987297,
0.2086992859840393,
-0.10448887199163437,
-0.04387146607041359,
-0.13130909204483032,
0.36167266964912415,
-0.14234726130962372,
-0.41198042035102844,
-0.6336629986763,
-0.12106716632843018,
0.5808412432670593,
-0.38843974471092224,
0.054296143352... | |
I have code that correctly finds the line number of an IMethod in Eclipse under Windows:
```
IMethod method= ...;
String source= type.getCompilationUnit().getSource();
int lineNumber= 1;
for (int i= 0; i < method.getSourceRange().getOffset(); i++)
if (source.charAt(i) == Character.LINE_SEPARATOR)
lineNumbe... | [
-0.18464906513690948,
-0.34027111530303955,
0.6946039795875549,
-0.1903582364320755,
0.04497649893164635,
0.08089189231395721,
0.42334651947021484,
-0.4162611663341522,
0.08592051267623901,
-0.8410823345184326,
-0.16747792065143585,
0.5463060140609741,
-0.17871540784835815,
-0.241308942437... | |
not, is there a platform independent way to count line breaks in a string?
Thanks,
Kent Beck
I can't answer (1), but I'll give (2) a shot.
Oddly enough, I think your code was only working by coincidence. [`Character.LINE_SEPARATOR`](http://java.sun.com/javase/6/docs/api/java/lang/Character.html#LINE_SEPARATOR) indic... | [
-0.10239957273006439,
-0.21625280380249023,
0.3777623772621155,
0.11450362950563431,
-0.009951690211892128,
0.24741940200328827,
0.3991495668888092,
-0.27092286944389343,
-0.4604884684085846,
-0.43218863010406494,
-0.41944247484207153,
0.16126227378845215,
-0.45322224497795105,
0.058520779... | |
`String`, so it might not be suitable. Since it seemed to work with `'\r'` on Windows, I'd guess that a simple check for `'\n'` would suffice as well. Alternatively, you could use a `BufferedReader` wrapped around a [`StringReader`](http://java.sun.com/javase/6/docs/api/java/io/StringReader.html), as Wouter Lievens sug... | [
-0.05560246855020523,
-0.23608827590942383,
0.14292845129966736,
-0.318960040807724,
0.000027757687348639593,
-0.0638326108455658,
-0.008982047438621521,
0.014280073344707489,
-0.3124524652957916,
-0.4440532922744751,
-0.00875843781977892,
0.37148338556289673,
-0.47907379269599915,
-0.0545... | |
I've been wondering this for a while now, but what is the best way to ensure that in a web app (RoR, Sinatra, PHP, anything) that when you are creating links (either generating with a method, or writing in by hand) that they go to the proper place whether you are on the root of a domain or not: <http://www.example.com/... | [
0.4807322323322296,
0.3437194228172302,
0.6087075471878052,
0.18232634663581848,
0.3131812810897827,
0.0734955221414566,
0.16135960817337036,
0.17166289687156677,
-0.44811999797821045,
-0.7227267622947693,
0.001256266376003623,
0.2477729618549347,
-0.020377686247229576,
0.1976974606513977,... | |
anything.
Edit: By end-user, I mean the person setting up the application on a server.
Edit: I can use the beginning '/' to always get the link relative to the domain, but the problem is what if the app itself is not at the root, but some place like <http://www.example.com/this/is/where/the/app/is/> so i want to say ... | [
0.28152260184288025,
0.019176295027136803,
0.5623672604560852,
0.026585379615426064,
-0.269935667514801,
-0.2270355224609375,
0.12861044704914093,
0.04517129436135292,
-0.23340368270874023,
-0.6002447009086609,
-0.27982795238494873,
0.16387957334518433,
-0.35030823945999146,
-0.03109934926... | |
the `base` tag as follows:
```
<base href="<?= $full_site_url ?>" />
```
That will set the default URL for all the links and the browser will prepend it to every relative link on the page. | [
0.3247969448566437,
0.13519561290740967,
0.8561305403709412,
-0.21819914877414703,
-0.11449918150901794,
-0.21051499247550964,
0.019391711801290512,
0.05156201124191284,
0.11769338697195053,
-0.5086557269096375,
-0.36980000138282776,
0.24786855280399323,
-0.254600465297699,
0.0866347551345... | |
I'm building an ASP .NET web solution that will include a lot of pictures and hopefully a fair amount of traffic. I do really want to achieve performance.
Should I save the pictures in the Database or on the File system? And regardless the answer I'm more interested in why choosing a specific way.
Store the pictures o... | [
0.7283193469047546,
-0.06438294053077698,
0.5686769485473633,
0.3048574924468994,
-0.05369964614510536,
-0.13212920725345612,
-0.020801253616809845,
-0.08017097413539886,
-0.5095721483230591,
-0.6842296719551086,
0.1170683205127716,
0.2756809890270233,
-0.28574514389038086,
0.0069156321696... | |
to improve performance.
4. It will reduce database bottleneck.
5. The database ultimately stores its data on the file system.
6. Images can be easily cached when stored on the file system. | [
0.34236931800842285,
-0.019291874021291733,
0.5834413766860962,
0.446747362613678,
0.22987279295921326,
-0.23678241670131683,
-0.1060391515493393,
-0.12755489349365234,
-0.18360605835914612,
-0.8643530011177063,
-0.3472207486629486,
0.42523637413978577,
-0.09808018803596497,
0.211642786860... | |
I have a program that send a document to a pdf printer driver and that driver prints to a particular directory. After the print I want to attach the pdf to an e-mail (MailMessage) and send it off.
Right now, I send the document to the printer (wich spawns a new process) and then call a FileSystemWatcher.WaitForChange... | [
0.5847924947738647,
0.13524533808231354,
0.6450173854827881,
0.026022786274552345,
0.0011383253149688244,
-0.20442534983158112,
-0.05475740134716034,
0.11561432480812073,
-0.32927602529525757,
-0.7879735231399536,
0.047627419233322144,
0.4854276776313782,
-0.0980791449546814,
0.34550914168... | |
that's far less than ideal.
* I considered putting the attachment code in a try/catch block and looping on failure, but again, that's just bad news.
I can't really think of an elegant solution.
WaitForChanges is *waiting for the created event* as you have it coded. As the document is being created, you get notified: t... | [
0.5035181045532227,
-0.09336771070957184,
0.4731767475605011,
0.011104773730039597,
0.08368789404630661,
-0.2883611023426056,
0.26376670598983765,
0.0036392705515027046,
-0.3971165716648102,
-0.49099934101104736,
-0.27283015847206116,
0.19621512293815613,
-0.04678778722882271,
0.1473506093... | |
to directory code, and we only use WaitForChanges to detect the start of a new file. We then use an try {} catch {} where the catch (failing to get rights over the file) resubmits the attempt into the queue we maintain: each attempt "backs off" for longer, so the first try is 1 second after we detected the file, the se... | [
0.319436639547348,
-0.38107937574386597,
0.45192769169807434,
0.028247535228729248,
0.3873003125190735,
-0.1279008388519287,
0.1919163018465042,
-0.16687026619911194,
-0.27036890387535095,
-0.42086055874824524,
-0.2583554685115814,
0.2427268624305725,
-0.14647534489631653,
0.13729767501354... | |
![alt text][1]
The above screenshot shows some artifacting which is occuring during a software decode of a .DV video file, compliant to SMPTE 314m...
The artefacting is believed to be cause by a AC/DC coefficient problem, is this likely?
Any information is appreciated.
I'm not sure what the issue is. The blockiness ... | [
0.3363282382488251,
0.08060269802808762,
0.46633613109588623,
0.11849217116832733,
0.030548572540283203,
-0.35019683837890625,
0.28219953179359436,
0.006163089070469141,
-0.4031345546245575,
-0.5157108902931213,
-0.28764426708221436,
0.6746498346328735,
-0.2836991548538208,
0.0376516059041... | |
decode in the debugger. See where the numbers diverge. | [
-0.06318222731351852,
0.07829538732767105,
0.034626349806785583,
-0.03579545393586159,
0.18295113742351532,
0.0774138942360878,
0.4347744584083557,
-0.16904236376285553,
0.10910549014806747,
-0.3084665536880493,
-0.6926273107528687,
0.48879194259643555,
-0.273528516292572,
-0.1041678041219... | |
I have a big file with thousands of lines of thousands of characters.
I move the cursor to 3000th character.
If I use `PageDown` or `Ctrl`+`D`, the file will scroll but the cursor will come back to the first no-space character.
There's is an option to set to keep the cursor in the same column after a such scroll ?
... | [
-0.03705624118447304,
0.042628005146980286,
0.839985728263855,
0.11705221980810165,
-0.09024552255868912,
0.25429287552833557,
0.3178226947784424,
-0.15617725253105164,
-0.17419901490211487,
-0.9827719926834106,
-0.00038216778193600476,
0.5381924510002136,
-0.10496598482131958,
0.159054875... | |
I've got several large MFC applications here, and converting them into any other format is out of the question. We're expanding into other markets, and would like to make the apps work in other languages and cultures.
So far, I've found occasional references as to what to do with Visual C++ version 6, with one mention... | [
0.21717223525047302,
0.2766053080558777,
0.5145943760871887,
-0.19909948110580444,
-0.115152508020401,
0.1343928426504135,
0.0482885017991066,
0.2534479796886444,
-0.42504698038101196,
-0.6147817969322205,
-0.43353271484375,
0.4470844864845276,
-0.30284979939460754,
-0.21735356748104095,
... | |
things using Google, and one book about internationalization using VC++6. (We're using Visual Studio 2008 now, on XP and Vista.)
I make no claims for the strength of my Google-fu, and would be happy to be directed to things I've missed.
Is it reasonable to use the methods of VC++6, or should I use later features?
I... | [
-0.0042341588996350765,
-0.044642411172389984,
0.2963598072528839,
0.00023203187447506934,
-0.22984685003757477,
-0.026638640090823174,
0.30666738748550415,
0.26638463139533997,
-0.39548608660697937,
-0.7761228680610657,
-0.20604632794857025,
0.47623682022094727,
-0.21271899342536926,
-0.2... | |
I'm inexperienced in .NET. What will I find there that's applicable to VC++ and MFC?
Edit: I just ran into difficulties trying to put Unicode strings into the String Table resource. (As far as I can tell, Unicode strings need to be entered into the .rc file with a text editor, in L"0x0034" form. I haven't found a reso... | [
0.21879275143146515,
0.22263963520526886,
0.1941196173429489,
0.0007943437085486948,
-0.07800175249576569,
-0.17049157619476318,
0.32111549377441406,
-0.19904762506484985,
-0.1022227555513382,
-0.8694431781768799,
0.035133395344018936,
0.5902248620986938,
-0.05171874538064003,
-0.041722938... | |
this doesn't seem to fix the dialogs, although the stringtable seems to be working in Japanese.
There's a lot more than just translating "strings" to internationalize an application.
Most of your UI will need to be updated to take into account the different text lengths, and language orientation (thing Hebrew, Chinese... | [
0.4675913453102112,
0.11892275512218475,
0.2793669104576111,
0.08727101981639862,
-0.18896515667438507,
0.08159687370061874,
0.35454264283180237,
0.3247969448566437,
-0.2474672794342041,
-0.7559050917625427,
-0.17376039922237396,
0.2760886251926422,
-0.374308317899704,
0.06002504751086235,... | |
use a professional technical translator for the strings. | [
0.3097982406616211,
0.38795793056488037,
-0.2704832851886749,
0.2572975158691406,
0.14202149212360382,
-0.06686504930257797,
-0.08215872943401337,
0.223051056265831,
0.3763585686683655,
-0.517627477645874,
-0.3374035060405731,
0.7514674067497253,
0.07267715036869049,
-0.6371942162513733,
... | |
I need to do some alert-message (like validations, etc), and I'm doing that with DIV.
This is how I'm doing the validation:
```
<form action="index.php" method="post" onsubmit="return validateSearchKeyword();">
<input class="text_search" id="text_search" name="text_search" type="text" value="pesquisar" onfocu... | [
0.47203126549720764,
0.03533725067973137,
0.8366683721542358,
-0.18990182876586914,
-0.08908207714557648,
-0.05189523845911026,
0.2686654031276703,
-0.5801059007644653,
0.27746036648750305,
-0.40712791681289673,
-0.23433643579483032,
0.509643018245697,
-0.1924259513616562,
-0.0338092520833... | |
300);
}
else
{
var newdiv = document.createElement('div');
newdiv.setAttribute('id', id);
newdiv.setAttribute("class", "warningDiv");
newdiv.style.position = "absolute";
newdiv.innerHTML = html;
newdiv.style.left = left;
newdiv.style.top = top;
... | [
0.051592543721199036,
-0.17671126127243042,
0.7107895612716675,
-0.20239144563674927,
0.2512603998184204,
0.1891438066959381,
0.4208761155605316,
-0.44553908705711365,
0.06399641185998917,
-0.5575413703918457,
-0.4977896213531494,
0.58061683177948,
-0.16178865730762482,
-0.0155576206743717... | |
newdiv.onclick=function(e) {
$(this).fadeOut(300, function() { $(this).remove(); });
};
document.body.appendChild(newdiv);
$("#"+id).fadeIn(300);
}
}
```
The *fadIn* and *fadeOut* functions are from "jquery-1.3.1.min.js"
The CSS...
```
.warningDiv{
-moz-border-radius-... | [
-0.02726908028125763,
-0.425728976726532,
0.7103055715560913,
-0.13330458104610443,
0.20614421367645264,
0.1895955353975296,
0.2529146075248718,
-0.3181309998035431,
-0.010575559921562672,
-0.6388035416603088,
-0.3639558255672455,
0.3278794288635254,
-0.4940677583217621,
0.0739005655050277... | |
display: block;
}
```
So, this is working great for all browsers, except Internet Explorer. Even the validation works (the form is not submitted when it doesn't pass the validation) but the DIV is not shown.
How can I solve this?
Thanks
I think I've got it. It seems IE doesn't apply classes the right way if you use:... | [
0.12042653560638428,
0.04553378373384476,
0.13809317350387573,
-0.08423258364200592,
-0.28558871150016785,
-0.27148669958114624,
0.5482479333877563,
0.006890350487083197,
0.0842614620923996,
-0.9402274489402771,
-0.014465776272118092,
0.45512518286705017,
-0.30175480246543884,
0.0357690118... | |
I currently have multiple tables in my database which consist of the same 'basic fields' like:
```
name character varying(100),
description text,
url character varying(255)
```
But I have multiple specializations of that basic table, which is for example that `tv_series` has the fields `season`, `episode`, `airing`, ... | [
0.32219913601875305,
-0.20834854245185852,
0.6264642477035522,
0.12725411355495453,
-0.02680932730436325,
-0.1750200092792511,
-0.16039341688156128,
0.08619075268507004,
-0.38734686374664307,
-0.4785464406013489,
0.07319492846727371,
0.3183363676071167,
-0.01990484818816185,
0.765414834022... | |
but I do not like that idea since it is kind of a 'database-within-a-database' scheme, I do not have a way to require certain keys/fields nor require a special type, and it would be a huge pain to fetch and order the data later.
So I am looking for a way now to 'share' a Primary Key between multiple tables or even bet... | [
0.25130757689476013,
0.15248475968837738,
0.34276047348976135,
0.11614994704723358,
0.13800668716430664,
-0.1327665001153946,
0.09814015030860901,
-0.10811930894851685,
-0.4513608515262604,
-0.5586859583854675,
0.12208142876625061,
0.33037975430488586,
-0.3535516858100891,
0.41905269026756... | |
given by @Jay S, try this:
```
create table media_types (
media_type int primary key,
media_name varchar(20)
);
insert into media_types (media_type, media_name) values
(2, 'TV series'),
(3, 'movie');
create table media (
media_id int not null,
media_type not null,
name varcha... | [
0.21222248673439026,
0.13301357626914978,
0.608096718788147,
0.24036872386932373,
0.1393279880285263,
0.052945759147405624,
-0.04818447679281235,
-0.20087221264839172,
-0.06541616469621658,
-0.6584389209747314,
-0.3998229205608368,
0.4976842999458313,
-0.3030446171760559,
0.451220333576202... | |
media_type),
foreign key (media_type)
references media_types (media_type)
);
create table tv_series (
media_id int primary key,
media_type int check (media_type = 2),
season int,
episode int,
airing date,
foreign key (media_id, media_type)
references media (medi... | [
0.4352426528930664,
0.08193156868219376,
0.7246896624565125,
0.2896234691143036,
0.1372913122177124,
0.04755399376153946,
-0.08584210276603699,
-0.22356322407722473,
-0.32329443097114563,
-0.622058093547821,
-0.40225526690483093,
0.5224348902702332,
-0.47103363275527954,
0.6605525612831116... | |
int check (media_type = 3),
release_date date,
budget numeric(9,2),
foreign key (media_id, media_type)
references media (media_id, media_type)
);
```
This is an example of the disjoint subtypes [mentioned](https://stackoverflow.com/questions/561576/polymorphism-in-sql-database-tables/561960#56196... | [
0.28995195031166077,
0.11344736814498901,
0.10635615885257721,
-0.1313887983560562,
0.03571075573563576,
-0.0029623957816511393,
0.1104854866862297,
-0.3249723017215729,
-0.09138748049736023,
-0.48558491468429565,
-0.036340463906526566,
0.5976070165634155,
-0.5259810090065002,
0.0241795796... | |
one statement.
When querying data, you can do it simply by querying the `media` table if you only need information about the common columns:
```
SELECT name, url FROM media WHERE media_id = ?
```
If you know you are querying a movie, you can get movie-specific information with a single join:
```
SELECT m.name, v.r... | [
0.3795841634273529,
0.014043928124010563,
0.5324108600616455,
0.10956387221813202,
-0.18091416358947754,
0.1888846457004547,
-0.044924139976501465,
-0.35601115226745605,
-0.3394359052181244,
-0.2394152581691742,
-0.18161703646183014,
0.6034603118896484,
-0.34900516271591187,
0.349005848169... | |
m
LEFT OUTER JOIN tv_series AS t USING (media_id)
LEFT OUTER JOIN movies AS v USING (media_id)
WHERE m.media_id = ?
```
If the given media is a movie,then all columns in `t.*` will be NULL. | [
0.18078577518463135,
0.0015630918787792325,
0.5695734620094299,
-0.14660142362117767,
0.10411172360181808,
0.053975146263837814,
-0.032494209706783295,
-0.33405908942222595,
-0.22596320509910583,
-0.5739027261734009,
-0.34680676460266113,
0.6620561480522156,
-0.29203471541404724,
0.4613042... | |
**Exact Duplicate**: [Is there a performance difference between i++ and ++i in C++?](https://stackoverflow.com/questions/24901/)
**Exact Duplicate**: [Difference between i++ and ++i in a loop?](https://stackoverflow.com/questions/484462/)
---
What is more efficient, i++ or ++i?
I have only used this in Java and ... | [
-0.13838635385036469,
0.19163021445274353,
0.03319988027215004,
0.026654217392206192,
-0.14572295546531677,
0.1068217009305954,
0.045522186905145645,
-0.17105919122695923,
-0.29941752552986145,
-0.5894618034362793,
0.3607398569583893,
0.32489579916000366,
-0.45067423582077026,
-0.116463191... | |
i
With optimizations on, it is quite possible that the resulting assembly is identical, however ++i is more efficient.
edit : keep in mind that in C++, i may be whatever object that support the prefix and postfix ++ operator. For complex objects, the temporary copy cost is non negligible. | [
-0.02738850750029087,
0.13758091628551483,
0.3312114477157593,
-0.018890634179115295,
-0.19794078171253204,
0.0911584347486496,
0.09063304215669632,
-0.14302939176559448,
-0.0035762700717896223,
-0.6818071603775024,
-0.2794826030731201,
0.40764179825782776,
-0.3977924883365631,
0.070968508... | |
[Here is a screenshot of how both div's lineup](http://img410.imageshack.us/img410/1425/picture2ye4.png).
The left column is , the div that I want to line up to the right of it is
And both those div's are within
```
.content-body {
padding:10px 15px;
font-size:.8em;
font-family:arial;
overflow:auto... | [
-0.08837342262268066,
-0.18456082046031952,
1.0126076936721802,
-0.01587687060236931,
-0.10273735225200653,
0.2725546360015869,
-0.0033479498233646154,
-0.3053968846797943,
-0.029332637786865234,
-0.570417046546936,
-0.29067689180374146,
0.4945911765098572,
-0.1811271607875824,
-0.05581224... | |
xfont-size:.8em;
border:1px solid red;
font-family:arial;
}
```
How would I get the .col-middle div to line up properly?
Any help is appreciated.
Change the width of *.col-middle* to *80% or less* so both divs can fit inside their container.
You could also make *.col-middle* float *right*. | [
0.26465675234794617,
-0.026493262499570847,
0.8376385569572449,
-0.06316124647855759,
0.07922064512968063,
0.1282721310853958,
-0.26864510774612427,
-0.010331334546208382,
-0.022695224732160568,
-0.6226396560668945,
-0.17671677470207214,
0.5412469506263733,
-0.24149145185947418,
-0.1238321... | |
Somehow my VS2008 SP1 has lost the ability to step into .NET framework sources. I've played around with checkboxes to no end; I've re-deleted the Symbol cache folder a dozen times; and I've tried all kinds of debug symbol servers.
All it does is download some .PDB files, but when I try to select a stack frame in .NET,... | [
0.25900834798812866,
0.16548632085323334,
0.36096489429473877,
-0.11745401471853256,
-0.03196977451443672,
-0.215672105550766,
0.5783395171165466,
-0.11880131810903549,
-0.39430707693099976,
-0.5563194155693054,
-0.01761092059314251,
0.4276648759841919,
-0.19310489296913147,
0.402658134698... | |
image version in the pdb that downloads from the symbol server. I've had the same problem on 64 bit Vista and Win7. I have yet to find a reference for how to get the assembly to 2.0.5.xxxx as indicated in the instructions. SP1 with all service packs on the two OSs I indacated are show the assemblies at 2.0.0.xxxx
EDIT... | [
0.04356261342763901,
-0.06419884413480759,
0.8322421908378601,
-0.2530262768268585,
-0.22301021218299866,
-0.056401804089546204,
0.5322489142417908,
-0.4143897294998169,
-0.2578929364681244,
-1.0699210166931152,
-0.10642305016517639,
0.6365103721618652,
-0.43815407156944275,
-0.21430628001... | |
[Moose::Manual::Attributes](http://search.cpan.org/~drolsky/Moose-0.70/lib/Moose/Manual/Attributes.pod) states:
> As an alternative to using a subroutine reference [for default], you can instead supply a builder method for your attribute:
> ...
> This has several advantages. First, it moves a chunk of code to its ow... | [
0.04728569835424423,
0.24137599766254425,
0.3797452449798584,
0.1629333645105362,
-0.05192539468407631,
-0.008144092746078968,
0.3629175126552582,
-0.3757721483707428,
-0.3543718755245209,
-0.39664226770401,
-0.19650112092494965,
0.4377230405807495,
-0.4422663152217865,
-0.0618778169155120... | |
=> 'ro',
default => \&subroutine
);
```
And would that not be better programming practice, since you're guaranteed not to accidentally refer to a subroutine that doesn't exist? You'd be referring to the method with a logical reference instead of a symbolic reference.
When the builder is called, this happens:
```
$... | [
0.08501088619232178,
0.06301507353782654,
0.23082682490348816,
-0.14492183923721313,
0.11599304527044296,
-0.09789920598268509,
0.4674355387687683,
-0.31791889667510986,
0.13228212296962738,
-0.47148099541664124,
-0.23754757642745972,
0.8028934001922607,
-0.4382341802120209,
0.210592150688... | |
can't be overriden the same way. | [
0.2946484386920929,
0.04831083491444588,
0.07866078615188599,
0.11515224725008011,
0.055301863700151443,
-0.19096718728542328,
0.3815029561519623,
-0.3586936593055725,
0.04693721607327461,
-0.2594314515590668,
0.027808964252471924,
0.3553725481033325,
-0.29333505034446716,
0.10479654371738... | |
I am invoking PHP cURL method on a server and the response is XML type. cURL is saving the output (after removing the tags) in a scalar type variable. Is there a way to store it in an object/hash/array so that it's easy to parse?
```
<?php
function download_page($path){
$ch = curl_init();
curl_setopt($ch, CURLO... | [
0.19311140477657318,
-0.001205646200105548,
0.9414757490158081,
-0.21540862321853638,
-0.061830103397369385,
-0.1312810629606247,
0.37830087542533875,
-0.3970591425895691,
0.04581503942608833,
-0.4862702786922455,
-0.4851679503917694,
0.3589942455291748,
-0.5950323343276978,
-0.05179502815... | |
return $retValue;
}
$sXML = download_page('http://alanstorm.com/atom');
$oXML = new SimpleXMLElement($sXML);
foreach($oXML->entry as $oEntry){
echo $oEntry->title . "\n";
}
``` | [
0.11353189498186111,
-0.08556689321994781,
0.7032192945480347,
-0.19368964433670044,
0.024230927228927612,
0.06998493522405624,
0.29229190945625305,
-0.3195264935493469,
-0.39978376030921936,
-0.1759808212518692,
-0.648379385471344,
0.40085214376449585,
-0.5401580333709717,
0.4467597007751... | |
Can someone please explain what the `partition by` keyword does and give a simple example of it in action, as well as why one would want to use it? I have a SQL query written by someone else and I'm trying to figure out what it does.
An example of partition by:
```
SELECT empno, deptno, COUNT(*)
OVER (PARTITION BY d... | [
0.42532214522361755,
0.09694992005825043,
-0.15776224434375763,
0.1646643728017807,
0.2917208671569824,
-0.11425096541643143,
-0.2100411057472229,
-0.20332247018814087,
-0.5483114719390869,
-0.640500009059906,
-0.09908994287252426,
0.08000534772872925,
-0.3530392348766327,
0.40872660279273... | |
department for every employee record. (It is as if you're de-nomalising the `emp` table; you still return every record in the `emp` table.)
```
emp_no dept_no DEPT_COUNT
1 10 3
2 10 3
3 10 3 <- three because there are three "dept_no = 10" records
4 20 2
5 20 | [
0.05599666386842728,
0.15139444172382355,
0.5056887269020081,
-0.06386712938547134,
0.15724362432956696,
0.4267556667327881,
0.2924693822860718,
-0.15490373969078064,
-0.8301350474357605,
-0.24760033190250397,
-0.09962986409664154,
0.7421294450759888,
-0.16464310884475708,
0.32901450991630... | |
2 <- two because there are two "dept_no = 20" records
```
If there was another column (e.g., `state`) then you could count how many departments in that State.
It is like getting the results of a `GROUP BY` (`SUM`, `AVG`, etc.) without the aggregating the result set (i.e. removing matching records).
It is useful whe... | [
0.11111506074666977,
-0.37982264161109924,
0.07216411828994751,
0.004054197110235691,
-0.14480091631412506,
0.31718137860298157,
-0.015024550259113312,
-0.4592590630054474,
-0.31832271814346313,
-0.8521879315376282,
0.016103435307741165,
0.5640112161636353,
-0.2679993510246277,
0.289570510... | |
[AskTom article](http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3170642805938) for further details. | [
0.03722577542066574,
0.06440161168575287,
0.030503077432513237,
0.2827199101448059,
-0.11756839603185654,
-0.027892541140317917,
0.08985923230648041,
-0.07350851595401764,
-0.08628600835800171,
-0.1082279309630394,
-0.21367432177066803,
0.11666671931743622,
-0.04669900983572006,
0.03524275... | |
I need to be able to move a div with my mouse and store the new pos of the div in database to remember the display. How can I do it?
I would highly recommend you look into [jQuery UI](http://jqueryui.com/) and the draggable interaction. Basically, you'll want to add the code to your draggable div (assuming it has id="d... | [
0.2747188210487366,
-0.18192416429519653,
0.5169565081596375,
-0.03821946680545807,
0.006665165536105633,
-0.13155539333820343,
0.17225013673305511,
-0.036333441734313965,
-0.08789260685443878,
-0.6690995693206787,
-0.07838942855596542,
0.979334831237793,
-0.5206254124641418,
-0.1154977306... | |
in-page, such that some form-send or other action results in the positional information being passed to the server and stored inline with other data. I'd be careful with an AJAX call, since you may bomb your db with position data with every dragging on every browser. Depends on your app... | [
0.07028412818908691,
-0.10280001908540726,
0.638004720211029,
0.13803841173648834,
-0.18904533982276917,
0.18210141360759735,
0.0555829294025898,
0.12455108761787415,
0.01613769307732582,
-0.737537682056427,
-0.2832798957824707,
0.28650596737861633,
-0.1800668090581894,
-0.2685725390911102... | |
I'm having issues with the following code, where I use a JComboBox to change a String value in a table cell. The JComboBox works fine, but if I click in the box and then click away *without selecting anything* the JComboBox's dropdown remains visible, even if I delete the row. Clicking on another Swing component like a... | [
0.035617150366306305,
-0.004622749984264374,
0.5974860191345215,
-0.449413001537323,
0.10921848565340042,
0.018922310322523117,
0.17099136114120483,
-0.24064655601978302,
-0.3675788342952728,
-0.6289379596710205,
-0.10391856729984283,
0.4913744032382965,
-0.602097749710083,
-0.016148539260... | |
col.setCellEditor(editor);
```
Edit:
I had neglected to mention that earlier I set:
```
myTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
```
If I comment this line out or set it false, then clicking on other Swing components does NOT cause the box to vanish. With it in, clicking on anything... | [
0.2720946669578552,
-0.13141706585884094,
0.43014755845069885,
-0.03318911790847778,
-0.032246604561805725,
-0.38371074199676514,
0.1728595495223999,
-0.2550048828125,
-0.4221336543560028,
-0.4794221520423889,
-0.37676915526390076,
0.4437932074069977,
-0.4234837293624878,
-0.19114536046981... | |
bit of theory:
Every cell has a potential renderer and editor. The renderer just tells the cell how to draw and does not interact with events. The editor however is a component that can interact with events. When an event happens that triggers an edit, the editor component is added on top of the table. When the edit f... | [
0.4510424733161926,
-0.44731226563453674,
0.28821098804473877,
0.44886717200279236,
0.00006118021701695397,
-0.2328476756811142,
0.1580660492181778,
-0.26475441455841064,
-0.16302406787872314,
-0.20127619802951813,
0.03433813154697418,
0.11056362837553024,
-0.47220832109451294,
0.368139803... | |
the box to go, you'll need to probably call removeEditor() in response to certain events, possibly focus, or cell selection.
To really get a handle on what happens I'd recommend having a quick look at the source code to removeEditor(), editCellAt() etc., and maybe step through once in a debugger. It's possible you've ... | [
0.13891465961933136,
-0.3081059753894806,
-0.03017153963446617,
-0.15648646652698517,
-0.2402779906988144,
-0.4280509650707245,
0.2170661836862564,
-0.1927928328514099,
-0.1994353085756302,
-0.27967923879623413,
-0.2462717592716217,
0.8067048788070679,
-0.4461510181427002,
-0.0207529570907... | |
and focus behaviour of JTable between versions once, I think it was between 1.4 and 1.5, when the focus handling for swing changed. So the first thing I'd recommend trying is your code with a different Java version. The bug may have been caused by Sun (some of our complicated editor code had to be changed) and if it di... | [
0.3778758645057678,
-0.10062629729509354,
0.07843116670846939,
-0.2531207799911499,
-0.35387948155403137,
-0.13023748993873596,
0.2894503176212311,
0.27330049872398376,
-0.3951735496520996,
-0.30086424946784973,
0.32107803225517273,
0.7321908473968506,
-0.28364700078964233,
-0.118808433413... | |
I have a VB6 application which works with datetime values in SQL Server (which are obviously storing dates as mm/dd/yyyy).
I need to represent these dates to the user as dd/mm/yyyy, read them in as dd/mm/yyyy, and then store them back into the database as the standard mm/dd/yyyy.
This is the current code snippets I h... | [
0.4061291813850403,
0.14301224052906036,
0.7078335881233215,
0.031476136296987534,
0.10640249401330948,
0.13690108060836792,
-0.0158381350338459,
-0.0003376272215973586,
-0.31557729840278625,
-0.642641007900238,
-0.07987166196107864,
0.3647836744785309,
-0.02609417214989662,
0.368864506483... | |
'" & txtDate.Text & "'"
txtDate.Text = "" & RecordSet.Fields("Date").Value
```
Any thoughts? Thanks in advance.
\*\*Update
Actually I just noticed I do have dates stored in datetime fields in the form of 16/08/2009 00:00:00 which is dd/mm/yyyy. So perhaps I misunderstood the problem. But when trying to update the ... | [
0.2525298297405243,
0.3595287799835205,
0.7234699726104736,
0.02306365966796875,
0.006150303408503532,
0.09080424904823303,
0.1874271184206009,
0.3787824511528015,
-0.2858467400074005,
-0.38864466547966003,
0.014002721756696701,
0.538731038570404,
0.033287692815065384,
0.0975823849439621,
... | |
in the datetime field already. And the date being submitted to the database is definitely dd/mm/yyyy.
\*\*\*\* Update 2\*\*
Ok, there seems to be some confusion I have caused. I apologize.
* I am storing the dates as datetime in the SQL database
* The texts are TextBox controls in the VB6 application
* I am running ... | [
0.44328632950782776,
0.102821484208107,
0.6661058068275452,
-0.0682147890329361,
0.09558256715536118,
-0.17929212749004364,
0.20661558210849762,
0.058734308928251266,
-0.08001424372196198,
-0.6251827478408813,
-0.11541515588760376,
0.5856233835220337,
-0.011707953177392483,
0.0683312788605... | |
perfectly fine until 1 specific occasion.
In this occasion I have a datetime value (which SQL Server 2005 displays as 16/08/2009 00:00:00) which is read from the database and populated the TextBox with the value 16/08/2009. Now when I try to run the UPDATE statement without modifying the TextBox text I get the error '... | [
0.4996519386768341,
0.18041373789310455,
0.6950967907905579,
-0.12648706138134003,
0.05604531243443489,
-0.5536887645721436,
0.6306489109992981,
-0.20925761759281158,
-0.34624961018562317,
-0.11167721450328827,
0.2592938244342804,
0.5466156601905823,
-0.3033427596092224,
0.4144648015499115... | |
in the value because if the DB is expecting month first then obviously 16/08/2009 would be out-of-range. However the value in the database is already 16/08/2009 with no issues.
Well after all of that the problem was simple. I have the date value wrapped in single (') and double (") quotes. The problem was encountered d... | [
0.47011226415634155,
0.18186761438846588,
0.5267124772071838,
-0.19679036736488342,
-0.5876722931861877,
0.09819615632295609,
0.2197669893503189,
-0.12532903254032135,
-0.24121254682540894,
-0.2773323059082031,
0.33503803610801697,
0.18923524022102356,
-0.01906662806868553,
0.3757798373699... | |
I'm trying to query the filesystem on a remote machine in order to get a list of file names in a specific directory.
Until now, I'm using the DirectoryInfo class in .NET. Something like this:
```
DirectoryInfo dir = new DirectoryInfo("c:\dir");
FileInfo[] files = dir.GetFiles("*.*");
```
But this query answers in a... | [
0.1970110833644867,
-0.12084947526454926,
0.6818389296531677,
-0.05042024701833725,
0.20099247992038727,
-0.244411438703537,
0.3879469037055969,
0.02538491226732731,
-0.16311663389205933,
-0.9144455194473267,
0.003418724751099944,
0.6675198078155518,
-0.026667311787605286,
0.35922440886497... | |
that machine.
Does anyone have any other idea?
As many as needed, but not more.
Really: don't worry about optimization (right now). Build it first, measure performance second, and **IFF** there is a performance problem somewhere, then start with optimization.
Otherwise, you risk spending a lot of time on optimizing ... | [
0.27234184741973877,
0.23630522191524506,
0.07038352638483047,
0.5095489621162415,
0.15858151018619537,
0.295449823141098,
0.18349114060401917,
0.20503266155719757,
-0.2555115222930908,
-0.8668065071105957,
-0.014529068022966385,
0.7429733872413635,
-0.07246622443199158,
-0.277130782604217... | |
I am using basic HTTP binding.
Does anybody know which is the best binding in terms of performance as thats the key issue for our site?
Depends on where the services are located.
If they're on the same machine, NetNamedPipeBinding should give you the maximum performance.
Otherwise you'll have to choose depending on... | [
0.36983540654182434,
-0.1263597011566162,
0.49985969066619873,
0.014918945729732513,
-0.43807628750801086,
-0.09508412331342697,
0.18654166162014008,
-0.2583337724208832,
-0.22611753642559052,
-0.7024486660957336,
0.3670805096626282,
0.3427425026893616,
0.2019958347082138,
0.15588647127151... | |
What do I have to do for hiding this `NSWindowToolbarButton` in windows with a `NSToolbar`?
There's a checkbox for this in the appearance section of the attributes tab of the inspector for a window in Interface Builder. | [
0.3529438376426697,
0.12697423994541168,
0.09493844956159592,
0.09606430679559708,
0.003402278060093522,
-0.05206706374883652,
0.4754307270050049,
0.20691056549549103,
-0.12709958851337433,
-0.4715995788574219,
0.22611857950687408,
0.5570825934410095,
0.05798307806253433,
0.291954696178436... | |
I've created a copy of our legacy, (decrepit) homegrown Timesheet ASP application on to a different, newer workstation for backup purposes.
I've finally got it to the point where I can run it locally over http, using this address:
<http://localhost/timesheet/Timesheet.asp>
I would like to test it over the network w... | [
0.5194538831710815,
0.14347241818904877,
0.369712233543396,
0.012115184217691422,
0.44505685567855835,
-0.06101005896925926,
0.517909824848175,
0.14888440072536469,
-0.3225250244140625,
-0.8778542280197144,
-0.2205156534910202,
0.6239280700683594,
-0.05577142536640167,
0.11717232316732407,... | |
permissions issues if your asp app isn't set to allow anonymous access (assuming you want that). | [
-0.017068110406398773,
-0.21943587064743042,
0.2072453647851944,
0.29699617624282837,
0.2551984488964081,
-0.35699135065078735,
0.30367109179496765,
0.01849382370710373,
-0.5371513962745667,
-0.4282473623752594,
-0.46835026144981384,
0.3091853857040405,
0.003542584367096424,
-0.10235140472... | |
How do you use a binarywriter to write the correct MS SQL native format for the Money data type?
I'd like to take a value in .net, read from a file as string representation of a decimal amount (actually an exported "Money" data type from SQL, but that is unimportant).
How can I use a binary writer to write the value... | [
0.503049910068512,
0.23879805207252502,
0.23691721260547638,
0.11336160451173782,
-0.22143355011940002,
0.21914547681808472,
0.07920603454113007,
-0.19607441127300262,
-0.10143343359231949,
-0.4180646538734436,
0.3235309422016144,
0.4760908782482147,
-0.19224052131175995,
0.028004251420497... | |
My script now looks like this:
```
@echo off
set v_params=%*
set v_params=%v_params:"=\"%
call bash -c "g++-linux-4.1 %v_params%"
```
Which replaces all instances of `"` with `\"`, properly escaped for bash. | [
0.0695219561457634,
0.3343200981616974,
0.5353382229804993,
-0.35678234696388245,
-0.08748316019773483,
0.18796852231025696,
0.36718854308128357,
-0.4985889792442322,
-0.2635011672973633,
-0.4022216200828552,
0.030292166396975517,
0.4891586899757385,
-0.2519629895687103,
0.1248577237129211... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.