text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Observations: ------------- Java has a logical AND operator. Java has a logical OR operator. Java has a logical NOT operator. Problem: -------- Java has no logical XOR operator, [according to sun](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html). I would like to define one. Method...
[ -0.25652432441711426, 0.2471863031387329, 0.3344729244709015, 0.1955346167087555, -0.023384584113955498, 0.0142491664737463, -0.08991970866918564, -0.03678891807794571, -0.34429654479026794, -0.32447123527526855, -0.012684782966971397, 0.27239370346069336, -0.37246933579444885, 0.029122846...
find anything on how to go about defining a new operator in Java. Where should I start? Java **does have a logical XOR operator**, it is [^](https://stackoverflow.com/questions/460542/-operator-in-java) (as in `a ^ b`). Apart from that, you can't define new operators in Java. **Edit:** Here's an example: ``` public...
[ 0.008151561953127384, -0.02099599689245224, 0.1132148951292038, -0.28542739152908325, 0.11439874023199081, -0.18110370635986328, 0.2231588065624237, -0.056382402777671814, -0.269897997379303, -0.4340282380580902, -0.2095930278301239, 0.5192839503288269, -0.605771541595459, -0.0498240441083...
System.out.println(a + " ^ " + b + " = " + c); } } } ``` Output: ``` false ^ false = false false ^ true = true true ^ false = true true ^ true = false ```
[ -0.4802381992340088, -0.04703588783740997, 0.25335806608200073, -0.1947403997182846, 0.09901371598243713, 0.1994427740573883, 0.31864941120147705, -0.13177593052387238, -0.1377217322587967, -0.5607777237892151, -0.33151349425315857, 0.6328205466270447, -0.36288130283355713, 0.0670450851321...
in my eternal internal fight on whether to stay with mootools or jump to jQuery I've found on the jQuery documentation something that got my attention and this is that jQuery can ask for a JSON to a different domain, which is usually forbidden by the browser. I've seen some workarounds for cross-subdomain, but never c...
[ 0.35138094425201416, -0.2769095003604889, 0.36777299642562866, 0.1302919089794159, -0.06540310382843018, -0.2842313349246979, 0.13982611894607544, 0.03050529956817627, -0.29231858253479004, -0.5162842273712158, -0.35957714915275574, 0.540380597114563, -0.3022725284099579, 0.038369670510292...
$.each(data.items, function(i,item){ $("<img/>").attr("src", item.media.m).appendTo("#images"); if ( i == 3 ) return false; }); }); ``` This doesn't Mootools: ``` var jsonRequest = new Request.JSON({url: "http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmod...
[ 0.449806272983551, -0.1406584531068802, 0.8719306588172913, -0.018315445631742477, 0.23159101605415344, -0.24782969057559967, 0.62394779920578, -0.3298550844192505, -0.4140356481075287, -0.406451553106308, -0.23299022018909454, 0.631613552570343, -0.363012433052063, 0.0140904625877738, -...
instead of returning the usual response, wraps it into a method call of the user-supplied method, e.g. instead of: `{"foo": "bar", "baz":"bah"}` It would return: `temporaryCallbackFunctionName({"foo": "bar", "baz":"bah"});` jQuery defines the temporary callback function and inserts a `<script src="..."></script>` e...
[ -0.3196071982383728, -0.16803322732448578, 0.4063231945037842, -0.42500215768814087, -0.01451877225190401, -0.010635689832270145, 0.2148181051015854, 0.10890478640794754, -0.10782507061958313, -0.12048287689685822, -0.4206241965293884, 0.5320258140563965, -0.4061167240142822, 0.19636034965...
This time I have problem with virtual fields. I have core class for my game objects. This class contains a field with Model class object. Model's object contains values such as position etc. Now - while drawing I need to read position of each object from it's model. The problem starts when instead of default model cl...
[ -0.5947130918502808, -0.3339228630065918, 0.4270581305027008, 0.13633447885513306, -0.011422215960919857, 0.28019288182258606, 0.17942477762699127, -0.19990865886211395, -0.3457893431186676, -0.6667658090591431, -0.027598850429058075, 0.7939607501029968, -0.2891470491886139, 0.267843395471...
10; // NOT OK! ((GenericGameObject)m).Model.Position.X == 0 ``` I tried to make Model defined as virtual property instead of field, but this fails because derived properties have to be of same type as their base. Casting is futile because there will be many other model types. What can I do if I want to read a value f...
[ -0.22869470715522766, 0.045442380011081696, 0.4494919180870056, -0.218168243765831, -0.15558412671089172, 0.0747314989566803, 0.2939184010028839, -0.2700607478618622, -0.1683712899684906, -0.814919650554657, 0.009782899171113968, 0.6719681024551392, -0.15461094677448273, 0.2384417504072189...
Position is not a field. * **to make GenericGameObject a generic type such as GenericGameObject and Missile a type derived from GenericGameObject** I couldn't then cast a missile to GenericGameObject and generally store those object on same list. Of course I could make main base type which those two could inherit from,...
[ -0.3432411849498749, -0.3506034016609192, 0.04118593782186508, 0.20907285809516907, -0.20758749544620514, -0.04074373096227646, 0.029070395976305008, -0.02043645828962326, 0.016444245353341103, -0.6293967962265015, 0.0146670863032341, 0.39742523431777954, 0.03864777088165283, 0.34628370404...
derived class, then either cast it back to your derived class or hold on to a reference of your derived class (probably better). Or you could go down this road, which I like the best... ``` abstract class GenericGameObject { public DefaultGameObjectModel Model { get { return ModelInternal; } } ...
[ -0.2500874996185303, -0.354543000459671, 0.4658685624599457, 0.1950533390045166, 0.11098678410053253, -0.020575225353240967, 0.030872903764247894, -0.06462673842906952, -0.015553861856460571, -0.4042930603027344, -0.14533360302448273, 0.7545614838600159, -0.061314456164836884, 0.2612212002...
get { return model; } } public new MissileModel Model { get { return model; } set { model = value; } } } class DefaultGameObjectModel { public Vector2 Position = new Vector2(){X=0}; } class MissileModel : DefaultGameObjectModel { } Missile m = new Missile(); m.Model.Position.X = 10; ...
[ -0.4545079469680786, -0.37364956736564636, 0.6795011758804321, -0.010924968868494034, 0.09337741881608963, 0.18368685245513916, 0.02242502011358738, -0.13337378203868866, -0.2215494066476822, -0.6533493399620056, -0.3686676323413849, 0.7447502017021179, -0.05118918418884277, -0.02724694274...
I am taking my first steps with MsTest and Moq and would like to unit test a Linq2SQL repository class. The problem is that I do not want the unit tests to permantly modify my development database. Which would be the best approach for this scenario? * Let each test operate on my real development database, but make s...
[ 0.5751097798347473, 0.3181435167789459, -0.14176513254642487, -0.07486656308174133, -0.11126313358545303, 0.07041429728269577, 0.4173572361469269, 0.03087221458554268, -0.08755280822515488, -0.700884997844696, 0.28558674454689026, 0.4687183201313019, -0.032024085521698, 0.37744712829589844...
Datacontext (please bear in mind that I am a total Moq noob). * Something completely different? Perhaps something that would automate setting up the database for me before each test run? **Edit:** I just learned that MBUnit has a rollback attribute that reverses any database operations run by a test case. I am not par...
[ -0.03554718568921089, -0.0270469281822443, 0.0974174439907074, 0.2637769877910614, -0.33884483575820923, -0.10867907851934433, 0.4106045365333557, 0.388782799243927, -0.1196577250957489, -0.28066036105155945, 0.07805411517620087, 0.6843044757843018, -0.20512951910495758, 0.1939512342214584...
strange side effects, such as loading a linq entity from the database, changing one property (without submitchanges), then loading the same entity again. Usually this results in no update query on the database, but from within the Test Method it appears as if the update is immediately executed as soon as I change the l...
[ 0.08898866921663284, 0.2620340585708618, 0.23899750411510468, 0.16944903135299683, -0.08875536173582077, -0.25912144780158997, 0.22702430188655853, -0.04079385846853256, -0.18675367534160614, -0.1994260549545288, 0.019869694486260414, 0.27274632453918457, -0.11966404318809509, 0.2014182209...
Here's a very specific coding question: I've recently been asked to maintain some old-ish Java Swing GUI code at work and ran into this problem: I've attached my own subclass of InputVerifier called MyFilenameVerifier to a JTextField (but it may as well be any JComponent for these purposes). I've overridden the verif...
[ 0.5493527054786682, 0.1635168194770813, 0.4659992456436157, -0.1230049580335617, 0.0844484269618988, -0.13816052675247192, 0.2218964844942093, -0.16023209691047668, -0.2740141451358795, -0.6488009095191956, -0.04730898514389992, 0.42962032556533813, -0.2512073814868927, -0.0983589440584182...
to get the users attention (wish I did). This is just the way it works. Problem is, once the user goes back and types something valid into the text field, I need a way to set it back to default border (instead of just saying set it to Color.GRAY or whatever, which is a different color from its original border). I need...
[ 0.5246772170066833, 0.03319600597023964, 0.5816525220870972, 0.06106911227107048, 0.1140536293387413, -0.20925375819206238, 0.3841265141963959, -0.2659449875354767, -0.37396755814552307, -0.5173934102058411, 0.037291303277015686, 0.3615577220916748, -0.24520213901996613, -0.096485272049903...
Has anybody heard of the Lucene version 2.3.1.3? We're using it in a production project. However the stable version of Lucene version 2.0.0.4. Should I push to have the project's dependencies moved to version 2.0.0.4? With basic JDBC, there really isn't a way to do what you are saying in a cross-database manner. As yo...
[ 0.4733596742153168, -0.08522012084722519, 0.07568556815385818, 0.10146839916706085, -0.2265896201133728, -0.39926576614379883, 0.36360976099967957, 0.20180629193782806, 0.013014513999223709, -0.7352262735366821, -0.0793888047337532, 0.5257048010826111, -0.1969408392906189, -0.1674280017614...
for the duplicate manually (with a select) prior to doing your insert. (This wouldn't be 100%, as its technically possible that someone could have done an insert after your query). 3. After you get any sql exception on the insert, try to query for that id. If you can actually find the match - you can be fairly sure tha...
[ 0.28549546003341675, 0.3223680853843689, -0.0035939468070864677, 0.1667950600385666, -0.012398861348628998, -0.14703793823719025, 0.057056937366724014, -0.2866407036781311, -0.2532874047756195, -0.5352473258972168, 0.2277023196220398, 0.7064851522445679, -0.4782896041870117, -0.05440420657...
as possible, and then (if absolutely necessary), use #3.
[ 0.07924803346395493, 0.25354036688804626, 0.27044522762298584, -0.26498013734817505, 0.15041199326515198, -0.28098559379577637, 0.15479105710983276, 0.0770358145236969, 0.006415275391191244, -0.6297121047973633, -0.6339167952537537, 0.7506646513938904, -0.14338478446006775, -0.303700089454...
**What is the best size for an individual tile in a 2D sprite sheet?** I am creating a sprite sheet and am trying to figure out what the best resolution is to use for each sprite. Is there a standard size I shouldn't go above or below? ex. 64px X 64px, 512px X 512px, etc. I am trying to get HD quality sprites. Thin...
[ 0.4973522126674652, 0.16120928525924683, 0.4872027039527893, 0.312234491109848, -0.46104755997657776, 0.3407512307167053, 0.13129326701164246, 0.22323259711265564, -0.3730314075946808, -0.9597156643867493, 0.1362907439470291, 0.2804642617702484, 0.04784654453396797, 0.4456014037132263, 0...
you are going to do with them when you render them. If you are going to avoid scaling the sprites, making them the same as their final rendered resolution as possible will help keep the quality higher. I would definitely stick to power of two texture sizes, since it does seem to help in general. However, if you're go...
[ -0.028072386980056763, -0.13623537123203278, 0.40065068006515503, 0.16172657907009125, -0.4396034777164459, 0.3427214026451111, 0.4084313213825226, -0.2942710816860199, -0.6011223793029785, -0.8292046189308167, 0.0466105192899704, 0.5367140173912048, 0.22795578837394714, 0.0179096404463052...
are being composited and displayed at any time, and what hardware you'll be running on (xbox, pc, both?), to determine the best options for balancing performance with texture quality. If you're not going too crazy with the number of sprites, though, you can probably go at a higher quality, and allow the system to down...
[ 0.3346608281135559, -0.024039236828684807, 0.6009408235549927, 0.5452180504798889, 0.014661087654531002, 0.09441886097192764, 0.015578672289848328, -0.09549141675233841, -0.47768640518188477, -0.5345023274421692, 0.08636238425970078, 0.37110549211502075, -0.010432455688714981, -0.030484717...
I have a WPF application that connects via a socket to a device and gets streaming text data (approx 1 message per second). This data is then displayed on the UI. The user can create rules like *"If the data contains 'abc' highlight the line"* or *"…make it bold"*, so plain text output will not do, it needs to be "rich...
[ 0.28253114223480225, -0.15639831125736237, 0.9823641777038574, -0.13763190805912018, -0.05552919954061508, -0.012991630472242832, -0.06572600454092026, -0.48292577266693115, -0.3327281177043915, -0.7746440768241882, 0.009942322038114071, 0.4643744230270386, -0.2641618847846985, -0.14492076...
large (~6,000 lines) performance starts to degrade. The current algorithm caps the number of lines at 10,000, but then things get even worse, to the point where the app is unusable. Once it reaches 10,000 lines, then I remove a line for every line that is added resulting in the FlowDocumentScrollViewer getting 2 update...
[ 0.04048193246126175, -0.036956578493118286, 1.0951743125915527, 0.02923513762652874, 0.11351867765188217, 0.09661461412906647, 0.6589526534080505, 0.0881180390715599, -0.36156415939331055, -0.7156054377555847, -0.10674666613340378, 0.19306902587413788, -0.38597607612609863, 0.2440415024757...
up the UI. That’s my problem, here’s my question: **What is the best way to display streaming rich text content with WPF?** I get ~ 1 message per second, each message is ~150 characters, and I want to keep the last 10000 messages. Am I going about this the wrong way? Are there other controls/objects that would perfor...
[ 0.21728192269802094, -0.03277507424354553, 0.8149975538253784, 0.23547889292240143, -0.30251190066337585, -0.01202656514942646, 0.11712333559989929, -0.2431536763906479, -0.28917232155799866, -1.04506254196167, 0.125152125954628, 0.36983397603034973, -0.13309532403945923, -0.20956452190876...
of Blocks in the FlowDocument. For every message received I was creating a Run, adding that run to a Paragraph and adding the paragraph to the document. I changed the algorithm so now it creates a Paragraph then adds 250 Runs to that Paragraph, then creates a new Paragraph ... adds 250 Runs ... and so on. This essenti...
[ 0.3819487690925598, 0.019171573221683502, 0.5766274929046631, 0.15815287828445435, -0.163579061627388, 0.16601911187171936, 0.42667362093925476, -0.40120524168014526, -0.19877147674560547, -0.6169440150260925, 0.09697044640779495, -0.023988153785467148, -0.3334571123123169, 0.1147970110177...
Paragraph and that instantly deletes the oldest 250 lines. This relatively simple change brought the performance well within the acceptable range. Instead of pegging the CPU and locking up the UI, now the CPU stays relatively low with spikes around 15%.
[ -0.3501085937023163, -0.06982293725013733, 0.7525078654289246, 0.2516121566295624, -0.31387537717819214, -0.10391929745674133, 0.546453595161438, -0.017640598118305206, -0.03085825964808464, -0.6537314057350159, -0.20243653655052185, 0.24875850975513458, -0.13798494637012482, -0.0373462252...
I want to call Sleep(x), where x is milliseconds to sleep. I know this is the function, but it doesn't work for me. What do I need to include? ---SOLVED--- I was using the compiler option /Za, which disabled the native Windows extensions used in Sleep()'s implementation. Sleep is defined in Winbase.h, but you should ...
[ 0.6772422790527344, -0.012455431744456291, 0.2953829765319824, -0.06974315643310547, 0.14918041229248047, -0.27326667308807373, 0.040304213762283325, -0.09976553916931152, 0.05085097625851631, -0.8254516124725342, -0.0005398572538979352, 0.7196394205093384, -0.2114991843700409, 0.106019280...
In most JSON serializers/deserializers, the "key" part in a javascript dictionary/hash array is written as a string. What is the benefit of using a string as the key as opposed to just typing the intended name in? For example, say I define two objects `k1` and `k2` like so: ``` var k1 = { a: 1, b: 2, c: 3 }; ...
[ 0.11472056061029434, -0.1745513528585434, 0.002238814253360033, -0.3222530782222748, -0.12985703349113464, -0.27397817373275757, 0.20609240233898163, -0.17604084312915802, 0.050790589302778244, -0.19478768110275269, -0.413830429315567, 0.5820580720901489, -0.4995311200618744, 0.13248470425...
// false (of course) alert(k1.a == k2.a); // true alert(k1["b"] == k2["b"]); // true alert(uneval(k1)); // returns the k1 object literal notation. alert(uneval(k2)); // returns the same string as above line. alert(uneval(k1) == uneval(k2));
[ 0.13639888167381287, -0.24721987545490265, 0.45516976714134216, -0.3128943145275116, -0.05120585113763809, 0.07823828607797623, 0.5755159258842468, -0.25162649154663086, 0.04119793698191643, -0.28601688146591187, -0.6506412625312805, 0.6315003037452698, -0.39425355195999146, -0.04567240923...
// true ``` So what's the point of having the keys be in double-quotation marks (a string) as in the way `k2` was defined instead of just typing the key names in as in the way `k1` was defined? --- I just saw this over at [Ajaxian](http://ajaxian.com/archives/chrome-extension-api-how-we-wish-we-have-named-parameter...
[ 0.18119153380393982, -0.18463633954524994, -0.05513677000999451, 0.13440951704978943, -0.18014931678771973, -0.0976538136601448, 0.46910181641578674, -0.23251889646053314, 0.002613442251458764, -0.2518424093723297, -0.052554693073034286, 0.49663230776786804, -0.10961661487817764, 0.0539556...
of the actual JavaScript literal syntax. For simplicity in implementing JSON parsers, double quotes are always required around strings, and as keys in JSON are strings, they are required there. Not all legal JavaScript is legal JSON. While you can define object literals in JavaScript without the quotes, if you want in...
[ 0.4632247984409332, 0.1404106318950653, 0.026871457695961, 0.15103796124458313, -0.2846672832965851, -0.39176008105278015, 0.13530872762203217, -0.04466850683093071, -0.12796138226985931, -0.135362446308136, -0.2562558352947235, 0.7423977851867676, -0.49160829186439514, -0.5435568690299988...
This is the property declaration in question: ``` [RangeValidator(1,RangeBoundaryType.Inclusive,255,RangeBoundaryType.Inclusive,MessageTemplate = "StartFlexibility is out of range")] public byte StartFlexibility { get; set; } ``` When the validate method is called, a FormatException is thrown telling me that th...
[ 0.07306759059429169, 0.2027401626110077, 0.24301335215568542, -0.2697189152240753, 0.047462400048971176, -0.1341177523136139, 0.2300218939781189, -0.25961339473724365, 0.043165791779756546, -0.3318338990211487, -0.2664411664009094, 0.79530268907547, -0.20893260836601257, 0.0467755049467086...
out. The RangeValidator is also infering the type of the Range from the parameters, so, try casting ``` [RangeValidator((byte) 1, ... ```
[ 0.01841466687619686, 0.03906077891588211, 0.15699803829193115, -0.40678730607032776, 0.07291059195995331, 0.17901143431663513, 0.05243927985429764, -0.7060464024543762, 0.021556008607149124, -0.2998369634151459, 0.04579194635152817, 0.5670099258422852, -0.1906777173280716, 0.12784376740455...
First, a non-programming question: My phone is auto-responding to missed calls with a text message: "Sorry. I'm not near my phone right now." Where did my phone get the idea to do that and how do I make it stop? And a programming question: How can I make my Android do arbitrary things in response to a missed call, suc...
[ 0.06866750121116638, -0.1490797996520996, 0.5720433592796326, 0.26457643508911133, 0.12426894903182983, 0.19874246418476105, 0.24622170627117157, -0.07545080035924911, -0.3289986550807953, -0.32043129205703735, 0.16347630321979523, 0.6764412522315979, -0.3112827241420746, -0.24577547609806...
I working on a project and I would like to have a printer friendly version of the Views I have. Is there anybody who already did this and have some tips how to accomplish this? (what kind Routing is used, etc.) I was thinking of making a PrintController. In the ActionResult of a method in the PrintController to return...
[ 0.3746022582054138, -0.16752636432647705, 0.6309106349945068, 0.06944034993648529, -0.27720463275909424, -0.14250680804252625, 0.0815955400466919, -0.2543865442276001, -0.6359552145004272, -0.5949476957321167, 0.06303530931472778, 0.53034907579422, -0.2628202736377716, 0.1369408220052719, ...
will be a link to print the page, e.g.: - normal link: www.example.com/product; - print link: www.example.com/**print**/product; I don't want to use javascript or AJAX. Just show the same View the user is watching, only with a different masterpage (which will have specific print stylesheets). --- Thanks for th...
[ 0.5810124278068542, -0.08036656677722931, 0.33188265562057495, -0.23451653122901917, -0.3299332857131958, 0.11251301318407059, 0.1798567771911621, 0.05440118908882141, -0.25882574915885925, -0.7546204328536987, 0.10258469730615616, 0.4348307251930237, 0.0706203505396843, -0.028116524219512...
masterpage. In the other masterpage I include the css files for printing. So, the user gets a View which is almost the same as "Print preview" from the browsers menu. The advantage of doing it this way is, it will comply to the WCAG standard. `-print` is not required (at least by GNU `find` implementation). `-name`...
[ 0.3220806121826172, -0.1948816031217575, 0.45243605971336365, -0.06314758956432343, 0.0021619980689138174, -0.38498637080192566, 0.0068443939089775085, -0.04283009469509125, -0.2128697782754898, -0.7392185926437378, -0.13100062310695648, 0.4076843857765198, -0.513098418712616, 0.0628078654...
I have the following two tables in my database: a) A table containing values acquired at a certain date (you may think of these as, say, temperature readings): ``` sensor_id | acquired | value ----------+---------------------+-------- 1 | 2009-04-01 10:00:00 | 20 1 | 2009-04-01 10:01:0...
[ 0.11883164197206497, 0.05464032664895058, 0.7689786553382874, 0.3219510018825531, 0.20086030662059784, -0.16771049797534943, 0.34295395016670227, -0.25965598225593567, -0.08567991107702255, -0.5111849308013916, 0.021676817908883095, 0.21145537495613098, 0.15860041975975037, -0.031950630247...
| 20 1 | 2009-04 01 10:11:00 | 25 1 | 2009-04 01 10:15:00 | 30 ... ``` The interval between the readings may differ, but the combination of (`sensor_id`, `acquired`) is unique. b) A second table containing time periods and a description (you may think of these as, say, periods when someone turned ...
[ 0.10196565836668015, -0.0589350126683712, 0.793799102306366, 0.0052248332649469376, -0.04702376201748848, -0.02804802544414997, 0.2355393022298813, -0.3985399305820465, -0.18986476957798004, -0.46886342763900757, -0.17552638053894043, 0.453457772731781, -0.15859854221343994, -0.05482786148...
| 2009-04-01 10:00:00 | 2009-04-01 10:02:00 | some description 1 | 2009-04-01 10:10:00 | 2009-04-01 10:14:00 | something else ``` Again, the length of the period may differ, but there will never be overlapping time periods for any given sensor. I want to get a result that looks like this for any sensor and ...
[ -0.017122559249401093, -0.16197285056114197, 1.0516421794891357, 0.1402229219675064, -0.05458911880850792, -0.1355498880147934, 0.5488587021827698, -0.2652024030685425, -0.6878025531768799, -0.4215509593486786, -0.06928031891584396, 0.3434581160545349, -0.30743876099586487, -0.044765271246...
| description ----------+---------------------+----+---------------------+----+------------------ 1 | 2009-04-01 10:00:00 | 20 | 2009-04-01 10:02:00 | 20 | some description 1 | 2009-04-01 10:10:00 | 25 | 2009-04-01 10:14:00 | 30 | some description ``` Or in text from: given a `sensor_id` and a date ra...
[ -0.11955291032791138, 0.10423270612955093, 0.8250292539596558, 0.2224472165107727, 0.36770859360694885, 0.07621626555919647, 0.057134512811899185, -0.24619708955287933, -0.21858097612857819, -0.5834690928459167, -0.11620686948299408, 0.38164642453193665, 0.09099531918764114, -0.04242003336...
the first row with `acquired > start_date` and `acquired > end_date`). If it wasn't for the `start_value` and `end_value` columns, this would be a textbook trivial example of how to join two tables. Can I somehow get the output I need in one SQL statement without resorting to writing a PL/SQL function to find these v...
[ 0.01047719456255436, -0.061683446168899536, 0.2111101597547531, 0.20996960997581482, 0.07541433721780777, -0.04067699611186981, -0.05236485227942467, -0.18026868999004364, -0.14873862266540527, -0.4614105522632599, 0.02486238069832325, 0.27062883973121643, -0.2937009036540985, 0.1248975321...
try. Note the caveats at the end though. ``` SELECT RNG.sensor_id, RNG.start_date, RDG1.value AS v1, RNG.end_date, RDG2.value AS v2, RNG.description FROM Ranges RNG INNER JOIN Readings RDG1 ON RDG1.sensor_id = RNG.sensor_id AND RDG1.acquired => RNG.start_date LEFT OUTER JOIN Reading...
[ 0.0009589099790900946, -0.00819909106940031, 0.6002898812294006, -0.18834266066551208, 0.22889132797718048, 0.24962382018566132, 0.5032029747962952, -0.7834595441818237, 0.15539652109146118, -0.8463724255561829, 0.028077878057956696, 0.4527844190597534, -0.17038168013095856, -0.03741445019...
OUTER JOIN Readings RDG1_NE ON RDG2_NE.sensor_id = RDG2.sensor_id AND RDG2_NE.acquired >= RNG.end_date AND RDG2_NE.acquired < RDG2.acquired WHERE RDG1_NE.sensor_id IS NULL AND RDG2_NE.sensor_id IS NULL ``` This uses the first reading after the start date of the range and the first reading after th...
[ 0.25528770685195923, -0.2795192301273346, 0.6346569061279297, -0.05819805711507797, 0.14756205677986145, -0.21361073851585388, -0.048268772661685944, -0.5165683031082153, -0.04672681912779808, -0.6427937746047974, 0.1998140960931778, 0.5013060569763184, -0.2097981870174408, 0.1586789488792...
INNER JOINs to OUTER and put additional logic in to handle those situations based on your own business rules.
[ 0.10669326037168503, 0.02420310489833355, 0.2020823061466217, 0.22278277575969696, 0.2559666037559509, 0.17169444262981415, 0.14493940770626068, -0.35937681794166565, -0.01726125180721283, -0.7067885994911194, 0.14277693629264832, 0.5619530081748962, -0.13454774022102356, -0.17332659661769...
I'm hosting a WPF UserControl in a WinForms container. Now, I want to be able to theme/skin the UserControl. To do this, I've got several resource dictionaries that define the "skins." When my app starts up I create a "new System.Windows.Application()" so that Application.Current exists. To change the theme the old ski...
[ 0.560447096824646, -0.1385076344013214, 0.5667775869369507, 0.012671617791056633, -0.034872666001319885, -0.06317273527383804, 0.05294858291745186, -0.06461004167795181, -0.18641941249370575, -0.6829091310501099, 0.1106729507446289, 0.5313133597373962, -0.07939723879098892, 0.3114818632602...
is it not possible to do this at all? By the way, if I add a skin into the application resources before the UserControl is initialized it will work but I cannot change the skin after that. To repo this in the most basic way: Create a new WinForms application. Add a WPF UserControl to the app. This is simple enough: ...
[ 0.5047255754470825, -0.3729161322116852, 0.44708019495010376, -0.10695559531450272, 0.17571653425693512, 0.2559507489204407, 0.12233225256204605, -0.37395933270454407, 0.08804823458194733, -1.0121523141860962, 0.22392494976520538, 0.7618439197540283, -0.22403234243392944, -0.25917497277259...
In Form1.cs, add two Buttons and an ElementHost. Set the child of the ElementHost to an instance of the UserControl we just created. Wire up the buttons to events that swap the skin: ``` private void White_Click(object sender, EventArgs e) { Application.Current.Resources.MergedDictionaries[0] = (ResourceDict...
[ -0.24414394795894623, -0.27702274918556213, 0.6242778897285461, -0.24805179238319397, 0.42730942368507385, 0.265963613986969, 0.08185014873743057, -0.27514415979385376, -0.11769821494817734, -0.852545440196991, -0.3793250024318695, 0.6567044258117676, -0.5557485818862915, -0.05564064905047...
new System.Windows.Application(); Application.Current.Resources.MergedDictionaries[0] = (ResourceDictionary)Application.LoadComponent( new Uri(@"\WpfThemes;component\White.xaml", UriKind.Relative))); ... } ``` Now, when the White button is clicked I would expect the button in the UserControl to...
[ 0.10866016149520874, -0.1326594203710556, 0.6292834877967834, -0.13363458216190338, 0.10633348673582077, -0.0715978741645813, 0.4758681356906891, -0.042907241731882095, -0.5876198410987854, -0.8889102935791016, -0.1636187583208084, 0.599882185459137, -0.3728157579898834, 0.5349041819572449...
From what I can tell via Reflector, it appears that when the `Application` resource dictionary is catastrophically changed (a change that will likely have wide ranging effects like adding, removing, or replacing a skin), there is code that loops over all of the `Windows` in the application and forces them to re-evaluat...
[ 0.34120631217956543, 0.06641886383295059, 0.18804961442947388, 0.053215835243463516, 0.2673390805721283, -0.028064768761396408, 0.6268444657325745, -0.11075077950954437, -0.22349415719509125, -0.7713927030563354, -0.05038704723119736, 0.5679463148117065, -0.5176061987876892, 0.093059509992...
skin `ResourceDictionary` file. It's not perfect, but it gets the job done.
[ 0.8836562037467957, -0.09357749670743942, 0.08332997560501099, 0.18468083441257477, 0.3971025347709656, 0.0013962795492261648, -0.03588418662548065, -0.013597968965768814, -0.05713673681020737, -0.8304657340049744, 0.11047699302434921, 0.6456025242805481, 0.33577924966812134, -0.5600132942...
The scenario is that the client wants a floating div (the gray box) with text that wraps around it. However some of that text includes ul's and ol's, which hide behind the floating div in IE6. I tried wrapping the ul's/ol's in a div to see if that would help, but have been unsuccessful. Has anyone experienced this pro...
[ 0.4274396598339081, 0.13294127583503723, 0.36227697134017944, -0.13639111816883087, -0.0901157334446907, 0.1295941025018692, 0.08017998188734055, -0.25836271047592163, -0.026652805507183075, -0.5726476907730103, 0.09353122860193253, 0.46773263812065125, -0.37496858835220337, 0.010365489870...
that should help you... ``` ul { list-style-position: inside; } ```
[ -0.20795200765132904, 0.36346837878227234, 0.36400309205055237, -0.10378258675336838, 0.1699109822511673, 0.03576681390404701, -0.0871298685669899, 0.1391211301088333, -0.2370406538248062, -0.5441147089004517, -0.4156816303730011, 0.594459056854248, -0.10692467540502548, 0.0478923693299293...
I have a JTable with a set of uneditable cells and I want all the cells in a particular column to have a different mouse cursor displayed whilst the mouse is hovering over them. I am already using a custom renderer and setting the cursor on the renderer component doesn't seem to work (as it does for tooltips). It does...
[ -0.03826936334371567, -0.07333124428987503, 0.38551759719848633, -0.05988175794482231, -0.012929766438901424, 0.028089819476008415, 0.0345466285943985, -0.1645955741405487, -0.08364133536815643, -0.46408113837242126, 0.2662641108036041, 0.6237710118293762, -0.46181222796440125, -0.04239274...
the particular column you are after, setCursor() on the JTable.
[ -0.19956247508525848, -0.06273673474788666, 0.43805623054504395, -0.17913633584976196, -0.10482804477214813, -0.008527475409209728, -0.22518038749694824, 0.32718363404273987, -0.22698920965194702, -0.49881070852279663, -0.24155284464359283, 0.31688323616981506, -0.3339794874191284, -0.0543...
Is there a way to force clients to disconnect from PostgreSQL? I'm looking for the equivlent of DB2's [`force application all`](http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/core/r0001951.htm). I'd like to do this on my development box because when I've got database consoles o...
[ 0.1377372443675995, -0.29586493968963623, 0.5197219252586365, -0.09809497743844986, -0.14925642311573029, -0.07866232097148895, 0.14512516558170319, -0.25887057185173035, -0.35364872217178345, -0.37686213850975037, -0.13546887040138245, 0.8996254205703735, -0.37462133169174194, 0.003083785...
I've got a simple function that takes a List parameter. While working with it, it copies it and reverses the copy using .NET's [List(Of T).Reverse](http://msdn.microsoft.com/en-us/library/5c6526tb.aspx) method. ``` Private Function FindThing(ByVal Things As List(Of Thing)) As Thing Dim ReverseOrderThings As List(O...
[ 0.26181742548942566, 0.13754551112651825, 0.6828969717025757, -0.28043755888938904, -0.006079985294491053, 0.07573756575584412, 0.283765584230423, -0.14207133650779724, -0.1937042474746704, -0.4854322671890259, 0.04972522705793381, 0.2792256474494934, -0.09071224927902222, 0.62775641679763...
As List(Of Thing) = GetSortedListFromSomewhere() Dim FoundThing As Thing = FindThing(Things) For Each t As Thing In Things ... 'OMG! My Things are in reverse order!!1! WTF?' Next ``` How can I protect my list parameter in such a function? --- Update: ------- This is the correct way to make a copy of the li...
[ -0.08436111360788345, 0.022428354248404503, 0.5506110191345215, -0.23879587650299072, -0.0041372450068593025, -0.012915210798382759, 0.38451823592185974, -0.5863010287284851, -0.5047004222869873, -0.46723589301109314, -0.1750880628824234, 0.728773832321167, -0.36352476477622986, 0.27099466...
I am asking about a good resources and sample code for TSF? If you want the Images actually *inside* the text (like an emoticon), then you are going to have to do some work. This sounds like one of the few times I would actually want a User Control, the point of which would be one that scans the Text looking for emotic...
[ 0.7945795059204102, 0.08505944162607193, 0.03510180488228798, 0.2634276747703552, -0.11676863580942154, -0.4322499930858612, 0.08224061131477356, 0.13213346898555756, -0.19464032351970673, -0.6565634608268738, -0.04435894265770912, 0.39856186509132385, -0.5254700183868408, 0.08307150751352...
a list of values for data elements. 2. Create a DockPanel. 3. Foreach element in the List, add either a TextBlock or an Image (based on value). 4. Set this.Content to the DockPanel. I think something like this is actually what you are looking for, but if you want just an Image, then the ValueConverter suggestion wou...
[ 0.4616544544696808, -0.09605886787176132, 0.5467559695243835, 0.03856757655739784, 0.041505299508571625, -0.17170633375644684, -0.2396978884935379, -0.16144318878650665, -0.3204975128173828, -0.650598406791687, -0.029572539031505585, 0.5313621163368225, -0.31039485335350037, -0.11973492801...
I am developing publishing site. I have some layouts **that are pre-populated with web parts** and have a problem when I need to make some change on the layout. Deployment succeeds but I still see old version. If make I change in SP Designer it is reflected OK but not if the change is done by the feature that is being ...
[ 0.37602028250694275, 0.20695967972278595, 0.4291347861289978, -0.003841801779344678, -0.23963242769241333, -0.2615094780921936, 0.18760327994823456, -0.23579853773117065, -0.432956725358963, -0.619960606098175, 0.10344075411558151, 0.4834024906158447, -0.055688679218292236, 0.3154608309268...
layout. Current solution for this problem was that I take new virtual image and start with clean machine. Real problem is how to solve this on clients installation without reverting to clean machine. There will be some bug fixes and I will have to send new WSP file with some changes in layout. **Is there any way to...
[ 0.3821830451488495, -0.14498983323574066, 0.6174929738044739, 0.041475627571344376, -0.057367198169231415, -0.2229614108800888, 0.32907986640930176, -0.07901790738105774, -0.46991655230522156, -1.0739871263504028, 0.013696669600903988, 0.8296335935592651, -0.3796940743923187, 0.18609341979...
SharePoint designer to detach page from layout and attach it again but still no results. Since you are using VSeWSS, you can execute your own code upon feature activation. So try writing an SPFeatureReceiver that will call SPWeb.RevertAllDocumentContentStreams() to reghost directly after feature activation on the web(s...
[ 0.478889137506485, -0.38313230872154236, 0.6887735724449158, 0.23930884897708893, -0.06600681692361832, -0.33340489864349365, 0.274341344833374, -0.2875756025314331, -0.2775889039039612, -1.0273528099060059, 0.05030451714992523, 0.4131947159767151, -0.2019626796245575, 0.06720203906297684,...
**FOR SEARCH ENGINE OPTIMIZATION PURPOSES**, does the location of the slug within a URL matter? There's no doubt that you could code URL slugs to work properly in any order. I'm more interested to know if search engines place different weights to portions of the URL on the right-hand-side vs the left-hand-side For ex...
[ 0.3808400630950928, 0.23447445034980774, 0.2305266112089157, 0.3338946998119354, -0.30709174275398254, -0.32774731516838074, 0.07216958701610565, 0.10465460270643234, -0.2632613778114319, -0.19354751706123352, 0.08993609249591827, -0.01832646131515503, -0.037864986807107925, 0.237579807639...
clear methods are described/explained), there's just not going to be a clear, demonstrable answer. On the whole, you can assume that if it seems slimy, Google will penalize it, and if it seems semantic/useful, Google will promote it. In the case of the above url, it's my guess that Google will treat both the same, but...
[ 0.3419167995452881, 0.2344541847705841, 0.21178966760635376, 0.4930589497089386, -0.029133984819054604, -0.12012430280447006, 0.3233238756656647, -0.05640438199043274, 0.11156411468982697, -0.3344694674015045, -0.12741804122924805, 0.3610121011734009, -0.15974608063697815, -0.1078737005591...
All I want to do is to write something like ``` <%=Html.ScriptInclude("~/Scripts/jquery.1.2.6.js")%> ``` When I do that I get an error: > The Controls collection cannot be > modified because the control contains > code blocks (i.e. <% ... %>) I'm using ASP.NET MVC Release Candidate 1. Is that impossible to acco...
[ 0.24883517622947693, 0.025119628757238388, 0.4481208324432373, -0.14815403521060944, 0.17379043996334076, -0.36127880215644836, 0.5514089465141296, -0.18528002500534058, -0.19406792521476746, -0.6836400628089905, -0.04261268302798271, 0.487949401140213, -0.48576098680496216, 0.149319857358...
In my model I have `Address` as a base class and `MailingAddress`, `Email`, and `Phone` as subclasses of Address. A `Person` has an address so query to get a person who has an Oakland Mailing address would look like this: ``` var peopleInOakland = from p in entities.DbObjectSet.OfType<Person>() ...
[ -0.00507942633703351, 0.02797579951584339, -0.031020741909742355, -0.0048857517540454865, 0.08437686413526535, 0.22395390272140503, -0.016640184447169304, -0.15528251230716705, -0.02226094715297222, -0.7094404697418213, 0.14446887373924255, 0.3892167806625366, -0.04808895289897919, 0.30115...
where a.City == "Oakland" select p; ``` How do I also include the mailing addresses of the person in my query result? I know I should be using an Include, but I'm unsure of how to name the `MailingAddress` in the `.Include` argument. Thanks in advance You will have to create a new type t...
[ 0.5455514192581177, 0.05297430604696274, 0.4075181186199188, 0.020628267899155617, 0.14912456274032593, -0.019930042326450348, 0.07980365306138992, -0.01853908970952034, -0.29987233877182007, -0.6384233832359314, -0.15055203437805176, 0.07836946845054626, -0.5123099684715271, 0.14172926545...
from p in entities.DbObjectSet.OfType<Person>() from a in p.Addresses.OfType<MailingAddress>() where a.City == "Oakland" select new { Person = p, Addresses = p.Addresses.OfType<MailingAddress>() }; ```
[ 0.07763022929430008, -0.08896838873624802, 0.1796157956123352, -0.08438656479120255, 0.0024475622922182083, 0.36909815669059753, 0.0027577944565564394, -0.40155914425849915, -0.05408119410276413, -0.5627378225326538, -0.45819318294525146, 0.11254984140396118, -0.2633945047855377, 0.4497328...
I currently have a test which tests the presenter I have in the MVP model. On my presenter I have a property which will call into my View, which in my test is mocked out. In the Initialization of my test, after I set my View on the Presenter to be the mocked View, I set my property on the Presenter which will call this...
[ 0.1325964629650116, 0.19795608520507812, 0.4990101754665375, 0.06616495549678802, -0.2319825440645218, 0.4736098647117615, 0.2232031524181366, -0.46126770973205566, -0.027023909613490105, -0.4284532070159912, 0.3510667383670807, 0.630262017250061, 0.01956341415643692, 0.07266390323638916, ...
as long as I am invoking on the Mock outside the expecting block it should not be recording this. I would imagine the test to pass. Is there a reason it is not passing? Below is some code to show my setup. ``` public class Presenter { public IView View; public Presenter(IView view) { View = view ...
[ 0.5163371562957764, 0.03877301514148712, 0.3301295340061188, -0.30504468083381653, -0.23574402928352356, -0.028743963688611984, 0.46225589513778687, -0.5074142813682556, -0.16609695553779602, -0.5360276699066162, -0.16938862204551697, 0.8852516412734985, -0.08771388977766037, 0.12433875352...
_property = value; View.MethodToInvoke(); } } ``` ... Test Code Below ... ``` [TestInitialize] public void Initilize() { _mocks = new MockRepository(); _view = _mocks.StrictMock<IView>(); _presenter = new Presenter(_view); _presenter.Propert...
[ 0.2038641721010208, -0.03665521740913391, 0.5722330808639526, -0.19363288581371307, -0.0715801790356636, 0.284953236579895, 0.5737967491149902, -0.4853208363056183, -0.2283955216407776, -0.6157365441322327, -0.29457974433898926, 0.6211851239204407, -0.3116283714771271, 0.4916125535964966, ...
} [TestMethod] public void Test() { Rhino.Mocks.With.Mocks(_mocks).Expecting(delegate { }).Verify(delegate
[ 0.4991358816623688, 0.046618249267339706, -0.2752159535884857, 0.30729371309280396, 0.10183101892471313, 0.1324325054883957, 0.5677133798599243, -0.4969089925289154, -0.14509807527065277, -0.4838864803314209, 0.24886494874954224, 0.4538222849369049, -0.07135355472564697, 0.0850173234939575...
{ _presenter.SomeOtherMethod(); }); } ``` Why in the world would you want to test the same thing each time a test is run? If you want to test that a specific thing happens, you should check that in a single test. The pattern you are using now implies that you need to - set up prerequisites...
[ 0.7491158843040466, 0.1952325999736786, -0.027457624673843384, 0.11478954553604126, -0.04763073846697807, -0.37296366691589355, 0.40615421533584595, -0.01611633598804474, -0.4966287612915039, -0.38345929980278015, 0.17678320407867432, 0.3222898542881012, -0.5185255408287048, 0.314114600419...
each test, and that help make the tests clearer, and make it easier to use the AAA syntax. There's several things to discuss here, but it certainly would be clearer if you did it something like: ``` [TestMethod] ShouldCallInvokedMethodWhenSettingProperty() { var viewMock = MockRepository.GenerateMock<IView>() ...
[ 0.23961429297924042, 0.1630779504776001, 0.5482654571533203, -0.06437303870916367, -0.5253456830978394, 0.24267378449440002, 0.5934059023857117, -0.6178629994392395, -0.23559297621250153, -0.6234033703804016, 0.23157845437526703, 0.5991817712783813, -0.07871664315462112, 0.2759924232959747...
How can a cross compilation setup be achieved to allow compiling Cell Linux programs on a Windows PC using the cygwin toolchain? The cygwin tools provide a GNU compiler to use in building the cross compiler, and associated tools for the build process e.g. rpm, cpio, make, flex, bison and so on. I am moderately confide...
[ 0.5705793499946594, 0.2531350255012512, 0.019286276772618294, -0.054211221635341644, -0.036030907183885574, -0.23407354950904846, -0.04223958030343056, -0.06030134856700897, -0.03575216978788376, -0.4440181851387024, 0.05896540731191635, 0.4756549894809723, -0.4036954641342163, -0.03926400...
is a patched GNU toolchain, with C and C++ compilers for the PPU and SPU processors, and associated binutils. The sources for the Cell Linux SDK for Cell Linux can be found [here](http://www.bsc.es/projects/deepcomputing/linuxoncell/cellsimulator/sdk3.1/sources/toolchain/). The source RPMS [here](http://www.bsc.es/proj...
[ 0.23945210874080658, 0.14804132282733917, 0.02014361135661602, -0.10085384547710419, 0.2076702117919922, -0.009236825630068779, -0.0049606976099312305, -0.20131859183311462, 0.13555580377578735, -0.6632203459739685, -0.04730866849422455, 0.4474136531352997, -0.5156125426292419, -0.35722836...
pretty good outline, but there will be definite changes. For the host PC, you can install gcc and other build tools from [MinGW](http://www.mingw.org/) or [cygwin](http://www.cygwin.com). That will give you the windows native parts of your toolchain. Then you'll need to download the sources for the cell portions of ...
[ 0.3676043152809143, 0.18581171333789825, 0.23679091036319733, -0.06461986899375916, 0.17205458879470825, -0.4262733459472656, 0.027363892644643784, 0.14103761315345764, 0.0580657534301281, -0.8581831455230713, -0.04231980815529823, 0.6401194334030151, -0.20006033778190613, -0.1939495652914...
In a certain page of our JSF application, the user sees a table listing many objects, which we will call "jobs". Let's say each job has a priority, which is nothing but a number, and in this screen the user is able to edit the priorities of the jobs. However, two jobs can't have the same priority number. For this reas...
[ 0.024214209988713264, -0.29295381903648376, 0.23246996104717255, 0.2724066376686096, -0.06330440938472748, 0.1485179215669632, -0.1484612673521042, 0.12903288006782532, -0.3394801616668701, -0.7855302691459656, 0.11855357885360718, 0.11527328938245773, -0.46331509947776794, -0.124427057802...
job from 100 to 50, he would have to manually "make room for that job" by adding 1 to jobs 50 to 99. Now I'm thinking about a table in which the user could drag & drop the rows to visually adjust priority, without ever having to fiddle with priority numbers (in fact never seeing them), but I can't find such component....
[ 0.0758514255285263, -0.22090305387973785, 0.5131974816322327, 0.14021560549736023, -0.13555482029914856, 0.3850129544734955, -0.16584104299545288, -0.03111499734222889, -0.43140295147895813, -0.6669007539749146, -0.08355864137411118, 0.4450550675392151, -0.07350227236747742, -0.03202576190...
numbers accordingly after changing the priority. Regarding drag-and-drop, I'll suggest that you look at RichFaces or ICEFaces. RichFaces got some very neat functionality for implementing the sort of thing you are talking about. I'll recommend that you have a look at the [RichFaces demo page](http://livedemo.exadel.com...
[ 0.26032984256744385, -0.23034964501857758, 0.3783063590526581, 0.07633233070373535, -0.10246787220239639, 0.2964339852333069, 0.05771008878946304, -0.09065846353769302, -0.4076593220233917, -0.5578386783599854, -0.17474089562892914, 0.4740946292877197, -0.3204438090324402, -0.3065894842147...
Is it possible to fill out an infopath form and submit it via a C# console application? If yes, then how? Yes, you can create a XML file within your C# application and push it to your Sharepoint Form Library. Sharepoint won't realize any difference. Just ensure two things: * Your XML must validate against the Infopa...
[ 0.5303735733032227, -0.2258400321006775, 0.48787546157836914, 0.5184122920036316, 0.2658636271953583, -0.21699993312358856, -0.21843035519123077, -0.032798513770103455, 0.2173694223165512, -0.5177177786827087, -0.13043314218521118, 0.6870250701904297, 0.013808504678308964, -0.0807968899607...
Often when I am coding I just like to print little things (mostly the current value of variables) out to console. I don't see anything like this for Google App Engine, although I note that the Google App Engine Launcher does have a Log terminal. Is there any way to write to said Terminal, or to some other terminal, usi...
[ 0.6285622119903564, 0.06390312314033508, 0.0764136016368866, 0.02984927035868168, -0.16104856133460999, -0.07338615506887436, 0.28304868936538696, -0.04050028696656227, -0.26811930537223816, -0.5385040044784546, 0.05736791715025902, 0.598438560962677, -0.5820900201797485, -0.03341545909643...
beware that you're going to see a lot of debug noise from the App Engine SDK itself. The [full set of levels](https://cloud.google.com/appengine/docs/python/refdocs/modules/google/appengine/tools/devappserver2/devappserver2) are: * `debug` * `info` * `warning` * `error` * `critical` You can add the flag by double cli...
[ 0.46921929717063904, 0.11110678315162659, 0.39911213517189026, -0.049229878932237625, 0.16866886615753174, -0.23321647942066193, 0.6335198283195496, -0.4176447093486786, -0.14574752748012543, -0.3890853524208069, -0.4510290026664734, 0.8382341861724854, -0.500206470489502, -0.2281551063060...
The other day, I asked [how to create a message box in your class](https://stackoverflow.com/questions/715206/show-a-message-box-from-a-class-in-c), but one of the answers stated that was it wasn't the correct approach. I understand that this is because it really defeats the point of a class. My program reads word by ...
[ 0.4246901571750641, -0.062093585729599, -0.011703033931553364, -0.01614614948630333, -0.09733506292104721, -0.19805127382278442, 0.3379826247692108, -0.07717017084360123, -0.32987159490585327, -0.425595760345459, -0.02394619584083557, 0.07032430171966553, -0.3244222104549408, 0.27759656310...
something like this: ``` /* ... */ public IEnumerable<string> FindMissingWords( string fileName, IEnumerable<string> toSearch) { List<string> missingWords = new List<string>(); // todo: the appropriate code for looking up strings in the file, using // the filename and the ...
[ -0.09395493566989899, -0.24450989067554474, 0.08746876567602158, -0.17091424763202667, 0.20508170127868652, -0.2426540106534958, 0.18290264904499054, -0.19086983799934387, -0.11572781205177307, -0.6281088590621948, -0.198969304561615, 0.684047281742096, -0.3518409729003906, -0.041759490966...
method from your form, and add each string it returns to your box. (If you're not familiar with `IEnumerable`, don't worry -- it's just a interface that defines a sequence of things, like an array or a list. You could pass an array of strings instead, but it would be a little less precise.)
[ 0.3942696452140808, -0.2843688428401947, 0.1529582440853119, 0.10629674047231674, -0.049754735082387924, -0.1960975080728531, 0.3658391237258911, -0.3106645941734314, -0.08708573132753372, -0.4801540970802307, 0.1422758251428604, 0.15535888075828552, -0.4613330662250519, 0.0742192119359970...
I've set up an XML file with names of objects that will be contained in a fla/swf library. I wish to position the objects on the stage using an XML file that can be quickly modified without having to recompile the fla/swf file. Of course, positioning can only be accomplished when the objects are instantiaed and added t...
[ 0.12907449901103973, 0.20306093990802765, 0.458283931016922, -0.14924825727939606, -0.1460377275943756, 0.2966519892215729, -0.3045834004878998, -0.3662121593952179, 0.02072603814303875, -0.8722938299179077, 0.20883996784687042, 0.5553132891654968, -0.09809242933988571, 0.2669143080711365,...
loop to assign the name/class to each object. The problem is with the proper syntax to input the name/class paring, something similar to the following: ``` var object.@name:object.@class = new object.@class(); ``` Am I off my rocker with this or just temporarily ignorant???\*\* Just a quick follow up, there's a quit...
[ 0.2156725525856018, -0.2158188819885254, -0.0030626775696873665, 0.14659041166305542, -0.24428848922252655, -0.18012824654579163, 0.11951075494289398, -0.0062035429291427135, -0.17453745007514954, -0.4112015664577484, 0.13808085024356842, 0.2500637471675873, -0.6397590041160583, 0.19511677...
the display list : addChild(instance).name = @xml.name; ```
[ 0.03135735169053078, 0.4104396402835846, 0.21743282675743103, -0.16852732002735138, -0.21469402313232422, 0.11463887244462967, -0.001365574891678989, 0.12335970997810364, -0.03838285431265831, -0.6561758518218994, -0.23553816974163055, 0.38269585371017456, -0.29608049988746643, 0.367612600...
How do I convert from excel serial date to a .NET date time? For example 39938 is 05/05/2009. Where 39938 is the number of days since 1/1/1900? **In that case, use the framework library function [`DateTime.FromOADate()`](http://msdn.microsoft.com/en-us/library/system.datetime.fromoadate.aspx) .** This function [en...
[ 0.04414929449558258, -0.052105266600847244, 0.6422553658485413, -0.26467156410217285, -0.08262345939874649, 0.09534312784671783, -0.04004868492484093, -0.11361251026391983, -0.4116843342781067, -0.5305505990982056, -0.021894996985793114, 0.1370195746421814, -0.06419125944375992, 0.52024072...
' Excel/Lotus 2/29/1900 bug Return New DateTime(1899, 12, 31).AddDays(SerialDate) End Function ``` --- **[Update]:** Hmm... A quick test of that shows it's actually two days off. Not sure where the difference is. Okay: problem fixed now. See the comments for details.
[ 0.29030144214630127, 0.04572732001543045, 0.4065118134021759, -0.1617618352174759, -0.06948030740022659, -0.0562126450240612, 0.04664073884487152, 0.19073157012462616, -0.4019545614719391, -0.3819890022277832, 0.10843098908662796, 0.378078430891037, -0.18735523521900177, 0.384584903717041,...
I am printing a Swing component that contains text. The Swing component renders the text just fine on the screen, but, when I print it (to a .tif file), the characters are all smashed together. Why is this? Run this code to see what I mean: ``` import javax.swing.*; import javax.swing.text.MutableAttributeSet; import...
[ 0.48914167284965515, 0.3974936604499817, 0.7240732312202454, -0.34938520193099976, 0.07392823696136475, 0.3150167167186737, 0.44907331466674805, -0.25618815422058105, -0.1303490847349167, -0.8924363255500793, -0.2574976980686188, 0.5440952181816101, -0.3347634971141815, 0.03898819535970688...
+ '\n' + WORDS + '\n' + WORDS + '\n' + WORDS; public static void main(String[] args) { new PrintingDemo2(); } public PrintingDemo2() { textPane = new JTextPane(); textPane.setText(TEXT); final StyledDocument document = textPane.getStyledDocument(); String[] fontFam...
[ 0.002539027249440551, -0.08041656017303467, 0.6731986403465271, -0.12758967280387878, 0.09286841750144958, 0.5513126254081726, 0.3428889214992523, -0.10731580853462219, -0.10909843444824219, -0.5236907005310059, -0.7405315637588501, 0.49225130677223206, -0.2963198125362396, 0.3128545284271...
i = 0; i < fontFamilies.length; i++) { final MutableAttributeSet attributeSet = new SimpleAttributeSet(); StyleConstants.setFontFamily(attributeSet, fontFamilies[i]); StyleConstants.setFontSize(attributeSet, 14); document.setParagraphAttributes(i * 22, 21, attributeSet, t...
[ -0.07695924490690231, -0.1702486276626587, 0.9948828220367432, -0.41989925503730774, 0.01338387094438076, 0.4113209843635559, 0.5772631764411926, -0.8294436931610107, -0.04516806825995445, -0.5705750584602356, -0.4983057975769043, 0.5378255844116211, -0.40820473432540894, -0.00312792533077...
public void actionPerformed(ActionEvent e) { final PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(PrintingDemo2.this); try { job.print();
[ 0.29832011461257935, -0.3165983557701111, 0.6428661346435547, -0.3468076288700104, 0.3332846462726593, 0.3384230434894562, 0.3481450080871582, -0.34519219398498535, -0.2986452877521515, -0.4075481593608856, -0.3388434946537018, 0.5702863931655884, -0.5137287974357605, 0.13689781725406647, ...
} catch (PrinterException ex) { throw new RuntimeException("Printing Failed.", ex); } } }); final JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final Container contentPane
[ 0.0510205440223217, -0.2562984228134155, 0.9615715742111206, -0.316074937582016, 0.19482845067977905, 0.13225243985652924, 0.03954943269491196, -0.22378093004226685, -0.0779278576374054, -0.5515154600143433, -0.3864830434322357, 0.142349973320961, -0.2753311097621918, 0.42313799262046814, ...
= frame.getContentPane(); contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS)); contentPane.add(printContextButton); contentPane.add(new JScrollPane(textPane)); frame.setSize(400, 200); SwingUtilities.invokeLater(new Runnable() { public void run() { ...
[ 0.5029703974723816, -0.3542027473449707, 0.7762752771377563, -0.25350871682167053, 0.2568061649799347, 0.1588669866323471, 0.4052022099494934, -0.6321597695350647, -0.29181089997291565, -0.44439271092414856, -0.5391644835472107, 0.3668169379234314, -0.5489634275436401, 0.11467943340539932,...
} public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if (pageIndex >= 1) return Printable.NO_SUCH_PAGE; RepaintManager mgr = RepaintManager.currentManager(textPane); mgr.setDoubleBufferingEnabled(false); final Graphics2D graphics2D =...
[ 0.026010192930698395, 0.010609946213662624, 0.8475291132926941, -0.2612200081348419, -0.07345188409090042, 0.10892809182405472, 0.37195006012916565, -0.37680187821388245, -0.20156221091747284, -0.8509739637374878, -0.4014885425567627, 0.839264988899231, -0.3425212800502777, 0.1529417634010...