text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
frm.Width = ctl.Width + 4;
frm.Text = title;
frm.Dock = DockStyle.Fill;
frm.Show();
//IMPORTANT: .Show() fires a form load event | [
0.12520179152488708,
0.10089000314474106,
0.7847324013710022,
-0.4445493817329407,
0.03671975061297417,
-0.1817379742860794,
-0.026172328740358353,
-0.5603049993515015,
-0.49851182103157043,
-0.08309123665094376,
-0.36381569504737854,
0.5464975833892822,
-0.07305970788002014,
-0.0992683470... | |
frm.BringToFront();
}
//.SetBounds(ctl.Left, ctl.Top, ctl.Width, ctl.Height)
}
public static void ShowFormInControl(Form frm,
TabPage ctl, FormBorderStyle style, int left, int top, string title)
{
{ | [
0.0411188043653965,
-0.20731495320796967,
0.8677337765693665,
-0.3147836923599243,
-0.19071659445762634,
-0.13342159986495972,
0.09714462608098984,
-0.3362182378768921,
0.04600753262639046,
-0.32426750659942627,
-0.4974594712257385,
0.6021100282669067,
-0.29320216178894043,
0.1881395727396... | |
frm.TopLevel = false;
frm.ControlBox = false;
frm.Parent = ctl;
frm.FormBorderStyle = style;
frm.Left = left; | [
-0.2948569655418396,
-0.11048714071512222,
0.57286536693573,
-0.02692004293203354,
-0.05618282034993172,
-0.32955479621887207,
0.39678069949150085,
-0.26514241099357605,
-0.017835723236203194,
-0.028116028755903244,
-0.7854083180427551,
0.3073801100254059,
-0.1642800271511078,
0.4343474209... | |
frm.Top = top;
frm.Width = ctl.Width + 4;
frm.Text = title;
frm.Dock = DockStyle.Fill;
frm.Show();
//IMPORTANT: .Show() fires a form load event | [
0.03210775554180145,
0.1208331510424614,
0.859751284122467,
-0.41328465938568115,
0.03361885994672775,
-0.20494626462459564,
-0.02884230576455593,
-0.5286362767219543,
-0.5306528806686401,
-0.021647360175848007,
-0.4142730236053467,
0.5475672483444214,
-0.03111468255519867,
-0.122144453227... | |
frm.BringToFront();
}
}
}
}
```
---
I have the darnedest time posting code here and it turning out looking decent!
You don't need generic to do this:
```
public static void ShowFormInControl(Control ctl, Form frm) {
frm.TopLevel = false;
frm.FormBorderStyle = FormBorderStyle.None; // Ot... | [
0.15264271199703217,
-0.08298805356025696,
0.783420205116272,
-0.24689246714115143,
-0.15391778945922852,
-0.1633639633655548,
0.4497908055782318,
-0.21446150541305542,
-0.29823243618011475,
-0.4442715048789978,
-0.40002232789993286,
0.6926050782203674,
-0.30113157629966736,
-0.03192340210... | |
1 -
===
In my email-sending script, I store spaced-out emails in a string, then I use ", ".join(to.split()). However, it looks like the script only sends to the 1st email - is it something to do with RFC822 format? If so, how can I fix this?
2 -
===
I feel a bit edgy having my password visable in my script. Is there... | [
0.2993530333042145,
-0.1106124073266983,
0.392493337392807,
0.2135084718465805,
0.2963573634624481,
-0.3362206816673279,
0.2079339623451233,
-0.07283525913953781,
-0.18092244863510132,
-0.5547308325767517,
-0.12707287073135376,
0.2781551480293274,
-0.4025702178478241,
-0.06436587125062943,... | |
the RCPT envelope. Assuming you're using smtplib, that's the second argument:
```
connection.sendmail(senderaddress, to.split(), mailtext)
```
2: it's possible, but far from straightforward. Browsers don't want external programs looking at their security-sensitive stored data. | [
0.11553912609815598,
-0.19218771159648895,
0.3315982520580292,
-0.009504265151917934,
-0.13660944998264313,
-0.35557329654693604,
0.04711791127920151,
-0.019605495035648346,
-0.10529761016368866,
-0.3961796760559082,
-0.21445125341415405,
0.47066131234169006,
-0.6226393580436707,
0.2311200... | |
I'm trying to use Taylor series to develop a numerically sound algorithm for solving a function. I've been at it for quite a while, but haven't had any luck yet. I'm not sure what I'm doing wrong.
The function is
```
f(x)=1 + x - sin(x)/ln(1+x) x~0
```
Also: why does loss of precision even occur in this function?... | [
0.022184014320373535,
0.29721391201019287,
0.18198882043361664,
-0.36976033449172974,
-0.06377793848514557,
0.06254272907972336,
0.21267925202846527,
-0.2597517967224121,
0.10957817733287811,
-0.6954386234283447,
0.22969092428684235,
0.6009299159049988,
-0.0951724499464035,
0.4489970803260... | |
ln(1+x), which are
```
x - x^3/3! + x^5/5! - x^7/7! + ...
```
and
```
x - x^2/2 + x^3/3 - x^4/4 + ...
```
respectively. I have attempted to use like denominators to combine the x and sin(x)/ln(1+x) components, and even to combine all three, but nothing seems to work out correctly in the end. Any help is appreciat... | [
0.19570951163768768,
0.030642637982964516,
0.383417546749115,
-0.4473929703235626,
-0.15806636214256287,
0.2787371277809143,
0.010327853262424469,
-0.44739383459091187,
0.1254756599664688,
-0.5836033821105957,
0.06093465909361839,
0.717595100402832,
-0.1672915369272232,
0.06649952381849289... | |
I just discovered, quite by accident, that a WCF service hosted in a Windows Service ill work with a HTTP binding. It seems to implement its own web server, but I have never seen this capability mentioned anywhere, and can't find any documentation on what the capabilities of the HTTP listener are (in terms of worker th... | [
0.48025283217430115,
0.22401566803455353,
0.3852378726005554,
-0.07822409272193909,
-0.0829269215464592,
-0.41747984290122986,
0.4403069019317627,
-0.032925084233284,
-0.47852492332458496,
-0.7925058603286743,
-0.03732084855437279,
0.3153063952922821,
-0.22095587849617004,
0.34708622097969... | |
I'm adding plugin support to my .NET application. A base class sounds reasonable to me, so people can inherit it and **override** certain calls as well can keep the default functionality or can use some internal helper functions.
Why would I choose interface instead of a base plugin class to inherit? Could you tell wh... | [
0.1874309778213501,
-0.25310227274894714,
0.17159073054790497,
0.07016444206237793,
0.15773937106132507,
-0.09769366681575775,
-0.024242063984274864,
-0.13034380972385406,
-0.08749502897262573,
-0.8564029335975647,
-0.1018352136015892,
0.6020369529724121,
-0.37874582409858704,
0.1500559002... | |
simplify a lot of the plumbing work you will need to do in order to get add-ins loaded and interact with them.
As far as making a choice between an interface and an abstract class, if you go with MAF or MEF some of that will be made for you. The most basic differences in this context are that by providing an abstract ... | [
0.27121102809906006,
0.06042727455496788,
0.1298721879720688,
0.1286369115114212,
0.10101041197776794,
0.09986948221921921,
0.22716091573238373,
-0.1285581886768341,
-0.1270945817232132,
-0.6717635989189148,
0.11403212696313858,
0.7343394160270691,
-0.544460117816925,
-0.25141996145248413,... | |
that you are limited to a single base class.
Interfaces get around the single base class limitation and still provide an inhertiance point for custom plugins and ensure that certain methods/properties are implemented but can't provide any type of default behavior. You also cannot specify anything other than public me... | [
0.31416264176368713,
-0.13227467238903046,
-0.1609102487564087,
0.3742244243621826,
0.07634253799915314,
-0.27356043457984924,
0.28914785385131836,
0.04431486502289772,
-0.3645935356616974,
-0.4340711534023285,
-0.0924718901515007,
0.5026207566261292,
-0.3438156247138977,
0.109366983175277... | |
I have a listbox inside an update panel. When I scroll down and select an item, it scrolls back to the top of the listbox. I heard that the dom does not keep track of the scroll position on a postback. Does anyone have a solution/example on how to solve this?
Thanks,
XaiSoft
You're running into this problem because th... | [
0.2523420751094818,
0.08344686776399612,
0.5068487524986267,
0.0029504576232284307,
-0.08004426956176758,
-0.07769297063350677,
0.2785802483558655,
-0.2700546681880951,
-0.10664140433073044,
-0.8684942722320557,
-0.11460766941308975,
0.5799921751022339,
-0.08682195097208023,
0.069439165294... | |
method) and then setting it on the new `<select>` when the AJAX call comes back. This will be tedious, error-prone, and probably not very compatible (see [here](http://siderite.blogspot.com/2007/06/setting-vertical-scroll-property-in.html)).
2. Use JavaScript to store the `<select>`'s `selectedIndex` property and re-se... | [
-0.1392211765050888,
-0.444266140460968,
0.5879555344581604,
0.06446293741464615,
-0.18882355093955994,
-0.19137005507946014,
0.0782170221209526,
-0.4479522705078125,
-0.05264078080654144,
-0.6376640200614929,
0.0006472551613114774,
0.6742351055145264,
-0.26599404215812683,
-0.118463627994... | |
Systems could use UDP and employ forward error correction to transmit the whole message, without retransmits, even if a few packets are lost. Does this ever work well in practice or is the extra overhead too much of a waste?
I think it's useful for some applications like Voice (VoIP), where you want to avoid errors, an... | [
0.05197645351290703,
-0.3882456123828888,
0.09471465647220612,
0.1851741224527359,
-0.12521107494831085,
-0.07271430641412735,
-0.0449475534260273,
0.05543051287531853,
-0.486052542924881,
-0.5975072979927063,
-0.061841949820518494,
0.26843464374542236,
-0.33622947335243225,
-0.05618361011... | |
If so, I think the answer is "no", but it does increase the needed bandwidth.
I believe you always already need *some* latency, to avoid jitter; so for example, you might say "let's delay the whole voice channel by 200 msec, so any/every packet can take from 0 to 200 msec to cross the internet, and be reassembled and ... | [
0.19824689626693726,
-0.22368821501731873,
0.22445522248744965,
-0.038087137043476105,
0.13959991931915283,
0.03305835649371147,
0.48614394664764404,
-0.03177744895219803,
-0.33419176936149597,
-0.5326768159866333,
-0.3070506155490875,
0.5902385115623474,
0.007230547722429037,
0.1100021004... | |
that's a gap (a glitch) at the other end.
Whereas, having some forward error correction might mean that, in each 200 msec period, you still send 10 packets ... each packet contains 20 msec of data, plus 10 msec of data that's already been transmitted in another packet (or, maybe you send 30 packets instead of 20). The... | [
-0.0722438171505928,
-0.15249015390872955,
0.3061174154281616,
0.3150492310523987,
0.008482190780341625,
0.22790122032165527,
0.07797190546989441,
0.08814142644405365,
-0.49302107095718384,
-0.5526875257492065,
-0.13106754422187805,
0.21329326927661896,
0.07883235067129135,
0.1531013399362... | |
I have a form in Access 2003 that should only be working with a single record. I can set the `Cycle` property to `Current Record`, but the form still jumps to the next record when I press Enter. My first thought was a `KeyPreview` property, but I'm not seeing one. My other thought is maybe the `KeyPress` or `KeyUp` eve... | [
0.066127710044384,
0.08343568444252014,
0.420794814825058,
0.035552192479372025,
0.3549158573150635,
-0.22717009484767914,
0.10312964022159576,
0.05376338213682175,
-0.6356670260429382,
-0.5422024130821228,
0.1130228117108345,
0.7862465381622314,
-0.1697929948568344,
0.13134749233722687,
... | |
select "Next Field"
There are KeyPress and KeyDown events that you can use to trap the Enter key too but that's more work. | [
-0.051619622856378555,
-0.637020468711853,
0.24919375777244568,
0.1035529300570488,
0.0737653523683548,
-0.02030256949365139,
-0.1880083829164505,
-0.3041044771671295,
-0.05608648806810379,
-0.47432568669319153,
-0.06437230855226517,
0.5167772769927979,
0.02110382355749607,
-0.313643395900... | |
I want to make my build process for producing a setup project to be a single click. However, I also want to add {smartassembly} to the build step to obfuscate the build, but only on our build machine. How can I add a pre-build step to a visual studio 2008 vdproj?
Basically, I want to move the command line argument to ... | [
0.21423223614692688,
0.19653435051441193,
0.18840987980365753,
-0.1005358174443245,
-0.10163089632987976,
-0.24274659156799316,
0.13014869391918182,
-0.08563175797462463,
-0.08945165574550629,
-0.3994521200656891,
-0.0016909852856770158,
0.8829624652862549,
-0.2613316774368286,
-0.14846527... | |
cost change (going from one build license to 5 is not a trivial amount of money), so the reasoning here has to be pretty airtight. I was going to add it to just the machine responsible for the build, rather than having all developers have it, and then force developers to try to reproduce bugs in the release build that ... | [
0.6140734553337097,
0.30344337224960327,
0.18415692448616028,
0.10356710106134415,
0.19552093744277954,
0.11655962467193604,
-0.0017774280859157443,
0.018853792920708656,
-0.04977800324559212,
-0.49819913506507874,
0.12089560925960541,
0.625835657119751,
0.12423316389322281,
0.214346811175... | |
I'm consuming a data feed that has recently added a Unicode BOM header (U+FEFF), and my rake task is now messed up by it.
I can skip the first 3 bytes with `file.gets[3..-1]` but is there a more elegant way to read files in Ruby which can handle this correctly, whether a BOM is present or not?
With ruby 1.9.2 you can ... | [
0.31649670004844666,
0.258415162563324,
0.45027050375938416,
-0.37088534235954285,
-0.10641396045684814,
0.0018555184360593557,
0.38092461228370667,
-0.004831972066313028,
-0.24008387327194214,
-0.6576471328735352,
-0.16385209560394287,
0.6615610122680664,
-0.4775409996509552,
0.1496589630... | |
or not.
---
You may also use the encoding option with other commands:
```
text_without_bom = File.readlines(@filename, "r:utf-8")
```
(You get an array with all lines).
Or with CSV:
```
require 'csv'
CSV.open(@filename, 'r:bom|utf-8'){|csv|
csv.each{ |row| p row }
}
``` | [
0.0916033685207367,
0.059561312198638916,
0.5170950889587402,
-0.013416845351457596,
-0.08252646028995514,
0.16071303188800812,
0.1426403969526291,
-0.12031378597021103,
-0.1919935941696167,
-0.6933987736701965,
-0.5575251579284668,
0.40629544854164124,
-0.4619704782962799,
-0.175802350044... | |
I used this code to maintain scroll position and don't have a clue of what it means. If someone has the time, can you provide me with an step by step explanation of what it is doing. Here it is:
```
<script language="javascript" type="text/javascript">
var xPos, yPos;
var prm = Sys.WebForms.PageRequestManager... | [
0.14279621839523315,
0.026819607242941856,
1.1163679361343384,
-0.2593408524990082,
-0.03122337907552719,
0.1148836687207222,
0.3495326638221741,
-0.3938320577144623,
-0.0405222550034523,
-0.7016921043395996,
-0.1439892202615738,
0.5662311315536499,
-0.1725025177001953,
0.06358921527862549... | |
yPos = $get('<%=lstAuctions.ClientID %>').scrollTop;
}
}
function EndRequestHandler(sender, args) {
if ($get('<%=lstAuctions.ClientID %>') != null) {
$get('<%=lstAuctions.ClientID %>').scrollLeft = xPos;
$get('<%=lstAuctions.ClientID %>').scrollTop = yPos;
}
... | [
-0.48145240545272827,
-0.05114728584885597,
1.1701672077178955,
-0.35102689266204834,
0.06279259920120239,
0.21730591356754303,
0.06974441558122635,
-0.24392373859882355,
-0.1234586089849472,
-0.4731510877609253,
-0.6388104557991028,
0.727432906627655,
-0.4737573266029358,
0.08451831340789... | |
Sys.WebForms.PageRequestManager.getInstance(); // Some webforms javascript manager
/*
* Begin function with 2 arguments
*/
function BeginRequestHandler(sender, args) {
// check if the element generated by .net with id 'lstAuctions.ClientID' exists
if ($get('<%=lstAuctions.ClientID %>') != null) {
// ... | [
-0.21638211607933044,
-0.2852843701839447,
0.7514424324035645,
-0.2174043357372284,
0.043338973075151443,
0.13925093412399292,
0.1575862169265747,
-0.3721548318862915,
-0.05994749069213867,
-0.7732747793197632,
-0.3808470368385315,
0.486495703458786,
-0.4458298683166504,
-0.089850619435310... | |
uses the
* already set global variables to assign the old scrollpositions again
*/
function EndRequestHandler(sender, args) {
if ($get('<%=lstAuctions.ClientID %>') != null) {
// assign the previous scroll positions
$get('<%=lstAuctions.ClientID %>').scrollLeft = xPos;
$get('<%=lstAuctions... | [
-0.18904338777065277,
-0.2629387676715851,
0.890955924987793,
-0.2587888836860657,
-0.06614849716424942,
0.2103620320558548,
0.15285001695156097,
-0.5029836893081665,
-0.04007860645651817,
-0.8600611686706543,
-0.4700321853160858,
0.6107751727104187,
-0.418334037065506,
0.18326665461063385... | |
I have an ASP.NET MVC (using the release candidate) application that works with a class library that among other things uses LINQ to SQL for data persistance.
One of the thing the app/db maintains, is the concept of a "Folder" - like a disk folder, but with a hierarchy that only exists in the database. Other database ... | [
0.14445914328098297,
0.10252752155065536,
0.4355853796005249,
-0.04428553208708763,
-0.22356243431568146,
-0.0009073076071217656,
0.0458173044025898,
-0.2643633186817169,
-0.38118410110473633,
-0.6230309009552002,
-0.08549436181783676,
0.4558791220188141,
-0.21023903787136078,
0.1811504662... | |
is a "GetFoldersJSON" which returns the folder structure in a format suitable for a select (dropdown) list. The other one is "AddFolderJSON" which accepts some form data, inserts a new Folder into the database, and then returns GetFoldersJSON() for sending the new folder list to the client. The client uses AJAX with th... | [
-0.13863149285316467,
-0.3055742383003235,
0.6822018623352051,
-0.0791630893945694,
-0.30496934056282043,
-0.34259840846061707,
0.18206000328063965,
-0.6699312329292297,
-0.09195469319820404,
-0.6781492829322815,
-0.5298537611961365,
0.5090227127075195,
-0.40929368138313293,
-0.04849029704... | |
GetFoldersJSON() uses a function which resides in the Folder definition - a partial class extending the OR-mapped folder object. This function recursively adds folders and subfolders to a flat list using code like this:
```
var rootFolders = from f in db.Folders
where f.ParentFolder == null
... | [
-0.06495656818151474,
-0.20633360743522644,
0.4516631066799164,
-0.09296028316020966,
-0.08521592617034912,
0.051252447068691254,
0.23187077045440674,
-0.4381260871887207,
-0.1170506626367569,
-0.6054489612579346,
-0.4392361342906952,
0.1455983817577362,
-0.25703784823417664,
0.26012119650... | |
of course the local, static DataContext reference.
Then a simple loop:
```
foreach (var fldr in rootFolders)
{
AddFolderContents(list, fldr);
}
```
The AddFolderContents() function then adds the current folder to the list, and proceeds to call itself for each subfolder of the current folder, thu... | [
-0.13552233576774597,
0.12130311131477356,
0.6293548941612244,
-0.24276883900165558,
0.12608595192432404,
-0.18932192027568817,
0.1692691445350647,
-0.24279093742370605,
-0.24422471225261688,
-0.6047065854072571,
-0.22340717911720276,
0.5874356627464294,
-0.5073559284210205,
0.250255674123... | |
actually show up until the application is restarted.
I have tried to do Refresh() calls just about everywhere, and it seems to have no effect in this case.
Is there a way to tell LINQ to SQL "Hey, I know what you're thinking, but DROP IT ALL, and just get ALL the data from the database, NOW!"?
I have a nagging feeli... | [
0.4685145914554596,
0.2598944306373596,
0.31735455989837646,
0.2829807996749878,
-0.24551239609718323,
-0.4205376207828522,
0.6857057213783264,
0.054123811423778534,
-0.2713008224964142,
-0.5199790000915527,
-0.12580454349517822,
0.4552973806858063,
-0.559452474117279,
0.31347426772117615,... | |
new customDataContext();
> db is of course the local, static DataContext reference
Yeah, watch out there. ASP.NET is multithreaded and you don't want to share an unsafe-for-threading DataContext instance.
---
It seems as though you are accessing children folders through their parents. DataContext caches the state o... | [
0.19945138692855835,
-0.2994518280029297,
0.457518994808197,
0.07649490237236023,
0.049315981566905975,
-0.1302885115146637,
0.2504362165927887,
-0.22698195278644562,
-0.6113137006759644,
-0.8411186933517456,
-0.011335265822708607,
0.44367146492004395,
-0.24230334162712097,
0.4902613759040... | |
way:
```
parent.Children.Add(child);
```
Do not do it by id, the autogenerated code does not notify the parent object in this case.
```
child.ParentFolderId = parent.Id; //bad, broken, do not do
```
Do this before your SubmitChanges call. | [
0.25097939372062683,
0.16754598915576935,
0.05218071863055229,
-0.02023356780409813,
0.22288714349269867,
-0.0075588165782392025,
0.49627184867858887,
-0.27426743507385254,
-0.039741188287734985,
-0.6099648475646973,
-0.33262795209884644,
0.4571554958820343,
-0.2930189073085785,
0.38195160... | |
Is it possible to stop execution of a python script at any line with a command?
Like
```
some code
quit() # quit at this point
some more code (that's not executed)
```
[sys.exit()](https://docs.python.org/2/library/sys.html#sys.exit) will do exactly what you want.
```
import sys
sys.exit("Error message")
``` | [
0.34118008613586426,
-0.09833894670009613,
0.09437879174947739,
-0.017850570380687714,
0.2855987250804901,
-0.3432682454586029,
0.4833284914493561,
0.10663909465074539,
-0.3823723793029785,
-0.12004554271697998,
-0.4004652798175812,
0.7257927060127258,
-0.5014142990112305,
-0.1503838151693... | |
The comments [here](https://stackoverflow.com/questions/543087/custom-class-for-dealing-with-embedding-in-forms/543115#543115) got me thinking. If you are a new Developer without a mentor and no one to collaborate on for your projects; can a tool, **ReSharper** in this case, stand in that capacity? Does it need another... | [
0.3767155110836029,
-0.05301807448267937,
0.2248438596725464,
0.44881951808929443,
-0.34857794642448425,
-0.22500590980052948,
0.22554753720760345,
-0.09654207527637482,
-0.4222754240036011,
-0.7168388366699219,
-0.06820753961801529,
0.543586790561676,
0.23505885899066925,
0.05610136687755... | |
perspective or is it simply `*poof*` your code is better with little chance of gaining understanding as to WHY I should have extracted that method stub?
I desperately want to get to the point where I am *capable* of answering as many questions here as I ask.
Have a blessed day and thank you for your time.
---
EDI... | [
0.17095500230789185,
-0.21687285602092743,
-0.06874675303697586,
0.41979241371154785,
-0.4920697510242462,
0.29928940534591675,
0.17054976522922516,
0.3353731632232666,
0.06753826141357422,
-0.781085193157196,
0.3571324050426483,
0.7426913380622864,
0.2598990797996521,
-0.06756708770990372... | |
But it certainly helps you clean up messy code and helps you with sticking to some best practices. However you should be aware that some settings are not good by default. For example it gives me hints about how I could use 'var' instead of its real type. I do not consider that appropriate in many situations.
What you ... | [
0.7105384469032288,
-0.1672782003879547,
-0.10984215140342712,
0.38418689370155334,
-0.2784304618835449,
-0.14183570444583893,
0.3066338896751404,
0.04272843152284622,
0.03702681511640549,
-0.6263500452041626,
0.10068468749523163,
0.9730675220489502,
-0.19129157066345215,
-0.03147917985916... | |
what functions should do.
Then you should get into architecture and read some documentation about it. There are no tools which can check if you did those things properly.
A mentor will still be the best way to improve your code, but resharper and fxcop will enable you to write your code a little bit more clean and ba... | [
0.839026927947998,
0.02071295492351055,
0.20745813846588135,
0.15687641501426697,
-0.002345999702811241,
-0.16841304302215576,
0.5310807824134827,
-0.17845852673053741,
-0.039354920387268066,
-0.5798622965812683,
0.05561745911836624,
0.6937450766563416,
0.09575708955526352,
-0.182834342122... | |
Do you have a clean way to list all the files that ever existed in specified branch?
This is a simplified variation of Strager's [solution](https://stackoverflow.com/a/543383/313192):
```
git log --pretty=format: --name-status | cut -f2- | sort -u
```
**Edit:** Thanks to Jakub for teaching me a bit more in the comme... | [
0.20170046389102936,
-0.025607027113437653,
0.3334924876689911,
0.0946023017168045,
-0.016175881028175354,
-0.26613157987594604,
0.4795282781124115,
0.039314232766628265,
-0.3665294051170349,
-0.6446534395217896,
-0.21335981786251068,
0.17614036798477173,
-0.2510146498680115,
-0.0476497448... | |
I am using a macro to export a table in a Microsoft Access database to a csv file in order to import into a mysql database. I ended up using a batchfile that would place a marker in the text file before the exporting took place, and then place everything after the last marker into a new file. This works fine, except fo... | [
0.30578598380088806,
0.2602367401123047,
0.30565378069877625,
-0.043502066284418106,
0.2924363911151886,
0.15058644115924835,
-0.19922028481960297,
0.2593062222003937,
-0.30001527070999146,
-0.6509819626808167,
0.20157727599143982,
0.15354228019714355,
-0.4491179287433624,
0.24163132905960... | |
force access to append to a file, or to place a marker of its own, or b) export to a different file each time, possibly the filename being a variable such as the date, or c) overcome this behavior with outside manipulation
Instead of using a macro to export the table you could simply create some code to open the file, ... | [
0.44763875007629395,
-0.1296035796403885,
0.5681785345077515,
-0.030511341989040375,
-0.0037049301899969578,
0.0754937008023262,
0.06579060852527618,
-0.4062235653400421,
-0.3753430247306824,
-0.300934374332428,
-0.13771237432956696,
0.5439806580543518,
-0.4457845389842987,
0.1572965383529... | |
'
' existing file if there is one. '
ExportQueryToCSV "Orders", "C:\orders.csv", AppendToFile:=True
' Export the result of the query to "stock.csv" using tabs as delimiters '
' and no header or quotes around strings | [
0.08307214826345444,
0.21407592296600342,
0.47921109199523926,
-0.17362602055072784,
0.004262702073901892,
0.3242497146129608,
-0.06126689910888672,
-0.04358523339033127,
-0.1895407736301422,
-0.1826162040233612,
-0.5856980085372925,
0.33657169342041016,
-0.48785290122032166,
0.21769720315... | |
'
ExportQueryToCSV "SELECT * FROM Stock WHERE PartID=2", _
"C:\stock.csv", _
AppendToFile:=False, _
IncludeHeader:=False, _
Delimiter:=chr(9), _ | [
-0.06598445773124695,
0.09826132655143738,
0.3522689640522003,
-0.2910332977771759,
0.13401752710342407,
0.3449379801750183,
0.020738448947668076,
0.005970088765025139,
-0.1551876664161682,
-0.18971934914588928,
-0.3543769419193268,
0.32699352502822876,
-0.5295666456222534,
0.3539567291736... | |
QuoteString:=false
```
**Code**
```
'----------------------------------------------------------------------------'
' Export the given query to the given CSV file. '
' | [
-0.08422913402318954,
0.2546829283237457,
0.7187880277633667,
0.26012906432151794,
-0.11635978519916534,
0.0331055223941803,
0.10187274217605591,
-0.08029253035783768,
-0.09260960668325424,
-0.290236234664917,
-0.361801415681839,
0.2331450879573822,
-0.44164031744003296,
0.0432719178497791... | |
'
' Options are: '
' - AppendToFile : to append the record to | [
0.43850430846214294,
-0.0639304667711258,
0.31566181778907776,
0.30992087721824646,
0.2975451350212097,
0.04114669933915138,
-0.07707786560058594,
0.04189872741699219,
-0.2048695981502533,
-0.27920594811439514,
-0.4473784565925598,
0.4229103624820709,
-0.26917752623558044,
0.01510579977184... | |
the file if it exists instead of '
' overwriting it (default is false) '
' - Delimiter : what separator to use (default is the coma) '
' - QuoteString : Whether string and memo fields should be quoted | [
-0.09288257360458374,
-0.045101266354322433,
0.5007980465888977,
0.15015755593776703,
0.11943008005619049,
-0.05754013732075691,
-0.08151671290397644,
-0.09106691926717758,
-0.060990333557128906,
-0.254784494638443,
-0.6534196734428406,
0.6777077913284302,
-0.19774110615253448,
-0.02691701... | |
'
' (default yes) '
' - IncludeHeader: Whether a header with the field names should be the first '
' | [
0.2093324065208435,
-0.008056487888097763,
0.13531501591205597,
0.09975308924913406,
-0.21793223917484283,
-0.43986356258392334,
-0.20877423882484436,
-0.1383683979511261,
-0.15981611609458923,
0.0012231962755322456,
-0.5628616809844971,
0.5066112279891968,
-0.18260331451892853,
-0.2364100... | |
line (default no) '
' Some limitations and improvements: '
' - Memo containing line returns will break | [
-0.4475023150444031,
-0.3668309450149536,
0.46529778838157654,
0.25892630219459534,
-0.030485181137919426,
-0.07790210098028183,
0.674849271774292,
0.04649925231933594,
0.020174359902739525,
-0.49020132422447205,
-0.697611927986145,
0.34226223826408386,
-0.22869889438152313,
-0.02243796549... | |
the CSV '
' - better formatting for numbers, dates, etc '
'----------------------------------------------------------------------------'
Public Sub ExportQueryToCSV(Query As String, _
FilePath | [
-0.46742063760757446,
-0.05512968450784683,
0.9849028587341309,
0.21524323523044586,
-0.04470386356115341,
-0.2963680028915405,
-0.08148332685232162,
0.3486117422580719,
-0.4778037965297699,
-0.490062415599823,
-0.5882618427276611,
0.1512146294116974,
-0.36073485016822815,
0.35177963972091... | |
As String, _
Optional AppendToFile As Boolean = False, _
Optional Delimiter As String = ",", _
Optional QuoteStrings | [
0.011884087696671486,
0.043326884508132935,
0.19923654198646545,
-0.18011416494846344,
0.1106872409582138,
0.37810400128364563,
0.2580017149448395,
-0.07360249757766724,
-0.0016280588461086154,
-0.09591196477413177,
-0.5067535042762756,
0.815847635269165,
-0.33570295572280884,
-0.023132789... | |
As Boolean = True, _
Optional IncludeHeader As Boolean = True)
Dim db As DAO.Database
Dim rs As DAO.RecordSet
Set db = CurrentDb
Set rs = db.OpenRecordset(Query, dbOpenSnapshot)
If Not (rs Is Nothing) Then
Dim intFile As Integer
' Open the file, either a... | [
0.19846878945827484,
-0.1340465396642685,
0.773618757724762,
-0.47753262519836426,
-0.30505380034446716,
0.025328174233436584,
0.3477094769477844,
-0.4700491428375244,
-0.4086952805519104,
-0.048406559973955154,
-0.3626927435398102,
0.262522429227829,
-0.5730785727500916,
0.393070876598358... | |
a new file or in append mode as required '
intFile = FreeFile()
If AppendToFile And (Len(Dir(FilePath, vbNormal)) > 0) Then
Open FilePath For Append As #intFile
Else
Open FilePath For Output As #intFile
End If
With rs | [
0.24806219339370728,
-0.2712828814983368,
0.8918310403823853,
-0.3643302023410797,
-0.1244642585515976,
0.2978453040122986,
0.36324241757392883,
-0.4776071608066559,
-0.4659946858882904,
-0.5310606360435486,
-0.3309973478317261,
0.5777541399002075,
-0.6593642830848694,
0.11240445822477341,... | |
Dim fieldbound As Long, i As Long
Dim record As String
Dim field As DAO.field
fieldbound = .Fields.count - 1
' Print the header if required '
If IncludeHeader Then | [
0.5426009297370911,
-0.2804734706878662,
0.6179606914520264,
-0.2597917914390564,
0.020317317917943,
-0.38102391362190247,
0.135954812169075,
-0.37716564536094666,
0.12723122537136078,
0.023982711136341095,
-0.2900988459587097,
0.507546603679657,
-0.2884455621242523,
0.13892914354801178,
... | |
Dim header As String
For i = 0 To fieldbound
header = header & .Fields(i).Name
If i < fieldbound Then | [
0.264226496219635,
-0.5053088068962097,
0.6355572938919067,
-0.16227823495864868,
-0.04831612482666969,
-0.14137138426303864,
0.107153981924057,
-0.3318452537059784,
-0.07545889914035797,
-0.201695516705513,
0.0610102079808712,
0.432170569896698,
-0.23399026691913605,
0.41862818598747253,
... | |
header = header & Delimiter
End If
Next i
Print #intFile, header
End If
' print each record' | [
0.3348521292209625,
0.15681339800357819,
0.4288631081581116,
-0.08779129385948181,
0.023627247661352158,
-0.0899069532752037,
-0.035738635808229446,
-0.3135448396205902,
-0.30496323108673096,
-0.333613783121109,
-0.14628972113132477,
0.21568909287452698,
-0.33953192830085754,
0.17452400922... | |
Do While Not .EOF
record = ""
For i = 0 To fieldbound
Set field = .Fields(i)
If ((field.Type = dbText) Or (field.Type = dbMemo)) And QuoteStrings Then | [
0.26892995834350586,
-0.042425405234098434,
0.2596175968647003,
-0.10226196050643921,
0.2207317054271698,
-0.1112610325217247,
0.3008711636066437,
-0.5890061855316162,
0.31282079219818115,
-0.1451987624168396,
-0.23539914190769196,
0.6464716196060181,
-0.3062341511249542,
0.032754853367805... | |
record = record & """" & Nz(.Fields(i).value, "") & """"
Else
record = record & Nz(.Fields(i).value)
End If | [
0.22581511735916138,
0.0005591456429101527,
0.5329676866531372,
0.21265196800231934,
0.32056912779808044,
-0.33878275752067566,
-0.15408149361610413,
-0.2556056082248688,
-0.5466505885124207,
0.2149973064661026,
-0.38980376720428467,
0.4995834529399872,
-0.05672653764486313,
0.515042483806... | |
If i < fieldbound Then
record = record & Delimiter
End If
Set field = Nothing | [
0.197444885969162,
-0.04231145977973938,
0.2583753168582916,
-0.14483827352523804,
0.1342451125383377,
-0.130880206823349,
0.37213417887687683,
-0.12060480564832687,
-0.09552349150180817,
-0.30363544821739197,
-0.5238184332847595,
0.4555753469467163,
0.07831656187772751,
0.2806932926177978... | |
Next i
Print #intFile, record
.MoveNext
Loop
.Close
End With
Set rs = Nothing
Close #intFile | [
0.07147384434938431,
0.0771135464310646,
0.9151784181594849,
-0.13416828215122223,
-0.17162983119487762,
0.17046809196472168,
0.2186039686203003,
-0.5113217830657959,
-0.39711707830429077,
-0.6890997290611267,
-0.07957667112350464,
0.3532460927963257,
-0.3473285138607025,
-0.01702043600380... | |
End If
Set rs = Nothing
Set db = Nothing
End Sub
```
Note that it's not perfect and you may have to adapt the code to reflect how you want the data to be formatted, but the defaults should be fine in most cases. | [
0.37086454033851624,
-0.17497259378433228,
0.47187620401382446,
0.04876656457781792,
0.0014102894347161055,
-0.7152742743492126,
0.44475486874580383,
-0.439901202917099,
0.05234615132212639,
-0.3311675786972046,
-0.4668869972229004,
0.3165208399295807,
-0.2704366147518158,
0.11313389241695... | |
Background: I'm creating a WPF app using MVVM, and using a DI container to build my ViewModels
My App.xaml looks like this:
```
<Application x:Class="WpfApp.App"
...xmlns etc...
StartupUri="MainWindow.xaml">
<Application.Resources>
<app:ServiceLocator x:Key="serviceLocator" />
</Application.Re... | [
0.1683359146118164,
0.1653594821691513,
0.6638981699943542,
-0.35676008462905884,
0.2889929413795471,
0.28210312128067017,
0.13822373747825623,
-0.09372865408658981,
-0.4123828709125519,
-0.7640791535377502,
-0.1503758728504181,
0.6161424517631531,
-0.4557645320892334,
-0.13428965210914612... | |
blogposts and articles I found, I removed the `StartupUri`, and tried to create the `MainWindow` by hooking `OnStartup` in App.xaml.cs, like this:
```
protected override void OnStartup( StartupEventArgs e )
{
base.OnStartup(e);
new MainWindow().Show();
}
```
The problem is, the app crashes when trying to sho... | [
0.3406318426132202,
0.18997442722320557,
0.6479837894439697,
-0.06504341959953308,
0.10899616777896881,
-0.2701466977596283,
0.8024489283561707,
0.3617706894874573,
0.004503691103309393,
-0.6899731755256653,
-0.4139510691165924,
0.502051055431366,
-0.4677422046661377,
0.2944607734680176,
... | |
add the resource programatically like this:
```
Resources.BeginInit();
Resources.Add("serviceLocator", new ServiceLocator());
Resources.EndInit();
```
However that's an ugly hack, and doesn't help me if I wanted to put something else in the app.xaml file later on :-(
Should I be hooking some other event? Is there a... | [
0.019098371267318726,
0.16653406620025635,
0.3478204607963562,
-0.1877775937318802,
0.20025618374347687,
0.17629757523536682,
0.2690807282924652,
-0.17726477980613708,
-0.17254558205604553,
-1.018423080444336,
-0.3952731490135193,
0.6075991988182068,
-0.36980465054512024,
-0.03445763140916... | |
App : Application
{
public App()
{ }
private void Application_Startup(object sender, StartupEventArgs e)
{
// TODO: Parse commandline arguments and other startup work
new MainWindow().Show();
}
}
``` | [
-0.20092371106147766,
0.2434019297361374,
0.4447070360183716,
-0.2111373394727707,
0.3159864544868469,
0.5492821931838989,
0.3047547936439514,
-0.03404959291219711,
-0.16077546775341034,
-0.6259270310401917,
-0.5446994304656982,
0.6539583802223206,
-0.7986674308776855,
0.08313275128602982,... | |
I run Apache Tomcat 6 using NetBeans. When there is a failure in my code such as a NullPointerException tomcat fail and will not run any other request.
My problem is I cannot get tomcat to stop and I must restart the entire Netbeans IDE.
Any Ideas?
on Netbeans 6.9.1 (windows), on the left hand side you should see "... | [
0.5280093550682068,
0.183100163936615,
0.33153966069221497,
-0.24356822669506073,
-0.001481720944866538,
-0.2917060852050781,
0.7877932190895081,
0.17884185910224915,
-0.13858696818351746,
-0.5750309824943542,
-0.22214633226394653,
0.8829361796379089,
-0.48380613327026367,
0.06308703124523... | |
"Stop". | [
0.34824255108833313,
0.18536746501922607,
0.257083922624588,
-0.00046277031651698053,
-0.10517189651727676,
0.026412496343255043,
0.5385774374008179,
0.023069802671670914,
-0.20834417641162872,
-0.17550772428512573,
-0.25927671790122986,
0.24002817273139954,
-0.34673696756362915,
0.2471765... | |
I've been using flash for a long time, mostly as an animation tool with a little dabbling in actionscript. Over the years I've moved from mostly making animations to mostly making small flash games or proof of concepts in my spare time. I've been very reluctant to learn as3 as I am not much of a programmer, but a frien... | [
0.4066166877746582,
0.08333558589220047,
-0.09241364896297455,
0.12368953227996826,
-0.24275436997413635,
-0.064972423017025,
-0.2453203946352005,
0.3718741834163666,
-0.15678516030311584,
-0.7203943133354187,
0.12597328424453735,
0.2921502888202667,
-0.05788402259349823,
-0.03081507794559... | |
flex is just actionscript outside of flash if that makes sense. Is this someone thing I should look into?
Both Flash and Flex use the ActionScript language — Flash CS3 and Flex 2 both support ActionScript 3 (which is compliant with the ECMAScript Edition 4), whereas the older version of Flash supports only ActionScript... | [
0.11485190689563751,
-0.12588295340538025,
0.28013482689857483,
-0.027605261653661728,
-0.31864133477211,
-0.24347516894340515,
-0.03372817486524582,
0.011874688789248466,
-0.1714458018541336,
-0.44710245728492737,
-0.17799581587314606,
0.5794662237167358,
-0.34517931938171387,
-0.52011358... | |
MXML.
3) Different deployment models.
Flex originally was designed to bring enterprise programmers to the Flash Platform. As a result, Flex features tools designed to accommodate the special needs of hardcore programmers.
Take a look at [this blog post](http://paragmetha.blog.com/1831276/) which illustrates the str... | [
0.3839998245239258,
-0.4915655255317688,
0.2764945328235626,
0.16600334644317627,
-0.4737330675125122,
-0.09341485053300858,
-0.01266119908541441,
-0.23476485908031464,
-0.49424222111701965,
-0.35749781131744385,
-0.0025629617739468813,
0.7317332625389099,
-0.3008434474468231,
-0.262114942... | |
Suppose I have an array of a objects of user defined class. Wanted to know how do I extract the elements of the array in PHP.
```
// class definition
class User
{
public $fname;
public $lname;
}
// array of objects of the class defined above
$objUser1 = new User():
$objUser2 = new User():
$objUser3 = new User():
$obj... | [
-0.4973854720592499,
0.18320825695991516,
0.49552294611930847,
-0.5503824949264526,
-0.24838887155056,
0.543908417224884,
0.26452651619911194,
-0.4475167989730835,
-0.24448555707931519,
-0.6862292289733887,
-0.11442222446203232,
0.42777639627456665,
-0.6326122283935547,
-0.2255718261003494... | |
the Java ArrayList, hence thought the PHP way might be similar. Can anyone explain it.
```
foreach ($alUser as $user) {
$obj = $user;
}
```
Why do you need typecasting for this? | [
0.19190040230751038,
0.17287948727607727,
0.024405336007475853,
-0.20231762528419495,
-0.18522986769676208,
-0.2925207018852234,
0.2363690882921219,
-0.03126267343759537,
-0.31592339277267456,
-0.4104018807411194,
0.02439941093325615,
0.40426650643348694,
-0.8366924524307251,
0.00142699119... | |
So, I'm slowly working in some Python 3.0, but I still have a lot of things that rely on 2.5.
But, in Eclipse, every time I change projects between a 3.0 and a 2.5, I need to go through
Project -> Properties -> project type.
**Issue 1:** if I just switch the interpreter in the drop down box, that doesn't seem to c... | [
0.5247557759284973,
0.011425255797803402,
0.14433959126472473,
0.02367323823273182,
-0.06061680242419243,
-0.19248802959918976,
0.25236842036247253,
-0.0411410927772522,
-0.14749591052532196,
-0.5848751664161682,
-0.07033908367156982,
0.5961436629295349,
-0.276824027299881,
-0.248121291399... | |
rest of my life, but I still am doing a lot of switching between projects and I don't see that changing anytime soon. So, I'm just trying to save a few operations.
Is there a way to configure Eclipse so that it remembers which interpreter I want associated with which project?
What if I created an entirely new works... | [
0.5045710206031799,
0.032274696975946426,
-0.11733037233352661,
0.06424171477556229,
-0.009015840478241444,
0.0483178086578846,
0.1732426881790161,
-0.0006187214166857302,
-0.2551255226135254,
-0.8889481425285339,
0.12325678020715714,
0.5166468620300293,
-0.054677270352840424,
0.1324623823... | |
Eclipse 3.4.0, running in Windows XP.
You can set the interpreter version on a per-script basis through the Run Configurations menu.
To do this go to Run -> Run Configurations, and then make a new entry under Python Run. Fill in your project name and the main script, and then go to the Interpeter tab and you can pick ... | [
0.46215516328811646,
0.0010811216197907925,
0.008201493881642818,
-0.33720213174819946,
-0.4687515199184418,
-0.0629902333021164,
0.22475475072860718,
0.07524016499519348,
0.05353957414627075,
-0.7640433311462402,
0.15532544255256653,
0.8087052702903748,
-0.3532659411430359,
-0.37943419814... | |
A client of ours is a membership organization and they are looking for functionality that seems closely aligned with Google Sites capabilities.
They want a system where their members can have a content managed site of their own that one or more admins can create by submitting a simple form.
The member organization ... | [
0.614676833152771,
0.23288291692733765,
0.785666823387146,
0.11491786688566208,
0.015268508344888687,
-0.0013209502212703228,
0.017906399443745613,
0.1642809361219406,
-0.3803763687610626,
-0.44812268018722534,
-0.08612597733736038,
0.21133704483509064,
-0.081166572868824,
0.27663370966911... | |
have different levels of users:
Admin - can add/edit/remove sites, users, etc.
Member Admin - can add/edit content within their site, add users that are also able to add/edit content within their site.
Member user - can add/edit content within their site.
From what I've seen and read, Google Sites seems to be abl... | [
0.6686894297599792,
0.2529604434967041,
0.3972734808921814,
0.29689356684684753,
-0.13620389997959137,
-0.29727256298065186,
0.2286234200000763,
0.18559366464614868,
-0.4611605703830719,
-0.57445228099823,
-0.2956944704055786,
0.3457286059856415,
0.11971110105514526,
0.18520598113536835,
... | |
anyone who has implemented a system like this before. I'd also love to hear from anyone who has actually used Google Sites.
(Disclaimer: I work for Google. I don't know much about Sites though.)
Have you actually *tried* to use Google Sites for this? It strikes me that it shouldn't take very long to give it a whirl. I... | [
0.5930073261260986,
-0.01999231055378914,
0.170463427901268,
0.25880855321884155,
-0.08163032680749893,
-0.16964448988437653,
0.22758916020393372,
0.1817721426486969,
-0.390610009431839,
-0.5216249823570251,
0.037978384643793106,
0.26924747228622437,
0.1223258450627327,
-0.1067148521542549... | |
I have a DataGrid whose ItemsSource is bound to a changing Observable Collection. Inside of this collection is a Business Object. Based on some of the values of the Business Object's properties, I would like to be able to modify the color of the text for each item displayed in my DataGrid once the ItemsSource is create... | [
0.3207474946975708,
-0.09594038128852844,
0.47025033831596375,
0.06377051025629044,
0.21823403239250183,
0.11385372281074524,
-0.21244408190250397,
0.1555590182542801,
-0.16168828308582306,
-0.8572701215744019,
0.12010212987661362,
0.4086364805698395,
-0.12540684640407562,
0.24066898226737... | |
Foreground="{Binding MyStatus, Converter={StaticResource colorConverter}}" />
</Grid>
</DataTemplate>
```
I added the above code and inserted the TemplateColumn to the grid as below:
```
<data:DataGridTemplateColumn Header="Testing"
CellTemplate="{StaticRe... | [
0.21929767727851868,
0.05350635573267937,
0.5271475911140442,
-0.10348343849182129,
0.30669552087783813,
0.030707847326993942,
-0.08248407393693924,
-0.6271143555641174,
0.20884475111961365,
-0.7720011472702026,
0.2583475410938263,
0.5902724862098694,
-0.022275429219007492,
-0.260443657636... | |
and pulls out the correct text but the converter never fires and the Binding of the foreground is never called from the get on it.
Any ideas?
Take a look at Josh Smith's article in MSDN magazine (<http://msdn.microsoft.com/en-us/magazine/dd419663.aspx>). He describes an interesting method where you have a content pres... | [
0.5963610410690308,
-0.19752353429794312,
-0.02778603322803974,
0.2108287513256073,
0.03331119939684868,
-0.22987574338912964,
0.041951753199100494,
0.01712314411997795,
-0.2240581065416336,
-0.6490864753723145,
-0.2645951211452484,
0.4050622284412384,
-0.20274969935417175,
0.0537101477384... | |
I have a javascript file that reads another file which may contain javascript fragments that need to be eval()-ed. The script fragments are supposed to conform to a strict subset of javascript that limits what they can do and which variables they can change, but I want to know if there is some way to enforce this by pr... | [
0.24281258881092072,
-0.04794348031282425,
-0.06828058511018753,
0.06801143288612366,
-0.01746441051363945,
-0.31638023257255554,
0.5584922432899475,
-0.31819620728492737,
-0.1484629362821579,
-0.43454113602638245,
-0.022807877510786057,
0.5700886845588684,
-0.26620545983314514,
0.08477006... | |
the eval fragment can see localVariable
// but not g_Variable or anything else outside function scope
eval( fragment );
}
}
```
The actual code doesn't need to look like this--I'm open to any and all weird tricks with closures, etc. But I do want to know if this is even *possible*.
**Short answer... | [
0.12357275187969208,
0.045654963701963425,
0.2614445686340332,
0.30469948053359985,
-0.16389165818691254,
-0.2728153467178345,
0.6261070370674133,
0.08017389476299286,
-0.371201753616333,
-0.4255077540874481,
-0.3967720866203308,
0.49172553420066833,
-0.3493596911430359,
0.0734481662511825... | |
you own and trust all code being executed, including that being `eval()`ed, you can fake it by overriding the execution context:
```
function maskedEval(scr)
{
// set up an object to serve as the context for the code
// being evaluated.
var mask = {};
// mask global properties
for (p in this)
... | [
0.36406072974205017,
-0.10577982664108276,
0.26251062750816345,
0.012236212380230427,
0.1693648397922516,
-0.0775720626115799,
0.55294269323349,
-0.23101654648780823,
0.008254431188106537,
-0.24318960309028625,
-0.06286385655403137,
0.8140256404876709,
-0.4364853799343109,
-0.1176516190171... | |
stress:
> This will only serve to shield **trusted** code from the context in which it is executed. If you don't trust the code, DO NOT `eval()` it (or pass it to new `Function()`, or use it in any other way that behaves like `eval()`). | [
0.3142086863517761,
-0.001575363683514297,
-0.06948674470186234,
-0.10021945834159851,
-0.025482531636953354,
-0.44285064935684204,
0.6623128652572632,
-0.3214878439903259,
0.12787586450576782,
-0.4515901207923889,
-0.5057928562164307,
0.7006755471229553,
-0.12035368382930756,
-0.175987318... | |
I know that this is subjective and all, but still, can you provide some list of serious applications that were written in Lisp (perhaps along with what Lisp it is)?
[ITA Software's](http://itasoftware.com/careers/l_e_t_lisp.html?catid=8) airline-fare search service. See [here](http://www.demarcken.org/carl/papers/ITA-s... | [
-0.03129999339580536,
0.2595612704753876,
0.10235840827226639,
0.2575037479400635,
0.24480080604553223,
-0.34804657101631165,
0.06370355188846588,
0.1933816373348236,
-0.42299884557724,
-0.4507555067539215,
-0.12327638268470764,
0.55866938829422,
-0.17325372993946075,
-0.34737202525138855,... | |
Hi all I have a horrid database I gotta work with and linq to sql is the option im taking to retrieve data from. anywho im trying to reuse a function by throwing in a different table name based on a user selection and there is no way to my knowledge to modify the TEntity or Table<> in a DataContext Query.
This is my c... | [
0.1722806692123413,
0.216291144490242,
0.7901415228843689,
-0.11784560233354568,
-0.03894903138279915,
-0.08656175434589386,
0.18851159512996674,
-0.4379938244819641,
-0.09783513844013214,
-0.4171956181526184,
-0.048802755773067474,
0.708580493927002,
-0.4973076283931732,
0.274600863456726... | |
You will want to call the overload that takes a Type instance, outlined here:
<http://msdn.microsoft.com/en-us/library/bb534292.aspx>
Assuming that you have a type that is attributed correctly for the table, passing that Type instance for that type and the SQL will give you what you want. | [
0.04111478105187416,
0.15609179437160492,
0.22575964033603668,
0.041018322110176086,
-0.1241178810596466,
-0.023490060120821,
-0.04515913873910904,
-0.01814921572804451,
-0.20420145988464355,
-0.5576291680335999,
-0.038100145757198334,
0.37545037269592285,
-0.38438448309898376,
0.126538097... | |
Hiding a DIV would be easy enough in Javascript, but is there some Rails-y way to do it? I can think of some ways to do it by calling Javascript from a partial (.erb), of course, but I'd prefer not to write any Javascript at all. Possible?
**Edit:** The page is loaded and I would like to hide the DIV **after** (well, ... | [
0.21409398317337036,
0.007466131821274757,
0.25331735610961914,
0.05708364397287369,
-0.18211698532104492,
-0.27465152740478516,
0.3747735917568207,
-0.07102326303720474,
0.07710090279579163,
-0.5552754998207092,
-0.1343439221382141,
0.5097986459732056,
-0.3410964906215668,
0.0522193759679... | |
div and hash to id specific div | [
0.06724648177623749,
0.016927029937505722,
0.1358022838830948,
-0.05019271373748779,
-0.1799008548259735,
-0.17047114670276642,
0.031844593584537506,
-0.21684657037258148,
0.0904291570186615,
-0.4486660957336426,
-0.30912354588508606,
0.3336719572544098,
-0.0033359373919665813,
0.225777968... | |
my site is now going to start allowing two different types of users to sign up...
1. normal people
2. companies
the two will be able to do all the same things on the site, but their profiles will look different, and im sure they will want to store different types of information about themselves.
my question is: sho... | [
0.6043766140937805,
0.003634235356003046,
0.12864349782466888,
0.03800017014145851,
0.3393154442310333,
-0.08178538829088211,
-0.13564607501029968,
0.03327883034944534,
-0.25873273611068726,
-0.7997184991836548,
0.15610359609127045,
0.5507511496543884,
-0.018973546102643013,
-0.20074307918... | |
a UID, with common information between the two stored there, and which type of account it is.
Then a "Companies" table with company specific information, using the same UID as the account, and, I dunno, a "Users" table with information specific to users.
This prevents you from having to make two very similar tables... | [
0.08867049217224121,
0.21397143602371216,
0.5472521185874939,
-0.01690826378762722,
0.21542000770568848,
-0.06727941334247589,
-0.4129607677459717,
0.2344418615102768,
-0.39329957962036133,
-0.6914578080177307,
-0.1928388476371765,
0.20051638782024384,
-0.18442058563232422,
0.1820307970046... | |
I'm building an internal site with the main function of serving up software downloads. One thing I want to guard against though, is people finding the source paths and circumventing the site (the site logs the download for auditing.)
Is there a way to conceal the source of the binaries? (I'm using ASP.NET)
The best wa... | [
0.5621020793914795,
0.020641906186938286,
-0.07255943864583969,
0.27872708439826965,
0.08089198172092438,
-0.3447202444076538,
0.312934547662735,
0.08083222806453705,
-0.2394597828388214,
-0.5872642993927002,
-0.1005346029996872,
0.4943818747997284,
-0.14440898597240448,
-0.007037761155515... | |
We have a quite large (280 binaries) software project under Linux and currently it has a very dispersed code structure - that means one can't [work out] what code from the source tree is valid (builds to deployable binaries) and what is deprecated. But the Makefiles are good. We need to calculate C/C++ SLOC for entire ... | [
0.4294629693031311,
0.2533598244190216,
-0.02353154681622982,
0.15404239296913147,
0.027295922860503197,
-0.1910354346036911,
0.20528650283813477,
-0.1888105869293213,
-0.2639864683151245,
-0.3488810062408447,
-0.04678838327527046,
0.514263927936554,
-0.09911122918128967,
0.133369922637939... | |
SLOC?
Thanks
Bogdan
The first thing you want is an accurate list of what you actually compiled. You can achieve this by using a wrapper script instead of gcc.
The second list you want is the list of files that were used for this. For this, consult the dependency list (as you said that was correct). (Seems you'd nee... | [
0.5416242480278015,
-0.054024334996938705,
0.053655993193387985,
0.09919280558824539,
-0.20402447879314423,
-0.2866537868976593,
0.10369346290826797,
0.0017977504758164287,
-0.17184700071811676,
-0.44565674662590027,
0.1414576768875122,
0.7759798765182495,
-0.5475027561187744,
-0.152131542... | |
In my web app, I use the **onkeydown** event to capture key strokes.
For example, I capture the 'j' key to animate a scroll down the page (and do some other stuff meanwhile).
My problem is the user might keep the 'j' key down to scroll further down the page (this is equivalent to fast multiple key strokes).
In my a... | [
0.19352269172668457,
-0.232075035572052,
0.5187575221061707,
0.18162024021148682,
-0.22141492366790771,
0.08001783490180969,
0.4438937306404114,
0.09438531845808029,
-0.23244398832321167,
-0.9040755033493042,
0.006396661978214979,
0.4385780692100525,
-0.01170828565955162,
0.234131112694740... | |
of multiple short ones.
Building on [@JMD](https://stackoverflow.com/users/56793/jmd):
```
var animate = false;
function startanimation()
{
animate = true;
runanimation();
}
function stopanimation()
{
animate = false;
}
function runanimation()
{
if ( animation_over )
{
if ( !animate )
{
ret... | [
0.3834367096424103,
-0.18522965908050537,
0.3916763961315155,
-0.11166634410619736,
0.09237860888242722,
0.5111702084541321,
0.28926214575767517,
-0.356067955493927,
-0.3189186155796051,
-0.5755741000175476,
-0.26373782753944397,
0.28135910630226135,
-0.3289541006088257,
0.3154966533184051... | |
I have a bunch of input elements that have a particular substring in their IDs. Using javascript, is there a way to get these elements as an array? I wouldn't know the full ID - only the substring.
Is this any simpler if I use JQuery?
Quite easy with jQuery. Example:
```
$("li[id^='comment']")
```
Select all "li" ... | [
0.07811916619539261,
0.035116247832775116,
0.4401799440383911,
-0.23598156869411469,
-0.1483331322669983,
0.10313716530799866,
0.1822800189256668,
-0.615543782711029,
-0.0790596529841423,
-0.6411802172660828,
-0.131171315908432,
0.5528770089149475,
-0.39655470848083496,
-0.0797509625554084... | |
The following code produces the output "xyz"
```
a = %w{x y z}
print a.to_s
```
Is there an option that can be added to the block to allow spaces to be added?
For example, I thought that by changing the code to this I might be able to space-separate the elements to produce an output of "x y z"
```
a = %w{"x " "y... | [
0.020964685827493668,
0.049118395894765854,
0.1781044453382492,
-0.2774589955806732,
0.11270695179700851,
0.24382111430168152,
0.016085725277662277,
-0.3448772132396698,
-0.12385982275009155,
-0.3067723214626312,
-0.45323407649993896,
0.3381229639053345,
-0.50225430727005,
0.18369369208812... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.