text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
they confirmed for me that this is a bug in ColdFusion.
Specifically, if the number of lines of code inside the thread tag body was too large, it would cause a compile error. The work-around, which I discovered a day or two before I got my answer, is to use a `<cfinclude />` to import your thread contents from another... | [
0.5518954396247864,
0.35164088010787964,
0.20249691605567932,
0.05578742176294327,
0.2763785719871521,
-0.10230589658021927,
0.2931045889854431,
0.20811055600643158,
-0.22767747938632965,
-0.2923300266265869,
0.27801111340522766,
0.20721766352653503,
-0.2545040249824524,
0.1780052632093429... | |
driving me absolutely insane: that commenting out various parts of the thread body would sometimes make it compile... and now I know it was because *enough* of the thread body was commented out.
They report that they have fixed the bug, so I assume it will be fixed in the next cumulative hot-fix (if there is one), and... | [
0.5913302302360535,
0.23770953714847565,
0.4215514361858368,
-0.14313338696956635,
0.03958664461970329,
-0.046293508261442184,
0.1666552573442459,
0.46825918555259705,
-0.4774375855922699,
-0.47579529881477356,
-0.0721890926361084,
0.36669743061065674,
-0.2676701247692108,
0.24699904024600... | |
I am developing a Browser Helper Object running inside Internet Explorer. I am writing debugging messages with `ATLTRACE("...");` These appear fine when Visual Studio is attached to the `iexplore.exe` process, but this is slow for a quick test. DebugView captures nothing from my BHO.
**Why does DebugView not show BHO ... | [
0.4324207305908203,
0.2915252149105072,
0.24699299037456512,
-0.1888478398323059,
-0.33215516805648804,
-0.30964863300323486,
0.5594983696937561,
0.037565749138593674,
0.11471637338399887,
-0.7521660923957825,
-0.08309844881296158,
0.7373718023300171,
-0.4221992790699005,
0.253115683794021... | |
to it:
```
icacls dbgview.exe /setintegritylevel low
```
And if you don't like the idea of permanently setting dbgview to low integrity (it might make saving logs and whatnot a bit of a pain, as they will only go into the low-integrity store) you can run a particular instance of dbgview at low integrity using Sysint... | [
0.2658382058143616,
-0.006981963757425547,
0.467928409576416,
0.09176962077617645,
-0.26761505007743835,
-0.34615030884742737,
0.3394947350025177,
0.020005229860544205,
-0.022809259593486786,
-0.7756746411323547,
-0.12900912761688232,
0.808504045009613,
-0.17724144458770752,
0.160882189869... | |
with the ["Debugging Tools for Windows" package](http://www.microsoft.com/whdc/devtools/debugging/), which also includes the very similar cdb.exe. | [
0.3160991966724396,
-0.07159730046987534,
-0.12317753583192825,
-0.0019100456265732646,
-0.3932228684425354,
-0.5860356688499451,
0.3465381860733032,
0.013420090079307556,
-0.0020191040821373463,
-0.42167022824287415,
-0.5574713945388794,
0.46111029386520386,
-0.5282774567604065,
-0.005956... | |
I've written a built-in for bash which modifies the 'cd' command, a requirement for my software. Is there a way to actually distribute a loadable independently of bash itself? I'd ideally like to distribute just a drop in "additional feature" because I know people can be put off by patching and compiling their shell fr... | [
0.6110385060310364,
-0.23215827345848083,
-0.03421144187450409,
-0.10829301178455353,
-0.12651029229164124,
-0.17082293331623077,
0.07553683966398239,
-0.3100213408470154,
-0.23765559494495392,
-0.4644336998462677,
0.05362735688686371,
0.8988117575645447,
-0.2565145194530487,
-0.1342584639... | |
is unclear what you have modified but in any case, `bash` (like at least `ksh93` which IIRC introduced the concept and `zsh`) supports, using the `enable -f file name` syntax, loading built-in functions as external dynamically loaded modules.
These modules being plain files can certainly be distributed independently, ... | [
0.6804177761077881,
0.07486342638731003,
0.11075633764266968,
-0.2707763612270355,
-0.1367756724357605,
-0.5432811975479126,
-0.11007264256477356,
-0.32305780053138733,
-0.5227475762367249,
-0.4141201674938202,
-0.32132601737976074,
0.7899322509765625,
-0.5277888178825378,
-0.0087829399853... | |
to access the former.
A simple workaround would be to implement your customized cd with a different name, say mycd, like this:
```
int mycd_builtin(list)
WORD_LIST *list;
{
int rv;
rv=cd_builtin(list);
if(rv == EXECUTION_SUCCESS) {
char wd[PATH_MAX+1];
getcwd(wd,sizeof(wd));
// do your custom stuff ... | [
0.5219076871871948,
-0.09765521436929703,
0.41524210572242737,
-0.13425232470035553,
-0.03798394650220871,
-0.3186033368110657,
0.46603628993034363,
-0.33119577169418335,
-0.19512677192687988,
-0.5056714415550232,
-0.2305128127336502,
0.9167991876602173,
-0.44215670228004456,
0.10588718950... | |
command and thus doesn't risk breaking scripts using it, there is nothing wrong in your approach. | [
0.0013177026994526386,
-0.1683616191148758,
-0.0931055024266243,
0.3393612504005432,
-0.21053241193294525,
-0.49503570795059204,
0.48841702938079834,
0.031435176730155945,
0.031638193875551224,
-0.5871984362602234,
-0.02626265585422516,
0.8398277163505554,
-0.006021182518452406,
-0.1519482... | |
SOLVED
I am using delphi 2009. My program listens for usb drives being connected and remove. Ive used a very similar code in 10 apps over the past year. It has always worked perfectly. When i migrated i had to give up using thddinfo to get the drive model. This has been replaced by using WMI. The WMI query requires th... | [
-0.5327170491218567,
0.18444359302520752,
0.7644031643867493,
-0.05534861236810684,
0.20907290279865265,
0.12677882611751556,
0.21605390310287476,
-0.17509716749191284,
-0.44329172372817993,
-0.677682101726532,
-0.12163478881120682,
0.5185931324958801,
-0.4515613317489624,
-0.1013545319437... | |
returns the model (all checked in the debugger and in another example using show message):
```
function IsPSP(Drive: String):Boolean;
var
Model: String;
DriveNum: Byte;
begin
Result := False;
Delete(Drive, 2, MaxInt);
DriveNum := GetPhysicalDiskNumber(Drive[1]);
Model := (MagWmiGetDiskModel(DriveNum));
if Po... | [
-0.10058122128248215,
-0.28492119908332825,
0.7302859425544739,
-0.12266957014799118,
0.22057245671749115,
0.039925988763570786,
0.5651479959487915,
-0.4598270654678345,
-0.09511981159448624,
-0.2988564968109131,
-0.1195179745554924,
0.8606560826301575,
-0.2329166978597641,
0.2417299300432... | |
return the number eventually. The WMI query fails with no error just returns '' debugger points into the wbemscripting\_tlb where the connection just never happened. Keep in mind the only thing thats changed in a year is what im calling to get the model i was using an api call and now im using something else.
Below is... | [
0.22320537269115448,
-0.26957836747169495,
0.8095325231552124,
-0.20215731859207153,
0.18771912157535553,
0.041303850710392,
0.2499285638332367,
-0.33765554428100586,
-0.38080477714538574,
-0.808746874332428,
-0.12871688604354858,
0.8065958023071289,
-0.25733187794685364,
0.338383346796035... | |
Drive := GetDrive(PDevBroadcastVolume(Msg.lParam)) + '\';
OnDeviceInsert(Drive);
end;
DBT_DeviceRemoveComplete: if PDevBroadcastHdr(Msg.lParam)^.dbcd_devicetype = DBT_DevTyp_Volume then
begin
Drive := GetDrive(PDevBroadcastVolume(Msg.lParam)) + '\';
OnDeviceRemove(Drive);
e... | [
-0.12341234087944031,
-0.09026144444942474,
1.0294650793075562,
-0.27942442893981934,
0.176300510764122,
0.3262055218219757,
0.2773054540157318,
-0.34530171751976013,
-0.11643219739198685,
-0.38597676157951355,
-0.6253177523612976,
0.9782466888427734,
-0.22621530294418335,
0.50026524066925... | |
begin with then set index to 0
begin
PreviousIndex := 0;
cbxDriveList.ItemIndex := 0;
end;
if isPSP(Drive) then
begin
if MessageDlg('A PSP was detect @ ' + Drive + #10#13 + 'Would you like to select this drive?',mtWarning,[mbYes,mbNo], 0) = mrYes then
cbxDriveList.ItemIndex := cb... | [
0.11561080813407898,
-0.03352785110473633,
0.7525584101676941,
-0.3286696672439575,
0.05674421414732933,
0.20213598012924194,
0.0728716254234314,
-0.5041819214820862,
-0.29170164465904236,
-0.5210090279579163,
-0.2748570442199707,
0.5546668767929077,
-0.24765893816947937,
0.445603758096694... | |
+ ' Detected' + #10#13 + 'Is this your target drive?',mtWarning,[mbYes,mbNo], 0) = mrYes then
cbxDriveList.ItemIndex := cbxDriveList.Items.IndexOf(Drive)
else cbxDriveList.ItemIndex := PreviousIndex;
end;
end;
Procedure TfrmMain.OnDeviceRemove(Drive: String);
begin
if not (getdrivetype(Pchar(Drive)) = ... | [
0.11023405194282532,
-0.163340225815773,
0.8504560589790344,
-0.47702133655548096,
0.08570512384176254,
0.20042720437049866,
0.2123473882675171,
-0.42312005162239075,
-0.13354000449180603,
-0.4886716604232788,
-0.4254787862300873,
0.8166743516921997,
-0.4296540915966034,
0.2880523204803467... | |
begin
PSPDrive := '';
end;
end;
end;
```
Rob has said something below about im not calling the inherited message handler, ive read the document i see a couple of things i can return... but im not really sure i understand but i will look into it. Im not a very good pascal programmer but ive been learning a... | [
-0.20075348019599915,
-0.02008942700922489,
0.49056124687194824,
-0.1796002984046936,
-0.2458694875240326,
-0.23711685836315155,
0.4352094233036041,
0.07478880882263184,
-0.15178170800209045,
-0.8518266677856445,
-0.1773015558719635,
0.6620732545852661,
-0.23364189267158508,
-0.14800207316... | |
wis this your whatever and adds I:\ to the list. Its just the two new things that have changed in the app that fail when called by wmdevicechange and as said before they work on their own.
EDIT - SOLVED
Alright well im using a timer as suggested and the problem seems to be solved. One note is that when called by the ... | [
0.2504289150238037,
0.14051692187786102,
0.6248611807823181,
0.08943115919828415,
0.14000198245048523,
0.0999210849404335,
0.439022034406662,
0.311630517244339,
-0.32868245244026184,
-0.5446293354034424,
0.12867575883865356,
0.696294903755188,
-0.23294855654239655,
0.03456463664770126,
0... | |
hooked the PSP and app to a 1.8Ghz Dual Core Laptop and the program detected the psp and notified the user very fast. So the app wont freeze unless there on a very very slow computer and on this slow onw its only for a matter of seconds and doesnt affect the operation of the program though isnt very cool. But i feel th... | [
0.08268149942159653,
-0.03498654440045357,
0.7508566379547119,
0.38354024291038513,
0.05919048935174942,
-0.18270663917064667,
0.4024334251880646,
0.016720661893486977,
-0.20706430077552795,
-0.44340983033180237,
-0.13367100059986115,
0.47791385650634766,
-0.29364916682243347,
-0.416066080... | |
component, set it's Key property (Key1 .. 5) and redirect it to a Control. That control can be your Form. In the Controls KeyDown event typecast the KeyCode to the Hardwarekeys enum.
See the sample code on this [MSDN page](http://inthehand.net/library/InTheHand.WindowsCE.Forms.HardwareButton.html). | [
0.10928229987621307,
-0.4909614622592926,
0.6311053037643433,
0.20225892961025238,
0.17864008247852325,
0.06991163641214371,
-0.005077286157757044,
-0.475778728723526,
-0.07207346707582474,
-0.453152596950531,
-0.3159092664718628,
0.6835383772850037,
-0.25731298327445984,
0.278550565242767... | |
I am trying to get a grasp on how to handle updates to a live, functioning ASP.NET (2.0 or greater) Application while there are users on the site.
For example, suppose SO is an ASP.NET Web Application project. The project code compiles down to the single .DLL in the BIN folder. Now, there are constantly users on SO, s... | [
0.6680091619491577,
0.002938428893685341,
0.15702477097511292,
-0.016125740483403206,
-0.06766732037067413,
-0.243798166513443,
0.1726917028427124,
-0.13549156486988068,
-0.3308538794517517,
-0.6697201132774353,
-0.11446709930896759,
0.5512775182723999,
-0.14520207047462463,
0.022836819291... | |
exist with the scenario above? I am beginning to develop a web site as a user-driven Web Application, and I want to make sure that my inexperience with this would not potentially annoy the [potentially] many users that I [want to] have 24/7.
EDIT: Sorry, I should have put this in a more exact context. Assume that this... | [
0.9637275338172913,
0.36674293875694275,
0.37079429626464844,
0.06291195005178452,
0.07319080084562302,
-0.5297635793685913,
0.5773144960403442,
0.21161538362503052,
-0.259787380695343,
-0.5114680528640747,
-0.03271564468741417,
0.6023039817810059,
-0.23994792997837067,
0.3416580259799957,... | |
recycle will also happen, some of changes that trigger it for sure: web.config, global.asax, app\_code.
After the recycle, user will still be logged in because asp.net will just validate the syntax. That is given you use a fixed machine key, otherwise it will change on each recycle. This is something you want to do an... | [
0.04637065902352333,
-0.19105976819992065,
0.7018263339996338,
0.5102323889732361,
0.13833537697792053,
-0.43618184328079224,
0.4840339720249176,
-0.015383527614176273,
-0.5739798545837402,
-0.852677583694458,
-0.3968527317047119,
0.526400089263916,
-0.19676294922828674,
0.1081436201930046... | |
to consider that. There are plenty of scenarios where you can avoid using session, and others were you can wrap it and re-retrieve the info if the session was cleaned. This should leave you with a handful specific cases that you know can give trouble to the users, so for those you do some of the suggestions others have... | [
0.5209705233573914,
-0.013587499968707561,
-0.08806436508893967,
0.3156767785549164,
0.019413376227021217,
-0.18231883645057678,
0.30089133977890015,
-0.1526060700416565,
-0.33249208331108093,
-0.45618319511413574,
0.4186936616897583,
0.6966283321380615,
0.10587634891271591,
-0.04393710941... | |
I am generating a csv (comma separated value) file with Java Server Pages (JSP). The URL shows "`my_generated_csv.jsp`".
What I want to do is simple: The user clicks "`Generate`" which downloads the generated `CSV` file. I'd like to generate it with the JSP. Do I need to rethink my approach?
### Edit:
The following ... | [
0.72760009765625,
0.0800432413816452,
0.47934260964393616,
-0.09787461906671524,
-0.1663985252380371,
-0.21525518596172333,
0.034345563501119614,
-0.07615937292575836,
-0.0182658564299345,
-0.6296096444129944,
-0.13024701178073883,
0.384971022605896,
-0.21603277325630188,
0.193801268935203... | |
resource (rc-file) based on values in a ini-file. Then we compile the rc-file into a res-file, that we include in the project.
We use finalbuilder-scripts to automate the process. I know finalbuilder has its own support for versionnumbers, but we don't use it. I don't know why, though... | [
0.3227499723434448,
-0.07488400489091873,
0.3160402178764343,
0.15607644617557526,
0.09405577927827835,
0.14842744171619415,
0.1587192714214325,
-0.373028427362442,
-0.0868762955069542,
-0.572422444820404,
-0.14800263941287994,
0.7428748607635498,
0.153290256857872,
0.19363008439540863,
... | |
I'm implementing a small application in C, which I would like to sell as shareware for a reasonable price later on. It will start of with a 30-day trial, which I am already quite certain of how to implement it.
The problem I have, though, is that I am not quite sure how to implement the product key verification. What ... | [
0.9892139434814453,
0.41836848855018616,
0.3048460781574249,
-0.09631650149822235,
0.15850535035133362,
-0.23077641427516937,
0.16398993134498596,
0.005497286561876535,
0.04268825426697731,
-0.2744522988796234,
0.12186454236507416,
0.5077573657035828,
0.08478079736232758,
0.167326763272285... | |
his profile on my website). No problem so far. He/She then drops the key in the appropriate key fields in my app and *boom* the app is registered.
From what I could gather so far, people either recommend AES or RSA for this. To be honest, I in another direction in college (not cryptography) and the one cryptography cl... | [
0.6125810742378235,
0.37533676624298096,
0.28919193148612976,
0.11265528202056885,
0.29595255851745605,
-0.01627517305314541,
0.21609625220298767,
0.01307075098156929,
-0.16169878840446472,
-0.3703173100948334,
0.04902184382081032,
0.5141288042068481,
0.08577681332826614,
-0.01397256366908... | |
still validate them in my app (which by the way won't require internet access....so no checking back with a server)?
So I guess RSA would be the way to go? But doesn't RSA produce pretty long keys (at least longer than the required 25 characters from above)?
In [another thread](https://stackoverflow.com/questions/453... | [
0.445526659488678,
0.41514816880226135,
0.38132694363594055,
0.18412742018699646,
0.24769456684589386,
0.09955646097660065,
0.2586713135242462,
-0.15281860530376434,
-0.3100394010543823,
-0.17007052898406982,
-0.05326984450221062,
0.18617430329322815,
0.054630178958177567,
-0.0945823416113... | |
Oh...and please don't tell me how my key can and will be cracked at some point.....I know about that, which is primarily why I don't want to spend a lot of time with this issue, but at the same time not make it too easy for the occasional cracker.
Symmetric algorithms are limited, in that any novice cracker with a disa... | [
0.20218808948993683,
0.17915089428424835,
-0.11281935125589371,
0.2309323251247406,
0.40033334493637085,
-0.577858030796051,
-0.11591543257236481,
0.16823263466358185,
-0.05518904700875282,
-0.2053503841161728,
-0.1677599847316742,
0.7490260004997253,
0.12460678815841675,
0.326333165168762... | |
collect certain identifying details about the user and/or their environment (typically, this is just a full name; sometimes a company, too).
* You make a 128-bit MD5 hash of this information.
* Using a 128-bit [Elliptic Curve](http://en.wikipedia.org/wiki/Elliptic_curve_cryptography) crypto, encrypt this hash using the... | [
0.2750965654850006,
0.24795222282409668,
0.361128568649292,
0.1236477866768837,
0.1255398392677307,
-0.009801696054637432,
0.31676071882247925,
-0.34952330589294434,
-0.06627599149942398,
-0.39625754952430725,
-0.4743298888206482,
0.26221564412117004,
-0.13672740757465363,
0.01508295722305... | |
it back to a 128-bit number (16 bytes), decrypts that using the public key of your EC crypto, and compares the result to an MD5 hash of the user's personal information, which must match what was used for registration.
This is just the basic idea, of course. For more details and source code, see [Product Keys Based on ... | [
0.4254741966724396,
0.17671653628349304,
0.2819950580596924,
-0.005619026720523834,
0.28342342376708984,
-0.18070363998413086,
-0.03527856990695,
-0.24770142138004303,
-0.11807006597518921,
-0.04633861035108566,
-0.3085571527481079,
0.3179350793361664,
-0.10633508861064911,
0.2357075065374... | |
I need to grab a series of screenshots and concatenate them into a movie. I'm trying to use the java Robot class to capture the screen.
But the createScreenCapture() method takes more than 1 second on my machine. I can't even get 1 fps. Is there a way to speed it up? Or is there any other API?
Edit: It is allocating... | [
0.2029883712530136,
-0.22243614494800568,
0.5715895295143127,
0.021559838205575943,
-0.17824921011924744,
-0.05050549656152725,
0.26454541087150574,
-0.3107301592826843,
-0.09163804352283478,
-0.9326375126838684,
0.09153848886489868,
0.39857217669487,
-0.06994011998176575,
0.01518935896456... | |
1400ms.
Symmetric algorithms are limited, in that any novice cracker with a disassembler can find your key (or the algorithm used to generate one) and make a "keygen".
For this reason, asymmetric cryptology is the way to go. The basic premise is something like this:
* When the user purchases a license from you, you c... | [
0.15685109794139862,
0.11695850640535355,
0.46922290325164795,
0.2623617351055145,
0.19908761978149414,
-0.5662112832069397,
0.02649092487990856,
-0.06325957179069519,
0.018484976142644882,
-0.01298221293836832,
-0.2922658622264862,
0.4931831955909729,
0.10622669011354446,
0.13975259661674... | |
cipher text can be represented to the user as a 25-character string consisting of letters and digits (plus separating dashes for readability). Notice that 26 letters + 10 digits = 36 discrete values, and that 36^25 > 2^128.
* The user types this product key into your registration dialog. The client software converts it... | [
0.2923838496208191,
0.17231032252311707,
0.5921663641929626,
-0.12082734704017639,
0.1757209599018097,
-0.1066184788942337,
0.5468853712081909,
-0.38366520404815674,
-0.039229411631822586,
-0.37173789739608765,
-0.6074668765068054,
0.145747572183609,
-0.31778669357299805,
-0.05250644311308... | |
details and source code, see [Product Keys Based on Elliptic Curve Cryptography](http://www.codeguru.com/cpp/cpp/algorithms/general/article.php/c12799/Product-Keys-Based-on-Elliptic-Curve-Cryptography.htm). | [
0.08990930765867233,
0.252399206161499,
-0.06270404160022736,
0.0075052776373922825,
0.25629281997680664,
-0.007906494662165642,
-0.07062605768442154,
-0.2248181700706482,
-0.18155533075332642,
-0.032914940267801285,
-0.7064917683601379,
0.15612256526947021,
-0.17368653416633606,
-0.040928... | |
I am creating a progressively built single-page (if Javascript is enabled) "blog" which uses AJAX to request HTML for new pages the user is navigating to.
When the user navigates to new pages they will be added one after another into the DOM in a small window with "overflow: hidden;":
```
<div id="foo" style="width:2... | [
0.422730028629303,
0.18160277605056763,
0.90491783618927,
-0.450979083776474,
-0.05262914299964905,
0.05441669374704361,
0.24404963850975037,
-0.26515963673591614,
-0.05064109340310097,
-0.732968807220459,
-0.22531887888908386,
0.18746493756771088,
-0.3423314392566681,
0.18775978684425354,... | |
away from them? Then I will need to make a new AJAX request if the user chooses to navigate to them again. :(
Thanks
Willem
No matter what people say GC will do for you, whether in JavaScript or C# or Java, watch out and forget the silly promise of automatic management. Clean it up explicitly and sleep well.
Very si... | [
0.26215681433677673,
0.22671709954738617,
0.4319525957107544,
0.26039808988571167,
-0.11691409349441528,
-0.17145168781280518,
0.2708253562450409,
0.11962293088436127,
-0.3754626512527466,
-0.46911829710006714,
-0.21584029495716095,
0.5900357961654663,
-0.3062877058982849,
-0.0450660213828... | |
Bash scripts are very useful and can save a lot of programming time. So how do you start a bash script in a C++ program? Also if you know how to make user become the super-user that would be nice also. Thanks!
Use the `system` function.
```
system("myfile.sh"); // myfile.sh should be chmod +x
``` | [
0.47695261240005493,
0.19289131462574005,
0.152484729886055,
0.050050973892211914,
-0.3318558633327484,
-0.37742847204208374,
0.24351124465465546,
0.02337935008108616,
-0.2066626250743866,
-0.7242544293403625,
-0.017913678660988808,
0.8199566602706909,
-0.09580052644014359,
-0.276499271392... | |
I'm currently styling form elements with a custom CSS class to style text inputs differently, as in:
```
$submit = new Zend_Form_Element_Submit('login');
$submit->setLabel('Log in')
->setAttrib('class', 'submit');
```
And
```
$username = new Zend_Form_Element_Text('username');
$username->setLabel('Username')
... | [
0.37985578179359436,
0.1942387968301773,
0.21322965621948242,
-0.19690875709056854,
-0.3512818515300751,
0.07770934700965881,
0.19123023748397827,
-0.5774551630020142,
0.2457481175661087,
-0.8797048330307007,
0.1007390022277832,
0.49450811743736267,
0.039453811943531036,
0.1822293549776077... | |
its constructor. | [
0.05448046326637268,
0.2634313106536865,
0.20716531574726105,
0.27985334396362305,
-0.06322137266397476,
0.43580925464630127,
-0.33697155117988586,
-0.03766343370079994,
0.1889181137084961,
-0.2490614652633667,
-0.1666797399520874,
0.3158591389656067,
0.03673865273594856,
0.284815728664398... | |
I just downloaded a website template that is in a .PSD form. I have made the changes via photoshop, setup the splices then clicked "Save for web devices".
I export the website and I get the images directory and the html file. All ok so far.
I next open the html file using dreamweaver.
My question is what is the bes... | [
0.5777327418327332,
0.04870222136378288,
0.8144000172615051,
-0.009078316390514374,
-0.2863088846206665,
-0.07701350748538971,
0.3124455213546753,
-0.19382494688034058,
-0.220096156001091,
-0.9700179100036621,
-0.2259233295917511,
0.534263014793396,
-0.15734052658081055,
0.0577633529901504... | |
<img src="images/index_39.jpg" width="125" height="75" alt=""></td>
<td colspan="4" rowspan="8">
<img src="images/storage-41.jpg" width="81" height="118" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="3" alt=""></td>
</tr>
```
I set the image as the background to the table element ho... | [
0.17718325555324554,
0.16364428400993347,
0.40422746539115906,
0.14233240485191345,
-0.3335045874118805,
0.23822686076164246,
0.058072302490472794,
-0.3285773992538452,
-0.480765700340271,
-0.6444469094276428,
-0.11885806918144226,
0.5631916522979736,
-0.09596052020788193,
-0.3812815248966... | |
template only come with a PSD file?
Typically, the PSD file allows you to edit the graphical portion, then save off the images you need, to be placed back in HTML, rather than generating HTML directly from the PSD.
Since you asked for the *best* way to do this, I will give you my answer based on my opinion.
Using ta... | [
0.7785218954086304,
0.05047116428613663,
0.08278267830610275,
0.0973929688334465,
-0.247221440076828,
-0.35886701941490173,
0.16729836165905,
-0.19206003844738007,
-0.14147837460041046,
-0.7702481746673584,
-0.07908673584461212,
0.32084566354751587,
-0.3840065896511078,
-0.3472824990749359... | |
a Mac, I highly recommend downloading and trying out CSSEdit. For a PC, Visual Studio 2008 has a nice CSS editor as well. | [
-0.5601551532745361,
0.04329711198806763,
0.3339373767375946,
0.3459480404853821,
-0.3214387893676758,
-0.18869371712207794,
-0.018794337287545204,
0.21950456500053406,
-0.15468436479568481,
-0.7453832626342773,
0.0971427708864212,
0.7521454691886902,
-0.00679033063352108,
-0.1724444776773... | |
Can somebody tell me what I am doing wrong really? I am going nuts, the following code works perfect on localhost/WIN and when I try it on the webhost/linux it gives warnings:
```
$lines = file('english.php');
foreach($lines as $line) {
$matches=array();
if (preg_match('/DEFINE\(\'(.*?)\',\s*\'(.*)\'\);/i', $l... | [
0.08713595569133759,
0.0507085919380188,
0.4103204011917114,
-0.1228238046169281,
0.11891276389360428,
-0.2667595446109772,
0.7310512065887451,
0.10914469510316849,
-0.20506501197814941,
-0.4172990918159485,
0.02578505128622055,
0.7141587734222412,
-0.27212613821029663,
0.04594676941633224... | |
works perfect. I do not know what I am doing wrong, please help me resolve this nightmare :(
Thanks.
I don't see anything obviously wrong with your code, but I'm curious why you're building separate arrays and then combining them rather than just building a combined array:
```
// Make sure this file is local to the s... | [
-0.24825531244277954,
-0.20586448907852173,
0.560565710067749,
0.0758393332362175,
0.15169425308704376,
-0.11593073606491089,
0.705406904220581,
-0.1348724514245987,
-0.018306424841284752,
-0.7091816067695618,
-0.2536759078502655,
0.5685510635375977,
-0.3785844147205353,
0.0327196232974529... | |
$lang[$matches[1]] = $matches[2];
}
}
```
(I've also changed your regex to handle single quotes.) | [
0.2589642405509949,
0.032250527292490005,
0.28999000787734985,
-0.12191158533096313,
0.04769500344991684,
-0.03333435580134392,
0.13388171792030334,
-0.19230268895626068,
-0.135020911693573,
-0.21762147545814514,
-0.09901145100593567,
0.6317722201347351,
-0.5909122228622437,
0.097052499651... | |
Using a regex, I am able to find a bunch of numbers that I want to replace. However, I want to replace the number with another number that is calculated using the original - captured - number.
Is that possible in notepad++ using a kind of expression in the replacement-part?
**Edit:** Maybe a strange thought, but coul... | [
0.32895714044570923,
0.0331067256629467,
0.3137550950050354,
-0.011168788187205791,
-0.021197695285081863,
0.08942598104476929,
0.1791587620973587,
-0.19197770953178406,
-0.23840545117855072,
-0.6820580959320068,
-0.11200615018606186,
0.6923460960388184,
-0.4341529607772827,
-0.13913583755... | |
File::RDWR)
contents = f.read()
contents.gsub!(/\d+/){|m|
m.to_i + 1 # convert the current match to an integer, and add one
}
f.truncate(0) # empty the existing file
f.seek(0) # seek to the start of the file, before writing again
f.write(contents) # write modified file
f.close()
```
..and the output:
```
$ cat f... | [
0.12114579230546951,
0.13936610519886017,
0.634648323059082,
-0.28560444712638855,
-0.24593494832515717,
-0.021363765001296997,
0.218342125415802,
-0.5177232623100281,
-0.06502226740121841,
-0.23181384801864624,
-0.16639263927936554,
0.7200821042060852,
-0.6070098280906677,
-0.130899474024... | |
would be up to the text-editors, but the usefulness of this is very limited, and can be achieved via scripting most editors allow ([Notepad++](http://notepad-plus.sourceforge.net/uk/download.php) has a plugin system, although I've no idea how easy it is to use).
Basically, if regex/search-and-replace will not achieve ... | [
0.22070124745368958,
-0.060846127569675446,
0.3295377194881439,
0.20156724750995636,
0.20030748844146729,
-0.13564418256282806,
0.23562653362751007,
-0.016557803377509117,
0.11916768550872803,
-0.5780614018440247,
-0.16557936370372772,
0.8494161367416382,
-0.04674909636378288,
-0.401675373... | |
how could i get a button to look like the "Check It" button on this page <http://www.intus.co.za/>
HTML:
```
<input class="field" type="submit" style="margin-right: 10px;" value="Check It"/>
```
CSS:
```
.field {
border:1px solid #000000;
font-family:Arial,Helvetica,sans-serif;
font-size:11px;
}
```
I got this us... | [
0.086947962641716,
-0.1372683197259903,
0.576614499092102,
0.015246616676449776,
0.20240527391433716,
0.1907997727394104,
0.2085638791322708,
-0.26297253370285034,
-0.027719644829630852,
-0.7701885104179382,
0.04052964970469475,
-0.02997157722711563,
-0.33321189880371094,
-0.12211451679468... | |
I read that Ruby has a language featured called "labels", how does that work?
Update:
I saw it at <http://ruby.about.com/od/gems/qt/shorturl.htm> where the author talks about a label at the bottom of the article with:
`puts ShortURL.shorten('http://ruby.about.com', :lns)`
Think the author meant to say **symbols**. Y... | [
0.466267853975296,
0.08531305938959122,
-0.16344130039215088,
-0.027468811720609665,
-0.2762572169303894,
-0.15310530364513397,
0.46765854954719543,
0.07330872863531113,
-0.34370648860931396,
-0.3495328426361084,
0.09597361832857132,
0.10641805827617645,
-0.16327308118343353,
0.21531717479... | |
I'm using an STI model with a single "Accounts" table to hold information for Users and Technicians (i.e. User < Account, Technician < Account). Everything works from a functional perspective, but things explode when running unit tests:
...
8) Error:
test\_the\_truth(UserTest):
ActiveRecord::StatementInvalid: PGError:... | [
0.34098881483078003,
0.30331653356552124,
0.23445510864257812,
-0.1999451071023941,
0.21571104228496552,
0.1030624732375145,
0.43276727199554443,
-0.1421290785074234,
0.01526239700615406,
-0.5332493185997009,
0.003815086092799902,
0.8155567049980164,
-0.048946455121040344,
0.16101694107055... | |
problem was due to the presence of:
./test/fixtures/technicians.yml
./test/fixtures/users.yml
This makes sense as the framework expected to be able to insert data into similarly named tables. | [
0.33653512597084045,
0.055889792740345,
0.43459048867225647,
0.1824396401643753,
0.3218066990375519,
0.0977797731757164,
-0.10728181153535843,
-0.05599741265177727,
-0.16154804825782776,
-0.25243914127349854,
0.012786335311830044,
0.17384979128837585,
-0.16230005025863647,
0.17783209681510... | |
I was going through a legacy code and found the following snippet:
```
MyClass::~MyClass()
{
EnterCriticalSection(&cs);
//Access Data Members, **NO Global** members are being accessed here
LeaveCriticalSection(&cs);
}
```
I am wondering will it help by any chance to guard the destructor ?
Consider a scenari... | [
0.013364585116505623,
-0.06283421069383621,
0.275275856256485,
-0.19781309366226196,
0.19203564524650574,
0.03823035582900047,
0.42160657048225403,
-0.09881173819303513,
-0.3016219437122345,
-0.6255691051483154,
-0.19275237619876862,
0.48309847712516785,
-0.2801250219345093,
0.220356300473... | |
with such a situation, **it needs a fundamental fix**. However, the destructor might want to alter some other thing (which is unrelated to the class being destructed) and it might need a critical section (e.g. like decrementing a *global* counter). | [
-0.1734856218099594,
-0.19495627284049988,
0.1313401758670807,
0.25323283672332764,
-0.026562286540865898,
-0.006361333187669516,
0.24585801362991333,
-0.032420866191387177,
-0.2050519585609436,
-0.5216130614280701,
-0.6590141654014587,
0.392362505197525,
-0.34779122471809387,
0.2009445279... | |
I am programming a Tetris clone and in my game I store my tetromino blocks as 4x4 arrays of blocks. I now need to be able to rotate the integer positions in the arrays so that I get a rotated tetris block. I cannot simply rotate the texture because all my collision detection, etc has been designed to work with the 2D a... | [
0.2487814873456955,
0.13551251590251923,
0.4775105118751526,
-0.1972769796848297,
-0.06324652582406998,
0.10808151215314865,
0.07820148766040802,
-0.012577683664858341,
0.20537056028842926,
-0.7958005666732788,
0.15544480085372925,
0.3757176399230957,
-0.2324344962835312,
0.255733907222747... | |
0
0 1 1 0
0 0 0 0
```
Thanks for your help.
If they're a 2D array, you can implement rotation by copying with different array access orders.
i.e., for a clockwise rotation, try:
```
int [,] newArray = new int[4,4];
for (int i=3;i>=0;--i)
{
for (int j=0;j<4;++j)
{
newArray[j,3-i] = array[i,j];
... | [
0.22220157086849213,
-0.07660087943077087,
0.5036630034446716,
-0.3286530077457428,
-0.36593884229660034,
0.06393106281757355,
0.30855438113212585,
-0.6747497916221619,
-0.44168636202812195,
-0.3304654359817505,
-0.1066804751753807,
0.3805425465106964,
-0.3869142234325409,
0.30905199050903... | |
I'm using this code to prevent a second instance of my program from running at the same time, is it safe?
```
Mutex appSingleton = new System.Threading.Mutex(false, "MyAppSingleInstnceMutx");
if (appSingleton.WaitOne(0, false)) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(f... | [
0.373292475938797,
0.24400541186332703,
0.812778115272522,
-0.2872737944126129,
0.05384190008044243,
0.2416096329689026,
0.758417010307312,
-0.4221988022327423,
-0.4246880114078522,
-0.6219836473464966,
-0.27206850051879883,
0.6092059016227722,
-0.6208736300468445,
0.1627092957496643,
0.... | |
`finally` block. Otherwise your process could abruptly terminate and leave it in a signaled state, like an exception. That would make it so that future process instances would not be able to start up.
Unfortunately though, even with a `finally` block you must deal with the potential that a process will be terminated ... | [
0.07945802062749863,
-0.1805775761604309,
0.2245456725358963,
0.09758830815553665,
0.12334086745977402,
0.014370562508702278,
0.39339742064476013,
0.07966665923595428,
-0.398337185382843,
-0.581985592842102,
-0.20075473189353943,
0.020315278321504593,
-0.29608333110809326,
0.68720251321792... | |
this.
I encourage you to read up on [the details of the Mutex class](http://msdn.microsoft.com/en-us/library/system.threading.mutex.aspx). Using it is not always simple.
---
Expanding upon the race condition possibility:
The following sequence of events can occur which would cause a second instance of the applicat... | [
0.05374704673886299,
-0.11034812033176422,
0.1672690063714981,
-0.27787572145462036,
-0.20966951549053192,
0.19619452953338623,
0.49535688757896423,
-0.33201366662979126,
-0.17057204246520996,
-0.4812091886997223,
-0.15289661288261414,
0.3997284173965454,
-0.5654862523078918,
0.42296737432... | |
I need a way to for a custom control (descended from TCustomControl) to tell if it is currently visible. I'm not talking about the .Visible property; I mean whether or not it's actually being displayed on-screen at the moment. Does anyone know how to do this?
A few years back I had the same kind of problem for a Form: ... | [
0.7314696311950684,
-0.06623812019824982,
0.4198862612247467,
0.27155348658561707,
-0.044983673840761185,
-0.32290196418762207,
0.2086036056280136,
0.23104175925254822,
-0.3253245949745178,
-0.7332907319068909,
0.4081120491027832,
0.4047183096408844,
-0.04669594019651413,
0.038751944899559... | |
another one.
Here's the code, it could be adapted for a WinControl...
```
{----------------------------------------------------------}
function IsMyFormCovered(const MyForm: TForm): Boolean;
var
MyRect: TRect;
MyRgn, TempRgn: HRGN;
RType: Integer;
hw: HWND;
begin
MyRect := MyForm.BoundsRect; ... | [
-0.22705750167369843,
-0.4640269875526428,
1.0133486986160278,
0.10938792675733566,
0.09280699491500854,
0.07247692346572876,
0.025296727195382118,
-0.35801222920417786,
-0.09311256557703018,
-0.7938283085823059,
-0.13575327396392822,
0.3836696445941925,
-0.019719433039426804,
0.3140586614... | |
// MyRgn type
// From topmost window downto MyForm, build the not overlapped portion of MyForm
while (hw<>0) and (hw <> MyForm.handle) and (RType <> NULLREGION) do
begin
// nothing to do if hidden window
if IsWindowVisible(hw) then
begin
GetWindowRect(hw, MyRect);
TempRgn := CreateRectRgnIn... | [
-0.0005418547079898417,
-0.22923606634140015,
1.0320022106170654,
-0.3161068260669708,
0.04324384778738022,
0.03266747295856476,
0.4843598008155823,
-0.16901636123657227,
0.12262573093175888,
-1.0157314538955688,
-0.3356115221977234,
0.3453404903411865,
-0.20470425486564636,
0.293085753917... | |
end; {if}
if RType <> NULLREGION then // there's a remaining portion
hw := GetNextWindow(hw, GW_HWNDNEXT);
end; {while}
DeleteObject(MyRgn);
Result := RType = NULLREGION;
end;
function IsMyFormVisible(const MyForm : TForm): Boolean;
begin
Result:= MyForm.visible and
isWindowVisible(MyForm... | [
-0.040683090686798096,
-0.39508143067359924,
0.8443377017974854,
-0.36826422810554504,
0.21660076081752777,
0.02569105103611946,
0.2140159010887146,
-0.2908594608306885,
-0.10239676386117935,
-0.63583904504776,
-0.317534476518631,
0.38009727001190186,
-0.13137274980545044,
0.38849553465843... | |
I do a lot of work on databases over the internet. My company is instituting a policy of not sending any non-encrypted information (including vanilla JDBC). I currently connect to MS SQL Server and IBM DB2 databases (both LUW and AS/400). Is there an easy way to encrypt/decrypt these connections?
Edit:
Found an intere... | [
0.35430097579956055,
0.23911258578300476,
-0.035270221531391144,
0.15971362590789795,
-0.09407232701778412,
-0.18912114202976227,
0.3497214615345001,
0.3741855323314667,
-0.2935420870780945,
-0.7009148001670837,
-0.031327664852142334,
0.44874274730682373,
-0.21453724801540375,
0.3866375684... | |
Driver 9.1 includes SSL support to database servers that also have SSL support.
Some links :
* [SQL Server 2005 JDBC driver v1.2 Aug CTP is LIVE](http://blogs.msdn.com/jdbcteam/archive/2007/09/04/sql-server-2005-jdbc-driver-v1-2-aug-ctp-is-live.aspx) (2007-09-04)
* [SSL in Microsoft SQL Server JDBC 1.2 driver](http... | [
-0.39085155725479126,
-0.04208916425704956,
0.5681631565093994,
-0.2608179450035095,
-0.6022912263870239,
0.2620706856250763,
0.16324982047080994,
-0.05161413177847862,
-0.08768471330404282,
-0.5441082119941711,
-0.050060369074344635,
0.797315239906311,
-0.23501501977443695,
-0.12912622094... | |
I'm looking for a freeware defect tracking solution. I have experience with Mercury Quality Center, but I hear that comes with a five-digit pricetag. I need something for my personal projects. Webforms (i.e. ASP.NET) would be preferrable. Anything good out there?
If its to be used solely by you, you can get a [Fogbugz]... | [
0.8080702424049377,
0.20468606054782867,
0.35717374086380005,
0.3757306635379791,
0.18125706911087036,
-0.026829520240426064,
0.3769521713256836,
0.3618159890174866,
-0.3568105399608612,
-0.40987613797187805,
0.3122309744358063,
0.24312573671340942,
0.014668570831418037,
0.0132924597710371... | |
I have created a project in Visual Studio 2008 Professional Edition.
This project contains one .cpp file for each assignment like this...
```
[-]Source Files
\
|-- 233.cpp
|-- test.cpp
```
**And each file contains definition of main().**
Action:CTRL+F5
```
Error 1 error LNK2005: _main already defined... | [
-0.062205005437135696,
-0.02835225872695446,
0.06535378843545914,
-0.005511418450623751,
-0.0958818793296814,
0.21927765011787415,
0.3393966555595398,
0.041729722172021866,
-0.3961307108402252,
-0.5643571019172668,
0.1043604165315628,
0.30760350823402405,
-0.31623339653015137,
-0.002206193... | |
then call them from a new main() function which would function as a menu.
If you make them separate projects, you can switch which one to run with Solution Properties -> Startup Project. | [
0.2601981461048126,
-0.403902143239975,
-0.030303459614515305,
0.250180184841156,
0.2856195569038391,
0.3007022738456726,
0.01098412275314331,
-0.3253326117992401,
-0.13316944241523743,
-0.7454792857170105,
-0.13086964190006256,
0.4579382538795471,
-0.16985653340816498,
0.4270053505897522,... | |
Im using janRain Php library for OpenId and yadis discovery and no matter what i do, i will work in stuff like user.openid.org or my own provider, but if i try to use the google endpoint, i cant get any discovery information.
Even if i run the discovery example for the janrain library, i get the next result Claimed
... | [
0.2839663028717041,
0.48087072372436523,
0.404162734746933,
-0.03597662225365639,
-0.3314170241355896,
-0.19155335426330566,
0.2606581151485443,
0.1578795462846756,
-0.055592190474271774,
-0.9389012455940247,
0.17799775302410126,
0.34826964139938354,
-0.10340989381074905,
0.229913532733917... | |
site, no sassy auth wanted in the project).
Why is openId so #@!#@ complex and undocumented?(note, i gave zend\_openid a couple of hours to have the same result)
it's working here. some hints:
* as i understand it, `http(s)://www.google.com/accounts/o8/id` is not an openid endpoint, but googles *discovery* endpoint.... | [
0.17456889152526855,
0.02529742382466793,
0.3864412307739258,
0.12296071648597717,
-0.09701964259147644,
-0.37782374024391174,
0.22613577544689178,
0.1320449262857437,
-0.18078677356243134,
-0.7568584084510803,
-0.13463790714740753,
0.3266158103942871,
-0.16631563007831573,
0.2332102805376... | |
in `php.ini-recommended`.
* does your PHP installation support SSL? see [README](http://openidenabled.com/files/php-openid/repos/2.x.x/README), specifically this part:
```
Not all PHP installations support SSL. You can find out if yours
supports SSL by reading the "HTTP Fetching" section of the output of
"examples/de... | [
0.2548615336418152,
0.12261895090341568,
0.35192161798477173,
0.08228029310703278,
-0.2942500114440918,
-0.4353032410144806,
0.3367462456226349,
-0.0779905691742897,
-0.12262855470180511,
-0.6704480648040771,
-0.20379002392292023,
0.27375924587249756,
-0.34498435258865356,
-0.0095465714111... | |
with OpenSSL support.
``` | [
-0.22719706594944,
0.3811020255088806,
0.1529591828584671,
0.0864235982298851,
-0.05420512706041336,
-0.4470745027065277,
0.2829926311969757,
0.11783529072999954,
-0.10826350748538971,
-0.7506089210510254,
-0.7505835294723511,
0.44389811158180237,
-0.47866344451904297,
0.040497660636901855... | |
I am using silverlight client with ado.net dataservices on entity framework.
I have an Entity Contact and an Entity Address which is related with a foreign key relation ship...
A contact can have 1 or more Adresses but a Address needs always at least 1 contact..
pretty basic...
I have a Repository for my contacts and... | [
0.23287606239318848,
0.33992698788642883,
0.627170979976654,
-0.2745964229106903,
-0.09002670645713806,
0.16068921983242035,
0.20830780267715454,
-0.31838229298591614,
-0.19044914841651917,
-0.778948187828064,
0.04469985514879227,
0.19534482061862946,
-0.26020947098731995,
0.36283472180366... | |
can not save a related object graph right away so i did something like this
```
DataBaseEntities.AddToContact(obj2Badded.Contact);
DataBaseEntities.AddToAddress(obj2Badded);
DataBaseEntities.SetLink(obj2Badded,"Contact",object2Badded.Contact);
DataBaseEinties.BeginSaveChanges(...)
```
Is there away to do this in tra... | [
-0.0001388876116834581,
-0.0063951220363378525,
0.4810439646244049,
0.11477199196815491,
0.048667456954717636,
0.02148641087114811,
0.13323023915290833,
0.10932593047618866,
-0.18431836366653442,
-0.7923122644424438,
0.08675623685121536,
0.45965343713760376,
-0.26562508940696716,
0.2941085... | |
it exposes, do this:
```
import xmlrpclib
svc = xmlrpclib.ServerProxy('http://ws.audioscrobbler.com/2.0/')
print svc.system.listMethods()
```
And you'll be given a list of the methods exposed by the XML-RPC endpoint.
By the way, that bit of code up there demonstrates how to use a `ServerProxy` object to call a met... | [
0.250100314617157,
0.3198138475418091,
0.6336112022399902,
-0.21395576000213623,
-0.12522540986537933,
-0.3065938353538513,
0.20136117935180664,
-0.3944319188594818,
-0.21861182153224945,
-0.5166804790496826,
-0.27395445108413696,
0.860950231552124,
-0.34331709146499634,
0.1707928925752639... | |
An ajax request returns me a standard JSON array filled with my user's inputs. The input has been sanitized, and using the eval() function, I can easily create my javascript object and update my page...
So here's the problem. No matter how hard I try to sanitize the inputs, I'd rather not use the eval() function. I've... | [
-0.09718716889619827,
0.006650752387940884,
0.2620756924152374,
0.021927786991000175,
-0.6120477318763733,
-0.09716231375932693,
0.20577369630336761,
-0.1318102777004242,
-0.32672443985939026,
-0.7558078765869141,
-0.12091514468193054,
0.49494197964668274,
-0.29726728796958923,
-0.29574233... | |
in comments, this uses eval if you look through its source (although it looks to be sanitized first)
to avoid it completely, look at [json\_parse](http://www.json.org/json_parse.js) or [json-sans-eval](http://code.google.com/p/json-sans-eval/)
json2.js is insecure, json\_parse.js is slow, json-sans-eval.js is non-va... | [
-0.08503677695989609,
0.10306444019079208,
0.05523708090186119,
-0.1569979190826416,
-0.11805330961942673,
-0.13929711282253265,
0.6449103355407715,
-0.06269437074661255,
-0.13325095176696777,
-0.4419289827346802,
-0.4870402216911316,
0.39317306876182556,
-0.4052203297615051,
-0.2548836767... | |
```
//can set column widths using percentages
private void setPreferredTableColumnWidths(JTable table, double[] percentages)
{
Dimension tableDim = table.getSize();
double total = 0;
for(int i = 0; i < table.getColumnModel().getColumnCount(); i++)
total += percentages[i];
table.setAutoRe... | [
0.22868023812770844,
-0.0610257163643837,
0.8045956492424011,
-0.28612133860588074,
0.22717973589897156,
0.40401357412338257,
0.25732651352882385,
-0.46974337100982666,
-0.22987881302833557,
-0.6146876811981201,
-0.14694710075855255,
0.7287652492523193,
-0.1222829595208168,
0.0783934444189... | |
be able to change the widths of a JTable based on a percentage of the total width of the table. The above code looks like it should work, but I only get equal width columns when I call it using "setPreferredTableColumnWidths(table, new double[] {.01,.4,.2,.2,.2});"
What could be the problem?
json.org has a nice [javas... | [
-0.05274815484881401,
0.0068963803350925446,
0.2480240911245346,
-0.17725351452827454,
-0.09942562878131866,
-0.3324620723724365,
0.6680625081062317,
-0.21662689745426178,
-0.3745003044605255,
-0.7079670429229736,
-0.29830852150917053,
0.5250550508499146,
-0.3040366768836975,
-0.1920223832... | |
How would I write the equivalent of C#'s [`String.StartsWith`](http://msdn.microsoft.com/en-us/library/baketfxw.aspx) in JavaScript?
```
var haystack = 'hello world';
var needle = 'he';
haystack.startsWith(needle) == true
```
Note: This is an old question, and as pointed out in the comments ECMAScript 2015 (ES6) in... | [
0.10295596718788147,
0.14000961184501648,
0.6337035298347473,
-0.12868061661720276,
-0.02391706593334675,
-0.034519948065280914,
0.42982178926467896,
0.026081794872879982,
-0.1246049702167511,
-0.47334936261177063,
-0.09556082636117935,
0.4040074348449707,
-0.18683379888534546,
0.160479307... | |
laid out in the spec](http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.startswith) is a little complicated. If you want a faithful shim, use either:
* [Matthias Bynens's `String.prototype.startsWith` shim](https://github.com/mathiasbynens/String.prototype.startsWith), or
* The [es6-shim](https://gi... | [
0.18509992957115173,
0.21300508081912994,
0.26211103796958923,
-0.12709221243858337,
0.055515117943286896,
-0.1277138739824295,
0.5295130014419556,
-0.5769166350364685,
-0.04807412624359131,
-0.20090162754058838,
-0.250164270401001,
0.164237380027771,
-0.11033280938863754,
0.13625793159008... | |
Is there a way to run Lua code from a C/C++ program at a more fine-grained level than a standard "lua\_pcall" function call? Ideally I'd like to be able to loop over a list of low-level bytecode instructions (assuming it has such things) and run them one by one, so that I could write my own scheduler which had more con... | [
0.43789514899253845,
-0.018165063112974167,
-0.11042306572198868,
-0.03207742050290108,
0.06297086924314499,
0.08671646565198898,
-0.09105324745178223,
-0.16261129081249237,
-0.11702051758766174,
-0.2332935482263565,
0.06224198639392853,
0.4366009533405304,
-0.2990591824054718,
-0.01644093... | |
until a certain (potentially long-winded) action had completed before continuing execution. There would be a high proportion of such function calls in a typical Lua script, so the idea of rewriting it to use callbacks once the action has completed isn't really practical.
Perhaps side-stepping the question, but you coul... | [
0.22743526101112366,
-0.4759078919887543,
0.29971030354499817,
-0.19338461756706238,
0.2693648040294647,
-0.019611146301031113,
0.0068633705377578735,
-0.042461097240448,
-0.31492987275123596,
-0.18811672925949097,
-0.3157050609588623,
0.2784295976161957,
-0.29797056317329407,
0.0657924711... | |
that. | [
0.14583395421504974,
0.26844504475593567,
0.19980299472808838,
0.2355840653181076,
0.06883420795202255,
-0.21310508251190186,
-0.006811793427914381,
-0.016548411920666695,
0.022815069183707237,
-0.5300772190093994,
-0.025831039994955063,
0.1715977042913437,
-0.14602704346179962,
0.16757817... | |
Any way to customize the border and background of an HTML `<select>` in IE? I can style the border with simple CSS in Firefox, but apparently not in IE.
IE is most likely in quirks mode. Previous versions of IE didn't draw the `select` element themselves and thus it couldn't be styled properly (as well as some z-order ... | [
0.42338576912879944,
-0.10353191941976547,
0.4669344127178192,
-0.16925226151943207,
-0.12432046979665756,
-0.30291324853897095,
0.10931109637022018,
0.1729946881532669,
-0.29445943236351013,
-0.8632128834724426,
0.04215407371520996,
0.4528054893016815,
-0.3708861470222473,
-0.176057353615... | |
for the Browser mode and not "Quirks mode" for the document mode, you should be ok :)
The following snippet works fine here (IE8β2):
```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css">
select {
... | [
0.3240374028682709,
-0.24598929286003113,
0.6964999437332153,
0.08730557560920715,
0.06201668456196785,
-0.2791993319988251,
0.35425108671188354,
-0.0724385604262352,
-0.41325119137763977,
-0.7023678421974182,
-0.12428805977106094,
0.47558361291885376,
-0.09260992705821991,
-0.167785629630... | |
</style>
</head>
<body>
<form>
<select>
<option>1</option>
<option>2</option>
</select>
</form>
</body>
</html>
``` | [
0.08927295356988907,
-0.3320659399032593,
0.33587074279785156,
-0.02967243641614914,
-0.15974010527133942,
-0.021796874701976776,
-0.18712739646434784,
-0.28575727343559265,
0.0029571361374109983,
-0.6259545087814331,
-0.6061065196990967,
0.3554997444152832,
-0.21809440851211548,
-0.342949... | |
I need the last 9 numbers of a list and I'm sure there is a way to do it with slicing, but I can't seem to get it. I can get the first 9 like this:
```
num_list[0:9]
```
You can use negative integers with the slicing operator for that. Here's an example using the python CLI interpreter:
```
>>> a = [1, 2, 3, 4, 5, 6... | [
0.014458301477134228,
0.2597196400165558,
0.2619916498661041,
-0.28611376881599426,
-0.22591927647590637,
0.5202076435089111,
0.08678328990936279,
-0.21079514920711517,
-0.3686813414096832,
-0.29972562193870544,
0.02543487958610058,
0.5211936235427856,
-0.37566933035850525,
-0.214665025472... | |
I want to have PHP read an (uploaded) powerpoint presentation, and minimally extract the text from each slide (grabbing more info like images and layouts would even be better, but I would settle for just the text at this point).
I know that google apps does it in its presentation app, so I am guessing there is some wa... | [
0.3368273973464966,
0.010845164768397808,
0.1372184455394745,
0.4059695303440094,
-0.2709144055843353,
0.05807284638285637,
0.2612334191799164,
0.35013917088508606,
-0.11858566850423813,
-0.6479219794273376,
0.13519802689552307,
0.4699983596801758,
-0.08807677775621414,
-0.0151551458984613... | |
data.
My solution was to write a small vb6 app that does the work by automating PowerPoint.
Not what I was looking for, but, solves the issue for now.
That being said, the Zend option looks like it may be viable at some point, so I will watch that.
Thanks. | [
0.330713152885437,
-0.178974449634552,
0.5367416143417358,
0.6788641810417175,
-0.12007113546133041,
-0.18345381319522858,
0.13322123885154724,
0.4138711094856262,
-0.22861959040164948,
-0.3402857780456543,
0.22533193230628967,
0.7202431559562683,
-0.04470096528530121,
-0.02724079787731170... | |
Is there a built in method to handle urls like Default.aspx/mycontent or do I need to handle it myself by taking the url and stripping of the file's path?
I have tried searching for it but haven't been able to find anything.
I'd like to handle .aspx/parameters and am not looking at Mod/URL Rewrite.
Take a look at [AS... | [
0.34036487340927124,
-0.045572858303785324,
0.4212035834789276,
0.1424209326505661,
-0.15007109940052032,
-0.45149901509284973,
0.2778248190879822,
0.07859572768211365,
-0.41053518652915955,
-0.4489497244358063,
-0.07357190549373627,
0.41216155886650085,
-0.2905834913253784,
0.334319263696... | |
Modern computers have more and more cores. We want to change our current linear algorithm to use these cores.
A splitting of any algorithm to use different threads only makes sense if there is a free processor.
Are there any good libraries that can help to parallelize some steps if there are free processors?
I will ... | [
0.12855549156665802,
0.02398640662431717,
0.18679453432559967,
0.49702680110931396,
0.13185492157936096,
-0.016178332269191742,
-0.18388806283473969,
0.021474653854966164,
-0.4978448152542114,
-0.9452647566795349,
0.12925000488758087,
0.3188997805118561,
-0.42333748936653137,
0.31437349319... | |
process on a core duo it make sense.
The abstract algorithm has 4 steps A, B, C and D. Steps A, B and C can execute parallel. Step D needs the results from A, B and C.
Edit: I means an mathematic algorithm. No IO, No events, etc
I think you need a ConcurrentContext from Javolution. See at <http://javolution.org/targe... | [
-0.08287543803453445,
-0.04058760032057762,
0.32701370120048523,
0.3743513226509094,
0.0010968998540192842,
0.4440062642097473,
0.19238536059856415,
-0.3836981952190399,
-0.22762131690979004,
-0.39915454387664795,
0.002724231220781803,
0.11352167278528214,
-0.35336023569107056,
0.098709054... | |
I'm beginning to think that my Cocoa application is not really done according to the principles of MVC. My problem is the following:
I have some classes in my project, one of called `Copier.h` and another called `DropReciever.h`. `Copier` is sort of my main view controller, as it has all the bindings and main methods.... | [
0.3607484996318817,
0.1689245104789734,
0.47386273741722107,
0.10999367386102676,
-0.10335630178451538,
-0.10111626982688904,
-0.14532780647277832,
0.1909029632806778,
-0.33436140418052673,
-0.5707958340644836,
0.16130882501602173,
0.5773113965988159,
-0.4356260299682617,
-0.08133628964424... | |
way to connect them, since since they are both kinda instantiated seperately. How can I make them see each other? Or, is there an elegant, Coca-ish way to do this better?
(If you want to look at my source code, it's [here](http://bitbucket.org/winsmith/copymeister/src/).)
The way I usually do it is to instantiate Drop... | [
0.383409321308136,
-0.16370399296283722,
0.3461478650569916,
0.10407433658838272,
-0.1456671506166458,
-0.1192489042878151,
-0.2623423933982849,
0.16297529637813568,
-0.38295623660087585,
-0.6694274544715881,
0.12179619073867798,
0.3727363348007202,
-0.3019512891769409,
0.09987542033195496... | |
i can't figure out what makes an html button element appear to be pushed (right click an html button and then hover on and off to see what i mean).
the following two examples i've taken from other websites. the first has the typical button push effect. the second does not.
```
.button {
border:none 0;
background-c... | [
-0.11100919544696808,
-0.07149989157915115,
0.6954039335250854,
-0.23209622502326965,
-0.19352112710475922,
0.3716987371444702,
0.035790205001831055,
-0.3280288279056549,
-0.304632306098938,
-0.5458521246910095,
-0.19069848954677582,
0.23033787310123444,
-0.38735368847846985,
0.11815758794... | |
that will look the same in all browsers (ie. background image) but still behave like a real html button with the push effect. am i correct in assuming that i'll need javascript for this? and different css for the push state? an example/tutorial would be awesome
Either use
```
<input type="button" value="Click Me"/>
`... | [
0.20659267902374268,
-0.17377662658691406,
0.9641738533973694,
-0.022225797176361084,
-0.04531913250684738,
0.13954900205135345,
0.25786033272743225,
-0.2177865356206894,
-0.2551511824131012,
-0.6331703662872314,
-0.12312614172697067,
0.3362477719783783,
-0.3355407416820526,
-0.15206383168... | |
3px 3px;
margin:1px;
text-decoration:none;
}
a.likeAButton:active {
background-color:#67b4cf;
border:1px inset #1d659f;
color:#e0ffaf;
padding:4px 2px 2px 4px;
margin:1px;
text-decoration:none;
}
<a href="somepage.html" class="likeAButton">Fake Button</a>
``` | [
0.031129980459809303,
-0.100084088742733,
1.0720630884170532,
0.0688314139842987,
-0.07249803841114044,
0.0301958080381155,
0.5939522385597229,
-0.1302911639213562,
-0.2299654334783554,
-0.4016517102718353,
-0.2745574414730072,
0.31914183497428894,
-0.4275079667568207,
0.043778616935014725... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.