text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
blue:0.0
alpha:0.1]];
[tabBar1 insertSubview:v atIndex:0];
[v release];
}
@end
```
And in your Nib file replace the class of your TabBar Controller with CustomUITabBarController. | [
-0.015426983125507832,
-0.26475316286087036,
0.1772952675819397,
-0.020815297961235046,
0.17554590106010437,
-0.10980481654405594,
0.16771326959133148,
0.1015138179063797,
-0.0835409015417099,
-0.7997856736183167,
-0.34913378953933716,
0.7002475261688232,
-0.4654373228549957,
0.46013823151... | |
An interesting issue which I've googled and can find absolutely no reference too, perhaps because I'm too vague on the cause myself.
I have a simple jsp page that is run from a struts 2 action. It' fairly javascript heavy, but its an internal app on my company's intranet so thats not a great problem.
All seems normal... | [
0.35568001866340637,
0.06094351410865784,
0.10852128267288208,
-0.01252373680472374,
-0.23816820979118347,
0.11717628687620163,
0.400346040725708,
0.3714943528175354,
-0.06001482903957367,
-0.7796294689178467,
0.11476349830627441,
0.5631299614906311,
-0.2048243284225464,
-0.077013596892356... | |
whats worse, in IE, half a tag declaration is actually printed as text at the bottom of the page. All very odd.
But what makes it even stranger, if I put a few `<br />` tags after the `</html>` tag, then all browsers render down past the `</html>` tag, but still cut off the last few `<br />`'s.
Has anyone ever heard ... | [
0.5267603993415833,
0.1784844845533371,
0.295289009809494,
0.05088995769619942,
-0.27007076144218445,
-0.3107772171497345,
0.49188897013664246,
0.262315571308136,
-0.24490824341773987,
-0.7029182314872742,
0.10556454956531525,
0.2116345465183258,
-0.014923901297152042,
0.12641234695911407,... | |
help. I've found a hacky way around it and since its not a critical app, It'll just have to do.
thanks again | [
0.08478889614343643,
0.0291223656386137,
0.25853607058525085,
0.6427302360534668,
0.01846659556031227,
0.20466671884059906,
0.7327616214752197,
0.598347544670105,
0.050540097057819366,
-0.531891942024231,
0.11071605235338211,
0.4252636134624481,
0.32587993144989014,
-0.25390326976776123,
... | |
I'm trying to send an email to an external address as part of a web app. I can send an email fine when using a simple executable running on the server:
```
private void button1_Click(object sender, EventArgs e)
{
MailMessage message = new MailMessage(welcomeMessageFrom, toAddress, welcomeMessageSubject, we... | [
-0.11029040813446045,
-0.034922946244478226,
0.700098991394043,
-0.2824931740760803,
-0.021765679121017456,
0.13968704640865326,
0.8354669809341431,
-0.09644827991724014,
-0.3547918498516083,
-0.8201979994773865,
-0.2744404971599579,
0.32985416054725647,
-0.404245525598526,
0.1301496326923... | |
emailClient.Send(message);
}
```
However, trying the same code from an ASP.NET page gives the following exception:
```
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for <user's email>
```
I'm new to IIS but do you have suggestions on how to debug?
**UPDATE**: I had to specify the domain ... | [
-0.179531529545784,
0.01517114881426096,
0.5542230010032654,
-0.2806611657142639,
-0.4836938679218292,
-0.257346510887146,
0.7286981344223022,
0.26024654507637024,
-0.1960076540708542,
-0.6324911117553711,
-0.22369101643562317,
0.16382792592048645,
-0.7677732110023499,
0.3552546799182892,
... | |
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential(name, pass);
SMTPUserInfo.Domain = domain; // i.e. "foo.com"
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.Send(message);
``` | [
-0.18393079936504364,
-0.04218212142586708,
0.7096777558326721,
-0.19072341918945312,
-0.09722430258989334,
0.10220633447170258,
0.6405829787254333,
0.12431633472442627,
-0.7337548136711121,
-0.6004054546356201,
-0.3530629277229309,
0.08921410888433456,
-0.5904269814491272,
0.5229476690292... | |
The following grails script:
```
// Import.groovy
includeTargets << grailsScript("Bootstrap")
target(main: "Import some data...") {
depends(bootstrap)
def Channel = grailsApp.classLoader.loadClass("content.Channel")
def c
// works: saving a valid Channel succeeds
c = Channel.newInstance(title... | [
-0.17426449060440063,
-0.004981618374586105,
0.621385395526886,
-0.2182409167289734,
0.03985419496893883,
-0.1140245571732521,
0.8203186392784119,
-0.3256770074367523,
-0.2826806306838989,
-0.4355052709579468,
-0.33258336782455444,
0.7401869297027588,
-0.36760231852531433,
-0.0389978960156... | |
does not allow creation of non-transactional one here
when validate() is called on an invalid domain object. I'd like to output the error messages when validation fails, however it seems I'll need to establish a hibernate session in order to do so. Anyone know a way to get past this?
Found [RunScript.groovy](http://na... | [
-0.0335971936583519,
0.2510835528373718,
0.5803182125091553,
-0.15226411819458008,
-0.18103757500648499,
-0.15361681580543518,
0.5608631372451782,
-0.20156893134117126,
-0.09560690075159073,
-0.231178417801857,
-0.05489370599389076,
0.7060146331787109,
-0.36168381571769714,
0.1520452201366... | |
run-script scripts/Import.groovy | [
0.6332446932792664,
0.02474171854555607,
0.036136042326688766,
0.0023717915173619986,
0.07861539721488953,
-0.17468880116939545,
0.14350281655788422,
0.3016301691532135,
-0.276569664478302,
-0.48923930525779724,
-0.2621033787727356,
0.42410212755203247,
-0.4773361086845398,
0.1690142750740... | |
I've been looking for a webserver for my project but I haven't been able to satisfy myself. I need a http server that has support for compiled CGI scripts (exe), for Windows, and must be able to use relative paths. It would be a bonus if the server could be a minimal/lightweight as possible.
The hardest part in my sea... | [
0.18554790318012238,
0.03566449508070946,
0.1947067230939865,
0.15755270421504974,
-0.31152430176734924,
-0.19883349537849426,
0.1715375930070877,
0.21004247665405273,
-0.20357371866703033,
-0.8348906636238098,
0.06905008852481842,
0.29888463020324707,
-0.11602313071489334,
0.1677466928958... | |
paths in the conf files cannot be absolute.
The only one I've gotten to satisfy every criteria is Abyss Web but their license is proprietary and only free for personal use.
EDIT:
I have found the error in my ways. I started the process via cmd at root. Thus the relative paths apache was using in the conf was relative... | [
0.1979493349790573,
0.03158828243613243,
0.5362516641616821,
-0.012251408770680428,
-0.22549520432949066,
-0.4128783941268921,
0.5635458827018738,
-0.06771966069936752,
-0.13137158751487732,
-0.8375393748283386,
0.2533751130104065,
0.5361167192459106,
-0.31467804312705994,
0.15851293504238... | |
as a process in a my program (C# .NET), what would be the 'current directory' then? Would I have to make sure I've changed the current directory environment variable prior to launching it?
What's wrong with Apache? You can set DocumentRoot to any directory (though I've not tried it for Windows on C:)
It also does appl... | [
0.25402212142944336,
-0.03611199930310249,
0.5869050025939941,
-0.08170002698898315,
0.01635698974132538,
-0.5192221403121948,
0.36751943826675415,
0.007166044786572456,
-0.16277971863746643,
-0.5143846869468689,
0.0713537186384201,
0.6444582939147949,
0.10708217322826385,
0.22358420491218... | |
I have a fairly complex database that needs to be deployed to a variety of servers which may or may not potentially have existing parts of the DB already implemented on it. To work around this contingency I have setup the following test:
```
USE [testDB]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PAD... | [
0.08094438910484314,
0.1175021231174469,
0.2736468017101288,
-0.11700554937124252,
-0.13436995446681976,
-0.1748417764902115,
0.16579478979110718,
-0.373337060213089,
-0.15686176717281342,
-0.5465369820594788,
-0.05522105097770691,
0.44909152388572693,
-0.20723089575767517,
-0.001226815627... | |
[siteCSS] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[masterTemplate] [int] NULL,
[errorPage] [int] NULL,
[homePage] [int] NULL,
[addressProduction] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[addressTest] [varchar](100) COLLATE SQL_Latin1_Genera... | [
-0.3041669428348541,
0.30454203486442566,
0.47567611932754517,
0.010979141108691692,
-0.11090449243783951,
0.20448514819145203,
0.13929139077663422,
-0.27999308705329895,
-0.19585280120372772,
-0.5172404646873474,
-0.18332229554653168,
0.26245951652526855,
-0.4569769501686096,
0.1892963200... | |
NOT NULL CONSTRAINT [DF_wcSites_publicAccess] DEFAULT ((1)),
[siteAccessPermission] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[contentOwner] [int] NULL,
[navStyle] [int] NULL,
[incScripts] [int] NULL,
[boxW] [int] NULL,
[boxH] [int] NULL,
[columns]... | [
-0.06537368148565292,
-0.1721464991569519,
0.5018151998519897,
0.03606553003191948,
0.002235160209238529,
0.07301873713731766,
0.19085435569286346,
-0.2619307041168213,
-0.13269993662834167,
-0.4244635999202728,
-0.29637545347213745,
0.3793996572494507,
-0.5619208812713623,
0.2308554500341... | |
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [IX_wcSites_Unique_Address] UNIQUE NONCLUSTERED
(
[addressProduction] ASC,
[addressTest] ASC
)WITH (PAD_INDEX = OFF,... | [
-0.28530147671699524,
0.028593964874744415,
0.2752305269241333,
0.10356975346803665,
0.10614293068647385,
0.02583661489188671,
-0.0721132829785347,
-0.4068376123905182,
-0.4379523992538452,
-0.446296751499176,
-0.4316653609275818,
0.4266977906227112,
-0.2602996230125427,
0.1296453624963760... | |
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ensure unique addresses in the addressProduction, addressTest fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'wcSites', @level2type=N'CONSTRAINT',@level2name=N'IX_wcSites_Uniqu... | [
-0.2332531064748764,
-0.10436787456274033,
0.6514743566513062,
-0.14007717370986938,
0.035690661519765854,
-0.20491771399974823,
0.2296050488948822,
-0.36835628747940063,
-0.0255780927836895,
-0.5955914855003357,
-0.529425323009491,
0.5737751126289368,
-0.48435720801353455,
-0.309588402509... | |
TABLE script inside of the begin..end block it fails every time. And I have the problem across the board, almost every table that uses this method fails.
Try removing the 'go' statements within the begin..end block, see if that helps. | [
-0.10690904408693314,
0.24654227495193481,
0.25566110014915466,
-0.06675229966640472,
0.1980246901512146,
-0.22185827791690826,
0.2580603361129761,
0.03461691364645958,
-0.15331166982650757,
-0.663985550403595,
-0.047408271580934525,
0.48937591910362244,
-0.17953957617282867,
-0.1423205137... | |
I have a question regarding the JVM memory management (at least for the SUN's one).
I would like to know how to control the fact that the JVM send the unused memory back to the OS (windows in my case).
I wrote a simple java program to illustrate what I expect.
Run it with -Dcom.sun.management.jmxremote option so that... | [
0.20831015706062317,
0.1511346846818924,
0.3679620623588562,
-0.14491166174411774,
0.016698148101568222,
0.0934448316693306,
0.1947987675666809,
-0.23468032479286194,
-0.313551127910614,
-0.7287313938140869,
-0.04950857162475586,
0.8261626362800598,
-0.2911767065525055,
-0.0327395871281623... | |
= new LinkedList<byte[]>();
private int totalMB = 0;
private int gcTimes = 0;
public void allocate(int howManyMB) {
usedMemory.add(new byte[howManyMB * 1024 * 1024]);
totalMB += howManyMB;
System.out.println(howManyMB + "MB allocated, total allocated: " +
totalMB + "... | [
-0.0434366837143898,
-0.041605912148952484,
0.5766637921333313,
-0.16923226416110992,
0.18662944436073303,
0.20300601422786713,
0.25865164399147034,
-0.5174887180328369,
-0.3987181484699249,
-0.4849320352077484,
-0.49196314811706543,
0.44578173756599426,
-0.5811991095542908,
0.171683669090... | |
usedMemory.clear();
}
public void gc() {
System.gc();
System.out.println("GC " + (++gcTimes) + " times" );
}
public void waitAnswer(String msg) {
System.out.println("Press [enter]" + ((msg==null)?"":msg));
try {
reader.readLine();
} catch (IOExceptio... | [
-0.012345457449555397,
-0.3066565990447998,
0.6202307343482971,
-0.17850710451602936,
0.35640043020248413,
0.2295481115579605,
0.2457740753889084,
-0.07857073843479156,
-0.1186738982796669,
-0.4397355914115906,
-0.3604334890842438,
0.537628710269928,
-0.6384004354476929,
0.3858991265296936... | |
}
public static void main(String[] args) {
MemoryFree mf = new MemoryFree();
mf.waitAnswer(" to allocate memory");
mf.allocate(20);
mf.allocate(10);
mf.allocate(15);
mf.waitAnswer(" to free memory");
mf.free();
mf.waitAnswer(" to GC");
mf.gc()... | [
-0.09724125266075134,
-0.42926928400993347,
0.3241957724094391,
-0.24104201793670654,
0.4684922695159912,
0.23415572941303253,
0.251069039106369,
-0.21876707673072815,
-0.342509925365448,
-0.15088216960430145,
-0.6465820074081421,
0.6911391615867615,
-0.6718368530273438,
0.3273714184761047... | |
mf.waitAnswer(" to GC");
mf.gc();
mf.waitAnswer(" to GC");
mf.gc();
mf.waitAnswer(" to GC");
mf.gc();
mf.waitAnswer(" to exit the program");
try {
mf.reader.close();
} catch (IOException e) {}
}
}
```
The | [
-0.16259527206420898,
-0.11660024523735046,
0.5338234305381775,
-0.40552783012390137,
0.332675963640213,
0.07247266918420792,
0.18879561126232147,
-0.17354300618171692,
0.03558257594704628,
-0.30130717158317566,
-0.8142697215080261,
0.6339348554611206,
-0.5469155311584473,
0.41432270407676... | |
internal heap is free once the first GC is done (what is expected) but the memory is only sent back to the OS starting from the third GC. After the fourth, the full allocated memory is sent back to the OS.
How to setup the JVM to control this behaviour?
In fact my problem is that I need to run several CITRIX clients s... | [
-0.1200701892375946,
-0.10981172323226929,
0.31833040714263916,
0.01660822331905365,
-0.22348465025424957,
0.19847524166107178,
0.23152682185173035,
-0.15406735241413116,
-0.5476861000061035,
-0.5350958704948425,
-0.06845520436763763,
0.5377488732337952,
-0.179243803024292,
0.1492984443902... | |
I let it like this and increase instead the OS virtual memory and let the OS using it as it wants without big performance issues.
For example, would there be issues to have 10 java process of 1GB memory (with only 100MB real allocated objects in the heap) on a 4GB server with enough virtual memory of course.
I guess t... | [
0.3057941794395447,
-0.17101773619651794,
0.19976678490638733,
0.19950370490550995,
-0.13429702818393707,
-0.06850513815879822,
0.22670505940914154,
-0.26043063402175903,
-0.051326848566532135,
-0.6111217737197876,
0.10438434034585953,
1.0130860805511475,
-0.13870397210121155,
-0.224688202... | |
point out how. | [
0.4686940014362335,
0.48066070675849915,
-0.18719080090522766,
0.4415993094444275,
-0.13789591193199158,
-0.24454918503761292,
0.0010742529993876815,
0.019098328426480293,
0.14182297885417938,
-0.5106557607650757,
0.00943542830646038,
0.08654280006885529,
0.2683272063732147,
0.288047313690... | |
I'm doing some research for a JavaScript project where the performance of drawing simple primitives (i.e. lines) is by far the top priority.
The answers to [this question](https://stackoverflow.com/questions/221710/are-there-any-good-javascript-graphics-libraries) provide a great list of JS graphics libraries. While ... | [
0.33004605770111084,
0.0719580426812172,
0.3913397192955017,
-0.007966319099068642,
-0.2584623694419861,
0.04942542314529419,
0.19646593928337097,
-0.16606619954109192,
-0.3530021905899048,
-1.1409986019134521,
-0.13142281770706177,
0.7699674963951111,
0.2512454688549042,
-0.28385683894157... | |
any DOM-like structure. In 2019 this means avoiding SVG (and any library built on top of it) because it may cause performance issues when trying to rapidly change the DOM.
Canvas is the go-to solution for high performance web graphics, both for the 2d and 3d (webgl) contexts. Flash is dead so no longer an option, but ... | [
0.05975230038166046,
-0.12469993531703949,
0.7887051105499268,
-0.02829384058713913,
-0.34643736481666565,
-0.29129981994628906,
0.3407217860221863,
-0.08336073160171509,
-0.2563731074333191,
-0.8329487442970276,
-0.3537864685058594,
0.804103434085846,
-0.05173822492361069,
0.0121811944991... | |
which will bog down when the scene gets too complex because VML actually builds a dom.
If you're really worried about performance though, definitely go with flash and write the whole thing in actionscript. You'll get an order of magnitude better performance, and with the flex sdk you don't even need to buy anything. T... | [
0.22464796900749207,
-0.17192547023296356,
0.338405042886734,
0.2367781698703766,
-0.2732328474521637,
-0.11778876185417175,
0.017995964735746384,
-0.07160546630620956,
-0.26844146847724915,
-0.6324319839477539,
-0.030255967751145363,
0.9678307771682739,
-0.11760197579860687,
-0.2369147688... | |
Situation: Object in session from a past context can't be set as another object's parent since other object is in a new context.
Say I have a User in session that I had retrieved from a context. Now the page reloads, that context has been dismissed, and a new context is made.
```
someUser = context.First(user => user... | [
-0.08824822306632996,
0.18076901137828827,
0.3139877915382385,
-0.16653704643249512,
0.17958448827266693,
-0.1257951408624649,
0.021824410185217857,
-0.16423609852790833,
-0.5250640511512756,
-0.5125477910041809,
-0.35253626108169556,
0.6732279658317566,
-0.037254687398672104,
0.2747370004... | |
object in session does not belong to the current context, reload it from the database so that it is now "owned" by the same context as every other object in the current context. (I am using a context per request)
**UPDATE**
So I did this temporarily until I can get a better idea of how to fix this:
```
Int32 session... | [
-0.29586005210876465,
-0.005368861835449934,
0.5050897002220154,
-0.02290804497897625,
-0.06192523241043091,
-0.15289297699928284,
0.3089204728603363,
-0.12271033972501755,
-0.2580450177192688,
-0.7022877335548401,
-0.0499500036239624,
0.6764717698097229,
-0.2948686480522156,
0.46411648392... | |
First time the context is created, that SHOULD hit the database and grab the user. Once compared, it's obvious they are not the same and the sesionUser is now the user in the context. Next time that if is checked, the sessionUser and the userToCheck are the same.
Problem still is the :
```
var userCheck = EntityConte... | [
-0.4022919535636902,
-0.12033116072416306,
0.6115605235099792,
-0.022533811628818512,
-0.2144199162721634,
-0.1454935371875763,
0.22286298871040344,
-0.06995798647403717,
-0.32418501377105713,
-0.7544699311256409,
0.0353718176484108,
0.6132805943489075,
-0.38208767771720886,
0.401602149009... | |
backing store.
> That’s what they do. If you don’t want
> to execute a database query, then
> don’t use an ObjectQuery.
Ok got it.
```
ChatUser userCheck = (ChatUser)EntityContext.Context.GetObjectByKey(returnValue.EntityKey);
if(userCheck != returnValue)
{
sessionUser = userCheck;
}
```
The GetObjectByKey me... | [
0.15780897438526154,
-0.033088259398937225,
0.514116644859314,
-0.08816321194171906,
0.15573512017726898,
-0.14529170095920563,
0.13316720724105835,
-0.06025095656514168,
-0.27159392833709717,
-0.20762231945991516,
0.017105888575315475,
0.7133309245109558,
-0.3225416839122772,
0.1144213527... | |
was created on request) it hits the database and checks that object against what's in session. The two are not the same so it sets the sessionUser to the new object, thus now having the sessionUser in the context and in session. Next time around the GetObjectByKey method only checks the context (As Profiler showed no d... | [
0.32424256205558777,
-0.2936639189720154,
0.5431817173957825,
0.04286067187786102,
-0.1061481311917305,
-0.35960906744003296,
0.5031749606132507,
-0.07069995254278183,
-0.3194734454154968,
-0.6670060753822327,
-0.21850647032260895,
0.6317774653434753,
-0.3949563205242157,
0.287968873977661... | |
```
public string GetArtistThumbnail(string artistName)
{
var request =
WebRequest.Create("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist=" + artistName +
"&api_key=" +
APIKey) as HttpWebRequest;
using (var response = request.GetResponse() as HttpWebResponse)
{
... | [
-0.12947459518909454,
-0.15221574902534485,
0.6872015595436096,
-0.10618710517883301,
-0.11572755128145218,
-0.06680327653884888,
0.4331016540527344,
-0.5443064570426941,
-0.19015876948833466,
-0.5075666904449463,
-0.5704314708709717,
0.7312262654304504,
-0.33508020639419556,
0.20018270611... | |
from one of [LastFM's API Services](http://www.last.fm/api/intro).
Now, I am facing the following **exception** when filling the dataset from the xml with the `ReadXml` method:
`The table (artist) cannot be the child table to itself in nested relations.`
---
[Here is an example](http://ws.audioscrobbler.com/2.0/?m... | [
0.24345944821834564,
0.12606418132781982,
0.49446651339530945,
-0.19155022501945496,
-0.008965626358985901,
-0.03405822440981865,
0.14081226289272308,
-0.4267589747905731,
-0.4206586480140686,
-0.5191813111305237,
-0.10221011936664581,
0.6209163665771484,
-0.1336813122034073,
0.24979893863... | |
need a dataset in this case?
I suggest switching to linq 2 xml or XmlDocument to manipulate the results of the web service. | [
0.3833189010620117,
-0.06979620456695557,
0.25558772683143616,
0.35890206694602966,
-0.023174526169896126,
-0.45473307371139526,
-0.37901002168655396,
-0.001445880508981645,
-0.16253916919231415,
-0.4536416530609131,
-0.19903317093849182,
0.5030694007873535,
-0.28420761227607727,
-0.256857... | |
I am using a UrlRequest to send data to a server. I am sending various parameters via custom HTTP headers in the following way:
```
urlRequest.requestHeaders.push(new URLRequestHeader("someheader", "somevalue"));
```
When the request hits my ASP.NET endpoint (a class implementing IHttpHandler), the HttpRequest Heade... | [
0.27455267310142517,
-0.05189722776412964,
0.8027737736701965,
-0.1196180135011673,
-0.49020475149154663,
0.007846729829907417,
0.20262709259986877,
-0.07047589868307114,
-0.25863897800445557,
-0.8333956599235535,
0.0036824701819568872,
0.433918297290802,
-0.19008983671665192,
0.2619004845... | |
are sent over by setting the UrlRequest's data property to a UrlVariables dictionary, but I am already using the data field in this case to send an XML stream.
> but I am already using the data field
> in this case to send an XML stream
Define your xml model to contain these headers. From your question it sounds like... | [
0.48626208305358887,
0.19750727713108063,
0.6451506614685059,
0.11965542286634445,
-0.08610580116510391,
-0.2272343933582306,
-0.016682719811797142,
-0.06415551900863647,
-0.049147434532642365,
-0.6598028540611267,
-0.3497774004936218,
0.3337125778198242,
-0.33514606952667236,
0.6275365352... | |
<data>
<ip>102.201.102.1</ip>
<name>Andrew Rea</name>
</data>
</xmlObjects>
```
So if I need to send any data I rely on the design of the model which will transport the data.
Andrew | [
0.40521082282066345,
0.4259629547595978,
0.24689510464668274,
-0.19139724969863892,
-0.08258005231618881,
0.27900341153144836,
0.5020160675048828,
-0.2508619725704193,
-0.4026196599006653,
-0.43780046701431274,
-0.37891054153442383,
-0.16446417570114136,
-0.24663884937763214,
0.14053411781... | |
I am trying to understand how best to extend the `ListBox` control. As a learning experience, I wanted to build a `ListBox` whose `ListBoxItem`s display a `CheckBox` instead of just text. I got that working in a basic fashion using the `ListBox.ItemTemplate`, explicitly setting the names of the properties I wanted to d... | [
0.14372198283672333,
-0.0024383850395679474,
0.27611982822418213,
-0.07160050421953201,
-0.33067283034324646,
-0.020794115960597992,
0.17844165861606598,
-0.28811922669410706,
0.013781175948679447,
-0.6718061566352844,
0.006663692183792591,
0.41247642040252686,
-0.28873464465141296,
0.0877... | |
Checked = isChecked;
DisplayName = displayName;
}
}
```
(I build a list of those and set `ListBox.ItemsSource` to that list.) And my XAML looks like this:
```
<ListBox Name="listBox1">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding Path=Checked}" Content="{Bin... | [
0.030981360003352165,
0.22831180691719055,
0.644170880317688,
-0.26401641964912415,
-0.02375936321914196,
-0.24911051988601685,
0.07381583005189896,
-0.40126410126686096,
-0.1340358704328537,
-0.784079372882843,
-0.06715844571590424,
0.31076356768608093,
-0.37738245725631714,
0.04742145165... | |
with properties other than "Checked" and "DisplayName". How can I modify my template such that I could make it a resource, reuse it on multiple `ListBox` instances, and for each instance, bind `IsChecked` and `Content` to arbitrary property names?
The easiest way is probably to put the `DataTemplate` as a *resource* so... | [
0.16379529237747192,
0.2755533754825592,
0.2594381868839264,
0.1177077516913414,
-0.07636192440986633,
-0.14478828012943268,
-0.08014121651649475,
-0.3792523741722107,
-0.09993352741003036,
-0.9480915665626526,
-0.15857325494289398,
0.46767765283584595,
-0.07295490801334381,
0.097330667078... | |
`MyDataItem` in a `ContentPresenter` or `ItemsPresenter`) it will use this `DataTemplate` to display it. | [
0.18989655375480652,
0.06880632787942886,
0.6153581738471985,
0.41614240407943726,
0.05715758726000786,
-0.2314596176147461,
-0.046964000910520554,
0.24892660975456238,
0.11774063855409622,
-0.5870485305786133,
-0.3852875232696533,
0.04588901251554489,
0.2524900436401367,
0.109114512801170... | |
I would like some feedback on how we can best write a generic function that will enable two Lists to be compared. The Lists contain class objects and we would like to iterate through one list, looking for the same item in a second List and report any differences.
We already have a method to compare classes, so we need... | [
0.44446274638175964,
-0.1418762356042862,
0.01801399327814579,
0.37279534339904785,
-0.21252112090587616,
0.27130764722824097,
-0.14207179844379425,
-0.138619527220726,
-0.19283753633499146,
-0.8213911652565002,
0.3915264308452606,
0.4984677731990814,
-0.2686142325401306,
0.362783074378967... | |
lists will always contain the same number of items.
As mentioned above, we have a generic method that we use to compare two classes, how can we incorporate this method to cater for Lists, i.e. from another method, loop through the List and feed the classes to the generic method .... but how do we find the equivalent ... | [
0.0749547928571701,
-0.31571367383003235,
0.2506484389305115,
0.27610230445861816,
-0.27867352962493896,
0.21184080839157104,
0.03313733637332916,
-0.25357070565223694,
-0.40507200360298157,
-0.7668779492378235,
-0.08039529621601105,
0.25909408926963806,
-0.4890594780445099,
0.196956381201... | |
if (Dest == null) throw new ArgumentNullException("Dest", "Destination class must first be instantiated.");
var Differences = CoreFormat.StringNoCharacters;
// Loop through each property in the destination
foreach (var DestProp in Dest.GetType().GetProperties())
{
// Find the matching proper... | [
-0.4545050859451294,
-0.222789004445076,
0.29127007722854614,
-0.1078713908791542,
0.07956182211637497,
0.30320996046066284,
0.45010867714881897,
-0.6912078857421875,
0.1345452517271042,
-0.7098076939582825,
-0.4437948167324066,
0.5863550305366516,
-0.2019273191690445,
0.02393963374197483,... | |
!= DestProp.PropertyType) continue;
if (OrigProp.GetValue(Orig, null).ToString() != DestProp.GetValue(Dest, null).ToString())
Differences = Differences == CoreFormat.StringNoCharacters
? string.Format("{0}: {1} -> {2}", OrigProp.Name, | [
-0.24286030232906342,
-0.4451891779899597,
0.46695476770401,
-0.19051827490329742,
0.15084239840507507,
0.2758767604827881,
0.5972838401794434,
-0.6633228063583374,
-0.24838677048683167,
-0.3385191857814789,
-0.4452035427093506,
0.41352221369743347,
-0.2583422362804413,
0.27359694242477417... | |
OrigProp.GetValue(Orig, null),
DestProp.GetValue(Dest, null))
: string.Format("{0} | [
-0.21880130469799042,
-0.3788410723209381,
0.21650637686252594,
0.07193896919488907,
0.24888470768928528,
0.18214505910873413,
0.48644426465034485,
-0.22869278490543365,
-0.19799090921878815,
-0.4687515199184418,
-0.5640451908111572,
0.6770841479301453,
-0.4886019229888916,
-0.198868036270... | |
{1}{2}: {3} -> {4}", Differences,
Environment.NewLine, | [
-0.05089869350194931,
-0.05724548548460007,
0.3828161954879761,
-0.06128944829106331,
0.29322555661201477,
0.2770395576953888,
-0.022059453651309013,
-0.2872679829597473,
0.0989888608455658,
-0.6242128610610962,
-0.12940040230751038,
0.361669659614563,
-0.40698984265327454,
0.1937482208013... | |
OrigProp.Name,
OrigProp.GetValue(Orig, null), | [
-0.27115777134895325,
-0.0329258032143116,
0.20951883494853973,
0.1595456302165985,
0.016929274424910545,
0.15759006142616272,
0.317848801612854,
0.22196875512599945,
-0.20922736823558807,
-0.25554215908050537,
-0.6914019584655762,
0.11486303061246872,
-0.5901013612747192,
-0.0116018978878... | |
DestProp.GetValue(Dest, null));
}
}
return Differences;
}
```
Any suggestions or ideas appreciated?
Edit: Targeting .NET 2.0 so LINQ is out of the question.
> .... but how do we find the equivalent class in the second List to | [
0.3000873923301697,
-0.1517375111579895,
0.3448302745819092,
0.06023422256112099,
-0.20588205754756927,
-0.16660910844802856,
0.29447099566459656,
-0.22686754167079926,
0.08709203451871872,
-0.6933861374855042,
-0.22547318041324615,
0.8368708491325378,
-0.33649173378944397,
-0.235606849193... | |
pass to the method
> below;
This is your actual problem; you must have at least one immutable property, a id or something like that, to identify corresponding objects in both lists. If you do not have such a property you, cannot solve the problem without errors. You can just try to guess corresponding objects by sear... | [
0.11262227594852448,
-0.07189948856830597,
0.15528929233551025,
0.18556204438209534,
-0.2680712342262268,
-0.11722623556852341,
0.28492972254753113,
-0.42753830552101135,
-0.14977099001407623,
-0.7701707482337952,
-0.11344242095947266,
0.4047093093395233,
-0.30462154746055603,
0.0564726479... | |
both Lists will be the same
> length and in the same order. so the method above is close, but can you modify this
> method to pass the enum.Current to the method i posted above?
Now I am confused ... what is the problem with that? Why not just the following?
```
for (Int32 i = 0; i < Math.Min(listA.Count, listB.Cou... | [
-0.06564049422740936,
-0.10234703123569489,
0.3334009647369385,
-0.1456419676542282,
-0.35168081521987915,
0.017712293192744255,
0.16162939369678497,
-0.6446993350982666,
-0.05316390097141266,
-0.715074360370636,
-0.050618983805179596,
0.5647977590560913,
-0.3297184407711029,
0.06787604093... | |
I've been helping a colleague debug some strange behavior in their code. The following sample illustrates this:
```
static void Main(string[] args)
{
string answer = Sample();
Console.WriteLine(answer);
}
public static string Sample()
{
string returnValue = "abc";
try
{
return returnVal... | [
0.6088013052940369,
-0.06307552009820938,
0.0924869030714035,
-0.2982826232910156,
0.22636643052101135,
-0.21544967591762543,
0.4421566426753998,
-0.33404240012168884,
-0.08008471131324768,
-0.13403938710689545,
-0.12347462028265,
0.2538371980190277,
-0.45569467544555664,
0.589484393596649... | |
returnValue = "def";
}
}
```
What does this sample return?
You'd think that because of the finally block, it returns "def" but in fact, it returns "abc"? I've stepped through the code and confirmed that the finally block is in fact invoked.
The real answer is that you shouldn't write code like this in the firs... | [
0.3406977355480194,
-0.000250380951911211,
0.0744144394993782,
-0.11304472386837006,
0.0017174186650663614,
-0.05526703968644142,
0.5497048497200012,
-0.29926544427871704,
-0.05389915779232979,
-0.5587732791900635,
-0.10759113729000092,
0.4532832205295563,
-0.38030174374580383,
0.053057845... | |
finally { x = null; } statement?](https://stackoverflow.com/questions/421797/what-really-happens-in-a-try-return-x-finally-x-null-statement)
Yes, the finally block runs after the function returns, but this doesn't matter. Remember that the return value is passed by value, so a new temporary variable is created for it a... | [
0.05583493784070015,
-0.19214551150798798,
0.5977184772491455,
-0.1046515554189682,
0.2515074908733368,
-0.034711744636297226,
0.3232228755950928,
-0.03225332498550415,
-0.17624780535697937,
-0.31066271662712097,
-0.4828373193740845,
0.27485164999961853,
-0.3106415271759033,
0.147900700569... | |
answer = "abc";
return;
}
catch (Exception)
{
throw;
}
finally
{
answer = "def";
}
}
```
Or, you could simply move the return statement outside of the try block, like so:
```
static void Main(string[] args)
{
string answer = Sample();
Console.WriteLine(an... | [
0.20579595863819122,
-0.27719977498054504,
0.06851093471050262,
-0.34381940960884094,
0.1700519472360611,
-0.015994606539607048,
0.2239346206188202,
-0.4700523018836975,
0.06820672005414963,
-0.17065311968326569,
-0.3780377209186554,
0.2181462049484253,
-0.5212311744689941,
0.3001516461372... | |
try
{
returnValue = "abc";
}
catch (Exception)
{
throw;
}
finally
{
returnValue = "def";
}
return returnValue;
}
```
However, given that the finally block will always override the return value, this is a questionable design. | [
0.2594752311706543,
-0.14182132482528687,
0.010083377361297607,
-0.28660517930984497,
0.22230397164821625,
-0.29726219177246094,
0.7450448274612427,
-0.5157915353775024,
0.08000560104846954,
-0.3725743293762207,
-0.4390077292919159,
0.44989973306655884,
-0.34784844517707825,
0.119621321558... | |
I have a situation where the header partial is called by the standard layout. (This is fairly common I assume) In the header is a search box - just like on stackoverlow. However, when the user is on the search page, I want to remove the search box from the header.
What I attempted to do was put a method in the Applic... | [
0.13593092560768127,
0.38764306902885437,
0.3319290280342102,
-0.17595478892326355,
-0.10868264734745026,
-0.3845515251159668,
0.3309694528579712,
-0.3946492671966553,
-0.061457935720682144,
-0.4915145933628082,
0.058256737887859344,
0.6438872218132019,
-0.5049201250076294,
0.4455122053623... | |
matter what controller is rendering the view. I know I could define a new layout and add a parameter to the header partial to signal not to render the search box, but that seems like overkill.
In your application helper, define this method:
```
def search_page?
controller.controller_name != "search"
end
```
Replac... | [
0.12279614806175232,
-0.16951318085193634,
0.8101118803024292,
0.10405684262514114,
-0.1464957445859909,
-0.24674007296562195,
0.11247186362743378,
0.08204613626003265,
-0.13110242784023285,
-0.6861578822135925,
-0.2004389762878418,
0.6890794038772583,
-0.29516294598579407,
0.2966530919075... | |
ok, so I new to the C# way of doing things, I come from the ruby world.
I have a one to many relationship, (parent to children for sake of this question), and for some reason L2S was wanting to create a new parent instead of using the one is already had. Here is the code.
```
Console.WriteLine(parent.Id); // this e... | [
0.29338338971138,
0.2224307656288147,
0.23680654168128967,
-0.2909472584724426,
0.18896134197711945,
0.12112414091825485,
0.17072410881519318,
-0.32217785716056824,
0.10159882158041,
-0.6937248706817627,
0.18660905957221985,
0.4203324615955353,
0.06400736421346664,
0.5549343228340149,
-0... | |
just say
```
new_child.ParentId = parent.Id
```
that works just fine.
Can someone explain to me whats going on?
PS. Parent was found from the database using L2S. all the keys and such are set up properly. Thanks for any insight.
you could possiblly do it as Freddy said:
```
foreach (string names in names)
{
C... | [
0.3244902193546295,
0.17785657942295074,
0.24895218014717102,
-0.043370526283979416,
0.350798100233078,
0.24100641906261444,
0.24564829468727112,
-0.39066439867019653,
-0.04103417694568634,
-0.8587072491645813,
-0.06379044055938721,
0.45506539940834045,
-0.09506407380104065,
0.680894196033... | |
We have several UNIX machines you can wind up with when you telnet to a certain box. The passwd files are not on a shared mount (I am not sure how safe it is to mount them anyway). The end result is that if you change your password on one box that when you login to the second box it will tell you that your password is ... | [
0.47032758593559265,
0.10713174939155579,
0.2553374469280243,
0.16329103708267212,
0.4082806408405304,
-0.1913444548845291,
0.33494409918785095,
-0.011734526604413986,
-0.15522564947605133,
-0.828094482421875,
0.08359923213720322,
0.6655212640762329,
-0.2620345652103424,
0.1977237164974212... | |
4.3
* HP 11 11.11 11.23 11.23I
* Sun 10
* Linux
UPDATE:
I am considering disabling passwd on all boxes except for one. passwd could then be a remote call to the controling password server or tell the user explicitly which machine to go to in order to change their password.
UPDATE:
The IBM product does look interes... | [
0.2630263864994049,
-0.23805665969848633,
0.569953441619873,
0.012983123771846294,
-0.40991008281707764,
-0.04913933575153351,
0.27360522747039795,
-0.17784860730171204,
0.03696783259510994,
-0.7476895451545715,
-0.16578949987888336,
0.3682102560997009,
-0.48994338512420654,
0.190175339579... | |
the public key usually lives in the user's home directory, which you can put on a shared mount (presumably what you already do).
This will make your environment more secure, in addition to solving your synchronization problem. The downside is that the overhead might be slightly higher in setting up each new user, as ... | [
0.08967708051204681,
0.17332179844379425,
0.36199480295181274,
0.20916567742824554,
0.12358654290437698,
-0.03418399766087532,
0.140962615609169,
-0.2348332703113556,
-0.09904569387435913,
-0.40676310658454895,
-0.2791540026664734,
0.5315796732902527,
-0.01198263093829155,
0.16573262214660... | |
I was just wondering if anybody was using this technique:
Since Push Notifications will only be coming with OS 3.0, I've been thinking of using Email Pushs (Exchange, mobile.me) as a workaround:
You can register a URL, eg. myxyappname:// for your own app in iPhone. (See examples @ developer.apple.com/iphone)
If you ... | [
0.39396432042121887,
-0.07127246260643005,
0.6962926983833313,
-0.3726654350757599,
-0.3140905499458313,
0.10562539100646973,
0.20984815061092377,
-0.1336725950241089,
-0.3422500491142273,
-0.6951225996017456,
-0.17470940947532654,
0.34003108739852905,
-0.29934489727020264,
-0.003513142699... | |
registered the url correctly), and within your app you can parse the url and display the corresponding info, based on the query string.
old fart?
When you use SQL Server Management Studio to script out your objects it will enclose all names with square brackets.
They are only necessary when the name contains a space ... | [
0.5061792135238647,
0.4310106337070465,
0.6242123246192932,
-0.08849823474884033,
0.21556787192821503,
-0.23873724043369293,
0.26890066266059875,
-0.007808913476765156,
-0.2036793828010559,
-0.49318039417266846,
-0.1043117567896843,
0.5520209670066833,
-0.23052789270877838,
0.4451752007007... | |
In a web application, I'm hitting some troubles with dynamic content - whereby a form being hidden or shown above a jQuery UI tab control causes rendering issues until the user hovers there mouse over the tabs, which then causes the tab header to redraw in the correct location.
It's only occurring in IE7 and as a quic... | [
0.002704362850636244,
-0.014151148498058319,
0.6393254399299622,
-0.25556662678718567,
-0.18572357296943665,
-0.25323089957237244,
0.48554298281669617,
0.21562477946281433,
-0.23453307151794434,
-0.880878210067749,
-0.4725460112094879,
0.5455791354179382,
-0.32698050141334534,
0.0984956100... | |
page, as I'm worried my approach may have unwanted side-effects on other browsers.
I had a similar issue to this once, it turned out to be an issue with the width not being set on the displaying div. When I set the static px width on the element it worked. | [
0.19232569634914398,
-0.20647527277469635,
0.7352500557899475,
-0.009885944426059723,
-0.4179794192314148,
0.006777186878025532,
0.12282364070415497,
0.12039010971784592,
-0.270822137594223,
-0.8253185153007507,
0.09113354980945587,
0.41433951258659363,
-0.3589029014110565,
0.1551248133182... | |
I draw a triangle using line. How can I fill color on it? So far I can only success color the line but not fill the color.
```
public void paintComponent(Graphics g){
super.paintComponents(g);
int k=0;
for (j=0 ; j < numOfLines; j++){ // the values of numOfLines retrieved from other method.
... | [
0.14320392906665802,
-0.04998055845499039,
0.5678626894950867,
-0.2337821125984192,
-0.1872730553150177,
0.4092875123023987,
0.38703688979148865,
-0.4056555926799774,
-0.20433974266052246,
-0.7865847945213318,
-0.21384727954864502,
0.4716748297214508,
-0.39032065868377686,
-0.1158926784992... | |
= k+4; //index files
}
```
Make a [`Polygon`](http://java.sun.com/javase/6/docs/api/java/awt/Polygon.html) from the vertices and fill that instead, by calling [`fillPolygon(...)`](http://java.sun.com/javase/6/docs/api/java/awt/Graphics.html#fillPolygon(java.awt.Polygon)):
```
// A simple triangle.
x[0]=100; ... | [
-0.16359113156795502,
0.16741101443767548,
0.4559992253780365,
-0.16427284479141235,
-0.39889392256736755,
0.5912594199180603,
0.24312493205070496,
-0.5176270604133606,
-0.36921823024749756,
-0.7885569930076599,
-0.4307163655757904,
0.014763472601771355,
-0.44862210750579834,
-0.0962576121... | |
I am currently still in school and taking a class on implementing data structures in c++. In my spare time I enjoy programming in "higher level" languages (mostly Ruby with some c#).
So since these higher level languages manage the memory for you, what would you use data structures for? I can understand the need for q... | [
0.07807882130146027,
0.43970146775245667,
-0.1407667100429535,
0.3825822174549103,
0.1580287367105484,
-0.09475013613700867,
0.201295405626297,
0.33223915100097656,
-0.3110499680042267,
-0.6451147198677063,
0.047023575752973557,
0.32105356454849243,
-0.047718171030282974,
0.003330148523673... | |
data structure is not about garbage collection. But it is about storing data in a way that is efficient in some way. So what matters most is HOW you are organizing the data. Which is exactly what the language can't automatically figure out for you.
Sure the high level language will come with several preloaded data str... | [
0.08326927572488785,
0.22097988426685333,
0.04150829464197159,
0.5546435713768005,
-0.10819216817617416,
-0.20567701756954193,
-0.01195750292390585,
-0.03154989704489708,
-0.39217817783355713,
-0.6587545275688171,
-0.3739669620990753,
0.3096470832824707,
-0.30186742544174194,
0.06101821735... | |
on them can be implemented giving efficient results.
For most tasks you wouldn't need to implement your own data structures. But this depends fully on what you are coding.
> I can understand the need for queues
> and stacks but would you ever need to
> use a binary tree in Ruby?
There are a lot of examples for u... | [
0.691966712474823,
0.047874707728624344,
-0.26354989409446716,
0.44166266918182373,
-0.03383264318108559,
0.03832881152629852,
0.1045592799782753,
-0.08007735759019852,
-0.41021987795829773,
-0.7610905170440674,
-0.19147324562072754,
0.2509026825428009,
-0.4890660047531128,
0.0021325838752... | |
need to store a LOT of data with fast lookup by using a btree. Several data structures have specific uses and are optimized for different things. Whether the language is modern or not and whether it has garbage collection or not doesn't change that.
The trend though, is that custom implemented data structures are code... | [
0.45154139399528503,
-0.05575944110751152,
-0.012391188181936741,
0.349165141582489,
0.08986829221248627,
-0.1846453994512558,
-0.1680067479610443,
0.03529389947652817,
-0.40002673864364624,
-0.7611650228500366,
-0.030522743239998817,
0.2324504554271698,
-0.34897580742836,
-0.2498570680618... | |
I am deploying my app onto a Windows box, that will live in a remote location with no one, who is computer literate, around. The box will be accessible via the internet via the LogMeIn application. So it is fair to say, that no one will physically touch the server for long periods of time.
And the app must be up and r... | [
0.610032320022583,
0.15509161353111267,
0.5517397522926331,
0.018705014139413834,
0.29078665375709534,
-0.17279285192489624,
0.32173269987106323,
0.07071220129728317,
-0.1443021297454834,
-0.45861637592315674,
-0.48373690247535706,
0.570770800113678,
-0.2866707742214203,
0.0740221813321113... | |
probably prudent for it to have the latest patches. Anyone have any experience with this type of a situation?
> So since these higher level languages
> manage the memory for you, what would
> you use data structures for?
The main reason for using a data structure is not about garbage collection. But it is about stor... | [
0.08869172632694244,
0.32987967133522034,
0.04022431746125221,
0.45046284794807434,
-0.020442988723516464,
-0.14230038225650787,
0.20082420110702515,
0.11677227914333344,
-0.3730795085430145,
-0.86288982629776,
-0.07255583256483078,
0.5220301151275635,
-0.07406310737133026,
-0.154301986098... | |
(and **you should 100% use these preloaded data structures when they are provided instead of making your own**), but not all data structures are provided that you may need.
Data structures organize the storage of memory in some way so that the algorithms that run on them can be implemented giving efficient results.
... | [
0.43297278881073,
0.21969178318977356,
-0.30700260400772095,
0.4292427897453308,
0.08557567745447159,
0.03995605930685997,
0.14861874282360077,
-0.11230596154928207,
-0.2405974268913269,
-0.7053995728492737,
-0.15793125331401825,
0.28753674030303955,
-0.34939807653427124,
-0.11127470433712... | |
of examples for using a binary tree, but not in common every day projects, for example you may need to implement huffman coding.
[Other data structures](http://en.wikipedia.org/wiki/List_of_data_structures) can be used to have the space savings and fast lookups of using a trie, or you may need to store a LOT of data ... | [
0.5569407939910889,
-0.008535987697541714,
-0.186308816075325,
0.38245880603790283,
-0.030139107257127762,
-0.06908876448869705,
0.27272558212280273,
0.01283973641693592,
-0.3221733570098877,
-0.890634298324585,
-0.26860934495925903,
0.21379901468753815,
-0.25001832842826843,
-0.0130142653... | |
thought about less. A similar argument happens with common algorithms. In more modern languages, like LINQ you simply specify to sort. You don't actually say how to sort. | [
0.5473559498786926,
-0.12877103686332703,
-0.14566843211650848,
0.28398165106773376,
-0.044247109442949295,
0.09458235651254654,
-0.2675338685512543,
0.1776888221502304,
-0.34664660692214966,
-0.45908650755882263,
0.09287005662918091,
0.2227616012096405,
-0.09663437306880951,
-0.2175032943... | |
When I execute environment commands, such as `env`, `set`, and `unset`, something happens, but what?
```
set hello='hello world!'
unset find
```
What do you do with the commands? Are the changes permanent or temporary? Where can you see the changes? I am an Ubuntu-newbie.
Each process that is created gets its own en... | [
0.6363424062728882,
0.20167863368988037,
0.32259276509284973,
-0.11555804312229156,
0.19262459874153137,
-0.0013910833513364196,
0.1437767595052719,
0.08961750566959381,
-0.21675652265548706,
-0.7828980088233948,
-0.13273094594478607,
0.45894986391067505,
-0.4240609109401703,
0.50487303733... | |
use is really whatever you need it to be. Any time you need to store some useful bit of information (such as long list of command line options to some program) into a variable that other applications can read, or that you can access from the shell, use the environment.
For instance:
```
USUAL_CONFIGURE_OPTS="--prefix... | [
0.832130491733551,
-0.05559798330068588,
0.08625473082065582,
-0.10713307559490204,
0.2638595998287201,
-0.17619164288043976,
0.07260818034410477,
-0.01593969762325287,
-0.0012671499280259013,
-0.6244059801101685,
-0.07612938433885574,
0.9121667146682739,
-0.6182469725608826,
-0.5144191384... | |
a handy place for the user to store useful bits, as I described above.
Again (responding to your comment), every program that is executed is a process. A process gets its own address space (own memory), its environment is stored in that space. This means, the environment is specific to that process and lives only as l... | [
0.2138141542673111,
0.31628236174583435,
0.02325446344912052,
0.3273954391479492,
0.21399198472499847,
0.013262958265841007,
0.16737143695354462,
0.16894124448299408,
-0.3905753493309021,
-0.762605607509613,
-0.16442418098449707,
0.38644957542419434,
-0.028065150603652,
0.16605709493160248... | |
in physical memory, some might be in swap, shared dynamic objects, etc).
No process can access another's environment unless the process explicitly creates a map to that specific region and shares it with another process. Again, a process' address space is completely private and isolated from other processes. Environme... | [
-0.11430606245994568,
0.204833522439003,
-0.17039208114147186,
0.5541933178901672,
0.519035816192627,
0.11373770982027054,
0.06141060218214989,
0.11085663735866547,
-0.40442171692848206,
-0.6302379369735718,
-0.2984306216239929,
0.034153614193201065,
-0.16341222822666168,
0.625742554664611... | |
Is there a way in PHP to get a list of all sessions (and the variables within each) on the server?
Basically, we have a maintenance function which needs to know which users are currently logged into the site. We already store data for each user in a session variable, but I am hoping that I can loop through each of the... | [
0.550357460975647,
0.17643289268016815,
0.19896765053272247,
0.14078383147716522,
-0.00022931832063477486,
-0.2431701272726059,
0.3954066336154938,
0.34334439039230347,
-0.3005298972129822,
-0.4662191867828369,
0.46618717908859253,
0.3689919412136078,
0.04928715527057648,
-0.02041727863252... | |
and the results I found tended to inidcate that it WASN'T possible, but I find this very hard to accept.
Still, If you can't you can't but I thought my buddies on StackOverflow could give me a definitive answer!
PHP stores session data for each user in a temporary folder on the server. This folder is defined in the ph... | [
0.295285701751709,
0.06542697548866272,
0.5013991594314575,
-0.05082651600241661,
-0.03573484718799591,
-0.04207107797265053,
0.4175247251987457,
-0.05518415942788124,
-0.23699291050434113,
-0.703813910484314,
0.0007286862819455564,
0.5077081918716431,
-0.08641675114631653,
0.1373403966426... | |
path for the session data, open up that folder and you'll notice a fairly simple structure. All sessions are stored in the format: sess\_$SESSIONID .
Session data is serialized before being stored on disk. As such, objects stored in the session file would have to be deserialized before being usable. However, if you'r... | [
0.07339286059141159,
0.11854953318834305,
0.23752258718013763,
0.14722515642642975,
-0.05189594626426697,
-0.19797725975513458,
0.4197469651699066,
0.02308003604412079,
-0.15495961904525757,
-0.9107552766799927,
0.03522173687815666,
0.44642964005470276,
-0.19167518615722656,
0.127089142799... | |
but it appears as though the session ID that appears in the filename corresponds directly to, for instance, the name of the PHPSESSID cookie stored on the user's computer. So, with this in mind, it may be possible to loop through the files within the temporary session directory, acquire all the $SESSIONID values, set t... | [
0.25646156072616577,
-0.14226984977722168,
0.20776422321796417,
0.26167529821395874,
0.05691458284854889,
-0.33540916442871094,
0.4093529284000397,
-0.11924789100885391,
-0.3079097270965576,
-0.49075496196746826,
-0.12079164385795593,
0.5897743105888367,
-0.05748583748936653,
0.10198843479... | |
stupid question but this statement is worthless
```
int a;
if (a != null)
```
since an integer var is automatically set to null by the compiler when defined
to check integers always check if a >= 0 correct?
The compiler sets the value of a primitive variable to its "default" value if you don't assign it. The defau... | [
0.2264654040336609,
0.3486250936985016,
-0.12503410875797272,
0.023625535890460014,
-0.3905913531780243,
-0.08164381980895996,
0.5937812924385071,
-0.07749945670366287,
-0.03461011126637459,
-0.31565171480178833,
0.14799776673316956,
0.7481927871704102,
-0.35722607374191284,
0.300809651613... | |
I'm trying to create a simple connection using the jdbc-odbc bridge:
```
public static Connection getConnection() {
Connection con =null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String conStr = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=" +
"c:\\m... | [
-0.14753346145153046,
0.18068179488182068,
0.477146714925766,
-0.0958777442574501,
-0.02810034714639187,
-0.014573585242033005,
0.4653851389884949,
-0.024085531011223793,
-0.19329805672168732,
-0.7634649872779846,
-0.08843487501144409,
0.3243087828159332,
-0.6028851270675659,
0.42870333790... | |
Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xa4 Thread 0xec0 DBC 0x2f8574c Jet'.
```
Any ideas?
Update 24/Mar/2009: Now it's working. Created a User Data Source, and for some reason the exception went a... | [
-0.5031238198280334,
0.22374458611011505,
0.5741199851036072,
0.19007039070129395,
0.09963547438383102,
-0.10886179655790329,
0.25856345891952515,
0.06567304581403732,
-0.17014876008033752,
-0.45731881260871887,
-0.0367722250521183,
0.7944261431694031,
-0.23696552217006683,
0.3493649661540... | |
general question, What would be the best way to handle database connections in Java?
To answer your general question I would say the best way to handle database connections in Java is to avoid the JDBC-ODBC bridge. Its OK for testing or learning about JDBC but not for real production use. Also, if you have a data sourc... | [
0.14942209422588348,
0.296962171792984,
-0.2236032336950302,
0.21471376717090607,
-0.2836962044239044,
-0.24372342228889465,
-0.10288406908512115,
0.12398844212293625,
-0.4114306569099426,
-0.8826828002929688,
0.402451753616333,
0.34949618577957153,
-0.5107237100601196,
0.3165007531642914,... | |
You have to set up the Data Source on the machine that you are running your application from. If you have access to the machine no problem, but suppose you are sending the application off to the client? The pure Java JDBC driver works better for this because it is included as part of your application so once your appli... | [
0.32070934772491455,
0.09010913223028183,
-0.044880710542201996,
0.010866357013583183,
-0.2747160792350769,
-0.11322414875030518,
-0.13532836735248566,
0.014444533735513687,
-0.06629174202680588,
-0.790940523147583,
0.08780618757009506,
0.8993968963623047,
-0.44088998436927795,
0.104594260... | |
Building my baseclasses for user interface controls is getting there. I have command buttons derived with custom font assignment and put on a form, all is fine... However, identical code for the read-only property Font of a textbox is NOT recognized properly on the same form. It is ONLY taking the setting of the FORM a... | [
0.16091462969779968,
-0.10300874710083008,
0.7153570055961609,
-0.04485037550330162,
0.04169202595949173,
0.03461338207125664,
0.4663286507129669,
-0.4347459673881531,
-0.08758672326803207,
-0.7280973792076111,
0.02090875245630741,
0.7793248891830444,
-0.34351611137390137,
-0.0509464628994... | |
12f, FontStyle.Regular, GraphicsUnit.Point );
}
}
}
```
With a help from "nobugz" (Thanks), I found this same failure when doing a ComboBox too. My result was the following...
My getter
```
get { return new Font( ... ); }
```
However, in nobugz response, something wasn't working quite right with th... | [
0.15983222424983978,
0.16771197319030762,
0.42751550674438477,
-0.3768152594566345,
-0.1570492833852768,
0.10921596735715866,
0.32060152292251587,
-0.269756019115448,
0.18356522917747498,
-0.8627367615699768,
-0.03837694972753525,
0.8971637487411499,
-0.3364719748497009,
-0.062416307628154... | |
Font;
}
}
``` | [
-0.2843555808067322,
0.39774268865585327,
0.22235864400863647,
-0.20932115614414215,
0.22025537490844727,
0.13311077654361725,
0.23012354969978333,
0.3376341760158539,
0.011046257801353931,
-0.6403653621673584,
-0.42367181181907654,
0.5721238851547241,
-0.3844042420387268,
0.00527980644255... | |
I've found several examples of an inventory database. But I'm looking for someting a little bit different. I'm working with SQL.
I need to keep track of tooling. Employees can check out tooling and the inventory for that tool will be reduced and a that transaction will be recorded in a (checked\_out) table. Easy to fa... | [
0.40878957509994507,
0.07163204252719879,
-0.04901821166276932,
0.31106653809547424,
0.27726224064826965,
0.07835233211517334,
-0.01568496786057949,
0.10074111819267273,
-0.3509748578071594,
-0.6106176972389221,
0.1886911392211914,
0.6923373341560364,
0.1273612082004547,
0.1773024648427963... | |
he could put the tool in the resharpen bin and record it to the resharpen table. This is where I get confused.
Sounds like you need a status on the inventory table. For example, a record for an arbitrary tool can have a status field that is a foreign key in the "Statuses" table. The Statuses table could look like this:... | [
0.2329322248697281,
0.06102511286735535,
-0.023176798596978188,
0.30324631929397583,
0.3998006284236908,
-0.1029735654592514,
-0.10109785199165344,
-0.052869394421577454,
-0.43335843086242676,
-0.7267068028450012,
0.016978809610009193,
0.5761463642120361,
-0.016590049490332603,
0.260944753... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.