instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I'm going to build an API for a web app and I'm interested in what people can suggest as good practices.</p> <p>I'm already planning to make it versioned (version 1 can only control certain aspects of the system, version 2 could control more, but this may need a change in the way authentication is performed that wo...
<p>Read the <a href="http://www.crummy.com/writing/RESTful-Web-Services/" rel="noreferrer">RESTful Web Services</a> book, which give you a good overview of how to use REST in practice, and get to up to speed quickly enough to get started now, with some confidence. This is more useful than just looking at an existing AP...
<p>Use REST.</p> <p>Read up on standards for APIs, or copy the ideas from one of the popular ones.</p> <p>Be careful when authenticating users.</p> <p>Start very very simple.</p> <p>Build a site that uses your API (even if it's not useful) to check things work. Perhaps you could build a mobile version of the site o...
5,380
<p>This is a problem I have seen other people besides myself having, and I haven't found a good explanation.</p> <p>Let's say you have a maintenance plan with a task to check the database, something like this:</p> <pre><code>USE [MyDb] GO DBCC CHECKDB with no_infomsgs, all_errormsgs </code></pre> <p>If you go look i...
<p>For starters, always remember that <code>GO</code> is not a SQL keyword; it is merely a batch separator that is (generally) implemented/recognized by the client, not the server. So, depending on context and client, there really is no guarantee that the current database is preserved between batches.</p>
<p>You have a check datasbase integrity task and you double-clicked it choose MyDb and when the plan runs it only checks master?? weird. Are you sure you don't another plan running? </p>
3,335
<p>I'd like to add dvd burning functionality to my .Net app (running on Windows Server 2003), are there any good components available? I've used the NeroCOM sdk that used to come with Nero but they no longer support the sdk in the latest versions of Nero. I learned that Microsoft has created an IMAPI2 upgrade for Win...
<p>I've used the code from the codeproject <a href="http://www.codeproject.com/KB/miscctrl/imapi2.aspx" rel="nofollow noreferrer">article</a> and it works pretty well. It's a nice wrapper around the IMAPI2, so as longs as IMAPI2 supports what you need to do, the .NET wrapper will do it.</p>
<p>Did your cdrecord methodology support dvd burning? And is there an easy way to redistribute/install cygwin with an application? StarBurn looks pretty good at first glance, although I'm a little hesitant to go with unproven libraries that have to handle something this complicated (especially with the number of type...
5,292
<p>How can I print an embossed image in a concaved shape?</p> <p>Like a big saucer. I will use this an a mold for a project.</p> <p>So far I've found lots of software with huge spread of features. It's sort of overwhelming. There is lots of ways to create images into 3D printable objects but to add the extra step and...
<p>What you describe, sounds like you want to create a lithophane; a pattern etched or engraved on a thin translucent base material (in your case a bowl) that can only be seen clearly when backlit with a light source behind it. Apparently you want to use it for another purpose.</p> <p>Special software and or scripts t...
<p>You may want to look up <a href="https://3dp.rocks/lithophane/" rel="nofollow noreferrer">https://3dp.rocks/lithophane/</a> it lets you do things like that</p>
1,349
<p>I need to create an ASP page (classic, not ASP.NET) which runs remote shell scripts on a UNIX server, then captures the output into variables in VBScript within the page itself.</p> <p>I have never done ASP or VBScipt before. I have tried to google this stuff, but all I find are references to remote server side scr...
<p>You'll want Win32's GetComputerName:</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ms724295(VS.85).aspx</a></p>
<p>I agree with Pascal on using winsock's gethostname() function. Here you go:</p> <pre><code>#include &lt;winsock2.h&gt; //of course this is the way to go on windows only #pragma comment(lib, "Ws2_32.lib") void GetHostName(std::string&amp; host_name) { WSAData wsa_data; int ret_code; char buf[MAX_PATH]...
3,231
<p>I recently started a new webforms project and decided to separate the business classes from any DBML references. My business layer classes instead access discrete Data layer methods and are returned collections of DTO's. So the data layer might project DTO's like the following:</p> <pre><code>(from c in dataContext...
<p>I don't know if it's best practice but I have written similar code in the not so recent past because I too felt that I could improve the separation of concerns by using my own classes instead of the LINQ-designer-generated ones within my application.</p> <p>You may want to consider just returning an IQueryable&lt;C...
<p>In my opinion in most cases DTO objects are not needed when dealing with LINQ. Generated LINQ classes can be easily tested. LINQ gives you ability to query your data from different sources using identical queries. It gives you ability to test your queries against lists of objects instead of real db.</p>
7,413
<p>If you've ever used Eclipse, you've probably noticed the great keyboard shortcuts that let you hit a shortcut key combination, then just type the first few characters of a function, class, filename, etc. It's even smart enough to put open files first in the list.</p> <p><img src="https://i.stack.imgur.com/aLKhF.png...
<p>Vs11 (maybe 2010 had it too) has the Navigate To... functionality which (on my machine) has the <kbd>Ctrl</kbd>+<kbd>,</kbd> shortcut.</p> <p>By the way it understands capitals as camelcase-shortucts (eclipse does so too). For instance type HH to get HtmlHelper.</p>
<p>I have been using biterScripting along with Visual Studio to do more flexible searching and manipulation.</p> <ol> <li><p>It can search the entire workspace.</p></li> <li><p>It can search within any project - EVEN IF THAT PROJECT IS NOT LOADED OR EVEN PART OF A WORKSPACE.</p></li> <li><p>It can find things using re...
2,523
<p>I've been asked to come up with a grant proposal for a new 3D printer. My question is:</p> <blockquote> <p>What supporting components and training would be most beneficial to support educational use in a K-8 school? In other words what things am I missing in my list below? </p> </blockquote> <p>Specific suggesti...
<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,263
<p>Let's say I have a web page that currently accepts a single ID value via a url parameter:<br> <a href="http://example.com/mypage.aspx?ID=1234" rel="nofollow noreferrer">http://example.com/mypage.aspx?ID=1234</a></p> <p>I want to change it to accept a <em>list</em> of ids, like this:<br> <a href="http://exam...
<p>No offense to those who provided clear answers, but many people seem to be answering your question instead of addressing your problem. You want multiple IDs, so you think you could this this:</p> <p><a href="http://example.com/mypage.aspx?IDs=1234,4321,6789" rel="noreferrer">http://example.com/mypage.aspx?IDs=1234...
<p>You can use string.Split() to split the values once you have extracted them from the URL.</p> <pre><code>string[] splitIds = ids.split(','); </code></pre>
8,893
<p>I want to serve a lot of big files in a Plone site. By big files I mean around 5MB (music) and a lot of them. I've already do it straight to the ZODB, not a good idea. I'm running Plone 3.1.1 and Zope 2.10.6.</p>
<p>Zodb blob support is the best, most integrated way to deal with large files. Big files are stored transparently on the filesytem instead of in the zodb object database. "Transparently" in this case means that you won't notice it in your actual programming work after initial configuration.</p> <p>The blob functional...
<p>I have plone.app.blob installed on some low-traffic sites and installable (ready to roll, if you like) for my busier production sites in the same instance.</p> <p>There's the 4.0 milestone but I'll certainly review (and probably click the install button for plone.app.blob on my production sites) around 3.4 time. </...
8,993
<p>When desinging UI for mobile apps in general which resolution could be considered safe as a general rule of thumb. My interest lies specifically in web based apps. The iPhone has a pretty high resolution for a hand held, and the Nokia E Series seem to oriented differently. Is <strong>240×320</strong> still considere...
<p>Not enough information...</p> <p>You say you're targeting a "Mobile App" but the reality is that mobile could mean anything from a cell phone with 128x128 resolution to a MID with 800x600 resolution.</p> <p>There is no "safe" resolution for such a wide range, and if you're truly targeting all of them you need to d...
<p>You mentioned Web based apps. Any particular framework you have in mind?</p> <p>In many cases, <a href="http://wurfl.sourceforge.net/index.php" rel="nofollow noreferrer">WALL</a> seems to help to large extent.</p> <p>Here's one Article, <a href="http://www.packtpub.com/article/adapting-user-devices-mobile-web-tech...
4,762
<p>Maybe I just don't know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with N CommandButtons in array Command1() and N TextBoxes in array Text1()):</p> <pre><code>Private Sub Command1_Click(Index As Integer) Text1(In...
<p>Make a generic list of textboxes:</p> <pre><code>var textBoxes = new List&lt;TextBox&gt;(); // Create 10 textboxes in the collection for (int i = 0; i &lt; 10; i++) { var textBox = new TextBox(); textBox.Text = "Textbox " + i; textBoxes.Add(textBox); } // Loop through and set new values on textboxes i...
<p>Make an array of controls.</p> <pre><code>TextBox[] textboxes = new TextBox[] { textBox1, textBox2, textBox3 }; </code></pre>
6,063
<p>What do <code>*args</code> and <code>**kwargs</code> mean?</p> <pre><code>def foo(x, y, *args): def bar(x, y, **kwargs): </code></pre>
<p>The <code>*args</code> and <code>**kwargs</code> is a common idiom to allow arbitrary number of arguments to functions as described in the section <a href="http://docs.python.org/3/tutorial/controlflow.html#more-on-defining-functions" rel="noreferrer">more on defining functions</a> in the Python documentation.</p> <...
<ul> <li><code>def foo(param1, *param2):</code> is a method can accept arbitrary number of values for <code>*param2</code>,</li> <li><code>def bar(param1, **param2):</code> is a method can accept arbitrary number of values with keys for <code>*param2</code></li> <li><code>param1</code> is a simple parameter.</li> </ul>...
5,751
<p>I'm trying to modify my GreaseMonkey script from firing on window.onload to window.DOMContentLoaded, but this event never fires.</p> <p>I'm using FireFox 2.0.0.16 / GreaseMonkey 0.8.20080609</p> <p><a href="https://stackoverflow.com/questions/59205/enhancing-stackoverflow-user-experience">This</a> is the full scri...
<p>So I googled <a href="http://www.google.com/search?q=greasemonkey%20dom%20ready" rel="noreferrer">greasemonkey dom ready</a> and the <a href="http://www.sitepoint.com/article/beat-website-greasemonkey/" rel="noreferrer">first result</a> seemed to say that the greasemonkey script is actually running at "DOM ready" so...
<p>@Sam: yeah, I was trying the same:</p> <pre><code>// ==UserScript== // @name Stack Overflow highlight viewed questions // @namespace * // @include http://stackoverflow.com/questions // @include http://stackoverflow.com/questions?* // @include http://stackoverflow.com/questions //...
9,765
<p>My server already runs IIS on TCP ports 80 and 443. I want to make a centralized "push/pull" Git repository available to all my team members over the Internet.</p> <p>So I should use HTTP or HTTPS.</p> <p>But I cannot use Apache because of IIS already hooking up listening sockets on ports 80 and 443! Is there any ...
<p><strong>Bonobo Git Server</strong></p> <p><a href="https://bonobogitserver.com/" rel="noreferrer">https://bonobogitserver.com/</a></p> <hr> <p><strong>GitAspx</strong> - By Jeremy Skinner</p> <p><a href="https://github.com/JeremySkinner/git-dot-aspx/" rel="noreferrer">https://github.com/JeremySkinner/git-dot-asp...
<p>Try this instruction that uses SCM-Manager and IIS: <a href="http://www.helicontech.com/articles/hosting-git-svn-and-hg-mercurial-repositories-on-windows-with-iis/" rel="nofollow">Hosting Git, SVN and Hg (Mercurial) repositories on Windows with IIS</a></p>
7,477
<p>I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use.</p> <p>So I looked up all the documentations related, including this one <a href="http://www.eclipse.org/articles/Article-Launch-Framework/launch.html" rel="nofollow noreferrer" title="The Launching Framework">The Launch...
<p>I had to add <code>contextualLaunch</code> under <code>org.eclipse.debug.ui.launchShortcuts</code>.</p> <p>The old way seems like it's deprecated a long ago.</p> <p>For other people who are working on the same subject, you might want to extend <code>org.eclipse.ui.commands</code> and bindings, too.</p> <p>I canno...
<p>You class should implement ILaunchShortcut. Check out the <a href="http://help.eclipse.org/help32/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/debug/ui/ILaunchShortcut.html" rel="nofollow noreferrer">Javadoc</a>. </p> <p>What exception are you getting? Check the error log.</p>
4,573
<p>My app has many controls on its surface, and more are added dynamically at runtime.</p> <p>Although i am using tabs to limit the number of controls shown, and double-buffering too, it still flickers and stutters when it has to redraw (resize, maximize, etc).</p> <p>What are your tips and tricks to improve WinForms...
<p>I know of two things you can do but they don't always apply to all situations.</p> <ol> <li><p>You're going to get better performance if you're using absolute positioning for each control (myNewlyCreatedButton.Location.X/Y) as opposed to using a flow layout panel or a table layout panel. WinForms has to do a lot le...
<p>Are you making good use of <code>SuspendLayout()</code> and <code>ResumeLayout()</code>?</p> <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.suspendlayout(VS.80).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.windows.forms.control.suspendlayout(VS.80)...
6,669
<p>The creation date of an executable linked in VS2005 is not set to the real creation-date of the <code>.exe</code> file. Only a complete re-build will set the current date, a re-link will not do it. Obviously the file is set to some date, which is taken from one of the project-files. </p> <p>So: is there a way to fo...
<p>Delete the executable as part of a pre-link event.</p> <p>Edit: Hah, I forgot about Explorer resetting the creation date if you name a file exactly the same as a file that was recently deleted.</p> <p>Why are you keying off the creation date anyway?</p>
<p>A complete rebuild will delete that file forcing the linker to create it, hence the reason it gets a new creation date. You could try disabling incremental linking under project properties (Linker | General). If that doesn't do it you could add a build event to delete the exe file and force it to create a new file...
3,884
<p>How much do you rely on database transactions? </p> <p>Do you prefer small or large transaction scopes ? </p> <p>Do you prefer client side transaction handling (e.g. TransactionScope in .NET) over server side transactions or vice-versa? </p> <p>What about nested transactions? </p> <p>Do you have some tips...
<p>I always wrap a transaction in a using statement.</p> <pre><code>using(IDbTransaction transaction ) { // logic goes here. transaction.Commit(); } </code></pre> <p>Once the transaction moves out of scope, it is disposed. If the transaction is still active, it is rolled back. This behaviour fail-safes you from ac...
<p>As Sara Chipps said, transaction is overkill for high traffic applications. So we should avoid it as much as possible. In other words, we use a <a href="http://queue.acm.org/detail.cfm?id=1394128" rel="nofollow noreferrer">BASE architecture</a> rather than ACID. Ebay is a typical case. Distributed transaction is not...
6,069
<p>I have inherited a large legacy ColdFusion app. There are hundreds of &lt;cfquery&gt;some sql here #variable#&lt;/cfquery&gt; statements that need to be parameterized along the lines of: &lt;cfquery&gt; some sql here &lt;cfqueryparam value="#variable#"/&gt; &lt;/cfquery&gt;</p> <p>How can I go about adding paramet...
<p>There's a queryparam scanner that will find them for you on RIAForge: <a href="http://qpscanner.riaforge.org/" rel="nofollow noreferrer">http://qpscanner.riaforge.org/</a></p>
<p>I doubt that there is a solution that will fit your needs exactly. The only option I see is to write your own recursive search that builds a report for you or use one of the apps/scripts that people have listed above. Basically, you are going to have to edit each page or approve all of the automated changes.</p>
8,997
<p>I realize this issue (warping) has been repeatedly addressed on this site. I've just graduated to high-temp filaments (PC in particular). I don't know much of the physics of this. I'm wondering whether the degree to which the filament contracts is proportional to the amount that it cools. If the answer is yes, then ...
<p>I can't address polycarbonate specifically, but can provide a general overview of the higher temperature filament considerations.</p> <p>Printing on a raft means that the adhesion temperature of the filament is accomplished. This temperature is the factor to be considered if you are thinking of dropping the printin...
<p>I can't address polycarbonate specifically, but can provide a general overview of the higher temperature filament considerations.</p> <p>Printing on a raft means that the adhesion temperature of the filament is accomplished. This temperature is the factor to be considered if you are thinking of dropping the printin...
817
<p>I'm trying to reteach myself some long forgotten math skills. This is part of a much larger project to effectively "teach myself software development" from the ground up (the details are <a href="http://www.appscanadian.ca/archives/cs-101-introduction-to-computer-science/" rel="noreferrer">here</a> if you're interes...
<p>Here's how my school did it:</p> <pre><code>base: algebra trigonometry analytic geometry track 1 track 2 track 3 calc 1 linear algebra statistics calc 2 discrete math 1 calc 3 (multivariable) discre...
<p>Usually, an overview of each field is a good thing to have when looking at any topic, but it's rare to have a genuine dependence the way we'd think of it. Algebra is always needed. I can't think of a time I've needed any trigonometry. (except to expand it with new things from calculus) I'm even quite sure people wou...
4,192
<p>I'm struggling to find the name of a connector I just broke, so I can order a new one.</p> <p>It's a six pin nylon terminal, that plugs into a set of header pins on a stepper motor.</p> <p>What do I search for to find these?! Also, how would I go about finding something like this in the future? I seem to struggle to...
<p>Short answer: It's probably 6 pin JST PH</p> <p>Long answer:</p> <p>Without seeing the socket, it's hard to say for sure, however most Nema 17 stepper motors use 6 pin JST PH connectors with 2.0mm pitch on the motor side. Many control boards use JST XH connectors with 2.5mm pitch on the board side. The two are not c...
<p>In an attempt to salvage my (sadly) previously incorrect answer (at the bottom), <em>and</em> to add to <a href="https://3dprinting.stackexchange.com/a/18388/4762">anttix's superlative answer</a>, here is a quote from <a href="https://gulfcoast-robotics.com/pages/stepper-cable-for-mks-boards-pinout" rel="nofollow no...
2,051
<p>I'd like to gain better knowledge of operating system internals. Process management, memory management, and stuff like that. <br> I was thinking of learning by getting to know either linux or BSD kernel.<br> Which one kernel is better for learning purposes?<br> What's the best place to start?<br> Can you recommend a...
<p>In college, I had an operating systems class where we used a <a href="https://rads.stackoverflow.com/amzn/click/com/0003458903" rel="noreferrer" rel="nofollow noreferrer">book by Tanenbaum</a>. In the class, we implemented a device driver in the <a href="http://minix1.woodhull.com/teaching/teach_ver.html" rel="nore...
<p>When I was at uni I spent a semester studying operating systems, and as part of this had an assignment where we had to implement a RAM-based filesystem in Linux.</p> <p>It was a fantastic way to get to understand the internals of the Linux keurnel and to get a grasp on how everything fits together - And a heck of a...
4,431
<p>I can't be sure if my code is sucking, or if it's just that the browsers haven't caught up with the spec yet.</p> <p>My goal is to simulate list markers using generated content, so as to get e.g. continuation of the counters from list to list in pure CSS.</p> <p>So the code below, which I <em>think</em> is correct...
<p>Apparently marker was introduced as a value in CSS 2 but did not make it to CSS 2.1 because of lacking browser support. I suppose that didn’t help its popularity …</p> <p>Source: <a href="http://de.selfhtml.org/css/eigenschaften/positionierung.htm#display" rel="nofollow noreferrer">http://de.selfhtml.org/css/eigens...
<p>Oh ouch, did not know that :-|. That probably seals its case, then. Because mostly I was under the assumption that such a basic CSS2 property should definitely be supported in modern browsers, but if it didn't make it into CSS 2.1, then it makes a lot more sense that it isn't.</p> <p>For future reference, it doesn'...
7,289
<p>I applied the MOSS infrastructure upgrade w/o applying the WSS one before it -- uh, help!</p>
<p>Quoting: <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=3811c371-0e83-47c8-976b-0b7f26a3b3c4&amp;displaylang=en" rel="nofollow noreferrer">Infrastructure Update for Microsoft Office Servers (KB951297)</a></p> <p><b>Other Relevant Updates</b> It is strongly recommended that you install the Infrast...
<p>Sounds like time for a full restore. The MOSS upgrade steps did explicitly ask for a restore, didn't it?</p>
7,066
<p>We have been working with CVS for years, and frequently find it useful to "sticky" a single file here and there.</p> <p>Is there any way to do this in subversion, specifically from TortoiseSVN?</p>
<p>The XOR method fails if a and b point to the same address. The first XOR will clear all of the bits at the memory address pointed to by both variables, so once the function returns (*a == *b == 0), regardless of the initial value.</p> <p>More info on the Wiki page: <a href="http://en.wikipedia.org/wiki/XOR_swap_al...
<p>I just placed both swaps (as macros) in hand written quicksort I've been playing with. The XOR version was much faster (0.1sec) then the one with the temporary variable (0.6sec). The XOR did however corrupt the data in the array (probably the same address thing Ant mentioned).<p> As it was a fat pivot quicksort, the...
5,753
<p>I have an Anet A8 printer for about 4 months, set up pretty well (or so I thought) and printing a number of models pretty well. I made a large 3" x 6" box with a sliding lid yesterday and when it was done there was a gap on one side when the lid was slid on. I checked the parts and it turns out they are not square -...
<p><strong>Quick, low-tech solution:</strong></p> <p>There might be several issues in your question, but in relation to bed adhesion, I'll share one of the most useful tips I wish someone had told me when I started out: <em>Spread some glue-stick over the area to be printed</em>.</p> <p>I used ordinary school/craft g...
<p>It is hard to determine the exact source of the problem as there are few possibilities (I am assuming that you have a single nozzle and only one filament in use):</p> <ol> <li><p>One of the hardest issues for me to get on my printer was fact that my auto-level sensor was mounted about 0.5mm too high - so please che...
864
<p>I have a <code>Rakefile</code> with a Rake task that I would normally call from the command line:</p> <pre><code>rake blog:post Title </code></pre> <p>I'd like to write a Ruby script that calls that Rake task multiple times, but the only solution I see is shelling out using `` (backticks) or <code>system</code>.</...
<p>from <a href="http://web.archive.org/web/20090412040557/http://timocracy.com:80/articles/2008/02/21/calling-invoking-rails-rake-tasks-from-within-ruby-for-testing-try-2" rel="nofollow noreferrer">timocracy.com</a>:</p> <pre><code>require 'rake' def capture_stdout s = StringIO.new oldstdout = $stdout $stdout ...
<p>In a script with Rails loaded (e.g. <code>rails runner script.rb</code>)</p> <pre><code>def rake(*tasks) tasks.each do |task| Rake.application[task].tap(&amp;:invoke).tap(&amp;:reenable) end end rake('db:migrate', 'cache:clear', 'cache:warmup') </code></pre>
2,563
<p>I have <code>buy.php</code> with a <strong>form</strong> where you enter <em>items, quantity, shipping data, etc.</em> </p> <p>When you click the <strong>Submit button</strong>, it posts back to <code>buy.php</code> <code>($_SERVER['PHP_SELF'])</code> and does some data validation. </p> <p>If there are fields mis...
<p>You could do a redirect to buy.php after saving to the session object, which then does a server redirect to check.php, it would mean when the user clicks back, they're going back to the GET request not the POST request</p>
<p>Yes - I agree with above. I ALWAYS do a <code>redir</code> away from the last post, so clicking back bounces them back without that error OR re-submissions. it also avoids complications. u can always tag the <code>redir</code> link page with a <code>?m</code> or <code>&amp;m</code> (i.e.: <code>page.php?m</code>) an...
7,962
<p>I have a problem with a sample routing with the preview 5 of asp.net mvc.</p> <p>In the AccountController I have 2 actions: </p> <pre><code>public ActionResult Delete() public ActionResult Delete(string username) </code></pre> <p>While trying to look for Account/Delete or Account/Delete?username=davide the Con...
<p>Solution found!</p> <p>With the introduction of the ActionNameAttribute, it's now necessary to filter manually which method to call depending on the request. This is done by the ActionSelectionAttribute.</p> <p>Full explanation here: <a href="http://haacked.com/archive/2008/08/29/how-a-method-becomes-an-action.asp...
<p>I can't say for sure why this is happening. But you might want to consider only having the Delete(string username) action and removing the parameter-less overload.</p> <p>Because string is nullable my understanding is that simply calling Account/Delete will invoke the action with a null username parameter which you...
6,955
<p>I've noticed a lot of Microsoft sites have the *.MSPX extension. While I'm very familiar with ASP.NET, I've not seen this extension before.</p> <p>Does anyone know what this identifies?</p>
<p>A few internet searches led me to <a href="http://www.microsoft.com/backstage/bkst_column_46.mspx" rel="nofollow noreferrer">http://www.microsoft.com/backstage/bkst_column_46.mspx</a>, but it was a dead link. Fortunately, it was archived on the Wayback Machine and you can read it here:</p> <p><a href="http://web.arc...
<p>I love you guys, i was asking myself also many times, why MS uses .mspx and what it is at all?! :) </p> <p>That time i couldn´t find any informations quickly and assumed it would just be something on top of asp.net or maybe not even that, because you should be able to assign the same asp.net cgi dll to .mspx also e...
6,945
<p>When printing the first layer, the infill overlaps on just one side of my print. Thereupon there's a rough, and a lot higher, surface on the first few millimeters after the wall. </p> <ul> <li>Printer: Arduino Materia 101</li> <li>Filament: Rec Pla</li> <li>Temp: 210 degrees</li> </ul> <p>I have tried to troublesh...
<p>This may be a result of an unlevel build plate (OP did not specify if calibration was done at time of writing).</p> <p>If the area that is overlapping is higher (closer to the nozzle), the filament will be pushed down and around the nozzle as it extrudes in that area. This will result in excess filament overlapping...
<p>Yes. That happens. I personally prefer this to the alternative which is it does not go far enough and curls back. That said depending on your slicer you will have a line overlap tolerance. But what's really happening is you are smooching your first layer. Aka your hot end is too high in relation to your first layer ...
457
<p>We have two tags: <a href="https://3dprinting.stackexchange.com/questions/tagged/support" class="post-tag" title="show questions tagged &#39;support&#39;" rel="tag">support</a> &amp; <a href="https://3dprinting.stackexchange.com/questions/tagged/support-structures" class="post-tag" title="show questions tagged &#39;...
<p>The tags <a href="https://3dprinting.stackexchange.com/questions/tagged/support" class="post-tag" title="show questions tagged &#39;support&#39;" rel="tag">support</a> &amp; <a href="https://3dprinting.stackexchange.com/questions/tagged/support-structures" class="post-tag" title="show questions tagged &#39;support-s...
<p>I've made a synonym - <strike>apparently it needs <a href="https://3dprinting.stackexchange.com/tags/support-structures/synonyms">some votes</a></strike>.</p>
57
<p>One of the main hacks for converting RAMPS 1.4 boards to use with 24 V, as stated in <a href="https://reprap.org/wiki/RAMPS_24v" rel="nofollow noreferrer">RAMPS 24V</a>, is replacing the polyfuses, principally <code>F2</code> (MF-R1100), with wire and using an inline (car blade or wire) fuse on the heatbed wire (or ...
<p>Without knowing the exact part numbers used for F1 and F2 it is impossible to say whether the fuses need to be replaced or not. However, based on the manufacturer provided schematic and BOM we can make a pretty good guess.</p> <p>Looking at the PDF you linked, it states that F1 is rated for 16V. Looking at the <a h...
<p>I found that at least the following two RAMPS 1.6 derived boards are 24 V capable without modifications:</p> <ul> <li>Bigtreetech RAMPS 1.6 Plus (see the PCB layout picture in <a href="https://www.roboter-bausatz.de/3080/ramps-1.6-plus-3d-drucker-steuerung" rel="nofollow noreferrer">this offer</a>)</li> <li>King Pri...
1,414
<p>I run a 3D printer farm and I have to replace my Bowden tubes on the printers after about a month or two of use(roughly 1000 hours of use). The Bowden tubes continually melt on the side of the tube very near to where it pushes against the nozzle. I am running Ender 3 Pros and I run at about 205&nbsp;&deg;C with PLA....
<p>If the tube is PTFE, the tube is not likely to be melting unless your hotend temperature is out of control. You would probably notice the PLA cooking.</p> <p>So, perhaps they aren't PTFE, or perhaps it is wear.</p> <p>If it wasn't PTFE, you should be able to tell by the texture, slipperiness, and bending force.</...
<p>After a lot of hard work and months of replacing and inspecting this issue I realized what's going on. The bowden tube gets soft as it gets hotter and hotter which allows the filament which is being extruded and retracted at a high speed to wear down the side of the tube. After some time the tube gets stretched out ...
1,592
<p>I've seen different program managers write specs in different format. Almost every one has had his/her own style of writing a spec.</p> <p>On one hand are those wordy documents which given to a programmer are likely to cause him/her missing a few things. I personally dread the word documents spec...I think its beca...
<p><a href="http://www.joelonsoftware.com/articles/fog0000000036.html" rel="nofollow noreferrer">Joel on Software</a> is particularly good at these and has some good articles about the subject...</p> <p>A specific case: <a href="http://www.joelonsoftware.com/articles/AardvarkSpec.html" rel="nofollow noreferrer">the wri...
<p>One of the Microsoft Press books has excellent examples of various documents, including an SRS (which I think is what you are talking about). It might be one of the requirements books by Weigert (I think that's his name, I'm blanking on it right now). I've seen US government organizations use that as a template, and...
4,308
<p>I was wondering the other day why don't all three motors move at the same time? Don't normal paper printers move 2 motors at a time? they're 2D printers. It makes sense if a 3D printer really does print with <em>all</em> three motors moving. Won't it also be more efficient if they do 3D print in all axes?</p>
<blockquote> <p>I was wondering the other day why don't all three motors move at the same time?</p> </blockquote> <p>That is perfectly possible for most printers (with limitations, &quot;3D Printing&quot; with all steppers being used is called &quot;non-planar&quot; printing), but there are some major cons you need to ...
<p>The Z axis moves between each layer so you are indeed printing in the 3rd dimension. There are some techniques that move all three axis at the same time.</p>
1,924
<p>Is there a way to export a simple HTML page to Word (.doc format, not .docx) without having Microsoft Word installed?</p>
<p>If you have only simple HTML pages as you said, it can be opened with Word.</p> <p>Otherwise, there are some libraries which can do this, but I don't have experience with them.</p> <p>My last idea is that if you are using ASP.NET, try to add <code>application/msword</code> to the header and you can save it as a Wo...
<p>i believe <a href="http://www.openoffice.org/" rel="nofollow noreferrer">open office</a> can both open .html files and create .doc files</p>
5,209
<p>I'm working with <a href="http://webby.rubyforge.org" rel="nofollow noreferrer" title="Webby">Webby</a> and am looking for some clarification. Can I define attributes like <code>title</code> or <code>author</code> in my layout?</p>
<p>Not really. The layout has access to the page attributes rather than the other way.</p> <p>The easiest way to do what you want is to populate the SITE.page_defaults hash in your site's Rakefile (probably build.rake). Add something like the following:</p> <pre><code>SITE.page_defaults['title'] = "My a...
<p><a href="http://webby.rubyforge.org/tutorial/" rel="nofollow noreferrer">I've never used it but the tutorial here:</a></p> <p>Makes it look like the answer to your question is "yes". Specifically I'm looking under the "Making Changes" header on that page.</p>
4,380
<p>I have a webapp that uses JNDI lookups to get a connection to the database.</p> <p>The connection works fine and returns the query no problems. The issue us that the connection does not close properly and is stuck in the 'sleep' mode (according to mysql administrator). This means that they become unusable nad then ...
<p>You seem to be closing the connection properly - except for the case where prepStmt.close() throws a SQLException, I can't find a connection leak.</p> <p>What pool implementation are you using? When you close a connection, the pool need not close the underlying MySQL connection immediately - after all that is the p...
<p>One thing that @binil missed, you are not closing the result set in the case of an exception. Depending on the driver implementation this may cause the connection to stay open. Move the result.close() call to the finally block. </p>
7,655
<p>I am looking for some advice on what should I concentrate my efforts to get the needed skills to become a Java developer for Oracle applications. I'm bit confused as there are lot of technologies in the Java world. Where should I start? What to avoid? Is JDeveloper a good IDE for a beginner?</p>
<p>To become an Oracle Developer there is a bit more to learn than jdbc. You should take a look at the Oracle web site. It is kind of slow and not very intuitive but has a lot of good information. There are OUGs that have good info as well.</p> <p>If you just want to access Oracle via JAVA then you should use a framew...
<p>Your question is very simple so I have listed a few simple steps to start developing a Java application using Oracle technologies.</p> <ol> <li>Install Oracle XE Database.</li> <li>Install [JDeveloper]. Choose the install with Weblogic if you are developing a J2EE application.</li> <li>Build and run a jdbc applicat...
6,594
<p>This is the day of weird behavior.</p> <p>We have a Win32 project made with Delphi 2007, which hosts the .NET runtime and calls into .NET to show new forms, as part of a transition period.</p> <p>Recently we've begun experiencing exceptions at seemingly random locations and points of our code: Arithmetic overflow or...
<p>Have you added all the WMI components? As far as I know, you need all the WMI components to access the counters!</p> <blockquote> <p>The Performance Counter Windows Management Instrumentation (WMI) Provider component provides a bridge between the performance registry interface and the WMI interface. This componen...
<p>Have you added all the WMI components? As far as I know, you need all the WMI components to access the counters!</p> <blockquote> <p>The Performance Counter Windows Management Instrumentation (WMI) Provider component provides a bridge between the performance registry interface and the WMI interface. This componen...
8,065
<p>I experience some lines on my prints. However, I would not really call them &quot;stringing&quot;.</p> <p>I have seen some stringing and it was rather like an undefined spider web.</p> <p>But the lines that you see in my photo are super straight and fine.</p> <p>Are they called &quot;stringing&quot; too? And how do ...
<p>They're caused by filament being pulled during travel so they qualify as stringing.</p> <p>You need to look at your retraction and heat, speed as well makes a difference. You can try combing and other things or just pull them off.</p>
<p>You should provide a better picture, i.e. a finished print.</p> <p>Stringing is generally something you don't worry about - adjust your retraction settings a tiny bit to retract more. I didn't see what software you used, that will help with where the settings are.</p> <p>Also the plate is very different from the res...
2,216
<p>I want to open a file for reading, the C++ way. I need to be able to do it for:</p> <ul> <li><p>text files, which would involve some sort of read line function.</p></li> <li><p>binary files, which would provide a way to read raw data into a <code>char*</code> buffer.</p></li> </ul>
<p>There are three ways to do this, depending on your needs. You could use the old-school C way and call <code>fopen</code>/<code>fread</code>/<code>fclose</code>, or you could use the C++ fstream facilities (<code>ifstream</code>/<code>ofstream</code>), or if you're using MFC, use the <code>CFile</code> class, which p...
<p>fstream are great but I will go a little deeper and tell you about <a href="http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization" rel="nofollow noreferrer">RAII</a>.</p> <p>The problem with a classic example is that you are forced to close the file by yourself, meaning that you will have to bend your...
2,943
<p>What are the most common problems that can be solved with both these data structures?</p> <p>It would be good for me to have also recommendations on books that:</p> <ul> <li>Implement the structures</li> <li>Implement and explain the reasoning of the algorithms that use them</li> </ul>
<p>The first thing I think about when I read this question is: <em>what types of things use graphs/trees?</em> and then I think backwards to how I could use them.</p> <p>For example, take two common uses of a tree:</p> <ul> <li>The DOM</li> <li>File systems</li> </ul> <p>The DOM, and XML for that matter, resemble tr...
<p>There's a course for such things at my university: <a href="http://www.cs.washington.edu/education/courses/326/" rel="nofollow noreferrer">CSE 326</a>. I didn't think the book was too useful, but the projects are fun and teach you a fair bit about implementing some of the simpler structures. </p> <p>As for examples...
2,512
<p>I have a question that I may be over thinking at this point but here goes...</p> <p>I have 2 classes Users and Groups. Users and groups have a many to many relationship and I was thinking that the join table group_users I wanted to have an IsAuthorized property (because some groups are private -- users will need au...
<pre><code>&lt;style type="text/css"&gt; #watermark { color: #d0d0d0; font-size: 200pt; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); position: absolute; width: 100%; height: 100%; margin: 0; z-index: -1; left:-100px; top:-200px; } &lt;/style&gt; </code></pre> <p>This lets yo...
<p>You could make an image with the watermark and then set the image as the background via css.</p> <p>For example:</p> <pre><code>&lt;style type="text/css"&gt; .watermark{background:url(urltoimage.png);} &lt;/style&gt; &lt;div class="watermark"&gt; &lt;p&gt;this is some text with the watermark as the background.&lt;...
9,408
<p>I've been looking for this information for my commercial desktop product, with no avail.</p> <p>Specifically, what I'm look for, is deployment statistics of the .NET framework for end-users (both granny "I'm just browsing the internet" XP, and high-end users, if possible), and in the commercial/business sector.</p>...
<p>Some statistics from 2005 I found at <a href="http://blogs.msdn.com/scottwil/archive/2005/03/09/391199.aspx" rel="nofollow noreferrer">Scott Wiltamuth's blog</a> (you can be sure these numbers are much higher now):</p> <ul> <li>More than 120M copies of the .NET Framework have been downloaded and installed using eit...
<p>I don't have any hard numbers, but these days, it is pretty safe to assume most Windows XP and Vista users have at least .NET 2.0. I believe this was actually dropped via Windows Update for XP, and Vista came with at least 2.0 (apparently with 3.0 as pointed out in the comments to this answer).</p>
9,145
<p>I know that you need a special nozzle to extrude abrasive filament (carbon fibre, copper, ...). I do have such a nozzle (coated steel) and am printing carbon fibre and copper filament. Last time I used it to print carbon fibre PLA. It worked well, however when I removed the nozzle from the hotend I realized that I c...
<p>Abrasive filaments require a stronger nozzle indeed. They also require an all-metal hotend. If your hotend wasn't all-metal, there's a good chance you've damaged it.</p> <p>The PEEK/PTFE in your hotend doesn't like going above 240 Celsius and tends to be irreparably damaged if used too long above 250 Celsius.</p>
<p>The hotend itself consists of basically 3 parts:</p> <ul> <li>The filament path, aka Coolend. It consists of the heartbreak, cooling solution and anything up from it.</li> <li>The heater block, that holds everything together</li> <li>The nozzle, in which the filament melts and is pushed out.</li> </ul> <p>The part o...
2,037
<p>Just recently started having issues with an SQL Server Agent Job that contains an SSIS package to extract production data and summarize it into a separate reporting database. </p> <p>I <em>think</em> that some of the Alerts/Notifications settings I tried playing with caused the problem as the job had been running t...
<p><a href="http://msdn.microsoft.com/en-us/library/ms130214(SQL.90).aspx" rel="nofollow noreferrer">Books Online</a> is probably a good place to start (or at least I like it and generally find it useful).</p> <p>SQLMenace and bofe made some good points. Here's my additional two cents:</p> <p>I'd recommend <a href="...
<p>You'll want to have "When the job completes" marked in your notifications page on the job's properties.</p> <p>Just go to that dropdown and switch it to job completion instead of failure (which is on the screenshot).</p> <p><img src="https://i.stack.imgur.com/HGlQh.png" alt="Job_Properties_Notification"></p> <p>Y...
4,227
<p>I have some domain logic implemented in a number of POJOs. I want to write a Swing user interface to allow the user to initiate and see the results of various domain actions.</p> <p>What's the best pattern/framework/library for communications between the UI and the domain? This boils down into:</p> <ul> <li>the UI...
<p>Definitely MVC - something like this <a href="http://www.leepoint.net/notes-java/GUI/structure/40mvc.html" rel="nofollow noreferrer">example</a> which clearly splits things out. The problem with the Swing examples is that they seem to show the MVC all working within the swing stuff, which does not seem right to me<...
<p>I have used the Observer pattern (using AspectJ magic) in the past with <em>some</em> success, but found that unless you were careful it quickly became a cluster.. uhh.. flick?</p> <p>It quickly became hard to manage and most importantly extremely hard to debug.</p> <p><strong>Edit:</strong></p> <p>To expand slightl...
9,535
<p>I'm missing something here:</p> <pre><code>$objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry $objSearcher.Filter = ("(objectclass=computer)") $computers = $objSearcher.findall() </code></pre> <p>So the question ...
<p>When you included $_.properties.name in the string, it was returning the type name of the property. When a variable is included in a string and the string is evaluated, it calls the ToString method on that object referenced by the variable (not including the members specified after). </p> <p>In this case, the ToS...
<p>I believe it has to do with the way that PS interpolates information in the "". Try this:</p> <p>"Server name in quotes $($_.properties).name" </p> <p>Or you may even need one more set of $(). I'm not somewhere that I can test it at right now.</p>
3,469
<p>Are these vertical lines described as "banding"?</p> <p>Would the most likely culprit be the extruder?</p> <p>FWIW, this was printed in "vase mode".</p> <p><a href="https://i.stack.imgur.com/0ZCPF.jpg" rel="noreferrer" title="&quot;Vase mode, PLA"><img src="https://i.stack.imgur.com/0ZCPF.jpg" alt="Vase mode, PLA...
<p>Banding usually refers to Z banding and manifests itself in a wavy/non-straight wall in Z direction: </p> <p><a href="https://i.stack.imgur.com/KYp55.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/KYp55.jpg" alt="Z-banding"></a></p> <p>This sort of banding is related to mechanical or design issues of th...
<p>Banding usually refers to Z banding and manifests itself in a wavy/non-straight wall in Z direction: </p> <p><a href="https://i.stack.imgur.com/KYp55.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/KYp55.jpg" alt="Z-banding"></a></p> <p>This sort of banding is related to mechanical or design issues of th...
878
<ul> <li>I have nUnit installed.</li> <li>I have VS2008 Team Edition installed.</li> <li>I have ASP.Net MVC Preview 4 (Codeplex) installed.</li> </ul> <p>How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framework as...
<p>After a bunch of research and experimentation, I've found the answer. </p> <ul> <li>For the record, the current release of nUnit 2.5 Alpha <em>does not</em> seem to contain templates for test projects in Visual Studio 2008. </li> <li>I followed the directions <a href="http://vishaljoshi.blogspot.com/2008/02/aspnet...
<p>Do install <a href="http://testdriven.net" rel="nofollow noreferrer">Testdriven.net</a> to integrate NUnit with Visual Studio. MbUnit and later versions of NUnit also contain project templates for unit tests.</p> <p>You can use those project templates to create a test project and then reference to your ASP.NET MVC ...
4,143
<p>I need to transport my FDM 3D Printer because I am moving.</p> <p>What are the precautions that one should take?<br> Should I dismount the motors and axes?<br> I would definitively unplug the electronics as far as reasonable and fix the motors to the frame so they don't slide during transport.<br> Should I have a h...
<p>Yes, fix the motors and any other loose/movable parts. Remove the bowden tube if it's there, and any other parts that are sticking out. Put the whole thing in a a bag to protect from dust, and put the bag in a box to protect it from getting beat up. Remember to calibrate it when you're ready to set it up again.</p>
<p>You just need to take basic security actions. like fixing all movable parts simple as that </p>
309
<p>I'm trying to convince my providers to use ANT instead of Rational Application Development so anyone can recompile, recheck, redeploy the solution anyplace, anytime, anyhow. :P</p> <p>I started a build.xml for a project that generates a JAR file but stopped there and I need real examples to compare notes. My good f...
<p>My Environment: Fedora 8; WAS 6.1 (as installed with Rational Application Developer 7)</p> <p>The documentation is very poor in this area and there is a dearth of practical examples.</p> <p><strong>Using the WebSphere Application Server (WAS) Ant tasks</strong></p> <p>To run as described here, you need to run the...
<p>If you just want to play around why not use the netbeans IDE to generate your ear files. If you create an enterprise project it will automatically generate the ant files for you. Good for prototyping and just getting started :-)</p> <p>There is even a was plugin which allows automated deployment however this seems ...
2,605
<p>I'm attempting to use Mono to load a bitmap and print it on Linux but I'm getting an exception. Does Mono support printing on Linux? The code/exception are below:</p> <p><strong>EDIT:</strong> No longer getting the exception, but I'm still curious what kind of support there is. Leaving the code for posterity or ...
<p>From the <a href="http://www.mono-project.com/FAQ:_General" rel="noreferrer">Mono docs</a>, I think yes:</p> <blockquote> <p>Managed.Windows.Forms (aka System.Windows.Forms): A complete and cross platform, System.Drawing based Winforms implementation.</p> </blockquote> <p>It also useful if you run the <a h...
<p><a href="http://www.go-mono.com/archive/1.2/" rel="nofollow noreferrer">According to</a></p> <p>System.Drawing is now complete, and in addition to being the underlying rendering engine for Windows.Forms, it has also been tested for using third party controls that heavily depend on it.</p>
4,705
<p>I've recently purchased a Makerbot Replicator Dual clone made by CTC. I'm in the process of upgrading/adding a few parts to it, but noticed that I can't control or print via USB.</p> <p>The machine prints perfectly from an SD card and I can see information in the terminal from the printer via USB in RepG and through...
<p>Good morning, and welcome to 3D Printing SE.</p> <p>You said: "I can see information from the printer via USB in RepG and through OctoPrint, but can't send any prints, commands or upgrade firmware (I wanted to flash Sailfish 7.7 eventually)." This means that the USB communication is working fine. It isn't a quest...
<p>It is possible that your board has a cloned FT232R USB-to-serial bridge chip, and FTDI drivers supplied via the Windows update channel will not work with cloned chips. Try using the Windows setup executable from the following page:</p> <p><a href="https://www.ftdichip.com/Drivers/VCP.htm" rel="nofollow noreferrer">...
1,377
<p>I have a user interface in .net which needs to receive data from a server, on a request/reply/update model. The only constraint is to use Java only on the server box.</p> <p>What is the best approach to achieve this ? Is it by creating a Webservice in Java and then accessing it in .net, or should I create Java prox...
<p>I recommend the web service route. It offers a standard interface that can be consumed by other client platforms in the future.</p> <p>.NET clients interact with Java web services pretty well, though there are some gotchas. The best two technologies available for you for the .NET client are Microsoft Web Service En...
<p>Using a standard type of web service (e.g. SOAP or XML-RPC) is best because not only is it easy to produce/consume, it's easy in other languages as well.</p>
9,002
<p><a href="http://en.wikipedia.org/wiki/ICalendar" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/ICalendar</a></p> <p>I'm working to implement an export feature for events. The link above lists tons of clients that support the ICalendar standard, but the "three big ones" I can see are Apple's iCal, Microsoft...
<p>I have to say that I don't use the hourly recurrence feature as really how many people have events that repeat in the same day? I could see if someone however was to schedule when they needed to take a particular medicine at recurring times throughout the day.</p> <p>I would say support full features in the applica...
<p>I use iCal in <a href="http://www.mozilla.org/projects/calendar/" rel="nofollow noreferrer">Lightning</a> (Thunderbird) and <a href="http://www.rainlendar.net/cms/index.php" rel="nofollow noreferrer">Rainlendar</a>.</p> <p>I have used Calendaring software for years (decades) and have never had a need for repeating ...
2,813
<p>As stated above, I am trying to solve a problem I've had for a long time. Unfortunately, this has recently intensified to the point where it causes layer splitting/detaching from each other. I have tried various ways to fix this and, while decreasing the temperature and extrusion multiplier improved the situation, t...
<p>I saw PETG printed at 100 mm/s, but 150! That's a lot.</p> <p>One solution to avoid blobs may be to limit the maximum speed to a value you can actually achieve with reliable results.</p> <p>Simple test to find your machine limits (each combination filament brand + nozzle + temperature has a different value): extru...
<p>Even not extruding anything but just performing travel moves over PETG at 100 mm/s or higher will <em>tear it up and drag material all over the place</em>. The result is blobs stuck to the nozzle, possibly even stringing, and choppy lines that the next layer will not properly adhere to. PETG simply cannot be printed...
1,673
<p>I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing?</p>
<p>The <a href="http://msdn.microsoft.com/en-us/library/ms679347%28VS.85%29.aspx" rel="noreferrer">FlashWindowEx</a> function which controls the flashing takes a <a href="http://msdn.microsoft.com/en-us/library/ms679348%28VS.85%29.aspx" rel="noreferrer">FLASHWINFO</a> struct which has a uCount field to control how many...
<p>@thomas -- Amazingly Microsoft's own <a href="http://msdn.microsoft.com/en-us/library/aa511446.aspx" rel="nofollow noreferrer">Windows Vista User Experience Guidelines</a> agree with you ...</p> <blockquote> <p>While having a background window flash its taskbar button is better than having it automatically come t...
4,910
<p>Does anyone have a regular expression for matching function calls in C programs ?</p>
<p>After a bit more searching I decided to let the compiler do the hard work.</p> <p>Get the compiler to produce a <a href="http://en.wikipedia.org/wiki/Register_Transfer_Language#RTL_in_GCC" rel="nofollow noreferrer">Register Transfer Language (RTL)</a> file using the -dr options of gcc.</p> <p>The produced RTL file...
<p>I doubt you can find a regex that matches all (and only) the function calls in some source code. But maybe you could use a tool like <a href="http://www.scitools.com/products/understand/" rel="nofollow noreferrer">Understand</a>, or your IDE, to browse your code.</p>
6,051
<p>I'm trying to decode the result of the Python os.wait() function. This returns, according to the Python docs:</p> <blockquote> <p>a tuple containing its pid and exit status indication: a 16-bit number, whose low byte is the signal number that killed the process, and whose high byte is the exit status (if the sign...
<p>This will do what you want:</p> <pre><code>signum = status &amp; 0xff exitstatus = (status &amp; 0xff00) &gt;&gt; 8 </code></pre>
<p>The folks before me've nailed it, but if you really want it on one line, you can do this:</p> <pre><code>(signum, exitstatus) = (status &amp; 0xFF, (status &gt;&gt; 8) &amp; 0xFF) </code></pre> <p>EDIT: Had it backwards.</p>
3,138
<p>I'm not quite sure if this is possible, or falls into the category of pivot tables, but I figured I'd go to the pros to see.</p> <p>I have three basic tables: Card, Property, and CardProperty. Since cards do not have the same properties, and often multiple values for the same property, I decided to use the union ta...
<p>Is this for SQL server?</p> <p>If yes then</p> <p><a href="http://wiki.lessthandot.com/index.php/Concatenate_Values_From_Multiple_Rows_Into_One_Column" rel="nofollow noreferrer">Concatenate Values From Multiple Rows Into One Column (2000)</a><br> <a href="http://wiki.lessthandot.com/index.php/Concatenate_Values_Fr...
<p>Don't collapse by concatenation for storage of related records in your database. Its not exactly best practices. </p> <p>What you're describing is a pivot table. Pivot tables are <em>hard</em>. I'd suggest avoiding them if at all possible. </p> <p>Why not just read in your related rows and process them in mem...
3,881
<p>I cant post the code (proprietary issues) but does anyone know what types of things would cause the following error in C#. It is being thrown by a VOIP client that I wrote (using counterpath api) when the call is ended by the other client. The error is:</p> <pre><code>System.AccessViolationException was unhandled ...
<p>List of some possibilities:</p> <ul> <li>An object is being used after it has been disposed. This can happen a lot if you are disposing managed object in a finalizer (you should not do that).</li> <li>An unmannaged implementation of one of the object you are using is bugged and it corrupted the process memory heap....
<p>Here is a more detailed stacktrace. It looks to me like it has something to do with the System.Windows.Form.dll</p> <p>the TargetSite is listed as <code>{IntPtr DispatchMessageW(MSG ByRef)}</code><br> and under module it has System.windows.forms.dll</p>
3,855
<p>We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigation elements, popup dialogs etc.</p> <p>Today it's obvious that AJAX/JS offe...
<ul> <li>Correctly designed AJAX apps are more googleable than Flash</li> <li>Correctly designed AJAX apps are more easily deep linkable than Flash</li> <li>AJAX doesn't require a plugin (Flash is pretty ubiquitous, so it's not really a big deal)*</li> <li>AJAX isn't controlled by a single company the way Flash is</li>...
<p>I think Flash should be limited to online games, videos and animation. Otherwise use html and Ajax. It's a web standard and supported by almost all devices. AFAIK, the iPhone doesn't support Flash. That's a fast growing segment you're blocking out already. Keep it simple and efficient. </p>
7,539
<p>Following this question:<br> <a href="https://stackoverflow.com/questions/49224/good-crash-reporting-library-in-c">Good crash reporting library in c#</a></p> <p>Is there any library like CrashRpt.dll that does the same on Linux? That is, generate a failure report including a core dump and any necessary environment...
<p>See <em><a href="https://stackoverflow.com/questions/18265/getting-stack-traces-on-unix-systems-automatically">Getting stack traces on Unix systems, automatically</a></em> on Stack Overflow.</p>
<p>Note: there are two interesting registers in an <code>x86</code> seg-fault crash.</p> <p>The first, <strong>EIP</strong>, specifies the code address at which the exception occurred. In RichQ's answer, he uses addr2line to show the source line that corresponds to the crash address. But EIP can be invalid; if you ...
7,172
<p>I have some flexible PLA filament (<a href="https://rads.stackoverflow.com/amzn/click/com/B00VKSSA4E" rel="noreferrer" rel="nofollow noreferrer">https://www.amazon.com/dp/B00VKSSA4E/</a>, presumably a mix of PLA with some platicizer) that's supposed to be easy to print with settings similar to regular PLA. I've seen...
<p>You could enable <code>combing</code> in the slicer. Combing not only prevents retracts, it also uses already laid down paths for movement from one to the other location and as such reduces the amount of stringing.</p>
<p>The right path seems to be enabling retraction, but tuning the retraction and print speed settings. I started out by dropping all speed settings to 30. With retraction disabled, this turned the stringing into solid walls between paths, with only a tiny gap at the very start of the wall, right after the extruder stop...
1,254
<p>Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone?</p>
<p>I looked fairly deeply into this question for a project I am working on. GeoNames.org and EarthTools.com are both good options for many situations but with the following serious flaws:</p> <ul> <li>GeoNames.org finds the time zone by searching for the nearest point in their database that contains a time zone field...
<p><a href="http://drtengine.com/pages/geo_get_timezone" rel="nofollow">DRT Engine</a> takes a latitude, longitude and local datetime and returns a timezone offset. This can be used to establish the timezone of a particular location at a <em>future</em> date.</p>
6,282
<p>I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. </p> <p>The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome. </p> <p>Th...
<p>Hook into the KeyPress event on the TextBox, and when it encounters the Enter key, run your hardware setting code, and then highlight the full text of the textbox again (see below) - Windows will take care of clearing the text with the next keystroke for you.</p> <pre><code>TextBox1.Select(0, TextBox1.Text.Length);...
<p>OK, are you sure that is wise? I am picturing two scenarios here:</p> <ol> <li>There is a default button on the form, which is "clicked" when enter is pushed".</li> <li>There is no default button, and you want the user to have to press enter, regardless.</li> </ol> <p>Both of these raise the same questions:</p> <...
3,683
<p>Is it possible to have a fixture change between test methods? If so, how can I do this? </p> <p>My syntax for this problem : </p> <p>In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended to work in the same way that adding the "created" and ...
<p>Last time I checked, you could use the <a href="http://developers.sugarcrm.com/tutorials/Customizing_Sugar/4/" rel="nofollow noreferrer">module builder</a> to extend the interface. From 5.0 (or maybe 4.x) on, Sugar added all those APIs, which should enable you to extend SugarCRM without hacking it in and losing it w...
<p>Basically, the Account name should be a related field in your new invoices module (base the module creation on something like QUOTES that has similar fields. Once you create the module (so simple you can almost guess your way through it in the ADMIN section) and the fields you like (using Studio) just add the RELATE...
5,857
<p>I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Python that then speaks to the PostgreSQL D...
<p>SQLAlchemy is more full-featured and powerful (uses the DataMapper pattern). Django ORM has a cleaner syntax and is easier to write for (ActiveRecord pattern). I don't know about performance differences.</p> <p>SQLAlchemy also has a <a href="http://docs.sqlalchemy.org/en/rel_0_9/orm/extensions/declarative/index.h...
<p>I'd check out <a href="http://www.sqlalchemy.org/" rel="nofollow noreferrer">SQLAlchemy</a> </p> <p>It's really easy to use and the models you work with aren't bad at all. <strike>Django uses SQLAlchemy for it's ORM</strike> but using it by itself lets you use it's full power.</p> <p>Here's a small example on crea...
7,687
<p>I have a .Net desktop application with a TreeView as one of the UI elements.</p> <p>I want to be able to multi-select that TreeView, only that isn't supported at all.</p> <p>So I'm adding check-boxes to the tree, My problem is that only some items are selectable, and those that aren't can't consistently cascade se...
<p>The default behavior of TreeView is that when the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.checkboxes%28VS.80%29.aspx" rel="nofollow noreferrer">Checkboxes</a> property is set to true, that checkboxes will be shown for all TreeNodes.</p> <p>The behavior that you are looking for...
<p><a href="http://www.codeproject.com/KB/tree/Multiselect_Treeview.aspx" rel="nofollow noreferrer">MultiSelectTreeView</a>:</p> <blockquote> <p>Why doesn't .NET have a multiselect treeview? There are so many uses for one and turning on checkboxes in the treeview is a pretty lousy alternative.</p> </blockquote>
6,020
<p>I'm working on a tool that will generate the source code for an interface and a couple classes implementing that interface. My output isn't particularly complicated, so it's not going to be hard to make the output conform to our normal code formatting standards.</p> <p>But this got me thinking: how human-readable ...
<p>I think it's just as important for generated code to be readable and follow normal coding styles. At some point, someone is either going to need to debug the code or otherwise see what is happening "behind the scenes".</p>
<p>It's quite possible that somebody in the future will want to go through and see what your code does. So making it somewhat understandable is a good thing.</p> <p>You also might want to include at the top of each generated file a comment saying how and why this file was generated and what it's purpose is.</p>
8,878
<p>I have two applications written in Java that communicate with each other using XML messages over the network. I'm using a SAX parser at the receiving end to get the data back out of the messages. One of the requirements is to embed binary data in an XML message, but SAX doesn't like this. Does anyone know how to ...
<p>You could encode the binary data using base64 and put it into a Base64 element; the below article is a pretty good one on the subject.</p> <p><a href="http://www.xml.com/pub/a/98/07/binary/binary.html" rel="noreferrer">Handling Binary Data in XML Documents</a></p>
<p>If you have control over the XML format, you should turn the problem inside out. Rather than attaching the binary XML you should think about how to enclose a document that has multiple parts, one of which contains XML.</p> <p>The traditional solution to this is an archive (e.g. tar). But if you want to keep your enc...
4,026
<p>Let's say I have the following class:</p> <pre><code>public class Test&lt;E&gt; { public boolean sameClassAs(Object o) { // TODO help! } } </code></pre> <p>How would I check that <code>o</code> is the same class as <code>E</code>?</p> <pre><code>Test&lt;String&gt; test = new Test&lt;String&gt;(); ...
<p>An instance of <code>Test</code> has no information as to what <code>E</code> is at runtime. So, you need to pass a <code>Class&lt;E&gt;</code> to the constructor of Test.</p> <pre><code>public class Test&lt;E&gt; { private final Class&lt;E&gt; clazz; public Test(Class&lt;E&gt; clazz) { if (clazz ==...
<p>I was just trying to do the same thing, and one neat trick i just realized is that you can can try a cast, and if the cast fails, ClassCastException will be thrown. You can can catch that, and do whatever. </p> <p>so your sameClassAs method should look like:</p> <pre><code>public boolean sameClassAs(Object o) { ...
7,471
<p>Following the question I asked here: <a href="https://3dprinting.stackexchange.com/questions/8735/replace-x-axis-motor-with-different-model/8738?noredirect=1#comment14916_8738">Replace X axis motor with different model</a></p> <p>I have a problem with my new motor. My X-axis is now moved by a 17HS3401S motor, inste...
<p>The overall torque, and thus the incremental torque is less with your new stepper, this may result in less smooth operation because of moving the weight of the carriage (e.g. when you have a direct extruder mounted on the X carriage). </p> <p>You could be facing skipping steps, resulting in less accurate prints. Ma...
<p>One other possibility is that the printer is "gap-filling". When there is a space between walls that isn't enough for infill or a roof layer, the slicer can be told to fill the gap, and depending on gap size it often does this with a zig-zaggy motion of the extruder. This is normal; if you wish, you can turn it off,...
1,288
<p>Recently building a new printer, I went with a Wambam PEX system. When I began printing ABS I found it did not stick very well and eventually purchased a new build plate and a PEI sheet since PEX isn't suited to ABS.</p> <p>Not altering some of the setting while trying to get ABS to stick to the PEX I started print...
<p>Heat up your bed to the print temperature; maybe even as hot as 100 °C. This will soften the ABS and make it easier to scrape off. It will distort a print to remove it this way, but is good for cleaning.</p> <p><strong>Less preferred method</strong>: Acetone will dissolve ABS but may be rough on your PEI, even cau...
<p>Heating the bed didn't help much, but Someone suggested using the flush cutters which pryed it up just enough... to get the bigger chunk off.</p>
1,995
<p>I'm reading about wiring up the electronic components to my Prusa i3 using an Arduino Mega 2650 and Ramps 1.4.</p> <p>I have step sticks, a heated bed, and a <a href="http://rads.stackoverflow.com/amzn/click/B007KG0ZYI" rel="noreferrer">Switching Power Supply 12v Dc 30a 360w</a> (more details on that later when I ...
<ul> <li><p>Polarity matters, sometimes. Be especially mindful of the wires from your power supply to the board, as getting those the wrong way around will definitely cause damage. Heated beds and extruders are not polarity sensitive, and can go in either way. Fans are polarized, but will probably survive if you get th...
<p>Adding to the other answers:</p> <ul> <li>ALWAYS power-off the printer completely and make sure it is not receiving any power from any source (could be receiving power from USB after you turned the power supply off).</li> <li>Avoid loose wires, and before powering the printer on make sure every wire is connected in...
123
<p>The system I am currently working on requires some role-based security, which is well catered for in the Java EE stack. The system intends to be a framework for business domain experts to write their code on top of.</p> <p>However, there is also a requirement for data <code>security</code>. That is, what informatio...
<p>Hibernate has a <a href="http://in.relation.to/Bloggers/Hibernate3Filters" rel="noreferrer">filter mechanism</a> that may work for you. The filters will rewrite the queries hibernate generates to include an additional clause to limit the rows returned. I'm not aware of anything in hibernate to mask/hide columns.</...
<p>When using Hibernate filters you need to be aware that the additional restrictions will not be applied to SQL statements generted by the <code>load()</code> or <code>get()</code> methods.</p>
5,495
<p>Updating an old ASP/Access site for a client - I need SQL to add a column to an existing table and set a default value. Doesn't work - any ideas?</p> <p>This works fine</p> <pre><code>ALTER TABLE documents ADD COLUMN membersOnly NUMBER </code></pre> <p>I want this to work:</p> <pre><code>ALTER TABLE documents AD...
<p>Tools -&gt; Options -&gt; Tables/Queries -&gt; (At the bottom right:) Sql Server Compatible Syntax - turn option on for this database.</p> <p>then you can execute your query:</p> <pre><code>ALTER TABLE documents ADD COLUMN membersOnly NUMBER DEFAULT 0 </code></pre>
<p>Tools -> Options -> Tables/Queries -> (At the bottom right:) Sql Server Compatible Syntax - turn option on for this database.</p> <p>is not found on MS Access 2010</p>
6,981
<p>I've noticed that SQL Server 2005 x64 does not seem to lock pages into memory the same way SQL Server 2000 did. In 2000 I could easily see from task manager that SQL had locked 8GB of ram with AWE. I'm fairly certain I've got 2005 setup in an equivalent way.</p> <p>Is this a normal x64 difference or am I forgetti...
<p>SQL Server 2005 x64 certainly doesn't need, or use, AWE; AWE is only to allow it to use > 4GB on 32 bit systems.</p> <p>You <em>can</em> use the old lock-pages-in-memory trick, but as this KB shows (<a href="http://support.microsoft.com/kb/918483" rel="nofollow noreferrer">http://support.microsoft.com/kb/918483</a>...
<p>I've seen permissions problems crop up a lot too - if the account you're using for the SQL Server service doesn't have the right permissions, it can't lock pages in memory even if you're running Enterprise Edition. This blog entry by the PSS SQL Server Engineers is really helpful:</p> <p><a href="http://blogs.msdn...
7,542
<p>I've built one, but I'm convinced it's wrong.</p> <p>I had a table for customer details, and another table with the each date staying (i.e. a week's holiday would have seven records).</p> <p>Is there a better way?</p> <p>I code in PHP with MySQL</p>
<p><a href="http://www.databaseanswers.org/data_models/hotels/hotel_reservations_popkin.htm" rel="nofollow noreferrer">Here you go</a></p> <p>I found it at this page: <a href="http://www.webmastersbydesign.com/2008/08/04/library-of-over-500-free-database-models/" rel="nofollow noreferrer">A list of free database model...
<p>What's wrong with that? logging each date that the customer is staying allows for what I'd imagine are fairly standard reports such as being able to display the number of booked rooms on any given day.</p>
9,297
<p>I have an <a href="http://www.sencha.com" rel="nofollow noreferrer">ExtJS</a> grid on a web page and I'd like to save some of its state information back to the server when the users leaves the page. Can I do this with an Ajax request onUnload? If not, what's a better solution?</p>
<p>You can use an Ajax request, but be sure to make it a synchronous request rather than an asychronous one. Alternatively, simply save state whenever the user makes a change, this also protects the data if the user's browser crashes.</p>
<p>You could also set a cookie using javascript on unload. I think the advantage ajax has over cookies is that you have the data available to you for reporting and the user (if logged in) can utilise the data across different machines.</p> <p>The disadvantage of using ajax is that it might slow down the actual closing...
9,902
<p>At what point does a MySQL database start to lose performance?</p> <ul> <li>Does physical database size matter?</li> <li>Do number of records matter?</li> <li>Is any performance degradation linear or exponential?</li> </ul> <p>I have what I believe to be a large database, with roughly 15M records which take up alm...
<p>The physical database size doesn't matter. The number of records don't matter.</p> <p>In my experience the biggest problem that you are going to run in to is not size, but the number of queries you can handle at a time. Most likely you are going to have to move to a master/slave configuration so that the read que...
<p>No it doesnt really matter. The MySQL speed is about 7 Million rows per second. So you can scale it quite a bit</p>
2,366
<p>This problem started technically just before a major move but I had hoped it was a &quot;one off&quot; issue... I started up my trusty Ender 3 today to find it may have actually gotten worse and I'm not entirely sure what the solution is. I was printing a replica of a weapon from a game and I noticed at one point th...
<p>Same G-code slice? The main cause of warping is temperature. If this is kept as a control variable and you have these results, it may be because of a different temperature the filament requires. Check the filament specs and adjust the bed/nozzle temperature to make the temperature difference smaller.</p> <p>Edit: An...
<p>Problem was displaced by a factory reset of the 3D printer FlashForge Adventurer 3.</p> <p><a href="https://i.stack.imgur.com/jxS9X.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jxS9X.jpg" alt="Photo of two versions" /></a></p> <p>Right: white PLA only, left: transparent PLA bottom layers plus w...
2,048
<p>I have a stored procedure which takes as its parameter a <em>varchar</em> which needs to be cast as a <em>datetime</em> for later use:</p> <pre><code>SET @the_date = CAST(@date_string AS DATETIME) </code></pre> <p>I'm expecting the date string to be supplied in the format "DD-MON-YYYY", but in an effort to code de...
<p>I'm having a similar issue. You might be able to do something like this:</p> <pre><code>SET arithabort arith_overflow off SET @the_date = CAST(@date_string AS DATETIME) IF @the_date is NULL set @the_date = getdate() SET arithabort arith_overflow on </code></pre> <p>However, this doesn't work well in a select....
<p>Found <a href="http://blog.sqlauthority.com/2007/07/12/sql-server-validate-field-for-date-datatype-using-function-isdate/" rel="nofollow noreferrer">this in the second result</a> in Google when searching for "validate date string sql".</p> <pre><code>----Invalid date SELECT ISDATE('30/2/2007') RETURNS : 0 (Zero) --...
3,049
<p>If I have an object implementing the <code>Map</code> interface in Java and I wish to iterate over every pair contained within it, what is the most efficient way of going through the map?</p> <p>Will the ordering of elements depend on the specific map implementation that I have for the interface?</p>
<pre class="lang-java prettyprint-override"><code>Map&lt;String, String&gt; map = ... for (Map.Entry&lt;String, String&gt; entry : map.entrySet()) { System.out.println(entry.getKey() + &quot;/&quot; + entry.getValue()); } </code></pre> <p>On Java 10+:</p> <pre class="lang-java prettyprint-override"><code>for (var e...
<p>I copied the data of a map to another with this code:</p> <pre><code>HashMap product =(HashMap)shopping_truck.get(i); HashMap tmp = new HashMap(); for (Iterator it = product.entrySet().iterator(); it.hasNext();) { Map.Entry thisEntry = (Map.Entry) it.next(); tmp.put(thisEntry.getKey(), thisEntry.getValue())...
6,906
<p>I'm looking for a wiki that I can use to track requirements for a project, but we would like to be able to export the wiki (with formatting) to Microsoft Word. Does anyone know of a wiki that does this?</p>
<p><a href="http://www.atlassian.com/software/confluence/" rel="nofollow noreferrer">Confluence</a> does this. Also exports to PDF.</p>
<p>If you're looking for a free solution, MediaWiki has some <a href="http://www.mediawiki.org/wiki/Alternative_parsers" rel="nofollow noreferrer">alternative parsers</a> that might be a good place to look. You might have to go through more than one phase to get it to Microsoft Word format though.</p>
9,371
<p>I'm looking to push my domain model into a WCF Service API and wanted to get some thoughts on lazy loading techniques with this type of setup.</p> <p>Any suggestions when taking this approach?</p> <hr> <p>when I implemented this technique and step into my app, just before the server returns my list it hits the ge...
<p>As for any remoting architecture, you'll want to avoid loading a full object graph "down the wire" in an uncontrolled way (unless you have a trivially small number of objects).</p> <p>The <a href="http://en.wikipedia.org/wiki/Lazy_loading" rel="nofollow noreferrer">Wikipedia article</a> has the standard techniques ...
<p>You could try to use something REST based (e.g. <a href="http://msdn.microsoft.com/en-us/data/bb931106.aspx" rel="nofollow noreferrer">ADO.NET Data Services</a>) and wrap it transpariently into your client code.</p>
5,611
<p>Is it true that the only way to handle default function arguments is through function overloading?</p> <p>For example, in PHP I can do this:</p> <pre><code>function foo($x, $y=0) { } </code></pre> <p>Would the best way to handle it in C# be this?</p> <pre><code>void foo(int x) { foo(x, 0); } void foo(int x, i...
<p>Yes, that'd be best<s>, except you'd omit the <code>$</code>s on the parameter names</s>, as others have pointed out. For those interested in the rationale behind the lack of default parameter values, see @Giovanni Galbo's explanation.</p>
<p>Yes. </p> <p>Or currying. </p> <p>Or abstracting into a class and using default values there. </p>
6,128
<p>I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like <a href="http://www.nike.com/nikeskateboarding/v3/" rel="noreferrer">...
<p>The trick is to use some simple JavaScript to resize the Flash DOM node:</p> <pre><code>function resizeFlash( h ) { // "flash-node-id" is the ID of the embedded Flash movie document.getElementById("flash-node-id").style.height = h + "px"; } </code></pre> <p>Which you call from within the Flash movie like t...
<p>I halfway looked at swffit but the height (and width sometimes but mainly height) would be dynamic - swffit let's you declare a maxHeight but that number would be constantly changing...maybe I could figure out how to set it dynamically. A great place for me to start though - thanks!</p>
5,286
<p>Is there an API call in .NET or a native DLL that I can use to create similar behaviour as Windows Live Messenger when a response comes from someone I chat with?</p>
<p>FlashWindowEx is the way to go. See <a href="http://msdn.microsoft.com/en-us/library/ms679347%28VS.85%29.aspx" rel="noreferrer">here for MSDN documentation</a></p> <pre><code>[DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool FlashWindowEx(ref FLASHWINFO pwfi); [StructLayout(Layou...
<p>I believe you're looking for <a href="http://msdn.microsoft.com/en-us/library/ms633539.aspx" rel="nofollow noreferrer"><code>SetForegroundWindow</code></a>.</p>
9,885
<p>I have recently bought a spool of eSun PETG. So far I really like the filament. My only complaint is, I get lumps of charred filament deposited on my object. The slicer I used is Craft Ware and I have played with the Far Travel -> Elevation settings. I have noticed that this helps but then I have little to no adhesi...
<p>Different brands and blends of PET filaments seem to do this to different degrees. Esun's PETG is definitely one that tends to glob onto the nozzle. Basically, the nozzle plows through the top surface of the filament and lifts up some plastic, much like the bow of a ship lifting up some water at high speeds. PET's v...
<p>For me, none of the classic solutions to PETG zits worked; these include extra retraction, slower/faster retraction, lower extrusion width, lower extrusion multiplier, avoid perimeters etc. It was especially disappointing to see lower extrusion multiplier making no difference whatsoever in reducing the zits, but onl...
216
<p>I am attempting to build a 3D printer using the <a href="https://github.com/gregsaun/prusa_i3_bear_upgrade" rel="nofollow noreferrer">Bear Upgrade</a> for guidance.</p> <p>However, I want to modify some of the parts. I am basing the modified parts on the original designs.</p> <p>I would like to understand the reas...
<blockquote> <p>Item 1) The holes are not round. Why???</p> </blockquote> <p>Two things about this. First, the print is upside down. The holes are not round to accommodate the fact you cannot print a round hole unsupported. If you try to print the circle unsupported, when you get to the top portion, it will sag unti...
<p>Teardrop shape ere is a feature there which is inside of the part which you cannot see otherwise. By turning it, you should be able to decipher what these features are for and therefore should be able to</p>
1,533
<p>I try to externalize all strings (and other constants) used in any application I write, for many reasons that are probably second-nature to most stack-overflowers, but one thing I would like to have is the ability to automate spell checking of any user-visible strings. This poses a couple problems:</p> <ul> <li>No...
<p>We do it manually, if errors aren't picked up during testing then they're picked up by the QA team, or during localization by the translators, or during localization QA. Then we lodge a bug.</p> <p>Most of our developers are not native English speakers, so it's not an uncommon problem for us. The number that slip t...
<p>First point, <em>please</em> don't put it into you build process. I would be a vengeful coder if I (meaning my computer) had to spell check all the content on the site every time I tried to debug or build a new feature. I don't even think this kind of operation belongs as a unit test (you're testing a human interfac...
6,410
<p>So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible.</p> <p>The code I'm working on needs to populate, let's say a <code>List&lt;Foo&gt;</code> from a DataReader that returns all the fields req...
<p>To make this less tedious, you will need to encapsulate/refactor the mapping between the DataReader and the Object you hold in the list. There is quite of few steps to encapsulate that logic out. If that is the road you want to take, I can post code for you. I am just not sure how practical it would be to post th...
<p>You can put the Foo instances in a list and compare the objects with what you read: </p> <pre><code>var arrFoos = new Foos[]{...}; // what you expect var expectedFoos = new List&lt;Foo&gt;(arrFoos); // make a list from the hardcoded array of expected Foos var readerResult = ReadEntireList(reader); // read everythi...
4,980
<p>I'm working on a project with a friend that will utilize Hbase to store it's data. Are there any good query examples? I seem to be writing a ton of Java code to iterate through lists of RowResult's when, in SQL land, I could write a simple query. Am I missing something? Or is Hbase missing something?</p>
<p>I think you, like many of us, are making the mistake of treating bigtable and HBase like just another RDBMS when it's actually a column-oriented storage model meant for efficiently storing and retrieving large sets of sparse data. This means storing, ideally, many-to-one relationships within a single row, for exampl...
<p>Thanks for the reply Sean, and sorry for my late response. I often make the mistake of treating HBase like a RDBMS. So often in fact that I've had to re-write code because of it! It's such a hard thing to unlearn.</p> <p>Right now we have only 4 tables. Which, in this case, is very few considering my background...
7,040
<p>I am new to FDM RP. I've done a lot of work on ZCorp and Connex. </p> <p>The question is can vectors curve drive an extrusion nozzle? Within a 3D volume I can generate curves that I want the print nozzle to follow. Is this possible or has it been done? If so, what software or is there a hack? </p> <p>Another q...
<p>Just for the fun of it and perhaps to contribute to this question, I opened my recent task in Simplify3d slicing software. Setting the perimeter walls and top/bottom surfaces to zero did not generate an error as I expected.</p> <p>The print preview, essentially a g-code viewer, presented the model as only the honey...
<p>Vectors do not drive the extrusion nozzles in current software. There are methods to take vectors and create a solid model with them which can be used. The standard workflow is to take a solid model, save it in the STL format, and then import the STL file into the slicing software and outputs Gcode with contain coor...
409