text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have an app built against MVC Preview 3 (referencing local copies of the MVC assemblies) that I'm trying to modify/test on a machine with the ASP.NET MVC beta installed. I am not interesting in updating this app to run against MVC beta yet - I just need to make a few small changes.
It's failing with MissingMethodExc... | [
0.3871198892593384,
0.29954442381858826,
0.03375765681266785,
-0.21860314905643463,
-0.08129057288169861,
-0.09821239858865738,
0.6357054114341736,
0.22245517373085022,
-0.24732133746147156,
-0.6694865226745605,
0.1410924643278122,
0.35450124740600586,
-0.5843719244003296,
0.28374633193016... | |
key, I believe there's no way of distinguishing between them within web.config, so I think the only solution here is to remove the ASP.NET MVC beta assemblies from the GAC.
Only - I can't do this, because they're installed by Windows Installer, so I can't remove them using gacutil.exe /u, and I'm getting "Access is de... | [
0.3244047462940216,
0.17292214930057526,
0.13200300931930542,
-0.11038786172866821,
-0.446645587682724,
-0.0940944030880928,
0.2533630430698395,
0.10692676901817322,
-0.2490648478269577,
-0.6649335026741028,
0.054056160151958466,
0.5685689449310303,
-0.38862115144729614,
0.3861863017082214... | |
3 Source](http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=13792 "ASP.NET - Release: ASP.NET MVC Preview 3 Source") and compile it with your own SNK or give it a different version as the offical one and reference that in your website. | [
0.2896732687950134,
0.049469124525785446,
0.12262803316116333,
-0.09398765116930008,
-0.419175922870636,
-0.2654823958873749,
0.3523810803890228,
-0.549736499786377,
-0.004658577032387257,
-0.46723052859306335,
-0.32274800539016724,
0.4130434989929199,
-0.37711331248283386,
-0.343607395887... | |
I've seen a few sites that have a flash app which takes video from the users webcam and manipulates it. One example is the flash barcode reader <http://www.renaun.com/flex2/BarcodeReader/BarcodeReader.html> .
I want users to be able to submit 10-15 second clips which I can save to my server and then play back later vi... | [
0.9508875608444214,
0.046092234551906586,
-0.07582999765872955,
0.2740876376628876,
-0.17136383056640625,
-0.10058563202619553,
-0.020588837563991547,
-0.04328988119959831,
-0.20484887063503265,
-0.5537274479866028,
0.2409285306930542,
0.6067046523094177,
0.021780306473374367,
-0.240843906... | |
through all the necessary steps along with sample code:
[<http://www.adobe.com/devnet/flash/articles/webcam_motion.html>](http://www.adobe.com/devnet/flash/articles/webcam_motion.html) | [
0.16228003799915314,
0.1058640405535698,
0.18476459383964539,
-0.07891912013292313,
0.033720292150974274,
0.0013017967576161027,
0.2090742290019989,
-0.7051138877868652,
-0.3151463270187378,
-0.1829434633255005,
-0.23576799035072327,
0.33615413308143616,
-0.06004132330417633,
-0.3735539913... | |
I have some elements on a page which are draggable. These same elements have a click event which navigates to another page. I'm trying to determine the best way of preventing the click event from firing if the user is dragging but still allow the click event if not dragging. Anyone have any ideas of the best way to acc... | [
0.13209733366966248,
-0.07252282649278641,
0.6419827938079834,
0.07515482604503632,
0.16086500883102417,
-0.04596848785877228,
0.06817428022623062,
-0.17334666848182678,
-0.13025422394275665,
-0.5649726390838623,
0.11942748725414276,
0.7042230367660522,
-0.5049115419387817,
0.1616263538599... | |
onEnd : function() {
setTimeout("Event.observe('id', 'click', function() { location.href = 'url'; });", 500);
},
revert: true
});
``` | [
0.07797405868768692,
-0.4163855314254761,
0.16083914041519165,
-0.18818987905979156,
0.372942715883255,
-0.1924205720424652,
0.11839482933282852,
-0.08655156940221786,
-0.07057280838489532,
-0.5485280156135559,
-0.44414830207824707,
0.5869354009628296,
-0.3740123510360718,
0.35381919145584... | |
The CSS Friendly Control Adapters for ASP.NET are great for creating markup that is easy to style. A big benefit of the GridView adapter is that it generates THEAD, TBODY, and TFOOT tags, which allow you to do some really great things with libraries like jQuery - for instance, [Tablesorter](http://tablesorter.com/docs/... | [
0.3921132981777191,
-0.043409861624240875,
0.5383614301681519,
0.14157332479953766,
-0.3090118169784546,
-0.3612525165081024,
-0.0546780489385128,
0.03173217922449112,
-0.128522127866745,
-0.8651921153068542,
0.04820392653346062,
0.5997439622879028,
-0.4693141579627991,
-0.1280139833688736... | |
would be interested in two types of solutions:
1) A way to extend or modify GridView (a new tag is acceptable) to output THEAD and TBODY tags.
2) A way to conditionally apply or disable CSS Friendly Control Adapters.
I just did something similar to this after doing a little research
you need to subclass the control ... | [
0.3407987058162689,
-0.34009408950805664,
0.6338079571723938,
0.1307218074798584,
0.01897392049431801,
-0.22376775741577148,
0.12495137751102448,
-0.5307120680809021,
0.2942982017993927,
-0.7294416427612305,
-0.008167537860572338,
0.8464005589485168,
-0.4844503402709961,
0.0018679124768823... | |
// Call the base RenderContents method.
base.Render(writer);
}
}
```
Then just have the .browser file refer to your custom subclass, instead of the asp.net control
e.g.
```
<browsers>
<browser refID="Default">
<controlAdapters>
<adapter controlType="FM.Web.Source.WebControls.UlRa... | [
-0.38232648372650146,
-0.12350832670927048,
0.7179048657417297,
-0.13391034305095673,
0.07651401311159134,
0.0047219665721058846,
0.23631496727466583,
-0.38630416989326477,
-0.06851928681135178,
-0.7795538306236267,
-0.40517446398735046,
0.8527321815490723,
-0.36565425992012024,
0.24521887... | |
Has anyone come across an example of a non .Net consumer of an ADO.NET Data Service? I am on the second day of looking at what Astoria is and how it can be used. I am also trying to answer why would I use this instead of a web service?
After getting my examples running, I kind get the RESTful approach to getting data ... | [
0.8539363145828247,
0.030591275542974472,
0.003559567965567112,
0.3120783865451813,
-0.23322439193725586,
-0.338716059923172,
0.30013006925582886,
0.19864335656166077,
-0.36958935856819153,
-0.5265451073646545,
0.4455559253692627,
0.18659810721874237,
-0.06482000648975372,
0.39581373333930... | |
RESTful service anything that can make RESTful calls to a URI can properly use the service. I think rather than looking for .NET related to X technology you should look up the technology you're using (Python, PHP, Whatever) on how to call RESTful services. Once ADO.NET hosts the data service... it's up and for anyone t... | [
0.27480047941207886,
-0.0966423973441124,
0.6247551441192627,
0.06259094923734665,
-0.18713054060935974,
-0.35362958908081055,
0.11567111313343048,
0.18277616798877716,
-0.04866032674908638,
-0.6054211258888245,
-0.2840009927749634,
0.7497653365135193,
-0.28223779797554016,
0.0023167857434... | |
I know that there at least two approaches to leverage the web.config file:
* using the `configSource` attribute which was introduced in .NET 2.0 - [here is a good blog entry](http://blog.andreloker.de/post/2008/06/Keep-your-config-clean-with-external-config-files.aspx) about it.
* The `file` attribute of the appSettin... | [
0.13595283031463623,
0.12372436374425888,
0.4472123682498932,
-0.08302977681159973,
0.027148518711328506,
-0.2924024760723114,
0.2267037332057953,
0.02177819237112999,
-0.35623854398727417,
-0.9359068274497986,
0.14170414209365845,
0.6864842772483826,
-0.3522568643093109,
0.049336969852447... | |
I want to do it this way, because I have multiple instances of my web application on the same server (and that on many servers). To keep deployment easy and clean, I want to keep one directory for all the files (aspx, ascx, images, css, js etc.) and point the web apps in IIS for different customers (=domains, https etc... | [
0.593759298324585,
0.11763846129179001,
0.3153309226036072,
0.04460209608078003,
-0.022115541622042656,
0.02002015709877014,
0.19032412767410278,
-0.10170184820890427,
-0.5135306715965271,
-0.9302278757095337,
-0.09715507924556732,
0.37175965309143066,
-0.12862803041934967,
0.2659169435501... | |
an inherited web.config - that web.config would be valid only for the custom folder which doesn't contain aspx/ascx files.
I have the same scenario and after reading you post I realised that asp.net won't let you do this for various security reasons.
Therefore I turned to the OS to find an equivalent to the Linux sof... | [
0.31428420543670654,
-0.27556198835372925,
0.26974308490753174,
0.23018291592597961,
0.1507895588874817,
-0.2903868854045868,
0.07792145013809204,
0.17261217534542084,
-0.49907830357551575,
-0.7004801034927368,
-0.021013520658016205,
0.2733614146709442,
-0.45236489176750183,
0.368042737245... | |
a subdirectory of you website. Works for me :) | [
0.43240681290626526,
-0.1857341229915619,
0.4810800552368164,
0.5598885416984558,
0.2913387715816498,
-0.252107173204422,
0.4277101755142212,
0.3719269633293152,
-0.0633893832564354,
-0.529515266418457,
-0.11818062514066696,
0.3635534942150116,
-0.015325912274420261,
-0.020077697932720184,... | |
You can pass a function pointer, function object (or boost lambda) to std::sort to define a strict weak ordering of the elements of the container you want sorted.
However, sometimes (enough that I've hit this several times), you want to be able to chain "primitive" comparisons.
A trivial example would be if you were ... | [
0.12958212196826935,
-0.13527338206768036,
0.22532233595848083,
0.0862400084733963,
-0.22996458411216736,
0.05058766528964043,
-0.13639122247695923,
-0.09153453260660172,
-0.19192756712436676,
-0.5285046100616455,
-0.23125557601451874,
0.2709755003452301,
-0.3750302791595459,
0.18912033736... | |
case, but that violates the DRY principle - especially if each comparison is less trivial.
It seems like you should be able to write a hierarchy of comparison functions - the low level ones do the single, primitive, comparisons (e.g. first name < first name), then higher level ones call the lower level ones in success... | [
-0.06953330338001251,
0.15105625987052917,
0.15816031396389008,
-0.13622121512889862,
-0.2565687596797943,
0.18758131563663483,
-0.031750645488500595,
-0.33254969120025635,
-0.11974131315946579,
-0.4733758270740509,
-0.2424183338880539,
0.2966567575931549,
-0.3908343017101288,
0.0108077675... | |
"false" indicates equality or greater than. You can make your lower level predicates return an int, with three states - but then you would have to wrap those in higher level predicates before they could be used with std::sort on their own.
In all, these are not insurmountable problems. It just seems harder than it sho... | [
0.1362147480249405,
0.15416747331619263,
0.015719259157776833,
0.02935435064136982,
-0.3051646053791046,
0.1593206524848938,
0.6520637273788452,
-0.12014469504356384,
0.07908882945775986,
-0.4989925026893616,
-0.05719274654984474,
0.42559027671813965,
-0.043412912636995316,
-0.113932341337... | |
gone ahead and written my own implementation of a class to manage this. It's fairly minimal, and probably has some issues with it in general. but on that basis, for anyone interested, the class is here:
<http://pastebin.com/f52a85e4f>
And some helper functions (to avoid the need to specify template args) is here:
<h... | [
0.1200382187962532,
-0.32960590720176697,
0.3850328326225281,
-0.22551049292087555,
-0.06558529287576675,
-0.029653646051883698,
0.2547248601913452,
-0.28757742047309875,
-0.19831661880016327,
-0.42198413610458374,
-0.1804206371307373,
0.08079832047224045,
-0.48364683985710144,
0.181057915... | |
rhs.last; }
};
struct CmpAge {
bool operator () (const Type& lhs, const Type& rhs) { return lhs.age < rhs.age; }
};
template <typename First, typename Second>
struct Chain {
Chain(const First& f_, const Second& s_): f(f_), s(s_) {}
bool operator () (const Type& lhs, const Type& rhs) {
if(f(lhs, rhs))
... | [
0.12708935141563416,
-0.02013041265308857,
0.6679434180259705,
-0.4034106731414795,
0.28616848587989807,
0.1109505444765091,
0.5412312150001526,
-0.7266731262207031,
-0.031244270503520966,
-0.5911455750465393,
-0.7271690964698792,
0.26344823837280273,
-0.0866178423166275,
0.418356716632843... | |
(*this, next);
}
First f;
Second s;
};
struct False { bool operator() (const Type& lhs, const Type& rhs) { return false; } };
template <typename Op>
Chain <False, Op> make_chain(const Op& op) { return Chain <False, Op> (False(), op); }
```
Then to use it:
```
vector <Type> v; // fill this baby up
sort(v.b... | [
0.3973511755466461,
-0.17667251825332642,
0.9452160596847534,
-0.3316538631916046,
0.24849988520145416,
0.28968092799186707,
0.21521306037902832,
-0.436169296503067,
-0.09758858382701874,
-0.46235060691833496,
-0.38613027334213257,
0.47733598947525024,
-0.3506007790565491,
0.25035321712493... | |
I know we are *really* behind the times here, but we are just about to upgrade from .NET 1.1 to .NET 2.0.
Thank you for your sympathy.
Anyhow, are there any gotchas we should look out for?
Do you have any general advice before we jump in?
Please do not post telling me to go straight to 3.5: 2.0 is all we're al... | [
0.6468813419342041,
-0.021826686337590218,
0.22040556371212006,
0.18126767873764038,
-0.32064905762672424,
-0.4459601938724518,
0.3533700406551361,
0.3462978005409241,
-0.11050203442573547,
-0.8362680673599243,
-0.15706348419189453,
0.8207151293754578,
-0.13221140205860138,
-0.016738966107... | |
that it will be compatible with VS2005. Make sure to have a backup of the project you're going to convert so that you can roll back or even use it as source for any modification you may need to the converted projects.
* If you're developing web applications using .NET 1.1, make sure that all the virtual directories and... | [
0.5842331051826477,
-0.16715265810489655,
0.15431196987628937,
0.3013770282268524,
0.10299784690141678,
-0.2216455042362213,
0.05758006498217583,
0.2718217968940735,
-0.29411226511001587,
-0.5901756882667542,
-0.1229630559682846,
0.6868634819984436,
-0.14263319969177246,
-0.121114164590835... | |
confirm its compatibility with .NET 2.0 projects. Some old libraries used in .NET 1.1 are not compatible with 2.0. | [
0.18130633234977722,
-0.0011963415890932083,
0.1438135951757431,
0.18345792591571808,
0.19075247645378113,
-0.5658404231071472,
0.06937035918235779,
0.06599850952625275,
0.09189159423112869,
-0.410749226808548,
-0.4219594895839691,
0.223205104470253,
-0.19648465514183044,
0.032887496054172... | |
I'm writing a url rewrite in django that when a person goes to <http://mysite.com/urlchecker/http://www.google.com> it sends the url: <http://ww.google.com> to a view as a string variable.
I tried doing:
```
(r'^urlchecker/(?P<url>\w+)/$', 'mysite.main.views.urlchecker'),
```
But that didn't work. Anyone know what... | [
0.10983284562826157,
0.17762595415115356,
0.40374845266342163,
-0.2502805292606354,
-0.2643928527832031,
-0.033846620470285416,
0.47862622141838074,
0.14871470630168915,
-0.2267582267522812,
-0.46730124950408936,
-0.01888905093073845,
0.45277875661849976,
-0.17815230786800385,
0.1515573859... | |
I found this site
<http://www.shutterfly.com/documentation/api_OrderImage.sfly>
but there are no examples of actually walking through the whole process. Does anyone have any good documentation on using this API to take a local photo and allow someone to order a print via shutterfly?
I went through these steps:
* [Si... | [
0.8902521133422852,
0.3249228596687317,
0.46651148796081543,
-0.21618865430355072,
-0.21621014177799225,
0.05689274147152901,
0.1331026554107666,
-0.5159093737602234,
-0.18493038415908813,
-0.1833488792181015,
0.10327576845884323,
0.3501107394695282,
-0.16790324449539185,
-0.02737919241189... | |
Data](http://www.shutterfly.com/documentation/api_User.sfly)
* [User Authentication](http://www.shutterfly.com/documentation/api_UserAuth.sfly)
Each uses RESTful principles. The documentation looks pretty comprehensive to me, if you need some background, here's links for [RESTful](http://www.xfront.com/REST-Web-Servic... | [
0.7294460535049438,
0.19092263281345367,
0.4736683666706085,
0.0910051241517067,
0.14709867537021637,
-0.14845871925354004,
-0.18370506167411804,
-0.7191141843795776,
-0.22641685605049133,
-0.06356393545866013,
-0.12155107408761978,
0.9588981866836548,
-0.30619731545448303,
-0.371003866195... | |
verify the image(s) they want to purchase.
* [Authenticate the user](http://www.shutterfly.com/documentation/AuthAuth.sfly)
* Use the [Pricing POST](http://www.shutterfly.com/documentation/api_Pricing.sfly#POST) request to get the estimated pricing for the image.
* User the [Order POST](http://www.shutterfly.com/docume... | [
0.8162919282913208,
0.10488025099039078,
0.4779054820537567,
0.09288766235113144,
0.08250677585601807,
-0.09669255465269089,
-0.07046402245759964,
-0.3188454508781433,
0.07539910823106766,
-0.15823310613632202,
0.11876843124628067,
0.5839283466339111,
-0.19216366112232208,
-0.2065244764089... | |
I'm having a problem adding a reference to a .NET assembly I built. Here's what I did.
1. I created a .NET assembly (testlib.dll).
2. I made sure it had a strong name (added a keyfile).
3. I creates a WiX installation project for that assembly.
4. I added Assembly='.net' and KeyPath='yes' to the File property for the ... | [
0.794920027256012,
0.35222211480140686,
0.06303472816944122,
-0.1428738832473755,
-0.14448709785938263,
-0.19747769832611084,
0.34079575538635254,
-0.08625021576881409,
0.10442382097244263,
-0.7014926671981812,
0.14468346536159515,
0.5394015908241272,
-0.5353498458862305,
0.274907231330871... | |
up there?
The assemblies that are in the .NET tab have no connection to the GAC.
In order to see the assemblies in the .NET tab your installer will have to write to the
following registry path:
HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft.NETFramework\AssemblyFolders
The entry should create a new key usually the applicatio... | [
0.517168402671814,
0.35845425724983215,
0.5449138879776001,
0.057220458984375,
0.33021315932273865,
0.04484397545456886,
-0.0045642913319170475,
-0.13461148738861084,
-0.41562095284461975,
-0.6518052220344543,
-0.14448131620883942,
0.2968526780605316,
-0.25559523701667786,
0.23790664970874... | |
My website is XHTML Transitional compliant **except for one thing**: the & (ampersand) in the URL are written as it is, instead of `&`
That is, all the URLs in my pages are usually like this:
```
<a href="http://www.example.org/page.aspx?x=1&y=2">Foo</a>
```
But [XHTML validator](http://validator.w3.org/) gener... | [
0.38509878516197205,
0.5374555587768555,
0.8275987505912781,
-0.10368905961513519,
-0.2943854033946991,
-0.46704649925231934,
0.5495437979698181,
-0.029478589072823524,
-0.09408241510391235,
-0.8548657298088074,
-0.05998251959681511,
0.2866583466529846,
-0.21973304450511932,
0.087736897170... | |
don't work with strict encoded XHTML URLs.
Do you want to see in action? See the difference between these two links (copy and paste them as they are):
```
http://stackoverflow.com/search?q=ff&sort=newest
```
and
```
http://stackoverflow.com/search?q=ff&sort=newest
```
I have just tried this. What you attempte... | [
0.18093010783195496,
0.028768619522452354,
0.5441921949386597,
-0.03231328725814819,
-0.13822822272777557,
-0.024032795801758766,
0.4601185619831085,
-0.4461784064769745,
-0.05614112317562103,
-0.48259595036506653,
-0.10520090907812119,
0.5162872076034546,
-0.6136962175369263,
-0.331444144... | |
of `&` as `&` is required in HTML, not in the link. When the browser sees the `&` in the HTML source for a link it will interpret it as an ampersand and the link target will be as intended. If you paste a URL into your browser address bar it does not expect it to be HTML and does not try to interpret any HTML e... | [
0.4415426552295685,
0.27244433760643005,
0.8540067672729492,
-0.09669271111488342,
-0.3671322762966156,
-0.1552547663450241,
0.3910711407661438,
-0.24313944578170776,
-0.14623843133449554,
-0.45633742213249207,
-0.6139461398124695,
0.41586723923683167,
-0.4658527970314026,
-0.0990615189075... | |
more of your actual code we might be able to see what you have done wrong, but you appear to be heading the right direction by using `&` in your anchor tags. | [
0.6637861132621765,
-0.03478022292256355,
0.24098700284957886,
0.23744584619998932,
0.31199440360069275,
-0.29887714982032776,
0.4160347878932953,
-0.1826198399066925,
-0.17922070622444153,
-0.33176156878471375,
0.19928155839443207,
0.5640745759010315,
-0.1990128457546234,
-0.3483429253101... | |
We have a number of Excel-based membership rosters for a non-profit organization and we need to merge these into one master MS Access table. From time to time, we receive updated copies of the Excel-based membership rosters and I need to synchronize these with the master MS Access table.
I'm looking for the optimal wa... | [
0.4582703411579132,
0.16791053116321564,
0.12770655751228333,
0.3756670355796814,
0.3535156548023224,
-0.010731000453233719,
-0.32379963994026184,
0.3114168345928192,
-0.14035119116306305,
-0.6564980149269104,
0.22909201681613922,
0.5128548741340637,
0.04244907572865486,
0.1937875896692276... | |
something off-the-shelf that could be used to accomplish this objective?
You haven't said how big the membership lists are.
If they aren't too massive, and if you aren't doing anything too complex, then simply linking the Excel files to the Access database would allow you to replace the Excel files with new ones (with... | [
0.6811710596084595,
0.02355615608394146,
-0.1362440586090088,
0.46527019143104553,
0.18093512952327728,
-0.33646878600120544,
-0.06366793066263199,
0.10163120180368423,
-0.5074045658111572,
-0.23043593764305115,
0.4359486699104309,
0.6091918349266052,
0.09009148180484772,
-0.01364201679825... | |
I'm thinking of something smaller than a laptop that i can spend my hours on the way to work doing project euler problems or such.
Any ideas?
If you mean a programming platform, you could get a netbook like the ASUS EEE.
Or if you meant smallest programmable device, check out a PIC microcontroller:
<http://en.wikip... | [
0.4549047648906708,
-0.07184288650751114,
-0.06561189144849777,
0.6420810222625732,
0.34882211685180664,
0.29564952850341797,
-0.4652628004550934,
0.45777103304862976,
-0.5638136267662048,
-0.6909310221672058,
0.3243403136730194,
0.3269785940647125,
0.26937222480773926,
0.4127448797225952,... | |
I recently downloaded PLT Scheme and DrScheme. When I open DrScheme, I am told to choose a language. However, I'm not familiar with any of my options, and the help guides don't really break it down to help me easily choose which choice.
So, first - is DrScheme and PLT Scheme really the tools I need to learn Lisp and/o... | [
0.1921371966600418,
0.024085668846964836,
0.3084185719490051,
0.04937257617712021,
-0.10465677827596664,
0.052378296852111816,
0.30242112278938293,
0.41530841588974,
-0.27112969756126404,
-0.6446930170059204,
-0.1974765956401825,
0.6427204608917236,
-0.1889987289905548,
-0.3170807361602783... | |
does lack the extensions that PLT has added to DrScheme.
*edit:* I just checked and I guess that both "Pretty Big" and "R5RS" are considered "legacy" in DrScheme 4 and the "Module" language is favored instead. Just make sure that all the files you use with the Module language start with
```
#lang scheme
```
Module ... | [
0.2671162784099579,
0.1298571676015854,
0.47528502345085144,
-0.3467250168323517,
0.21420693397521973,
-0.357745885848999,
0.29081228375434875,
0.07316138595342636,
-0.2969663739204407,
-0.5208002924919128,
-0.4231184720993042,
0.7070316672325134,
-0.480518639087677,
-0.06589710712432861,
... | |
you're just starting out, all you need to worry about is just keeping #lang scheme at the top of all the files you use.
A small note - this declaration is not official Scheme, and needs to be removed if you attempt to use the files in another Scheme interpreter. | [
0.538566529750824,
-0.09494120627641678,
0.23450499773025513,
-0.07668253779411316,
0.3419434428215027,
-0.5413963198661804,
0.1083642840385437,
0.04519199952483177,
-0.3494224548339844,
-0.5693909525871277,
-0.11719945818185806,
0.26896411180496216,
-0.2514115273952484,
-0.164606079459190... | |
another request sorry..
Right now I am reading the tokens in one by one and it works, but I want to know when there is a new line..
if my file contains
```
Hey Bob
Now
```
should give me
```
Hey
Bob
[NEW LINE]
NOW
```
Is there a way to do this without using getline?
Yes the operator>> when used with string read ... | [
0.09553787857294083,
-0.25737038254737854,
0.3413122594356537,
0.012172103859484196,
-0.20396804809570312,
0.2943896949291229,
0.5066165328025818,
-0.22976906597614288,
-0.3146713972091675,
-0.5139915347099304,
-0.14184854924678802,
0.16276782751083374,
-0.38845786452293396,
0.118587598204... | |
the line use a string stream:
std::stringstream lineStream(line);
std::string token;
while(lineStream >> token)
{
std::cout << "Token(" << token << ")\n";
}
std::cout << "New Line Detected\n";
}
```
Small addition:
Without using getline()
-----------------------
So you really wan... | [
-0.33350616693496704,
-0.5408005118370056,
0.5765302777290344,
-0.1578073799610138,
-0.1208755224943161,
0.228648841381073,
0.20902839303016663,
-0.07829517871141434,
0.09111300855875015,
-0.7255889177322388,
-0.2773876488208771,
-0.09776890277862549,
-0.25979262590408325,
0.21200448274612... | |
type.
Then all you have to do is write the stream operators for a token:
```
#include <iostream>
#include <fstream>
class Token
{
private:
friend std::ostream& operator<<(std::ostream&,Token const&);
friend std::istream& operator>>(std::istream&,Token&);
std::string value;
};
std::i... | [
-0.10650189220905304,
-0.05574120208621025,
0.46217748522758484,
-0.1482432782649994,
0.1083371713757515,
0.07490643858909607,
0.3043026328086853,
-0.1967262327671051,
-0.06265372037887573,
-0.6694945096969604,
-0.3031814396381378,
0.441877543926239,
-0.41471242904663086,
-0.04783542826771... | |
// Drop leading space
do
{
x = str.get();
}
while(str && isspace(x) && (x != '\n'));
// If the stream is done. exit now.
if (!str)
{
return str;
}
// We have skipped all white space up to the
// start of the first token. We can now modify data.
data.value | [
0.16774165630340576,
-0.44883236289024353,
0.4554271996021271,
-0.18513751029968262,
0.08929132670164108,
0.09881477057933807,
-0.028406715020537376,
-0.06129219010472298,
-0.2030576914548874,
-0.3100120425224304,
-0.3131861388683319,
-0.04527287185192108,
-0.3317042291164398,
0.1394109725... | |
="";
// If the token is a '\n' We are finished.
if (x == '\n')
{ data.value = "\n";
return str;
}
// Otherwise read the next token in.
str.unget();
str >> data.value;
return str;
}
std::ostream& operator<<(std::ostream& str,Token const& data)
{
return str << data.value;... | [
-0.12319471687078476,
-0.224814772605896,
0.826080322265625,
-0.3793907165527344,
0.2964106500148773,
0.4533226788043976,
0.18694868683815002,
-0.1313411146402359,
-0.37431836128234863,
-0.46746838092803955,
-0.5997437834739685,
0.17957408726215363,
-0.04840315133333206,
0.2284382730722427... | |
>> x)
{
std::cout << "Token(" << x << ")\n";
}
}
``` | [
-0.10015615075826645,
0.1097436398267746,
0.2735885679721832,
-0.3328413963317871,
0.03808160871267319,
0.008656304329633713,
0.22437480092048645,
-0.22694431245326996,
0.18220040202140808,
-0.5706485509872437,
-0.5168849229812622,
0.2877601385116577,
-0.37247633934020996,
0.12533344328403... | |
I have an Ubuntu Server (with all of LAMP and Subversion installed). I use Eclipse with Subclipse, PDT and a few other great addins and use those exclusively to develop applications. The problem I'm having is that I'm developing on a Windows Vista machine and transferring everything to the remote Linux server.
Howeve... | [
0.3040638566017151,
0.2606286108493805,
0.25363999605178833,
-0.06100757420063019,
-0.3066326975822449,
-0.0036832636687904596,
-0.0849170982837677,
0.3660144805908203,
0.12484732270240784,
-0.9874300360679626,
-0.031774625182151794,
0.3102940320968628,
-0.2521391808986664,
0.2864125072956... | |
too much work and required me to constantly change my code when I moved them live on the server. I also tried using Wubi but didn't like that I had to reboot each time I wanted to go back to Vista.
Is there a solution for this situation? Is there a way to run a virtual copy of Linux on Windows Vista that will allow me... | [
0.8323285579681396,
-0.02789001166820526,
0.1825537085533142,
0.28176945447921753,
-0.03382478281855583,
-0.05151549354195595,
0.14392854273319244,
0.022242674604058266,
-0.30736878514289856,
-0.6325957179069519,
0.34553399682044983,
0.708705723285675,
-0.16871073842048645,
0.1557788103818... | |
and therefore low on funds, but am definitely open to any and all solutions to help me out.
You could use VMWare or Virtual PC to virtualise a linux build, or run the AMP stack up in [Cygwin](http://www.cygwin.com/). Architecturally, Cygwin is a port of glibc adapted to sit on top of the Windows system call layer - it ... | [
0.46582627296447754,
0.21841248869895935,
0.2869424521923065,
0.16750527918338776,
-0.17363250255584717,
-0.13878202438354492,
-0.09840371459722519,
0.11602594703435898,
-0.09342541545629501,
-0.6803948283195496,
0.22608965635299683,
0.7160302996635437,
-0.016868002712726593,
0.42484539747... | |
or evaluation use, partially open source, stable, and released by Sun. I've found it to be a good solid alternative to VMWare or Virtual PC. | [
0.4175359308719635,
0.10492356866598129,
0.1522722691297531,
0.14185932278633118,
-0.12436109781265259,
-0.2138804793357849,
-0.3070853352546692,
0.27992451190948486,
0.22853368520736694,
-0.5584591627120972,
0.03308311104774475,
0.6949573755264282,
0.2369489222764969,
0.04464748874306679,... | |
I trying to implement a typical languages menu where users can select the language they want to view the site in through a menu that appears throughout all pages in the site.
The menu will appear on multiple master pages (currently one for pages where users are logged in and one for pages where users are not).
My cur... | [
0.32398781180381775,
0.08319710940122604,
0.32527583837509155,
-0.13326136767864227,
-0.21816261112689972,
-0.2693588137626648,
0.4373272955417633,
-0.027914758771657944,
-0.20963086187839508,
-0.6293956637382507,
-0.040426965802907944,
0.3731980621814728,
-0.3039278984069824,
0.3545945584... | |
master page that inherits MasterBase overrides OnLanguageChanged and does the usual stuff like set the Thread's CurrentUICulture and the language cookie then does a
```
Server.Transfer(this.Page.AppRelativeVirtualPath, true);
```
to get the page to reload with localized values for the new culture. On the master pag... | [
0.1893201321363449,
-0.11024486273527145,
0.5160146355628967,
-0.05248211324214935,
-0.04785027354955673,
-0.28690430521965027,
0.4925425052642822,
0.03813834488391876,
-0.08275632560253143,
-0.7972095608711243,
-0.38678741455078125,
0.22028149664402008,
-0.43176591396331787,
0.54732382297... | |
}
```
Each page that needs to handle a language change then has some code in the page load that looks like...
```
((MasterBase)this.Master).LanguageChanged += this.Page_OnLanguageChanged;
// Where Page_OnLanguageChanged has the signature of LanguageChangedEventHandler
// and has stuff like reloading options in a dro... | [
-0.02037297934293747,
0.1245138868689537,
0.41643422842025757,
-0.23349633812904358,
-0.1152813658118248,
-0.25946736335754395,
0.3043247163295746,
-0.13550040125846863,
-0.25425103306770325,
-0.8702757954597473,
0.02764510177075863,
0.5055246949195862,
-0.5523870587348938,
-0.041928771883... | |
navigate back with the browser Back button.
I'm looking for a more elegant solution. One that doesn't have both the problems above and also handles my current requirements.
Greatly appreciate any suggestions. Thanks.
How about [SimpleModal](http://www.ericmmartin.com/projects/simplemodal/) for jQuery? | [
0.1384030431509018,
-0.15414626896381378,
0.4334023892879486,
0.27333778142929077,
-0.20745128393173218,
-0.26930472254753113,
0.46787458658218384,
0.20587489008903503,
-0.20819728076457977,
-0.45779746770858765,
-0.07355474680662155,
0.3579695522785187,
-0.04737947881221771,
-0.1040015146... | |
By this, I don't mean PC-based development environments (like Visual Studio) for developing and deploying Windows Mobile applications. Rather, I mean an IDE that runs on Windows Mobile devices and lets you write and test code there.
Over the past year or so I have been searching regularly for new developer tools for us... | [
0.4718722701072693,
0.09320354461669922,
0.06392796337604523,
-0.0017636638367548585,
0.22233130037784576,
0.3252914249897003,
-0.2146529108285904,
0.03137406334280968,
-0.3701877295970917,
-0.40743666887283325,
-0.17670853435993195,
0.34890368580818176,
-0.1511896848678589,
-0.22712928056... | |
[PocketC](http://www.orbworks.com/), [Lua](http://lua-users.org/wiki/LuaDistributions), [J](http://www.jsoftware.com/), [Pocket Programming Language](http://www.arianesoft.ca/page.php?1) and [Pocket C#](http://pocketgcc.sourceforge.net/pcsharp/)
A good website to find other interpreters is [www.rainer-keuchel.de](http... | [
0.07903335988521576,
0.20955383777618408,
0.26087287068367004,
0.12244989722967148,
0.16720682382583618,
0.4555758237838745,
0.2998540699481964,
0.35025447607040405,
-0.3007759749889374,
-0.7476844787597656,
-0.13504880666732788,
0.1947145313024521,
-0.3192805349826813,
-0.2582564651966095... | |
I want to display the "infinity" symbol using
```
CGContextSelectFont(context, "HelveticaNeue", textSize, kCGEncodingMacRoman);
CGContextShowTextAtPoint(context, myCenter.x, myCenter.y + textHeight, [sName cStringUsingEncoding:NSMacOSRomanStringEncoding], [sName length]);
```
It is displayed as a square bo... | [
0.07855746150016785,
0.038880202919244766,
0.46302294731140137,
0.08215245604515076,
0.08421174436807632,
0.025707388296723366,
-0.14727100729942322,
-0.12330205738544464,
-0.10420897603034973,
-0.5649383664131165,
0.013345792889595032,
0.3154422640800476,
-0.09526035934686661,
-0.10465092... | |
characters in a string, you have to use CGSetFont or the Cocoa drawing system. CGSetFont requires that you use Cocoa anyway to map characters to glyphs and then draw the glyphs using CGContextShowGlyphsAtPoint. I recommend that you look into other ways to draw these strings if you really need to display Unicode charact... | [
-0.21279163658618927,
0.005255675408989191,
0.7067893147468567,
-0.003563712816685438,
-0.07144016027450562,
0.364993691444397,
0.12231504172086716,
-0.23210063576698303,
-0.24011673033237457,
-0.5497152209281921,
-0.1911592185497284,
0.40971314907073975,
-0.16340215504169464,
-0.154643669... | |
withFont:font];
[sName release];
}
```
Also note that on the iPhone (and on the Mac) Helvetica Neue actually does not exist... its name just maps back to standard Helvetica. See the table at <http://daringfireball.net/misc/2007/07/iphone-osx-fonts> for more information on available fonts on the iPhone. | [
-0.06722424179315567,
-0.018429262563586235,
0.3977433741092682,
-0.18265298008918762,
-0.14407745003700256,
0.11533180624246597,
0.47721606492996216,
-0.21487432718276978,
-0.1536227911710739,
-0.35146498680114746,
0.074821837246418,
0.3925265967845917,
-0.21347332000732422,
-0.2654457986... | |
What are the things that Medium Trust stops you from doing? For example, I've already learned that Medium Trust stops you from using System.IO.Path.GetTempPath(). What other things like that?
Here's how to learn about and resolve trust issues.
1) Search your Windows\Microsoft.NET\Framework[YOUR VERSION]\CONFIG folders... | [
0.24215802550315857,
-0.027059316635131836,
0.7102005481719971,
0.10266613215208054,
0.08032000064849854,
-0.6259405612945557,
0.4422197639942169,
-0.2172015756368637,
0.05385570228099823,
-0.6925658583641052,
0.08991841971874237,
0.9824937582015991,
-0.3135000169277191,
0.0736255943775177... | |
they affect your app. In my case, the error message referred to ConfigurationPermission, so it was easy to diagnose.
If you can pin down the precise lines in the web\_mediumtrust.config file that are blocking you, then maybe you can share that with your hosting company and have a better chance of working things out.
... | [
0.26269203424453735,
0.16331897675991058,
0.605959415435791,
-0.151106059551239,
0.20059120655059814,
0.08056198060512543,
0.6453437209129333,
0.2615100145339966,
-0.35537946224212646,
-0.8135710954666138,
-0.11288298666477203,
0.4662783145904541,
-0.38854125142097473,
0.15430378913879395,... | |
Working with a traditional listener callback model. I have several listeners that collect various stuff. Each listener's collected stuff is inside the listener in internal structures.
The problem is that I want some of the listeners to be aware of some of the "stuff" in the other listeners.
I enforce listener registr... | [
0.433413028717041,
0.2480185180902481,
-0.05616811290383339,
0.007994109764695168,
-0.060353707522153854,
-0.2041993886232376,
0.3223957419395447,
-0.3175602853298187,
-0.14179618656635284,
-0.2952061593532562,
0.09754734486341476,
0.6049124002456665,
-0.08046083897352219,
-0.0848014503717... | |
depends. So I register listeners in the order of those without dependencies to those with prior-registered dependencies, and then set the references between the listeners in various methods.
I am starting to realize how bad this feels and I was wondering if somehow has been down this road before. What would be a more ... | [
0.7633646130561829,
0.0874301940202713,
0.3537256419658661,
-0.28704768419265747,
0.07585196942090988,
0.06158776581287384,
0.17418095469474792,
-0.6757845282554626,
0.14643466472625732,
-0.7265896797180176,
0.24769560992717743,
1.0974061489105225,
-0.4059644937515259,
0.05502062663435936,... | |
{ return count; }
}
class B implements Listener {
private int count;
// private A a;
// private void setA(A a) { this.a = a; }
public void onEvent(char e) { if(e == 'b') count++; }
public int getCount() { return count; }
public int getAPlusBCount() {
// We know B count, but we don't know A so how would we c... | [
0.4100964665412903,
-0.15967164933681488,
0.4170468747615814,
-0.24604089558124542,
-0.11711552739143372,
0.16425512731075287,
0.6606898307800293,
-0.5508346557617188,
-0.1823379099369049,
-0.37763023376464844,
-0.17334304749965668,
0.6811530590057373,
-0.43145620822906494,
0.2444837093353... | |
// Do some condition in B that relies on the state of data in A
int acount = 0; // a.getCount(); ???
if(acount % 2 == 0) {
this.count--;
}
}
}
class Run {
A a = new A();
B b = new B();
List listeners = new List();
listeners.add(a);
listeners.add(b);
// The ugly way I add coupling right now is to keep ... | [
0.4544232487678528,
-0.04024047404527664,
0.2718259394168854,
-0.5163144469261169,
-0.145376056432724,
0.06273392587900162,
0.715846061706543,
-0.4026210904121399,
-0.03244293853640556,
-0.5012905597686768,
-0.03117559477686882,
0.8402401208877563,
-0.9107217192649841,
0.32412242889404297,... | |
{
listener.onEvent(c);
}
}
}
```
Why not have a central object that will keep track of how many times the onEvent method was fired for all the listener classes
```
public interface CountObserver {
public void updateCount(String className);
public int getCount(String className);
}
public class CentralObs... | [
0.036361221224069595,
0.21231043338775635,
0.5346763134002686,
-0.043760184198617935,
-0.027134764939546585,
-0.06992293149232864,
0.41249507665634155,
-0.3118487000465393,
0.003767583519220352,
-0.47648945450782776,
0.15775376558303833,
0.9777283668518066,
-0.48858439922332764,
0.45679840... | |
int getCount(String className) {
if (className.equals("AclassName")) {
return aCount;
}
else if (className.equals("BclassName")) {
return bCount;
}
}
class A implements Listener {
CountObserver countObserver;
public void registerObserver (CountObserver countObserver) {
this.countObserver = countO... | [
0.08260925114154816,
-0.09241200983524323,
0.5097687244415283,
-0.3551672101020813,
0.017431804910302162,
0.1316126435995102,
0.5498576760292053,
-0.5925200581550598,
0.038758762180805206,
-0.5423426032066345,
0.008043796755373478,
0.8442765474319458,
-0.5098604559898376,
0.131786659359931... | |
centralObserver;
public runProgram () {
centralObserver = new CentralObserver();
a.registerObserver(centralObserver);
b.registerObserver(centralObserver);
//run OnEvent method for A a couple of times, then for B
}
public int getAcount () {
return centralObserver.getCount(a.getClass.getName());
}
pub... | [
0.07681602984666824,
-0.1051257848739624,
0.8050316572189331,
0.10296706110239029,
-0.05680925026535988,
0.004491123370826244,
0.5246906876564026,
-0.16766496002674103,
-0.24103838205337524,
-0.6116382479667664,
-0.04610820114612579,
0.7591648697853088,
-0.12471556663513184,
0.513564109802... | |
I'm pretty sure this is a simple question in regards to formatting but here's what I want to accomplish:
I want to output data onto the screen using `cout`. I want to output this in the form of a table format. What I mean by this is the columns and rows should be properly aligned. Example:
```
Test 1
... | [
0.6318581104278564,
0.23888884484767914,
0.05937157943844795,
-0.10635080933570862,
-0.16548781096935272,
-0.19774551689624786,
-0.0008731300476938486,
-0.04000374674797058,
-0.13824310898780823,
-0.6892238855361938,
0.1437048316001892,
0.5064083933830261,
-0.3675926923751831,
-0.128627151... | |
1
```
I am only concerned with the individual line so my line to output now (not working) is
`cout << var1 << "\t\t" << var2 << endl;`
Which gives me something like:
```
Test 1
Test2 2
Iamlongverylongblah 2
Etc 1
```
[setw](http://www.cplusplus.com/referen... | [
0.4997541308403015,
-0.008554751053452492,
0.2053500860929489,
-0.2560318410396576,
-0.044802211225032806,
0.026494793593883514,
0.3166428506374359,
-0.48276546597480774,
-0.04434044286608696,
-0.4540804922580719,
-0.12546630203723907,
0.3737742602825165,
-0.6897264122962952,
-0.3334209024... | |
namespace std;
int main () {
cout << setw(21) << left << "Test" << 1 << endl;
cout << setw(21) << left << "Test2" << 2 << endl;
cout << setw(21) << left << "Iamlongverylongblah" << 2 << endl;
cout << setw(21) << left << "Etc" << 1 << endl;
return 0;
}
``` | [
0.11557681858539581,
-0.2415156066417694,
-0.007432331796735525,
-0.2576558291912079,
-0.049247246235609055,
0.14705348014831543,
0.3457093834877014,
-0.29940035939216614,
0.006354420445859432,
-0.6431846618652344,
-0.3530077338218689,
0.1499929577112198,
-0.34276843070983887,
0.0328376591... | |
I want to run a shell command in Terminal, then clear the console, from Applescript.
If I was doing this by hand, I'd use ^K -- how do I send the ^K character in a string to Terminal?
At the moment, async support is not built into MVC. It's on the feature list, but no guarantees as to exactly when it might be released... | [
-0.051392022520303726,
0.1318371295928955,
0.5827248692512512,
-0.15511450171470642,
0.036548763513565063,
-0.13961774110794067,
0.11660859733819962,
0.3483304977416992,
-0.23561497032642365,
-0.6005129814147949,
-0.21353620290756226,
0.7056680917739868,
-0.10386361926794052,
0.11781086027... | |
This is kind of a brainteaser question, since the code works perfectly fine as-is, it just irritates my aesthetic sense ever so slightly. I'm turning to Stack Overflow because my own brain is failing me right now.
Here's a snippet of code that looks up an address using the Google Maps JS API and places a marker on a m... | [
0.03524504601955414,
0.09137359261512756,
0.5179599523544312,
-0.040703512728214264,
0.23674197494983673,
-0.1411149501800537,
0.11415685713291168,
-0.02528194896876812,
-0.08651962876319885,
-0.888794481754303,
-0.02056131325662136,
0.300516813993454,
-0.38089099526405334,
0.2747185528278... | |
if (!point) return;
map.setCenter(point, 13);
map.setZoom(7);
map.addOverlay(new GMarker(point));
})
return;
}
map.setCenter(point, 13);
map.setZoom(7);
map.addOverlay(new GMarker(point));
})
```
(The second parameter to `getLatLng` is a callback fun... | [
-0.17996801435947418,
-0.44054102897644043,
0.9792487025260925,
-0.261141836643219,
0.24296832084655762,
-0.16786618530750275,
0.2658027410507202,
-0.20175182819366455,
-0.07106022536754608,
-0.42422956228256226,
-0.5978166460990906,
0.7904437780380249,
-0.255567729473114,
0.03845780715346... | |
the map and add the marker are duplicated, once in the primary callback and once in the "fallback callback" (ha ha). Can you find a way to express the whole thing without any redundancy? You earn bonus points, and my adulation, if your solution works for an arbitrary number of backup map strings.
The other answers are ... | [
-0.0845726802945137,
-0.2585754096508026,
0.6536225080490112,
0.009278672747313976,
-0.11120545864105225,
0.18786227703094482,
0.004534052684903145,
-0.26902103424072266,
-0.1967443823814392,
-0.7172354459762573,
-0.24075749516487122,
0.5058702230453491,
-0.3554013669490814,
-0.24947483837... | |
{
// success
map.setCenter(point, 13);
map.setZoom(7);
map.addOverlay(new GMarker(point));
}
else if(mapstrings.length > 0) {
// Previous mapstring failed... try next mapstring
geocoder.getLatLng(mapstrings.shift(), lambda);
}
else {
// Take specia... | [
-0.2608497142791748,
-0.33781179785728455,
0.6537004113197327,
-0.1830635368824005,
0.03658364340662956,
-0.13452357053756714,
0.40807345509529114,
-0.7291625142097473,
-0.29819953441619873,
-0.5740272998809814,
-0.4858720302581787,
0.652508020401001,
-0.4388171434402466,
-0.01112702302634... | |
time the symbol "lambda" is used, it is to introduce it as a new function literal name. The second time it is used, it is a recursive reference.
function literal naming works in Chrome, and I assume it works in most modern browsers, but I haven't tested it and I don't know about older browsers. | [
0.26239916682243347,
-0.19501271843910217,
0.4383208155632019,
-0.09769214689731598,
-0.3378831744194031,
-0.18836809694766998,
-0.09065660834312439,
0.2589587867259979,
0.009342961944639683,
-0.46507886052131653,
0.1127416267991066,
0.7404472231864929,
-0.3602524697780609,
-0.079415559768... | |
I'm trying to automate some stuff in MS Excel. When I try to set the Calculation property I get the following error message: 'Unable to set the Calculation property of the Application class'
I believe this property should be settable.
Any advice appreciated!
You need to have an open workbook, ie
```py
import win32co... | [
0.15671472251415253,
0.3433181345462799,
0.22954121232032776,
-0.030730415135622025,
-0.12246819585561752,
-0.20429135859012604,
0.3286072015762329,
-0.03446328267455101,
-0.01798023097217083,
-0.702686071395874,
-0.13908874988555908,
0.7557594180107117,
-0.3822752833366394,
-0.13199134171... | |
Create a file called Valid[File].txt and stick some text in it. Start powershell and go to the directory.
```
gc Valid[File].txt
```
should display the value in the file. It returns blank. If you use tab auto-completion it escapes the name:
```
gc 'Valid[File].txt'
```
but still returns nothing.
How do I ref... | [
0.4983604848384857,
0.009587903507053852,
0.5635512471199036,
0.007700199726969004,
-0.060822419822216034,
-0.24877552688121796,
0.2084435373544693,
-0.24467173218727112,
-0.04503726586699486,
-0.6357313990592957,
-0.14549502730369568,
0.8562628030776978,
-0.5088773369789124,
0.18056981265... | |
Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)
```
static String intToString(int num, int digits) {
StringBuffer s = new StringBuffer(digits);
int zeroes = ... | [
-0.19821709394454956,
-0.16453592479228973,
0.534674882888794,
-0.17170588672161102,
0.04187401756644249,
0.125507652759552,
0.34303662180900574,
-0.4703393578529358,
-0.35505542159080505,
-0.2949672043323517,
-0.26648077368736267,
0.6022409200668335,
-0.3275083601474762,
0.058635901659727... | |
formatted = String.format("%03d", num);
```
* 0 - to pad with zeros
* 3 - to set width to 3 | [
-0.0381697453558445,
-0.1444188952445984,
0.5125550031661987,
-0.19253066182136536,
-0.1770046055316925,
-0.012693913653492928,
0.07323159277439117,
-0.42018353939056396,
-0.243429496884346,
-0.41995590925216675,
-0.11597758531570435,
0.43772804737091064,
0.07441817224025726,
0.16440126299... | |
I use the dark-blue2 color theme but it seems ugly under console.
So I want to use no color theme under terminal, what can I do then?
Set a "TERM" variable corresponding to a monochrome terminal before launching Emacs. For example, if you are in an xterm, use:
```
TERM=xterm-mono emacs -nw
```
If by "console" you me... | [
0.09309690445661545,
0.008316407911479473,
0.49715059995651245,
0.006607974413782358,
0.22431904077529907,
0.0961463451385498,
0.10322593152523041,
0.31866568326950073,
-0.07515748590230942,
-0.6087592840194702,
-0.17130999267101288,
0.6835736036300659,
-0.29839953780174255,
0.645652294158... | |
I need to get the values in the registers with GCC.
Something similar to this:
```
EAX=00000002 EBX=00000001 ECX=00000005 EDX=BFFC94C0
ESI=8184C544 EDI=00000000 EBP=0063FF78 ESP=0063FE3C
CF=0 SF=0 ZF=0 OF=0
```
Getting the 32-bit registers is easy enough, but I'm not sure what the simplest way to get the ... | [
0.28650957345962524,
0.12210750579833984,
0.31239986419677734,
0.033140189945697784,
-0.12321861833333969,
0.005277492105960846,
0.037245649844408035,
-0.2972826659679413,
-0.30219167470932007,
-0.37709569931030273,
-0.09979486465454102,
0.5099536776542664,
-0.2149474024772644,
-0.14678162... | |
no need to use assembler just to get the registers.
You can just use setjmp. That will write all registers into a stucture of type jmp\_buf. It even kind of Works cross platform except for the fact that jmp\_buf itself is different for each architecture.
However, calling setjmp (and calling your assembler code as wel... | [
0.3550368547439575,
-0.15040738880634308,
0.09777486324310303,
0.2366635650396347,
-0.05624394491314888,
-0.22515836358070374,
0.3698020279407501,
-0.22845375537872314,
-0.2401207834482193,
-0.6484055519104004,
0.07736969739198685,
0.5854160785675049,
-0.7278925776481628,
-0.21074841916561... | |
real interrupt, a signal handler or a OS exception handler (the try/except blocks form C++ will not work).
2. Emit an illegal opcode in your code.
The trick here is, that the illegal opcode has no register side-effects. The exception handler can copy the registers either from the stack or from a exception info structu... | [
0.401633083820343,
-0.08142317831516266,
0.3293396830558777,
0.07996439933776855,
-0.023494189605116844,
-0.035153187811374664,
0.2910906672477722,
0.014035944826900959,
-0.2512143552303314,
-0.5477562546730042,
-0.14354321360588074,
0.9113487005233765,
-0.6330957412719727,
-0.224417358636... | |
eax now contains the EFLAG data
``` | [
-0.0433013029396534,
0.41711387038230896,
0.8090608716011047,
-0.18241848051548004,
0.10978588461875916,
-0.5313979387283325,
-0.2583969235420227,
-0.005102783441543579,
-0.034909214824438095,
-0.2857455015182495,
-0.4245876967906952,
0.17662905156612396,
-0.1975187510251999,
-0.0426724143... | |
Is anyone using Castle MonoRail and ELMAH with success?
We are using a number of Resuces to present users with friendly error messages, but if we do this the exceptions never get as far as ELMAH as the MonoRail rescue intercepts them.
Ideally we want the user to see the rescue, but for the exception to be logged in E... | [
0.13676413893699646,
0.377546489238739,
0.1382782757282257,
0.045847002416849136,
0.1273011863231659,
-0.20017097890377045,
0.8778082728385925,
-0.6157487034797668,
-0.13917474448680878,
-0.35432249307632446,
0.07836552709341049,
0.5026463866233826,
-0.30093351006507874,
-0.098287619650363... | |
it in web.config, monorail section:
```
<monorail>
<extensions>
<extension type="Castle.MonoRail.Framework.Extensions.ExceptionChaining.ExceptionChainingExtension, Castle.MonoRail.Framework"/>
</extensions>
<exception>
<exceptionHandler type="MyNamespace.ElmahExceptionHandler, MyAssembly"/>... | [
-0.1063067838549614,
-0.2746526300907135,
0.7231308817863464,
0.2109874188899994,
0.12805145978927612,
-0.3799118101596832,
0.30477049946784973,
-0.18114812672138214,
-0.054556287825107574,
-0.37735652923583984,
-0.20594580471515656,
0.07145796716213226,
-0.19121721386909485,
0.51274234056... | |
Frequently, I've dug into apropos and docs looking for something like the following only to give up to get back to the task at hand:
(repeat-last-command)
do the last C- or M- command I just executed (to be rebound to a fn key)
or sometimes the related:
(describe-last-function)
what keystroke did I just mistakenl... | [
0.18720249831676483,
-0.11151311546564102,
0.0961216539144516,
0.22306933999061584,
-0.04161016643047333,
0.0317123606801033,
0.2903074324131012,
-0.1610366702079773,
-0.32234370708465576,
-0.25779232382774353,
-0.11050350964069366,
0.6443743109703064,
0.016163308173418045,
-0.263877570629... | |
you did. So this elisp snippet - `(describe-function last-command)` - ought to bring up the documentation for the thing that immediately happened.
So you could make a trivial working `describe-last-function` like so
```
(defun describe-last-function()
(interactive)
(describe-function last-command))
```
Put th... | [
0.04796861484646797,
0.19075532257556915,
0.39258259534835815,
0.17558079957962036,
0.11597758531570435,
-0.08087900280952454,
0.1181437224149704,
0.1627972275018692,
-0.33114469051361084,
-0.549343466758728,
-0.35042059421539307,
0.787120521068573,
-0.1881539523601532,
-0.0273608434945344... | |
I have a custom attribute which can be assigned to a class, `[FooAttribute]`. What I would like to do, from within the attribute, is determine which type has actually used me. e.g. If I have:
```
[FooAttribute]
public class Bar
{
}
```
In the code for FooAttribute, how can I determine it was Bar class that added me?... | [
0.3820406496524811,
0.27555617690086365,
0.4009888470172882,
-0.4509347677230835,
-0.16414618492126465,
0.012886508367955685,
0.045011334121227264,
-0.14388136565685272,
0.10038600862026215,
-0.39618802070617676,
0.04025371000170708,
0.7345475554466248,
-0.3927420973777771,
0.1566451489925... | |
consider the existing `[DisplayName]` for keeping friendly names. As has already been covered, you simply can't get this information inside the attribute. You can look up the attribute from Bar, but in general, the only way to do it from the attribute would be to pass the type *into* the attribute - i.e.
```
[Foo("Som... | [
0.257031112909317,
0.05456877499818802,
0.35775595903396606,
-0.09733033180236816,
-0.20827984809875488,
-0.27655401825904846,
0.19089752435684204,
-0.2197524458169937,
-0.07209863513708115,
-0.736707329750061,
-0.18226297199726105,
0.77281254529953,
-0.1795385330915451,
0.1358903795480728... | |
I'm working with JSTL in Eclipse, using the WTP. I have jstl and standard.jar in my WEB-INF/lib directory, and everything works. Eclipse is giving me this warning in my JSP:
The TagExtraInfo class for c:forEach (org.apache.taglibs.standard.tei.ForEachTEI) was not found on the build path.
I have JSTL included:
```
<%... | [
0.4375075399875641,
0.3017817735671997,
0.22640445828437805,
-0.3824615776538849,
-0.12068784236907959,
-0.3586009442806244,
0.33451351523399353,
-0.0014320890186354518,
-0.050948917865753174,
-0.6736547946929932,
-0.12288851290941238,
0.8208894729614258,
-0.3968158960342407,
0.17426322400... | |
I have a form that tries to modify a JComponent's graphics context. I use, for example,
```
((Graphics2D) target.getGraphics()).setStroke(new BasicStroke(5));
```
Now, immediately after I set the value and close the form, the change is not visible. Am I not allowed to modify a JComponent's graphics context? How else... | [
0.5499652624130249,
0.05386638268828392,
0.7685714364051819,
-0.05530339106917381,
-0.07187468558549881,
0.08708960562944412,
0.2575126886367798,
-0.3615292012691498,
-0.22037068009376526,
-0.8050995469093323,
-0.1197715476155281,
0.6415766477584839,
-0.34412938356399536,
0.095831431448459... | |
But, on an even more fundamental level than that, Graphics2D objects are not persistant. They are typically instantiated every time the component is redrawn, meaning that the Graphics2D object you got won't be the same the component will be using when redrawing.
What you need to do, to achieve this kind of thing is ei... | [
0.12458938360214233,
-0.1572425365447998,
0.4264678359031677,
-0.12955637276172638,
-0.35790878534317017,
-0.2133270800113678,
-0.09430769085884094,
-0.40552276372909546,
-0.7357969284057617,
-0.38340407609939575,
-0.09574434906244278,
0.5167962312698364,
-0.24944420158863068,
-0.051023047... | |
I'm pretty new to HQL (well, nHibernate in general) and am currently building a simple app to learn more about it.
I've run into problems trying to express the following SQL as HQL though, and would be very grateful for any ideas.
Here's the query:
```
select * from parent p
where p.id in (select p.parentid from chi... | [
0.3934856653213501,
0.17741507291793823,
0.19957734644412994,
-0.0017436195630580187,
-0.0409722700715065,
-0.046404335647821426,
0.3705707788467407,
-0.039004117250442505,
-0.00034264588612131774,
-0.6080476641654968,
0.006575032602995634,
0.41465073823928833,
-0.11222962290048599,
0.2685... | |
to false in pages section of web.config for MVC. | [
0.3976046144962311,
0.07492691278457642,
0.48565760254859924,
0.21152305603027344,
-0.09366542100906372,
-0.2184782773256302,
0.5719648599624634,
-0.0401083268225193,
-0.14638616144657135,
-0.10537950694561005,
-0.089394211769104,
0.4792432487010956,
-0.24840356409549713,
0.308044344186782... | |
I want the equivalent online resource to DNS in Twenty-One Days. I need one evening's reading that will explain what the different record types do, how do propagation and caching work, what is an SoA, etc.
I don't want anything that begins by explaining what DNS is.
Can anybody please point me in the right direction ... | [
0.7287831902503967,
0.1836983859539032,
0.0861911028623581,
0.5914946794509888,
-0.10263040661811829,
-0.6118003129959106,
0.003615204943343997,
0.18294373154640198,
-0.22009852528572083,
-0.39796096086502075,
-0.125803142786026,
0.28625884652137756,
0.2058645337820053,
0.30007603764533997... | |
the examples are specific to DNSMadeEasy though. | [
0.2492949515581131,
-0.05785287544131279,
0.011167250573635101,
-0.02260700799524784,
-0.1438750922679901,
-0.4268813133239746,
0.13719524443149567,
0.29506781697273254,
-0.43999990820884705,
-0.48591679334640503,
0.04726642370223999,
0.02496269904077053,
-0.13556340336799622,
0.4206486940... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.