text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Is it a good idea to learn JavaScript before learning a JavaScript framework library such as jQuery, Prototype, etc.?
Sometimes I find myself struggling because I feel I don't know JavaScript as well as I should.
An emphatic **YES**. It won't take as long to learn as you fear and the rewards will be more than worth it... | [
0.4912879168987274,
0.13436497747898102,
0.04025193676352501,
0.11948422342538834,
-0.10489078611135483,
-0.14225734770298004,
0.258771151304245,
0.1535017043352127,
-0.04118235036730766,
-0.5915449261665344,
0.0922856479883194,
0.5177266001701355,
0.4422198235988617,
-0.15854109823703766,... | |
I want to implement a logical operation that works as efficient as possible. I need this truth table:
```
p q p → q
T T T
T F F
F T T
F F T
```
This, according to wikipedia is called "[logical implication](http://en.wikipedia.org/wiki/Logical_implication)"
I've been long trying... | [
0.10832444578409195,
-0.07249382883310318,
-0.09163279086351395,
-0.14641691744327545,
-0.2496853470802307,
-0.047544609755277634,
0.15889552235603333,
-0.13024656474590302,
0.2020242065191269,
-0.3081120550632477,
-0.12529043853282928,
0.48511409759521484,
-0.33446329832077026,
0.05088537... | |
it.
Thanks
FYI, with gcc-4.3.3:
```c
int foo(int a, int b) { return !a || b; }
int bar(int a, int b) { return ~a | b; }
```
Gives (from objdump -d):
```none
0000000000000000 <foo>:
0: 85 ff test %edi,%edi
2: 0f 94 c2 sete %dl
5: 85 f6 | [
-0.08910645544528961,
0.12205509841442108,
0.6185504198074341,
0.1331980973482132,
0.0798395425081253,
0.08705191314220428,
0.32400965690612793,
-0.16352534294128418,
0.131143718957901,
-0.5331688523292542,
-0.3159298002719879,
0.4633467495441437,
-0.1950720250606537,
-0.06977272778749466,... | |
test %esi,%esi
7: 0f 95 c0 setne %al
a: 09 d0 or %edx,%eax
c: 83 e0 01 and $0x1,%eax
f: | [
0.07342370599508286,
0.21610713005065918,
0.20089960098266602,
0.04260547086596489,
0.08980438113212585,
0.4292149245738983,
0.5624565482139587,
-0.24189263582229614,
0.5195789933204651,
-0.4926167130470276,
-0.27968788146972656,
0.543826162815094,
-0.000051515220548026264,
-0.194668799638... | |
c3 retq
0000000000000010 <bar>:
10: f7 d7 not %edi
12: 09 fe or %edi,%esi
14: 89 f0 | [
-0.24946361780166626,
0.4091039299964905,
0.5687677264213562,
-0.11638475209474564,
-0.18675260245800018,
0.375943660736084,
0.5107924938201904,
-0.2909705638885498,
-0.0191109050065279,
-0.4000510573387146,
-0.4674091339111328,
0.2521253824234009,
-0.034285496920347214,
-0.084464438259601... | |
mov %esi,%eax
16: c3 retq
```
So, no branches, but twice as many instructions.
And even better, with `_Bool` (thanks @litb):
```c
_Bool baz(_Bool a, _Bool b) { return !a || b; }
```
```none
0000000000000020 <baz>:
20: 40 84 ff test %dil,%dil
23: | [
-0.10123734921216965,
0.09622091054916382,
0.49006474018096924,
-0.1439330130815506,
0.22564342617988586,
0.4009200632572174,
0.6179218888282776,
-0.2882196009159088,
0.07776977866888046,
-0.5140395164489746,
-0.17950914800167084,
0.9583060145378113,
-0.25938642024993896,
-0.10954333841800... | |
b8 01 00 00 00 mov $0x1,%eax
28: 0f 45 c6 cmovne %esi,%eax
2b: c3 retq
```
So, using `_Bool` instead of `int` is a good idea.
Since I'm updating today, I've confirmed gcc 8.2.0 produces similar, though not identical, results for `_Bool:`
```none
00000000000... | [
0.10832294076681137,
0.4275360405445099,
0.3170757293701172,
-0.34034523367881775,
-0.06794258207082748,
0.05325267091393471,
0.35393521189689636,
-0.19658143818378448,
-0.1351030468940735,
-0.4131513833999634,
-0.23084288835525513,
0.5980061888694763,
-0.4361916780471802,
0.13125799596309... | |
20: 83 f7 01 xor $0x1,%edi
23: 89 f8 mov %edi,%eax
25: 09 f0 or %esi,%eax
27: c3 | [
-0.1617778092622757,
0.3345182240009308,
0.49936798214912415,
-0.018191376700997353,
-0.17865505814552307,
0.48159998655319214,
0.23643247783184052,
-0.1591939777135849,
0.20394015312194824,
-0.46299707889556885,
-0.37935614585876465,
0.7407065629959106,
-0.01131142396479845,
-0.2595901489... | |
retq
``` | [
0.08053214848041534,
0.6232094168663025,
0.12631855905056,
-0.3138928711414337,
-0.1877986043691635,
0.07191739231348038,
0.3949858844280243,
0.18911367654800415,
-0.10925203561782837,
-0.5576716065406799,
-0.37388893961906433,
0.6952776908874512,
-0.046658050268888474,
0.27455589175224304... | |
Is it possible to create a temporary file that contains a "loop" of a wav file?
Or is it possible to manipulate the stream sent to a stream reader/writer?
Basically I want to play some wav file for a period of time and if that time is greater than the length of time that the wav file provides I want to loop.
```
... | [
0.7066131234169006,
0.07761455327272415,
0.3216811418533325,
0.1351994425058365,
0.27707475423812866,
-0.3087382912635803,
0.1250312626361847,
-0.2232920080423355,
-0.05266902595758438,
-0.3630515933036804,
-0.14963440597057343,
0.7036032676696777,
-0.4517500400543213,
0.028802795335650444... | |
I'm new to C# and I am using VS08, I have created a form but where should I be placing my functional code?
Right now I have 2 files:
program.cs
```
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
static class Program
{
... | [
0.14070722460746765,
0.16437141597270966,
0.5578814744949341,
-0.22965089976787567,
0.09331762045621872,
-0.041923537850379944,
0.33455929160118103,
0.03355525806546211,
-0.27603045105934143,
-0.5937103033065796,
-0.2567596137523651,
0.1903049200773239,
-0.18188604712486267,
0.341890633106... | |
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
```
form1.cs - which contains my form.
Your code should be contained in the classes that make up your domain functionality. Program.cs creates a... | [
0.4929664731025696,
0.19235041737556458,
0.8045337200164795,
-0.21267865598201752,
0.17694608867168427,
-0.14805179834365845,
0.4586752951145172,
-0.30384278297424316,
-0.012514259666204453,
-0.8299509286880493,
-0.3706744313240051,
0.33529525995254517,
-0.46306267380714417,
0.084657751023... | |
using databinding, add one or more binding sources to your form, set their datasources and bind during form load. | [
0.2840048372745514,
-0.08178526908159256,
0.5032629370689392,
0.37471476197242737,
-0.25439155101776123,
-0.42014649510383606,
-0.1616119146347046,
-0.43972891569137573,
0.0015273978933691978,
-0.7851089835166931,
-0.16330388188362122,
0.23048874735832214,
-0.47444555163383484,
0.119507163... | |
I'm using a built-in benchmarking module for some quick and dirty tests. It gives me:
* CPU time
* system CPU time (actually I never get any result for this with the code I'm running)
* the sum of the user and system CPU times (always the same as the CPU time in my case)
* the elapsed real time
I didn't even know I ... | [
0.4377421438694,
0.21950091421604156,
0.4588746726512909,
0.06332271546125412,
0.19531716406345367,
0.24489976465702057,
0.35286444425582886,
0.023317821323871613,
-0.46140727400779724,
-0.7317818403244019,
0.5686483979225159,
0.4901142120361328,
0.348648339509964,
0.1900203377008438,
0.... | |
much of an impact it's going to have.
Any ideas which metric I should be looking at?
**And, most importantly, could someone explain why the "elapsed real time" is always longer than the CPU time - what causes the lag between the two?**
There are many things going on in your system other than running your Ruby code. ... | [
0.35602867603302,
-0.022996865212917328,
0.14877597987651825,
0.10653695464134216,
0.1283685863018036,
0.18862414360046387,
0.18747767806053162,
0.008624511770904064,
-0.5636844038963318,
-0.7259325981140137,
0.3869878053665161,
0.4769577085971832,
0.13324762880802155,
0.16105829179286957,... | |
second running your code; then
* used the CPU for one second running OS kernel code; then
* was swapped out for seven seconds while another process ran; then
* used the CPU for one more second running your code,
you would have seen:
* ten seconds elapsed time,
* two seconds user time,
* one second system time,
* thre... | [
0.1273318976163864,
-0.3268304169178009,
0.4642120599746704,
0.10188678652048111,
0.12357757985591888,
0.3434152603149414,
0.3229077160358429,
0.20300740003585815,
-0.3052709698677063,
-0.9000378847122192,
0.21121439337730408,
0.6956666111946106,
0.0037766993045806885,
-0.05181716755032539... | |
I'm having problems trying to overload the post increment operator in C#. Using integers we get the following results.
```
int n;
n = 10;
Console.WriteLine(n); // 10
Console.WriteLine(n++); // 10
Console.WriteLine(n); // 11
n = 10;
Console.WriteLine(n); // 10
Console.WriteLine(++n); // 11
Console.WriteLine(n); // 11... | [
0.22725266218185425,
0.06445716321468353,
0.40356501936912537,
-0.36200690269470215,
0.12663762271404266,
0.327906996011734,
0.02304990589618683,
-0.4660983979701996,
-0.24294261634349823,
-0.6392765641212463,
-0.09654934704303741,
0.4010239839553833,
-0.2834499478340149,
0.180697962641716... | |
= name;
}
public override string ToString()
{
return Name + " " + Balance.ToString();
}
public static Account operator ++(Account a)
{
Account b = new Account("operator ++", a.Balance);
a.Balance += 1;
return b;
}
public static void Main()
{ | [
0.16683252155780792,
-0.07147838920354843,
0.20595137774944305,
-0.3942318558692932,
0.33397650718688965,
0.4294545352458954,
0.16517765820026398,
-0.06498934328556061,
-0.347054660320282,
-0.01919894479215145,
-0.37638500332832336,
0.47351977229118347,
-0.4553445875644684,
0.3423891365528... | |
Account a = new Account("original", 10);
Console.WriteLine(a); // "original 10"
Account b = a++;
Console.WriteLine(b); // "original 11", expected "operator ++ 10"
Console.WriteLine(a); // "operator ++ 10", expected "original 11"
}
}
```
Debugging the application, the overloaded ... | [
-0.22870014607906342,
0.2408013939857483,
0.5572971701622009,
-0.31457722187042236,
0.2794152796268463,
0.3154503107070923,
0.3113665282726288,
-0.10085483640432358,
0.0029079080559313297,
-0.3975818455219269,
-0.27974966168403625,
0.6754714846611023,
-0.1739024668931961,
0.316446542739868... | |
Why is this happening?
The key is in understanding how the line `Account b = a++;` works. Given how your code is written, this line is the equivalent of this:
```
Account b = a;
a++;
```
And that is the order it will execute in. The assignment effectively(1) happens before the increment. So, the first effect of this... | [
0.2872425615787506,
0.11202722042798996,
0.21689856052398682,
-0.272177517414093,
0.09291329234838486,
0.13328343629837036,
0.1094810888171196,
-0.2529807388782501,
-0.07339002192020416,
-0.507019579410553,
-0.12307249009609222,
0.6029752492904663,
-0.30122169852256775,
-0.0371041223406791... | |
of 11, and *b* will continue to do so.
However, you've created a new object inside the operator method and returned it as the output of the operator. *a* will now be updated to point at the newly created object.
So, *a* now points to a new object, while *b* continues to point to the original. That's why the WriteLine... | [
0.23088937997817993,
0.196399986743927,
0.20263303816318512,
-0.24218764901161194,
0.035306237637996674,
0.1821136623620987,
0.33118563890457153,
-0.014582502655684948,
-0.08381331712007523,
-0.5441157817840576,
-0.2314213067293167,
0.47142869234085083,
-0.40789830684661865,
-0.02628251351... | |
avoided in most cases.
---
1 - *Just for accuracy's sake, the assignment does not actually happen before the increment when dealing with operators on objects, but the end result is the same in this case. Actually, the original object reference is copied, the operation is carried out on the original, and then the copi... | [
0.19118466973304749,
0.2771739959716797,
0.36878684163093567,
-0.03013826347887516,
0.1360984444618225,
0.05692378804087639,
-0.029864445328712463,
-0.3219742476940155,
-0.34329953789711,
-0.3386423885822296,
-0.14501245319843292,
0.5852136611938477,
-0.367073118686676,
0.11272545158863068... | |
+= 1; // original object's Balance is incremented
a = x; // a now points to the new object, copy still points to the original
Account b = copy; // b and copy now point at the same, original, object
``` | [
0.21258804202079773,
0.37268751859664917,
0.42499107122421265,
-0.15579472482204437,
0.2756279706954956,
0.20374126732349396,
-0.0013741094153374434,
-0.09685403853654861,
-0.2337372750043869,
-0.14067663252353668,
-0.23566792905330658,
0.19040243327617645,
-0.2999778985977173,
0.445718854... | |
I want to publish some software for different Linux distributions, using the regular Linux packaging formats (rpm, deb, yast, etc). My package will require a click-thru license agreement. Which Linux tools and package formats support a license in the package which is shown to the user before installing the software?
.d... | [
0.7490742802619934,
0.18677827715873718,
0.26907649636268616,
0.1250675916671753,
0.0286856796592474,
-0.5284278988838196,
-0.17473353445529938,
0.20947697758674622,
-0.0935077890753746,
-0.4754437804222107,
-0.20031534135341644,
0.6706651449203491,
-0.1881292164325714,
0.21847225725650787... | |
text-based, so its not *click*-through, but rather type-through, but...) | [
-0.07043986767530441,
0.09158172458410263,
0.050092097371816635,
0.03833400458097458,
-0.08637774735689163,
-0.09696045517921448,
0.25462663173675537,
0.457571804523468,
0.023978164419531822,
-0.5268800258636475,
-0.45885953307151794,
0.5528978705406189,
-0.2932894825935364,
-0.20708405971... | |
How to display a flash (.swf) file into asp.net ?
got this from YouTube
```
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/Xt5t9BO6xkA&hl=en&fs=1"></param>
<param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
<embe... | [
0.31858792901039124,
-0.16876250505447388,
0.6509723663330078,
0.10684020817279816,
-0.2346470057964325,
-0.09572422504425049,
0.12345550954341888,
-0.6396060585975647,
-0.25600001215934753,
-0.6960596442222595,
-0.07469203323125839,
0.4493759572505951,
-0.1857876479625702,
-0.098987326025... | |
HI,
When i renew an SSL certificate will the public key change or be the same as the expired certificate?
If you re-use the same certificate request, the key will not change. If you generate a new request, that'll typically (by default) generate a new key; re-using is sometimes useful e.g., to add another alternate dom... | [
0.3363279104232788,
-0.25938352942466736,
0.6861735582351685,
0.10353706777095795,
-0.06649155914783478,
-0.425437331199646,
0.36010822653770447,
-0.07700129598379135,
-0.17447982728481293,
-0.19656677544116974,
-0.19386503100395203,
0.2945389747619629,
-0.38713356852531433,
0.586241006851... | |
I'm creating an RSS (and/or Atom) feed for my website. Now, I can immediately think of two ways to do this:
1. Use the same templating system I use to generate the HTML ([Clearsilver](http://www.clearsilver.net) if anyone's wondering), basically just treating the RSS feed like any other web page that happens to be in ... | [
0.867074191570282,
-0.11234917491674423,
0.19658447802066803,
-0.0029367951210588217,
-0.16112257540225983,
-0.16615338623523712,
-0.34697893261909485,
0.12702642381191254,
-0.16666129231452942,
-0.8149707317352295,
-0.013985984027385712,
0.36896297335624695,
-0.7614814639091492,
-0.190332... | |
mostly because it's easier to understand.
*EDIT*: so I got one good answer from Bill. But in this particular case all the values for the fields of the RSS feed are already formatted as well-formed, properly escaped XHTML... any other opinions?
Having done it both ways, I prefer #2. It'll do a better job escaping entit... | [
0.48083391785621643,
0.0827753096818924,
0.2452124059200287,
0.2276671826839447,
-0.20253513753414154,
-0.17430683970451355,
0.08122844249010086,
-0.0771854817867279,
-0.25628894567489624,
-0.14427517354488373,
-0.12531228363513947,
0.36953410506248474,
-0.46766236424446106,
-0.22676919400... | |
This is kinda weird. I have the next query:
```
SELECT * , GROUP_CONCAT( x.tag
SEPARATOR ',' ) AS tags
FROM tag AS t, tag AS x, tag_message_rel AS r, message m
INNER JOIN `user` AS u ON m.user_id = u.id
WHERE t.tag
IN (
'kikikiki', 'dsa'
)
AND m.id = r.message_id
AND t.id = r.tag_id
AND x.id = r.tag_id
GROUP BY m.id
H... | [
0.10192183405160904,
-0.007422907743602991,
0.5408085584640503,
-0.045619335025548935,
-0.3720533847808838,
0.1563277542591095,
0.24096007645130157,
-0.361987829208374,
-0.24898704886436462,
-0.5753265619277954,
-0.15586385130882263,
0.42796579003334045,
-0.4390905797481537,
0.153475925326... | |
that i want, but tags will have ALL the tags in the tags table separated by coma. If i leave the line there, i will only get those 2 tags.
If i use explain i get:
```
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE u system PRIMARY NULL NULL NULL ... | [
0.286767840385437,
0.07929903268814087,
0.540141761302948,
-0.15712255239486694,
-0.08388538658618927,
0.18100763857364655,
0.23281770944595337,
-0.46927186846733093,
-0.2587440311908722,
-0.4520684778690338,
-0.1115921214222908,
0.1906445175409317,
-0.6731440424919128,
0.3054822087287903,... | |
Using temporary; Using filesort
1 SIMPLE t range PRIMARY,tag tag 252 NULL 2 Using where
1 SIMPLE x eq_ref PRIMARY PRIMARY 4 verse.t.id 1
1 SIMPLE r ALL NULL NULL NULL NULL 180 | [
0.34395039081573486,
0.005339157767593861,
0.411847323179245,
-0.13044185936450958,
-0.47328463196754456,
0.29315221309661865,
0.7149917483329773,
-0.6404598355293274,
0.2011386752128601,
-0.23721660673618317,
-0.15201516449451447,
0.5027299523353577,
-0.7565480470657349,
0.237835854291915... | |
Using where; Using join buffer
1 SIMPLE m eq_ref PRIMARY PRIMARY 4 verse.r.message_id 1 Using where
```
Now im no expert in this, but i think the problem is that it is refusing to re-join a table in the process of optimizing the query.
What do you think? Any quick fix?
The problem is that you are ... | [
0.18838977813720703,
0.08093416690826416,
0.35607853531837463,
-0.29894447326660156,
-0.27819034457206726,
-0.03399929776787758,
0.44462260603904724,
-0.44177111983299255,
-0.36501404643058777,
-0.48476746678352356,
-0.21687041223049164,
0.5711861252784729,
-0.7796023488044739,
-0.10720156... | |
in the `tag` table.
Think of "table aliases" as referring to a *row in a table*, not the table itself. That idea helped me to understand complex joins a lot better.
Here's how I'd write that query:
```
SELECT m.*, u.*, GROUP_CONCAT(DISTINCT x.tag) AS tags
FROM message m
JOIN `user` u ON (u.id = m.user_id)
JOIN tag... | [
-0.1486542671918869,
0.016873158514499664,
0.623786211013794,
-0.10179286450147629,
-0.22230425477027893,
0.09791011363267899,
0.10580785572528839,
-0.8060278296470642,
-0.4376218020915985,
-0.5248318910598755,
-0.2956359088420868,
0.48824888467788696,
-0.5195404291152954,
0.10292448103427... | |
`JOIN` syntax consistently. Mixing `JOIN` and comma-style joins can cause some subtle problems.
Here's an alternative query, that pulls some of the joins into a non-correlated subquery, so you avoid a Cartesian product between `t` and `x`, and eliminate the `DISTINCT` modifiers in the group functions.
```
SELECT m.*,... | [
-0.07767224311828613,
0.009705320931971073,
0.7429167032241821,
-0.24316248297691345,
-0.08811971545219421,
0.03462119773030281,
0.1520542949438095,
-0.6781745553016663,
-0.24702079594135284,
-0.2892131507396698,
-0.3222770392894745,
0.31681978702545166,
-0.7342827320098877,
0.146435067057... | |
r2.message_id)
JOIN tag t ON (t.id = r2.tag_id)
WHERE t.tag IN ('kikikiki', 'dsa')
GROUP BY m2.id
HAVING COUNT(t.tag) = 2)
GROUP BY m.id
ORDER BY m.created_at DESC
LIMIT 0 , 20;
``` | [
-0.18847282230854034,
-0.2844496965408325,
0.612103283405304,
-0.2685478627681732,
-0.007321661803871393,
0.1573776751756668,
0.30645090341567993,
-0.7079156637191772,
-0.2566360831260681,
-0.39040884375572205,
-0.49388667941093445,
0.44697338342666626,
-0.46529117226600647,
0.204138457775... | |
On Unix, we can specify the ftp username/password in ~/.netrc file and next time onwards, there is no need to specify username/password while ftping to any machine provided the credentials for that machine exists in ~/.netrc file.
It's very helpful especially if you need to login to multiple machines may times lets sa... | [
0.2615738809108734,
-0.0850573256611824,
0.30878403782844543,
0.24039652943611145,
0.1061888113617897,
-0.3977014720439911,
-0.03245886415243149,
0.4778689742088318,
-0.4350452125072479,
-0.7384211421012878,
0.014731111004948616,
0.8617647290229797,
-0.13345767557621002,
0.0204940680414438... | |
I'm working with a page where I'm trying to submit data when a link is clicked. I already know how to do this with POST and GET using javascript buttons, but how do I get the same effect when I'm working with HTML links?
If you have a plain link you can pass them as query parameters on the link (which is a GET operatio... | [
0.39409369230270386,
0.05591811612248421,
0.49231234192848206,
-0.13670334219932556,
-0.37246230244636536,
-0.11852389574050903,
0.2564491331577301,
-0.26379695534706116,
-0.17265057563781738,
-0.7874603271484375,
-0.019330186769366264,
0.7661811709403992,
-0.3011203706264496,
0.0048386445... | |
I'm currently writing a custom server control in ASP.net. My idea is to create some sort of collapsible panel control (btw, it's the first server control I'm writing). So what I wanted to have is that the user defines my control in this way in the page:
```
<myCtrl:CollapsiblePanel id="myCollapsiblePanel" runat="serve... | [
-0.25163206458091736,
-0.008221966214478016,
0.615224301815033,
0.04329359531402588,
-0.08701369911432266,
0.17116773128509521,
-0.34913137555122375,
-0.018919406458735466,
-0.12897802889347076,
-0.637698233127594,
-0.0481661781668663,
0.4162321090698242,
-0.0985889807343483,
0.05669129639... | |
<input name="txbTest" type="text" id="txbTest" />
</div>
</div>
```
The submit button "btnExpand" has then an event-handler on the control which hides/shows the panel "pnlContent".
My first approach was to create a server control that inherits from Panel. Inside the CollapsiblePanel control I then created anothe... | [
-0.2170979082584381,
-0.26117807626724243,
0.40735292434692383,
-0.20215432345867157,
0.0239349827170372,
0.07630780339241028,
0.05615629255771637,
-0.2689759433269501,
-0.04753394424915314,
-0.6724937558174133,
-0.3845192790031433,
0.5473986268043518,
-0.443046897649765,
0.011611824855208... | |
base.Controls.Add(button);
base.Controls.Add(content);
}
```
I basically took all the controls which are currently present inside my control and add them to the control list of the internally created Panel pnlContent. Furthermore I added the button which then does the expanding/collapsing of then pnlContent.
My pr... | [
-0.2716945707798004,
0.17127269506454468,
0.5580334663391113,
-0.040132276713848114,
0.19833789765834808,
0.10396715253591537,
0.07379400730133057,
-0.2765336036682129,
-0.13686493039131165,
-0.718384325504303,
-0.08649460971355438,
0.5378926396369934,
-0.3478090763092041,
0.18076674640178... | |
and/or what I did wrong with the rendering. I didn't override the default rendering of the Panel I inherit since I thought this shouldn't be necessary because I modify its control structure in the OnInit, so it should render out my modifications..
For the moment I found a solution. I basically did it the same way it i... | [
-0.1331850290298462,
0.13261616230010986,
0.4889424741268158,
0.10544542223215103,
0.10068497061729431,
-0.029261434450745583,
0.20987474918365479,
0.08230599761009216,
-0.12031141668558121,
-0.7874452471733093,
-0.12011897563934326,
0.8659674525260925,
-0.13787581026554108,
-0.03332482278... | |
job of collapsing/expanding. Maybe it's also the better and cleaner solution but I still would like to know what went wrong in my first approach I described before.
thanks for any help!
This happens because at any given moment a control can only belong to one parent. When you add a control from one collection into ano... | [
-0.1290324330329895,
-0.2225850224494934,
0.13403622806072235,
0.12510184943675995,
0.4277721643447876,
-0.03652403876185417,
-0.07101260870695114,
-0.2263319492340088,
-0.47907793521881104,
-0.6693119406700134,
-0.24907629191875458,
0.16985824704170227,
-0.37781354784965515,
0.56207185983... | |
content.Controls. All remaining controls get shifted left.
//This means that next control will get skipped.
content.Controls.Add(control);
}
```
Consider doing following (by the way, you probably don't need to use *base* in this case):
```
Control[] controls = new Control[Controls.Count];
Controls.CopyTo(contr... | [
-0.10142672061920166,
-0.07335568219423294,
0.5780043005943298,
-0.05073370411992073,
0.15022459626197815,
0.0012003122828900814,
0.09101386368274689,
-0.47197848558425903,
-0.360249787569046,
-0.6056064963340759,
-0.30255964398384094,
0.33304327726364136,
-0.5661312937736511,
0.1035862565... | |
What's a good data structure for use in MVC web applications to use to pass data into view to ensure standardization and keep the view as non-coder friendly as possible?
If you know the structure of your Excel document (and presuming you don't want and kind of complex macros/ functions/ etc within the Excel document) y... | [
0.1181962639093399,
0.01461036503314972,
0.44875550270080566,
0.14572757482528687,
-0.1761733740568161,
-0.19276195764541626,
-0.1766977161169052,
-0.11258921772241592,
-0.30497193336486816,
-0.6731011867523193,
-0.02269408106803894,
0.40743008255958557,
-0.365645170211792,
0.0463179759681... | |
generation. If you try and do a lot of document processing you can run into locks | [
0.04613571986556053,
-0.010714991018176079,
0.329759418964386,
0.3868701756000519,
0.5629990100860596,
-0.22396953403949738,
-0.019570577889680862,
-0.21814045310020447,
-0.5616154670715332,
-0.8225767016410828,
-0.36515212059020996,
0.18545086681842804,
-0.3142467737197876,
0.394647628068... | |
I'm looking for an efficient way to compare and get differences between two XML-based parse trees.
What would you suggest to be the best way to store those differences? I would have done this:
XML A:
```
<w:p>
<w:pPr>
<w:spacing w:after="1"/>
</w:pPr>
<w:r>
<w:t>World</w:t>
</w:r>
</w:p>
```
XML B... | [
0.037464387714862823,
0.08386887609958649,
0.4349232614040375,
-0.08187301456928253,
-0.04379904642701149,
0.02312951534986496,
0.024174349382519722,
-0.25049638748168945,
-0.1068357452750206,
-0.7363343238830566,
-0.06778058409690857,
0.40362024307250977,
-0.10392113029956818,
-0.02834489... | |
to do that? Any help would really be appreciated!
It might get harder. Look at this example:
```
<w:p>
<w:pPr>
<w:spacing w:after="1"/>
</w:pPr>
<w:r>
<w:t>World</w:t> <-- Case 1: this changes to <w:t>ASDF</w:t>
<w:t>World</w:t> <-- Case 2: this changes to <w:t>ASDF</w:t>
</w:r>
</w:p>
```
To be ... | [
-0.1319994479417801,
-0.19320525228977203,
0.19743527472019196,
-0.01305977813899517,
-0.18212571740150452,
-0.22893497347831726,
0.06375159323215485,
-0.21228671073913574,
-0.23493778705596924,
-0.6774148344993591,
-0.3518899083137512,
0.402224600315094,
-0.26247069239616394,
-0.025081630... | |
very complicated, so I wouldn't recommend you to create something completely new but to either use some existing diff algorithm (most will be good enough even without parsing the XML structure) or to modify one of them to suit your needs. | [
0.44019341468811035,
0.10550376027822495,
-0.0002868678711820394,
0.29959404468536377,
0.030810335651040077,
-0.22598251700401306,
-0.10078661888837814,
-0.14377424120903015,
-0.006806451361626387,
-0.4770984947681427,
-0.029914744198322296,
0.4214932918548584,
0.0366227962076664,
-0.03566... | |
I'm studying how to do url rewriting in a LAMP framework. I began my research by studying wordpress code. I looked at wordpress's .htaccess and saw this:
```
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /... | [
0.2189687043428421,
0.2532333433628082,
0.7066426277160645,
-0.1271423101425171,
-0.01752997748553753,
-0.16877023875713348,
0.20015040040016174,
-0.21488326787948608,
-0.05921902507543564,
-0.6661564707756042,
-0.06893595308065414,
0.5993629693984985,
-0.19342288374900818,
0.1513685286045... | |
.htaccess file? And what are the advantages/disadvantages of managing url rewrites in the PHP code?
Doing so in PHP will lead to the loading of, parsing of and execution of more PHP scripts/code. If you do go this way, don't get to the right page with external redirects. Remember that PHP scripts are essentially compil... | [
0.5099533796310425,
0.14916695654392242,
0.14955094456672668,
0.3517519533634186,
-0.2756946384906769,
-0.4179394841194153,
0.4509235620498657,
0.012416377663612366,
-0.1980993151664734,
-0.4969773590564728,
0.04232517257332802,
0.7811389565467834,
-0.36726847290992737,
-0.0821196809411048... | |
(like doing database lookups to find the right page, etc). Not good.
Regular expressions aren't hard. Usually it's just a case of:
```
RewriteRule ^account/orders/(\w+)$ /account/orders.php?type=$1 [L]
```
90%+ of my rewrite rules look like that. Pretty basic stuff. | [
0.05427129939198494,
0.1991492062807083,
0.308407723903656,
-0.07247569411993027,
0.14758984744548798,
-0.0006396592361852527,
0.31302428245544434,
0.24510394036769867,
-0.1668127477169037,
-0.5630117058753967,
0.05304216593503952,
0.4724327027797699,
-0.35017678141593933,
-0.2720296978950... | |
What I want to do is build some mini cms which hold pages with a uri.
The last route in my urls.py points to a function in my views.py, which checks in the datastore if there's a page available with the same uri of the current request, and if so show the page.
I have a model:
```
class Page(db.Model):
title = db... | [
0.1942647099494934,
0.2522806227207184,
0.6904776096343994,
-0.1333475112915039,
-0.05344623699784279,
0.10852611064910889,
0.2405291497707367,
-0.18324483931064606,
-0.039755064994096756,
-0.8715715408325195,
-0.004318474791944027,
0.3921824097633362,
-0.10775113105773926,
0.4671314060688... | |
if page is None:
return http.HttpResponseNotFound()
else:
return respond(request, 'pages_show', {'content': request.path})
```
And I've added an entity with '/work' as uri to the datastore.
Even when request.path is exactly '/work', the query does not return a match.
Thanks for any advice you can gi... | [
-0.109162837266922,
0.2514788806438446,
0.8684099912643433,
-0.2631891667842865,
-0.19823680818080902,
-0.035571083426475525,
0.36450064182281494,
0.013085676357150078,
-0.26228928565979004,
-0.8220701217651367,
-0.27854764461517334,
0.48043152689933777,
-0.5592847466468811,
0.215110152959... | |
does get indexed, and thus which datastore allows us to use in a WHERE clause.
Example of working model:
```
class Page(db.Model):
title = db.StringProperty(required=True)
// string property now
uri = db.StringProperty(required=True)
created = db.DateTimeProperty(auto_now_add=True)
... | [
0.00003093560735578649,
-0.10806315392255783,
0.5550442934036255,
0.021126626059412956,
0.17732080817222595,
-0.2874370515346527,
0.17563460767269135,
-0.16684919595718384,
-0.15815120935440063,
-0.6702674627304077,
-0.38490837812423706,
0.3670215606689453,
-0.04396335780620575,
0.36858609... | |
I cannot bind the Visible property of the WPF datagridtextcolumn to a boolean value.
My binding expression is,
```
{Binding Path=DataContext.IsThisColumnVisible, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window},Converter={StaticResource vc}}
```
I have checked that the converter works (bool to... | [
0.0923430547118187,
0.06844787299633026,
0.6319969892501831,
-0.13779133558273315,
-0.0024495916441082954,
-0.1654319167137146,
0.7061716318130493,
-0.4133063852787018,
0.10475751757621765,
-0.7672023177146912,
-0.001907929196022451,
0.441240131855011,
-0.35476067662239075,
0.3895300626754... | |
set source property of binding expression to a staticresource and it works fine. | [
0.5041435360908508,
-0.11004547774791718,
0.5707896947860718,
0.14525800943374634,
0.009530231356620789,
-0.2574288547039032,
0.07434429973363876,
-0.1263466626405716,
0.12943944334983826,
-0.6868947148323059,
-0.33791661262512207,
0.5111018419265747,
-0.4026778042316437,
-0.06193972751498... | |
I've got a Canvas with a few UIElements on. After I've moved them on the canvas by animating the top and left properties, very occasionally a subsiquent call to Canvas.GetTop results in NaN.
Am I not 'closing' the animations properly?
Here's how I'm doing the move
```
private void InternalMove(double durationMS, Fr... | [
0.4720984399318695,
-0.31724798679351807,
0.778889000415802,
-0.34147170186042786,
0.17419496178627014,
0.4486719071865082,
0.1476871818304062,
-0.3544566333293915,
-0.5948752760887146,
-0.7089917659759521,
-0.44201523065567017,
0.38119783997535706,
0.13623130321502686,
0.17278388142585754... | |
PropertyPath("(Canvas.Top)"));
// Create a storyboard to contain the animation.
_moveStoryboard = new Storyboard();
if (callback != null) _moveStoryboard.Completed += callback;
_moveStoryboard.Completed += new EventHandler(s1_Completed);
_moveStoryboard.Children.Add(moveLeftAnimation);
_moveStoryboa... | [
0.20423007011413574,
-0.2499568611383438,
0.653806746006012,
0.1331709921360016,
0.3428388237953186,
0.2879013121128082,
0.2514412999153137,
-0.49521857500076294,
-0.42583250999450684,
-0.710510790348053,
-0.6016279458999634,
0.576480507850647,
0.07591477781534195,
0.16013190150260925,
0... | |
`Canvas.GetTop(x)` returns 'Nan' if the value is not explictly set (even tho I do explicitly set it I still sometimes get that result).
An alternative method I'm now using is
```
Vector offset = VisualTreeHelper.GetOffset(fElement);
```
which returns the position of fElement within it's container. | [
0.24637779593467712,
-0.4637910723686218,
0.42981791496276855,
-0.08088237047195435,
-0.20709159970283508,
0.1858745515346527,
-0.1518303006887436,
-0.11099399626255035,
-0.44484248757362366,
-0.9428421854972839,
-0.0785900354385376,
0.5906788110733032,
-0.3154427409172058,
-0.047298833727... | |
I want to get a number of rows in my table using `max(id)`. When it returns `NULL` - if there are no rows in the table - I want to return 0. And when there are rows I want to return `max(id) + 1`.
My rows are being numbered from 0 and autoincreased.
Here is my statement:
```
SELECT CASE WHEN MAX(id) != NULL THEN (MA... | [
0.20134010910987854,
0.2281002551317215,
0.15303422510623932,
-0.21484480798244476,
-0.10008353739976883,
0.15343625843524933,
0.21136100590229034,
-0.3484393358230591,
-0.14944833517074585,
-0.3751600980758667,
0.30917787551879883,
0.5550702214241028,
-0.24886031448841095,
0.3336507976055... | |
will give you what you want
```
SELECT COALESCE(MAX(id)+1, 0) FROM words
``` | [
0.5514466166496277,
-0.08357854187488556,
0.1340208202600479,
0.4185721278190613,
0.3630334138870239,
0.17286475002765656,
-0.1617003083229065,
-0.26360997557640076,
0.3452525734901428,
-0.5635594725608826,
-0.11472775042057037,
0.7749336957931519,
-0.04506092518568039,
-0.0949216634035110... | |
I'm new in windows application development using java. The question is this "How to i bind events to custom class methods?
As fas i have seen i can register listener classes to swing components to handle events. That is OK but i have to implement a class that implements e.g. the ActionListener interface to handle an e... | [
0.35917702317237854,
-0.041184160858392715,
0.1385039985179901,
-0.24034442007541656,
-0.2776319980621338,
-0.2979547679424286,
0.3917402923107147,
-0.5425037741661072,
-0.20044173300266266,
-0.6568701863288879,
0.08673198521137238,
0.6792201995849609,
-0.43134990334510803,
0.1008405238389... | |
constructors, etc]
public void handleSubmitFormBtn(Event e) {
}
//other methods go here handling events from other swing components
}
```
Note: I am not sure about the method signature but i hope that you get the point.
Conclusion: ONE method to handle events fired from swing components..is it possibl... | [
0.20838208496570587,
-0.2944587767124176,
0.13159631192684174,
0.05918858200311661,
-0.3126230239868164,
-0.023072624579072,
0.22788171470165253,
-0.6624408960342407,
-0.41930294036865234,
-0.3111221194267273,
-0.03714858368039131,
0.6535323262214661,
-0.3723704218864441,
-0.22430893778800... | |
public void actionPerformed(final ActionEvent e)
{
outerClassesMethod();
}
});
```
**inner class**
```
class Foo
implements ActionListener
{
public void actionPerformed(final ActionEvent e)
{
outerClassMethod();
}
}
```
**outer class**
```
public class Foo
... | [
0.11396412551403046,
-0.5769497752189636,
0.370608925819397,
-0.4763883650302887,
0.07467377930879593,
0.3512742519378662,
0.17924101650714874,
-0.2067185789346695,
-0.22717246413230896,
-0.290798544883728,
-0.4826773405075073,
0.9052759408950806,
-0.4403415322303772,
-0.11452630907297134,... | |
target = t;
}
public void actionPerformed(final ActionEvent e)
{
target.targetClassMethod();
}
}
```
**class implements listener**
```
public class OuterClass
implements ActionListener
{
public void actionPerformed(final ActionEvent e)
{
method();
}
// somewhere ... | [
0.3472296893596649,
-0.2015303373336792,
0.48019999265670776,
-0.4600556492805481,
-0.11081413179636002,
0.33154430985450745,
0.4922281801700592,
-0.47439536452293396,
-0.018075739964842796,
-0.5546429753303528,
-0.09657502919435501,
0.7324042320251465,
-0.2562519609928131,
-0.203969433903... | |
and bad to it.
The anonymous inner class will not allow you to do what you are asking, it can only implement one listener.
The other three will all allow you to do what you want (just add , WindowListener to the implements list for exaple). You likely want the inner class or outer class implementing the listener way ... | [
0.33868977427482605,
0.05366931110620499,
-0.029816562309861183,
0.18410541117191315,
-0.2538217008113861,
0.15467604994773865,
0.2884679138660431,
-0.28961700201034546,
-0.07658382505178452,
-0.3644489347934723,
0.05404834821820259,
0.782108724117279,
-0.5387485027313232,
-0.0804990902543... | |
action (you use evt.getSource() to figure out which control was being acted on and then comare it to your instance variables to see which it was).
However, unless you are in memory constrained device, such as an Android phone, you probably should not do one method for all listeners as it can easily lead to very bad co... | [
-0.12761713564395905,
-0.40896284580230713,
0.08072292804718018,
0.3046114444732666,
-0.3177656829357147,
0.1226826012134552,
0.6499692797660828,
-0.6427894830703735,
-0.5032917261123657,
-0.2579347789287567,
-0.10634426027536392,
0.6561097502708435,
-0.42230722308158875,
-0.43915462493896... | |
event type
I prefer to code the following way, I find it to be the most flexible:
```
public class Outer
extends JFrame
{
private final JButton buttonA;
private final JButton buttonB;
{
buttonA = new JButton("A");
buttonB = new JButton("B");
}
// do not put these in the const... | [
0.08014685660600662,
-0.3347119987010956,
0.37421804666519165,
-0.5376399755477905,
0.07131928950548172,
0.13562680780887604,
0.2356913834810257,
-0.4048107862472534,
-0.0937519371509552,
-0.4863221049308777,
-0.3401171863079071,
0.5968691110610962,
-0.22489303350448608,
0.1440296918153762... | |
buttonA.addActionListener(new AListener());
buttonB.addActionListener(new BListener());
}
private void aMethod()
{
}
private void bMethod()
{
}
public void AListener
implements ActionListener
{
public void actionPerformed(final ActionEvent evt)
{
... | [
-0.12969984114170074,
-0.4213567078113556,
0.5219808220863342,
-0.5259491205215454,
0.19841429591178894,
0.6016760468482971,
0.39096495509147644,
-0.5549009442329407,
-0.07688924670219421,
-0.4276729226112366,
-0.5808834433555603,
0.7645174860954285,
-0.5674822926521301,
-0.067752487957477... | |
}
}
public void BListener
implements ActionListener
{
public void actionPerformed(final ActionEvent evt)
{
bMethod();
}
}
}
```
I prefer this way because it forces the methods out of the listeners, which means I only have one place to look for the code (not... | [
0.2787068486213684,
-0.08593934774398804,
0.2738475799560547,
-0.6269347071647644,
-0.003780545201152563,
0.11324860155582428,
0.7956386208534241,
-0.35792067646980286,
0.006020152010023594,
-0.3269307315349579,
-0.35200202465057373,
0.9759107232093811,
-0.41291293501853943,
0.004626996815... | |
It also means that it is possible that aMethod() and bMethod() can be reused - if the code is in a listener that isn't practical (it is possible, but not worth the effort).
Doing it the above way is also consistent, and I prefer consistency over most things unless there is a good reason not do it. For instance on the ... | [
0.48941630125045776,
0.17275197803974152,
-0.20379877090454102,
0.029991043731570244,
-0.10683730244636536,
-0.007346667814999819,
0.4754948914051056,
-0.30977723002433777,
0.0423087403178215,
-0.4513637125492096,
-0.00826195441186428,
0.8655106425285339,
-0.15575140714645386,
-0.198771998... | |
What is the most suitable container just for strings holding in some array with non-predetermined upper boundary, which length is unknown on it's creation.
For simple code like:
```
var list = new SomeContainer(); // size is unknown
for()/foreach()/do()/while() // any loop
{
list.Add(string);
}
```
Is it `StringC... | [
-0.10009099543094635,
-0.3098283112049103,
0.20347760617733002,
0.06877599656581879,
-0.11434274911880493,
-0.20774655044078827,
-0.27463090419769287,
-0.20796848833560944,
-0.49072906374931335,
-0.41012996435165405,
0.007701671216636896,
0.36443477869033813,
-0.28489476442337036,
0.020003... | |
3.5, LINQ will provide lots of additional methods for them - but without LINQ, `List<T>` has more features (`Find`, `Sort`, etc) | [
0.09037060290575027,
-0.2754666209220886,
0.49840688705444336,
0.09013139456510544,
0.09493184834718704,
-0.2049572765827179,
-0.04099523276090622,
-0.2543710768222809,
-0.07706064730882645,
-0.6367241144180298,
-0.30627238750457764,
0.3830563426017761,
-0.4279606342315674,
-0.341339170932... | |
I've written an application with the following in the Program.cs:
```
rsCursor.Wait();
// Load the settings
rsAppConfig.LoadConfig("iVirtualDocket.exe.config");
fSplash splash = new fSplash(IvdConfig.VERSION);
splash.Initialise();
DialogResult result = splash.ShowDial... | [
0.09664110094308853,
-0.30302685499191284,
1.4424794912338257,
-0.2924844026565552,
0.21173858642578125,
0.031211111694574356,
0.27001360058784485,
-0.5088562965393066,
-0.45079508423805237,
-0.34514468908309937,
-0.24377024173736572,
0.3874667286872864,
-0.46058622002601624,
-0.0464675836... | |
IvdInstances.Main.Initialise();
Application.Run(IvdInstances.Main);
}
```
I use full screen on all my forms, so there is no X button, however I thought using Form.Close() performed the same function?
I want to be able to minimise my application from my main menu (Main) and then have it instantly ... | [
0.2492348700761795,
0.13469530642032623,
0.8632847666740417,
-0.3741891384124756,
-0.128313347697258,
-0.15372364223003387,
0.7596844434738159,
-0.07677701860666275,
-0.1990251988172531,
-0.7414517998695374,
-0.02407863736152649,
0.7444469928741455,
-0.3840329647064209,
0.2024005651473999,... | |
able to detect when my application is running and then restore the main menu when it is so that it's not constantly loading itself into memory.**
```
[System.Runtime.InteropServices.DllImport("coredll.dll")]
static extern int ShowWindow(IntPtr hWnd, int nCmdShow);
ShowWindow(this.Handle, SW_MINIMIZED);
```
This did ... | [
0.06727439910173416,
-0.18419161438941956,
0.7602498531341553,
-0.07135091722011566,
0.18342225253582,
-0.2766101062297821,
0.6652966737747192,
-0.025606874376535416,
-0.015567094087600708,
-0.6577929258346558,
-0.02952803671360016,
0.6975874900817871,
-0.360587477684021,
-0.03160742297768... | |
I am hoping the regular expression experts can tell me why this is going wrong:
This regex:
```
$pattern = '/(?<percent>[0-9]{1,3}\.[0-9]{1,2})% of (?<filesize>.+) at/';
```
Should match this sort of string:
```
[download] 87.1% of 4.40M at 107.90k/s ETA 00:05
[download] 89.0% of 4.40M at 107.88k/s ETA 00:04
[do... | [
0.05015578120946884,
-0.04970473796129227,
0.3894795775413513,
-0.059362225234508514,
0.042692553251981735,
0.038347579538822174,
0.5218853950500488,
-0.12356162071228027,
0.0756882056593895,
-0.7019919157028198,
-0.17243151366710663,
0.7564866542816162,
-0.34492921829223633,
-0.3109589517... | |
if(preg_match_all($pattern, $progress, $matches)){
//matched
}
}
```
Could how much that is being read by **fread** be effecting the regex to work correctly?
I really need confirmation as I am trying to identify why it isn't working on a new server. This question is related to [Change in Server Permits scrip... | [
0.2823725640773773,
0.08552706241607666,
0.4825890064239502,
-0.005057887174189091,
-0.0023455736227333546,
-0.13778743147850037,
0.5494014620780945,
-0.531352162361145,
-0.05655117705464363,
-0.43193507194519043,
-0.01284528523683548,
0.7126371264457703,
-0.1661725491285324,
-0.2244670540... | |
00:09 [download] 78.6% of 4.40M at 111.41k/s ETA 00:08 [download] 80.3% of 4.40M at 110.80k/s ETA 00:07 [download] 82.3% of 4.40M at 110.30k/s ETA 00:07 [download] 84.3% of 4.40M at 108.33k/s ETA 00:06 [download] 85.7% of 4.40M at 107.62k/s ETA 00:05 [download] 87.5% of 4.40M at 107.21k/s ETA 00:05 [download] 89.5% of ... | [
-0.2908764183521271,
0.09137750416994095,
0.3053891956806183,
0.430061936378479,
-0.04695549234747887,
0.8402795791625977,
0.5308417677879333,
-0.3230729103088379,
-0.11482565850019455,
-0.7268209457397461,
-0.27434241771698,
0.8473109602928162,
-0.2846103608608246,
-0.3423868715763092,
... | |
4.40M at 103.15k/s ETA 00:00 [download] 100.0% of 4.40M at 103.16k/s ETA 00:00
";
$pattern = '/(?<percent>\d{1,3}\.\d{1,2})%\s+of\s+(?<filesize>[\d.]+[kBM]) at/';
if(preg_match_all($pattern, $progress, $matches)){
echo 'match';
}
echo '<br>Done<br>';
?>
```
I am not that familiar with named capture, but I ... | [
-0.008565089665353298,
-0.25058746337890625,
0.5564784407615662,
-0.05099323019385338,
-0.1262916922569275,
0.22906722128391266,
0.5621400475502014,
-0.7846912741661072,
-0.28986820578575134,
-0.4139423370361328,
-0.2721424400806427,
0.5858991146087646,
-0.3472382724285126,
-0.422879159450... | |
How to Implement Drag and Drop Between my Program and Explorer
ya windows application only
As long as you're using WinForms, it's actually very straightforward. See these two articles to get you started:
* [Drag and Drop files from Windows Explorer to Windows Form](http://www.codeproject.com/KB/cs/dragdrop.aspx)
* [Dr... | [
0.5419297218322754,
-0.3377232253551483,
0.5484557151794434,
0.08604470640420914,
0.037965040653944016,
-0.021964261308312416,
0.12703052163124084,
-0.1442795842885971,
-0.15062378346920013,
-0.8207229971885681,
0.06188634783029556,
0.6222286820411682,
-0.29286617040634155,
-0.262481093406... | |
I'm trying to show the copyright and infinity signs at the bottom of my page using this code:
```
© Copyright Mikle 2009 - ∞
```
This works perfectly in Firefox 2, 3 and Chrome. IE7 though, is showing me the actual codes (like you see above) instead of what I expect and the other browser show:
```
© Cop... | [
0.223898783326149,
0.3991842567920685,
0.5910459756851196,
-0.07035741955041885,
-0.18844331800937653,
-0.34677085280418396,
0.42405709624290466,
0.23352976143360138,
0.008277900516986847,
-0.8893427848815918,
-0.10057731717824936,
0.5686013698577881,
-0.5081901550292969,
0.062462314963340... | |
I'm asking this in relation to Flex Builder, but it might apply to Eclipse in general.
Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side?
Specifically, I'd like to be able to filter (ignore) lines by patterns.
I came across Logback... | [
0.6404932737350464,
-0.3101334869861603,
0.03348572552204132,
0.25185349583625793,
-0.4929772615432739,
-0.3028970956802368,
0.008339658379554749,
0.12175258249044418,
-0.11160144209861755,
-0.6757319569587708,
0.19821953773498535,
0.3432431221008301,
-0.38962212204933167,
-0.2221708893775... | |
I have a query request-uri in the form of "/node/143" (just an example of the format).
I want to strip the first forward slash from the string, I looked up the function [remove](http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node144.html) and had a try. I just can't seem to get it working (I'm using SBCL on Linux).
I'... | [
-0.09909392893314362,
0.24830862879753113,
0.7312070727348328,
-0.1647399216890335,
-0.2918407917022705,
0.08759423345327377,
0.07987246662378311,
-0.3433374762535095,
-0.29319968819618225,
-0.5013747215270996,
-0.048716235905885696,
0.29897597432136536,
-0.262039452791214,
0.4207222163677... | |
request-uri)
"/node/143"
```
Even though strings are [vectors of characters](http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node164.html#SECTION002200000000000000000) I thought that somehow maybe the whole string may be placed in one cell and I tried to remove the whole thing, still no luck.
```
(remove "/node/143" r... | [
-0.17243511974811554,
0.09440944343805313,
0.4742852449417114,
0.002338521648198366,
-0.26465120911598206,
-0.02525230124592781,
0.3711096942424774,
-0.17353427410125732,
-0.3194793164730072,
-0.5286685824394226,
-0.07460159063339233,
0.13169123232364655,
-0.43864932656288147,
0.1557538658... | |
the first character and throws an error, and the following all do nothing.
```
(remove "node" request-uri)
(remove 'node request-uri)
(remove ?\node request-uri)
(remove #\node request-uri)
(remove '("node") request-uri)
```
I'm not sure how else it should be addressed here.
Learn to read the [Common Lisp HyperSpec]... | [
-0.41685643792152405,
0.294221967458725,
0.37756213545799255,
-0.1564089059829712,
-0.21192951500415802,
0.013419817201793194,
0.029823830351233482,
-0.37928637862205505,
-0.04375572130084038,
-0.3301428258419037,
-0.6249949336051941,
0.3639097511768341,
-0.3919372856616974,
-0.11239136755... | |
a character. `#\node` is no character. Illegal. A string is `"/foo/"`.
The item to REMOVE from a string has to be a character. Nothing else. Why? Because the TEST is by default EQL and EQL compares the character in the string with your item argument. Also key is by default IDENTITY and does not change the items.
What... | [
-0.08192551881074905,
0.2055703103542328,
0.17438660562038422,
0.04648291692137718,
0.026561640202999115,
0.16602841019630432,
0.28467297554016113,
-0.2734239399433136,
-0.13945278525352478,
-0.2979402542114258,
-0.26503920555114746,
0.33767199516296387,
-0.5058790445327759,
0.180297225713... | |
the function EQUAL. This works also. The cost is that it needs to generate a string from each character of `"/abc/"`, each string is a new object.
Another way to do it is:
```
(remove "/" "/abc/" :test (lambda (a b) (eql (aref a 0) b)))
```
Above retrieves the first character of `"/"` in every test and compares it... | [
0.06963662803173065,
0.167204350233078,
0.11676352471113205,
-0.08919107913970947,
-0.12808558344841003,
0.237624391913414,
0.33980345726013184,
-0.6848924160003662,
0.22511346638202667,
-0.5732613205909729,
0.04653189703822136,
0.6356200575828552,
-0.41257616877555847,
-0.0578057542443275... | |
character from the string `"/"` once and then REMOVE compares this character with the default EQL test with each character in the string - it returns a new string of those characters that are not EQL to `#\/`.
What do you expect ?\foo to be? In Common Lisp this is the symbol `|?fOO|`.
Also `(remove "foo" "afoob")` d... | [
-0.23160682618618011,
0.09665180742740631,
0.18432120978832245,
-0.3014703392982483,
-0.00035456992918625474,
0.20757977664470673,
0.27313223481178284,
-0.1759166270494461,
0.29740601778030396,
-0.39439693093299866,
-0.22606362402439117,
0.5498911142349243,
-0.4730865955352783,
-0.34207808... | |
type. The first is a string and the second is a character.
SUBSEQ extracts a sequence from a sequence. That means it also extracts a string from another string:
```
(subseq "0123456" 1 5)
where 1 is the start and 5 is the end index.
```
CONCATENATE appends sequences. This means that it also appends strings.
`... | [
0.01754031702876091,
-0.05651118978857994,
0.12749621272087097,
-0.24604319036006927,
-0.06484756618738174,
-0.07106529176235199,
0.07940103113651276,
-0.43693822622299194,
0.19843293726444244,
-0.3157540261745453,
-0.284275621175766,
0.20221731066703796,
-0.594047486782074,
-0.04443887248... | |
to extract some strings and then concatenate those.
SEARCH searches for strings in strings. | [
-0.2187347263097763,
-0.2001720666885376,
-0.24929162859916687,
0.09860467910766602,
-0.08312714844942093,
-0.08263570815324783,
0.1952068954706192,
-0.18418346345424652,
0.017484106123447418,
-0.5546566843986511,
-0.2018101066350937,
0.3183228671550751,
-0.32231518626213074,
-0.0666956305... | |
What kind of software do you think is used to make demos,like the once seen in PDC etc by Microsoft or seen on Channel 9.
Example:
<http://download.microsoft.com/download/c/e/2/ce28874c-4f44-4dbd-babb-727685e2be96/WinFS_IWish_720x486_2mbs.wmv>
Basically you have text and sound.
I bet they use [Camtasia Studio](http:/... | [
0.9453408718109131,
-0.3163967430591583,
0.07218483835458755,
0.528030276298523,
0.4642874300479889,
-0.31433168053627014,
-0.30793651938438416,
0.280557245016098,
-0.17678068578243256,
-0.4856482744216919,
0.07910779863595963,
1.1282597780227661,
0.09399867057800293,
-0.03700339421629906,... | |
i have a problem with asp.net mvc on windows 7... asp.net mvc RC was previously installed and i installed MVC rtm... it says “the project type is not supported by this installation”... is there anyway to register this project type in to visual studio or unregister the rc version?
Each function you named is for differen... | [
0.3059427738189697,
0.01380184292793274,
0.40600189566612244,
-0.20157690346240997,
-0.09460116922855377,
-0.15290935337543488,
0.4642108082771301,
-0.1585949808359146,
-0.35281282663345337,
-0.3498738706111908,
0.025434300303459167,
0.8937685489654541,
-0.5647768974304199,
0.1503691673278... | |
was the left side of an assignment (i.e. $var = 3;) or any other obscure methods such as [extract](http://us2.php.net/manual/en/function.extract.php), [list](http://us2.php.net/manual/en/function.list.php) or [eval](http://us2.php.net/manual/en/function.eval.php). This is *the* way to find if a variable has been set.
*... | [
0.007371455430984497,
-0.2292325645685196,
0.3230776786804199,
-0.05620376393198967,
-0.5413832068443298,
0.06816735118627548,
0.2352878302335739,
-0.33179324865341187,
-0.21160735189914703,
-0.28288766741752625,
0.05863368511199951,
0.3766431510448456,
-0.38085463643074036,
-0.09463740140... | |
checking it.
One last piece of advice: if you expect a variable to be an array, don't wait for it to be set somewhere. Instead, initialize it beforehand, then let your code run and maybe it will get overwritten with a new array:
```
// Initialize the variable, so we always get an array in this variable without worryi... | [
0.6197566986083984,
-0.03328010439872742,
0.14231550693511963,
-0.0009297027136199176,
0.28213226795196533,
-0.4420761168003082,
0.4775920808315277,
0.038076385855674744,
-0.14984971284866333,
-0.6033670902252197,
0.0987374559044838,
0.5026851296424866,
-0.45084667205810547,
0.008543964475... | |
Is it a best practice to have my local source tree mirror the server source tree? It seems to me that it should, however my department at work does not do it that way and I find it very confusing. If not, what are scenarios where it makes sense to deviate from the server source tree?
EDIT: To clarify what I mean - say... | [
0.2039753794670105,
0.30835458636283875,
0.3215665817260742,
-0.274495005607605,
-0.1155657097697258,
-0.1304352879524231,
0.11657416075468063,
0.009923803620040417,
-0.3917841613292694,
-0.6608397364616394,
0.21405737102031708,
0.6053075790405273,
0.04556777700781822,
0.1614353507757187,
... | |
prefer mirroring the source tree too. It's one less "gotcha" in terms of getting a new developer up and running. Not mirroring the source tree can eventually come back to bite you when it comes to relative paths.
Someone probably made a mistake when they set things up originally and it never got corrected. IMHO it's a... | [
0.4840608835220337,
-0.08851467818021774,
0.5232294797897339,
0.33375608921051025,
-0.3255421817302704,
-0.1848350316286087,
0.7481497526168823,
0.3175339698791504,
-0.20866967737674713,
-0.6343787908554077,
0.23060613870620728,
0.7144472002983093,
-0.135287344455719,
-0.06642995774745941,... | |
I'm working on an older .NET code base that has all the designer code stuffed into the same code file as my code (pre - partial classes).
Is there a mechanism to tell Visual Studio 2008 to go back and refactor designer code into a X.designer.cs partial class file?
What I just did was completely manually:
1. Create *y... | [
0.42169785499572754,
0.005344343837350607,
0.2674170434474945,
-0.07437117397785187,
-0.3280344307422638,
0.009972118772566319,
0.08781050145626068,
-0.1126006618142128,
-0.19622838497161865,
-0.995965838432312,
0.12289518862962723,
0.2665700614452362,
-0.010753534734249115,
0.216528132557... | |
**Do not** add inheritance and/or interfaces to this partial class in Designer.cs.
6. After this is done, you're ready to *cut* and *paste* the following:
a) Remove the *components* object you might have in your original Winform. If the application was .NET 1.1 you will have something like this:
```
/// <summary>... | [
0.21542386710643768,
-0.23340536653995514,
0.3003104031085968,
0.01668747328221798,
0.009355049580335617,
-0.1976003795862198,
0.11284841597080231,
-0.30067548155784607,
-0.07822344452142715,
-0.8734109401702881,
-0.029018742963671684,
0.4721219539642334,
-0.4782869815826416,
0.39034253358... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.