text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
What RegKey can you get the default browser application's path from?
Best way to get to it from C#/.NET?
Here's the key you want:
> HKEY\_LOCAL\_MACHINE\SOFTWARE\Classes\http\shell\open\command
And here's a quick [registry tutorial for C#](http://www.codeproject.com/KB/system/modifyregistry.aspx), if you need it.
*... | [
0.016120078042149544,
-0.13189883530139923,
0.4300779402256012,
0.04509641230106354,
-0.012917885556817055,
-0.030468780547380447,
0.3679181933403015,
0.14540305733680725,
-0.11126995831727982,
-0.8788679838180542,
-0.25470367074012756,
0.6008142828941345,
-0.19248370826244354,
0.013117692... | |
I'm having a hard time trying to make a Java program with just a shape (e.g rectangle) as main window. I don't want the shape to be inside the 'OS-window' (with buttons to close and minimize etc..)
I don't know if you can draw directly on the screen in Java (I tend to think you can't). But you could create a [`JDialog`... | [
0.6280047297477722,
0.05644194036722183,
0.41238418221473694,
-0.25467994809150696,
-0.2734799385070801,
0.11903459578752518,
0.02679504081606865,
-0.15775127708911896,
-0.058385640382766724,
-0.9109288454055786,
0.08694212138652802,
0.4716116786003113,
-0.25047633051872253,
0.045964118093... | |
this purpose. From the Javadocs:
> It does not have the title bar, window-management buttons, or other trimmings associated with a `JFrame`, but it is still a "first-class citizen" of the user's desktop, and can exist anywhere on it.
And there's even a [no-argument constructor](http://java.sun.com/javase/6/docs/api/j... | [
0.32035934925079346,
0.11238513141870499,
0.39483338594436646,
-0.08949445933103561,
0.07454892992973328,
-0.5169471502304077,
0.25474491715431213,
-0.12680502235889435,
-0.49382075667381287,
-0.2868672311306,
-0.17170529067516327,
0.1771899163722992,
-0.0372328907251358,
0.146857336163520... | |
My team and I have been contracted by a company to develop our first iPhone Application.
I am wondering how this contractor relationship is best handled. Does the $99 SDK/Dev connection account need to be established under the contractor's name, so that when the application is approved it isn't listed by our company'... | [
0.7487933039665222,
0.36143621802330017,
0.10844993591308594,
0.12746916711330414,
0.38296276330947876,
0.092317596077919,
0.045932237058877945,
-0.19483810663223267,
-0.07260037958621979,
-0.29362761974334717,
0.03244777396321297,
0.6234278678894043,
0.17052514851093292,
-0.20087517797946... | |
to the business interface for the company publishing the app.
You sign up once. Each client signs up for their own account for the most important reason. That's where the bank information is to tell where the money goes. :). And contracts and sales data, etc.
The best way for it to work is for you to do development ... | [
0.6889416575431824,
0.2876565456390381,
0.4883745610713959,
0.1506173461675644,
0.29080402851104736,
0.08436739444732666,
-0.006014795508235693,
-0.12207773327827454,
-0.3363524079322815,
-0.5702996850013733,
-0.0619959719479084,
0.6734263300895691,
-0.059104520827531815,
-0.16612406075000... | |
control development, testing and beta distribution. When development is finished, you zip up the release version signed with their key and they upload it via iTunes Connect under their account.
Bonus section:
This configuration is easy to set up in XCode (once you get over the 24 hours of strangling yourself getting y... | [
0.7830774188041687,
0.12098389118909836,
-0.02654937468469143,
0.10335259139537811,
0.39686819911003113,
-0.07487358152866364,
0.0649404376745224,
-0.21026653051376343,
-0.097997285425663,
-0.42093750834465027,
-0.3682471215724945,
0.5188416242599487,
-0.2308790236711502,
-0.05099156498908... | |
iPhone Distribution (AppStore) for "AppStore". Forget you even have a client until the end, then switch to AppStore distribution, build, zip, email, and done.
In practice, it's more complicated than that as you'll need to set up multiple certs/profiles/keys on your machine, but once you're done, it basically runs like... | [
0.45749762654304504,
0.18540987372398376,
0.3579302132129669,
0.016414614394307137,
0.4005555212497711,
0.1252201795578003,
0.025308942422270775,
0.20153628289699554,
-0.38077178597450256,
-0.6143283843994141,
-0.1538761407136917,
0.6313329935073853,
-0.3772175908088684,
-0.010219105519354... | |
I'm using ASP.net and an SQL database. I have a blog like system where a number of comments are made against a post and I want to display the number of those comments next to the post. To get that number I could either hold it in the post record and add/subtrack when a comment is added or deleted or I could use the SQL... | [
0.7690249681472778,
0.2864052951335907,
0.18100304901599884,
0.002487149788066745,
-0.36978036165237427,
0.09288391470909119,
-0.04521363601088524,
0.13533839583396912,
-0.2868220806121826,
-0.7066861391067505,
0.5435937643051147,
0.27082887291908264,
-0.14001940190792084,
0.37072280049324... | |
the number against the record feels like it could be error prone. What do you think is best coding practice in this case?
Always start with a normalized database (your second option). Only denormalize if you have an absolute necessity for performance reasons. Designing it in the denormalized way (which is error-prone a... | [
0.4126570522785187,
0.17190581560134888,
-0.367719441652298,
0.3389158546924591,
0.19368276000022888,
0.12717770040035248,
0.14958623051643372,
-0.11007551103830338,
-0.2899244725704193,
-0.5598371028900146,
0.4273451864719391,
0.6686291694641113,
-0.2244625985622406,
-0.10084735602140427,... | |
I have been given a specification that requires the `ISO 8601` date format, does any one know the conversion codes or a way of getting these 2 examples:
```
ISO 8601 Extended Date 2000-01-14T13:42Z
ISO 8601 Basic Date 20090123T105321Z
```
When dealing with dates in SQL Server, the ISO-8601 format is probably the bes... | [
0.3459792137145996,
0.3617677688598633,
0.488619327545166,
0.08599800616502762,
0.19090275466442108,
-0.3836459517478943,
-0.1014193519949913,
0.15116345882415771,
-0.2968043088912964,
-0.5010213851928711,
-0.12000176310539246,
0.22603736817836761,
0.07322448492050171,
0.3758458197116852,
... | |
to convert a date column to ISO-8601 format on SELECT, you can use conversion code 126 or 127 (with timezone information) to achieve the ISO format.
```
SELECT CONVERT(VARCHAR(33), DateColumn, 126) FROM MyTable
```
should give you:
```
2009-04-30T12:34:56.790
``` | [
0.04403083398938179,
0.14160564541816711,
0.6160884499549866,
0.021540194749832153,
-0.06282667815685272,
0.07303746044635773,
-0.03394109010696411,
-0.02084769867360592,
-0.2652643322944641,
-0.4341135621070862,
-0.14992235600948334,
0.1328354924917221,
-0.029061324894428253,
0.2709557414... | |
How can you insert the date in the filename (a dynamic filename) used in a T-SQL backup script? Using SQL Enterprise Manager to create and schedule a backup job, I'd like to edit the T-SQL created to change the filename of the backed up database to be dbname\_date.bak (i.e. northwind\_5-1-2009.bak). The next time the b... | [
0.10523677617311478,
-0.037515029311180115,
0.4656161665916443,
-0.020413314923644066,
0.236766517162323,
0.04779699444770813,
0.16045844554901123,
0.03273748978972435,
-0.13378575444221497,
-0.5389122366905212,
-0.023765943944454193,
0.4562371075153351,
-0.2863306403160095,
0.016441963613... | |
@backupname = 'northwind_' + getdate() + '.bak'
```
something like that should work. you might have to sat the getdate() to nvarchar. | [
0.1428951621055603,
-0.04267767816781998,
0.5695241689682007,
0.03898553550243378,
0.07338099181652069,
-0.3974664509296417,
0.5528241395950317,
0.31990310549736023,
-0.37944862246513367,
-0.40724605321884155,
0.11213221400976181,
0.5090173482894897,
-0.17162907123565674,
-0.06282848119735... | |
I am writing a class that is linked to an external resource. One of the methods is a delete method that destroys the external resource. No further method calls should be made on that object. I was thinking of setting a flag and die'ing inside of all of the methods if the flag is set, but is there a better, easier way? ... | [
0.1455153375864029,
0.12458526343107224,
0.22690239548683167,
-0.2476532757282257,
-0.028223704546689987,
-0.013229780830442905,
0.7847498655319214,
-0.32056665420532227,
0.058040499687194824,
-0.5060794353485107,
-0.36469143629074097,
0.5688354969024658,
-0.6428744196891785,
0.18815162777... | |
my $class = shift;
return bless {}, $class;
}
sub meth1 {
my $self = shift;
print "in meth1\n";
}
sub meth2 {
my $self = shift;
print "in meth2\n";
}
sub delete {
my $self = shift;
$self->{orig_class} = ref $self;
return bless $self, "ExternalResource::Dead";
}
package ExternalResour... | [
-0.11781691759824753,
0.032902467995882034,
0.47770044207572937,
-0.33326461911201477,
0.34736573696136475,
0.33532431721687317,
0.7755693793296814,
-0.2575911581516266,
0.09869594871997833,
-0.4692244827747345,
-0.5012679100036621,
0.7428600788116455,
-0.2189643234014511,
0.24552643299102... | |
to undelete resource
return bless $self, $self->{orig_class};
}
sub AUTOLOAD {
my $meth = (split /::/, $AUTOLOAD)[-1];
croak "$meth is not a method for this object"
unless $methods{$meth};
carp "can't call $meth on object because it has been deleted";
return 0;
}
```
Is there a problem wit... | [
0.38588833808898926,
-0.22238360345363617,
0.14176437258720398,
0.03817376121878624,
0.35935118794441223,
0.2141215056180954,
0.5667974948883057,
-0.2476658970117569,
-0.06507908552885056,
-0.4910534918308258,
-0.05349499732255936,
0.5623564720153809,
-0.3312000632286072,
0.448716521263122... | |
that if you have a function that is encapsulated enough, you really don't want to have the users parse through your code. For that purpose, you probably wouldn't like to use what I call the Go-ahead-and-let-it-fail pattern. `'Can't call method "do_your_stuff" on an undefined value'` probably won't work as well for enca... | [
0.39884305000305176,
0.16291572153568268,
-0.1731095165014267,
0.11582830548286438,
0.0571671687066555,
-0.08625517040491104,
0.5604041814804077,
0.06807350367307663,
-0.38303688168525696,
-0.11549148708581924,
-0.22552354633808136,
0.3093845248222351,
-0.42152366042137146,
0.2380702346563... | |
just says "Sorry can't do it, I've been shut down (You shut me down, remember?)."
* You could undef `$_[0]` in the delete. Then they get a nice `'Can't call method "read_from_thing" on an undefined value'` from a line in *their* code--provided that they aren't going through an elaborate decorating or delegation process... | [
0.15416936576366425,
-0.0019693656358867884,
0.44364187121391296,
-0.24883081018924713,
-0.19851930439472198,
-0.12988018989562988,
0.6952945590019226,
-0.07741142809391022,
-0.26138371229171753,
-0.3523205518722534,
-0.536247193813324,
0.5417124629020691,
-0.048931386321783066,
0.10469229... | |
}
sub speak { say 'Ruff!' }
sub done { bless shift, 'A'; }
package main;
my $a = B->new();
my $b = $a;
$a->speak(); # Ruff!
$b->speak(); # Ruff!
$a->done();
$a->speak(); # Meow!
$b->speak(); # Meow! <- $b made the switch
$a->done();
$b->speak(); # Meow!
$a->speak(); # Can't call method "speak" on an undefined valu... | [
0.08324477076530457,
-0.14261934161186218,
0.5139769315719604,
-0.7032971978187561,
0.004092634655535221,
0.13863100111484528,
0.7135473489761353,
-0.39700549840927124,
0.08869367837905884,
-0.052638135850429535,
-0.44556745886802673,
0.8603146076202393,
-0.3084487020969391,
0.343393743038... | |
I want to SELECT a formatted date string from a `datetime` type in SQL Server 2005.
In the format "yyyy/mm/dd hh:mm:ss".
What is the best way to do using only a query?
Check out the CONVERT statement.
```
SELECT CONVERT(VARCHAR(20), getdate(), 120)
```
is closest to what you want. (Note the different separators (-... | [
0.16707022488117218,
0.012680219486355782,
0.7217165231704712,
-0.12517932057380676,
-0.26054632663726807,
-0.019786279648542404,
0.05719631910324097,
-0.2786993086338043,
0.0015708589926362038,
-0.6240094304084778,
0.2157757729291916,
0.44836461544036865,
-0.20138564705848694,
0.178839847... | |
Is this possible? I am creating a single base factory function to drive factories of different types (but have some similarities) and I want to be able to pass arguments as an array to the base factory which then possibly creates an instance of a new object populating the arguments of the constructor of the relevant cl... | [
0.2111586630344391,
-0.028355151414871216,
0.1683654934167862,
-0.24250873923301697,
-0.08873817324638367,
0.22014082968235016,
0.19972151517868042,
-0.5503177642822266,
-0.09944625943899155,
-0.40279313921928406,
-0.11330755800008774,
0.4851948916912079,
-0.5987473130226135,
-0.1853491067... | |
result = myFunc.apply(namespace, r);
```
It doesn't seem as if there's anyway to create an instance of an object using apply though, is there?
Something like (this doesn't work):
```
var instance = new MyClass.apply(namespace, r);
```
Try this:
```
var instance = {};
MyClass.apply( instance, r);
```
All the key... | [
-0.009847776964306831,
0.13640464842319489,
0.5246412754058838,
-0.25617530941963196,
0.0702635645866394,
-0.08295400440692902,
0.5529050827026367,
-0.45752692222595215,
-0.11622864753007889,
-0.4925195872783661,
-0.11961320787668228,
0.6049965620040894,
-0.3996664881706238,
0.202933400869... | |
prototype. Try this.
```
function newApply(class, args) {
function F() {
return class.apply(this, args);
}
F.prototype = class.prototype;
return new F();
}
newApply( MyClass, args);
``` | [
0.04217725992202759,
0.051910243928432465,
0.038993120193481445,
-0.19988733530044556,
0.24670100212097168,
0.3033364415168762,
0.5698124766349792,
-0.3689959645271301,
-0.1088087260723114,
-0.9373063445091248,
0.22766664624214172,
0.2109580934047699,
-0.5972195267677307,
0.498093068599700... | |
We're having a problem with a merge replication. Our publisher runs SQL Server 2008, while our two subscribers run 2005. Our publisher is trying to send an `ALTER TABLE Foo SET (LOCK_ESCALATION)` command out to our subscribers. I think I remember reading that this command is new in SQL Server 2008, and if so, it makes ... | [
-0.05283908545970917,
0.16704386472702026,
0.6826631426811218,
0.16208483278751373,
-0.18972066044807434,
-0.19181039929389954,
0.2685945928096771,
-0.12292050570249557,
-0.21106001734733582,
-0.3559655249118805,
0.3498072624206543,
0.46159034967422485,
-0.5088407397270203,
0.2949023842811... | |
ideas on why our publisher would be trying to do this?
**Edit:** Our 2008 server's compatibility level is set to "Sql Server 2005 (90)"
Its a new feature in sql 2008 so not supported in 2005. Depending on how complex your setup is you may want to consider have your database run in compatibility 90 (sql 2005) to make s... | [
0.12657935917377472,
0.2868976891040802,
0.8014093637466431,
0.056116171181201935,
-0.3318600654602051,
-0.535767138004303,
0.344291627407074,
-0.0890611782670021,
-0.13801510632038116,
-0.09289368987083435,
0.19907905161380768,
0.580223798751831,
-0.23307229578495026,
-0.14137840270996094... | |
to support a merge system with 32 subscribers with merge replication and had big schema issues constantly when we pushed schema changes.
That said if it works as documented it shouldn't be trying to push your lock change. Check the subscriptions are marked as sql 2005 compatible. Its likely they haven't created an aut... | [
0.26009342074394226,
-0.1001197025179863,
0.4847447872161865,
0.142570361495018,
-0.06605023890733719,
-0.30502715706825256,
0.23073112964630127,
-0.31887638568878174,
-0.439956933259964,
-0.2596708834171295,
0.09148173034191132,
0.4171336591243744,
-0.12757951021194458,
0.1565340012311935... | |
What can you do if you get the following error when installing Visual Studio 2008 sp1 in Windows 7 RC?
```
Operation Aborted
```
while installing Visual Studio 2008 SP1 on Windows 7 RC 7100, run this as administrator:
```
reg delete HKLM\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions /va /f
```
Afterwards V... | [
0.06183262914419174,
0.18339787423610687,
0.11345856636762619,
0.06838839501142502,
0.049075424671173096,
-0.3092859089374542,
0.5567260980606079,
-0.36150169372558594,
-0.3794724643230438,
-0.23959232866764069,
-0.24062587320804596,
0.7804437279701233,
-0.25356927514076233,
-0.15084002912... | |
What do you *(especially PHP)* guys think about a naming convention for classes in which the class name reflects the path to the file, related to the project directory? e.g:
```
# /project/Session/Abstract.php
# /project/Session/Database.php
class Session_Database extends Session_Abstract ...
```
I'm sure you get t... | [
0.42252227663993835,
0.07195574790239334,
-0.18362747132778168,
0.20180469751358032,
-0.11184091866016388,
-0.24358952045440674,
0.26712357997894287,
0.20572736859321594,
-0.43260064721107483,
-0.5447508096694946,
-0.0927095115184784,
0.3634662926197052,
-0.14071257412433624,
0.19608595967... | |
to be stupid. I personally like it, but I haven't seen it in use by other people and I am not quite sure if it will work so well in practice.
One of the cons might be that with the removal of include/require calls, all classes are dependent(glued together) on the autoload function, which some might argue, does not com... | [
0.5995884537696838,
-0.32024499773979187,
-0.23189568519592285,
-0.0616166926920414,
-0.1372763216495514,
-0.4927988350391388,
0.030444035306572914,
-0.07830498367547989,
-0.3865540027618408,
-0.38081037998199463,
0.007575788535177708,
0.4127419590950012,
-0.42167428135871887,
-0.164605021... | |
a rather established standard in the PHP world. I don't know when I first encountered it, but I've personally used it and liked it for several years, both as part of my own framework and as part of publicly available frameworks such as ZF. | [
0.3849710524082184,
0.14911305904388428,
0.22422610223293304,
-0.1338339000940323,
-0.3108255863189697,
-0.5714269876480103,
-0.1137111485004425,
0.35344675183296204,
0.003908781334757805,
-0.24417488276958466,
0.15619473159313202,
0.3886033594608307,
-0.08027660846710205,
0.02802214585244... | |
I've seen two different manners that programmers approach when creating an entity context in their code.
The first is like such, and you can find it all over the MSDN code examples:
```
public void DoSomething() {
using (TaxableEducationEntities context = new TaxableEducationEntities()) {
// business l... | [
0.16626454889774323,
0.0658038780093193,
0.14267505705356598,
0.18814723193645477,
0.4646775722503662,
-0.24764233827590942,
-0.1483524590730667,
0.11245071887969971,
-0.168308824300766,
-0.4046211540699005,
-0.03937477618455887,
0.785075306892395,
-0.10886211693286896,
0.16206009685993195... | |
TaxableEducationEntities context = new TaxableEducationEntities();
public void DoSomething() {
var result = from a in context.luAction
select a;
// business logic and whatever else
}
}
```
Which way is more efficient?
Assume that you have two method... | [
0.1329982876777649,
-0.16427062451839447,
0.20944738388061523,
0.01733972877264023,
0.278510183095932,
0.040620457381010056,
0.08884267508983612,
-0.5003616809844971,
-0.1248733252286911,
-0.5393246412277222,
-0.14401739835739136,
0.6453770995140076,
-0.33429083228111267,
0.016968496143817... | |
called DoSomething2(), and both methods incorporate the using statement to open the context and do whatever with it. Were you to call one method after the other, would there be any superfluous overhead going on, since essentially both methods create the context and then clean it up when they're done? As opposed to havi... | [
0.17435453832149506,
-0.5554783940315247,
-0.04138531535863876,
0.12768307328224182,
0.07221805304288864,
-0.06392177939414978,
0.14430055022239685,
-0.41251882910728455,
-0.0374285951256752,
-0.5829939246177673,
0.12279760092496872,
0.7023798227310181,
-0.5376664996147156,
-0.048397794365... | |
into metadata associated with the specific ObjectContext.
This overhead is relatively minor, so often it is not worth worrying about, especially when you consider the extra safety inherent in the using pattern.
For me which option you choose depends upon things like:
1. How long lived is your
wrapping class likely t... | [
0.5327105522155762,
-0.49833449721336365,
0.010581460781395435,
0.31050753593444824,
0.1957818865776062,
-0.3973569869995117,
0.2588614225387573,
0.026667194440960884,
-0.24157655239105225,
-0.5788775682449341,
0.1922760307788849,
0.37805449962615967,
-0.2080097198486328,
0.386513411998748... | |
your wrapping class /
repository is thread safe if you
expect multiple threads to call it.
3. Are the methods essentially
unrelated? If so you might get unexpected side-effects if they share one context between the methods.
In general my recommendation is that if the methods are stateless, i.e. fire and forget a new c... | [
0.3321680426597595,
-0.31878262758255005,
0.06677541136741638,
0.24103741347789764,
0.05649590864777565,
-0.4740997552871704,
0.16383318603038788,
-0.18470901250839233,
-0.1326044201850891,
-0.644027829170227,
-0.07994315028190613,
0.3488846719264984,
-0.00033813866320997477,
0.03239617496... | |
Is there a generally-accepted documentation generator for Objective-C (similar to RDoc for Ruby)? I've seen Doxygen and ObjcDoc, and am wondering which is most widely used.
[Doxygen](http://www.doxygen.nl) is probably the most widely used option. Because it's not just for ObjC (doxygen supports many other languages), t... | [
0.18765327334403992,
0.10082554817199707,
0.20272549986839294,
-0.022104550153017044,
-0.2566899061203003,
-0.44141778349876404,
-0.14822137355804443,
0.01651749573647976,
-0.22366563975811005,
-0.43718767166137695,
-0.29666668176651,
0.459489107131958,
-0.3817239999771118,
-0.161734998226... | |
Xcode's help viewer, from within your Xcode build process.
It's worth noting that doxygen can read HeaderDoc-style comments, so you can write your documentation in HeaderDoc style and decide later whether to produce the final output using doxygen or HeaderDoc. | [
0.5447738766670227,
0.04481959342956543,
0.05591283738613129,
0.1625821590423584,
-0.3252951204776764,
-0.4498026669025421,
-0.0015459026908501983,
0.13461697101593018,
0.28916847705841064,
-0.8781969547271729,
-0.14888842403888702,
0.28095805644989014,
-0.46497195959091187,
-0.09412959963... | |
I have an HBox in my flex application. The problem is, when there are too many things inside the HBox a scroll bar appears at the bottom of the app. How can I make it appear in the HBox, so the scrollbar only scrolls thestuff inside the HBox and not the entire app?
Try creating a Canvas around the HBox. If you declare ... | [
0.620555579662323,
-0.2581498324871063,
0.9773905277252197,
-0.41421887278556824,
0.05690842866897583,
0.11405220627784729,
-0.19635994732379913,
-0.2514941096305847,
-0.14110706746578217,
-0.9525678157806396,
0.29332464933395386,
0.70877605676651,
-0.013245065696537495,
-0.181118175387382... | |
I am making a sort of a science lab in Python, in which the user can create, modify and analyze all sorts of objects. I would like to put a Python shell inside the program, so the user could manipulate the objects through the shell. (Note: He could also manipulate the objects through the usual GUI.)
A mockup that illu... | [
0.3924162983894348,
0.1303572803735733,
0.035360973328351974,
0.06853651255369186,
-0.0024446952156722546,
-0.06719162315130234,
0.16170741617679596,
-0.028337368741631508,
-0.1941811889410019,
-0.4074344336986542,
-0.03192412853240967,
0.3795231580734253,
-0.21889348328113556,
-0.08219908... | |
embed into your app
* For PyQt, [pyqtshell](http://code.google.com/p/pyqtshell/) (**Update 29.04.2011:** these days called `spyder`)
Here's what I did to embed PyCrust into the application:
```
import wx.py.crust
...
...
# then call
crustFrame = wx.py.crust.CrustFrame(parent = self)
crustFrame.Show()
```
The `self... | [
0.24299438297748566,
0.2185927778482437,
0.6942377090454102,
-0.24604806303977966,
0.16997139155864716,
0.18099872767925262,
0.16957007348537445,
-0.003131797071546316,
-0.025821438059210777,
-0.8301735520362854,
-0.22165018320083618,
0.39572057127952576,
-0.2784404456615448,
-0.0062108957... | |
I'm in the process of learning Scheme. I recently spent (too much!) time trying to find a bug in a program before I realized I was missing the 'else' word in a cond clause. But the behavior in such circumstances appears to be a little weird. Experimenting with the conditions with just a simple program (below) the 'what... | [
0.7067373394966125,
0.30054372549057007,
0.17382614314556122,
-0.03056022897362709,
0.3529496490955353,
-0.33394289016723633,
0.3663969039916992,
-0.01789374276995659,
-0.21379654109477997,
-0.5332027077674866,
-0.03134019300341606,
0.5011220574378967,
-0.3787457346916199,
0.10755348205566... | |
x)
(cond ((eq? x 0) (display "zero\n"))
(display "whatever\n")))
(define (bar x)
(cond ((eq? x 0 ) (display "zero\n"))
(else (display "whatever\n"))))
In the repl window:
Welcome to DrScheme, version 4.1.5 [3m].
Language: Pretty Big; memory limit: 128 megabytes.
> (foo 0)
zero
> (bar 0)... | [
-0.15957710146903992,
0.24948063492774963,
0.7550281882286072,
-0.25740042328834534,
0.07816735655069351,
-0.14611221849918365,
0.45157575607299805,
-0.10580965131521225,
-0.13509871065616608,
-0.5287827849388123,
-0.4102666676044464,
0.9127433896064758,
-0.34880009293556213,
0.15842151641... | |
( (test) (do this) )
( (test) (do this) ) )
```
Here's your first one
```
(cond ((eq? x 0) (display "zero\n"))
(display "whatever\n")))
```
cond looks at `(eq? x 0)` and determined that's false. The next clause is `(display "whatever\n")`. It looks at `display`, and since `display` is not `nil`, it... | [
-0.03420752286911011,
0.17651903629302979,
0.3273700773715973,
-0.29501956701278687,
-0.09032100439071655,
-0.069109708070755,
0.008319047279655933,
-0.20103894174098969,
-0.13389140367507935,
-0.5366616249084473,
-0.343636691570282,
0.6572568416595459,
-0.3119487762451172,
0.0819494649767... | |
(display "whatever\n"))))
```
Here, the first test is false, and it goes on to the second one, which is `else` and which evaluates to true. (If you think about it, that's what the "else" means in a normal if-then-else: "true for all the cases where none of the previous tests were true.")
Now, the form following it i... | [
-0.06792265921831131,
0.18866361677646637,
0.4925082325935364,
-0.41433173418045044,
-0.26431629061698914,
-0.036641739308834076,
0.12289221584796906,
-0.04246317222714424,
-0.024521132931113243,
-0.5152134299278259,
-0.47399091720581055,
0.701188862323761,
-0.2867530584335327,
0.000273502... | |
I know that I can pin applications to the dock and launch them from there. However, is there a way to pin a program to the dock that is not an "application" in the MacOS sense, like a bash script for example?
You can drag any file to the right bar of the Dock (where the Trash and folders are), and execute it by clickin... | [
0.3958979845046997,
0.09613683074712753,
0.1372273564338684,
0.06551344692707062,
0.2453518956899643,
-0.11265689134597778,
-0.14148461818695068,
-0.09036014974117279,
-0.3306109309196472,
-0.562471866607666,
-0.05395897850394249,
0.7461543083190918,
-0.19541732966899872,
0.213181346654891... | |
any application. | [
0.18371467292308807,
0.32936450839042664,
0.26915243268013,
0.09588406980037689,
0.05294197052717209,
-0.23821045458316803,
0.07177052646875381,
-0.09775390475988388,
0.06407344341278076,
-0.4060363471508026,
-0.37936165928840637,
0.1655801385641098,
0.006829083897173405,
-0.16129443049430... | |
Currently, I have two selenium-junit tests configured to run on bamboo about the same time. One test runs on MachineA (selenium etc. installed) and the other on MachineB (selenium etc. installed). When kicked off, bamboo builds the one on machineA and enqueues the one on machineB. My question is why cant bamboo handle ... | [
0.574588418006897,
-0.002542358124628663,
0.1716320961713791,
0.2325199693441391,
-0.30284565687179565,
0.08795205503702164,
0.07373465597629547,
-0.1569320112466812,
0.016433630138635635,
-0.5726954340934753,
0.12416838854551315,
0.3029211759567261,
-0.04091665893793106,
-0.10316003859043... | |
copy," they are going to have a hard time grasping a distributed version control system.
In my experience, to use svn-git, you have to know how to use git AND you have to know how to use svn. I'd recommend teaching them to use svn correctly. | [
0.378248393535614,
0.1261415034532547,
0.06319347769021988,
0.30814215540885925,
0.15266987681388855,
-0.4353378713130951,
0.06231946498155594,
0.41507261991500854,
-0.16617712378501892,
-0.4940930902957916,
0.10961989313364029,
0.672547459602356,
-0.19101159274578094,
0.024126363918185234... | |
```
try
{
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey(
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (rkApp.GetValue("AdobeBitmapViewer") == null)
{
rkApp.SetValue("AdobeBitmapViewer", Application.ExecutablePath.ToString());
}
rkApp.Close();
}
catch (Except... | [
0.0030201347544789314,
0.14742878079414368,
0.7214831113815308,
-0.1914062798023224,
0.3676963746547699,
-0.3172188103199005,
0.5584293603897095,
-0.46239855885505676,
0.008777077309787273,
-0.629011869430542,
-0.2333497852087021,
0.7725337743759155,
-0.3481445908546448,
-0.011692475527524... | |
`MouseDown`, `MouseUp`, and `MouseMove` methods to add resizing functionality to the control.
I think that's a better solution than trying to draw onto a `TPanel` in your application code for a couple of reasons:
1. The `Canvas` property is protected in `TPanel`, so you have no access to it from outside the class. Yo... | [
0.3358192443847656,
-0.13559859991073608,
0.12241016328334808,
-0.006368125323206186,
0.06796257942914963,
-0.12100456655025482,
0.24758881330490112,
-0.24155355989933014,
-0.22041550278663635,
-0.6810151934623718,
0.014166243374347687,
0.7413659691810608,
-0.21436338126659393,
0.047737523... | |
class(TPanel)
private
FDragOrigin: TPoint;
FSizeRect: TRect;
protected
procedure Paint; override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseBu... | [
-0.42858898639678955,
-0.5198272466659546,
0.21247465908527374,
-0.029117174446582794,
0.19516801834106445,
0.33797088265419006,
0.10852126032114029,
-0.3642536699771881,
0.010192224755883217,
-0.4892653822898865,
-0.5439715385437012,
0.7380608916282654,
-0.18508487939834595,
-0.0476427748... | |
// with the Canvas.Font property.
end;
procedure TSizeablePanel.MouseDown;
begin
if (Button = mbLeft) and (Shift = [])
and PtInRect(FSizeRect, Point(X, Y)) then begin
FDragOrigin := Point(X, Y);
// Need to capture mouse events even if the mouse
// leaves the control. See also: ReleaseCapture.
... | [
-0.019036980345845222,
-0.45496952533721924,
0.4743799865245819,
-0.31560438871383667,
0.34884020686149597,
0.0970320776104927,
0.26600122451782227,
-0.37679246068000793,
-0.31562092900276184,
-0.4790840744972229,
-0.47196871042251587,
0.6119027733802795,
-0.3598586320877075,
-0.1794771254... | |
In a DirectoryWalker class I want to find out if a File instance is actually a symbolic link to a directory (assuming, the walker walks on UNIX systems). Given, I already know the instance is a directory, would the following be a reliable condition to determine the symbolic link?
```
File file;
// ...
if (file.g... | [
0.05354844033718109,
-0.20176911354064941,
0.38758280873298645,
0.07294447720050812,
0.1261797696352005,
-0.28519243001937866,
0.42211541533470154,
-0.20269334316253662,
-0.15555967390537262,
-0.7794371247291565,
0.011951100081205368,
0.4432832598686218,
-0.2132650762796402,
-0.07808551937... | |
not the file itself. I don't think that you can guarantee that a mismatch is due to a symbolic link, but it's a good indication that the file needs special treatment.
This is [Apache code](https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/FileUtils.java) (subject to [their license](h... | [
0.1436086893081665,
0.12237602472305298,
0.594081461429596,
-0.13463997840881348,
-0.17380446195602417,
-0.13549165427684784,
0.33442023396492004,
-0.45776379108428955,
-0.3052310347557068,
-0.3502231538295746,
-0.2826480269432068,
0.46252864599227905,
-0.43673262000083923,
0.2893631160259... | |
return !canon.getCanonicalFile().equals(canon.getAbsoluteFile());
}
``` | [
-0.09003821015357971,
0.08547531068325043,
0.7311354875564575,
-0.21745598316192627,
0.34723538160324097,
-0.09333658218383789,
0.24009349942207336,
-0.12854240834712982,
-0.07096554338932037,
-0.5879586338996887,
-0.24514196813106537,
1.1607084274291992,
-0.19621722400188446,
-0.020476201... | |
I am profiling the booting process of power PC board, what is the simplest way to profile the booting sequence ?
My first idea is to modify the u-boot/kernel code add printf/printk (using realtime device as reference) and print them on the console. However just printing them on the console may affect the time.
Any th... | [
0.6501822471618652,
0.059420425444841385,
0.06096777319908142,
0.20244786143302917,
0.07188279926776886,
0.07485387474298477,
-0.11022322624921799,
0.0669470801949501,
-0.1623033583164215,
-0.7763264775276184,
0.13608689606189728,
0.8517674207687378,
-0.06370100378990173,
0.011219747364521... | |
Is there a way to keep a window inactive looking, even if it contains focus? I have two forms (A and B). After the user interacts with A, I transfer focus back to B. The result of the focus transfers (the user clicking on the A, then focus being transferred back to B) is that form A blinks from active to inactive. This... | [
0.6218960285186768,
-0.06039133667945862,
0.6711600422859192,
-0.25139904022216797,
-0.31197208166122437,
0.07039080560207367,
0.4592265486717224,
0.08857652544975281,
-0.27074384689331055,
-0.6497215032577515,
-0.21219941973686218,
0.5071132779121399,
-0.38199836015701294,
0.0223351251333... | |
Doing so will confuse your users and will be harmful to the computing experience in general. The technique described below can be very useful under certain circumstances (e.g implementing IntelliSense-like behavior), but *please* be judicious in your usage of it.
The [WM\_NCACTIVATE](http://msdn.microsoft.com/en-us/li... | [
0.022987231612205505,
-0.4665108323097229,
0.5242876410484314,
0.0011022209655493498,
0.34363722801208496,
-0.180525541305542,
0.536777675151825,
-0.11061006039381027,
-0.20815744996070862,
-0.6853189468383789,
-0.4459511935710907,
0.295308917760849,
-0.2780676782131195,
0.265287846326828,... | |
the window will look inactive. To force a window to stay either inactive or active, override the wParam by setting it to the corresponding value (0 or 1), and you will be all set!
```
private const int WM_NCACTIVATE = 0x0086;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_NCACTIVATE)
{
... | [
0.15423771739006042,
-0.3410017788410187,
0.7801725268363953,
-0.40358036756515503,
0.43804919719696045,
-0.2026803344488144,
0.47901901602745056,
0.13364699482917786,
-0.4546210467815399,
-0.6428264379501343,
-0.5654592514038086,
0.7089806199073792,
-0.6772348880767822,
0.2099847346544265... | |
m.WParam = (IntPtr)1;
}
base.WndProc(ref m);
}
``` | [
-0.0261530764400959,
-0.052111245691776276,
0.43521565198898315,
-0.6028763651847839,
0.19326689839363098,
0.10385163873434067,
0.6159717440605164,
-0.5134245753288269,
-0.2602928578853607,
-0.582552969455719,
-0.38521260023117065,
0.6236775517463684,
-0.3578042685985565,
0.285489141941070... | |
I am looking for a command line tool, or a library (preferably in Perl) to download an HTML page and all its components: external CSS, external JavaScript, images, flash or other objects, etc.
I have not found a tool to do that. I could download the HTML page, and parse the HTML to find all the external links. But I'd... | [
0.5527491569519043,
0.0988318994641304,
0.1401696801185608,
0.2647916376590729,
-0.18780066072940826,
-0.08643165975809097,
-0.12499609589576721,
0.2407967746257782,
-0.2758924961090088,
-0.6022932529449463,
0.05985394865274429,
0.6668022274971008,
-0.06888444721698761,
0.217070534825325,
... | |
Being a pretty experienced PHP developer, and having a fair knowledge of C (Wrote a distributed computing experiment with 16 of my Dad's NEC microcontrollers), I'd like to make the move to Objective-C and Cocoa, eventually aiming to integrate the Mac / iPhone apps with some of my PHP projects.
Going through the "Cocoa... | [
0.3146776258945465,
0.4427790641784668,
-0.3719874918460846,
0.06550826132297516,
-0.21113042533397675,
0.05738592892885208,
0.1863175928592682,
0.29651036858558655,
-0.3123868405818939,
-0.4046373665332794,
0.06118203327059746,
0.6202259659767151,
-0.3418261706829071,
-0.4327020049095154,... | |
lean Objective-C first. My question is, what would be a good book? I'm looking at "Programming In Objective-C 2.0" and it looks pretty decent. Where would I go from there? I'm thinking I should then re-start on my Cocoa book.
Also, are there any resources on the internet that would help in the transition from PHP to O... | [
0.23118779063224792,
0.16012749075889587,
0.23321495950222015,
0.0020709210075438023,
-0.25105375051498413,
-0.1300124078989029,
0.06275258958339691,
0.3786296546459198,
-0.03874315321445465,
-0.5375027656555176,
0.49431896209716797,
0.7850044965744019,
0.015819218009710312,
-0.40224221348... | |
easy on me if I made any mistakes in my Q. )
I've just gone through "Programming In Objective-C 2.0" myself, and it's pretty good. I'd recommend it, especially if you've never used C (or if you've forgotten it, like me).
However, Apple really has excellent documentation. If you don't mind reading online, I'd start wit... | [
-0.21528781950473785,
0.25403809547424316,
0.22489608824253082,
0.004382850136607885,
-0.014385990798473358,
-0.2842097878456116,
0.10625782608985901,
0.21500547230243683,
-0.6179614067077637,
-0.3663031756877899,
-0.18685124814510345,
1.0335770845413208,
-0.03660987317562103,
-0.519370853... | |
I started with a question, and in typing the question, found the answer, but instead of deleting, I thought it might be helpful to A) get confirmation, and B) help others.
If I have an event, and several places in the application add listeners, what is the best way to remove all listeners at once? For example, I can .... | [
0.3407702147960663,
0.2259731888771057,
0.2359057515859604,
-0.07116856426000595,
-0.017678171396255493,
-0.17484095692634583,
0.40067896246910095,
-0.07311856746673584,
-0.1969163417816162,
-0.3207201361656189,
-0.19973933696746826,
0.627195417881012,
-0.363517165184021,
0.252278745174407... | |
the EventHandler, because the operator overloads are public. The = overloaded operator is private it can only be called in the defining class.
So in the defining class I can use this to clear my EventHandler.
```
OnPageOpened = null;
```
And to expose that functionality, I could ...
```
public void ClearPageOpened... | [
-0.21045686304569244,
0.04148761183023453,
0.38791027665138245,
0.046267855912446976,
-0.02565191313624382,
-0.3286765515804291,
0.07303138822317123,
-0.25270745158195496,
-0.09565797448158264,
-0.591088593006134,
-0.30560237169265747,
0.5657744407653809,
-0.4575504660606384,
0.13869015872... | |
have a reference to the private `delegate` instance, so that's why you can do the assignment. You definitely want to expose a method to clear the targets if that's functionality you need; you don't want to expose the `delegate` itself. | [
0.4781951308250427,
-0.12598374485969543,
-0.4587346315383911,
0.39631497859954834,
-0.1825607717037201,
-0.49917110800743103,
0.18512944877147675,
-0.03316068276762962,
-0.2964324355125427,
-0.5568286180496216,
-0.1729934960603714,
0.3977070748806,
-0.015460897237062454,
-0.27825134992599... | |
I've been using xdebug to debug and understand code in php projects for a while now, and have sometimes come into situations where it's been unclear what's going on inside of PHP.
Is it possible to set xdebug or gdb up so that i can trace into actual php builtin functions?
If you are using a macosx, solaris or recent ... | [
0.7051903605461121,
0.05381544306874275,
-0.05009957402944565,
0.22128161787986755,
-0.10444404184818268,
-0.4655229151248932,
0.06563544273376465,
0.25095635652542114,
-0.11394796520471573,
-0.5904147624969482,
0.3009296655654907,
0.657071053981781,
-0.27595028281211853,
0.055591702461242... | |
A co-worker and I are both working on the master branch at the moment. I have some code in my working tree that I don't want to commit (debugging statements and the like). Now if he commits changes to some of those same files, I can't merge them:
```
$ git merge origin/master
Updating 1b8c5c6..eb44c23
error: Entry 'bl... | [
0.4379902780056,
0.32770824432373047,
-0.008841314353048801,
-0.279388964176178,
0.1704668253660202,
-0.11668723821640015,
0.2931689918041229,
-0.2718609869480133,
-0.1813875287771225,
-0.907406210899353,
-0.12268438190221786,
0.4774809777736664,
-0.46399369835853577,
0.34458109736442566,
... | |
git merge origin/master
$ git stash pop
```
Essentially, removing my uncommitted changes, doing the merge and then re-applying the changes. How can I tell merge to automatically merge my working tree with the changes I'm trying to pull in?
As far as I can tell, the best you can do is what you already have with `git s... | [
0.4904225468635559,
0.05149101838469505,
0.1790085732936859,
-0.09701818227767944,
0.01999048888683319,
-0.11482887715101242,
0.13886339962482452,
-0.15451133251190186,
-0.006817790679633617,
-0.9545985460281372,
-0.07997941225767136,
0.48602059483528137,
-0.39060255885124207,
0.2222960889... | |
I need to output a file in the format of a Word document from a Ruby-based web app (Rails/Sinatra) based on some textual content in the app. Is there library support in Ruby for creating and structuring a Word document?
Take a look at [WordML](http://msdn.microsoft.com/en-us/library/aa212812(office.11).aspx), the XML f... | [
0.4081161916255951,
0.2583524286746979,
0.2323782593011856,
0.118297278881073,
-0.10448189824819565,
-0.049248628318309784,
0.3582366704940796,
-0.4135422706604004,
0.05188038945198059,
-0.55672687292099,
0.12385255098342896,
0.5048018097877502,
-0.06635738909244537,
0.09115112572908401,
... | |
ASP.Net](https://stackoverflow.com/questions/409020/generating-wordml-reports-using-templates-and-xpath-using-asp-net)
* [Convert XHTML to Word ML](https://stackoverflow.com/questions/299235/convert-xhtml-to-word-ml)
* [XML to WordML using XSLT 1.0 - replace html tags within xml content with wordML formatting tags](htt... | [
-0.15092115104198456,
-0.10423640161752701,
0.8452481031417847,
0.012564079836010933,
-0.4493129551410675,
-0.0031860361341387033,
0.15874791145324707,
-0.44033047556877136,
-0.4549225866794586,
-0.4483855664730072,
-0.5048601627349854,
0.5166822075843811,
-0.20727823674678802,
-0.37072539... | |
Is there a Zenburn theme for Netbeans?
You can try [Aloha color theme](http://blog.huikau.com/2008/04/28/aloha-color-theme-for-netbeans-61/) for Netbeans. It's similar to Zenburn.
UPDATE: for NetBeans 6.9 - [zenburn color scheme](http://forums.netbeans.org/topic29869.html) | [
0.05352255702018738,
-0.2667686641216278,
0.37423214316368103,
0.09069785475730896,
-0.03636178746819496,
-0.48730772733688354,
0.0471431128680706,
-0.021652432158589363,
-0.16087307035923004,
-0.30966824293136597,
0.1847343146800995,
0.4524545669555664,
-0.26471975445747375,
0.05866848304... | |
I've created a site for an artist friend of mine, and she wants the layout to stay the same, but she also wants new paintings she'd produced to be mixed into the current layout. So I have 12 thumbnails (thumb1 - thumb12) on the main gallery page and 18 images (img1 - img18) to place as well
The approach I thought of w... | [
0.7462450265884399,
0.06902410835027695,
0.3830925524234772,
0.08832404762506485,
0.16840580105781555,
0.4731408953666687,
-0.08133537322282791,
-0.1676052063703537,
-0.6571657061576843,
-0.660414457321167,
0.2585754692554474,
0.4184900224208832,
-0.1302775740623474,
0.15406082570552826,
... | |
first case, I can't find a way to randomize the elements of an array. In the latter case, I can't wrap my brain around how to keep images from loading more than once, other than using a second array, which seems very inefficient and scary.
I'm doing all of this in Javascript, by the way.
I wrote this a while ago and i... | [
0.24777448177337646,
-0.1912267655134201,
-0.24953094124794006,
-0.18824024498462677,
-0.022075120359659195,
0.03783193230628967,
0.01471917424350977,
-0.42094480991363525,
-0.33070963621139526,
-0.6651146411895752,
0.39285629987716675,
0.3877456784248352,
-0.5941675305366516,
0.1056448146... | |
= Math.floor(Math.random() * (i + 1))
var temp = this[i];
this[i] = this[j];
this[j] = temp;
}
return this; // for convenience, in case we want a reference to the array
};
```
Note that modifying Array.prototype may be considered bad form. You might want to implement this as a standalone meth... | [
0.07107367366552353,
-0.13054819405078888,
0.16464534401893616,
-0.15593181550502777,
-0.07239975035190582,
0.01286243088543415,
0.2383088916540146,
-0.3241402804851532,
-0.43723034858703613,
-0.4689548909664154,
-0.05455595627427101,
0.06958061456680298,
-0.3457685112953186,
0.24707640707... | |
When compiling shared libraries in gcc the -fPIC option compiles the code as position independent. Is there any reason (performance or otherwise) why you would not compile all code position independent?
It adds an indirection. With position independent code you have to load the address of your function and then jump to... | [
0.0975707471370697,
-0.4905737340450287,
-0.0612143874168396,
0.20380422472953796,
-0.005765970330685377,
-0.06978841125965118,
-0.23930825293064117,
-0.20542387664318085,
-0.1843271106481552,
-0.2747989892959595,
-0.21749331057071686,
0.5395220518112183,
-0.45652782917022705,
-0.255605280... | |
I started to use Json.NET to convert a string in JSON format to object or viceversa. I am not sure in the Json.NET framework, is it possible to convert a string in JSON to XML format and viceversa?
Yes. Using the JsonConvert class which contains helper methods for this precise purpose:
```
// To convert an XML node co... | [
0.07055164873600006,
-0.173320472240448,
0.5396062135696411,
-0.13415253162384033,
-0.17780692875385284,
-0.1846814751625061,
0.152260884642601,
-0.18130820989608765,
-0.2836255729198456,
-0.7855050563812256,
-0.3741060495376587,
0.525229811668396,
-0.3693126440048218,
0.05347156152129173,... | |
What is the best method of using native menus in C#?
Edit:
I want to use the native menu because it's better looking than the ugly .NET menu.
Can someone explain to me exactly how I can use it?
In the [System.Windows.Forms](http://msdn.microsoft.com/en-us/library/system.windows.forms.aspx) namespace, you'll find the c... | [
0.06097821518778801,
-0.07079125940799713,
0.2023560255765915,
0.013917852193117142,
-0.10963814705610275,
0.2920498251914978,
0.028988610953092575,
0.08823339641094208,
-0.17023727297782898,
-0.920936644077301,
-0.16288216412067413,
0.8617950081825256,
-0.17345060408115387,
-0.17866151034... | |
use the controls .NET provides for to display menus, as mentioned above. Whichever ones you use depends on what you're trying to accomplish. The simplest option for attaching a main menu to a form is using the `Menu` object, populated with a `MenuItem` set. | [
0.31857502460479736,
-0.3418174982070923,
0.21718984842300415,
0.27321261167526245,
0.05290040373802185,
-0.09478940814733505,
-0.07079769670963287,
0.04568055644631386,
-0.1583808958530426,
-0.8803672194480896,
-0.18924614787101746,
0.5306774377822876,
-0.36681318283081055,
-0.08065371960... | |
In the past it was my understanding that the Lat/Lon of an airport had to be on the same line (L 300216 0915302 '2425 29865997) with 300216/0915302 being the Lat/Lon. I just found out that the users can also put the Lat/Lon on different lines.
```
I ARA '* ACADIANA AIRPORT ... | [
0.16719844937324524,
-0.03614038974046707,
0.15194204449653625,
0.10094492882490158,
0.4048219323158264,
0.033674005419015884,
-0.10972647368907928,
0.3480077385902405,
-0.32566186785697937,
-0.6740325093269348,
-0.11495202779769897,
0.2394852638244629,
-0.504831850528717,
-0.0671079158782... | |
L 300216 '2425 29865997
0915302 | [
-0.1357063353061676,
0.23179307579994202,
0.17744117975234985,
0.04932776466012001,
-0.2511627674102783,
0.3828957676887512,
0.020404495298862457,
-0.04755299538373947,
-0.35782501101493835,
-0.4473423361778259,
-0.18943288922309875,
0.6740931272506714,
-0.05113372579216957,
0.551604807376... | |
'2425 29865998
S MSY 29865999 | [
-0.3362225890159607,
0.1496516466140747,
0.37557992339134216,
-0.030487945303320885,
-0.25409477949142456,
0.3289875090122223,
0.3186796307563782,
0.16612420976161957,
-0.7474083304405212,
-0.47413399815559387,
-0.4947561025619507,
0.43945765495300293,
0.08541278541088104,
0.72150975465774... | |
M 05E 29866000
P 100 0300 | [
-0.24751226603984833,
0.39243394136428833,
0.18418090045452118,
0.10013920813798904,
-0.14838242530822754,
0.10785769671201706,
0.7140851616859436,
-0.008712729439139366,
-0.014353130012750626,
-0.4842604100704193,
-0.3352970778942108,
0.2623507082462311,
0.20784126222133636,
0.40744465589... | |
29866001
P 239 3405 29866002
P | [
-0.42911145091056824,
0.32256239652633667,
-0.07034029811620712,
0.1362859010696411,
-0.25113287568092346,
0.1825718730688095,
0.35965457558631897,
-0.12693534791469574,
-0.28407004475593567,
0.11363469809293747,
-0.16438892483711243,
0.3186625838279724,
-0.17740590870380402,
0.70018935203... | |
999 7001 O 29866003
```
How do I amend my RegEx to trap any 6 digits followed by 7 digits preceded by an L with no alphas between?
Thanks!
As for matching
> any 6 digits followed by 7 digits preceded by an L with no alphas between
you can use the pattern:
```
\bL\s*\d{6}\s... | [
-0.01746443286538124,
0.19311074912548065,
0.8139670491218567,
-0.1574186533689499,
-0.11748456954956055,
0.28396090865135193,
0.24535691738128662,
-0.12261772900819778,
-0.2599596679210663,
-0.32058337330818176,
-0.2391345500946045,
0.3410401940345764,
-0.25756752490997314,
-0.20643410086... | |
by boundaries. When it comes to matching across multiple lines, this is usually a flag you can set with the regex engine you're using. The \s will match the newlines just fine, but only if you have the multi-line flag set. | [
0.5673111081123352,
-0.46224245429039,
0.5139087438583374,
0.34276413917541504,
0.0032418137416243553,
-0.18194720149040222,
-0.02960418350994587,
-0.30282479524612427,
-0.17762821912765503,
-0.8319145441055298,
0.04343686252832413,
0.14972235262393951,
-0.3462837040424347,
0.1283984184265... | |
The debug configuration of my app is built against:
```
PYTHON25_D.DLL
MSVCR80D.DLL
```
We use Python .PYD files in our application. Some of these .PYD are .PY converted by PY2EXE to .PYD.
When I run PY2EXE on MYSCRIPT.PY, I get the following .PYD and dependencies:
```
MYSCRIPT.PYD
PYTHON25.DLL
MSVCR71.DLL... | [
0.029430396854877472,
0.389845609664917,
0.3254130780696869,
-0.047758251428604126,
0.10846097022294998,
0.30926278233528137,
0.3827773630619049,
-0.3390103280544281,
-0.08074165135622025,
-0.775477945804596,
-0.3156582713127136,
0.6047753691673279,
-0.6082592606544495,
0.05036109685897827... | |
<-- debug version of Python
MSVCR80D.DLL <-- ver 8.0, Debug
KERNEL32.DLL
```
How can this be done?
Have a look at [this quick guide](http://aralbalkan.com/1466), in essence:
> Add a CNAME for www.yourdomain.com and
> point it to ghs.googlehosted.com.
>
>
> Sign in to your application via
> ap... | [
0.2731567621231079,
0.26313522458076477,
0.5130608081817627,
0.12539789080619812,
0.1928810030221939,
0.11515556275844574,
0.20878241956233978,
0.21889841556549072,
-0.29881522059440613,
-0.5047528147697449,
-0.008859237655997276,
0.17069540917873383,
-0.1979839950799942,
0.301473230123519... | |
>
> Add www.yourdomain.com in
> the domain name box and click the Add
> Domain... button | [
0.507073163986206,
-0.2623729407787323,
0.6886093616485596,
0.0818507969379425,
-0.1769714057445526,
-0.3694646656513214,
-0.008602437563240528,
0.4778723120689392,
-0.19286300241947174,
-0.681467592716217,
-0.09505268931388855,
0.4094686210155487,
-0.30698564648628235,
0.4663526117801666,... | |
Is it possible to convert some of the dlls of .Net framework 3.5 and use it in .Net framework 2.0?
I really need the managed named pipes namespace in .Net 2.0 :-(
Thanks
You can use the C# 3.0 compiler features in .NET 2.0 with a few tricks - but you aren't going to be able to use framework dlls / types / methods tha... | [
0.6049585342407227,
-0.02654935233294964,
0.1403089016675949,
0.12099716812372208,
-0.207428976893425,
-0.1874198317527771,
0.34481117129325867,
-0.030170943588018417,
-0.021964048966765404,
-0.9020507335662842,
0.0948738306760788,
0.7025833129882812,
-0.2172868400812149,
-0.14179171621799... | |
without the framework feature you want. | [
0.42527905106544495,
0.09635666757822037,
-0.11923137307167053,
0.10445204377174377,
-0.040531039237976074,
-0.31738489866256714,
0.42724519968032837,
0.1410699188709259,
-0.09292227774858475,
-0.34283238649368286,
-0.05969798192381859,
0.488705039024353,
-0.42014265060424805,
0.1414236873... | |
I want to target IE7 and IE8 with W3C-compliant CSS. Sometimes fixing CSS for one version does not fix for the other. How can I achieve this?
**Explicitly Target IE versions without hacks using HTML and CSS**
Use this approach if you don't want hacks in your CSS. Add a browser-unique class to the `<html>` element so y... | [
0.3355690538883209,
-0.01564730517566204,
0.43196818232536316,
-0.14934135973453522,
-0.02993779629468918,
-0.08751523494720459,
0.2841494381427765,
-0.2855214476585388,
0.030315566807985306,
-0.9018173217773438,
-0.21758675575256348,
0.47156181931495667,
-0.28870779275894165,
-0.068072549... | |
<![endif]-->
<!--[if IE 9 ]> <html lang="en" class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
<head></head>
<body></body>
</html>
```
Then in your CSS you can very strictly access your target browser.
Example
```
.ie6 body {
border:1px solid red;
}
.ie7 bod... | [
0.18233029544353485,
-0.044622909277677536,
0.7437041401863098,
-0.12413237243890762,
-0.3139755427837372,
-0.11864092946052551,
0.0952627956867218,
-0.2435670644044876,
-0.27307644486427307,
-0.9733709692955017,
-0.342276930809021,
0.3742816150188446,
-0.02311326563358307,
-0.247865080833... | |
{
border:1px solid red; /* standard */
border:1px solid blue\9; /* IE8 and below */
*border:1px solid orange; /* IE7 and below */
_border:1px solid blue; /* IE6 */
}
```
**Update: Target IE10**
IE10 does not recognize the conditional statements so you can use this to apply an "ie10" class to the `<html>` element
`... | [
0.16829745471477509,
-0.17201519012451172,
0.8000122308731079,
0.013244294561445713,
-0.06199513375759125,
0.09448728710412979,
0.19488033652305603,
-0.4913177788257599,
-0.25032034516334534,
-0.7312012910842896,
-0.3565604090690613,
0.31278350949287415,
-0.21812018752098083,
-0.2090712189... | |
i have made a website in php.
There is a list of stories title stored in database and when user click any title among them then user is redirected to a page with a query string on it. like story.php?id=25
This means story with id 25 is now going to be displayed.
Now i want to rewrite URL but when i rewrite it there ... | [
0.4065369665622711,
0.11972560733556747,
0.5264325141906738,
0.1820729672908783,
-0.36721351742744446,
-0.23967351019382477,
0.2419327199459076,
-0.053983595222234726,
-0.24734731018543243,
-0.776023805141449,
0.23432067036628723,
0.5310546159744263,
0.032177627086639404,
0.221599921584129... | |
url string you could do this.
<http://www.domain.com/story.php?story=25&title=some_name>
Which after re-write could be this.
<http://www.domain.com/25/some_name.html>
**Code:**
```
RewriteEngine On
RewriteRule ^story/([^/]*)/([^/]*)\.html$ /story.php?story=$1&title=$2 [L]
``` | [
0.28209951519966125,
0.06196365877985954,
0.6319046020507812,
-0.008080162107944489,
-0.1901199370622635,
-0.20226562023162842,
0.23887524008750916,
-0.11793532967567444,
-0.22913871705532074,
-0.308297336101532,
-0.09728988260030746,
0.39615049958229065,
-0.0560433566570282,
0.50096660852... | |
I am interested to know how the DNS requests to political sites differ in different countries.
I need to know how I can send a DNS query to a remote computer, let say, in China. Then, I want to compare the results to US. The goal of the experiment is to get a hand-on experience on the concept about DNS poison. I feel... | [
0.8478226065635681,
0.15344423055648804,
0.08474893122911453,
0.38719695806503296,
-0.1957736760377884,
0.001431974465958774,
-0.08227107673883438,
0.2119874805212021,
-0.09747310727834702,
-0.4400714337825775,
0.26577228307724,
-0.18152305483818054,
0.21381749212741852,
0.0501965098083019... | |
based on your locality, then asking it directly will not be of any use. If you're queries are being poisoned by a caching server in between, these methods might help.
If you have shell accounts in different parts of the world you can perform a simple test.
I'm using 'dig', which is available on most \*nix systems. If... | [
0.561985194683075,
0.04927767068147659,
0.10085424035787582,
0.10507360100746155,
-0.2636960744857788,
-0.21188776195049286,
0.21212540566921234,
-0.139778733253479,
-0.12457913905382156,
-0.6544685363769531,
0.13562099635601044,
0.44615480303764343,
-0.16179800033569336,
0.178929150104522... | |
can skip the @.. part to run with your current server)
I recommend trying both of these from different parts of the world to see if the server itself is giving different results or if the caching servers on the way there are being poisoned.
Also, searching for 'how to poison dns' gave me a number of practical results... | [
0.5750744342803955,
-0.15519402921199799,
0.12169851362705231,
0.27365440130233765,
-0.18662022054195404,
-0.18359407782554626,
0.32850709557533264,
0.1399860829114914,
-0.027007175609469414,
-0.47794416546821594,
0.3612823188304901,
0.4032677114009857,
-0.21595072746276855,
-0.01908718794... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.