text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
**Update:** Since development machine has moved to Vista, i now automatically test as a standard user. And with XP being phased out, this question isn't so relavent anymore. --- Since the Windows 2000 logo requirements, Microsoft has been requiring that applications run as standard user. Like everyone else i always r...
[ 0.5315346717834473, 0.4930279552936554, 0.4178650677204132, 0.07292098551988602, -0.11006823182106018, -0.18618595600128174, 0.5025694370269775, 0.04182388260960579, -0.25252440571784973, -0.38453152775764465, 0.031023209914565086, 0.6921946406364441, 0.03142617642879486, 0.044117763638496...
itself with normal rights using `[SaferCreateLevel][1]`/`[SaferComputeTokenFromLevel][2]` if it detects it is running as an administrator. i quickly see how specacularly some of my apps fail under Windows XP as a standard user (due to my own stupidity). i also see how the same applications work fine under Vista (thanks...
[ 0.3852779269218445, 0.2326410412788391, 0.3657960295677185, 0.20603400468826294, -0.15518291294574738, -0.534438967704773, 0.41196298599243164, -0.3152190148830414, 0.01632373407483101, -0.21258699893951416, 0.038050055503845215, 0.7528165578842163, -0.14464962482452393, -0.147222235798835...
ignore standard user access and hope for the best? --- i tried, as a bonus, to have my app relaunch itself as a limited user (rather than normal user). It doesn't even come up - Windows says it failed to initialize. So there an area of future research on my part: making the app even support limited user. --- i spec...
[ 0.45201292634010315, 0.2707751393318176, 0.280555784702301, 0.05628450959920883, 0.08864041417837143, -0.20039860904216766, 0.5894013047218323, 0.14109885692596436, -0.015664301812648773, -0.35647132992744446, -0.22576090693473816, 0.7411673069000244, -0.4099346399307251, 0.116063229739665...
on XP as a limited user almost all of the time and as the default. (On Vista, I use an adminstrative account and rely on UAC.) I develop as a limited user. There's very little in Java and Visual Studio development that requires any more privilege than that. If I need to run something under the limited account but wit...
[ 0.4293062388896942, 0.10254690051078796, 0.5319889783859253, -0.2703099250793457, 0.06341090798377991, -0.26919010281562805, 0.2704911231994629, 0.006935174111276865, 0.1506938636302948, -0.6498432159423828, -0.3147466480731964, 0.726006031036377, -0.029231790453195572, 0.05329534411430359...
allow network access to the new code (or not), etc., I will elevate my Limited User Account to Administrator long enough to get all of that done, then restart the account as Limited User again. Other than for Windows Updates, I do all of my downloads as a limited user and then install off-line after elevation to Admini...
[ 0.12019466608762741, -0.010306358337402344, 0.5955767035484314, 0.06316664069890976, 0.07801176607608795, -0.35977017879486084, 0.42841917276382446, 0.41307035088539124, -0.38624757528305054, -0.9746520519256592, -0.19514386355876923, 0.7010918259620667, -0.03281610831618309, 0.21673992276...
I prefer what that teaches me about not depending on special privileges in code I build.) [PS: I also have Data Execution Protection (supported in hardware) active by default on my XP system, and you'd be surprised what that turns up.]
[ 0.4196874499320984, 0.22274737060070038, 0.3055700659751892, 0.12999281287193298, 0.054302141070365906, -0.23454327881336212, 0.3749750554561615, 0.16639672219753265, -0.11341002583503723, -0.5459162592887878, -0.16179940104484558, 0.8137754797935486, 0.22898827493190765, -0.18808950483798...
I'm using AspectJ to advice all the public methods which do have an argument of a chosen class. I tried the following: ``` pointcut permissionCheckMethods(Session sess) : (execution(public * *(.., Session)) && args(*, sess)); ``` This is working wonderfully for methods with at least 2 arguments: ``` public voi...
[ -0.1770172268152237, -0.03677099198102951, 0.4179644286632538, -0.1212976723909378, -0.027010072022676468, 0.1544848382472992, 0.29719460010528564, -0.11792396008968353, -0.17921483516693115, -0.3406635820865631, -0.025786735117435455, 0.8722186088562012, -0.26857826113700867, -0.097559645...
with this nasty trick. Still waiting for someone to show up with an "official" pointcut definition. ``` pointcut permissionCheckMethods(EhealthSession eheSess) : (execution(public * *(.., EhealthSession)) && args(*, eheSess)) && !within(it.___.security.PermissionsCheck); pointcut permissionCheckMethods2(Ehea...
[ 0.0608057901263237, 0.22322146594524384, 0.6861788630485535, -0.11171626299619675, 0.1489015519618988, -0.10061062127351761, 0.6484273672103882, -0.37299007177352905, -0.13337011635303497, -0.5267971158027649, -0.29078763723373413, 0.31329426169395447, -0.26663896441459656, 0.3394493758678...
In Python 2.6, a new "timeout" parameter was added to the httplib.HTTPConnection class: <http://docs.python.org/library/httplib.html#httplib.HTTPConnection> However, this is only a timeout for the connection to a server. I am looking to set a timeout value for the **request**, not the connection. This doesn't seem to ...
[ -0.09101740270853043, -0.25823187828063965, 0.34332597255706787, -0.17707298696041107, -0.19516253471374512, 0.008104121312499046, 0.16692893207073212, -0.17839676141738892, -0.22274334728717804, -0.7711280584335327, -0.008653217926621437, 0.5046422481536865, -0.5294511318206787, 0.1214123...
requests or other things that might be abstracted away from an HTTP client). The timeout of the overall operation becomes unpredictable because of that.
[ -0.011744142509996891, -0.36573293805122375, 0.4794312119483948, 0.29507946968078613, 0.20800897479057312, -0.10081560164690018, 0.5050435066223145, -0.18670493364334106, -0.31530919671058655, -0.6868041753768921, -0.25629162788391113, 0.17757147550582886, 0.003386053256690502, 0.293908268...
I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista? Individual components of a filename (i.e. each subdirectory along the path, and the final filename) are limited to 255 characters, and the total path length is lim...
[ -0.07230447232723236, -0.14117899537086487, 0.5658515095710754, 0.18164172768592834, -0.007269382942467928, 0.07787224650382996, 0.31304821372032166, -0.19133096933364868, -0.32774031162261963, -0.843891978263855, -0.08887139707803726, 0.2953590452671051, -0.025864481925964355, 0.145207926...
Consider the following code: ``` <a href="#label2">GoTo Label2</a> ... [content here] ... <a name="label0"></a>More content <a name="label1"></a>More content <a name="label2"></a>More content <a name="label3"></a>More content <a name="label4"></a>More content ``` Is there a way to emulate clicking on the "GoTo Label...
[ 0.12598232924938202, -0.10282734781503677, 0.5748019814491272, -0.0029628118500113487, -0.24326179921627045, -0.17578135430812836, -0.018399838358163834, -0.22764603793621063, -0.20346398651599884, -0.8555946350097656, 0.007382217328995466, 0.4468272626399994, 0.06576061248779297, 0.035924...
that the content is visible.
[ 0.3382856845855713, 0.28425002098083496, -0.29557186365127563, 0.27083712816238403, -0.010556871071457863, -0.2835850417613983, 0.08778350800275803, 0.4302434027194977, 0.12871578335762024, -0.3767652213573456, -0.8036161661148071, 0.5976418256759644, -0.059934116899967194, 0.0165188815444...
I'm scouring the internet for a definition of the term "Internal Node." I cannot find a succinct definition. Every source I'm looking at uses the term without defining it, and the usage doesn't yield a proper definition of what an internal node actually is. Here are the two places I've been mainly looking: [Link](http...
[ -0.2940747141838074, 0.05644366145133972, 0.22246314585208893, -0.060004815459251404, -0.05799024552106857, 0.21983784437179565, 0.23692357540130615, 0.24347560107707977, -0.5166975259780884, -0.4055640697479248, -0.0015770181780681014, 0.342886745929718, -0.03587683290243149, 0.2237097173...
them. What actually *is* an internal node!? ``` I ROOT (root is also an INTERNAL NODE, unless it is leaf) / \ I I INTERNAL NODES / / \ o o o EXTERNAL NODES (or leaves) ``` As the wonderful picture shows, internal nodes are nodes located between the root of the tree and the ...
[ -0.4450436532497406, 0.4082881808280945, 0.34020519256591797, 0.07945366203784943, 0.07722186297178268, 0.2675119936466217, 0.3014369010925293, 0.2089093029499054, -0.5573471784591675, -0.8235833644866943, -0.27793192863464355, 0.09101726859807968, -0.23702257871627808, 0.2897338271141052,...
in the case it's the only node of the tree. What is said in one of the sites about an internal node having to have two children is for the tree to be a complete binary tree, not for the node to be internal.
[ -0.29878607392311096, 0.12370901554822922, -0.19055408239364624, -0.009247996844351292, 0.3541170060634613, 0.5332510471343994, 0.2710596024990082, 0.6153804063796997, -0.3372809588909149, -0.527763843536377, -0.18186695873737335, -0.024516919627785683, -0.034180648624897, 0.36839374899864...
That's it. It's a dumb dumb (embarrassing!) question, but I've never used C# before, only C++ and I can't seem to figure out how to access a Label on my main form from a secondary form and change the text. If anybody can let me know real quick what to do I'd be so grateful! BTW, I should really clarify. Sorry: I've go...
[ 0.27737534046173096, 0.1170760914683342, 0.49229633808135986, 0.14149434864521027, -0.008104037493467331, -0.22033937275409698, 0.15153147280216217, 0.16429738700389862, -0.36342620849609375, -0.40570971369743347, -0.0781014934182167, 0.10953275859355927, 0.025804976001381874, 0.1973340213...
of methods and properties for Form1, but there's only about 7, like ControlCollection, Equals, MouseButtons, and a couple others... I can publicly define a variable in Form1 and that shows, but I don't know how to access the label... ``` namespace AnotherProgram { public partial class Form1 : Form { pu...
[ 0.061174310743808746, 0.16672004759311676, 0.39624202251434326, -0.09045936167240143, 0.04935825988650322, -0.08989767730236053, 0.24085988104343414, -0.47837594151496887, -0.12917141616344452, -0.4867355525493622, -0.04736383259296417, 0.5052502751350403, -0.5625037550926208, 0.1295360475...
of Form1 - for example, if it's Form1 which is constructing Form2, you might pass `this` in as a constructor parameter. Then you'll need to either expose the label of Form1 via a property (or - ick! - a non-private field) or write a method/property which will set the text of the label. For example: ``` public class F...
[ 0.1686885803937912, -0.05977631360292435, 0.20224861800670624, -0.09714806079864502, -0.24387313425540924, -0.5182097554206848, 0.34006139636039734, -0.355825275182724, -0.08473934233188629, -0.6318869590759277, -0.6871203184127808, 0.3419157564640045, -0.5811415314674377, 0.07209812104701...
set { label.Text = value; } } public Form2 CreateForm2() { return new Form2(this); } } public class Form2 : Form { private Form1 form1; public Form2(Form1 form1) { this.form1 = form1; // Normal construction } public void SayHello() { form1.Labe...
[ 0.31785956025123596, -0.4818449914455414, 0.5787827968597412, -0.10982493311166763, 0.11593047529459, -0.30580151081085205, 0.2501240074634552, -0.32933467626571655, 0.05303677171468735, -0.33097147941589355, -0.6982704997062683, 0.46416059136390686, -0.4472964406013489, 0.2606638073921203...
= "Hello"; } } ```
[ -0.2689599394798279, 0.3541012108325958, 0.1557331085205078, -0.46024855971336365, 0.12460974603891373, -0.20263126492500305, 0.3925493359565735, 0.11770057678222656, 0.20950646698474884, -0.17290280759334564, -0.5219952464103699, 0.5471122860908508, -0.44601306319236755, 0.390834599733352...
I am interested in using/learning RoR in a project where I have to use a .NET dll. Is Ruby capable of importing a .NET dll? While IronRuby will make short work of talking to your .NET dll (it'll be literally no code at all), it was abandoned by microsoft, and it never got a large enough open source community to keep it...
[ 0.4383263885974884, 0.009222419001162052, 0.045236147940158844, 0.2430306226015091, -0.18936628103256226, -0.20520716905593872, 0.30442357063293457, 0.31970643997192383, -0.17959558963775635, -0.6864897012710571, 0.09726866334676743, 0.575704038143158, -0.10926126688718796, 0.2614189684391...
load COM objects from ruby, you just need the `win32ole` library, which comes as part of the standard library on windows ruby. Whether or not you can load the dll from COM will depend if the .NET dll was built to be 'Com Visible'. The .NET framework defines a `ComVisibleAttribute`, which can be applied to either an en...
[ 0.5981499552726746, -0.14501506090164185, 0.12198381125926971, -0.03368648141622543, -0.29138410091400146, 0.013099461793899536, 0.018603671342134476, 0.02446300908923149, -0.3756347596645355, -0.42834827303886414, -0.24368461966514587, 0.5793992280960083, -0.444279283285141, -0.0298868808...
(class library). Here's an example class I used: ``` using System; using System.IO; namespace ComLib { public class LogWriter { public void WriteLine( string line ) { using( var log = new StreamWriter( File.OpenWrite( @"c:\log.file" ) ) ) { log.WriteLine...
[ 0.10273005068302155, -0.3015678822994232, 0.6337094902992249, -0.16675066947937012, 0.39587879180908203, 0.12858343124389648, 0.15999764204025269, -0.05479162931442261, 0.06957507133483887, -0.5363858938217163, -0.32309412956237793, 0.45987817645072937, -0.39910998940467834, 0.366125971078...
} } } } ``` Now, under the visual studio project, there is a directory called `Properties` which contains `AssemblyInfo.cs`. In this file, there will be the following ``` [assembly: ComVisible( false )] ``` Change the false to true. If you don't want *every class* in the assembly exposed to COM, then y...
[ 0.5100098252296448, 0.1544334888458252, 0.04558397829532623, -0.10882698744535446, 0.025623999536037445, -0.06558308005332947, 0.27368098497390747, -0.08452773094177246, -0.1339917778968811, -0.7876210808753967, -0.3555912375450134, 0.6777970790863037, -0.3359912931919098, 0.02326446026563...
'properties'. In the list of sections, choose `Build` Scroll down, and tick the 'Register for COM interop' checkbox. Now when you compile this DLL, visual studio will do the neccessary stuff to load the COM information into the registry. Note if you're on vista you need to run VS as an administrator for this to work. ...
[ 0.3301577568054199, 0.09878458082675934, 0.4778866767883301, -0.09400417655706406, 0.1455535590648651, 0.0068178907968103886, 0.3440604507923126, -0.31232377886772156, -0.19029006361961365, -1.0653825998306274, -0.2212488055229187, 0.7275602221488953, -0.36717185378074646, 0.16976712644100...
"ClassLibrary1") Ruby that ruby file, and presto! you should see that the text gets written to `c:\log.file`. One problem with this solution is that it requires that the .NET dll is already Com Visible, or if it's not, you have the ability to recompile it. If neither of these things are true, then you may have to lo...
[ 0.259674072265625, -0.0662805438041687, 0.15143714845180511, 0.01020459458231926, 0.1331070214509964, -0.32110098004341125, 0.772442638874054, 0.2265741229057312, -0.23260244727134705, -0.5762315392494202, -0.2273973524570465, 0.862550675868988, -0.09850502014160156, 0.18741291761398315, ...
I'm generating and showing a new WinForms window on top of a Main Window. How can I achieve that the original (Main Window) keeps the focus? Setting the focus back after showing the new window does not solve my problem because I need to prevent the Main Window's title bar from flickering. The new window has to stay on ...
[ 0.6594425439834595, -0.03739037364721298, 0.6120222210884094, 0.13158352673053741, -0.24152597784996033, -0.23989655077457428, 0.6127631068229675, -0.023562872782349586, -0.10773914307355881, -0.685478925704956, -0.0459812693297863, 0.7951711416244507, -0.11129366606473923, 0.1563283652067...
a third-party library that already does this. The other option will probably be to create the window as a NativeWindow and use interop calls to interact with it.
[ 0.0033153577242046595, -0.21025067567825317, 0.06483779847621918, 0.2862330377101898, -0.004569227807223797, -0.3178681433200836, 0.09833124279975891, 0.08189217001199722, -0.10719776153564453, -0.9010050296783447, -0.2335401177406311, 0.380025714635849, -0.25826913118362427, 0.24879895150...
I am pretty new to php, but I am learning! I have a simple form on a client website. I am testing the form and when I click submit, I get the following error: Form Mail Script ``` Wrong referrer (referring site). For security reasons the form can only be used, if the referring page is part of this website. Note for ...
[ 0.7177108526229858, 0.42902857065200806, 0.4514889121055603, -0.20959380269050598, -0.18635937571525574, -0.5052120089530945, 0.445833295583725, 0.032727308571338654, -0.08896856009960175, -0.8456827998161316, 0.39512571692466736, 0.2971689999103546, 0.000653786410111934, 0.175896078348159...
need to change. Can someone please explain to me what the Admin note above means and how to fix it? The referrer is a value that's usually sent to a server by a client (your browser) along with a request. It indicates the URL from which the requested resource was linked or submitted. This error is part of a security m...
[ 0.3572767674922943, 0.11902453750371933, 0.767082691192627, -0.15397408604621887, -0.0862421914935112, -0.019517196342349052, 0.245785191655159, 0.09438683092594147, -0.1198374330997467, -0.7567650675773621, 0.06177177280187607, 0.21350476145744324, -0.29383203387260437, 0.2344274520874023...
can create a form on my site at *<http://www.bar.com/myform.html>* and submit it to your script. Scripts that send mail are often abused in this manner to send spam. To fix your problem, find the parameter in your script's configuration file that indicates the referrers that your script should handle input from and ch...
[ 0.6549426913261414, 0.2586796283721924, 0.7139770984649658, -0.22905907034873962, -0.2725692391395569, 0.04288544878363609, 0.5189827084541321, -0.2549799978733063, 0.158948615193367, -0.7455265522003174, 0.017826726660132408, 0.4145192801952362, -0.18658719956874847, 0.24883373081684113, ...
We have a COM object implemented with C++/ATL that includes a method which will return a DIB. We are also writing a .NET application that will use this COM object. Since we are writing both, we have the liberty of deciding how best to return this DIB from the COM object. To clarify, would it be best to return a native ...
[ 0.26632779836654663, 0.06366506963968277, 0.12362988293170929, 0.14309915900230408, -0.0674656480550766, 0.08497384935617447, -0.1437741369009018, -0.07993593066930771, 0.026396162807941437, -0.8650984168052673, -0.07575657963752747, 0.6699045300483704, -0.27467426657676697, 0.148597940802...
I get it into a .NET Image object? COM/OLE has a standard interface for representing graphical images called [IPicture](http://msdn.microsoft.com/en-us/library/ms680761(VS.85).aspx) (and its scripting-friendly version [IPictureDisp](http://msdn.microsoft.com/en-us/library/ms680762(VS.85).aspx)). COM provides an implem...
[ 0.4569837152957916, -0.30967608094215393, 0.8188691735267639, 0.06436522305011749, -0.0719388872385025, 0.1773408204317093, 0.06411121785640717, 0.08114226162433624, -0.244289830327034, -0.827246904373169, 0.07803397625684738, 0.3410874605178833, -0.07938531786203384, 0.37373384833335876, ...
[Microsoft.VisualBasic.Compatibility.VB6.IPictureToImage()](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.compatibility.vb6.support.ipicturetoimage.aspx).
[ 0.09623196721076965, -0.03621668368577957, 0.42237210273742676, -0.03867127373814583, 0.08024326711893082, -0.0291250329464674, 0.21580083668231964, -0.020477918907999992, -0.12558935582637787, -0.38778480887413025, -0.7175760269165039, 0.44158047437667847, -0.3587583303451538, -0.05803989...
I am attempting to create new membership users in an Ektron CMS400.NET-based website by through calls to the User web service API from a remote site. One of the methods I intend to utilize, [AddMembershipUser](http://www.ektron.com/manuals/cms400/v70/API_Help/frames.html?frmname=topic&frmfile=Ektron_Services_User_AddMe...
[ 0.28268930315971375, 0.33692020177841187, 0.6205040812492371, -0.08572039008140564, 0.0949537456035614, -0.19077995419502258, 0.3388090133666992, -0.2576253116130829, -0.21520349383354187, -0.38845089077949524, -0.0976845845580101, 0.15601536631584167, -0.05483264476060867, 0.2618010640144...
am stuck is figuring out how to execute the call to AddMembershipUser as the admin user whom I just logged in. I have requests out to Ektron support, and have been searching both the forums and documentation, but have yet to find any answers. Does anyone have examples of calling web service API methods as a programmat...
[ 0.4231190085411072, 0.3112960755825043, 0.5611408948898315, -0.08414026349782944, -0.258656769990921, 0.1501431167125702, 0.14565777778625488, -0.1496141403913498, -0.3301645815372467, -0.23096328973770142, -0.0024569241795688868, 0.32640448212623596, -0.22001710534095764, 0.13830628991127...
put a membership control on a page and use that to create a user while logging the SQL that happens with SQL profiler (also any other logging/inspection techniques you can think of). Then try the API methods and see how the API is doing it and compare the two, there's usually huge differences in the versions I've exper...
[ 0.6858527064323425, 0.023371770977973938, 0.06082886829972267, 0.21149024367332458, 0.10422208160161972, -0.3147439658641815, 0.19554439187049866, -0.17315568029880524, -0.2700485289096832, -0.5862783193588257, 0.26613128185272217, 0.4755808413028717, -0.26179540157318115, 0.04757892712950...
I want to have two items on the same line using `float: left` for the item on the left. I have no problems achieving this alone. The problem is, I want the two items to **stay** on the same line *even when you resize the browser very small*. You know... like how it was with tables. The goal is to keep the item on the...
[ 0.18598268926143646, -0.04744808375835419, 0.3449415862560272, -0.03784520551562309, -0.120845265686512, 0.048126883804798126, 0.05726819857954979, 0.14592543244361877, -0.2821909487247467, -0.8460254073143005, -0.012796296738088131, 0.2577933371067047, -0.23173972964286804, 0.180965751409...
want: ``` \ +---------------+ +------------------------/ | float: left; | | float: right; \ | | | /
[ -0.550457239151001, 0.3646690249443054, 0.2240569293498993, -0.24775397777557373, 0.38635629415512085, 0.3922211527824402, 0.04404633492231369, -0.09876375645399094, 0.22537542879581451, -0.5121917724609375, -0.35726678371429443, 0.466267853975296, -0.1658390760421753, -0.15735487639904022...
| | |content stretching \ Screen Edge | | |the div off the screen / <--- +---------------+ +------------------------\
[ -0.03621756657958031, -0.22081978619098663, 0.8199505805969238, -0.1611841470003128, 0.039783626794815063, -0.11040770262479782, -0.020130706951022148, 0.13463057577610016, 0.15374791622161865, -0.7315483689308167, -0.5150759816169739, 0.6495290994644165, -0.06736094504594803, 0.2387198060...
/ ``` Wrap your floating `<div>`s in a container `<div>` that uses this cross-browser min-width hack: ``` .minwidth { min-width:100px; width: auto !important; width: 100px; } ``` You *may* also need to set "overflow" but probably not. This works because: * The `!important` declaration, combined with `min-width` c...
[ 0.1364956796169281, -0.006397871766239405, 0.4688752293586731, 0.0013638094533234835, 0.14142708480358124, -0.12489300966262817, 0.408753365278244, 0.04860278591513634, -0.10164382308721542, -0.6452491283416748, -0.27966758608818054, 0.5047857165336609, -0.19299665093421936, 0.181014746427...
How do you programmatically obtain a picture of a .Net control? There's a method on every control called [DrawToBitmap](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.drawtobitmap.aspx). You don't need to p/invoke to do this. ``` Control c = new TextBox(); System.Drawing.Bitmap bmp = new System.D...
[ 0.08139029145240784, -0.2809913158416748, 0.5794429183006287, 0.2917451858520508, -0.051562558859586716, 0.05025513470172882, -0.01778283901512623, -0.26750490069389343, -0.2844744324684143, -0.4246280789375305, -0.026570621877908707, 0.4282994866371155, -0.44516897201538086, -0.2822641134...
I'm trying to be responsible with my "DOM" references in this little Flash 8/AS2 project. What has become increasingly frustrating is obtaining references to other movie clips and objects. For example, currently my code to access the submit button of a form looks something like this ``` var b:Button = _level0.instanc...
[ 0.5198768973350525, 0.21931152045726776, 0.25296562910079956, 0.08638326823711395, -0.2531466484069824, -0.4615102708339691, 0.18473152816295624, -0.12622834742069244, -0.28706786036491394, -0.4391016364097595, 0.016529304906725883, 0.6547504663467407, -0.09560822695493698, 0.2257827818393...
stage in the Flash IDE, you can give it a proper instance name in the properties panel. If it was dynamically added, you can also give it a name, and additionally store a reference: ``` var my_MC=createEmptyMovieClip("instanceName", depth); ``` In either case, you can then adress them with `_parentClip.instanceName...
[ 0.0648140087723732, 0.16651734709739685, 0.4637926518917084, -0.09817712008953094, 0.107623390853405, -0.11971989274024963, 0.054905667901039124, -0.04437419772148132, -0.0684090331196785, -0.5773112773895264, -0.10883959382772446, 0.47035279870033264, -0.1302584707736969, 0.13301913440227...
There seems to be two major conventions for organizing project files and then many variations. ---------------------------------------------------------------------------------------------- **Convention 1: High-level type directories, project sub-directories** For example, the [wxWidgets](http://svn.wxwidgets.org/svn...
[ -0.1472095400094986, -0.2830737829208374, 0.45359233021736145, 0.290952205657959, -0.07235529273748398, -0.5617841482162476, -0.21506474912166595, -0.28852999210357666, -0.4302963316440582, -0.4897826611995697, -0.5364629626274109, 0.09635727852582932, -0.1740461140871048, 0.19099862873554...
/prj2 ``` **Pros:** * If there are project dependencies, they can be managed from a single file * Flat build file structure **Cons:** * Since test has its own header and cpp files, when you generate the unit test applications for EXE files rather than libraries, they need to include the [object files](https://en.w...
[ 0.6080639362335205, 0.05220848694443703, -0.08062512427568436, 0.11192518472671509, -0.1275966614484787, -0.17079590260982513, 0.30007123947143555, -0.570401132106781, -0.20676065981388092, -0.43115144968032837, -0.22760523855686188, 0.390730082988739, 0.11626885086297989, 0.16287252306938...
directories, type sub-directories** For example, the [Wireshark](http://anonsvn.wireshark.org/wireshark/trunk/) project uses this style ``` /solution /prj1 /bin /include /lib /src /test /prj2 /bin /include /lib /src /test ``` **Pros:** * Projects th...
[ 0.49845534563064575, -0.13394807279109955, 0.14570173621177673, 0.4069385528564453, -0.14471755921840668, -0.6708894968032837, 0.23429995775222778, -0.27232348918914795, -0.503332793712616, -0.17074546217918396, -0.519590437412262, -0.2196015566587448, -0.2698137164115906, -0.3235782384872...
hierarchical build scripts **Cons:** * If there are dependencies between projects, you need an additional layer of build scripts above the project directories to manage the build order We are currently using convention 1 on our project and so far it has worked fairly well. Now, I am in the process of adding unit tes...
[ 0.22899791598320007, 0.19598719477653503, 0.23362700641155243, 0.054311852902173996, -0.18013346195220947, -0.25882646441459656, 0.2152891457080841, -0.3377695381641388, -0.08234032243490219, -0.817221462726593, 0.06940040737390518, 0.6796351075172424, -0.3367708921432495, -0.1777732670307...
steps within a solution from other projects. * Facilitate continuous integration via the use of build scripts for check-out to release media generation for each commit (obviously leveraging other tools such as CruiseControl as well). * Make adding or removing additional projects or source files as easy and least error-...
[ 0.03997780755162239, -0.32302984595298767, 0.14786528050899506, 0.17971107363700867, 0.08084860444068909, -0.162258118391037, 0.1418377161026001, -0.38752830028533936, -0.21777720749378204, -0.6713191866874695, -0.2955322861671448, 0.6085302233695984, -0.16305464506149292, -0.2512698471546...
layer > of build scripts above the project > directories to manage the build order That can also be viewed as a pro, in many projects. If you have a lot of repetitive general definitions, one would probably want an include file for the build scripts, where solution-wide constants & parameters could be defined. So t...
[ 0.25408801436424255, 0.07254232466220856, 0.3795783221721649, 0.0025145579129457474, -0.20686808228492737, -0.13273295760154724, 0.17445997893810272, -0.41359490156173706, -0.3400592505931854, -0.6565449833869934, -0.2556438148021698, 0.5852805376052856, -0.1869184970855713, -0.02361604198...
would need to compose a different definitions file. (On the other other hand, if there were a single build file for the whole solution, as in Convention 1, you would need a different build script.) As for your maintenance requirement, that's (IMO) very project-dependent. My feeling leans towards Convention 2, but it's...
[ 0.30798259377479553, -0.06998981535434723, -0.03554205596446991, 0.10247907042503357, -0.07195217907428741, -0.4967873692512512, 0.1595219224691391, -0.45252344012260437, -0.20050260424613953, -0.690136194229126, -0.17501571774482727, 0.9581682085990906, 0.0939958468079567, -0.307954519987...
I was reading this thread/post: <https://stackoverflow.com/questions/262298/windows-c-ui-technology> and am also wondering about a non .NET UI framework. Specifically - prior to .NET having support for serial ports (I can't believe they left that out of the first release of .NET) I was forced to use MFC for an applica...
[ 0.5482537746429443, 0.015712879598140717, 0.45867204666137695, -0.061741359531879425, 0.040066417306661606, -0.20194706320762634, 0.1998676061630249, 0.2542145848274231, -0.5822432041168213, -0.37151867151260376, 0.0391390360891819, 0.3574005961418152, -0.47050511837005615, 0.4090072214603...
challenges were dealt with, but the application code is so overly complex with messaging and the like just to handle the shortcomings of MFC. So - my question: does the "New and improved" mfc have support for threads - i.e. if I call some mfc control for a gui object from another thread will it crash/puke like the old...
[ 0.11972881853580475, 0.09735408425331116, 0.10580098628997803, 0.20260712504386902, 0.042224884033203125, -0.033626146614551544, 0.019779862836003304, -0.06996060162782669, -0.38459962606430054, -0.3438786566257477, 0.018623504787683487, 0.556672215461731, -0.5035858154296875, 0.1577719151...
the worker threads - that the GUI framework would do all that work for me and I could just call the object methods from other threads. Perhaps that is too much to hope for - especially if threads are not part of the language spec yet. The basic architecture of MFC hasn't really changed in the new version. If you weren'...
[ 0.09963986277580261, 0.11304506659507751, 0.4333741068840027, -0.11120255291461945, -0.19527991116046906, -0.027729550376534462, 0.23462499678134918, 0.01638445258140564, -0.5152491927146912, -0.5686635375022888, 0.011095594614744186, 0.47257229685783386, -0.4861736595630646, 0.04032691940...
doesn't provide much help for multithreading is almost certainly because it was originally introduced in 1992 for 16-bit Windows. At this time Windows did not support multitasking, and was effectively single threaded.
[ -0.3447864353656769, -0.006835103966295719, 0.364341139793396, 0.08431988209486008, -0.4135761260986328, 0.07166037708520889, 0.18425600230693817, 0.17284777760505676, -0.5241647958755493, -0.23982325196266174, 0.2460271716117859, 0.4302254915237427, -0.708953857421875, 0.36339321732521057...
I got a quick question about running a directX application (C++) in a managed environment. I'm attempting to write a MDI tool (in C#) where the background of the parent window would be an embedded render window of directX (C++). I've read ways that involved writing the C++ into a native dll, however it would be prefe...
[ 0.2957800626754761, 0.1034637838602066, 0.15839754045009613, 0.06262888759374619, -0.09159418195486069, -0.23276649415493011, 0.22507397830486298, 0.42470458149909973, 0.011854415759444237, -0.7865641117095947, -0.06482239812612534, 0.6362318396568298, -0.2464529126882553, -0.1406665295362...
easiest way to do this would be to add a C++/CLI project to your solution. This would then enable you to use the DirectX COM interfaces directly and create a managed wrapper that's easy to call from your C# code. I've taken this approach a few times and it's by far the easiest way of mixing DirectX and .Net that I've e...
[ 0.44170573353767395, -0.3255579471588135, 0.296916663646698, 0.1023748591542244, -0.2910521924495697, 0.016961434856057167, -0.2565559148788452, 0.34329521656036377, -0.037991963326931, -0.6999086141586304, 0.20410692691802979, 0.7229413986206055, -0.4039601981639862, 0.2184203714132309, ...
If something is making a single-thread program take, say, 10 times as long as it should, you could run a profiler on it. You could also just halt it with a "pause" button, and you'll see exactly what it's doing. Even if it's only 10% slower than it should be, if you halt it more times, before long you'll see it repea...
[ 0.4605928361415863, -0.16308073699474335, 0.19373857975006104, 0.1798250526189804, 0.11040838062763214, -0.32162413001060486, 0.4627901315689087, 0.02376466989517212, -0.6900547742843628, -0.40177011489868164, -0.2720485031604767, 0.29202768206596375, -0.26547083258628845, 0.07437249273061...
you only take 1 sample. If you're serious, take 10. Any line of code causing some percentage of wastage, like 40%, will appear on the stack on that fraction of samples, on average. Bottlenecks (in single-thread code) can't hide from it. EDIT: To show what I mean, many objections are of the form "there aren't enough sa...
[ 0.8716724514961243, -0.01304990891367197, -0.18951262533664703, -0.016124514862895012, 0.24438519775867462, 0.021668512374162674, 0.35348308086395264, -0.2928449213504791, -0.21947473287582397, -0.4709893763065338, -0.066619373857975, 0.35912659764289856, -0.29259437322616577, -0.401245445...
it on any given sample is 30%. Then suppose only 10 samples are taken. The number of times the problem will be seen in 10 samples follows a [binomial distribution](http://en.wikipedia.org/wiki/Binomial_distribution), and the probability of seeing it 0 times is .028. The probability of seeing it 1 time is .121. For 2 ...
[ 0.06597793102264404, -0.13431097567081451, 0.33170247077941895, 0.02143140137195587, -0.24705983698368073, 0.5020782351493835, 0.7387941479682922, 0.10083349794149399, -0.56900554895401, -0.5884817242622375, -0.26617318391799927, 0.36167165637016296, -0.38582178950309753, 0.122355073690414...
.861. The general rule is if you see something you could fix on two or more samples, it is worth fixing. In this case, the chance of seeing it in 10 samples is 86%. If you're in the 14% who don't see it, just take more samples until you do. (If the number of samples is increased to 20, the chance of seeing it two or ...
[ 0.47806012630462646, 0.10991592705249786, 0.025051631033420563, 0.20130068063735962, 0.1297467052936554, 0.0852418765425682, 0.13917304575443268, -0.04813157394528389, -0.5810660123825073, -0.4234763979911804, 0.06308287382125854, 0.39259180426597595, -0.4377223551273346, -0.00688402773812...
not actually find, such as something involving the state of the data, not the program counter. On Java servers it's always been a neat trick to do 2-3 quick `Ctrl`-`Breaks`s in a row and get 2-3 threaddumps of all running threads. Simply looking at where all the threads "are" may extremely quickly pinpoint where your p...
[ 0.22994503378868103, -0.196833997964859, -0.08902545273303986, 0.1831676959991455, -0.06133389100432396, -0.3954826593399048, 0.5636043548583984, 0.021809816360473633, -0.28343167901039124, -0.7031692862510681, -0.018216149881482124, 0.6033329963684082, -0.0010441469494253397, 0.0135488081...
It took me 2 days (and a lot of head/wall pounding) to finally discover that the reason ad-hoc distribution wasn't working for me was because my app-name had UTF-8 characters. I'm still boggling over how such a widely international platform like the Apple iPhone can prohibit this. *i.e.*, if my app were a Chinese game...
[ 0.22214794158935547, 0.32092610001564026, -0.024370484054088593, -0.05537234991788864, -0.07397972047328949, -0.21933294832706451, 0.4032960832118988, 0.3244437873363495, -0.12889431416988373, -0.220200777053833, -0.10456901788711548, 0.43564343452453613, -0.2753619849681854, 0.11098731309...
any of this documented, anywhere? (If so, where :) * Can anyone point to an example of an app in the app-store with UTF-8 chars (particularly Japanese/Chinese) in the name? Thanks! (I know: it looks like several questions, but they really are all related!) Turns out (according to DTS), it's a bug in the way iTunes ha...
[ 0.37669262290000916, 0.27826040983200073, -0.3144039213657379, 0.2232329547405243, -0.07183279097080231, 0.03765646368265152, 0.26513051986694336, 0.5179929733276367, -0.2940917909145355, -0.46801573038101196, -0.41599786281585693, 0.21834182739257812, -0.34134480357170105, 0.0079548023641...
confirmed it only appears to be an issue for Ad Hoc distribution, so I'm inclined to believe it's a bug in iTunes (I tested in 8.0.1, the latest). I'm awaiting a ruling from iPhone OS engineering on this, but I would recommend you file a bug with your test case app." (Hey, do I get to vote-up my own answer? Is that c...
[ 0.6603482961654663, 0.12947647273540497, 0.36827167868614197, 0.2978869676589966, 0.4359215497970581, -0.2740858793258667, 0.2852218449115753, 0.16523794829845428, -0.2830409109592438, -0.1934511363506317, 0.22313371300697327, 0.350035697221756, -0.04571035876870155, 0.0529225617647171, ...
I'm learning C++ and writing little programs as I go along. The following is one such program: ``` // This program is intended to take any integer and convert to the // corresponding signed char. #include <iostream> int main() { signed char sch = 0; int n = 0; while(true){ std::cin >> n; sch = n; s...
[ 0.033970724791288376, 0.11117756366729736, 0.5013687014579773, -0.2983543276786804, 0.3373735249042511, 0.03619227558374405, 0.30234816670417786, 0.07146026939153671, -0.2334519922733307, -0.7629022002220154, -0.07999356836080551, 0.3352172076702118, -0.16987258195877075, 0.274551719427108...
program repetitively spits out the same output. Some combinations of input cause erratic behavior. For example: ``` #: ./int2ch 10 10 --> 10000000000 10 --> 10 --> 10 --> 10 --> ``` The program spits out "10 --> " until it's killed. (With this particular sequence of inputs, the program's output changes speed er...
[ 0.6442840099334717, -0.04146645590662956, -0.22814016044139862, 0.031935449689626694, -0.09123070538043976, -0.09235254675149918, 0.5195145606994629, 0.33536165952682495, -0.5482217669487, -0.31178638339042664, 0.0390888974070549, 0.48115667700767517, -0.6846131086349487, 0.250389397144317...
try to read it. Rewrite your example like this: ``` #include <iostream> int main() { signed char sch = 0; int n = 0; while(std::cin >> n){ sch = n; std::cout << n << " --> " << sch << std::endl; } } ``` `cin >> n` will return a reference to `cin`, which you can test for "good-ness" in a conditional....
[ 0.14641131460666656, 0.2228369265794754, 0.424841046333313, -0.2928420305252075, 0.24651449918746948, -0.12432533502578735, 0.5753410458564758, 0.11096993088722229, -0.06596482545137405, -0.4477410912513733, -0.22742578387260437, 0.5017375946044922, -0.38839566707611084, 0.1075512766838073...
the last value successfully read in n, the failed reads won't change the value of n EDIT: as noted in a comment, you can clear the error state and try again something like this would probably work and just ignore bad numbers: ``` #include <iostream> #include <climits> int main() { signed char sch = 0; int n ...
[ 0.1948368400335312, -0.1221509575843811, 0.35871538519859314, -0.30442336201667786, 0.45182517170906067, -0.09247826784849167, 0.6441850662231445, -0.09796060621738434, -0.28175973892211914, -0.3265852928161621, -0.24744750559329987, 0.5075826644897461, -0.3706692159175873, 0.0669738054275...
std::cout << n << " --> " << sch << std::endl; } else { std::cin.clear(); // clear error state std::cin.ignore(INT_MAX, '\n'); // ignore this line we couldn't read it } } } ```
[ 0.057985033839941025, -0.02285793609917164, 0.44091352820396423, -0.1789199262857437, 0.16818273067474365, 0.04165595397353172, 0.21931402385234833, 0.022205639630556107, -0.1769489049911499, -0.3552829623222351, -0.3376420736312866, 0.4409003257751465, -0.5404346585273743, 0.1519945114850...
I'm trying to figure out a way to detect files that are not opened for editing but have nevertheless been modified locally. `p4 fstat` returns a value `headModTime` for any given file, but this is the change time in the depot, which should not be equal to the filesystem's `stat` last modified time. I'm hoping that the...
[ 0.20623500645160675, -0.08053506910800934, 0.787704348564148, 0.12432972341775894, 0.05228665843605995, 0.0847899541258812, 0.22379690408706665, -0.2302088886499405, -0.27398762106895447, -0.625495970249176, -0.33050426840782166, 0.44608715176582336, -0.07586023956537247, 0.137214154005050...
edit ``` p4 diff -se returns the names of depot files whose corresponding client file differs in any way from the clients #have revision.
[ 0.16119752824306488, 0.01368899829685688, 0.29658064246177673, 0.16129279136657715, 0.17320750653743744, 0.06297563761472702, 0.04013386368751526, -0.024172605946660042, 0.05345066636800766, -0.486598402261734, -0.560901939868927, 0.1946311593055725, -0.4009421467781067, 0.1184786930680275...
We have some methods that call File.Copy, File.Delete, File.Exists, etc. How can we test these methods without actually hitting the file system? I consider myself a unit testing n00b, so any advice is appreciated. ``` public interface IFile { void Copy(string source, string dest); void Delete(string fn); b...
[ 0.5452509522438049, 0.26492151618003845, 0.4135306775569916, 0.07702619582414627, 0.10372865200042725, -0.1445307582616806, 0.33355382084846497, -0.13122519850730896, -0.030360667034983635, -0.7570342421531677, -0.14552274346351624, 0.8176183104515076, -0.23401808738708496, 0.4554950594902...
{ var filesystem = new Moq.Mock<IFile>(); var obj = new ClassUnderTest(filesystem); filesystem.Expect(fs => fs.Exists("MyFile.txt")).Return(true); obj.CheckIfFileExists(); // doesn't hit the underlying filesystem!!! } ```
[ 0.02717488445341587, 0.005054316949099302, 0.5917360186576843, -0.22930438816547394, 0.4494514465332031, 0.28852370381355286, 0.6709843277931213, -0.04057951271533966, -0.2590736150741577, -0.892219603061676, -0.30776479840278625, 0.8261582851409912, -0.3333846628665924, 0.0293408744037151...
As a web developer, a number of the projects I work on fall under government umbrellas and hence are subject to [508 Accessibility](http://www.section508.gov/) laws, and sometimes [W3C accessibility](http://www.w3.org/TR/WCAG/) guidelines. To what extent can JavaScript be used while still meeting these requirements? A...
[ 0.6883710026741028, 0.08946625143289566, 0.05411524698138237, -0.05703247711062431, -0.1279456913471222, -0.43025439977645874, 0.02461174502968788, 0.09477328509092331, -0.26658329367637634, -0.5968654155731201, 0.0014634303515776992, 0.43250957131385803, -0.1401299685239792, -0.2195609807...
or has there been more progress in these areas? EDIT: The consensus seems to be that javascript is fine as long as there are non-javascript fallbacks, however it still seems uncertain about the support for AJAX in screen reader software. If anyone has specific experience with this, that would be most helpful. If acces...
[ 0.41424793004989624, 0.17749987542629242, 0.356465607881546, 0.05849016457796097, -0.34426364302635193, -0.397983580827713, 0.2716450095176697, 0.15824811160564423, -0.3510185480117798, -0.9703238010406494, -0.09512975811958313, 0.47366294264793396, 0.03999131917953491, -0.3027987778186798...
add bits of CSS and JavaScript as long as the site still functions, with either or both off. The most important concept here is [Progressive Enhancement](http://en.wikipedia.org/wiki/Progressive_enhancement). You're adding additional bells and whistles using CSS/JavaScript, but your web site/application will function ...
[ 0.8738982677459717, -0.13895568251609802, 0.1648450493812561, 0.06731504201889038, -0.3099089562892914, 0.10545320808887482, 0.2106541246175766, -0.5024320483207703, -0.27682390809059143, -0.4535737633705139, -0.03132813423871994, 0.38110628724098206, -0.18911150097846985, -0.1119787320494...
I'm trying to submit a form with javascript. Firefox works fine but IE complains that "Object doesn't support this property or method" on the submit line of this function: ``` function submitPGV(formName, action) { var gvString = ""; pgVisibilities.each(function(pair) { gvString += pair.key + ":" + pa...
[ 0.022394245490431786, 0.027958448976278305, 0.7512273192405701, -0.28957071900367737, -0.2878143787384033, 0.30908241868019104, 0.27779847383499146, -0.6286752223968506, 0.13967779278755188, -0.598712682723999, -0.24392041563987732, 0.4178312420845032, -0.4030051529407501, -0.1303443312644...
value=""/> </form> ``` Any ideas? Try checking the type of the element IE is selecting: ``` // For getting element with id you must use # alert( typeof( $( '#ProductGroupVisibility' ))); ``` It is possible there is something else on the page with that ID that IE selects before the form.
[ 0.45835554599761963, -0.1487882137298584, 0.22123786807060242, -0.28312915563583374, 0.21546852588653564, -0.358608603477478, 0.03523128107190132, -0.3336353302001953, 0.02876300737261772, -0.7077341675758362, -0.20159244537353516, 0.49435561895370483, -0.37227576971054077, -0.205077826976...
I have several static factory patterns in my PHP library. However, memory footprint is getting out of hand and we want to reduce the number of files required during execution time. Here is an example of where we are today: ``` require_once('Car.php'); require_once('Truck.php'); abstract class Auto { // ... some s...
[ 0.9681823253631592, 0.03088272362947464, 0.08862179517745972, -0.16528107225894928, 0.03375980630517006, 0.21177169680595398, 0.23337392508983612, -0.08298525959253311, -0.377490758895874, -0.39835113286972046, 0.35929036140441895, 0.4698946475982666, -0.3242437243461609, 0.172490686178207...
new Truck(); break; case 'Car': default: return new Car(); break; } } } ``` This is undesirable because Car.php AND Truck.php will need to be included
[ 0.2488875836133957, 0.0378730446100235, 0.2453484833240509, 0.0224474910646677, -0.04998551309108734, 0.20854301750659943, 0.1824883669614792, -0.09343545138835907, -0.3541119396686554, -0.41096800565719604, -0.09407016634941101, 0.608235239982605, -0.14080552756786346, 0.38829901814460754...
even though only one or the other may be needed. As far as I know, require/include and their ...\_once variation include libraries at the same scope as it's call. Is this true? If so, I believe this would lead to a memory leak: ``` abstract class Auto { // ... some stuff ... public static fun...
[ 0.6682567000389099, -0.056469082832336426, -0.026821434497833252, -0.13036759197711945, 0.34845876693725586, -0.4205365777015686, 0.19616000354290009, -0.14748874306678772, -0.13330666720867157, -0.3857436180114746, -0.16631264984607697, 0.6996511816978455, -0.3456639349460602, 0.193486928...
case 'Truck': require_once('Truck.php'); return new Truck(); break; case 'Car':
[ -0.1979965716600418, 0.07736705243587494, 0.22842587530612946, -0.07498317956924438, 0.12304886430501938, 0.4689723551273346, 0.11219775676727295, -0.3503691554069519, -0.3252621591091156, -0.3357624113559723, -0.3146156966686249, 0.4402535557746887, -0.17778617143630981, 0.111185856163501...
default: require_once('Car.php'); return new Car(); break; } } } ``` It looks to me that in
[ 0.09926549345254898, 0.16512806713581085, 0.34551095962524414, 0.00240098824724555, 0.15225107967853546, 0.20888300240039825, 0.26973390579223633, -0.1420954465866089, -0.10675399750471115, -0.30589258670806885, -0.1293734461069107, 0.7101547122001648, -0.13085593283176422, 0.3174606859683...
the 2nd example, multiple calls to Create() would lead to multiple requires because of the scope of the call even though the require\_once flavor is used. Is this true? What is the best way to include libraries dynamically in php in an example such as these? Thanks! The Autoload facility is often seen as Evil, but it...
[ 0.29117462038993835, -0.12441417574882507, -0.006939326412975788, 0.3291718363761902, -0.15197493135929108, -0.29548200964927673, 0.2591381371021271, -0.17188912630081177, -0.173952117562294, -0.6646727919578552, 0.18081647157669067, 0.7799550294876099, -0.22254678606987, -0.04242228344082...
once the static class is in scope, it doesn't need to even call the "is file included yet" test of require once, because the Class is already in the symbol table. Then you can just create ``` require("autoloader.php"); $x = new Car(); $x = new Bike(); ``` and it will just bring them in when needed. See [Php...
[ 0.692242443561554, -0.1629515439271927, 0.2753612697124481, -0.023533495143055916, 0.10717536509037018, -0.16936753690242767, 0.11953501403331757, -0.6318715214729309, -0.3516801595687866, -0.5426256060600281, -0.025427309796214104, 0.9280619025230408, -0.10572753846645355, -0.354358196258...
I'd like to format a duration in seconds using a pattern like H:MM:SS. The current utilities in java are designed to format a time but not a duration. If you're using a version of Java prior to 8... you can use [Joda Time](http://joda-time.sourceforge.net/) and [`PeriodFormatter`](http://joda-time.sourceforge.net/api-r...
[ 0.4577632248401642, -0.3731882572174072, 0.16185259819030762, -0.11487754434347153, -0.18783287703990936, 0.027595605701208115, 0.11327392607927322, -0.025537455454468727, -0.39251917600631714, -0.528818666934967, 0.0775163471698761, 0.0842779278755188, 0.2299632579088211, -0.0049495971761...
get a `Period` which you can format. If you're using Java 8 or later: I'd normally suggest using `java.time.Duration` to represent the duration. You can then call `getSeconds()` or the like to obtain an integer for standard string formatting as per bobince's answer if you need to - although you should be careful of th...
[ 0.30996400117874146, -0.2723739445209503, 0.19347070157527924, -0.24785713851451874, -0.03785764425992966, -0.1181500181555748, 0.0844336748123169, -0.10143941640853882, -0.5649839639663696, -0.17061901092529297, -0.1141747385263443, 0.37395286560058594, 0.09552393108606339, 0.131740987300...
String.format( "%d:%02d:%02d", absSeconds / 3600, (absSeconds % 3600) / 60, absSeconds % 60); return seconds < 0 ? "-" + positive : positive; } ``` Formatting this way is *reasonably* simple, if annoyingly manual. For *parsing* it becomes a harder matter in general... You could sti...
[ 0.03761479631066322, -0.06787091493606567, 0.1890893131494522, -0.3612423837184906, -0.14506563544273376, -0.36316630244255066, 0.43368569016456604, -0.11476815491914749, -0.13928179442882538, -0.655800461769104, 0.028463374823331833, 0.5919667482376099, -0.2159789502620697, -0.07421479374...
I frequently run into large, non-template classes in C++ where simple methods are defined directly in the class body in the header file instead of separately in the implementation file. For example: ``` class Foo { int getBar() const { return bar; } ... }; ``` Why do this? It seems like there are disadvantages. ...
[ 0.4188171625137329, 0.28749987483024597, -0.10869111120700836, -0.3259059190750122, -0.17570607364177704, -0.17116430401802063, 0.33365222811698914, -0.22971051931381226, -0.027633734047412872, -0.5059635043144226, 0.05727138742804527, 0.3979518711566925, -0.4974663555622101, 0.03561032563...
in other modules, which could improve performance significantly. However, I've heard newer compilers can do inlining (and other interprocedural optimizations) at link-time across modules. How broad is the support for this kind of link-time optimization, and does it actually make these kind of definitions unnecessary? A...
[ 0.10001640021800995, -0.15990376472473145, 0.0210573747754097, 0.3258967995643616, -0.2435915321111679, -0.21955272555351257, 0.1490139216184616, -0.24897243082523346, -0.18030409514904022, -0.5747198462486267, -0.2916668951511383, 0.6626033186912537, -0.5715599656105042, -0.26651784777641...
I'm setting the below variables in my vimrc to control how windows get split when I bring up the file explorer plugin for vim. But it appears these variables are not being read because they have no effect on how the file explorer window is displayed. I'm new to vim. I know the vimrc file is being read because I can mak...
[ 0.4771915376186371, -0.11940820515155792, 0.5450572371482849, -0.07900523394346237, -0.15695936977863312, -0.21779316663742065, 0.09159214049577713, -0.169149711728096, -0.40831249952316284, -0.5780697464942932, 0.19082313776016235, 0.8487913012504578, -0.5475210547447205, 0.38020440936088...
following settings instead: ``` let g:netrw_winsize=10 let g:netrw_alto=1 ``` There is no option for disabling "detailed help" that I can find, but the help provided by netrw in v6 vs v7 is quite different anyway. Read :h netrw for additional info.
[ -0.26183611154556274, 0.029708802700042725, 0.672984778881073, -0.1183103695511818, -0.08075591176748276, -0.2070290744304657, 0.16818420588970184, -0.14918550848960876, -0.07928994297981262, -0.5435355305671692, -0.25200554728507996, 1.0340147018432617, -0.11163073778152466, -0.0316871665...
I am trying to convert a date with individual parts such as 12, 1, 2007 into a datetime in SQL Server 2005. I have tried the following: ``` CAST(DATEPART(year, DATE)+'-'+ DATEPART(month, DATE) +'-'+ DATEPART(day, DATE) AS DATETIME) ``` but this results in the wrong date. What is the correct way to turn the three dat...
[ -0.16297779977321625, -0.011946351267397404, 0.6073915958404541, -0.24748289585113525, -0.08259136229753494, 0.21592941880226135, 0.13339629769325256, -0.18531404435634613, -0.19677701592445374, -0.41740065813064575, 0.008888180367648602, 0.31159934401512146, -0.15683434903621674, 0.194451...
I'm trying to save the output of an vector image drawin in Java2D to an SWF file. There are great libraries for saving java2D output as things like SVG (BATIK) and PDF(itext) but I can't find one for SWF. Any ideas? I just got an example to work using the [SpriteGraphics2D](http://opensource.adobe.com/svn/opensource/fl...
[ 0.32503074407577515, -0.050837669521570206, 0.33027681708335876, 0.07168981432914734, -0.657385528087616, -0.032859381288290024, 0.049552980810403824, -0.18188504874706268, -0.33604440093040466, -0.5630264282226562, 0.16880129277706146, 0.5454240441322327, -0.3848485052585602, 0.1137940660...
two classes [CubicCurveTest.java](http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/modules/swfutils/test/java/flash/swf/builder/types/CubicCurveTest.java) and [SpriteTranscoder.java](http://opensource.adobe.com/svn/opensource/flex/sdk/trunk/modules/compiler/src/java/flash/svg/SpriteTranscoder.java). The only ...
[ 0.000302641827147454, 0.28073808550834656, 0.26368212699890137, -0.12752535939216614, -0.8698049187660217, 0.4634358286857605, 0.11756835877895355, -0.5728411078453064, 0.020593618974089622, -0.3285081684589386, 0.049264416098594666, 0.5357351303100586, -0.36042511463165283, 0.059114698320...
g.draw(new Line2D.Double(5, 5, 50, 60)); g.draw(new Line2D.Double(50, 60, 150, 40)); g.draw(new Line2D.Double(150, 40, 160, 10)); // Create a new empty movie Movie m = new Movie(); m.version = 7; m.bgcolor = new SetBackgroundColor(SwfUtils.colorToInt(255, 255, 255)); m.framerate = 12...
[ 0.25898000597953796, -0.4893125295639038, 1.0422594547271729, -0.1813020408153534, 0.2367379516363144, 0.2741653323173523, 0.06851458549499512, -0.6950193047523499, -0.4196799397468567, -0.47074389457702637, -0.2600526511669159, 0.5913745760917664, -0.19785726070404053, 0.32935771346092224...
the graphics object DefineSprite tag = g.defineSprite("swf-test"); // Place the DefineSprite on the first frame Frame frame1 = (Frame) m.frames.get(0); Matrix mt = new Matrix(0, 0); frame1.controlTags.add(new PlaceObject(mt, tag, 1, null)); TagEncoder tagEncoder = new TagEncoder(); ...
[ 0.19224534928798676, -0.2724185287952423, 0.9776977300643921, -0.06638412177562714, -0.04949419945478439, 0.14317728579044342, -0.1192755326628685, -0.6294152736663818, -0.18879027664661407, -0.8141655325889587, -0.18945342302322388, 0.44289714097976685, -0.3016008138656616, -0.01281397137...
I'm trying to understand what this method means as I'm reading [this](http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.getpostbackeventreference.aspx) and have wondered what uses this may have. I don't quite understand the example given. Can anyone give another explanation of it. Examples woul...
[ 0.319725900888443, -0.03047700598835945, 0.41330981254577637, 0.06263203918933868, -0.2702077627182007, -0.4152657687664032, 0.15963979065418243, 0.014046531170606613, -0.26694920659065247, -0.5838527679443359, 0.023936111479997635, 0.21068811416625977, -0.5194972157478333, 0.2205933183431...