text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
MethodA()
{
classB = new ClassB();
}
// Other Methods...
}
/*CLASS B*/
ClassB
{
ClassC classC;
ClassB()
{
classC = new ClassC();
}
// Methods...
}
/*CLASS C*/
ClassC
{
// Loads of variables being used...
}
```
So what I want to know is:
**a)** What would happen m... | [
0.2150345891714096,
-0.11982892453670502,
0.0020541392732411623,
-0.22149522602558136,
0.017466828227043152,
0.049609407782554626,
0.22731618583202362,
-0.44233036041259766,
-0.2045479714870453,
-0.31552067399024963,
0.14870020747184753,
0.3422105014324188,
-0.49286532402038574,
0.22869609... | |
is the case, will the previous memory be freed somehow by GC?
**b)** Whatever is the outcome of the above, what would happen to classC, loaded with variables munching memory?
Direct answers or just plain links to a bit of reading would be greatly appreciated. I've tried to find the answer for myself but it seems that... | [
0.16329269111156464,
0.08570355176925659,
0.02667751908302307,
0.16312003135681152,
-0.16308747231960297,
0.39476725459098816,
0.16138502955436707,
0.16298870742321014,
-0.23637628555297852,
-0.5506537556648254,
-0.052275799214839935,
0.4496006369590759,
-0.03140917792916298,
0.30444100499... | |
is sometimes alterating between Sub-Class1 and 2 which both control a 'scene'. These 'scenes' have some classes to help managing stuff (the usual). This is ( by my thoughts ) unscopeable.
The problem is that both Sub-Class1 and Sub-Class 2 can eat up a bit of memory and is using some 'assets'. Therefore I would like t... | [
0.15062826871871948,
-0.06437940895557404,
-0.08481922000646591,
0.22266434133052826,
0.11641447246074677,
-0.14691348373889923,
0.29518038034439087,
0.29900458455085754,
-0.4556819498538971,
-0.5325663089752197,
-0.06224724277853966,
0.3487051725387573,
-0.25926464796066284,
0.30740547180... | |
suggestions on this front would ofcourse be appreciated.
Alright, I wrote a bit more than planned but that's it! Looking forward to some insight into this! :)
Regards, Robert
I'll rewrite it a little:
```
ClassA()
{
memberB = new ClassB();
}
MethodA()
{
memberB = new ClassB();
}
```
In this case, `memberB` ho... | [
-0.023734187707304955,
0.1935303658246994,
0.05375406891107559,
-0.05300508439540863,
-0.07287286967039108,
0.09703938663005829,
0.18069463968276978,
-0.3133898377418518,
-0.07637811452150345,
-0.6554892659187317,
0.11853105574846268,
0.28725022077560425,
-0.5079920887947083,
0.24961021542... | |
not referenced in code anymore, and the GC cleans it as soon as it gets called.
> Therefore I would like to erase, yes you heard me, erase them from existence and then re-creating them again at a later time.
Whole point of C# is that you don't mess with memory. Sure, you can call `GC.Collect()` anytime you want, but ... | [
0.5327607989311218,
0.13323639333248138,
0.2998804450035095,
0.16209453344345093,
-0.11117764562368393,
-0.37566131353378296,
0.16936247050762177,
0.315471351146698,
-0.4461422264575958,
-0.36445313692092896,
-0.27855822443962097,
0.5391392111778259,
-0.4264848232269287,
0.1642861217260360... | |
Is there a way to use (reference) a DLL written in an unmanaged C++ (not a COM library) in my C# application?
When I try to reference it from within Visual Studio, I get 'not a COM object' error message.
Maybe there is some kind of translator\router that would COMify my DLL reference?
I have no clue how COM and COM i... | [
0.29988425970077515,
0.06946159154176712,
0.40962228178977966,
0.1134616881608963,
-0.02782578393816948,
-0.12472757697105408,
0.23229125142097473,
-0.40904146432876587,
-0.17471103370189667,
-0.6768474578857422,
-0.001708395779132843,
0.6991166472434998,
-0.34808599948883057,
0.0110736954... | |
lparam);
``` | [
0.027225609868764877,
0.13345351815223694,
0.27662062644958496,
-0.17354369163513184,
-0.1310785561800003,
0.19963853061199188,
-0.3442915678024292,
-0.056829240173101425,
-0.34960857033729553,
-0.05791186913847923,
-0.15435369312763214,
0.8402159810066223,
-0.5394233465194702,
0.141141250... | |
I'm very new to ASP.NET, help me please understand MasterPages conception more.
I have Site.master with common header data (css, meta, etc), center form (blank) and footer (copyright info, contact us link, etc).
```
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="_SiteMaster" %>
<!... | [
0.04584745317697525,
0.12668836116790771,
0.8342733383178711,
0.05208234116435051,
-0.43077197670936584,
-0.13041701912879944,
0.11544981598854065,
-0.5181622505187988,
-0.37016692757606506,
-0.7664735913276672,
-0.019174998626112938,
0.03255285322666168,
0.11551915854215622,
0.18294335901... | |
</form>
</body>
</html>
```
and I want to use second master page for a project into sub directory, which would contains SQL query on Page\_Load for logging (it isn't necessary for whole site).
```
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Project.master.cs" Inherits="_ProjectMaster" MasterPageFile="~... | [
-0.0830434188246727,
0.08762887865304947,
0.522086501121521,
0.05197206884622574,
0.03164748102426529,
-0.028842343017458916,
0.38743314146995544,
-0.5079550743103027,
-0.37114858627319336,
-0.6110236644744873,
-0.1253466159105301,
0.3441649377346039,
-0.0790330171585083,
0.042240642011165... | |
Some footer content
</asp:Content>
```
I've been working with nested master pages and have run in to something similar. From what I see where you have "Some footer here" in the Site.Master is where the problem lies and I've had similar problems with having content with-in a contentplaceholder tag. if you try this inst... | [
0.19565099477767944,
-0.1318904012441635,
0.5014040470123291,
0.08714430779218674,
-0.18672999739646912,
-0.22667643427848816,
-0.05116540566086769,
0.24780309200286865,
-0.36674344539642334,
-0.8432055711746216,
0.22888709604740143,
0.15250466763973236,
0.005606264341622591,
0.27977472543... | |
I have wxPython app which is running on MS Windows and I'd like it to support drag&drop between its instances (so the user opens my app 3 times and drags data from one instance to another).
The simple drag&drop in wxPython works that way:
1. **User initiates drag**: The source window packs necessary data in wx.DataOb... | [
0.3821205794811249,
-0.21406149864196777,
0.6405827403068542,
0.045251552015542984,
-0.10782461613416672,
0.08111497014760971,
-0.16146764159202576,
-0.25832611322402954,
-0.28955313563346863,
-0.7215338349342346,
-0.09729744493961334,
0.6056687831878662,
-0.4843560457229614,
-0.1322808563... | |
would allow user to choose what data is dragged **after** he drops.
Scenario of *my dreams*:
1. **User initiates drag**: Only some pointer to the source window is packed (some function or object).
2. **User drops data onto target window**: Nice dialog is displayed which asks user which drag&drop mode he chooses (l... | [
0.21965757012367249,
-0.47530636191368103,
0.2829541563987732,
0.21487420797348022,
0.053541842848062515,
0.13427075743675232,
0.014191124588251114,
-0.19335722923278809,
-0.03543846309185028,
-0.7848314642906189,
-0.25010308623313904,
0.5176485776901245,
-0.27841880917549133,
-0.104698128... | |
target.
The scenario of my dreams seems doable in MS Windows, but the docs for wxWidgets and wxPython are pretty complex and ambigious. Not all wx.DataObject classes are available in wxPython (only wx.PySimpleDataObject), so I'd like someone to share his experience with such approach. Can such behaviour be implemented... | [
0.340731143951416,
-0.30599114298820496,
0.2493925541639328,
0.056032728403806686,
-0.04826848953962326,
-0.025807306170463562,
0.02481050044298172,
-0.05584584176540375,
-0.03176902234554291,
-0.7707663774490356,
-0.004822691436856985,
0.5958295464515686,
-0.3512176275253296,
-0.264619886... | |
there should be three different drag&drop modes, and some of them require time-consuming data preparation. That's why I want to postpone data retrieval to the moment user drops data and chooses (potentially costly) d&d mode.
And for memory protection issue - I want to use OLE mechanisms for inter-process communication... | [
0.0034588631242513657,
-0.2793629765510559,
0.5561915636062622,
0.23222936689853668,
0.11431007832288742,
0.05518020689487457,
0.12424422800540924,
-0.05344223231077194,
-0.22500492632389069,
-0.7582975029945374,
-0.2517615854740143,
0.7316924333572388,
-0.37686771154403687,
-0.23554882407... | |
be done the way I wanted it.
Possible solutions are:
1. Pass some parameters in d&d and do some inter-process communication on your own, after user drops data in target processes window.
2. Use [DataObjectComposite](http://www.wxpython.org/docs/api/wx.DataObjectComposite-class.html) to support multiple drag&drop for... | [
0.3911343812942505,
-0.32143718004226685,
0.4293175935745239,
-0.08057209849357605,
0.15659984946250916,
0.15038461983203888,
-0.15171754360198975,
-0.4132614731788635,
-0.005547560751438141,
-0.5073955655097961,
-0.19828970730304718,
0.8272114396095276,
-0.39341306686401367,
-0.2287197709... | |
the solution **2.**, because it doesn't require hand crafting communication between processes and it allows me to avoid unnecessary data retrieval when user wants to drag only the simplest data.
Anyway - Toni, thanks for your answer! Played with it a little and it made me think of d&d and of changing my approach to th... | [
-0.2179550975561142,
-0.39667415618896484,
0.24576379358768463,
0.26871490478515625,
-0.17938941717147827,
0.11125367134809494,
-0.07959268242120743,
-0.04227650538086891,
-0.24057282507419586,
-0.2952696979045868,
0.35185202956199646,
0.656368613243103,
0.1897018402814865,
-0.221340909600... | |
I am aware there are other [NAnt](http://en.wikipedia.org/wiki/NAnt) and [MSBuild](http://en.wikipedia.org/wiki/MSBuild) related questions on Stack Overflow, but I could not find a direct comparison between the two and so here is the question.
When should one choose NAnt over MSBuild? Which one is better for what? Is ... | [
0.1960349828004837,
-0.0246529970318079,
-0.11275914311408997,
-0.0852031260728836,
-0.3650301694869995,
-0.013349262066185474,
0.010994591750204563,
-0.1595834493637085,
-0.44776779413223267,
-0.6259934902191162,
0.09603251516819,
0.44283562898635864,
-0.11046793311834335,
0.2209446281194... | |
example.
* 95% similar in syntax to Ant (easy for current Ant users or Java builders to pick up)
* Integration with NUnit for running unit tests as part of the build, and with NDoc for producting documentation.
**MSBuild:**
* Built-in to .NET.
* Integrated with Visual Studio
* Easy to get started with MSBuild in Visu... | [
0.18293152749538422,
0.062297698110342026,
-0.0718291774392128,
0.0024947121273726225,
-0.4428955912590027,
0.19500498473644257,
0.3988083302974701,
-0.13717064261436462,
-0.35912978649139404,
-0.796331524848938,
0.04245002567768097,
0.5123112797737122,
-0.07319317013025284,
-0.28131070733... | |
"help"?), vs the [NAnt Task Reference](http://nant.sourceforge.net/release/latest/help/tasks/) "csc - Compiles C# programs." ***UPDATE:*** I've noticed the [MSBuild documentation](http://msdn.microsoft.com/en-us/library/7z253716.aspx) has been improved and is much better now (probably on par with NAnt).
* Not easy to f... | [
0.08612177520990372,
0.1998785436153412,
0.1797807812690735,
-0.22645103931427002,
-0.3650345802307129,
0.23534083366394043,
0.30282261967658997,
-0.1254088580608368,
-0.31967440247535706,
-0.7719612717628479,
-0.09142163395881653,
0.6753508448600769,
0.03830696642398834,
-0.20874391496181... | |
is not built-in to Visual Studio and has to be added, either with an Add-In, or as an "External Tool". This is a bit of a pain to set up.
* (Edit:) One of my coworkers brought this up--if you want to set up a build machine using [CruiseControl](http://cruisecontrol.sourceforge.net/) for continuous integration, CruiseCo... | [
-0.27515536546707153,
-0.24518895149230957,
0.6805614233016968,
0.09246031194925308,
0.05656370893120766,
-0.14522798359394073,
0.10879744589328766,
0.06165366619825363,
-0.2944270670413971,
-0.7057422995567322,
0.04743122309446335,
0.7532548904418945,
0.04548908397555351,
-0.2681559622287... | |
Yesterday I found this function:
```
function clone(obj) {
return typeof obj === 'undefined' ?
this : (clone.prototype = Object(obj), new clone);
}
```
I though that i saw alot in Javascript, but this syntax is unknown for me:
```
clone.prototype = Object(obj), new clone
```
Can someone explain me ho... | [
0.08075729757547379,
0.21204473078250885,
0.4432634711265564,
-0.08347121626138687,
0.015752628445625305,
-0.024893060326576233,
0.31016623973846436,
-0.07178007811307907,
-0.14188092947006226,
-0.8660893440246582,
0.17960843443870544,
0.44860804080963135,
-0.43001118302345276,
0.201084256... | |
to answers here and there is what I found:
```
var b;
b=alert('test'),6;
alert(b); // alert undefined
b=5,alert('test2');
alert(b); // alert 5
```
Thanks to christoph research we found more:
```
var a, b, c;
a = 1, 2; // a is 1
(b = 1), 2; // b is 1 - same as above!
c = (1, 2); // c is 2
```
Ahh and I tested ... | [
0.13985905051231384,
0.1791185438632965,
0.21064026653766632,
0.10172441601753235,
-0.17582657933235168,
0.042778439819812775,
0.6412279605865479,
-0.5261859893798828,
0.08355770260095596,
-0.41691598296165466,
-0.4064270555973053,
0.398591011762619,
-0.11358772963285446,
-0.18481181561946... | |
The following example might help to clarify the issue:
```
var a, b, c;
a = 1, 2; // a is 1
(b = 1), 2; // b is 1 - same as above!
c = (1, 2); // c is 2
```
Also notice that
```
var a = 1, 2;
```
produces a syntax error! | [
-0.040687937289476395,
0.34540003538131714,
-0.07226717472076416,
-0.2879657447338104,
0.06354335695505142,
-0.002099396428093314,
0.3769754469394684,
-0.26664429903030396,
-0.02609427645802498,
-0.24166131019592285,
-0.4587160646915436,
0.6410970091819763,
-0.2783040404319763,
-0.04069259... | |
I'm developing a Desktop Search Engine in Visual Basic 9 (VS2008) using Lucene.NET (v2.0).
I use the following code to initialize the IndexWriter
```
Private writer As IndexWriter
writer = New IndexWriter(indexDirectory, New StandardAnalyzer(), False)
writer.SetUseCompoundFile(True)
```
If I select the same docum... | [
-0.06439457833766937,
0.12663733959197998,
0.8349581360816956,
0.060799695551395416,
0.0689348503947258,
-0.06679348647594452,
-0.02093268185853958,
-0.03951177000999451,
-0.046182699501514435,
-0.9290279150009155,
0.04851294308900833,
0.6761206388473511,
-0.36402004957199097,
0.0520120114... | |
an IndexReader to find the current item, use writer to delete it and then add your new item. The same will be true for multiple entries which I think is what you are trying to do.Just find all the entries, delete them all and then write in the new entries. | [
0.1415998339653015,
0.022434579208493233,
0.5646994709968567,
0.5590210556983948,
0.016732603311538696,
-0.17361703515052795,
0.14080825448036194,
0.10541661083698273,
-0.18055182695388794,
-0.9931420087814331,
0.2202044576406479,
0.672206461429596,
-0.2837797701358795,
0.33638304471969604... | |
I need a serialization library for .net with better features than the default xml serializer.
The problem is that it is not polymorphic - say you have class B : A { }, and have serialized an type B, you should be able to call A myBaseType = Deserialize(xml) on it and be returned an instance of type B in the myBaseType... | [
0.31269946694374084,
-0.08265260607004166,
0.3234100639820099,
0.015709638595581055,
-0.06323715299367905,
0.01631222292780876,
0.06435186415910721,
-0.2468234747648239,
-0.10764405876398087,
-0.875455915927887,
0.18789680302143097,
0.528144121170044,
-0.33817341923713684,
0.26691466569900... | |
polymorphic serialized type, so I need something better.
thanks!
If you can handle the additional verbosity going to a serializer which embeds the type information into the resulting stream is probably for the best.
.Net provides the [SoapFormatter](http://msdn.microsoft.com/en-us/library/system.runtime.serialization... | [
0.17453832924365997,
-0.29158881306648254,
0.3070257008075714,
0.20420578122138977,
-0.29162028431892395,
-0.039175085723400116,
0.3252352178096771,
0.17380470037460327,
-0.14187875390052795,
-0.7141115069389343,
0.10566368699073792,
0.26603028178215027,
-0.4914710521697998,
0.026247350499... | |
What are some situations where unit testing and TDD and the like are more trouble than they're worth?
Some things I've come up with are:
* When generating test data is tricky: Sometimes, being able to come up with valid, non trivial test data is a challenge in itself.
* When the only practical way of verifying correc... | [
0.7587824463844299,
0.21615730226039886,
-0.42511147260665894,
0.3879386782646179,
-0.19248540699481964,
0.08828245103359222,
0.4294069707393646,
0.019743595272302628,
-0.3214397728443146,
-0.2123154103755951,
0.21137751638889313,
0.48340845108032227,
0.025699356570839882,
-0.1868213266134... | |
Usability is one example (although once you decided which behavior is usable, you can and should of course test that behavior!). Somewhat paradoxically, lots of numbercrunching tasks cannot be formally specified: Take for example a weather forecast. The goal is of course to predict tomorrow's weather, but that's not a ... | [
0.2663034498691559,
0.0657087191939354,
0.12325563281774521,
0.5657860636711121,
0.10450798273086548,
-0.3173154592514038,
0.38380515575408936,
-0.12340822070837021,
-0.36741748452186584,
-0.6056593656539917,
0.12045568227767944,
0.7906476259231567,
-0.39635157585144043,
-0.269213914871215... | |
lots of historical data to test if the algorithm yields good predictions, but this is dangerous, because it can easily lead to an algorithm that's only accurate for the historical data you used, not in general. And it would probably mean that your unit tests take hours or days to run. Even worse, your algorithm might h... | [
0.47342774271965027,
0.12536503374576569,
-0.002765158424153924,
0.787781298160553,
0.1943528652191162,
-0.039543360471725464,
0.4499722421169281,
-0.28467127680778503,
-0.3444318473339081,
-0.29902851581573486,
0.2720966935157776,
0.4690653085708618,
-0.046655718237161636,
0.2089184671640... | |
useful. I guess the same arguments would apply to OCR, ICR, many signal processing task, face recognition (and many other image processing tasks), typical photoshop tools like "red eye removal", or search engine ranking algorithms (just to name a few examples). | [
0.34705278277397156,
0.23552429676055908,
0.07532074302434921,
0.4872395694255829,
-0.061835870146751404,
-0.28234612941741943,
-0.23571659624576569,
0.07042816281318665,
-0.11933957040309906,
-0.4282912313938141,
-0.08747975528240204,
0.5606316924095154,
-0.1721542924642563,
-0.2419781982... | |
Hai Techies,
I have some stored procedure which was written in SQL server.Now i want to migrate this to mysql.Is there any freeware tools which can do this for me.
I don't think so. You could just execute the query to create the procedure, ie:
```
CREATE PROCEDURE Blah(foo int, bar text)
END;
```
(I think) and the... | [
0.8868207335472107,
0.2542381286621094,
0.19346053898334503,
0.261074036359787,
-0.20526789128780365,
-0.3504675626754761,
-0.16700045764446259,
0.08501285314559937,
0.09911423176527023,
-0.6495318412780762,
0.15001961588859558,
0.4559100866317749,
-0.34265783429145813,
0.18874318897724152... | |
I'm looking for some feedback from anyone that has had a chance to spend some time using Troll Tech's new IDE, [Qt Creator](http://www.qtsoftware.com/developer/qt-creator). It's in public beta at this point, so there might not be many using it just yet. But, I think any 3rd party feedback might be useful.
Also, if you... | [
0.9371850490570068,
0.07309187948703766,
0.10293521732091904,
0.13862168788909912,
-0.3323327600955963,
-0.20038549602031708,
-0.021893959492444992,
0.3419545292854309,
0.14311988651752472,
-0.6072756052017212,
0.25183266401290894,
0.37729761004447937,
0.142817884683609,
0.3413209617137909... | |
other strategic steps by Nokia (like LGPLing Qt) is intended to speed up adoption of the toolkit.
Qt Creator does not compete with Eclipse or Visual Studio, though it can replace it in many scenarios. It is a lightweight IDE that on Windows also includes a full development toolchain. It has gathered an active communi... | [
0.5566809773445129,
-0.0748564600944519,
0.27314844727516174,
0.1105445995926857,
-0.3178827464580536,
-0.3335346579551697,
0.2700240910053253,
-0.057592783123254776,
0.3495047390460968,
-0.6538336873054504,
-0.0072383820079267025,
0.38673195242881775,
-0.0881328284740448,
0.11084626615047... | |
easy it is to go "full screen" and forget you are using an IDE. Finally bear in mind that it is considered beta and you may run into the occasional segfault. All in all, I see a bright future for Qt creator.
(Disclaimer, my company created the [crossplatform installer](http://bitrock.com) that Qt Creator uses) | [
0.5661730766296387,
-0.1700635552406311,
0.20831583440303802,
-0.1098606213927269,
0.05046525597572327,
-0.5428493618965149,
0.3661334812641144,
0.4979623556137085,
-0.00940476730465889,
-0.7104527950286865,
-0.17811773717403412,
0.9469676613807678,
0.18067464232444763,
-0.1166803911328315... | |
I needed a Low-Pass-Filter in one of my Scala projects and came up with this:
```
def filter(numbers: Seq[Double], filterSize: Int): Seq[Double] = {
assert(filterSize > 0)
val ringBuffer = new Array[Double](filterSize)
var ringBufferIndex = 0
numbers.map(x => {
// update ring buffer
ringBuffer(ringBuf... | [
0.0690278559923172,
-0.6186578869819641,
0.5727751851081848,
-0.5373715758323669,
-0.302594929933548,
0.03671907261013985,
0.32412201166152954,
-0.9080130457878113,
-0.03269012272357941,
-0.6414985656738281,
-0.02901255153119564,
0.7198553085327148,
-0.7449784278869629,
-0.2292623519897461... | |
/ filterSize
})
}
```
However, there are some things I don't like about it:
* It uses map (nicely functional) but needs a mutable variable (ringBufferIndex - BAD).
* It work's on `Seq[Double]` (which is fine), but returns `Seq[Double]`, which is bad cause it requires the caller to call `.toList` or whatever he act... | [
0.1639787256717682,
-0.3185511529445648,
0.2381485253572464,
-0.11149460077285767,
-0.1796008050441742,
-0.32101091742515564,
0.4585180878639221,
-0.29174673557281494,
-0.14580732583999634,
-0.844112753868103,
0.12301722168922424,
0.46065807342529297,
-0.6459770202636719,
0.090092062950134... | |
as described in the [Generics of a Higher Kind](http://www.cs.kuleuven.be/~adriaan/files/genericshk/tcpoly-oopsla.pdf) paper. Unfortunately the current collections library predates this feature in Scala, but this will be corrected for 2.8. | [
0.010572307743132114,
-0.17317292094230652,
0.3761886656284332,
-0.035604674369096756,
0.0018768978770822287,
-0.39420703053474426,
0.21537253260612488,
-0.17436736822128296,
-0.5663836002349854,
-0.3100317418575287,
-0.2126290649175644,
0.07781793922185898,
-0.18240956962108612,
0.3091527... | |
How can I ask to *display* multiple vars in one line? So I want to get output like:
```
30 if(s[i] != '\0')
5: s[i] = 101 'e'
4: exp = 14
3: val = 123.45
2: sign = 1
1: i = 6
```
I've been typing in disp s[i] ENTER disp exp ENTER (etc, etc) and I just know there's got to be a better way to do this in one line o... | [
0.10035023093223572,
0.004894200246781111,
0.6320779323577881,
-0.28708720207214355,
-0.1637812703847885,
0.17384475469589233,
0.36844244599342346,
-0.31402266025543213,
-0.30714476108551025,
-0.61969393491745,
-0.012158647179603577,
0.6796258687973022,
-0.4986242949962616,
-0.012595615349... | |
to your `~/.gdbinit`:
```
define disp_vars
disp i
disp sign
disp val
disp exp
disp s[i]
end
```
Now you can add all the displays at once by typing `disp_vars` at the GDB prompt. | [
-0.05536314845085144,
-0.029879843816161156,
0.8706965446472168,
-0.4401823878288269,
-0.3899671733379364,
0.012462993152439594,
0.09348156303167343,
-0.04955612123012543,
-0.2104116678237915,
-0.5554977059364319,
-0.20434586703777313,
0.7665202021598816,
-0.47220370173454285,
-0.106735050... | |
I have an HTML form - with PHP, I am sending the data of the form into a MySQL database. Some of the answers to the questions on the form have checkboxes. Obviously, the user does not have to tick all checkboxes for one question. I also want to make the other questions (including radio groups) optional.
However, if I ... | [
0.3739362359046936,
0.42632541060447693,
0.3089464008808136,
0.19842207431793213,
-0.30744248628616333,
-0.29078152775764465,
0.40264323353767395,
-0.3043440282344818,
-0.00006168579420773312,
-0.3395291268825531,
0.13155905902385712,
0.2681979835033417,
-0.0758790671825409,
-0.06475272774... | |
[successful](http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.2). So you have to check if they are sent using the `isset` or `empty` function.
```
if (isset($_POST['checkbox'])) {
// checkbox has been checked
}
``` | [
0.04629412293434143,
0.15489444136619568,
0.5707860589027405,
0.09169260412454605,
0.3758064806461334,
0.11080500483512878,
0.5686562061309814,
-0.27255022525787354,
-0.2685113847255707,
-0.40270525217056274,
-0.5426499843597412,
0.2962210476398468,
-0.1691434383392334,
-0.0130674187093973... | |
I have a windows service listening to messages from a queue but the messages are not read from the queue.I created an event log to check for logs during service startup and shutdown but the logs are not written. I do not want to debug the service since it is a painful process.Is there a way to solve this issue.The mess... | [
0.4243633449077606,
0.06162978336215019,
-0.013442560099065304,
0.0275267381221056,
0.20483197271823883,
-0.16728293895721436,
0.35154059529304504,
0.05397676303982735,
-0.37752529978752136,
-0.4378988444805145,
0.1856772005558014,
0.6512726545333862,
-0.2072637379169464,
0.207649394869804... | |
permissions for non-admin accounts can be a bit of a black art because you need to configure custom security descriptors using SDDL etc. However there's a very handy MS knowledgebase article on how to do this programmatically:
> [How to setup event log security programmatically using the .Net Framework](http://support... | [
-0.10127747058868408,
0.000023701697500655428,
0.41060250997543335,
0.2241736352443695,
0.08623416721820831,
-0.4795571267604828,
0.26756325364112854,
-0.3134481608867645,
-0.2552565336227417,
-0.32542839646339417,
-0.23070505261421204,
0.6023125648498535,
-0.1529211550951004,
0.1400738656... | |
I'm stuck at not being able to map texture to a square in openGLES. I'm trying to display a jpg image on the screen, and in order for me to do that, I draw a square that I want to then map image onto. However all I get as an output is a white square. I don't know what am I doing wrong. And this problem is preventing me... | [
-0.01989560015499592,
0.1525963842868805,
0.257342129945755,
-0.004896150901913643,
-0.31209272146224976,
0.22033490240573883,
0.17238345742225647,
-0.10130330920219421,
-0.2654821276664734,
-0.9772109389305115,
-0.16960155963897705,
0.41721639037132263,
0.009906046092510223,
0.39512121677... | |
uploaded sample project that shows my problem [here](http://cid-af14228f1b5d4868.skydrive.live.com/self.aspx/.Public/TestTexture.zip). You would need VS2008 with Windows Mobile 6 SDK to be able to run it. I'm also posting the code of the Form that renders and textures an object here. Any suggestions would be much appre... | [
0.10967854410409927,
0.13645462691783905,
0.5545268058776855,
0.08490917831659317,
-0.04012693837285042,
-0.02698581852018833,
0.43521803617477417,
-0.1595441699028015,
-0.021013718098402023,
-0.8801851868629456,
-0.1411798745393753,
0.39780911803245544,
-0.35721299052238464,
0.11374136805... | |
public Form1()
{
InitializeComponent();
myDisplay = egl.GetDisplay(new EGLNativeDisplayType(this));
int major, minor;
egl.Initialize(myDisplay, out major, out minor);
EGLConfig[] configs = new EGLConfig[10];
int[] attribList = new int[]
{
egl.E... | [
-0.27017271518707275,
-0.4419638216495514,
0.697877824306488,
-0.28870493173599243,
0.046935614198446274,
0.1301448941230774,
0.15010905265808105,
-0.4122484028339386,
-0.08127135783433914,
-0.7113930583000183,
-0.49607065320014954,
0.6213863492012024,
-0.5085861682891846,
0.14858999848365... | |
egl.EGL_GREEN_SIZE, 6,
egl.EGL_BLUE_SIZE, 5,
egl.EGL_DEPTH_SIZE, 16 ,
egl.EGL_SURFACE_TYPE, egl.EGL_WINDOW_BIT,
egl.EGL_STENCIL_SIZE, egl.EGL_DONT_CARE,
egl.EGL_NONE, egl.EGL_NONE
};
int numConfig; | [
-0.23568232357501984,
0.040251411497592926,
0.4068346321582794,
0.123505599796772,
0.08176776766777039,
0.37579190731048584,
0.07197709381580353,
-0.013457945547997952,
-0.15719591081142426,
-0.4972853660583496,
-0.5799111127853394,
0.5411065220832825,
-0.18407750129699707,
0.0774258375167... | |
if (!egl.ChooseConfig(myDisplay, attribList, configs, configs.Length, out numConfig) || numConfig < 1)
throw new InvalidOperationException("Unable to choose config.");
EGLConfig config = configs[0];
mySurface = egl.CreateWindowSurface(myDisplay, config, Handle, null);
myContext = eg... | [
-0.3127308487892151,
-0.16795766353607178,
0.7809112668037415,
-0.13951069116592407,
0.2279304713010788,
0.1294083148241043,
0.3805522918701172,
-0.25835177302360535,
0.057001419365406036,
-0.6286945343017578,
-0.6088517904281616,
0.4243328273296356,
-0.26058393716812134,
0.319181293249130... | |
}
void InitGL()
{
gl.ShadeModel(gl.GL_SMOOTH);
gl.ClearColor(0.0f, 0.0f, 0.0f, 0.5f);
gl.BlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);
gl.Hint(gl.GL_PERSPECTIVE_CORRECTION_HINT, gl.GL_NICEST);
}
public unsafe void DrawGLScene()
{
gl.MatrixMode(gl.GL... | [
-0.2947119176387787,
-0.5321732759475708,
0.7421846985816956,
-0.34745490550994873,
0.04774581268429756,
0.2823232114315033,
0.22877579927444458,
-0.009013362228870392,
0.27674970030784607,
-0.5767499208450317,
-0.22729527950286865,
0.6523783206939697,
-0.6554836630821228,
-0.0420456565916... | |
gl.Disable(gl.GL_DEPTH_TEST);
gl.MatrixMode(gl.GL_MODELVIEW);
gl.LoadIdentity();
Texture myImage;
Bitmap Image = new Bitmap(@"\Storage Card\Texture.jpg");
using (MemoryStream ms = new MemoryStream())
{
Image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
... | [
-0.31426703929901123,
-0.40950557589530945,
0.8794372081756592,
-0.21255727112293243,
-0.021191345527768135,
0.2807294428348541,
0.2004270851612091,
-0.2628973722457886,
-0.3981974124908447,
-0.8319845199584961,
-0.2557278871536255,
0.573564887046814,
-0.33015576004981995,
0.12606592476367... | |
float[] rectangle = new float[] {
0, 0,
myImage.Width, 0,
0, myImage.Height,
myImage.Width, myImage.Height
};
float[] | [
-0.0023364131338894367,
-0.34722238779067993,
0.6286439299583435,
-0.1497800499200821,
-0.09637842327356339,
0.2561354339122772,
-0.08246149122714996,
-0.6012975573539734,
-0.14066272974014282,
-0.34476548433303833,
-0.2662598192691803,
0.08513994514942169,
-0.109850212931633,
0.1950525641... | |
texturePosition = new float[] {
0, 0,
myImage.Width, 0,
0, myImage.Height,
myImage.Width, myImage.Height
};
//Bind texture | [
-0.19252054393291473,
-0.14985527098178864,
0.7150328755378723,
-0.35317477583885193,
-0.0958712175488472,
0.34052637219429016,
0.012517930008471012,
-0.3415834903717041,
-0.13053682446479797,
-0.782023012638092,
0.06392895430326462,
0.3426213264465332,
-0.07328056544065475,
0.261506944894... | |
gl.BindTexture(gl.GL_TEXTURE_2D, myImage.Name);
gl.TexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MIN_FILTER, gl.GL_LINEAR);
gl.TexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_MAG_FILTER, gl.GL_LINEAR);
gl.EnableClientState(gl.GL_TEXTURE_COORD_ARRAY);
gl.EnableClientState(gl.GL_VERTEX_ARRAY... | [
-0.4684865474700928,
-0.15236657857894897,
1.137579321861267,
-0.33962035179138184,
-0.4814957082271576,
0.1747276782989502,
0.13911302387714386,
-0.5836768746376038,
0.0505494549870491,
-0.8527692556381226,
-0.5329065918922424,
0.5229129791259766,
-0.7259745597839355,
-0.30953046679496765... | |
gl.VertexPointer(2, gl.GL_FLOAT, 0, (IntPtr)rectanglePointer);
gl.DrawArrays(gl.GL_TRIANGLE_STRIP, 0, 4);
}
gl.DisableClientState(gl.GL_TEXTURE_COORD_ARRAY);
gl.DisableClientState(gl.GL_VERTEX_ARRAY);
}
protected override void OnPaintBackground(PaintEventArgs e)
{
... | [
-0.2537211775779724,
-0.1775408238172531,
0.4932648837566376,
-0.28092825412750244,
0.0014119656989350915,
0.16286601126194,
0.37309184670448303,
-0.288161039352417,
0.03994958847761154,
-0.5646466016769409,
-0.43866604566574097,
0.42632967233657837,
-0.581550657749176,
-0.0257453247904777... | |
egl.SwapBuffers(myDisplay, mySurface);
gl.Clear(gl.GL_COLOR_BUFFER_BIT);
}
protected override void OnClosing(CancelEventArgs e)
{
if (!egl.DestroySurface(myDisplay, mySurface))
throw new Exception("Error while destroying surface.");
if (!egl.DestroyContext(myDisplay, myC... | [
-0.06977178901433945,
-0.10012578219175339,
0.5001411437988281,
-0.11469369381666183,
0.4299234449863434,
-0.11727895587682724,
0.4112054705619812,
-0.20271173119544983,
-0.016082169488072395,
-0.6538203358650208,
-0.5160873532295227,
0.7781791090965271,
-0.29460081458091736,
0.11939982324... | |
throw new Exception("Error while terminating display.");
base.OnClosing(e);
}
}
```
You need to enable texturing:
```
glEnable( GL_TEXTURE_2D );
```
before rendering the square. | [
-0.07380184531211853,
0.24695445597171783,
0.48313963413238525,
-0.4214136600494385,
-0.1537562757730484,
-0.05128795653581619,
0.2211771160364151,
-0.36408162117004395,
-0.015167145989835262,
-0.8118783235549927,
-0.3980819582939148,
0.6074836254119873,
-0.23785202205181122,
0.00952984951... | |
The standard naming convention in the Java world is to name packages, classes and methods according to:
```
com.domainname.productname (package)
com.domainname.productname.ClassName (class)
com.domainname.productname.ClassName.isUpperCase(String str) (method)
```
What is the C#/.NET standard naming convention for th... | [
0.18429172039031982,
0.265626460313797,
-0.02414052002131939,
-0.2390914261341095,
-0.2377013862133026,
-0.21991658210754395,
-0.06510885804891586,
-0.0443350225687027,
-0.12973690032958984,
-0.36854490637779236,
-0.3364219069480896,
0.1819324642419815,
-0.28667664527893066,
0.377529740333... | |
follow anything other the guidelines than the MS ones. | [
0.5902145504951477,
0.28149205446243286,
-0.03457969054579735,
0.009534440003335476,
0.08522891253232956,
-0.7107199430465698,
0.2766587436199188,
0.3245752453804016,
0.07578697055578232,
-0.4842776954174042,
-0.10253116488456726,
0.5047748684883118,
-0.34336718916893005,
-0.44952422380447... | |
I have been trying for a long time to get SQL Server Express on my computer to practice my C#/SQL with and I still haven't gotten it to work.
Are there other programs I can use to setup an SQL database to practice with? If so, which are the best ones for Vista?
EDIT:
To be clear I am not new to SQL programming, I j... | [
0.2812097370624542,
0.042215872555971146,
0.08768068253993988,
0.029939861968159676,
-0.1813988834619522,
-0.10066556930541992,
0.1523837298154831,
0.25951844453811646,
-0.025569885969161987,
-0.8518685698509216,
0.4609389305114746,
0.6788076758384705,
-0.15877386927604675,
-0.079729311168... | |
fledged DB's and good for education/experimentation. You can also check out Oracles free version. | [
0.4089496433734894,
-0.05640805885195732,
0.05097806826233864,
0.17664405703544617,
-0.5801601409912109,
-0.27772772312164307,
0.37228521704673767,
-0.03330584242939949,
0.1263100504875183,
-0.247976154088974,
0.08030831068754196,
0.38724395632743835,
0.1577719897031784,
0.1601831167936325... | |
I know that C# supports covariance in arrays like this :
```
object[] array = new string[3];
```
But I'm getting an error when it tries to compile the below code
```
class Dummy<K,T> where T:K
{
public void foo()
{
K[] arr = new T[4];
}
}
```
It says "Cannot implicitly convert type 'T[]' to 'K... | [
0.13522681593894958,
0.20730732381343842,
0.11039547622203827,
-0.20166997611522675,
-0.22651422023773193,
-0.27246055006980896,
0.3380758464336395,
-0.3622538149356842,
-0.12001221626996994,
-0.15866093337535858,
-0.022166553884744644,
0.6799439787864685,
-0.3889899253845215,
0.0222358200... | |
fine. You don't have to specify that K is a reference type, because if T is a reference type and it derives from or implements K, then K must be a reference type too. (At least I assume that's the reasoning. It doesn't hurt to add `where K : class` as well for clarity.) | [
0.3567730486392975,
0.02563118003308773,
-0.5048123002052307,
0.1567768007516861,
0.09870068728923798,
-0.2846680283546448,
0.27411046624183655,
0.14604289829730988,
-0.06644950807094574,
-0.2555541396141052,
-0.24163644015789032,
0.40209347009658813,
-0.03334646299481392,
0.18515717983245... | |
My particular problem:
I have a string which specifies an aribitrary type in a configuration class
`Config.numberType = "System.Foo";`
where `Foo` is a type like `Decimal` or `Double`
I use `Type.GetType(Config.numberType)` to return the corresponding type.
How do I get from that type to being able to use, `System... | [
0.136964812874794,
0.22463800013065338,
0.06064755842089653,
0.09573587030172348,
-0.050858888775110245,
-0.04939457029104233,
0.43565142154693604,
-0.038279417902231216,
-0.05247564986348152,
-0.33608219027519226,
-0.025826184079051018,
0.6044232249259949,
-0.22762298583984375,
0.30270856... | |
i.e. only in local scope etc.
As many have said - there isn't a direct route. I expect one close option is `TypeConverter`:
```
Type type = typeof(double);
string text = "123.45";
object value = TypeDescriptor.GetConverter(type)
.ConvertFromInvariantString(text);
```
Of course, you may need `try... | [
0.21815426647663116,
-0.15017551183700562,
0.27626827359199524,
-0.09506834298372269,
0.07452624291181564,
-0.3421403169631958,
0.4680495262145996,
-0.06826431304216385,
-0.17930227518081665,
-0.4364562928676605,
-0.18283481895923615,
0.618574857711792,
-0.5255587697029114,
-0.201986163854... | |
In WPF, ASP.NET, WinForms, I create a button, double-click on it and fill in the event handler.
In Silverlight (with Visual Web Developer 2008), I make a button, double-click it but nothing happens.
Is this not supported when writing Silverlight applications for some reason? Do we have to write these event handlers ... | [
0.16427205502986908,
-0.46515417098999023,
0.3756130039691925,
-0.1980753242969513,
-0.1170029565691948,
-0.23437270522117615,
-0.11762573570013046,
-0.32622960209846497,
-0.30097252130508423,
-0.8061438798904419,
0.11559458822011948,
0.6014301180839539,
-0.4863007664680481,
-0.28444620966... | |
I'm trying to get a `JTabbedPane` where all tabs (the actual tabs, not the components) have the same width (either the minimum width needed for the widest label or a constant width).
I've tried to override `BasicTabbedPaneUI.getTabBounds(int tabIndex, Rectangle dest)`, but apparently this method isn't used by the pai... | [
0.1622668206691742,
-0.1133643090724945,
0.5394812226295471,
-0.11178353428840637,
-0.313052237033844,
0.17430929839611053,
0.14346373081207275,
-0.1768902689218521,
-0.27840495109558105,
-0.6070911884307861,
0.09822415560483932,
0.5971451997756958,
-0.43168261647224426,
0.2928759455680847... | |
would work at all.
Is there a way to achieve this?
The answer is simple.
When we put the name for the tab, just format the name using html.
say
tp - JTabbedPane object
```
tp.addTab("<html><body><table width='150'>Name</table></body></html>",Componentobject)
``` | [
0.27938318252563477,
-0.24139833450317383,
0.6451249122619629,
0.15622328221797943,
0.006762052420526743,
0.22090226411819458,
0.0416475310921669,
-0.24858121573925018,
0.0227852463722229,
-0.5146564841270447,
-0.11228743940591812,
0.5986784100532532,
-0.3740957975387573,
-0.04415275156497... | |
Now, I know both SQL and regexes just fine, but a few times on this site, I came across someone working through the exercises on [SQLzoo.net](http://sqlzoo.net/). As far as I could tell, this was a wonderful online resource where someone can pretty easily learn SQL by example, writing many toy queries against several t... | [
0.5169206261634827,
0.1213938444852829,
-0.14858807623386383,
0.07272720336914062,
-0.2075469046831131,
-0.09193166345357895,
0.29747700691223145,
0.3938772678375244,
-0.3834410607814789,
-0.414115309715271,
0.33103814721107483,
0.5334787368774414,
0.11983529478311539,
0.04512055590748787,... | |
actually *learn* regexes from it. I think a good, online tutorial *might* help with the onslaught of basic regex questions we have here. (Maybe after the answer, we could suggest that they take a look at the tutorial.)
So, **is there a good, online, interactive regex tutorial** along the lines of that SQL tutorial? I ... | [
0.54067063331604,
-0.2066352665424347,
-0.07989921420812607,
0.3431171476840973,
-0.0455886535346508,
-0.05816507712006569,
0.20089274644851685,
0.5402741432189941,
-0.3648095428943634,
-0.6183271408081055,
0.18226505815982819,
0.259928435087204,
0.12141767144203186,
-0.06204802542924881,
... | |
the original question. Check that out first ;)
The tool txt2re is, as commenters have rightly mentioned, very ugly. [RegExr](http://gskinner.com/RegExr/) (ht @runrunraygun) is a much prettier tool for editing regular expressions, although has completely different functionality and still no tutorial.
The main reason i... | [
0.3205716907978058,
-0.12488095462322235,
0.2734592854976654,
0.11043604463338852,
-0.4531311094760895,
0.050225432962179184,
0.3243263363838196,
-0.04427534341812134,
-0.017415151000022888,
-0.5085024237632751,
-0.020584192126989365,
0.549540638923645,
-0.26336869597435,
-0.12447942793369... | |
fairly useful tool for learning regular expressions. | [
0.12028814107179642,
0.051531821489334106,
-0.034679166972637177,
0.29866263270378113,
-0.05628927797079086,
-0.028427334502339363,
0.36270973086357117,
0.31666919589042664,
-0.13002291321754456,
-0.44767117500305176,
-0.08285217732191086,
0.31384560465812683,
0.08156213164329529,
-0.50889... | |
Is it possible to merge some cells of a JTable object?
[](https://i.stack.imgur.com/Dcz1D.gif)
(source: [codeguru.com](http://www.codeguru.com/java/articles/139_table12.gif))
If it's not possible through JTable what is the best approach. Thanks.
Not out-of-the-... | [
0.34433096647262573,
0.006867345422506332,
0.10518863052129745,
0.09915534406900406,
-0.07288333773612976,
-0.13471075892448425,
-0.32698285579681396,
-0.36797472834587097,
-0.6008859276771545,
-0.5113918781280518,
0.046295568346977234,
-0.07359377294778824,
-0.23419621586799622,
-0.144711... | |
I have a CSV of file of data that I can load in R using `read.csv()`
Some of the data is missing, so I want to reduce the data frame down to set that consists entirely of non-missing data, i.e. if a `NULL` appears anywhere, I want to exclude that column and row from the filtered data set.
I know I can probably do thi... | [
0.15225191414356232,
0.3081877529621124,
0.1390245407819748,
0.02047966979444027,
-0.07534418255090714,
-0.10081828385591507,
0.02603478729724884,
-0.16572408378124237,
-0.13584968447685242,
-0.5588154196739197,
-0.09464617818593979,
0.3360481262207031,
-0.2870529294013977,
0.1669558286666... | |
see what I want to do.
```
DocID Anno1 Anno7 Anno8
1 7 NULL 8
2 8 NULL 3
44 10 2 3
45 6 | [
0.34541013836860657,
0.46637341380119324,
0.7172964215278625,
-0.25392234325408936,
0.3664487600326538,
-0.08622120320796967,
0.2748259902000427,
-0.12371043860912323,
-0.23126044869422913,
-0.6048794984817505,
0.04114389419555664,
0.6750998497009277,
-0.27849966287612915,
0.14145882427692... | |
6 6
46 1 3 4
49 3 8 5
62 4 NULL 9
63 2 NULL 4
67 | [
-0.0831172987818718,
0.7579337954521179,
0.18523161113262177,
-0.031889479607343674,
-0.1795072704553604,
0.556050717830658,
0.8636050820350647,
-0.1704881489276886,
-0.16578960418701172,
-0.4988805651664734,
-0.16134962439537048,
-0.2208160012960434,
-0.30301347374916077,
0.56211286783218... | |
11 NULL 3
91 NULL 9 7
92 NULL 7 5
93 NULL 8 8
```
So given this input, I need some code that will reduce the output to this.
```
DocID | [
0.18283213675022125,
0.4825453758239746,
-0.10603053867816925,
-0.24541892111301422,
-0.18656718730926514,
0.20022636651992798,
0.23765407502651215,
-0.004905345384031534,
-0.006865011993795633,
-0.5692577958106995,
0.0011644198093563318,
0.511455237865448,
-0.5914316773414612,
0.013378066... | |
Anno8
44 3
45 6
46 4
49 5
```
As `Anno8` is the only column with non-NULL data, and there are only four rows with non-NULL data.
If `x` is your `data.frame` (or `matrix`) then
```
x[ ,apply(x, 2, function(z) !any(is.na(z)))]
```
Since your example uses `NULL`, `is.na(·)` will be... | [
-0.029686339199543,
0.2672058045864105,
0.5711368918418884,
-0.04643861576914787,
-0.17892198264598846,
0.28551599383354187,
0.08632715791463852,
-0.4273858368396759,
-0.3759387731552124,
-0.3584047853946686,
-0.3061659336090088,
0.2533307373523712,
-0.4437408745288849,
0.02369010448455810... | |
I'm trying to develop a simple app ( it will resemble something like a powerpoint presentation) that will require some simple GUI controls: button, textbox, slider and listbox.
And i would want to be able to skin the controls.
So i'm looking for an easy to learn 2d engine that will aid me in doing what i want.
An... | [
0.298966646194458,
-0.010129548609256744,
0.24545764923095703,
0.04415285959839821,
-0.3344777226448059,
-0.0022646323777735233,
0.03645339608192444,
0.1347602903842926,
-0.1624550074338913,
-1.0050991773605347,
0.030319856479763985,
0.7125580906867981,
-0.359615683555603,
-0.0735919252038... | |
end i went with [Irrlicht](http://irrlicht.sf.net/)
also worth mentioning:
* [Ogre3d](http://www.ogre3d.org/)
* [HGE](http://hge.relishgames.com/) | [
-0.3541561961174011,
-0.12194256484508514,
0.7392812371253967,
-0.031111478805541992,
-1.0159164667129517,
-0.2193557620048523,
0.5477230548858643,
-0.4010069668292999,
0.019335398450493813,
-0.2732163369655609,
-0.3162730634212494,
0.6626946330070496,
0.39951351284980774,
0.00060345459496... | |
Is it possible to find the greatest of two integers without any comparison? I found some solutions:
```
if(!(a/b)) // if a is less than b then division result will be zero.
{
cout << " b is greater than a";
}
else if (!(a-b)) // we know a is greater than or equal to b now. check whether they are equal.
{
cou... | [
-0.4045739471912384,
0.05747278034687042,
0.11461374908685684,
-0.09205020219087601,
-0.14112883806228638,
0.1899556666612625,
0.1981973499059677,
-0.4278581440448761,
-0.30933451652526855,
-0.6154268980026245,
0.08458375930786133,
0.49433499574661255,
-0.16891030967235565,
-0.002957213437... | |
I need a solution that avoids any if statement. Instead I should use switch statements and arithmetic operators. ThanX.
Subtract them and check the sign using nasty bit twiddling hacks
<http://graphics.stanford.edu/~seander/bithacks.html>
Don't do this in production code if the other programmers know where you live... | [
0.8410260081291199,
0.17958447337150574,
-0.08219253271818161,
0.13485835492610931,
0.20090286433696747,
-0.07004176080226898,
0.4656113088130951,
0.051685161888599396,
-0.14045889675617218,
-0.49727487564086914,
-0.03958651050925255,
0.2710277736186981,
-0.08165799081325531,
0.18716810643... | |
I thought that I'll be clever and use subquery to get my [report](https://stackoverflow.com/questions/470992/how-to-count-number-of-different-items-in-sql#471152) in one go. But after running into problems and reading documentation I saw that my approach does not work in MySQL. My inner query returns ~100 records and o... | [
-0.2205311506986618,
-0.023355983197689056,
0.3942372500896454,
-0.011530519463121891,
-0.09373413771390915,
-0.17689476907253265,
0.015629250556230545,
-0.4302656054496765,
-0.5429420471191406,
-0.6897032260894775,
0.18253269791603088,
0.26540011167526245,
-0.20231859385967255,
0.09508464... | |
t1 ON ( r1.team_id = t1.id )
left JOIN ejl_clubs c1 ON ( t1.club_id = c1.id )
where r1.season=2008
and p1.id in
(
SELECT p.id
FROM ejl_players p
left JOIN ejl_registration r ON (r.player_id = p.id)
left JOIN ejl_teams t ON (r.team_id = t.id)
left JOIN ejl_clubs c ON (t.club_id = c.id)
WHERE r.season = 2008
GROUP B... | [
-0.2179545760154724,
0.16973762214183807,
0.30699941515922546,
-0.08712741732597351,
-0.41319170594215393,
0.03571572154760361,
0.09102749824523926,
-0.8682169914245605,
-0.5657026171684265,
-0.5269991159439087,
0.18072572350502014,
0.19414541125297546,
-0.21514475345611572,
0.206441909074... | |
team_id,season season 10 const,d17528sd14898.p1.id 1 Using where
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 d17528sd14898.r1.team_id 1
1 PRIMARY c1 eq_ref PRIMARY PRIMARY 4 d17528sd14898.t1.club_id 1
2 DEPENDENT SUBQUERY p index PRIMARY PRIMARY 5 NULL 23395 Using index
2 DEPENDENT SUBQUERY r ref team_id,season seaso... | [
-0.6241684556007385,
-0.3171853721141815,
0.37600812315940857,
0.00737164868041873,
-0.05894028767943382,
0.16577786207199097,
0.3086604177951813,
-0.2239380180835724,
-0.5979766845703125,
-0.6182018518447876,
-0.14543892443180084,
0.19162024557590485,
-0.4180153012275696,
-0.1711928248405... | |
FROM ejl_players p
LEFT JOIN ejl_registration r ON (r.player_id = p.id)
LEFT JOIN ejl_teams t ON (r.team_id = t.id)
LEFT JOIN ejl_clubs c ON (t.club_id = c.id)
WHERE r.season = 2008
GROUP BY p.id
HAVING COUNT(DISTINCT c.id) > 1
) p2 ON p1.id = p2.id
LEFT JOIN ejl_registration r1 ON ( r1.play... | [
-0.45528170466423035,
0.25501859188079834,
0.2744907736778259,
-0.12784214317798615,
-0.4312345087528229,
0.06972217559814453,
0.0790892168879509,
-0.7201094031333923,
-0.43706077337265015,
-0.5586830377578735,
0.14923815429210663,
-0.08696175366640091,
-0.11653567105531693,
0.263734608888... | |
manner should be more efficient but isn't always. However, it does bypass the issue of having the subquery executed for every record returned in the main query. Instead the subquery is constructed as a virtual table in memory and then used for comparison with the main query.
**Edit:** I should point out that you'll wa... | [
-0.23209241032600403,
0.13093768060207367,
0.4997735917568207,
0.3896276652812958,
-0.38468363881111145,
-0.06094923987984657,
0.2649107575416565,
-0.3124626576900482,
-0.1614864617586136,
-0.7850029468536377,
0.14150917530059814,
0.7807449102401733,
0.006009148433804512,
0.000122341458336... | |
Is there a way to create WCF proxy objects on the fly without using codedom? By on the fly I mean during runtime. So lets say I have a smart client application that is accessing a WCF service. The Data Contract for the WCF service is changed while the client is running. I want to dynamically create a new proxy object t... | [
0.6934166550636292,
-0.16106943786144257,
0.6268627047538757,
0.09838440269231796,
-0.10694607347249985,
-0.28815579414367676,
0.26483437418937683,
-0.0946403294801712,
-0.14234894514083862,
-0.8116567730903625,
0.06750338524580002,
0.6860431432723999,
-0.33796459436416626,
0.2072355151176... | |
contract changes on the fly but I can't think of any reason you shouldn't be able to do it. | [
0.8705881834030151,
-0.022852525115013123,
0.5429800748825073,
-0.08066819608211517,
0.35882604122161865,
-0.12457936257123947,
-0.10940853506326675,
0.006064518820494413,
-0.35142290592193604,
-0.5807973146438599,
0.22526663541793823,
0.5087464451789856,
-0.28150537610054016,
0.0692646950... | |
Is it possible to use ido-mode completion to find definitions in a TAGS file? I suspect that ido-completing-read is part of the answer. Here's my non-working code, which shows an unpopulated ido-mode minibuffer:
```
(defun ido-choose-from-tags ()
"Use ido to select tags "
(interactive)
(etags-tags-apropos
... | [
-0.12931905686855316,
-0.0009382401476614177,
0.22986000776290894,
-0.052288416773080826,
0.23387038707733154,
-0.13831573724746704,
0.31917473673820496,
-0.283720999956131,
-0.03590989485383034,
-0.5388022065162659,
-0.10296960920095444,
0.5667846202850342,
-0.24569228291511536,
-0.267905... | |
(push (prin1-to-string x t) tag-names)))
tags-completion-table)
(find-tag (ido-completing-read "Tag: " tag-names))))
``` | [
-0.27747204899787903,
0.02983705885708332,
0.5459967255592346,
-0.2590865194797516,
0.1213974729180336,
-0.07087317854166031,
0.27798956632614136,
-0.5455889701843262,
0.0323849618434906,
-0.41161322593688965,
-0.5769612193107605,
0.5238187909126282,
-0.35193517804145813,
0.206323921680450... | |
When saving data in different sql tables, is it best to use the GUID userID or simply use the username? is there a performance difference when using guid?
Use the guid. It is the system internal identifier for your users. This then allows the ability to change usernames if people wish.
This then fits nicely with the c... | [
0.2282029241323471,
-0.11893436312675476,
0.21508951485157013,
0.32823219895362854,
-0.016434023156762123,
0.12183135747909546,
-0.15041305124759674,
0.04272192716598511,
-0.022671716287732124,
-0.6828460097312927,
0.33530375361442566,
0.6307423710823059,
-0.06717274338006973,
-0.080267176... | |
Ive been playing around with the Google Calendar API and am getting stuck on something. When i call this below to **delete a calendar event** it works fine on the first pass and usually the second. However, around the 2nd or 3rd time I call this method I get a **(401) Unauthorized error**. It uses the same credentials ... | [
0.3632390797138214,
0.39176851511001587,
0.46725165843963623,
-0.06626490503549576,
0.12265707552433014,
-0.3809753954410553,
0.19067727029323578,
0.29000166058540344,
-0.2535451352596283,
-0.8542608022689819,
0.018734686076641083,
0.5495530962944031,
-0.24009813368320465,
0.09817673265933... | |
myService.setUserCredentials("jo@username.com", "password");
// set the query for the event
EventQuery myQuery = new EventQuery(("http://www.google.com/calendar/feeds/jo@username.com/private/full"));
myQuery.Query = "Cut the grass";
myQuery.StartTime = DateTime.Now;
myQuery.EndT... | [
-0.04970121756196022,
-0.22420430183410645,
0.5387246012687683,
0.23235958814620972,
-0.10664816200733185,
-0.005476549733430147,
0.21979358792304993,
0.29302382469177246,
-0.3216037154197693,
-0.8008301258087158,
-0.2240610122680664,
0.30089443922042847,
-0.08817357569932938,
0.4950958192... | |
{
// execute the query to find the event
myResultsFeed = myService.Query(myQuery);
}
catch (Exception ex)
{
// this is where i get the unauthorized exception | [
-0.009296264499425888,
-0.061906762421131134,
0.24700836837291718,
-0.00403987243771553,
0.3178848326206207,
-0.15072333812713623,
0.45687782764434814,
0.12149053066968918,
-0.19644294679164886,
-0.31379613280296326,
-0.08727368712425232,
0.3052894175052643,
-0.16879071295261383,
0.3260051... | |
// if i reset the credentials here it works fine
myService.setUserCredentials("jo@username.com", "password");
myResultsFeed = myService.Query(myQuery);
}
if (myResultsFeed != null && myResultsFeed.Entries.Count > 0)
{
AtomEntry firstMatchEntry = myResultsFe... | [
-0.18418997526168823,
-0.33353424072265625,
0.4113694131374359,
-0.0684252604842186,
0.3679092526435852,
-0.24653933942317963,
0.6324396729469299,
-0.26424917578697205,
0.058839473873376846,
-0.9547713994979858,
-0.15961696207523346,
0.6381945013999939,
-0.09742344915866852,
0.203262269496... | |
firstMatchEntry.Delete();
}
```
Sorry to ressurect the thread, but there was no accepted answer...
You could also use [Py4J](http://py4j.sourceforge.net/index.html). There is an example on the frontpage and lots of documentation, but essentially, you just call Java methods from your python code as if they wer... | [
-0.20922991633415222,
-0.3621693253517151,
0.16511529684066772,
-0.11987464874982834,
-0.11413339525461197,
-0.1333310902118683,
0.33191701769828796,
-0.28866279125213623,
-0.2573077380657196,
-0.8333950638771057,
-0.0011419435031712055,
0.21938037872314453,
-0.47463706135749817,
0.2047623... | |
= java_object.doThat()
>>> other_object.doThis(1,'abc')
>>> gateway.jvm.java.lang.System.out.println('Hello World!') # call a static method
```
As opposed to Jython, Py4J runs in the Python VM so it is always "up to date" with the latest version of Python and you can use libraries that do not run well on Jython (e.g.... | [
0.3259125053882599,
0.2991751432418823,
0.35177022218704224,
-0.3252307176589966,
-0.03205953538417816,
-0.09167077392339706,
0.4864298701286316,
0.23444899916648865,
-0.24202874302864075,
-0.5230637788772583,
-0.1661076843738556,
0.14639271795749664,
-0.4432494342327118,
-0.04797390103340... | |
What is the smallest Java SVG engine (least/smallest jars) that actually works? If your answer is Batik, what is the minimal dep. graph for getting this to work in a simple Java application?
I've looked at the dependency graph on the Batik site, but it looks like a typical Apache mess. Are there better alternatives?
[... | [
0.14377754926681519,
0.3946593999862671,
-0.187833771109581,
0.11667993664741516,
-0.43383103609085083,
0.16910704970359802,
0.24288897216320038,
-0.09223303198814392,
-0.32558926939964294,
-0.5310489535331726,
0.31892433762550354,
0.268331378698349,
-0.09240922331809998,
0.145919874310493... | |
> **Possible Duplicate:**
>
> [.NET windows application, can it be compressed into a single .exe?](https://stackoverflow.com/questions/126611/net-windows-application-can-it-be-compressed-into-a-single-exe)
To run my App I need `AxInterop.WMPLib.dll` and `Interop.WMPLib.dll` that are located in Debug and Release fol... | [
0.2866019904613495,
-0.002009561052545905,
0.4428706765174866,
0.15608231723308563,
-0.03513114154338837,
0.14918716251850128,
0.19665756821632385,
-0.298761248588562,
-0.5757869482040405,
-0.848050594329834,
-0.218874990940094,
0.38520264625549316,
-0.5005099177360535,
0.06583271920681,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.