instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I need to be able to find the last occurrence of a character within an element.</p> <p>For example:</p> <pre><code>&lt;mediaurl&gt;http://www.blah.com/path/to/file/media.jpg&lt;/mediaurl&gt; </code></pre> <p>If I try to locate it through using <code>substring-before(mediaurl, '.')</code> and <code>substring-after...
<p>The following is an example of a template that would produce the required output in XSLT 1.0:</p> <pre><code>&lt;xsl:template name="getExtension"&gt; &lt;xsl:param name="filename"/&gt; &lt;xsl:choose&gt; &lt;xsl:when test="contains($filename, '.')"&gt; &lt;xsl:call-template name="getExtension"&gt; ...
<p>How about tokenize with "/" and take the last element from the array ?</p> <pre><code>Example: tokenize("XPath is fun", "\s+") Result: ("XPath", "is", "fun") </code></pre> <p>Was an XSLT fiddler sometime back... lost touch now. But HTH</p>
3,534
<p>As many of you probably know, online banks nowadays have a security system whereby you are asked some personal questions before you even enter your password. Once you have answered them, you can choose for the bank to "remember this computer" so that in the future you can login by only entering your password.</p> ...
<p>In fact they most probably use cookies. An alternative for them would be to use "<a href="http://www.bestflashanimationsite.com/tutorials/4/" rel="noreferrer">flash cookies</a>" (officially called "<a href="http://www.adobe.com/support/flash/action_scripts/local_shared_object/" rel="noreferrer">Local Shared Objects<...
<p>MAC address is possible.</p> <p>IP to physical location mapping is also a possibility.</p> <p>User agents and other HTTP headers are quiet unique to each of the machines too.</p> <p>I'm thinking about those websites that prevents you from using an accelerating download managers. There must be a way.</p>
5,299
<p>The <code>.XFDL</code> file extension identifies <code>XFDL</code> Formatted Document files. These belong to the XML-based document and template formatting standard. This format is exactly like the XML file format however, contains a level of encryption for use in secure communications.</p> <p>I know how to view XF...
<p>If the encoding is <strong>base64</strong> then this is the solution I've stumbled upon on the web:</p> <p>"Decoding XDFL files saved with 'encoding=base64'. Files saved with: </p> <pre><code>application/vnd.xfdl;content-encoding="base64-gzip" </code></pre> <p>are simple base64-encoded gzip files. They can be eas...
<p>You don't have to get out of Ruby to do this, can use the Base64 module in Ruby to encode the document like this:</p> <pre><code>irb(main):005:0&gt; require 'base64' =&gt; true irb(main):007:0&gt; Base64.encode64("Hello World") =&gt; "SGVsbG8gV29ybGQ=\n" irb(main):008:0&gt; Base64.decode64("SGVsbG8gV29ybGQ=\n") =...
2,395
<p>.NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a statement like this:</p> <pre><code>SqlCommand...
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html" rel="nofollow noreferrer">The MySQL manual page</a> on prepared statements provides lots of information (which should apply to any other RDBMS).</p> <p>Basically, your statement is parsed and processed ahead of time, and the parameters ...
<p>If you're using MS SQL, load up the profiler and you'll see what SQL statements are generated when you use parameterised queries. Here's an example (I'm using Enterprise Libary 3.1, but the results are the same using SqlParameters directly) against SQL Server 2005:</p> <pre><code>string sql = "SELECT * FROM tblDoma...
3,572
<p>My question is simple; is it possible to over object-orient your code? </p> <p>How much is too much? At what point are you giving up readability and maintainability for the sake of OO? </p> <p>I am a huge OO person but sometimes I wonder if I am over-complicating my code.... </p> <p>Thoughts?</p>
<blockquote> <p>is it possible to over object-orient your code</p> </blockquote> <p>Yes</p>
<p>I guess it is possible, but its hard to answer your in abstract terms (no pun intended). Give an example of over OO.</p>
7,793
<p>Basically we need a custom diagram component in our new WPF based application.<br> <strong>Needs</strong> to show text/lines, linked 2D Nodes and custom images apart from the other diagramming features like Undo/Redo, Align, Group, etc.. ala Visio.</p> <p>The initial team did a bit of investigation and settled on t...
<p>My colleague has been using <a href="http://www.mindfusion.org/wpfdiagram.html" rel="nofollow noreferrer">WpfDiagram</a> from MindFusion for the last two weeks and says that it's an excellent product.</p>
<p>Just remember DO NOT choose Syncfusion. </p> <p>I've been suffering from it when developing WPF Application. There are so many bugs in it.</p>
6,523
<p>Is there a .NET variable that returns the "All Users" directory?</p>
<p>You'll want to use the <code>system.environment</code> variables.<br> Most of the predefined ones are <a href="http://msdn.microsoft.com/en-us/library/system.environment.getenvironmentvariable.aspx" rel="nofollow noreferrer">shown here</a>. </p> <p>For the "<strong>All Users</strong>" you would use:</p> <pre><cod...
<p>Or, </p> <pre><code>Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) </code></pre> <p>You can then pass this result to System.IO.Directory.GetParent() to get the root "All Users" folder.</p>
4,317
<p>Is there any Visual Studio Add-In that can do the remove method refactoring?<br> Suppose you have the following method: </p> <pre><code>Result DoSomething(parameters) { return ComputeResult(parameters); } </code></pre> <p>Or the variant where Result is void.</p> <p>The purpose of the refactoring is t...
<p>If I understand the question, then Resharper calls this 'inline method' - <kbd>Ctrl</kbd> - <kbd>R</kbd> + <kbd>I</kbd></p>
<p>You can also right click the method name and click "Find all References" in Visual Studio.</p> <p>I personally would just do a <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>H</kbd> to <code>Find &amp; Replace</code></p>
3,000
<p>I've got an upcoming project wherein I will need to connect our website (<code>PHP5/Apache 1.3/OpenBSD 4.1</code>) to our back-end system running on an iSeries with OS400 V5R3 so that I can access some tables stored there. I've done some checking around but am running into some roadblocks.</p> <p>From what I've see...
<p>Have you looked at connecting to the server using <a href="http://www.unixodbc.org/" rel="noreferrer">unixODBC</a>? If I remember correctly it has support for IBM DB2 and compiles on OpenBSD. Check out <a href="http://www.php.net/odbc" rel="noreferrer">http://www.php.net/odbc</a> for more information regarding the P...
<p>A web service is almost certainly the way to go. I'm sure you've already thought of this, but since you're doing PHP on both sides, you can shortcut things a little bit by using serialize() to build your response data instead of building a proper XML document. It's less flexible over the long run, but it will prob...
2,311
<p>I'm trying to print a small box with 1 mm thick walls. The box has rounded corners.</p> <p>Cura slices the rounded corners with straight internal lines instead of rounded lines:</p> <p><a href="https://i.stack.imgur.com/5Kw87.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5Kw87.jpg" alt="Rounded ...
<p>I found the solution : It was the option &quot;avoid crossing perimeters&quot; that seems to do exactly the contrary of what it means. Thank you all for your answers.</p>
<p>Enable Z-Hop. I don't know what the actual parameter is called but it should say something like &quot;Z-Hop&quot;.</p>
1,760
<p>I want to call a function from a .NET DLL (coded in C#) from an Inno Setup script.</p> <p>I have:</p> <ol> <li>marked the <em>Register for COM interop</em> option in the project properties,</li> <li>changed the <em>ComVisible</em> setting in the <em>AssemblyInfo.cs</em> file,</li> <li>added these lines to the ISS ...
<p>Oops, my bad, it's been too long since I've read pascal! So, if you need to get the value then there are a couple of possibilities:</p> <ol> <li>Write the functionality in C/C++ and export the function, that's definitely supported.</li> <li>Use a Managed C++ dll to shim to your .NET dll, and expose the call as a C ...
<p>A .NET dll can be best called from any other programming language by exposing it as a COM object. Take a look at this example: <a href="http://support.microsoft.com/kb/828736" rel="nofollow noreferrer">http://support.microsoft.com/kb/828736</a>. This shows how to call a ".NET dll" from "unmanaged C++". You can repla...
6,741
<p>I'm using the GoDiagrams suite which seems to recommend .emf files for node images since they scale better on resizing. Bitmaps get all blurry.<br> Google doesn't show up any good tools that seem to do this... So to reiterate I'm looking for a image converter (preferably free) that converts an image (in one of the c...
<p><a href="http://www.inkscape.org/" rel="nofollow noreferrer">Inkscape</a> works well, it was recommended to me <a href="https://stackoverflow.com/questions/28872/free-windows-based-emf-editor">here</a>. </p>
<p>Really funny one Microsoft. Now this might seem outlandish but it works... (I have Visio2007). Just found this out from a colleague</p> <p>You can drop a JPEG into <strong>Microsoft Visio</strong> (no less), Do a 'Save As' to .emf and voila! nice quality of a picture too.</p>
7,750
<p>I know you can use several different view engines with ASP.NET MVC:</p> <ul> <li>ASPX, obviously</li> <li>NVelocity</li> <li>Brail</li> <li>NHaml</li> <li>et al...</li> </ul> <p>The default ASPX view engine seems to make the most sense to me, coming from an ASP.NET WebForms background. </p> <p>But, I wanted to g...
<p>I use <a href="http://dev.dejardin.org/" rel="nofollow noreferrer">Spark</a>. It has nice flow between HTML and code. Scott Hanselman also did a <a href="http://www.hanselman.com/blog/TheWeeklySourceCode30SparkAndNHamlCrazyASPNETMVCViewEngines.aspx" rel="nofollow noreferrer">post</a> on it with his weekly source c...
<p>I've used NVelocity with MonoRail for some time but have recently switched to <a href="http://dev.dejardin.org" rel="nofollow noreferrer">Spark</a> for both Asp.Net MVC and MonoRail. The syntax seems very natural to me, but I guess that's to be expected. ;)</p>
6,414
<p>As we all know numbers can be written either in numerics, or called by their names. While there are a lot of examples to be found that convert 123 into one hundred twenty three, I could not find good examples of how to convert it the other way around.</p> <p>Some of the caveats:</p> <ol> <li>cardinal/nominal or or...
<p>I was playing around with a PEG parser to do what you wanted (and may post that as a separate answer later) when I noticed that there's a very simple algorithm that does a remarkably good job with common forms of numbers in English, Spanish, and German, at the very least.</p> <p>Working with English for example, yo...
<p>One place to start looking is the <a href="http://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html" rel="nofollow noreferrer">gnu get_date lib</a>, which can parse <a href="http://php-date.com/#strtotime" rel="nofollow noreferrer">just about any</a> English textual date into a timestamp. While not e...
9,556
<p>I would like to test a string containing a path to a file for existence of that file (something like the <code>-e</code> test in Perl or the <code>os.path.exists()</code> in Python) in C#.</p>
<p>Use:</p> <pre><code>File.Exists(path) </code></pre> <p>MSDN: <a href="http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx</a></p> <p>Edit: In System.IO</p>
<p>I use WinForms and my way to use File.Exists(string path) is the next one:</p> <pre><code>public bool FileExists(string fileName) { var workingDirectory = Environment.CurrentDirectory; var file = $&quot;{workingDirectory}\{fileName}&quot;; return File.Exists(file); } </code></pre> <p>fileName <strong>mus...
5,998
<p>How do I turn a python program into an .egg file?</p>
<p><a href="http://peak.telecommunity.com/DevCenter/setuptools" rel="noreferrer">Setuptools</a> is the software that creates <a href="http://peak.telecommunity.com/DevCenter/PythonEggs" rel="noreferrer">.egg files</a>. It's an extension of the <a href="http://docs.python.org/lib/module-distutils.html" rel="noreferrer">...
<p>Python has its own package for creating distributions that is called distutils. However instead of using Python’s distutils’ setup function, we’re using setuptools’ setup. We’re also using setuptools’ find_packages function which will automatically look for any packages in the current directory and add them to the e...
7,161
<p>Since CS3 doesn't have a web service component, as previous versions had, is there a good, feature-complete, AS3-only (no Flex dependencies) library for accessing web services with AS3?</p>
<p>You may want to check out <a href="http://alducente.wordpress.com/2007/10/27/web-service-in-as3-release-10/" rel="nofollow noreferrer">http://alducente.wordpress.com/2007/10/27/web-service-in-as3-release-10/</a></p>
<p>What type of service are you trying to consume? URLLoader can handle soap requests (<code>urlRequest.requestHeaders.push(new URLRequestHeader("Content-Type", "application/soap+xml"));</code>) and NetConnection can handle most other stuff (AMF/Remoting).</p>
7,526
<p>I'm trying to figure out if it's worth buying a 3D printer or using an online printing service like e.g. <a href="https://treddy.it" rel="nofollow noreferrer">this one</a> in the long run. Anyone have any cost analysis?</p>
<h1>It depends</h1> <p>If it is worth to invest in a print made for you compared to getting a printer depends on the needs you have. Thee can be informed by the type of material you want to print and the requirements that has on you. Let me give you some examples when it is simply worth it to pay:</p> <ul> <li>A metal ...
<p>I would think it depends on your future needs. If you will rarely need things printed then online is more convenient than buying a printer and doing the whole learning curve, storing materials etc,.</p> <p>From what I have seen online, most people printing are not printing things they actually need.</p> <p>If you wa...
2,131
<p>In C# are the nullable primitive types (i.e. <code>bool?</code>) just aliases for their corresponding <code>Nullable&lt;T&gt;</code> type or is there a difference between the two?</p>
<p>If you look at the IL using <a href="http://msdn.microsoft.com/en-us/library/f7dy01k1%28v=vs.100%29.aspx" rel="noreferrer">Ildasm</a>, you'll find that they both compile down to <code>Nullable&lt;bool&gt;</code>.</p>
<p>No difference. Take a look here: <a href="http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/1t3y8s4s.aspx</a></p> <p>"The syntax T? is shorthand for Nullable, where T is a value type. The two forms are interchangeable."</p>
8,045
<p>I have an Ajax.Net enabled ASP.Net 2.0 web site. Hosting for both the site and the database are out of my control as is the database's schema. In testing on hardware I do control the site performs well however on the client's hardware, there are noticeable delays when reloading or changing pages. </p> <p>What I wou...
<ol> <li><a href="http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx" rel="noreferrer">Script Combining in .net 3.5 SP1</a></li> <li><a href="http://developer.yahoo.com/performance/rules.html" rel="noreferrer">Best Practices for fast websites</a></li> <li...
<p>You could turn on compression based on your client supporting it. See this article: <a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true" rel="nofollow noreferrer">link text</a></p>
3,260
<p>Some prints take a long time and, as I'm not in a workshop, I need to pause the print sometimes.</p> <p>Are there any special considerations I should take when pausing, or can I literally just click pause, leave it for twelve hours or so, and it'll continue without any ill effects?</p> <p>I'm using PLA at present....
<p>If you keep the head hot during the pause, and over the print, you will melt the material already deposited.</p> <p>If you move to X0 Y0 (like on a layer change) and pause there, you can cool off the head (or not), but will want to prime (advance) some material before resuming your print - or risk an initial void, ...
<p>It is not recommended to pause prints a considerable amount of time as the printed model will shrink and might warp during the pause. Also, layer bonding between the old and the new art after resuming will be weak, but this can be used to induce planned breaking layers.</p> <p>On the other hand, <strong>if</strong>...
1,136
<p>We would like to have user defined formulas in our c++ program. e.g. The value <em>v = x + ( y - (z - 2)) / 2</em>. Later in the program the user would define x,y and z -> the program should return the result of the calculation. <br />Somewhen later the formula may get changed, so the next time the program should pa...
<p>If it will be used frequently and if it will be extended in the future, I would almost recommend adding either Python or Lua into your code. <a href="http://www.lua.org/" rel="nofollow noreferrer">Lua</a> is a very lightweight scripting language which you can hook into and provide new functions, operators etc. If yo...
<p>Using <a href="http://spirit.sourceforge.net/" rel="nofollow noreferrer">Spirit</a> (for example) to parse (and the 'semantic actions' it provides to construct an expression tree that you can then manipulate, e.g., evaluate) seems like quite a simple solution. You can find a grammar for arithmetic expressions <a hre...
4,777
<p>I'm trying to use the CoreCon API in Visual Studio 2008 to programmatically launch device emulators. When I call <code>device.Connect()</code>, I inexplicably get a DirectoryNotFoundException. I get it if I try it in PowerShell or in C# Console Application. Here's the code I'm using:</p> <pre><code>static void Main...
<p>It can be found at <code>&lt;systemdrive&gt;:\Program files\Common Files\Microsoft Shared\CoreCon\1.0\Bin</code>.</p> <p>This is the path where you can get this dll, so add this dll to your project.</p>
<p>I tried this and it works ok. Can you paste in the whole exception and stack trace?</p> <p><strong>Updated:</strong> Strangely I can't find that interop assy on my machine either other than under the c:\windows\assembly\GAC_MSIL folders.</p> <p>Why not fire up SysInternals FileMon or Process Monitor, it'd save som...
2,859
<p>Does anybody know a "technique" to discover memory leaks caused by smart pointers? I am currently working on a large project written in <strong>C++</strong> that heavily uses smart pointers with reference counting. Obviously we have some memory leaks caused by smart pointers, that are still referenced somewhere in t...
<p>Note that one source of leaks with <strong>reference-counting smart pointers</strong> are pointers with <strong>circular dependancies</strong>. For example, A have a smart pointer to B, and B have a smart pointer to A. Neither A nor B will be destroyed. You will have to find, and then break the dependancies.</p> <p...
<p>First step could be to know what class is leaking. Once you know it, you can find who is increasing the reference: 1. put a breakpoint on the constructor of class that is wrapped by shared_ptr. 2. step in with debugger inside shared_ptr when its increasing the reference count: look at variable pn->pi_->use_count_ Ta...
9,276
<p>I'm developing a client/server app that will communicate via rest. Some custom request data will be stored in the header of the request. Both the server sending the request and the receiving server have an SSL certificate - will the headers be encrypted, or just the content?</p>
<p>SSL encrypts the entire communications path from the client to the server and back, so yes - the headers will be encrypted.</p> <p>By the way, if you develop networked applications and care about data security, the least you should do is read a book like Practical Cryptography, by Niels Ferguson and Bruce Schneier,...
<p>Not <em>everything</em> is encrypted: the request query string is not encrypted. Believe me, I've seen requests like this:</p> <p><a href="https://mydomain.com/authenticate?user=username&amp;password=MyStrongPasswordSentInTheClear" rel="nofollow">https://mydomain.com/authenticate?user=username&amp;password=MyStron...
9,927
<p>While setting up CruiseControl, I added a buildpublisher block to the publisher tasks:</p> <pre><code>&lt;buildpublisher&gt; &lt;sourceDir&gt;C:\MyBuild\&lt;/sourceDir&gt; &lt;publishDir&gt;C:\MyBuildPublished\&lt;/publishDir&gt; &lt;alwaysPublish&gt;false&lt;/alwaysPublish&gt; &lt;/buildpublisher&gt; </code...
<p>I set up a task to do this. I'm not aware of any way to make CruiseControl be that specific. I usually just chain a batch file to do the copy to the CC.net task.</p>
<p>The default build publisher in CC.NET does not provide a way to do this. You have a few options:</p> <ul> <li>Create your own build publisher with the desired functionality</li> <li>Create a custom NAnt/MSBuild task</li> <li>Use a scripting technology (RoboCopy, batch file, etc.) to create a script file and run an ...
4,302
<p>I want to expand my programming horizons to Linux. A good, dependable basic toolset is important, and what is more basic than an IDE?</p> <p>I could find these SO topics:</p> <ul> <li><a href="https://stackoverflow.com/questions/2756/lightweight-ide-for-linux">Lightweight IDE for linux</a> and</li> <li><a href="ht...
<h2>Initially: confusion</h2> <p>When originally writing this answer, I had recently made the switch from Visual Studio (with years of experience) to Linux and the first thing I did was try to find a reasonable IDE. At the time this was impossible: no good IDE existed.</p> <h2>Epiphany: UNIX is an IDE. <em>All of it....
<blockquote> <p><a href="https://stackoverflow.com/questions/24109/c-ide-for-linux#219039">why wouldn't you also use it for C++? CDT meets every requirement you've mentioned.</a></p> </blockquote> <p>I didn't use eclipse at first because I wasn't sure that it was equally good at giving me the means of developing...
4,386
<p>I've been looking into different web statistics programs for my site, and one promising one is <a href="http://www.hping.org/visitors/" rel="nofollow noreferrer">Visitors</a>. Unfortunately, it's a C program and I don't know how to call it from the web server. I've tried using PHP's <a href="http://us.php.net/manual...
<p>Visitors looks like a log analyzer and report generator. Its probably best setup as a chron job to create static HTML pages once a day or so.</p> <p>If you don't have shell access to your hosting account, or some sort of control panel that lets you setup up chron jobs, you'll be out of luck.</p>
<p>Is there any reason not to just use <a href="http://www.google.com/analytics/" rel="nofollow noreferrer">Google Analytics</a>? It's free, and you don't have to write it yourself. I use it, and it gives you a lot of information.</p> <p>Sorry, I know it's not a "programming" answer ;)</p>
7,100
<p>How are callbacks written in PHP?</p>
<p>The manual uses the terms "callback" and "callable" interchangeably, however, "callback" traditionally refers to a string or array value that acts like a <a href="http://en.wikipedia.org/wiki/Function_pointer" rel="noreferrer">function pointer</a>, referencing a function or class method for future invocation. This h...
<p>I cringe every time I use <code>create_function()</code> in php. </p> <p>Parameters are a coma separated string, the whole function body in a string... Argh... I think they could not have made it uglier even if they tried.</p> <p>Unfortunately, it is the only choice when creating a named function is not worth the ...
7,139
<p>Both the jQuery and Prototpye JavaScript libraries refuse to allow me to use a variable to select an list item element by index number although they accept a hard coded number. </p> <p>For example, in Prototype this works:</p> <pre><code>$$('li')[5].addClassName('active'); </code></pre> <p>But this will not work ...
<p>Are you certain that <code>currentPage</code> is an integer? Try something like:</p> <pre><code>var currentPage = 5; jQuery('li').eq(currentPage); </code></pre> <p>as a simple sanity check. If that works, you should try casting to <code>Integer</code>.</p>
<p>Make sure that the currentPage variable is correctly scoped in the code where it is being accessed. Could the variable be changed somewhere else in the code before you are accessing it? Tools like <a href="https://addons.mozilla.org/firefox/addon/1843" rel="nofollow noreferrer">Firebug</a> can help you to add a brea...
6,181
<p>In Java, static and transient fields are not serialized. However, I found out that initialization of static fields causes the generated serialVersionUID to be changed. For example, <code>static int MYINT = 3;</code> causes the serialVersionUID to change. In this example, it makes sense because different versions of ...
<p>You can find some information about that in the <a href="http://bugs.sun.com/view_bug.do?bug_id=4365406" rel="nofollow noreferrer">bug 4365406</a> and in the <a href="http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/class.html#4100" rel="nofollow noreferrer">algorithm for computing <strong>serialVersionU...
<p>If I read the spec correctly the automatic <code>serialVersionUID</code> shouldn't change if you change the value of a static of transient field. Take a look at <a href="http://java.sun.com/javase/6/docs/platform/serialization/spec/version.html#6678" rel="nofollow noreferrer">Chapter 5.6</a> of the Spec.</p> <p><st...
6,281
<p>When I've printed an object I've had to choose between high resolution and quick prints. What techniques or technologies can I use or deploy to speed up my high resolution prints?</p>
<p>You could experiment with slicing. For example, you might not need high resolution all over the object, but you can speed up some straight parts by using greater layer high there. See a <a href="http://manual.slic3r.org/expert-mode/variable-layer-height">part of Slic3r manual</a> about such thing.</p> <p>It is also...
<p>For FDM technologies in general with a single extruder, slicing modifications is your only options. However there will be a trade off between quality and speed. For ABS, changing to a machine with a enclosed build (such as a zortrax) chamber may help and a heated build chamber (Stratasys machine) will help the qual...
82
<p>I have</p> <pre><code>class Foo &lt; ActiveRecord::Base named_scope :a, lambda { |a| :conditions =&gt; { :a =&gt; a } } named_scope :b, lambda { |b| :conditions =&gt; { :b =&gt; b } } end </code></pre> <p>I'd like</p> <pre><code>class Foo &lt; ActiveRecord::Base named_scope :ab, lambda { |a,b| :conditions =...
<p>At least since 3.2 there is a clever solution :</p> <pre><code>scope :optional, -&gt;() {where(option: true)} scope :accepted, -&gt;() {where(accepted: true)} scope :optional_and_accepted, -&gt;() { self.optional.merge(self.accepted) } </code></pre>
<p>@<a href="https://stackoverflow.com/questions/29011/is-there-a-way-to-combine-named-scopes-into-a-new-named-scope#30719">PJ</a>: you know, I had considered that, but dismissed it because I thought I wouldn't be able to later chain on a <em>third</em> named scope, like so:</p> <pre><code>Foo.ab(x, y).c(z) </code></p...
4,868
<p>I'm looking for a quality WinForms component that supports syntax highlighting, code folding and the like. The key criteria are:</p> <ol> <li>Stability </li> <li>Value (price)</li> <li>Ability to easily customize syntax to highlight</li> <li>Light weight</li> </ol>
<p><a href="http://www.icsharpcode.net/OpenSource/SD/" rel="nofollow noreferrer">ICSharpCode.TextEditor</a> is free and pretty stable.<br> As for commercial solution Actipro's <a href="http://www.actiprosoftware.com/Products/DotNet/SyntaxEditor/Default.aspx" rel="nofollow noreferrer">SyntaxEditor</a> might be a best ch...
<p>Try out <a href="http://www.codeplex.com/ScintillaNET" rel="nofollow noreferrer">ScintillaNET</a> it's a .NET WinForms wrapper around the excellent <a href="http://scintilla.org/" rel="nofollow noreferrer">Scintilla</a> control. Scintilla itself is a free source code editor component that is very customisable and ha...
6,319
<p>I recently had to solve this problem and find I've needed this info many times in the past so I thought I would post it. Assuming the following table def, how would you write a query to find all differences between the two?</p> <p>table def:</p> <pre><code>CREATE TABLE feed_tbl ( code varchar(15), name varchar(40...
<p>UNION will remove duplicates, so just UNION the two together, then search for anything with more than one entry. Given "code" as a primary key, you can say:</p> <p><em>edit 0: modified to include differences in the PK field itself</em></p> <p><em>edit 1: if you use this in real life, be sure to list the actual co...
<p>I would use a minor variation in the second <code>union</code>:</p> <pre><code>where (ISNULL(feed_tbl.name, 'NONAME') &lt;&gt; ISNULL(data_tbl.name, 'NONAME')) OR (ISNULL(data_tbl.status, 'NOSTATUS') &lt;&gt; ISNULL(feed_tbl.status, 'NOSTATUS')) OR (ISNULL(data_tbl.update, '12/31/2039') &lt;&gt; ISNULL(feed_tbl.upd...
5,084
<p>I have an array with holes that I have to fill with different materials. My question is there is an easy way to fill them directly? I tried array, array draft and it is annoying to adjust them. In Blender, it easy to select the vertices and fill. Maybe it is a stupid question, but I am not really an expert.</p> <p><...
<h1>The problem</h1> <p>FDM printers slice models in STL or OBJ format. Neither of these formats can transmit properties like <em>Materials</em>: they consist <strong>fully</strong> of surface definitions.</p> <h1>But... Multi-Material printing is a thing, yes?</h1> <p>Yes, but Multi-material prints use a simple trick:...
<p>If you are asking for print then it is yes with FDM (fused deposition modeling) with multiple extrusion you can fill with different material easily. But if you are trying to change the material in your digital design then you need to work on every hole in the array, especially with FreeCAD. If you find any, please u...
1,830
<p>I recently upgraded to a E3D full hotend and I started to have problems with slowly printed parts. After I print first object and start next one, then the first layer has serious issue.</p> <p><a href="https://i.stack.imgur.com/wSSm4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wSSm4.jpg" alt=...
<p>I use cosmetic vaseline - <a href="https://en.wikipedia.org/wiki/Petroleum_jelly" rel="noreferrer">petroleum jelly</a>. Usually it is white to transparent and odorless. It's cheap and available in all drugstores and cosmetics stores.</p> <p>As suggested by Tom van der Zanden I'm adding additional info about interac...
<p>I have been using <em>sewing machine oil</em> for my 3D printed extruder gear for a couple of years, without any noticeable wear so far.</p> <p>In general, I believe any kind of low viscosity oil would do, but then again, it also depends on the environment in which you plan to use the model. If you plan on using it...
299
<p>How do I create class (i.e. <a href="https://en.wikipedia.org/wiki/Method_(computer_programming)#Static_methods" rel="nofollow noreferrer">static</a>) variables or methods in Python?</p>
<p>Variables declared inside the class definition, but not inside a method are class or static variables:</p> <pre><code>&gt;&gt;&gt; class MyClass: ... i = 3 ... &gt;&gt;&gt; MyClass.i 3 </code></pre> <p>As @<a href="https://stackoverflow.com/questions/68645/static-class-variables-in-python#answer-69067">millerde...
<p>Not like the <code>@staticmethod</code> but class variables are static method of class and are shared with all the instances.</p> <p>Now you can access it like</p> <pre><code>instance = MyClass() print(instance.i) </code></pre> <p>or</p> <pre><code>print(MyClass.i) </code></pre> <p>you have to assign the value to th...
9,420
<p>I'm trying to write a custom WPF ValidationRule to enforce that a certain property is unique within the context of a given collection. For example: I am editing a collection of custom objects bound to a ListView and I need to ensure that the Name property of each object in the collection is unique. Does anyone know ...
<p>First, I'd create a simple DependencyObject class to hold your collection: </p> <pre><code>class YourCollectionType : DependencyObject { [PROPERTY DEPENDENCY OF ObservableCollection&lt;YourType&gt; NAMED: BoundList] } </code></pre> <p>Then, on your ValidationRule-derived class, create a property:</p> <pre><...
<p>I would only create a custom dependency object if there were other properties I wanted to bind to the rule. Since in this case all we're doing is attaching a single collection of values to check against, I made my <code>&lt;UniqueValueValidationRule.OtherValues&gt;</code> property a <code>&lt;CollectionContainer&gt;...
5,517
<p>Is it still worth to add the log4j library to a Java 5 project just to log let's say some exceptions to a file with some nice rollover settings. Or will the standard util.logging facility do the job as well?</p> <p>What do you think?</p>
<p>I'd say you're probably fine with util.logging for the needs you describe.</p> <p>For a good decision tree, have a look at <a href="http://web.archive.org/web/20190320144728/http://java.sys-con.com/node/48541" rel="noreferrer">Log4j vs java.util.logging</a></p> <blockquote> <p>Question One : Do you anticipate a need...
<p>I would go with log4j. The possibilites with log4j is not obsolete at all!</p>
5,174
<p>Using a Gearman RepRap with Slic3r, printing from an SD card, with an uniterupted power supply (UPS), and both PLA and ABS filaments, short power outages often result in x/y-axis offsets (see image). During an outage the power is not as clear from a UPS as from a power conditioner. If both x and y axes offset the ...
<p>Part of your self-answer:</p> <blockquote> <p>What is puzzling is why did the 3D printer run as if the computer was still operating it, when is was printing from the SD card? Was the circuitry getting power from the USB cable from the computer?</p> </blockquote> <p>is more of an extension of the question, which ...
<p>I believe I resolved this issue. The next power outage will tell. After getting a larger UPS used for robotic testers, when swapping out the UPS, I noticed the 3D printer was plugged in to the surge protector side without the battery, probably because the smaller UPS was only rated for power to the computer. Now...
1,417
<p>I've heard rumors that PHP is planning on introducing a "goto" command. What is it supposed to be doing?</p> <p>I've tried searching a bit, but haven't found anything awfully descriptive. I understand that it won't be a "<code>GOTO 10</code>"-like command...</p>
<p>They are not adding a real GOTO, but extending the BREAK keyword to use static labels. Basically, it will be enhancing the ability to break out of <s>switch</s> nested if statements. Here's the concept example I found:</p> <pre><code>&lt;?php for ($i = 0; $i &lt; 9; $i++) { if (true) { break blah; }...
<p>It <a href="http://wiki.php.net/doc/todo/undocumented#php_5.3" rel="nofollow noreferrer">looks</a> like it's currently in PHP 5.3, but is not fully documented yet. From what I can tell it shares its goto syntax with C, so it should be easy to pick up and use. Just remember Dijkstra's <a href="http://www.cs.utexas.ed...
3,983
<p>How can I find out which Service Pack is installed on my copy of SQL Server?</p>
<p>From TechNet: <a href="https://gallery.technet.microsoft.com/Determining-which-version-af0f16f6" rel="noreferrer">Determining which version and edition of SQL Server Database Engine is running</a></p> <pre><code>-- SQL Server 2000/2005 SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVE...
<pre><code>Select @@Version </code></pre> <blockquote> <p>Ex: My machine has the following one installed.</p> <p>Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86) Apr 2 2010 15:53:02 Copyright (c) Microsoft Corporation Enterprise Edition on Windows NT 6.1 (Build 7601: Service Pack 1)</p> </block...
5,171
<p>I want to link to bookmark on a page (mysite.com/mypage.htm#bookmark) AND visually highlight the item that was bookmarked (maybe having a red border). Naturally, there would be multiple items bookmarked. So that if someone clicked on #bookmark2 then <em>that</em> other area would be highlighted). </p> <p>I can s...
<p>In your css you need to define </p> <pre class="lang-css prettyprint-override"><code>a.highlight {border:1px solid red;} </code></pre> <p>or something similar</p> <p>Then using jQuery, </p> <pre><code>$(document).ready ( function () { //Work as soon as the DOM is ready for parsing var id = location.hash.sub...
<p>I guess if you could store this information with JavaScript and cookies for the functionality of remembering the bookmarks and even add a splash of Ajax if you wanted to interact with a database.</p> <p>CSS would only be able to do styling. You would have to give the bookmarked anchor a class found in your CSS file...
7,788
<p>Can fogbugz track case dependencies?</p>
<p>Yes and no. Cases can be linked to each other, but if you're looking for a tree of cases (prerequisites and such), you need FogBugz 7 or later.</p> <p>If you're using FogBugz 7.3 or greater, you can now use the <a href="http://www.fogcreek.com/fogbugz/plugins/plugin.aspx?ixPlugin=57" rel="nofollow noreferrer">Case ...
<p>FogBugz 7 now supports sub-cases. This may or may not solve your problem, depending on how you want to handle it.</p>
4,681
<p>Is hot glue suitable for FDM printing, or some process similar to it?</p> <p>I think it has all of the required properties, and could produce a flexible transluscent print. It's cheap, hotends are cheap, and the technology has been around for a while.</p> <p>I couldn't find any examples or anyone talking about su...
<p>You could mount a hot glue gun to a 3D positioning frame, but you would immediately notice the following:</p> <ul> <li>Hot glue sticks are fat, so you lose a lot of precision for each feed/retract increment. I.e., it's a lot harder to get precise feeds with a fat stick because the stick size is so much larger than ...
<p>I think not. Unless you intend to make a very special printer that feeds on glue stick, you must make filament from it. Should be doable.</p> <p>But my experience with cold hot glue, is that it is not very durable. It's a bit elastic but nothing like elastic filament. It breaks instead. So when you have your filame...
970
<p>Have any of you tried Hadoop? Can it be used without the distributed filesystem that goes with it, in a Share-nothing architecture? Would that make sense?</p> <p>I'm also interested into any performance results you have...</p>
<p>Yes, you can use Hadoop on a local filesystem by using file URIs instead of hdfs URIs in various places. I think a lot of the examples that come with Hadoop do this.</p> <p>This is probably fine if you just want to learn how Hadoop works and the basic map-reduce paradigm, but you will need multiple machines and a ...
<p><strong>Parallel/ Distributed computing = SPEED</strong> &lt;&lt; Hadoop makes this really really easy and cheap since you can just use a bunch of commodity machines!!!</p> <p>Over the years disk storage capacities have increased massively but the speeds at which you read the data have not kept up. The more data yo...
3,830
<p>I have an application which <em>really</em> should be installed, but does work fine when deployed using JNLP.</p> <p>However, it would seem that some Java functions such as <code>Runtime.exec</code> don't work using the default security options.</p> <p>I would like to therefore <a href="http://www.joelonsoftware.c...
<p>You want to ask to the <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/SecurityManager.html" rel="nofollow noreferrer">SecurityManager</a> if you have Exec right with the checkExec method.</p>
<p>For the specific example of Runtime.exec there is a method on the SecurityManager class checkExec(String cmd) that will throw an exception that can be caught to determine if the necessary command can be executed. For more information see the javadoc for Runtime.exec and SecurityManager.checkExec.</p> <p>The more g...
5,393
<p>I've seen quite a few posts on changes in .NET 3.5 SP1, but stumbled into one that I've yet to see documentation for yesterday. I had code working just fine on my machine, from VS, msbuild command line, everything, but it failed on the build server (running .NET 3.5 RTM).</p> <pre><code>[XmlRoot("foo")] public cla...
<p>In SP1 does the foo.Bar property get properly deserialized?</p> <p>In pre SP1 you wouldn't be able to deserialize the object because the set method of the Bar property is private so the XmlSerializer doesn't have a way to set that value. I'm not sure how SP1 is pulling it off.</p> <p>You could try adding this to ...
<p>I rather like this new (?) behavior because the XML document doesn't have any mention of Bar in it, so the deserializer should not even be attempting to set it.</p>
5,532
<p>I would like to use a language that I am familiar with - Java, C#, Ruby, PHP, C/C++, although examples in any language or pseudocode are more than welcome.</p> <p>What is the best way of splitting a large XML document into smaller sections that are still valid XML? For my purposes, I need to split them into roughly...
<p>Well of course you can always extract the top-level elements (whether this is the granularity you want is up to you). In C#, you'd use the XmlDocument class. For example, if your XML file looked something like this:</p> <pre><code>&lt;Document&gt; &lt;Piece&gt; Some text &lt;/Piece&gt; &lt;Piece&gt; ...
<p>It looks like you're working with C# and .NET 3.5. I have come across some posts that suggest using a yield type of algorithm on a file stream with an XmlReader.</p> <p>Here's a couple blog posts to get you started down the path:</p> <ul> <li><a href="http://blogs.msdn.com/xmlteam/archive/2007/03/05/streaming-wit...
2,939
<p>I am setting the <code>.Content</code> value of a Label to a string that contains underscores; the first underscore is being interpreted as an accelerator key.</p> <p>Without changing the underlying string (by replacing all <code>_</code> with <code>__</code>), is there a way to disable the accelerator for Labels?<...
<p>If you use a TextBlock as the Content of the Label, its Text will not absorb underscores.</p>
<p>Why not like this?</p> <pre><code>public partial class LabelEx : Label { public bool PreventAccessKey { get; set; } = true; public LabelEx() { InitializeComponent(); } public new object Content { get { var cont...
6,200
<p>I know what <code>yield</code> does, and I've seen a few examples, but I can't think of real life applications, have you used it to solve some specific problem?</p> <p>(Ideally some problem that cannot be solved some other way)</p>
<p>I realise this is an old question (pre Jon Skeet?) but I have been considering this question myself just lately. Unfortunately the current answers here (in my opinion) don't mention the most obvious advantage of the yield statement.</p> <p>The biggest benefit of the yield statement is that it allows you to iterate ...
<p>Using yield can prevent downcasting to a concrete type. This is handy to ensure that the consumer of the collection doesn't manipulate it.</p>
3,783
<p>In my .NET/Forms app I have a DataGridView which is bound to a DataTable. The user selects a row of the DataGridView by double-clicking and does some interaction with the app. After that the content of the row is updated programmatically.</p> <p>When the user selects a new row the changes on the previous one are au...
<p>I just had the same issue, and found the answer <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.iscurrentrowdirty.aspx" rel="nofollow noreferrer">here</a>:</p> <blockquote> <p>When the user navigates away from the row, the control commits all row changes. The user can also p...
<p>I guess it depends on what triggers the update to take place, if it is in a validation routine you could simply call that after the user clicks OK on editing the data. Your question is vague it would be easier to answer with more information. What is this interaction? Is it a dialog? What actually updates the da...
9,840
<p>I have a scenario wherein, for example, I need to repeat a list of US states and display a table of cities and city populations after the name of each state. The design requirement dictates that every outer repetition must be the name of a state followed by a table of cities, and that requirement cannot be changed a...
<p>If it were me, I'd reverse the question and ask why <em>I should</em> use a GridView, If you need a bunch of built-in features like paging and sorting, then the GridView might be a good fit. If you just want tabular data, I'd reconsider. Why? Because with GridView you're getting a whole bunch of stuff you won't ...
<p>In your above scenario, you'd be better off doing a master-detail style GridView, which will save you the overhead of all those GridView objects that get created.</p> <p>There are various implementation of it (<a href="http://msdn.microsoft.com/en-us/library/aa479344.aspx" rel="nofollow noreferrer">using a drop dow...
7,371
<p>In Ruby, trying to print out the individual elements of a String is giving me trouble. Instead of seeing each character, I'm seeing their ASCII values instead: </p> <pre><code>&gt;&gt; a = "0123" =&gt; "0123" &gt;&gt; a[0] =&gt; 48 </code></pre> <p>I've looked online but can't find any way to get the original "0" ...
<p>Or you can convert the integer to its character value:</p> <pre><code>a[0].chr </code></pre>
<p>I think <code>each_char</code> or <code>chars</code> describes better what you want.</p> <pre><code>irb(main):001:0&gt; a = "0123" =&gt; "0123" irb(main):002:0&gt; Array(a.each_char) =&gt; ["0", "1", "2", "3"] irb(main):003:0&gt; puts Array(a.each_char) 0 1 2 3 =&gt; nil </code></pre>
4,917
<p>I'm running some c# .net pages with various gridviews. If I ever leave any of them alone in a web browser for an extended period of time (usually overnight), I get the following error when I click any element on the page.</p> <p>I'm not really sure where to start dealing with the problem. I don't mind resetting the...
<p>That is odd as the ViewState is stored as a string in the webpage itself. So I do not see how an extended period of time would cause that error. Perhaps one or more objects on the page have been garbage collected or the application reset, so the viewstate is referencing old controls instead of the controls created...
<p>Alternatively if you know the time-out length then you could add a bit of javascript to the page which redirects the user to an alternative page if there has been no activity on the page after a preset period of time. You can then extend this to warn the customer that their session / page is about to expire and prov...
9,905
<p>What is the best way to shred XML data into various database columns? So far I have mainly been using the nodes and value functions like so:</p> <pre><code>INSERT INTO some_table (column1, column2, column3) SELECT Rows.n.value('(@column1)[1]', 'varchar(20)'), Rows.n.value('(@column2)[1]', 'nvarchar(100)'), Rows.n.v...
<p>Stumbled across this question whilst having a very similar problem, I'd been running a query processing a 7.5MB XML file (~approx 10,000 nodes) for around 3.5~4 hours before finally giving up.</p> <p>However, after a little more research I found that having typed the XML using a schema and created an XML Index (I'd...
<p>There is an <a href="http://msdn.microsoft.com/en-us/library/ms171769.aspx" rel="nofollow noreferrer">XML Bulk load</a> COM object (<a href="http://msdn.microsoft.com/en-us/library/ms171878.aspx" rel="nofollow noreferrer">.NET Example</a>) </p> <p>From <a href="http://msdn.microsoft.com/en-us/library/ms171721.aspx"...
8,638
<p>My requirements:</p> <ul> <li>Support .NET Compact Framework 2.0 and Windows Mobile 6.0 devices.</li> <li>Only need to unzip the contents to a directory on a storage card. Creation of zip files is not required.</li> <li>Must be able to use in corporate/commercial software.</li> <li>Can be open source, but not have ...
<p>Have a look at #ziplib (www.icsharpcode.com). It's GPL, but you can use it in closed-source, commercial applications. They don't say anything specifically on their page about using it with the Compact Framework, so you'd have to give it a test yourself (that said, it's pure C# without any external dependencies, so t...
<p>I use the Resco MobileForms toolkit for a variety of functionality: <a href="http://www.resco.net/developer/mobileformstoolkit/overview.aspx" rel="nofollow noreferrer">http://www.resco.net/developer/mobileformstoolkit/overview.aspx</a></p> <p>It includes a good ZIP library.</p>
2,895
<p>Thanks to FireFox's buggy implementation of ActiveX components (it really should take an image of them when printing) Flex components (in our case charts) don't print in FX.</p> <p>They print fine in IE7, even IE6.</p> <p>We need these charts to print, but they also have dynamic content. I don't really want to dr...
<p>Using the ACPrintManager I was able to get firefox 3 to print perfectly!</p> <p>The one thing I had to add to the example was to check if stage was null, and callLater if the stage was null.</p> <pre><code>private function initPrint():void { //if we don't have a stage, wait until the next frame and try again ...
<p>Thanks. A load of <code>callLater</code>-s added to our custom chart code seems to have done it.</p>
3,066
<p>When I try to do that I get the following error:</p> <blockquote> <p>Changes to 64-bit applications are not allowed.</p> </blockquote> <hr /> <p>@Wilka: That option wasn't available until I selected Tools &gt; Options &gt; Projects and Solutions &gt; General and check &quot;Show advanced build configurations&quot;. ...
<p>You could try:</p> <blockquote> <p>In Visual Basic 2008 Express Edition: Build menu > Configuration Manager...</p> <p>Change Active solution platform: to "...", choose "x86", save the new platform.</p> <p>Now the "x86" option is available in the Compile settings.</p> </blockquote> <p>You may ...
<p>AFAIK Visual Studio Express does not come with 64bit support.</p>
5,006
<p>I've recently bought a 3D printer and waiting for it to be delivered I've given quite a lot of time to looking things up on Thingiverse. I see people create incredible models with gears, screws, lids and a lot of very cool and functional connectors (there are some project for boxes with an iris tipe lid that can be ...
<p>The answer to your question is yes, there are tutorials to help you create better models. Unfortunately, the back-story to the answer is beyond the scope of StackExchange.</p> <p>Don't limit yourself to Blender, especially if you are attempting to create non-organic (engineering-type) models. Blender is great for c...
<p>I think rather than looking for a tutorial at this stage, it might be instructive to watch some videos on tuning and calibration (since these touch on what is difficult). Also download Cura (or some other slicer of your choice) and look into how your existing models would be printed layer by layer. Cura has a layer ...
431
<p>Basically, something better than this:</p> <pre><code>&lt;input type="file" name="myfile" size="50"&gt; </code></pre> <p>First of all, the <code>browse</code> button looks different on every browser. Unlike the <code>submit</code> button on a form, you have to come up with some <a href="http://www.quirksmode.org/...
<p>File upload boxes is where we're currently at if you don't want to involve other technologies like Flash, Java or ActiveX.</p> <p>With plain HTML you are pretty much limited to the experience you've described (no progress bar, double submits, etc). If you are willing to use some javascript, you can solve some of th...
<p>It is true, the file upload control is definitely behind the times. Hopefully this will be addressed in a future asp.net version.</p> <p>Though it costs some money, I have found the <a href="http://www.telerik.com/products/aspnet-ajax/controls/upload/overview.aspx" rel="nofollow noreferrer">Telerik upload control</...
3,308
<p>Right now my ant task looks like.</p> <pre><code>&lt;javadoc sourcepath="${source}" destdir="${doc}"&gt; &lt;link href="http://java.sun.com/j2se/1.5.0/docs/api/" /&gt; &lt;/javadoc&gt; </code></pre> <p>And I'm getting this warning:</p> <pre><code>javadoc: warning - Error fetching URL: http://java.sun.com/j2se...
<p>You probably need the <a href="http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html" rel="noreferrer">http.proxyHost and http.proxyPort system properties</a> set. For example, <code>ANT_OPTS="-Dhttp.proxyHost=proxy.y.com" ant doc</code></p> <p>Alternatively, you could set the "offline" flag and provide a p...
<p>You can also use the "offline" mode that allows you to build (faster!) without accessing the internet. Please see this answer: <a href="https://stackoverflow.com/a/24089805/366749">https://stackoverflow.com/a/24089805/366749</a></p>
7,631
<p>How are you handling the entry of numeric values in WPF applications?</p> <p>Without a NumericUpDown control, I've been using a TextBox and handling its PreviewKeyDown event with the code below, but it's pretty ugly.</p> <p>Has anyone found a more graceful way to get numeric data from the user without relying on a...
<p>How about:</p> <pre><code>protected override void OnPreviewTextInput(System.Windows.Input.TextCompositionEventArgs e) { e.Handled = !AreAllValidNumericChars(e.Text); base.OnPreviewTextInput(e); } private bool AreAllValidNumericChars(string str) { foreach(char c in str) { if(!Char.IsNumber(c...
<p>Call me crazy, but why not put plus and minus buttons at either side of the TextBox control and simply prevent the TextBox from receiving cursor focus, thereby creating your own cheap NumericUpDown control?</p>
2,742
<p>Say I have an ASMX web service, MyService. The service has a method, MyMethod. I could execute MyMethod on the server side as follows:</p> <pre><code>MyService service = new MyService(); service.MyMethod(); </code></pre> <p>I need to do similar, with service and method not known until runtime. </p> <p>I'm assu...
<p>I'm not sure if this would be the best way to go about it. The most obvious way to me, would be to make an HTTP Request, and call the webservice using an actual HTTP GET or POST. Using your method, I'm not entirely sure how you'd set up the data you are sending to the web service. I've added some sample code in VB....
<p>@Kibbee: I need to avoid the HTTP performance hit. It won't be a remote call, so all of that added overhead <em>should</em> be unnecessary.</p> <p>@Daren: I definitely agree with that design philosophy. The issue here is that I'm not going to be in control of the service or its underlying business logic.</p> <...
8,775
<p>Is it really advantageous to move to Rake from ant?</p> <p>Anyone migrated from ant and find something monumental?</p> <p>FYI: Current environment is Ant for J2ME builds</p>
<p>I would say yes, but I have a different perspective than a Java-environment guy, because I'm a .NET-environment guy. I had written and maintained a non-trivial build script (clean, generate-assembly-info, build, test, coverage, analysis, package) in msbuild (MS' XML-driven NAnt effort) and it was very painful:</p> ...
<p>Another tool that you might want to check out is <a href="http://gant.codehaus.org/" rel="nofollow noreferrer">Gant</a> if ant isn't meeting your needs. It adds full blown scripting support to ant but allows you to re-use your ant tasks as needed. It really depends on what you don't like about ant.</p>
9,687
<p>I wanted to create a coin stacking device similar to this one:</p> <p><a href="https://www.thingiverse.com/thing:499177" rel="nofollow noreferrer">https://www.thingiverse.com/thing:499177</a></p> <p>But I wanted to only 3 coins, 5c, 2c, and 1c. Unfortunately the STL came in pretty messy after importing to Blender,...
<p>It is quite common for modelling operations to result in 'non manifold geometry', meaning that some of the faces intersect or are not perfectly joined.</p> <p>Although there is nothing obvious in your model, you can check in blender by going into edit mode, unselect all, selecting nodes, and 'select all by attribut...
<p>Not sure about Blender, but MeshMixer has a "Plane Cut" tool that would allow you to take the source STL file and cut off the parts you don't want. That might save you some pain. </p> <p>But if the final sliced <strong>gcode</strong> file works, don't worry too much. </p>
1,055
<p>I am trying to create a horizontal menu with the elements represented by <code>&lt;span&gt;</code>'s. The menu itself (parent <code>&lt;div&gt;</code>) has a fixed width, but the elements number is always different.</p> <p>I would like to have child <code>&lt;span&gt;</code>'s of the same width, independently of ho...
<p>You might try a table with a fixed table layout. It should calculate the column widths without concerning itself with the cell contents.</p> <pre class="lang-css prettyprint-override"><code>table.ClassName { table-layout: fixed } </code></pre>
<p>have you tried the decimal values, like setting width to 33.33%?</p> <p>As specified in the CSS syntax, the width property (<a href="http://www.w3.org/TR/CSS21/visudet.html#the-width-property" rel="nofollow noreferrer">http://www.w3.org/TR/CSS21/visudet.html#the-width-property</a>) can be given as &lt;percentage&gt...
6,971
<p>Basically I want tools which generate source code visualization like:</p> <ul> <li>function call graph</li> <li>dependency graph</li> <li>...</li> </ul>
<p><a href="http://www.doxygen.nl/" rel="noreferrer">Doxygen</a> is really excellent for this, although you will need to install <a href="http://www.graphviz.org/" rel="noreferrer">GraphViz</a> to get the the graphs to draw.</p> <p>Once you've got everything installed, it's really rather simple to draw the graphs. Mak...
<p>Might be a duplication, but check out ollydbg, IDA Pro and <a href="http://www.openrce.org/" rel="nofollow noreferrer">this website</a> has a whole bunch of resources with some very sexy images.</p>
4,754
<p>Continuous Integration toolchains for .NET, Java, and other languages are relatively well defined, but the C++ market seems to have a lot of diversity. </p> <p>By CI "toolchain" I specifically mean tools for the build scripts, automated testing, coding standards checking, etc.</p> <p>What are C++ teams using for ...
<p>Another option might be <a href="http://buildbot.net/trac" rel="noreferrer">buildbot</a>.</p> <p>It's written in python, but is not just for python apps. It can execute any script for doing your build. If you look at their success stories, there appear to be a wide variety of languages.</p>
<p>As with seemingly every other task in C++, I'm just barely limping along with continuous integration. My setup starts with Eclipse. I set it to generate make files for my projects. I have ant scripts that do the overall build tasks by running 'make all' or 'make clean' on the appropriate makefiles. These ant scripts...
4,547
<p>Where can I find an online interactive console for programming language or api?</p> <ul> <li><a href="http://tryruby.org/" rel="nofollow noreferrer">Ruby</a></li> <li><a href="http://shell.appspot.com/" rel="nofollow noreferrer">Python</a></li> <li><a href="http://groovyconsole.appspot.com/" rel="nofollow noreferre...
<p>@kuszi Put a great answer as a comment to the question, but I almost missed it because it was a comment rather than the answer.</p> <p><a href="http://joel.franusic.com/w/page/26128430/Online-REPs-and-REPLs">This link</a> goes to a huuuge list of REPs and REPLs for tons of languages.</p>
<p><a href="http://getfirebug.com/lite" rel="nofollow noreferrer">Firebug Lite</a> for Javascript. And, <a href="http://vimeo.com/10499321" rel="nofollow noreferrer">Rainbow 9</a> was one of the first examples of online REPLs.</p>
7,150
<p>A fillet is like a rounded corner but on the inside of the corner.</p> <p><a href="https://i.stack.imgur.com/XDTnd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/XDTnd.png" alt="enter image description here"></a></p> <p>Does it make a difference (structurally) to use fillets on a 3d printed part?</p>
<p>If your part needs structural support, then the word is: <strong>absolutely</strong>. Fillets provide the added support when you need it. If your part has a meeting line which is sharp - 90° (or perpendicular), there is a natural <a href="https://mechanics.stackexchange.com/q/18183/4152">stress riser</a> in your des...
<p>Fillets in X-Y plane (i.e. between two vertical surfaces) work great for 3D prints and increase the strength a lot. They usually also improve the print quality, because the print head can keep a constant speed in the curve instead of slowing down to a sharp corner.</p> <p>However fillets that extend in Z direction ...
1,357
<p>Like the title says: Can reflection give you the name of the currently executing method.</p> <p>I'm inclined to guess not, because of the Heisenberg problem. How do you call a method that will tell you the current method without changing what the current method is? But I'm hoping someone can prove me wrong there....
<p>For non-<code>async</code> methods one can use</p> <pre><code>System.Reflection.MethodBase.GetCurrentMethod().Name; </code></pre> <p><a href="https://learn.microsoft.com/en-us/dotnet/api/system.reflection.methodbase.getcurrentmethod" rel="noreferrer">https://learn.microsoft.com/en-us/dotnet/api/system.reflection.m...
<pre><code>new StackTrace().ToString().Split("\r\n",StringSplitOptions.RemoveEmptyEntries)[0].Replace("at ","").Trim() </code></pre>
6,584
<p>Is there a way to perform a full text search of a subversion repository, including all the history?</p> <p>For example, I've written a feature that I used somewhere, but then it wasn't needed, so I svn rm'd the files, but now I need to find it again to use it for something else. The svn log probably says something ...
<pre><code>git svn clone &lt;svn url&gt; </code></pre> <pre><code>git log -G&lt;some regex&gt; </code></pre>
<p>I came across this <a href="http://www.m0interactive.com/archives/2009/04/23/quick_way_searching_comments_from_svn_using_bash_script.html" rel="nofollow">bash script</a>, but I have not tried it.</p>
6,586
<p>Is anyone using Virtual PC to maintain multiple large .NET 1.1 and 2.0 websites? Are there any lessons learned? I used Virtual PC recently with a small WinForms app and it worked great, but then everything works great with WinForms. ASP.NET development hogs way more resources, requires IIS to be running, requires...
<p>I've used VirtualPCs for a few years for development of some fairly hefty web apps without much problem. Lots of RAM is important. I keep my VPCs on an external USB drive and they perform great from there. This gives me the flexibility to take the drive with me if I need to do work somewhere else... just install...
<p>As long as you have the resources (separate hard disk for the virtual machine, sufficient RAM), I don't see why you would have any problems.</p>
5,119
<p>I am looking for troubleshooting help on my printer. Recently the hot end just can muster the courage to go past about 70 °C.</p> <p>The hardware - Ender 3V2 with a E3D V6 hot end. 24 volts</p> <p>I changed the thermistor to a new one. Before heating, it registers an appropriate 10 °C in line with the bed temp senso...
<h2>TL;DR:</h2> <p>Print more PLA on top of them, and pull it off together.</p> <h2>Preparation</h2> <p>First, of course, clean it well with IPA. This will both ensure there's no oil or other material on top of the PLA that will prevent it from bonding well with new PLA, and start to work underneath it to get it loose....
<p>If you can feel it with your finger, then you can scrape it off. Just be careful. Keep the scraper closer to horizontal and don't dig in. It doesn't really need much effort.</p> <p>If you can't feel it with your finger then it doesn't matter. Just clean as normal and carry on printing over it.</p>
2,117
<p>After reading <a href="https://stackoverflow.com/questions/9033/hidden-features-of-c">Hidden Features of C#</a> I wondered, What are some of the hidden features of Java?</p>
<p><a href="http://www.c2.com/cgi/wiki?DoubleBraceInitialization" rel="nofollow noreferrer">Double Brace Initialization</a> took me by surprise a few months ago when I first discovered it, never heard of it before.</p> <p><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/ThreadLocal.html" rel="nofollow noref...
<p>Surprises me that an interface can extend multiple interfaces but class can extend only one class.</p>
3,631
<p>I'm using Hudson and Maven 2 for my automated build/CI. I can build fine with maven from the command line, but when I run the same goal with Hudson, the build fails complaining of missing artifacts. I'm running Hudson as a windows XP service.</p>
<p>Besides another commercial product, like <a href="http://www.wowzamedia.com/" rel="nofollow noreferrer">Wowza Media Server</a>, you could go with a CDN (Content Delivery Network), like <a href="http://www.limelightnetworks.com/" rel="nofollow noreferrer">Limelight Networks</a> or <a href="http://www.voxel.net/" rel=...
<p>It looks like WebOrb can do it: <a href="http://www.themidnightcoders.com/weborb/dotnet/faq.shtm" rel="nofollow noreferrer">WebOrb FAQ</a> (last entry)</p> <blockquote> <p>Can I stream Flash video to a Flex/Flash client through WebORB? Yes, WebORB supports FLV video streaming. An example is included with the We...
6,582
<p>I have a sequence of migrations in a rails app which includes the following steps:</p> <ol> <li>Create basic version of the 'user' model</li> <li>Create an instance of this model - there needs to be at least one initial user in my system so that you can log in and start using it</li> <li>Update the 'user' model to ...
<p>The easiest way to avoid this issue is to use <code>rake db:schema:load</code> on the second machine, instead of db:migrate. <code>rake db:schema:load</code> uses schema.rb to load the most current version of your schema, as opposed to migrating it up form scratch.</p> <p>If you run into this issue when deploying to...
<p>I'm having to do this right now. Building upon BiHi's advice, I'm loading the model manually then redefining methods where I need to.</p> <pre><code>load(File.join(RAILS_ROOT,"app/models/user.rb")) class User &lt; ActiveRecord::Base def before_validation; nil; end # clear out the breaking before_validation def ...
8,738
<p>I'm working on a Rails app and am looking to include some functionality from "<a href="https://stackoverflow.com/questions/42566/getting-the-hostname-or-ip-in-ruby-on-rails">Getting the Hostname or IP in Ruby on Rails</a>" that I asked.</p> <p>I'm having problems getting it to work. I was under the impression that ...
<p>You haven't described how you're trying to use the method, so I apologize in advance if this is stuff you already know.</p> <p>The methods on a module never come into use unless the module is included into a class. Instance methods on a class require there to be an instance of the class. You probably want a class...
<p><code>require</code> and <code>include</code> are two different things.</p> <p><code>require</code> is to strictly load a file once from a load path. The loadpath is a string and this is the key used to determine if the file has already been loaded.</p> <p><code>include</code> is used to "mix-in" modules into oth...
6,709
<p>I recently installed Ubuntu on a VirtualBox VM it installed just fine (much easier than on VirtualPC). However I'm unable to get internet access from the guest OS (ie. Ubuntu). Can anyone give me any pointers on how I might enable this?</p> <p>The Host OS is Windows Vista and the hardware is an IBM Lenovo.</p>
<p>How did you configure networking when you created the guest? The easiest way is to set the network adapter to NAT, if you don't need to access the vm from another pc.</p>
<p>I had a similar issue in windows 7 + ubuntu 12.04 as guest. I resolved by</p> <ul> <li>open 'network and sharing center' in windows</li> <li>right click 'nw-bridge' -> 'properties'</li> <li>Select "virtual box host only network" for the option "select adapters you want to use to connect computers on your local netw...
5,586
<p>I'm considering developing a website similar to stackoverflow, but the answers may also consist of drawings (schematics, in this case). I want to have an area in the answer form where they can make this schematic without requiring special plugins, etc. </p> <ol> <li>Are we to the point where SVG has or should hav...
<p>Unfortunately, I don't have an answer, but I do have three pointers to projects that you could look at.</p> <p>The first is the <a href="http://Research.Sun.Com/projects/lively/" rel="noreferrer" title="Lively Kernel">Lively Kernel</a> by Dan Ingalls (yes, <em>the</em> Dan Ingalls) at Sun Labs. It is an implementat...
<p>1/ probably never - if IE wanted to add it, then I would have though it would have done so by now; but there are workarounds using <a href="http://www.intertwingly.net/blog/2007/05/04/Inline-SVG-in-MSIE" rel="nofollow noreferrer">SilverLight</a> and <a href="http://starkravingfinkle.org/blog/2006/03/svg-in-ie-update...
5,339
<p>So I am missing small sections of a layer when it prints, after a retraction for a layer change or a move, the extruder stops moving (no it isn't clicking or anything else. Just not moving). Which is fine for a few millimeters because the pressure inside the Bowden setup keeps pushing enough filament through. Howeve...
<p>I have made some learning on mechanical setup and discovered some issues on my printer, there are few:</p> <ol> <li>Bed warped, even with glass (thin thickness), making BAL confused with Z-movement over the bed.</li> <li>Overextrusion making layer oversized in terms of thickness.</li> <li>Some of missing mechanical...
<p>The first picture seems to show layer shift. Usual causes include:</p> <ol> <li>Missed Z movement, so the nozzle hits the build and the layer is offset.</li> <li>Bad acceleration in X/Y, so there is missed X/Y movement, and the layer is offset.</li> </ol> <p>Adjustment: reduce Z G0 speed, and reduce X/Y speeds (G0...
698
<p>Or vice versa.</p> <p>Update:<br> Hmm, let's assume I have a shopping cart app, the user clicks on the Checkout button. The next thing I want to do is send the user to a Invoice.aspx page (or similar). When the user hits checkout, I could <code>Button.PostBackURL = "Invoice.aspx"</code></p> <p>or I could do </p> ...
<ul> <li>Server.TransferURL will not result in a roundtrip of HTTP request/response. The address bar will not update, as far as the browser knows it has received only one document. Server.Transfer also retains execution context, so the script "keeps going" as opposed to "starts anew".</li> <li>PostbackURL ensures an H...
<p>Server.Transfer is done entirely from the server. Postback is initiated from the client for posting form contents and postback url identifies the page to post to.</p> <p>Maybe you meant to compare with Response.Redirect, which forces the client to submit a new request for a new url.</p>
9,159
<p>When trying to execute from within Visual Studio 2008 your application and you get the (uninformative) message "The operation could not be completed".</p> <p>The solution to this is to turn off the "Visual Studio Hosting Process".</p> <p>The problem with turning off this "hosting process" is that all the "run and ...
<blockquote> <p>The problem with turning off this "hosting process" is that all the "run and rewrite" functionality is no longer available.</p> </blockquote> <p>The Visual Studio Hosting Process is not needed to allow Edit and Continue. It is used for "Design time expression Evalutation" in the case where the proje...
<p>Probably your web hosting already turn of the network function, you can open a ticket to contact with your web host to confirm, or anything you did would be useless.</p> <p>Some <a href="http://www.webhost4lifereview.com/visual-studio-hosting/" rel="nofollow">visual studio hosting</a> can be found at here.</p> <p>...
5,337
<p>When restoring a SQL Server Database, I notice that there are 3 different Recovery States to choose from:</p> <ul> <li>Restore with Recovery</li> <li>Restore with No Recovery</li> <li>Restore with Standby</li> </ul> <p>I've always left it at it's default value, but what do they all mean?</p> <p>(Preferably in lay...
<p>GateKiller,</p> <p>In simple terms (and not a copy-paste out of the SQLBOL) so you can understand the concepts:</p> <p>RESTORE WITH RECOVERY uses the backup media file (eg. fulldata.bak) to restore the database to back to the time that backup file was created. This is great if you want to go back in time to resto...
<p>From Books On line, i think it is pretty clear after you read it</p> <p><strong>NORECOVERY</strong></p> <p>Instructs the restore operation to not roll back any uncommitted transactions. Either the NORECOVERY or STANDBY option must be specified if another transaction log has to be applied. If neither NORECOVERY, RE...
2,951
<p>How are people unit testing their business applications? I've seen a lot of examples of unit testing with "simple to test" examples. Ex. a calculator. How are people unit testing data-heavy applications? How are you putting together your sample data? In many cases, data for one test may not work at all for another t...
<p>I have to second the comment by @Phil Bennett as I try to approach these integration tests with a rollback solution.</p> <p>I have a very detailed post about integration testing your data access layer <a href="https://stackoverflow.com/questions/12374/has-anyone-had-any-success-in-unit-testing-sql-stored-procedures...
<p>For lots of different runs over the same logic but with different data you can use CSV, as many columns as you like for the input and the last for the output etc.</p>
5,949
<p>We have an SEO team at my office, and one of their dictums is that having lots of &lt;script&gt; blocks inline with the HTML is apocalypticly bad. As a developer that makes no sense to me at all. Surely the Google search engineers, who are the smartest people on the planet, know how to skip over such blocks? <br /> ...
<p>It's been ages since I've played the reading google's tea leafs game, but there are a few reasons your SEO expert might be saying this</p> <ol> <li><p>Three or four years back there was a bit of conventional wisdom floating around that the search engine algorithms would give more weight to search terms that happene...
<p>I've spent some time working on search engines (not Google), but have never really done much from an SEO perspective.</p> <p>Anyway, here are some factors which Google could reasonably use to penalise the page which should be increased by including big blocks of javascript inline.</p> <ul> <li>Overall page size.</...
7,022
<p>For those who did not know, linking to off-site content in answers is a no-go at SE sites unless you provide context. From <a href="https://3dprinting.stackexchange.com/help/how-to-answer">help</a>:</p> <blockquote> <p><strong>Provide context for links</strong><br>Links to external resources are encouraged, but...
<p><em>Copied from chat</em></p> <hr> <p>I agree about the posting of the entire configuration file or G-code in a question is too big to fit, etc. What is really needed, and I've thought this for a long time, is a SE sanctioned version of PasteBin [functionality]. A persistent scrapbook/scratchpad site internal to S...
<p>A possibility is to allow off-site content for the OP to post. Once the problem is spotted, the one answering the question could update the question with relevant parts of the off-site content, or copy the relevant parts into the answer.</p>
63
<p>I'm struggling with bed adhesion for nylon on a glass bed (122 °C measured) in an enclosed chamber (45 °C near the front, likely more on top of the print bed). I used a glue stick to enhance adhesion, but after around 20 minutes the print comes off the bed.</p> <p>I tried a <a href="https://www.123-3d.nl/123inkt-lij...
<p>Not all glue sticks work! The working ingredient of a glue stick is <a href="http://en.wikipedia.org/wiki/Polyvinylpyrrolidone" rel="nofollow noreferrer">Polyvinylpyrrolidone</a>; a more elaborate answer is found <a href="https://3dprinting.stackexchange.com/a/11183/">here</a> on question: <a href="https://3dprintin...
<p>Not all glue sticks work! The working ingredient of a glue stick is <a href="http://en.wikipedia.org/wiki/Polyvinylpyrrolidone" rel="nofollow noreferrer">Polyvinylpyrrolidone</a>; a more elaborate answer is found <a href="https://3dprinting.stackexchange.com/a/11183/">here</a> on question: <a href="https://3dprintin...
1,826
<p>I am trying to run this 3D printer:</p> <ul> <li>Fabrikator Mini V2 Turnigy/Malyan M100</li> </ul> <p>Does anyone have the Cura settings?</p>
<p>I googled your machine name and found this HobbyKing page. There is a link here to CURA settings. </p> <p><a href="https://hobbyking.com/en_us/mini-fabrikator-v2-3d-printer-us-plug.html" rel="nofollow noreferrer">Page with CURA settings</a></p>
<p>I thought it better if I included the Cura profile settings, pointed to in <a href="https://3dprinting.stackexchange.com/questions/10157/cura-settings-for-fabrikator-mini-v2-turnigy-or-malyan-m100/10166#10166">cmm's answer</a>, here, in case of link death:</p> <pre><code>[profile] layer_height = 0.2 wall_thickness ...
1,336
<p>I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers.</p> <p>So the whole idea is to use a LAMP server, Java Application Server (Tomcat or J...
<p>My 2c:</p> <p>I'd recommend basing your system on <a href="http://www.debian.org/" rel="nofollow noreferrer">Debian</a> - the <a href="http://wiki.debian.org/Apt" rel="nofollow noreferrer">apt</a> system has become the de-facto way to quickly install and update programs on Linux. <a href="http://www.ubuntu.com/" re...
<p>I suggest you should checkout the following three distros:</p> <ul> <li><p><a href="http://www.damnsmalllinux.org/" rel="nofollow noreferrer">Damn Small Linux</a> - Very lightweight. Includes its own lightweight browser (Dillo), but you can install Firefox easily. The entire distro fits on a 50MB LiveCD.</p></li> <...
5,808
<p>I am trying to figure out how to wire up Auto Bed Leveling (ABL) on my Ender 3 using the optocoupler and inductive proximity sensor below. </p> <p>I cannot figure out how to wire it all together, all the tutorials I have found are for 2 and 3 wire per side of the optocoupler.</p> <p><a href="https://i.stack.imgur...
<p>Connecting is pretty straightforward like the other modules, difference is an extra input lead.</p> <p>From e.g. <a href="https://www.desertcart.ae/products/92694483-noyito-optocoupler-isolation-mos-fet-10-a-dc-2-7-27-v-high-power-field-effect-tube-driver-module-0-20-khz-pwm-switch-control-board-development-board-m...
<p>This is a bit of an <em>addendum</em> to 0scar's answer, as I didn't want to edit it in to his post.</p> <p>For completion, the sensor's internal schematic is on the side of the sensor itself<sup>1</sup>:</p> <p><a href="https://i.stack.imgur.com/DbsjD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.c...
1,290
<p>As part of our databuild run a 3rd party program (3D Studio Max) to export a number of assets. Unfortunately if a user is not currently logged in, or the machine is locked, then Max does not run correctly.</p> <p>This can be solved for freshly booted machines by using a method such as TweakUI for automatic login. H...
<p>There is a separate terminal service connection available called the 'console' connection.</p> <p>You can connect to this space using mstsc /console /v:servername. Use mstsc /? for full command line options.</p> <p>This allows you to connect, open up the terminal services manager and boot the bad sessions.</p>
<p>You might want to look at using the "shadow" utility. This allows you to essentially proxy into an existing remote desktop session. You could log into the console of the machine with the account you need, then users could open non-console remote desktop sessions to the machine (or to another machine) then use shado...
3,927
<p>I would like to understand the differences between rafts, skirts and brims. They appear in the software which I'm using to edit my 3D objects.</p> <p>Can anybody elaborate what are these and what are the main differences between them?</p>
<p><strong>Rafts:</strong></p> <p>Rafts are a few layers of plastic a placed on the printing surface before the object is printed. If non water dissoluble filament is used, a bit of an air gap will be placed between the raft and the print itself so it can be removed easily. A raft can help a print stick to the printi...
<p>All three of these features are used to improve the quality and success rate of prints, especially those failing due to issues on the first few layers, or due to the small size of the first layer.</p> <h1>Raft</h1> <p>A raft is a horizontal feature made as the first few layers of a print, and is used to help with be...
94
<p>I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project).<br> As a result, the project would no longer compile with previous versions of the li...
<p>I think if I were going to do this, I would use tags. It would be pretty easy to write a script that would tag both repositories with the same ID each time you upgraded the library and used it in the project. Then, if you need to roll back to a previous version, you just see what its most recent tag was, and roll ...
<p>One option is to use a single subversion repository and check-in changes that effect both library and project at the same time. That way you know that whatever revision of the project you are on requires the same revision of the library.</p>
4,350
<p>What is the operator precedence order in Visual Basic 6.0 (VB6)?</p> <p>In particular, for the logical operators.</p>
<h3>Arithmetic Operation Precedence Order</h3> <ol> <li><code>^</code></li> <li><code>-</code> (unary negation)</li> <li><code>*</code>, <code>/</code></li> <li><code>\</code></li> <li><code>Mod</code></li> <li><code>+</code>, <code>-</code> (binary addition/subtraction)</li> <li><code>&amp;</code></li> </ol> <h3>Compa...
<h1><strong>Use parentheses</strong></h1> <hr> <p>EDIT: That's my advice for new code! But Oscar is reading someone else's code, so must figure it out somehow. I suggest the VBA manual topic <a href="https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/operator-precedence" rel="nofollo...
7,893
<p>My automated script for starting and stopping VMWare Server virtual machines has stopped working. vmware-cmd has started raising the error: </p> <blockquote> <p>The ordinal 3288 could not be located in the dynamic link library LIBEAY32.dll.</p> </blockquote> <p>I am not aware of any specific change or update whe...
<p>Have discovered that this only occurs when the script is run on a different drive to the one where the EXE is located. As a work around for this I have simply moved the scripts execution.</p> <p>Apparently the DLL relates to SSL, which isn't relevant to what I'm doing, so this is a suitable workaround. I'm guessi...
<p>Please check your path settings and see if you have included "C:\Program Files\VMware\VMware Workstation" for VMWare management purpose. Once you delete it, you won't see the error no more.</p>
4,976
<p><a href="https://stackoverflow.com/questions/20702/whats-youra-good-limit-for-cyclomatic-complexity">This question</a> on <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity" rel="nofollow noreferrer">Cyclomatic Complexity</a> made me think more about <a href="http://en.wikipedia.org/wiki/Static_code_analysi...
<p>I have been setting up a Hudson continuous integration (CI) build system for my Objective-C iPhone projects (iOS apps), and have compiled a varied list of tools that can be used to analyze my projects during a build:</p> <ul> <li><p><strong>Clang static analyzer</strong>: free, up-to-date stand-alone tool that catc...
<p>The only time I've ever used one of those tools is Split (C programming language). I thought it was helpful, but I was by no means a power user and I think I barely scratched the surface of what it could do.</p>
4,113
<p>Say a user is browsing a website, and then performs some action which changes the database (let's say they add a comment). When the request to actually add the comment comes in, however, we find we need to force them to login before they can continue.</p> <p>Assume the login page asks for a username and password, a...
<p>This is one good place where Ajax techniques might be helpful. When the user clicks the submit button, show the login dialog on client side and validate with the server before you actually submit the page.</p> <p>Another way I can think of is showing or hiding the login controls in a DIV tag dynamically in the main...
<p>Collect the data on the page they submitted it, and store it in your backend (database?) while they go off through the login sequence, hide a transaction id or similar on the page with the login form. When they're done, return them to the page they asked for by looking it up using the transaction id on the backend, ...
7,669