text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
in this graph to select all the files you will see at this exact point (commit). A branch is just a new path in this graph. To apply, in Git, some other versions, you must either: * merge into your branch some other commit (like in the git pull" mentioned by [stsquad's answer](https://stackoverflow.com/questions/...
[ -0.0756852775812149, -0.41997474431991577, 0.4832942485809326, 0.03322184458374977, 0.08846250176429749, -0.07028257846832275, -0.06412294507026672, 0.06288228929042816, -0.6241393089294434, -0.46956896781921387, -0.29405754804611206, 0.047968532890081406, -0.47708195447921753, 0.196178004...
practical in a **D**VCS (as in "Distributed"): when you are making a branch with Git, you need to do so with a starting point *and a content* clearly defined and easily replicated to other repositories. In a purely central VCS, you can define your workspace (in ClearCase, your "view", either snapshot or dynamic) with ...
[ 0.5281075239181519, -0.21273210644721985, 0.11249490827322006, 0.027494581416249275, 0.1841549426317215, -0.056005142629146576, -0.17806805670261383, -0.19278669357299805, -0.2405344694852829, -0.49300503730773926, -0.3141919672489166, 0.37824252247810364, -0.1857495754957199, 0.0105187790...
things not possible for DAG? Are they worth it? When it comes to "real-life scenario" in term of selection rules, what you can do in a linear model is to have *several* selection rules **for the same set of files**. Consider this "config spec" (i.e. "configuration specification" for selection rules with ClearCase): ...
[ -0.330293744802475, -0.32591432332992554, 0.34693673253059387, 0.2272665947675705, 0.33466410636901855, 0.10473563522100449, 0.25209635496139526, -0.052694760262966156, 0.007604359649121761, -0.28417736291885376, -0.34289100766181946, 0.5941187143325806, -0.24867215752601624, -0.2874414324...
included with the ClearCase product, and representing all the "best practices" deduced from base ClearCase usage) does not allow it, for reasons of **simplificity**. A set of files is called a "component", and if you want to branch for a given label (known as a "baseline"), that would be translated like this following ...
[ -0.08480162173509598, -0.2668188512325287, 0.40984630584716797, -0.05512573570013046, 0.0909750685095787, -0.000055014475947245955, 0.06951455771923065, -0.048241712152957916, -0.056898362934589386, -0.2512517273426056, -0.3051544427871704, 0.3029037415981293, -0.5250486731529236, 0.236730...
a "simplification" you do not have to make with a DAG, where each node of the graph represents a uniquely defined "starting point" for a branch, whatever is the set of files involved. Merge and rebase are enough to combine that starting point with other versions of a given set of files, in order to achieve the desired...
[ -0.10943912714719772, -0.29067569971084595, 0.31593334674835205, 0.29162195324897766, 0.20525552332401276, 0.05016658827662468, 0.09074122458696365, -0.27444466948509216, -0.4721054434776306, -0.4844720661640167, -0.6014195680618286, -0.08608970046043396, -0.46373075246810913, 0.3591254353...
labelled * if branched, **all** its files will branch from the **same unique** starting point That is easily done in a DAG system; it can be more difficult in a linear system (especially with "Base ClearCase" where the "config spec" can be tricky), but it is enforced with the UCM methodology of that same linear-based ...
[ 0.1679803878068924, -0.44001898169517517, 0.6152804493904114, 0.2559345066547394, 0.24146242439746857, -0.38361701369285583, 0.33249494433403015, -0.36513662338256836, -0.356322705745697, -0.32015278935432434, -0.6490720510482788, 0.11847861856222153, -0.2290196418762207, 0.291007757186889...
shared amongst some but not all developers). Again, it enforces a senses of *coherency*, **as opposed to a "dynamic flexibility", that you may have a hard time to reproduce later on**. That allows you to leave the realm of [VCS (Version Control System)](http://en.wikipedia.org/wiki/Revision_control) and enter the rea...
[ 0.07125936448574066, -0.43108871579170227, 0.5345860123634338, 0.14901798963546753, 0.24804240465164185, -0.4293520450592041, 0.10721488296985626, -0.10383335500955582, -0.5248187780380249, -0.5730047225952148, -0.5167180895805359, 0.233560711145401, 0.013920086435973644, 0.618516504764556...
``` some_view?param1=10&param2=20 def some_view(request, param1, param2): ``` Is such possible in Django? You could always write a decorator. Eg. something like (untested): ``` def map_params(func): def decorated(request): return func(request, **request.GET) return decorated @map_params def some_vi...
[ 0.09058688580989838, 0.18299049139022827, 0.6282624006271362, 0.0528486967086792, -0.25503411889076233, -0.03801191970705986, 0.21241144835948944, -0.15129037201404572, -0.540554940700531, -0.5102875828742981, -0.12219903618097305, 0.41871926188468933, -0.11739620566368103, -0.176197513937...
I am looking for a function or example to produce a list of lines representing contours at a specific height within a heightmap. Eg, ``` Lines[] = GetContours(Heights[512,512], HeightValue) ``` Where Heights is a 512x512 array of floating point values, HeightValue is the height at which the contour should be drawn...
[ 0.2696901261806488, -0.34748736023902893, 0.550710916519165, 0.1381201595067978, -0.21401600539684296, 0.1710306853055954, -0.10752276331186295, -0.4706483483314514, -0.21183480322360992, -0.40879327058792114, 0.18139684200286865, 0.5263016223907471, 0.09571336209774017, 0.0587343610823154...
the answers was very helpful.
[ 0.045061103999614716, 0.14729557931423187, -0.03632339462637901, 0.3416720926761627, -0.24982818961143494, 0.056711096316576004, 0.06938076764345169, 0.08772871643304825, 0.030992988497018814, -0.08862427622079849, 0.08554006367921829, 0.2022806704044342, 0.15386809408664703, 0.06729274243...
I want to create a script that will run whenever a server is turned on to do basic things like create a directory and copy a binary from an FTP server to it. I need it to run before a user logs in, as soon as the server is turned on. This will be deployed on my EC2 windows servers. Checking around (<http://www.bleepin...
[ 0.834895133972168, 0.012641465291380882, 0.03595622256398201, -0.20719106495380402, -0.13441108167171478, 0.16552579402923584, 0.39203542470932007, -0.014066040515899658, -0.12650881707668304, -0.711352527141571, 0.04999278485774994, 0.5216670632362366, -0.3096657991409302, 0.2046407014131...
md, etc. I can also fake a service to be "cmd /k batch.cmd". Both seem cumbersome. Is there an elegant way to do this? Thanks, Miki You can use the Windows Task Scheduler and set it for when the system is booted. Here's more info on that [Task Scheduler](http://msdn.microsoft.com/en-us/library/aa383614(VS.85).aspx)
[ 0.16609206795692444, -0.10337478667497635, 0.021430229768157005, 0.13912458717823029, -0.03648974746465683, -0.019233882427215576, 0.28078556060791016, 0.10897402465343475, -0.2973880171775818, -0.6503711342811584, 0.08906539529561996, 0.5054327845573425, 0.011300391517579556, 0.2189353108...
I have a mail application. While sending to each recipient I am writing to an XML file named mail.xml. I use the following code: ``` Dim from As String = txtFrom.Text Dim txto As String = txtTo.Text Dim subj As String = txtSubject.Text Dim body As String = txtBody.Text Dim settings As New XmlWriterSettings() settings....
[ 0.5287502408027649, 0.2987143397331238, 0.835681676864624, -0.37187933921813965, -0.07630139589309692, 0.23264077305793762, 0.40100806951522827, -0.5482513904571533, 0.13477873802185059, -0.7170240879058838, -0.12439732253551483, 0.5140715837478638, -0.004058991093188524, -0.12884815037250...
Using ``` And the output is: ``` <?xml version="1.0" encoding="utf-8" ?> <EMail> <From From="abc@xyz.com"> <To To="def@pqr.com"> <Subject Subject="Hi"> <Body Body="Hello" /> </Subject> </To> </From> </EMail> ``` Here I am not able to append to existing output. Only one "Email" section is ...
[ 0.28957468271255493, 0.37894850969314575, 0.45493656396865845, -0.006807913072407246, -0.16203631460666656, -0.09494931250810623, 0.14076465368270874, -0.4454996883869171, -0.05338941141963005, -0.7275729775428772, -0.1409846991300583, 0.2558775842189789, -0.3356243669986725, 0.04697132855...
under it. Note that you still won't be able to append new elements within the same file - you'd have to read the existing file and rewrite it. In theory you *could* just overwrite the last line (you always know how long it will be, so you could just seek to the right place) but it's more robust to read the file into me...
[ 0.3622797131538391, 0.0531257726252079, 0.5051063299179077, 0.0125893484801054, 0.007585426792502403, -0.2269602119922638, -0.03330746665596962, -0.19379158318042755, -0.21678699553012848, -0.44634854793548584, -0.155109703540802, 0.09488925337791443, -0.17381685972213745, -0.0897106155753...
?> <Emails> <Email> <From Address="abc@xyz.com"> <Recipient Type="To" Address="def@pqr.com" /> <Recipient Type="Cc" Address="ghi@pqr.com" /> <Subject>Hi</Subject> <Body>Body text</Body> </Email> <Email> <!-- Second email comes here --> </Email> </Emails> ```
[ 0.34087300300598145, 0.0856487825512886, 0.5473220348358154, 0.059569939970970154, -0.17126016318798065, 0.18970145285129547, -0.024108652025461197, -0.3754879832267761, -0.2232380211353302, -0.491047739982605, -0.18119053542613983, 0.2882159948348999, -0.07023081183433533, -0.008202126249...
I still haven't found a truly satisfactory answer to [this question](https://stackoverflow.com/questions/691989/full-vcl-class-browser-for-delphi), and am now considering rolling my own. I have ModelMaker and GExperts, and neither seems to load the *comprehensive* class-hierarchy I am looking for. As well, I don't thin...
[ 0.07698803395032883, 0.11124811321496964, 0.23992255330085754, 0.07789411395788193, -0.21163085103034973, -0.2489885538816452, 0.14230822026729584, 0.04318404197692871, -0.29589635133743286, -0.5856302380561829, 0.07571879029273987, 0.6401529908180237, 0.08863051235675812, 0.24684691429138...
don't really need property / method details; JUST a complete list of class names (and parent names) I can store to a table and put in a treeview. Anything beyond that, though, is more than welcome as bonus info. :-) --- Update later: One answer that shows up in my "recent" section on SO, but not here on the questio...
[ 0.4621230661869049, -0.17159856855869293, 0.023012429475784302, 0.337747722864151, 0.14834807813167572, -0.18382501602172852, 0.36778774857521057, 0.34086325764656067, -0.3392274081707001, -0.2634270191192627, -0.13066820800304413, 0.25240039825439453, 0.011827671900391579, 0.2823222577571...
interesting to study. Another idea is to scan for type information which is on top of the list of exported functions so you can skip enumerating further. The type infos are exported with names starting with prefix '@$xp$'. Here's an example: ``` unit PackageUtils; interface uses Windows, Classes, SysUtils, Contnrs...
[ 0.14730434119701385, -0.3125896155834198, 0.42735081911087036, -0.11702089011669159, -0.011331466026604176, 0.08564906567335129, 0.18601363897323608, -0.4122420847415924, -0.07993357628583908, -0.6250505447387695, -0.3465513288974762, 0.6964511275291443, -0.5742578506469727, 0.157731264829...
function FindPackage(Handle: HMODULE): TDelphiPackage; procedure Reload; virtual; property PackageCount: Integer read GetPackageCount; property Packages[Index: Integer]: TDelphiPackage read GetPackages; end; TDelphiPackageList = class(TObjectList) protected function GetItem(Index: Integer): TDel...
[ -0.27866894006729126, -0.29186785221099854, 0.27890390157699585, -0.31403252482414246, -0.04743102937936783, 0.3234497308731079, 0.21858219802379608, -0.6470378637313843, 0.016396736726164818, -0.35014137625694275, -0.503887414932251, 0.7791008353233337, -0.5682733058929443, -0.09094525128...
function Last: TDelphiPackage; property Items[Index: Integer]: TDelphiPackage read GetItem write SetItem; default; end; TDelphiPackage = class private FHandle: THandle; FInfoTable: Pointer; FTypeInfos: TList; procedure CheckInfoTable; procedure CheckTypeInfos; function GetDescriptio...
[ 0.0923667624592781, -0.21670298278331757, 0.3736612796783447, -0.30608078837394714, 0.008974199183285236, 0.2647443413734436, 0.32621705532073975, -0.37449944019317627, -0.07386451959609985, -0.3084120750427246, -0.41446006298065186, 0.5722745060920715, -0.36975592374801636, -0.02091517671...
Pointer = nil); destructor Destroy; override; property Description: string read GetDescription; property FileName: string read GetFileName; property Handle: THandle read FHandle; property ShortName: string read GetShortName; property TypeInfoCount[Kinds: TTypeKinds]: Integer read GetTypeInfoCou...
[ 0.008292137645184994, -0.07166662812232971, 0.27374160289764404, -0.16427765786647797, 0.0641040951013565, 0.14153951406478882, 0.39542436599731445, -0.8117446899414062, -0.2333614081144333, -0.682037353515625, -0.49290868639945984, 0.32719892263412476, -0.22728347778320312, 0.411156207323...
PUnitName = ^TUnitName; TUnitName = packed record Flags : Byte; HashCode: Byte; Name: array[0..255] of Char; end; PPackageInfoHeader = ^TPackageInfoHeader; TPackageInfoHeader = packed record Flags: Cardinal; RequiresCount: Integer; {Requires: array[0..9999] of TPkgName; ContainsCoun...
[ -0.13774403929710388, -0.35965991020202637, 0.41816067695617676, -0.4443776309490204, -0.15533332526683807, 0.7934280037879944, 0.21323314309120178, -0.1338208168745041, 0.12950143218040466, -0.42251625657081604, -0.1644682139158249, 0.7320653796195984, -0.23624356091022491, -0.17975439131...
HMODULE): PPackageInfoHeader; forward; function AddPackage(Module: HMODULE; Data: {TDelphiPackageList} Pointer): Boolean; var InfoTable: Pointer; begin Result := False; if (Module <> HInstance) then begin InfoTable := PackageInfoTable(Module); if Assigned(InfoTable) then TDelphiPackageList(Data)...
[ 0.00027383447741158307, -0.1662004142999649, 0.7844020128250122, -0.5552421808242798, -0.003924568183720112, 0.48620325326919556, 0.26357147097587585, -1.0574746131896973, -0.230992391705513, -0.41669565439224243, -0.5381941199302673, 0.7365749478340149, -0.4421001970767975, -0.09236390888...
UnlockResource(ResData); finally FreeResource(ResData); end; end; end; function EnumModulesPS(Callback: TEnumModulesCallback; Data: Pointer = nil): Boolean; var ProcessHandle: THandle; SizeNeeded: Cardinal; P, ModuleHandle: PDWORD; I: Integer; begin Result := False; ProcessHandle := OpenPr...
[ -0.5803266167640686, -0.2551549971103668, 0.6305612921714783, -0.13991813361644745, 0.4163013696670532, 0.437588095664978, 0.20895010232925415, -0.3540695905685425, -0.35323745012283325, -0.4623945355415344, -0.7576830387115479, 0.46424663066864014, -0.08993957191705704, 0.4761553108692169...
try if EnumProcessModules(ProcessHandle, P, SizeNeeded, SizeNeeded) then begin ModuleHandle := P; for I := 0 to SizeNeeded div SizeOf(DWORD) - 1 do begin if Callback(ModuleHandle^, Data) then Exit; Inc(ModuleHandle); end;
[ -0.3132893741130829, -0.3124591112136841, 0.6726669073104858, -0.37808066606521606, 0.24881742894649506, 0.12306411564350128, 0.2513037621974945, -0.5899466276168823, -0.04753969609737396, -0.45582500100135803, -0.5304710268974304, 0.5116449594497681, -0.28342553973197937, 0.06208743527531...
Result := True; end; finally FreeMem(P); end; finally CloseHandle(ProcessHandle); end; end; function EnumModulesTH(Callback: TEnumModulesCallback; Data: Pointer = nil): Boolean; begin Result := False; // todo win9x? end; function PackageInfoTable(Module: HMODULE): PPackageInfoHeader; v...
[ -0.26307961344718933, -0.09139706939458847, 0.9052355289459229, -0.3650588393211365, 0.2514725923538208, 0.3368529975414276, 0.14512452483177185, -0.6431058645248413, -0.26006951928138733, -0.39094600081443787, -0.6467374563217163, 0.6599745750427246, -0.12982945144176483, 0.21344050765037...
Result := LockResource(Data); UnlockResource(Data); finally FreeResource(Data); end; end; end; { TDelphiProcess private } function TDelphiProcess.GetPackageCount: Integer; begin Result := FPackages.Count; end; function TDelphiProcess.GetPackages(Index: Integer): TDelphiPackage; begin Result...
[ -0.11852565407752991, -0.3101068437099457, 0.44743603467941284, -0.32739391922950745, 0.12300948053598404, 0.2657586336135864, 0.5038650631904602, -0.7968930602073669, -0.12485506385564804, -0.41814059019088745, -0.473630428314209, 0.5332356691360474, -0.39997702836990356, 0.26996165513992...
Result := FPackages[I]; Break; end; end; procedure TDelphiProcess.Reload; begin Clear; if Assigned(EnumModules) then EnumModules(AddPackage, FPackages); end; { TDelphiPackageList protected } function TDelphiPackageList.GetItem(Index: Integer): TDelphiPackage; begin Result := TDelphiPackage(inher...
[ -0.16724906861782074, -0.3883676528930664, 0.2573842704296112, -0.3711414337158203, -0.034890685230493546, 0.5540366768836975, 0.2187616229057312, -0.7965101003646851, -0.1207989901304245, -0.2729685306549072, -0.4680286645889282, 0.6115096211433411, -0.47622063755989075, 0.099074862897396...
:= inherited Remove(APackage); end; { TDelphiPackage private } procedure TDelphiPackage.CheckInfoTable; begin if not Assigned(FInfoTable) then FInfoTable := PackageInfoTable(Handle); if not Assigned(FInfoTable) then raise EPackageError.CreateFmt(SCannotReadPackageInfo, [ExtractFileName(GetModuleName(Hand...
[ 0.06213389337062836, -0.45081478357315063, 0.6838126182556152, -0.4745504856109619, 0.13282617926597595, 0.3312276601791382, 0.34163591265678406, -0.6731595396995544, -0.239635169506073, -0.5516088008880615, -0.2672632336616516, 0.6757320761680603, -0.7081373333930969, -0.00683359056711196...
Names := PDWORD(DWORD(Handle) + DWORD(ExportDir^.AddressOfNames)); for I := 0 to ExportDir^.NumberOfNames - 1 do begin if StrLIComp(PChar(DWORD(Handle) + Names^), STypeInfoPrefix, StrLen(STypeInfoPrefix)) <> 0 then Break; FTypeInfos.Add(GetProcAddress(Handle, PChar(DWORD(Handle) + ...
[ -0.11126640439033508, -0.11583297699689865, 0.7295684814453125, -0.2494104504585266, 0.1468336433172226, 0.22594253718852997, 0.2631508708000183, -0.4959084689617157, -0.1896277815103531, -0.40505456924438477, -0.653869092464447, 0.3908155858516693, -0.5103128552436829, 0.1850830614566803,...
Result := GetPackageDescription(Handle); end; function TDelphiPackage.GetFileName: string; begin Result := GetModuleName(FHandle); end; function TDelphiPackage.GetInfoName(NameType: TNameType; Index: Integer): string; var P: Pointer; Count: Integer; I: Integer; begin Result := ''; CheckInfoTable; Count ...
[ -0.1976017951965332, -0.33787399530410767, 0.8215904831886292, -0.3684084117412567, -0.0063168881461024284, 0.23217421770095825, 0.25784361362457275, -0.6862288117408752, -0.15099550783634186, -0.2210661917924881, -0.4394053816795349, 0.700933575630188, -0.33209508657455444, -0.12348720431...
P := Pointer(Cardinal(P) + SizeOf(Integer)); if (Index >= 0) and (Index < Count) then begin for I := 0 to Count - 1 do P := Pointer(Cardinal(P) + StrLen(PUnitName(P)^.Name) + 3); Result := PUnitName(P)^.Name; end; end; ntRequiresPackage:
[ -0.4368857443332672, -0.38762277364730835, 0.6903039216995239, -0.5015522241592407, -0.1642196625471115, 0.5897063612937927, 0.1334371119737625, -0.5107566714286804, -0.1188984140753746, -0.2992149591445923, -0.3176765441894531, 0.7047337889671326, -0.3772317171096802, -0.2741921842098236,...
if (Index >= 0) and (Index < Count) then begin for I := 0 to Index - 1 do P := Pointer(Cardinal(P) + StrLen(PPkgName(P)^.Name) + 2); Result := PPkgName(P)^.Name; end; ntDcpBpiName: if PPackageInfoHeader(FInfoTable)^.Flags and pfPackageModule <> 0 then begin ...
[ -0.3485415279865265, -0.5877859592437744, 1.0009697675704956, -0.2394985854625702, 0.21143700182437897, 0.13342493772506714, -0.13820849359035492, -0.5046977996826172, -0.414010614156723, -0.47041165828704834, -0.26808586716651917, 0.5243273973464966, -0.487199991941452, 0.0476042702794075...
Count - 1 do P := Pointer(Cardinal(P) + StrLen(PPkgName(P)^.Name) + 2); Count := Integer(P^); P := Pointer(Cardinal(P) + SizeOf(Integer)); for I := 0 to Count - 1 do P := Pointer(Cardinal(P) + StrLen(PUnitName(P)^.Name) + 3); Result := PPkgName(P)^.Name; end; ...
[ -0.3066633939743042, -0.41159048676490784, 0.7652537226676941, -0.29307615756988525, -0.3130273222923279, 0.25725680589675903, 0.13614799082279205, -0.6457526683807373, -0.2100369781255722, -0.2486339807510376, -0.2850889563560486, 0.4458853304386139, -0.5677146315574646, -0.19382876157760...
TTypeKinds): Integer; var I: Integer; begin CheckTypeInfos; Result := 0; for I := 0 to FTypeInfos.Count - 1 do if (Kinds = []) or (PTypeInfo(FTypeInfos[I])^.Kind in Kinds) then Inc(Result); end; function TDelphiPackage.GetTypeInfos(Kinds: TTypeKinds; Index: Integer): PTypeInfo; var I, J: Integer; b...
[ 0.12983834743499756, -0.1738065630197525, 0.682842493057251, -0.31559470295906067, -0.11844301223754883, 0.46983790397644043, 0.48064854741096497, -0.5097450613975525, 0.06538110226392746, -0.5151239037513733, -0.18544667959213257, 0.44706225395202637, -0.5167416334152222, -0.1212111338973...
begin Result := FTypeInfos[I]; Break; end; end; end; { TDelphiPackage public } constructor TDelphiPackage.Create(AHandle: HMODULE; AInfoTable: Pointer = nil); begin inherited Create; FHandle := AHandle; FInfoTable := AInfoTable; FTypeInfos := nil; end; destructor TDelphiPackage.Dest...
[ -0.22284209728240967, -0.3086945414543152, 0.523518979549408, -0.21175748109817505, 0.21217107772827148, 0.2064148485660553, 0.3748045861721039, -0.5965458154678345, -0.1784045547246933, -0.5117962956428528, -0.44845476746559143, 0.4562392830848694, -0.22162918746471405, 0.2727847099304199...
EnumModules := nil; end; finalization end. ``` Unit of the test design package installed in the IDE: ``` unit Test; interface uses SysUtils, Classes, ToolsAPI; type TTestWizard = class(TNotifierObject, IOTAWizard, IOTAMenuWizard) private { IOTAWizard } procedure Execute; function GetIDStri...
[ 0.2486056536436081, -0.439053475856781, 0.09382658451795578, 0.15189242362976074, 0.36830249428749084, 0.2753171920776367, 0.37787094712257385, -0.6794729828834534, 0.021267222240567207, -0.514022707939148, -0.4211878478527069, 0.5000442266464233, -0.1560956984758377, 0.2594853341579437, ...
'' then Result := Result + '\'; Result := Result + AClass.ClassName; end; procedure ShowMessage(const S: string); begin with BorlandIDEServices as IOTAMessageServices do AddTitleMessage(S); end; { TTestWizard } procedure TTestWizard.Execute; var Process: TDelphiProcess; I, J: Integer; Package: TDel...
[ -0.011968428269028664, -0.22969114780426025, 0.6651327610015869, -0.45347148180007935, 0.030581330880522728, 0.3761346936225891, 0.49960604310035706, -0.6739299297332764, -0.011251543648540974, -0.4451392590999603, -0.5323684811592102, 0.40498554706573486, -0.28370407223701477, 0.169589608...
PData := GetTypeData(PInfo); ShowMessage(Format('%s: %s.%s (%s)', [Package.ShortName, PData^.UnitName, PInfo^.Name, AncestryStr(PData^.ClassType)])); end; end; end; function TTestWizard.GetIDString: string; begin Result := 'TOndrej.TestWizard'; end; function TTestWizard.GetName: string; begin Result :...
[ 0.005665175151079893, -0.3956889510154724, 0.33062633872032166, -0.26545825600624084, 0.03886957839131355, 0.2632579207420349, 0.4649716317653656, -0.5443987250328064, 0.30535534024238586, -0.7649230360984802, -0.7312653064727783, 0.2942512631416321, -0.3299023509025574, 0.2657895386219024...
Test should appear under Delphi's Help menu. Clicking it should display all loaded classes in the Messages window.
[ 0.29895246028900146, -0.16341078281402588, -0.09692849218845367, 0.20523439347743988, -0.1556088626384735, -0.17793597280979156, 0.4409686028957367, 0.09527470171451569, 0.33107131719589233, -0.6520223617553711, -0.3851209282875061, 0.08123486489057541, -0.03646095469594002, -0.13283376395...
The question field is a bit too short to pose my real question. If anyone can recapitulate it better, please feel free. My real question is this: I'm reading a lot of other people's code in C# these days, and I have noticed that one particular form of iteration is widely spread, (see in code). My first question is:...
[ 0.21560873091220856, 0.018542418256402016, -0.08865857869386673, 0.15973830223083496, -0.3303745687007904, 0.36958712339401245, 0.29472216963768005, 0.08767188340425491, -0.20228098332881927, -0.5886634588241577, 0.34044989943504333, 0.22329778969287872, -0.08166562765836716, -0.0773376375...
far too much a subjective item in these constructs, of course, what you use the most will seem more readable, but I can assure everyone that the for-form is at least as readable, since it has all in one line, and you can even read the initializing in the construct. Thus the second question: why is the 3rd form seen m...
[ 0.24111419916152954, -0.021285351365804672, 0.046173080801963806, -0.1596061885356903, -0.39460134506225586, -0.02205960638821125, 0.6144943237304688, -0.3547554910182953, -0.3401288688182831, -0.5292008519172668, -0.32443922758102417, 0.5031123161315918, -0.029060667380690575, -0.35202321...
{ Console.Write(1/nr); nr = getNumber(); } // the somewhat shorter form int nr; while (NotZero(nr = getNumber())) Console.Write(1 / nr);
[ -0.3439464569091797, -0.19838090240955353, 0.4598194658756256, -0.44387078285217285, 0.10677109658718109, 0.21408575773239136, 0.37065672874450684, -0.5456539392471313, -0.08429031819105148, -0.41142892837524414, -0.5439974069595337, 0.4117276966571808, -0.0624847337603569, -0.075966224074...
// the for - form for (int nr = getNumber(); NotZero(nr); nr = getNumber()) Console.Write(1 / nr); ``` The first and third forms you've shown repeat the call to GetNumber. I prefer the second form, although it has the disadvantage of using a side-effect within a condition of course. However I prett...
[ 0.18636028468608856, -0.1334027796983719, 0.6679657101631165, -0.50736004114151, 0.013964148238301277, 0.007280348800122738, 0.4914990961551666, -0.29488885402679443, 0.00022722649737261236, -0.47172120213508606, -0.4468880295753479, 0.7482977509498596, -0.05072508752346039, -0.07070995122...
an argument though - the common situations I find myself in are: ``` string line; while ( (line = reader.ReadLine()) != null) ... ``` and ``` int bytesRead; while ( (bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0) ... ``` Both of these are now so idiomatic to me that they don't cause me any problems - and...
[ -0.011719695292413235, 0.43882042169570923, 0.3324451446533203, -0.17281454801559448, -0.5691933035850525, 0.29111894965171814, 0.3941965103149414, -0.0628281757235527, 0.08916709572076797, -0.416911780834198, -0.05920746177434921, 0.4285528063774109, 0.005940522067248821, 0.01703528687357...
tend to do this - the "too-wide" scope doesn't bother me *that* much. I suspect it wouldn't be too hard to write a method to encapsulate all of this. Something like: ``` ForEach(() => reader.ReadLine(), // Way to obtain a value line => line != null, // Condition line => { // body }; ``` Mind ...
[ 0.07768319547176361, -0.08409033715724945, 0.4453509449958801, -0.022622160613536835, -0.13587427139282227, -0.03713914006948471, 0.20066817104816437, -0.14317843317985535, -0.020462047308683395, -0.7656828761100769, 0.08969324082136154, 0.6387394666671753, -0.21826337277889252, -0.0065969...
This seems to be a question where the answer is implicit, hence I can't find anything explicit. Does Google Web Toolkit only support custom layout managers, or a sub-set of the Java layout managers? For example, is it *possible* to take a Java Swing application using GroupLayout and get it to work with GWT? GWT layou...
[ 0.4658738076686859, -0.05304330214858055, 0.28596633672714233, -0.058153681457042694, -0.231199249625206, -0.0816904753446579, 0.06346893310546875, -0.2827865481376648, -0.4724534749984741, -0.675272524356842, 0.13079877197742462, 0.6703962087631226, -0.4009905159473419, -0.178929135203361...
written in Java solely because Java is statically type and widely supported with world class editors. The fact that it's written in Java has nothing to do with any desire by the GWT team to allow you to port SWT/AWT/Swing to GWT. The web is a different environment to the desktop, and since your code ends up compiled in...
[ 0.5647338032722473, 0.17049846053123474, 0.10369891673326492, -0.21219198405742645, -0.30500975251197815, -0.054900214076042175, 0.46976765990257263, -0.05796615406870842, -0.20830382406711578, -0.5476409196853638, -0.00379971694201231, 0.4879961609840393, -0.5702636241912842, -0.243616998...
Using the code given below the padding doesn't seem to be playing as it should, in theory the text **"ADD this text"** should start from column 21 in both the strings but in str2 it has a few extra spaces. On checking the length of both the strings the length turned out to be the same 20 as expected. ``` strin...
[ 0.23446108400821686, -0.05258219689130783, 0.4585089087486267, -0.31282487511634827, -0.306885302066803, -0.1845957487821579, 0.4348946809768677, -0.7857586741447449, -0.25888708233833313, -0.3702021837234497, -0.25594770908355713, 0.339794784784317, -0.22168321907520294, -0.21017602086067...
MessageBox.Show(str1.Length.ToString()); MessageBox.Show(str2.Length.ToString()); MessageBox.Show(str1 + common + "\n" + str2 + common); ``` Anybody encountered this problem before? Is there something obvious I am missing. Many Thanks. Maybe your MessageBox is showing variable-pitch font? Try setti...
[ 0.026312347501516342, -0.22294244170188904, 0.21295729279518127, -0.18818853795528412, -0.20752623677253723, 0.16898122429847717, 0.44303572177886963, 0.050955433398485184, -0.3632566034793854, -0.7400041818618774, -0.16632314026355743, 0.539216160774231, -0.515142023563385, -0.06043057888...
What tools are you using to track changes in your MySQL database? Currently I'm in a project where we use a plain text-file (version controlled via SVN) in which we manually add SQL statements when making changes to the database. Many of the changes magically disappears every now and then, and we are now looking f...
[ 0.4967307150363922, 0.08435353636741638, 0.2805205285549164, 0.30108708143234253, 0.1522642970085144, -0.09026966243982315, 0.20281054079532623, 0.2770047187805176, -0.5277050733566284, -0.6475235819816589, 0.2948779761791229, 0.575305700302124, -0.16921408474445343, 0.270018070936203, 0...
is a simple solution: * Make all changes to the database schema and static data via scripts * Version control the scripts
[ 0.14911401271820068, -0.0607229620218277, 0.230514794588089, 0.147954061627388, 0.07491783797740936, -0.22314871847629547, 0.25550180673599243, 0.11097924411296844, -0.1651037335395813, -0.616694986820221, -0.2009579837322235, 0.58086758852005, -0.356972336769104, 0.031058846041560173, 0...
What would be the ideal location (directory) to check in Third Party Reference Dll's for a .NET Project in a version control system. Typically i have seen most people to put them under bin, so that the runtime can automatically pickup these files. However is that the right way to go. I originally wanted to have a sepa...
[ 0.35439494252204895, -0.0714205652475357, 0.3056190013885498, 0.06901342421770096, 0.11667990684509277, -0.3956098258495331, -0.1984756588935852, -0.06201481074094772, -0.23784804344177246, -0.5659631490707397, 0.06761316955089569, 0.34571126103401184, -0.36934322118759155, 0.2764714658260...
lib will contain third party dll's while bin will contain the projects Binary (could be Dll or Exe) What is the preferred way, The concentration over is the location in the Version Control and not just the Physical File System. We use the following directory structure (more details available [on my blog](http://code.l...
[ 0.38771888613700867, 0.08733149617910385, 0.3180471658706665, -0.17996637523174286, 0.024610944092273712, -0.21556492149829865, -0.015644384548068047, -0.3461354374885559, -0.1721201241016388, -0.927598774433136, -0.4238087236881256, 0.13206063210964203, -0.34711530804634094, -0.0247559025...
is, of course, committed to version control.)
[ -0.22512583434581757, 0.09828612208366394, 0.4265924096107483, -0.030664024874567986, 0.4558590352535248, -0.05358077213168144, 0.3951869308948517, 0.26673296093940735, -0.11465634405612946, -0.312747061252594, -0.38319677114486694, 0.6796183586120605, -0.08956250548362732, 0.2877581417560...
I have a library which contains unloadable type (whenever I try to access them I get a TypeLoadException). Therefore, I can't use the System.Reflection namespace to inspect those types. Is there some other way to reflect on those types. Of course, I don't expect to be able to use any methods, I just want to see basic i...
[ 0.10949941724538803, -0.09749709814786911, 0.26085567474365234, 0.04969038814306259, -0.27268096804618835, -0.29170602560043335, 0.08391512185335159, -0.05712757632136345, -0.2937329113483429, -0.4740770757198334, 0.26863399147987366, 0.37842679023742676, -0.3131098747253418, 0.41472744941...
to do the reflection on the fly. You could use [Mono.Cecil](http://mono-project.com/Cecil) to reflect the assembly. Unfortunately you'd have to change your reflection code as the interfaces are not compatible.
[ 0.9145750999450684, 0.05318347364664078, -0.0012174933217465878, -0.0056068976409733295, -0.23575922846794128, -0.1282534897327423, 0.22460663318634033, -0.24598388373851776, -0.1355394572019577, -0.4850689768791199, 0.31658005714416504, 0.5330320000648499, -0.2122078537940979, -0.20583432...
I am a bit new to ThreadPool in .NET. I was wondering, if I can only send one object to my callback method, how am I able to access the class member variable to call its methods? (see customClass in CallBack()) And how would I load the data from customClass? Do I pass the customClass to a different CallBack method? i...
[ 0.3046238422393799, -0.03855165094137192, -0.09381245076656342, 0.12867383658885956, -0.18823975324630737, -0.18531642854213715, 0.2341972291469574, 0.21655933558940887, -0.18275097012519836, -0.5818050503730774, 0.23999395966529846, 0.5541501045227051, -0.0950794667005539, 0.2800847291946...
static void Main(string[] args) { CustomClass customClass = new CustomClass(); ThreadPool.QueueUserWorkItem(CallBack, "Hello"); Console.Read();
[ -0.07257627695798874, -0.4579525589942932, 0.5074797868728638, -0.43628108501434326, 0.28161245584487915, 0.47057077288627625, 0.38073837757110596, 0.11927402764558792, -0.4482150673866272, -0.4666236340999603, -0.10942240059375763, 0.5998966693878174, -0.4580053985118866, 0.64822357892990...
} private static void CallBack(object state) { customClass.SaveData(state.ToString()); } } ``` ``` class Program { static void Main(string[] args) { CustomClass customClass = new CustomClass(); ThreadPool.QueueUserWorkItem(x => CallBack(customCla...
[ -0.04676034301519394, -0.37806013226509094, 0.47399047017097473, -0.38421475887298584, 0.20476053655147552, 0.45661622285842896, 0.24997493624687195, 0.09436878561973572, -0.46740224957466125, -0.3841797113418579, -0.18488344550132751, 0.7542403936386108, -0.43526580929756165, 0.5891441106...
void CallBack(CustomClass custom, string text) { customClass.SaveData(text); } } ```
[ 0.001737989136017859, -0.44175171852111816, 0.08071181178092957, -0.35331404209136963, 0.14152471721172333, 0.12194758653640747, 0.1454245001077652, 0.04763839393854141, -0.0799771100282669, -0.3122146725654602, -0.2896643280982971, 0.9448040127754211, -0.3994755744934082, 0.15983417630195...
We are developing a GIS based application which simulates the real word objects (i.e. Pipes, Roads, etc) in a **virtual reality** environment. Currently we use [ArcScene](http://www.esri.com/software/arcgis/extensions/3danalyst/index.html) from [ESRI ArcGIS](http://www.esri.com/) package for 3D rendering, and in future...
[ 0.5842212438583374, 0.15010692179203033, 0.3483637571334839, 0.20449015498161316, -0.28273800015449524, 0.23184071481227875, 0.07275919616222382, 0.2044634371995926, 0.08775096386671066, -0.888971745967865, -0.027422120794653893, 0.47626832127571106, 0.0993751659989357, 0.04305217415094375...
any one have any experience or suggestion in this field? **circumstance and necessities:** 1. We use C# .NET environment for developing the application 2. There are huge amount of 3D objects to show 3. 3D objects are grouped in different CAD files 4. Interaction with final 3D scene is essential (e.g. Select one 3D ob...
[ 0.29785776138305664, 0.06546986848115921, 0.6205208897590637, 0.3199740946292877, -0.33750757575035095, -0.09998918324708939, 0.13703057169914246, -0.3687247931957245, -0.052082911133766174, -1.0377018451690674, 0.0986175388097763, 0.5386713147163391, 0.22061386704444885, -0.20575377345085...
Texture must be applicable **Rendring Engines:** After some search I found the following 3D rendering solutions: 1. **[CadFaster|Engine](http://www.cadfaster.com/)**: "The CadFaster|Engine is a unique and the most scalable 3D rendering solution for technical applications. It is over ten times faster than usual CAD a...
[ -0.22830308973789215, 0.049650341272354126, 0.964347779750824, 0.17293713986873627, -0.42010706663131714, -0.13884349167346954, 0.39793118834495544, -0.31780004501342773, 0.11485978215932846, -0.9542098045349121, 0.012438480742275715, 0.5950530767440796, 0.5222233533859253, 0.3720006048679...
and high-end VR applications." cited from Quest3D introduction 3. **[OpenSceneGraph](http://www.openscenegraph.org/)**: "The OpenSceneGraph is an open source high performance 3D graphics toolkit, used by application developers in fields such as visual simulation, games, virtual reality, scientific visualization and mod...
[ 0.04906763881444931, 0.02835218980908394, 0.8744139075279236, 0.2577754855155945, -0.2911372482776642, -0.1345384567975998, -0.3357033431529999, 0.29836663603782654, -0.35697484016418457, -0.5394963026046753, -0.4221162497997284, 0.6233603954315186, -0.3002985417842865, -0.0125070223584771...
of which engine you use, there are some key concepts to understand. Since you are dealing with so many objects, the main one is that of Level of Detail (LoD). Make sure your objects have realistic LoD associated with them. For example, you won't bother to render the high-detail model of the screw when viewing the who...
[ 0.016003554686903954, -0.20020481944084167, 0.4482962489128113, 0.4076104164123535, -0.014410614967346191, -0.0649627223610878, -0.2633076608181, -0.32274264097213745, -0.3529028296470642, -0.4876726567745209, -0.0018059195717796683, 0.8175292015075684, 0.060022737830877304, 0.128877088427...
very important, but probably dealt with any of those engines you have already mentioned. If you are dealing with GIS stuff, check out AGI's [Insight3D](http://blogs.agi.com/insight3d/index.php/about/). Still in early development, but backed by a lot of good technology, and designed to handle large quantities of object...
[ 0.24780039489269257, -0.06207704916596413, 0.19057594239711761, 0.30391380190849304, -0.28408941626548767, -0.04868050664663315, -0.2108028382062912, 0.0662137120962143, -0.3084092140197754, -0.5896351337432861, 0.06849218159914017, 0.41647854447364807, -0.13671036064624786, 0.037864379584...
have to with other engines. They have all the constructs you need for 1. Very fast hit-testing (i.e. which entity you picked). 2. Scene-Graph classes with easy controls for conditional rendering. 3. Time is integrated into the engine as part of the Scene-Graph. This means that you can even define what things looked l...
[ 0.34023410081863403, -0.17103981971740723, 0.23001912236213684, 0.31813371181488037, -0.010122894309461117, -0.002771112835034728, 0.18867148458957672, -0.17128492891788483, -0.10828904062509537, -0.9619876742362976, -0.03595079109072685, 0.6122912168502808, -0.03074067272245884, -0.152050...
example, we used the Unreal engine to render our office, but we had to make everything to different scales than real-life. It looked great, but not to real-life dimensions. This might make a difference when dealing with details down to screws as you are doing. A little disclaimer: I do not work for AGI, but I have per...
[ 0.2257470339536667, 0.37654629349708557, 0.3959190547466278, 0.01584569364786148, 0.018571333959698677, 0.19693858921527863, -0.08721144497394562, 0.0008429291192442179, -0.09078719466924667, -0.8523119688034058, -0.07890577614307404, 0.5606861114501953, -0.0024331319145858288, 0.052700433...
is used by many people for high-resolution astronomical calculations.
[ 0.22171509265899658, 0.37429118156433105, 0.1450270712375641, 0.17969192564487457, 0.2045215368270874, -0.32378625869750977, -0.15245243906974792, 0.12626074254512787, -0.19042105972766876, -0.13996483385562897, -0.17420506477355957, 0.2183954268693924, 0.10224936157464981, 0.0154112325981...
I am writing a report to return details about an object ('files') in my database. My application lets users create their own flags for use against file objects. Flags basically consist of a name, then flag instances store a bit value to indicate whether it is set for the parent file object. I want to write a query tha...
[ 0.5519668459892273, 0.16293208301067352, 0.3410675525665283, 0.13706645369529724, -0.17672614753246307, 0.12685389816761017, 0.13953423500061035, -0.23652082681655884, -0.003379248781129718, -0.4879412055015564, 0.10703575611114502, 0.13200704753398895, -0.10840225964784622, 0.194937080144...
is set for the given file row. Does that make sense? How do i go about writing the query? Thanks for any help. Edit: Clarification.. As part of this query, I need to run a sub query that returns the flags that have been created by the user (I do not know these at design time), then incorporate a check for each flag...
[ 0.3609263598918915, 0.022893184795975685, 0.5199142098426819, 0.2658494710922241, 0.22107480466365814, -0.1695711761713028, 0.03534041345119476, -0.32110267877578735, -0.13492374122142792, -0.731627881526947, -0.03195186331868172, 0.29252538084983826, -0.23263907432556152, 0.04002483934164...
query to return a result set with columns something like this: **FileId** **FileName** **Flag1Name** **Flag2Name** .... **FlagNName** You could start by looking at the [Pivot](http://msdn.microsoft.com/en-us/library/ms177410.aspx) function available in SQL Server 2005+. With that and some string concatenation you shou...
[ -0.3660573363304138, -0.33342400193214417, 0.44888001680374146, 0.08240200579166412, -0.5566864609718323, 0.08890852332115173, -0.015292366966605186, -0.29527562856674194, -0.270431250333786, -0.4401114284992218, 0.1329311728477478, 0.28999558091163635, -0.3493061065673828, 0.1062599644064...
<column name>, ... From Table PIVOT ( ... FOR ... ) ```
[ -0.3278897702693939, 0.38754886388778687, 0.537920355796814, -0.13165675103664398, -0.1191367581486702, 0.22712643444538116, -0.34225893020629883, -0.15597155690193176, -0.33941566944122314, -0.463823139667511, -0.07699545472860336, -0.10795706510543823, -0.2759140431880951, 0.149040922522...
I am trying to create a timeline player. I have a div object which moves from one side of the screen to another (i.e. using animate() to change the 'left' position of the div). Lets assume this animation takes 5 seconds to happen. I would like that a jQuery Slider keeps incrementing bit by bit alongside the animation...
[ 0.23859518766403198, -0.2569943368434906, 0.6254685521125793, -0.024716950953006744, -0.15149320662021637, 0.12824252247810364, -0.2214411497116089, 0.11684238165616989, -0.1186978742480278, -0.5036961436271667, 0.1388971209526062, 0.2485029399394989, -0.11249150335788727, 0.32073542475700...
this handle in the same speed as the other animation? Here's an example: ``` var $slider = $('#slider').slider(); // initialize the slider var $handle = $slider.find('a'); // get the UI handle var $other = $('#other'); function moveHandle(perc, duration) { $slider.slider('disable').css('opacity', 1); // we don't w...
[ 0.08342838287353516, -0.3727118670940399, 0.7198647260665894, -0.0735272616147995, 0.07647692412137985, 0.045624855905771255, -0.13099589943885803, -0.40261566638946533, -0.2424410581588745, -0.4360389709472656, -0.30438947677612305, 0.25945866107940674, -0.3891889452934265, 0.108120895922...
left: perc + '%' }, duration, function() { $slider.slider('enable'); }); } moveHandle(100, 2000); $other.animate({ left: 300 // replace 300px with whatever you want }, 2000); ``` A working demo: <http://jsbin.com/iwise/36> You're free to extend or modify it however you want.
[ 0.12921324372291565, -0.37645629048347473, 0.4414418935775757, -0.101200632750988, 0.14678949117660522, 0.008144455961883068, 0.06961765140295029, -0.2898806631565094, -0.038626778870821, -0.6097365021705627, -0.30944111943244934, 0.5783743858337402, -0.06692774593830109, -0.07876472920179...
This question is related to [this one](https://stackoverflow.com/questions/763213/what-would-this-code-do-memory-management). Given this code: ``` char *p = new char[200]; delete[] p; ``` what would happen if you set `p[100] = '\0'` before deleting p? I had some code where I got a debug error when I tried to delet...
[ -0.07307940721511841, 0.011365711688995361, -0.022268760949373245, -0.12696386873722076, -0.011427543126046658, -0.20405977964401245, 0.30948689579963684, -0.2394658774137497, -0.20146220922470093, -0.31656891107559204, 0.004129072651267052, 0.42794933915138245, -0.3856370449066162, 0.1454...
If I have an instance of an inner class, how can I access the outer class *from code that is not in the inner class*? I know that within the inner class, I can use `Outer.this` to get the outer class, but I can't find any external way of getting this. For example: ``` public class Outer { public static void foo(Inn...
[ -0.003311431733891368, -0.08039180189371109, 0.12407685071229935, -0.19069452583789825, 0.13141481578350067, 0.06527063250541687, 0.36687907576560974, -0.2022887021303177, -0.08169405162334442, -0.5158405900001526, 0.0023354114964604378, 0.6365460753440857, -0.24859939515590668, 0.10697908...
Inner { public Outer getOuter() { return Outer.this; } } } ``` The bytecode of the `Outer$Inner` class will contain a package-scoped field named `this$0` of type `Outer`. That's how non-static inner classes are implemented in Java, because at bytecode level there is no concept of an inner class. You should be a...
[ 0.1573532223701477, -0.025934377685189247, -0.002165111480280757, -0.38238799571990967, -0.03380695730447769, -0.22809313237667084, 0.22185161709785461, -0.06123606860637665, 0.18777327239513397, -0.6332337260246277, -0.04490996524691582, 0.7892103791236877, -0.40598684549331665, -0.266774...
Man, that's ugly. ;) ``` public class Outer { public static void foo(Inner inner) { try { Field this$0 = inner.getClass().getDeclaredField("this$0"); Outer outer = (Outer) this$0.get(inner); System.out.println("The outer class is: " + outer); } catch (NoSuchFiel...
[ 0.14761951565742493, -0.017200743779540062, 0.2039274126291275, -0.43432366847991943, 0.23091885447502136, 0.20651419460773468, 0.9093606472015381, -0.600079357624054, 0.01099525298923254, -0.7267956137657166, -0.28221094608306885, 0.9324100613594055, -0.5955039858818054, 0.474517107009887...
} catch (IllegalAccessException e) { throw new RuntimeException(e); } } public class Inner { } public void callFoo() { // The constructor of Inner must be called in // non-static context, inside Outer. foo(new Inner()); }
[ 0.22467589378356934, -0.23191088438034058, 0.22256168723106384, -0.3654404282569885, 0.48019805550575256, 0.11573328822851181, 0.37437596917152405, -0.3133077025413513, -0.14618508517742157, -0.22244872152805328, -0.16007138788700104, 0.8013929724693298, -0.5231590867042542, -0.02465875260...
public static void main(String[] args) { new Outer().callFoo(); } } ```
[ 0.04603438079357147, -0.16493770480155945, 0.28963834047317505, -0.5167514681816101, 0.4029567241668701, -0.022321579977869987, 0.37694865465164185, 0.16695252060890198, -0.3001982271671295, -0.32958748936653137, -0.5257791876792908, 0.7572141885757446, -0.5728201866149902, 0.3671795427799...
Can I get the value of an object field some other way than `obj.field`? Does something like `obj.get('field')` exist? Same thing for setting the value of the field. To get the value of a field: ``` getattr(obj, 'field_name') ``` To set the value of a field: ``` setattr(obj, 'field_name', 'field value') ``` To get...
[ 0.20191003382205963, 0.17386235296726227, 0.32182472944259644, 0.0008301158668473363, -0.17018340528011322, -0.3118698298931122, 0.008930149488151073, -0.20984339714050293, -0.20877934992313385, -0.4091678857803345, 0.07883893698453903, 0.5893551111221313, -0.16245070099830627, 0.108433127...
How many threads can a Java VM support? Does this vary by vendor? by operating system? other factors? This depends on the CPU you're using, on the OS, on what other processes are doing, on what Java release you're using, and other factors. I've seen a Windows server have > 6500 Threads before bringing the machine down....
[ 0.3581199049949646, 0.11807378381490707, 0.19722303748130798, -0.004928170703351498, 0.07481440156698227, -0.13359756767749786, 0.15703852474689484, -0.005395499523729086, -0.4612434208393097, -0.7017620801925659, 0.31455856561660767, 0.4056766927242279, -0.4265873432159424, 0.084381043910...
itself can host without problems. Of course, you have to have enough RAM and you have to have started Java with enough memory to do everything that the Threads are doing and to have a stack for each Thread. Any machine with a modern CPU (most recent couple generations of AMD or Intel) and with 1 - 2 Gig of memory (dep...
[ 0.2080453783273697, 0.018616579473018646, 0.16919825971126556, -0.09245333820581436, -0.17751072347164154, -0.019985252991318703, 0.15744322538375854, 0.22892020642757416, -0.4380732774734497, -0.7689769864082336, 0.15272743999958038, 0.18248985707759857, -0.12681668996810913, 0.1228290498...
Are there any Exceptions defined in the .NET Framework that I shouldn't throw in my own code, or that it is bad practice to? Should I write my own? You shouldn't throw any exception that is automatically thrown by the CLR due to user errors. For instance * StackOverflowException * NullReferenceException * AccessViola...
[ 0.3646072745323181, 0.3487122654914856, 0.024242667481303215, 0.09807108342647552, -0.0789821594953537, -0.49012258648872375, 0.4279390275478363, 0.033285077661275864, -0.49172720313072205, -0.4168145954608917, -0.02035375125706196, 0.42694801092147827, -0.29794785380363464, 0.046114001423...
state in an API. If I call an API and it throwns an ArgumentException, I have a reasonable expectation that the given object is in a good state. It recognized a potentially bad situation and actively accounted for it. On the other hand if it throwns a NullRefrenceException, that is an indication that the API encountere...
[ -0.015071181580424309, 0.1599293202161789, 0.035649798810482025, 0.025553856045007706, -0.140364408493042, 0.03909742459654808, 0.46856698393821716, -0.18309400975704193, -0.35135942697525024, -0.25953179597854614, -0.2163415104150772, 0.41193923354148865, -0.3229614794254303, 0.1616274565...
if it's thrown by the CLR. * <http://blogs.msdn.com/jaredpar/archive/2008/10/22/when-can-you-catch-a-stackoverflowexception.aspx> **EDIT** Responding to Michael's comment You also should not throw Exception, ApplicationException or SystemException directly. These exceptions types are too general to provide meaningfu...
[ 0.23360668122768402, 0.1054856926202774, 0.1751101315021515, -0.05263048782944679, -0.2507341206073761, -0.28108343482017517, 0.1932203620672226, -0.16577933728694916, -0.6354924440383911, -0.1397639960050583, -0.15222623944282532, 0.3201623260974884, -0.4083403944969177, 0.051422107964754...
In gvim, is it possible to have multiple rows of file tabs? That is, instead of showing left/right arrows to navigate around the tabline (for tabs that don't fit into the tabline), it should "start" a new row of tabs. AFAIK, no, unless you intend to change vim's source. But, if you need that many tabs, now don't take...
[ 0.277639240026474, -0.1704932302236557, 0.956077516078949, 0.1646115481853485, -0.006985215935856104, -0.3268694281578064, 0.1260480284690857, -0.10571131855249405, -0.416243314743042, -0.7119600176811218, 0.04614921286702156, 0.7218452095985413, -0.5187028646469116, 0.1295328587293625, ...
I've seen a number of different solutions for doing this but I wonder if anyone can suggest which is the most elegant and secure version of letting users upload their own files to a folder on their own **shared** hosting? (`php.ini` etc is out of bounds). Files will be anything up to 100mb in size, so maybe an FTP bas...
[ 0.3186807930469513, -0.2552151083946228, 0.29557004570961, 0.30506208539009094, -0.10451081395149231, -0.3619074821472168, 0.13719388842582703, 0.021583465859293938, -0.6968932747840881, -0.6517204642295837, -0.3036517798900604, 0.3895893394947052, -0.10972783714532852, 0.19931086897850037...
"Downloads" page, and use Flash/Flex. This allows for better progress reporting and a cleaner interface. Here's an article on how to do a similar thing <http://www.flash-db.com/Tutorials/upload/>. I realise that this is not PHP, but the only file uploads you *can* do in PHP are HTTP ones. (AFAIK)
[ 0.4212110638618469, 0.011364256031811237, 0.2931414246559143, 0.10434913635253906, -0.24180088937282562, -0.24440999329090118, 0.03572764992713928, -0.060033511370420456, -0.5008015632629395, -0.5836604833602905, 0.0004776690329890698, 0.5129979848861694, -0.16911515593528748, -0.147397980...
I get to work with a number of companies, mostly with architects/lead developers and sometimes directly with the developers. One thing that comes up often is that when architects prescribe an application pattern, they want it to be followed consistently every time with little to no room for variation. **Presentation ...
[ 0.684450089931488, 0.14731483161449432, 0.20443621277809143, 0.14249010384082794, 0.08260604739189148, -0.05477442964911461, 0.26936477422714233, -0.011410249397158623, -0.3887927830219269, -0.8224327564239502, -0.18366242945194244, 0.7288579940795898, 0.02770019695162773, -0.0988556295633...
the things representing the state (the model/view model) is more conceptual than a prescriptive guide. A view might use many objects to represent this state, or it might use one, or perhaps it is so simple that it needs none, or perhaps it shares one. The ethos of the pattern is that we seperate the state management fr...
[ 0.3525882065296173, 0.062015000730752945, -0.024123188108205795, 0.05152500420808792, -0.11595620214939117, 0.22444038093090057, 0.4058118760585785, -0.19962623715400696, -0.3447864055633545, -0.7486712336540222, -0.20725931227207184, 0.14723485708236694, -0.36759719252586365, 0.1547404974...
ViewModel is just forwarding property getters/setters to the model object. Sometimes the view is so simple, that the extra objects just make it more complicated than it needs to be. As architects/team leads, do you prefer developers follow the same process every time like a checklist? Or do you prefer to leave the det...
[ 0.07980852574110031, -0.20863310992717743, 0.23305651545524597, 0.45443016290664673, 0.06961920857429504, -0.059229448437690735, 0.04146352782845497, -0.1795554757118225, -0.2610473036766052, -0.6098880171775818, -0.004225506912916899, 0.6529918313026428, -0.12449324876070023, -0.340813189...
When defining a reference architecture to be followed, focus on * Providing basic **principles** to follow: what's to be done, why, and the most important consequences. * Ensuring there are **standards** to be followed for e.g. coding and component usage * Providing **patterns** that support the principles. You're usi...
[ 0.5824873447418213, 0.43576696515083313, 0.27785301208496094, 0.16624292731285095, -0.04367313161492348, -0.06909128278493881, 0.2133851945400238, -0.16939802467823029, -0.1834302544593811, -0.7943896055221558, -0.3770068287849426, 0.8035970330238342, -0.30990585684776306, -0.2314530909061...
major nonfunctional requirements are identified, prioritized and achieved. Most of the time, at least in those company cultures I've worked with, acting as a guide and teacher is far more productive than trying to do all the thinking for others.
[ 0.3446103632450104, 0.15768378973007202, -0.2420746386051178, 0.17098857462406158, 0.26710084080696106, -0.06389112025499344, 0.27297380566596985, 0.12609849870204926, -0.1300288736820221, -0.7549700140953064, -0.2771646976470947, 0.8220980763435364, 0.17785240709781647, -0.324251413345336...
After reading all the questions and answers on StackOverflow concerning overriding `GetHashCode()` I wrote the following extension method for easy and convenient overriding of `GetHashCode()`: ``` public static class ObjectExtensions { private const int _seedPrimeNumber = 691; private const int _fieldPrimeNumb...
[ -0.19113072752952576, 0.15392714738845825, 0.5147268176078796, -0.07075364142656326, 0.2206689417362213, 0.07907284051179886, 0.34801048040390015, -0.5131387710571289, -0.19767308235168457, -0.17026087641716003, -0.4280356764793396, 0.527481734752655, -0.40472346544265747, 0.18570767343044...
for (int i = 0; i < fields.Length; i++) if (fields[i] != null) hashCode *= _fieldPrimeNumber + fields[i].GetHashCode(); return hashCode; } } } ``` (I basically only refactored the code that someone posted there, because I really like that it can be used gene...
[ 0.08667712658643723, 0.06110314279794693, 0.2416859120130539, -0.3655460476875305, 0.16696590185165405, -0.3226660490036011, 0.45743969082832336, -0.17720463871955872, -0.12852461636066437, -0.4848162829875946, -0.15850147604942322, 0.5269649624824524, -0.34160536527633667, 0.1624125242233...