instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>We have some Win32 console applications running on Windows Server 2003 Service Pack 2 that regularly fail with this:</p> <blockquote> <p>Error 1450 (<code>ERROR_NO_SYSTEM_RESOURCES</code>): "Insufficient system resources exist to complete the requested service."</p> </blockquote> <p>All the documentation we've f...
<p>Can you try the windbg command "!sysptes" to get System PTE Information? I'm not sure if you can do this with live kernel debug, you may have to get a memory dump.</p>
<p>I'm not sure why you assume that <code>ERROR_NO_SYSTEM_RESOURCES</code> is caused <em>only</em> by running out of free System Page Table Entries ? As far as I know, such generic error codes are used for more than one resource type. And in fact, the first Google hit suggests that running out of file cache memory may ...
8,354
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/307291/how-does-the-google-did-you-mean-algorithm-work">How does the Google “Did you mean?” Algorithm work?</a> </p> </blockquote> <p>Suppose you have a search system already in your website. How can you implem...
<p>Actually what Google does is very much non-trivial and also at first counter-intuitive. They don't do anything like check against a dictionary, but rather they make use of statistics to identify "similar" queries that returned more results than your query, the exact algorithm is of course not known.</p> <p>There ar...
<p>Soundex is good for phonetic matches, but works best with peoples' names (it was originally developed for census data)</p> <p>Also check out Full-Text-Indexing, the syntax is different from Google logic, but it's very quick and can deal with similar language elements.</p>
6,272
<p>I found a nice model for a ship from the game "Eve". It doesn't have a flat bottom, so it needs support material. But Slic3r generates several dozen tiny support pillars, and one by one they break loose from the build plate. As they get tall, the leverage of course increases, and since they're so tiny they don't hav...
<p>I know many Slic3r users - myself included - add support material to the model itself <em>before</em> importing it into Slic3r. </p> <p>I personally favour <a href="http://www.meshmixer.com/" rel="noreferrer">MeshMixer</a> for support generation, as the supports are much more predictable and easily removable. In co...
<p>In my point of view it seems that the bed offset not optimal. I see that you are using the blue tape, which is better than any other tape. As a next step I would recommend to try different types of glue.</p> <p>I agree with Tormod Haugene and can also recommend Cura. You can also experiment there with a lot of para...
275
<p>I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of <code>&lt;div&gt;</code>s between my page and the master pages.</p> <p>Does anyone know of a...
<p>You can use <a href="http://tidy.sourceforge.net/" rel="nofollow noreferrer">HTMLTidy</a> to convert the HTML to well-formed XML so you can use <a href="http://msdn.microsoft.com/en-us/library/aa302294.aspx" rel="nofollow noreferrer">XML Diff</a>, as Gulzar suggested.</p> <pre><code>tidy -asxml index.html </code></...
<p>winmerge is a good visual diff program</p>
7,114
<p>When downloading both Firefox and Chrome, I've noticed that the default version I got was in my native tongue of Hebrew. I personally don't like my applications in Hebrew, since I'm used to the English UI conventions embedded in me since long ago by:</p> <ol> <li><strong>The lack of choice:</strong> Most programs d...
<p>I've helped develop an application that was used by Dutch, English, Spanish and Portuguese speaking users. Because the application installed from CD we just added all the language packs. Mostly because it saved us a lot of work not having to maintain 4 different versions.</p> <p>If your application distributed from...
<p>I've never written an application for use by a large number of people, and never for anyone that didn't use English as their language, but if I did, I would probably take a route that installs all available language packs at install (unless the user did a custom install, where I would allow them to choose language p...
8,419
<p>I want to use the mouse scrollwheel in my OpenGL GLUT program to zoom in and out of a scene? How do I do that?</p>
<p>Note that venerable <a href="http://www.xmission.com/~nate/glut.html" rel="noreferrer">Nate Robin's GLUT</a> library doesn't support the scrollwheel. But, later implementations of GLUT like <a href="http://freeglut.sourceforge.net/" rel="noreferrer">FreeGLUT</a> do.</p> <p>Using the scroll wheel in FreeGLUT is dead...
<p>observe case 3 and 4 in the switch statement below in the mouseClick callback</p> <pre><code>glutMouseFunc(mouseClick); </code></pre> <p>... </p> <pre><code>void mouseClick(int btn, int state, int x, int y) { if (state == GLUT_DOWN) { switch(btn) { case GLUT_LEFT_BUTTON: std::cout &lt;&lt; "lef...
3,515
<p>I have a Windows Form app with a TabControl. One of the TabPages in the TabControl contains a ToolStrip. Frequently, the Windows Form designer will spontaneously set the Visible property of the Toolstrip to False. To get the toolstrip to reappear in my form, I have to manually find the control and set the property b...
<p>I may have found a workaround for this.</p> <p>My ToolStrip was placed directly on the TabPage, docked to Top. However, I found <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=117176&amp;wa=wsignin1.0" rel="noreferrer">a thread on Microsoft Connect</a> that described the sa...
<p>Open the designer code and explicitly set the control's visible property to true.</p> <p><strong><em>Nick Hanshaw</em></strong></p>
8,142
<p>If I create a class like so: </p> <pre><code>// B.h #ifndef _B_H_ #define _B_H_ class B { private: int x; int y; }; #endif // _B_H_ </code></pre> <p>and use it like this:</p> <pre><code>// main.cpp #include &lt;iostream&gt; #include &lt;vector&gt; class B; // Forward declaration. class A { public: ...
<p>The compiler needs to know how big "B" is before it can generate the appropriate layout information. If instead, you said <code>std::vector&lt;B*&gt;</code>, then the compiler wouldn't need to know how big B is because it knows how big a pointer is.</p>
<p>The reason you can't use a forward declaration is because the size of B is unknown.</p> <p>There's no reason in your example that you can't include B.h inside of A.h, so what problem are you really trying to solve?</p> <p><strong>Edit:</strong> There's another way to solve this problem, too: stop using C/C++! It's...
5,801
<p>One of our weblogic 8.1s has suddenly started logging giant amounts of logs and filling the disk.</p> <p>The logs giving us hassle resides in </p> <pre><code>mydrive:\bea\weblogic81\common\nodemanager\NodeManagerLogs\generatedManagedServer1\managedserveroutput.log </code></pre> <p>and the entries in the logfile i...
<p>Turn that into a spec:<br> -that objects need to implement an interface in order to be allowed into the collection Something like <code>ArrayList&lt;ICloneable&gt;()</code></p> <p>Then you can be assured that you always do a deep copy - the interface should have a method that is guaranteed to return a deep copy. <...
<p>I suppose it is an ovbious answer:</p> <p>Make a requisite for the classes stored in the collection to be cloneable. You could check that at insertion time or at retrieval time, whatever makes more sense, and throw an exception.</p> <p>Or if the item is not cloneable, just fail back to the return by reference opti...
4,963
<p>I have a project to build a voting desktop application for a class in Java. While security isn't the focus of the project, I would like to be as realistic as I can. What are some of the primary tools to integrate security into a Java application.</p> <p>Edit: I'm not primarily worried about physical security, we ar...
<p>It really depends on what kind of security you are looking to integrate. Do you want security to ensure that the user isn't running any debuggers or such to flip bits in your application to change the votes? Do you want to ensure that the user doesn't install logging software to keep track of who voted for who? D...
<p>I believe that physical security is more important for voting booth system rather than you know, code security.<br> These machine by their very nature shouldn't be connected to any kind of public networks, especially not the the internet. But having a good physical security to prevent any sort of physical tampering ...
4,900
<p>How do I rewrite a URL in ASP.NET?</p> <p>I would like users to be able to go to</p> <pre><code>http://www.website.com/users/smith </code></pre> <p>instead of</p> <pre><code>http://www.website.com/?user=smith </code></pre>
<p>Try the Managed Fusion Url Rewriter and Reverse Proxy:</p> <p><a href="http://urlrewriter.codeplex.com" rel="noreferrer">http://urlrewriter.codeplex.com</a></p> <p>The rule for rewriting this would be:</p> <pre><code># clean up old rules and forward to new URL RewriteRule ^/?user=(.*) /users/$1 [NC,R=301] # rew...
<p>I have used an httpmodule for url rewriting from <a href="http://www.urlrewriting.net/" rel="nofollow noreferrer">www.urlrewriting.net</a> with great success (albeit I believe a much earlier, simpler version)</p> <p>If you have very few actual rewriting rules then url mappings built in to .NET 2.0 are probably an e...
2,444
<p>I'm looking to run Redmine, a Ruby on Rails app, on a VPS windows box. The only thing I can really think of is running a virtual Linux machine and hosting it from there. If that is my only option, am I going to run into problems running a virtual machine inside of a virtual machine?</p> <p>Also, this will be an i...
<p>Windows is not the usual place to deploy production Rails apps, but there are people who do it. Mongrel was originally written to give better deployment options for Windows. As it turned out the UNIX deployment options weren't that good either. :)</p> <p>Start with the Ruby One Click installer so you have a sane in...
<p>You can install SQLite and a Rails server like Mongrel on a Windows machine. I used Aptana to run a development environment, but I'm sure that there are better alternatives that don't require the IDE to be open to run. But this proves it is possible.</p>
5,600
<p>I am working with ASP.net.<br><br> I am trying to call a method that exists on the base class for the page I am using. I want to call this method via Javascript and do not require any rendering to be handled by ASP.net.<br><br> What would be the easiest way to accomplish this. <br><br> I have looked at PageMethods w...
<p>It depends on what the method relies on, but assuming it is a static method or that it does not rely on the Page Lifecycle to work, you could expose a webservice endpoint and hit that with whichever Javascript calling mechanism you would like to use.</p>
<p>As Thunder3 suggests, expose a Web Service. Once you have done this, you can register the webservice with the ScriptManager (or ScriptManagerProxy), which will cause a JavaScript wrapper to be generated. This wrapper gives you a good interface to the call.</p>
9,315
<p>Is there an easy way to capitalize the first letter of a string and lower the rest of it? Is there a built in method or do I need to make my own?</p>
<p><code>TextInfo.ToTitleCase()</code> capitalizes the first character in each token of a string.<br /> If there is no need to maintain Acronym Uppercasing, then you should include <code>ToLower()</code>.</p> <pre><code>string s = "JOHN DOE"; s = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(s.ToLower()); // Produce...
<p>Like edg indicated, you'll need a more complex algorithm to handle special names (this is probably why many places force everything to upper case).</p> <p>Something like this untested c# should handle the simple case you requested:</p> <pre><code>public string SentenceCase(string input) { return input(0, 1).To...
9,843
<p>I'm very new to 3D printing, but so far I've been able to print a couple things off Thingiverse without issue. However, as I'm trying to print another part, I've run into a situation where Cura is totally confused as to what's touching the buildplate and what isn't:</p> <p><a href="https://i.stack.imgur.com/j56yL.p...
<p>If you want to mirror the print to get the top to the bottom, and visa versa, you just need to rotate the part using the XYZ rotation tool. Mirroring is used to make a mirror image in the X-Z or Y-Z plane, not the X-Y plane. </p> <p>You might just caught a bug, you could post that of their forum.</p> <p>Update: <...
<p>If you want to mirror the print to get the top to the bottom, and visa versa, you just need to rotate the part using the XYZ rotation tool. Mirroring is used to make a mirror image in the X-Z or Y-Z plane, not the X-Y plane. </p> <p>You might just caught a bug, you could post that of their forum.</p> <p>Update: <...
977
<p>Here's the situation: I need to bind a WPF <code>FixedPage</code> against a <code>DataRow</code>. Bindings don't work against <code>DataRows</code>; they work against <code>DataRowViews</code>. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the <cod...
<p>Not Exactly a sexy piece of code but their doesn't seem to be an automated way to find the row without just looping the table.</p> <pre><code> DataRowView newRowView = null; foreach (DataRowView tempRowView in myDataTable.DefaultView) { if (tempRowView.Row == rowToMatch) ...
<pre><code>row.Table.DefaultView[row.Table.Rows.IndexOf(row)] </code></pre> <p>This is an okay answer. But if you find yourself in this situation, you should consider learning more about DataViews and how they are used, then refactor your code to be view-centric rather than table-centric.</p>
5,240
<p>I would like to call python script files from my c++ program.</p> <p>I am not sure that the people I will distribute to will have python installed.</p>
<p>Boost has a python interface library which could help you.</p> <p><a href="http://www.boost.org/doc/libs/release/libs/python/doc/index.html" rel="noreferrer">Boost.Python</a></p>
<p>Using Inter Process Communication (IPC) over socket can be a possible solution. Use a local network socket to listen/trasfer commands between both.</p>
7,155
<p>I am attempting to make my Ender 3 Pro print significantly faster than it is intended it I fear.</p> <p>I hear a clicking noise coming from the extruder above 130 mm/s in Cura when it is going in long straight lines (I think my acceleration settings prevent it on shorter lines). I have seen this before when the bed...
<p>I am still somewhat of a noob, but I have heard that your problem may be because the extruder is not getting the filament out fast enough. You are trying to extrude filament before it is sufficiently fluid. Try increasing your hotend temperature by 5 degrees.</p>
<p>You're likely hitting the thermal limit of your hot end.</p> <p>The standard Creality hotend used in your printers maxes out at around 8-12 mm³/s. To calculate your current volumetric speed, you can simply calculate</p> <p><code>speed * layer height * extrusion width</code></p> <p>With an 0.45 mm extrusion width and...
1,768
<p>I am looking for a method of storing Application Messages, such as</p> <ul> <li>"You have logged in successfully"</li> <li>"An error has occurred, please call the helpdesk on x100"</li> <li>"You do not have the authority to reset all system passwords" etc</li> </ul> <p>So that "when" the users decide they don't li...
<p>In your Web.config, under appSettings, change it to:</p> <pre><code>&lt;appSettings file="StringKeys.config"&gt; </code></pre> <p>Then, create your StringKeys.config file and have all your keys in it.</p> <p>You can still use the AppSettings area in the main web.config for any real application related keys.</p>
<p>You can use <a href="http://msdn.microsoft.com/en-us/library/system.resources.resourcemanager.aspx" rel="nofollow noreferrer">ResourceManager</a> class. See "ResourceManager and ASP.NET" article at <a href="http://msdn.microsoft.com/en-us/library/aa309419(VS.71).aspx" rel="nofollow noreferrer">http://msdn.microsoft....
5,024
<p>I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core).</p> <p>My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficient handle on threading to get this to work.</p>
<p>I have VS2008 running on all 4 CPUs. Just set this environment variable / project flag.</p> <p>/MP</p> <p>(It can be set in C/C++ Settings, Advanced. In project settings)</p> <p>Edit: The MP flag can also accept a number, e.g. /MP2 which means it will only run on 2 cores. Leaving it as just /MP means it will run ...
<p>The /MP flag is only for builds, we at least it is according to this <a href="http://msdn.microsoft.com/en-us/library/bb385193.aspx" rel="nofollow noreferrer">msdn</a></p> <p>Now I would love to be wrong about it, but im pretty sure its just for builds. Which of course is still very useful.</p>
7,749
<p>Are there any utilities or browser plugins that let you easily switch the version of the Flash player that is being used?</p>
<p>For Firefox 3.x on Window XP, Ubutntu Linux, and Mac OS X (Tiger and Leopard), <a href="http://www.sephiroth.it/firefox/flash_switcher/" rel="nofollow noreferrer">Flash Switcher</a> works well.</p>
<p>Found the following: <a href="http://www.google.be/search?q=firefox%20switch%20flash%20version" rel="nofollow noreferrer">http://www.google.be/search?q=firefox%20switch%20flash%20version</a></p> <p><a href="http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php" rel="nofollow noreferrer">htt...
9,884
<p>Let's say that you want to create a dead simple BlogEditor and, one of your ideas, is to do what Live Writer does and ask only the URL of the persons Blog. How can you detect what type of blog is it?</p> <p>Basic detection can be done with the URL itself, such as “<a href="http://myblog.blogger.com" rel="nofollow n...
<p>Many (most?) blogs will have a meta tag for "generator" which will list the blog engine. For example a blogger blog will contain the following meta tag: </p> <pre><code>&lt;meta name="generator" content="Blogger" /&gt; </code></pre> <p>My Subtext blog shows the following generator meta tag: </p> <pre><code>&l...
<p>Some blogs provide a Generator meta tag - e.g. Wordpress - you could find out if there's any exceptions to this.</p> <p>You'll have to be careful how you detect it though, Google surprised me with this line:</p> <pre><code>&lt;meta content='blogger' name='generator'/&gt; </code></pre> <p>Single quotes are blasphe...
4,609
<p>Encouraged by SO, I'm trying to write an ASP.NET site that uses OpenID for user authentication. It's a regular WinForms site (not MVC.NET), using the <a href="http://code.google.com/p/dotnetopenid/" rel="nofollow noreferrer">DotNetOpenId</a> library for authentication.</p> <p>Is it safe for me to permit/deny admin...
<p>Jarrett makes some good comments about using database tables.</p> <p>Just to answer another one of your questions, no, it's not a confidentiality thing to put your OpenID in your code generally. If setting up roles seems overkill for your site, a simple equality check against your ClaimedIdentifier is just perfect...
<p>My solution is to follow the same idea of the Roles table. After you've authenticated the user, look up that user's roles. If the user has role "Administrator" in the UserRoles table, then they can do whatever the Administrator can do.</p> <p>I don't broadcast open ID's in my app. They're stored in the table. On ev...
8,109
<p>I've had a Windows app in production for a while now, and have it set up to send us error reports when it throws exceptions. Most of these are fairly descriptive and help me find the problem very quickly (I use the MS Application Exception Block). </p> <p>On a few occasions I have reports that are issues that I can...
<p>One option is to generate a (mini-)dump file as close to the point where the exception is thrown as possible. This <a href="http://blogs.microsoft.co.il/blogs/sasha/archive/2008/05/28/programmatically-generating-a-dump-file.aspx" rel="nofollow noreferrer">article</a> talks about how to do this from managed code.</p...
<p>I'd make use of the event log. Take a look here:</p> <p><a href="http://support.microsoft.com/kb/307024" rel="nofollow noreferrer">http://support.microsoft.com/kb/307024</a></p>
7,613
<p>In the process of developing my first WCF service and when I try to use it I get "Method not Allowed" with no other explanation. </p> <p>I've got my interface set up with the ServiceContract and OperationContract:</p> <pre><code> [OperationContract] void FileUpload(UploadedFile file); </code></pre> <p>Alon...
<p>Your browser is sending an HTTP GET request: Make sure you have the WebGet attribute on the operation in the contract:</p> <pre><code>[ServiceContract] public interface IUploadService { [WebGet()] [OperationContract] string TestGetMethod(); // This method takes no arguments, returns a string. Perfect fo...
<p>Only methods with WebGet can be accessed from browser IE ; you can access other http verbs by just typing address</p> <p>You can either try Restful service startup kit of codeples or use fiddler to test your other http verbs</p>
6,241
<p>OpenID is a great idea in principle, but the UI and the explanation as to why it is good are currently not tailored for general use -- what do you think it would take to make OpenID work for the general public? Can this be solved with technology, or is the problem so intrinsically hard that we are stuck with diffic...
<p>It needs to be much simpler: involve less knowledge of the concepts, and require fewer steps - preferably zero. When the technology works with little or no assistance, it'll take off.</p> <p>The mechanics of OpenID credentials, providers and suppliers shouldn't need to be exposed to the user. People talk about educ...
<p>Make it less open.</p> <p>i do not want the same identity on multiple sites. i do not want to have to create a flickr account before StackOverflow will let me post. i do not have to have to create a new flickr account for each website that i want to register with.</p>
7,354
<p>I want to make a project involving many small dots indents and I would like to know how I can calculate the smallest dot hole the Prusa i3 MK3S can extrude around on a layer using PLA. In other words, if I printer a mesh with circle shaped holes, how would I know the minimum diameter of the holes. Is it simply the s...
<p>There is no direct limit on the size of a hole in XY-plane (that means: oriented so that the hole is visible from above).</p> <p>The movement accuracy of MK3S (and most other modern 3D printers) is about 0.01 mm. So theoretically you could move around a circle that has diameter of the (default) 0.4 mm extrusion wid...
<p>That depends on the ability how fast you get filament to stick to the build plate and whether the filament is loaded in the extruder. It also matters which size of nozzle you are using. The filament diameter has no influence other than smaller filament width (e.g. 1.75&nbsp;mm) requires more length to extrude with r...
1,527
<p>We currently have quite a few tags about filament:</p> <ul> <li><a href="https://3dprinting.stackexchange.com/questions/tagged/filament" class="post-tag" title="show questions tagged &#39;filament&#39;" rel="tag">filament</a></li> <li><a href="https://3dprinting.stackexchange.com/questions/tagged/plastic-filament" ...
<p>All filament used in 3D printing is thermoplastic filament, so plastic-filament and thermoplastic-filament are redundant.</p>
<p>I see a form of hierarchy that could be used.</p> <p>Depending on the question a higher level tag could be used or a more specific one for specific problems (or both tags even).</p> <ul> <li>Filament <ul> <li>Plastic Filament <ul> <li>ABS</li> <li>PLA</li> </ul></li> <li>Water Soluble <ul> <li>PVA</li> </ul></l...
13
<p>I'm looking for advice on how to dynamically create content in flash based on a database. Initially I was thinking that we would export the database to an XML file and use the built in Actionscript XML parser to take care of that, however the size of the XML file may prove prohibitive. </p> <p>I have read about u...
<p>If you plan to deploy your flash content to a website, you should use some sort of backend - otherwise you would have a potential security problem. I use remoting with <a href="http://www.amfphp.org/" rel="noreferrer">AMFPHP</a>, it has worked out really well.</p>
<p>The general practice that I've experienced is that if it's something like a config file or just a really small amount of data then you could probably get away with just having an XML file on the server with your SWF files.</p> <p>If you want the data to be more dynamic or you anticipate changing it quite often I wo...
8,838
<p>How can I make a major upgrade to an installation set (MSI) built with <a href="http://en.wikipedia.org/wiki/WiX" rel="noreferrer">WiX</a> install into the same folder as the original installation?</p> <p>The installation is correctly detected as an upgrade, but the directory selection screen is still shown and wit...
<p>There's an example in the WiX tutorial: <a href="https://www.firegiant.com/wix/tutorial/getting-started/where-to-install/" rel="nofollow noreferrer">https://www.firegiant.com/wix/tutorial/getting-started/where-to-install/</a></p> <pre><code>&lt;Property Id="INSTALLDIR"&gt; &lt;RegistrySearch Id='AcmeFoobarRegistr...
<p>You don't really need to separate RegistryKey from RegistryValue in a simple case like this. Also, using HKMU instead of HKLM takes care of it whether you're doing a machine or user install.</p> <pre><code>&lt;RegistryValue Root="HKMU" Key="Software\[Manufacturer]\[ProductName]" Name="InstallDir" Type="str...
7,983
<p>I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc).</p> <p>I'm would like to format my logs to store the text with form...
<p>My first suggestion would be to use a drop-in logging tool like log4net, which will make formatting much more automatic.</p> <p>If you are going to go the route of two files (and I agree with Craig that a database is probably a better choice,) you can probably save yourself a lot of heartache by having one file tha...
<p>If you are catpuring logging information for future searching and anaylsis perhaps a database would be a better answer. </p> <p>As for your solution. Flat files do not scale well at all where as a database scale much better. I wouldn't split the files either, that just compounds the scalability issue. If you ha...
7,347
<p>How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want. </p>
<p><strong>There's no easy way to find out the memory size of a python object</strong>. One of the problems you may find is that Python objects - like lists and dicts - may have references to other python objects (in this case, what would your size be? The size containing the size of each object or not?). There are som...
<p>For big objects you may use a somewhat crude but effective method: check how much memory your Python process occupies in the system, then delete the object and compare.</p> <p>This method has many drawbacks but it will give you a very fast estimate for very big objects.</p>
5,415
<p>Assume somebody has a Monoprice Maker Select and has changed from the original brass extruder gear to a <a href="https://www.wanhaouk.com/products/extruder-drive-gear" rel="nofollow noreferrer">D4 Plus</a> one, which is slightly smaller (10.6 vs 10.9 mm outer diameter).</p> <p>This person might be wondering if he/s...
<p>If you change the extruder wheel for a different sized wheel, you need to calibrate the extruder to make sure that if you ask to extrude 100 mm it actually extrudes 100 mm. <a href="https://3dprinting.stackexchange.com/a/6484/5740">This answer</a> on the question "<a href="https://3dprinting.stackexchange.com/q/6483...
<p>This will affect your extrusion rate. The best place to change this would be in your E steps located in the firmware but you can also compensate for this by changing the flow percentage in Cura, a setting of 103% (10.9/10.6) should get you close.</p>
1,061
<p>In Django's template language, you can use <code>{% url [viewname] [args] %}</code> to generate a URL to a specific view with parameters. How can you programatically do the same in Python code?</p> <p>What I need is to create a list of menu items where each item has name, URL, and an active flag (whether it's the ...
<p>If you need to use something similar to the <code>{% url %}</code> template tag in your code, Django provides the <code>django.core.urlresolvers.reverse()</code>. The <code>reverse</code> function has the following signature:</p> <pre><code>reverse(viewname, urlconf=None, args=None, kwargs=None) </code></pre> <p><...
<p>Be aware that using <code>reverse()</code> requires that your urlconf module is 100% error free and can be processed - iow no <code>ViewDoesNotExist</code> errors or so, or you get the dreaded <code>NoReverseMatch</code> exception (errors in templates usually fail silently resulting in <code>None</code>).</p>
6,489
<p>In Java (or any other language with checked exceptions), when creating your own exception class, how do you decide whether it should be checked or unchecked?</p> <p>My instinct is to say that a checked exception would be called for in cases where the caller might be able to recover in some productive way, where as ...
<p>Checked Exceptions are great, so long as you understand when they should be used. The Java core API fails to follow these rules for SQLException (and sometimes for IOException) which is why they are so terrible.</p> <p><strong>Checked Exceptions</strong> should be used for <strong>predictable</strong>, but <strong>...
<p>The rule I use is: never use unchecked exceptions! (or when you don't see any way around it)</p> <p>From the point of view of the developer using your library or the end-user using your library/application it really sucks to be confronted with an application that crashes due to an uncought exception. And counting o...
4,720
<p>I have a project that utilizes the javax.mail.internet.MimeMessage and other related classes that does mime parsing for emails that we receive. This needs to be ported to .NET.</p> <p>What .Net 3rd party or built in library can I use to replace the Java classes that I'm using?</p> <p>EDIT: Anything change in the l...
<p>I've recently released <a href="https://github.com/jstedfast/MimeKit">MimeKit</a> which is far more robust than any of the other open source .NET MIME parser libraries out there and it's orders of magnitude faster as well due to the fact that it is an actual stream parser and not a recursive descent string parser (w...
<p>Try using <a href="http://www.limilabs.com/mail/" rel="nofollow noreferrer">Mail.dll IMAP component</a>, it's on the market for quite a while, and is well tested.</p> <pre><code>using(Imap imap = new Imap()) { imap.Connect("imapServer"); imap.UseBestLogin("user", "password"); imap.SelectInbox(); Li...
3,958
<p>Is there a way to embed a browser in Java? more specifically, is there a library that can emulate a browser?</p>
<p>Since JavaFX 2.0 you can use now <a href="http://docs.oracle.com/javafx/2.0/webview/jfxpub-webview.htm" rel="noreferrer">webview</a></p> <p><img src="https://i.stack.imgur.com/WUfqs.png" alt="enter image description here"></p>
<p>If you look at The Minecraft launcher (the old one), look through LoginForm or LauncherFrame, you may be able to find out that method. There is a tutorial by kippykip on youtube on how to decompile and edit it: <a href="http://www.youtube.com/watch?v=n_bh-c2nO7k" rel="nofollow">here</a></p>
7,063
<p>Is there a way to combine Enums in VB.net?</p>
<p>I believe what you want is a flag type enum.</p> <p>You need to add the Flags attribute to the top of the enum, and then you can combine enums with the 'Or' keyword.</p> <p>Like this:</p> <pre><code>&lt;Flags()&gt; _ Enum CombinationEnums As Integer HasButton = 1 TitleBar = 2 [ReadOnly] = 4 ETC = 8 End Enum ...
<p>If you taking about using enum flags() there is a good article <a href="http://www.codeguru.com/vb/sample_chapter/article.php/c12963" rel="nofollow noreferrer" title="VB flags">here</a>.</p>
8,287
<p>I have been having some issues with my Cocoon Create Model Maker/Wanhao Duplicator i3 Mini. The hotend doesn't get up to temperature. </p> <p>I will go to any of the heating functions (start print, preheat, add filament, etc.) and it will begin to reheat the nozzle. The temperature rises until eventually, it stops ...
<p>The solution was posted in a comment, as the asker hasn't posted an answer yet, it is answered in this community wiki answer:</p> <blockquote> <p>Ended up replacing the thermistor which solved the problem.</p> </blockquote>
<p>Maybe, the thermistor is not fully seated and does not measure temperature effectively. </p> <p>Try inserting the thermistor into the hole by filling the gaps with metal wire or conductive paste.</p>
1,436
<p>I can print a reasonably high quality print, but then there will be a millimetre or two of rubbish.</p> <p><a href="https://i.stack.imgur.com/9ppdc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ppdc.jpg" alt="Bad layer"></a> <a href="https://i.stack.imgur.com/9kreD.jpg" rel="nofollow noreferre...
<p>This can be caused by various problems, of which an <a href="/a/7901/5740">aforementioned</a> filament diameter is only one of multiple possible causes.</p> <p>The observed phenomenon is called <strong><em>under-extrusion</em></strong>. Temporary under-extrusion can also be caused by filament friction on the spool,...
<p>One of the reasons for such a defect may be a local decrease in the diameter of the filament. Carefully check your filament.</p>
1,168
<p>MySQL has this incredibly useful yet proprietary <code>REPLACE INTO</code> SQL Command. </p> <p>Can this easily be emulated in SQL Server 2005?</p> <p>Starting a new Transaction, doing a <code>Select()</code> and then either <code>UPDATE</code> or <code>INSERT</code> and <code>COMMIT</code> is always a little bit ...
<p>This is something that annoys me about MSSQL (<a href="http://bizvprog.blogspot.com/2008/04/annoying-fundamental-flaw-with-sql.html" rel="noreferrer">rant on my blog</a>). I wish MSSQL supported <code>upsert</code>. </p> <p>@Dillie-O's code is a good way in older SQL versions (+1 vote), but it still is basically tw...
<p>I wrote a <a href="http://www.samsaffron.com/blog/archive/2007/04/04/14.aspx" rel="nofollow noreferrer">blog post</a> about this issue.</p> <p>The bottom line is that if you want cheap updates and want to be safe for concurrent usage, try:</p> <pre><code>update t set hitCount = hitCount + 1 where pk = @id if @@rowc...
2,273
<p>In effect, if I have a <code>class c</code> and instances of <code>$c1</code> and <code>$c2</code> which might have different private variable amounts but all their public methods return the same values I would like to be able to check that <code>$c1 == $c2?</code></p> <p>Does anyone know an easy way to do this?</...
<p>You can also implement a equal($other) function like</p> <pre> &lt;?php class Foo { public function equals($o) { return ($o instanceof 'Foo') && $o.firstName()==$this.firstName(); } } </pre> <p>or use foreach to iterate over the public properties (this behaviour might be overwritten) of one object ...
<p>You can try writing a class of your own to plugin and write methods that do comparison based on what you define. For example:</p> <pre><code>class Validate { public function validateName($c1, $c2) { if($c1-&gt;FirstName == "foo" &amp;&amp; $c2-&gt;LastName == "foo") { return true; } ...
7,954
<p>What are the best practices around creating flat file database structures in PHP?</p> <p>A lot of more matured PHP flat file frameworks out there which I attempt to implement SQL-like query syntax which is over the top for my purposes in most cases. (I would just use a database at that point).</p> <p>Are there any...
<p>Well, what is the nature of the flat databases. Are they large or small. Is it simple arrays with arrays in them? if its something simple say userprofiles built as such:</p> <pre><code>$user = array(&quot;name&quot; =&gt; &quot;bob&quot;, &quot;age&quot; =&gt; 20, &quot;websites&quot;...
<p>If you're going to use a flat file to persist data, use XML to structure the data. PHP has a <a href="http://uk.php.net/xml" rel="noreferrer">built-in XML parser</a>.</p>
2,251
<p>I need to convert a named instance of SQL server 2005, to a default instance.</p> <p>Is there a way to do this without a reinstall?</p> <hr> <p>The problem is, 2 out of 6 of the developers, installed with a named instance. So its becoming a pain changing connection strings for the other 4 of us. I am looking for ...
<p>I also wanted to convert a named instance to default - my reason was to access it with just the machine name from various applications.</p> <p>If you want to <em>access a named instance</em> from any connection string <em>without using the instance name</em>, and using only the server name and/or IP address, then y...
<p>You shouldn't ever really need to do this. Most software that <strong>claims</strong> to require the default instance (like Great Plains or Dynamics) doesn't actually.</p> <p>If you repost with your situation (installed X, then Y, but need to accomplish Z) I bet you'll get some good workarounds.</p>
5,546
<p>How would you attach a propertychanged callback to a property that is inherited? Like such:</p> <pre><code>class A { DependencyProperty prop; } class B : A { //... prop.AddListener(PropertyChangeCallback); } </code></pre>
<p>(edited to remove recommendation to use DependencyPropertyDescriptor, which is not available in Silverlight)</p> <p><a href="http://agsmith.wordpress.com/2008/04/07/propertydescriptor-addvaluechanged-alternative/" rel="nofollow noreferrer">PropertyDescriptor AddValueChanged Alternative</a></p>
<p>Have you tried a two way data binding between the two dependency properties?</p>
3,344
<p>We manufacture artificial corals for aquarium decorations.</p> <p>We are trying to use 3D scanning and printing to duplicate live corals. Please see attached photos, left is 3D printed model, right is coral molded using resin.</p> <p>The problem is lacking detail, the real corals have pores (tiny holes).</p> <p>C...
<p>First thing to check it's, What printer are you using? is FDM or SLA/SLS? Technology used is the great bottleneck to achieve the results that you want to. </p> <p>Also, going cheap in 3D printing it's a way to get bad results. A good setup it's really important to get a great XY and Z resolution. </p> <p>FDM it's ...
<p>Perhaps with the scanned data you could import it into some sort of 3D modeling application such as Blender and add the pores either manually or with a modifier. See <a href="https://docs.blender.org/manual/ko/dev/modeling/modifiers/index.html" rel="nofollow noreferrer">Blender - modifiers</a>.</p>
681
<p>Is there anything to the process of 3D printing that might make the dice unfair/land on a specific side more frequently? Or will any imperfections be negligible, thus making the dice fair? I'm more concerned about making a d20 than anything else, so focus on that shape if need be.</p> <hr> <p>I am using a MakerBot...
<h2>It probably won't be fair.</h2> <p>Incidentally, I have a decent amount of experience with 3D printing.</p> <p>It depends heavily on the particular technology that you're using to do the 3D printing, but nearly all forms of printing aren't perfect--depending on the design you make (solid? honeycombed? hollow?), the...
<p>Well it is a bit more complicated than that. Changes are the d20 you buy in the store is a bit more favored as well. Now we are talking statically, it will like one side over the other. As the difference in weight distribution is not drastic if you print it solid, it will not matter. In use you likely will not see i...
525
<p>Not so long ago I was in an interview, that required solving two very interesting problems. I'm curious how would you approach the solutions.</p> <p>Problem 1 :</p> <p><strong>Product of everything except current</strong> </p> <p>Write a function that takes as input two integer arrays of length len, input and in...
<p>First question: </p> <pre><code>int countZeroes (int[] vec) { int ret = 0; foreach(int i in vec) if (i == 0) ret++; return ret; } int[] mysticCalc(int[] values, int[] indexes) { int zeroes = countZeroes(values); int[] retval = new int[values.length]; int product = 1; if (zeroes &gt;= 2) { // 2 o...
<p>Vaibhav, unfortunately we have to assume, that there could be a 0 in the input table.</p>
8,009
<p>I've used Apache CXF to expose about ten java classes as web services.</p> <p>I've generated clients using CXF, Axis, and .NET.</p> <p>In Axis and CXF a "Service" or "Locator" is generated. From this service you can get a "Port". The "Port" is used to make individual calls to the methods exposed by the web servic...
<p>I found the information based on Kevin Kenny's answer, but I figured I'd post it here for others.</p> <p>A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindi...
<p>As you already mentioned, those terms mean different things in different stacks - there is no one right generic answer for web services.</p>
3,264
<p>In a C++ Windows (XP and NT, if it makes a difference) application I'm working on, I need to get the network name associated with the computer the code is executing on, so that I can convert local filenames from C:\filename.ext to \\network_name\C$\filename.ext. How would I do this?</p> <p>Alternatively, if there's...
<p>You'll want Win32's GetComputerName:</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx</a></p>
<p>I agree with Pascal on using winsock's gethostname() function. Here you go:</p> <pre><code>#include &lt;winsock2.h&gt; //of course this is the way to go on windows only #pragma comment(lib, "Ws2_32.lib") void GetHostName(std::string&amp; host_name) { WSAData wsa_data; int ret_code; char buf[MAX_PATH]...
3,230
<p>We've been doing some printing with PETG filament on Ender 3 Pro printer and the result were awful: <a href="https://i.stack.imgur.com/1k0ej.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/1k0ej.jpg" alt="Overview of failed PETG prints"></a></p> <p>Here are settings we used:</p> <ul> <li>Extruder: 240&nb...
<p>Slow down! </p> <p>80 mm/s is much too fast for PETG. Try 45 or 50 mm/s instead, even for infill, supports, and other less-visible areas.</p>
<p>55&nbsp;mm per second is the highest I would go with PETG. Cleaning the nozzle more often helps. Also check your PID for the nozzle temp, it could be inconsistent and PETG can be very finicky with temperature.</p>
1,359
<p>I'm building my own 3D printer (custom design, made by me and cut using a water cutting machine) but I have always had problems with the hotend clogging.</p> <p>I have had four hotends:</p> <ul> <li>a J-Head;</li> <li>a full metal;</li> <li>a full metal made by me and;</li> <li>my current hotend which is just a bl...
<p>To make the <a href="https://3dprinting.stackexchange.com/questions/670/which-hotend-does-not-clog-and-is-good-to-use-with-a-bowden-1-75-mm-setup#comment-874">suggestion of Martin Carney</a> a real answer and shift things away from comments:</p> <p>Yes, moisture and dust can be a problem. Find elaborations on the m...
<p>To add to <a href="https://3dprinting.stackexchange.com/questions/670/which-hotend-does-not-clog-and-is-good-to-use-with-a-bowden-1-75-mm-setup#answer-699">kamuro's answer</a>, with respect to the dust aspect, the page <a href="http://www.felixprinters.com/knowledgebase/article/filament-not-extruding-clogged-hot-end...
207
<p>We have only had activity on 3 questions in the past 2 days. It is recommended that we get 10 new questions per day. This is far below these goals.</p> <p>What can we do to get more questions?</p>
<p>I wouldn't worry too much about it. </p> <p>We're still currently in the private beta stage, and we'll be in this spot for another 9 days. After nearly two weeks of private beta, it's perfectly natural for activity to slow down. </p> <h2>So what should you do?</h2> <p>Don't lose out. Make sure that you keep your ...
<p>I agree with Erik. This is something we need to improve on if we want the site to be viable and <a href="https://stackoverflow.blog/2010/10/21/when-will-my-site-graduate/">Graduate from Beta</a>. Our Beta stats on <a href="http://area51.stackexchange.com/proposals/82438?phase=beta">Area51</a> need improvement.</p>...
15
<p>I'm currently working on a large implementation of Class::DBI for an existing database structure, and am running into a problem with clearing the cache from Class::DBI. This is a mod_perl implementation, so an instance of a class can be quite old between times that it is accessed. From the man pages I found two opt...
<p>The "<a href="http://wiki.class-dbi.com/wiki/Common_problems" rel="nofollow noreferrer">common problems</a>" page on the <a href="http://wiki.class-dbi.com/wiki" rel="nofollow noreferrer">Class::DBI wiki</a> has a <a href="http://wiki.class-dbi.com/wiki/Common_problems#Old_data_due_to_object_index" rel="nofollow nor...
<p>I should note that Class::DBI is deprecated and you should port your code to <a href="http://search.cpan.org/dist/DBIx-Class/" rel="nofollow noreferrer">DBIx::Class</a> instead.</p>
5,595
<p>What web site structure(s)/architecture(s) would the community swear by, with a narrowing down in the direction towards more of a small facebook style project?</p> <p>I understand the question to be rather broad/subjective; but being relatively new to the area of web development, I find just looking at and learning...
<p>I guess it depends on the technology you select. For web projects in general I've always employed (Web-)MVC for the past two years or so. The advantage being a clear seperation of frontend and backend in order to create a managable code base.</p> <p>But that's as vague as a recommendation could be. :)</p> <p>Aside...
<p>Possibly a bit heavy for your immediate needs, but have you seen the <a href="http://oreilly.com/catalog/9780596000356/" rel="nofollow noreferrer">Polar bear</a>*? Well worth a browse in the library to see if it's what you require.</p> <p>*<a href="http://oreilly.com/catalog/9780596000356/" rel="nofollow noreferre...
6,833
<p>Earlier today I successfully completed a small print (less than 1 hour) on our Tevo Tarantula. When it came time to print the next one, I started preheating for PLA and got an "E1 Thermal Runaway" error. I replaced the heating element with a backup and got no error on preheat.</p> <p>With an estimated 5+ hrs printi...
<h1>1 PID Tune</h1> <p>Changing the thermosensor or the heater cartridge is a big change in the system: each of these items has internal errors differing them from each other item. If your thermosensor has a different standard resistance by a small way than the one before, if the resistance of the cartridge is differen...
<p>@Trish gives a lot of good info, but:</p> <p><strong>I don't think your heating element is the problem, I think the thermistor is, or a flaky connection between it and your board.</strong></p> <p>The termistor senses the temperature of your heater (you also have one on a heat bed), and tells the electronics when t...
1,122
<p>I can download a file from Tinkercad as any of these:</p> <pre><code>.STL .OBJ .X3D .VRML </code></pre> <p>Is there a way to convert any of those file types to .DWG?</p>
<p>For designing your part, especially considering the repetitive mathematics involved, I would consider to learn to use OpenSCAD. I've learned the program and it fits your modeling requirement quite well. I feel it's easy to learn and is somewhat easier for folks who have a programming background. I don't have one, bu...
<p>In short, I don't think printing the full tetrahedral honeycomb design is a good approach considering the application of the part. Here are few things to note when attempting to 3D print the tetrahedral honeycomb:</p> <p>I wouldn't recommend trying to 3D print this with a an FDM/FFF printer as you will most likely ...
247
<p>I'm trying to redirect requests for a wildcard domain to a sub-directory.<br /> ie. <code>something.blah.example.com</code> --&gt; <code>blah.example.com/something</code></p> <p>I don't know how to get the subdomain name to use in the rewrite rule.</p> <p><strong>Final Solution:</strong></p> <pre><code>RewriteCond %...
<p>You should have a look at the <a href="http://httpd.apache.org/docs/2.2/rewrite/" rel="noreferrer" title="URL Rewriting Guide">URL Rewriting Guide</a> from the apache documentation.</p> <p>The following is untested, but it should to the trick:</p> <pre><code>RewriteCond %{HTTP_HOST} ^([^.]+)\.blah\.domain\.com$ Re...
<p>@Sam</p> <p>your RewriteCond line is wrong. The expansion of the variable is triggered with %, not $.</p> <pre><code>RewriteCond %{HTTP_HOST} ^([^\.]+)\.media\.xnet\.tk$ ^ </code></pre> <p>that should do the trick</p>
7,210
<p>I'm working on a web service at the moment and there is the potential that the returned results could be quite large ( > 5mb). </p> <p>It's perfectly valid for this set of data to be this large and the web service can be called either sync or async, but I'm wondering what people's thoughts are on the following:</p>...
<p>I have seen all three approaches, <strong>paged</strong>, <strong>store and retrieve</strong>, and <strong>massive push</strong>.</p> <p>I think the solution to your problem depends to some extent on why your result set is so large and how it is generated. Do your results grow over time, are they calculated all at...
<p>I somewhat disagree with secretGeek's comment:</p> <blockquote> <p>That's already happening for you -- it's called tcp/ip ;-) Re-implementing that could be overkill.</p> </blockquote> <p>There are times when you may want to do just this, but really only from a UI perspective. If you implement some way to either...
3,291
<p>How do I get Perl to read the contents of a given directory into an array?</p> <p><a href="https://en.wikipedia.org/wiki/Grave_accent#Use_in_programming" rel="noreferrer">Backticks</a> can do it, but is there some method using 'scandir' or a similar term?</p>
<pre><code>opendir(D, "/path/to/directory") || die "Can't open directory: $!\n"; while (my $f = readdir(D)) { print "\$f = $f\n"; } closedir(D); </code></pre> <p>EDIT: Oh, sorry, missed the "into an array" part:</p> <pre><code>my $d = shift; opendir(D, "$d") || die "Can't open directory $d: $!\n"; my @list = rea...
<p>from: <a href="http://perlmeme.org/faqs/file_io/directory_listing.html" rel="nofollow noreferrer">http://perlmeme.org/faqs/file_io/directory_listing.html</a></p> <pre><code>#!/usr/bin/perl use strict; use warnings; my $directory = '/tmp'; opendir (DIR, $directory) or die $!; while (my $file = readdir(DIR)) { ...
4,260
<p>How can I find any unused functions in a PHP project?</p> <p>Are there features or APIs built into PHP that will allow me to analyse my codebase - for example <a href="http://ie.php.net/manual/en/language.oop5.reflection.php" rel="noreferrer">Reflection</a>, <a href="http://php.net/manual/en/function.token-get-all....
<p>Thanks Greg and Dave for the feedback. Wasn't quite what I was looking for, but I decided to put a bit of time into researching it and came up with this quick and dirty solution:</p> <pre><code>&lt;?php $functions = array(); $path = "/path/to/my/php/project"; define_dir($path, $functions); reference...
<p>afaik there is no way. To know which functions "are belonging to whom" you would need to execute the system (runtime late binding function lookup). </p> <p>But Refactoring tools are based on static code analysis. I really like dynamic typed languages, but in my view they are difficult to scale. The lack of safe re...
3,263
<p>I have a third-party app that creates HTML-based reports that I need to display. I have <em>some</em> control over how they look, but in general it's pretty primitive. I <em>can</em> inject some javascript, though. I'd like to try to inject some jQuery goodness into it to tidy it up some. One specific thing I wo...
<p>Given a html page like this:</p> <pre><code>&lt;body&gt;&lt;br/&gt; &lt;table id="my-table"&gt;`&lt;br/&gt; &lt;tr&gt;&lt;br/&gt; &lt;td&gt;&lt;div&gt;This is the contents of Column One&lt;/div&gt;&lt;/td&gt;&lt;br/&gt; &lt;td&gt;&lt;div&gt;This is the contents of Column Two&lt;/...
<p>You could do this with jQuery but it may make additional maintenance a nightmare. I would recommend against doing this / screen scraping because if the source ever changes so does your work around.</p>
7,773
<p>I prefer dark backgrounds for coding, and I've downloaded a jar file containing an IntelliJ IDEA color theme that has a dark background. How do I tell IntelliJ about it?</p>
<p>Go to File->Import Settings... and select the jar settings file</p> <p>Update as of <strong>IntelliJ 2020</strong>:</p> <p>Go to File -> Manage IDE Settings -> Import Settings...</p>
<p>Find the .jar theme file in your disk. Drag the file into PhpStorm window and voila !</p>
6,025
<p>What do you think the future of GPU as a CPU initiatives like CUDA are? Do you think they are going to become mainstream and be the next adopted fad in the industry? Apple is building a new framework for using the GPU to do CPU tasks and there has been alot of success in the Nvidias CUDA project in the sciences. Wou...
<p>First of all I don't think this questions really belongs on SO.</p> <p>In my opinion the GPU is a very interesting alternative whenever you do vector-based float mathematics. However this translates to: It will not become mainstream. Most mainstream (Desktop) applications do very few floating-point calculations.</p...
<p>With so much untapped power I cannot see how it would go unused for too long. The question is, though, how the GPU will be used for this. CUDA seems to be a good guess for now but other techologies are emerging on the horizon which might make it more approachable by the average developer.</p> <p>Apple have recently...
4,778
<p>I'm using Cura and it removes my holes and deletes sections of the print and disconnects parts. In Blender it looks as it should be, as I designed it. I know there are a few mishaps inside (not manifold) but is there a way to fill in everything on the inside. I only care about the externally facing faces. This is ex...
<p>It's common for modeling software to flip normals, causing what you describe. You said,</p> <blockquote> <p>I only care about the externally facing faces.</p> </blockquote> <p>But are you sure they are truly externally facing? Turn on normals in Blender and ensure that all the arrows/pointers are external.</p> <p>An...
<p>Okay, so like suggested I put it into 3D Builder (A free Windows 3D modeling program). I imported it as an stl, then exported it as an stl and imported that stl into Cura. And lo and behold all problems were gone! If you are having a similar issue give that a try! The 3D Builder program and similar ones are designed...
1,891
<p>The ASP.NET AJAX <strong>ModalPopupExtender</strong> has <code>OnCancelScript</code> and <code>OnOkScript</code> properties, but it doesn't seem to have an <code>OnShowScript</code> property. I'd like to specify a javascript function to run each time the popup is shown.</p> <p>In past situations, I set the <code>T...
<p>hmmm... I'm <em>pretty sure</em> that there's a shown event for the MPE... this is off the top of my head, but I think you can add an event handler to the shown event on page_load</p> <pre><code>function pageLoad() { var popup = $find('ModalPopupClientID'); popup.add_shown(SetFocus); } function SetFocus() ...
<p>If you are using a button or hyperlink or something to trigger the popup to show, could you also add an additional handler to the onClick event of the trigger which should still fire the modal popup and run the javascript at the same time?</p>
2,738
<p>Can I use three-phase stepper motors with pololu style stepper drivers? If not, what kind of drivers support three-phase motors?</p>
<p>Three phase stepper motors are superior in several ways: <a href="http://www.fullingmotorusa.com/the-new-range-of-3-phase-stepper-motors/" rel="nofollow noreferrer">see this advertising literature.</a> Unfortunately for using this with simple stepper drivers, they have an extra coil of wire that simple drivers have...
<p>3D printers typically use bipolar two-phase stepper motors, and it is possible that Pololu-style carriers for stepper-motor drivers only support such motors.</p> <p>Certainly, drivers for three-phase stepper motors exist, for example, the Trinamic TMC5062, but I cannot find any Pololu-style carriers for this chip. ...
1,324
<p>I need to read from a variety of different text files (I've some delimited files and some fixed width files). I've considered parsing the files line by line (slow using the File.ReadLine type methods) and reading the file using the ODBC text driver (faster) but does anyone have any other (better) suggestions? I'm us...
<p>I'm not sure you could really do a text-and-Excel file parser, not unless by Excel file you mean a comma/pipe/tab delimited file, which is actually just another text file. Reading actual excel files require you to use the MS Office libraries.</p> <p>For delimited text file parsing, you could look into <a href="http...
<p>The File reading process is not slow if you read all file at once using the File class and the methods suggested by John. Depending upon the file's size and what you want to do with them, it may use more or less memory. I'd suggest you try with File.ReadAllText (or whatever is appropriate for you)</p>
5,436
<p>My Zortrax M200 has a skipping extruder motor, I’ve checked the seating of all connections and 3 different (electronic ribbon) cables and still can’t fix the issue. The gear is clean and have tried fresh filament. </p> <ul> <li>Does anyone have any possible thoughts on why this happens?</li> </ul> <p>The extruded ...
<p>Every time I've had an extruder "skip", it was actually because some condition was causing excessive back-pressure. Either the hot end isn't hot enough, the nozzle is too close to the bed, or something has clogged the nozzle.</p> <p>If there is a "skipping" noise, then this is almost certainly the problem. When a...
<ol> <li><p>Check the pins on the motor. Are they bent? If yes - straighten them out with a screw driver. </p></li> <li><p>This could be a stepper driver problem. If it is then bad luck. Zortrax hard solders their stepper drivers onto their control board (this sucks and is a pure monetization related move by them). </p...
936
<p>Given a path such as <code>&quot;mydir/myfile.txt&quot;</code>, how do I find the file's absolute path in Python? E.g. on Windows, I might end up with:</p> <pre><code>&quot;C:/example/cwd/mydir/myfile.txt&quot; </code></pre>
<pre><code>&gt;&gt;&gt; import os &gt;&gt;&gt; os.path.abspath("mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt' </code></pre> <p>Also works if it is already an absolute path:</p> <pre><code>&gt;&gt;&gt; import os &gt;&gt;&gt; os.path.abspath("C:/example/cwd/mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt' </...
<p>In case someone is using python and linux and looking for full path to file:</p> <pre><code>&gt;&gt;&gt; path=os.popen("readlink -f file").read() &gt;&gt;&gt; print path abs/path/to/file </code></pre>
7,460
<p>How do I call MySQL stored procedures from Perl? Stored procedure functionality is fairly new to MySQL and the MySQL modules for Perl don't seem to have caught up yet.</p>
<p>There's an example in the <a href="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm#MULTIPLE_RESULT_SETS" rel="nofollow noreferrer">section on Multiple result sets in the DBD::mysql docs</a>.</p>
<p><em>Hi, similar to above but using SQL exec. I could not get the CALL command to work. You will need to fill in anything that is within square brackets and remove the square brackets.</em> </p> <pre> use DBI; #START: SET UP DATABASE AND CONNECT my $host = '*[server]*\\*[database]*'; my $database ...
8,968
<p>I have come across a lot of optimization tips which say that you should mark your classes as sealed to get extra performance benefits.</p> <p>I ran some tests to check the performance differential and found none. Am I doing something wrong? Am I missing the case where sealed classes will give better results?</p> <...
<p>The JITter will sometimes use non-virtual calls to methods in sealed classes since there is no way they can be extended further.</p> <p>There are complex rules regarding calling type, virtual/nonvirtual, and I don't know them all so I can't really outline them for you, but if you google for sealed classes and virtu...
<p>Run this code and you'll see that sealed classes are 2 times faster:</p> <pre><code>class Program { static void Main(string[] args) { Console.ReadLine(); var watch = new Stopwatch(); watch.Start(); for (int i = 0; i &lt; 10000000; i++) { new SealedClass()...
2,432
<p>I've been looking at the Ender series and decided to take the plunge. But I'm unsure on electrical matters. The 110 or 220 volt switch, I assume goes to 220&nbsp;V as I live in the UK but my main question is, from what I've read they come with an EU plug and a uk adapter, is it safer to switch to a 'kettle lead' for...
<p>The fuse <em>may</em> be academic, because there might be an integrated fuseholder in the PSU itself. That said, adding another fuse in the form of a proper UK plug certainly won't hurt. </p> <p>I'd certainly do this, too. Fuseless plugs have no place in my home/workplace</p> <p>For the rest - yes, the 220V positi...
<h1>Safety First!</h1> <p>To guarantee proper grouning and avoid putting the machine on a static charge level against the ground of the house you need to properly connect the ground wires to the ground wire of the house. This is done by using a grounded power cord with a <strong>C13-plug on the machine end</strong> and...
1,654
<p>I want to implement an ISAPI filter like feature using HttpModule in IIS7 running under IIS Integrated Request Processing Pipeline mode.</p> <p>The goal is to look at the incoming request at the Web Server level, and inject some custom HttpHeaders into the request. <code>(for ex: HTTP\_EAUTH\_ID)</code></p> <p>And...
<p><a href="http://msdn.microsoft.com/en-us/library/system.web.httprequest.servervariables.aspx" rel="nofollow noreferrer">HttpRequest.ServerVariables</a> Property is a read-only collection. So, you cannot directly modify that. I would suggest storing your custom data in <a href="http://www.odetocode.com/Articles/111.a...
<p>I believe the server variables list only contains the headers sent from the browser to the server.</p>
8,564
<p>While I know IronRuby isn't quite ready for the world to use it, I was wondering if anyone here tried it and tested how well it faired against the other Rubies out there in terms of raw performance?</p> <p>If so, what are the results, and how did you go about measuring the performance (which benchmarks etc)?</p> <...
<p>According to this article <a href="http://www.iunknown.com/2008/05/ironruby-and-rails.html" rel="nofollow noreferrer">http://www.iunknown.com/2008/05/ironruby-and-rails.html</a>. In may performance was nowhere near where they expected it to be. I heard in <a href="http://altnetpodcast.com/episodes/9-state-of-ironrub...
<p>I have used it and it has worked great for what I have done. However my measuring of performance isn't really scientific, because it was all visual. However I did notice that IronRuby seemed a little more snappier when I compared the two program on equal tasks. I really think this had to do more with the strong a...
5,913
<p>In particular, I have to extract all the messages and attachments from Lotus Notes files in the fastest and most reliable way. Another point that may be relevant is that I need to do this from a secondary thread.</p> <p><strong>Edit</strong></p> <p>Thanks for the answers - both of which are good. I should provide ...
<p>I really do hate that NotesSession COM object.</p> <p>You cannot use it in another thread than the thread it was initialized. Threads in .NET are fibers, the real underlying thread may change at any time.</p> <p>So I suggest using it this way, in a <em>using</em> block :</p> <pre><code>Imports Domino Imports Syst...
<p>I would personally do this native in Notes in either LotusScript or Java. You can do a scheduled agent in Notes much easier than a service in C#.</p>
6,693
<p>I'm in the process of starting a User Group in my area related to .NET development. The format of the community will be the average free food, presentation, and then maybe free swag giveaway.</p> <p>What would you, as a member of a user community, look for in order to keep you coming back month to month?</p>
<p>It's true that some of the talks out there are very rudimentary, unfortunately some times the bulk of your crowd may need that. I consider myself a novice in a lot of fields, but I've attend talks that I thought were beneath me and still people were asking very basic questions. Perhaps it would be worth having a b...
<p>If there isn't beer, its not a good enough user group to attend. The open source guys get this. Their user group meetings are funner, and more dynamic because of this. Just make it BYOB and it'll naturally get better in my experience.</p>
3,128
<p>After a couple of hours fighting with the <a href="http://gallery.menalto.com/" rel="nofollow noreferrer">Gallery2</a> <a href="http://codex.gallery2.org/Gallery2:Modules:rss" rel="nofollow noreferrer">RSS module</a> and getting only the message, "no feeds have yet been defined", I gave up. Based on <a href="http:/...
<p>My eventual (and hopefully temporary) solution to this problem was a Python CGI script. My script follows for anyone who might find it useful (despite the fact that this is a total hack). </p> <pre><code>#!/usr/bin/python """A CGI script to produce an RSS feed of top-level Gallery2 albums.""" #import cgi #import...
<p>Well, I am unsure this can help you but here is a very simple RSS that was presented as solution in another topic:</p> <p><a href="https://stackoverflow.com/questions/82872/php-rss-builder#84601">PHP RSS Builder</a></p>
2,899
<p>I have a Queue&lt;T&gt; object that I have initialised to a capacity of 2, but obviously that is just the capacity and it keeps expanding as I add items. Is there already an object that automatically dequeues an item when the limit is reached, or is the best solution to create my own inherited class?</p>
<p>I've knocked up a basic version of what I'm looking for, it's not perfect but it'll do the job until something better comes along.</p> <pre><code>public class LimitedQueue&lt;T&gt; : Queue&lt;T&gt; { public int Limit { get; set; } public LimitedQueue(int limit) : base(limit) { Limit = limit; ...
<p>You can use a <a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.linkedlist-1?view=netcore-3.1" rel="nofollow noreferrer"><code>LinkedList&lt;T&gt;</code></a> and add thread safety:</p> <pre><code>public class Buffer&lt;T&gt; : LinkedList&lt;T&gt; { private int capacity; publi...
2,368
<p>When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), I can't paste (yank) it in any other application.</p>
<p>Insert the following into your <code>.emacs</code> file:</p> <pre><code>(setq x-select-enable-clipboard t) </code></pre>
<p>What I do is to use a good terminal tool (PuTTY on Windows, Konsole or Terminal on Linux) that has copy facilities built-in.</p> <p>In PuTTY, you highlight the text you want with the mouse and then paste it elsewhere. Right-clicking in a PuTTY window pastes the contents of the Windows copy/paste buffer.</p> <p>In ...
8,989
<p>I'm working with my ASP.NET development team to try and create "better" <em>(i.e. cleaner)</em> HTML when rendering pages. At the moment, .NET has a nasty tendency to do things like dump JavaScript into the page, making it a mandatory requirement on form controls and not allowing forms to work when JS isn't availab...
<p>The ASP.NET MVC Framework would give you a much more familiar separation. Because there is no viewstate, etc in the MVC Framework you won't have to worry about JavaScript being dumped into your pages. The only JavaScript calls you see will be ones that you manually add.</p> <p>You can, for the most part, separate H...
<p>Asp.Net MVC will help you keep html/css/js separate in that it will present fewer features that would prevent you from keeping them separate.</p> <p>For example Html helpers typically return just that: Html. From that point you are free to choose to keep all style information associated only by class attributes. </...
8,043
<p>As far as I know, foreign keys (FK) are used to aid the programmer to manipulate data in the correct way. Suppose a programmer is actually doing this in the right manner already, then do we really need the concept of foreign keys?</p> <p>Are there any other uses for foreign keys? Am I missing something here?</p>
<p>Foreign keys help enforce referential integrity at the data level. They also improve performance because they're normally indexed by default.</p>
<p>Yes. The ON DELETE [RESTRICT|CASCADE] keeps developers from stranding data, keeping the data clean. I recently joined a team of Rails developers who did not focus on database constraints such as foreign keys.</p> <p>Luckily, I found these: <a href="http://www.redhillonrails.org/foreign_key_associations.html" rel="n...
3,926
<p>I'm trying to set up <a href="http://octoprint.org/" rel="nofollow noreferrer">OctoPrint</a> on my Linux Ubuntu 16.04 desktop to work with my Micro3D printer. The printer works fine on Mac and Windows: <a href="https://i.stack.imgur.com/Kmil9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kmil9.p...
<p>I just discovered that OctoPrint only reads .gcode files for printing (apparently, unless you have a slicing software embedded in it), so I installed <a href="http://slic3r.org/download" rel="nofollow">Slic3r</a> separately, and ran</p> <pre><code>./slic3r mystlfile.stl </code></pre> <p>to generate a .gcode file (...
<p>For me it sounds like you've missed to install the CuraEngine for slicing, but I'm only guessing, as I'm not using OctoPrint at all.</p> <p>Instead I'm using Cura directly and save gcode to a SD or use USB printing for quick/small prints.</p> <p>Regrads ;)</p>
281
<p>I have an existing GUI application that should have been implemented as a service. Basically, I need to be able to remotely log onto and off of the Windows 2003 server and still keep this program running.</p> <p>Is this even possible?</p> <p>EDIT: Further refinement here... I do not have the source, it's not my ap...
<p>Windows services cannot have GUIs, so you will need to either get rid of the GUI or separate your application into two pieces - a service with no UI, and a "controller" application. If you have the source code, converting the non-GUI code into a service is easy - Visual Studio has a 'Windows Service' project type th...
<p>First I would have to ask why your service needs a user interface. Most likely it does not but you probably need a client that gets data from this service. The reason services don't usually have GUI's is they may not have a window environment to run in. Services can start and run without a user logged in to the mach...
7,667
<p>I'm wondering if there are any good .NET recommendation algorithms available in open source projects, whether attached to a search engine or not. By recommendation I mean something that accepts a full-text article and recommends other articles from its index based on keyword similarity.</p> <p>At the high end ther...
<p>I think that in StackOverflow they extract all common english words from the text and then compare this words with the remaining words of other posts to get the "Related" posts.</p>
<p>Question is not very clear (algorithm or library???) but only thing that comes to mind is Lucene.NET, the porting of the popular Lucene library on the .Net framework. HTH.</p>
9,759
<p>I've used Trac/Subversion before and really like the integration. My current project is using Mercurial for distributed development and it'd be nice to be able to track issues/bugs and have this be integrated with Mercurial. I realized this could be tricky with the nature of DVCS.</p>
<p><a href="http://trac.edgewall.org/wiki/TracMercurial" rel="noreferrer">TracMercurial</a> integrates Trac with Mercurial. <a href="http://www.assembla.com/" rel="noreferrer">Assembla</a> provides free Mercurial hosting with Trac integration.</p> <p>The idea is that you have a central repository as your master and up...
<p>If you're open to another suggestion, you can try <a href="http://www.mrzv.org/software/artemis/" rel="nofollow noreferrer">Artemis</a>.</p> <p>Though I haven't used it yet, it looks easy enough.</p>
4,025
<p><strong>Model:</strong> Infitary M508</p> <p><strong>Details:</strong> The filament is stuck in the extruder preheated for PLA (the filament is PLA 1.75 white). The extruder's motor works and the filament is in the hole of the extruder (not somewhere else). I took the fan covering the motor apart, to show what is i...
<p>Unfortunately you're going to have to tear the extruder head apart and clean the nozzle. There are kits like the following (found on Amazon - No affiliation):</p> <p><a href="https://i.stack.imgur.com/aDs2P.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aDs2P.jpg" alt="enter image description he...
<p>Unfortunately you're going to have to tear the extruder head apart and clean the nozzle. There are kits like the following (found on Amazon - No affiliation):</p> <p><a href="https://i.stack.imgur.com/aDs2P.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aDs2P.jpg" alt="enter image description he...
1,312
<p>Is there a specific name for that problem? What causes this, and is there a way how to solve it? </p> <p>Printed with PLA, 2&nbsp;mm nozzle diameter, 0.2&nbsp;mm layer height, 20-60&nbsp;mm/s, 200&nbsp;°C extruder, 60&nbsp;°C bed.</p> <p></p> <p><a href="https://i.stack.imgur.com/aSzrJ.jpg" rel="noreferrer" title...
<p>I have experienced this problem. This picture is one that I could have taken. </p> <p>It has always been because I was putting too much plastic into the available space.</p> <p>This has been caused two things: overextrusion -- squirting out too much plastic for the intended layer height, and the bed being too "hi...
<p>This could be a number of things, I personally think it could be either over extrusion or an issue with one of the belts. Depending on the printer, you may need to manually go in and adjust your steps per millimeter, which you should be able to find a guide on. If that doesn't work, then look into belt tension adjus...
1,394
<p>I am trying to use a stringstream object in VC++ (VStudio 2003) butI am getting an error when I use the overloaded &lt;&lt; operator to try and set some manipulators. </p> <p>I am trying the following: </p> <pre><code>int SomeInt = 1; stringstream StrStream; StrStream &lt;&lt; std::setw(2) &lt;&lt; SomeInt; ...
<p>Are you sure you included all of the right headers? The following compiles for me in VS2003:</p> <pre><code>#include &lt;iostream&gt; #include &lt;sstream&gt; #include &lt;iomanip&gt; int main() { int SomeInt = 1; std::stringstream StrStream; StrStream &lt;&lt; std::setw(2) &lt;&lt; SomeInt; return 0; ...
<p>You probably just forgot to include iomanip, but I can't be sure because you didn't include code for a complete program there.</p> <p>This complete program works fine over here using VS 2003:</p> <pre><code>#include &lt;sstream&gt; #include &lt;iomanip&gt; int main() { int SomeInt = 1; std::stringstream S...
9,504
<p><em>The pictures explain my problem. I have already tried to reduce the retraction but that showed no effect. Thank you for your help.</em> </p> <p>The effect is a total stop of the print (no material is extruded).</p> <ul> <li>Creality CR 10</li> <li>Cura 3.4.1</li> </ul> <p>I recently added this new feeder alum...
<p>This is typically caused by resistance in the tube or hotend but in your case it appears to be mostly caused by a very poorly designed extruder. The filament needs to be constrained closer to the drive gear. You may be able to drill out the PTC connector to allow the PTFE tube to reach closer to the gears or print...
<p>You just have to cut the filament at a 45° angle. Then push down the extruder and push the filament in. Then heat up the nozzle. Next, hand feed the filament until the filament starts oozing out.</p>
1,039
<p>What is the simplest and most elegant way to simulate the hover pseudo-class for non-Anchor tags in IE6?</p> <p>I am specifically trying to change the cursor in this instance to that of a pointer.</p>
<p>I think the simplest way is to use the <a href="http://www.xs4all.nl/~peterned/csshover.html" rel="nofollow noreferrer">hover.htc</a> approach. You add the hover.htc file to your site, then reference it in your stylesheet:</p> <pre class="lang-css prettyprint-override"><code>body { behavior:url("csshover.htc"); } <...
<p>I liked the mouseover/out best since I actually already needed to swap the image anyhow. I really should have thought of doing this with javascript to begin with.</p> <p>Thanks for the quick answers.</p> <p>@Joseph</p> <p>Thanks for that link. I had never heard of this technique before and really like the idea....
5,721
<p>I'm getting this problem:</p> <pre><code>PHP Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for chris.mahan@gmail.com in c:\inetpub\wwwroot\mailtest.php on line 12 </code></pre> <p>from this script:</p> <pre><code>&lt;?php $to = "chris.mahan@gmail.com"; $subject = "test"; $body ...
<p>Try removing the IP restrictions for Relaying in the SMTP server, and opening it up to all relays. If it works when this is set, then you know that the problem has to do with the original restrictions. In this case, it may be a DNS issue, or perhaps you had the wrong IP address listed.</p>
<p>@Espo: I'll do that re KB153119. Thanks.</p> <p>About the mail server: I hear you. </p> <p>I'll update when I uncover more.</p>
5,991
<p>Let me start by saying that I do not advocate this approach, but I saw it recently and I was wondering if there was a name for it I could use to point the guilty party to. So here goes.</p> <p>Now you have a method, and you want to return a value. You <em>also</em> want to return an error code. Of course, except...
<p>I'd agree that this isn't specifically an antipattern. It might be a smell depending upon the usage. There are reasons why one would actually not want to use exceptions (e.g. the errors being returned are not 'exceptional', for starters).</p> <p>There are instances where you want to have a service return a common...
<p>In defense of the anti-pattern designation, this code lends itself to being used in a few ways:</p> <ol> <li>Object x = MyFunction().payload; <em>(ignoring the return result - very bad)</em> </li> <li>int code = MyFunction().result; <em>(throwing away the payload - may be okay if that's the intended use.)</em> <...
9,831
<p>As the title mentions, I have a timeout callback handler on an ajax call, and I want to be able to test that condition but nothing is coming to mind immediately on ways I can force my application to hit that state, any suggestions?</p>
<p>First off, I think you need to be clearer in your question - what technology are you using and where is this process that is timing out - server-side or client-side?</p> <p>If you want to have the server-side code take a long time and you are using .NET, place this line in the method you call server-side:</p> <pre...
<p><a href="http://developer.yahoo.com/yui/connection/" rel="nofollow noreferrer">YUI Connection Manager</a> allows you to introduce slowdown in your Javascript to test AJAX against latency.</p>
4,312
<p>Okay, here is the 411 - I have the following event handler in my Global.asax.cs file:</p> <pre><code>private void Global_PostRequestHandlerExecute(object sender, EventArgs e) { if (/* logic that determines that this is an ajax call */) { // we want to set a cookie Response.Cookies.Add(new HttpCook...
<p>you have to delete your cookie at the same path where you created it. so create your cookie with path=/ and delte it with path=/ as well..</p>
<p>Are we sure there's no code that sets the Cookie to HttpOnly (we're not missing anything above)? The HttpOnly property will stop (modern) browsers from modifying the cookie. I'd be interested to see if you can kill it server side like Rob suggests.</p>
7,970
<p>At the company I work for we have a "Utility" project that is referenced by pretty much ever application we build. It's got lots of things like NullHelpers, ConfigSettingHelpers, Common ExtensionMethods etc.</p> <p>The way we work is that when we want to make a new project, we get the latest version of the project ...
<p>That's exactly what we're doing. We have a Utility project which has some non project specific useful functions. We increase the version manually (minor), build the project in Release version, sign it and put it to a shared location.</p> <p>People then use the specific version of the <em>library</em>.</p> <p>If so...
<p>I've had the <em>EXACT</em> same issue!</p> <p>I used to use project references, but it all seems to go bad, when as you say, you have many projects referencing it.</p> <p>I now compile to a DLL, and set the CopyLocal property for the DLL reference to false after the first build (otherwise I find it can override s...
6,268
<p>As stated in the title, i'm looking for an XML schema (XSD-file) for the Glade markup language?</p> <p>Wikipedia states that <strong>Glade</strong> is a schema based markup language (<a href="http://en.wikipedia.org/wiki/List_of_XML_Schemas#Graphical_User_Interfaces" rel="nofollow noreferrer">list of schemas at wik...
<p>There's nothing that will explicitly tie down the glade to an particular schema since it's all run-time based.</p> <p>You may find the .defs files generated by PyGTK useful. If you really need an XSD file, you should be able to create one from these files.</p> <p><a href="http://svn.gnome.org/viewvc/pygtk/trunk/g...
<p>Thx, this is a first start. I assume there is no document that is more explicit that this DTD? This DTD only specyfies what (global) tags can be used. Especially for the tag &lt;widget&gt; i would like a have constraints on the attribute "class" (as supported by XSD). The XSD should cover that there are only certain...
9,061
<p>I have an SSIS package that exports data to a couple of Excel files for transfer to a third party. To get this to run as a scheduled job on a 64-bit server I understand that I need to set the step as a CmdExec type and call the 32-bit version of DTExec. But I don't seem to be able to get the command right to pass in...
<p>This step-by-step example is for others who might stumble upon this question. This example uses <em>SSIS 2005</em> and uses <em>SQL Server 2005 64-bit edition server</em> to run the job.</p> <p>The answer here concentrates only on fixing the error message mentioned in the question. The example will demonstrate the ...
<p>I kinda did what Dr Zim did but I copied the DTExec file <code>C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe</code> to <code>C:\Program Files\Microsoft SQL Server\90\DTS\Binn\</code> folder but named the 32 bit one to DTExec32.exe</p> <p>then I was able to run my SSIS script through a stored pr...
4,160
<p>Why is it that if I execute a gcode command that causes the stepper motor to turn in reverse (any negative move on the X axis), after the step it will emit a high pitched whine until it gets another command to rotate in its forward direction?</p> <p>Executing multiple reverse commands will cause the tone to vary in...
<p>When idle, the stepper is stationary, no rotation.</p> <p>Normal standard electric motors will start spinning as soon as you apply power to them. However, steppers only rotate when a magnetic field is applied<sup>1)</sup>:</p> <blockquote> <p>Stepper motors effectively have multiple &quot;toothed&quot; electromagnet...
<p>this is normalISH for stepper motors. they have a fair ammount of current pulsing through them at relatively high frequencies, coils and other parts that will vibrate. if it quite loud you can look into the boards that drive them, depending on your printer they are replaceable, and better 'drivers' send cleaner sign...
1,138
<p>How do you schedule a Windows Mobile application to periodically start up to perform some background processing. For example, assume I'm writing an email client and want to check for email every hour, regardless of whether my app is running at the time.</p> <p>The app is a native C/C++ app on Windows Mobile 5.0 or...
<p>the function you need is:</p> <p><code>CeRunAppAtTime( appname, time )</code></p> <p>that isn't the exact signature, there is also <code>CeRunAppAtEvent</code>, they should both be in the MSDN docs (but linking is useless the way MSDN urls always change)</p> <p>The normal way to use these (and <code>RunAppAtTime<...
<p>Use CeSetUserNotificationEx instead of CeRunAppAtTime (as this is deprecated).</p>
7,088