text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
the application checks a manifest and downloads updated binaries, which worked great in development, but not so much when the app was installed. Vista refuses to to let me copy files to Program Files. After that, I tried downloading an updated .msi, which works except that the MSI has a UAC prompt -- no go if the user ... | [
0.2869723439216614,
0.1641857922077179,
0.3274865746498108,
0.1400039792060852,
0.12042102962732315,
-0.2307482808828354,
0.4681878387928009,
0.10595628619194031,
-0.15850216150283813,
-0.843285083770752,
-0.09566360712051392,
0.6140604615211487,
-0.3274082839488983,
0.06624434888362885,
... | |
Will that work for an account without admin rights? Can anyone vouch for this method before I start writing more code?
You do just need to make sure that you're 'installing' (i.e. copying to) a location which non-privileged users have access to.
There's nothing magic about Program Files except that a non-privileged us... | [
0.7420136332511902,
-0.07026872783899307,
0.48082685470581055,
0.2612112760543823,
0.42263951897621155,
-0.5297777056694031,
0.26111936569213867,
0.0034200740046799183,
-0.04543164744973183,
-0.5599541664123535,
0.07683252543210983,
0.5715420842170715,
-0.140152707695961,
0.070474579930305... | |
install location and the primitive installer - if you're going to be doing xcopy to somewhere weird anyway, then you already have much of what's already icky about ClickOnce, without any of the advantages. | [
0.806949257850647,
0.04052216559648514,
0.4208875894546509,
0.35125187039375305,
0.36058294773101807,
-0.4192947447299957,
-0.26642656326293945,
0.19382867217063904,
-0.03837975487112999,
-0.5873772501945496,
0.02357466146349907,
0.6717994809150696,
-0.012139503844082355,
0.038543324917554... | |
I have a value stored in a DB correlating to a monetary amount, say 10.0. I also have access to the Currency/CurrencyCode. How can I use NumberFormat/DecimalFormat/(other?) to format when I don't know the Locale? According to the docs it will pick a default locale which won't work with a foreign Currency.
The correct b... | [
0.46049779653549194,
0.1690095067024231,
0.5574390888214111,
0.13245165348052979,
0.043486036360263824,
0.17980928719043732,
0.018023155629634857,
0.005299667362123728,
-0.031076833605766296,
-0.7253249883651733,
0.13207466900348663,
0.20434242486953735,
0.17169956862926483,
0.234554931521... | |
to obtain the proper a locale.
The reasoning is this:
An English-US user will understand € 10,000,000.15 but not the suitable-for-Germany equivalent, € 10.000.000,15
The currency itself doesn't contain enough information to infer a suitable locale, anyway. | [
0.16956421732902527,
0.05181175842881203,
0.5243989825248718,
0.06224382668733597,
0.2221994698047638,
-0.03512931987643242,
0.3761751353740692,
0.11386167258024216,
0.09305185824632645,
-0.12644660472869873,
-0.2910606265068054,
-0.008710448630154133,
0.18245351314544678,
-0.1386435478925... | |
Is there a way to minimize to tray in PyQt4? I've already worked with the QSystemTrayIcon class, but now I would like to minimize or "hide" my app window, and show only the tray icon.
Has anybody done this? Any direction would be appreciated.
Using Python 2.5.4 and PyQt4 on Window XP Pro
It's pretty straightforward o... | [
0.38955220580101013,
-0.04575232416391373,
0.11024858802556992,
-0.11097052693367004,
-0.11474362760782242,
-0.10790862143039703,
0.3954116404056549,
-0.055969543755054474,
-0.012922925874590874,
-0.6428982615470886,
0.5212616920471191,
0.7320759892463684,
-0.6190832853317261,
-0.350601404... | |
setVisible(false) on your window
4. Catch a click/double-click/menu item on your system tray icon
5. In your system tray icon event handler, call show() or setVisible(true) on your window, and optionally hide your tray icon. | [
0.4845923185348511,
-0.35418736934661865,
0.47024670243263245,
0.034169044345617294,
0.21854859590530396,
-0.05424986034631729,
0.20423948764801025,
-0.1256318837404251,
-0.18262137472629547,
-0.46238917112350464,
-0.4712340831756592,
0.583805501461029,
-0.2790634334087372,
-0.185078248381... | |
When I orient column headers at 45º I have to manually resize each column since Auto-Fit won't let the oriented text overlap with the neighboring cell.
Is there a way to programatically (with VBA) auto-fit the columns where they'll overlap? I'd like a solution which takes font size into account too.
AutoFit only works... | [
0.20614074170589447,
-0.015725722536444664,
0.8532236218452454,
-0.2528931200504303,
0.02020372450351715,
0.08620382100343704,
0.13257044553756714,
-0.5682616829872131,
-0.21105824410915375,
-0.39372438192367554,
0.1824982911348343,
0.716543436050415,
-0.4151344299316406,
-0.62011140584945... | |
So I want a way to set up events so that I can pass data without creating closures \ memory leaks. This is as far as I have got:
```
package com.events {
import flash.events.Event;
public class CustomEvent extends Event {
public static const REMOVED_FROM_STAGE:String = "removedFromStage";
publ... | [
0.14470094442367554,
-0.3537983000278473,
0.4123882055282593,
-0.33391833305358887,
0.22221070528030396,
0.2396964281797409,
0.2435702383518219,
-0.2488294094800949,
-0.3444914221763611,
-0.3657737672328949,
-0.30086031556129456,
0.7901506423950195,
-0.36505380272865295,
0.0267249681055545... | |
this.data = customData;
}
public override function clone():Event {
return new CustomEvent(type, data, bubbles, cancelable);
}
public override function toString():String {
return formatToString("CustomEvent", "type", "data", "bubbles", "cancelable", "eventPhase")... | [
0.1582886427640915,
-0.4658082127571106,
0.5225914120674133,
-0.18430563807487488,
0.47760218381881714,
0.02992839366197586,
0.11670128256082535,
-0.37620553374290466,
-0.2752103805541992,
-0.4902369976043701,
-0.30882197618484497,
0.8142011761665344,
-0.03628542274236679,
0.12907102704048... | |
following behavior:
```
function testme(e:Event) {
trace(e);
}
test_mc.addEventListener(CustomEvent.REMOVED_FROM_STAGE, testme);
test_mc.dispatchEvent(new CustomEvent(CustomEvent.REMOVED_FROM_STAGE, 42));
//Traces [CustomEvent type="removedFromStage" data=42 bubbles=false cancelable=false eventPhase=2]
removeChi... | [
0.4297013282775879,
-0.12568698823451996,
0.21097177267074585,
-0.15599767863750458,
0.3235448896884918,
-0.016134724020957947,
0.2966356575489044,
-0.6444320678710938,
-0.13724108040332794,
-0.48724696040153503,
0.036956727504730225,
0.6803683042526245,
-0.4406324028968811,
-0.05543552339... | |
that (or any other class you want to do this with). In this example I'll override URLLoader with this functionality (because Loader actually dispatches events from it's contentLoaderInfo, which needs two overridden classes, and I just want to keep it simple)
```
package com.net
{
import flash.net.URLLoader;
i... | [
0.20407536625862122,
-0.4963251054286957,
0.1894528567790985,
0.005052829161286354,
0.0016143476823344827,
0.0863540843129158,
0.14903675019741058,
-0.33189043402671814,
-0.34163588285446167,
-0.36844345927238464,
-0.335688978433609,
0.8648330569267273,
-0.5058935880661011,
-0.024968631565... | |
override public function dispatchEvent(event: Event) : Boolean
{
var customEvent: CustomEvent = new CustomEvent(event.type, extraData, event.bubbles, event.cancelable);
return super.dispatchEvent(customEvent);
}
}
}
```
Now to use this with your CustomEvent class try this c... | [
0.15745225548744202,
-0.4150503873825073,
0.44666850566864014,
-0.020502416417002678,
0.2772125005722046,
0.12498831003904343,
0.17653365433216095,
-0.40648630261421204,
-0.3826654851436615,
-0.3271082639694214,
-0.3385230302810669,
0.9090020060539246,
-0.4253543019294739,
0.12133262306451... | |
Custom data on your innately dispatched events! | [
0.43024587631225586,
-0.27502474188804626,
0.09531286358833313,
0.6877601146697998,
0.10645276308059692,
-0.17530107498168945,
0.06310423463582993,
0.23812666535377502,
-0.38793522119522095,
-0.3993903398513794,
-0.006473942659795284,
0.3335173726081848,
-0.3126893937587738,
0.109936736524... | |
It seems fairly common today for websites to perform some address verification behind the scenes. For example, the 4 digit extension on zip codes is commonly filled in. In addition to filling in the 4 digit zip code extension, I would like to know what county the address belongs to.
This will be utilized in an ASP.NET... | [
0.6058849096298218,
-0.27238282561302185,
0.4208834767341614,
0.24103648960590363,
0.24717000126838684,
-0.16225402057170868,
0.16744187474250793,
-0.25296494364738464,
-0.34139955043792725,
-0.5347851514816284,
0.16141894459724426,
0.32987821102142334,
0.14444705843925476,
-0.096912518143... | |
asked on SO before: [here](https://stackoverflow.com/questions/682093/address-validation-api). | [
0.2704831659793854,
-0.05543215572834015,
0.37946420907974243,
0.14514034986495972,
0.09031660109758377,
0.01332597341388464,
0.1199909895658493,
-0.5132980942726135,
-0.43501371145248413,
-0.0527598038315773,
-0.13200725615024567,
0.295622318983078,
0.03789523243904114,
-0.070257410407066... | |
im looking to write a daemon that:
* reads a message from a queue (sqs, rabbit-mq, whatever ...) containing a path to a zip file
* updates a record in the database saying something like "this job is processing"
* reads the aforementioned archive's contents and inserts a row into a database w/ information culled from f... | [
0.5061711072921753,
-0.04607485979795456,
0.43340057134628296,
-0.20747220516204834,
-0.05827965959906578,
0.04729445278644562,
0.3196808099746704,
-0.17459841072559357,
-0.044249169528484344,
-0.7129690647125244,
-0.24832746386528015,
0.11861623078584671,
-0.6032032370567322,
0.2108027040... | |
frontend. the uploader doesn't need to immediately see the results, but the upload be processed in the background fairly expediently.
im fluent with python, so the very first thing that comes to mind is writing a simple server with twisted to handle each request and carry out the process mentioned above. but, ive neve... | [
0.3404853641986847,
0.10551310330629349,
0.502452552318573,
-0.03757646679878235,
-0.3529868423938751,
-0.06874805688858032,
0.22205649316310883,
0.18432573974132538,
-0.10646801441907883,
-0.4893524646759033,
0.05897181108593941,
0.5407093167304993,
-0.23148751258850098,
0.035512037575244... | |
dealing with issues like blocking.
how have people solved this in the past? what are some other approaches i could take?
thanks in advance for any help and discussion!
Okay-while I was Googling to make sure I had covered my bases I came across a solution:
I find that I forget to think in Lists and Dictionaries even... | [
0.06966570019721985,
-0.07846465706825256,
0.15615421533584595,
0.20490504801273346,
-0.30045852065086365,
0.024680206552147865,
0.454860121011734,
-0.12178883701562881,
-0.336589515209198,
-0.8022968769073486,
-0.11493291705846786,
0.38856208324432373,
-0.308037668466568,
-0.2981526553630... | |
if '008 ' in item])
```
where tempans is the datalist
now I can write
```
for line in tempans[beginPosit:endPosit]:
process each line
```
I think I answered my own question. I learned alot from the other answers and appreciate them but I think this is what I needed
Okay I am going to further edit my answer. I... | [
0.0006246675620786846,
-0.052925869822502136,
0.5109966397285461,
0.05623164400458336,
-0.33481118083000183,
0.07522951066493988,
0.19235651195049286,
-0.30334848165512085,
0.09849327802658081,
-0.6116250157356262,
-0.05661753565073013,
0.36304032802581787,
-0.2920352816581726,
-0.19923350... | |
is based on an earlier answer to a similar question and [Steven Huwig's](https://stackoverflow.com/questions/337223/python-item-for-item-until-stopterm-in-item#337285) answer | [
-0.25808200240135193,
-0.007969305850565434,
0.1563127189874649,
0.18008235096931458,
0.09941133856773376,
0.23226523399353027,
0.1376720666885376,
-0.5322408080101013,
-0.3979398310184479,
0.15741872787475586,
-0.44431912899017334,
0.08410737663507462,
-0.21139021217823029,
-0.01488867960... | |
I have a variable that needs the first four lines stripped out before being displayed:
```
Error Report Submission
From: First Last, email@example.com, 12345
Date: 2009-04-16 04:33:31 pm Eastern
The content to be output starts here and can go on for any number of lines.
```
I need to remove the 'header' from this d... | [
0.2594141960144043,
0.1571364402770996,
0.638658881187439,
-0.16876615583896637,
-0.11571582406759262,
0.2047264575958252,
0.35414189100265503,
0.19417104125022888,
-0.5697295665740967,
-0.40343987941741943,
-0.16355279088020325,
0.41763800382614136,
-0.30167195200920105,
0.303525149822235... | |
array_slice(explode("\n", $str), $lines));
}
$str = str_chop_lines($str);
```
**EDIT**: Thinking about it some more, I wouldn't recommend using the `str_chop_lines` function unless you plan on doing this in many parts of your application. The original one-liner is clear enough, I think, and anyone stumbling upon `st... | [
0.30167675018310547,
-0.17839539051055908,
0.3091835677623749,
-0.4555572271347046,
0.043056290596723557,
-0.06347405165433884,
0.2781529128551483,
-0.06753998249769211,
-0.400809109210968,
-0.4017253518104553,
-0.308723509311676,
0.7773165106773376,
-0.3934490382671356,
-0.203466594219207... | |
I am coding up a program for automated testing which randomly clicks an open application window using various User32.dll library calls. My current problem is this, if a click would open a dialog, using Process.WaitForInputIdle() does not wait long enough for that dialog to be detected the next trip around the loop, whi... | [
0.5690475702285767,
0.12416139990091324,
0.07481556385755539,
-0.04002154618501663,
0.0101766437292099,
0.07123543322086334,
0.1103517934679985,
-0.14021815359592438,
-0.31231585144996643,
-0.7329626083374023,
0.33803918957710266,
0.2661140561103821,
-0.38320717215538025,
0.435238957405090... | |
or thread to finish all processing and only be waiting in the message loop again?
I hope that made sense.
Cheers
Ross
EDIT
Failing this, would it be somehow possible to set the process / threads of the target program and my program to both use the same processor and adjust the prioritorys of each so that the targe... | [
0.3118208944797516,
-0.0666058138012886,
0.5060041546821594,
0.037474777549505234,
-0.10633492469787598,
-0.10782279819250107,
0.2163671851158142,
-0.1626482605934143,
-0.346905916929245,
-0.7049078345298767,
0.04655603691935539,
0.6611376404762268,
-0.17296601831912994,
0.0690365955233573... | |
under where you want to click (using WindowFromPoint) and convert the mouse coordinates from screen to client coords using ScreenToClient. Pack the coordinates into the lParam parameter by using ((pt.Y << 16) + pt.X). This will block until processed and so any modal dialogs shown will block this call. | [
0.13760419189929962,
-0.24293476343154907,
0.6914337873458862,
-0.06435537338256836,
0.4338391125202179,
0.003223218023777008,
0.028800349682569504,
-0.0982627123594284,
-0.18406160175800323,
-0.8651233315467834,
-0.028090868145227432,
0.6717786192893982,
-0.4704175293445587,
0.08316234499... | |
I am working on building some pseudo-intelligent caching into a [LINQ query provider](http://msdn.microsoft.com/en-us/library/system.linq.iqueryprovider.aspx). What I'd like to do (ideally) is use the expression tree of a given query as the cache key in some scenarios. However, I don't want to store the entire object g... | [
0.09910834580659866,
0.17427374422550201,
0.07894039899110794,
0.21484006941318512,
0.015083429403603077,
-0.0419868603348732,
0.1476568579673767,
-0.008656449615955353,
0.04093959555029869,
-0.5772751569747925,
0.05345427244901657,
0.46814173460006714,
-0.08735762536525726,
0.005854882299... | |
that if all you want is to evaluate equivalency of a key. | [
0.20726753771305084,
0.11759552359580994,
-0.168214812874794,
0.26287442445755005,
0.13867613673210144,
-0.20514407753944397,
-0.0656864196062088,
-0.47026923298835754,
0.016564086079597473,
-0.1998576670885086,
0.029722582548856735,
0.6663520932197571,
0.2737799286842346,
-0.0839267894625... | |
What's the most practical way to add custom properties to a side wide ViewDataDictionary?
Let's assume a simple case:
```
public ActionResult Index()
{
// ViewData["Title"] = "Home";
ViewData.Title = "Home";
return View();
}
```
The first thing that comes to mind is a custom class and using "new" in a applica... | [
0.2143574357032776,
-0.2915358245372772,
0.726753830909729,
0.008322255685925484,
0.10857371240854263,
-0.0929301530122757,
0.05267367139458656,
-0.5711805820465088,
-0.38340330123901367,
-0.6100558042526245,
-0.13874270021915436,
0.7539030313491821,
-0.2069355696439743,
0.3766794502735138... | |
the views as well.
The second thing that comes to mind is to create a ViewDataDictionaryExtensions class.
Thirdly, use a "View Model". My beef with View Models are that always creating one and passing it into View seems like repeating yourself over and over in controller code, at least compared to the previous two op... | [
0.17770260572433472,
-0.012842485681176186,
0.38346344232559204,
0.3005088269710541,
-0.12786339223384857,
0.13894645869731903,
0.054232291877269745,
0.1474822610616684,
-0.13952793180942535,
-0.48955023288726807,
0.14108331501483917,
0.6877532601356506,
-0.11082244664430618,
0.21250669658... | |
one to know what data to set. Plus, keys can easily be misspelled.
All three methods get the job done. What have others done?
No, you can't, and no, the compiler can't figure it out. This is why FindBugs always suggests changing anonymous inner classes to named `static` nested classes if they don't use their implicit ... | [
-0.010984927415847778,
-0.15693674981594086,
-0.0605199858546257,
0.002963118953630328,
0.029321987181901932,
-0.4240666627883911,
0.4233977794647217,
-0.044235166162252426,
-0.193083256483078,
-0.5653382539749146,
-0.15821941196918488,
0.4437471032142639,
-0.45822614431381226,
0.035408336... | |
an inner class (§8.1.3); it is never `static` (§8.1.1, §8.5.1). An anonymous class is always implicitly `final` (§8.1.1.2).
Roedy Green's Java Glossary [says that](http://mindprod.com/jgloss/anonymousclasses.html) the fact that anonymous classes are allowed in a static context is implementation-dependent:
> If you wa... | [
-0.1513713002204895,
-0.12494945526123047,
0.16635407507419586,
-0.17969918251037598,
-0.13954775035381317,
-0.1875528246164322,
0.8102433085441589,
0.035498835146427155,
-0.23898862302303314,
-0.4327714443206787,
-0.3869818449020386,
0.452562153339386,
-0.42124685645103455,
0.091735497117... | |
2:** The JLS actually covers static contexts more explicitly in [§15.9.2](http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.9.2):
> Let *C* be the class being instantiated, and let *i* be the instance being created. If *C* is an inner class then *i* may have an immediately enclosing instance. The imm... | [
-0.14111536741256714,
-0.06057677045464516,
0.14532990753650665,
-0.24261172115802765,
-0.15000586211681366,
-0.2868732511997223,
0.16349667310714722,
-0.10645347088575363,
-0.0762355625629425,
-0.5679488182067871,
-0.6349918842315674,
0.20694927871227264,
-0.4128446877002716,
-0.111605741... | |
equivalent to a `static` nested class in that it does not keep a reference to the enclosing class, even though it's technically not a `static` class. | [
0.08663845807313919,
0.04306543990969658,
-0.2738894820213318,
-0.008269148878753185,
-0.19591611623764038,
-0.35271981358528137,
0.12367188185453415,
0.23894746601581573,
-0.03158789128065109,
-0.22356495261192322,
-0.3755287528038025,
0.20814259350299835,
-0.42747747898101807,
0.30165049... | |
Grettings!
I have some XML that looks like this:
```
<Root>
<SectionA>
<Item id="111">
<Options>
<Option val="a" cat="zzz">
<Package value="apple" />
<Feature value="avacado" /> | [
-0.25997304916381836,
-0.0036422715056687593,
0.4630865454673767,
-0.10948074609041214,
-0.0726630911231041,
0.2801254093647003,
-0.11186428368091583,
0.11377980560064316,
-0.1382061392068863,
-0.5510694980621338,
0.030697941780090332,
0.43652620911598206,
-0.2797175943851471,
-0.184152662... | |
</Option>
<Option val="b" cat="yyy">
<Package value="banana" />
<Feature value="blueberry" />
</Option> | [
-0.19917207956314087,
-0.6292787194252014,
-0.08953700959682465,
-0.15241338312625885,
0.2359289973974228,
0.6148431897163391,
0.05215013399720192,
0.32608601450920105,
-0.4416559636592865,
-0.2797544002532959,
-0.6224114298820496,
0.5750359296798706,
-0.010976828634738922,
0.0092119649052... | |
</Options>
</Item>
<Item id="222">
<Options>
<Option val="c" cat="xxx">
<Package value="carrot" />
<Feature value="cucumber" /> | [
-0.1504630148410797,
-0.5936773419380188,
0.08690635114908218,
0.11053167283535004,
0.032199155539274216,
0.8231914043426514,
-0.36245885491371155,
0.05060124769806862,
-0.17352798581123352,
-0.3820739686489105,
-0.11288642883300781,
0.471820205450058,
0.1007947102189064,
-0.17851075530052... | |
</Option>
<Option val="d" cat="www">
<Package value="dairy" />
<Feature value="durom" />
</Option>
</Options> | [
0.2697943449020386,
-0.6834174394607544,
0.08399025350809097,
-0.25242796540260315,
0.34568867087364197,
0.6736606955528259,
-0.25650274753570557,
-0.027510637417435646,
-0.17493735253810883,
-0.47487518191337585,
-0.2859528660774231,
1.0079392194747925,
0.2833273410797119,
0.1322172433137... | |
</Item>
</SectionA>
<SectionB>
.
.
.
</SectionB>
</Root>
```
I'd like to get the PACKAGE and FEATURE values based on the ID attribute of ITEM being "111" and the VAL attribute of OPTION being "a".
I'm not sure where to start. I'm able to select the ITEM node using a where, but I'm not sure ho... | [
-0.07308194786310196,
0.0023320228792726994,
0.3279058337211609,
-0.1969214826822281,
0.1915367692708969,
0.44114452600479126,
0.03395466506481171,
-0.30966290831565857,
-0.2003738433122635,
-0.8608497381210327,
-0.24980196356773376,
0.38982900977134705,
-0.226869136095047,
0.0461226738989... | |
where item.Attribute("id").Value == "111"
from option in item.Descendants("Option")
where option.Attribute("val").Value == "a"
let package = option.Element("Package").Attribute("value")
let feature = option.Element("Feature").Attribute("value")
select new { Pa... | [
-0.043984636664390564,
-0.6530061364173889,
0.41207411885261536,
-0.5150724053382874,
0.3006802499294281,
0.3836391866207123,
-0.05129798501729965,
-0.447733074426651,
-0.3075532913208008,
-0.5773253440856934,
-0.5800013542175293,
0.8894509673118591,
-0.16692712903022766,
-0.09147303551435... | |
= "apple"
```
You can omit the `let` parts if you want, they are only to make the anonymous type thinner.
```
var items = from item in doc.Descendants("Item")
where item.Attribute("id").Value == "111"
from option in item.Descendants("Option")
where option.Attribute("val").Value ==... | [
0.07831129431724548,
-0.0162429790943861,
0.3955043852329254,
-0.35704562067985535,
0.515667736530304,
0.63138747215271,
0.10762526839971542,
-0.25269562005996704,
-0.267259806394577,
-0.6088801026344299,
-0.39675062894821167,
0.5293117165565491,
-0.13244019448757172,
0.10094104707241058,
... | |
Package = option.Element("Package").Attribute("value").Value,
Feature = option.Element("Feature").Attribute("value").Value
};
```
Actually, I kind of like the second one more.
---
And the non query Linq style.
```
var items = doc.Descendants("Item")
.Where(item => item.Att... | [
-0.1903163492679596,
-0.1940574198961258,
0.2178189605474472,
-0.4219696819782257,
0.20134314894676208,
0.20335866510868073,
0.013150325044989586,
-0.40555569529533386,
-0.25765547156333923,
-0.4768252372741699,
-0.45081859827041626,
0.739325225353241,
-0.24875886738300323,
0.0237507894635... | |
.Where(option => option.Attribute("val").Value == "a")
.Select(option => new
{
Package = option.Element("Package").Attribute("value").Value,
Feature = option.Element("Feature").Attribute("value").Value
});
``` | [
-0.05208783969283104,
-0.5690301060676575,
0.3846559226512909,
-0.3690456449985504,
0.45182377099990845,
-0.05487551912665367,
0.08829760551452637,
-0.15023525059223175,
-0.2404516637325287,
-0.6174818873405457,
-0.6908934712409973,
0.9448239803314209,
-0.32547929883003235,
0.0929383486509... | |
If I have this perl app:
```
print `someshellscript.sh`;
```
that prints bunch of stuff and takes a long time to complete, how can I print that output in the middle of execution of the shell script?
Looks like Perl will only print the someshellscript.sh result when it completes, is there a way to make output flush... | [
0.32477208971977234,
-0.07885392010211945,
0.6068964004516602,
-0.12200000882148743,
-0.1728811115026474,
-0.042315997183322906,
0.07973334938287735,
0.012393146753311157,
0.02708829566836357,
-0.44448670744895935,
0.042543843388557434,
0.5769438147544861,
-0.18916213512420654,
0.003565784... | |
the [open](http://perldoc.perl.org/functions/open.html) documentation page for more information. | [
0.18527978658676147,
-0.18353813886642456,
0.4860796332359314,
0.16706031560897827,
-0.11775589734315872,
-0.1327795386314392,
-0.1171111986041069,
0.23226723074913025,
-0.6450437903404236,
-0.17387591302394867,
-0.5392301082611084,
0.23138858377933502,
-0.0025522238574922085,
0.3076280951... | |
I have a Repeater with an ASP.NET AJAX 1.0 UpdatePanel inside it. There are buttons outside of the UpdatePanel but still in the repeater. When a section inside the UpdatePanel appears (it's a hidden Panel control that appears when user answers a question a certain way), the buttons at the bottom disappear.
Here is an... | [
-0.030674923211336136,
-0.032225530594587326,
0.402423232793808,
-0.03728143125772476,
-0.1767067164182663,
-0.09562329947948456,
0.19273725152015686,
0.2269728183746338,
-0.13050925731658936,
-0.8500891923904419,
0.17088699340820312,
0.32346877455711365,
-0.15736356377601624,
-0.028958382... | |
[Button]
[/TABLE]
[/REPEATER]
```
If I move the table to the top of the page, the content does not disappear, so I suspect it is a style issue, where the controls are actually there, but are underneath the content of the UpdatePanel. I've tried adding a <br clear="all"/> to just before the table, to no avail.
Any ... | [
0.058673176914453506,
-0.00041748571675270796,
0.6802232265472412,
0.05830344930291176,
0.23292319476604462,
-0.30777227878570557,
0.1858711987733841,
0.03750908374786377,
-0.3135804533958435,
-0.5120691657066345,
-0.2526283860206604,
0.6651173830032349,
-0.543475866317749,
-0.142109587788... | |
to do a View Generated Source after the update has occurred or inspect the elements with Firebug. If the table html is still on the page, then it could be either a style issue or an issue with malformed HTML in the panel causing the table not to render properly. If the table html is missing, then it is being removed fr... | [
0.23419052362442017,
-0.08424389362335205,
0.34088239073753357,
0.21545420587062836,
-0.11752399057149887,
-0.37265530228614807,
0.3616761863231659,
-0.15643423795700073,
-0.2186674177646637,
-0.5617440342903137,
-0.28990399837493896,
0.8857799172401428,
-0.14900179207324982,
0.12373860180... | |
after the update in your question would also be helpful if you still can't figure things out and want more input. | [
0.5337452292442322,
-0.15753281116485596,
0.054904721677303314,
0.4749331474304199,
0.0729798823595047,
-0.18311826884746552,
0.15990765392780304,
0.35258811712265015,
0.02350606769323349,
-0.4081788957118988,
0.28039249777793884,
0.15771669149398804,
0.4358798861503601,
-0.074941463768482... | |
How do you include a javascript or CSS file only on a certain article in Joomla?
I have one article which requires the jQuery UI and associated theme. Since this isn't being used on any other pages, I only want it for this particular article. Adding in the necessary `<script>` and `<link rel="stylesheet">` tags in the... | [
0.5447940826416016,
0.12826943397521973,
0.20596395432949066,
0.044839438050985336,
-0.1911066770553589,
-0.40465980768203735,
-0.016494035720825195,
0.14207109808921814,
-0.3221578896045685,
-0.5024981498718262,
-0.08350732177495956,
0.1665543019771576,
-0.1694623976945877,
-0.23378352820... | |
maintain; I may release the code for it, but it's pretty simple to explain. You build a content plugin that searches for tags like `{css path/to/a/css/file.css}`, strips them out, then adds the files to the HTML `<head>`. Once you have the name of the CSS or JS file you want to include, here is the code you use to get ... | [
0.6937762498855591,
0.0890890583395958,
0.7376034259796143,
0.10169605910778046,
0.1498037725687027,
-0.3891047537326813,
0.2978632152080536,
-0.22620534896850586,
-0.08595602214336395,
-0.6307373642921448,
-0.34617364406585693,
0.6672101616859436,
-0.2822549343109131,
-0.04663216695189476... | |
I've just designed a large database by playing around in MS Access. Now that I'm happy with the design, I need to be able to generate this same database (tables, relationships, etc.) from code.
Rather than hand-writing the SQL CREATE statements (which will be long, tedious, and error-prone process), I was wondering wh... | [
0.5106764435768127,
0.15907876193523407,
-0.08670911937952042,
0.22424502670764923,
0.2525283098220825,
-0.13483214378356934,
0.08492949604988098,
0.21956025063991547,
-0.3302800953388214,
-0.5314654111862183,
0.30337461829185486,
0.49693775177001953,
-0.18379850685596466,
0.22733953595161... | |
MS Access, either through the GUI, or programmatically?
For free for 30 days (then $30) you can give [DBWScript](http://dbweigher.com/dbwscript.php) a go, looks like its what you are asking for, although not in native Access GUI or programmatically | [
-0.0936182513833046,
-0.14981558918952942,
0.5808358788490295,
0.36298245191574097,
0.11215383559465408,
0.052852924913167953,
0.30583810806274414,
0.2034064531326294,
-0.1834488809108734,
-0.5948825478553772,
-0.254102885723114,
0.5391411185264587,
-0.1240226998925209,
-0.0307087078690528... | |
When does using pointers in any language require someone to use more than one, let's say a triple pointer. When does it make sense to use a triple pointer instead of just using a regular pointer?
For example:
```
char * * *ptr;
```
instead of
```
char *ptr;
```
each star should be read as "which pointed to by a ... | [
-0.09885051846504211,
0.1600634902715683,
0.21188859641551971,
-0.17451411485671997,
-0.22743640840053558,
-0.08451413363218307,
0.21740852296352386,
-0.017192792147397995,
-0.21134455502033234,
-0.4588768780231476,
-0.42664647102355957,
0.42258498072624207,
-0.408534973859787,
-0.02471733... | |
At the address pointed to by that is a third pointer. Dereferencing the third pointer results in a char. If that's all there is to it, its hard to make much of a case for that.
Its still possible to get some useful work done, though. Imagine we're writing a substitute for bash, or some other process control program. ... | [
0.1258574277162552,
0.3203495740890503,
0.23005865514278412,
-0.21997079253196716,
0.04590234532952309,
-0.038787923753261566,
0.3932730257511139,
-0.13374245166778564,
-0.19873109459877014,
-0.689034104347229,
-0.12262998521327972,
0.6581422686576843,
-0.45194631814956665,
0.2131184190511... | |
variables passed to the subprocess
...
}
```
But we want to do something fancy. We want to have a way to browse all of the different sets of environment variables as seen by each subprocess. to do that, we gather each set of `env` members from the invocation instances into an array `env_list` and pass it to the f... | [
0.3173431158065796,
0.2466575652360916,
0.5014416575431824,
0.19037188589572906,
0.24288800358772278,
0.05292065814137459,
0.0443098284304142,
0.06402520090341568,
-0.1670256406068802,
-0.6603904962539673,
-0.3417295515537262,
0.5982284545898438,
-0.34675878286361694,
0.22836188971996307,
... | |
Is there a way I can do a sleep in JavaScript before it carries out another action?
Example:
```js
var a = 1 + 3;
// Sleep 3 seconds before the next action here.
var b = a + 4;
```
You can use `setTimeout` to achieve a similar effect:
```
var a = 1 + 3;
var b;
setTimeout(function() {
b = a + 4;
}, (3 * 1000));
... | [
0.479724645614624,
-0.28480425477027893,
0.40418103337287903,
-0.5201268196105957,
0.1241595447063446,
-0.12318850308656693,
0.5320191979408264,
-0.6048269867897034,
-0.24248774349689484,
-0.7691202163696289,
-0.27023419737815857,
0.6447741985321045,
-0.24342495203018188,
-0.36698094010353... | |
freeze everything during the sleep period. | [
0.4264782667160034,
0.5878591537475586,
-0.27682241797447205,
-0.021467013284564018,
-0.06699828058481216,
-0.5483598709106445,
0.46938908100128174,
0.23696112632751465,
0.01745646633207798,
-0.38880518078804016,
-0.5867515206336975,
-0.25605446100234985,
0.05055161193013191,
0.09707781672... | |
For reference I'm using the window superclass method outlined in [this](http://www.ddj.com/184410048) article. The specific issue occurs if I want to handle `WM_NOTIFY` messages (i.e. for custom drawing) from the base control in the superclass I either need to reflect them back from the parent window or set my own wind... | [
0.01798895001411438,
0.14849936962127686,
0.4062046706676483,
-0.12929336726665497,
-0.208623006939888,
-0.13797572255134583,
0.49600380659103394,
-0.07885057479143143,
-0.3087978959083557,
-0.9126091003417969,
0.013082869350910187,
0.4239412546157837,
-0.27231669425964355,
0.4689060747623... | |
them sent to myself from the parent trick above) they always go to the outermost (most derived) WindowProc. I have no way to tell if they're messages intended for the inner superclass (base messages are supposed to go to the first superclass) or messages intended for the outer superclass (messages from the inner superc... | [
0.36918580532073975,
-0.09512575715780258,
0.31295913457870483,
0.3623283803462982,
-0.27687594294548035,
0.2609451115131378,
0.4125029742717743,
0.15125516057014465,
-0.21252647042274475,
-0.7043696641921997,
-0.09247423708438873,
0.16253288090229034,
-0.10383786261081696,
0.3017356097698... | |
It's a difficult concept to explain. Here's a diagram.
single superclass:
```
SuperA::WindowProc() -> Base::WindowProc()---\
^--------WM_NOTIFY(Base)--------/
```
superclass of a superclass:
```
SuperB::WindowProc() -> SuperA::WindowProc() -> Base::WindowProc()---\
^--------WM_NOTIFY(Base)... | [
-0.17657536268234253,
-0.19396521151065826,
0.4965505003929138,
0.023978840559720993,
0.08558736741542816,
-0.0570913627743721,
0.3169461786746979,
-0.055482953786849976,
-0.5719494223594666,
-0.6779170036315918,
-0.5108540058135986,
0.48105761408805847,
-0.4486163556575775,
-0.01681189239... | |
to get answers if you'd abstracted the problem so that it didn't rely on the Neodatis DB interface -- that threw me for a loop, as I've never used it. What I've written below about it is based on a very cursory analysis.
For that matter, I've never used Groovy either, though I like what I've seen of it. But seeing as ... | [
-0.2191605269908905,
-0.18715442717075348,
-0.024829234927892685,
0.2883634865283966,
-0.31676217913627625,
-0.09036166220903397,
0.34365352988243103,
0.19759783148765564,
-0.3456517159938812,
-0.4789004623889923,
0.047146908938884735,
0.5311122536659241,
-0.331861287355423,
0.157779529690... | |
tries to filter the objects before it adds them to the returned collection. I think instead you want to use `org.neodatis.odb.impl.core.query.criteria.CriteriaQuery`. (**Note the "impl" in the package path.** This has me a bit nervous, as I don't know for sure if this class is meant to be used by callers. But I don't s... | [
0.2613851726055145,
-0.156184583902359,
0.2414790689945221,
0.19844035804271698,
-0.16247598826885223,
-0.2798456847667694,
0.17939157783985138,
-0.0511922761797905,
-0.22745104134082794,
-0.671042263507843,
0.11283724755048752,
0.41714146733283997,
-0.6129834651947021,
0.23001790046691895... | |
with closures might look something like this:
```
// Create a class that wraps CriteriaQuery and allows you
// to pass closures. This is wordy too, but at least it's
// reusable.
import org.neodatis.odb.impl.core.query.criteria;
class GroovyCriteriaQuery extends CriteriaQuery {
private final c;
QProspect(... | [
0.050860513001680374,
-0.19732357561588287,
0.43255311250686646,
-0.12685726583003998,
0.02919473685324192,
-0.29609057307243347,
0.3809775710105896,
-0.3698439300060272,
-0.09713128954172134,
-0.3666675388813019,
-0.2715565264225006,
0.6640775799751282,
-0.4142846167087555,
0.358534216880... | |
}
c = theClosure;
}
public boolean match(AbstractObjectInfo aoi){
//!! I'm assuming here that 'aoi' can be used as the actual
//!! object instance (or at least as proxy for it.)
//!! (You may have to extract the actual object from aoi before calling c.)
return c(aoi);
... | [
-0.1795865148305893,
-0.22705458104610443,
0.10898954421281815,
-0.150042325258255,
0.12967030704021454,
-0.25587207078933716,
-0.045206908136606216,
0.04821855574846268,
0.19955867528915405,
-0.3871901035308838,
-0.027374032884836197,
0.708153247833252,
-0.5716134309768677,
-0.00650905165... | |
the query class in some random code.
Objects<Prospect> src = odb.getObjects(
new GroovyCriteriaQuery(
{ it.url.endsWith(".biz") }
)
)
```
I hope this helps! | [
-0.057357583194971085,
0.08938824385404587,
0.5347073674201965,
0.20398953557014465,
0.30435803532600403,
-0.2701485753059387,
0.24506887793540955,
0.10969287902116776,
-0.19170963764190674,
-0.5256132483482361,
-0.1550823152065277,
0.4206046462059021,
-0.05931142345070839,
0.3655644357204... | |
I'm confused on what the best approach is when writing a game for the iphone. The game will be rendered with OpenGL , but im curious when creating the Start Screen, Menu's, High Score page, etc. Do you do all of that with OpenGL or do you create additional UIViews and use the UIKit?
I don't think there is a best approa... | [
-0.024192005395889282,
-0.0006709417793899775,
0.39549893140792847,
0.37621837854385376,
0.15897338092327118,
0.0835886001586914,
-0.05382900685071945,
0.20478065311908722,
-0.16148410737514496,
-0.7235448956489563,
0.1872936487197876,
0.8016924858093262,
-0.12954336404800415,
-0.206950411... | |
menus, high score tables, etc. using standard UIKit views and switch out the OpenGL view while they are shown then this has the advantage that it's very quick to code (esp. if you took the time to learn to use Interface Builder), but it is inherently 2d. Even though you can still use custom button graphics and fonts to... | [
0.033150192350149155,
-0.06605057418346405,
0.6330047249794006,
0.5233591198921204,
-0.2220696657896042,
-0.287250280380249,
0.07395855337381363,
-0.12809522449970245,
-0.10313723236322403,
-0.8288129568099976,
0.09552829712629318,
0.7952480912208557,
-0.07904127240180969,
0.02544220350682... | |
- this will be very slow.
I personally use Interface Builder generated views to get stuff like menus in while I'm building the rest of the program. The intention is to replace that with OpenGL animated code later. In the end though, it's really down to how much time you have available. | [
0.40251582860946655,
0.0946560800075531,
0.34617000818252563,
0.3820399045944214,
-0.2303476482629776,
-0.07451136410236359,
0.18961668014526367,
0.4239776134490967,
-0.08955850452184677,
-0.8735642433166504,
0.20109225809574127,
0.5499046444892883,
0.1990770846605301,
0.15326161682605743,... | |
I am about to code something for a Rails app of mine and didn't want to reinvent the wheel, hence my question:
Do you guys know any Rails Plugin that would allow an application to display notification messages that could be user specific and also allow the user to mark them as "don't show this again"?
My vision is to... | [
0.5862427949905396,
-0.15160728991031647,
0.09192235767841339,
0.0241645909845829,
0.008749541826546192,
-0.4189065396785736,
0.19586338102817535,
0.10636335611343384,
-0.21901772916316986,
-0.44957730174064636,
0.09537460654973984,
0.3197188079357147,
-0.23653364181518555,
0.1925565302371... | |
to be shown again.
Is there anything like that out there? :-)
I found so far this two plugins:
* <http://github.com/jstewart/system_messages/tree/master>
* <http://github.com/arya/site_notifications/tree/master>
But those are rather incomplete parts of my vision
-- Felipe.
It seems like [system\_messages](http://g... | [
0.1546574980020523,
-0.1364021897315979,
0.3089293837547302,
0.004484246019273996,
-0.35659316182136536,
-0.15076376497745514,
0.3219503164291382,
-0.17339415848255157,
-0.5009382963180542,
-0.6688458323478699,
-0.12865546345710754,
0.2391134351491928,
-0.25891780853271484,
0.2795444130897... | |
In code, it's generally pretty easy to add new classes to provide additional functionality and such. I have a fairly good understanding of refactoring code and what's involved so [YAGNI](http://en.wikipedia.org/wiki/You_Ain't_Gonna_Need_It) generally makes sense to me.
What I'm not as familiar with is working with an... | [
0.5802558064460754,
0.16385099291801453,
-0.1249939352273941,
0.1864997297525406,
0.056913457810878754,
-0.39891675114631653,
0.34386757016181946,
0.053927406668663025,
-0.19926884770393372,
-0.5695614218711853,
0.07102392613887787,
0.8790040016174316,
0.09564436227083206,
-0.0174707267433... | |
tweak schemas around as it is to add new classes? Or should I try to have tables set up for things I could conceivably use, but aren't planning to in the immediate future?
If you have good testing that hits the database, I would extend YAGNI to your database design.
In general, it is easy to add columns and tables, a... | [
0.45512720942497253,
0.04863666743040085,
0.03833628073334694,
0.2238849550485611,
-0.37457701563835144,
-0.07800787687301636,
0.1345996856689453,
-0.052251312881708145,
-0.07536403834819794,
-0.8007359504699707,
0.17192430794239044,
0.6347050666809082,
-0.2725785970687866,
-0.029663590714... | |
I am looking for a 'one-stop' solution/tool to give a Photoshop guy who knows nothing about CSS as a means for him to choose fonts and styles that can be made as CSS.
I'm looking for something very similar to this '[CSS Font and Text Style Wizard](http://www.somacon.com/p334.php)', but that will also allow for changes... | [
0.6633448600769043,
0.10264565050601959,
0.18126825988292694,
0.17800451815128326,
0.05804240703582764,
0.18872295320034027,
-0.1007775366306305,
0.1510733962059021,
-0.12995527684688568,
-0.7971989512443542,
0.29645365476608276,
0.3106294274330139,
-0.15158429741859436,
-0.273001015186309... | |
I'm having trouble with the MySQLdb module.
```
db = MySQLdb.connect(
host = 'localhost',
user = 'root',
passwd = '',
db = 'testdb',
port = 3000)
```
(I'm using a custom port)
the error I get is:
```
Error 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ... | [
0.0882827639579773,
0.24749359488487244,
0.15925034880638123,
0.02999831922352314,
-0.2148396521806717,
-0.4004182815551758,
0.7052168250083923,
0.5642324686050415,
-0.4224422574043274,
-1.2231884002685547,
0.07480679452419281,
0.6251751780509949,
-0.09623005986213684,
0.3949453830718994,
... | |
Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use testdb;
Database changed
mysql>
```
I tried directly from the python prompt:
```
>>> db = MySQLdb.connect(user='root', passwd='', port=3000... | [
-0.28134775161743164,
-0.18869157135486603,
0.5955744385719299,
-0.06835714727640152,
-0.08434362709522247,
0.03065367415547371,
0.5692384839057922,
-0.28064435720443726,
-0.24228346347808838,
-0.5427352786064148,
-0.2248484343290329,
0.8574665188789368,
-0.2525216341018677,
0.191163435578... | |
is the type of connection you are attempting to make, and db's normally don't listen on the network by default for security reasons. Also, try specifying --host=localhost when using the mysql command, this also try to connect via unix sockets unless you specify otherwise. If mysql is **not** configured to listen for tc... | [
0.24358126521110535,
-0.19606445729732513,
0.2358633279800415,
-0.08883935958147049,
-0.08773744106292725,
-0.422455757856369,
0.5394080877304077,
0.16839994490146637,
-0.4144872725009918,
-0.7488823533058167,
-0.25207632780075073,
0.5784963369369507,
-0.49983054399490356,
0.54684305191040... | |
to connect via unix sockets (as David Suggests). | [
0.16228002309799194,
-0.04415363445878029,
-0.03109690360724926,
0.27323290705680847,
0.17948690056800842,
0.17844700813293457,
0.052184097468853,
0.2461603730916977,
-0.2750668227672577,
-0.39898473024368286,
-0.4886521100997925,
0.4181685447692871,
-0.16861148178577423,
0.171436995267868... | |
I've been thinking about starting a new graphics project and I want to use Java. Java has wrappers for all of the relevant GL functionality but I wonder how many people, including casual users, actually have decent GL drivers installed. By decent, I mean somewhat stable and fairly new (GL 1.5 support would probably do ... | [
0.42771923542022705,
0.14426641166210175,
0.2811371982097626,
0.04068689048290253,
-0.35105428099632263,
-0.14356395602226257,
-0.05301077291369438,
0.5811468958854675,
-0.17671440541744232,
-0.7167643904685974,
0.0907520279288292,
0.822289228439331,
-0.2355910986661911,
0.0077996840700507... | |
non-imaginary stats on what percentage of Windows users have the drivers to run a GL app?
The [Steam Hardware Survey](http://store.steampowered.com/hwsurvey/) is probably the best and most detailed source for info about what gamers have. Accurate statistics for the general population will be harder to come by. Instead,... | [
0.28153735399246216,
0.011529609560966492,
0.6287823915481567,
0.25415143370628357,
-0.33944472670555115,
0.11379529535770416,
-0.1558929681777954,
0.1535942703485489,
-0.054121799767017365,
-0.5904789566993713,
-0.014757268130779266,
0.6426969170570374,
-0.22091956436634064,
0.14369627833... | |
R300 series and the FX series were both introduced in 2002, so if you know what portion of your target market is using a PC from 2003 or later, you'll have a fairly good idea of how widespread OpenGL 2.0 support is among users with discrete graphics.
If you want to support integrated graphics (which are the largest s... | [
0.0817471593618393,
-0.2913164496421814,
0.9105181097984314,
0.3363463580608368,
-0.37095996737480164,
0.3852175176143646,
-0.26814019680023193,
0.016153791919350624,
-0.16700783371925354,
-0.25089800357818604,
0.16670489311218262,
0.9623969197273254,
0.00771057466045022,
0.111635692417621... | |
2006 or later.
If you're interested in support on other operating systems, any Intel Mac will support OpenGL 2.0 with software fallbacks, and hardware acceleration whenever the chip would support it under Windows. On Linux, any system with Mesa 7 or later (June 2007 or later) will support OpenGL 2.0 software renderin... | [
-0.325362890958786,
0.12113811820745468,
0.533707320690155,
0.27501413226127625,
-0.32371288537979126,
0.023602090775966644,
0.30533546209335327,
0.21288475394248962,
-0.006682737730443478,
-0.19547095894813538,
-0.20100629329681396,
0.8493052124977112,
0.027495749294757843,
-0.14011411368... | |
Given two date/times:
```
@start_date = '2009-04-15 10:24:00.000'
@end_date = '2009-04-16 19:43:01.000'
```
Is it possible to calculate the time elapsed between the two dates in the following format
1d 9h 19m
You can [get the difference between the two dates](http://msdn.microsoft.com/en-us/library/ms189794.aspx) t... | [
0.33478599786758423,
-0.1014234870672226,
0.5276803374290466,
-0.14536119997501373,
0.12493031471967697,
0.21013039350509644,
0.04121767729520798,
0.136724054813385,
-0.27635714411735535,
-0.4411470293998718,
-0.022336725145578384,
0.19305375218391418,
0.17322513461112976,
0.33165526390075... | |
When I used to write test tools in Windows, I use MFC for creating the front-end GUI. This made development of GUI development very fast, and I always used to concentrate on the back-end. Recently I moved to the console based Linux-world. Where most of the things are just console based.
My question: Is there any easy ... | [
0.03282016143202782,
-0.003977190237492323,
0.29997578263282776,
0.030016833916306496,
-0.16586288809776306,
0.049110300838947296,
-0.15724091231822968,
0.21673843264579773,
-0.060894258320331573,
-0.8680188655853271,
0.03795205056667328,
0.7409648895263672,
-0.2588949501514435,
0.12039557... | |
thing with both Qt and wxWidgets BTW is that they are both cross-platform toolkits; they work on Linux/Unix, Windows, OS X, and maybe other platforms as well. | [
0.6792397499084473,
-0.32183051109313965,
0.10234824568033218,
0.2565925121307373,
-0.06474616378545761,
-0.4464755654335022,
-0.06367157399654388,
0.22836333513259888,
0.35039395093917847,
-0.8171741366386414,
-0.02439383789896965,
0.2811664938926697,
0.07559839636087418,
0.05391231551766... | |
I am in ***love*** with stackoverflow's single-color "click-to-close' hovering dialog boxes that greet a user when they try to vote and aren't logged in or use the site incorrectly. Any idea how and/or what technology Jeff used to implement these neat little devices?
**EDIT: I'm specifically talking about the SQUARE d... | [
0.5024204254150391,
0.08328916877508163,
0.8327669501304626,
0.19568143784999847,
-0.0540429912507534,
-0.1977304369211197,
-0.2684054970741272,
0.06714256852865219,
-0.23941217362880707,
-0.6990241408348083,
-0.1269272267818451,
0.2012661248445511,
0.21593709290027618,
-0.0630714595317840... | |
yourself. Try this code:
```
$('.showme').click(function() {
$('.error-notification').remove();
var $err = $('<div>').addClass('error-notification')
.html('<h2>Paolo is awesome</h2>(click on this box to close)')
.css('left', $(this).position().left);
$(this... | [
0.3691920042037964,
0.002219938673079014,
0.6882261633872986,
-0.04428866505622864,
0.2571505606174469,
-0.07755593955516815,
0.4274042844772339,
0.11572619527578354,
-0.17923709750175476,
-0.7447048425674438,
-0.09568138420581818,
0.7971630096435547,
-0.1507352888584137,
-0.12396318465471... | |
color:white;
cursor:pointer;
display: none;
padding:15px;
padding-top: 0;
position:absolute;
z-index:1;
font-size: 100%;
}
.error-notification h2 {
font-family:Trebuchet MS,Helvetica,sans-serif;
font-size:140%;
font-weight:bold;
margin-bottom:7px;
}
```
And [click here](ht... | [
-0.2950465679168701,
0.008609776385128498,
0.43439358472824097,
-0.18996162712574005,
-0.012414454482495785,
0.7195461988449097,
0.5144885778427124,
-0.17089338600635529,
0.017257841303944588,
-0.5935819149017334,
-0.5655056238174438,
0.3825405240058899,
-0.2998996376991272,
-0.16530203819... | |
for the top, but I think there may be some situations in which it won't. All things considered, this should get you started. If you want a more robust implementation, you should check out [jQuery BeautyTips](http://www.lullabot.com/files/bt/bt-latest/DEMO/index.html) which is *really* awesome and would make this trivia... | [
0.5442436337471008,
-0.5470553040504456,
0.3975653350353241,
0.12812653183937073,
0.1331028938293457,
-0.24201594293117523,
-0.02888677269220352,
0.20934626460075378,
-0.23471035063266754,
-0.33829063177108765,
0.11345359683036804,
0.7345655560493469,
0.24544568359851837,
-0.06844446808099... | |
How do I take four received data *bytes* and assemble them into a *floating-point* number?
Right now I have the *bytes* stored in an array, which would be, **received\_data[1]** ... **received\_data[4]**. I would like to store these four *bytes* as a single 32-bit single precision *float*.
-Thanks
I'm actually rece... | [
0.26556989550590515,
0.015641899779438972,
0.7952345609664917,
0.18795859813690186,
-0.19959990680217743,
0.38889026641845703,
0.018849359825253487,
-0.4350729286670685,
-0.5301126837730408,
-0.6216589212417603,
0.046572621911764145,
0.5025104284286499,
0.0095223942771554,
0.25094944238662... | |
first *byte*, here's what I did to check...
```
#define CHECK_BIT(var,pos) ((var) & (1<<(pos)))
if( CHECK_BIT(received_data[1], 7)) //set or clear LED2
{LATAbits.LATA2=1;}else{LATAbits.LATA2=0;}
if( CHECK_BIT(received_data[5], 7)) //set or clear LED3
{LATAbits.LATA3=1;}else{LATAbits.LATA3=0... | [
0.17962753772735596,
-0.2922495901584625,
0.5126991271972656,
-0.41833844780921936,
0.12461524456739426,
0.1810365617275238,
0.19712163507938385,
-0.40764012932777405,
-0.309221476316452,
-0.34001755714416504,
-0.04948195070028305,
0.4798263609409332,
-0.5606189370155334,
-0.04899186640977... | |
this be stored into the float in the right order? I haven't had any luck parsing the bytes and reading it as a float yet...
*If anyone has any experience with it, I'm using the C18 MPLAB IDE compiler.*
***FINAL UPDATE:***
I have my application running! Just some minor bug fixes now!
***THANKS!***
*Thanks for a... | [
0.6273918151855469,
0.21759971976280212,
0.4724605083465576,
0.34641942381858826,
-0.10219985246658325,
-0.25923410058021545,
0.2461882382631302,
0.009903647936880589,
-0.2806296944618225,
-0.7401201725006104,
0.21891851723194122,
0.4860017001628876,
0.4058608412742615,
-0.0060767019167542... | |
the byte order is correct. Either
```
float f1 = *(float*)(received_data+1)
float f2 = *(float*)(received_data+5)
```
or if you have to reverse the bytes, you'll have to copy, so here's an alternative:
```
union {
char chars[4];
float f;
} u;
for (i = 0; i < 4; i++)
u.chars[3-i] = received_data[i+1];
float f... | [
-0.2054690420627594,
0.16615532338619232,
0.4005366861820221,
-0.2777309715747833,
-0.1694890409708023,
0.39576593041419983,
0.19808948040008545,
-0.4803677201271057,
-0.11461547017097473,
-0.17445015907287598,
-0.06787924468517303,
0.47460755705833435,
-0.19650794565677643,
0.149645030498... | |
`float'.) | [
0.5736947655677795,
-0.10985661298036575,
0.6659857034683228,
0.11881186068058014,
-0.06860349327325821,
0.13218443095684052,
-0.010429768823087215,
-0.16987298429012299,
-0.21966764330863953,
-0.2164773792028427,
-0.2660531997680664,
0.050598833709955215,
-0.21974387764930725,
-0.04466310... | |
Suppose i have the following table
```
book
-----
id
name
genre
check_out_date
location_id
```
Can anyone post an example of an efficient stored procedure that only updates the book table where the passed in values are different from the current values in the table?
i.e. if i passed in values ( 1, "Slaughterhouse V... | [
0.15252819657325745,
0.27996137738227844,
0.6283892393112183,
0.036239154636859894,
0.042801059782505035,
-0.07934462279081345,
-0.031569160521030426,
-0.15461084246635437,
-0.09190545976161957,
-0.48833391070365906,
0.07534798234701157,
0.37343522906303406,
-0.10488374531269073,
0.1627823... | |
the record anyway if you know it's an update not an insert. And there's probably other validation too. Handle it all in one place. | [
0.66371750831604,
0.24774667620658875,
0.18960125744342804,
0.4280649423599243,
-0.04744693636894226,
-0.10647645592689514,
-0.0023503839038312435,
0.11358542740345001,
-0.3641568422317505,
-0.19450432062149048,
0.42548656463623047,
0.5220831036567688,
-0.04864819347858429,
0.0124545563012... | |
I'd like to set up my Rails controller to only perform a create action if the request has a JavaScript or xml payload. I don't want HTML form submits to trigger a create. Ideally, attempting to do so would send you to an page explaining that you can't do that.
I think one solution would be to put a `prepend_before_fil... | [
0.5405691266059875,
-0.016182588413357735,
0.044029977172613144,
0.06513264030218124,
-0.13482439517974854,
-0.2593640089035034,
0.3238748610019684,
-0.21499960124492645,
-0.0412214994430542,
-0.7209183573722839,
0.18165186047554016,
0.33907613158226013,
-0.40466442704200745,
-0.0222212225... | |
with the idea of using a control version system to provide that information.
Then, my suggestion is: use a repository for your software and another one for store the auto commits. When the work is done, merge all auto commits in the main repository in only one logical commit.
With git, I would do this:
1. Repo 'foo'... | [
0.7009657621383667,
0.0106368912383914,
0.3245989680290222,
-0.01862180419266224,
0.06917614489793777,
-0.038679227232933044,
0.15764978528022766,
-0.3586031198501587,
-0.037278108298778534,
-0.5746175050735474,
-0.24669966101646423,
0.6550436019897461,
-0.3949633836746216,
0.0501007735729... | |
branch: "git tag barbegin"
5. activate the script: "while true; do git add -A .; git commit -m 'autocommit'; done"
6. I would not use a cron job, so you can activate/deactivate the autocommits easily.
7. do your job
8. after your job done, deactivate the script
9. commit pending changes
10. now, you have a lot of auto ... | [
0.12991566956043243,
-0.08848114311695099,
0.7354342341423035,
-0.19656163454055786,
0.2778345048427582,
-0.0536252036690712,
0.5541264414787292,
-0.18304240703582764,
-0.3936271071434021,
-0.4410347044467926,
-0.5588952898979187,
0.8904298543930054,
-0.08819977194070816,
-0.22580881416797... | |
lecturer may access it
13. for update your foo repository:
1. "git rebase -i --onto barbegin barbegin" and proceed as described [here](https://stackoverflow.com/questions/250238/collapsing-a-git-repositorys-history/251927#251927)
2. I would squash all commits: "in the end, there can be only one".
3. "git push foo ba... | [
-0.006435050629079342,
0.057419247925281525,
0.7772635221481323,
-0.08497245609760284,
-0.3754802346229553,
0.07600156962871552,
0.1887257844209671,
0.03748176246881485,
-0.07942793518304825,
-0.5574314594268799,
-0.27604684233665466,
0.42591050267219543,
-0.06687874346971512,
0.3310419917... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.