instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>Is it possible to use .htaccess to process all six digit URLs by sending them to a script, but handle every other invalid URL as an error 404?</p> <p>For example:</p> <pre><code>http://mywebsite.com/132483 </code></pre> <p>would be sent to:</p> <pre><code>http://mywebsite.com/scriptname.php?no=132483 </code></pr...
<p>In your htaccess file, put the following</p> <pre><code>RewriteEngine On RewriteRule ^([0-9]{6})$ /scriptname.php?no=$1 [L] </code></pre> <p>The first line turns the mod_rewrite engine on. The () brackets put the contents into $1 - successive () would populate $2, $3... and so on. The [0-9]{6} says look for a stri...
<p>Yes it's possible with mod_rewrite. There are tons of good mod_rewrite tutorials online a quick Google search should turn up your answer in no time. </p> <p>Basically what you're going to want to do is ensure that the regular expression you use is just looking for digits and no other characters and to ensure the ...
9,881
<p>I have a few issues with the blue tape, which I'm trying out for the first time.</p> <p>The tape seems to warp, bubble and lift from the aluminum plate when it heats and cools and during printing. I put some clips on it, but not sure if this is standard.</p> <p>It also seems the print is lifting off the tape itsel...
<p>My Dad uses prittstick on the bed before the print and the bed keeps the prittstick just abbout the right temp for it to stick.</p> <p><a href="https://i.stack.imgur.com/23Uem.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/23Uem.jpg" alt="Me Gluing his print bed (No Need FOr tape)"></a></p>
<p>The absolute best way to solve sticking problem is Overture build surface. I could not get anything to stick. Got a free build sheet when I bought some filament from them. What a difference, everything sticks now, just clean with alcohol between uses.</p>
1,158
<p>Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6?</p> <p>I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S.</p> <p>So I was wondering on how you best build applications in ASP.NET MVC and make it easily avail...
<p>It took me a bit, but I figured out how to make the extensions work with IIS 6. First, you need to rework the base routing to include .aspx so that they will be routed through the ASP.NET ISAPI filter.</p> <pre><code>routes.MapRoute( "Default", // Route name "{c...
<p>I have a detailed step by step guide, but it requires that you use isapi_rewrite. View it at: <a href="http://biasecurities.com/blog/2008/how-to-enable-pretty-urls-with-asp-net-mvc-and-iis6/" rel="nofollow noreferrer">http://biasecurities.com/blog/2008/how-to-enable-pretty-urls-with-asp-net-mvc-and-iis6/</a></p>
5,438
<p>The MSDN documentation on <a href="http://msdn.microsoft.com/en-us/library/system.object.gethashcode.aspx" rel="noreferrer">Object.GetHashCode()</a> describes 3 contradicting rules for how the method should work. </p> <ol> <li>If two objects of the same type represent the same value, the hash function must return ...
<blockquote> <p>Rules 1 &amp; 3 are contradictory to me.</p> </blockquote> <p>To a certain extent, they are. The reason is simple: if an object is stored in a hash table and, by changing its value, you change its hash then the hash table has lost the value and you can't find it again by querying the hash table. It i...
<p>By default it does it based on the reference to the object, but that means that it's the exact same object, so both would return the same hash. But a hash should be based on the value, like in the case of the string class. "a" and "b" would have a different hash, but "a" and "a" would return the same hash.</p>
5,475
<p>I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I modify the startup project, which means ...
<p>Why not just add a dependency to the "startup" project for each of the plugins? This will force the project to be rebuilt if any of the others change, and you won't have to mess with any other pre/post-build events.</p>
<p>Starting from @lomaxx suggestion, I got a very similar setup working by adding the following line at the <em>end</em> of the <em>post-build</em> event of the startup project:</p> <pre><code>"$(DevEnvDir)devenv.exe" "$(ProjectPath)" /clean </code></pre> <p>Note that this makes the startup project build the <em>next...
3,644
<p>I was thinking about <a href="https://lifehacks.stackexchange.com/questions/24627/how-to-paint-a-circle-pattern-on-a-big-piece-of-paper">this question</a> and thought of maybe printing a pattern-drawing roller painter.</p> <p>The question is: is it possible to print with an ink absorbing material that could make a p...
<p>While printing a <em>roller stamp</em> or rubber-roll from a flexible material such as <a href="https://all3dp.com/2/tpe-vs-tpu-flexible-filament-the-differences/" rel="nofollow noreferrer">[hard]TPU, [softer] TPE</a>, or even a [super soft] foaming flexible filament is certainly possible. In any case, this would cr...
<p>I'm relatively new to 3D printing, but I know some stuff. If you really wanted to print a paint roller with a pattern, I would actually go with nylon or TPR. TPE is okay, but I find that it is less cushy. I would highly suggest buying your own printer for this project. It would be much more cost effective in not onl...
1,907
<p>Is this even a valid question? I have a .NET Windows app that is using MSTDC and it is throwing an exception:</p> <blockquote> <p>System.Transactions.TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in th...
<p>Use this for windows Server 2008 r2 and Windows Server 2012 R2</p> <ol> <li><p>Click <strong>Start</strong>, click <strong>Run</strong>, type <strong>dcomcnfg</strong> and then click <strong>OK</strong> to open <strong>Component Services</strong>.</p></li> <li><p>In the console tree, click to expand <strong>Compone...
<p>MSDTC can be configured with MsDtc PowerShell module, e.g.:</p> <pre><code># Import the module Import-Module -Name MsDtc # Set the DTC config $dtcNetworkSetting = @{ DtcName = 'Local' AuthenticationLevel = 'NoAuth' InboundTransactionsEnabled = $true Out...
2,930
<p>Are all of these equal? Under what circumstances should I choose each over the others?</p> <ul> <li><p>var.ToString()</p></li> <li><p>CStr(var)</p></li> <li><p>CType(var, String)</p></li> <li><p>DirectCast(var, String)</p></li> </ul> <hr> <p><em>EDIT: Suggestion from <strong><a href="https://stackoverflow.com/us...
<p>Those are all slightly different, and generally have an acceptable usage.</p> <ul> <li><code>var.</code><a href="http://msdn.microsoft.com/en-us/library/system.object.tostring.aspx" rel="noreferrer"><code>ToString</code></a><code>()</code> is going to give you the string representation of an object, regardless of w...
<p>At one time, I remember seeing the MSDN library state to use CStr() because it was faster. I do not know if this is true though.</p>
6,203
<p>If you've used Oracle, you've probably gotten the helpful message "ORA-00942: Table or view does not exist". Is there a legitimate technical reason the message doesn't include the name of the missing object? </p> <p>Arguments about this being due to security sound like they were crafted by the TSA. If I'm an attack...
<p>You can set an EVENT in your parameter file (plain text or spfile) to force Oracle to dump a detailed trace file in the user_dump_dest, the object name might be in there, if not the SQL should be.</p> <p>EVENT="942 trace name errorstack level 12"</p> <p>If you are using a plain text file you need to keep all your ...
<p>@Matthew</p> <p>Your query's a start, but it might not work when you have multiple schemas. For example, if I log into our instance as myself, I have read access to all our tables. But if I don't qualify the table name with the schema I'll get an ORA-00942 for tables without synonyms:</p> <pre> SQL> select * fro...
6,850
<p>I managed to tear my build plate trying to get some very stubborn plastic off it.</p> <p><a href="https://i.stack.imgur.com/fDqad.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fDqad.jpg" alt="Torn build plate"></a></p> <p>I'll need to buy a new one, what characteristics are important for me to...
<p>If your printer's heated bed still works, but the sticker has been ripped in some places:</p> <ul> <li>You can try and remove the rest of the sticker, clean the metal plate under the sticker (perhaps with isopropyl alcohol) and then apply a new sticker once there is no adhesive remaining on the heated bed.</li> <li...
<p>I would say put a glass bed on it and you won't have to worry about tearing it ever again. Many places which sell picture frames can cut out a piece of 3&nbsp;mm glass for very little (like 1-2 dollars). I've had a normal 3&nbsp;mm glass bed (no expensive "heat glass" or anything) that's worked fine for 2 years of p...
1,162
<p>Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in an effort to make dealing with that particular kettle of fish easier.</p> <p>Is there anything you folks have used that has a similar concept applied to CSS? Something that does a bunch of cross-browser magic for you, supports l...
<p>What I found works best is to really learn CSS. I mean <strong>really</strong> learn CSS.</p> <p>It can be a confusing language to learn, but if you read enough about it and practice, eventually you'll learn the best way to do things.</p> <p>The key is to do it enough that it comes natural. CSS can be very elegant...
<p>CSS takes a bit of time to learn, but the thing I initially found most discouraging was the fact that so many hacks were needed to get all browsers to behave the same way. Learning a system which doesn't adhere to logic seems dumb... but I've clung to the vague belief that there is logic behind each browser's idios...
4,507
<p>I have an ASP.Net 2.0 application in which the Session_Start event is not firing in my Global.asax file. Can anyone tell why this is happening and how I can get it working?</p> <p>The application worked fine on my Windows XP development machine, but stopped working when deployed to the server (Win Server 2003/IIS 6...
<p>Is the site precompiled before adding global.asax? Try compiling it again.</p>
<p>Are you sure the website in IIS is set to use ASP.NET 2.0 rather than 1.1?</p>
9,719
<p>I want to scrape some information off a football (soccer) web page using simple python regexp's. The problem is that players such as the first chap, ÄÄRITALO, comes out as &amp;#196;&amp;#196;RITALO!<br> That is, html uses escaped markup for the special characters, such as &amp;#196;</p> <p>Is there a simple way o...
<p>I would recommend <a href="http://www.crummy.com/software/BeautifulSoup/" rel="nofollow noreferrer">BeautifulSoup</a> for HTML scraping. You also need to tell it to convert HTML entities to the corresponding Unicode characters, like so:</p> <pre><code>&gt;&gt;&gt; from BeautifulSoup import BeautifulSoup &gt;&gt...
<p>I haven't tried it myself, but have you tried</p> <p><a href="http://zesty.ca/python/scrape.html" rel="nofollow noreferrer">http://zesty.ca/python/scrape.html</a> ?</p> <p>It seems to have a method htmldecode(text) which would do what you want.</p>
7,665
<p>Last year, Scott Guthrie <a href="http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx" rel="noreferrer">stated</a> “You can actually override the raw SQL that LINQ to SQL uses if you want absolute control over the SQL executed”, but I can’t find documentation describing an extensibili...
<p>The ability to change the underlying provider and thus modify the SQL did not make the final cut in LINQ to SQL.</p>
<p><code>DataContext x = new DataContext</code></p> <p>Something like this perhaps?</p> <p><code>var a = x.Where().with()</code>...etc </p> <p>It lets you have a much finer control over the SQL.</p>
8,849
<p>Here is a sample code to retrieve data from a database using the yield keyword that I found in a few place while googling around :</p> <pre><code>public IEnumerable&lt;object&gt; ExecuteSelect(string commandText) { using (IDbConnection connection = CreateConnection()) { using (IDbCommand cmd = Creat...
<p>The Iterator that the compiler synthesises implements <code>IDisposable</code>, which <code>foreach</code> calls when the <code>foreach</code> loop is exited.</p> <p>The Iterator's <code>Dispose()</code> method will clean up the <code>using</code> statements on early exit.</p> <p>As long as you use the iterator in...
<p>Judging from <a href="http://blogs.msdn.com/oldnewthing/archive/2008/08/12/8849519.aspx" rel="nofollow noreferrer">this technical explanation</a>, your code will not work as expected, but abort on the second item, because the connection was already closed when returning the first item.</p> <p>@Joel Gauvreau : Yes, ...
6,978
<p>Taken from the <a href="https://3dprinting.stackexchange.com/a/60/47">answer provided by @EricJohnson</a>,</p> <p>When should I use a raft, and when should I use a brim? What advantages does each have over the other?</p> <p>Raft <a href="https://i.stack.imgur.com/rOghM.jpg" rel="noreferrer"><img src="https://i.sta...
<p>A raft will allow for better adhesion for the whole print as the raft attaches to the printing surface and the print attaches to the raft. Rafts go all the way under the print and consist of multiple layers, whereas a brim is only 1 layer and on the outside of the print. Rafts are normally harder to remove than brim...
<p>I have been favoring brims recently; I am tired of the rafts becoming an integral part of my print, impossible to remove.</p>
103
<p>I want to build a bot that asks someone a few simple questions and branches based on the answer. I realize parsing meaning from the human responses will be challenging, but how do you setup the program to deal with the "state" of the conversation?</p> <p>It will be a one-to-one conversation between a human and the...
<p>You probably want to look into <a href="http://en.wikipedia.org/wiki/Markov_chain" rel="noreferrer">Markov Chains</a> as the basics for the bot AI. I wrote something a long time ago (the code to which I'm not proud of at all, and needs some mods to run on Python > 1.5) that may be a useful starting place for you: ...
<p>I would suggest looking at Bayesian probabilities. Then just monitor the chat room for a period of time to create your probability tree.</p>
7,874
<p>I'll soon be posting an article on <a href="http://theschmitzer.blogspot.com" rel="nofollow noreferrer">my blog</a>, but I'd like to verify I haven't missed anything first.</p> <p>Find an example I've missed, and I'll cite you on my post.</p> <p>The topic is failed Singleton implementations: In what cases can you ...
<p>If you use a static instance field that you initialize in your cpp file, you can get multiple instances (and even worse behavior) if the initialization of some static/global tries to get an instance of your singleton. This is because the order of static initialization across compilation units is undefined.</p>
<p>Inheritance shouldn't be an issue as long as the ctor is private.</p> <p>However, if you don't disallow the copy constructor, users may [un]intentionally copy the singleton instance. Privately inheriting from <a href="http://www.boost.org/doc/libs/1_36_0/libs/utility/utility.htm" rel="nofollow noreferrer">boost::n...
8,520
<p>I'm trying to setup CruiseControl.net webdashboard at the moment. So far it works nice, but I have a problem with the NAnt Build Timing Report.</p> <p>Firstly, my current <code>ccnet.config</code> file looks something like this:</p> <pre><code>&lt;project name="bla"&gt; ... &lt;prebuild&gt; &lt;nant .../&gt; &lt;...
<p>Apparently this can be solved by selecting only the first <code>&lt;buildresults&gt;</code> node in webdashboard's NAntTiming.xsl. Because each duplicate summary contains the same info this change in <code>&lt;div id="NAntTimingReport"&gt;</code> section seems to be sufficient:</p> <pre><code>&lt;xsl:variable name=...
<p>Not a direct answer to your question, but you might want to check out Hudson. It has the benefit of being much easier to configure than CruiseControl. There's a bit about using it for NAnt <a href="http://hudson.gotdns.com/wiki/display/HUDSON/NAnt+Plugin" rel="nofollow noreferrer">here</a>.</p>
4,548
<p>What is the difference between the following types of endianness?</p> <ul> <li>byte (8b) invariant big and little endianness</li> <li>half-word (16b) invariant big and little endianness</li> <li>word (32b) invariant big and little endianness</li> <li>double-word (64b) invariant big and little endianness</li> </ul> ...
<p>There are two approaches to endian mapping: <em>address invariance</em> and <em>data invariance</em>.</p> <h2>Address Invariance</h2> <p>In this type of mapping, the address of bytes is always preserved between big and little. This has the side effect of reversing the order of significance (most significant to lea...
<p>the basic concept is the ordering of bits:</p> <pre><code>1010 0011 </code></pre> <p>in little-endian is the same as</p> <pre><code>0011 1010 </code></pre> <p>in big-endian (and vice-versa).</p> <p>You'll notice the order changes by grouping, not by individual bit. I don't know of a system, for example, where<...
4,161
<p>A Visual Studio 2008 project in one solution needs to reference a WCF service in another VS 2008 solution on the same development machine. Does anybody have any suggestions on how best to accomplish this?</p>
<p>You could do a redirect to buy.php after saving to the session object, which then does a server redirect to check.php, it would mean when the user clicks back, they're going back to the GET request not the POST request</p>
<p>Yes - I agree with above. I ALWAYS do a <code>redir</code> away from the last post, so clicking back bounces them back without that error OR re-submissions. it also avoids complications. u can always tag the <code>redir</code> link page with a <code>?m</code> or <code>&amp;m</code> (i.e.: <code>page.php?m</code>) an...
7,963
<p>How can I use .NET DataSet.Select method to search records that match a DateTime? What format should I use to enter my dates in?</p>
<p>The best method is dd MMM yyyy (ie 15 Sep 2008). This means there is no possiblity of getting it wrong for different Locals.</p> <pre><code>ds.select(DBDate = '15 Sep 2008') </code></pre> <p>You can use the DateFormat function to convert to long date format as well and this will work fine too.</p>
<p>I use the following for the SQL Select:</p> <pre><code> public string BuildSQL() { // Format: CAST('2000-05-08 12:35:29' AS datetime) StringBuilder sb = new StringBuilder("CAST('"); sb.Append(_dateTime.ToString("yyyy-MM-dd HH:mm:ss")); sb.Append("' AS datetime)"); re...
9,322
<p>Looking for feedback on :</p> <p><a href="http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools" rel="nofollow noreferrer">http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools</a></p>
<p>There's a <a href="http://web.archive.org/web/20090227051320/http://xtalk.msk.su:80/%7Eott/en/writings/prog-checking/GooglePT.html" rel="nofollow noreferrer">pretty good post</a> that I read a while back that outlines some testing and analysis of GPT in a variety of scenarios</p>
<p>I use GPT at work since 2007, and I totally satisfied. I use it to monitor and optimize a Linux network library, and I have obtained a significant results.</p> <p>The main flaw of GPT is the lack of precision. Due to the design, you only got the main time consuming functions, but this is often what you need when yo...
2,864
<p>Let's take a web development environment, where developers checkout a project onto their local machines, work on it, and check in changes to development.<br> These changes are further tested on development and moved live on a regular schedule (eg weekly, monthly, etc.).<br> Is it possible to have an auto-moveup of t...
<p>Certainly, but the exact product may be dependent upon the VCS you are using.</p> <p>What you might want to do, is have a a few different branches, and migrate up as you progress. E.g., Development -> Stable-Dev -> Beta -> Production. You can then simply auto-update to the latest version of Stable-Dev and Beta for ...
<p>I doubt many VCSs provide this ability directly, however it should be very simple to script. Either a date or branch based checkout.</p>
3,544
<p>Are there any good programs for dealing with reading large CSV files? Some of the datafiles I deal with are in the 1 GB range. They have too many lines for Excel to even deal with. Using Access can be a little slow, as you have to actually import them into a database to work with them directly. Is there a program ...
<p>MySQL can import CSV files very quickly onto tables using the <a href="http://dev.mysql.com/doc/refman/5.0/en/load-data.html" rel="noreferrer"><code>LOAD DATA INFILE</code></a> command. It can also read from CSV files directly, bypassing any import procedures, by using the <a href="http://dev.mysql.com/doc/refman/5....
<p>vEdit is great but don't forget you can always go back to "basics" check out <a href="http://www.cygwin.com/" rel="nofollow noreferrer">Cygwin</a> and start greping.</p> <p>Helpfull commands</p> <ul> <li>grep </li> <li>head</li> <li>tail</li> <li>of course perl!</li> </ul>
6,602
<p>I have been experimenting with <a href="http://www.woopra.com/" rel="nofollow noreferrer">woopra.com</a> A web analytics tool. Which requires a piece of javascript code to be added to each page to function. This is easy enough with more dynamic sites with universal headers or footers but not for totally static html ...
<p>I think that <a href="http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html" rel="nofollow noreferrer">mod_filter_ext</a> is the module you are looking for. You can write a short Perl script for example to insert the JS code in the pages and register it to process HTML pages:</p> <pre><code>while (&lt;&gt;) { ...
<p>ok the method above's biggest problem is it would break your html validity by placing a script tag outside the <code>&lt;html&gt;</code> tags</p> <p>i'd agree with the others on a pre-process run over your html files such as a sed/awk script</p> <p>heres a quick example {assuming the script part can be added befor...
6,136
<p>Looking for a way to display a PDF in Flex. I'm sure there are several ways. Looking for the easiest to maintain / integrate / most user friendly. I'm guessing it's possible to display a browser window in the app and render it, but if it goes off of IE / FireFox it's not acceptable for this project.</p> <p>Thanks.....
<p>This looks like a nice PDF viewer for flex <a href="http://www.devaldi.com/?p=212" rel="nofollow noreferrer">http://www.devaldi.com/?p=212</a></p>
<p>Oh sweet, this is an air app. I'll go with the HTML view. I can't convert them to SWF because the client will be uploading the files.</p>
5,096
<p>I am currently in the process of creating my own blog and I have got to marking up the comments, but what is the best way to mark it up?</p> <p>The information I need to present is:</p> <ol> <li>Persons Name</li> <li>Gravatar Icon</li> <li>Comment Date</li> <li>The Comment</li> </ol> <p><em>PS: I'm only interested i...
<p>I think that your version with the cite, blockquote, etc. would definitely work, but if semantics is your main concern then I personally wouldn't use cite and blockquote as they have specific things that they are supposed to represent.</p> <p>The blockquote tag is meant to represent a quotation taken from another so...
<p>I don't know that there's markup that would necessarily represent the comment structure well without using <em>divs</em> or classes as well, but you could use definition lists. You can use multiple <em>dt</em> and <em>dd</em> tags in the context of a definition list - see <em><a href="http://www.w3.org/TR/html401/st...
2,720
<p>It seems like drag and drop upload widgets disappeared from the face of Web 2.0. The last one of these I remember using was an activex widget, and inability of using it in anything other than IE doomed it. Have you used or seen one of these recently?</p>
<p>The <a href="http://dojotoolkit.org/" rel="nofollow noreferrer">Dojo Toolkit</a> JavaScript library supports some drag &amp; drop functionality that I've seen work in IE6+ and FF2+. The nice thing about Dojo and other JS libraries is that they abstract away all of the browser detection stuff.</p> <p>I'm sure other ...
<p><a href="http://widgets.yahoo.com/widgets/ftp-drop" rel="nofollow noreferrer">FTP Drop</a> for Yahoo Widgets allows you to drag files over the widget and the file will be sent to the defined ftp server.</p>
2,772
<p>I am fairly new to Emacs and I have been trying to figure out how to change the default folder for <kbd>C-x C-f</kbd> on start-up. For instance when I first load Emacs and hit <kbd>C-x C-f</kbd> its default folder is <code>C:\emacs\emacs-21.3\bin</code>, but I would rather it be the desktop. I believe there is some ...
<p>You didn't say so, but it sounds like you're starting Emacs from a Windows shortcut.</p> <p>The directory that you see with c-x c-f is the cwd, in Emacs terms, the <code>default-directory</code> (a variable).</p> <p>When you start Emacs using an MS Windows shortcut, the <code>default-directory</code> is initially ...
<p>In Windows 8, it works to create a shortcut in the Desktop and change the property 'Start In:' for the shortcut. </p> <p>Now, I ran the program emacs-23.3\bin\addpm.exe as recommended, and the Windows-8 screen (that horrendous invention from Microsoft) it appeared an icon-link to Emacs. But there you have to change...
8,535
<p>I have a WebChartControl on my web page. When the chart was generated, an image is being produced and it was shown on the page. </p> <p>Is there a way to get and save this chart as an image output on runtime? </p>
<p>Sure. Ultimately the image comes from a URL of some sort. Do a view-source on the web page and see what that URL looks like. With a certain amount of reverse-engineering, usage of System.Web.UI.HtmlTextWriter, perhaps an HttpHandler, etc. you should be able to get what you want.</p>
<p>Use the ExportToImage method of the ChartControl object .. This is WinForm code, but the same concept should hold true for WebChartControl:</p> <pre><code> Dim chart As ChartControl = ChartControl1.Clone() chart.Size = New Size(800, 600) chart.ExportToImage("file.png", System.Drawing.Imaging.ImageFormat....
6,867
<p>I'm currently designing a RepRap 3D printer that will not have a heated bed. I have heard that it is possible to use a power brick with commercial printers lacking heatbeds. Is this possible with a RepRap printer using a RAMPS board?</p> <p>I'm referring specifically to the TronXY X1 power brick. I was wondering if...
<p><strong>Printing speed is dependent by the firmware and physical properties of your printer</strong>.</p> <p>Slicers typically compute the expected time by assuming the printer will execute <em>exactly</em> what it is instructed to do, but a printer is a real object, with mass and momentum, and stepper motors that ...
<p>I use a Anet A8 which has a system acceleration and jerk of 400 and 20 When i slice with Cura, then I use a gcode without acceleration control, because the printer does this by its own and a combination with the gcode acceleration/jerk control gets me some strange behavior (e.g. sometimes some ultra slow movement i...
875
<p>Can anyone suggest some good browser add-on tools/extensions to help with development? I have firebug installed in Firefox which is great for dealing with CSS, HTML and javascript; any other suggestions?</p> <p><a href="https://addons.mozilla.org/en-US/firefox/addon/1843" rel="nofollow noreferrer">Firebug</a></p>
<p>Firefox:</p> <ul> <li><a href="https://addons.mozilla.org/en-US/firefox/addon/1913" rel="nofollow noreferrer">Inspect This</a> if you use the DOM Inspector at all</li> <li><a href="https://addons.mozilla.org/en-US/firefox/addon/539" rel="nofollow noreferrer">Measure It</a> for telling you pixel distances (if you ne...
<p>Other than the excellent tools already mentioned, I find <a href="http://www.charlesproxy.com/" rel="nofollow noreferrer">Charles</a> to be extremely useful. Especially since I do alot of work with Flash Remoting which it handles excellently.</p> <blockquote> <p>Charles is an HTTP proxy / HTTP monitor / Reverse Prox...
3,817
<p>What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development.</p> <p>Our JavaScript code is roughly "namespaced" as:</p> <pre><code>var Client = { var1: '', var2: '', accounts: { /* 1...
<p>The approach that I've found works for me is having seperate JS files for each class (just as you would in Java, C# and others). Alternatively you can group your JS into application functional areas if that's easier for you to navigate.</p> <p>If you put all your JS files into one directory, you can have your serve...
<p>Read the code of other (good) javascript apps and see how they handle things. But I start out with a file per class. But once its ready for production, I would combine the files into one large file and minify.</p> <p>The only reason, I would not combine the files, is if I didn't need all the files on all the page...
3,620
<p>I need to figure out what div is visible out of four possible divs using jQuery. Only one of those div's will be visible at any given time.</p> <p>This is what I have that works so far:</p> <pre><code>$("#FeatureImage1:visible, #FeatureImage2:visible, #FeatureImage3:visible, #FeatureImage4:visible").attr("id"); <...
<p>Assign the same class to each div then:</p> <pre><code>$("div.myClass:visible").attr("id"); </code></pre>
<p>When applicable, it's better to use contextual selectors rather than add spurious classes. For instance, if the <code>&lt;div&gt;</code> elements are the only children of an element with <code>id="foo"</code>, then using <code>$("#foo &gt; div:visible").attr("id")</code> would better reflect the purpose of the code...
8,673
<p>The __doPostBack is not working in firefox 3 (have not checked 2). Everything is working great in IE 6&amp;7 and it even works in Chrome??</p> <p>It's a simple asp:LinkButton with an OnClick event</p> <pre><code>&lt;asp:LinkButton ID="DeleteAllPicturesLinkButton" Enabled="False" OnClientClick="javascript:return c...
<p>Check your User Agent string. This same thing happened to me one time and I realized it was because I was testing out some pages as "googlebot". The JavaScript that is generated depends on knowing what the user agent is.</p> <p>From <a href="http://support.mozilla.com/tiki-view_forum_thread.php?locale=tr&amp;commen...
<p>With or without the OnClientClick event it still doesn't work.</p> <p>The _doPostBack event is the auto generated javascript that .NET produces.</p> <pre><code>function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = e...
7,909
<p>I'm thinking of learning the <code>ASP.NET MVC</code> framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hierarchy?</p> <p>Example navigation path:</p> <p><strong>Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick</strong></p> <p>...
<p>Zack, if I understand right you want unlimited depth of the subcategories. No biggie, since MVC Preview 3 (I think 3 or 4) this has been solved.</p> <p>Just define a route like</p> <p>"{controller}/{action}/{*categoryPath}"</p> <p>for an url such as :</p> <p><a href="http://example.com/shop/products/household/ki...
<p>The MVC routing lets you define pretty much any structure you want, you just need to define what each of the pieces mean semantically. You can have bits that are "hard-coded", like "shop/products", and then define the rest as variable, "{category}/{subcategory}/{speciality}", etc.</p> <p>You can also define several...
3,571
<p>What is the best way to get hosting of an ASP.NET MVC application to work on IIS 5 (6 or 7). When I tried to publish my ASP.NET MVC application, all I seemed to get is 404 errors. I've done a bit of googleing and have found a couple of solutions, but neither seem super elegant, and I worry if they will be unusable o...
<p>Answer is <a href="http://forums.asp.net/p/1239943/2294813.aspx" rel="nofollow noreferrer">here</a></p> <blockquote> <p>If *.mvc extension is not registered to the hosting , it will give 404 exception. The working way of hosting MVC apps in that case is to modify global.asax routing caluse in the follow...
<p>Have you tried adding .aspx to the end of the controller name?</p> <p>It worked for Stack Overflow question <em><a href="https://stackoverflow.com/questions/32757/where-can-i-get-asp-mvc-hosting">Where can I get ASP.NET MVC hosting?</a></em>.</p>
8,206
<p>I am using an M3D printer and loaded an STL design with holes in the middle:</p> <p><a href="https://i.stack.imgur.com/UMD0V.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UMD0V.jpg" alt="Screenshot of STL design with holes in the middle"></a></p> <p>However, the output is an object without hol...
<p>Have you tried letting it print a few more layers? It is very common that printers use the first few layers to create a <strong>raft</strong>, which will make the model adhere better to the bed.</p> <p>I believe this illustration from Simplify3D <a href="https://www.simplify3d.com/support/articles/rafts-skirts-and-...
<p><strong>Case 1:</strong></p> <p>There may be an issue with the precision of the print nozzle, not being able to fully articulate the hole. That is to say, the printer is trying to print it with holes, but the material is filling in that area.</p> <p>Try increasing the size of the hole. Granted, it is not an exact ...
443
<p>It strikes me that Properties in C# should be use when trying to manipulate a field in the class. But when there's complex calculations or database involved, we should use a getter/setter.</p> <p>Is this correct?</p> <p>When do you use s/getter over properties?</p>
<p>The .NET design guidelines provide some answers to this question in the <a href="http://msdn.microsoft.com/en-us/library/bzwdh01d(VS.71).aspx#cpconpropertyusageguidelinesanchor1" rel="noreferrer">Properties vs. Methods</a> section.</p> <p>Basically, properties have the same semantics as a field. You shouldn't let ...
<p>Forget the Getter and Setter methods. Just use Properties. </p> <p>An interesting thing to mention is that Properties are ending up as Setter and/or Getter method(s) in the assembly. Setter and/or Getter become a Property just by a little bit of metadata. So in fact, properties = setter/getter methods.</p>
9,264
<p>A database that stores a lot of credit card information is an inevitable part of the system we have just completed. What I want though is ultimate security of the card numbers whereby we setup a mechanism to encrypt and decrypt but of ourselves cannot decrypt any given number. </p> <p>What I am after is a way to se...
<p>Unless you are a payment processor you don't really need to store any kind of CC information.</p> <p>Review your requirements, there really is not many cases where you need to store CC information</p>
<p>It would be helpful to know the DB server and language/platform types so we could get more specific, but I would be looking into <a href="http://en.wikipedia.org/wiki/SHA" rel="nofollow noreferrer">SHA</a>.</p>
8,374
<p>What is Windows' best I/O event notification facility? </p> <p>By best I mean something that ...</p> <ol> <li>doesn't have a limit on number of input file descriptors</li> <li>works on all file descriptors (disk files, sockets, ...)</li> <li>provides various notification modes (edge triggered, limit triggered)</li...
<p>In Windows, async operations are done by file operation, not by descriptor. There are several ways to wait on file operations to complete asynchronously.</p> <p>For example, if you want to know when data is available on a network socket, issue an async read request on the socket and when it completes, the data was ...
<p>select() function is POSIX and usable on windows including "winsock.h" or "winsock2.h". </p>
9,266
<p>Despite the documentation, NetworkStream.Write does not appear to wait until the data has been sent. Instead, it waits until the data has been copied to a buffer and then returns. That buffer is transmitted in the background.</p> <p>This is the code I have at the moment. Whether I use ns.Write or ns.BeginWrite does...
<p>I'm not a C# programmer, but the way you've asked this question is slightly misleading. The only way to know when your data has been "received", for any useful definition of "received", is to have a specific acknowledgment message in your protocol which indicates the data has been fully processed.</p> <p>The data ...
<p>Perhaps try setting <code>tcp.NoDelay = true</code></p>
9,332
<p>Rehsarper 4.0 - Renaming a class does not rename the file…<br> I probably set something on accident in the options, but I can't find it. Any ideas?</p>
<p>When I do a rename in Resharper there's a checkbox below the textbox where you type the new name that says "Synchronise file name with class name". Check that and the file is renamed too.</p> <p>Be sure you're using Resharper's rename (right-click/Refactor/Rename) rather than Visual Studio's (right-click/Rename), a...
<ol> <li>Go to the class name and click Ctrl+R+R</li> <li>Set the new name</li> <li>select the check box &quot;Also rename files to reflect this change.&quot;</li> </ol>
7,873
<p>I was surprised to find today that I couldn't track down any simple way to write the contents of an <code>InputStream</code> to an <code>OutputStream</code> in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code cleare...
<p>As WMR mentioned, <code>org.apache.commons.io.IOUtils</code> from Apache has a method called <a href="http://commons.apache.org/proper/commons-io/javadocs/api-2.4/org/apache/commons/io/IOUtils.html#copy(java.io.InputStream,%20java.io.OutputStream)" rel="noreferrer"><code>copy(InputStream,OutputStream)</code></a> whi...
<p>you can use this method</p> <pre><code>public static void copyStream(InputStream is, OutputStream os) { final int buffer_size=1024; try { byte[] bytes=new byte[buffer_size]; for(;;) { int count=is.read(bytes, 0, buffer_size); if(count==-1) ...
6,474
<p>When a controller renders a view based on a model you can get the properties from the ViewData collection using the indexer (ie. ViewData["Property"]). However, I have a shared user control that I tried to call using the following:</p> <pre><code>return View("Message", new { DisplayMessage = "This is a test" }); <...
<p>The method </p> <pre><code>ViewData.Eval("DisplayMessage") </code></pre> <p>should work for you.</p>
<p>Of course after I create this question I immediately find the answer after a few more searches on Google</p> <p><a href="http://forums.asp.net/t/1197059.aspx" rel="nofollow noreferrer">http://forums.asp.net/t/1197059.aspx</a></p> <p>Apparently this happens because of the wrapper class. Even so, it seems like any ...
3,934
<p>I recently got a KP3S Kingroon 3D printer and have been trying to set it up.</p> <p>After a couple of test prints, the Y-axis seems to only move in one direction. At first, I thought it was a motor issue, but when I go into the manual move directions for the Y-axis it seems that both inputs lead to the motor spinnin...
<p>The answer might just be replace the mother board.</p> <p>If I understood everything correctly there are 5 things to check to break down the problem:</p> <ul> <li>the motor,</li> <li>the cable,</li> <li>the stepper connection,</li> <li>the software input, and</li> <li>the firmware.</li> </ul> <p>Using Repetier I dis...
<p>The question body has changed to rule out broken endstops. As a generic answer for steppers only going into a single direction, if an axis of a 3D printer only moves in one direction it usually implies that the end stop of that axis is triggered. If triggered, the firmware doesn’t allow the stepper to move to the di...
2,083
<p>We are changing our remote log-in security process at my workplace, and we are concerned that the new system does not use <a href="http://en.wikipedia.org/wiki/Two-factor_authentication" rel="nofollow noreferrer">multi-factor authentication</a> as the old one did. (We had been using RSA key-fobs, but they are being ...
<p>I would say "no". I don't think you can really get the "something you have" part of multi-factor authentication without issuing something the end user can carry with them. If you "have" something, it implies it can be lost - not many users lose their entire desktop machines. The security of "something you have", aft...
<p>I agree with @freespace that the the image is not part of the multi-factor authentication for the user. As you state the image is part of the anti-phishing scheme. I think that the image is actually a weak authentication of the system to the user. The image provides authentication to the user that the website is ...
9,813
<p>I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example <a href="http://www.vim.org/tips/tip.php?tip_id=390" rel="noreferrer">here</a>) that basically check out the file you are...
<p>I've been working on a similar script here: <a href="http://github.com/ghewgill/vim-scmdiff" rel="nofollow noreferrer">http://github.com/ghewgill/vim-scmdiff</a> (in fact, they may have the same ancestry). I haven't used scmdiff with cvs, but it should do a diff against the branch you have checked out. You can also ...
<p>You could change the call to <code>cvs</code> to take branches into account. That shouldn't be to hard. It bit harder would to change the whole function and make the branch your working a variable (argument, session, global or otherwise).</p>
4,580
<p>The DOM method <code>getChildNodes()</code> returns a <code>NodeList</code> of the children of the current <code>Node</code>. Whilst a <code>NodeList</code> is ordered, is the list guaranteed to be in document order?</p> <p>For example, given <code>&lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;d/&gt;&lt;/a&gt;</code> is <code>a...
<p>In my experience, yes. The <a href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1451460987" rel="nofollow noreferrer">DOM spec</a> isn't any clearer. If you're paranoid, try something like</p> <pre><code>current = node.firstChild; while(null != current) { ... current = current.nextS...
<p>I'd love to tell you that this is guaranteed (as I believe it is) but the <a href="http://www.w3.org/DOM/" rel="nofollow noreferrer">Document Object Model specification</a> itself seems ambiguous in this case. I'm pretty sure that it's always document-order, though.</p>
9,171
<p>As I develop more with vim, I find myself wanting to copy in blocks of useful code, similar to "templates" in Eclipse. </p> <p>I was thinking of making a separate file for each code chunk and just reading them in with</p> <pre><code>:r code-fornext </code></pre> <p>but that just seems kind of primitive. Googling ...
<p>To record macros in Vim, in the command mode, hit the <code>q</code> key and another key you want to assign the macro to. For quick throw away macros I usually just hit <code>qq</code> and assign the macro to the <code>q</code> key. Once you are in recording mode, run through your key strokes. When you are done make...
<p>On vim.wikia, you will find a <a href="http://vim.wikia.com/wiki/Category:Automated_Text_Insertion" rel="nofollow noreferrer" title="Automated Text Insertion category">category of tips</a> dedicated to snippets and abbreviations expansion. You will also see a list of plugins that ease the definition of complex snipp...
7,801
<p>I have an STL file and I would like to know how many grams would this print consume. Is there a software so I can get it or an online link that can say me that?</p>
<p>You can not tell this by looking at the STL file alone, because how much material will be used depends on the print settings (obviously, printing at 100% infill will consume much more material than 10%).</p> <p>The best way to check the material usage is to load the model into a slicer and slice it using your prefe...
<p>This is a link I found that analyzes your G-code ( filament usage, time, etc.): <a href="http://gcode.ws/" rel="nofollow noreferrer">gCodeViewer</a></p> <p>From the description (emphasis is mine):</p> <blockquote> <ul> <li>Analyze GCode <ul> <li>Print time, <strong><em>amount of plastic used</em></stron...
548
<p>Using 3D printing I'd like to create a text oversized keycap that uses several strong LEDs to make the text light as red or green, depending on status. It's quite similar to what are called annunciators on aircraft:</p> <p><a href="https://i.stack.imgur.com/6B1lY.jpg" rel="noreferrer"><img src="https://i.stack.imgu...
<p>There are a few possible ways you could go about this:</p> <ol> <li>If you have a multi-material printer, you may be able to print with both a transparent or translucent material for the internal structure of the print and an opaque material for the external parts of the print. PET(G) may be suitable for this purpos...
<p>Cut the letters out of the key, so they print as holes all the way to the light source. Print in black.</p> <p>fill the holes with clear silicon caulk or leave empty.</p>
2,007
<p>Like the Delicious submission bookmark-let, I'd like to have some standard JavaScript I can use to submit any visited URL to a 3rd party site when that's possible by URL. Suggestions?</p> <p>For example, I've been using </p> <pre><code>javascript:void(location.href="http://www.yacktrack.com/home?query="+encodeURI...
<p>Do you want something exactly like the Delicious bookmarklet (as in, something the user actively clicks on to submit the URL)? If so, you could probably just copy their code and replace the target URL:</p> <pre><code>javascript:(function(){ location.href='http://example.com/your-script.php?url='+ encodeURIC...
<p>Another option would be to something like this:</p> <pre><code>&lt;form action="http://www.yacktrack.com/home" method="get" name="f"&gt; &lt;input type="hidden" name="query" /&gt; &lt;/form&gt; </code></pre> <p>then your javascript would be:</p> <pre><code>f.query.value=location.href; f.submit(); </code></pre> ...
7,805
<p>The <a href="http://en.wikipedia.org/wiki/Law_Of_Demeter" rel="noreferrer">wikipedia article</a> about <a href="http://c2.com/cgi/wiki?LawOfDemeter" rel="noreferrer">Law of Demeter</a> says:</p> <blockquote> <p>The law can be stated simply as "use only one dot".</p> </blockquote> <p>However a <a href="http://web...
<p>Well, the short definition of the law shortens it too much. The real "law" (in reality advice on good API design) basically says: Only access objects you created yourself, or were passed to you as an argument. Do not access objects indirectly through other objects. Methods of fluent interfaces often return the objec...
<p>There's no problem with your example. After all, you're rotating, watermarking, etc... always the same image. I believe you're talking to a Pipeline object all the while, so as long as your code only depends on the class of the Pipeline, you're not violating LoD.</p>
9,312
<p>I've tried two different methods of reusing code. I have a solution full of just class library projects with generic code that I reuse in almost every project I work on. When I get to work on a new project, I will reuse code from this code library in one of two ways:</p> <ol> <li>I have tried bringing the projects I...
<p>In short, what you are doing is right, you want to move the common code into a class library (DLL) and then reference that in any projects that require its logic.</p> <p>Where you are going wrong is that you are not <em>maintaining</em> it. If you need to make little &quot;tweaks&quot;, <a href="http://en.wikipedia....
<p>I like to write all of my generic classes as just that: generics. I keep them as application independent as possible, and try to keep them even type unaware. If I make a fancy Tree class, I'll use generics to create it as Tree&lt;T&gt; so that I can use any type I want with the class. If I need to use the Tree to ho...
5,511
<p>I've searched for this a little but I have not gotten a particularly straight answer. In C (and I guess C++), how do you determine what comes after the % when using <code>printf</code>?. For example:</p> <pre><code>double radius = 1.0; double area = 0.0; area = calculateArea( radius ); printf( "%10.1f %10.2\n",...
<p><a href="http://en.wikipedia.org/wiki/Printf#printf_format_placeholders" rel="noreferrer">http://en.wikipedia.org/wiki/Printf#printf_format_placeholders</a> is Wikipedia's reference for format placeholders in printf. <a href="http://www.cplusplus.com/reference/clibrary/cstdio/printf.html" rel="noreferrer">http://www...
<p>One issue that hasn't been raised by others is whether <strong>double</strong> is the same as a <strong>float</strong>. On some systems a different format specifier was needed for a double compared to a float. Not least because the parameters passed could be of different sizes. <PRE> %f - float %lf - double %g ...
3,860
<p>Over the last few months/years, I have shared a folder or two with numerous people on my domain. How do I easily revoke those shares to keep access to my system nice and tidy?</p>
<p>Using computer management (an MMC snap-in. See Control Panel Administrative tools) you can see a list of all folders that are shared. You could delete the shares or change the permissions on the share to only allow access for certain people or groups.</p>
<p>On Windows XP, go to:</p> <pre><code>Administrative Tools &gt; Computer Management &gt; System Tools &gt; Shared Folders &gt; Shares </code></pre> <p>This page lists all shares and lets you remove them easily, in one place.</p>
4,583
<p>In my limited experience with them executable requirements (i.e. specifying all requirements as broken automated tests) have proven to be amazingly successful. I've worked on one project in which we placed a heavy emphasis on creating high-level automated tests which exercised all the functionality of a given use c...
<p>The primary tool I've also used was FitNesse. I've used it at several companies, with very good results. We did have test cases numbering in the many thousands, and we had to be very disciplined in how we organized and used them.</p> <p>I've tried some other tools, including writing my own DSL (domain-specific lang...
<p>My experience is limited to personal projects and found much the same advantages you mentioned. I recommend <a href="http://metacpan.org/pod/Test::Simple::Tutorial" rel="nofollow noreferrer">http://metacpan.org/pod/Test::Simple::Tutorial</a> which was my inspiration for trying out testing-based development. The pe...
3,388
<p>I'm introducing Subversion into our web shop. I want to want the checked in files to be uploaded into the server via FTP (and as they get use to Subversion, via SFTP). The files are sent to a release candidate page for testing purposes. A script can be called to move the files into production.</p> <p>My question is...
<p>If you have shell access to your sever, and SVN installed on it (or the ability to install SVN), then your best bet may be just to bypass FTP entirely.</p> <p>How we deploy our apps is (simplified)</p> <ul> <li>Developers write code and check it into trunk</li> <li>Periodically, when trunk is stable, we will take ...
<p>I second Orion's idea. If you've got shell access to the server, it's actually extremely easy to use Subversion itself as the deployment tool. Just make sure you have some web server rules set up so that you don't accidentally expose the .svn directories.</p>
3,496
<p>I recently rebuilt my A8 printer to have a metal frame and replaced the board with a GT2560 reva+. I'm having problems with the temp readings from both my hotend and hotbed. Using marlin 1.1x and Its possible I have something configured incorrectly. I can get successful prints with good quality but sometimes I get t...
<p>I had a similar problem and there could be three reasons(if the connections are ok):</p> <ul> <li>thin wires to the hotend</li> <li>one of the MOSFETs was fried </li> <li>the termal sensor wasn't good enough insert into the hotend</li> </ul> <p>Try to measure the hotend heating element voltage while printing.</p>
<p>This really looks like a bad connection, so try with your old board to see if the broken connection is on the board, or it's the temp sensor or the wires.</p> <p>I had exactly this problem with a bad connection from the temp sensor.</p> <p>If you didn't break anything, it's the board that's fried / badly connected...
823
<p>I'd like to add a method to my existing server's CORBA interface. Will that require recompiling all clients?</p> <p>I'm using TAO.</p>
<p>Recompilation of clients is not required (and should not be, regardless of the ORB that you use). As Adam indicated, lookups are done by operation name (a straight text comparison).</p> <p>I've done what you're describing with our ACE/TAO-based system, and encountered no issues (servers were in ACE/TAO C++, clients...
<p>It depends on usage of new idl method. If Corba invocation is static(SII), meaning your client is linked with stub, you have to recompile a stub if you want to use your new added method interface. </p> <p>If corba invocation is dynamic(DII), there is no stub required for client. None of recompilation is required. ...
5,750
<p>Ok, so I demo'd Refactor Pro and Resharper, I'm more comfortable with Resharper so that's what I bought. When I uninstalled Refactor Pro I thought everything was breezy. However, now when I open Visual Studio I get </p> <p>The Add-in 'DevExpress Tools' failed to load or caused and exception, woudl you like to remov...
<p>I had the same issue with the VS.NET 2005 version and I'm not sure it is related. It was a registry problem and when i contacted the people from devexpress they send me a clean up tool. </p> <p>You can try to see if there is another clean up tool for 2008 or search in the registry for the file name and remove it ma...
<p>This page has instructions on how to manually remove a Visual Studio add-in:</p> <p><a href="http://www.mztools.com/articles/2006/mz2006018.aspx" rel="nofollow noreferrer">http://www.mztools.com/articles/2006/mz2006018.aspx</a></p>
6,768
<p>How do you shade alternating rows in a SQL Server Reporting Services report?</p> <hr> <p><strong>Edit:</strong> There are a bunch of good answers listed below--from <a href="https://stackoverflow.com/questions/44376/add-alternating-row-color-to-sql-server-reporting-services-report#44378">quick</a> and <a href="htt...
<p>Go to the table row's BackgroundColor property and choose "Expression..."</p> <p>Use this expression: </p> <pre><code>= IIf(RowNumber(Nothing) Mod 2 = 0, "Silver", "Transparent") </code></pre> <p>This trick can be applied to many areas of the report.</p> <p>And in .NET 3.5+ You could use:</p> <pre><code>= If(Ro...
<p>Just because none of the answers above seemed to work in my matrix, I'm posting this here:</p> <p><a href="http://reportingservicestnt.blogspot.com/2011/09/alternate-colors-in-matrixpivot-table.html" rel="nofollow">http://reportingservicestnt.blogspot.com/2011/09/alternate-colors-in-matrixpivot-table.html</a></p>
6,613
<p>I've been raised to believe that if multiple threads can access a variable, then all reads from and writes to that variable must be protected by synchronization code, such as a "lock" statement, because the processor might switch to another thread halfway through a write.</p> <p>However, I was looking through Syste...
<p>For the definitive answer go to the spec. :)</p> <p>Partition I, Section 12.6.6 of the CLI spec states: "A conforming CLI shall guarantee that read and write access to properly aligned memory locations no larger than the native word size is atomic when all the write accesses to a location are the same size."</p> <...
<p>Ack, nevermind... as pointed out, this is indeed incorrect. It doesn't prevent a second thread from entering the "initialize" code section. Bah.</p> <blockquote> <p>You could also decorate s_Initialized with the volatile keyword and forego the use of lock entirely.</p> </blockquote>
3,104
<p>In all the bigger prints I print on my Ender 5 with PETG I have problems with warping and raft detachment during printing. I have a glass bed and I'm using Ultimaker Cura 4.6.1 standard printing settings for PETG (Recently I had some success using 245 °C nozzle temperature and 80 °C build plate).</p> <p>Any ideas ho...
<p>Every print is somewhat affected by chamber temperature. On small prints, or prints with lower-temperature materials, the improvement is minor.</p> <p>However, large prints with higher-temperature materials (like PETG) really benefit from a heated chamber. This helps by keeping the entire build close to the glass tr...
<p>This sounds like a bed leveling issue. As reported by others, I get much less warping with PETG than with ABS or even PLA, and deal with too much adhesion with PETG rather than too little. With a Reprap x400, I printed a faceplate for the extruder to hold a electronic drop indicator. This gives me much higher pre...
1,732
<p>Can someome provide code or pseudo-code for how the paging links on StackOverflow are generated?</p> <p>I keep racking my brain but can't think of a decent way to build the dynamic links that always show the 2 pages around the current, plus the first and last.</p> <p>Example: <code>1 ... 5 6 7 ... 593</code></p>
<p>There are several other answers already, but I'd like to show you the approach I took to solve it: First, let's check out how Stack Overflow handles normal cases and edge cases. Each of my pages displays 10 results, so to find out what it does for 1 page, find a tag that has less than 11 entries: <a href="https://s...
<p>This is my approach to make a paging link. The following <strong><em>java code</em></strong> is just a pseudo.</p> <pre><code>package com.edde; /** * @author Yang Shuai */ public class Pager { /** * This is a method used to display the paging links(pagination or sometimes called pager). * The tota...
6,632
<p>I have a problem most likely very similar to some reported by other users: extruder stepper is visually skipping a step from time to time. It rapidly rotates in the direction opposite to the one it is supposed to rotate.</p> <p>I noticed the following:</p> <ul> <li>The extruder stepper jumps totally randomly - there...
<p>In agreement with what Akriss said, pretty much all &quot;super&quot; glue is CA (cyanoacrylate) glue, which is soluble in acetone. PLA itself is does not dissolve in or react with acetone, but the pigments, additives, etc. likely do, so you should wipe with a paper towel or cloth (the latter might be better to avoi...
<p>I've used Acetone before. However that said I've not had the need to remove it from PLA. Not sure how PLA reacts to Acetone.</p> <p>A link that may be of use. <a href="https://www.art-us.com/how-to-get-super-glue-off-almost-anything/" rel="nofollow noreferrer">https://www.art-us.com/how-to-get-super-glue-off-almost-...
1,800
<p>Can a LINQ enabled app run on a machine that only has the .NET 2.0 runtime installed?</p> <p>In theory, LINQ is nothing more than syntactic sugar, and the resulting IL code should look the same as it would have in .NET 2.0.</p> <p>How can I write LINQ without using the .NET 3.5 libraries? Will it run on .NET 2.0?<...
<p>There are some "Hacks" that involve using a System.Core.dll from the 3.5 Framework to make it run with .net 2.0, but personally I would not want use such a somewhat shaky foundation.</p> <p>See here: <a href="http://weblogs.asp.net/fmarguerie/archive/2007/09/05/linq-support-on-net-2-0.aspx" rel="noreferrer">LINQ su...
<p>No, because while you thought LINQ is really just syntactic sugar, it actually heavily used expression trees -- a feature absent in .NET 2.0.</p> <p>That being said .NET 3.5 only builds up on top of .NET 2.0, and that's the reason why the IL doesn't look "different" or "special".</p> <p>I do not see a reason why y...
2,433
<p>I need to add DVD writing functionality to an application I'm working on. However it needs to be able to write out files that are being grabbed "live" from a camera, over a long period of time. I can't wait until all the files are captured before I start writing them to the DVD, I need to write them out in chunks as...
<p>The <a href="http://www.primoburner.com/" rel="nofollow noreferrer">Primo burning engine</a> for .Net works nicely. </p>
<p>Format your optical media to a <a href="http://en.wikipedia.org/wiki/Live_File_System" rel="nofollow">Live File System</a> (<a href="http://en.wikipedia.org/wiki/Packet_writing" rel="nofollow">Incremental Packet Writing</a> instead of using a mastered disc format with IMAPIv2) and then you will be able to add any fi...
8,322
<p>Will a 3D scanner capture internal details within an enclosure?</p> <p>I'm contemplating buying a 3D scanner, but they're pretty expensive so I'm looking for advice on whether they will actually be useful for the projects I have in mind. So with the picture below as an example, could I expect to generate a usable ST...
<p>Yes these exist. 3D printers using pellets is not uncommon for industry, but for the user at home this might be a different question. Pellets are the pre-fabricate before it is extruded into filament (small balls/cylinders of plastic).</p> <p><a href="https://i.stack.imgur.com/0RIoy.png" rel="nofollow noreferrer"><i...
<p>You can certainly get large nozzles, but the material for extrusion still needs to be consistent. So any chunked plastic would have to be melted and that will produce an erratic flow at the extruder.</p> <p>By reforming your shredded plastic into a consistent string of filament, then the printer has a steady supply...
2,055
<p>I've run into a few gotchas when doing C# XML serialization that I thought I'd share:</p> <ul> <li>You can't serialize items that are read-only (like KeyValuePairs)</li> <li>You can't serialize a generic dictionary. Instead, try this wrapper class (from <a href="http://weblogs.asp.net/pwelter34/archive/2006/05/03/4...
<p>I can't make comments yet, so I will comment on Dr8k's post and make another observation. Private variables that are exposed as public getter/setter properties, and do get serialized/deserialized as such through those properties. We did it at my old job al the time.</p> <p>One thing to note though is that if you ...
<blockquote> <p>Private variables/properties are not serialized in XML serialization, but are in binary serialization.</p> </blockquote> <p>I believe this also gets you if you are exposing the private members through public properties - the private members don't get serialised so the public members are all refer...
9,349
<p>I have a custom action in a workflow and would like to report an error to the user when something goes wrong. What's the best way of doing that?</p> <p><strong>UPD:</strong> Ideally I would like to put the workflow in the error state and log a message to the workflow log. That doesn't seem possible. What's the c...
<p>when you throw the error your error handler can then email the user, or better if the list is massive, add the error state to the workflow item - i think this is default functionality though as the error would be mentioned there.</p> <p><a href="http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-deve...
<p>Add the error to a hidden list with that users name. Set the visibility on the list (for users) to only read/write their own values. Then use a custom web part or FlexListViewer to view the contents of that list and display it to the user. Once they acknowledge that error, remove it from the list.</p> <p>If necessa...
3,688
<p><a href="http://www.nevrona.com/" rel="nofollow noreferrer">Nevrona Designs'</a> <a href="http://www.nevrona.com/Products/RaveReports/StandardEdition/tabid/66/Default.aspx" rel="nofollow noreferrer">Rave Reports</a> is a Report Engine for use by <a href="http://www.embarcadero.com/" rel="nofollow noreferrer">Embarca...
<p>This is more of a work-around than a true solution. I first posted this work-around on the Nevrona newsgroup (Group=nevrona.public.rave.developer.delphi.rave; Subject="Are you suffering from the Rave Endless Loop bug?: Work-around announced."; Date=13/11/2006 7:06 PM)</p> <p>So here is my solution. It is more of a ...
<p>thank's a lot, this thread helps me out from my problem with endless printing loop in Nevrona Rave...., I set MinHeightLeft to 0,500, this setting is work but i'm not sure that it will work for anothers result set of my query report.</p>
9,439
<p>I am working at a client site where there is a proxy server (<code>HTTP</code>) in place. If I do a hard reset of the emulator it forgets network connection settings for the emulator and settings in the hosted Windows Mobile OS. If I 'save state and exit' it will lose all of these settings. I need to do hard resets ...
<p>This is explained in the Perl <a href="http://perldoc.perl.org/perlop.html#Conditional-Operator" rel="noreferrer">documentation</a>.</p> <p>Because of Perl operator precedence the statement is being parsed as</p> <pre><code>($condition ? $a= 2 : $a ) = 3 ; </code></pre> <p>Because the ?: operator produces an ass...
<p>One suggestion to Tithonium's answer above:</p> <p>If you are want to assign different values to the same variable, this might be better (the copy-book way): </p> <p>$a = ($condition) ? 2 : 3;</p>
3,048
<p>As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it reduced development costs. Few people use OOP in any rigorous sense (few people adhere to or understand principles such as...
<blockquote> <p>The real world isn't "OO", and the idea implicit in OO--that we can model things with some class taxonomy--seems to me very fundamentally flawed</p> </blockquote> <p>While this is true and has been observed by other people (take Stepanov, inventor of the STL), the rest is nonsense. OOP may be flawed ...
<p>OOP <em>has</em> reduced costs, and increased efficiency.</p> <p>When I made the jump from classic ASP/VBScript to C# I noticed a HUGE increase in productivity thanks to OOP.</p>
4,400
<p>After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new...
<p>All versions of the .Net Framework from 2.0 onwards (i.e. 3.0 and 3.5) use exactly the same core framework files (i.e. the CLR, you'll notice there are no directories relating to 3.0 or 3.5 in the C:\Windows\Microsoft.Net\Framework directory) therefore you shouldn't worry too much about any performance issues.</p> ...
<p>the target framework feature, you'll need to manually add a reference to System.Core.dll to utilise some of the latest features like Linq.</p>
5,001
<p>We have a SQL Server 2005 SP2 machine running a large number of databases, all of which contain full-text catalogs. Whenever we try to drop one of these databases or rebuild a full-text index, the drop or rebuild process hangs indefinitely with a MSSEARCH wait type. The process can’t be killed, and a server reboot i...
<p>Here's a suggestion. I don't have any corrupted databases but you can try this:</p> <pre><code>declare @t table (name nvarchar(128)) insert into @t select name from sys.databases --where is_fulltext_enabled while exists(SELECT * FROM @t) begin declare @name nvarchar(128) select @name = name from @t de...
<p>Have you tried running process monitor and when it hangs and see what the underlying error is? Using process moniter you should be able to tell whick file/resource it waiting for/erroring on. </p>
6,847
<p>I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects.</p> <pre><code>CorpObject o = new CorpObject(); Int32 result = o.DoSomethingLousy(); </code></...
<p>To confirm if you're using the provided PDB, CorporateComponent.pdb, during debugging within the Visual Studio IDE review the output window and locate the line indicating that the CorporateComponent.dll is loaded and followed by the string <code>Symbols loaded</code>.</p> <p>To illustrate from a project of mine:</p...
<p>The main I get from the pdb is line numbers and real method names for stack traces.</p>
7,584
<p>I'm using an older version of ASP.NET AJAX due to runtime limitations, Placing a ASP.NET Validator inside of an update panel does not work. Is there a trick to make these work, or do I need to use the ValidatorCallOut control that comes with the AJAX toolkit?</p>
<p>I suspect you are running the original release (RTM) of .NET 2.0.</p> <p>Until early 2007 validator controls were not compatible with UpdatePanels. This was resolved with the SP1 of the .NET Framework.</p> <p>The source of the problem is that UpdatePanel can detect markup changes in your page, but it has no way to...
<p>If for what ever reason you are unable to use the udpated version of the ASP.NET validator controls is actually very easy to validate a validation group yourself, all you need to do is call </p> <pre><code>Page_ClientValidate("validationGroupName"); </code></pre> <p>Then you can use the PageRequestManager execute ...
5,281
<p>Is there a simple way to drop a group of interrelated tables in SQL Server? Ideally I'd like to avoid having to worry about what order they're being dropped in since I know the entire group will be gone by the end of the process.</p>
<p>At the risk of sounding stupid, I don't believe SQL Server supports the delete / cascade syntax. I think you can configure a delete rule to do cascading deletes (<a href="http://msdn.microsoft.com/en-us/library/ms152507.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ms152507.aspx</a>), but a...
<p>I don't have access to SQL Server to test this, but how about:</p> <pre><code>DROP TABLE IF EXISTS table1, table2, table3 CASCADE; </code></pre>
2,905
<p>Have just started using Visual Studio Professional's built-in unit testing features, which as I understand, uses MS Test to run the tests.</p> <p>The .trx file that the tests produce is xml, but was wondering if there was an easy way to convert this file into a more "manager-friendly" format?</p> <p>My ultimate go...
<p>Since this file is XML you could and should use xsl to transform it to another format. The <em>IAmUnkown</em> - blog has an entry about <a href="http://preetsangha.blogspot.com/2008/05/decoding-ms-test-trx-file.html" rel="noreferrer">decoding/transforming the trx file into html</a>. </p> <p>You can also use <a href...
<p>Recently I wrote one trx to html convertor which is python based, have a look <a href="https://github.com/avinash8526/Murgi" rel="nofollow">https://github.com/avinash8526/Murgi</a></p>
4,342
<p>A mutex is a programming concept that is frequently used to solve multi-threading problems. My question to the community: </p> <p>What is a mutex and how do you use it?</p>
<p>When I am having a big heated discussion at work, I use a rubber chicken which I keep in my desk for just such occasions. The person holding the chicken is the only person who is allowed to talk. If you don't hold the chicken you cannot speak. You can only indicate that you want the chicken and wait until you get...
<p>Mutex: Mutex stands for <strong>Mut</strong>ual <strong>Ex</strong>clusion. It means only one process/thread can enter into critical section at a given time. In concurrent programming multiple threads/process updating the shared resource (any variable, shared memory etc.) may lead to some unexpected result. ( As the...
5,483
<p>I've been making a concerted effort to improve my javascript skills lately by reading as much javascript code as I can. In doing this I've sometimes seen the <code>javascript:</code> prefix appended to the front of event handler attributes in HTML element tags. What's the purpose of this prefix? Basically, is there ...
<p>Probably nothing in your example. My understanding is that <code>javascript:</code> is for anchor tags (in place of an actual <code>href</code>). You'd use it so that your script can execute when the user clicks the link, but without initiating a navigation back to the page (which a blank <code>href</code> coupled w...
<p>I don't know if the <code>javascript:</code> prefix means anything within the <code>onevent</code> attributes but I know they are annoying in anchor tags when trying to open the link in a new tab. The <code>href</code> should be used as a fall back and <strong>never</strong> to attach javascript to links.</p>
4,323
<p>I’m using a RepRap printer, PLA (Hatchbox 1.75&nbsp;mm), SketchUp, and Slic3r. The heated bed is covered with a blue polyester sticker. When I print small holes (1 to 1.5 mm radius), slicer software considers the holes outside edges for the first layer and prints them before the internal first layer. The problem is...
<p>are you using hairspray or tape to help with bed adhesion? If not that might help.</p> <p>Also try printing the first layer slower or try adjusting the bed level offset so you are squishing the first layer down a bit more.</p>
<p>You didn't say what type of bed you have, but I'm guessing glass. Do you have a BuildTak or comparable generic surface you could clip on and use? I've never had adhesion problems like this with my Ender 3, which came with a BuildTak clone; PLA just sticks, with no brim, no glue, no hairspray, etc.</p>
1,282
<p>In a discussion about motors with a friend who used to work in the robotics industry, he told me that he despised stepper motor systems, as every stepper based system he had worked on required a bunch of hacky software fixes to make the system perform to the required level.</p> <p>He said that servo motor based sys...
<p>You can get "stepper replacement" servo drives that supposedly put all the needed control in the drive, and accept ordinary stepper inputs. Those should make the servo-drive a "drop-in" option on anything that uses stepper drives.</p> <p>That said, I've seen an affordable CNC router system based on steppers turned ...
<p>I think using these technologies is possible, and may be better than stepper motors, but by using these you loose the main advantages of the steppers : the simplicity and the cost.</p> <p>When you use steppers, you assume your motors are strong enough to don't loose any step, and you "just" command them. Steppers a...
564
<p>Is there a way to make a TSQL variable constant?</p>
<p>No, but you can create a function and hardcode it in there and use that.</p> <p>Here is an example:</p> <pre><code>CREATE FUNCTION fnConstant() RETURNS INT AS BEGIN RETURN 2 END GO SELECT dbo.fnConstant() </code></pre>
<p>The best answer is from SQLMenace according to the requirement if that is to create a temporary constant for use within scripts, i.e. across multiple GO statements/batches.</p> <p>Just create the procedure in the tempdb then you have no impact on the target database.</p> <p>One practical example of this is a datab...
4,619
<p>I am using <strong>Flashforge Creator Pro</strong> and a <strong>Flashforge Finder</strong></p> <p><a href="https://i.stack.imgur.com/CE1Aa.jpg" rel="noreferrer" title="Flashforge 3D printers"><img src="https://i.stack.imgur.com/CE1Aa.jpg" alt="Flashforge 3D printers" title="Flashforge 3D printers"></a></p> <p>I w...
<p>Nema 17 is about the physical size of the motor, ie screw hole placement. It doesn't specify anything about the power of the motor. If you are looking to replace the motor, you need quite a bit more info than that it is Nema 17, such as the steps/rotation and the holding torque.</p>
<p>It most likely uses a nema 17 stepper motor. These are the most commonly used stepper motors. Since it is also the same company there is good reason to believe it uses the same steppers. Why must you know, anyways?</p>
755
<p>I am building a public website using ASP.NET, as part of the deliverable I need to do an Admin Site for data entry of the stuff shown in the public site, I was wondering what techniques or procedures are people using to validate entries using ASP.NET MVC.</p>
<p>Take a look at the <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="noreferrer">JQuery Validation plugin</a> this plugin is amazing,it's clean to implement and has all the features you could ever need, including remote validation via AJAX.</p> <p>Also a sample MVC controller method can ...
<p>My favorite way it perform both client and server validation using model-based attributes. I wrote a short post about this and released the source code as well, that will basically allow you to create a class like this</p> <pre><code> class User { [Required] public string Name{get;set;} [Email][Requ...
3,743
<p>How do I enable external access to MySQL Server? I can connect locally but I cannot connect from another box on the network.</p> <p>I just tried</p> <pre><code>grant all privileges on *.* to root@'%' identified by '*****' with grant option; </code></pre> <p>And restarted MySQL Server with no success.</p>
<p>You probably have to edit the configuration file (usually my.cnf) to listen in the external interface instead of on localhost only.</p> <p>Change the <code>bind-address</code> parameter to your machine's IP address.</p> <p>If this is an old MySQL installation, you should comment out the skip-networking parameter.<...
<p>Command and syntax looks fine. Have you checked the server is listening on an interface other than 127.0.0.1? By default Im pretty sure it only listens on the localhost address (127.0.0.1)</p>
7,697
<p>I've got some Java code using a servlet and Apache Commons FileUpload to upload a file to a set directory. It's working fine for character data (e.g. text files) but image files are coming out garbled. I can open them but the image doesn't look like it should. Here's my code:</p> <p>Servlet</p> <pre><code>protec...
<p>One thing I don't like is here in this block from StreamUtils.getBytes():</p> <pre><code> 1 while (true) { 2 int nBytesRead = src.read(buff); 3 if (nBytesRead &lt; 0) { 4 break; 5 } 6 byteStream.write(buff); 7 } </code></pre> <p>At line 6, it writes the entire buffer, no matter how many bytes are...
<p>Are you sure that the image isn't coming through garbled or that you aren't dropping some packets on the way in. </p>
6,306
<p>I have the same problem as <a href="https://www.thingiverse.com/groups/tevo-tarantula-owners/forums/general/topic:29448" rel="nofollow noreferrer">this person</a> but I don't have those lines in my <code>RAMPS.h</code> file as seen <a href="http://joxi.ru/DmBgR75UNe8k52.png" rel="nofollow noreferrer">here</a>.</p> ...
<p>Another <a href="https://3dprinting.stackexchange.com/questions/3925/how-to-switch-motor-outputs-and-use-e1-as-x-in-marlin-firmware/5786#5786">posting</a> already discusses how you can change the pins to use spare stepper controllers for broken controllers by changing the pin layout. Assuming you are using a RAMPS b...
<p>the fastest way is to slice using two extruders and assign all print work to E1. Set the head offsets to [0,0] and that shall do the job.</p> <p>The harder is to edit pins file and do remapping.</p>
880
<p>Looking at what's running and nothing jumps out. </p> <p>Thanks!</p>
<p>It should be w3wp.exe</p> <p>EDIT: In line with Darren's comment, you should also check the "Show processes from all users" in Task Manager if that is where you are looking for the process.</p>
<p>Furthermore if you need to look at the .NET/unmanaged stack just donwload <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="nofollow noreferrer">Process Explorer</a> and look at your w3wp.exe processes to examine memory and other stats without having to do a remote/local debugging (just lo...
6,873
<p>I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation?</p> <p>The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit of use. Other partitions are probably to huge. The swap drive for example...
<p>If you partition your drive using <a href="http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)" rel="noreferrer">LVM</a> you won't have to worry about any individual partition running out of space in the future. Just move space around as necessary.</p>
<p>Please tell me what are you doing to /boot that you need more than 64MB on it? Unless you never intend to clean it, anything more is a waste of space. Kernel image + initrd + System.map won't take more than 10MB (probably less - mine weight 5MB) and you really don't need to keep more than two spares.</p> <p>And wit...
3,773
<p>When I turn an image (<code>&lt;img&gt;</code>) into a hyperlink (by wrapping it in <code>&lt;a&gt;</code>), Firefox adds a black border around the image. Safari does not display the same border. </p> <p>What CSS declaration would be best to eliminate the border?</p>
<pre><code>img { border: 0 } </code></pre> <p>Or old-fashioned:</p> <pre><code>&lt;img border="0" src="..." /&gt; ^^^^^^^^^^ </code></pre>
<p>Try this:</p> <pre><code>img { border-style: none; } </code></pre>
7,260
<p>We have a deployment system at my office where we can automatically deploy a given build of our code to a specified dev environment (dev01, dev02, etc.). </p> <p>These dev environments are generalized virtual machines, so our system has to configure them automatically. We have a new system requirement with our next...
<p>Another option would be to investigate using a Powershell script There are a lot powershell community snap ins to support VMs and active directory.</p> <p><a href="http://www.computerperformance.co.uk/powershell/powershell_active_directory.htm#ADUC_(Active_Directory_Users_and_Computers)_" rel="nofollow noreferrer">...
<p>If you can run scripts, it might be as simple as runing the CACLS command on the VM. Perhaps just have your deployment script read in a config and run the appropriate CACLs commands.</p>
6,824
<p>I have a MySQL table with coordinates, the column names are X and Y. Now I want to swap the column values in this table, so that X becomes Y and Y becomes X. The most apparent solution would be renaming the columns, but I don't want to make structure changes since I don't necessarily have permissions to do that.</p>...
<p>I just had to deal with the same and I'll summarize my findings.</p> <ol> <li><p>The <code>UPDATE table SET X=Y, Y=X</code> approach obviously doesn't work, as it'll just set both values to Y.</p></li> <li><p>Here's a method that uses a temporary variable. Thanks to Antony from the comments of <a href="http://beerp...
<p>Swapping of column values using single query</p> <p>UPDATE my_table SET a=@tmp:=a, a=b, b=@tmp;</p> <p>cheers...!</p>
5,842
<p>I am curious about the algorithm/principles behind the estimates that the slicing softwares provide. Is there a standard technique behind this and how accurate is it ?</p>
<p>Much of the software used in 3D printing is open-source, and so are some slicers. Cura, for instance, does (or did, this source code is from an older branch) its print time estimation in <a href="https://github.com/smorloc/Curation/blob/master/Cura/util/gcodeInterpreter.py" rel="noreferrer">gcodeInterpreter.py</a>.<...
<p>Generally speaking, the typical algorithm takes into account the slicer's speed settings for specific features of the build, such as infill, perimeters, top/bottom layers, etc. The distance traveled by the nozzle at a specific speed for each feature is also part of the equations involved. There are some rather vague...
664
<p>I'm looking to implement httpOnly in my legacy ASP classic sites. Anyone knows how to do it?</p>
<pre><code>Response.AddHeader "Set-Cookie", "mycookie=yo; HttpOnly" </code></pre> <p>Other options like <code>expires</code>, <code>path</code> and <code>secure</code> can be also added in this way. I don't know of any magical way to change your whole cookies collection, but I could be wrong about that.</p>
<p>HttpOnly does very little to improve the security of web applications. For one thing, it only works in IE (Firefox "supports" it, but still discloses cookies to Javascript in some situations). For another thing, it only prevents a "drive-by" attack against your application; it does nothing to keep a cross-site scrip...
7,900
<p>Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept pasted Excel data and can emit Excel-compliant clipboard data during a Copy?</p> <p>I believe Excel data is formatted as CSV during "normal" clipboard operations.</p> <hr> <p><a href="http://dhtmlx.com/docs/pro...
<p>I'm currently using <strong>dhtmlxGrid</strong> and we have the Excel copy/paste functionality working. dhtmlXGrid is the most full featured javascript grid package that I've found.</p> <p>On their website, dhtmlXGrid claims to support <a href="http://dhtmlx.com/docs/products/docsExplorer/index.shtml?node=dhtmlxgr...
<p>I was wrestling with this problem several years ago (2004 I think). We ran into the problem that Firefox doesn't allow scripts to read the clipboard by default (but you can <a href="http://support.mozilla.com/en-US/kb/Granting+JavaScript+access+to+the+clipboard" rel="nofollow noreferrer">grant access to the clipboa...
2,471