text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
difficult to implement, because I used a similar and existing statement as a guideline.
The Python compiler is a sophisticated chunk of software, and I don't claim being an expert in it. However, I am really interested in the internals of Python, and particularly its front-end. Therefore, I found this exercise a very ... | [
0.45123323798179626,
0.5180937647819519,
-0.2192685753107071,
-0.13951565325260162,
-0.15625010430812836,
-0.23912839591503143,
0.35942643880844116,
0.10499588400125504,
-0.14474882185459137,
-0.3413200080394745,
-0.2049061805009842,
0.7134121656417847,
-0.13159821927547455,
-0.28921881318... | |
339: Design of the CPython compiler](http://www.python.org/dev/peps/pep-0339/) - probably the most important and comprehensive piece of *official* documentation for the Python compiler. Being very short, it painfully displays the scarcity of good documentation of the internals of Python.
* "Python Compiler Internals" -... | [
-0.32450905442237854,
0.2661818563938141,
-0.14822077751159668,
0.00145162851549685,
-0.22150525450706482,
-0.148001030087471,
0.4897623062133789,
-0.2074848860502243,
-0.03837259113788605,
-0.1780119091272354,
-0.32645443081855774,
0.3379163444042206,
-0.001209752168506384,
-0.19521749019... | |
I want to keep my website/s in version control (Subversion specifically) and use `svn co` to update it when there are stable versions to update, but I'm concerned about the security of doing so, as all the `.svn` folders will be public, and these include all sorts of private data, not least of which is complete source ... | [
0.4086061120033264,
0.21154069900512695,
0.26925450563430786,
-0.044417671859264374,
0.004931029863655567,
-0.6200957894325256,
0.44087305665016174,
0.2643040418624878,
-0.18953707814216614,
-0.3557448089122772,
-0.06855358928442001,
0.6247324347496033,
-0.18724863231182098,
0.232207536697... | |
crucial to the scheme. But you are counting on rewrite being present to protect your content. Thus, it's better to remove the IfModule directive and let apache tell you when rewrite is not present for you to enable it (or at least know that you won't be 'protected' and consciously comment the lines)
2. No need to use r... | [
0.18796657025814056,
-0.05224407836794853,
0.11808636784553528,
0.08247546851634979,
0.07639382779598236,
-0.5826347470283508,
0.3533611297607422,
-0.3282371759414673,
-0.04699813947081566,
-0.6779335141181946,
-0.3088289797306061,
0.5370444059371948,
-0.18631340563297272,
-0.0113355368375... | |
take the security by obscurity route, use AliasMatch
```
AliasMatch \.svn /non-existant-page
```
If you don't have access to main configuration files you're left with hoping mod\_rewrite is enabled for usage in .htaccess. | [
0.08053700625896454,
-0.10714299231767654,
0.22637180984020233,
0.1858808398246765,
0.4719379246234894,
-0.6184073686599731,
0.6011642217636108,
0.08353295177221298,
-0.11121169477701187,
-0.7207931280136108,
-0.46157312393188477,
0.8043282628059387,
-0.22592602670192719,
-0.03047125227749... | |
i've been approached to create a bespoke ftp app that users will download in order to be able to upload video files ( up to 100mb).
* they want it to be idiot proof ( ie easy for non-computer literate people ). I'm assuming that setting up an ftp app like FileZilla with their username and password would be too much o... | [
0.798051655292511,
0.0009184094378724694,
0.26725709438323975,
0.07654765993356705,
-0.21205171942710876,
-0.37425509095191956,
0.354387491941452,
0.4220316708087921,
-0.5949968695640564,
-0.3526794910430908,
0.1562223583459854,
0.4215930104255676,
-0.004508622456341982,
0.1633367389440536... | |
have to be FTP? FTP have trouble with firewalls, ASCII mode and of course the password is in the clear.)
Many languages have FTP libraries available you could string together with a small amount of UI glue to make your own simple uploader app. For example Python has an ftplib in the standard library. Last time I did t... | [
0.7925074696540833,
-0.029967516660690308,
0.23421882092952728,
-0.007861138321459293,
-0.03401161730289459,
-0.1491706222295761,
0.25287681818008423,
-0.01773720607161522,
-0.2961284816265106,
-0.45109012722969055,
-0.39424777030944824,
0.5107393860816956,
-0.7232173681259155,
-0.38426607... | |
the standard class library for .NET but you can certainly download third-party libraries freely. On the other hand you say cross-platform, so I'm not sure if you're really talking about .NET on the client.
What you could do is provide multiple means of upload, for example a basic HTTP\* file upload built into your sit... | [
0.4610669016838074,
-0.10641380399465561,
-0.024136235937476158,
0.37732362747192383,
-0.24421927332878113,
-0.3129797875881195,
0.08142341673374176,
0.23404493927955627,
-0.25882184505462646,
-0.7073673605918884,
-0.011445406824350357,
0.5888340473175049,
-0.28437310457229614,
0.162943243... | |
and most people should get on all right.
\*: ideally using AJAX feedback to let the user know how for their upload is going, and/or perhaps a Flash uploader. And remember to turn off/up any script timeout rules on the server so it doesn't give up halfway through an upload. HTTP upload will never be optimal for files o... | [
0.30635368824005127,
-0.042345866560935974,
0.19292011857032776,
0.25939038395881653,
-0.15065592527389526,
-0.3402597904205322,
0.33098140358924866,
0.3979366421699524,
-0.3439660370349884,
-0.7116307020187378,
-0.1895774006843567,
0.744847297668457,
0.1391780972480774,
-0.152403399348258... | |
Is it possible, with Javascript or some other technology to determine which hyperlink a user has clicked on, without changing the hyperlink source code.
For example:
Can you click on a 'tag' button, then click on a hyperlink hosted in a different iframe, and be able to calculate which hyperlink the user clicked on, wi... | [
0.11299730837345123,
-0.5111615657806396,
0.08538785576820374,
0.08615688234567642,
0.07154224067926407,
-0.05668187886476517,
-0.23099632561206818,
0.05737332999706268,
-0.18761740624904633,
-0.5334221720695496,
-0.026885414496064186,
0.3845217525959015,
-0.3702421188354492,
-0.0459759049... | |
interrogate the hyperlink and obtain properties such as innerText etc. | [
0.2891128957271576,
0.1793430596590042,
0.035081807523965836,
0.37016957998275757,
-0.005338467191904783,
-0.2492608278989792,
0.4530940055847168,
-0.09168602526187897,
0.23710468411445618,
-0.6369454860687256,
-0.49481210112571716,
0.23984746634960175,
-0.2065657675266266,
0.0801139771938... | |
I can enumerate many features of functional programming, but when my friend asked me Could you define functional programming for me? I couldn't.
I would say that the defining point of pure functional programming is that all computation is done in functions with *no* side effects. That is, functions take inputs and retu... | [
0.1603568196296692,
0.08239355683326721,
-0.1610957235097885,
-0.021004702895879745,
-0.298389732837677,
-0.13161008059978485,
0.24071097373962402,
0.08872370421886444,
-0.0839335098862648,
-0.25368833541870117,
0.13211913406848907,
0.7343745827674866,
-0.4942910373210907,
-0.2475858777761... | |
*paradigm*, and a programming *language*. Languages that are generally referred to as functional provide a number of features that encourage or enforce the functional paradigm (e.g., Erlang with it's write-once stack, higher order functions, closures, etc.). However the functional programming paradigm can be applied in... | [
0.08287809789180756,
0.012718575075268745,
-0.027979882434010506,
-0.04673366993665695,
-0.43939003348350525,
-0.03039107657968998,
0.4433160126209259,
0.019563667476177216,
-0.13804154098033905,
-0.41601404547691345,
-0.3907179832458496,
0.719116747379303,
-0.3653295040130615,
-0.24931310... | |
I'm currently using [Toad](http://www.toadsoft.com/) for my day-to-day work on our databases (queries, updates, small scripts, browsing of db objects, etc.).
My question is: since my version of Toad is old and buggy, which are the (possibly free, but not necessarily) alternatives to Toad?
The database versions we are... | [
0.044451918452978134,
0.04796702414751053,
0.02376520074903965,
-0.01477951928973198,
-0.31555673480033875,
-0.1450899988412857,
0.43740272521972656,
0.30022111535072327,
-0.2868867814540863,
-0.7124540209770203,
0.23937727510929108,
0.6325121521949768,
-0.3143201768398285,
-0.050753876566... | |
blazingly fast; SQL Developer starts to crawl if you open more than 2 or 3 connections. When you have to operate with time constraints, you really can't wait SQL Developer to open.
2. The "open a new window until commit" functionality (a new window is opened after an insert or update statement, and you are forced to co... | [
-0.1802254468202591,
-0.34010621905326843,
0.29964715242385864,
0.16141042113304138,
-0.2932533025741577,
-0.6009048819541931,
0.39844468235969543,
0.21645793318748474,
-0.23906755447387695,
-0.71481853723526,
-0.1846529096364975,
0.45839715003967285,
-0.2540118098258972,
-0.46894916892051... | |
I am using running a simple find all and paginating with willpaginate, but I'd also like to have the query sorted by the user. The first solution that came to mind was just use a params[:sort]
```
http://localhost:3000/posts/?sort=created_at+DESC
@posts = Post.paginate :page => params[:page], :order => params[:sort]
... | [
0.1190452128648758,
-0.24913640320301056,
0.2685887813568115,
0.0033889610785990953,
-0.3744894564151764,
0.23526974022388458,
0.12933598458766937,
-0.32862332463264465,
-0.45842835307121277,
-0.9276511073112488,
-0.027676256373524666,
0.33116215467453003,
-0.3907557427883148,
0.1236537173... | |
Post model:
```
named_scope :ordered, lambda {|*args| {:order => (args.first || 'created_at DESC')} }
```
Then you can call:
```
@posts = Post.ordered.paginate :page => params[:page]
```
The example above will use the default order from the `named_scope` (`created_at DESC`), but you can also provide a different o... | [
-0.1837782859802246,
-0.24549566209316254,
0.39224356412887573,
0.10587701946496964,
-0.3216346204280853,
0.3832343518733978,
0.20061174035072327,
-0.2735615074634552,
-0.4371453523635864,
-0.551404595375061,
-0.28014320135116577,
0.07878868281841278,
-0.2648380696773529,
0.445439666509628... | |
A general architecture question in Sitecore 6...
Let’s say we have a situation where we have 10,000 items implementing a “Press Release” template. These items are stored in Sitecore at `/sitecore/content/home/press/*`. On our homepage, we’d like to display some information concerning the 3 most recent press releases.
... | [
0.25768935680389404,
0.12321466952562332,
0.735399603843689,
-0.08241362124681473,
-0.024269556626677513,
-0.023545607924461365,
0.14265285432338715,
-0.4570443630218506,
-0.026356253772974014,
-0.8016654849052429,
-0.11771374940872192,
0.31910863518714905,
-0.2686046361923218,
0.238520488... | |
new PressReleaseDateComparer());
return items.Take(3).ToArray();
}
```
It would seem that loading 10,000 Sitecore items from the database into memory and then sorting them every time our homepage is hit would be unacceptable from a performance perspective.
Is there a more efficient way to express this query? Or s... | [
-0.12300408631563187,
-0.1023629903793335,
0.8913689851760864,
-0.010455473326146603,
-0.17533151805400848,
0.05538734421133995,
0.20088724792003632,
-0.5333627462387085,
-0.07057338953018188,
-0.8986172080039978,
0.06133357807993889,
0.6611537337303162,
-0.4833812713623047,
0.048090703785... | |
that in this case.
It helps to understand that [Sitecore query can be resolved either at the SQL or API levels](http://alexeyrusakov.com/sitecoreblog/2005/12/15/Understanding+Query+Performance.aspx), which does affect the performance and can sometimes be used to your advantage.
[Fast query](http://sdn.sitecore.net/up... | [
-0.6312016248703003,
-0.25181135535240173,
0.5666875243186951,
0.06606710702180862,
-0.11591695994138718,
-0.09439627826213837,
0.19491362571716309,
-0.25218209624290466,
-0.14243976771831512,
-0.753508985042572,
-0.20967650413513184,
0.4202382564544678,
-0.05297283083200455,
0.02918662689... | |
I once heard a prominent scientist say, of global warming, that he didn't realize how much he would have to learn about politics.
I just read an excellent article in DDJ about the [Jacobsen verus Katzer](http://en.wikipedia.org/wiki/Jacobsen_v._Katzer) case. When in university, I didn't know how much ***I*** would hav... | [
0.7755743265151978,
0.09114617109298706,
-0.13721221685409546,
0.2869965434074402,
0.17362241446971893,
-0.5596755146980286,
-0.2182401418685913,
0.4719248116016388,
-0.11088842153549194,
-0.47301918268203735,
0.02991778962314129,
0.5712900161743164,
0.013268917798995972,
0.247140571475029... | |
copyright law and become an informed citizen of IT?
[groklaw](http://www.groklaw.net/) would seem to be a good starting point for open source issues | [
0.8703789114952087,
0.1305236518383026,
0.3910995423793793,
0.22634732723236084,
-0.03276338428258896,
-0.6277205348014832,
-0.10892389714717865,
-0.04912703484296799,
-0.4143153429031372,
-0.044217754155397415,
-0.14116612076759338,
0.19357377290725708,
0.008664077147841454,
0.25295370817... | |
I'm trying this:
```
Type ThreadContextType = typeof(Application).GetNestedType("ThreadContext", System.Reflection.BindingFlags.NonPublic);
MethodInfo FDoIdleMi = ThreadContextType.GetMethod("FDoIdle", BindingFlags.NonPublic |
BindingFlags.Instance, null, new Type[] { typeof(Int32) }, null);
```
ThreadContextTyp... | [
0.17459553480148315,
0.39021924138069153,
0.38779380917549133,
-0.26891574263572693,
0.12127438932657242,
-0.32998594641685486,
0.7385976910591125,
-0.14160016179084778,
-0.3147203326225281,
-0.6371459364891052,
-0.23296721279621124,
0.5531193614006042,
-0.3465995192527771,
0.3320201337337... | |
already know that.
**EDIT** In the spirit of teaching a person to fish, I figured this out by calling `GetMethods(...)` on the type object, and examining the returned array to see how the methods were named. Sure enough, the names included the complete namespace specification. | [
0.7355285286903381,
-0.03401826694607735,
0.19294749200344086,
0.0780157595872879,
0.0975547730922699,
0.04310591518878937,
0.23447176814079285,
0.06811538338661194,
0.018193693831562996,
-0.6042884588241577,
0.31212684512138367,
0.2324056178331375,
-0.0435725562274456,
0.06303760409355164... | |
My organization is starting to take SOA seriously but before we jump in one of the components we seem to be missing is a rock solid repository for tracking these services across the enterprise. Can anyone suggest a product that they have worked with? If the product is also an ESB please mention that in your answer.
UDD... | [
0.5871369242668152,
-0.06003570929169655,
0.059366971254348755,
0.1824745237827301,
-0.022721542045474052,
-0.4162984788417816,
-0.06761546432971954,
0.053687259554862976,
-0.05131492391228676,
-0.7492014765739441,
-0.00047710296348668635,
0.25865960121154785,
0.0024444314185529947,
0.1823... | |
Anybody know how to get gmail's OpenID working? All I find is this <http://openid-provider.appspot.com/>, which gives 302 moved followed by GET not supported on this URL.
I'm assuming this one is broken. Any others?
I think it's not possible. But the opposite (using a gmail account as a openID) i think it's possible. | [
0.49578046798706055,
0.4094216823577881,
0.25185492634773254,
0.17922857403755188,
-0.07335450500249863,
-0.2549073100090027,
0.6020254492759705,
0.4839770495891571,
-0.3579590320587158,
-0.6742510199546814,
0.13107892870903015,
0.4419269561767578,
-0.26479482650756836,
0.0630381777882576,... | |
I've got a **large** array of primitive types (double).
How do I sort the elements in **descending order**?
Unfortunately the Java API doesn't support sorting of **primitive** types with a Comparator.
The first approach that probably comes to mind is to convert it to a list of objects (boxing):
```
double[] array = ... | [
0.24653968214988708,
0.14009195566177368,
0.03928891196846962,
-0.32472750544548035,
-0.20833107829093933,
0.06051325425505638,
0.3026442527770996,
-0.5404757261276245,
-0.249038428068161,
-0.6224166750907898,
0.03888869285583496,
0.27358320355415344,
-0.4362901747226715,
-0.14491586387157... | |
reverse the array
for (int i = 0; i < array.length / 2; i++) {
// swap the elements
double temp = array[i];
array[i] = array[array.length - (i + 1)];
array[array.length - (i + 1)] = temp;
}
```
**This approach can also be too slow** if the array is already sorted quite well.
What's a better alter... | [
-0.13383691012859344,
-0.1552763283252716,
-0.03654853627085686,
-0.5641941428184509,
-0.09374993294477463,
0.4702486991882324,
0.1762353926897049,
-0.7442879676818848,
0.15262949466705322,
-0.3138634264469147,
0.27547016739845276,
0.4476770758628845,
-0.5448032021522522,
-0.18319287896156... | |
could be written as:
```
double[] array = new double[1048576];
...
Primitive.sort(array, (d1, d2) -> Double.compare(d2, d1), false);
```
If you're using Maven, you can include it with:
```
<dependency>
<groupId>net.mintern</groupId>
<artifactId>primitive</artifactId>
<version>1.2.1</version>
</dependenc... | [
0.11753270030021667,
0.026688067242503166,
0.11318938434123993,
-0.21337729692459106,
-0.07859857380390167,
0.17614726722240448,
0.3215950131416321,
-0.5301501154899597,
0.12800368666648865,
-0.6759424805641174,
0.08243602514266968,
0.4215012788772583,
-0.1766577512025833,
-0.0988502427935... | |
I run a small php/mysql website for a camera club where users can upload photos. I have recently started storing email addresses for doing password resets.
My question is what is the best practice for dealing with users' personal information: are there any laws/legislation regarding what I can do with personal inform... | [
0.8502429127693176,
0.36663779616355896,
0.2552732825279236,
0.02917567454278469,
0.14307264983654022,
-0.4717259109020233,
0.25940489768981934,
0.10586678236722946,
-0.24858567118644714,
-0.20129136741161346,
0.26493579149246216,
0.1789133995771408,
0.1386343538761139,
0.12493865936994553... | |
information, and also what you are doing to protect their information from unauthorized used by others into whose hands it could fall.
For example, do you intend to use the email addresses for sending them promotional messages? Do you have an opt-out policy? Would you ever consider selling your email list? It could h... | [
0.8031927347183228,
0.007006110157817602,
0.1941642314195633,
0.49189692735671997,
0.5353976488113403,
-0.519283652305603,
-0.08439810574054718,
0.34547722339630127,
-0.345660537481308,
-0.0803365483880043,
0.2072833925485611,
0.41339200735092163,
0.019196903333067894,
-0.01034463290125131... | |
posted a particular photo? Even an innocuous-looking photo of a couple or a child could have unforeseen consequences if the identity (and location) of the photographer were revealed.
Think also of the viewpoint of the club leadership. They don't want to get in trouble with their club members because you have released... | [
0.9231786131858826,
-0.09552711248397827,
0.1411176174879074,
0.16495735943317413,
-0.08919745683670044,
-0.45082560181617737,
0.3946581184864044,
0.14852984249591827,
-0.45757606625556946,
-0.2289455235004425,
-0.036538977175951004,
0.27513977885246277,
-0.37100666761398315,
-0.0212684050... | |
confidential.
If you are seeking to expand your website, you will benefit from having your user's trust. | [
0.7491933703422546,
0.05551615357398987,
0.028586089611053467,
0.38432952761650085,
0.16599220037460327,
-0.766764760017395,
-0.028375860303640366,
0.5989013314247131,
0.023426368832588196,
-0.42722004652023315,
0.04228765890002251,
0.5194655656814575,
0.458320677280426,
-0.047240745276212... | |
I need a regex that matches all strings ending in .cs, but if they end in .g.cs they should not match. I'm using .NET regular expressions.
This will match the end if it's .cs but not .g.cs
```
(?<!\.g)\.cs$
```
For the entire string start to finish, something like this:
```
^.*(?<!\.g)\.cs$
``` | [
0.07812081277370453,
0.14678363502025604,
0.3135914206504822,
-0.12579213082790375,
-0.028873294591903687,
0.04627897962927818,
0.31885796785354614,
0.1016768366098404,
-0.12461116909980774,
-0.6449671983718872,
-0.26463446021080017,
0.4068889319896698,
-0.38524389266967773,
0.209779947996... | |
I have a custom UIView that generates a set of subviews and display them in rows and columns like tiles. What I am trying to achieve is to allow the user to touch the screen and as the finger move, the tiles beneath it disappears.
The code below is the custom UIView that contains the tiles:
```
- (id)initWithFrame:(... | [
0.325307160615921,
-0.03403192013502121,
0.8764379024505615,
-0.11358994245529175,
0.021433530375361443,
0.10916312038898468,
0.0701940581202507,
-0.30158939957618713,
-0.021533001214265823,
-0.9657483100891113,
0.08054587244987488,
0.4673629105091095,
-0.013618377968668938,
0.097870633006... | |
CGRect frame = CGRectMake(0, 0, TILE_WIDTH, TILE_HEIGHT);
UIView *tile;
for (i = 0; i<maxCol; i++) {
for (j = 0; j < maxRow; j++) {
frame.origin.x = i * (TILE_SPACING) + TILE_PADDING; | [
0.14229978621006012,
-0.2718881666660309,
0.5598335862159729,
-0.2320822775363922,
0.14808277785778046,
0.12554392218589783,
0.2166312038898468,
-0.2880527377128601,
0.003688523080199957,
-0.592496395111084,
-0.32660382986068726,
0.22956062853336334,
-0.21185670793056488,
0.230914950370788... | |
frame.origin.y = j * (TILE_SPACING) + TILE_PADDING;
tile = [[UIView alloc] initWithFrame:frame];
[self addSubview:tile];
[tile release];
}
}
}
return self;
}
- (void)touchesBegan: (NSSet *)touches withEvent:(UIEvent *)event { | [
-0.08427698910236359,
-0.29312998056411743,
0.5028627514839172,
-0.18396037817001343,
-0.10265444219112396,
0.29778751730918884,
0.3934743404388428,
-0.3979615271091461,
-0.2365005910396576,
-1.0562165975570679,
-0.046814873814582825,
0.27986276149749756,
0.08721621334552765,
0.10970840603... | |
UIView *tile = [self hitTest:[[touches anyObject] locationInView:self] withEvent:nil];
if (tile != self)
[tile setHidden:YES];
}
- (void)touchesMoved: (NSSet *)touches withEvent:(UIEvent *)event {
UIView *tile = [self hitTest:[[touches anyObject] locationInView:self] withEvent:nil];
if (tile != s... | [
-0.49358412623405457,
-0.25189435482025146,
0.7137142419815063,
-0.021576831117272377,
-0.11029363423585892,
0.10146161168813705,
0.5123592019081116,
-0.3580491542816162,
-0.021383194252848625,
-1.1919430494308472,
-0.049952730536460876,
0.6535491347312927,
0.23486153781414032,
-0.32531934... | |
to keep up but would like some opinions.
My questions are:
1. Is this an efficient way / right way to implement the touchesMoved?
2. If it isn't, what would be the recommended approach?
3. I tried moving the functionality into a custom Tile class (a sub UIView) which the class above would create and add as a subview.... | [
0.07913428544998169,
-0.2701489329338074,
0.8511356115341187,
-0.010279248468577862,
0.11396628618240356,
0.04005211219191551,
0.17698250710964203,
-0.3193148970603943,
-0.15153129398822784,
-0.7082810401916504,
0.26812297105789185,
0.44825950264930725,
0.0722721740603447,
-0.0462839305400... | |
do other tiles receive the TouchesBegan/TouchesMoved event as the finger move?
1. Not really, in my experience.
2. From the way you've set up your views, there would seem to be a much more efficient way to determine which one was tapped:
```
//In your init method, make sure each tile doesn't respond to clicks on its ... | [
-0.1238790825009346,
-0.16495855152606964,
0.6890244483947754,
-0.26277753710746765,
0.09515564143657684,
-0.07948143780231476,
0.24770542979240417,
-0.45918649435043335,
-0.11895526945590973,
-0.8291672468185425,
0.11130161583423615,
0.5146149396896362,
0.07649685442447662,
-0.20951406657... | |
int yPos = tappedPt.y / (TILE_SPACING + TILE_PADDING);
int tilesAcross = (self.bounds.size.width / (TILE_SPACING + TILE_PADDING));
int index = xPos + yPos * tilesAcross;
if (index < self.subviews.count) {
UIView *tappedTile = [self.subviews objectAtIndex: index];
tapp... | [
0.03974663093686104,
-0.19118382036685944,
0.8497817516326904,
-0.0063026221469044685,
0.021377330645918846,
-0.1555788666009903,
0.21381767094135284,
-0.48401156067848206,
-0.18861103057861328,
-0.5144551992416382,
-0.15925423800945282,
0.6985529661178589,
-0.10739753395318985,
-0.2678444... | |
what should happen in your parent, and what should happen in each tile. You mentioned above that you wanted the tiles to receive touchesBegan events, but you didn't include any code for this. As you presented this, you should probably think about using layers instead of views (if you're not doing any tile-specific even... | [
0.2328760325908661,
-0.4277731478214264,
0.054995130747556686,
0.3057902753353119,
0.01041908748447895,
0.1929222196340561,
0.05635641887784004,
-0.13429881632328033,
-0.17664970457553864,
-0.8627768158912659,
0.3313087522983551,
-0.14737391471862793,
0.10536812990903854,
-0.08330477029085... | |
eventually we gave up on the grid-of-layers approach.
(Not sure why the numbering restarted with 1 here...) | [
0.4996626675128937,
0.14041833579540253,
0.21075622737407684,
0.20973549783229828,
-0.3995397984981537,
0.140234112739563,
0.4126606583595276,
0.16374364495277405,
0.013443662784993649,
-0.38401100039482117,
-0.1336301565170288,
-0.1640958935022354,
-0.0037910330574959517,
0.20377980172634... | |
I am busy writing my thesis (so, I guess this could count as a homework question). Now, one of the things that came up was the Unix `select` system call. I would like to add a reference to the appropriate man page, but all I can find that seems the slight bit official is the Single Unix Specification site that wants my... | [
0.3218699097633362,
0.18839821219444275,
0.06593051552772522,
0.034885141998529434,
-0.22813811898231506,
-0.2586946487426758,
-0.23410789668560028,
0.30813363194465637,
-0.2060590535402298,
-0.511437714099884,
0.1380166858434677,
0.5240972638130188,
0.3095228672027588,
0.41208207607269287... | |
page*...
You need to ask your graduate college how you should reference this in your thesis. They will have strict rules about how to do it. If it makes it easier, see if your library has a copy of the The Linux Programmer's Reference -- assuming that it describes the select(2) call -- and reference it as a book | [
0.5268848538398743,
0.2172645479440689,
0.18668846786022186,
0.1737508624792099,
0.050244130194187164,
-0.4385405480861664,
-0.19440560042858124,
0.11258522421121597,
-0.058854151517152786,
-0.5644553303718567,
-0.1337316483259201,
0.31843629479408264,
-0.09820631891489029,
0.1301594674587... | |
I got some problems with finding a bug in php/mysql application, and I wonder if I can do something like this: `UPDATE table SET userid='2' WHERE userid='1'` - > Can I update something I state in WHERE?
Absolutely. You can even reference the current value of the column in the set:
UPDATE table
SET x = x + 5
WHERE x < ... | [
0.3755852282047272,
0.08433800935745239,
0.6881617307662964,
0.05303770303726196,
0.06907220929861069,
-0.22134731709957123,
0.22569406032562256,
-0.14442776143550873,
-0.06116795539855957,
-0.6330314874649048,
0.08309435099363327,
0.4784301817417145,
-0.29512447118759155,
0.06182533130049... | |
I have to use unsigned integers that could span to more than 4 bytes, what type should I use?
PS Sorry for the "noobism" but that's it :D
NB: I need integers because i have to do divisions and care only for the integer parts and this way int are useful
*long long*, 64 bit integer... [here](http://msdn.microsoft.com/e... | [
0.3431495428085327,
0.15003210306167603,
0.2046780288219452,
-0.03936270251870155,
0.02480260469019413,
0.20642949640750885,
0.2893236577510834,
-0.15906371176242828,
-0.3553599417209625,
-0.7235094308853149,
-0.04137358069419861,
0.16496798396110535,
-0.15832585096359253,
0.18177804350852... | |
I am looking for a way to display a modal window in WPF the same way as a window in Cocoa can be displayed as a sheet, i.e. it slides down from the titlebar in front of the main parent window.
My guess is that this would be accomplished by having the modal window as a user control which is loaded into a panel when dis... | [
0.450667142868042,
-0.18910053372383118,
0.3031213581562042,
0.12152742594480515,
-0.15995241701602936,
0.18484912812709808,
0.1485518217086792,
0.06415876001119614,
-0.4943423569202423,
-0.6489444971084595,
0.21780022978782654,
0.3154567778110504,
0.0035476076882332563,
0.0630209296941757... | |
is*.
Don't. It's not the expected user experience on Windows. Use modal dialogs or in-window navigation instead. | [
0.36513522267341614,
-0.1171741858124733,
0.2908391058444977,
0.17620326578617096,
-0.02823670394718647,
-0.3026486039161682,
0.540187656879425,
0.5388543009757996,
0.07394624501466751,
-0.8930132985115051,
-0.4154198169708252,
0.5810432434082031,
-0.4003472924232483,
0.08008390665054321,
... | |
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), `public`, `protected` and `private`, while making `class` and `interface` and dealing with inheritance?
[The official tutorial](http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html) may be of s... | [
-0.48747527599334717,
0.06499092280864716,
-0.01799241453409195,
-0.112493135035038,
-0.029909346252679825,
-0.2948755621910095,
0.14048513770103455,
-0.2254810631275177,
-0.20956702530384064,
-0.5973551869392395,
-0.3529299795627594,
0.37874144315719604,
-0.22260096669197083,
-0.134803593... | |
| |
| `private` | + | | | | |
+ : accessible
blank : not accessible | [
-0.14420032501220703,
0.15478691458702087,
0.02818046323955059,
0.3378562927246094,
0.13110274076461792,
0.04562972113490105,
0.17253871262073517,
0.3811672329902649,
-0.30142098665237427,
-0.3813692629337311,
-0.639079213142395,
0.22068814933300018,
-0.35068830847740173,
0.140704303979873... | |
I have a simple class that essentially just holds some values. I have overridden the `ToString()` method to return a nice string representation.
Now, I want to create a `ToXml()` method, that will return something like this:
```
<Song>
<Artist>Bla</Artist>
<Title>Foo</Title>
</Song>
```
Of course, I could j... | [
0.030049672350287437,
0.040469877421855927,
0.44143763184547424,
0.09712240844964981,
-0.18068110942840576,
-0.25307342410087585,
-0.10926100611686707,
-0.0357610322535038,
-0.05112054571509361,
-0.4905236065387726,
-0.06478587538003922,
0.4197849631309509,
-0.09235553443431854,
0.26293337... | |
a `XmlDocument` or `ref XmlElement` to work with, or have the function return a String that contains the XML I want?
You may want to look at how you can use the built-in features of .NET to serialize and deserialize an object into XML, rather than creating a `ToXML()` method on every class that is essentially just a Da... | [
0.4723837971687317,
-0.2039221227169037,
0.342254102230072,
0.33883145451545715,
-0.21999678015708923,
-0.3383040726184845,
-0.17670336365699768,
-0.06343911588191986,
-0.21660172939300537,
-0.5697205066680908,
-0.15277089178562164,
0.630413293838501,
-0.13905619084835052,
0.05772172659635... | |
in .NET by Venkat Subramaniam <http://www.agiledeveloper.com/articles/XMLSerialization.pdf>
How to Serialize and Deserialize an object into XML <http://www.dotnetfunda.com/articles/article98.aspx>
Customize your .NET object XML serialization with .NET XML attributes <http://blogs.microsoft.co.il/blogs/rotemb/archive/... | [
0.43464237451553345,
-0.25208333134651184,
-0.19783426821231842,
0.024002114310860634,
-0.07687012851238251,
0.11546771973371506,
0.24904929101467133,
-0.24062250554561615,
-0.22069445252418518,
-0.3913997411727905,
-0.2729886770248413,
-0.02197735197842121,
-0.5871361494064331,
-0.0394814... | |
Some iPhone applications, such as Pandora seem to directly manipulate the hardware volume and respond to physical volume button. How is this done?
AudioSessionServices allows you to get the current hardware output volume with the `kAudioSessionProperty_CurrentHardwareOutputVolume` property, but it is (allegedly) read-... | [
-0.05626989156007767,
0.0433114729821682,
0.7425273656845093,
0.12134165316820145,
0.030195897445082664,
0.12212945520877838,
0.3857761025428772,
-0.3597874939441681,
-0.2162783145904541,
-0.43261584639549255,
-0.1334696114063263,
0.9873075485229492,
-0.19411700963974,
0.11636380851268768,... | |
So am I crazy for considering doing a beta/production release on Glassfish V3 Prelude?
Since all of my content is dynamic, I'm not even thinking of bothering to set up apache in front either. Doing so complicates the setup by requiring something like AJP or mod\_jk and will not offer us much in terms of capability.
So... | [
0.24712353944778442,
0.15277859568595886,
0.1823047697544098,
0.20283661782741547,
-0.3282605707645416,
0.001786916865967214,
0.2993348240852356,
-0.0964449793100357,
-0.302090585231781,
-0.37825483083724976,
0.01582067646086216,
0.4967750608921051,
-0.10422863811254501,
0.2149413675069809... | |
in front of this setup?
They use the MPVolumeView, simple add it and it's makes the rest when the user touch it. Note: Doesn't work in iPhone Simulator. I think the release note also mentioned do not use it direct in Interface Builder.
```
MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:CGRectMake(25, ... | [
0.18896134197711945,
0.1664130985736847,
0.7698172926902771,
0.007308864966034889,
0.062126245349645615,
0.07348544895648956,
0.36118707060813904,
-0.35655954480171204,
-0.1525467485189438,
-0.6178749203681946,
-0.03460104763507843,
0.9286861419677734,
-0.24554863572120667,
-0.129156664013... | |
I'd like to create a script to manipulate Apache2 configuration directly, reading and writing its properties (like adding a new VirtualHost, changing settings of one that already exists).
Are there any libs out there, for Perl, Python or Java that automates that task?
In Perl, you've got at least 2 modules for that:
... | [
0.4479224979877472,
-0.07419430464506149,
0.29559221863746643,
0.19245809316635132,
0.04469241201877594,
-0.26010850071907043,
0.10130266845226288,
-0.1526244878768921,
-0.3541894853115082,
-0.6633237600326538,
-0.058715712279081345,
0.5216101408004761,
-0.12879516184329987,
-0.21082943677... | |
Background: Over the next month, I'll be giving three talks about or at least including `LINQ` in the context of `C#`. I'd like to know which topics are worth giving a fair amount of attention to, based on what people may find hard to understand, or what they may have a mistaken impression of. I won't be specifically t... | [
0.5376222133636475,
0.385295569896698,
0.2007589340209961,
0.3321850895881653,
-0.004445273894816637,
-0.11411916464567184,
0.08578748255968094,
0.33105477690696716,
-0.21458809077739716,
-0.37670326232910156,
-0.034427445381879807,
0.7199341654777527,
0.05525347217917442,
-0.2037523388862... | |
be any of the following, but please don't limit yourself!
* How the `C#` compiler treats query expressions
* Lambda expressions
* Expression trees
* Extension methods
* Anonymous types
* `IQueryable`
* Deferred vs immediate execution
* Streaming vs buffered execution (e.g. OrderBy is deferred but buffered)
* Implicitl... | [
0.28309494256973267,
-0.40762093663215637,
-0.013582245446741581,
-0.05988416075706482,
-0.09182529896497726,
0.1047108992934227,
0.39718353748321533,
-0.31407374143600464,
-0.4334983229637146,
-0.20774725079536438,
-0.2607322931289673,
0.537687361240387,
-0.6296722292900085,
-0.0183057598... | |
What is the purpose of the colon before a block in Python?
Example:
```
if n == 0:
print "The end"
```
The colon is there to declare the start of an indented block.
Technically, it's not necessary; you could just indent and de-indent when the block is done. However, based on the [Python koan](http://www.python.... | [
0.12214043736457825,
0.09463535249233246,
0.3116268515586853,
-0.37607675790786743,
-0.2541775107383728,
-0.12962596118450165,
0.11333618313074112,
0.014176834374666214,
0.010021161288022995,
-0.3785037696361542,
-0.20678260922431946,
0.8176150918006897,
-0.2828833758831024,
-0.26038208603... | |
makes the work of syntax-aware auto-indenting editors easier, which also counted in the decision.
---
This question turns out to be a [Python FAQ](http://docs.python.org/faq/design.html#why-are-colons-required-for-the-if-while-def-class-statements), and I found one of its answers by Guido [here](http://markmail.org/m... | [
0.07610058039426804,
0.012150461785495281,
0.01715759001672268,
0.012625026516616344,
-0.15365631878376007,
0.07461635768413544,
0.0353403240442276,
-0.2159407138824463,
0.030941512435674667,
-0.33375242352485657,
-0.21601541340351105,
0.39124414324760437,
-0.16530553996562958,
-0.30586832... | |
how the second one is slightly easier to read. Notice further how a colon sets off the example in this FAQ answer; it’s a standard usage in English.
>
>
> Another minor reason is that the colon makes it easier for editors with syntax highlighting; they can look for colons to decide when indentation needs to be increa... | [
-0.15725892782211304,
0.02622954174876213,
0.15467052161693573,
0.025178486481308937,
-0.3887083828449249,
0.11309687793254852,
0.03170102834701538,
0.1758500635623932,
-0.2906484305858612,
-0.7450793981552124,
-0.2517085671424866,
0.5161759853363037,
-0.1710129827260971,
-0.47902733087539... | |
What is a good resource to get started with Windows file system driver development for a newbie?
[Windows NT File System Internals](https://www.osronline.com/custom.cfm?name=index_fullframeset.cfm&pageURL=https://www.osronline.com/store/index.cfm) by Rajeev Nagar.
OSR Online's File System Resource page (and OSR Online... | [
0.38831254839897156,
0.3123103976249695,
-0.07189349830150604,
-0.0859023928642273,
0.14124760031700134,
-0.0032869286369532347,
-0.26379871368408203,
0.031122079119086266,
-0.11610458046197891,
-0.39652979373931885,
-0.07632608711719513,
0.46277907490730286,
-0.0049536628648638725,
0.1048... | |
Just so you have an idea what you may be getting into. | [
0.5303146243095398,
-0.15545132756233215,
0.003387367120012641,
0.11353392899036407,
0.17985855042934418,
-0.5459825992584229,
0.43967756628990173,
0.5171283483505249,
-0.2509797215461731,
-0.16732603311538696,
0.0413251593708992,
0.3604283928871155,
0.19252747297286987,
0.0347322411835193... | |
A similar question was already asked (
[Performing a Stress Test on Web Application?](https://stackoverflow.com/questions/7492/how-do-you-stress-test-a-web-application)), but I'd like to test a web application that prevents double-submits and takes some counter-XSRF actions and therefore REQUIRES JavaScripts to be eva... | [
0.2264585942029953,
-0.03780596703290939,
0.014495356008410454,
0.18069441616535187,
-0.5806897282600403,
-0.38392016291618347,
0.2984068691730499,
-0.5276893973350525,
0.2555425763130188,
-0.6238322257995605,
0.0815839096903801,
0.7374744415283203,
-0.3314090669155121,
-0.2827605307102203... | |
Internet Explorer, but is also functional with Firefox (and Safari to some extent). | [
-0.3175218999385834,
-0.13317269086837769,
0.4583437442779541,
-0.017356980592012405,
-0.19325175881385803,
-0.5333091020584106,
0.11361895501613617,
0.4692813456058502,
0.017334986478090286,
-1.0297614336013794,
-0.27638739347457886,
0.31123536825180054,
-0.6278663873672485,
0.05803559347... | |
I often find myself trying to come up with good names for complementary pairs of variables; where two variables denote opposing concepts, two participants in some sort of duologue, and so on.
This might be better explained by a counter-example - I maintain an app that prints two graphics as part of a print advertiseme... | [
0.656843364238739,
0.13215182721614838,
0.18765193223953247,
0.1845870167016983,
-0.12459062039852142,
0.21032282710075378,
-0.23749981820583344,
0.285769522190094,
-0.1779271960258484,
-0.5595677495002747,
-0.006259872578084469,
0.5116813778877258,
-0.10020558536052704,
-0.148974865674972... | |
/ target` for copying/moving data or files from one variable to another
`minimum / maximum`
but there's some concepts that just don't lend themselves to such neat naming schemes. For example, when paging through records, does 'last' mean 'final' or 'previous' ? I recently saw some code that used `firstPage`, `prev... | [
0.46981358528137207,
-0.3255777359008789,
0.05985557287931442,
0.11947634816169739,
-0.28650766611099243,
-0.005956315901130438,
-0.23405450582504272,
0.2808903455734253,
-0.2055593580007553,
-0.7365533709526062,
0.21888865530490875,
0.31957826018333435,
-0.0797431543469429,
0.130402550101... | |
fonts.)
Like with all kinds of code style conventions, **consistency** is what you should strive for.
I would have the development team agree on "standard" pairs of prefixes for common scenarios like "source/destination" or "from/to" and then stick with them for the whole project. As long as every developer is aware... | [
0.5230119228363037,
0.3038754165172577,
0.2896122932434082,
0.07245564460754395,
-0.1752784550189972,
0.09935765713453293,
0.32542911171913147,
0.04209078475832939,
-0.27693042159080505,
-0.711131751537323,
-0.23980672657489777,
0.5942397713661194,
-0.18816110491752625,
-0.1734581589698791... | |
a single class or method. | [
0.072223961353302,
-0.09689214080572128,
-0.33666613698005676,
0.5393937230110168,
-0.4416268765926361,
0.10115478932857513,
0.3464653193950653,
-0.08417755365371704,
-0.1893862783908844,
-0.5209160447120667,
-0.35190141201019287,
-0.002722399774938822,
-0.2778056561946869,
0.0500972159206... | |
What is the state of native SVG support in the most popular browsers in their latest releases?
* Internet explorer
* Firefox
* Opera
* Safari
* Chrome
* Konqueror
* Camino
* IE has SVG support in IE9 but not in IE8 and below. The alternative is [VML](http://msdn.microsoft.com/en-us/library/bb250524.aspx)
* [Mozilla cl... | [
-0.06748147308826447,
0.0305838193744421,
0.5598995089530945,
-0.19226714968681335,
-0.22432661056518555,
-0.3063541054725647,
0.5714297294616699,
-0.0020186323672533035,
-0.20060500502586365,
-0.38496720790863037,
-0.45105770230293274,
0.4276193082332611,
-0.25202783942222595,
0.038919102... | |
list](http://svg.kde.org/tasks.php) implies it's not ready for production
* [Camino apparently supports SVG as well](http://svg.org/story/2005/12/30/231328/85) | [
0.05565711483359337,
-0.12932150065898895,
0.53302401304245,
0.045600827783346176,
0.12829482555389404,
0.03252356871962547,
-0.04023383930325508,
0.11602915823459625,
-0.5273756384849548,
0.10299048572778702,
0.03488600626587868,
0.5257991552352905,
0.2977745831012726,
-0.0156385768204927... | |
What the best way to get up to speed on MathML and its usage in the world?
In particular I mean:
* What do you use for rendering/editing it
* Is it used in any commercial/open source applications that you can point me to
* Is it popular and used a lot?
* Are there any viewers that can be used inside a C#, C++, Java, ... | [
0.3109216094017029,
-0.06059601902961731,
0.38274720311164856,
0.14542090892791748,
-0.3560067415237427,
-0.23928862810134888,
-0.21311865746974945,
0.44052886962890625,
-0.33331575989723206,
-0.6713753342628479,
-0.0025062819477170706,
0.27672240138053894,
0.057204753160476685,
-0.1886069... | |
which will tell a rendering engine how to typeset the equation (for instance, distinguishing between a stacked vs. beveled fraction), and the content set, which will tell calculation engines how to interpret the equation (is y(x) a function y of x or two variables being multiplied?). Most applications will focus on one... | [
0.3179841935634613,
-0.07992275059223175,
0.6032081842422485,
0.24442358314990997,
-0.3021356463432312,
0.03180936723947525,
-0.3912452757358551,
-0.28279751539230347,
-0.27224355936050415,
-0.5401382446289062,
-0.37483251094818115,
0.4055717885494232,
-0.11307267844676971,
-0.049593884497... | |
components for editing and displaying MathML on your website. We also have an SDK version if you would like to include these components in a desktop application. WebEQ is Java based.
Hope this helps, but if you have more questions, feel free to email support@dessci.com.
Best wishes,
Autumn Cuellar, XML Specialist at... | [
0.5586567521095276,
-0.1850297451019287,
0.14770571887493134,
0.42058470845222473,
-0.04421444982290268,
-0.011264017783105373,
0.23327575623989105,
0.05137632042169571,
-0.2992303669452667,
-0.6863468885421753,
-0.023374758660793304,
0.4570251405239105,
0.1165696457028389,
-0.109577640891... | |
If you have something like:
```
val myStuff = Array(Person("joe",40), Person("mary", 35))
```
How do you create an XML value with that data as nodes? I know how to use { braces } in an XML expression to put a value, but this is a collection of values. Do I need to iterate explicitly or is there something better?
``... | [
-0.062296196818351746,
0.07481490820646286,
0.12606586515903473,
0.017004337161779404,
0.0580017976462841,
0.3306574523448944,
0.10489431023597717,
-0.2744455635547638,
-0.28095296025276184,
-0.8469445705413818,
-0.3426419496536255,
0.23994019627571106,
0.020966101437807083,
0.075656704604... | |
val people = List(
new Person("Alice", 16),
new Person("Bob", 64)
)
val data = <people>{ people.map(p => p.toXml()) }</people>
def main(args : Array[String]){
println(data)
}
}
```
Results in:
```
<people><person><name>Alice</name><age>16</age></person><person><name>Bob</nam... | [
-0.23889753222465515,
-0.1691388040781021,
0.4929071366786957,
-0.28522735834121704,
0.15754979848861694,
0.5397113561630249,
0.0877954438328743,
-0.42228275537490845,
-0.6235159635543823,
-0.4670896828174591,
-0.3914622664451599,
0.5675142407417297,
-0.19296839833259583,
0.025138279423117... | |
<age>64</age>
</person>
</people>
``` | [
0.1733454316854477,
0.6604334712028503,
0.3551528751850128,
-0.3059388995170593,
0.24460123479366302,
0.2624869644641876,
0.25370854139328003,
0.1038026288151741,
-0.40540552139282227,
-0.5658433437347412,
-0.2010294497013092,
0.08417312055826187,
0.0025537966284900904,
0.39881616830825806... | |
I'm a very novice OCaml programmer so please forgive me if this is a stupid/obvious question. There's *a lot* to absorb and I may have missed this in the documentation.
I have a base of code that's starting to look like this:
```
let update_x p x =
add_delta p;
p.x <- x;
refresh p
let update_y p y =
add_delt... | [
0.2538589835166931,
0.1398099958896637,
0.5766337513923645,
-0.3804001212120056,
-0.1905631422996521,
-0.0067238216288387775,
0.2608928978443146,
-0.24776217341423035,
-0.22283953428268433,
-0.7882572412490845,
-0.05432303249835968,
0.5801695585250854,
-0.5774713158607483,
-0.1045788526535... | |
scalar value =
add_delta p;
magic_reflection (p, scalar) <- value;
refresh p
```
This way when I update x I can simply call:
```
update_scalar p 'x' value
```
This calls out "macros!" to me but I don't believe OCaml has a macro system. What else can I do?
No, you can't do what you want in plain OCaml. ... | [
0.20344945788383484,
0.09264221787452698,
0.7934663891792297,
-0.4875393807888031,
0.10481628030538559,
-0.04709374159574509,
0.05468616634607315,
-0.17953674495220184,
-0.4148750901222229,
-0.3646112084388733,
-0.15064816176891327,
0.6437085270881653,
-0.4905503988265991,
-0.1500073671340... | |
hash table and forgo type safety.
NOTE: The version of camlp4 included in OCaml version 3.10 and later is different than and incompatible with the previous version. For information about the latest version, see [the OCaml tutorial site](http://www.ocaml-tutorial.org/camlp4_3.10). | [
-0.0031403747852891684,
0.3698875904083252,
0.4793909192085266,
-0.21597279608249664,
0.055122409015893936,
-0.274949848651886,
0.3904828429222107,
0.123161181807518,
-0.25615885853767395,
-0.2612403333187103,
-0.39802953600883484,
0.4118165671825409,
-0.5691777467727661,
0.007781191729009... | |
I have an s-expression bound to a variable in Common Lisp:
```
(defvar x '(+ a 2))
```
Now I want to create a function that when called, evaluates the expression in the scope in which it was defined. I've tried this:
```
(let ((a 4))
(lambda () (eval x)))
```
and
```
(let ((a 4))
(eval `(lambda () ,x)))
```... | [
0.02838645689189434,
0.23592780530452728,
0.484456866979599,
-0.26791250705718994,
-0.22424529492855072,
0.011184483766555786,
0.5360490679740906,
-0.4737393856048584,
0.030268259346485138,
-0.4141012728214264,
-0.318990021944046,
0.807378888130188,
-0.5317369699478149,
-0.2623026967048645... | |
problem, how else can it be done?
EDIT: There was a question about what exactly I am try to do. I am writing a compiler. I want to accept an s-expression with variables closed in the lexical environment where the expression is defined. It may indeed be better to write it as a macro.
You need to create code that has th... | [
0.043686121702194214,
0.17247357964515686,
0.25344398617744446,
-0.07005719095468521,
0.09689031541347504,
0.14385509490966797,
0.4080736041069031,
-0.3545321822166443,
-0.3270305395126343,
-0.46083831787109375,
-0.18826065957546234,
0.7137042284011841,
-0.6238560080528259,
-0.284964621067... | |
,*x*)))
``` | [
0.08695414662361145,
0.628447949886322,
0.25787627696990967,
-0.23111002147197723,
-0.1512003242969513,
-0.09305528551340103,
0.38589927554130554,
-0.0487932451069355,
-0.05003257840871811,
-0.4952721893787384,
-0.45922380685806274,
0.47269952297210693,
-0.46587538719177246,
0.349735289812... | |
If I add an after\_save callback to an ActiveRecord model, and on that callback I use update\_attribute to change the object, the callback is called again, and so a 'stack overflow' occurs (hehe, couldn't resist).
Is it possible to avoid this behavior, maybe disabling the callback during it's execution? Or is there an... | [
-0.07365719974040985,
-0.36407405138015747,
0.28274717926979065,
-0.18790745735168457,
-0.07103997468948364,
-0.04159790650010109,
0.4695412516593933,
-0.3421838581562042,
-0.10260371118783951,
-0.5748727321624756,
-0.12491022795438766,
0.8078808188438416,
-0.42216742038726807,
0.098388917... | |
This will likely hit your database twice, which may or may not be desirable.
I have a vague feeling that there's something built in, but this is a fairly foolproof way to prevent a specific point of recursion in just about any application.
I would also recommend looking at the code again, as it's likely that whatever ... | [
0.27827906608581543,
0.21151110529899597,
0.0781819075345993,
0.022352438420057297,
0.26885977387428284,
-0.3238193094730377,
0.6137679815292358,
0.16934116184711456,
-0.43032798171043396,
-0.5837725400924683,
0.08501926064491272,
0.4815795123577118,
-0.05000639706850052,
0.049595434218645... | |
I have ran into an odd problem with the ActionLink method in ASP.NET MVC Beta. When using the Lambda overload from the MVC futures I cannot seem to specify a parameter pulled from ViewData.
When I try this:
```
<%= Html.ActionLink<PhotoController>(p => p.Upload(((string)ViewData["groupName"])), "upload new photo") %>... | [
-0.02526949718594551,
-0.030364470556378365,
0.6449662446975708,
-0.2843017578125,
-0.34240803122520447,
0.02168525755405426,
0.13514883816242218,
-0.42690178751945496,
-0.3545641005039215,
-0.6234777569770813,
-0.11335195600986481,
0.504107654094696,
-0.4817320704460144,
0.018726993352174... | |
ViewData, and it not being there when the Lambda gets evaluated by the internals of the framework. But that is just a guess.
Am I doing something incorrect in the first sample to cause this, or is this some short of bug?
**Update**: I am using the latest version of the MVC futures. It has been pointed out that this ... | [
0.4794534146785736,
-0.23288685083389282,
0.4308508634567261,
0.03532012552022934,
-0.04751499369740486,
0.08850863575935364,
-0.07338438183069229,
0.056180790066719055,
-0.4613440930843353,
-0.5675750970840454,
0.23126329481601715,
0.7914683222770691,
-0.23184576630592346,
-0.177498757839... | |
stumped.
Ok, I figured out what my problem was.
Apparently I was not even setting the ViewData slot that I was trying to read from in the view, resulting in it being a null value.
So effectually I was writing:
```
<%= Html.ActionLink<PhotoController>(p => p.Upload(null), "upload new photo") %>
```
I think the ulti... | [
-0.045595601201057434,
-0.03892115131020546,
0.4665665626525879,
0.008752106688916683,
-0.1496603786945343,
-0.08879747241735458,
0.2876470685005188,
-0.3600110709667206,
-0.6498624682426453,
-0.55623459815979,
0.07957073301076889,
0.14526249468326569,
-0.4746670424938202,
0.06126539781689... | |
be present, but according go the Lambda gropname was omitted (null). This resulted in the MVC framework being unable to find a route that satisfied my query, and just returning null. | [
-0.1250729113817215,
-0.12330939620733261,
0.24609674513339996,
-0.08838004618883133,
-0.06327901035547256,
-0.05186278745532036,
0.638550341129303,
0.00097910116892308,
-0.009473437443375587,
-0.251755952835083,
-0.16814684867858887,
0.29382482171058655,
-0.6304447650909424,
0.03091954998... | |
I'm getting a totally bizzare error trying to compile a C program using GCC. Here is the batch file I am using:
```
echo Now compiling, assembling, and linking the core:
nasm -f aout -o start.o start.asm
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o co... | [
-0.015877975150942802,
0.4609811305999756,
0.5151199698448181,
-0.3471333682537079,
0.07371390610933304,
-0.07444240897893906,
0.428406298160553,
-0.25206074118614197,
-0.21421284973621368,
-0.4627419412136078,
-0.29463595151901245,
0.558506965637207,
-0.38611504435539246,
0.16484525799751... | |
the PATH variable is set up correctly:
```
C:\Simple\core>build.bat
C:\Simple\core>echo Now compiling, assembling, and linking the core:
Now compiling, assembling, and linking the core:
C:\Simple\core>nasm -f aout -o start.o start.asm
C:\Simple\core>gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-func
... | [
-0.17960387468338013,
-0.009303282015025616,
0.6521580815315247,
-0.05654416233301163,
0.19443771243095398,
-0.036877505481243134,
0.5285353660583496,
-0.39098432660102844,
0.012706700712442398,
-0.5909507870674133,
-0.4643835425376892,
0.46242618560791016,
-0.5303194522857666,
0.009548419... | |
12, in <module>
with open("core.bin", "rb") as core:
IOError: [Errno 2] No such file or directory: 'core.bin'
```
Now, the interesting thing is the gcc command, which is the issue I'm having. (The other issues seem to be cascading from this.) When compiling core.c, the GCC command works just fine and great, and p... | [
0.23344126343727112,
0.2140798717737198,
0.07564341276884079,
-0.09339287132024765,
0.12463907152414322,
-0.1612478792667389,
0.09204084426164627,
-0.18185773491859436,
-0.19553430378437042,
-0.4957469701766968,
-0.06182696670293808,
0.9041842222213745,
-0.21452495455741882,
0.178493171930... | |
outside the window. Something about core.c is just special, and I can't figure out what the difference is. I literally copied that line and changed the filenames to create the other two lines that are failing.
So, in short, HELP. I'm using DJGPP and GCC on windows XP, along with a python script at the end that should ... | [
0.8103184700012207,
0.20643305778503418,
0.2610965371131897,
0.1078934445977211,
-0.17685826122760773,
-0.31387460231781006,
0.3887490928173065,
0.15734805166721344,
-0.2875385880470276,
-0.5980060696601868,
-0.07680857181549072,
0.6472007632255554,
-0.1625870317220688,
-0.1865569800138473... | |
cringe. However, I'd really like to understand this error before moving on to a makefile if possible. ^\_^
EDIT: The accepted answer was indeed our problem, although the issue was with DJGPP, not Windows. (Windows doesn't seem to have a command limit.) The solution was to compile with MinGW instead of DJGPP, which fix... | [
0.3264402747154236,
0.15981803834438324,
0.4870125353336334,
0.09323306381702423,
-0.15495869517326355,
0.016112467274069786,
0.4215676486492157,
0.12597759068012238,
-0.307369202375412,
-0.4757598042488098,
0.19723236560821533,
0.3604927361011505,
-0.12719981372356415,
-0.0081590535119175... | |
I am implementing a BFS, and what it is going to do is go through an ordered tree to find the shortest solution to a puzzle.
What i will be doing is creating a Snapshot object that holds the current position of each piece in a puzzle. I will add this Snapshot object into the queue and check if it is the solution. Howe... | [
0.1594327837228775,
-0.12351987510919571,
0.31669577956199646,
0.1260840743780136,
0.14018912613391876,
0.13098156452178955,
0.012469157576560974,
0.04217861220240593,
-0.23304541409015656,
-0.44987377524375916,
0.07755720615386963,
0.16489137709140778,
-0.5097365379333496,
0.0333909206092... | |
track of how many declarations i have made and just hard code it by saying...
Snapshot snapshot2;
Snapshot snapshot3;
Snapshot snapshot4;
etc..
There is a way - you use the [Preprocessor's Token-Pasting Operator](http://msdn.microsoft.com/en-us/library/09dwwt6y(VS.80).aspx). This allows you to create a name based on a... | [
0.35634419322013855,
-0.13481371104717255,
0.10543807595968246,
0.029753224924206734,
-0.05757234990596771,
0.030193274840712547,
0.14038987457752228,
-0.24747690558433533,
-0.2858811914920807,
-0.37439656257629395,
0.002518020337447524,
0.5230778455734253,
-0.30782854557037354,
-0.0205411... | |
What is the Win32 API call to determine the system-wide font (in particular the color) for say Menus.
This would be equivalent to going into Appearance Settings - Advanced - and then choosing Menu as the item to look at.
I can use GetSysColor to find the colors of various system-wide window elements, but cannot find ... | [
-0.0691094771027565,
-0.24042817950248718,
0.47327011823654175,
-0.059550438076257706,
0.02076881192624569,
0.24032752215862274,
0.2271360158920288,
-0.03759255260229111,
-0.026643145829439163,
-0.7550889253616333,
0.08358681201934814,
0.7799361944198608,
-0.32174497842788696,
-0.058453008... | |
Dialog.
See <http://blogs.msdn.com/oldnewthing/archive/2005/02/04/366987.aspx> for more. | [
0.08024471998214722,
0.03649880737066269,
0.4368003308773041,
0.1857520043849945,
-0.05235270783305168,
0.0019853885751217604,
0.2545190155506134,
0.1457139253616333,
-0.5809495449066162,
-0.496481716632843,
-0.09134552627801895,
0.303772896528244,
-0.42395496368408203,
0.10253635048866272... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.