instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>One I am aware of is <a href="http://search.cpan.org/dist/Perl-Critic/" rel="nofollow noreferrer">Perl::Critic</a></p>
<p>And my googling has resulted in no results on multiple attempts so far. :-(</p>
<p>Does anyone have any recommendations here?</p>
<p>Any resources to configure Perl::Critic as per our coding s... | <p>In terms of setting up a profile, have you tried <code>perlcritic --profile-proto</code>? This will emit to stdout all of your installed policies with all their options with descriptions of both, including their default values, in perlcriticrc format. Save and edit to match what you want. Whenever you upgrade Perl... | <p>In addition to the cosmetic best practices, I always find it useful to run Devel::Prof on my unit test suite to check test coverage.</p>
| 7,456 |
<p>Say instead of returning void a method you returned a reference to the class even if it didn't make any particular semantic sense. It seems to me like it would give you more options on how the methods are called, allowing you to use it in a fluent-interface-like style and I can't really think of any disadvantages s... | <p>I think as a general policy, it simply doesn't make sense. Method chaining in this manner works with a properly defined interface but it's only appropriate if it makes semantic sense. </p>
<p>Your example is a prime one where it's not appropriate, because it makes no semantic sense.</p>
<p>Similarly, your syntacti... | <p>At first sight it may look good, but for a consistent interface you will need that all methods return a reference to this (which has it own problems).</p>
<p>Let say you have a class with two methods GetA which return this and GetB which return another object:</p>
<p>Then you can call obj.GetA().GetB(), but not ob... | 8,133 |
<p>How do you retrieve selected text using Regex in C#?</p>
<p>I am looking for C# code that is equivalent to this Perl code:</p>
<pre><code>$indexVal = 0;
if($string =~ /Index: (\d*)/){$indexVal = $1;}
</code></pre>
| <pre><code>int indexVal = 0;
Regex re = new Regex(@"Index: (\d*)")
Match m = re.Match(s)
if(m.Success)
indexVal = int.TryParse(m.Groups[1].toString());
</code></pre>
<p>I might have the group number wrong, but you should be able to figure it out from here.</p>
| <pre><code>int indexVal = 0;
Regex re = new Regex.Match(s, @"(<?=Index: )(\d*)");
if(re.Success)
{
indexVal = Convert.ToInt32(re.Value);
}
</code></pre>
| 3,072 |
<p><a href="https://en.wikipedia.org/wiki/Stereolithography">Stereolithography</a> produces parts by projecting ultraviolet light on the top of a vat of liquid photopolymer, causing it to harden. <a href="https://en.wikipedia.org/wiki/Continuous_Liquid_Interface_Production">CLIP</a> produces parts by projecting ultrav... | <p>It's important to understand what specifically is being compared. <strong>CLIP is much faster than bottom-up technologies that require a peel step between every layer.</strong> For example, the Form1 galvo SLA printer tilts the resin vat to separate the transparent bottom from the print. That is, by far, the slowest... | <p>The number of 100x could be true in some situations. I wish I could see the part(s) that they printed to measure this 100x, but that is another story. </p>
<p>Looking at their videos they can move the build plate at a maximum speed of 10mm per minute. You will see the Eiffel tower video where they have to change... | 161 |
<p>I know the so-called textbook definition of unit tests and integration tests. What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible.</p>
<p>For example, if I have a <code>Word</code> class, I will write some unit tests for the <code>Word</c... | <p>The key difference, to me, is that <strong>integration tests</strong> reveal if a feature is working or is broken, since they stress the code in a scenario close to reality. They invoke one or more software methods or features and test if they act as expected.</p>
<p>On the opposite, a <strong>Unit test</strong> te... | <p>If you're a TDD purist, you write the tests before you write production code. Of course, the tests won't compile, so you first make the tests compile, then make the tests pass.</p>
<p>You can do this with unit tests, but you can't with integration or acceptance tests. If you tried with an integration test, nothing ... | 3,192 |
<p>I have been doing some java development lately and have started using Eclipse. For the most part, I think it is great, but being a C/C++ guy used to doing all of his editing in vim, I find myself needlessly hitting the Esc key over and over.</p>
<p>It would be really nice if I got all the nice features of Eclipse,... | <p><a href="http://vrapper.sourceforge.net/home/" rel="noreferrer">Vrapper</a>:</p>
<blockquote>
<p>an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like input scheme for moving around and editing text.</p>
<p>Unlike other plugins which embed Vim in Eclipse, Vrapper imitates t... | <p><a href="https://marketplace.eclipse.org/content/viable-vim-eclipse" rel="nofollow noreferrer">Viable</a> has pretty much what you are looking for along with some extra features which none of the other plugins for eclipse seem to have, like some support for visual block mode, command line history, window splitting, ... | 4,841 |
<p>I've only been using VS 2008 Team Foundation for a few weeks. Over the last few days, I've noticed that sometimes one of my objects/controls on my page just disappears from intellisense. The project builds perfectly and the objects are still in the HTML, but I still can't find the object. </p>
<p>Any one else notic... | <p>I am also having a number of problems with VS 2008. Who would guess that I don't ever need to select multiple controls on a web form...</p>
<p>Anyway, a lot has been fixed in Service Pack 1, which is in Beta currently. Might be worth installing that. It has gone a little way to fixing absolute positioning. This... | <p>I occasionally get this in Visual Studio 2005.</p>
<p>A method I use to get the controls back, is to switch the web page between code view and design view. I know it's not a fix but it's a little quicker than restarting Visual Studio.</p>
| 2,805 |
<p>Recently on one of her videos a YouTuber stated that prints from large format printers are more brittle than if you were to print them in parts and glue them together. This seems to contradict the testimonials from the customers of a large format printer, who say that they get good prints from those printers (which ... | <p>If you break up a large piece into multiple smaller pieces and properly glue them together, you basically add stiffeners (as a result of printing walls). This could lead to a more stiff model; this might have been confused by calling large prints more brittle opposed to constructed models.</p>
<p>If printing is con... | <p>I'd recommend getting the object to fit together by design, rather than glue - though I tend (if the item is never to be disassembled) use Zap-a-gap - that stuff sticks like crazy though you must not squeeze the parts together but let it naturally sit.</p>
| 1,352 |
<p>I don't want this to be a specific producer question, but I would like to know if the Sparkmaker is good enough to print small details in OO/HO scale objects.
I'm referring here to objects like furniture, and other house appliances at scale.
I wasn't able to find any visuals with very small objects for this printer.... | <p>Can you tell by looking at the de-adhesion what isn't sticking? </p>
<p>It may be that printing the ASA at higher temperature is melting the BVOH enough that it doesn't stick, being molten. If so, then it may be possible to print the first layer of ASA at a cooler temperature, slower if necessary to still succeed... | <p>Here's how I got it to work. I set the heat bed to 110°C and disabled the underlayer of the raft layer. I set the BVOH and the ASA to 235°C after the 4th layer I set the heatbed to 90°C and after the 6th layer I set the bed down to 60°C so that the BVOH hardened and adhered to the bed making sure that nothing curle... | 1,307 |
<p>Hello I am using Cura to slice my prints, and despite turning the flow rate to the minimum value of 5%, my prints are still hugely over extruding. </p>
<p>I have calibrated the extruder stepper perfectly, using Pronterface, so I do not understand why this is occurring. I have also timed how long it took to extrude ... | <p>First of all: Can you tell us, what kind of printer do you use and which material? Please give us some pictures of some prints as well.. Also the type of the Extruder setup is relevant. Is it a Bowden or Direct Driven extruder?</p>
<p>For an FDM machine like the Prusa styled printers with PLA:</p>
<ul>
<li>Flow of... | <p>I've been building 3D printers for a few years and working in the computer science field for over 2 decades. Here's a simple trick I use for adjusting your extruder steps.</p>
<ol>
<li><p>Tweak your flow rate till it's where it should be. Then mark down
the percentage it's at.</p>
</li>
<li><p>Go into your configura... | 768 |
<p>As a programmer I need a place to store my stuff. I've been running a server in my parents closet for a long time, but I recently came across a decent 2U server.<br>
I have no experience dealing with hosting companies, beyond the very cheap stuff, and I'm wondering what I should look for in a colo or if I should jus... | <p>There are three major factors here.</p>
<ol>
<li>Cost. The colo will obviously be more expensive than sticking a server in your parents' closet.</li>
<li>Quality. The colo should be a lot more reliable than the server in your parents' closet. They aren't as likely to go down when there's a power surge. They sho... | <p>I'd absolutely go for the server that's located under my roof, as long as I don't need it to be connected to the internet with a static IP.</p>
<p>Why:</p>
<ul>
<li>It's a target for hackers, as soon as it is reachable from the net</li>
<li>Any problems with the machine? I'd rather walk to the closet instead of ca... | 2,998 |
<p>I'm trying to do 'Attach to Process' for debugging in Visual Studio 2008 and I can't figure out what process to attach to. Help.</p>
| <p>Indeed it is still w3wp.exe - You'll need to check the '<strong>Show processes in all sessions</strong>' option to get it to show up though.</p>
<p>(It caught me out for a while too.)</p>
| <p>Isn't it w3wp.exe?</p>
| 8,599 |
<p>I have a Monoprice architect which is a barebones clone of the FlashForge Creator Pro, or Replicator 1 Dual. I have upgraded the power supply and added a heated bed and, after getting fed up with MakerBot software, I've started using Cura to slice then post process with GPX.</p>
<p>I did a lot of searching and fina... | <p>Yes, with the proper equipment.</p>
<p>Printing wax filament (at 51 seconds): <a href="https://youtu.be/tibkVZB_n9c?t=51s" rel="noreferrer">https://youtu.be/tibkVZB_n9c?t=51s</a></p>
<p>There are also options for melting wax, filling a heated reservoir head, and printing with that. I recommend doing this with a co... | <p>Just make a silicone mold of any of your prints and pour you wax in the silicone,you silicone putty is pretty cheap so is wax ,no need to break the bank as printers have become less expensive and can do a pretty good job </p>
| 631 |
<p>I have an NHibernate session. In this session, I am performing exactly 1 operation, which is to run this code to get a list:</p>
<pre><code>public IList<Customer> GetCustomerByFirstName(string customerFirstName)
{
return _session.CreateCriteria(typeof(Customer))
.Add(new NHibernate.Expression.EqExpression... | <p>Always be careful with NULLable fields whenever you deal with NHibernate. If your field is NULLable in DB, make sure corresponding .NET class uses Nullable type too. Otherwise, all kinds of weird things will happen. The symptom is usually will be that NHibernate will try to update the record in DB, even though you h... | <p>I also experienced this problem in NH 2.0.1 when trying to hide the inverse ends of many-to-many bags using access="noop" (hint: this doesn't work). </p>
<p>Converting them to access="field" + adding a field on the class fixed the problem. Pretty hard to track them down though.</p>
| 5,522 |
<p>What is the fastest, yet secure way to encrypt passwords (in PHP preferably), and for whichever method you choose, is it portable?</p>
<p>In other words, if I later migrate my website to a different server, will my passwords continue to work?</p>
<p>The method I am using now, as I was told, is dependent on the exa... | <p>If you are choosing an encryption method for your login system then speed is not your friend, Jeff had a to-and-frow with Thomas Ptacek about passwords and the <a href="http://chargen.matasano.com/chargen/2007/9/7/enough-with-the-rainbow-tables-what-you-need-to-know-about-s.html" rel="noreferrer">conclusion</a> was ... | <p><a href="http://php.net/password_hash" rel="nofollow noreferrer"><code>password_hash ( string $password , int $algo [, array $options ] )</code></a>. (PHP 5 >= 5.5.0, PHP 7)</p>
<p><code>password_hash()</code> creates a new password hash using a strong one-way hashing algorithm. <code>password_hash()</code> is c... | 2,309 |
<p>I'd like to use Segoe UI 9 pt on Vista, and Tahoma 8 pt on Windows XP/etc. (Actually, I'd settle for Segoe UI on both, but my users probably don't have it installed.) But, these being quite different, they really screw up the layout of my forms. So... is there a good way to deal with this?</p>
<p>An example: I have... | <p>It's strange to need to layout one control within another. You might be solving an upstream problem wrong. Are you able to split the label into two labels with the updown between and maybe rely on a Windows Forms TableLayout panel? </p>
<p>If it's essential to try to position based on font sizes, you could use <a... | <p>First of all, you can find out which version of Windows you are using with the <a href="http://msdn.microsoft.com/en-us/library/system.operatingsystem.platform.aspx" rel="nofollow noreferrer">OperatingSystem.Platform</a> property in the System library.</p>
<p>Second, it is possible that you may put your font settin... | 5,795 |
<p>If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and calling the appropriate h... | <p>I don't know of any documented "patterns" for processing.</p>
<p>I believe one of the oldest libraries/APIs for handling arguments is getopt. Googling "getopt" shows lots of man pages and links to implementations.</p>
<p>Generally, I have a preferences or settings service in my application that the argument proce... | <p>You don't mention a language for this but if you are looking for a really nice Objective-C wrapper around getopt then Dave Dribin's DDCLI framework is really nice.</p>
<p><a href="http://www.dribin.org/dave/blog/archives/2008/04/29/ddcli" rel="nofollow noreferrer">http://www.dribin.org/dave/blog/archives/2008/04/29... | 7,804 |
<p>I'm just beginning to have a look at Objective-C and Cocoa with a view to playing with the iPhone SDK. I'm reasonably comfortable with C's <code>malloc</code> and <code>free</code> concept, but Cocoa's references counting scheme has me rather confused. I'm told it's very elegant once you understand it, but I'm just ... | <p>Let's start with <code>retain</code> and <code>release</code>; <code>autorelease</code> is really just a special case once you understand the basic concepts. </p>
<p>In Cocoa, each object keeps track of how many times it is being referenced (specifically, the <code>NSObject</code> base class implements this). By ... | <p>As several people mentioned already, Apple's <a href="http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html" rel="nofollow noreferrer">Intro to Memory Management</a> is by far the best place to start.</p>
<p>One useful link I haven't seen mentioned yet is <a href... | 2,828 |
<p>I'm new to development (an admin by trade) and I'm setting up my development environment and I would like to set up a CruiseControl.Net server on Server 2008. A quick Google did not turn up any instructions for getting it running on IIS 7.0, so I was wondering if anyone had experience getting this set up.</p>
| <p>What Dale Ragan said; it installed flawlessly on our Windows Server 2008 machine, including the Dashboard running on IIS 7. Just give it a shot; should work fine.</p>
| <p>I got it running by following the steps in <a href="http://www.matthewbussa.com/2011/05/installing-and-configuring-cruise.html" rel="nofollow">this blog</a>. Additionally, I had to enable ASP.NET, as shown in <a href="http://lamiavitaintrycatch.wordpress.com/2008/05/20/http-error-50019-iis-70-thoubles-fixed/" rel="n... | 3,435 |
<p>I experience that on several different machines, with plugins, without plugins, with VB.net or c# solutions of many different sizes, <strong>closing</strong> the solution in <strong>VS 2005</strong> generally takes significantly more time than actually <strong>building</strong> the solution.</p>
<p>This has always ... | <blockquote>
<p>What on earth is visual studio doing
when you have actually told it to shut
down?</p>
</blockquote>
<p>You can use <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" rel="nofollow noreferrer">Process Monitor</a> from sysinternals. It maybe because of some plugins. Try resetti... | <p>I've found that closing all the open documents before you close the solution helps speed it up. Or maybe it's just a perception thing, but it <em>seems</em> faster :)</p>
| 6,716 |
<p>Is it a good idea or do I need to calibrate my E steps after I switch to a new filament due to the different types I use (to make my prints accurate)?</p>
<p>E.g. calibrate when switching from PLA to ABS/PETG? </p>
| <p>No that will not be necessary.</p>
<p>However, you could use calipers to measure the diameter of the filaments (e.g. at 5 positions over a few meters) and calculate the mean diameter, if there is a significant difference between the new and the currently used filament you could change the diameter in the slicer (or... | <p>That above is not entirely true. Maybe in a perfect world but we are far away from that. Just this week I tested it with an All-Metal MicroSwiss.</p>
<ul>
<li>Calibrated with PETG at 240 °C. Result E116</li>
<li>Calibrated with PLA at 180 °C. Result E96...</li>
</ul>
<p>A huge deviation one can't control with the fl... | 1,090 |
<p>I need to implement a <a href="http://en.wikipedia.org/wiki/Wavetable" rel="nofollow noreferrer">wavetable synthesizer</a> in an ARM Cortex-M3 core. I'm looking for any code or tools to help me get started.</p>
<p>I'm aware of <a href="http://elm-chan.org/works/mxb/report.html" rel="nofollow noreferrer">this AVR im... | <p>The Synthesis Toolkit (STK) is excellent, but it is C++ only:</p>
<p><a href="http://ccrma.stanford.edu/software/stk/" rel="noreferrer">http://ccrma.stanford.edu/software/stk/</a></p>
<p>You may be able to extract the wavetable synthesizer code from the STK though.</p>
| <p>Any ARM synth, the best ones, can be changed to wavescanner in less than a day. Scanning the wave from files or generating them mathematically is nearly the same thing audio wise, WT provides massive banks of waveforms at zero processing cost, you need the waves, the WT oscillator code itself is 20 lines. so change ... | 4,935 |
<p>I have this gigantic ugly string:</p>
<pre class="lang-none prettyprint-override"><code>J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM
J0000010: Project name: E:\foo.pf
J0000011: Job name: MBiek Direct Mail Test
J0000020: Document 1 - Completed successfully
</code></pre>
<p>I'm trying to extract piec... | <p>Make <code>.*</code> non-greedy by adding '<code>?</code>' after it:</p>
<pre><code>Project name:\s+(.*?)\s+J[0-9]{7}:
</code></pre>
| <p>(Project name:\s+[A-Z]:(?:\\w+)+.[a-zA-Z]+\s+J[0-9]{7})(?=:)</p>
<p>This will work for you.</p>
<p>Adding (?:\\w+)+.[a-zA-Z]+ will be more restrictive instead of .*</p>
| 4,246 |
<p>Can I use this approach efficiently?</p>
<pre><code>using(SqlCommand cmd = new SqlCommand("GetSomething", new SqlConnection(Config.ConnectionString))
{
cmd.Connection.Open();
// set up parameters and CommandType to StoredProcedure etc. etc.
cmd.ExecuteNonQuery();
}
</code></pre>
<p>My concern is : Will... | <p>No, Disposing of the <code>SqlCommand</code> will not effect the Connection. A better approach would be to also wrap the <code>SqlConnection</code> in a using block as well: </p>
<pre><code>using (SqlConnection conn = new SqlConnection(connstring))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand(cmds... | <p>I use this pattern. I have this private method somewhere in my app:</p>
<pre><code>private void DisposeCommand(SqlCommand cmd)
{
try
{
if (cmd != null)
{
if (cmd.Connection != null)
{
cmd.Connection.Close();
cmd.Connection.Dispose();
... | 8,600 |
<p>How would you go about proving that two queries are functionally equivalent, eg they will always both return the same result set.</p>
<hr>
<p>As I had a specific query in mind when I was doing this, I ended up doing as @dougman suggested, over about 10% of rows the tables concerned and comparing the results, ensur... | <p>The best you can do is compare the 2 query outputs based on a given set of inputs looking for any differences. To say that they will always return the same results for all inputs really depends on the data.</p>
<p>For Oracle one of the better if not best approaches (very efficient) is here (<kbd>Ctrl</kbd>+<kbd>F<... | <p>You don't.</p>
<p>If you need a high level of confidence that a performance change, for example, hasn't changed the output of a query then test the hell out it.</p>
<p>If you need a really high level of confidence .. then errrm, test it even more.</p>
<p>Massive level's of testing aren't that hard to cobble toget... | 8,101 |
<p>I've never had to do IPC on Windows before. I'm developing a pair of programs, a standard GUI/CLI app, and a windows service. The app has to tell the service what to do. So, assuming the communication is local only, what would be the best communication method for these two processes?<br />
By best I mean more robust... | <p>IPC in .Net can be achieved using:</p>
<h1>WCF</h1>
<p>using named pipes <strong>requires .Net 3.0</strong> and above.</p>
<h2>Code example</h2>
<ul>
<li>The WCF class <strong>NetNamedPipeBinding</strong> can be used for interprocess communication on the same machine. The MSDN documentaion for this class includes ... | <p>Your best bet is to use WCF. You will be able to create a service host in the windows service and expose a well defined interface that the GUI application can consume. WCF will let you communicate via named pipes if you choose, or you can choose any other communication protocal like TCP, HTTP, etc. Using WCF you ... | 7,285 |
<p>I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership.</p>
<p>I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I... | <p>A short list might be:</p>
<ul>
<li>Avoid memory leaks through use shared pointers to manage memory allocation and cleanup</li>
<li>Use the <a href="https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization" rel="noreferrer">Resource Acquisition Is Initialization</a> (RAII) idiom to manage resource clean... | <pre><code>#include <boost/shared_ptr.hpp>
class A {
public:
void nuke() {
boost::shared_ptr<A> (this);
}
};
int main(int argc, char** argv) {
A a;
a.nuke();
return(0);
}
</code></pre>
| 5,031 |
<p>In Eclipse, I can switch through open editors using control-page up/down. This works great, except for editors like XML or JavaScript, where there are Design and Source tabs. For those editors, it just toggles between the different tabs. Is there any way to get Eclipse to ignore them? I know about alt-F6 for "Next E... | <p>You're right -- looks like Eclipse has acknowledged it as a <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=199499" rel="nofollow noreferrer">bug</a>. It's fixed in 3.5.</p>
| <p>I was initially thinking <kbd>Alt</kbd>-<kbd>←</kbd> and <kbd>Alt</kbd>-<kbd>→</kbd> might do what you want, but that's more for going forward and backwards in history of tabs you've viewed. Which might sort of get you what you want, but is probably just as confusing as <kbd>Alt</kbd>-<kbd>F6</kbd>.</p>
<p>I think i... | 8,697 |
<p>Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column?</p>
<p>For instance, I can currently set the display name of a column like this:</p>
<pre><code>[DisplayName("Last name")]
public object Last_name { get; set; }
</code></pre>
<p>Is there a similar way to hide a colu... | <p>Had no idea what ASP.NET Dynamic Data was so you promted me to so some research :)</p>
<p>Looks like the property you are looking for is </p>
<pre><code>[ScaffoldColumn(false)]
</code></pre>
<p>There is also a similar property for tables</p>
<pre><code>[ScaffoldTable(false)]
</code></pre>
<p><a href="http://dav... | <p>A much, much easier method: If you want to only show certain columns in the List page, but all or others in the Details, etc. pages, see <a href="https://stackoverflow.com/questions/80175/how-do-i-hide-a-column-only-on-the-list-page-in-asp-net-dynamic-data">How do I hide a column only on the list page in ASP.NET Dyn... | 4,526 |
<p>Refactoring is the process of improving the existing system design without changing its behavior.</p>
<p>Besides Martin Fowler's seminal book "<a href="https://rads.stackoverflow.com/amzn/click/com/0201485672" rel="nofollow noreferrer" rel="nofollow noreferrer">Refactoring - Improving the design of existing code</a... | <p><a href="http://www.refactoring.com/" rel="noreferrer">http://www.refactoring.com/</a> might help you. They have a long list of methods here:</p>
<ul>
<li><a href="http://www.refactoring.com/catalog/index.html" rel="noreferrer">http://www.refactoring.com/catalog/index.html</a></li>
</ul>
<p>Joel's article <a href=... | <p>What is your codebase?</p>
<p>Eclipse has quite good support for Java. But unfortunately limited support for C++ code.</p>
<p><a href="http://www.ibm.com/developerworks/library/l-eclipse.html" rel="nofollow noreferrer">Heres</a> an article from the makers..</p>
| 7,127 |
<p>Simple ASP.NET application.</p>
<p>I have two drop-down controls. On the first-drop down I have a JavaScript <code>onChange</code> event. The JavaScript enables the second drop-down and removes a value from it (the value selected in the first drop-down). If they click the blank first value of the drop-down, then th... | <pre><code><%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void indexChanged(object sender, EventArgs e)
{
Label1.Text = " I did something! ";
}
&... | <p>If the second dropdown is initially enabled through javascript (I'm assuming this is during a javascript onchange, since you didn't specify), then clicking the back button to reload the previous postback will never enable it. </p>
<p>Mixing ASP.NET with classic javascript can be hairy. You might want to have a look... | 3,078 |
<p>I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable.</p>
<p>I'm using <code>clisp</code> and <code>clisp -c</code> produces two files:</p>
<ul>
<li>.fas</li>
<li>.lib</li>
</ul>
<p>What do I do next to get an executable?</p>
| <p>I was actually trying to do this today, and I found typing this into the CLisp REPL worked:</p>
<pre><code>(EXT:SAVEINITMEM "executable.exe"
:QUIET t
:INIT-FUNCTION 'main
:EXECUTABLE t
:NORC t)
</code></pre>
<p>where main is the name of the functi... | <p>I know this is an old question but the Lisp code I'm looking at is 25 years old :-)</p>
<p>I could not get compilation working with clisp on Windows 10.
However, it worked for me with <a href="https://www.cs.utexas.edu/users/novak/gclwin.html" rel="nofollow noreferrer">gcl</a>.</p>
<p>If my lisp file is jugs2.lisp... | 4,470 |
<p>I wrote an Active X plugin for IE7 which implements IObjectWithSite besides some other necessary interfaces (note no IOleClient). This interface is queried and called by IE7. During the SetSite() call I retrieve a pointer to IE7's site interface which I can use to retrieve the IHTMLDocument2 interface using the foll... | <p>I found the following code in the Google Gears code, <a href="http://code.google.com/p/gears/source/browse/trunk/gears/base/ie/activex_utils.cc?r=2157" rel="nofollow noreferrer">here</a>. I copied the functions I think you need to here. The one you need is at the bottom (GetHtmlWindow2), but the other two are needed... | <p>Well I was aware of the gears code already. The mechanism gears uses is based on a workaround through performing an explicit method call into the gears plugin from the gears loader to set the window object and use that as site interface instead of the IUnknown provided by IE Mobile in the SetSite call. Regarding to ... | 6,766 |
<p>Is there a standard way of dealing with globally scoped variables in PHP? Session scoped? </p>
<p>From the research I've done, it looks like the options are mostly add-ons or external. APC might work, but would be limited to a single PHP instance and not so useful for a farm of servers. <em>Memcached</em> seems lik... | <p>A persistent layar is the only way to go with php. Either file based solution or database. </p>
<p>php natively doesn't provide any mechanism to do application scope variable.</p>
| <p>You can do session variables with <a href="http://www.php.net/manual/en/reserved.variables.session.php" rel="nofollow noreferrer">$_SESSION</a>.</p>
| 7,344 |
<p>Does anyone have any experience with a good wpf pivot table control?</p>
| <p><a href="http://www.devexpress.com/Products/NET/Controls/WPF/Grid/" rel="noreferrer">DevExpress Grid control</a> has good pivot functionality. Used it for Winforms a lot. I think the WPF version is also available.</p>
| <p>I am a consultant at Infragistics and I've been working exclusively the last few weeks with the Infragistics XamPivotGrid. We've been working to make this control fast and memory efficient. As a user and a developer, I am highly impressed with the usability of this control. You can check out this control in the WPF ... | 7,881 |
<p>We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.</p>
<p>What's the correct way of doing it? It's ASP.NET 1.1</p>
| <p>You should be able to generate a proxy class using wsdl.exe. Then just use the web service as you normally would.</p>
| <p>While I'm not 100% sure what the Web Service behavior does, I recall it allows client-side script to call Web Services, which would make AJAX it's contemporary replacement.</p>
<p>Since you're using .NET 1.1 how about using <a href="http://www.ajaxpro.info" rel="nofollow noreferrer">Ajax.NET Professional</a> to con... | 5,541 |
<p>I've long been under the impression that <code>goto</code> should never be used if possible.</p>
<p>However, while perusing libavcodec (which is written in C) the other day, I was surprised to notice multiple uses of it.</p>
<p>Is it ever advantageous to use <code>goto</code> in a language that supports loops and fu... | <p>Everybody who is anti-<code>goto</code> cites, directly or indirectly, Edsger Dijkstra's <a href="http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html" rel="noreferrer">GoTo Considered Harmful</a> article to substantiate their position. Too bad Dijkstra's article has virtually <em>n... | <p>The problem with 'goto' and the most important argument of the 'goto-less programming' movement is, that if you use it too frequently your code, although it might behave correctly, becomes unreadable, unmaintainable, unreviewable etc. In 99.99% of the cases 'goto' leads to spaghetti code. Personally, I cannot think ... | 4,406 |
<p>I'm having a strange problem.</p>
<p>I have to use <code>GetPostBackEventRefence</code> to force a Postback, but it works the first time, after the first postback, the .NET function is not rendered... any ideas?</p>
<p>This is what I'm missing after the postback:</p>
<pre><code><script language="javascript" ty... | <p>The first thing I would look at is whether you have any asp controls (such as linkbutton, comboboxes,that don't normally generate a submit but requre a postback) being displayed on the page.
<strong>The __doPostback function will only be put into the page if ASP thinks that one of your controls requires it.</strong... | <p>Well, following that idea I created a dummy function with the postbackreference, and it works... it still is weird though, because of it rendering correctly the first time</p>
<pre><code>this.Page.RegisterClientScriptBlock("DUMMY", "<script language='javascript'>function dummy() { " + this.Page.GetPostBackEve... | 7,340 |
<p>I have recently, in anticipation of printing carbon-fiber-reinforced nylon filament (Polymaker PA6-CF) on my Prusa i3 MK3S, built a filament drybox. It is made out of a large aluminum equipment enclosure which I had spare, every seam, rivet, hinge mount, foot screw, sealing lip, etc of which has been sealed with cop... | <p>Track humidity graph over days (one measurement every 3 hours is fine). Be careful that polling the sensor too often may warm it up and cause inaccuracies, the temperature dependence is quite strong. Also, you may need to poll twice at 5 s interval and discard the first reading if you want more accurate values.</p>
... | <p>Alright, there were some good suggestion in the comments, and I gave them a look, but I think I solved this myself.</p>
<p>I think, after a lot more testing, that it was some combination of stratification and a faulty sensor. I managed to find four more DHT22s with which I could test the box, and found that the sens... | 2,120 |
<p>I suck at math. I need to figure out how to calculate a video duration with only a few examples of values. For example, a value of 70966 is displayed as 1:10 minutes. A value of 30533 displays as 30 seconds. A value of 7007 displays as 7 seconds. </p>
| <p>Looks like the numbers are in milliseconds. So to convert to seconds, divide by 1000, then divide by 60 to find minutes etc.</p>
| <p>I'm not sure if I completely understand this, but:</p>
<pre><code> 70966 / 70 seconds = 1013.8
</code></pre>
<p>So dividing the "value" by 1013.8 should get the duration, approximately...</p>
<p>Edit: Yes, Ben is right, you should divide by 1000. I got 1013.8 because the 70 seconds was rounded down from 70.966 se... | 5,818 |
<p>What is the reason for the following warning in some C++ compilers?</p>
<blockquote>
<p>No newline at end of file</p>
</blockquote>
<p>Why should I have an empty line at the end of a source/header file?</p>
| <p>Think of some of the problems that can occur if there is no newline. According to the ANSI standard the <code>#include</code> of a file at the beginning inserts the file exactly as it is to the front of the file and does not insert the new line after the <code>#include <foo.h></code> after the contents of the ... | <p>That's not an error. It's just a warning.</p>
<p>Open the file in an editor, go to the last line of the file, and hit enter to add a blank line to the end of the file.</p>
<p>Though, besides that, you should be using <code>#include <iostream></code> instead of <code><iostream.h></code>. Then put in a <... | 9,790 |
<p>Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?</p>
<p>Or,</p>
<p>if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called?</p>
| <p><strong>For many objects</strong>, you can use this code, replacing 'object' with the object you're interested in:</p>
<pre class="lang-py prettyprint-override"><code>object_methods = [method_name for method_name in dir(object)
if callable(getattr(object, method_name))]
</code></pre>
<p>I discovere... | <p>You can make use of dir() which is pre-defined in Python.</p>
<pre><code>import module_name
dir(module_name)
</code></pre>
<p>You can also pass an object to dir() as</p>
<pre><code>dir(object_name)
</code></pre>
<p>If the object is an object of a pre-defined class such as int, str, etc. it displays the methods in it... | 5,468 |
<p><a href="https://stackoverflow.com/questions/32149/does-anyone-have-a-good-proper-case-algorithm">Using this question</a> as the base is there an alogrithm or coding example to change some text to Pascal or Camel casing.</p>
<p>For example:</p>
<pre><code>mynameisfred
</code></pre>
<p>becomes</p>
<pre><code>Came... | <p>I found a thread with a bunch of Perl guys arguing the toss on this question over at <a href="http://www.perlmonks.org/?node_id=336331" rel="nofollow noreferrer">http://www.perlmonks.org/?node_id=336331</a>.</p>
<p>I hope this isn't too much of a non-answer to the question, but I would say you have a bit of a probl... | <p>The only way to do that would be to run each section of the word through a dictionary.</p>
<p>"mynameisfred" is just an array of characters, splitting it up into my Name Is Fred means understanding what the joining of each of those characters means.</p>
<p>You could do it easily if your input was separated in some... | 5,216 |
<p>I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default <code>ON DELETE RESTRICT</code> behavior for those constraints. But when trying to share a snapshot of the database with a consultant, I needed to remove some sensitive data. I wish that my memory ... | <p>You do not need to dump and restore. You should be able to just drop the constraint, rebuild it with cascade, do your deletes, drop it again, and the rebuild it with restrict.</p>
<pre><code>CREATE TABLE "header"
(
header_id serial NOT NULL,
CONSTRAINT header_pkey PRIMARY KEY (header_id)
);
CREATE TABLE deta... | <p>You may want to look into using <a href="http://www.postgresql.org/docs/8.2/static/ddl-schemas.html" rel="nofollow noreferrer">schemas</a> with PostgreSQL. I've done this in past projects to allow different groups of people or developers to have their own data. Then you can use your scripts to create multiple copi... | 6,754 |
<p>SVN externals allow you to make an SVN folder appear as if it's at another location. A good use for this is having a common folder shared across all of your projects in SVN.</p>
<p>I have a /trunk/common folder in SVN that I share via several different project.</p>
<p>Example:</p>
<ul>
<li>Project1 : /trunk/proj... | <p>This is not possible with the current release of Subversion, other than explicitly calling svn log on the target of the externals directory</p>
<p>You can try issueing a feature request at <a href="http://subversion.apache.org/" rel="nofollow noreferrer">the Apache Subversion website</a></p>
| <p>When you display the log for a local versioned folder, it will show the changes that are relative to this particular folder. Externals are only <strong>a link</strong> to a different folder on the repository. The only thing you can track about external references, from a folder which depends on this external project... | 8,822 |
<p>Everyone I talk to who knows (knew) about it claims it was the greatest thing since sliced bread. Why did it fail? Or, if it didn't fail, who's using it now?</p>
| <p>Check out <a href="http://www.gigaspaces.com" rel="noreferrer">GigaSpaces</a>. It's a quite successful Jini/Javaspaces implementation.</p>
<p>I think Jini has a great model, but it is stuck with Java. Web-services is more appealing because it works with standarized protocols, even though Jini service discovery is m... | <p>Zeroconf and other discovery protocols are similarly referred to as the greatest thing since sliced bread; it's just that the flavor keeps changing.</p>
| 6,661 |
<p>My team is working on a crappy old website and most of the pages are still ASP classic. However, we've recently migrated to forms authentication using ASP.NET and wildcard mapping. Everything works surprisingly well except for one thing: logged in users are timing out too quickly. After looking in the logs it app... | <p><strong>Create a perpetual session.</strong></p>
<p>Essentially you end up emitting some JavaScript and an image tag in your master page or navigation users controls (whatever you're using for consistent navigation). This JavaScript on some interval changes the source of the image tag to an http handler endpoint (s... | <p>I am assuming that you have manually created the cookie, in which case your timeout value in code is probably overriding your timeout value in the configuration.</p>
<p>First, if possible (which it probably isn't) don't create the cookie manually, it will save you from not only this headache but dozens of others.</... | 8,211 |
<p>We develop custom survey web sites and I am looking for a way to automate the pattern testing of these sites. Surveys often contain many complex rules and branches which are triggered on how items are responded too. All surveys are rigorously tested before being released to clients. This testing results in a lot ... | <p>Check out selenium: <a href="http://selenium.openqa.org/" rel="nofollow noreferrer">http://selenium.openqa.org/</a></p>
<p>Also, check out the answers to this other question: <a href="https://stackoverflow.com/questions/484/how-do-you-test-layout-design-across-multiple-browsersoss">https://stackoverflow.com/questio... | <p>Sounds like your engine could generate a test script using something like <a href="http://search.cpan.org/~petdance/Test-WWW-Mechanize-1.20/Mechanize.pm" rel="nofollow noreferrer">Test::WWW::Mechanize</a></p>
| 9,476 |
<p>I just bought a new RAMPS 1.6 shield to replace my old RAMPS 1.4 shield. The problem is that it's just not working, the motors don't move, heatbed/nozzle don't get heated. It was all working with the RAMPS 1.4 shield.</p>
<p>I checked the RAMPS 1.6 and there's no bridging in the solder joints.</p>
<p>The DRV8255 is ... | <p>IMHO, it's probably better to get the printer as-is first. This way you can get familiar with the printer and 3D printing in general before you get overwhelmed with all the extra introduced variables from your upgrades.</p>
<p>The new model already has loads of features that were considered upgrades on the older mod... | <p>I have an Ender 3 v2 and I haven't upgraded anything except updating the firmware. The first thing I suggest is updating the firmware and changing the hotend to an all-metal one. This will allow you to print in higher temperatures and adding a BLTouch for automatic bed leveling will make your life a bit easier.</p>
| 1,737 |
<p>I have been working with a <code>string[]</code> array in C# that gets returned from a function call. I could possibly cast to a <code>Generic</code> collection, but I was wondering if there was a better way to do it, possibly by using a temp array.</p>
<p><strong>What is the best way to remove duplicates from a C#... | <p>You could possibly use a LINQ query to do this:</p>
<pre><code>int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();
</code></pre>
| <pre><code>using System;
using System.Collections.Generic;
using System.Linq;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
List<int> listofint1 = new List<int> { 4, 8, 4, 1, 1, 4, 8 };
List<int> updatedlist= rem... | 3,106 |
<p>I am working on a project that requires the manipulation of enormous matrices, specifically pyramidal summation for a copula calculation. </p>
<p>In short, I need to keep track of a relatively small number of values (usually a value of 1, and in rare cases more than 1) in a sea of zeros in the matrix (multidimensi... | <p>For C++, a map works well. Several million objects won't be a problem. 10 million items took about 4.4 seconds and about 57 meg on my computer.</p>
<p>My test application is as follows:</p>
<pre><code>#include <stdio.h>
#include <stdlib.h>
#include <map>
class triple {
public:
int x;
i... | <p>Since only values with [a][b][c]...[w][x][y][z] are of consequence, we only store the indice themselves, not the value 1 which is just about everywhere - always the same + no way to hash it. Noting that the curse of dimensionality is present, suggest go with some established tool NIST or Boost, at least read the sou... | 2,632 |
<p>I have a (potentially dumb) question about the C++ STL. When I make a container (vector, set, map, etc), is it allocated on the stack or on the heap? If I make a set and put 5 million strings, will I have to worry about a stack overflow?</p>
| <p>STL classes by default allocate their internal buffers from the heap, although these classes also allow custom allocators that allow a user to specify an alternate location to allocate from - e.g. a shared memory pool.</p>
| <p>The container itself is allocated where you decide (it can be the stack, the heap, an object's member, etc) but the memory it uses is, by default, as others described, taken on the Free Store (managed through new and delete) which is not the same as the heap (managed through malloc/free).</p>
<p><a href="http://www... | 5,335 |
<p>I have a list of bean objects passed into my JSP page, and one of them is a comment field. This field may contain newlines, and I want to replace them with semicolons using JSTL, so that the field can be displayed in a text input. I have found one solution, but it's not very elegant. I'll post below as a possibility... | <p>Here is a solution I found. It doesn't seem very elegant, though:</p>
<pre><code><%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<% pageContext.setAttribute("newLineChar", "\n"); %>
${fn:replace(item.comments, newLineChar, "; ")}
</code></pre>
| <p>You could write your own JSP function to do the replacement.</p>
<p>This means you'd end up with something like:</p>
<pre><code><%@ taglib prefix="ns" uri="..." %>
...
${ns:replace(data)}
</code></pre>
<p>Where <code>ns</code> is a namespace prefix you define and <code>replace</code> is your JSP function.</... | 8,250 |
<p>Using SqlServer, and trying to update rows from within the same table. I want to use a table alias for readability.
This is the way I am doing it at the moment:</p>
<pre><code>UPDATE ra
SET ra.ItemValue = rb.ItemValue
FROM dbo.Rates ra, dbo.Rates rb
WHERE ra.ResourceID = rb.ResourceID
AND ra.PriceSched = 't8'
AND r... | <pre><code>UPDATE ra
SET ra.ItemValue = rb.ItemValue
FROM dbo.Rates ra
INNER JOIN dbo.Rates rb
ON ra.ResourceID = rb.ResourceID
WHERE ra.PriceSched = 't8'
AND rb.PriceSched = 't9';
</code></pre>
<p>This might help in improving performance.</p>
| <p><strong>Table alias in Update Query in T-SQL( Microsoft SQL) .
for MS SQL Server 2008 R2 it's work just fine</strong></p>
<pre><code>UPDATE A_GeneralLedger set ScheduleId=g.ScheduleId
from A_GeneralLedger l inner join A_AcGroup g on g.ACGroupID=l.AccountGroupID
</code></pre>
| 5,149 |
<p>I've seen people doing things like this in their HTML:</p>
<pre><code><!--[if IE]>
<link rel="stylesheet" href="ie.css" type="text/css" />
<![endif]-->
</code></pre>
<p>Does this work across all modern browsers and is there a list of browser types that will work with that kind of if statement?<... | <p>This works across all browsers because anything except IE sees <code><!--IGNORED COMMENT--></code>. Only IE reads the comment if it contains a conditional clause. Have a look at <a href="http://www.quirksmode.org/css/condcom.html" rel="noreferrer">this article</a></p>
<p>You can also specify which version of ... | <p>Further to Ross' answer, you can only target the Internet Explorer rendering engine with conditional comments; there is no similar construct for other browsers. For example, you can't write conditional comments that target Firefox, but are ignored by Internet Explorer. </p>
<p>The way I achieve the same effect as y... | 6,814 |
<p>I'm writing an asp.net application that will need to be localized to several regions other than North America. What do I need to do to prepare for this globalization? What are your top 1 to 2 resources for learning how to write a world ready application.</p>
| <p>A couple of things that I've learned:</p>
<ul>
<li><p>Absolutely and brutally minimize the number of images you have that contain text. Doing so will make your life a billion percent easier since you won't have to get a new set of images for every friggin' language.</p></li>
<li><p>Be very wary of css positioning t... | <p>I would suggest:</p>
<ol>
<li>Put all strings in either the database or resource files. </li>
<li>Allow extra space for translated text, as some (e.g. German) are wordier.</li>
</ol>
| 8,362 |
<p>I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage.</p>
<p>So far I have this (simplified):</p>
<pre><code>DECLARE @ResultTable table
(
StaffName nvarchar(100),... | <p>You could just check for existence and use the appropriate command. I believe this really does use a cursor behind the scenes, but it's the best you'll likely get: </p>
<pre><code>IF (EXISTS (SELECT * FROM MyTable WHERE StaffName = @StaffName))
begin
UPDATE MyTable SET ... WHERE StaffName = @StaffName
end
else... | <p>The following query on your result table should combine the rows again. This is assuming that InStage1 and InStage2 are never both '1'.</p>
<pre><code>select distinct(rt1.StaffName), rt2.Stage1Count, rt3.Stage2Count
from @ResultTable rt1
left join @ResultTable rt2 on rt1.StaffName=rt2.StaffName and rt2.Stage1Count ... | 3,957 |
<p>I have a page that is generated which inserts an HTML comment near the top of the page. Inside the comment is a *nix-style command.</p>
<pre><code><!-- command --option value --option2 value2 --option3 -->
</code></pre>
<p>This comment breaks the page completely. What is wrong with the comment to cause thi... | <p>Comments in the <a href="http://www.w3.org/TR/REC-xml/#sec-comments" rel="noreferrer">XML Spec from the w3.org</a> :</p>
<blockquote>
<p>For compatibility, the string "--"
(double-hyphen) MUST NOT occur within
comments.</p>
</blockquote>
| <p>Comments at the top of the page before <code><html></code> will throw IE into quirks mode, which could explain why the page breaks, if that's where your comment appears.</p>
<p>For more information, check out the "Triggering different rendering modes" on <a href="http://en.wikipedia.org/wiki/Quirks_mode" rel=... | 2,733 |
<p>I can do an <code>eval("something()");</code> to execute the code dynamically in JavaScript. Is there a way for me to do the same thing in C#?</p>
<p>An example of what I am trying to do is: I have an integer variable (say <code>i</code>) and I have multiple properties by the names: "Property1", "Property2", "Prope... | <p><strong>DISCLAIMER:</strong> This answer was written back in 2008. The landscape has changed drastically since then.</p>
<p>Look at the other answers on this page, especially the one detailing <code>Microsoft.CodeAnalysis.CSharp.Scripting</code>.</p>
<p>Rest of answer will be left as it was originally posted but is ... | <p>Unfortunately, C# doesn't have any native facilities for doing exactly what you are asking. </p>
<p>However, my C# eval program does allow for evaluating C# code. It provides for evaluating C# code at runtime and supports many C# statements. In fact, this code is usable within any .NET project, however, it is limit... | 2,663 |
<p>A checklist for improving execution time between .NET code and SQL Server.
Anything from the basic to weird solutions is appreciated.</p>
<p><strong>Code:</strong></p>
<p>Change default timeout in command and connection by <a href="https://stackoverflow.com/questions/67366/a-checklist-for-fixing-net-apps-to-sql-se... | <p>In the past some of my solutions have been:</p>
<ol>
<li><p>Fix the default time out settings of the sqlcommand:</p>
<p>Dim myCommand As New SqlCommand("[dbo].[spSetUserPreferences]", myConnection)</p>
<p>myCommand.CommandType = CommandType.StoredProcedure</p>
<p><strong>myCommand.CommandTimeout = 120</strong></... | <p>A few quick ones...</p>
<ul>
<li>Check Processor use of server to see if it's just too busy</li>
<li>Look for blocking/locking going on with the Activity monitor</li>
<li>Network issues/performance</li>
</ul>
| 9,291 |
<p>I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. </p>
| <p>To get a sticky footer:</p>
<ol>
<li><p>Have a <code><div></code> with <code>class="wrapper"</code> for your content.</p></li>
<li><p>Right <strong>before</strong> the closing <code></div></code> of the <code>wrapper</code> place the
<code><div class="push"></div></code>.</p></li>
<li><p>Rig... | <p>Try putting a container div (with overflow:auto) around the content and sidebar.</p>
<p>If that doesn't work, do you have any screenshots or example links where the footer isn't displayed properly?</p>
| 6,374 |
<p>I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge.</p>
<p>The following code:</p>
<pre><code><?php
// Make sure classes are in the include path.
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PAT... | <p>for a start I think your include path should maybe have a trailing slash. Here is an example of mine :</p>
<pre><code> set_include_path('../library/ZendFramework-1.5.2/library/:../application/classes/:../application/classes/excpetions/:../application/forms/');
</code></pre>
<p>You bootstrap file will be includ... | <p>It works sometimes so there isn't anything inherently wrong on the PHP end of things (if the path was wrong it would never work... but it does, yes?). So what is causing Loader.php to be periodically inaccessible? I would suspect a permissions problem. Something that is making Loader.php or the directory that it is ... | 6,037 |
<p>I'm executing stored procedures using SET FMTONLY ON, in order to emulate what our code generator does. However, it seems that the results are cached when executed like this, as I'm still getting a <em>Conversion failed</em> error from a proc that I have just dropped! This happens even when I execute the proc witho... | <p>Some statements will still be executed, even with <strong><code>SET FMTONLY ON</code></strong>. You "Conversion failed" error could be from something as simple as a <code>set variable</code> statement in the stored proc. For example, this returns the metadata for the first query, but throws an exception when it ru... | <ol>
<li><p>This sounds like a client-side error. Do you get the same message when running through SQL Management Studio?</p></li>
<li><p>Have you confirmed that there isn't another procedure with the same name that's owned by a different schema/user?</p></li>
</ol>
| 9,764 |
<p>What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat?</p>
<p>I know that Tomcat is written in Java and the HTTP Server is in C, but other than that I do not really know how they are distinguished. Do they have different functionality?</p>
| <p>Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat.</p>
<p>So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.</p>
... | <p>Apache is an HTTP web server which serve as HTTP.</p>
<p>Apache Tomcat is a java servlet container. It features same as web server but is customized to execute java servlet and JSP pages.</p>
| 5,051 |
<p>I printed a raspberry pi case from PLA. <a href="https://www.thingiverse.com/thing:1549574" rel="noreferrer">This case</a>.</p>
<p>I fitted it to my raspberry pi and now the wifi keeps dropping out. When I take it out of the case there is no problem. </p>
<p>The filament I am using is Black, 3D Hero 1.75mm.</p>
<... | <p>Typically the black pigments in polymers are mineral based. If you are having true WiFi issues then it sounds like your filiment is using black iron oxide also called <a href="https://en.wikipedia.org/wiki/Magnetite" rel="nofollow noreferrer">magnetite</a> for the black pigment. This is the same material they use in... | <p>Typically the black pigments in polymers are mineral based. If you are having true WiFi issues then it sounds like your filiment is using black iron oxide also called <a href="https://en.wikipedia.org/wiki/Magnetite" rel="nofollow noreferrer">magnetite</a> for the black pigment. This is the same material they use in... | 1,262 |
<p>I'm looking for a robust, easy-to-use, regular expression evaluator for native C++, either platform-independent or Windows-specific.</p>
<p>Requirements:</p>
<ul>
<li>Can't use Boost or ACE regex libraries (unfortunately)</li>
<li>Can't use .NET Regex (or any managed code)</li>
</ul>
<p>The main requirement is th... | <p>C++11 now includes the support of regular expressions.
It will be platform independent. You just need a recent compiler.
Check the following list to know which one to use.</p>
<p><a href="http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport" rel="noreferrer">http://wiki.apache.org/stdcxx/C%2B%2B0xCompilerSupport<... | <p>Why don't you use Microsoft ATL's regex library? Kenny Kerr has written a <a href="http://weblogs.asp.net/kennykerr/archive/2008/07/18/visual-c-in-short-regular-expressions.aspx" rel="nofollow noreferrer">short article</a> on that recently.</p>
<blockquote>
<p>ATL includes a lightweight regular expression impleme... | 2,346 |
<p>Which is more efficient for the compiler and the best practice for checking whether a string is blank? </p>
<ol>
<li>Checking whether the length of the string == 0</li>
<li>Checking whether the string is empty (strVar == "")</li>
</ol>
<p>Also, does the answer depend on language?</p>
| <p>Yes, it depends on language, since string storage differs between languages.</p>
<ul>
<li>Pascal-type strings: <code>Length = 0</code>.</li>
<li>C-style strings: <code>[0] == 0</code>. </li>
<li>.NET: <code>.IsNullOrEmpty</code>.</li>
</ul>
<p>Etc. </p>
| <p>Actually, IMO the best way to determine is the IsNullOrEmpty() method of the string class.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/system.string.isnullorempty." rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.string.isnullorempty.</a></p>
<p>Update: I assumed .Net, in other... | 3,145 |
<p>I am creating a GUI for a machine that runs remote (WinXP) or on the machine itself (Windows CE 6.0).</p>
<p>Right now I've created a fast visualisation (read: very simple) of the machine itself. The goal is to make a bit more complex visualisation of the machine and for that I would need a lightweight 3d engine.</... | <p>Did you try <a href="http://irrlicht.sourceforge.net/" rel="nofollow noreferrer">Irrlicht</a>. </p>
<blockquote>
<p>Recently Irrlicht has acquired official .NET bindings, allowing users to develop in .Net languages such as VB.NET, C# and Boo.</p>
</blockquote>
<p>There is also <a href="http://en.wikipedia.org/wi... | <p>It is a good question. I have looked as well, and not seen anything. It would be great to see some easy to access great visual effects for mobile, to somewhat compete with other platforms that are getting better looking.</p>
<p>Sometimes with Windows Mobile I feel like I am in the Windows 3.1 days!</p>
| 6,726 |
<p>While writing a custom IHttpHandler I came across a behavior that I didn't expect concerning the HttpCachePolicy object.</p>
<p>My handler calculates and sets an entity-tag (using the SetETag method on the HttpCachePolicy associated with the current response object). If I set the cache-control to public using the S... | <p>I think you need to use HttpCacheability.ServerAndPrivate</p>
<p>That should give you cache-control: private in the headers and let you set an ETag.</p>
<p>The documentation on that needs to be a bit better.</p>
<p><strong>Edit:</strong> Markus found that you also have call cache.SetOmitVaryStar(true) otherwise t... | <p>If like me you're unhappy with the workaround mentioned here of using Cacheability.ServerAndPrivate, and you really want to use Private instead - perhaps because you are customising pages individually for users and it makes no sense to cache on the server - then at least in .NET 3.5 you can set ETag through Response... | 5,282 |
<p>I have ordered a dual hotend Chimera and it came with 2x 12 V heater elements (in my rush I forgot to order the one with 2x 24V).</p>
<p><a href="https://i.stack.imgur.com/xhQNem.png" rel="nofollow noreferrer" title="Chimera dual filament hotend"><img src="https://i.stack.imgur.com/xhQNem.png" alt="Chimera dua... | <p>This answer is intended to be a generic answer for Z-offset determination. The question is not clear on how the Z-offset has been determined. It appears as if this distance is measured, while in reality this cannot be measured.</p>
<p>A touch (or a inductive or capacitive) probe uses a trigger point to determine th... | <p>You should be able to offset this with a <code>G54 Z-1.3</code> - <strong>if your setup accepts these gcodes</strong>. </p>
<p>If you do this, always add a <code>G53</code> to the very start and just before the <code>M30</code> to clear all offsets after job finish (or in the event of a cancel, at the start of the ... | 1,467 |
<p>When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on.</p>
<p>I know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style of notification system in asp.... | <p>I'm currently using this:</p>
<pre><code>String content = null;
URLConnection connection = null;
try {
connection = new URL("http://www.google.com").openConnection();
Scanner scanner = new Scanner(connection.getInputStream());
scanner.useDelimiter("\\Z");
content = scanner.next();
scanner.close();
}catch... | <p>Its not library but a tool named curl generally installed in most of the servers or you can easily install in ubuntu by </p>
<pre><code>sudo apt install curl
</code></pre>
<p>Then fetch any html page and store it to your local file like an example </p>
<pre><code>curl https://www.facebook.com/ > fb.html
</code... | 5,140 |
<p>I work in VBA, and want to parse a string eg</p>
<pre><code><PointN xsi:type='typens:PointN'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<X>24.365</X>
<Y>78.63</Y>
</PointN>
</code></pre>
<p>and get the X & Y... | <p>This is a bit of a complicated question, but it seems like the most direct route would be to load the XML document or XML string via MSXML2.DOMDocument which will then allow you to access the XML nodes.</p>
<p>You can find more on MSXML2.DOMDocument at the following sites:</p>
<ul>
<li><a href="https://web.archive... | <p>Often it is easier to parse without VBA, when you don't want to enable macros. This can be done with the replace function. Enter your start and end nodes into cells B1 and C1.</p>
<pre><code>Cell A1: {your XML here}
Cell B1: <X>
Cell C1: </X>
Cell D1: =REPLACE(A1,1,FIND(A2,A1)+LEN(A2)-1,"")
Cell E1: =RE... | 3,245 |
<p>I have connected to a server via SFTP using FileZilla and accepted adding the server's SSH key to the key cache in FileZilla. </p>
<p>How can I extract this cached key to a keyfile so that may use it through other SFTP applications that require a keyfile be made available? </p>
<p>I have not been able to find an... | <p>If you use the standard openssh console client (cygwin or from linux), host keys are stored, one-per-line, in ~/.ssh/known_hosts. From there, it's a simple matter of figuring out which bit of that host key is needed for your library.</p>
<p>Putty also stores host keys, but it appears to encode them in hex. Those c... | <p>Unless I am misunderstanding you: you don't need to.</p>
<p>If you connect to the server with another application (ie: PuTTY) and it has not seen the server before then you will be prompted to accept the key. </p>
<p>I see why you might want to do this, but each application could have it's own way to store keys.... | 6,573 |
<p>There is filament residue on my glass bed that is so thin that it wont come off. I have had residue buildup for over a year now and none of it has come off. This residue appears with both the PETG and the PLA filament I have. Is there anyway to remove this residue?</p>
<p><a href="https://i.stack.imgur.com/DmG4e.png... | <p>I would try a single edge razor blade at a low angle used as a scraper. If you can't feel the blade catching in the residue, it probably isn't an issue.</p>
<p>If you must get rid of it you don't have good choices of solvents. Maybe you can burn it off by placing the class in an oven through a clean cycle. With ... | <p>Maybe you could put your bed at the max temperature and print a large square of 1 mm onto it using a higher than normal temperature for that filament, maybe this bonds the residue to the new print. Let it cool down and pry the print off or remove while hot.</p>
| 1,763 |
<p>Should I still be using tables anyway?</p>
<p>The table code I'd be replacing is:</p>
<pre><code><table>
<tr>
<td>Name</td><td>Value</td>
</tr>
...
</table>
</code></pre>
<p>From what I've been reading I should have something like</p>
<pre><code... | <p>I think that definition lists are pretty close semantically to name/value pairs.</p>
<pre><code><dl>
<dt>Name</dt>
<dd>Value</dd>
</dl>
</code></pre>
<p><a href="http://www.maxdesign.com.au/presentation/definition" rel="noreferrer">Definition lists - misused or misunders... | <p>use the float: property eg:
css:</p>
<pre class="lang-css prettyprint-override"><code>.left {
float:left;
padding-right:20px
}
</code></pre>
<p>html:</p>
<pre><code><div class="left">
Name<br/>
AnotherName
</div>
<div>
Value<br />
AnotherValue
</div>
</code></pre>
| 8,654 |
<p>I'm looking for any idea of what could cause this problem. I'm printing (1.75mm PLA @ 220C) a 14cm x 14cm box, sliced with Simplify3D. Relevant settings are 3 bottom layers, 3 top layers, 3 outline/perimeter shells, and 15% orthagonal infill every other layer.</p>
<p>The first 3 layers print fine. Here's the fir... | <p>I doubt this is a printer or filament issue. Rather, I suspect it might be related to how your slicer handles <em>bridging</em> scenarios (which basically is what laying down layers over infill is).</p>
<p>You could try to:</p>
<ol>
<li><p>Increase the infill percentage and/or use an infill pattern that provides b... | <p>The infill percentage is a bit low. </p>
<p>Even with infill percentages that are higher than 15% (I use 25%), a single layer on top of infill will not create a good top. It takes at least two and looks really good with three. The first layer is often patchy looking! </p>
<p>If you're stopping your print after one... | 399 |
<p>As part of our current database work, we are looking at a dealing with the process of updating databases.</p>
<p>A point which has been brought up recurrently, is that of dealing with system vs. user values; in our project user and system vals are stored together. For example...</p>
<p>We have a list of templates.... | <p>I have never had problems (performance or development - TDD & unit testing included) using GUIDs as the ID for my databases, and I've worked on some pretty big ones. Have a look <a href="http://www.sql-server-performance.com/articles/per/guid_performance_p2.aspx" rel="nofollow noreferrer">here</a>, <a href="http... | <p>Maybe I didn't get it, but couldn't you use GUIDs as Ids and still have user and system data together? Then you can access the system data by the (non-changable) GUIDs.</p>
| 3,109 |
<p>Is it possible to validate an xml file against its associated schema using Visual Studio 2005 IDE? </p>
<p>I could only see options to create a schema based on the current file, or show the XSLT output</p>
<p><img src="https://i.stack.imgur.com/x9mHo.png" alt="alt text"></p>
| <p>It's done automatically, errors appear as warnings in the "Error List" and are additionally underlined with the blue squiggle in the source file. </p>
<p>Not sure if there is another way to validate the file, but this will do for now.</p>
| <p><a href="http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemavalidator.aspx" rel="nofollow noreferrer">XmlSchemaValidator</a></p>
<p>Warning: It's not pretty to use.</p>
| 7,557 |
<p>I'm looking for any way that I can improve the selector performance of a jQuery call. Specifically things like this:</p>
<p>Is <code>$("div.myclass")</code> faster than <code>$(".myclass")</code></p>
<p>I would think it might be, but I don't know if jQuery is smart enough to limit the search by tag name first, et... | <p>There is no doubt that <strong>filtering by tag name first is much faster</strong> than filtering by classname.</p>
<p>This will be the case until all browsers implement getElementsByClassName natively, as is the case with getElementsByTagName.</p>
| <p>I've been on some of the jQuery mailing lists and from what I've read there, they most likely filter by tag name then class name (or vice versa if it was faster). They are obsessive about speed and would use anything to gain a smidgen of performance.</p>
<p>I really wouldn't worry about it too much anyway unless yo... | 6,826 |
<p>What software is recommended for working with and editing large XML schemas? I'm looking for both Windows and Linux software (doesn't have to be cross platform, just want suggestions for both) that help with dealing with huge XML files.</p>
| <p>I may be old fashioned, but I prefer my text editor. </p>
<p>I use emacs, and it has a fairly decent xml mode. </p>
<p>Most good text editors will have decent syntax hi-lighting and tag matching facilities. Your IDE might already do it (IntelliJ idea does, and I believe Eclipse does as well). Good text editors... | <p><strong>XML Copy Editor</strong> - Windows and Linux</p>
<p>Fast, free, and supports XML schema validation.</p>
<p>Official Website
<a href="http://xml-copy-editor.sourceforge.net/" rel="nofollow">http://xml-copy-editor.sourceforge.net/</a></p>
<p>How to install in Ubuntu
<a href="http://ubuntuforums.org/showthre... | 2,397 |
<p>I have an object that I want to print in 3D. But I have a few questions about it. What are the things that I have to watch out for when 3D printing? </p>
<p>I know how to change the metric size etc. Some people said that it's best to set the thickness to a low amount and not make the object solid (to leave the in... | <p>You are correct about the walls. Using a <em>Solidify</em> object modifier is probably your best bet. A low <em>Thickness:</em> value (<em>0.1</em> is probably good) helps keep the walls thin but strong. You can monitor the thickness while you adjust the value from <em>Wireframe</em> view.</p>
<p><a href="https://i... | <blockquote>
<p>What are the things that i have to watch out for when 3d printing? </p>
</blockquote>
<p><a href="https://blender.stackexchange.com/q/7910/2816">non manifold geometry</a> : geometry that can not exist in the real world. </p>
<p>It's a good idea to check if the dimensions of your mesh are correct b... | 305 |
<p>In WPF, how would I apply multiple styles to a <code>FrameworkElement</code>? For instance, I have a control which already has a style. I also have a separate style which I would like to add to it without blowing away the first one. The styles have different TargetTypes, so I can't just extend one with the other.... | <p><strong>I think the simple answer is that you can't do (at least in this version of WPF) what you are trying to do.</strong></p>
<p><em>That is, for any particular element only one Style can be applied.</em></p>
<p>However, as others have stated above, maybe you can use <code>BasedOn</code> to help you out. Check ... | <p><strong>If you are trying to apply a unique style to just one single element</strong> as an addition to a base style, there is a completely different way to do this that is IMHO much better for readable and maintainable code.</p>
<p>It's extremely common to need to tweak parameters per individual element. Defining ... | 3,680 |
<p>I have somehow misconfigured fingers. This leads to a very annoying situation.</p>
<ol>
<li>I select a block of text to copy;</li>
<li>I move the cursor the place where I want to paste the code;</li>
<li>I accidentally press Ctrl+C again instead of Ctrl+V;</li>
<li>My block of copied text is replaced by an empty bl... | <p>It's not copying an empty block, it's copying the blank line. You can change this setting in Tools > Options > Text Editor > All Languages > 'Apply Cut or Copy Commands to blank lines when there is no selection'</p>
| <p>Go to Tools > Options > Text Editor > All Languages > General</p>
<p>The option on that page is "Apply Cut or Copy commands to blank lines when there is no selection"</p>
| 9,971 |
<p>I'm generating some XML documents and when it comes to the address part I have fragments that look like this:</p>
<pre><code><Address>15 Sample St
Example Bay
Some Country</Address>
</code></pre>
<p>The XSLT that I have for converting this to XHTML has some funky recursive template to convert newline c... | <p>It's generally considered bad practice to rely on linebreaks, since it's a fragile way to differentiate data. While most XML processors will preserve any whitespace you put in your XML, it's not guaranteed. </p>
<p>The real problem is that most applications that output your XML into a readable format consider all... | <p>Yes, I think using a <a href="http://en.wikipedia.org/wiki/CDATA" rel="nofollow noreferrer">CDATA</a> block would protect the whitespace. Although some parser APIs allow you to preserve whitespace.</p>
| 2,892 |
<p>What's the simplest way to add a click event handler to a canvas element that will return the x and y coordinates of the click (relative to the canvas element)?</p>
<p>No legacy browser compatibility required, Safari, Opera and Firefox will do.</p>
| <p>If you like simplicity but still want cross-browser functionality I found this solution worked best for me. This is a simplification of @Aldekein´s solution but <strong>without jQuery</strong>.</p>
<pre><code>function getCursorPosition(canvas, event) {
const rect = canvas.getBoundingClientRect()
const x = e... | <p>Hey, this is in dojo, just cause it's what I had the code in already for a project.</p>
<p>It should be fairly Obvious how to convert it back to non dojo vanilla JavaScript. </p>
<pre><code> function onMouseClick(e) {
var x = e.clientX;
var y = e.clientY;
}
var canvas = dojo.byId(canvasId);
dojo... | 7,949 |
<p>I inserted some values into a table. There is a column whose value is auto-generated. In the next statement of my code, I want to retrieve this value.</p>
<p>Can you tell me how to do it the right way?</p>
| <p><code>@@IDENTITY</code> is not scope safe and will get you back the id from another table if you have an insert trigger on the original table, always use <code>SCOPE_IDENTITY()</code></p>
| <pre><code>SELECT @@Scope_Identity as Id
</code></pre>
<p>There is also @@identity, but if you have a trigger, it will return the results of something that happened during the trigger, where scope_identity respects your scope.</p>
| 6,764 |
<p>I've been using PostgreSQL a little bit lately, and one of the things that I think is cool is that you can use languages other than SQL for scripting functions and whatnot. But when is this actually useful?</p>
<p>For example, the documentation says that the main use for PL/Perl is that it's pretty good at text ma... | <p>"isn't that [text manipulation] more of something that should be programmed into the application?"</p>
<p>Usually, yes. The generally accepted "<a href="http://en.wikipedia.org/wiki/Multitier_architecture" rel="nofollow noreferrer">three-tier</a>" application design for databases says that your logic should be in t... | <p>I think most additional languages are offered so that if you develop in that language on a regular basis, you can feel comfortable writing db functions, triggers, etc. The usefulness of these features is to provide a control over data as close to the data as possible.</p>
| 6,059 |
<p>In Ruby, given an array in one of the following forms...</p>
<pre><code>[apple, 1, banana, 2]
[[apple, 1], [banana, 2]]
</code></pre>
<p>...what is the best way to convert this into a hash in the form of...</p>
<pre><code>{apple => 1, banana => 2}
</code></pre>
| <p><strong>NOTE</strong>: For a concise and efficient solution, please see <a href="https://stackoverflow.com/a/20831486/332936">Marc-André Lafortune's answer</a> below.</p>
<p>This answer was originally offered as an alternative to approaches using flatten, which were the most highly upvoted at the time of writing. I... | <p>If the numeric values are seq indexes, then we could have simpler ways...
Here's my code submission, My Ruby is a bit rusty</p>
<pre><code> input = ["cat", 1, "dog", 2, "wombat", 3]
hash = Hash.new
input.each_with_index {|item, index|
if (index%2 == 0) hash[item] = input[index+1]
}
hash #=>... | 6,067 |
<p>Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes it doesn't find a match when it should ... | <p>OK, Needleman-Wunsch(NW) is a classic end-to-end ("global") aligner from the bioinformatics literature. It was long ago available as "align" and "align0" in the FASTA package. The difference was that the "0" version wasn't as biased about avoiding end-gapping, which often allowed favoring high-quality internal mat... | <p>To expand on Cd-MaN's answer, it sounds like you're facing a normalization problem. It isn't obvious how to handle scores between alignments with varying lengths.</p>
<p>Given what you are interested in, you may want to obtain p-values for your alignment. If you are using Needleman-Wunsch, you can obtain these p-... | 7,176 |
<p>How am I supposed to get the <code>IDENTITY</code> of an inserted row?</p>
<p>I know about <code>@@IDENTITY</code> and <code>IDENT_CURRENT</code> and <code>SCOPE_IDENTITY</code>, but don't understand the implications or impacts attached to each.</p>
<p>Can someone please explain the differences and when I would be u... | <ul>
<li><p><a href="http://msdn.microsoft.com/en-us/library/ms187342.aspx" rel="noreferrer"><code>@@IDENTITY</code></a> returns the last identity value generated for any table in the current session, across all scopes. <strong>You need to be careful here</strong>, since it's across scopes. You could get a value from... | <p>After Your Insert Statement you need to add this. And Make sure about the table name where data is inserting.You will get current row no where row affected just now by your insert statement. </p>
<pre><code>IDENT_CURRENT('tableName')
</code></pre>
| 6,420 |
<p>Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serialization formats change and if so what can be don... | <p>The built-in RTTI based system for serializing published properties is vulnerable to changes in the components. Going forwards is manageable as long as old properties are kept in new objects. I.e. you leave the property interface as is, but can toss away the contents if you like. Going backwards is worse - as a ne... | <p>Formats will defintely change, as vendors will add features to their components. Serialization simply loops over all published properties and saves them to a stream. When they are read back, each of the properties that is read from the stream will be set back to the component. If the property does not exist anymore,... | 9,960 |
<p>I am using a Prusa i3 printer and just recently I have been having problems with the first layer. Here is a picture of what it looks like.</p>
<p><a href="https://i.stack.imgur.com/ShfZn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ShfZn.jpg" alt="First extruded layer on Prusa i3"></a> </p>
<... | <p>Oh wow. You are way over cooking your PLA. It is bubbling because it is BOILING. I can tell you have it too hot because the lines are all blurred as if they are liquid and pooled together. </p>
<p>That said I can't give you details because you didn't post settings. I would start by turning the temps to 170 &de... | <p>I had this problem and I had to adjust the nozzle temperature 10 °C below the minimum temperature of 190 °C!</p>
| 517 |
<p>I recently bought a BigTreeTech SKR V1.3 and uncommented <code>REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER</code> and clicked the upload button but faced an error that says:</p>
<pre><code>Marlin\src\lcd\ultralcd.cpp:767:9: error: 'touch_buttons' was not declared in this scope
if (touch_buttons) {
^~~~~~~~~~~~~
M... | <p>There is a temporary solution which I have found here, on the reprap forums, <a href="https://reprap.org/forum/read.php?13,857852,857876#msg-857876" rel="nofollow noreferrer">Re: Upload to the board failed after LCD enabled</a>:</p>
<blockquote>
<p>An official fix has been posted. Grab the new ultralcd.cpp from [... | <p><a href="http://marlinfw.org/meta/download/" rel="nofollow noreferrer">Marlin 2.0.0 is in an <strong><em>Alpha</em></strong> state.</a> 'Alpha' is a state before <em>Beta</em>, meaning, it's not hot off the presses, it isn't even <em>off the presses</em>. You need to go back to the most recent "stable" version of Ma... | 1,433 |
<p>I know that here at SE I cant ask recommendation of products and so. I have a printer that I wanna buy and I want to know if it's good. Where should I post this question in order to get some smart people to take a look?</p>
| <p>Great question! 3DPrinting SE attracts a lot of new Stack Exchange network users, which unfortunately can come with questions that don't always meet the Q&A style for the network that this site tries to uphold.</p>
<p>Questions like this are probably best asked in the <a href="http://chat.stackexchange.com/room... | <p>Some of your question could be acceptable. What you want to avoid is "questions which are too broad, unclear, incomplete or primarily opinion-based". That still leaves lots of other acceptable questions to ask like what printers have a specific feature or whether a specific printer has a specific feature. Note the... | 39 |
<p>This is in with <a href="https://3dprinting.stackexchange.com/questions/394/when-building-a-ramps-1-4-based-printer-can-i-safely-plugin-just-some-of-the-co">my other question about components</a> and the <a href="https://3dprinting.stackexchange.com/questions/389/in-the-standard-pc-cable-wire-that-goes-from-the-wall... | <p>To measure amps (current), the meter has to be wired in series with the item to be measured (for this reason, ammeters are designed to have very low resistance). </p>
<p>This has the down-side that you have to disconnect the component to put the meter in line with it. That makes it hard to do the "check a component... | <p>The easiest method is to use a Clamp On amp meter on either the hot or neutral of your power supply. </p>
<p>In most cases clamp on meters only work with AC xor DC power so you would only be able to get the reading on one side of the power supply.</p>
<p>Multiply this number by the voltage and you get the wattage... | 170 |
<p>I'm using Visual C++ 2003 to debug a program remotely via TCP/IP.</p>
<p>I had set the Win32 exception c00000005, "Access violation," to break into the debugger when thrown. Then, I set it back to "Use parent setting." The setting for the parent, Win32 Exceptions, is to continue when the exception is thrown.</p>
<... | <p>I'd like to support <a href="https://stackoverflow.com/questions/8263/i-cant-get-my-debugger-to-stop-breaking-on-first-chance-exceptions#8304">Will Dean's answer</a></p>
<p>An access violation sounds like an actual bug in your code. It's not something I'd expect the underlying C/++ Runtime to be throwing and catchi... | <p><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>E</kbd> (or Debug\Exceptions)</p>
<p>From there you can select which exceptions break.</p>
| 2,972 |
<p>1, Create and build a default Windows Forms project and look at the project properties. It says that the project is targetting .NET Framework 2.0. </p>
<p>2, Create a Setup project that installs just the single executable from the Windows Forms project. </p>
<p>3, Run that installer and it always says that it need... | <p>No need to edit the file manually. The hint is just above the GUID there:"LaunchCondition".</p>
<ol>
<li>Right click the setup project</li>
<li>Select "View" -> "Launch Conditions"</li>
<li>Expand the "Launch Conditions" node if it isn't already expanded</li>
<li>Right click the ".NET Framework" node and select "P... | <p>I've always used Innosetup to deploy my projects. It's very fast, and very customizable. There's almost nothing you can't do with a bit of scripting. Innosetup can detect which version of the Framework is installed, and prompt the user if the correct version is not present (with scripting).</p>
<p>I recommend that ... | 9,405 |
<p>I want to assign the decimal variable "trans" to the double variable "this.Opacity".</p>
<pre class="lang-cs prettyprint-override"><code>decimal trans = trackBar1.Value / 5000;
this.Opacity = trans;
</code></pre>
<p>When I build the app it gives the following error:</p>
<blockquote>
<p>Cannot imp... | <p>An explicit cast to <code>double</code> like this isn't necessary:</p>
<pre><code>double trans = (double) trackBar1.Value / 5000.0;
</code></pre>
<p>Identifying the constant as <code>5000.0</code> (or as <code>5000d</code>) is sufficient:</p>
<pre><code>double trans = trackBar1.Value / 5000.0;
double trans = trac... | <p><strong>Try the following code:</strong></p>
<h3>Decimal values</h3>
<pre><code>decimal d1 = 3234.3434m;
</code></pre>
<h3>Convert to double</h3>
<pre><code>double r1 = Decimal.ToDouble(d1);
</code></pre>
| 2,230 |
<p>I would like to be able to add custom commands/script to be executed during a print.</p>
<p>For example I would like to write some software to take a picture check the print hasn't moved off the bead between layers. </p>
<p>Does anyone know if any of the available software/firmware allows custom scripts or calling... | <p>One of the solutions could be adding a layer change script (simplifi3d has that out of the box) and then using marlin firmware you could set a value to digital pin that could triger external actions.</p>
<blockquote>
<p><a href="https://forum.simplify3d.com/viewtopic.php?t=1959" rel="nofollow noreferrer">Layer C... | <p>I saw this 3 years ago, this is a <a href="https://www.youtube.com/watch?time_continue=33&v=L-_5KsAOVko" rel="nofollow noreferrer">closed loop control</a>, I think is better that taking a photo then analyze it with a kind of optical recognition software which needs some of possible failures.</p>
<p>The video ha... | 877 |
<p>I have a project that I would like to start beta testing soon, it is a PHP/MySQL site for programmers. I have beta tested sites before however it was always in-house, and I have never done betas that could/should be seen by someone other then those associated with the project.</p>
<p>How should I go about starting ... | <p>First, accept the fact that problems with your app (code, usability, etc.) will be discovered.</p>
<p>Then, make sure you have a clear way for users to communicate with you (form mail, email, uservoice, etc.). The easier you make this the better. For example, there is a uservoice link on every page of SO.</p>
<p>O... | <p>Beta testing is a part of acceptance testing.
This type of testing will ensure the customer about the functionality and quality of the product.
Beta testing is done on customers end in an uncontrolled environment.
In beta testing customer driven test cases are written and he can enter whatever he wants to enter.
Her... | 6,021 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.