text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
out anyway:
```
denom = (x1 - x2)(x1 - x3)(x2 - x3)
a = (x3 * (y2 - y1) + x2 * (y1 - y3) + x1 * (y3 - y2))
b = (x3^2 * (y1 - y2) + x2^2 * (y3 - y1) + x1^2 * (y2 - y3))
c = (x2 * x3 * (x2 - x3) * y1 + x3 * x1 * (x3 - x1) * y2 + x1 * x2 * (x1 - x2) * y3)
```
and then the coordinates of the vertex are `-b / 2a` and `(c... | [
-0.17016243934631348,
0.31056925654411316,
0.44990479946136475,
-0.3102389872074127,
-0.12814581394195557,
0.2260541170835495,
0.45598748326301575,
-0.21795450150966644,
-0.3657793700695038,
-0.2993994951248169,
-0.28365156054496765,
-0.12067461013793945,
-0.24749380350112915,
0.0311946608... | |
might benefit from "tricks" like this, such as if `A` is very large or very small, or if `C` is nearly equal to `B^2 / 4A` so that their difference is very small, but I think those situations vary enough that a full discussion would be better left for case-by-case followup questions.
Converting all of this to code in ... | [
-0.030331259593367577,
0.1927669644355774,
0.2181302011013031,
-0.016012530773878098,
0.11638877540826797,
-0.11048731952905655,
0.1546870768070221,
-0.4131455421447754,
0.08775146305561066,
-0.2309427708387375,
-0.24955524504184723,
0.5994181036949158,
-0.1817956417798996,
-0.422667175531... | |
would be obvious, but it seems there are a lot of people who like having it mentioned explicitly. | [
1.0015239715576172,
0.22427211701869965,
-0.021150602027773857,
0.05985325574874878,
0.09468967467546463,
-0.3385757803916931,
0.08851794898509979,
0.25400659441947937,
-0.1526075154542923,
-0.052615974098443985,
0.014698187820613384,
0.1368214637041092,
0.026507845148444176,
0.36565479636... | |
**I'm sorry, didn't know that Length is computed at construction time!!**
I got 200 char long string A, 5 char long string B
If I do
```
int Al = A.length;
int Bl = B.length;
```
and compare it -- all seems fine BUT If I do this few million times to
calculate something, it's too expensive for the thing I need.
... | [
0.3394927978515625,
0.2712860703468323,
0.17777474224567413,
-0.15859469771385193,
-0.14919117093086243,
0.25221988558769226,
0.4761510193347931,
-0.20826499164104462,
-0.0937298983335495,
-0.721130907535553,
0.23193787038326263,
0.42386704683303833,
0.029941242188215256,
0.064920015633106... | |
return TRUE for function.
Yes,
I know that the function wouldn't have any idea which string is shorter, but if lengths of the two strings would be counted in parallel so when one exceeds the other, function knows what to "answer".
Thanks for any hints.
If you only need to know whether the strings differs in length (o... | [
0.25595006346702576,
-0.19684509932994843,
-0.014402352273464203,
0.12275408953428268,
-0.18163879215717316,
0.14328229427337646,
0.42721569538116455,
-0.2387542724609375,
0.049929164350032806,
-0.45436692237854004,
0.24013470113277435,
0.7580400705337524,
-0.18515926599502563,
0.018652034... | |
character, which makes it an O(n) operation.
*Edit:*
If things runs too slowly, you should try to have a look in a profiler, what is the slowest parts ? Perhaps it is the construction of your strings that takes the time ? | [
-0.1115778237581253,
-0.3814246356487274,
0.06529445201158524,
0.29325440526008606,
0.15400363504886627,
0.4432489573955536,
0.24448037147521973,
0.17515438795089722,
-0.5427282452583313,
-0.4605944752693176,
0.10777168720960617,
0.3285685181617737,
-0.0351996049284935,
-0.2576771378517151... | |
In my iPhone application, I have a tab bar. This tab bar holds a UINavigationController. I have:
* In Interface Builder set the tab item title to 'Create New'
* In the UINavigation controller I have `self.tabBarItem.title = 'Create New';` and `self.title = 'Create New';`
* In the UIViewController pushed onto the contr... | [
-0.017419179901480675,
-0.04900519922375679,
0.7664211988449097,
-0.05526212602853775,
-0.008175323717296124,
0.246641606092453,
0.17011405527591705,
-0.1355867087841034,
-0.2519075572490692,
-1.0092504024505615,
-0.0485738106071949,
0.6817787289619446,
-0.2750440239906311,
0.1324063241481... | |
This seems to be the REST principal that I've had the hardest time wrapping my head around. I understand that when desiging a rest api most of the effort should go into designing/describing hypertext for the application. Any pointers to real world applications of this principal ? How does atom protocol apply this princ... | [
0.29154154658317566,
-0.15051351487636566,
0.2168305665254593,
0.23745694756507874,
-0.035945504903793335,
-0.37266650795936584,
0.20710274577140808,
0.4205849766731262,
-0.13028322160243988,
-0.48725199699401855,
0.05529874190688133,
0.4278121292591095,
-0.1901901364326477,
0.048103217035... | |
do, you follow various links on the page. That's really the core of what "hypertext as the engine of application state" boils down to. In this example, application state is the state in your head and the page you're on. Based on that, you traverse further links, which alters the application state in your head.
There's... | [
0.19442196190357208,
0.20794594287872314,
0.45845702290534973,
0.32974693179130554,
-0.10447844862937927,
-0.06840662658214569,
0.2579593062400818,
0.14565861225128174,
-0.0021200585179030895,
-0.7164720296859741,
-0.0805773213505745,
0.32976895570755005,
-0.23986594378948212,
0.3370231986... | |
things like URI template), or the URIs to follow should be present. Beyond that, a RESTful HTTP application shouldn't care about the structure of the URIs.
**UPDATE:** To expand on things, HTML forms demonstrate HATEOAS too. Forms that use GET are analogous to the use of URI templates. And HATEOS isn't limited to just... | [
0.25995898246765137,
0.02757623791694641,
0.45598649978637695,
0.14474289119243622,
-0.5004137754440308,
-0.35524213314056396,
0.38792604207992554,
0.2083977311849594,
-0.23849983513355255,
-0.8090877532958984,
-0.14522524178028107,
-0.0007395321736112237,
-0.3698962926864624,
0.0296025276... | |
This is odd, but for some reason the `$_SERVER["SCRIPT_URI"]` will not return the domain name when I am in child/sub-pages but will only work on the main page. Not sure if its due to the script (WordPress) or host, but please can you suggest any reliable solution to retrieve the domain name with PHP?
If you need domain... | [
0.08320096880197525,
0.2896344065666199,
0.5192322731018066,
0.11796566098928452,
-0.10258355736732483,
-0.2951600253582001,
0.34240734577178955,
0.37202152609825134,
-0.0688222348690033,
-0.7182772159576416,
0.03938891366124153,
0.2600213587284088,
0.008048707619309425,
0.6205820441246033... | |
I have an array that might be present in my .aspx page, if it is, I want to fire a javascript function.
I tried:
```
if(someArray)
blah(someArray);
```
but I get an error when I havent' defined someArray.
You should probably be pre-defining the array as null and check to see if it resolves, rather than *some... | [
0.24113398790359497,
0.01327955536544323,
0.1590607464313507,
-0.3006574511528015,
-0.30365145206451416,
-0.049735087901353836,
0.1738831102848053,
0.2851220369338989,
-0.25215739011764526,
-0.5260378122329712,
0.07008188217878342,
0.30357587337493896,
-0.23972555994987488,
0.1147604361176... | |
What is the optimal query to obtain all the records for one specific day?
In my Weather model, 'timestamp' is a standard DateTimeField.
I'm currently using
```
start = datetime.datetime(2009, 1, 31)
end = start + datetime.timedelta(hours=23, minutes=59, seconds=59)
Weather.objects.filter(timestamp__range=(start, end)... | [
-0.1845632940530777,
-0.05642411857843399,
0.4901832342147827,
0.12233726680278778,
-0.03062589466571808,
-0.0031695354264229536,
-0.049726199358701706,
-0.16265277564525604,
-0.38225963711738586,
-0.7255812287330627,
0.11809618026018143,
0.25717693567276,
-0.28719276189804077,
0.088512614... | |
I found out, while shoulder surfing some other - much more experienced programmers - that they all have different strategies in finding (their) errors in (their) code.
And I don't mean understanding compiler error messages, but understanding the reason why the error message occurs - immediately by following the code-... | [
0.48841238021850586,
0.4594036936759949,
-0.20867273211479187,
0.31048503518104553,
-0.11110663414001465,
0.01754303090274334,
0.7189269065856934,
0.041219472885131836,
-0.29873862862586975,
-0.3926765024662018,
-0.11727842688560486,
0.47241657972335815,
0.024487460032105446,
0.03363469243... | |
everything.
I just wonder what the most common practices are to make stuff work :). What do you do if you don't understand why the compiler throws error messages?
My best strategy is to have multiple strategies. That said, my best strategies are:
* Assume nothing. Anything you are sure of beyond doubt is a rock for ... | [
0.49222511053085327,
0.15466487407684326,
-0.47107750177383423,
0.36229345202445984,
0.17306716740131378,
-0.14498203992843628,
0.7541465163230896,
0.10205885767936707,
-0.2821926176548004,
-0.4830580949783325,
-0.18366548418998718,
0.4921380877494812,
-0.2573799788951874,
-0.2371207624673... | |
hypothesis is correct. and something different if it is wrong.
* Once every few years spend a weekend watching old Colombo episodes.
* Don't get suckered in by comments; only trust the code.
* Take baby steps. Biting off more than you can chew just means you'll choke.
* Define the problem till it has a razor sharp poin... | [
0.6116316914558411,
-0.08512389659881592,
-0.2761058807373047,
0.38123297691345215,
-0.1642984300851822,
0.01472653727978468,
0.24509119987487793,
-0.07699296623468399,
-0.23799645900726318,
-0.6646793484687805,
0.39650440216064453,
0.4820483922958374,
0.18279194831848145,
0.37608310580253... | |
closest case to you simplest failure case that works.
* Log data that will answer questions, not just fill up space. | [
-0.3186054825782776,
0.015880774706602097,
0.2121470421552658,
0.2864654064178467,
0.0026663572061806917,
0.07774762064218521,
0.021936673671007156,
0.2273603081703186,
0.08067966252565384,
-0.7824317216873169,
-0.17392896115779877,
0.3618963956832886,
-0.13368164002895355,
-0.159328654408... | |
<http://pypi.python.org/pypi/simplejson>
I am just diving into the Python world and want to make a simple twitter application which requires the installation of simplejson but not sure how I can set it up and get it working..
I am on a Windows System
I would recommend [EasyInstall](http://pypi.python.org/pypi/setupto... | [
0.33196136355400085,
-0.11331399530172348,
0.10315646231174469,
-0.17732669413089752,
-0.22975459694862366,
-0.26690956950187683,
0.4249497354030609,
0.3010847866535187,
-0.10861492156982422,
-0.9311003088951111,
-0.1944771260023117,
0.8776648640632629,
-0.4252534508705139,
-0.530713796615... | |
I'm trying to find a generic way to replicate this C functionality:
```
int main(int argc, char** argv){
fprintf(2,"%s: error you did something wrong.\n", argv[0]);
return 1;
}
```
in java. So far the only way was to hardcode this into the app, which is ugly. I'd like to get something similar to:
```
someOb... | [
0.19221897423267365,
0.1896028071641922,
0.12431670725345612,
-0.21865731477737427,
0.023650091141462326,
-0.1796741634607315,
0.4871487021446228,
0.14657451212406158,
-0.29045554995536804,
-0.6810236573219299,
-0.00010680113337002695,
0.5825762152671814,
-0.4437768757343292,
0.10483797639... | |
EasyInstall, you should be able to go to a command window and type:
```
easy_install simplejson
```
This may require putting easy\_install.exe on your PATH first, I don't remember if the EasyInstall setup does this for you (something like `C:\Python25\Scripts`). | [
-0.05230458080768585,
-0.13954469561576843,
0.15764203667640686,
-0.14532411098480225,
-0.0640631765127182,
-0.49296844005584717,
0.30968403816223145,
0.20519573986530304,
-0.11379539966583252,
-0.8886251449584961,
-0.41089722514152527,
1.1046295166015625,
-0.49850741028785706,
-0.49815431... | |
EDIT: WOW. This question is 12 years old now.
As someone stated, it can be done with a one-liner since 2016: <https://stackoverflow.com/a/69322509/80907>
---
The original:
I'm wondering if there's a way to change the text of anything in HTML without using innerHTML.
Reason I'm asking is because it's kinda frowned ... | [
0.23768216371536255,
0.07409339398145676,
0.6739607453346252,
-0.12501053512096405,
-0.22618500888347626,
0.03154879808425903,
0.024058055132627487,
-0.1437785029411316,
-0.42530760169029236,
-0.7728365063667297,
0.148372083902359,
0.2989758849143982,
-0.05214051529765129,
-0.0259816087782... | |
will have changed.
I do not wish to append more text, I wish to change allready existing text.
The recommended way is through DOM manipulation, but it can be quite verbose. For example:
```
// <p>Hello, <b>World</b>!</p>
var para = document.createElement('p');
para.appendChild(document.createTextNode('Hello, '));
... | [
0.24849939346313477,
0.17054128646850586,
0.5075077414512634,
-0.15439429879188538,
0.02816827967762947,
0.3119540214538574,
0.39313387870788574,
-0.746425211429596,
-0.23190219700336456,
-0.7727307677268982,
-0.6465364694595337,
0.34833046793937683,
-0.3245062530040741,
0.1362604200839996... | |
someDiv.removeChild(children[i]);
```
But as someone else said, I'd recommend using something like jQuery instead, as not all browsers fully support DOM, and those that do have quirks which are dealt with internally by JavaScript libraries. For example, jQuery looks something like this:
```
$('#someID').html("<p>Hel... | [
0.3231891989707947,
-0.12488149851560593,
0.1817045658826828,
-0.20659992098808289,
-0.26546958088874817,
-0.11294147372245789,
0.07026010751724243,
0.42200034856796265,
-0.20711733400821686,
-0.4742535948753357,
-0.057168781757354736,
0.2235783487558365,
-0.11908362805843353,
0.2033763527... | |
It seems that the normal progression to join projects is to contribute for a while, earn the trust, then get accepted as a member of the community (i.e. having commit access).
Now, I already apparently know "the best way" of how to get involed, in a manner of speaking; this is not my question; what I was hoping to att... | [
0.8917346000671387,
0.14323562383651733,
-0.06765604764223099,
0.05494451895356178,
-0.18172894418239594,
-0.4245561361312866,
0.3318093419075012,
-0.0782337412238121,
-0.12031642347574234,
-0.40399450063705444,
0.14504481852054596,
0.5489290952682495,
0.32721176743507385,
-0.3545919954776... | |
know...
Perhaps you already knew someone in a community and just fell into it? Maybe you were getting frustrated with some bug and started contributing regulary as a result? Maybe you did just spot a project on SourceForge...
### Update:
It seems that the most common reason is simply scratching an itch, to [quote si... | [
0.3552274703979492,
-0.07650648057460785,
-0.06286599487066269,
0.2647808790206909,
-0.06438824534416199,
-0.5249000191688538,
0.21096576750278473,
0.47521013021469116,
-0.4558353126049042,
-0.253608763217926,
-0.06920629739761353,
0.3498260974884033,
0.09654910862445831,
-0.08737957477569... | |
if you are either a project member or a patch contributor. Please do not give advice on how to join a community, this isn't the kind of answer I'm looking for. If you would like to give advice on joing a community, [please answer in this other thread](https://stackoverflow.com/questions/43649/how-to-get-involved-in-an-... | [
0.5093704462051392,
0.2138846516609192,
-0.14226768910884857,
0.13030444085597992,
-0.1406218409538269,
-0.3015459179878235,
0.15522927045822144,
0.07219072431325912,
-0.6508414149284363,
-0.009081216529011726,
0.21495851874351501,
0.21222825348377228,
0.0998697280883789,
-0.15208353102207... | |
got involved with the Tcl community when it was first starting out in 1991 or so. The mailing list and later the usenet newsgroup were pretty important to connect with people. I specialized in user evangelism and teaching, and eventually ended up writing two books about the subject. One of them is still in print after ... | [
0.6403939723968506,
0.2200886756181717,
-0.08441969007253647,
-0.28955698013305664,
-0.5002227425575256,
-0.20974810421466827,
0.25674790143966675,
0.08412014693021774,
-0.325554758310318,
-0.22383341193199158,
0.4436138868331909,
0.5041046142578125,
-0.24136297404766083,
-0.03511185944080... | |
them open source, I was able to get some nice contributions back, and since they were not the "secret sauce" of my employers at the time, they didn't mind sharing the code. The two most popular packages were
<http://sourceforge.net/projects/kap/> The Kinetic Application Processor -- this was built when I was working o... | [
0.6826846599578857,
0.21809633076190948,
-0.2973167598247528,
0.24039939045906067,
-0.38867875933647156,
0.18281403183937073,
-0.3381733000278473,
0.2013470083475113,
-0.27884936332702637,
-0.24525681138038635,
0.22893378138542175,
0.12307360023260117,
0.030825426802039146,
-0.154348954558... | |
"core" development, because (a) on a big project, that might be a pretty big chunk of code to understand, and (b) there are probably a core group of people already working on it.
So, suppose you like a certain piece of software and want to start contributing, you can start working around the edges. Here's a couple of ... | [
0.46344032883644104,
0.14423994719982147,
-0.38327720761299133,
0.3963152766227722,
0.17617741227149963,
0.15457728505134583,
0.0931657925248146,
-0.1015905886888504,
-0.22441339492797852,
-0.4543834328651428,
0.15154746174812317,
0.4200844466686249,
0.04249296337366104,
0.0070162806659936... | |
to get into the core development.
* look at the feature request database and see if there's a small task you can work on.
* look for "user doc" requests... a lot of them involve writing example code which you can provide.
Good luck! | [
0.5341188907623291,
0.07991539686918259,
0.019587112590670586,
0.09984447807073593,
0.0071526383981108665,
-0.2684817612171173,
0.5256345868110657,
0.33621400594711304,
-0.43627241253852844,
-0.7614033222198486,
-0.0018067045602947474,
0.7134484648704529,
0.2672460675239563,
-0.01929985545... | |
Ideally, and you will think I am crazy, I can code some basic logic into a bash or korn script and open that functionality up to clients hitting them. There is a lot of plumbing involved in web services and I was wondering what tools and techniques more experienced developers have been using to prototype systems where ... | [
0.46261584758758545,
0.3727041780948639,
-0.2190825343132019,
0.12969890236854553,
-0.11419983953237534,
-0.3680970370769501,
0.13187181949615479,
0.09940801560878754,
-0.1808389127254486,
-0.52121901512146,
0.06157111003994942,
0.4698142409324646,
-0.021862538531422615,
0.1539949029684066... | |
I just now got JBOSS installed and running... at its heart all these services are are socket connections to the client through a port ... or am I mistaken?
BTW: I am currently reading through [this](http://www.soapui.org/gettingstarted/mocking.html). And my disgust is increasing.
```
var myCList = (myAList.Select(a =>... | [
0.3895977735519409,
0.25182390213012695,
0.7153919339179993,
-0.2814992666244507,
-0.08251364529132843,
-0.02145916037261486,
0.43995344638824463,
0.04483439028263092,
-0.18538616597652435,
-0.6965988874435425,
-0.033662937581539154,
0.42198529839515686,
-0.2617976665496826,
0.456851750612... | |
I have about 10 pictures, when `:hover` each picture there is an `ajax.load` that will be trigger. I am about to do 10 `jquery.hover`, but something tells me there is a better solution.
I was thinking about somthing like
```
case 1 : load a
case 2 : load b
case 3 : load c
etc...
```
How would I do this in jquery?
... | [
0.33677348494529724,
0.2783298194408417,
0.47291383147239685,
0.1325204074382782,
0.12473165988922119,
0.0904427245259285,
0.014398792758584023,
-0.422078400850296,
-0.43064332008361816,
-0.8784745335578918,
0.09918186068534851,
0.40158170461654663,
-0.3398720920085907,
-0.4269911348819732... | |
function() {
myID=$(this).attr('id');
$('#equipe-profile').load('equipedecourse.html #' + myID);
$('#'+myID).css('border','2px solid red');
},
function() { | [
0.1441110521554947,
-0.33105483651161194,
0.7003597617149353,
-0.1459745466709137,
0.1468006670475006,
0.3503980338573456,
0.33392947912216187,
-0.1739450991153717,
-0.15726125240325928,
-0.6908619999885559,
-0.34910354018211365,
0.38986578583717346,
-0.6107451319694519,
0.1461825221776962... | |
$('#'+myID).css('border','2px solid #000000');
$('#equipe-profile').html("<h1>Profil</h1><p>Pour voir le profile des membre de l'équipe, sélectinnez-les</p>");
}
);
});
</script>
``` | [
0.09375739842653275,
0.06034738942980766,
0.48376479744911194,
0.0061499252915382385,
0.1372319608926773,
0.1928885281085968,
0.32978278398513794,
-0.004337080754339695,
-0.1945553719997406,
-0.7486449480056763,
-0.6836251020431519,
0.3255064785480499,
-0.37491410970687866,
-0.030811181291... | |
I am designing a web application which is a tie in to my iPhone application. It sends massively large URLs to the web server (15000 about.) I *was* using NearlyFreeSpeech.net, but they only support URLS up to 2000 characters. I was wondering if anybody knows of web hosting that will support really large URLs? Thanks, I... | [
0.517418622970581,
0.10546127706766129,
0.2598592936992645,
0.059244830161333084,
-0.07396318018436432,
0.057338058948516846,
0.2718627452850342,
0.06773224472999573,
-0.42915335297584534,
-0.7081831693649292,
0.23214231431484222,
0.08965889364480972,
-0.189402773976326,
0.1183501258492469... | |
a unique ID after storing the photo in a database, which I would append to a URL which I would open in Safari which retrieved the photo from the database and delete it from the database.
You see, I am lazy, and I know Mobile Safari can support URI's up to 80 000 characters, so I think this is a OK way to do it. If the... | [
0.2502579092979431,
0.08034136146306992,
0.10841558873653412,
0.228274405002594,
-0.3804227113723755,
-0.2685326933860779,
0.24336782097816467,
-0.21752722561359406,
-0.37939515709877014,
-0.5642977356910706,
0.2092362493276596,
0.09568674862384796,
-0.038988396525382996,
-0.05133492499589... | |
HTTP POST instead.
The limitations you're running up against aren't so much an issue with the hosts - it's more the fact that web servers have a limit for the length of a URL. According to [this page](http://www.boutell.com/newfaq/misc/urllength.html), Apache limits you to around 4k characters, and IIS limits you to 1... | [
-0.07068223506212234,
-0.1740904599428177,
0.2763194143772125,
0.33757513761520386,
-0.3298007845878601,
-0.07639645785093307,
0.8257818222045898,
-0.19374199211597443,
-0.15812847018241882,
-0.48043692111968994,
-0.3056507408618927,
0.33377888798713684,
0.08408515155315399,
0.107957787811... | |
The string in question would be the description field of a (cooking) recipe, and the max length should be something that 99% of users should never run into. nvarchar(4000) seems like it's probably too limiting.
Is a column in a SQL table even the appropriate place for this? It doesn't feel right for storing such a (po... | [
0.2300749123096466,
-0.03229553997516632,
0.44438478350639343,
0.0619366317987442,
-0.06437759846448898,
-0.06343265622854233,
0.3240914046764374,
-0.2284258008003235,
-0.23251132667064667,
-0.4510888159275055,
0.2341184914112091,
0.37938281893730164,
-0.20516864955425262,
-0.0015877366531... | |
seem to have varchar listed as an option). Is this just a limitation of SQLCE and an indication that I'll have to look into something else?
If it's true that this is a limitation of SQLCE does anyone have another recommendation? For a pet project, I'd have to be something free and preferably easy to setup (preferably ... | [
0.4519294798374176,
-0.05478774383664131,
0.2864948809146881,
0.11188603192567825,
0.11049964278936386,
-0.04049519822001457,
0.2464853823184967,
-0.2697463631629944,
-0.3075536787509918,
-0.6160591244697571,
0.2641310393810272,
0.6589365601539612,
-0.03626404330134392,
0.16344836354255676... | |
words and I am pretty sure not many of the recipes in the many cookbooks I have has a description longer than that.
VarBinary would get you 8000 bytes, but if you are going to be doing any searching in the description field using varbinary could require casts or other operations that will incur a performance hit.
Fin... | [
0.4250279366970062,
0.06714624166488647,
-0.0008197142742574215,
0.18138422071933746,
-0.4010409414768219,
0.09212817251682281,
0.35740458965301514,
0.11909299343824387,
-0.07562010735273361,
-0.6265580058097839,
0.387977659702301,
0.683174192905426,
-0.028668751940131187,
0.33343568444252... | |
I'd appreciate some opinions on a concern I have.
I have a [User] table in my database, with the basic stuff you'd expect, like username, password, etc...
This application requires that I track a vast number of attributes for each user. So much so, that I will likely run out of columns (row storage space).
I'm tempt... | [
0.17321546375751495,
0.3245779573917389,
0.5003781914710999,
0.27101197838783264,
0.15598423779010773,
0.10660965740680695,
-0.14125001430511475,
-0.2462201565504074,
-0.17352664470672607,
-0.8275012373924255,
0.15436789393424988,
0.4982513189315796,
-0.03503107652068138,
0.315463215112686... | |
a clustered index on the UserID, that access will still be screaming fast, and you are really storing about the same amount of data as you would with the mega-columns approach.
Any ideas or thoughts on performance concerns? Ideas for a better DB design?
**UPDATE:**
I have been toying around with the possibilities, a... | [
0.35571321845054626,
0.21000762283802032,
0.30936625599861145,
0.14395418763160706,
-0.34586387872695923,
-0.09858649224042892,
0.4269661009311676,
0.02533716894686222,
-0.08982622623443604,
-0.7580624222755432,
0.3501889109611511,
0.5414904356002808,
-0.12873031198978424,
0.11699139326810... | |
mega-column approach, but possibly splitting the data off into one (or more) separate tables, forming a one-to-one relationship keyed on the UserID.
I'm using LinqToSql, and while I think tables with this many columns are inelegant, I think considering all the challenges and trade-offs, it is probably the right one, b... | [
0.04096001759171486,
0.06482557207345963,
0.5716085433959961,
0.3643631041049957,
-0.19646209478378296,
0.04293838515877724,
-0.08160042017698288,
-0.18003228306770325,
-0.2057792991399765,
-0.6048939228057861,
0.05122984200716019,
0.4936472475528717,
-0.47557395696640015,
0.08618933707475... | |
different entities provides domain modeling, but they also provide a weak form of metadata. In E-A-V there are no such abstractions. (The Java analogy to E-A-V would be declaring that all functions' formal arguments were of type Object -- so you'd get no type-checking.)
We can easily look up the property keys, but not... | [
0.19649960100650787,
0.07572061568498611,
0.08256319165229797,
0.38294297456741333,
-0.2862379550933838,
-0.40156131982803345,
0.18284785747528076,
-0.0051321182399988174,
-0.1898191124200821,
-0.4963318407535553,
-0.027576185762882233,
0.40982773900032043,
-0.26043739914894104,
0.37691071... | |
I have a csv file with 350,000 rows, each row has about 150 columns.
What would be the best way to insert these rows into SQL Server using ADO.Net?
The way I've usually done it is to create the SQL statement manually. I was wondering if there is any way I can code it to simply insert the entire datatable into SQL Ser... | [
0.4878970682621002,
0.4259030520915985,
0.3636553883552551,
-0.024055346846580505,
-0.16922856867313385,
0.09419630467891693,
-0.13191251456737518,
-0.016524842008948326,
-0.19079641997814178,
-0.736244797706604,
0.34721970558166504,
0.09544825553894043,
-0.41036009788513184,
0.31391152739... | |
but I changed it to CSV for simplicity.
Make a class "CsvDataReader" that implements IDataReader. Just implement Read(), GetValue(int i), Dispose() and the constructor : you can leave the rest throwing NotImplementedException if you want, because SqlBulkCopy won't call them. Use read to handle the read of each line and... | [
0.22309152781963348,
-0.016587698832154274,
0.3710845708847046,
-0.0005173166282474995,
-0.2894541025161743,
-0.055032677948474884,
0.3374878168106079,
-0.15531407296657562,
0.0290804672986269,
-0.8104699850082397,
-0.02706916630268097,
0.45023706555366516,
-0.28892436623573303,
0.09458125... | |
<http://www.codeproject.com/KB/database/CsvReader.aspx> - tx Mark Gravell. | [
0.018331320956349373,
0.15977953374385834,
-0.6064034104347229,
-0.41007763147354126,
-0.20375670492649078,
0.2966839373111725,
0.31297793984413147,
0.5248910784721375,
-0.6177961230278015,
-0.2675721049308777,
-0.422197163105011,
0.03689777851104736,
-0.181557759642601,
-0.028558768332004... | |
Need a tutorial or some instruction on how to use the XML-RPC library built in to PHP (version PHP Version 5.2.6) for a XML-RPC client. The server is in Python and works.
Google and php.net are failing me.
Update:
-------
Per phpinfo I have **xmlrpc-epi v. 0.51** installed. I visited <http://xmlrpc-epi.sourceforge.n... | [
0.2465725541114807,
0.10028298199176788,
0.5027991533279419,
0.1537754386663437,
0.06424230337142944,
-0.06922852993011475,
0.5332417488098145,
0.011005084961652756,
-0.23763646185398102,
-0.7013083696365356,
0.21109312772750854,
0.7598774433135986,
0.06071692705154419,
-0.2852752506732940... | |
very simple xmlrpc client, I use a cURL class, you can get it from: <https://github.com/dcai/curl/blob/master/src/dcai/curl.php>
```
class xmlrpc_client {
private $url;
function __construct($url, $autoload=true) {
$this->url = $url;
$this->connection = new curl;
$this->methods = array()... | [
-0.0019725854508578777,
-0.10989850759506226,
0.741644024848938,
-0.013198659755289555,
-0.09151046723127365,
-0.1742771863937378,
0.01573103480041027,
-0.22922907769680023,
-0.3418598473072052,
-0.5508130192756653,
-0.3323270082473755,
0.7184125185012817,
-0.4360581934452057,
0.0388894826... | |
}
}
public function call($method, $params = null) {
$post = xmlrpc_encode_request($method, $params);
return xmlrpc_decode($this->connection->post($this->url, $post));
}
}
header('Content-Type: text/plain');
$rpc = "http://10.0.0.10/api.php";
$client = new xmlrpc_client($rpc, true);
$resp = $... | [
0.04385870695114136,
-0.11307733505964279,
0.7048383355140686,
-0.15567266941070557,
0.06722058355808258,
0.24715951085090637,
0.183763787150383,
-0.5059242248535156,
-0.28312063217163086,
-0.23162642121315002,
-0.5704659223556519,
0.6924989819526672,
-0.4716528058052063,
0.279020279645919... | |
How does one make M-( the default behavior for typing an opening "(" character? I want Emacs to automatically insert the closing ")" after the cursor when I type a "(" character regardless of whether it's part of an M-key combination. Additionaly, I want to extend this behavior to quotes, subquotes, brackets and braces... | [
-0.032351307570934296,
0.20404934883117676,
0.451416939496994,
-0.014985611662268639,
-0.02211039885878563,
0.29217827320098877,
0.5311376452445984,
-0.22550708055496216,
-0.14291207492351532,
-0.4292038083076477,
-0.24945971369743347,
0.6519597768783569,
-0.27306056022644043,
-0.221269324... | |
in front of a word.
(global-set-key "[" 'skeleton-pair-insert-maybe)
(global-set-key "{" 'skeleton-pair-insert-maybe)
(global-set-key "(" 'skeleton-pair-insert-maybe)
(global-set-key "\"" 'skeleton-pair-insert-maybe)
``` | [
-0.21380576491355896,
0.06453575193881989,
0.546654999256134,
-0.17007817327976227,
0.12529443204402924,
0.14606887102127075,
-0.015549486503005028,
0.2819342017173767,
-0.04281613230705261,
-0.5702210664749146,
-0.5550631284713745,
0.4339941143989563,
-0.2726653814315796,
-0.1495740115642... | |
I've been using Java almost since it first came out but have over the last five years gotten burnt out with how complex it's become to get even the simplest things done. I'm starting to learn Ruby at the recommendation of my psychiatrist, uh, I mean my coworkers (younger, cooler coworkers - they use Macs!). Anyway, one... | [
0.14960013329982758,
0.13791263103485107,
-0.09176813066005707,
-0.18512864410877228,
-0.03892024606466293,
0.07739563286304474,
0.6237801313400269,
0.30251434445381165,
-0.32501983642578125,
-0.7240433692932129,
0.19364500045776367,
0.5526654720306396,
-0.16146305203437805,
-0.34135252237... | |
kind of get the point about dynamic typing and can see how that could be of benefit for conciseness. And the Ruby syntax is, well, beautiful. What else? Is dynamic typing the main reason?
Dynamic typing doesn't come close to covering it. For one big example, Ruby makes metaprogramming easy in a lot of cases. In Java, m... | [
0.10614379495382309,
-0.06810899823904037,
0.031146228313446045,
0.07647514343261719,
-0.22437924146652222,
-0.267385333776474,
0.45807084441185,
0.06207576021552086,
-0.2731739580631256,
-0.36827653646469116,
-0.20893068611621857,
0.5546859502792358,
-0.4644605815410614,
0.013998990878462... | |
syntax — it's a method on the Module class, and it's easy to implement. Here's a sample implementation of `attr_accessor`:
```
class Module
def attr_accessor(*symbols)
symbols.each do |symbol|
define_method(symbol) {instance_variable_get "@#{symbol}"}
define_method("#{symbol}=") {|val| instance_varib... | [
0.06051454693078995,
0.03681773319840431,
0.4295211434364319,
-0.03887177258729935,
-0.23644500970840454,
-0.16238756477832794,
0.43422701954841614,
-0.2598556876182556,
-0.3080305755138397,
-0.46367791295051575,
-0.34677308797836304,
0.9512794017791748,
-0.39825868606567383,
-0.3434228897... | |
names we store in an array:
```
dependencies = %w(yaml haml hpricot sinatra couchfoo)
block_list %w(couchfoo) # Wait, we don't really want CouchDB!
dependencies.each {|mod| require mod unless block_list.include? mod}
``` | [
0.2922947108745575,
0.234463632106781,
0.543080747127533,
-0.22060739994049072,
0.34699955582618713,
-0.09372498840093613,
0.13073144853115082,
-0.198027104139328,
-0.18914993107318878,
-0.4302305281162262,
-0.2720545828342438,
0.7667830586433411,
-0.28722840547561646,
0.20692548155784607,... | |
Ok, someone tell me which would be better. I need to |= the elements of one vector with another. That is, I want to
```
void orTogether(vector<char>& v1, const vector<char>& v2)
{
typedef vector<char>::iterator iter;
for (iter i = v1.begin(), iter j = v2.begin() ; i != v1.end(); ++i, ++j)
*i |= *j;
}
... | [
-0.10541535168886185,
-0.2663722634315491,
0.5006561279296875,
-0.06581376492977142,
0.1562427282333374,
0.3250804841518402,
0.25182709097862244,
-0.5364828705787659,
-0.14008405804634094,
-0.5916761159896851,
-0.12852296233177185,
0.7264430522918701,
-0.47922542691230774,
-0.0107634682208... | |
transform(v1.begin(), v1.end(), v2.begin(),
v1.begin(), BitwiseOr());
}
```
Is this a more efficient solution even though the top one is in place, but the bottom is an assign? This is right in the middle of a processing loop and I need the fastest code possible.
Edit: Added (obvious?) code for BitwiseOr. Al... | [
0.21400734782218933,
-0.5477213263511658,
0.44200411438941956,
-0.1562545895576477,
0.04694699868559837,
-0.08358902484178543,
0.25649482011795044,
-0.45676177740097046,
0.1266997903585434,
-0.904822587966919,
-0.020435048267245293,
0.8767285943031311,
-0.27834171056747437,
0.0070497510023... | |
going with the transform method.** I was surprised, orTogether2 was about 4 times faster in MSVC9 release mode. I ran it twice, changing the order the second time to make sure it wasn't some sort of cache issue, but same results. Thanks for the help everyone.
The bottom one will compile to effectively the same as the f... | [
0.3484930098056793,
-0.4309729039669037,
0.33038365840911865,
0.10561178624629974,
-0.42364445328712463,
-0.1714078038930893,
0.42763054370880127,
0.04794514551758766,
-0.14162462949752808,
-0.7136314511299133,
0.09699796885251999,
0.8059844970703125,
-0.17196491360664368,
-0.3224951624870... | |
get into that habit you'll stop even considering the explicit loop choice for all your apps since it's unnecessary. The **only** advantage to the first method is it's easier to explain to beginner C++ programmers who are more comfortable with raw C. | [
0.37705063819885254,
-0.025312673300504684,
-0.1268339455127716,
0.16394199430942535,
-0.2636203169822693,
-0.5194644927978516,
0.33717262744903564,
0.10699915885925293,
-0.2683069407939911,
-0.46637222170829773,
-0.2641279697418213,
0.7025257349014282,
-0.5646706223487854,
-0.415088623762... | |
Is there a way I can find all the variables in Ruby that begin with a particular string?
For example, I have the following variables in my ruby program:
```
ret_d = 1
ret_d2 = 23
```
Is there a function that will return `["ret_d","ret_d2"]`? The problem is that I do not have the set of all variables.
`Kernel#local_v... | [
-0.18947173655033112,
0.08956252038478851,
0.27602750062942505,
-0.0864141583442688,
-0.27605897188186646,
0.1824708729982376,
0.48524096608161926,
-0.31540971994400024,
-0.1668754369020462,
-0.5217679142951965,
-0.11410731077194214,
0.7157142162322998,
-0.3943072557449341,
0.0651640594005... | |
I'm doing some simple MS unit tests on my standard, nothing special controller.
When I check the `ViewName` proprty, from the returned `ViewResult` object, it's `""` (empty).
I'm under the impression that the `ViewName` is implied by the name of the `View` (as [suggested by this MS article](http://www.asp.net/Learn/m... | [
-0.09315408021211624,
-0.048907261341810226,
0.5382070541381836,
-0.18688811361789703,
0.02441745437681675,
-0.03633209690451622,
0.3300793468952179,
-0.1693626195192337,
-0.22649246454238892,
-0.48378944396972656,
-0.23930318653583527,
0.7152134776115417,
-0.16335304081439972,
0.231629952... | |
var viewData = new IndexViewData
{
... my property setters, etc ...
};
return View(viewData);
}
[TestMethod]
public void Index_Action_Should_Return_Index_View_For_Default_HomePage()
{
// Arrange.
var controller = PostController; | [
0.038060009479522705,
-0.6857919692993164,
0.7270974516868591,
-0.07420462369918823,
0.5010946989059448,
-0.22502468526363373,
0.1289948970079422,
-0.26569974422454834,
-0.21211005747318268,
-0.6873477101325989,
-0.44551852345466614,
0.6290730834007263,
-0.5599423050880432,
0.3896132409572... | |
// Wrapper, cause I use D.I.
// Act.
ViewResult viewResult = controller.Index(null, null) as ViewResult;
// Assert.
Assert.IsNotNull(viewResult);
Assert.AreEqual("Index", viewResult.ViewName); // This is false/fails.
var indexViewData = viewResult.ViewData.Model as IndexViewData;
Assert.I... | [
-0.2847695052623749,
-0.31852415204048157,
0.7427610158920288,
-0.10102757066488266,
-0.0824071541428566,
-0.047502823173999786,
0.4076533019542694,
-0.4106537699699402,
-0.2987630367279053,
-0.5950806140899658,
-0.16132232546806335,
0.698451042175293,
-0.4189079999923706,
0.20719859004020... | |
to set a name on the view. I only check that the ViewName is set when I intend that the View to be returned does not match the action -- say, when returning the "Error" view, for example.
**EDIT**: The following is the source for ExecuteResult in ViewResultBase.cs (from RC1, I don't have the source for RTW on my Macin... | [
0.29428496956825256,
-0.11391201615333557,
0.445750892162323,
-0.24347221851348877,
-0.055286191403865814,
-0.08267250657081604,
0.1729280650615692,
-0.013311129063367844,
-0.30492642521858215,
-0.5942773818969727,
-0.01488224882632494,
0.6499450206756592,
-0.306232213973999,
-0.0185034628... | |
action has completed.
```
public override void ExecuteResult(ControllerContext context) {
if (context == null) {
throw new ArgumentNullException("context");
}
if (String.IsNullOrEmpty(ViewName)) {
ViewName = context.RouteData.GetRequiredString("action");
}
... | [
-0.1906774342060089,
-0.7161468863487244,
0.8431036472320557,
-0.08781296759843826,
0.312324583530426,
-0.010410480201244354,
0.5325488448143005,
-0.41751229763031006,
-0.47099408507347107,
-0.37532928586006165,
-0.32572677731513977,
0.404183954000473,
-0.26213178038597107,
0.1987874954938... | |
{
result = FindView(context);
View = result.View;
}
ViewContext viewContext = new ViewContext(context, View, ViewData, TempData);
View.Render(viewContext, context.HttpContext.Response.Output);
if (result != null) {
result.ViewEngine.ReleaseView(conte... | [
-0.18385609984397888,
-0.20402328670024872,
0.8006312251091003,
-0.37231412529945374,
-0.08478893339633942,
0.05727944150567055,
0.33015143871307373,
-0.37330707907676697,
-0.05299343168735504,
-0.5442569255828857,
-0.7010701298713684,
0.6237509846687317,
-0.2403019219636917,
0.21372295916... | |
What's the best way to write a supybot plugin in ruby? Or other language (not python)?
The short answer is, you can't. Supybot is written in Python and there is no way to load Ruby/other language module/files. Theoretically you could write the plugin in C/C++ and Supybot may attempt to load them. But you'll need to dig... | [
0.32291311025619507,
-0.01896604895591736,
-0.001027459162287414,
0.2459547370672226,
-0.15893866121768951,
-0.15146543085575104,
0.44524824619293213,
0.22562314569950104,
0.11591866612434387,
-0.5828769207000732,
-0.26135438680648804,
0.6776687502861023,
-0.610813558101654,
0.000687082880... | |
I dont know why but i can no longer interrupt my own thread.
```
thread = new Thread(new ParameterizedThreadStart(this.doWork));
thread.Start(param);
...
thread.Interrupt();
//in doWork()
try {
...
}
catch (System.Threading.ThreadInterruptedException)
{
//it never hits here. it use to
}
```
I search and i dont have... | [
0.1051272600889206,
0.062218889594078064,
0.4689607322216034,
-0.18374209105968475,
0.1308271586894989,
-0.3324229121208191,
0.48904111981391907,
-0.11499269306659698,
-0.602003276348114,
-0.5505707263946533,
-0.040951553732156754,
0.3239651024341583,
-0.5875986814498901,
0.513458907604217... | |
blocked in a wait, sleep, or join
> state, it will be interrupted when it
> next begins to block.
>
>
> ThreadInterruptedException is thrown
> in the interrupted thread, but not
> until the thread blocks. If the thread
> never blocks, the exception is never
> thrown, and thus the thread might
> complete witho... | [
0.21656277775764465,
-0.46135714650154114,
0.20573674142360687,
0.06715350598096848,
0.30118054151535034,
-0.30577003955841064,
0.3516266942024231,
0.43214163184165955,
-0.6766058206558228,
-0.38896340131759644,
-0.5258837938308716,
-0.10646529495716095,
-0.7213829159736633,
0.476930290460... | |
```
for (iy = 0; iy < h; iy++)
{
double angy = (camera.fov_y / h) * iy;
for (ix = 0; ix < w; ix++)
{
double angx = (camera.fov_x / w) * ix;
//output[ix,iy].r = (int)Math.Round(255 * (angy / camera.fov_y); | [
0.024462774395942688,
0.1747271865606308,
0.6519421339035034,
-0.3564033806324005,
-0.09403228759765625,
0.3480754494667053,
0.2986525595188141,
-0.5138694047927856,
-0.13593272864818573,
-0.20015113055706024,
-0.2005046308040619,
0.5718622207641602,
-0.39011552929878235,
0.148251205682754... | |
//output[ix,iy].b = (int)Math.Round(255 * (angy / camera.fov_y);
double tr = (angx / camera.fov_x) * 255D;
double tb = (angy / camera.fov_y) * 255D;
Console.Write("({0},{1})",Math.Round(tr),Math.Round(tb));
output.SetPixel(ix, iy, Color.FromArgb(Convert.ToInt32(tr), 0, ... | [
0.05895150452852249,
-0.14196382462978363,
0.6692197918891907,
-0.2803581655025482,
0.19819675385951996,
0.6115103363990784,
0.1787320226430893,
-0.39818882942199707,
-0.13788491487503052,
-0.4744064211845398,
-0.17497223615646362,
0.5977228283882141,
-0.46910566091537476,
0.04902857169508... | |
Console.WriteLine();
}
```
Can anyone see any immediate problems with that code?
The variables `tr` and `tb` always evaluate to 0.
I'm happy to provide more information if it is needed.
You haven't given the types for the other variables - in particular, what are the types of `camera.fov_x` and `camera.fov_y`? I... | [
0.008370416238904,
0.043751060962677,
0.32278886437416077,
-0.031111013144254684,
0.2358052283525467,
0.06559105962514877,
-0.09626858681440353,
-0.09719018638134003,
-0.0404229499399662,
-0.5270996689796448,
0.19979938864707947,
0.823753833770752,
-0.3589666187763214,
-0.1263715922832489,... | |
give a complete example of this, which we can compile and test ourselves?
EDIT: Koistya Navin's edit is overkill. You only need one operand of an expression to be a double for the whole thing to be computed using double arithmetic. (It needs to be the right expression though - if you do `(a/b) * c` and cast `c` a doub... | [
0.2755992114543915,
0.08444605767726898,
-0.5962607264518738,
0.00295695080421865,
-0.214589461684227,
0.18193121254444122,
0.3005686402320862,
-0.46174877882003784,
-0.34544599056243896,
-0.09877686947584152,
-0.10517636686563492,
0.2755461037158966,
-0.7164312601089478,
-0.04245452955365... | |
(int iy = 0; iy < h; iy++)
{
// Changed here - cast camera.fov_y
double angy = ((double) camera.fov_y / h) * iy;
for (int ix = 0; ix < w; ix++)
{
// Changed here - cast camera.fov_x
double angx = ((double) camera.fov_x / w) * ix;
//output[ix,iy].r = (int)Math.Round(255 * (angy / ... | [
0.028885919600725174,
0.029259398579597473,
0.5784264802932739,
-0.44112494587898254,
-0.28920018672943115,
0.7295681238174438,
0.33796682953834534,
-0.6445029377937317,
-0.34662926197052,
-0.20179103314876556,
-0.060036469250917435,
0.46868807077407837,
-0.37796008586883545,
0.05223537236... | |
/ camera.fov_y);
double tr = (angx / camera.fov_x) * 255D;
double tb = (angy / camera.fov_y) * 255D;
Console.Write("({0},{1})", Math.Round(tr), Math.Round(tb));
output.SetPixel(ix, iy, Color.FromArgb(Convert.ToInt32(tr), | [
-0.08399184793233871,
-0.32682862877845764,
0.6779050230979919,
-0.21426939964294434,
0.12533602118492126,
0.506838321685791,
0.17668259143829346,
-0.4353068470954895,
-0.12882907688617706,
-0.4500102996826172,
-0.014227169565856457,
0.5917780995368958,
-0.45951512455940247,
0.055050641298... | |
0,
Convert.ToInt32(tb)) );
Console.Write(".");
}
Console.WriteLine();
}
``` | [
-0.06114592403173447,
-0.04723039269447327,
0.37856659293174744,
-0.4812394976615906,
0.3934005796909332,
-0.007778780534863472,
0.4663299024105072,
-0.374923437833786,
0.31877145171165466,
-0.6553570032119751,
-0.24570152163505554,
0.6880483031272888,
-0.47568240761756897,
0.5058642625808... | |
Users sometimes come up with the most amusing, weird and wonderful requirements for programmers to design and implement.
Today I read a memo from my boss that we need the "ability to import any excel or access data, irrespective of size, easily and quickly."
From the same memo, we have a requirement to "know if anyon... | [
0.5992971658706665,
0.17668965458869934,
0.1178833469748497,
0.42934277653694153,
0.2698613703250885,
-0.282260537147522,
-0.17002303898334503,
0.3702660799026489,
-0.45736056566238403,
-0.5369331240653992,
-0.08110032975673676,
0.5280490517616272,
-0.1885661482810974,
0.001436379505321383... | |
difficult to use, since there is a different number of days in each month. Could you please change them to have the same number of days?" | [
0.8203138113021851,
-0.014057405292987823,
0.2778046727180481,
0.30312299728393555,
0.48619672656059265,
0.3647633492946625,
-0.09744449704885483,
0.18836145102977753,
-0.6224279403686523,
-0.23986290395259857,
0.32247480750083923,
0.12127100676298141,
-0.3387641906738281,
0.31165561079978... | |
I'm using this [jQuery inline datePicker](http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/inlineDatePicker.html) plugin sample but I don't know how to set up default date selected.
Do you have any idea?
```
$('.date-pick').datePicker({
defaultDate: $.datepicker.parseDate("d m y", "31 8 2009")
})
``` | [
0.026963574811816216,
-0.45051872730255127,
0.7653533220291138,
0.09945304691791534,
0.14961989223957062,
-0.07907723635435104,
-0.1287091076374054,
0.1665317565202713,
0.04254337027668953,
-0.37321338057518005,
0.31570959091186523,
0.4472798705101013,
-0.14433147013187408,
0.0591614134609... | |
Before I asked this question I had a look through the search results for 'Ruby on Rails' here on SO. Couldn't find much, but the following ([found on this page](https://stackoverflow.com/questions/142470/what-are-the-main-differences-between-the-popular-web-frameworks)) amused me
> Personally, I started using .html, m... | [
0.4006660580635071,
0.13772496581077576,
-0.034317128360271454,
-0.15471646189689636,
-0.42350614070892334,
-0.035853061825037,
0.4104265868663788,
0.32066795229911804,
-0.3418915569782257,
-0.4192548096179962,
0.25334522128105164,
0.40141814947128296,
-0.04705192521214485,
-0.053409364074... | |
should leave immediately.
This question is for RoR people who find it great. I hope to find those that claim RoR is the best (authors of the breathtaking testimonials to be found at RoR website). What makes RoR so outstanding? What would you like the youths of today to find out about it just before they leave the Uni ... | [
0.33334586024284363,
0.041064996272325516,
0.170237734913826,
0.4511271119117737,
-0.04800405353307724,
-0.6115350723266602,
0.09393801540136337,
0.4062366187572479,
-0.1440834403038025,
-0.35188278555870056,
-0.03489862382411957,
0.23714514076709747,
0.47934088110923767,
0.286982089281082... | |
[why I love Rails](http://www.johntopley.com/2006/06/08/going-on-the-rails/) three years ago, but for me for number one cool feature is that it makes developing web applications easy and fun. | [
0.41230735182762146,
-0.01684863306581974,
0.11682295799255371,
0.07322938740253448,
-0.06118115782737732,
-0.3846510052680969,
0.38640621304512024,
0.5022258162498474,
-0.3692304193973541,
0.06362967938184738,
0.7213168144226074,
0.4674040377140045,
0.11998714506626129,
0.0222189556807279... | |
I'm currently working on a project that uses the t3blog extension. In the backend, when creating a new post, you first enter a title and then you have to click on "create new" to add content to the post.
Ideally the client wants to remove the "create new" or at least have it create a new piece of content by default.
... | [
0.8290368914604187,
0.10459423065185547,
0.09104244410991669,
0.24537572264671326,
-0.13187827169895172,
-0.3052152991294861,
0.39932557940483093,
0.36950477957725525,
-0.13317017257213593,
-0.6918246150016785,
0.18380562961101532,
0.4231676161289215,
-0.34198445081710815,
0.55710142850875... | |
TCA?
Here is the code that adds the control.
```
'content' => Array (
'exclude' => 1,
'label' => 'LLL:EXT:t3blog/locallang_db.xml:tx_t3blog_post.content',
'config' => array (
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_field' => 'irre_paren... | [
0.12467898428440094,
-0.1985817849636078,
0.47083255648612976,
0.012103362940251827,
0.001046875026077032,
-0.3301195502281189,
-0.27020493149757385,
-0.2689829170703888,
-0.13832387328147888,
-0.25074997544288635,
0.10759463161230087,
0.4507371187210083,
-0.5953269004821777,
0.30229684710... | |
'maxitems' => 100,
'appearance' => array(
'showSynchronizationLink' => 0,
'showAllLocalizationLink' => 0,
'showPossibleLocalizationRecords' => 0,
'showRemovedLocalizationRecords' => 0, | [
0.10014986246824265,
-0.2227206975221634,
0.948679506778717,
0.15340325236320496,
-0.08673138171434402,
0.2828877866268158,
0.2433588057756424,
-0.29925021529197693,
0.07708059996366501,
-0.7619637846946716,
-0.1869720071554184,
0.5024675726890564,
-0.12574684619903564,
-0.0961045622825622... | |
'expandSingle' => 1
),
'behaviour' => array(
),
)
),
```
What I'm trying to do is to remove the "general" tab that is created and just have the "text" tab.
Any hints would be very much appreciated.
You might want to check the paths against the reference; | [
0.15272751450538635,
0.038398027420043945,
0.5740189552307129,
-0.237230584025383,
-0.03659016266465187,
-0.09222876280546188,
0.23596015572547913,
-0.10135524719953537,
-0.013894514180719852,
-0.776241660118103,
-0.1836792230606079,
0.6039184927940369,
-0.6061831712722778,
0.1323586106300... | |
it might be that you've somehow referenced it against the obj folder. This may be easier to see in the csproj than the IDE ("hint path" or something). | [
0.31871986389160156,
0.04952375590801239,
0.1798316240310669,
0.25752949714660645,
0.1481069177389145,
-0.27370280027389526,
0.12951187789440155,
0.369302362203598,
-0.24969792366027832,
-0.5252209305763245,
0.0960041955113411,
0.023767663165926933,
0.08008690923452377,
0.05156455561518669... | |
how would i write a function in java that generates all the 3\*3 multidimensional arrays such that every number between 1...9 only appears once?
thanks!
Basically, you are looking for all permutations of the series `[1, 2, ... 9]`, but notice that you split them up to a matrix of `3x3`.
It is easy to prove mathematic... | [
0.15926986932754517,
0.15030689537525177,
0.28904804587364197,
-0.16484707593917847,
-0.3341819941997528,
0.2552570402622223,
0.12529784440994263,
-0.25210893154144287,
-0.4019097685813904,
-0.48110032081604004,
-0.09557093679904938,
0.15633179247379303,
-0.5866003036499023,
0.090253584086... | |
I have a drop-down list and I've bound a change event handler to it. Whenever the user selects a new option, I want to know if it is the last option of the list.
Annoyingly, the relevant condition in the snippet below always returns true, no matter which option has been selected:
```
sel.change(function() {
... | [
0.11861740052700043,
-0.3569776713848114,
0.4321609139442444,
-0.21954655647277832,
0.4708816111087799,
0.15424492955207825,
0.05926506966352463,
-0.017341380938887596,
-0.10593438148498535,
-0.5717890858650208,
-0.13024818897247314,
0.45541873574256897,
-0.15265248715877533,
0.14229097962... | |
alert('hello I am the last option');
inputDiv.show();
inputDiv.find("input").attr('disabled',false);
} else {
inputDiv.hide();
inputDiv.find("input").attr('disabled',true); | [
-0.39008063077926636,
-0.5419697761535645,
0.4050811231136322,
-0.4172402620315552,
0.1335451602935791,
-0.0071105556562542915,
0.3924356997013092,
-0.0031547255348414183,
0.009257886558771133,
-0.6376200318336487,
-0.7985571026802063,
0.4913886785507202,
-0.37760621309280396,
0.0286013148... | |
}
});
```
Even if I do this, the result is the same:
```
if(jQuery('#' + this.id + ' option:selected').is(':last')) {
...
```
What am I doing wrong? And if you know, why do those tests both evaluate to true?
EDIT: Found the solution:
```
if(jQuery('#' + this.id + ' option:last').is(':selected')) {
...
}
... | [
0.041698891669511795,
0.1388126164674759,
0.2595713138580322,
0.027793707326054573,
0.10851031541824341,
-0.08740436285734177,
0.40640226006507874,
-0.40146511793136597,
-0.08774711936712265,
-0.27055326104164124,
-0.10378816723823547,
0.6097223162651062,
0.06829771399497986,
0.16286142170... | |
Is there an easy way (via a script perhaps) to get the cumulative bytes sent and received from a [NIC](https://en.wikipedia.org/wiki/Network_interface_controller) on [Windows Server 2008](https://en.wikipedia.org/wiki/Windows_Server_2008)?
For example, the NIC currently shows around 18 MB of sent data and 765 MB of re... | [
0.2296144813299179,
-0.20218425989151,
0.6533060073852539,
0.275704562664032,
-0.04125271737575531,
-0.3324272036552429,
0.1481887400150299,
-0.2442338615655899,
-0.5522645115852356,
-0.6461052894592285,
0.024871913716197014,
0.64045649766922,
-0.12056080251932144,
-0.13891825079917908,
... | |
help. (I have three interfaces). However, once the NIC was restarted, this information will zero out.
```
$computer = "LocalHost";
$namespace = "root\CIMV2";
$Tcpip_NI = Get-WmiObject -class Win32_PerfRawData_Tcpip_NetworkInterface -computername $computer -namespace $namespace;
$Tcpip_NI | Select BytesReceivedPersec, ... | [
-0.3207911252975464,
-0.4252939820289612,
0.8359481692314148,
0.27334821224212646,
0.00697161303833127,
-0.0886966809630394,
0.23229564726352692,
0.008873987011611462,
-0.05768080800771713,
-1.1750867366790771,
-0.1212843805551529,
0.5036219358444214,
-0.3727479577064514,
0.133506551384925... | |
I'm trying to make a function in Python that does the equivalent of compile(), but also lets me get the original string back. Let's call those two functions comp() and decomp(), for disambiguation purposes. That is,
```
a = comp("2 * (3 + x)", "", "eval")
eval(a, dict(x=3)) # => 12
decomp(a) # => "2 * (3 + x)"
```
T... | [
0.3114496171474457,
0.07441998273134232,
0.1466449797153473,
-0.24569202959537506,
-0.07419074326753616,
-0.07727263867855072,
0.2087515890598297,
-0.2822379469871521,
-0.2283094823360443,
-0.48602813482284546,
0.01070826593786478,
0.8976020812988281,
-0.42827025055885315,
-0.1462229341268... | |
can't set custom attributes on code objects.
* Subclassing code so I can add the attribute. code cannot be subclassed.
* Setting up a WeakKeyDictionary mapping code objects to the original strings. code objects cannot be weakly referenced.
Here's what does work, with issues:
* Passing in the original code string for ... | [
0.07282005995512009,
0.1525876820087433,
0.09198548644781113,
0.03241836279630661,
-0.1624826043844223,
-0.16347120702266693,
0.7699743509292603,
-0.002045550150796771,
-0.1979144662618637,
-0.847842276096344,
0.1910748928785324,
0.6453254222869873,
-0.13543960452079773,
0.1506364941596985... | |
gc.get\_referrers periodically and kill off dead ones, if I had to.
This is kind of a weird problem, and my initial reaction is that you might be better off doing something else entirely to accomplish whatever it is you're trying to do. But it's still an interesting question, so here's my crack at it: I make the origin... | [
0.570803701877594,
0.13659188151359558,
0.12607842683792114,
-0.19575494527816772,
0.04806116595864296,
-0.11284935474395752,
0.05938001349568367,
0.02449018694460392,
-0.16022418439388275,
-0.4535658359527588,
-0.28428754210472107,
0.8736733794212341,
-0.7925447225570679,
0.16628314554691... | |
recovered with decomp()."""
c = compile(source, *args, **kwargs)
return types.CodeType(c.co_argcount, c.co_nlocals, c.co_stacksize,
c.co_flags, c.co_code, c.co_consts + (source,), c.co_names,
c.co_varnames, c.co_filename, c.co_name, c.co_firstlineno,
c.co_lnotab, c.co_freevars, c.co_c... | [
-0.6115463376045227,
-0.06926707178354263,
0.4480782449245453,
0.013061491772532463,
0.37679755687713623,
0.7299403548240662,
0.0691467747092247,
-0.3432210683822632,
-0.37775617837905884,
-0.4619862735271454,
-0.5323611497879028,
0.7123898267745972,
-0.21600858867168427,
-0.01923690550029... | |
Where can I find examples and API information, besides the MSDN, on creating add-ins for Visual Studio .net 2008?
1. Download the [Visual Studio SDK](http://www.microsoft.com/downloads/details.aspx?FamilyID=30402623-93ca-479a-867c-04dc45164f5b&DisplayLang=en).
2. Go to the [Visual Studio Extensibility](http://msdn.micr... | [
0.42750605940818787,
-0.055748164653778076,
0.0805092453956604,
-0.0033073006197810173,
-0.45065444707870483,
-0.21858245134353638,
0.23576226830482483,
-0.05314955487847328,
-0.17786675691604614,
-0.4388893246650696,
-0.031145701184868813,
0.3931816518306732,
0.09092779457569122,
-0.03133... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.