text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
at all, it is in this sub-matrix. Now repeat the algo on this sub-matrix... Something along these lines.
[YAAQ: Yet another arrays question.]
I think you cannot hope for more than `O(N)`, which is attainable. (N is the width of the matrix).
Why you cannot hope for more
----------------------------
Imagine a matrix l... | [
-0.14195477962493896,
0.3082513213157654,
0.4423292577266693,
-0.24754497408866882,
-0.16893112659454346,
0.26673078536987305,
0.23585177958011627,
-0.2190597653388977,
-0.33652427792549133,
-0.6687217950820923,
-0.04983772709965706,
0.3299964368343353,
-0.22538898885250092,
0.092681832611... | |
2 2 2
0 0 x 2 2 2 ... 2 2 2
0 x 2 2 2 2 ... 2 2 2
x 2 2 2 2 2 ... 2 2 2
```
where `x` is an unknown number (not the same number, ie. it might be a different one in every column). To satisfy the monotonicity of the matrix, you can place any of 0, 1, or 2 in all of the `x` places. So, to find if there is 1 in the matri... | [
-0.15321484208106995,
0.14191672205924988,
0.051086753606796265,
-0.11735765635967255,
0.032809361815452576,
0.20020312070846558,
0.09686556458473206,
-0.40547463297843933,
-0.08903743326663971,
-0.6564255356788635,
-0.3815593123435974,
-0.05176197737455368,
-0.4812074899673462,
0.04732929... | |
have to find first column indicies with `number > q` (a given number) for all rows. You start in the upper right corner of the matrix; if the number you see is greater, you go left; else go down. End when you are in the last row. The points where you went down are the places you search for. If any of them have the numb... | [
-0.6028848886489868,
-0.0020589556079357862,
0.4470089375972748,
-0.10268207639455795,
0.24590261280536652,
0.36769676208496094,
0.08388760685920715,
-0.13406550884246826,
-0.33058083057403564,
-0.8698692917823792,
-0.36930277943611145,
0.021671824157238007,
-0.3021153211593628,
0.19428338... | |
`O(n)`. | [
-0.09768089652061462,
0.44773149490356445,
0.14960977435112,
-0.4678519368171692,
-0.021772796288132668,
0.20475269854068756,
0.16406093537807465,
0.019382517784833908,
-0.18571723997592926,
-0.45301711559295654,
-0.6831091046333313,
0.22094370424747467,
-0.1585695445537567,
0.325918704271... | |
I have a project involving a web voting system. The current values and related data is stored in several tables. Historical data will be an important aspect of this project so I've also created Audit Tables to which current data will be moved to on a regular basis.
I find this strategy highly inefficient. Even if I o... | [
0.28374284505844116,
0.08155692368745804,
0.3613385260105133,
0.39339563250541687,
0.1725980043411255,
0.2199927419424057,
-0.204975888133049,
-0.22430361807346344,
-0.35490474104881287,
-0.44808676838874817,
0.40387091040611267,
0.05659272521734238,
-0.2270062416791916,
0.1280214339494705... | |
having to build logic to automatically create a view of a given day. This means less stored rows, but considerable complexity.
My final idea is a bit less conventional. Since the historical data will be for reporting purposes, there's no need for web users to have quick access. I'm thinking that my db could have no hi... | [
0.29865026473999023,
-0.13247932493686676,
0.24476908147335052,
0.21244028210639954,
-0.3461877405643463,
0.06402026116847992,
0.2602468729019165,
-0.13987748324871063,
-0.021040432155132294,
-0.6890122890472412,
-0.03116467408835888,
0.17407827079296112,
-0.14112408459186554,
0.3451392948... | |
In fact, SVN could do this for me. When I want the data for a given past day, the system has to retrieve the version for that day and deserialize into objects. This is obviously a costly operation but performance is not so much a concern here. I'm considering using LINQ for this which I think would simplify things. The... | [
0.5894721746444702,
-0.10482335835695267,
0.27165141701698303,
0.6019791960716248,
0.04495168477296829,
-0.10124284029006958,
-0.24252241849899292,
-0.3441452383995056,
-0.5257659554481506,
-0.3912116587162018,
0.09195154905319214,
0.33550840616226196,
-0.11019835621118546,
0.1361954361200... | |
you should be able to generate a report describing the vote state tally at any point in time... no?
For example, say I have a system that tallies favorite features (eyes, smile, butt, ...). If I want to know how many votes there were for a particular feature as of a particular date, then I would simply tally all the v... | [
0.5497605204582214,
-0.010229700244963169,
0.42699509859085083,
0.250238835811615,
-0.09009575098752975,
0.05216136947274208,
0.11613324284553528,
-0.008767741732299328,
-0.33304107189178467,
-0.6526926159858704,
-0.05044591799378395,
0.2950441539287567,
-0.03151359409093857,
-0.2640785574... | |
The premise:
Get a dropdownlist's content based on the value selected in the first one.
Literal data returns successfully.
LINQ queries on a LINQ2SQL Datacontext fail.
Being a total rookie at this MVC/LINQ/jQuery stuff, I battled for HOURS on end trying to figure out what was wrong w/ my understanding of the code. Whe... | [
0.5445778965950012,
0.31118348240852356,
0.17651309072971344,
0.30573800206184387,
-0.16865326464176178,
-0.24872973561286926,
0.589030385017395,
-0.2752634882926941,
0.008266308344900608,
-0.006329298485070467,
-0.10218445956707001,
0.4585471451282501,
-0.14268800616264343,
-0.11458136141... | |
comes to LINQ, but, I think it has to do with the "connectedness" of LINQ2SQL's data. When I create another list representing the queried data, all is well, but if i try to use the queried data itself, jQuery's world falls apart (and without erroring too - which made it hard to figure out).
I would basically like a re... | [
-0.17180228233337402,
0.13889208436012268,
0.4433077573776245,
0.23681826889514923,
-0.13239651918411255,
-0.3936334550380707,
0.09168510884046555,
0.1456231027841568,
-0.15892113745212555,
-0.5181776881217957,
-0.250838041305542,
0.40932050347328186,
-0.2532695233821869,
-0.15986073017120... | |
$(document).ready(function() {
$("#CaseTypeCategoryId").change(function() {
$.getJSON("/Cases/CaseNatures", { caseTypeCategoryId: $("#CaseTypeCategoryId option:selected").val() }, function(data) {
$("#CaseNatureId option").remove();
$("#CaseNatureId").... | [
-0.10227559506893158,
-0.41350358724594116,
0.6370004415512085,
-0.3253522515296936,
0.6241252422332764,
0.23194758594036102,
0.07707546651363373,
-0.37070250511169434,
-0.015288817696273327,
-0.6889033913612366,
-0.6734906435012817,
0.6997900605201721,
-0.3881255090236664,
0.1194293349981... | |
});
});
</script>
<p>
<label for="CaseTypeCategoryId">Case Type:</label>
<%= Html.DropDownList("CaseTypeCategoryId") %>
</p>
<p> | [
-0.31609582901000977,
-0.2238904982805252,
0.6368938088417053,
-0.27301737666130066,
0.36963731050491333,
0.05274197831749916,
-0.049514759331941605,
-0.30752333998680115,
-0.03898162022233009,
-0.46793296933174133,
-0.771095871925354,
0.486606627702713,
-0.35764795541763306,
-0.0947844013... | |
<label for="CaseNatureId">Case Nature</label>
<select id="CaseNatureId" name="CaseNatureId></select>
</p>
```
Controller.aspx
Initially it was just a
```
SelectList() { new ListItem() { Text = "--Select A Case Nature--", Value = "" }}
```
and it worked just fine! Then I tried
```
pub... | [
-0.27810633182525635,
-0.6293178200721741,
0.4160694479942322,
-0.021913010627031326,
0.05245290696620941,
-0.23077110946178436,
-0.054200321435928345,
-0.32456085085868835,
-0.2878599464893341,
-0.656364917755127,
0.11699619144201279,
0.760564923286438,
-0.47240760922431946,
0.17030169069... | |
.ToList());
}
```
This failed - no javascript errors, no compilation issues, couldn't figure it out until i tried dumping the data into a new list manually and i finally settled on:
```
public JsonResult CaseNatures(int caseTypeCategoryId)
{
List returnList = new List();
retu... | [
-0.08249810338020325,
-0.10281940549612045,
0.6804690361022949,
-0.48159924149513245,
0.25559574365615845,
0.02408638782799244,
0.22193856537342072,
-0.49711522459983826,
-0.25938740372657776,
-0.4846023619174957,
-0.3279235064983368,
0.758698046207428,
-0.5979480147361755,
0.0122369350865... | |
});
_caseService.GetCaseNatures(caseTypeCategoryId)
.ToList()
.ForEach(p => returnList.Add(new ListItem() { Value = p.CaseNatureId.ToString(), Text = p.CaseNatureText }));
return this.Json(returnList);
}
```
The `android_id` is supposed t... | [
0.08889234811067581,
0.1279856115579605,
0.470980167388916,
-0.3669438362121582,
0.6908954381942749,
0.4142054617404938,
0.3157351016998291,
-0.3285285234451294,
-0.03803805261850357,
-0.6227207183837891,
-0.47257620096206665,
0.7099323272705078,
-0.7248308658599854,
0.053687866777181625,
... | |
device, however, it has been noted that the id can be changed if you know how [Spoofing android\_id](http://strazzere.com/blog/?tag=android_id)
```
import android.provider.Settings.System;
String android_id = System.getString(this.getContentResolver(), System.ANDROID_ID);
```
In the emulator, the `android_id` does ... | [
-0.010633871890604496,
0.25979846715927124,
0.8002828359603882,
-0.06591255962848663,
0.486458957195282,
-0.06614715605974197,
0.30112993717193604,
-0.10670673847198486,
-0.14627516269683838,
-0.762779712677002,
-0.3045322895050049,
0.6691556572914124,
-0.614020824432373,
0.195095553994178... | |
different devices, unless you used it in conjunction with the `android_id` (and the `android_id` wasn't spoofed) then you could limit them to one device. | [
0.1923636794090271,
-0.05177787318825722,
0.18653328716754913,
0.21941114962100983,
0.06718630343675613,
0.021345047280192375,
-0.008378944359719753,
-0.11916525661945343,
-0.37295660376548767,
-0.6038820743560791,
0.015537459403276443,
0.38612502813339233,
-0.49244219064712524,
-0.0045097... | |
I want to make a *cross-browser* (FF3, IE6, Safari, Opera), *W3C valid* (HTML and CSS both), *stretchable* (horizontally vertically), *without JavaScript* and with *Semantic* and lesser HTML markup **Round CORNER**. *Images can be used for IE6.*
I've tried and tested many techniques available on community. But everyth... | [
0.32411158084869385,
0.20112353563308716,
0.46050816774368286,
-0.04753398895263672,
-0.48053908348083496,
0.08966553211212158,
0.23469135165214539,
0.10235176235437393,
-0.24706833064556122,
-1.0001410245895386,
0.06145680695772171,
0.24120813608169556,
-0.12636131048202515,
0.14191094040... | |
5px;
```
Of course, this doesn't have any effect on IE6 or 7 ~~(it works in IE8)~~ or 8 so you need to implement the nasty stacked division with images for the corners, which doesn't fit your semantic requirement.
I'm not a fan of display-hacks that involve javascript or css-hacks - so I use CSS3 and check that the ... | [
0.1111983209848404,
-0.08790799230337143,
0.38302886486053467,
0.03149435296654701,
-0.3800097703933716,
-0.056680843234062195,
0.04119465500116348,
-0.1445964276790619,
-0.05626498907804489,
-0.8291950821876526,
-0.07560133934020996,
0.6044903993606567,
-0.2676903009414673,
0.027244936674... | |
problem does start to go away - but I understand your desire to make it work on IE6 and above.
**UPDATE: Various CSS3 bits and pieces that were originally planned to be included in IE8 were actually removed from the final release. border-radius was one of the victims.** | [
0.07681924104690552,
-0.09876269102096558,
0.3910321891307831,
0.07473733276128769,
-0.09480499476194382,
-0.09129776060581207,
0.4292595684528351,
0.12242923676967621,
-0.35051149129867554,
-0.3580007553100586,
-0.013508724048733711,
0.18385173380374908,
-0.44032877683639526,
0.0050504012... | |
I have a website in Sharepoint 2007. I use control adapters, specifically an adapter for the menu and the login control. These two adapters resides in a signed assembly that it is deployed to the bin folder of the website.
The browser
```
<browser refID="Default">
<controlAdapters>
<adapter contro... | [
-0.2277601808309555,
-0.026065394282341003,
0.7417883276939392,
-0.14052152633666992,
-0.022761011496186256,
0.12972095608711243,
-0.06329339742660522,
-0.19109776616096497,
0.14427030086517334,
-0.9949405193328857,
-0.023726224899291992,
0.44534868001937866,
-0.25941014289855957,
0.212131... | |
/>
</controlAdapters>
</browser>
```
From time to time I get the following exception, just from time to time, let's say once or twice a day:
```
Unable to create type 'NameofEnterprise.SecondName.Adapters.MenuAdapter'.
```
Things to take in mind: this happens in the machine I develop, I don't know if t... | [
0.19416388869285583,
0.12957079708576202,
0.19731442630290985,
-0.10462396591901779,
-0.017845096066594124,
-0.1583448052406311,
0.29843592643737793,
-0.06941388547420502,
-0.3309106230735779,
-0.7611597180366516,
-0.15375196933746338,
0.21682056784629822,
-0.3889392912387848,
0.2722136080... | |
you tell me what can be the problem? Can I be more specific to tell the framework the name of the assembly (in the browser you only write the name of the class and namespace)?
**SOLUTION**
Finally i have used the 2 advices you have given me. I think that with the first thing is enough, that is to say:
```
<system.we... | [
0.19409789144992828,
0.20562206208705902,
-0.12103688716888428,
0.03811042383313179,
-0.1846378743648529,
0.12145174294710159,
0.14692753553390503,
-0.45642369985580444,
-0.3119817078113556,
-1.0206117630004883,
0.15085385739803314,
0.5337679386138916,
-0.19332222640514374,
-0.151977732777... | |
refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.Menu"
adapterType="NameofEnterprise.SecondName.Adapters.MenuAdapter", YourAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=YourPublicKeyToken"/>
</controlAdapters>
```
You should modify you... | [
-0.06126749515533447,
0.027585621923208237,
0.4147588908672333,
0.07535962760448456,
0.14556941390037537,
-0.10459765046834946,
0.3315279185771942,
-0.47644418478012085,
-0.2565020024776459,
-0.6600359678268433,
-0.03883127495646477,
0.44280344247817993,
-0.43354329466819763,
0.20462277531... | |
*nothing* to do with Asp.net errors. Though you can clear them if it makes you feel better. | [
0.4222653806209564,
0.2579174339771271,
0.017667267471551895,
0.20686468482017517,
-0.12569259107112885,
-0.011396794579923153,
0.38399001955986023,
0.45270097255706787,
-0.510340690612793,
-0.617013692855835,
-0.01014629378914833,
0.1702624410390854,
-0.017897101119160652,
0.0414052456617... | |
[VS 2005](http://msdn.microsoft.com/en-us/library/ms171945(VS.80).aspx) did include a designer for XSD-Files.
Where i can find the version for VS 2008?
I only found a preview version for [VS 2008 beta 2](http://www.microsoft.com/downloads/details.aspx?FamilyID=4de12c98-1221-4a0e-b5aa-bfc7daf02550&DisplayLang=en).
I ... | [
0.04799265414476395,
-0.015363607555627823,
0.4105157256126404,
0.06344476342201233,
-0.40214768052101135,
-0.23242218792438507,
0.2519264817237854,
-0.2504885792732239,
0.11651615053415298,
-0.6548526287078857,
0.07247838377952576,
0.4625423550605774,
-0.210638165473938,
0.010049706324934... | |
at XML Spy. This is what we have just purchased (after using the free trial) to validate and re-do our schemas. | [
0.4610736668109894,
-0.18649089336395264,
0.27598288655281067,
0.3639417588710785,
-0.16793203353881836,
-0.53693026304245,
-0.03437676653265953,
-0.2069597691297531,
0.048759885132312775,
-0.4978642463684082,
0.020251845940947533,
0.42453545331954956,
-0.02631165273487568,
-0.288320749998... | |
Given an interface or interfaces, what is the best way to generate an class implementation?
```
interface Vehicle
{
Engine getEngine();
}
@Generated
class Car implements Vehicle
{
private final Engine engine;
public Car(Engine engine)
{
this.engine = engine;
}
public Engine getEngine... | [
-0.20834727585315704,
-0.05652841925621033,
0.18928088247776031,
0.2516416609287262,
-0.13897527754306793,
0.3983364701271057,
0.11887107789516449,
-0.302268922328949,
0.2382327765226364,
-0.6616488695144653,
0.006016229745000601,
0.9152341485023499,
-0.3444053828716278,
-0.041087713092565... | |
interface. Ideally, covariant return types in the interfaces would be handled. The implementation should favour immutability by using private final variables and constructor instantiation. The equals, hashCode and toString methods should be generated.
The cleaner way is using [CGLIB](http://cglib.sourceforge.net/) to g... | [
0.08626516908407211,
-0.09520768374204636,
0.6274707913398743,
0.04237804561853409,
-0.1332785189151764,
0.27271556854248047,
-0.053018588572740555,
-0.3305477499961853,
-0.14454048871994019,
-0.9086487293243408,
0.12470219284296036,
0.6792178153991699,
-0.5182128548622131,
-0.001708438503... | |
= x.method(JMod.PUBLIC, cm.VOID, pd.getReaderMethod().getName());
g.body()...
s = x.method(JMod.PUBLIC, cm.VOID, "set" + pd.getName());
s.body()...
}
hc = x.method(JMod.PUBLIC, cm.VOID, "hashCode"));
hc.body()...
cm.build(new File("target/generated-sources"));
```
Or as suggested previously, use the IDE ... | [
0.23741953074932098,
0.1037440299987793,
0.6058545708656311,
0.05320607125759125,
-0.19561932981014252,
0.034663815051317215,
-0.11107729375362396,
-0.48108789324760437,
-0.1452944129705429,
-0.5798509120941162,
-0.43335089087486267,
0.42878103256225586,
-0.2647891938686371,
-0.06707920879... | |
I know all kinds of ostreams holds their own internal buffers.
I have to know whether there is some kind of ostream which accept an instance std::string and write on that instance.
(I want to avoid redundant copies)
**Note:** My question is about the standard library, don't offer me other libraries that can do that, ... | [
0.039270710200071335,
0.14180897176265717,
0.5533256530761719,
-0.11531570553779602,
-0.0002587441704235971,
0.20385703444480896,
0.1492413878440857,
0.06318890303373337,
-0.15429480373859406,
-0.5591449737548828,
-0.08698254078626633,
0.5918821096420288,
-0.3169618248939514,
0.01057568471... | |
such that it won't copy str contents into some internal buffer but rather write to the same instance of str.
**Edit #2**
I need it for performece reasons , ostringstream will make a memcopy when created with a string and will also make a memcpy when the contents are retrieved.
If you are asking can you alter the buffe... | [
0.11916032433509827,
0.18676404654979706,
0.5917655825614929,
-0.07160286605358124,
0.0822562724351883,
0.10934879630804062,
0.3980911076068878,
-0.08421234786510468,
-0.1633037030696869,
-0.8371116518974304,
-0.018070008605718613,
0.4619869589805603,
-0.36578482389450073,
-0.1705883741378... | |
to implement an unbuffered output stream - it begins on page 229 of the book. It's too long to reproduce here, but basically you need to redefine the overflow() method of a derived streambuf class.
Note the book is not available on-line but the source code apparently is - see this [page](http://www.angelikalanger.com... | [
0.12777622044086456,
0.10967016220092773,
0.2095480114221573,
-0.13576830923557281,
0.09122663736343384,
0.16583152115345,
0.6337054967880249,
0.05300268158316612,
-0.09964419156312943,
-0.33131879568099976,
0.011380073614418507,
0.19454295933246613,
-0.4478644132614136,
-0.215662583708763... | |
I'm looking for the best way to store a configuration file in an LDAP server.
My application used to save the user settings in an xml file. The user logins have been centralized in an LDAP server. The users are stored as "inetOrgPerson" in the LDAP server.
I would like to attach the xml file to each user.
What would b... | [
0.23260198533535004,
-0.02956058643758297,
0.3180825710296631,
0.24249465763568878,
-0.05017749220132828,
-0.17525869607925415,
-0.17954812943935394,
0.10189807415008545,
0.05394453927874565,
-0.8921371698379517,
0.0222694743424654,
0.6323304176330566,
-0.2150099128484726,
0.05214282497763... | |
in the LDAP schema. LDAP is ill suited to storing files or other large entries.
You can, of course, store the entire file either as a string or as binary data in the LDAP directory. But I suggest that you instead store the path to a network-accesible file, and use a proper network file system to store the actual file. | [
-0.009733464568853378,
-0.09510725736618042,
0.23535868525505066,
0.13019166886806488,
-0.15128612518310547,
-0.592938244342804,
-0.12304527312517166,
0.03858128935098648,
-0.011480603367090225,
-0.6484382152557373,
-0.4400991201400757,
0.47611135244369507,
-0.6651010513305664,
-0.08698016... | |
By creating datastore models that inherit from the Expando class I can
make my model-entities/instances have dynamic properties. That is
great! But what I want is the names of these dynamic properties to be
determined at runtime. Is that possible?
For example,
```
class ExpandoTest (db.Expando):
prop1 = db.StringPro... | [
-0.06459560245275497,
-0.27454185485839844,
0.3250415325164795,
0.043681804090738297,
0.28855234384536743,
-0.1677926778793335,
-0.029842374846339226,
-0.2325436770915985,
-0.3216579258441925,
-0.763215959072113,
-0.14737892150878906,
0.7724377512931824,
-0.29295316338539124,
0.14168030023... | |
but as I am a python noob I ended up posting the question that you see above.
For the code sample that I had used, this is what needs to be done:
```
entity_two.__setattr(some_variable, some_value) #where some_variable is populated by user at runtime :)
``` | [
0.301794171333313,
0.27425870299339294,
0.0371982716023922,
-0.3188389837741852,
-0.08686692267656326,
-0.1900036484003067,
-0.05759773403406143,
0.29027339816093445,
-0.28395310044288635,
-0.373785138130188,
0.017393795773386955,
0.29566138982772827,
-0.3791492283344269,
0.013107086531817... | |
Given 2 timestamps in postgres, how do you calculate the time difference without counting whole Saturdays and Sundays?
OR
How do you count the number of Saturdays and Sundays in a given time interval?
The following function is returning the number of full weekend days between two dates. As you need full days, you can... | [
0.536978542804718,
-0.256095290184021,
0.7333862781524658,
-0.17556346952915192,
0.017018772661685944,
0.11353879421949387,
0.2998736500740051,
-0.18983283638954163,
-0.2870858311653137,
-0.43211013078689575,
-0.06133599206805229,
0.5476690530776978,
-0.14746670424938202,
0.279739290475845... | |
(($2 - $1) / 7) * 2
+
(EXTRACT(dow FROM $1)<6 AND EXTRACT(dow FROM $2)>0 AND EXTRACT(dow FROM $1)>EXTRACT(dow FROM $2))::int * 2
+
(EXTRACT(dow FROM $1)=6 AND EXTRACT(dow FROM $2)>0)::int
+
(EXTRACT(dow FROM $2)=0 AND EXTRACT(dow FROM $1)<6)::int
);
$BODY$
LANGUAGE 'SQL'... | [
-0.2641158998012543,
0.07362604141235352,
0.7833344340324402,
-0.32298675179481506,
0.04787684231996536,
0.19893673062324524,
0.06832391768693924,
-0.67546147108078,
-0.3194679021835327,
-0.10645593702793121,
-0.17203281819820404,
0.6572464108467102,
-0.010685434564948082,
0.21771937608718... | |
Saturday, so it shouldn't be counted as full day)
SELECT COUNT_FULL_WEEKEND_DAYS('2009-04-12', '2009-04-20');
# returns 2 (12th is Sunday, so it shouldn't be counted as full day)
SELECT COUNT_FULL_WEEKEND_DAYS('2009-04-13', '2009-04-20');
# returns 2
```
To obtain the number of days except full weekend days, simply... | [
0.129563108086586,
-0.2875635027885437,
0.7594896554946899,
-0.25394290685653687,
0.026082037016749382,
0.14554625749588013,
0.4830731749534607,
0.22943171858787537,
-0.5471471548080444,
-0.01663224957883358,
-0.42805272340774536,
0.6812909245491028,
-0.18448148667812347,
-0.00411961879581... | |
I have a query returning a column of floating point numbers but I am only interested in the number before the decimal place. I don't want to round the number so I am looking for something like:
```
1.95 = 1
1.45678 = 1
12.00 = 12
12.9999 = 12
```
Is there an easy way to achieve this in SqlServer other than doing a s... | [
0.3064174950122833,
0.47709283232688904,
0.22049717605113983,
0.1188158467411995,
0.08834786713123322,
-0.18985781073570251,
-0.0650612935423851,
-0.1576004922389984,
-0.5702640414237976,
-0.42908838391304016,
0.03136087581515312,
0.21502947807312012,
0.0865265429019928,
0.2122872173786163... | |
Hallo,
Recently I have read a couple of posts on varous sites and blogs that ASP.NET Repeater one of the most commonly used and accepted between experienced programmers.
Someone actually wrote that he consider the asp.net programmer better if he mentions that he often use this control in a job interview.
The fact that... | [
-0.2600599527359009,
-0.12033411115407944,
0.6574425101280212,
0.21282801032066345,
-0.2234267294406891,
-0.32160189747810364,
0.10275642573833466,
0.16105379164218903,
-0.34964942932128906,
-0.639514148235321,
-0.17644594609737396,
0.3058832287788391,
-0.22994907200336456,
0.4749843478202... | |
//Instantiate controls
//do something with them
}
public bool Checked
{
get{ return chb.Checked;}
}
public string Text
{
get{ return txt.Text; }
}
}
public partial class MyParentControl : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
//
}... | [
0.07495997101068497,
-0.3313737213611603,
0.4687149226665497,
0.03485869988799095,
0.23170702159404755,
-0.022109748795628548,
0.23937545716762543,
-0.056151311844587326,
-0.05944301187992096,
-0.6115040183067322,
-0.5506465435028076,
0.5855939984321594,
-0.43084412813186646,
0.03726689517... | |
MyUserControl ctr = new MyUserControl();
ctr.Text="some value";
ctr.Checked= false;
this.Panel1.Controls.Add(ctr);
}
}
protected void btn_Click(object sender, EventArgs e)
{
foreach (MyUserControl dControl in this.Panel1.Controls.OfType<MyUserControl>())
{
... | [
-0.1705361008644104,
-0.015083309262990952,
0.7942416667938232,
-0.24203325808048248,
0.2709524929523468,
0.2140561193227768,
0.42925897240638733,
-0.13656245172023773,
-0.19962874054908752,
-0.3818722367286682,
-0.5604434013366699,
0.4203587770462036,
-0.4127589464187622,
0.16984368860721... | |
}
}
```
I have never had a problem with this code even when I added the events on MyUserControl. Of course, that it's possible to achieve the same with repeater control, but I would like to know why(or is it) better to use repeater.
What are the benefits if I use repeater instead?
Thanks
You can use the [floor func... | [
0.36109694838523865,
0.1632489413022995,
0.13863195478916168,
0.11007987707853317,
0.31585314869880676,
-0.33968549966812134,
0.15889312326908112,
0.3485950529575348,
-0.26106125116348267,
-0.8400339484214783,
0.02093791961669922,
0.5922853350639343,
-0.07566047459840775,
0.335447520017623... | |
Say we have two tables in an MS Access db:
Service Users:
```
| ID | Name | Other details... |
| 1 | Joe | Blah... |
| 2 | Fred | Qwerty... |
| 3 | Bob | Something else...|
```
Teams providing services:
```
| ID | TeamID | UserID |
| 1 | T1 | 1 |
| 2 | T2 | 1 |
| 3 | | [
-0.1338481605052948,
0.18848101794719696,
0.2854933440685272,
0.07991185039281845,
-0.018952390179038048,
0.4005223214626312,
-0.025890300050377846,
-0.09326323121786118,
-0.17027385532855988,
-0.7989251613616943,
-0.10829939693212509,
0.490368127822876,
-0.24312563240528107,
0.02120921015... | |
T2 | 2 |
| 4 | T3 | 2 |
| 5 | T3 | 3 |
```
I need to produce a summary query that produces a single row for each user, with the first several teams (by TeamID) assigned sitting in separate columns. Like:
Query:
```
| UserID | Name | Team1 | Team2 |
| 1 | Joe | T1 | T2 |
| | [
-0.23540490865707397,
-0.08959078788757324,
0.026357974857091904,
-0.16142340004444122,
-0.07620029151439667,
0.4291982352733612,
0.15469707548618317,
-0.218232199549675,
-0.2442239224910736,
-0.7269514799118042,
-0.18704426288604736,
0.11005731672048569,
-0.40412968397140503,
-0.422815114... | |
2 | Fred | T2 | T3 |
| 3 | Bob | T3 | Null |
```
I can get the Team1 column using max() from a sub select query, but I'm having a complete mental block on how to achieve Team2, Team3, etc. (Yes, I know that if there are more teams assigned to a user than I create columns the query will lose that ... | [
-0.16651447117328644,
-0.19940830767154694,
0.24044282734394073,
-0.16558703780174255,
-0.14227379858493805,
0.1428171545267105,
0.4632520377635956,
-0.3361737132072449,
-0.29867464303970337,
-0.5645016431808472,
-0.07093024253845215,
0.3755141496658325,
-0.49061235785484314,
-0.4959038794... | |
be fixed (in the actual query, there will always be 7). If there are less teams than columns the additional columns should be Null (as in example). If there are more teams than columns, only the first 7 teams will be shown in this summary.
Edit 2 - Possible solution which doesn't work...:
I tried...
```
SELECT UserT... | [
-0.5427060723304749,
-0.06560976058244705,
0.47084560990333557,
0.1740313470363617,
-0.013103636913001537,
0.2568579316139221,
0.39914605021476746,
-0.4714885652065277,
-0.2696792185306549,
-0.7477511763572693,
-0.2828054130077362,
0.3969380259513855,
-0.49409180879592896,
-0.2157506048679... | |
UserTable.ID = TeamTable.UserID
AND TeamID <> Team1 ORDER BY TeamID) As Team2
FROM UserTable
```
... throws up a parameter box for Team1. An ideas on how to skip the first/second/etc... values from an jet query?
First, you need a query to assign a number from 1 to N to the teams associated to a user:
```
SELECT User... | [
-0.3205737769603729,
-0.19646835327148438,
0.21134810149669647,
-0.029447197914123535,
-0.2513548731803894,
0.02635178714990616,
-0.04488737881183624,
-0.5156568288803101,
-0.41455501317977905,
-0.7711794972419739,
-0.012751896865665913,
0.3691347539424896,
-0.49263933300971985,
-0.2827349... | |
a different position:
```
SELECT UserTable.ID As UID, UserTable.Name,
(SELECT TeamID FROM TeamList WHERE UserTable.ID = TeamList.UserID AND position=1) As Team1,
(SELECT TeamID FROM TeamList WHERE UserTable.ID = TeamList.UserID AND position=2) As Team2,
[...]
FROM UserTable
```
You could assemble all this... | [
-0.33906078338623047,
-0.22726045548915863,
0.1750856190919876,
-0.12369338423013687,
-0.306289404630661,
0.04073147103190422,
-0.06394850462675095,
-0.5312827825546265,
-0.38387590646743774,
-0.8003752827644348,
-0.16336221992969513,
0.22857747972011566,
-0.26245301961898804,
-0.248088851... | |
the <= comparison will generate wrong numbers).
Obviously, with a big number of rows performance would be terrible, but for a few hundreds it could be acceptable. You have to try. | [
0.17227986454963684,
0.043948832899332047,
0.2397582083940506,
0.2316967099905014,
0.07111773639917374,
0.2264367938041687,
0.2971770763397217,
-0.21563519537448883,
-0.09926287084817886,
-0.7987087965011597,
0.20290811359882355,
0.7036595940589905,
-0.02461118809878826,
0.0150917507708072... | |
I have added some dynamic textboxes upon a button click. I need the values in the click event of another button click. How can I achieve that?
Have you tried using the `FindControl(string id)` method on the ParentControl (for example, a panel) to find them?
```
protected void btnDoStuff_click(Object sender, EventArgs ... | [
-0.02603020891547203,
-0.17609061300754547,
0.6659269332885742,
-0.18602727353572845,
0.19530750811100006,
0.07135170698165894,
0.27528226375579834,
-0.22401843965053558,
-0.259779155254364,
-0.6817010045051575,
-0.18318738043308258,
0.7519403696060181,
-0.40063533186912537,
0.066306799650... | |
How can I password protect my website during development with htaccess in Cakephp?
* which htaccess file do I have to change?
* what do I have to write in the htaccess
* where do I put the .htpasswd?
I searched google for that but couldn't find anything useful, I hope you could help me!
---
Thanks Till that helped ... | [
0.04228353500366211,
0.04115530475974083,
0.5166727900505066,
0.12174615263938904,
-0.03520211949944496,
-0.19777409732341766,
0.4828469455242157,
-0.24060620367527008,
0.09016375243663788,
-0.9755601286888123,
-0.4908781051635742,
0.5936940312385559,
-0.20193380117416382,
-0.0905171185731... | |
your real password, I created it with this tool: <http://tools.dynamicdrive.com/password/>
I think there are much more ways to create this, but for me it worked and maybe this helps other cakephp users too.
You probably have a `.htaccess` in your document root, so you would add to this file since it's the *first* so t... | [
0.16915787756443024,
0.02519957534968853,
0.6062964797019958,
0.11623167991638184,
-0.07422072440385818,
-0.2256603091955185,
0.4026317894458771,
-0.04106820374727249,
0.00871261116117239,
-0.8158968091011047,
-0.0854659155011177,
0.8398855328559875,
-0.05502833053469658,
-0.17108967900276... | |
read the above howto anyway! | [
0.3867761194705963,
0.2478116899728775,
0.16899222135543823,
0.1351122111082077,
0.25691694021224976,
-0.4018777310848236,
0.2517217993736267,
0.21982251107692719,
0.061069756746292114,
-0.2014976292848587,
0.04551292210817337,
0.39394956827163696,
0.11632503569126129,
0.06152307987213135,... | |
I'm looking for something that works in PHP and is similar to crystal reports. I basically need to have a layout setup that means I can output invoices just by inserting the data, and then send it to a printer.
The closest I've found so far is PDFB, but It's a bit of a pain as it needs to have precise positioning.
I... | [
0.5089133977890015,
0.15869542956352234,
0.3981612026691437,
0.28027021884918213,
-0.12653374671936035,
-0.09175678342580795,
-0.2215510606765747,
0.09050305187702179,
-0.032727550715208054,
-0.8401343822479248,
0.3606205880641937,
0.20940613746643066,
-0.09004326164722443,
0.0425260737538... | |
too (though these can be generated as a GD image)
Another requirement is that this must be FLOSS
Use XML + XSL:FO with [Apache FOP](http://xmlgraphics.apache.org/fop/) via [PHP-JavaBridge](http://php-java-bridge.sourceforge.net/pjb/).
Here is how: <http://wiki.apache.org/xmlgraphics-fop/HowTo/PHPJavaBridge>
> PostSc... | [
0.23417937755584717,
-0.17714843153953552,
0.8313277363777161,
0.31760621070861816,
-0.0974762812256813,
-0.4051171541213989,
-0.02315361425280571,
-0.06678085774183273,
-0.07339883595705032,
-0.5577775835990906,
0.052057359367609024,
0.44537267088890076,
-0.2717277705669403,
-0.1144552901... | |
Is it possible to consume a php webservice in visual studio? I have a webservice with a wsdl file created by nusoap, when I try to add the web reference in visual studio the name of the service and the methods show up but it complains that the 'wsdl is not a known document type' and the discovery document could not be ... | [
0.6642013788223267,
0.1469428390264511,
-0.25687602162361145,
0.46960774064064026,
-0.2615119218826294,
-0.3322993218898773,
0.12548398971557617,
0.1346539855003357,
-0.22281412780284882,
-0.5399870872497559,
0.20012688636779785,
0.6694758534431458,
-0.019731221720576286,
-0.02701656334102... | |
a asmx? I think that is just for the .net side though.
* I 'm trying with nusoap because it automatically creates the wsdl for you, however I did try the inbuilt soap handing of php first with my own wsdl file but got the same error as with nusoap.
* Seems the problem in the end was really my webserver, my files where ... | [
0.44329074025154114,
-0.2394322156906128,
0.10179726779460907,
0.3134075105190277,
-0.674058198928833,
-0.07774222642183304,
0.44593772292137146,
-0.040952976793050766,
-0.33995822072029114,
-0.438973993062973,
0.46499428153038025,
0.703062117099762,
-0.35436996817588806,
-0.26175358891487... | |
the service? It may be that your service is generating an invalid .wsdl file. | [
0.42706793546676636,
0.032427649945020676,
-0.028760505840182304,
0.34264394640922546,
0.10760151594877243,
-0.40919485688209534,
0.4606531858444214,
0.12846584618091583,
-0.2195422649383545,
-0.35902175307273865,
-0.14884331822395325,
0.3311402201652527,
-0.19797801971435547,
0.4797022640... | |
I'm Serializing an ArrayList to a binary file in order to send it across TCP/IP. The serialized file is created by the server and I hope to be able to deserialize it with the client that I'm writing at the moment.
However, when the client attempts to deserialize it throws a SerializationException because it can't find... | [
0.6067401766777039,
-0.10984286665916443,
0.15085603296756744,
0.09182415157556534,
-0.16199591755867004,
-0.005394835025072098,
0.09089888632297516,
-0.10521084815263748,
-0.2771405279636383,
-0.7651147246360779,
0.25469133257865906,
0.3028810918331146,
-0.5212469100952148,
0.519843101501... | |
arraylist. | [
0.22996358573436737,
-0.07337325811386108,
0.0376468263566494,
-0.16821905970573425,
-0.490898996591568,
-0.23110449314117432,
0.07399920374155045,
-0.2696535885334015,
-0.38144445419311523,
-0.5524268746376038,
-0.22674882411956787,
0.2276945412158966,
-0.36746129393577576,
-0.05630518868... | |
What I'm trying to do is to create a table pager control using jQuery.
It contains lots of links and spans. I've managed to do this with plain string concatenation, but I can't believe that jQuery can't make this more elegant.
I can't use jTemplates here since the generation has quite a bit of procedural logic.
Questi... | [
0.3690585792064667,
-0.046711910516023636,
0.4123084545135498,
0.29363125562667847,
-0.3280641436576843,
0.011003409512341022,
0.04343768209218979,
-0.13889864087104797,
-0.2563807964324951,
-0.6347818374633789,
-0.0030156478751450777,
0.20244602859020233,
-0.4909714162349701,
-0.166233360... | |
I'm using NSXMLParser to parse XML data from a remote server. I followed a tutorial to get up and running and everything is ok for any (NSString \*) members I have in my objects that I'm creating. I also have integers that I need to set from the XML data, such as:
```
<root>
<child>
<name> Hello </name>
... | [
-0.16520832479000092,
0.07259302586317062,
0.45029622316360474,
0.041791606694459915,
0.2083369344472885,
0.1530711054801941,
0.14756441116333008,
-0.09042136371135712,
-0.3004065155982971,
-0.8093476891517639,
0.02592259645462036,
0.008987889625132084,
-0.10738462209701538,
0.305112183094... | |
<number> 456 </number>
</child>
</root>
```
In this case I would be creating two "child" objects. I'm using:
```
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
...
[aChild setValue:currentElementValu... | [
-0.11385885626077652,
0.14178773760795593,
0.09315139800310135,
-0.14198216795921326,
0.13639937341213226,
0.36664915084838867,
0.17123255133628845,
-0.46714189648628235,
-0.0900733545422554,
-0.6342853307723999,
0.11458475887775421,
0.369378000497818,
-0.21844889223575592,
0.4174021184444... | |
look for the node manually:
```
if([elementName isEqualToString:@"number"]) {
aChild.number = [currentElementValue intValue]
}
```
This is okay, I can deal with that because I know what nodes I'll be getting, but it gets worse. When currentElementValue is an "NSMutableString \*" as per the tutorial, it does not ... | [
-0.4737066924571991,
-0.17574626207351685,
0.7371115684509277,
-0.17291024327278137,
0.3482062816619873,
-0.03002225048840046,
0.36426493525505066,
-0.0617113932967186,
-0.2732100188732147,
-0.5851174592971802,
0.11034316569566727,
0.5174745917320251,
-0.22721607983112335,
0.20416814088821... | |
that the reason it is an NSMutableString is because the:
```
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
```
Delegate used to set the value *can* occur more than once, but typically does not. So my question is does anybody know what I'm doing wrong? This seems like a pretty trivial case f... | [
0.1994088739156723,
0.17526158690452576,
0.10652769356966019,
0.008207481354475021,
-0.08261096477508545,
-0.313293993473053,
0.4096314609050751,
0.14067251980304718,
-0.15169669687747955,
-0.49214231967926025,
-0.0575629323720932,
0.4519389569759369,
-0.24928101897239685,
0.30040287971496... | |
If you can remove it at the source, great. If not, you can strip it out on the receiving end by doing:
```
currentElementValue = [currentElementValue stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
```
The reason you couldn't use key/value is that you can't store an NSInteger... | [
-0.47994494438171387,
-0.15244697034358978,
0.45333513617515564,
-0.02881031297147274,
0.0544021837413311,
0.035670068114995956,
0.44772058725357056,
-0.24822036921977997,
-0.08945643156766891,
-0.4423418939113617,
0.048230383545160294,
0.5337651968002319,
-0.2008531391620636,
0.3877746164... | |
If I have some `text` that I want to print out on a page, but only want to print say the first 100 words before eclipsing it... what's the easiest way to do this?
How's this for a start:
```
def first_words(s, n)
a = s.split(/\s/) # or /[ ]+/ to only split on spaces
a[0...n].join(' ') + (a.size > n ? '...' : '')
e... | [
0.009494134224951267,
-0.022157978266477585,
0.23391464352607727,
-0.22392237186431885,
-0.20777960121631622,
0.35336989164352417,
0.2877322733402252,
-0.3622981309890747,
-0.4266830384731293,
-0.841968834400177,
-0.391755074262619,
0.2855490446090698,
-0.2652980089187622,
-0.3318682909011... | |
b c d
``` | [
0.30738064646720886,
0.8046524524688721,
-0.1567421406507492,
-0.3256396949291229,
-0.12039856612682343,
-0.2814461290836334,
0.2528768479824066,
0.21134968101978302,
0.2431263029575348,
-0.3204636573791504,
-0.6130587458610535,
0.12140513956546783,
-0.3169160485267639,
0.351990669965744,
... | |
I like the Unit test runner in ReSharper 4.5, and would like to use it with my MSTest tests, but one thing annoys me:
In some of our solutions, we have set up some Deployment Items in the .testrunconfig file. The ReSharper Unit Test runner does not seem to respect this, so I get errors when trying to run the unit test... | [
0.40585172176361084,
-0.3023228347301483,
0.27388569712638855,
0.1353498250246048,
-0.09294632822275162,
0.05276164039969444,
0.3128621280193329,
0.06493503600358963,
-0.19421149790287018,
-1.0104053020477295,
0.1619347780942917,
0.9138769507408142,
0.09612226486206055,
0.15687966346740723... | |
the controls to do that appears. (That was not obvious or discoverable, at least not for me ;-)
Have you had a look in the Unit Testing options page? There's a setting there to allow you to use a specified test run configuration, or a test run configuration specified in a metadata file. I'm not sure what it means - I'v... | [
0.44041168689727783,
-0.3491782546043396,
0.1914484202861786,
0.4902811050415039,
0.27184122800827026,
-0.1167321726679802,
-0.22020117938518524,
-0.01586836576461792,
-0.1868533194065094,
-0.39354926347732544,
0.2240661084651947,
0.688865602016449,
0.051500990986824036,
-0.107979528605937... | |
Is it possible to get the 'nth' return value from a function without having to create dummy variables for all `n-1` return values before it?
Let's say, I have the following function in MATLAB:
```
function [a,b,c,d] = func()
a = 1;
b = 2;
c = 3;
d = 4;
```
Now suppose, I'm only interested in the *third* return valu... | [
-0.13624387979507446,
0.14942337572574615,
0.14772595465183258,
-0.36919328570365906,
-0.2946431040763855,
0.1637876182794571,
0.3026047945022583,
-0.24357467889785767,
-0.023573677986860275,
-0.42144492268562317,
0.006614839192479849,
0.632215678691864,
-0.30594247579574585,
0.01332983467... | |
, variableThatIWillUse, ] = func;`
`variableThatIWillUse = func(3);`
`variableThatIWillUse = func()(3);`
Are there any *elegant* ways to do this that do work?
---
So far, the best solution is to simply use the `variableThatIWillUse` as a dummy variable. This saves me from having to create a real dummy variable tha... | [
0.2508358359336853,
0.3144739270210266,
0.3088895380496979,
-0.12465914338827133,
-0.18211358785629272,
-0.0064142365008592606,
0.4237948954105377,
-0.27415308356285095,
0.07817437499761581,
-0.42711928486824036,
0.03856661170721054,
0.6382450461387634,
-0.6556681990623474,
0.2203209251165... | |
quick example function:
```
Func3 = @() deal(1,2,3);
[a,b,c]=Func3();
% yields a=1, b=2, c=3
```
Now the key here is that if you use a variable **twice** on the left-hand side of a multiple-expression assignment, an earlier assignment is clobbered by the later assignment:
```
[b,b,c]=Func3();
% yields b=2, c=3
[c,... | [
-0.22864918410778046,
-0.06852665543556213,
0.138041153550148,
-0.3795434236526489,
-0.07853900641202927,
0.139373317360878,
0.3100671172142029,
-0.4184700548648834,
-0.2430066019296646,
-0.5001144409179688,
-0.4606899917125702,
0.7284359931945801,
-0.44726699590682983,
-0.1077911555767059... | |
In Rails, I find that timestamps in the console look different to the actual html view even when you have the same code. Unless I'm doing something really stupid:
```
>> article = News.first
=> #<News id: 1, title: "Testing", body: "yadda yadda", role_id: 1, created_at: "2009-04-12 05:33:07", updated_at: "2009-04-12 0... | [
0.12227139621973038,
0.11637210845947266,
0.24159389734268188,
-0.07127077877521515,
-0.12594345211982727,
-0.06593575328588486,
0.31959250569343567,
-0.06483582407236099,
-0.02275635115802288,
-0.7582494616508484,
0.31658199429512024,
0.8436946868896484,
-0.05792521685361862,
-0.270265966... | |
<% @date = @current_date %>
<% end %>
```
The output will be:
```
2009-04-14
```
Why are the formats different?
In config/initializers/time\_formats.rb, write:
```
Time::DATE_FORMATS[:article] = "%a, %d %B %Y"
``` | [
-0.05979680269956589,
0.01808035746216774,
0.6701613664627075,
-0.16190075874328613,
0.2746603488922119,
0.08443888276815414,
-0.1940310001373291,
0.11464454978704453,
-0.10465364903211594,
-0.6016600131988525,
-0.4349593222141266,
0.5023245811462402,
-0.15551719069480896,
0.23185503482818... | |
In a page I use a tabstrip with its own stylesheets. This tabstrip writen with divs and anchors.
I add some other divs into tabs but they inherit stylesheet from the outer tabstrip. This new divs has their own css classes.
Here is my question, are there a way to break this inheritance without changing the structure... | [
-0.05481984093785286,
0.20998349785804749,
0.9663862586021423,
-0.0737108662724495,
-0.3224729001522064,
0.14246636629104614,
0.18450650572776794,
-0.2715038061141968,
-0.16305941343307495,
-0.7802554965019226,
-0.2137366533279419,
0.08441143482923508,
-0.2747320830821991,
0.06142581999301... | |
1px solid #003366;
}
```
New added divs use this classes :
```
.graphTextItem{ font-family:sans-serif; font-size:12px; border: solid 1px #78ACFF; text-align:center; width:150px; }
.graphImageItem{ border-left: solid 1px #78ACFF; border-right: solid 1px #78ACFF; text-align:center; height:70px; }
```
By removing **d... | [
-0.38058969378471375,
-0.06964457780122757,
0.9404923319816589,
0.10098229348659515,
-0.2629898190498352,
0.1414061039686203,
0.33398470282554626,
-0.2823243737220764,
-0.3852149248123169,
-0.667219877243042,
-0.3404839038848877,
0.2733907103538513,
-0.43206506967544556,
-0.061343807727098... | |
Where do JVM Implementations differ (except licensing)?
Does every JVM implement Type Erasure for the Generic handling?
Where are the differences between:
* JRockit
* IBM JVM
* SUN JVM
* Open JDK
* Blackdown
* Kaffe
.....
Deals one of them with Tail-Call-Optimization?
JVM implementations can differ in the way they i... | [
0.41682419180870056,
0.24618038535118103,
0.12019557505846024,
-0.006820661947131157,
-0.2263910472393036,
-0.2966119647026062,
0.35729724168777466,
-0.09027933329343796,
-0.20260970294475555,
-0.38704630732536316,
-0.1270456165075302,
0.3232731819152832,
-0.3240310549736023,
0.15841838717... | |
and access to source code.
Note: While a J2EE server runs on the JVM, some servers have integrated tools for monitoring, analyzing, and tweaking JVM performance.
As far as technical differences, those have grown less significant over the years. Once upon a time, the IBM and JRockit JVM's had far superior performance ... | [
0.2820829749107361,
0.09794741123914719,
0.13894298672676086,
0.14058998227119446,
-0.093858502805233,
-0.08147237449884415,
0.16894637048244476,
-0.09682007133960724,
-0.2646770179271698,
-0.6596729159355164,
-0.20246148109436035,
0.359136700630188,
-0.04072931036353111,
0.190996840596199... | |
JRockit includes a set of tools for monitoring your JVM performance. Sun provides various JMX-based tools with overlapping features to do the same. IBM Websphere once upon a time included a similar set of tools for their whole J2EE application server (not sure if they still do, but I would assume that's still true)...
... | [
0.3102976977825165,
-0.2071513682603836,
0.3882823884487152,
0.09643454849720001,
-0.2646779716014862,
-0.2912188470363617,
0.17036199569702148,
0.22838127613067627,
-0.38747987151145935,
-0.6780470013618469,
0.3587847650051117,
0.5241777300834656,
-0.028995055705308914,
0.1301382780075073... | |
Sun JVM. It was also a bit behind of supported versions of Java. | [
-0.2294117659330368,
0.00006192194996401668,
0.3589547872543335,
-0.08320697396993637,
-0.5552312731742859,
-0.38615545630455017,
0.08160196244716644,
0.08546058088541031,
0.02354087308049202,
-0.4232320189476013,
0.1253128945827484,
0.1561180055141449,
-0.22735796868801117,
-0.11428482085... | |
Can anyone explain why this simple WPF application looks so horrible on Vista?
I've tried setting SnapsToDevicePixels, but this makes no difference.
This is a clean WPF application, nothing added whatsoever except for the one button.
Using VS 2008 SP1. In the IDE it looks perfect, but when running it is screwed. All WP... | [
0.2042883336544037,
0.05452946573495865,
0.5692410469055176,
0.2039865106344223,
-0.362703800201416,
-0.07818342745304108,
0.47978851199150085,
-0.20380546152591705,
-0.08182874321937561,
-0.6172094941139221,
0.08853250741958618,
0.8966977596282959,
-0.47697630524635315,
0.1200927272439003... | |
drivers fixed the problem. My card is a Geforce 8600 GT. Previous drivers were 78.13 (7813). New drivers are 82.50 (8250). Running Vista x64 with .NET 3.5 SP1. | [
-0.011262998916208744,
0.27219486236572266,
0.8910014033317566,
0.22307881712913513,
-0.2591972053050995,
0.22556862235069275,
0.12047180533409119,
0.1035659983754158,
-0.015108014456927776,
-0.6672127842903137,
0.1567668914794922,
0.877087414264679,
0.0589761845767498,
-0.0216306038200855... | |
I am helping s.o. out over mail to start with c#, and I would like to recommend VS express for it (from [this](http://www.microsoft.com/express/vcsharp/) link)
It's not clear to me which version of .NET ships with it, and if there will be an SDK with a commandline compiler (cs.exe)..
I am using VS2008 and not too ke... | [
-0.4658927619457245,
0.04349672421813011,
0.5677482485771179,
-0.05481211468577385,
-0.5646494030952454,
0.08106754720211029,
0.4296002984046936,
0.08666595071554184,
-0.10030955821275711,
-0.7652252912521362,
-0.17186348140239716,
0.3747265934944153,
-0.2975844740867615,
-0.21256056427955... | |
such as 2.0 SP2, 3.0 SP1, etc)
* Visual C# Express 2008 SP1 | [
-0.2893446087837219,
-0.2143675684928894,
0.26390889286994934,
-0.0760740116238594,
-0.5735248327255249,
-0.006413789000362158,
0.5128328204154968,
-0.3265492618083954,
-0.3572792410850525,
-0.2523438632488251,
-0.16666346788406372,
0.578242301940918,
-0.3601754605770111,
-0.66670763492584... | |
Your job is to design a Project Plan class library which supports the tracking of tasks (similar to how MS Project works). This class library has a `Task` object (among others).
The `Task` object has a `EstimatedHours` (`Double`), `StartDate` (`DateTime`), and `EndDate` (`DateTime`) properties, among others. A `Task`... | [
0.17958688735961914,
-0.34235382080078125,
0.06067332997918129,
0.4315180778503418,
0.38321176171302795,
0.23894259333610535,
-0.21525686979293823,
-0.015250353142619133,
-0.15508395433425903,
-0.8162566423416138,
-0.11753938347101212,
0.16659031808376312,
0.11104869097471237,
-0.095501892... | |
`EndDate` of its children. The parent `Task`'s `EstimatedHours` is the sum of its children's `EstimatedHours`. Therefore, it is invalid to change these properties on a `Task` which has children.
**How would you handle the use case where the EstimatedHours, StartDate, or EndDate are changed on a task which has a parent... | [
-0.030478235334157944,
-0.0786072388291359,
0.06725260615348816,
0.20085713267326355,
0.0536162368953228,
0.5073210597038269,
0.03492937609553337,
-0.05833816900849342,
-0.23821526765823364,
-0.5664777159690857,
-0.07073487341403961,
0.2158854603767395,
0.15605339407920837,
0.2097518146038... | |
`Task` objects, and make appropriate changes to its own properties when those events occurred. Is this a good approach, or is there a better way? How would **you** do it?
Here's a basic idea of what a `Task` object might look like:
```
Public Class Task
Private mChildren As List(Of Task)
Private mEndDate As Dat... | [
-0.029094774276018143,
-0.23271454870700836,
0.3336835205554962,
-0.019523607566952705,
0.03552386909723282,
0.04590534791350365,
0.21788926422595978,
-0.2177489995956421,
-0.4604592025279999,
-0.46828213334083557,
-0.35590288043022156,
0.41205912828445435,
-0.1946343183517456,
0.398568540... | |
to do here?
End Set
End Property
Private mEstimatedHours As Double = 0.0
Public Property EstimatedHours() As Double
Get
Return mEstimatedHours
End Get
Set(ByVal value As Double)
mEstimatedHours = value
'What to do here?
End Set
End Property
Private mStartDate As DateT... | [
0.23838922381401062,
-0.17127090692520142,
0.5235440135002136,
-0.22220511734485626,
0.1345357745885849,
0.008826220408082008,
0.3036830723285675,
-0.3489264249801636,
-0.06383681297302246,
-0.35445424914360046,
-0.614654541015625,
0.42996054887771606,
0.023740015923976898,
0.2700629532337... | |
End Get
Set(ByVal value As DateTime)
mStartDate = value
'What to do here?
End Set
End Property
End Class
```
The right approach to solve this problem will be to use Observer Design Pattern. Detailed explaination of implementing Observer pattern is beyond the scope of this discussion. But here ar... | [
0.30496808886528015,
-0.2336825132369995,
0.6633383631706238,
0.08613758534193039,
-0.07948647439479828,
-0.41119980812072754,
0.2655769884586334,
-0.4950534999370575,
-0.018019383773207664,
-0.7658507823944092,
-0.2989785671234131,
0.33910003304481506,
-0.5317655801773071,
0.1439514458179... | |
Is there a java library or framework (other than the javax.comm provided by Sun) that is easy to use when accessing serial and parallel ports ( especially RS-232 ).
I need something free that will work both on Windows and Linux.
As andri pointed out [RXTX](http://rxtx.qbang.org/) is pretty much your best choice. There ... | [
0.4050833284854889,
-0.0478149838745594,
0.020360521972179413,
0.1494080126285553,
-0.08438180387020111,
-0.3790183961391449,
-0.28217488527297974,
0.013044564053416252,
-0.282823383808136,
-0.6164495944976807,
0.05271235108375549,
0.21881674230098724,
-0.24956345558166504,
-0.065260060131... | |
I'm working on a little something and I am trying to figure out whether I can load an XDocument from a string. `XDocument.Load()` seems to take the string passed to it as a path to a physical XML file.
I want to try and bypass the step of first having to create the physical XML file and jump straight to populating the... | [
0.5517516136169434,
-0.05614578723907471,
0.40044528245925903,
0.21722231805324554,
0.1452856957912445,
-0.050879914313554764,
-0.11856763809919357,
0.18996013700962067,
-0.23550140857696533,
-0.5942978858947754,
0.003053497290238738,
0.23538634181022644,
-0.1608673483133316,
0.14252963662... | |
public IList GetClientsByListofID(IList ids) where T : IClient
{
IList clients = new List();
clients.Add( new Client(3));
}
I am getting a compiler error here:
**cannot convert from 'Bailey.Objects.Client' to 'T'**
The client object implements the IClient interface. My goal here is to try and loosen the couplin... | [
-0.009969986975193024,
-0.15921612083911896,
0.039068397134542465,
0.26212629675865173,
-0.24796538054943085,
-0.10094662755727768,
0.41154634952545166,
-0.1462658792734146,
-0.3645344376564026,
-0.7633529305458069,
-0.06440667062997818,
0.5300978422164917,
-0.7271843552589417,
0.094133801... | |
it implements the `IClient` interface? Couldn't many types implement that interface?
In this case (*that is in the case where you need to work with the type, not the interface*) it is better to constrain the type parameter with the type itself like this:
```
public IList<T> GetClientsByListofID<T>(IList<int> ids) whe... | [
-0.04104270413517952,
-0.21981196105480194,
0.6139500737190247,
-0.04064159467816353,
-0.26917457580566406,
-0.03753253072500229,
0.08369125425815582,
-0.5592116713523865,
-0.12589071691036224,
-0.7420656681060791,
-0.06483300775289536,
0.5278307795524597,
-0.8137354254722595,
0.1193599775... | |
// ...
}
``` | [
0.40468326210975647,
0.5055083632469177,
0.11059104651212692,
0.1229420155286789,
0.07256422936916351,
-0.05240711569786072,
0.11012987792491913,
0.3895001709461212,
0.15216758847236633,
-0.6814114451408386,
-0.3279534876346588,
0.3618380129337311,
-0.10141221433877945,
0.37154409289360046... | |
How would you DBA's handle this? I have taken ownership of an existing app (VB6) and database that was written in 1999. The database design is fairly 'flat', meaning the main tables are fairly wide (100+ columns) and developers have continued to tack on additional columns to the end of the tables. This has resulted in ... | [
0.2748193144798279,
0.24835748970508575,
0.36808791756629944,
-0.1413990557193756,
-0.11075285822153091,
-0.04065645486116409,
0.28832897543907166,
-0.2312571257352829,
-0.1580592542886734,
-0.32103121280670166,
0.27475178241729736,
0.1479937583208084,
-0.30066928267478943,
0.2593231201171... | |
continue to be added as new requirements come up.
So the question is, as new fields are needed, do you continue to grow the width of the existing table? Or do you STOP extending an existing table and split it out into a separate supporting table that will house new fields, thereby creating a 1-to-1 relationship? If yo... | [
0.36480316519737244,
-0.1784396469593048,
0.3962249159812927,
0.018320243805646896,
0.19257096946239471,
0.05707446485757828,
-0.28592628240585327,
-0.34693804383277893,
-0.6132517457008362,
-0.442428857088089,
-0.2242383509874344,
0.3509506285190582,
-0.26226896047592163,
0.44421637058258... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.