instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I've changed SD cards, printed from USB connection, upgraded/reloaded firmware and attempted using different software packages. Nothing has worked yet. When connected via USB, I get a "disconnected" error after a few minutes into the print. Also, the LED lights now either don't work at all or will rando... | <p>I recently had this problem and narrowed it down to the part cooling fan (on the side of the extruder head). I diagnosed the problem by noticing that the printer would reboot shortly after the second layer started, only on PLA prints. Of course, the part cooling fan is not usually started until after the first lay... | <p>I had a similar problem with my Ender 3 that started after relocating the power supply to a (3D printed) bracket to give additional clearance from the edge of the bed (it was touching the magnetic build sheet, potentially causing prints to lift or warp at +X +Y corner).</p>
<p>What I found was that the brackets I ha... | 2,030 |
<p>I would like to make custom insoles for my wife.</p>
<p>This company makes a flexible filament that will be soft to stand on:
<a href="http://recreus.com/en/" rel="noreferrer">http://recreus.com/en/</a></p>
<p>I do not currently own a printer.</p>
<p>How can I measure her feet and transfer the measurements to the... | <p>Here is a post that covers how to scan a foot and make a form fitting insole - <a href="https://web.archive.org/web/20180429035945/http://www.gyrobot.co.uk/blog/my-adventures-with-3d-printed-insoles-part-4-4" rel="nofollow noreferrer">https://web.archive.org/web/20180429035945/http://www.gyrobot.co.uk/blog/my-advent... | <p>Many questions in one post, but I'll address only the first. Consider to use a shoe with a flat insole, perhaps even what is commonly called a flip-flop. If your objective is to perfectly match the curve of her foot bottom, this should work. Apply a layer of polymer modeling clay, plasticine or similar material. It ... | 226 |
<p>What's the best way to go about validating that a document follows some version of HTML (prefereably that I can specify)? I'd like to be able to know where the failures occur, as in a web-based validator, except in a native Python app.</p>
| <p>XHTML is easy, use <a href="http://lxml.de/validation.html" rel="noreferrer">lxml</a>.</p>
<pre><code>from lxml import etree
from StringIO import StringIO
etree.parse(StringIO(html), etree.HTMLParser(recover=False))
</code></pre>
<p>HTML is harder, since there's traditionally not been as much interest in validatio... | <p>I think that <a href="http://tidy.sourceforge.net/" rel="nofollow noreferrer">HTML tidy</a> will do what you want. There is a Python binding for it.</p>
| 5,606 |
<p>We need to regularly synchronize many dozens of binary files (project executables and DLLs) between many developers at several different locations, so that every developer has an up to date environment to build and test at. Due to nature of the project, updates must be done often and on-demand (overnight updates are... | <p>I'd probably take a look at rsync.</p>
<p>Just create a .CMD file that contains the call to rsync with all the correct parameters and let people call that. rsync is very smart in deciding what part of files need to be transferred, so it'll be very fast even when large files are involved.</p>
<p>What rsync doesn't ... | <p>Building the project should be a centralized process in order to allow for better control soon your solution will be caos in the long run. Anyway here is what I'd do.</p>
<ul>
<li>Create the usual repositories for
source files, resources,
documentation, etc for each project.</li>
<li>Create a repository for resourc... | 8,288 |
<p>There are all sorts of stories of what to put on your printer bed to make your part not come loose when it is printing but can be removed after it is done without requiring a hammer and chisel.</p>
<p>Is there anything out there that shows an analytical comparison?</p>
<p>My biggest interest is PLA on a heated gla... | <p>I use a product called <a href="http://www.3dlac.com/index.php/en/" rel="nofollow noreferrer">3DLAC</a> but I suppose it's regular hairspray. Makes my PLA stick to the heated bed like a charm. After cooling down the print can be removed from the bed with ease.</p>
<p>Only today, after a few thousand prints the glas... | <p>I use a product called <a href="http://www.3dlac.com/index.php/en/" rel="nofollow noreferrer">3DLAC</a> but I suppose it's regular hairspray. Makes my PLA stick to the heated bed like a charm. After cooling down the print can be removed from the bed with ease.</p>
<p>Only today, after a few thousand prints the glas... | 597 |
<p>I'm looking for good/working/simple to use PHP code for parsing raw email into parts.</p>
<p>I've written a couple of brute force solutions, but every time, one small change/header/space/something comes along and my whole parser fails and the project falls apart.</p>
<p>And before I get pointed at PEAR/PECL, I need ... | <p>What are you hoping to end up with at the end? The body, the subject, the sender, an attachment? You should spend some time with <a href="http://www.faqs.org/rfcs/rfc2822.html" rel="noreferrer">RFC2822</a> to understand the format of the mail, but here's the simplest rules for well formed email:</p>
<pre><code>HE... | <p>yeah, ive been able to write a basic parser, based off that rfc and some other basic tutorials. but its the multipart mime nested boundaries that keep messing me up.</p>
<p>i found out that MMS (not SMS) messages sent from my phone are just standard emails, so i have a system that reads the incoming email, checks t... | 3,397 |
<p>I have just built my first 3D printer, and I am having some problems. It is a Cartesian based 3D printer, using Marlin firmware and Pronterface software. My problem is homing the 3D printer. I do not have a probe to calibrate the z offset but I have all 6 endstops. The problem is that the "ZMIN" endstop isn't precis... | <p>It is possible to "home a printer" without having endstops, technically, you don't <strong>require</strong> endstops, but it makes your job a lot easier if you want to print something!</p>
<p>Basically, when you don't have endstops or limit switches, you need to define where the head of the printer is located. E.g.... | <p>You can reconfigure marlin to use the MAXZ endstop instead of MINZ in Configuration.h, and then reflash it to your printer.</p>
<p><a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Configuration.h#L877" rel="nofollow noreferrer">https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Configurat... | 1,216 |
<p>I'm looking for a clear, concise and accurate answer. </p>
<p>Ideally as the actual answer, although links to good explanations welcome.</p>
<p>This also applies to VB.Net, but the keywords are different - <code>ByRef</code> and <code>ByVal</code>.</p>
| <p>By default (in C#), passing an object to a function actually passes a copy of the reference to that object. Changing the parameter itself only changes the value in the parameter, and not the variable that was specified.</p>
<pre><code>void Test1(string param)
{
param = "new value";
}
string s1 = "initial value... | <p><code>out</code> means that the parameter will be initialised by the method:</p>
<pre><code>int result; //not initialised
if( int.TryParse( "123", out result ) )
//result is now 123
else
//if TryParse failed result has still be
// initialised to its default value (0)
</code></pre>
<p><code>ref</code> wi... | 3,410 |
<p>Is it possible to build Visual Studio solutions without having to fire up MonoDevelop?</p>
| <p>Current status (Mono 2.10, 2011): xbuild is now able to build all versions of Visual Studio / MSBuild projects, including .sln files. Simply run <code>xbuild</code> just as you would execute <code>msbuild</code> on Microsoft .Net Framework. You don't need Monodevelop installed, xbuild comes with the standard Mono in... | <p>I think you are looking for xbuild:
<a href="http://www.mono-project.com/Microsoft.Build" rel="nofollow noreferrer">http://www.mono-project.com/Microsoft.Build</a></p>
| 7,841 |
<p>I'm looking for a simple way to encrypt my soap communication in my C# Web-Service.</p>
<p>I was looking into <a href="http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Fwww.microsoft.com%2Fdownloads%2Fdetails.aspx%3Ffamilyid%3D018a09fd-3a74-43c5-8ec1-8d789091255d&ei=x1isSPTUO4bS0QXsjIzWAw&... | <p>I think this can help; last year we used this to compress the webservices and it performed very well, I believe it could be enhanced with encryption classes;</p>
<p><a href="http://www.mastercsharp.com/article.aspx?ArticleID=86&&TopicID=7" rel="noreferrer">Creating Custom SOAP Extensions - Compression Exten... | <p>Perhaps I'm being naive, but would forcing the communication to be via https be acceptable?
I develop web services that run on 2.0 and have had success with just getting IIS to enforce https on the virtual directory. </p>
<p>Alternatively, or in addition, you can check the <a href="http://msdn.microsoft.com/en-us/l... | 3,902 |
<p>I'm trying to bind the following shortcut: <strong>Ctrl + W</strong> to close tabs</p>
<p>How can you customize VS to add/change shortcuts? Also, what are the most useful shortcuts you guys have found?</p>
| <p>Tools > Options > (Show all settings), then Environment > Keyboard.</p>
<p>Here, rebind the key “File.Close” to <kbd>Ctrl</kbd>+<kbd>W</kbd>.</p>
| <p><kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>Space</kbd> shows the syntax/overloads for the current function you are typing parameters for.</p>
| 4,600 |
<p>Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files?</p>
<p>I have heard of <a href="http://www.webalizer.org/" rel="noreferrer">Webalizer</a> and <a href="http://awstats.sourceforge.net/" rel="noreferrer">AWStats</a>, but have never really us... | <p>AWStats and Webalizer are both good and free (I think both free speech as well as free beer). I generally prefer the look of AWStats - it has a nice modern look whereas Webalizer looks like something created in about 1992.</p>
<p>They both give roughly the same information which includes:</p>
<ul>
<li>Most frequen... | <p>If you are looking for stats that are meant to be given to a customer and provide them with realistic data (not number of hits based on every file), then check out <a href="http://www.google.com/analytics" rel="nofollow noreferrer">Google Analytics</a>. Free and looks pretty.</p>
| 3,684 |
<p>How often should you use git-gc? </p>
<p>The <a href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html" rel="noreferrer">manual page</a> simply says:</p>
<blockquote>
<p>Users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good op... | <p>It depends mostly on how much the repository is used. With one user checking in once a day and a branch/merge/etc operation once a week you probably don't need to run it more than once a year.</p>
<p>With several dozen developers working on several dozen projects each checking in 2-3 times a day, you might want to... | <p>I use when I do a big commit, above all when I remove more files from the repository.. after, the commits are faster</p>
| 7,956 |
<p>I have an Ender 3 Pro with the BTT SKR E3 V2.0 mini with Marlin firmware 2.0.8.2.x.
I am trying to print PETG, which requires decently high temperatures.</p>
<p>I initially replaced the stock board after a thermal runaway event that seemed to have damaged it. After installing the new board and getting all the settin... | <p>I'm fairly certain I have solved this issue, and it ended up having nothing to do with the printer and everything to do with what it was plugged into!</p>
<p>I had it on a smart outlet with some automations set up to kill the power if there was ever a fire. Unfortunately, the outlet I was using was only rated for 8A... | <blockquote>
<p>Recv: T:224.24 /<strong>260.00</strong> B:88.95 /<strong>90.00</strong> @:127 B@:127</p>
</blockquote>
<h1>You are trying to achieve too much!</h1>
<p>The maximum rated temperature for an Ender3 is 260 °C, yes, but to achieve this you need to insulate the heater block with a silicon sock from losing he... | 2,155 |
<p>There has been a lot of questions and confusion about what is acceptable here on 3D Printing SE. Let's go ahead and discuss what types of questions should be acceptable on the site.</p>
<p>We're going to do this based on votes. I'll leave it up to debate in the comments below, but we'll emulate Area51 question requ... | <p>I absolutely agree. I believe we all want this site to maintain high quality, but right now almost no questions fall within our desired scope and form.</p>
<p>I think we either need to:</p>
<ul>
<li>Change the acceptable scope of questions to be asked</li>
<li>Change how we welcome new users</li>
</ul>
<p>Right n... | <p>I've been active on SO since it was in beta, and have participated in numerous SE sites when they were in beta.</p>
<p>It's my impression that there is much more enthusiasm for close votes here than in other sites which launched out of beta. I know that seems to discourage me from participating more, and may disco... | 26 |
<p>I'm currently playing around with <a href="http://pear.php.net/package/HTML_QuickForm" rel="noreferrer">HTML_QuickForm</a> for generating forms in PHP. It seems kind of limited in that it's hard to insert my own javascript or customizing the display and grouping of certain elements.</p>
<p>Are there any alternativ... | <p>If you find it hard to insert Javascript into the form elements, consider using a JavaScript framework such as <a href="http://www.prototypejs.org/" rel="nofollow noreferrer">Prototype</a> or <a href="http://jquery.com/" rel="nofollow noreferrer">jQuery</a>. There, you can centralize the task of injecting event hand... | <p>I can't really say anything about it but, the other day, I ran across the <a href="http://www.phpformclass.com/page/index" rel="nofollow noreferrer">clonefish</a> form library. It looked promising enough to end up in my bookmarks list as a "look at this later".</p>
| 8,524 |
<p>I have made some prints with the Ultimaker 2+ and Ultimaker 2 Extended+. The prints are in PLA. For slicing, I use Cura and I check the support checkbox (haven't gone to advanced settings to adjust support yet). I can clearly see that there is a little space between the support and the print. The supports often look... | <p>The Ultimaker 2+ is a single extruder 3D printer. Without changing the PLA spool and PVA spool continuously during the print you practically cannot make water soluble supports on the Ultimaker 2+ which can be done on the Ultimaker 3. Note that PVA (from experience) is strange material to print, the filament is very ... | <p>PLA and ABS are hard plastics. They are not water-soluble. If you print with these materials, just snap printed support materials off and clean the interface layer with a knife and sanding.</p>
<p>To remove the support, it is best to use strong tweezers or a pair of pliers to grip and then apply some force. General... | 1,491 |
<p>I am trying to print a model that requires support material to be on the first layer, what is the best way to accomplish this? I am currently using Cura. It seems that the support material is too flaky. I have the infill for the support at around 8%</p>
| <p>I had the same problem printing a miniature just recently. As always, settings are somewhat dependent from the object you want to print, but here are some suggestions:</p>
<ul>
<li>Increase the support density: 15% (8% is very low!)</li>
<li>Support pattern: zig-zag with "connect zig-zag" option enabled (add stiff... | <p>I cannot comment on your infill percentage for supports, since I never use them. In any case, increasing the infill may well have little or no effect.</p>
<p>However, you could try two things: If your slicer includes supports when generating brims, then use brims. Otherwise, use a raft.</p>
| 796 |
<p>What is the best way to typeset a function with arguments for readibility, brevity, and accuracy? I tend to put empty parentheses after the function name like <code>func()</code>, even if there are actually arguments for the function. I have trouble including the arguments and still feeling like the paragraph is re... | <p>I usually take that approach, but if I feel like it's going to cause confusion, I'll use ellipses like: <code>myFunction(...)</code></p>
<p>I guess if I were good, I would use those <em>any</em> time I was omitting parameters from a function in text.</p>
| <p>I would simply be a little more careful with the name of my variables and parameters, most people will then be able to guess much more accurately what type of data you want to hold in it.</p>
| 2,585 |
<p>I am using the webbrowser control in winforms and discovered now that background images which I apply with css are not included in the printouts.</p>
<p>Is there a way to make the webbrowser print the background of the displayed document too?</p>
<p>Edit:
Since I wanted to do this programatically, I opted for this... | <p>If you're going to go and change an important system setting, make sure to first read the current setting and restore it when you are done.</p>
<p>I consider this <em>very bad</em> practice in the first place, but if you must do it then be kind.</p>
<pre><code>Registry.LocalMachine
</code></pre>
<p>Also, try chan... | <p>By default, the browser does not print background images at all. </p>
<p>In Firefox</p>
<pre><code>* File > Page Setup > Check Off "Print Background"
* File > Print Preview
</code></pre>
<p>In IE</p>
<pre><code>* Tools > Internet Options > Advanced > Printing
* Check Off "Print Background Image... | 7,068 |
<p>Are there any defacto standards for interfacing between common 3D printers and custom extruders or other tooling? I was thinking how it would be good to have switchable nozzle widths mounted on the same heat block and switched between using a solenoid so you could have say a 0.25 mm for surface layer and detail... | <h2>Generally: nozzles are not changed, the whole tool head is</h2>
<p>While "tool change" is easy to implement in a G-code and could be easily adapted in the firmware, there are several practical issues to hot-swapping nozzles without swapping the whole hotend assembly:</p>
<ul>
<li>The hotend is a fluid-dyn... | <p>Tool change is M06 (then some value specifying what change to occur). You will need to implement the necessary changes in the firmware to support whatever electronics is required to perform the tool change (eg stepper driver | hobby servo, mosfets to run the solenoid).
Once done, your slicer now has to do the work o... | 1,641 |
<p>I have wondered about the appropriateness of reflection in C# code. For example I have written a function which iterates through the properties of a given source object and creates a new instance of a specified type, then copies the values of properties with the same name from one to the other. I created this to cop... | <p>Sometimes using reflection can be a bit of a hack, but a lot of the time it's simply the most fantastic code tool.</p>
<p>Look at the .Net property grid - anyone who's used Visual Studio will be familiar with it. You can point it at any object and it it will produce a simple property editor. That uses reflection, i... | <p>Reflection makes it very easy to implement plugin architectures where plugin DLLs are automatically loaded at runtime (not explicitly linked at compile time).</p>
<p>These can be scanned for classes that implement/extend relevant interfaces/classes. Reflection can then be used to instantiate instances of these on ... | 7,012 |
<p>In a web interface, I've got a text field. When user enters text and accepts with enter, application performs an action.</p>
<p>I wanted to test the behavior with Selenium. Unfortunately, invoking 'keypress' with chr(13) insert representation of the character into the field.</p>
<p>Is there a way other then submit... | <p>This Java code works for me:</p>
<pre><code>selenium.keyDown(id, "\\13");
</code></pre>
<p>Notice the escape. You probably need something like chr(\13)</p>
| <p>Though I haven't tested this I imagine you can use "\r\n" appended to a string to simulate a new line. If not look for the languages equivalent to "Environment.NewLine;" ?</p>
| 9,706 |
<p>Short version: What is the cleanest and most maintainable technique for consistant presentation and AJAX function across all browsers used by both web developers and web developers' end-users?</p>
<ul>
<li>IE 6, 7, 8</li>
<li>Firefox 2, 3</li>
<li>Safari</li>
<li>Google Chrome</li>
<li>Opera</li>
</ul>
<p>Long ver... | <p>I am in a similar situation, working on a web app that is targeted at IT professionals, and required to support the same set of browsers, minus Opera.</p>
<p>Some general things I've learned so far:</p>
<ul>
<li>Test often, in as many of your target browsers as you can. Make sure you have time for this in your dev... | <p>If your very top priority is exactly consistent presentation on all the browsers listed with no disparities, you should probably be looking at AS3 and Flex.</p>
| 6,707 |
<p>I have an ASP.NET webforms application (3.5 SP1) that I'm working on, and attempting to enable gzip fpr HTML and CSS that comes down the pipe. I'm using <a href="http://www.stardeveloper.com/articles/display.html?article=2007110401&page=1" rel="nofollow noreferrer">this implementation</a> (and tried a few others... | <p>Is it only CSS files that get corrupted? Do JS files (or any other static text files) come through ok?</p>
<p>Also can you duplicate the behavior if you browse directly to the CSS file?</p>
<p>I've only enabled compression on Windows 2003 server's IIS using this approach:</p>
<ol>
<li>IIS → Web Sites → Properties... | <p>If you will be deploying on IIS 6 or IIS 7, just use the built-in IIS compression. We're using it on production sites for compressing HTML, CSS, and JavaScript with no errors. It also caches the compressed version on the server, so the compression hit is only taken once.</p>
| 4,255 |
<p>I need to implement a 4-to-1 function in Veriog. The input is 4 bits, a number from 0-15. The output is a single bit, 0 or 1. Each input gives a different output and the mapping from inputs to outputs is known, but the inputs and outputs themselves are not. I want vcs to successfully optimizing the code and also... | <p>What you have is fine. A case statement would also work equally well. It's just a matter of how expressive you wish to be. </p>
<p>Your solution, indexing, works fine if the select encodings don't have any special meaning (a memory address selector for example). If the select encodings do have some special sema... | <p>Apparently I am using a lousy synthesis tool. :-) I just synthesized both versions (just the module using a model based on fan-outs for wire delays) and the indexing version from the question gave better timing and area results than the case statements. Using Synopsys DC Z-2007.03-SP.</p>
| 6,427 |
<p>Is anyone out there using Team Foundation Server within a team that is geographically distributed? We're in the UK, trying work with a team in Australia and we're finding it quite tough.</p>
<p>Our main two issues are:</p>
<ol>
<li>Things are being checked out to us without us asking on a get latest. </li>
<li>E... | <p>Definitely upgrade to TFS 2008 and Visual Studio 2008, as it is the "v2" version of Team System in every way. Fixes lots of small and medium sized problems.</p>
<p>As for "things being randomly checked out" this is almost <em>always</em> due to Visual Studio deciding to edit files on your behalf. Try getting latest... | <p>From my understanding you can have multiple TFS Application servers in different locations. They either can both talk to the same SQL Server or you could use SQL Server mirroring. Having your own local TFS server would likely speed up your development times.</p>
| 3,220 |
<p>Navision 5.0 includes a feature to export to Word or Excel. Is it possible to make this work with OpenOffice.org Writer or Calc instead? If so, what has to be done to set it up?</p>
<p>I have been told by my Navision reseller that the feature works best with Office 2007, and export to Excel 2003 works. No mentio... | <p>I know this is an old question, but I'll add the answer just in case anyone comes here:</p>
<p>You can export directly to OpenOffice without customizations. The only thing you need is to go into Tools > Manage Style Sheets... and modify the existing StyleSheets so that they open OpenCalc and OpenWrite instead of Ex... | <p>You should be able to export the documents to word or excel and then use OpenOffice to open the documents. No additional set up required.</p>
| 7,302 |
<p>Our company is currently writing a GUI automation testing tool for compact framework applications. We have initially searched many tools but none of them was right for us. </p>
<p>By using the tool you can record test-cases and group them together to test-suites. For every test-suite there is generated an applicati... | <p>If the Automated GUI testing tool has knowledge about the framework the application is written in it could use that information to make better or more advanced scripts. <a href="http://www.automatedqa.com/products/testcomplete/index.asp" rel="nofollow noreferrer">TestComplete</a> for example knows about Borland's VC... | <p>I finally found a solution to communicate between the testing-application and the application-under-test: <a href="http://msdn.microsoft.com/en-us/magazine/cc163617.aspx" rel="nofollow noreferrer">Managed Spy</a>. It's basically a .NET application build on top of ManagedSpyLib. </p>
<p>ManagedSpyLib allows programm... | 3,924 |
<p>I'm having a problem obtaining the total row count for items displayed in a Gridview using Paging and with a LinqDataSource as the source of data.</p>
<p>I've tried several approaches:</p>
<pre><code>protected void GridDataSource_Selected(object sender, LinqDataSourceStatusEventArgs e)
{
totalLabel.Text = ... | <p>The LinqDataSourceEventArgs returned in those events return -1 on these occasions:</p>
<blockquote>
<p>-1 if the LinqDataSourceStatusEventArgs object was created during a data modification operation; -1 if you enabled customized paging by setting AutoPage to true and by setting RetrieveTotalRowCount to false. </p... | <p>The TotalRowCount property is only valid for certain values of AutoPage and AllowPaging. They should both be true (in your case) or both be false.</p>
<p>chech out the following page for an explanation of the TotalRowCount property.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.... | 4,735 |
<p>I'm trying to leverage the using block more and more these days when I have an object that implements IDisposable but one thing I have not figured out is how to catch an exception as I would in a normal try/catch/finally ... any code samples to point me in the right direction?</p>
<p>Edit: The question was modified... | <p>I don't really understand the question - you throw an exception as you normally would.
If <code>MyThing</code> implements <code>IDisposable</code>, then:</p>
<pre><code>using ( MyThing thing = new MyThing() )
{
...
throw new ApplicationException("oops");
}
</code></pre>
<p>And <code>thing.Dispose</code> wi... | <p>You need to have a try statement to catch an exception </p>
<p>Either you can use an try statement within the using block or you can use a using block in a try block </p>
<p>But you need to use a try block to catch any exceptions occuring </p>
| 5,673 |
<p>After test driving Google Chrome for 30 minutes or so, I like it, even if it seems bare-bones at the moment. The obvious way to add a few things I can't live without would be through plugins. Does anyone have any links to resources on how to get started building a plugin/addon for Chrome? Thanks.</p>
| <p><a href="http://www.mattcutts.com/blog/common-google-chrome-objections/" rel="nofollow noreferrer">Matt Cutts</a> (the Google
SEO guru) has a Q&A about chrome, and
writes about it: </p>
<blockquote>Q: But I can’t install extension X! Google Chrome is dead to me if I can’t use extension X!<br/>
A: Then you’ll... | <p>The accepted answer is out of date. A couple of useful URLs:</p>
<ul>
<li>For developers: <a href="http://developer.chrome.com/extensions/index.html" rel="nofollow">http://developer.chrome.com/extensions/index.html</a></li>
<li>For end users: <a href="https://chrome.google.com/webstore/category/home?hl=en-US" rel="... | 6,192 |
<p>I've recently been working on a beginner's project in Scala, and have a beginner question about Scala's Lists.</p>
<p>Say I have a list of tuples ( <code>List[Tuple2[String, String]]</code>, for example). Is there a convenience method to return the first occurence of a specified tuple from the List, or is it necess... | <pre>
scala> val list = List(("A", "B", 1), ("C", "D", 1), ("E", "F", 1), ("C", "D", 2), ("G", "H", 1))
list: List[(java.lang.String, java.lang.String, Int)] = List((A,B,1), (C,D,1), (E,F,1), (C,D,2), (G,H,1))
scala> list find {e => e._1 == "C" && e._2 == "D"}
res0: Option[(java.lang.String, java.lang.String, Int)] = ... | <p>You could also do this, which doesn't require knowing the field names in the Tuple2 class--it uses pattern matching instead:</p>
<pre><code>list find { case (x,y,_) => x == "C" && y == "D" }
</code></pre>
<p>"find" is good when you know you only need one; if you want to find all matching elements you co... | 7,759 |
<p>Can you cast a <code>List<int></code> to <code>List<string></code> somehow?</p>
<p>I know I could loop through and .ToString() the thing, but a cast would be awesome.</p>
<p>I'm in C# 2.0 (so no <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" rel="noreferrer">LINQ</a>).</p>
| <p>.NET 2.0 has the <code>ConvertAll</code> method where you can pass in a converter function:</p>
<pre><code>List<int> l1 = new List<int>(new int[] { 1, 2, 3 } );
List<string> l2 = l1.ConvertAll<string>(delegate(int i) { return i.ToString(); });
</code></pre>
| <p>You have to build a new list. The underlying bit representations of <code>List<int></code> and <code>List<string></code> are completely incompatible -- on a 64-bit platform, for instance, the individual members aren't even the same size.</p>
<p>It is theoretically possible to treat a <code>List<stri... | 6,673 |
<p>I was messing around with <a href="http://www.ayende.com/projects/rhino-mocks.aspx" rel="nofollow noreferrer">RhinoMocks</a> this morning and couldn't run my tests because RhinoMocks.dll was not in a "trusted location". The assembly is in my c:\documents and settings\\My Documents\Visual Studio 2008\Projects (and so... | <p>Did you download a zip file from the internet and then extract it using the standard explorer tools. I think this marks the directory as untrusted and Visual studio detects this.</p>
| <p>Right click the file or location and choose Properties. At the very bottom, you should see the button "Unblock". Click it and press OK.</p>
| 8,310 |
<p>The print is very solid except for the 4 walls.</p>
<p>From the top, I can slide a paper down to the bottom. This is ONLY between the walls, the rest of the print is solid. The filament is PLA 1.75 mm.</p>
<p>But the bottom is solid, no gaps.</p>
<p>I have checked the usual problems on Ultimaker troubleshoot... | <p>I've experienced this too, especially with flex modified PLA filament. For that, fixing underextrusion and increasing temperature made it go away. Sadly Cura has no option to overlap walls slightly (if printed in the right order, this could be done without affecting dimensional accuracy) except possibly the outer on... | <p>Look for the <strong>horizontal expansion</strong> setting in Cura. By default it should be zero. The description includes this:</p>
<blockquote>
<p>Positive values can help compensate for too big holes.</p>
</blockquote>
<p>The "holes" here includes these gaps. You can set it to something very small (ie: .01 or... | 1,358 |
<p>I have a base class that represents a database test in TestNG, and I want to specify that all classes extending from this class are of a group "db-test", however I have found that this doesn't seem possible. I have tried the @Test annotation:</p>
<pre><code>@Test(groups = { "db-test" })
public class DBTestBase {
}... | <p>The answer is through a custom <strong>org.testng.IMethodSelector</strong>:</p>
<p>Its <strong>includeMethod()</strong> can exclude any method we want, like a public not-annotated method.</p>
<p>However, to register a custom <em>Java</em> MethodSelector, you must add it to the <strong>XMLTest</strong> instance man... | <p>You can specify the @Test annotation at method level that allows for maximum flexibility.</p>
<pre><code>public class DBTestBase {
@BeforeTest(groups = "db-test")
public void beforeTest() {
System.out.println("Running before test");
}
public void method1() {
Assert.fail(); // this ... | 3,053 |
<h3>TL;DR</h3>
<p>Is it possible to build a hotend, using separate parts, sourced on eBay, from China, and still achieve a high quality print?</p>
<hr />
<p>In my opinion, the E3D V6 hotend is rather expensive, at $/£70, especially to those building to a tight budget. Now, obviously/presumably, there is some quite rigo... | <p>Hard to say for sure - my whole printer is cheap parts bought as a kit in China by a Chinese student who abandoned it in the US (I resurrected it after it was abandoned.) It includes all the parts you list, and I think we finally sorted out what the thermistor actually is so the temperatures are more accurate now.</... | <p><em>Sorry for digging up the topic, but I'd like to share my experience with cheap Chinese parts obtained from those obvious auction sites.</em></p>
<hr>
<p>For my <a href="https://www.thingiverse.com/thing:2254103" rel="nofollow noreferrer">Hypercube Evolution</a> I have ordered all parts from Chinese suppliers e... | 620 |
<p>What's the best (halting) algorithm for determining if a linked list has a cycle in it?</p>
<p>[Edit] Analysis of asymptotic complexity for both time and space would be sweet so answers can be compared better.</p>
<p>[Edit] Original question was not addressing nodes with outdegree > 1, but there's some talk about ... | <p>Have two pointers iterating through the list; make one iterate through at twice the speed of the other, and compare their positions at each step. Off the top of my head, something like:</p>
<pre><code>node* tortoise(begin), * hare(begin);
while(hare = hare->next)
{
if(hare == tortoise) { throw std::logic_er... | <p>What about using a hash table to store the already seen nodes (you look at them in order from the start of the list)? In practise, you could achieve something close to O(N).</p>
<p>Otherwise, using a sorted heap instead of a hash table would achieve O(N log(N)).</p>
| 5,444 |
<p>Is it possible for the compiler to remove statements used for debugging purposes (such as logging) from production code? The debug statements would need to be marked somehow, maybe using annotations.</p>
<p>It's easy to set a property (debug = true) and check it at each debug statement, but this can reduce performa... | <p>Two recommendations.</p>
<p><strong>First:</strong>
for real logging, use a modern logging package like log4j or java's own built in logging. Don't worry about performance so much, the logging level check is on the order of nanoseconds. (it's an integer comparison).</p>
<p>And if you have more than a single log st... | <p>To directly answer your question: I don't know.</p>
<p>But here is another solution to your problem:
In my mind, there are two statements that collide with each other here: "debug statements" and "production code". </p>
<p>What is the purpose of debug statements? Help to get rid of bugs while (unit) testing. If a ... | 5,199 |
<p>When using os.system() it's often necessary to escape filenames and other arguments passed as parameters to commands. How can I do this? Preferably something that would work on multiple operating systems/shells but in particular for bash.</p>
<p>I'm currently doing the following, but am sure there must be a libra... | <p>This is what I use:</p>
<pre><code>def shellquote(s):
return "'" + s.replace("'", "'\\''") + "'"
</code></pre>
<p>The shell will always accept a quoted filename and remove the surrounding quotes before passing it to the program in question. Notably, this avoids problems with filenames that contain spaces or an... | <p>On UNIX shells like Bash, you can use <code>shlex.quote</code> in Python 3 to escape special characters that the shell might interpret, like whitespace and the <code>*</code> character:</p>
<pre><code>import os
import shlex
os.system("rm " + shlex.quote(filename))
</code></pre>
<p>However, this is not eno... | 5,639 |
<p>One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it... </p>
<p>I know next to nothing about Unix programming.</p>
| <p>It's probably best not to try to use the Posix subsystem for Windows. It was never really complete and is just a useless marketing tick box.</p>
<p>If you're truly interested in programming stuff for Unix, download one of the many Linux distributions (ie. <a href="http://ubuntu.com" rel="nofollow noreferrer">Ubuntu... | <p>The Posix subsystem in Windows is not only incomplete, but also slower in many cases than the "native" windows functions for the same thing. This is true for I/O for example.</p>
| 3,827 |
<p>I have a build script and as part of that script it copies a jar file to a directory, for ease lets call it the utils jar. the utils jar is built by another build script sitting in another directory. What im trying to do have my build script run the utils build script so that I can ensure the utils jar is up to da... | <p>I've got something similar set up: I have a main Ant build.xml which calls a separate build.xml that takes care of building my tests. This is how I do it:</p>
<pre><code><target name="build-tests">
<subant target="build">
<fileset dir="${test.home}" includes="build.xml"/>
</subant... | <p>You can pass params down to antcall using nested in the antcall block. So, you can pass the properties down that way (probably even basedir since properties are immutable). </p>
| 3,028 |
<p>I have a fairly standards compliant XHTML+CSS site that looks great on all browsers on PC and Mac. The other day I saw it on FF3 on Linux and the letter spacing was slightly larger, throwing everything out of whack and causing unwanted wrapping and clipping of text. The CSS in question has</p>
<pre><code>font-size:... | <p>A List Apart has a pretty <a href="http://www.alistapart.com/articles/howtosizetextincss" rel="nofollow noreferrer">comprehensive article on sizing fonts in CSS</a>. Their conclusion is to use "<code>ems</code>" to size text, since it generally gives the most consistent sizing across browsers. They make no direct me... | <p>I find the easiest way to solve font sizing problems between browsers is to simply leave room for error. Make divs slightly larger or fonts slightly smaller so that platform variation doesn't change wrapping or clipping considerably.</p>
| 6,977 |
<p>If you are printing an object that has a base (A statue or trophy, for example), and presuming that you have already optimized every other setting: which shape of base would give you the best and most consistent bed adhesion when using PLA on the widest range of printers (For example, if you're putting it up on a si... | <p>From the excellent Thingiverse link, <a href="https://www.thingiverse.com/thing:4967931" rel="nofollow noreferrer">Customizable QR Keyring or Tag</a> by <a href="https://www.thingiverse.com/outwardb/designs" rel="nofollow noreferrer"><em>OutwardB</em></a> - which was provided in the (now deleted) <a href="https://3d... | <p>From the excellent Thingiverse link, <a href="https://www.thingiverse.com/thing:4967931" rel="nofollow noreferrer">Customizable QR Keyring or Tag</a> by <a href="https://www.thingiverse.com/outwardb/designs" rel="nofollow noreferrer"><em>OutwardB</em></a> - which was provided in the (now deleted) <a href="https://3d... | 2,046 |
<p>I've just started writing unit tests for a legacy code module with large physical dependencies using the #include directive. I've been dealing with them a few ways that felt overly tedious (providing empty headers to break long #include dependency lists, and using #define to prevent classes from being compiled) and ... | <p>The depression in the responses is overwhelming... But don't fear, we've got <a href="https://rads.stackoverflow.com/amzn/click/com/0131177052" rel="noreferrer" rel="nofollow noreferrer">the holy book to exorcise the demons of legacy C++ code</a>. Seriously just buy the book if you are in line for more than a week o... | <p>If you keep writing stubs/mock/fake codes you risk doing unit testing on a class that has different behavior then when compiled on the main project.</p>
<p>But if those includes are there and have no added behavior then it's Ok.</p>
<p>I'd try not changing anything on the includes while doing the unit testing so y... | 9,080 |
<p>I would like to turn the HTML generated by my CFM page into a PDF, and have the user prompted with the standard "Save As" prompt when navigating to my page.</p>
| <p>You should use the cfdocument tag (with format="PDF") to generate the PDF by placing it around the page you are generating. You'll want to specify a filename attribute, otherwise the document will just stream right to your browser.</p>
<p>After you have saved the content as a PDF, use cfheader and cfcontent in com... | <p>I'm not that familiar with ColdFusion, but what you need to do is set the Content-Type of the page when the user requests it to be application/octet-stream. This will prompt them for a download every time. </p>
<p>Hope this helps!</p>
| 9,969 |
<p>Any one know decent way to reference a SQLite database using the above mentioned tools? I tried using ODBC (the SQLite driver) but while the connection is good, I get no data returned. Like I can't see any tables in Data Connection (VS 2008). Is there a better way?</p>
<p><em>Edit: corrected typos</em></p>
| <p>Joel Lucsy: That implementation of SQLite is a mixed-mode assembly which is not supported by Silverlight. Only a pure managed implementation would work under the Silverlight CLR.</p>
| <p>You should give <a href="http://siaqodb.com/" rel="nofollow">Siaqodb</a> a try. I haven't tested it but they mention that is works with Silverlight OOB apps and even give you a tutorial <a href="http://siaqodb.com/?p=174" rel="nofollow">here</a>.<br>
It's commercial software, but a 30 day trial is available.</p>
| 2,570 |
<p>I'm trying to read binary data using C#. I have all the information about the layout of the data in the files I want to read. I'm able to read the data "chunk by chunk", i.e. getting the first 40 bytes of data converting it to a string, get the next 40 bytes.</p>
<p>Since there are at least three slightly different... | <p>The problem is the <strong>string</strong>s in your struct. I found that marshaling types like byte/short/int is not a problem; but when you need to marshal into a complex type such as a string, you need your struct to explicitly mimic an unmanaged type. You can do this with the MarshalAs attrib.</p>
<p>For your ex... | <p>Try this:</p>
<pre><code>using (FileStream stream = new FileStream(fileName, FileMode.Open))
{
BinaryFormatter formatter = new BinaryFormatter();
StructType aStruct = (StructType)formatter.Deserialize(filestream);
}
</code></pre>
| 2,452 |
<p>From my understanding, the power of heater must higher than heat dissipate to ambient air so the bed can heat up. The reason why a bed heats up too slowly is due to its heat capacity compared to heater power.</p>
<p>As the heater is a resistive load, I think we can put higher voltage to get more heating power.</p>
<... | <p>Yes, this method will work. Some (LED) power supplies have a small potentiometer that you can use to slightly adjust the voltage. On a 12 V printer, adjusting the supply from 12 V to 14 V will give a 36% increase in power.</p>
<p>Obviously there is a limit to how much you can increase the voltage. The voltage itself... | <h1>Not necessarily</h1>
<p><strong>Potential differential U</strong>, aka <em>Voltage</em> of a part, is not to be ignored: a 24 V part needs only 24 V, not 36 V. A 12 V heartbeat is only safe for 12 V. There is a little tolerance for those measurements, but rule of thumb is about 10-15% of the rated voltage, so a 12 ... | 1,824 |
<p>I have done a bit of research into this and it seems that the only way to sort a data bound combo box is to sort the data source itself (a DataTable in a DataSet in this case). </p>
<p>If that is the case then the question becomes what is the best way to sort a DataTable?</p>
<p>The combo box bindings are set in ... | <p>If you're using a DataTable, you can use the (DataTable.DefaultView) <a href="http://msdn.microsoft.com/en-us/library/system.data.dataview.sort.aspx" rel="nofollow noreferrer">DataView.Sort</a> property. For greater flexibility you can use the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.bin... | <p>Does the data need to be in a DataTable?
Using a SortedList and binding that to a combo box would be a simpler way.</p>
<p>If you need to use a DataTable you can use the Select method to retrieve a DataView and pass in a sort parameter.</p>
<pre><code>DataView dv = myDataTable.Select("filter expression", "sort");
... | 4,947 |
<p>What's the proper way to convert from a scientific notation string such as "1.234567E-06" to a floating point variable using C#?</p>
| <pre><code>Double.Parse("1.234567E-06", System.Globalization.NumberStyles.Float);
</code></pre>
| <p>Also consider using</p>
<pre><code>Double.TryParse("1.234567E-06", System.Globalization.NumberStyles.Float, out MyFloat);
</code></pre>
<p>This will ensure that <code>MyFloat</code> is set to value 0 if, for whatever reason, the conversion could not be performed. Or you could wrap the <code>Double.Parse()</code> ... | 9,022 |
<p>I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.</p>
| <p>I'm not entirely sure I understand your question, especially the bit about displaying two SPField collections. Sorry if this turns out to be the answer to a completely different question!</p>
<p>Anyway here's a quick demo walkthrough of using the MultipleLookupField in a web part.</p>
<p>Create a team site. Add a ... | <p>Hm. Works fine on mine, so let's see if we can work out how your setup is different...</p>
<p>It looks as though it's having trouble populating the control; my first guess would be that this is because the code makes so many assumptions about the lists it's talking to. Can you check that you've got a plain vanilla ... | 6,107 |
<p>Is anyone successfully using the latest 64-bit Ganymede release of Eclipse on Windows XP or Vista 64-bit?</p>
<p>Currently I run the normal Eclipse 3.4 distribution on a 32bit JDK and launch & compile my apps with a 64bit JDK. Our previous experience has been that the 64bit Eclipse distro is unstable for us, so... | <p>I'm using Eclipse with a 64bit VM. However I have to use Java 1.5, because with Java 1.6, even 1.6.0_10ea, Eclipse crashed when changing the .classpath-file. On Linux I had the same problems and could only get the 64bit Eclipse to work with 64bit Java 1.5.</p>
<p>The problem seems to be with the just in time compil... | <p>I've been successfully using it on Vista x64 for some light Java work. Nothing too involved and no extra plugins, but basic Java coding has been working without any issues. I'm using the 3.4M7 build but it looks like the <a href="http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/index.php" rel... | 2,804 |
<p>I know it is a good idea to store configuration data in app.config (e.g. database connection strings) instead of hardcoing it, even if I am writing an application just for myself. But is there a way to update the configuration data stored in app.config from the program that is using it?</p>
| <p>If you use the Settings for the project, you can mark each setting as either application or user.</p>
<p>If they're set as user, they will be stored per-user and when you call the Save method it will be updated in the config for that user.</p>
<p>Code project has a really detailed <a href="http://www.codeproject.c... | <p>app.config isn't what you want to use for user-tweakable data, as it'll be stored somewhere in Program Files (which the user shouldn't have write permissions to). Instead, settings marked with <code>a UserScopedSettingAttribute</code> will end up in a user-scoped .config file somewhere in %LocalAppData%.</p>
<p>I f... | 5,698 |
<p>My work has a financial application, written in <code>VB.NET</code> with <code>SQL</code>, that several users can be working on at the same time.</p>
<p>At some point, one user might decide to Post the batch of entries that they (and possibly other people) are currently working on.</p>
<p>Obviously, I no longer wa... | <p>If you are using Oracle you would <strong>Select for update</strong> on the rows you are locking.</p>
<p>here is an example</p>
<pre><code>SELECT address1 , city, country
FROM location
FOR UPDATE;
</code></pre>
| <p>add </p>
<pre><code>with (rowlock)
</code></pre>
<p>to your SQL query</p>
<p><a href="http://www.sql-server-performance.com/articles/per/lock_contention_nolock_rowlock_p1.aspx" rel="nofollow noreferrer">SQL Server Performance article</a></p>
<p><strong>EDIT:</strong> ok, I misunderstood the question. What you wa... | 6,808 |
<p>Ok so I am trying to print a new fusion 360 file that I converted into an STL and then into gcode using cura and I got the gcode loaded onto the SD card and mounted into my Monoprice 3D printer, Maker Select 3D Printer v2, and tried to do a print. Now here is the strange part. When I choose "print file" and then sel... | <p>Wash-away filament used for support in PLA printing is typically PVA, which is completely water soluble and may serve your purpose. It is easily 3D printed as the primary filament and attaches well to the build plate.</p>
<p>Many 3D printer filament suppliers will carry this type of support material. It is importan... | <p>ABS dissolves in acetone. Indeed actone can be used to clean up 3D prints, see <a href="https://3dprinting.stackexchange.com/questions/4235/whats-smoother-acetone-treated-pla-or-abs/">What's smoother? Acetone treated PLA or ABS</a>. PLA maybe not somuch as ABS, see the same post.</p>
<p>PLA dissolves in any chl... | 911 |
<p>Whenever I try putting the filament through the nozzle it does not go through. I have searched everywhere online and have found nothing.</p>
| <p>Many printers have a problem with inserting filament into the extruder. Cutting it at an angle is a huge help. It is also very possible that you have a cog or a bad extruder nozzle. </p>
<p>This link could be of some help: <a href="https://www.thingiverse.com/groups/prusa-i3/topic:7469" rel="nofollow noreferrer">Ex... | <p>My first step would be to cut the filament at a bit of an angle. This will help the filament enter the extruder correctly. </p>
<p>If you're still having trouble, you may have a clogged nozzle. This article by Lifewire -<a href="https://www.lifewire.com/3d-printer-extruder-nozzle-clogged-2289" rel="nofollow nore... | 570 |
<p>Typically in Arduinos, most of the 5 V outputs that have a limited amount of current (40 mA). </p>
<p>Are there any 3D printer boards, or is there even a more usual spot, where you can get a 5 V output that isn't capped by the microcontroller?</p>
<p>I know that USB 2.0 is (typically) limited to 500... | <p>Any pin that is labeled as "5 V" can supply the full amount of current. Looking at, for example, the <a href="http://domoticx.com/wp-content/uploads/2016/05/Arduino-MEGA-pinout.jpg" rel="nofollow noreferrer">Arduino MEGA pinout</a>, we can see several pins labeled in red with "5 V". These are the pins you ... | <p>Any 5 V "output" on those main boards would be used to power a USB host. This is because the electronics actually runs on 3.3 volts. It would be better to splice the input power (the 12 to 24 V) and use a buck converter to get down to your required 5 V. Select the right one, and you can have all the c... | 1,671 |
<p>I've created a little enclosure for a project in sketchup
<a href="https://i.stack.imgur.com/m8AB9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8AB9.png" alt="enter image description here" /></a></p>
<p>I then exported the .STL</p>
<p>When I open it in Creality slicer 4.8 or Cura 5.0 It looks ... | <p>PLA doesn't need a raft.</p>
<p>Try printing without a raft. If you print with a raft because of adhesion problems, solve those first. A raft is only needed for filaments that shrink a lot and/or are printing at very high temperatures.</p>
<p>If you want a raft, check the distance between raft and print object and k... | <p>In Cura, you can indeed set the height of the first layer separate from the subsequent layers. So if the first layer is printing nicely, that's a good sign. That's usually the place prints fail. There are a few settings, but here are a few things to just double check:</p>
<ul>
<li>Is your nozzle set to the right siz... | 2,177 |
<p>What's the most efficient way to convert the output of this function from a varbinary() to a a varchar()?</p>
| <p>How about this:</p>
<pre><code>master.sys.fn_varbintohexstr(@binvalue)
</code></pre>
| <p>CONVERT(varchar, @binary)</p>
| 9,909 |
<p>I'd like to mirror a triangular prism I made. However, whenever I select it I am only able to select the faces or sides.</p>
<p>Is there a way to select the whole 3D object to move or mirror it?</p>
| <p>Yes, there is a "select" tool in the toolbar next to "make". You can use select filters to select components, bodies and faces.</p>
| <p>Selecting the body in the browser will select the entire body. Clicking on the body in the viewer will only get you faces or edges. </p>
<p>A long click (click and hold) on the model will give you options on what to select. You can choose a face or body under "Depth" or choose a body or feature under "Parents." </... | 815 |
<p>I'm a 3D printing newbie, and I bought some Hatchbox PLA to start with since it is recommended by the community it seems. </p>
<p>Is there really a steep quality drop off if you go for brands that are 50% less than Hatchbox? What does that quality drop off look like?</p>
| <p>In addition to @TecTec3's answer:</p>
<h3>Parameters that define filament quality:</h3>
<ul>
<li>Diameter variance: If there is too much fluctuation in diameter, the filament might get stuck.</li>
<li>Material Quality: I had really expensive filament that was brittle and did tend to snap when it was extruded. Other ... | <p>There is no massive difference in print quality of PLA filaments unless you start going under 10 dollars US for a 1 kilo spool. The filament that I use is yoyi PLA that can be found on Amazon for about 20 bucks, this filament works really nice with my printer and it is fairly cheap. Just make sure you never use the... | 695 |
<p>We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects.</p>
<p>We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script statistic objects. Does ... | <p>It is considered best practice to auto create and auto update statistics. Sql Server will create them if it needs them. You will often see the tuning wizard generate lots of these, and you will also see people advise that you update statistics as a part of your maintenance plan, but this is not necessary and might... | <p>Statistics are too data-specific to be tooled. It would be potentially very inefficient to blindly re-create them on a data set.</p>
| 4,078 |
<p>I have an L6 phone from motorola, a usb cable to connect it to my computer, and the Tools for Phones software so I can do things like upload my own custom ringtones or download pictures from the phone's camera.</p>
<p>I have some ideas for programs I'd like to run on the phone, and it supports java, but I don't see... | <p>I've never used Morotolla's SDK but from my limited work in JME the real hook in the 3rd party tools are the emulators. Setting up a JME dev environment quickly is something that Sun got surprisingly right. Just get NetBeans with the JME pack and there is a regular emulator right in the IDE, and then you can hook in... | <p>Yeah, the act of asking the question pointed me in the direction of an answer, and I found this:<br>
<a href="https://developer.motorola.com/docstools/motodevstudio/" rel="nofollow noreferrer">https://developer.motorola.com/docstools/motodevstudio/</a><br>
I could still use some pointers from someone of what to expe... | 7,595 |
<p>I am trying to apply styles to HTML tags dynamically by reading in the value of certain HTML attributes and applying a class name based on their values. For instance, if I have:</p>
<pre><code><p height="30">
</code></pre>
<p>I want to apply a <code>class="h30"</code> to that paragraph so that I can style it... | <p>I would highly recommend using something like jquery where adding classes is trivial:</p>
<pre><code>$("#someId").addClass("newClass");
</code></pre>
<p>so in your case:</p>
<pre><code>$("p[height='30']").addClass("h30");
</code></pre>
<p>so this selects all paragraph tags where the height attribute is 30 and ad... | <p>Attributes are just properties (usually). So just try:</p>
<pre><code>for (e in ...) {
if (e.height == 30) {
e.className = "h30";
}
}
</code></pre>
<p>Or use something like jquery to simplify this kind of stuff.</p>
| 7,693 |
<p>Since debate without meaningful terms is <a href="https://stackoverflow.com/questions/24270/whats-the-point-of-oop">meaningless</a>, I figured I would point at the elephant in the room and ask: What exactly makes a language "object-oriented"? I'm not looking for a textbook answer here, but one based on your experien... | <p><a href="http://C2.Com/cgi/wiki?DefinitionsForOo" rel="noreferrer" title="Definitions for OO on Ward's WikiWikiWeb">Definitions for Object-Orientation</a> are of course a <a href="http://C2.Com/cgi/wiki?OoBestFeatures" rel="noreferrer" title="OO Best Features on Ward's WikiWikiWeb">huge can of worms</a>, but... | <p><strong>Archetype</strong></p>
<p>The ability to express real-world scenarios in code.</p>
<pre><code>foreach(House house in location.Houses)
{
foreach(Deliverable mail in new Mailbag(new Deliverable[]
{
GetLetters(),
GetPackages(),
GetAdvertisingJunk()
... | 4,876 |
<p>I have a ASP.Net website that is failing on AJAX postbacks (both with ASP.Net AJAX and a 3rd part control) in IE. FireFox works fine. If I install the website on another machine without .Net 3.5 SP1, it works as expected.</p>
<p>When it fails, Fiddler shows that I'm getting a 405 "Method Not Allowed". The form... | <p>This appears to be correct for your <em>nested</em> Foo tags:</p>
<pre><code><NewDataSet>
<Foo> <!-- Foo-Id: 0 -->
<Bar>abcd</Bar>
<Foo>efg</Foo> <!-- Foo-Id: 1, Parent-Id: 0 -->
</Foo>
<Foo> <!-- Foo-Id: 2 --... | <p>These are my observations rather than a full answer:</p>
<p>My guess (without trying to re-produce it myself) is that a couple of things may be happening as the DataSet tries to 'flatten' a hierarchical structure to a relational data structure.</p>
<p>1) thinking about the data from a relational database perspecti... | 7,494 |
<p>I'm really beginning to understand what people mean when they say that C++'s error messages are pretty terrible in regards to templates. I've seen horrendously long errors for things as simple as a function not matching its prototype.</p>
<p>Are there any tricks to deciphering these errors?</p>
<p>EDIT: I'm usin... | <p>You can try the following tool to make things more sane:</p>
<p><a href="http://www.bdsoft.com/tools/stlfilt.html" rel="noreferrer">http://www.bdsoft.com/tools/stlfilt.html</a></p>
| <p>Some compilers give better messages than others. What compiler are you using? Having said that, they are all pretty bad. C++0X will fix most of this problem (see <a href="http://en.wikipedia.org/wiki/C%2B%2B0x#Concepts" rel="nofollow noreferrer">concepts</a>), but the standard won't be released until 2009, and broad... | 7,033 |
<p>I'm writing C# code that uses the windows IP Helper API. One of the functions I'm trying to call is "<a href="http://msdn.microsoft.com/en-us/library/aa365920(VS.85).aspx" rel="nofollow noreferrer">GetBestInterface</a>" that takes a 'uint' representation of an IP. What I need is to parse a textual representation of ... | <p>MSDN <a href="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.getaddressbytes.aspx" rel="noreferrer">says</a> that IPAddress.Address property (which returns numeric representation of IP address) is obsolete and you should use <a href="http://msdn.microsoft.com/en-us/library/system.net.ipaddress.getaddre... | <p>I have never found a clean solution (i.e.: a class / method in the .NET Framework) for this problem. I guess it just isn't available except the solutions / examples you provided or Aku's example. :(</p>
| 5,742 |
<p>I printed <a href="https://www.thingiverse.com/thing:53451" rel="nofollow noreferrer">Planetary Gears</a> and the top looks great<a href="https://i.stack.imgur.com/Oq5DB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Oq5DB.jpg" alt="top"></a>
but the bottom doesn't<a href="https://i.stack.imgur.c... | <p><strong>Your nozzle is too far from your bed.</strong> The first layer isn't squished down sufficiently, resulting in these gaps. If your first layer looks like this, you should cancel your print and adjust the bed. Alternatively, you can adjust the initial height of the Z-axis in G-code (for instance, <code>G0 Z-0.... | <p><strong>@TomvanderZanden was correct</strong></p>
<p><strong>My nozzle was too far from your bed</strong> (sort of)</p>
<p>Since my printer is manually leveled I have to use a sheet of paper to check each leveling point. This means the nozzle is about 0.1mm off the bed at home. In Cura, I had <code>Initial Layer... | 634 |
<p>Ran into an “Out of Stack Space” error trying to serialize an ASP.Net AJAX Array object. </p>
<p>Here is the scenario with simplified code:</p>
<ol>
<li><p><code>Default.aspx</code></p></li>
<li><p><code>MainScript.js</code></p>
<pre><code>function getObject(){
return new Array();
}
function function1(obj){
... | <p>This problem happens because Sys.Serialization.JavaScriptSerializer can't serialize objects from others frames, but only those objects which where instantiated in the current window (which calls serialize() method). The only workaround which is known for me it's making clone of the object from other frame before cal... | <p>I have no way of testing your code right now, but it looks like a bug in JavaScriptSerializer.serialize to me. My guess is that it tries to do some kind of type checking on the array via the CLR and that it doesn't handle an empty array properly. </p>
<p>Have you tried to add an item of a serializable type to the a... | 8,102 |
<p>I'm unsure whether the following code would ensure all conditions given in Comparator's Javadoc. </p>
<pre><code>class TotalOrder<T> implements Comparator<T> {
public boolean compare(T o1, T o2) {
if (o1 == o2 || equal(o1, o2)) return 0;
int h1 = System.identityHashCode(o1);
... | <blockquote>
<p>Hey, look at what I found!</p>
<p><a href="http://gafter.blogspot.com/2007/03/compact-object-comparator.html" rel="nofollow noreferrer">http://gafter.blogspot.com/2007/03/compact-object-comparator.html</a></p>
</blockquote>
<p>Oh yes, I forgot about the IdentityHashMap (Java 6 and above only). J... | <p>I'm not really sure about the <code>System.identityHashCode(Object)</code>. That's pretty much what the <strong>==</strong> is used for. You might rather want to use the <code>Object.hashCode()</code> - it's more in parallel with <code>Object.equals(Object)</code>.</p>
| 4,797 |
<p>I'm reading lines of input on a TCP socket, similar to this:</p>
<pre><code>class Bla
def getcmd
@sock.gets unless @sock.closed?
end
def start
srv = TCPServer.new(5000)
@sock = srv.accept
while ! @sock.closed?
ans = getcmd
end
end
end
</code></pre>
<p>If the endpoint termi... | <p>You can use select to see whether you can safely gets from the socket, see following implementation of a TCPServer using this technique.</p>
<pre><code>require 'socket'
host, port = 'localhost', 7000
TCPServer.open(host, port) do |server|
while client = server.accept
readfds = true
got = nil
begin
... | <p>If you believe the <a href="http://www.ruby-doc.org/stdlib/libdoc/socket/rdoc/index.html" rel="nofollow noreferrer">rdoc</a> for ruby sockets, they don't implement <code>gets</code>. This leads me to believe gets is being provided by a higher level of abstraction (maybe the IO libraries?) and probably isn't aware of... | 8,690 |
<p>It'd be really nice to target my Windows Forms app to the .NET 3.5 SP1 <em>client</em> framework. But, right now I'm using the <code>HttpUtility.HtmlDecode</code> and <code>HttpUtility.UrlDecode</code> functions, and the MSDN documentation doesn't point to any alternatives inside of, say, System.Net or something.</p... | <p>Found today from <a href="http://10rem.net/blog/2010/04/07/encoding-decoding-uris-and-html-in-the-net-4-client-profile?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+PeteBrown-ASPNET+%28Pete+Brown%27s+Blog+%3A+ASP.NET%29" rel="noreferrer">this here little site</a> that HtmlEncode/Decode can be do... | <p>Two main ways :</p>
<ol>
<li>Deploy using the full .NET Framework</li>
<li>Write your own / 3rd party lib for these functionalities</li>
</ol>
| 5,697 |
<p>Is there a way to select a parent element based on the class of a child element in the class? The example that is relevant to me relating to HTML output by a nice menu plugin for <a href="http://drupal.org" rel="noreferrer">http://drupal.org</a>. The output renders like this: </p>
<pre><code><ul class="menu"&... | <p>Unfortunately, there's no way to do that with CSS.</p>
<p>It's not very difficult with JavaScript though:</p>
<pre><code>// JavaScript code:
document.getElementsByClassName("active")[0].parentNode;
// jQuery code:
$('.active').parent().get(0); // This would be the <a>'s parent <li>.
</code></pre>
| <p>Another thought occurred to me just now that could be a pure CSS solution. Display your active class as an absolutely positioned block and set its style to cover up the parent li.</p>
<pre><code>a.active {
position:absolute;
display:block;
width:100%;
height:100%;
top:0em;
left:0em;
background-... | 6,680 |
<p>I'd love to know if there is such a thing as a Gecko.NET ;) I mean, just like we can embed a WebView and that is an "instance" of IE7 inside any Windows Forms application (and tell it to <code>navigateto(fancy_url);</code>). I'd love to use Firefox or WebKit. </p>
<p>Anybody tried this?</p>
<p><strong>UPDATE</stro... | <p><a href="http://code.google.com/p/geckofx/" rel="noreferrer">http://code.google.com/p/geckofx/</a></p>
<p>This is a nice .NET-wrapped version of Gecko</p>
| <p>Additionally, if you find yourself using Gtk instead of Windows.Forms, there is a tarball of webkit-sharp available that allows for easy embedding of WebViews into Gtk# applications.</p>
| 4,574 |
<p>Our application is interfacing with a lot of web services these days. We have our own package that someone wrote a few years back using UTL_HTTP and it generally works, but needs some hard-coding of the SOAP envelope to work with certain systems. I would like to make it more generic, but lack experience to know how ... | <p>I have used <code>UTL_HTTP</code> which is simple and works. If you face a challenge with your own package, you can probably find a solution in one of the many wrapper packages around UTL_HTTP on the net (Google "consuming web services from pl/sql", leading you to e.g.
<a href="http://www.oracle-base.com/articles/9... | <p>Check out this <a href="https://stackoverflow.com/questions/33449/can-you-call-a-webservice-from-tsql-code">older post</a>. I have to agree with that post's #1 answer; it's hard to imagine a scenario where this could be a good design.</p>
<p>Can't you write a service, or standalone application, which would talk to... | 5,835 |
<p>As I build *nix piped commands I find that I want to see the output of one stage to verify correctness before building the next stage but I don't want to re-run each stage. Does anyone know of a program that will help with that? It would keep the output of the last stage automatically to use for any new stages. I us... | <p>Use 'tee' to copy the intermediate results out to some file as well as pass them on to the next stage of the pipe, like so:</p>
<pre><code>cat /var/log/syslog | tee /tmp/syslog.out | grep something | tee /tmp/grep.out | sed 's/foo/bar/g' | tee /tmp/sed.out | cat >>/var/log/syslog.cleaned
</code></pre>
| <p><code>tee</code>(1) is your friend. It sends its input to both the specified file and stdout. </p>
<p>Stick it between your pipes. For example:</p>
<pre><code>ls | tee /tmp/out1 | sort | tee /tmp/out2 | sed 's/foo/bar/g'
</code></pre>
| 8,921 |
<p>Problem: I have an address field from an Access database which has been converted to SQL Server 2005. This field has everything all in one field. I need to parse out the address's individual sections into their appropriate fields in a normalized table. I need to do this for approximately 4,000 records, and it needs ... | <p>I've done a lot of work on this kind of parsing. Because there are errors you won't get 100% accuracy, but there are a few things you can do to get most of the way there, and then do a visual BS test. Here's the general way to go about it. It's not code, because it's pretty academic to write it, there's no weirdness... | <p>There are data services that given a zip code will give you list of street names in that zip code.</p>
<p>Use a regex to extract Zip or City State - find the correct one or if a error get both.
pull the list of streets from a <a href="http://www.melissadata.com/lookups/zipstreet.asp" rel="nofollow noreferrer">data ... | 3,712 |
<p>I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated with sub-microsecond timing accu... | <p>Another neat tool to visualize profiling data is the <a href="http://code.google.com/p/jrfonseca/wiki/Gprof2Dot" rel="nofollow noreferrer">gprof2dot.py python script</a>.
It can be used to visualize several different formats: "This is a Python script to convert the output from prof, gprof, oprofile, Shark, AQtime, a... | <p>I've written a browser-based visualization tool, <a href="https://pypi.python.org/pypi/ProfileEye/" rel="nofollow">profile_eye</a>, which operates on the output of <a href="https://github.com/jrfonseca/gprof2dot" rel="nofollow">gprof2dot</a>.</p>
<p>gprof2dot is great at grokking many profiling-tool outputs, and do... | 7,865 |
<p>Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using <a href="http://31tools.com/cbl_activerecord/" rel="nofollow noreferrer">CBL ActiveRecord</a>, but I was wondering if there were any viable alternatives.</p>
| <p>I realize this is old, but there is an absolutely fabulous PHP Activecord library called, appropriately, PHP Activerecord. I've used it for several months and it blows away the other libraries.</p>
<p>Check it out:</p>
<p><a href="http://www.phpactiverecord.org/">http://www.phpactiverecord.org/</a></p>
| <p>Whilst not strictly ActiveRecord, <a href="http://framework.zend.com/manual/en/zend.db.table.html" rel="nofollow noreferrer">Zend_Db_Table</a>
is pretty good.</p>
| 5,883 |
<p>I am trying to be a "good" programmer and have unit tests for my ColdFusion application but haven't been able to find a code coverage tool that can tie into the test that I'm using. For those of you who do unit tests on your ColdFusion code, how have you approached this problem?</p>
| <p><a href="http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:53046" rel="nofollow noreferrer">Many</a> <a href="http://www.pbell.com/index.cfm/2006/10/20/What-is-Code-Coverage-Analysis--and-why-should-you-care" rel="nofollow noreferrer">have</a> <a href="http://coolskool.blog-city.com/what_coldfusion_too... | <p><a href="http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:53046" rel="nofollow noreferrer">Many</a> <a href="http://www.pbell.com/index.cfm/2006/10/20/What-is-Code-Coverage-Analysis--and-why-should-you-care" rel="nofollow noreferrer">have</a> <a href="http://coolskool.blog-city.com/what_coldfusion_too... | 5,049 |
<p>I am a member of all the roles (Browser, Content Manager, My Reports, Publisher, Report Builder). If I login with a Local Administrator account, I can see and use it fine. Any ideas?</p>
| <p>The first thing I would check is to make sure that your normal login is mapped to a role with the correct system-level permissions. The item-level role definitions don't make a difference for the "Report Builder" button.</p>
<p>From the browser-based report manager interface:</p>
<ul>
<li>Click "site settings"</l... | <p>Tried to do as was stated in the answer above. But didn't find "Configure system-level role definitions" as mentioned in the second bullet. Perhaps the interface has changed a little in the past 5 years.</p>
<p>Assuming you already have a browser window open where you see the report manager without the [Report Buil... | 6,154 |
<p><strong>Edit:</strong> This question was written in 2008, which was like 3 internet ages ago. If this question is still relevant to your environment, please accept my condolences. Everyone else should convert into a format <a href="https://videojs.com/html5-video-support/" rel="noreferrer">supported by your browsers... | <p>The following works for me in Firefox and Internet Explorer:</p>
<pre class="lang-html prettyprint-override"><code><object id="mediaplayer" classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=5,1,52,701" standby="loading mic... | <p>December 2020 :</p>
<ul>
<li>We have now Firefox 83.0 and Chrome 87.0</li>
<li>Internet Explorer is dead, it has been replaced by the new Chromium-based Edge 87.0</li>
<li>Silverlight is dead</li>
<li>Windows XP is dead</li>
<li>WMV is not a standard : <a href="https://www.w3schools.com/html/html_media.asp" rel="nof... | 2,263 |
<p>I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary and an IList. Is there a built-in method to do this?</p>
<p>Edited:
I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dictionaries contain the same keys ma... | <p><a href="http://msdn.microsoft.com/en-us/library/bb342073.aspx" rel="noreferrer"><code>Enumerable.SequenceEqual</code></a></p>
<blockquote>
<p>Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer(T).</p>
</blockquote>
<p>You can't directly compare the list... | <p>No, because the framework doesn't know how to compare the contents of your lists.</p>
<p>Have a look at this:</p>
<p><a href="http://blogs.msdn.com/abhinaba/archive/2005/10/11/479537.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/abhinaba/archive/2005/10/11/479537.aspx</a></p>
| 6,507 |
<pre><code>#include <stdio.h>
int main() {
unsigned long long int num = 285212672; //FYI: fits in 29 bits
int normalInt = 5;
printf("My number is %d bytes wide and its value is %ul. A normal number is %d.\n", sizeof(num), num, normalInt);
return 0;
}
</code></pre>
<p>Output:</p>
<pre><code>My nu... | <p>Use the ll (el-el) long-long modifier with the u (unsigned) conversion. (Works in windows, GNU).</p>
<pre><code>printf("%llu", 285212672);
</code></pre>
| <p>Well, one way is to compile it as x64 with VS2008</p>
<p>This runs as you would expect:</p>
<pre><code>int normalInt = 5;
unsigned long long int num=285212672;
printf(
"My number is %d bytes wide and its value is %ul.
A normal number is %d \n",
sizeof(num),
num,
normalInt);
</code></pre>
... | 2,499 |
<p>Given that indexing is so important as your data set increases in size, can someone explain how indexing works at a database-agnostic level?</p>
<p>For information on queries to index a field, check out <a href="https://stackoverflow.com/questions/1156/">How do I index a database column</a>.</p>
| <p><strong>Why is it needed?</strong></p>
<p>When data is stored on disk-based storage devices, it is stored as blocks of data. These blocks are accessed in their entirety, making them the atomic disk access operation. Disk blocks are structured in much the same way as linked lists; both contain a section for data, a p... | <p>Just think of Database Index as Index of a book.</p>
<p>If you have a book about dogs and you want to find an information about let's say, German Shepherds, you could of course flip through all the pages of the book and find what you are looking for - but this of course is time consuming and not very fast. </p>
<... | 2,354 |
<p>I had a new Extruder tip on my Ender 3 3D printer. the tip looked like the left tip in the below image. After I have been using it for about 5 months, the tip got dull/flat, like the tip on the right in the below image.</p>
<p>The only filament I have used is a spool of PLA (from hatchbox) and a spool of PETG (from... | <p>Playing around with the nozzle height will help: back it off until just before you have first layer adhesion issues. Don't jam the filament into the bed as you might for ABS. This helps with small prints. However, my experience has been that if you have a large enough continuous contact area (i.e. more than a few... | <p>Correctly level your bed. Seriously, that's the answer. PETG does stick well, but it only gets difficult to remove if you're smashing the first layer against the bed with a nozzle that's way too close. With the bed leveled properly - using feeler gauges or test prints and a sub-0.1-mm-precision caliper - I have no t... | 1,778 |
<p>Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, and be displayed on each page. I cannot set Model on my masterpage (... | <p>How about creating an HtmlHelper extension method that allows you to call a partial view result on the an action on the controller.</p>
<p>Something like</p>
<pre><code> public static void RenderPartialAction<TController>(this HtmlHelper helper, Func<TController, PartialViewResult> actionToRender)
... | <p>The ViewData Model property should only be used for the content that you're viewing/editing on the main section of the UI.</p>
<p>Other parts of the view may need some data present in ViewData, so just add those to the dictionary.</p>
<p>I'd just pass data from the dictionary like this: ViewData["articles"] to th... | 7,125 |
<p>I just installed my (v3) BLTouch with a vanilla version of Marlin (1.1.9) on my Ender 3 and everything seems to work fine (including auto home) except the probing. It repeatedly does the first three probes (successfully) but then tries the fourth and fails. Even when disabling the axis movement (X/Y stepper motors) ... | <p>Is your BL Touch a v3 (likely if you've only just purchased it)? If so, make sure you're using the bugfix version of Marlin 1.1.9, which supposedly fixes the compatibility issues. I say supposedly because there's also a capacitor on the mainboard that can be removed to fix the issue, and once I removed it (and comme... | <p>I've been through the <a href="/q/6959">same sort of issues</a> and eventually found that it was attributed by the cable and connector. Re-check or re-wire the sensor, this helped me out.</p>
| 1,371 |
<p>I have a Delphi 7 application that has two views of a document (e.g. a WYSIWYG HTML edit might have a WYSIWYG view and a source view - not my real application). They can be opened in separate windows, or docked into tabs in the main window.</p>
<p>If I open a modal dialog from one of the separate forms, the main fo... | <p>I'd use this code... (Basically what Lars said)</p>
<pre><code>dialog := TDialogForm.Create( parentForm );
dialog.PopupParent := parentForm;
dialog.PopupMode := pmExplicit;
dialog.ShowModal();
</code></pre>
| <p>First of all, I am not completely sure I follow, you might need to provide some additional details to help us understand what is happening and what the problem is. I guess I am not sure I understand exactly what you're trying to accomplish and what the problem is.</p>
<p>Second, you shouldn't need to set the dialog... | 4,186 |
<p>I am a developer. An architect on good days. Somehow I find myself also being the DBA for my small company. My background is fair in the DB arts but I have never been a full fledged DBA. My question is what do I have to do to ensure a realiable and reasonably functional database environment with as little actual... | <p>Who else is involved in the database? Are you the only person making schema changes (creating new objects, releasing new stored procedures, permissioning new users)? </p>
<ul>
<li>Make sure that the number of users doing anything that could impact performance is reduced to as close to zero as possible, ideally incl... | <p>I would suggest:</p>
<ul>
<li>A script to quickly restore the latest backup of a database, in case it gets corrupted</li>
<li>What kind of backups are you doing? Full backups each day, or incremental every hour, etc?</li>
<li>Some scripts to create new users and grant them basic access.</li>
</ul>
<p>However, the... | 5,582 |
<p>If I have a Resource bundle property file:</p>
<p>A.properties:</p>
<pre><code>thekey={0} This is a test
</code></pre>
<p>And then I have java code that loads the resource bundle:</p>
<pre><code>ResourceBundle labels = ResourceBundle.getBundle("A", currentLocale);
labels.getString("thekey");
</code></pre>
<p>Ho... | <p>The class you're looking for is java.text.MessageFormat; specifically, calling</p>
<pre><code>MessageFormat.format("{0} This {1} a test", new Object[] {"Yes!!!", "is"});
</code></pre>
<p>or</p>
<pre><code>MessageFormat.format("{0} This {1} a test", "Yes!!!", "is");
</code></pre>
<p>will return</p>
<pre><code>"Y... | <p>There is the class <a href="http://struts.apache.org/1.2.7/api/org/apache/struts/util/MessageResources.html" rel="nofollow noreferrer">org.apache.struts.util.MessageResources</a> with various methods getMessage, some of them take arguments to insert to the actual message.</p>
<p>Eg.:</p>
<pre><code>messageResource... | 9,354 |
<p>I have a foxpro app, that contains hard coded path for icons and bitmaps. That's how foxpro does it and there is no way around it. And this works fine, except that when a removable drive has been used but is not connected, and when is connected windows assigns the same letter as hard coded path, when opening any for... | <p>Nelson:</p>
<p>"That's how foxpro does it and there is no way around it"?</p>
<p>I'm using FOX since FoxPro 2.5 to Visual FoxPro 9, and you are NEVER forced in any way to hard-code a path, you can use SET PATH TO (sYourPath), you can embed the icons and bitmaps in your EXE / APP file and therefore there's no need ... | <p>I agree with @PabloG - it's been over a decade since I worked with FoxPro (Dos & Windows) but even back in FPW2.6 you could determine where your app was running 'from', set absolute or relative search paths and even bundle your resources straight into the "compiled" (heh) exe. All of our resources lived in a spe... | 8,037 |
<p>Specifically this is regarding when using a client session cookie to identify a session on the server.</p>
<p>Is the best answer to use SSL/HTTPS encryption for the entire web site, and you have the best guarantee that no man in the middle attacks will be able to sniff an existing client session cookie?</p>
<p>And... | <p>Encrypting the session value will have zero effect. The session cookie is already an arbitrary value, encrypting it will just generate another arbitrary value that can be sniffed.</p>
<p>The only real solution is HTTPS. If you don't want to do SSL on your whole site (maybe you have performance concerns), you might ... | <p>Protect by:</p>
<pre><code>$ip=$_SERVER['REMOTE_ADDER'];
$_SESSEION['ip']=$ip;
</code></pre>
| 4,290 |
<p>I want to be able to control my FLSUN QQ over Wi-Fi and don't have OctoPrint or a Raspberry Pi to run it on.</p>
| <p>Assuming you use Ultimaker Cura to slice, there is a MKS plugin that allows connecting to the MKS WiFi module that comes with the QQ. Just follow these steps:</p>
<p><strong>Install the MKS WiFi Plugin</strong></p>
<ol>
<li>Open Cura</li>
<li>Click "Marketplace" in top right</li>
<li>Select "Plugins"</li>
<li>Scro... | <p>As the auto-install from the Marketplace described in <a href="https://3dprinting.stackexchange.com/a/13753">this answer</a> wasn't working , I did have to manually install the MKS WiFi plugin on my Mac (M1 MBPro). To do this I just:</p>
<ol>
<li>Downloaded the GitHub files (from the plugin webpage, linked in the M... | 1,675 |
<p>By "generate", I mean auto-generation of the code necessary for a particular selected (set of) variable(s).</p>
<p>But any more explicit explication or comment on good practice is welcome.</p>
| <p>Rather than using <kbd>Ctrl</kbd> + <kbd>K</kbd>, <kbd>X</kbd> you can also just type <code>prop</code> and then hit <kbd>Tab</kbd> twice.</p>
| <p>You just simply press <kbd>Alt</kbd> + <kbd>Ins</kbd> in Android Studio. </p>
<p>After declaring variables, you will get the getters and setters in the generated code.</p>
| 2,514 |
<p>What is the best way to handle user account management in a system, without having your employees who have access to a database, to have access to the accounts.</p>
<p>Examples:</p>
<ol>
<li><p>Storing username/password in the database. This is a bad idea because anyone that has access to a database can see the u... | <blockquote>
<p>This is a better method, but the account can be accessed by replacing the password hash in the database with the hash of another account that you know the auth info for.</p>
</blockquote>
<p>There's really no way around this. Anyone who as write access to the password file has complete control of th... | <p>You could store the <em>salt</em> for the hashed password in another table, of course each user would have their own salt. You could then limit access to that table.</p>
| 8,574 |
<p>I've been trying to print anything for the past few days. Every time I go to print something the printer stops pushing plastic out and usually the motor makes a knocking sound.</p>
<p>My original thought was that my E-steps were off (because they were) but I solved that and I still have a problem. Then I noticed th... | <p>A knocking or clicking sound does not imply you <strong>have a problem</strong>, it implies that you <strong>could have a problem</strong>; it can be the characteristic of the extruder. </p>
<hr>
<p><em>My own designed 2.85 mm filament, 1:4 speed reducing <a href="https://www.thingiverse.com/thing:2897762" re... | <p>I had a bad connection at my motor that was causing the problem. I soldered direct to the motor and no more problems.</p>
| 1,559 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.