instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode.</p>
<p>Any idea how/where to find one?</p>
<p>(I'm assuming that since Ble... | <p>Is this link related?</p>
<p><a href="http://blenderartists.org/forum/showthread.php?t=77794" rel="nofollow noreferrer">http://blenderartists.org/forum/showthread.php?t=77794</a></p>
<p>To generate terrain (height map) the algorithm is pretty simple (fractal plasma), something like this algorithm (Java):</p>
<p><... | <p>You should be able to reprogram most of the python scripts available to generate terrain for rendering to generate terrain for your game... is there a specific thing you <em>need</em> from the script to make it suitable for realtime gameplay instead of a static render?</p>
| 5,173 |
<p>The company I just started working for is using <a href="http://www.stripesframework.org/display/stripes/Home" rel="noreferrer">Stripes</a> for parts of its web page development these days, and while it seems to be a nice enough web framework it no one really uses it-- it is almost non existent on the 'net. It's not... | <p>I've never used (or even heard of) Stripes.</p>
<p>Regardless, there's a book from <a href="http://www.pragprog.com/" rel="nofollow noreferrer">The Pragmatic Bookshelf</a> called <a href="http://www.pragprog.com/titles/fdstr/stripes" rel="nofollow noreferrer">Stripes: ...and Java web development is fun again</a> th... | <p>We considered it when we were looking at open source frameworks. But we saw the same thing your did that there really just isn't much support or information for it. You should always weight the community support factor surrounding open source projects before picking one. (which is what you are doing here)</p>
| 3,649 |
<p>I would like to have a Guile script, which implements functions, which output test result messages according to the TAP protocol.</p>
| <p>The following script, to be named guiletap.scm, implements the frequently-needed functions for using the TAP protocol when running tests.</p>
<pre>; Define functions for running Guile-written tests under the TAP protocol.
; Copyright © 2008 by Omer Zak
; Released under the GNU LGPL 2.1 or (at your option) any ... | <p>The following script, to be named guiletap.scm, implements the frequently-needed functions for using the TAP protocol when running tests.</p>
<pre>; Define functions for running Guile-written tests under the TAP protocol.
; Copyright © 2008 by Omer Zak
; Released under the GNU LGPL 2.1 or (at your option) any ... | 9,763 |
<p>In Perl, what is a good way to perform a replacement on a string using a regular expression and store the value in a different variable, without changing the original?</p>
<p>I usually just copy the string to a new variable then bind it to the <code>s///</code> regex that does the replacement on the new string, but... | <p>This is the idiom I've always used to get a modified copy of a string without changing the original:</p>
<pre><code>(my $newstring = $oldstring) =~ s/foo/bar/g;
</code></pre>
<p>In perl 5.14.0 or later, you can use the new <code>/r</code> <a href="https://metacpan.org/pod/release/FLORA/perl-5.14.2/pod/perl5140delta.... | <p>If you write Perl with <code>use strict;</code>, then you'll find that the one line syntax isn't valid, even when declared.</p>
<p>With:</p>
<pre><code>my ($newstring = $oldstring) =~ s/foo/bar/;
</code></pre>
<p>You get:</p>
<pre><code>Can't declare scalar assignment in "my" at script.pl line 7, near ") =~"
Exe... | 4,287 |
<p>I've been 3D printing as a hobby for a couple of years now, and have always heard how 3D printing is great for prototyping, but once you get beyond 10 or 20 pieces it's just not cost competitive with other technologies. I just accepted this to be truth, and have even told some of the customers I've gotten through 3... | <h1>TL:DR</h1>
<p>3D printing is great for low quantities of items, but terrible for large quantities of items. This is a continuous scale and as your quantity grows, the drawbacks of 3D printing become more pronounced. In your situation, you seem to be dancing in the nebulous zone where there isn't really a good an... | <p>Break even points have always been dependent on the part.
If the goal is to make a rod or filament-like piece of your extrusion nozzle diameter, your extruder may be pretty competitive. Additive manufacture has come a long way already so the break even points may have shifted. Interestingly a great use for additive... | 555 |
<p>How do I format a string to <a href="http://www.grammar-monster.com/lessons/capital_letters_title_case.htm" rel="noreferrer">title case</a>?</p>
| <p>Here is a simple static method to do this in C#:</p>
<pre><code>public static string ToTitleCaseInvariant(string targetString)
{
return System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(targetString);
}
</code></pre>
| <p>Without using a ready-made function, a super-simple low-level algorithm to convert a string to title case:</p>
<p><pre><code>
convert first character to uppercase.
for each character in string,
if the previous character is whitespace,
convert character to uppercase.
</pre></code></p>
<p>This asssumes t... | 2,316 |
<p>The version of <strong>Subclipse (1.2.4)</strong> currently available through Aptana's automatic <em>Plugins Manager</em> does not work with the newest version of Subversion.</p>
<p>I see on the Subclipse website however that they have 1.4.2 out for Eclipse. So I added a <a href="http://subclipse.tigris.org/update_... | <p>Subclipse does not require Mylyn, but the update site includes a plugin that integrates Mylyn and Subclipse. This is intended for people that use Mylyn. In your case, you would want to just de-select Mylyn in the update dialog.</p>
<p>Subclipse also requires Subversion 1.5 and the corresponding version of the Jav... | <p>I used the update url and I installed the JavaHL adapter, the Subclipse project itself <b>and</b> the SVNKit adapter BETA.</p>
<p>After this it worked fine for me, this is for linux platform hope it works for you.</p>
| 2,249 |
<p>I believe I need a DTD to define the schema and an XSLT if I want to display it in a browser and have it look "pretty". But I'm not sure what else I would need to have a well-defined XML document that can be queried using XQuery and displayed in a web browser.</p>
| <p>Strictly speaking, you need nothing. XML, even without a schema definition, works.</p>
<p>A schema definition (in XSD, RelaxNG or DTD) helps various tools that work with the XML, because they can verify that the structure of the XML conforms to what you want.</p>
<p>An XSLT translation to HTML is nice if the XML c... | <p>Strictly speaking, you need nothing. XML, even without a schema definition, works.</p>
<p>A schema definition (in XSD, RelaxNG or DTD) helps various tools that work with the XML, because they can verify that the structure of the XML conforms to what you want.</p>
<p>An XSLT translation to HTML is nice if the XML c... | 9,048 |
<p>On Mac OS X 10.5 I downloaded the latest version of Apache 2.2.9. After the usual configure, make, make install dance I had a build of apache without mod_rewrite. This wasn't statically linked and the module was not built in the /modules folder either.</p>
<p>I had to do the following to build Apache and mod_rewrit... | <p>Try the <code>./configure</code> option <code>--enable-mods-shared="all"</code>, or <code>--enable-mods-shared="<list of modules>"</code> to compile modules as shared objects. See further <a href="http://httpd.apache.org/docs/2.2/programs/configure.html#otheroptfeat" rel="noreferrer">details in Apache 2.2 doc... | <pre><code>./configure --prefix=/usr/local/apache2 --enable-mods-shared="all" --enable-proxy=shared
</code></pre>
<p>To get rewrite, proxy and bunch of other modules, I used the above command. In my previous installation, using --enable-mods-shared="all" compiled/installed the proxy module as well. But in <code>v2.2.2... | 5,774 |
<p>How do I figure out if an array contains an element?
I thought there might be something like <code>[1, 2, 3].includes(1)</code> which would evaluate as <code>true</code>.</p>
| <p>Some syntax sugar</p>
<pre><code>1 in [1,2,3]
</code></pre>
| <p>You can also use matches with regular expression like this:</p>
<pre><code>boolean bool = List.matches("(?i).*SOME STRING HERE.*")
</code></pre>
| 7,514 |
<p>When I open cmd on my laptop it is defaulting to the F: drive. This is troubling me does anyone know how it got that way or how to get it back to where it opens to the C: drive by default?</p>
| <p>I believe it defaults to <code>%HOMEDRIVE%\%HOMEPATH%</code> so if you can muck about with those environment variables that might be an option. I can't edit these environment variables on my company's network, so I had to use the <a href="http://technet.microsoft.com/en-us/library/cc756720.aspx" rel="nofollow noref... | <p>If you are opening it from a shortcut change the working dir for the shortcut.</p>
| 6,598 |
<p>In MS SQL Server, I create my scripts to use customizable variables:</p>
<pre><code>DECLARE @somevariable int
SELECT @somevariable = -1
INSERT INTO foo VALUES ( @somevariable )
</code></pre>
<p>I'll then change the value of <code>@somevariable</code> at runtime, depending on the value that I want in the particu... | <p>Postgres variables are created through the \set command, for example ...</p>
<pre><code>\set myvariable value
</code></pre>
<p>... and can then be substituted, for example, as ...</p>
<pre><code>SELECT * FROM :myvariable.table1;
</code></pre>
<p>... or ...</p>
<pre><code>SELECT * FROM table1 WHERE :myvariable I... | <p>I've posted a new solution for this <a href="https://stackoverflow.com/questions/13316773/is-there-a-way-to-define-a-named-constant-in-a-postgresql-query/54322738#54322738">on another thread</a>.</p>
<p>It uses a table to store variables, and can be updated at any time. A static immutable getter function is dynamic... | 5,758 |
<p>How do you set your Cocoa application as the default web browser?</p>
<p>I want to create an application that is launched by default when the user clicks on an HTTP or HTTPS link in other applications (Mail, iChat etc.).</p>
| <p>There are four steps to making an app that can act as the default web browser. The first three steps allow your app to act as a role handler for the relevant URL schemes (HTTP and HTTPS) and the final step makes it the default role handler for those schemes.</p>
<p><strong>1) Add the URL schemes your app can handle... | <p>In order to appear as an option on <code>System Preferences > General > Default web browser</code> (at least for macOS 11) you need to add the document types for <strong>HTML</strong> and <strong>XHTML</strong> to the <em>Info.plist</em> (after the 4 steps already described on the <a href="https://stackoverflo... | 7,212 |
<p>When trying to use <code>libxml2</code> as myself I get an error saying the package cannot be found. If I run as as super user I am able to import fine.</p>
<p>I have installed <code>python25</code> and all <code>libxml2</code> and <code>libxml2-py25</code> related libraries via fink and own the entire path includi... | <p>Check your path by running:</p>
<pre><code>'echo $PATH'
</code></pre>
| <p>I would suspect the permissions on the library. Can you do a strace or similar to find out the filenames it's looking for, and then check the permissions on them?</p>
| 9,402 |
<p>The firewall I'm behind is running Microsoft ISA server in NTLM-only mode. Hash anyone have success getting their Ruby gems to install/update via Ruby SSPI gem or other method?</p>
<p>... or am I just being lazy?</p>
<p>Note: rubysspi-1.2.4 does not work.</p>
<p>This also works for "igem", part of the IronRuby pr... | <p>I wasn't able to get mine working from the command-line switch but I have been able to do it just by setting my <code>HTTP_PROXY</code> environment variable. (Note that case seems to be important). I have a batch file that has a line like this in it:</p>
<pre><code>SET HTTP_PROXY=http://%USER%:%PASSWORD%@%SERVER%:%... | <p>for anyone tunnelling with SSH; you can create a version of the <code>gem</code> command that uses SOCKS proxy:</p>
<ol>
<li>Install <code>socksify</code> with <code>gem install socksify</code> (you'll need to be able to do this step without proxy, at least)</li>
<li><p>Copy your existing gem exe</p>
<pre><code>cp... | 2,642 |
<p>I currently have an MS Access application that connects to a PostgreSQL database via ODBC. This successfully runs on a LAN with 20 users (each running their own version of Access). Now I am thinking through some disaster recovery scenarios, and it seems that a quick and easy method of protecting the data is to use <... | <p>onnodb,</p>
<p>The PostgreSQL ODBC driver is <a href="http://www.postgresql.org/ftp/odbc/versions/msi/" rel="noreferrer">actively developed</a> and an Access front-end combined with PostgreSQL server, in my opinion makes a great option on a LAN for rapid development. I have been involved in a reasonably big system ... | <p>PostgreSQL works great as a backend for MS Access, there are a couple of support functions you should use to make things easier. See here for more info on this:</p>
<p><a href="http://www.amsoftwaredesign.com/smf/index.php?board=8.0" rel="nofollow noreferrer">http://www.amsoftwaredesign.com/smf/index.php?board=8.0... | 5,884 |
<p>I want to link to a specific slide in an online PowerPoint file, (e.g. <code>http://www.example.com/hello.ppt</code>) but what I want is that when people click on my link, it goes straight to the nth slide.</p>
<p>Is this possible?</p>
| <p>Link to </p>
<p><a href="http://www.whatever.com/hello.ppt" rel="nofollow noreferrer">http://www.whatever.com/hello.ppt</a><strong>#4</strong> </p>
<p>for slide 4 to be opened initially.</p>
<p>Take a look at this site:
<a href="http://www.tinyempire.com/shortnotes/files/specific_slide_in_ppt.htm" rel="nofollow n... | <p>The following method applies to any online version of PowerPoint (e.g. Office 365).</p>
<ol>
<li>Open the powerpoint file in your browser (the link could look like this: <a href="http://YourCompany.sharepoint.com/:p:/r/sites/SiteName/.." rel="nofollow noreferrer">http://YourCompany.sharepoint.com/:p:/r/sites/SiteNa... | 2,362 |
<p>A friend of mine told me there was a way to connect two private IPs without using a proxy server. The idea was that both computers connected to a public server and some how the server joined the private connections and won't use any more bandwidth.</p>
<p>Is this true? How's this technique named?</p>
| <p>There is a technique called "<a href="http://en.wikipedia.org/wiki/Hole_punching" rel="nofollow noreferrer">Hole Punching</a>" that works well with "Cone" NAT (Cone is a technical familly of router). That's not an 100% sure technique, today, it works well with UDP on about 80% of the router.</p>
<p>There is some im... | <p>This is true. It's the way <a href="https://www.copilot.com/" rel="nofollow noreferrer">FogCreek Copilot</a> works</p>
<p>Take a look at item 2 on Joel's <a href="http://www.joelonsoftware.com/items/2007/01/26.html" rel="nofollow noreferrer">Copilot 2.0 post</a>.</p>
| 6,587 |
<p>Particularly, what is the best snippets package out there?</p>
<p>Features:</p>
<ul>
<li>easy to define new snippets (plain text, custom input with defaults)</li>
<li>simple navigation between predefined positions in the snippet</li>
<li>multiple insertion of the same custom input</li>
<li>accepts currently select... | <p><a href="http://manual.macromates.com/en/snippets" rel="nofollow noreferrer">TextMate's snippets</a> is the most closest match but it is not a cross-platform solution and not for Emacs.</p>
<p>The second closest thing is <a href="http://github.com/joaotavora/yasnippet/" rel="nofollow noreferrer" title="Yet Another S... | <p>You can try a lightweight solution <a href="https://github.com/jiahaowork/muban.el" rel="nofollow noreferrer">muban.el</a></p>
<p>It is written completely in Elisp and has a very simple syntax.</p>
| 8,668 |
<p>I've been fighting on and off with issues with my build plate seemingly not being perfectly flat. I've ordered a machined straight-edge and some new feeler gauges to diagnose the problem (and test any potential replacement) better, but I'd like to get an idea of what options are available for obtaining a flatter bui... | <h2>It all depends on what you mean by "flat".</h2>
<p>Is the problem that the build plate isn't flat (perfectly planar), or is the problem that the distance to the build plate varies based on X and Y coordinates? They are very different problems.</p>
<p>"Bed Leveling" is the process of allowing the firmware to know... | <p>For evaluating the extent of a surface flatness problem and success of a solution, a real machined straightedge and decent feeler gauges are a huge help.</p>
<p>Using them to measure where the problem was, I found that a not-perfectly-flat but non-rigid build surface like the one I have can be corrected with shims,... | 1,589 |
<p>I have been working on a web services related project for about the last year. Our team found <a href="http://www.soapui.org" rel="noreferrer">soapUI</a> near the start of our project and we have been <em>mostly</em>(*) satisfied with it (the free version, that is).</p>
<p>My question is: are there other tools/cli... | <p>I use soapUI, and it's generally pretty good. Be aware that it seems to leak memory, and eventually it will no longer save your project, so save regularly!</p>
<p>This is about the only hassle I have with it (other than the general ugliness that almost every Java application has!), and I can't live without it.</p>... | <p>We've been using SoapUI since 1.x (will soon be adopting 3.0 from 2.5.1) and are all happy.
It's much more stable when running with native LnF (File - Preferences - UI Settings - Native LF).
I know it's available as an Eclipse plugin as well, but last I tried I failed to find how to add JAR-files to it (i.e. bin/ext... | 5,196 |
<p>I am using StretchImage because the box is resizable with splitters. It looks like the default is some kind of smooth bilinear filtering, causing my image to be blurry and have moire patterns. </p>
| <p>I needed this functionality also. I made a class that inherits PictureBox, overrides <code>OnPaint</code> and adds a property to allow the interpolation mode to be set:</p>
<pre><code>using System.Drawing.Drawing2D;
using System.Windows.Forms;
/// <summary>
/// Inherits from PictureBox; adds Interpolation Mo... | <p>When resizing an image in .net, the System.Drawing.Drawing2D.InterpolationMode offers the following resize methods:</p>
<ul>
<li>Bicubic</li>
<li>Bilinear</li>
<li>High</li>
<li>HighQualityBicubic</li>
<li>HighQualityBilinear</li>
<li>Low</li>
<li>NearestNeighbor</li>
<li>Default</li>
</ul>
| 4,885 |
<p>Is there any way to use this kind of format in .Net (C#)?
I want to use the same skin format that uTorrent uses in my app, but i can't get the transparent background.
Any ideas?
Thanks for your time.</p>
| <p>The PixelFormat enumeration lists the formats of 'bitmaps' you can create in .Net, so you'd want PixelFormat.Format32bppArgb:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixelformat.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixe... | <p>The PixelFormat enumeration lists the formats of 'bitmaps' you can create in .Net, so you'd want PixelFormat.Format32bppArgb:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixelformat.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixe... | 6,283 |
<p>I've used the CF <a href="http://blogs.msdn.com/stevenpr/archive/2006/04/17/577636.aspx" rel="nofollow noreferrer">Remote Performance Monitor</a>, however this seems to only track memory initialised in the managed world as opposed to the unmanaged world. Well, I can only presume this as the numbers listed in the pro... | <p>Try enabling <a href="http://blogs.msdn.com/stevenpr/archive/2005/06/22/431612.aspx" rel="nofollow noreferrer">Interop logging</a>.</p>
<p>Also, if you have access to the code of the native dll you are using, check this out: <a href="http://msdn.microsoft.com/en-us/netframework/bb630228.aspx" rel="nofollow noreferr... | <p>I've definitely been fighting with unmanaged issues in a C# managed app for a while -- it's not easy. </p>
<p>What I've found to be most helpful is to have a regular output to a text log file. For example you can print the output of <a href="http://msdn.microsoft.com/en-us/library/aa908760.aspx" rel="nofollow nore... | 3,153 |
<p>Is there any way to use inheritance in database (Specifically in SQL Server 2005)?</p>
<p>Suppose I have few field like <strong>CreatedOn</strong>, <strong>CreatedBy</strong> which I want to add on all of my entities. I looking for an alternative way instead of adding these fields to every table.</p>
| <p>There is no such thing as inheritance between tables in SQL Server 2005, and as noted by the others, you can get as far as getting help adding the necessary columns to the tables when you create them, but it won't be inheritance as you know it.</p>
<p>Think of it more like a template for your source code files.</p>... | <p>You could create a template in the template pane in Management Studio. And then use that template every time you want to create a new table.</p>
<p>Failing that, you could store the CreatedOn and CreatedBy fields in an Audit trail table referencing the original table and id.</p>
<p>Failing that, do it manually.</p... | 2,764 |
<p>I know that if you have a loop that modifies the count of the items in the loop, using the NSEnumerator on a set is the best way to make sure your code blows up, however I would like to understand the performance tradeoffs between the NSEnumerator class and just an old school for loop</p>
| <p>Using the new <code>for (... in ...)</code> syntax in Objective-C 2.0 is generally the fastest way to iterate over a collection because it can maintain a buffer on the stack and get batches of items into it.</p>
<p>Using <code>NSEnumerator</code> is generally the slowest way because it often copies the collection b... | <p>They are very similar. With Objective-C 2.0 most enumerations now default to <code>NSFastEnumeration</code> which creates a buffer of the addresses to each object in the collection that it can then deliver. The one step that you save over the classic for loop is not having to call <code>objectAtIndex:i</code> each t... | 5,297 |
<p>My web application generates pdf files and either e-mails or faxes them to our customers. Somehow IIS6 is keeping hold of the file and blocking any other requests for it claiming the old '..the process cannot access the file 'xxx.pdf' because it is being used by another process.'</p>
<p>When I recycle the applicati... | <p>As with everyone said, do call the <code>Close</code> and <code>Dispose</code> method on any IO objects you have open when reading/writing the PDF files.</p>
<p>But I suppose you'd incorporated a <strong>3rd party component?</strong> to do the PDF writing for you? If that's the case you might want to check with the... | <p>I'd look through your code and make sure all handles to open (generated) files have been closed properly. Sometimes you just can't rely on the garbage collector to sort these things out.</p>
| 9,752 |
<p>I have inherited an old crusty <code>PHP application</code>, and I'd like to refactor it into something a little nicer to deal with, but in a gradual manner. In perl's CPAN, there is a series of classes around Class::DBI that allow you to use database rows as the basis for objects in your code, with the library gene... | <p>It's now defunct but <a href="http://phpdbi.sourceforge.net/web/" rel="nofollow noreferrer">phpdbi</a> is possibly worth a look. If you're willing to let go of some of your caveats (the framework one), I've found that <a href="http://www.phpdoctrine.org/" rel="nofollow noreferrer">Doctrine</a> is a pretty neat way o... | <p>The right thing to is to access the database via an abstraction layer in a way such if you change your RDBMS or how you implemented that access, you only have to modify this layer while all the rest of your application remains untouched. </p>
<p>To do this, to free your application from knowing how to deal with the... | 2,973 |
<p>I have some strings of xxh:yym format where xx is hours and yy is minutes like "05h:30m". What is an elegant way to convert a string of this type to TimeSpan?</p>
| <p>This seems to work, though it is a bit hackish:</p>
<pre><code>TimeSpan span;
if (TimeSpan.TryParse("05h:30m".Replace("m","").Replace("h",""), out span))
MessageBox.Show(span.ToString());
</code></pre>
| <p>Are <a href="http://msdn.microsoft.com/en-us/library/system.timespan.parse.aspx" rel="nofollow noreferrer">TimeSpan.Parse</a> and <a href="http://msdn.microsoft.com/en-us/library/system.timespan.tryparse.aspx" rel="nofollow noreferrer">TimeSpan.TryParse</a> not options? If you aren't using an "approved" format, you... | 4,633 |
<p>I have a class that I want to use to store "properties" for another class. These properties simply have a name and a value. Ideally, what I would like is to be able to add <em>typed</em> properties, so that the "value" returned is always of the type that I want it to be.</p>
<p>The type should always be a primitive... | <p>I am not sure whether I understood your intentions correctly, but let's see if this one helps.</p>
<pre><code>public class TypedProperty<T> : Property where T : IConvertible
{
public T TypedValue
{
get { return (T)Convert.ChangeType(base.Value, typeof(T)); }
set { base.Value = value.To... | <pre><code>public class TypedProperty<T> : Property
{
public T TypedValue
{
get { return (T)(object)base.Value; }
set { base.Value = value.ToString();}
}
}
</code></pre>
<p>I using converting via an object. It is a little bit simpler.</p>
| 3,007 |
<p>Is there a simpler interface for end users to run "queries" on pre-existing SqlServer Analysis Service cubes? I'm looking for a way to deploy the cubes and allow the users to work with the data through a simpler interface than BIDS. Is this even possible?</p>
| <p>I would recommend Excel too. It is an environment that your users are familiar with anyway, and they will be able to perform additional analysis (totals etc) without learning any new interfaces.</p>
<p>However, I would advise against pivot tables as a method of getting the data into Excel. I once worked on a projec... | <p>Dundas has a set of tools that let you drag and drop dimensions/hierarchies/measures to create visualizations like charts and/or grids. The product name is Dundas Chart for ASP.NET Enterprise Edition, and it has a free demo.</p>
<p>ProClarity also had a suite of tools. Not sure how you get those tools any longer, ... | 7,244 |
<p>If one Googles for "difference between <code>notify()</code> and <code>notifyAll()</code>" then a lot of explanations will pop up (leaving apart the javadoc paragraphs). It all boils down to the number of waiting threads being waken up: one in <code>notify()</code> and all in <code>notifyAll()</code>.</p>
<p>Howeve... | <blockquote>
<p>However (if I do understand the difference between these methods right), only one thread is always selected for further monitor acquisition.</p>
</blockquote>
<p>That is not correct. <code>o.notifyAll()</code> wakes <em>all</em> of the threads that are blocked in <code>o.wait()</code> calls. The th... | <p>Waking up all does not make much significance here.
wait notify and notifyall, all these are put after owning the object's monitor. If a thread is in the waiting stage and notify is called, this thread will take up the lock and no other thread at that point can take up that lock. So concurrent access can not take p... | 5,764 |
<p>I am implementing a HttpRequestValidationException in my Application_Error Handler, and if possible, I want to display a custom message.</p>
<p>Now, I'm thinking about the StatusCode. In my current example, it sends a 200, which I think should not be done. I would like to send the (IMHO) more appropriate 400 Bad Req... | <p>An HTTP 200 Response Code does not indicate an error. It indicates that everything was OK. You should not use a 200 response code for an error. </p>
<p>Internet Explorer shows its "Friendly Errors" page if the response is less than 512 bytes. Here's more on this issue: <a href="http://weblogs.asp.net/scottgu/ar... | <p>No, it's certainly not a good practice. 2XX status codes mean (among other things) that the <strong>request is valid</strong>. Which is just the contrary to raising a HttpRequestValidationException.</p>
<p>I don't know how to make IE behave correctly, sadly. A slightly better way than to send a 200 would be to redi... | 7,352 |
<p>Is it possible to look back through the history of a Subversion repository for files of a certain name (even better would be for them to have a wildcard search)?</p>
<p>I want to see if a <code>.bat</code> file has been committed to the repository at some point in the past but has since been removed in later update... | <p>TortoiseSVN can search the logs very easily, and on my system I can enter ".plg" in the search box and find all adds, modifies, and deletes for those files.</p>
<p>Without Tortoise, the only way I can think of doing that would be to grep the full logs or parse the logs and do your own searching for 'A' and 'D' indi... | <p>Personally I'd use</p>
<pre><code>svnadmin dump -r1:HEAD /path/to/repo/
</code></pre>
<p>Pipe it into less and search or grep with some context.</p>
| 4,018 |
<p>What is the difference between <code>UNION</code> and <code>UNION ALL</code>?</p>
| <p><code>UNION</code> removes duplicate records (where all columns in the results are the same), <code>UNION ALL</code> does not.</p>
<p>There is a performance hit when using <code>UNION</code> instead of <code>UNION ALL</code>, since the database server must do additional work to remove the duplicate rows, but usually... | <p><code>UNION ALL</code> also works on more data types as well. For example when trying to union spatial data types. For example: </p>
<pre><code>select a.SHAPE from tableA a
union
select b.SHAPE from tableB b
</code></pre>
<p>will throw</p>
<p><code>The data type geometry cannot be used as an operand to the UNION,... | 7,253 |
<p>Alright, so maybe I shouldn't have shrunk this question sooo much... I have seen the post on <a href="https://stackoverflow.com/questions/622/most-efficient-code-for-the-first-10000-prime-numbers">the most efficient way to find the first 10000 primes</a>. I'm looking for <strong>all possible ways</strong>. The goa... | <p><a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes" rel="nofollow noreferrer">The Sieve of Eratosthenes</a> is a decent algorithm:</p>
<blockquote>
<ol>
<li>Take the list of positive integers 2 to any given Ceiling.</li>
<li>Take the next item in the list (2 in the first iteration) and remove all mul... | <p>If you're wanting to find a way of generating prime numbers, this have been covered in a <a href="https://stackoverflow.com/questions/622/most-efficient-code-for-the-first-10000-prime-numbers#2753">previous question</a>.</p>
| 2,891 |
<p>Which OS do you prefer to program on? Client or Server</p>
<p>There is a school of though that if you are doing (mostly) web programming (or other server based code), you should use a server OS for your dev machine, since that's closer to the environment where your app will be running.</p>
<p>Update: I should add,... | <p>OK, I know you're mainly talking about windows but...</p>
<p>I used to develop on windows for deployment on *nix servers. Sure there were <em>lots</em> of gotchas with this way of working, but you just kind of get used to it. </p>
<p>In October 2005 I switched to Linux, initially as an experiment, but I never went... | <p>Regardless of the operating system you're actually talking about, it shouldn't matter. Most applications you might write won't need to worry about the differences (if there indeed are any). Only in rare cases might you use some specific functionality that might only be available on a "server" edition of your OS.</p>... | 8,280 |
<p>I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table:</p>
<pre><code>ID COMPANY_ID EMPLOYEE
1 1 Anna
2 1 Bill
3 2 Carol
4 2 Dave
</code></pre>
<p>and I wanted to group by company_id to get so... | <h3>PostgreSQL 9.0 or later:</h3>
<p>Modern Postgres (since 2010) has the <a href="http://www.postgresql.org/docs/current/static/functions-aggregate.html#FUNCTIONS-AGGREGATE-TABLE" rel="noreferrer"><code>string_agg(expression, delimiter)</code></a> function which will do exactly what the asker was looking for:</p>
<pre... | <p>According to version PostgreSQL 9.0 and above you can use the aggregate function called string_agg. Your new SQL should look something like this:</p>
<pre><code>SELECT company_id, string_agg(employee, ', ')
FROM mytable GROUP BY company_id;
</code></pre>
| 6,550 |
<p>I have seen the references to VistaDB over the years and with tools like SQLite, Firebird, MS SQL et. al. I have never had a reason to consider it.</p>
<p>What are the benefits of paying for VistaDB vs using another technology? Things I have thought of:<br>
1. Compact Framework Support. SQLite+MSSQL support the C... | <p>The VistaDB client runtime is free. The runtime will never "expire at 3am" as you put it. Only the developer tools are licensed in that manner. You need 1 license per developer, simple. We even offer a really inexpensive Lite version with no Visual Studio tools.</p>
<p><b>Some other benefits</b></p>
<p><strong... | <p>I hadn't seen VistaDB before, it does look pretty cool.</p>
<p><b>Update:</b> Received a comment from someone from VistaDB - their update model is only for getting new versions. Your old ones won't stop working if your license expires, which is good to know.</p>
<p>Keeping the original post here as IMHO the warnin... | 7,899 |
<p>How would one display any add content from a "dynamic" aspx page? Currently I am working on using the System.Web.HttpResponse "Page.Response" to write a file that is stored on a web server to a web request.</p>
<p>This would allow people to hit a url to the type <a href="http://www.foo.com?Image=test.jpg" rel="nore... | <p>This is ugly, but the best way is to look at the file and set the content type as appropriate:</p>
<pre><code>switch ( fileExtension )
{
case "pdf": Response.ContentType = "application/pdf"; break;
case "swf": Response.ContentType = "application/x-shockwave-flash"; break;
case "gif": Response.Content... | <p>This is part of a solution I use on a local intranet. Some of the variables you will have to collect yourself as I pull them from a database but you may pull them from somewhere else.</p>
<p>The only extra but I've got in there is a function called <strong>getMimeType</strong> which connects to the database and pul... | 2,542 |
<p>This is a low-level systems question.</p>
<p>I need to mix 32 bit and 16 bit code because I'm trying to return to real-mode from protected mode. As a bit of background information, my code is doing this just after GRUB boots so I don't have any pesky operating system to tell me what I can and can't do.</p>
<p>Anyw... | <p>The problem turned out to be that I wasn't setting up my descriptor tables correctly. I had one bit flipped wrong so instead of going to 16-bit mode I was going to 32-bit mode (with segments that happened to have a limit of one meg). </p>
<p>Thanks for the suggestions!</p>
<p>Terry</p>
| <p>You weren't kidding about this being low-level!</p>
<p>Have you checked the generated opcodes / operands to make sure that nasm is honoring your BITS directives correctly? Also check to make sure the jump targets are correct - maybe nasm is using the wrong offsets.</p>
<p>If it's not a bug in nasm, maybe there is ... | 3,894 |
<p>What are the differences between <code>htmlspecialchars()</code> and <code>htmlentities()</code>. When should I use one or the other?</p>
| <p>From the PHP documentation for <a href="http://us2.php.net/htmlentities" rel="noreferrer">htmlentities</a>:</p>
<blockquote>
<p>This function is identical to <code>htmlspecialchars()</code> in all ways, except with <code>htmlentities()</code>, all characters which have HTML character entity equivalents are transl... | <pre><code>**HTML Character Entity Reference Chart at W3.org**
</code></pre>
<p><a href="https://dev.w3.org/html5/html-author/charref" rel="nofollow noreferrer">https://dev.w3.org/html5/html-author/charref</a></p>
<pre><code>&Tab;
&NewLine;
!
&excl;
"
&quot; &QUOT;
#
&num;
$
&dollar;
%
&am... | 6,860 |
<p>I have ms sql databases that grow very large. Upon examination I find that there is a bunch of unused space in certain tables. I don't do many physical deletes, so I don't think that its just deleted records. DBCC SHRINK doesn't make the file smaller. But, if I dump the table to a new, empty database, the size goes ... | <p>I have found that if you do not take care to backup your transistion log file (the LDF) you will get something like this behavior. I can not stress enough the importance of having good backup "hygiene". Not only will it save your bacon if something goes wrong but I will also help maintain a nice tight database.</p... | <p>In the options, you can specify how much you want to grow by. By default i believe it's 10%, so given a 200MB database, when you fill your last page, it will allocate another 20MB of page space. At 7GB it would allocate 700MB.</p>
<p>I don't know exactly where you can modify it after you create a db, but i know it ... | 6,857 |
<p>Is there anyway to configure a WCF service with a failover endpoint if the primary endpoint dies? Kind of like being able to specify a failover server in a SQL cluster.</p>
<p>Specifically I am using the TCP/IP binding for speed, but on the rare occurrence that the machine is not available I would like to redirect ... | <p>You need to use a layer 4 <a href="http://en.wikipedia.org/wiki/Load_balancing_%28computing%29#Relationship_with_failover" rel="nofollow noreferrer">load balancer</a> in front of the two endpoints. Prob best to stick with a dedicated piece of hardware.</p>
| <p>We've had good luck with BigIP as a solution, though it's not cheap or easy to set up. </p>
<p>One nice feature is it allows you to set up your SSL certificate (and backdoor to the CA) at the load balancer's common endpoint. Then you can use protocols to transfer the requests back to the WCF servers so the entire t... | 2,635 |
<p>I recently backed a 3D printer on Kickstarter, and I would like to 3D print parts for high-temperature applications. So I have two questions; </p>
<ol>
<li><p>What's the highest temperature polycarbonate can be safely heated to without warping or releasing toxins?</p></li>
<li><p>If there's a filament with better t... | <ul>
<li><p>Polycarbonate is <a href="https://rigid.ink/blogs/news/why-3d-print-with-polycarbonate-how-to-get-best-results" rel="noreferrer">heat-resistant up to ~120C</a>. Above this temperature it will gradually become flexible and may irreversibly bend. It will not generate any toxic fumes all the way up to ignition... | <p>All plastics have two temperatures to consider for operation and evaluation: </p>
<ol>
<li><p>Melting point = the temperature that plastics starts to get soft; this can be considered for maximum temperature operation.</p></li>
<li><p>Flow temperature = normally used for molding process and this have a wide range of... | 749 |
<p>I keep having a recurring problem with my ender 3 pro. The bowden tube keeps popping off here (pictured)</p>
<p><a href="https://i.stack.imgur.com/hWvUQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hWvUQ.jpg" alt="enter image description here" /></a></p>
<p>I've read elsewhere online where peo... | <p>If the fitting is remaining attached to the PTFE tubing, that would indicate that the threaded end of the fitting is pulling out of the drive assembly. This implies that the internal threads of the drive assembly have stripped out. This is not unusual for a plastic drive assembly.</p>
<p>The best solution is to repl... | <p>If the fitting is remaining attached to the PTFE tubing, that would indicate that the threaded end of the fitting is pulling out of the drive assembly. This implies that the internal threads of the drive assembly have stripped out. This is not unusual for a plastic drive assembly.</p>
<p>The best solution is to repl... | 1,818 |
<p>I'm getting zits or blobs in lithophanes while printing on my Ender 3 and 10S Pro. I tried a suggestion: change resolution in mesh fixes of Cura to 0.5 (from 0.05 default). That removed the zits.</p>
<p>But now there are white patches as shown in the image. I reduced the resolution to 0.2 but to no avail.</p>
<p>Any... | <p>In short, no. A 2D image has insufficient information to determine a 3D form.</p>
<p>If you want to do this yourself, what you could do is start with the 2D outline in a program like Blender (as 0scar mentioned in a comment), extrude it to make a thin "cardboard cutout", then begin shaping it into three di... | <p>If you only have a 2D photo then as others have already said its not really possible. However if you have the action figure itself you could try a technique called Photogrammetry where you use your phone to take multiple images of the object and then use software to build up a model. Search youtube for guides on Ph... | 2,009 |
<p>There are a number of obfuscation programs out there for .Net and I've tried one, my exe seems much slower when obfuscated. Do all obfuscation programs have the same effect or have I chosen a bad one? I'm hoping some are better than others, if you know of a fast one let me know.</p>
| <p>Obfuscation <em>shouldn't</em> change the runtime performance of your code. If it is then you've got a bad obfuscator that's doing much more than just obfuscating. All obfuscation should do is make your IL hard to read.</p>
| <p>There are <a href="http://howtoselectguides.com/dotnet/obfuscators/1st#dp_methods" rel="nofollow noreferrer">different obfuscation methods</a> that tools can use. There are the simple rename methods that should not affect performance in any way. Other methods might change the flow of the code. That could have a nega... | 9,010 |
<p>Specifically using stainless steel nozzles, but I guess it's worth knowing about brass too. Is there any reason to be concerned about dimensional accuracy of the nozzle or anything like that as a result of repeated heating with a butane torch? </p>
| <p>If you carbonize the filament or other particles that are clogging the nozzle, then you will never get them clean. In my experience, it's not worth cleaning the nozzle with anything other than cleaning filament. If that doesn't work then change the nozzle. Heating the metal nozzle with a torch will change the temper... | <p>If you can get the torch hot enough and you carbonise/burn the filament properly, it may work. You still need to do a cold pull to remove as many residues as you can, but if you heated it enough, the residuals maybe won't stick too much to the nozzle.</p>
<p>You already have the butane, try and tell us.</p>
| 1,628 |
<p>I can't seem to find that option.</p>
<p>Surely it's in there?</p>
| <p>That would be Tools > Options</p>
<p>Text Editor > All Languages > Line Numbers (at the bottom right)</p>
| <p>Tools -> Options -> Text Editor -> All languages. Near the bottom.</p>
| 8,332 |
<p>I've been working on calibrating my Taz Workhorse, and was dealing with some under-extrusion issues, despite checking the e-steps on the extruder and relatively modest retraction settings (2.5 mm at 25 mm/second).</p>
<p>Lulzbot tech support suggested I boost my flow to 105 % to account for this, and... | <p>It looks to me like you have corner curling on overhangs, which can be contributed to by a mix of:</p>
<ul>
<li>overextrusion (poor dimensional accuracy of filament or wrong filament diameter setting)</li>
<li>uneven extrusion (due to changes in the print head motion faster than the flow response to changes in the ... | <p>No, the print does not fail on over-extrusion, it fails by curled up parts of the print as of a filament heating/print part cooling issue.</p>
<p>If the curled up part has to be completely attached to the print bed (which is not the case after release of more information, but could be informative for others), your ... | 1,445 |
<p>Here is my understanding of Coasting: Coasting stops extruding early in a move so that the string itself will finish the layer.</p>
<p>Here is my understanding of Combing: Combing reduces the need to retract during travel moves by making sure that the nozzle oozes where you want it to on the way to the next point.<... | <p>If anything, combing and coasting allow to <strong>mitigate problems that are printer and filament specific</strong>, rather than dependent on particular STL models.</p>
<p><strong>Combing helps</strong> - as you imply in your question - <strong>with materials prone to oozing</strong> (e.g. PETG)</p>
<p><strong>Co... | <p>Coasting is good for filaments that ooze. The stop/up/start time at the end of a layer can be long enough that a visible seam appears if the layer starts in the same place. Transparent filaments also suffer from the velocity effect at layer shifts (more transparent when extruded slower).
The disadvantage is that it ... | 792 |
<p>I print ABS on a LulzBot Taz 5 and frequently have issues with the corners of objects lifting off the bed.</p>
<p>My extruder is at 230 °C and the bed is at 90 °C for the first layer and 100 °C for the rest of the layers.</p>
<p>I have experimented with using ABS slurry (ABS + acetone) on the bed fo... | <p>There are many different approaches to solving this issue and most of the answers already are spot-on. However, the fundamental reason for the "warping" is incorrect and inconsistent temperature across the material.</p>
<p>If there is too much fluctuation in the temperature across the object in this heated state ca... | <p>I think you answered your question in your statement. Lulzbot and ABS. Lulz does not have an enclosure. </p>
<p>Try using PLA for an open air system. Or build an enclosure. Following you can add glue or hairspray.</p>
<p>But I promise you, with any open air printer, you will face this problem. I only use ABS on my... | 102 |
<p>I have just edited a new post, <a href="https://3dprinting.stackexchange.com/questions/4153/help-understanding-bridge-settings">Help understanding bridge settings</a>, so that the video would be "inlined" and playable in the post itself<sup>1</sup>.</p>
<p>However, the video does not show up, and only the ... | <p>Per answer to <a href="https://meta.stackexchange.com/questions/296832/what-are-the-limitations-in-beta">What are the limitations in Beta</a></p>
<p>"Inline videos is a feature that is off by default on all sites and only turned on if the community thinks it's necessary to improve the quality of a good portion of t... | <p>A note of caution, <a href="https://stackoverflow.com/c/moderators/questions/257#answer-261">this post</a> on the Stack Moderators site, Pᴀᴜʟsᴛᴇʀ2's post, <a href="https://stackoverflow.com/c/moderators/questions/257">How do you request embedded video for your site?</a> - As mods can only follow these links I've inc... | 41 |
<p>Can anyone recommend a good library for generating an audio file, such as mp3, wav, or even midi, from python?</p>
<p>I've seen recommendations for working with the id tags (song name, artist, etc) in mp3 files, but this is not my goal.</p>
| <p>See <a href="http://wiki.python.org/moin/Audio/" rel="noreferrer">http://wiki.python.org/moin/Audio/</a> and <a href="http://wiki.python.org/moin/PythonInMusic" rel="noreferrer">http://wiki.python.org/moin/PythonInMusic</a>, maybe some of the projects listed there can be of help.</p>
<p>Also, <a href="http://www.go... | <p>I've never used it, but check out <a href="http://code.google.com/p/ounk/" rel="nofollow noreferrer">ounk</a>.</p>
| 6,723 |
<p>is there a way to abort threads created with QueueUserWorkItem?</p>
<p>Or maybe I don't need to? What happens if the main application exits? Are all thread created from it aborted automatically?</p>
| <p>You don't need to abort them. When your application exits, .NET will kill any threads with IsBackground = true. The .NET threadpool has all its threads set to IsBackground = true, so you don't have to worry about it.</p>
<p>Now if you're creating threads by newing up the Thread class, then you'll either need to abo... | <p>yeah, they are background, but f.ex if you have application where you use ThreadPool for some kinda multiple downloading or stuff, and you want to stop them, how do you stop ? my suggestion would be:
exit thread asap, f.ex </p>
<pre><code>bool stop = false;
void doDownloadWork(object s)
{
if (!stop)
{
... | 4,641 |
<p>I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete. </p>
| <p>Sure..it's pretty easy. Here's a fun app I threw together. I'm assuming you have Visual C++.</p>
<p>Save to test.cpp and compile: cl.exe /EHsc test.cpp</p>
<p>To test with your OCX you'll need to either #import the typelib and use it's CLSID (or just hard-code the CLSID) in the CoCreateInstance call. Using #import... | <p>@orion thats so cool. Never thought of it that way.</p>
<p>Well @jschroedl thats was fun indeed. </p>
<p>Testing an activex in console app is fun. But I think its worth not trying down that path. You can call the methods or set and get the properties either through the way @jschroedl had explained or you can call ... | 3,852 |
<p>I'm trying to maintain a Setup Project in <code>Visual Studio 2003</code> (yes, it's a legacy application). The problem we have at the moment is that we need to write registry entries to <code>HKCU</code> for every user on the computer. They need to be in the <code>HKCU</code> rather than <code>HKLM</code> because t... | <p>First: Yes, this is something that belongs in the Application for the exact reson you specified: What happens after new user profiles are created? Sure, if you're using a domain it's possible to have some stuff put in the registry on creation, but this is not really a use case. The Application should check if there ... | <p>I'm partway to my solution with this entry on MSDN (don't know how I couldn't find it before).</p>
<p>User/Machine Hive<br>
Subkeys and values entered under this hive will be installed under the HKEY_CURRENT_USER hive when a user chooses "Just Me" or the HKEY_USERS hive or when a user chooses "Everyone" during inst... | 2,323 |
<p>I'd like to buy a new nozzle for my Anycubic i3 Mega because it's not precise enough - it fails to print small details like 1 mm eyebrows.</p>
<p>Currently it has a 0.4 mm nozzle and I'd like to buy a better one but I don't know how to choose one which is compatible with this printer.</p>
<p>If you have ... | <p>According to <a href="https://youtu.be/QnnPsoL5cHE?t=18" rel="nofollow noreferrer">Anycubic</a> this printer uses the E3D V5 type hotend as can be seen from the linked video of the AnyCubic Mega:</p>
<p><a href="https://i.stack.imgur.com/WSL8p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WSL8p... | <p>We select nozzles depending on what project we want to,do and it must match with the hot end as well.</p>
| 1,274 |
<p>Is there a limit with the number of SSL connections?</p>
<p>We are trying to connect through SSL with 2000 sessions. We have tried it a couple of times but it always dies at 1062nd. Is there a limit?</p>
| <p>Your operating system will have a limit on the number of open files if you are on linux
ulimit -a will show your various limits.</p>
<p>I imagine yours is set to 1024 and some of the sessions just happened to have closed allow the figure of 1062 (this last bit is a guess)</p>
| <p>Yes, everything has a limit. As far as I'm aware, there is no inherit limit with "SSL".. it is after all just a protocol.</p>
<p>But, there is a limited amount of memory, ports, CPU on the machine you are connected to, from and every single one in between.</p>
<p>The actually server you are connected to may have a... | 6,767 |
<p>Whats the best/easiest way to obtain a count of items within an IEnumerable collection without enumerating over all of the items in the collection?</p>
<p>Possible with LINQ or Lambda?</p>
| <p>You will have to enumerate to get a count. Other constructs like the List keep a running count.</p>
| <p>Not possible with LINQ, as calling .Count(...) does enumerate the collection. If you're running into the problem where you can't iterate through a collection twice, try this:</p>
<pre><code>List<MyTableItem> myList = dataContext.MyTable.ToList();
int myTableCount = myList.Count;
foreach (MyTableItem in myLi... | 4,837 |
<p>A few weeks ago, I was assigned to evaluate all our programmers. I'm very uncomfortable with this since I was the one who taught everyone the shop's programming language (they all got out of college not knowing the language and as luck would have it, I'm very proficient with it.). On the evaluation, I was very biase... | <p>Gets things done is really all you need to evaluate a developer. After that you look at the quality that the developer generates. Do they write unit tests and believe in testing and being responsible for the code they generate? Do they take initiative to fix bugs without being assigned them? Are they passionate ... | <p>What about getting everyone's input? Everyone that a person is working with will have a unique insight into that person. One person might think someone is a slacker, while another person sees that they are spending a lot of time planning before they start coding, etc.</p>
| 3,494 |
<p>One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done).</p>
<p>I'm having a hard time finding resources/guides that take you past writing a simple "Hello World" OS.</p>
<p>I know ... | <p>There are a lot of links after this <a href="http://www.osix.net/modules/article/?id=359" rel="noreferrer">brief overview</a> of what is involved in writing an OS for the X86 platform.</p>
<p>The link that appears to be most promising (www.nondot.org/sabre/os/articles) is no longer available, so you'll need to poke... | <p>Intresting Question for the programmers. See it will take long long long time to build OS like Windows or Mac but if you want build a simple ones then you can try your best</p>
<ol>
<li>You need to focus on Assembly Language,C and C++. You should be expert in these languages.</li>
<li>First read a good book on how ... | 6,475 |
<p>I've recently started work on the Compact Framework and I was wondering if anyone had some recommendations for unit testing beyond what's in VS 2008. MSTest is <em>ok</em>, but debugging the tests is a nightmare and the test runner is <em>so</em> slow.</p>
<p>I see that NUnitLite on codeplex is an option, but it do... | <p>What we've done that really improves our efficiency and quality is to multi target our mobile application. That is to say with a very little bit of creativity and a few conditional compile tags and custom project configurations it is possible to build a version of your mobile application that also runs on the deskt... | <p>We use NUnitLite, although I think we did have had to add some code to it in order for it to work. </p>
<p>One of the problems we found is that if you are using parts of the platform that only exist in CF, then you can only run those tests in NUnitLite on an emulator or Windows Mobile device, which makes it hard to... | 3,531 |
<p>Does anyone have experience using the URL Rewrite Module (see <a href="http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx" rel="nofollow noreferrer">here</a>)?</p>
<p>Can it be used to do <a href="http://en.wikipedia.org/wi... | <p>If you have enough RAM, SQL will do an outstanding job determining what to load into RAM and what to seek on disk. </p>
<p>This question is asked a lot and it reminds me of people trying to manually set which "core" their process will run on -- let the OS (or in this case the DB) do what it was designed for.</p>
<... | <p><a href="http://msdn.microsoft.com/en-us/library/ms178015(SQL.90).aspx" rel="nofollow noreferrer">DBCC PINTABLE</a> will explicitly pin a table in core if you want to make sure it remains cached.</p>
| 6,455 |
<p>I am looking for methods to reduce the amount of noise produced by my CR-10. I have the printer in my downstairs study and if I'm doing a long print job, you can hear it upstairs in my son's bedroom and I don't want it keep him awake.</p>
<p>I've seen there are noise reduction feet available on Thingiverse but appa... | <p>Personally for vibration reduction I use a large mouse pad I cut to size, but I'd imagine the carpet would perform just fine. I would also recommend enclosing your printer (this had the most profound effect for me) and upgrading your stepper drivers.</p>
| <p>If you hear it from a floor to the other the only thing to change is the base of the printer. Nothing else matters.</p>
<p>CNC Kitchen performed measurements especially to avoid noise being transferred to other rooms, the result is that placing the printer not on elastic feet, but on a single slab of concrete which ... | 660 |
<p>I am building on C++ dll, by writing code in C#.</p>
<p>I get an error, saying </p>
<blockquote>
<p>LoaderLock was detected Message:
Attempting managed execution inside OS
Loader lock. Do not attempt to run
managed code inside a DllMain or image
initialization function since doing so
can cause the appl... | <p>The general idea of loader lock:
The system runs the code in DllMain inside a lock (as in - synchronization lock). Therefore, running non-trivial code inside DllMain is "asking for a deadlock", as described <a href="https://devblogs.microsoft.com/oldnewthing/20040128-00/?p=40853" rel="nofollow noreferrer">... | <p>This problem occurs because of the way in which the debugger in Visual Studio runs managed applications that use Microsoft Foundation Classes version 8.0 in one or more DLL files.</p>
<p>Have a thorough reading at: <a href="http://msdn.microsoft.com/en-us/library/aa290048(vs.71).aspx" rel="nofollow">http://msdn.mic... | 8,061 |
<p>When houses are printed with concrete cement what replaces the steel rebar for reinforcement?</p>
<p>Here's a link referencing printing concrete: <a href="https://www.aniwaa.com/house-3d-printer-construction/" rel="nofollow noreferrer">https://www.aniwaa.com/house-3d-printer-construction/</a></p>
<blockquote>
<p>Hou... | <p>The extruder can't push anymore when the filament is past the extruder gear. If your filament has run out to that point, the print will <em>not</em> halt but print without a filament, meaning that the print will fail. You need to pause the print in time and then put fresh filament into the printer.</p>
<p>If the en... | <p>The extruder can't push anymore when the filament is past the extruder gear. If your filament has run out to that point, the print will <em>not</em> halt but print without a filament, meaning that the print will fail. You need to pause the print in time and then put fresh filament into the printer.</p>
<p>If the en... | 1,272 |
<p>I have a php server that is running my domain name. For testing purposes I am running an asp.net on a dotted quad IP. I am hoping to link them together via either PHP or some kind of DNS/<code>.htaccess</code> voodoo.</p>
<p>So if I go to <code>www.mydomain.com/test</code> it redirects (but keeps the url of (<cod... | <p>Instead of pointing <code>www.yourdomain.com/test</code> at your test server, why not use <code>test.yourdomain.com</code>?</p>
<p>Assuming you have access to the DNS records for <code>yourdomain.com</code>, you should just need to create an A record mapping <code>test.yourdomain.com</code> to your test server's IP... | <p>It is quite possible, if I understand what you're getting at.</p>
<p>You have a PHP server with your domain pointing to it. You also have a separate ASP.NET server that only has an IP address associated with it, no domain.</p>
<p>Is there any drawback to simply pointing your domain name to your ASP.NEt box?</p>
| 6,809 |
<p>What's the difference between the inner workings of Java's JVM and .NET's CLR?</p>
<p>Perhaps a starting point would be, are they basically the same thing in their respective environments (Java > JVM > Machine code) (C# > CLR > IL).</p>
<hr>
<p><strong>Update:</strong> Several people have alluded to the points I... | <p>From <a href="http://social.msdn.microsoft.com/forums/en-US/clr/thread/38223155-c07c-472a-8903-6cdaf5f110ea/" rel="nofollow noreferrer">here</a>. I couldn't have said it better (Well, with the exception of a flame war, this is a flameless place :-) ).</p>
<blockquote>
<p>Hello,</p>
<p>Responding to your ques... | <p>There differences in garbage collection as well.
JVM uses Copying collector and Mark and sweep. .NET user Copying collector and Mark and compact (Much harder to implement).</p>
<p>Also type erasure mentioned by Flyswat is important. JVM doesn't have a clue about generics and everything is object and associated per... | 8,367 |
<p>I have an application that imports large volumes of data daily, several 100 thousands records.<br>
Data comes from different sources. The data is read using C#, then bulk inserted into the database.
<br>
<br>
This data is then processed:</p>
<ul>
<li>different tables are linked</li>
<li>new tables are generated</li... | <p>I would use SSIS or DTS (assuming you are talking about MSSQL). They are made for that purpose and work with SPs if you need them.</p>
<p>Another option is to preprocess the data using Perl. Even though it sounds like a wierd suggestion, Perl is actually extremely fast in these scenarios. I've used it in the past t... | <p>Where you process data depends greatly on what you're doing. If you need, for example, to discard data which you don't want in your database, then you would process that in your C# code. However, data to process in the database should generally be data which should be "implementation agnostic". So if someone else... | 9,646 |
<p>Wondering if there is a better why in the WHERE clause of choosing records when you need to look at effective start and end dates?</p>
<p>Currently this how I've done it in the past on MS SQL Server. Just worried about the date and not the time. I'm using SQL Server 2005.</p>
<pre><code>AND Convert(datetime, Conv... | <p>That is terrible, take a look at <a href="http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/only-in-a-database-can-you-get-1000-impr" rel="nofollow noreferrer">Only In A Database Can You Get 1000% + Improvement By Changing A Few Lines Of Code</a> to see how you can optimize this since that is not sargable</... | <p>try</p>
<pre><code>ep.EffectiveStartDate BETWEEN @date1 AND @date2
</code></pre>
<p>where you would do something like</p>
<pre><code>declare @date1 datetime, @date2 datetime;
set @date1 = cast('10/1/2000' as datetime)
set @date2 = cast('10/1/2020' as datetime)
</code></pre>
| 4,283 |
<p>Is there a good, native Mac tool to view Mercurial repositories, similar to gitnub for Git?</p>
| <p>I know it's pretty old question, however just for sake of completeness, I think it is still worth to mention here the newest kid on the block called <a href="http://bitbucket.org/snej/murky/wiki/Home" rel="nofollow noreferrer">Murky</a>. </p>
| <p>You can use the one "built in", <a href="http://www.selenic.com/mercurial/wiki/index.cgi/HgkExtension" rel="nofollow noreferrer"><code>hg view</code></a>. You'll need <code>TCL</code> installed though.</p>
<blockquote>
<p>From the documentation:</p>
<blockquote>
<p>The hgk Tcl script is a direct port of ... | 5,076 |
<p>What is the power consumption of your heatbed (size) and hotend (model)?</p>
<p>I want to verify that it is possible to use a battery to power them.</p>
| <p>I have a Kill-A-Watt meter so I got a pretty good measurement for you with my Anet A6. Like Petar said each model is different but this should give you a idea. When heating both the nozzle and heat bed the printer consumes 160 W of power, once to temp it backs down to 9 W (it also uses 9 W when just "... | <p>To answer the underlying (X-Y) question, yes it is possible to power a small 3D printer from a battery pack. <a href="https://www.3ders.org/articles/20171005-naomi-sexycyborg-wu-3d-prints-on-the-go-with-awesome-wearable-3d-printer.html" rel="nofollow noreferrer">This Article</a> describes a printer built by Naomi Wu... | 831 |
<p>Pretty much every other editor that isn't a vi descendant (vim, cream, vi-emu) seems to use the emacs shortcuts (<kbd>ctrl</kbd>+<kbd>w</kbd> to delete back a word and so on)</p>
| <p>Early software was often modal, but usability took a turn at some point, away from this style. </p>
<p>VI-based editors are total enigmas -- they're the only real surviving members of that order of software. </p>
<p>Modes are a no-no in usability and interaction design because we humans are fickle mammals who cann... | <p>Though not really answering your question, there used to be a "modal like" way to write Japanese on cell phones before :
The first letter you hit was a conson let's say K, and then, and then the next key you would hit would have the role of a conson. (Having two conson in a row is impossible in Japanese)</p>
<p>Tho... | 3,522 |
<p>So I've had my CR-10 Mini for some months now, and I've been continually having strange problems with bed leveling. Basically, after leveling the bed and printing a part, the bed is no longer leveled for printing again.</p>
<p>Just now, I auto-homed, leveled the bed to where there was a pretty good amount of fricti... | <p>The Creality CR-10 Mini is a <strong>portal printer</strong> using a <strong>single Z lead screw at one side</strong> of the portal to move the whole X axis gantry. This implies that the X gantry needs to be very stiff when raised and lowered from one side and also have a minimum of play on the rollers (especially o... | <p>The Creality CR-10 Mini is a <strong>portal printer</strong> using a <strong>single Z lead screw at one side</strong> of the portal to move the whole X axis gantry. This implies that the X gantry needs to be very stiff when raised and lowered from one side and also have a minimum of play on the rollers (especially o... | 1,177 |
<p>Is there a difference (performance, overhead) between these two ways of merging data sets?</p>
<pre><code>MyTypedDataSet aDataSet = new MyTypedDataSet();
aDataSet .Merge(anotherDataSet);
aDataSet .Merge(yetAnotherDataSet);
</code></pre>
<p>and</p>
<pre><code>MyTypedDataSet aDataSet = anotherDataSet;
aDataSet .Merge(... | <p>Those two lines do different things.</p>
<p>The first one creates a new set, and then merges a second set into it.</p>
<p>The second one sets the ds reference to point to the second set, so:</p>
<pre><code>MyTypedDataSet ds1 = new MyTypedDataSet();
ds1.Merge(anotherDataSet);
//ds1 is a copy of anotherDataSet
ds1.... | <p>Your second example does <strong>not</strong> create a new dataset. It's just a second <em>reference</em> to an existing dataset.</p>
| 8,085 |
<p>Does anyone know any simple way to retrieve the country from a given IP Address, preferably in ISO_3166-1 format?</p>
| <p>A lot of people (including my company) seem to use MaxMind GeoIP.</p>
<p>They have a free version <a href="http://dev.maxmind.com/geoip/geoip2/geolite2/" rel="noreferrer">GeoLite</a> which is not as accurate as the paid version, but if you're just after something simple, it may be good enough.</p>
| <p>You can give a try to <a href="https://astroip.co" rel="nofollow noreferrer">https://astroip.co</a>, it is a new Geolocation API I built which exposes geo data together with other useful datapoints like currency, timezone, ASN data and security.</p>
<p>Here it is an example of the json response:</p>
<pre><code>curl ... | 2,343 |
<p>I got a Function that returns a <code>Collection<string></code>, and that calls itself recursively to eventually return one big <code>Collection<string></code>.</p>
<p>Now, i just wonder what the best approach to merge the lists? <code>Collection.CopyTo()</code> only copies to string[], and using a <cod... | <p>If you're using List<> you can use .AddRange to add one list to the other list.</p>
<p>Or you can use yield return to combine lists on the fly like this:</p>
<pre><code>public IEnumerable<string> Combine(IEnumerable<string> col1, IEnumerable<string> col2)
{
foreach(string item in col1)
... | <p>As far as merging goes:</p>
<blockquote>
<p>I wonder, is there a more efficient
way to have a recursive function that
returns a list of strings without
duplicates? I don't have to use a
Collection, it can be pretty much any
suitable data type.</p>
</blockquote>
<p>Your function assembles a return value... | 7,995 |
<p>I recently asked a question about what I called "method calls". The answer referred to "messages". As a self-taught hobby programmer trying to phrase questions that don't make me look like an idiot, I'm realizing that the terminology that I use reveals a lot about how I learned to program.</p>
<p>Is there a distinc... | <p>I've found this to be a language and programming-paradigm thing. One paradigm — OOP — refers to objects with member methods, which conceptually are how you send messages to those objects (this view is reflected in UML, for example).</p>
<p>Another paradigm — functional — may or may not involve classes of objects, ... | <p>I'm not sure about origin of <em>message</em> terminology. Most ofter I encounter <em>messages</em> in UML design. Objects (Actors in UML terminology) can communicate with each other by means of <em>messages</em>. In real-world code <em>message</em> is just a function call usually. I think of message as of attempt t... | 6,536 |
<p>I have a workspace for running an H.263 Video Encoder in a loop for 31 times i.e. the main is executed 31 times to generate 31 different encoded bit streams. This MS Visual Studio 2005 Workspace has all C source files. When i create a "DEBUG" configuration for the workspace and build and execute it, it runs fine, i.... | <p>It's hard to say what the problem might be without carefully inspecting the code. However...</p>
<p>One of the differences between debug and release builds is how the function call stack frame is set up. There are certain classes of bad things you can do (like calling a function with the wrong number of arguments) ... | <p>Are you sure there are no precompile directives that, say, ignores some really important code in Release mode but allows them in Debug?</p>
<p>Also, have you implemented any logging that might point out to the precise assembly that's throwing the error?</p>
| 3,005 |
<p>I want to tackle an experiment with the following goal:</p>
<blockquote>
<p>Determine the correlations between printing parameters (temperatures,
speeds, humidity, perimeters, infill, etc.) and tensile strength using
a specific 3D printer, test specimen, and filament brand/model.</p>
</blockquote>
<p>This go... | <p>For these kind of tests you could rely on the <a href="https://www.astm.org/" rel="nofollow noreferrer">ASTM</a> standards. They define test procedures and test specimen sizes for different types of tests. Or you can derive a specimen yourself based on these standards (e.g. for my bachelor's degree I used an alterna... | <p>A reliable and repeatable test can be performed by printing cylinders, tapping them to M4 thread and then testing the resulting bolts.</p>
<p>My Tech Fun <div class="youtube-embed"><div>
<iframe width="640px" height="395px" src="https://www.youtube.com/embed/ZiQek0wei1g?start=0"></iframe>
... | 996 |
<p>Are there any automatic methods for trimming a path string in .NET?</p>
<p>For example:</p>
<pre><code>C:\Documents and Settings\nick\My Documents\Tests\demo data\demo data.emx
</code></pre>
<p>becomes</p>
<pre><code>C:\Documents...\demo data.emx
</code></pre>
<p>It would be particularly cool if this were built... | <p>Use <strong>TextRenderer.DrawText</strong> with <strong>TextFormatFlags.PathEllipsis</strong> flag</p>
<pre><code>void label_Paint(object sender, PaintEventArgs e)
{
Label label = (Label)sender;
TextRenderer.DrawText(e.Graphics, label.Text, label.Font, label.ClientRectangle, label.ForeColor, TextFormatFlags.Pat... | <p>What you are thinking on the label is that it will put ... if it is longer than the width (not set to auto size), but that would be</p>
<pre><code>c:\Documents and Settings\nick\My Doc...
</code></pre>
<p>If there is support, it would probably be on the Path class in System.IO</p>
| 4,084 |
<p>So, I am kinda new to ASP.net development still, and I already don't like the stock ASP.net controls for displaying my database query results in table format. (I.e. I would much rather handle the HTML myself and so would the designer!)</p>
<p>So my question is: What is the best and most secure practice for doing th... | <p>I believe you're looking for a <code><Repeater></code> control. It contains some functionality similar to the GridViews, but allows you hand-craft all of the HTML for the Header, Item, and Footers yourself. Simply call the databinding code as you would for a gridview, and change the ASPX page to suit your ex... | <p>If you're more interested in hand Coding your HTML, it might be worth looking at the <a href="http://www.asp.net/mvc/" rel="nofollow noreferrer">ASP.NET MVC project</a>. You get a little more control over things than standard WebForms.</p>
<p>As an aside, plugging data access code in the Page_Load is never a good ... | 9,403 |
<p>I use cruisecontrol.rb for CI and FogBugz for bug tracking, but the more general the answers, the better.</p>
<p>First is the technical problem: is there an API for FogBugz? Are there good tutorials, or better yet, pre-written code?</p>
<p>Second is the procedural problem: what, exactly, should the CI put in the ... | <p>All the CI setups I've worked with send an email (to a list), but if you did want—especially if your team uses FogBugz much as a todo system—you could just open a case in FogBugz 6. <a href="http://www.fogcreek.com/FogBugz/docs/60/topics/advanced/API.html" rel="nofollow noreferrer">It has an API</a> that lets you op... | <p>CC comes with a utility that warns you when builds fail, it probably isn't worth logging the failing build in FogBugz - you don't need to track issues that are immediately resolved (as most broken builds will be)</p>
<p>To go the other way round (FogBugz showing checkins that fixed the issue) you need a web based r... | 3,418 |
<p>I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modal' popup using <code>element.innerHTML = content</code> This works like a charm.</p>
<p>In another section of this website I use a Flickr 'badge' (<a href="http://www.elliotswan.com/2006/08/... | <p>In general, script tags aren't executed when using innerHTML. In your case, this is good, because the <code>document.write</code> call would wipe out everything that's already in the page. However, that leaves you without whatever HTML document.write was supposed to add.</p>
<p>jQuery's HTML manipulation methods wi... | <p>Can I get some clarification first to make sure I get the problem?</p>
<p><code>document.write</code> calls will add content to the markup at the point in the markup at which they occur. For example if you include <code>document.write</code> calls in a function but call the function elsewhere, the <code>document.wr... | 7,751 |
<p>I want to build a 3D printer with a heating chamber of around 90 °C with build area 200x200x200 mm. I have never build a CoreXY system, so my design is currently an XY system with moving X motor (mounted on Y). Since it has a heating chamber I can't use normal stepper motor (there's a way, but I have to provide forc... | <p>An alternative to finding steppers that can withstand the heat, you can consider not getting the heat near the steppers:</p>
<ul>
<li><em>Moving the steppers outside the heated build volume</em><br>
With 2 extra pulleys per stepper you can get the steppers outside the build volume.</li>
</ul>
<p><a href="https://i... | <p>You don't need to worry about the stepper for heating chamber since the direct drive uses a fan for cooling the motor area.</p>
<p><a href="https://i.stack.imgur.com/MfR7h.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MfR7h.jpg" alt="enter image description here"></a></p>
<p>When I started to ... | 1,429 |
<p>So the controller context depends on some asp.net internals. What are some ways to cleanly mock these up for unit tests? Seems like its very easy to clog up tests with tons of setup when I only need, for example, Request.HttpMethod to return "GET".</p>
<p>I've seen some examples/helpers out on the nets, but some ar... | <p>Using MoQ it looks something like this:</p>
<pre><code>var request = new Mock<HttpRequestBase>();
request.Expect(r => r.HttpMethod).Returns("GET");
var mockHttpContext = new Mock<HttpContextBase>();
mockHttpContext.Expect(c => c.Request).Returns(request.Object);
var controllerContext = new Control... | <p>I find that long mocking procedure to be too much friction.</p>
<p>The best way we have found - using ASP.NET MVC on a real project - is to abstract the HttpContext to an IWebContext interface that simply passes through. Then you can mock the IWebContext with no pain.</p>
<p>Here is an <a href="http://code.google.... | 5,261 |
<p>I'm writing opengl code in python using the library pyglet. When I draw to the screen using pyglet.graphics.vertex_list or pyglet.graphics.batch objects, they are very slow (~0.1 fps) compared to plain old pyglet.graphics.draw() or just glVertex() calls, which are about 40fps for the same geometry.
In Linux the vert... | <p>Don't forget to invoke your pyglet scripts with 'python -O myscript.py', the '-O' flag can make a huge performance difference.</p>
<p>See pyglet docs <a href="https://pyglet.readthedocs.io/en/pyglet-1.3-maintenance/programming_guide/gl.html?highlight=performance#error-checking" rel="nofollow noreferrer">here</a> an... | <p>I don't know personally, but I noticed that you haven't posted to <a href="http://groups.google.com/group/pyglet-users" rel="nofollow noreferrer">the pyglet mailing list</a> about this. More Pyglet users, as well as the primary developer, read that list.</p>
| 9,282 |
<p>I am a complete noob when it comes to the 3d printing world. I just finished assembling my printer and I plug it into my computer with the included usb cable and nothing happens. My computer does recognize the printer being plugged in but it just says "unrecognized device in com 4". Nothing else past that. Somebody ... | <p>Your question addresses (USB) computer connection, so that will be addressed in this answer. For connection to the printer, you need 2 things (apart from the apparent things as computer, printer and cable):</p>
<ol>
<li>A working CH340 driver installed on the computer for USB communication with the board,</li>
<li>... | <p>Try using the provided SD card and SD adapter with Cura to give the printer gcode. If your computer isn't communicating properly with your printer, you can just download Cura 14 (it comes on the SD card) and upload the configuration file (also on the SD card). You can then plug the SD card into your main board and a... | 895 |
<p>octoprint seems to have a setting that involves googles DNS server.</p>
<p>my question is is that server used to access octoprint over the internet via printoid "android app" or via browser? if not then what does it mean?
<a href="https://i.stack.imgur.com/MWTnq.jpg" rel="nofollow noreferrer"><img src="https://i.st... | <p>The program is pinging that address to check the internet connection to "prevent resource intensive operations if it's already clear that they won't succeed anyhow". It checks for connectivity, if it has it then it will check for update otherwise it won't check for an update.</p>
| <p>That's just Google's DNS (name resolution) server. 8.8.8.8 and 8.8.4.4 are the Google values. Your ISP will also have a DNS server that you could use, which is what it says to use Google's "if you don't know what to set here".</p>
<p>Using the Google values are your best bet since they'll pretty much absolutely a... | 728 |
<p>Is <a href="http://cpan.uwinnipeg.ca/dist/DBI" rel="noreferrer">CPAN DBI</a> the best database interface to use in Perl for general database use? Are there some better options?</p>
| <p>If you're just looking for low-level database access—you feed it any SQL string (optionally with place-holders and bind values) and it runs your query and gives you back the results—then yes, <a href="http://search.cpan.org/dist/DBI/" rel="nofollow noreferrer">DBI</a> is your best bet, by far.</p>
<p>If... | <p>Basically you should be used to using only DBI firstly.</p>
| 6,435 |
<p>Using the svnmerge.py tool it is possible to merge between branches, up and down. It is hard to find the details for doing this. Hopefully, v1.5 will have a neat method for doing this without using svnmerge.py - details requested!</p>
| <p>It looks like you're asking about 1.5 merge tracking. Here's a quick overview for doing merges to/from trunk (or another branch): <a href="http://blog.red-bean.com/sussman/?p=92" rel="nofollow noreferrer">http://blog.red-bean.com/sussman/?p=92</a></p>
| <p>With svnmerge.py, you initialize both branches (when going in one direction, you only need to initialize one of the branches). Then merge using the -b (For bidirectional flag). Here is a summary starting from branch one to branch two. $REPO is the protocol and path to your repository.</p>
<blockquote>
<p>svn c... | 9,393 |
<p>I have a query where I am searching against a string:</p>
<pre><code>SELECT county FROM city WHERE UPPER(name) = 'SAN FRANCISCO';
</code></pre>
<p>Now, this works fine, but it doesn't scale well, and I need to optimize it. I have <a href="http://www.ibm.com/developerworks/db2/library/techarticle/0203adamache/0203... | <p>You could add an indexed column holding a numerical hash key of the city name. (With duplicates allowed).</p>
<p>Then you could do a multi-clause where :</p>
<pre><code>hash = [compute hash key for 'SAN FRANCISCO']
SELECT county
FROM city
WHERE cityHash = hash
AND UPPER(name) = 'SAN FRANCISCO' ;
</code></pr... | <p>Oracle supports function-based indexes. Their canonical example:</p>
<pre><code> create index emp_upper_idx on emp(upper(ename));
</code></pre>
| 3,392 |
<p>I want to query a number of different databases mainly Oracle and Informix.
Can anyone suggest me some tool using which I can do this easily?</p>
| <p>Try WinSQL lite at <a href="http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp" rel="nofollow noreferrer">http://www.indus-soft.com/SynametricsWebApp/WinSQL.jsp</a>. It is absolutely free and does not expire. It is only one file and does not come with any bulky DLLs. If you don't like it, simply delete the file ... | <p>The best alround one is <a href="http://www.toadsoft.com/" rel="nofollow noreferrer">TOAD</a></p>
| 5,416 |
<p>I've seen several Q&As on recycling and reusing plastic from failed prints, but what have you done with the last few meters of filament? I've been keeping the ends of PLA (or sections I needed to cut) to maybe use for friction welding pieces together, but I only need so much for that. I've considered just shov... | <p>The welding option is only appropriate if you have the tool needed for it, the lighter welding is really hard to do and if your printer allows it you could just watch for the moment the spool runs out and push the new filament as the last of the previous one gets extruded, that's what I used to do on my bowden extru... | <ul>
<li><p>Weld the fragment to the beginning of a new spool and use it that
way. <a href="http://www.i3dinno.com/easywelder-p186486.html" rel="noreferrer">Most are made from metal</a> so they aren't that easy to make
at home. Here is another <a href="https://3dprinting.stackexchange.com/questions/1345/how-to-connec... | 725 |
<p><strong>Original Question</strong></p>
<p>I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (<em>But the ans... | <p>I've had to work with several beginner (never wrote a line of code) programmers, and I'll be doing an after school workshop with high school students this fall. This is the closest thing I've got to documentation. It's still a work in progress, but I hope it helps.</p>
<p>1) <b>FizzBuzz.</b> Start with command line... | <p>I would actually argue to pick a simpler language with fewer instructions. I personally learned on BASIC at home, as <a href="http://www.codinghorror.com/blog/archives/001104.html" rel="nofollow noreferrer">did Jeff</a>. This way, you don't have to delve into more complicated issues like object oriented programmin... | 2,525 |
<p>There's PLA filament clogged in my Bowden tube, is there a best practice for cleaning it out or do I need to replace the whole tube?</p>
<p>Also, the couplings are totally stuck, so I guess those would need replacement too or are there ways to get stuck couplings off?</p>
<p>Click <a href="https://streamable.com/bi7... | <p>As a short-term fix, grab a twist drill bit that is on the order of 1.5 mm diameter (assuming a 1.75 mm tube). Using a hand drill, slowly and gently drill out the clogged filament. Obviously you want to try to avoid scarring the teflon lining, so better to use the thinnest drill that will work. </p>
<p>With a ... | <p>Most standard filaments soften at 200 °C, meaning a pot of near-boiling water should soften whatever is stuck, allowing you to either fuse another strand of filament to it or use it to push it out of the tube.</p>
| 1,040 |
<p>I have never "hand-coded" object creation code for SQL Server and foreign key decleration is seemingly different between SQL Server and Postgres. Here is my sql so far:</p>
<pre><code>drop table exams;
drop table question_bank;
drop table anwser_bank;
create table exams
(
exam_id uniqueidentifier primary key,
... | <pre><code>create table question_bank
(
question_id uniqueidentifier primary key,
question_exam_id uniqueidentifier not null,
question_text varchar(1024) not null,
question_point_value decimal,
constraint fk_questionbank_exams foreign key (question_exam_id) references exams (exam_id)
);
</code></pre... | <p>Necromancing.<br />
Actually, doing this correctly is a little bit trickier. </p>
<p>You first need to check if the primary-key exists for the column you want to set your foreign key to reference to. </p>
<p>In this example, a foreign key on table T_ZO_SYS_Language_Forms is created, referencing dbo.T_SYS_Language_... | 7,121 |
<p>I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such.</p>
<p>Is there some tool/technique I can use to help me out in this?</p>
| <p>Try using a profiler on your running code. It should help you identify the bottlenecks. Try <a href="http://www.ej-technologies.com/products/jprofiler/overview.html" rel="noreferrer">jprofiler</a> or <a href="http://www.netbeans.org/features/java/profiler.html" rel="noreferrer">Netbeans profiler</a></p>
| <p>For testing/development purposes, you can download Oracle JRockit Mission Control for free from <a href="http://www.oracle.com/technology/software/products/jrockit/index.html" rel="nofollow noreferrer">this</a> site. (Requires Login, but accounts can be set up with any email adress)</p>
<p>Docs <a href="http://www.... | 5,876 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.