instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I'm migrating a Hibernate application's cache from EHCache to JBoss TreeCache.
I'm trying to find how to configure the equivalent to maxElementsOnDisk to limit the cache size on disk, but I couldn't find anything similar to configure in a FileCacheLoader with passivation activated.</p>
<p>Thanks</p>
| <p><a href="http://www.junlu.com/msg/179368.html" rel="nofollow noreferrer">This page</a> seems to imply that the correct configuration element is:</p>
<pre><code><attribute name="MaxCapacity">20000</attribute></code></pre>
<p>However, I've only ever used EHCache myself.</p>
| <p>In the version I am working on (JBossCache 1.4.1), it looks like it is not possible to configure this parameter.</p>
| 8,386 |
<p>I've moved from TFS to SVN (TortoiseSVN) with my current company. I really miss the "Shelve" feature of TFS. I've read various articles on how to "Shelve" with SVN, but I've read nothing that gives a very simple experience to "shelve" work.</p>
<p>Ideally, I'd like extra items added to the TortoiseSVN context menu ... | <p>I don't believe that SVN has this feature built into the server product. I also don't believe anything like this emulated in any clients that I have used, including TortoiseSVN.</p>
<p>To get around this problem, I have resorted to using a DVCS such as <a href="http://git.or.cz/" rel="nofollow noreferrer">Git</a> o... | <h2>Support Feature</h2>
<p>SVN supports for shelves is <strong>experimental</strong> means, it doesn't promise backward compatibility for future releases, either its disabled by default.</p>
<p>it has been <a href="https://subversion.apache.org/docs/release-notes/1.10.html#shelving" rel="nofollow noreferrer">started w... | 2,994 |
<p>This might be a dumb question, but can a 60 watt heater be used on a 40 watt unit?</p>
<p>Simply put, I was wrong in thinking that more power was simply stuffed into the same dimensions.</p>
<p>It extends about 5 millimeters beyond my heating block. Can it be used in general or will it lead to some consequences?</p>... | <p>I'd expect the heater sticking out as pictured to cause problems -- the exposed part of the heater will tend to overheat (it's not conducting heat away into the heat block) and isn't protected by the thermistor and software PID acting as a smart thermostat.</p>
<p>It <em>might</em> be possible to install the heater ... | <p>One simple consequence is that you're going to have a hard time finding a sock that fits properly. If you cut one, or have one that has a hole where the heater protrudes, it will physically fit but then not do its job preventing radiative/convective heat loss and transfer to your printed part, or preventing stray ma... | 2,093 |
<p>I am interested in choosing a good structure for an online message board-type application. I will use SO as an example, as I think it's an example that we are all familiar with, but my question is more general; it is about how to achieve the right balance between organization and flexibility in online message board... | <p>The real problem with subforums comes when you guess wrong about which topics have enough interest to get their own subforums. While some topics end up with their own vibrant subcommunities others end up as empty ghettos, with little activity or feeling of community. Topics that might flourish as occasional subjec... | <p>Though I think that tagging is supperior to grouping, people tend to think hierarchically.
In general it depends on the target group for the forum. </p>
<p>Maybe you can go with a mixture: use tagging and later use tag groups to order to posts. Delicious uses this, for example, and I find it rather helpful.</p>
| 7,079 |
<p>How can you implement trackbacks on a custom-coded blog (written in C#)?</p>
| <p>The TrackBack specification was created by Six Apart back in the day for their <a href="http://www.movabletype.org/" rel="nofollow noreferrer">Movable Type</a> blogging system. After some corporate changes it seems to be no longer available, but here's an archived version:</p>
<p><a href="http://web.archive.org/web... | <p>If you're custom coding your own blog you have too much time on your hands. Start with something like <a href="http://www.dasblog.info/" rel="nofollow noreferrer">dasBlog</a> or <a href="http://subtextproject.com/" rel="nofollow noreferrer">SubText</a> and customize that to your needs. Then you get trackbacks for ... | 5,321 |
<p>I am working with a PC based automation software package called Think'n'Do created by <a href="http://www.phoenixcontact.com" rel="nofollow noreferrer">Phoenix Contact</a> It does real time processing, read inputs/ control logic / write outputs all done in a maximum of 50ms. We have an OPC server that is reading/wri... | <p>It depends on how you have your OPC client configured to pull data. When you subscribe to a group in OPC, you get to specify a refresh rate. This might default to 1s or even 5s, depending on the OPC client. There's also a limit the OPC server might put on the frequency of updated data. This only applies if you h... | <p>Here are a few places to look: OPC Client configuration, OPC Client itself, OPC Server, or the PLC itself. </p>
<p>Here are things you should check:</p>
<ol>
<li>OPC Client configuration - The OPC Group you've added the OPC tags to should have a fast scan rate (ie. 100 ms to 1 sec depending on what you use it for... | 6,118 |
<p>I used the jQuery Form plugin for asynchronous form submission. For forms that contain files, it copies the form to a hidden iframe, submits it, and copies back the iframe's contents. The problem is that I can't figure out how to find what HTTP status code was returned by the server. For example, if the server retur... | <p>You can't get page headers by JS, but you can distinguish error from success:
Try something like this:</p>
<pre><code><script type="text/javascript">
var uploadStarted = false;
function OnUploadStart(){
uploadStarted = true;
}
function OnUploadComplete(state,message){ ... | <p>You can't retrieving HTTP status code from loaded "iframe" directly.
But when an http error occured, the server will returned nothing to the "iframe".
So the iframe has not content.
you can check the iframe body, when the body of iframe is blank, use ajax with the same url to get the response from server. Then you c... | 5,569 |
<p>One of the problems I have come across having complex tasks on the browser is with automatic timeouts.</p>
<p>Currently our site has a sliding expiration of 30 minutes. Normally, this isn't a problem because we use asp.net and most of the time the users update one or two fields and then submit the form. This obviou... | <p>We recently went through this in my organization. Although it is not the best solution, and hitting the right session across multiple browser windows is rough, we put a countdown timer on our page, included a button that just went back and hit the server to restart the session, and also provided the user with a Jav... | <p>Ah, the age old problem of not wanting to increase the session time because of higher memory usage. </p>
<p>One answer is to also set a cookie that expires after more like a day that will tell the system to still remember the user. That's what eBay does, among others.</p>
| 6,854 |
<p>I obtained the following wire 22 Gauge Stranded Hookup Wire from Radio Shack:</p>
<pre><code>Type/Style: AWM/1007
Wire Gauge: 22 AWG
Insulation Thickness: AVE. 0.42 mm
Rated Voltage: 300V
Temperature Rating: 80°C / 176°F
</code></pre>
<blockquote>
<p>Use Limitation: Internal wiring of appliances; or where ex... | <p>22awg wiring is good for a max of 7A in this usage case. Your power supply can provide 30A. So it is definitely not large enough wire gauge for good wiring practice -- in the event of a short, you want the PSU's over-current protection to kick in before the wiring overheats. That would mean 14ga between the PSU and ... | <p>That should be fine for powering RAMPS, steppers and extruders but it is on the thin side. To err on the side of caution you should use somewhat ticker wires. However, you should definitely use thicker wires for the heated bed connection.</p>
| 234 |
<p>For my acceptance testing I'm writing text into the auto complete extender and I need to click on the populated list.</p>
<p>In order to populate the list I have to use AppendText instead of TypeText, otherwise the textbox looses focus before the list is populated.</p>
<p>Now my problem is when I try to click on t... | <p>The best solution (if we're talking .NET) seem to be to use WCF and streaming http. The client makes the first http connection to the server at port 80, the connection is then kept open with a streaming response that never ends. (And if it does it reconnects).</p>
<p>Here's a sample that demonstrates this: <a href=... | <p>I would go with XML. XML is widely supported on all platforms and has lots of libraries and tools available for it. And since it's text, there are no issues when you pass it between platforms.</p>
<p>I know JSON is another alternative, but I'm not familiar enough with it to know whether or not to recommend it in ... | 7,368 |
<p>The <a href="http://msdn.microsoft.com/en-us/library/y23b5415.aspx" rel="nofollow noreferrer">official guidelines</a> suggest that there can be very few practical uses for these. Does anyone have examples of where they've put them to good use?</p>
| <p>Au Contrare... you'll find C/C++ people flocking to structs a.k.a. value types.<br>
An example would be data packets. If you have a large number of data packets to transfer/transmit, you'd use value structs to model your data packets.<br>
reason: Turning something into a class adds an overhead of (approx 8-16 Bytes ... | <p>Enums are first class citizens of .NET world. As for structures I found that in most cases classes can be used, however for memory-intense scenarios consider using structures. As a practical example I used structures as data structures for OSCAR (ICQ) protocols primitives.</p>
| 5,877 |
<p>I've played around with GTK, TK, wxPython, Cocoa, curses and others. They are are fairly horrible to use.. GTK/TK/wx/curses all seem to basically be direct-ports of the appropriate C libraries, and Cocoa basically mandates using both PyObjC and Interface Builder, both of which I dislike..</p>
<p>The Shoes GUI libra... | <p>Have you looked at <a href="http://qt.io" rel="nofollow noreferrer">Qt</a>/<a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro" rel="nofollow noreferrer">PyQt</a>? Although PyQt <em>is</em> a direct port from the C++ library, I find it much more pythonic and nice to program with compared to the others y... | <p>I've used <a href="http://glade.gnome.org/" rel="nofollow noreferrer">Glade</a> with some success, though I didn't manage to wrap my head around creating anything really complex. It has a nice GUI builder and stores the forms as xml files that are loaded dynamically. Kind of like XAML afiak.</p>
| 5,652 |
<p>How do you stop the "Default SMTP Virtual Server" from sending bounce messages for email addresses that you don't have?</p>
<p>i.e. I'm using IIS' SMTP server to handle my email and if an email is sent unknown at mydomain.com a bounce email with 'address not known' (or something like that) is sent back to the sende... | <p>I found this <a href="http://isorecorder.alexfeinman.com/catchall.htm" rel="nofollow noreferrer">article</a> which has a script you can run to configure a catch-all account on your server. All emails which would generate a NDR will instead be directed to this account. Sorry, I haven't tested it. The article above... | <p>This isn't an IIS failure. The SMTP server receiving the message is looking for a valid email address, and when it doesn't find one, sends an email back to your email address saying that there isn't one there. The only way to have it silently fail is by putting the from address as a bogus email like no-reply@compan... | 8,384 |
<p>How much less libraries are there for Mono than for Java?</p>
<p>I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of</p>
<ul>
<li>performance (for example, I'm told Java is good for threading, and I hear the r... | <p>Well....Java is actually more portable. Mono isn't implemented everywhere, and it lags behind the Microsoft implementation significantly. The Java SDK seems to stay in better sync across platforms (and it works on more platforms). </p>
<p>I'd also say Java has more tool availability across all those platforms, a... | <p>There are other language choices too. I've become quite fond of Python, which works well on Windows, Linux, and Mac, and has a rich set of libraries.</p>
| 8,680 |
<p>I just bought new eSUN PETg filament. When I started to extrude it, I heard popping sound same as moisture boiling out of it. I don't expect new eSUN vaccum sealed filament having moisture content. Is there any problem with my e3d v6? Is it possible that due to old filament, moisture is residing inside my extruder a... | <p>The extruder can't hold much water and transport it to the melt zone. Filament can. The printer behaves like the filament is wet, so try drying it. </p>
<p>Try putting the filament in your electric oven at the lowest temperature (often 170 °F to 180 °F) for an hour and see if the behavior impro... | <p>eSun has had quality problems recently (mid 2020), when they switched from the screw together clear reels to the molded black reels. I got an unprintable roll of PLA that was wet and brittle, others reported similar issues. This is theorized to have coincided with them moving production to Vietnam.</p>
<p>Try to dry... | 1,565 |
<p>I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is <a href="http://www.gnu.org/licenses/gpl-faq.html" rel="noreferrer">what the FSF has to say</a> on the issue:</p>
<blockquote>
<p><strong>If a program released under the GPL uses pl... | <blockquote>
<p>he distinction between fork/exec and dynamic linking, besides being kind of artificial,</p>
</blockquote>
<p>I don't think its artificial at all. Basically they are just making the division based upon the level of integration. If the program has "plugins" which are essentially fire and forget with ... | <p>How much info are you sharing between the Plugins and the main program? If you are doing anything more than just executing them and waiting for the results (sharing no data between the program and the plugin in the process) then you could most likely get away with them being proprietary, otherwise they would probabl... | 5,135 |
<blockquote>
<p>CREATE DATABASE permission denied in database 'master'.
An attempt to attach an auto-named database for file
C:\Documents and Settings\..\App_Data\HelloWorld.mdf failed.
A database with the same name exists, or specified file cannot be
opened, or it is located on UNC share.</p>
</blockquote>... | <p>Generally the user that you are using to run the SQL Server service will not have access to your personal user folders, that is why you're getting the error. You either need to change the credentials used for the service, or move the database to another folder, which did the trick in your case.</p>
| <p>Yes, a previous attachment wasn't unattached properly, or it was attached manually. Go in to Management Studio connect to the database, and disconnect the long database name that looks like a file path. Then try again it should work.</p>
| 3,564 |
<p>I have a table in a MySql database that stores user accounts. One of the columns, expires, stores an expiration date but defaults to NULL. I need to be able to remove an expiration date and set it back to the default value.</p>
<p>Currently, all of my CRUD routines are written using MySqlCommand with parameters. Ca... | <p>The problem was DBNull, doing:</p>
<pre><code>command.Parameters.AddWithValue("@parameter", null);
</code></pre>
<p>compiles OK.</p>
| <p>It's not clear what conditions you're talking about. If you want to set column to default value, you can use <a href="http://msdn.microsoft.com/en-us/library/system.dbnull.value.aspx" rel="nofollow noreferrer">DbNull.Value</a>;</p>
<pre><code>command.AddWithValue("@param", DbNull.Value);
or
command.Parameters.Add... | 7,424 |
<p>Are there any tools that will spider an asp.net website and create a static site?</p>
| <p><a href="http://www.httrack.com/" rel="nofollow noreferrer">http://www.httrack.com/</a><br>
Have used for this purpose a few times, may need to do a little tidying up of urls, and some css linked images might not make it, depends on how good a job you want to do.<br>
If you have dreamweaver, you can use that to mana... | <p>Another solution is <a href="http://www.devarticles.com/c/a/Web-Services/Website-Mirroring-With-wget/1/" rel="nofollow noreferrer">wget</a>.</p>
| 6,629 |
<p>I have a method that where I want to redirect the user back to a login page located at the root of my web application.</p>
<p>I'm using the following code:</p>
<pre><code>Response.Redirect("~/Login.aspx?ReturnPath=" + Request.Url.ToString());
</code></pre>
<p>This doesn't work though. My assumption was that ASP.... | <blockquote>
<p>I think you need to drop the "~/" and replace it with just "/", I believe / is the root</p>
</blockquote>
<p><strong>STOP RIGHT THERE!</strong> :-) unless you want to hardcode your web app so that it can only be installed at the root of a web site. </p>
<p>"~/" <strong><em>is</em></strong> the corre... | <p>What about using</p>
<pre><code>Response.Redirect(String.Format("http://{0}/Login.aspx?ReturnPath={1}", Request.ServerVariables["SERVER_NAME"], Request.Url.ToString()));
</code></pre>
| 5,112 |
<p>Are there any official naming conventions for tag names on Stack Exchange? And if not, how should tags be named?</p>
<p>From what I understand, one typically adds a <em>dash</em> (-) where you normally would leave a <em>space</em>, but how about tags that derive from words that are <em><a href="https://3dprinting.m... | <p>Looking at other SE sites, the most common approach seems to make everything lowercase (including names and trademarks) and using hyphens whenever there would be a space or hyphen in normal usage.</p>
<p>As such:</p>
<ul>
<li><p>MatterControl becomes mattercontrol</p></li>
<li><p>Makerbot becomes makerbot</p></li>... | <p>I would say we could use synonyms to stay with clear tag namespace.In this case we apply following pattern (especially for proper name (product name)):</p>
<pre><code>Topic | Existing tag | Synonym?
---------------+-----------------+--------------
MatterControl | mattercontrol | matter-control
</code... | 29 |
<p>As moving the endstop upwards reduces the range of the z-axis, I was wondering whether it reduces the maximum height of the printable object, by the distance the endstop was moved. Or is this somehow (to a certain extent) beeing counterbalanced?</p>
<p>(Follow-up question of <a href="https://3dprinting.stackexchang... | <p>If you move up the end stop such that it raises the nozzle with respect to the build platform you lose height, so basically the answer is yes. But, as seen in your referenced question, your nozzle location is determined by the mechanical layout of the printer and the end stop had to be raised in order to print at al... | <p>After adjusting the endstop check that the documented maximum height (150mm) is still achievable. Just move Z axis in the menu.</p>
| 1,078 |
<p>I know in certain circumstances, such as long running processes, it is important to lock ASP.NET cache in order to avoid subsequent requests by another user for that resource from executing the long process again instead of hitting the cache.</p>
<p>What is the best way in c# to implement cache locking in ASP.NET? ... | <p>Here's the basic pattern:</p>
<ul>
<li>Check the cache for the value, return if its available</li>
<li>If the value is not in the cache, then implement a lock</li>
<li>Inside the lock, check the cache again, you might have been blocked</li>
<li>Perform the value look up and cache it</li>
<li>Release the lock</li>
<... | <p>This article from CodeGuru explains various cache locking scenarios as well as some best practices for ASP.NET cache locking:</p>
<p><a href="http://www.codeguru.com/csharp/.net/net_asp/article.php/c5363/" rel="nofollow noreferrer">Synchronizing Cache Access in ASP.NET</a></p>
| 6,018 |
<p>So basically I've been having a problem with my Micro+.
It will not level / calibrate itself and I can't fix it. The reason I'm here is that I've been using Cura, and somehow it destroyed my bed. (See image)</p>
<p><a href="https://i.stack.imgur.com/Qe8cA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgu... | <p>In general I would use <a href="https://github.com/rcarlyle/StepperSim" rel="nofollow noreferrer">https://github.com/rcarlyle/StepperSim</a> which takes into account more parameters.</p>
<p>You can play with voltage and current to see which combination gives you the best results for your motor.</p>
<p>Or you can cha... | <p>I was considering buying a Fl3xdrive but had this exact fear, that the speed (rotation) required for retractions was too much.</p>
<p>I stumbled upon this post while looking for a project for a step-up gearbox. I found a <a href="https://www.thingiverse.com/thing:3714978" rel="nofollow noreferrer">Nema 17 Gearbox &q... | 1,895 |
<p>I recently switched to a RAMPS 1.4 on an Arduino Mega 2560.
Ever since I have extruder temperature swings a couple of minutes into the print, but it looks like a problem reading the temp rather than actual fluctuations in the temperature (as can be seen in the attached pic).
Also, I've noticed that the MOSFET is get... | <p>For the overheating, you may need to turn the juice down a little on your Power Supply. Typically, there is a potentiometer inside that trims the voltage level coming from there. Some things can heat up if it's over-volting and needing to drop more voltage for the board.</p>
<p>For the temperature reading stuff, ma... | <p>For the really hot mosfet I would say it might be a good idea to get one of those external mosfet module boards. It just seems like a good idea to me, to not have the huge current of the bed-heater flowing through the ramps board. And for the thermistor wires, do you have them twisted together? If not, try tightly t... | 706 |
<p>It seems like there should be something shorter than this:</p>
<pre><code>private string LoadFromFile(string path)
{
try
{
string fileContents;
using(StreamReader rdr = File.OpenText(path))
{
fileContents = rdr.ReadToEnd();
}
return fileContents;
}
catch
... | <p>First of all, the title asks for "how to write the contents of strnig to a text file"
but your code example is for "how to read the contents of a text file to a string.</p>
<p>Answer to both questions:</p>
<pre><code>using System.IO;
...
string filename = "C:/example.txt";
string content = File.ReadAllText(filenam... | <p>File.ReadAllText() maybe?</p>
<p>ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/fxref_mscorlib/html/4803f846-3d8a-de8a-18eb-32cfcd038f76.htm if you have VS2008's help installed.</p>
| 6,373 |
<p>At the moment my code (PHP) has too many SQL queries in it. eg...</p>
<pre><code>// not a real example, but you get the idea...
$results = $db->GetResults("SELECT * FROM sometable WHERE iUser=$userid");
if ($results) {
// Do something
}
</code></pre>
<p>I am looking into using stored procedures to reduce th... | <p>The best course of action for you will depend on how you are approaching your data access. There are three approaches you can take:</p>
<ul>
<li>Use stored procedures</li>
<li>Keep the queries in the code (but put all your queries into functions and fix everything to use PDO for parameters, as mentioned earlier)</l... | <p><a href="https://stackoverflow.com/questions/22278/whats-a-good-way-to-encapsulate-data-access-with-phpmysql">This other question</a> also has some useful links in it...</p>
| 5,858 |
<p>I sadly have a big problem since a couple of weeks and I cant fix it myself. For over 20 prints, I had the same problems: At the <strong>start, everything goes well</strong> but at some point of time, my Creality CR-10 starts <strong>under extruding and</strong> after like 1 minute, <strong>NO filament is extruded a... | <p>Grinding is due to attempts to advance filament faster than it can be melted and dispensed. Try one or more of the following:</p>
<ul>
<li>Raise the head temperature (to meet current throughput demand)</li>
<li>Lower the print speed (to reduce throughput demand)</li>
<li>Slice for thinner layers (to reduce throughp... | <p>A 0.27 mm layer height is not correct for any printer, any nozzle/hotend, any file, and should never be used as a layer height variable for any FDM printer.</p>
<p>Layer height should be a factor of the diameter of your nozzle size. i.e. Your nozzle is 0.4 mm, so depending on your printer, your range of resolutions/... | 1,015 |
<p>I have an object in a multi-threaded environment that maintains a collection of information, e.g.:</p>
<pre><code>public IList<string> Data
{
get
{
return data;
}
}
</code></pre>
<p>I currently have <code>return data;</code> wrapped by a <code>ReaderWriterLockSlim</code> to protect the ... | <p>If your underlying data is stored as list you can use <a href="http://msdn.microsoft.com/en-us/library/e78dcd75.aspx" rel="noreferrer">List(T).AsReadOnly</a> method.<br>
If your data can be enumerated, you can use <a href="http://msdn.microsoft.com/en-us/library/bb342261.aspx" rel="noreferrer">Enumerable.ToList</a> ... | <p>One should note that <a href="https://stackoverflow.com/questions/55502/return-collection-as-read-only#55507">aku</a>'s answer will only protect the list as being read only. Elements in the list are still very writable. I don't know if there is any way of protecting non-atomic elements without cloning them before ... | 7,928 |
<p>Considering this code, can I be <em>absolutely sure</em> that the <code>finally</code> block always executes, no matter what <code>something()</code> is?</p>
<pre><code>try {
something();
return success;
}
catch (Exception e) {
return failure;
}
finally {
System.out.println("I don't... | <p>Yes, <code>finally</code> will be called after the execution of the <code>try</code> or <code>catch</code> code blocks.</p>
<p>The only times <code>finally</code> won't be called are:</p>
<ol>
<li>If you invoke <code>System.exit()</code></li>
<li>If you invoke <code>Runtime.getRuntime().halt(exitStatus)</code></li... | <p>I am terribly late to answer here, but I am surprised that no one mentioned the Java debugger option to drop a stack frame. I am a heavy user of this feature in IntelliJ. (I am <em>sure</em> Eclipse and NetBeans has support for the same feature.)</p>
<p>If I drop stack frame from a the try or catch block that is f... | 9,074 |
<p>Let's say I have the following simple table variable:</p>
<pre><code>declare @databases table
(
DatabaseID int,
Name varchar(15),
Server varchar(15)
)
-- insert a bunch rows into @databases
</code></pre>
<p>Is declaring and using a cursor my only option if I wanted to iterate through ... | <p>First of all you should be absolutely sure you need to iterate through each row — set based operations will perform faster in every case I can think of and will normally use simpler code.</p>
<p>Depending on your data it may be possible to loop using just <code>SELECT</code> statements as shown below:</p>
<pre><co... | <p>This is the code that I am using 2008 R2. This code that I am using is to build indexes on key fields (SSNO & EMPR_NO) n all tales</p>
<pre><code>if object_ID('tempdb..#a')is not NULL drop table #a
select 'IF EXISTS (SELECT name FROM sysindexes WHERE name ='+CHAR(39)+''+'IDX_'+COLUMN_NAME+'_'+SUBSTRING(table_n... | 8,731 |
<p>Is there an easy way to avoid dealing with text encoding problems?</p>
| <p>You can't really avoid dealing with the text encoding issues, but there are existing solutions in Apache Commons:</p>
<ul>
<li><code>Reader</code> to <code>InputStream</code>: <a href="https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/input/ReaderInputStream.html" rel="noreferr... | <p>For Reading a string in a stream using just what java supplies.</p>
<pre><code>InputStream s = new BufferedInputStream( new ReaderInputStream( new StringReader("a string")));
</code></pre>
| 8,761 |
<p>OK here's some background of the problem:</p>
<p>Symptoms:</p>
<ul>
<li><p>All retracts on the extruder produce a screeching noise. The extruder extrudes normally all other times.</p>
</li>
<li><p>Any fast move on the Z-axis also produces a screeching noise and the Z-axis will move normally at all other times.</p>
<... | <p>If you have an empty spool of the same brand, you could weigh the empty spool and the one you're trying to "measure" to get an approximate weight of the remaining filament. Divide by the (presumably available from manufacturer) weight per meter to get a rough length in meters, if that's more useful to you... | <p>Besides using the window on a spool that estimates the amount of filament left, I've used large calipers to measure the diameter of an empty spool and the diameter of the filament left on the spool.</p>
| 2,110 |
<p>I've currently got a set of reports with a number of common functions sitting in code blocks within the .rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different reports to share a library of common code?</p>
<p>Ideally I'd like to have a .Net Assembly a... | <p>From within Visual Studio in the properties of the report, on the 'References' tab add the details for the assembly that contains the managed code. This code can be called from expressions within reports using the instance name that is specified.</p>
<p>This assembly can either be stored in the GAC or the PrivateAs... | <p>You must deploy to the GAC.
<a href="http://www.developerdotstar.com/community/node/333" rel="nofollow noreferrer">http://www.developerdotstar.com/community/node/333</a></p>
| 9,700 |
<p>I created a C++ console app and just want to capture the cout/cerr statements in the Output Window within the Visual Studio 2005 IDE. I'm sure this is just a setting that I'm missing. Can anyone point me in the right direction?</p>
| <p>I've finally implemented this, so I want to share it with you:</p>
<pre><code>#include <vector>
#include <iostream>
#include <windows.h>
#include <boost/iostreams/stream.hpp>
#include <boost/iostreams/tee.hpp>
using namespace std;
namespace io = boost::iostreams;
struct DebugSink
{
... | <p>Also, depending on your intentions, and what libraries you are using, you may want to use the <a href="http://msdn.microsoft.com/en-us/library/4wyz8787(VS.80).aspx" rel="nofollow noreferrer">TRACE macro</a> (<a href="http://en.wikipedia.org/wiki/Microsoft_Foundation_Class_Library" rel="nofollow noreferrer">MFC</a>) ... | 9,895 |
<p>I really enjoyed <a href="http://www.codinghorror.com/blog/archives/001148.html" rel="noreferrer">Jeff's post</a> on <a href="http://ssdl-wiki.cs.technion.ac.il/wiki/index.php/Spartan_programming" rel="noreferrer">Spartan Programming</a>. I agree that code like that is a joy to read. Unfortunately, I'm not so sure i... | <p>In <strong>The Pragmatic Programmer</strong> Hunt and Thomas talk about a study they term the Law of Demeter and it focuses on the coupling of functions to modules other than there own. By allowing a function to never reach a 3rd level in it's coupling you significantly reduce the number of errors and increase the ... | <p>Maintainability, and with it, readability, is king. Luckily, shorter very often means more readable.</p>
<p>Here are a few tips I enjoy using to slice and dice code:</p>
<ul>
<li><strong>Variable names</strong>: how would you describe this variable to someone else on your team? You would <em>not</em> say "the nu... | 7,399 |
<p>Cura has a layer view feature that lets you watch a simulation of the extruder head as it lays down material at each layer. Is it possible to get Cura to show a time stamp as it does this? That would let me set reminders to check a print just at certain critical times.</p>
| <p>These estimates tend to be very approximate, even if Cura has the accurate acceleration values for your firmware. An error of 100% is not unusual.</p>
<p>What you probably want is an alarm at a specific layer (a few before the critical ones). You might be able to add this to Octoprint fairly easily - it does suppor... | <p>If I may interpret your question a bit, and add alternatives to Sean H's suggestions. I agree that any attempt to estimate elapsed time per layer is doomed. </p>
<p>Perhaps you should just look at the LayerView to determine the critical layers of interest. Then edit the gcode file in a text editor. Locate the st... | 1,001 |
<p>I am looking to print an enclosure, which will have a PCB inside with some LED indicators. I was wondering if it is possible to 3D print the enclosure such that the following look can be achieved? What material and technique?</p>
<p>When LEDs are off, it looks something like this:</p>
<p><a href="https://i.stack.i... | <p>Achieving this with 3D printing would be quite difficult, and you might be better served by creating this effect some other way (I would personally recommend getting some inkjet transparencies and stacking a few layers together: an entirely black layer, and a few layers with the symbols in negative space).</p>
<p>O... | <p>You can print the "lid" in translucent (gray) and stick a piece of laser printed transparency film under it with the symbols (print it "negative" so the symbols are transparent and the rest is black). Depending on the quality of the printed black you might want to stack two printouts to minimize light sipping throug... | 358 |
<p>I run a game and the running is done by hand, I have a few scripts that help me but essentially it's me doing the work. I am at the moment working on web app that will allow the users to input directly some of their game actions and thus save me a lot of work.</p>
<p>The problem is that I'm one man working on a mod... | <p>This is my general approach to testing/launching.
How you test/launch depends mostly on:</p>
<ol>
<li>What your application <strong>is</strong>.</li>
<li>Who your users <strong>are</strong>.</li>
</ol>
<p>If you application is a technical application and is geared to the technically-minded, the word "beta" won't r... | <p>I don't understand what you mean by "bring in the app" and "one turn drop it". By "bring in the app" do you mean deploy? As for "One turn drop", I totally don't understand it.</p>
<p>As for open betas, that depends on your audience, really. Counterstrike, for example, apparently run a few closed betas before doing ... | 4,971 |
<p>I got my first printer, a <a href="https://www.amazon.de/dp/B075FQRNY3/ref=pe_3044161_189395811_TE_SCE_3p_dp_1" rel="nofollow noreferrer">Geeetech Prusa i3</a>, and for the price I paid (160$) I am so blown away. As I saved so much money, I treated myself to a legit copy of Simplify3D, which I am happy with.</p>
<p... | <p>A nozzle with a nozzle <strong>width</strong> of 0.3 mm cannot print a 0.3 mm layer <strong>height</strong>. You <em>could</em> do that but you <em>should</em> not as you ultimately pay the price in the form of a less aesthetic finish. The general rule of thumb is to maximize the layer height at 75 % of the nozzle w... | <p>I fixed it!</p>
<p>The problem wasn't the temperature, it was the spring that puts the pressure on the little wheel against the gear. That was too strong, so the entry of the extruder was to tight. The gear worked fine and the settings worked well, I just had to adjust the spring a bit to carefully lower the pressu... | 1,063 |
<p>Is it possible to generate PDF Documents in an Adobe AIR application without resorting to a round trip web service for generating the PDF? I've looked at the initial Flex Reports on GoogleCode but it requires a round trip for generating the actual PDF.</p>
<p>Given that AIR is supposed to be the Desktop end for RIA... | <p>There's <a href="http://code.google.com/p/alivepdf/" rel="nofollow noreferrer">AlivePDF</a>, which is a PDF generation library for ActionScript that should work, it was made just for the situation you describe.</p>
| <p>One of the other teams where I work is working on a Flex-based drawing application and they were totally surprised that AIR / Flex does not have PDF authoring built-in. They ended up rolling their own simple PDF creator based on the PDF specification.</p>
| 7,677 |
<p>3D Printers (those who print, not the machine, dummy)!</p>
<p>I haven't been printing in a while, so when I returned to my Monoprice Select Mini VII, of course it had been sprung out of whack. Some of my first prints would not even come out of the extruder until I realized I had some pretty bad (and worse, unnotice... | <p>for sure the answer could be dissertation or even a book because there is no simple way to address "all" issues - it's just to wide area</p>
<p>but as the simple troubleshooting i would list it this way</p>
<ol>
<li>is your printer alive so is it
<ul>
<li>working at all (check power, cables)</li>
<li>communicate ... | <h1>The obvious ones first</h1>
<p>This is, well, obvious. It is, what a visual and smell inspection shows. Stuff like missing or ruptured cables, bent rails, ripped or very loose belts, burnt smell or hung up software that is easy to see that it is going on needs to be addressed first.</p>
<h1>The not so obvious next<... | 1,315 |
<p>I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached to it for each date field, I get several (11, in fact) external Java... | <p>I always preferred to write my Ajax calls in javascript using JQuery or Prototype. ASP.NET Ajax Toolkit does make things easier, but it never seems to do so elegantly.</p>
<p>I personally would make a new Calendar Controller. This way you can control the AJAX (using JQuery/Prototype) calls that are being made.</p>
| <p>ASP.NET AJAX allows you to register web services with the ScriptManager which will create JavaScript proxies for you to call. See <a href="http://msdn.microsoft.com/en-us/library/bb515101.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb515101.aspx</a>.</p>
| 3,660 |
<p>There are several plugin options for building a search engine into your Ruby on Rails application. Which of these is the best?</p>
<ul>
<li><a href="http://ts.freelancing-gods.com/" rel="noreferrer">Thinking Sphinx</a></li>
<li><a href="http://blog.evanweaver.com/files/doc/fauna/ultrasphinx/files/README.html" rel=... | <p>Thinking Sphinx has more concise syntax to define which fields and which models are indexed.</p>
<p>Both UltraSphinx and Thinking Sphinx (recently) have ultra-cool feature which takes into account geographical proximity of objects. </p>
<p>UltraSphinx has annoying problems with how it loads models (it does not loa... | <p>I've used Thinking Sphinx and it seems pretty good, but I haven't had the time to evaluate all of the options.</p>
| 9,926 |
<p>A project I'm working on at the moment involves refactoring a C# Com Object which serves as a database access layer to some Sql 2005 databases.</p>
<p>The author of the existent code has built all the sql queries manually using a string and many if-statements to construct the fairly complex sql statement (~10 joins... | <p>I used C# and Linq to do something similar to get log entries filtered on user input (see <a href="https://stackoverflow.com/questions/11194/conditional-linq-queries">Conditional Linq Queries</a>):</p>
<pre><code>IQueryable<Log> matches = m_Locator.Logs;
// Users filter
if (usersFilter)
matches = matches... | <p>You may want to consider LINQ or an O/R Mapper like this one: <a href="http://www.llblgen.com/" rel="nofollow noreferrer">http://www.llblgen.com/</a> </p>
| 8,851 |
<p>I am trying to print something that might take 15 hours. I don't want to risk my printer so if I print for 15 hours, what is the worst that can happen? So far, I haven't printed anything for more than 5 hours.</p>
| <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,777 |
<p>I have one table "orders" with a foreing key "ProductID".</p>
<p>I want to show the orders in a grid with the <strong>product name</strong>, without <strong>LazyLoad</strong> for better performance, but I if use <strong>DataLoadOptions</strong> it retrieves <strong>all</strong> Product fields, which seams like a <s... | <p>What you are asking for is a level of optimisation the linq-to-sql does not provide. I think your best bet is to create a query that returns exactly the data you want, possibly as an anonymous type:</p>
<pre><code>from order in DB.GetTable<Orders>()
join product in DB.GetTable<Products>()
on order.Produ... | <p>If you select only the columns you want in the linq query, and then call .ToList() on the query, it will be immedietly executed, and will only bring back the columns you are interested in. For example if you do this:</p>
<pre><code>var q = from p in dataContext.products select p.ProductName;
var results = q.ToList(... | 4,870 |
<p>I was working on my printer when something metallic came into contact with the pcb. I smelled smoke and quickly unplugged the printer. Anyway, this is the result and, of course, the heat bed won't heat. </p>
<p>Can this be salvaged or should I toss it and buy a new one? </p>
<p><a href="https://i.stack.imgur.com/W... | <p>What happend was short circuit of course. There is no doubt you overheated HB so copper detached from HB base plate. Because you wrote it doesn't work it means copper tracks are broken.</p>
<p>There is very low chance to fix it. I mean it - near to zero.</p>
<p>What you could do is:</p>
<ol>
<li>Detach HB from ar... | <p>Yes, it should be possible to fix, although you might choose to replace anyway on the basis that the repaired bed might give you concerns about how long it will be before your repair fails.</p>
<p>You will need to carefully remove the protective layer to expose the heating element (assuming you can identify where i... | 264 |
<p>I'm trying to call a function after I load some XML into Actionscript, and I'm just wondering how I call that function. Example:</p>
<pre><code>//Function Declarations
function parentFunction()
{
function callMe()
{
textField.text = "lawl";
}
}
</code></pre>
<p>Now, <strong>how do I call the "call... | <p>Are you forced to declare callMe inside of parentFunction? I assume so because otherwise you would just do</p>
<p>function parent() { }
function callMe() { }</p>
<p>To be clear, a function can't own another function unless you provide some scope for that function to live in.</p>
<p>So in JavaScript, you would ... | <p>I'm an idiot. I forgot the whole "a function can't own another function" thing, so I figured out another way to do it. Thanks!</p>
| 6,175 |
<p>We are looking for a WYSIWYG editor control for our windows application (vb.net or c#) so that users can design HTML emails (to send using the SMTP objects in the dot net framework) before sending.</p>
<p>Currently all the available editors we can find have one of the following issues:</p>
<ol>
<li><p>They rely on... | <p>I also needed a WYSIWYG editor for a Windows Forms project that I was working on. I wrote about the items that I found <a href="http://ellisweb.net/2007/03/wysiwyg-editing-of-html-in-a-windows-forms-control/" rel="nofollow noreferrer">here</a>. Eventually, I ended up using something that I found on CodeProject: <a h... | <p>Instead of searching for an HTML editor, consider the option of a RichText editor (which can be much easier to create) and then convert the final text into a HTML document.</p>
<p>Provided you are required to use a minimal set of features (bold / italics etc) both the creation of the RT editor and the conversion of... | 3,004 |
<p>I would like to use Haskell more for my projects, and I think if I can get started using it for web apps, it would really help that cause. I have tried happs once or twice but had trouble getting off the ground. Are there simpler/more conventional (more like lamp) frameworks out there that I can use or should I just... | <p>The best tools as of 2011 are:</p>
<ul>
<li><a href="http://snapframework.com/" rel="nofollow noreferrer">Snap</a></li>
<li><a href="http://www.yesodweb.com/" rel="nofollow noreferrer">Yesod</a>; or</li>
<li><a href="http://happstack.com/" rel="nofollow noreferrer">Happstack</a></li>
</ul>
<p>The web development c... | <p>There is also <a href="http://hope.bringert.net/about" rel="nofollow noreferrer">Hope</a> (link is depreciated), although it doesn't seem to have gained as much traction as <a href="http://happs.org/" rel="nofollow noreferrer">HApps</a> and <a href="http://www2.informatik.uni-freiburg.de/~thiemann/WASH/" rel="nofoll... | 7,388 |
<p>I'm building my own DLP printer with UV LEDs. I use a 20A relay to power them on, since they require high power and can't be directly driven by arduino or Raspberry.</p>
<p>I'm planning to use them with NanoDLP on Raspberry + GRBL on Arduino.</p>
<p>Is it possible to make NanoDLP tell GRBL to power on (send digita... | <p>I have no experience with either GRBL or DLP printers, but the</p>
<pre><code>M7
M8
M9
</code></pre>
<p>coolant control codes should be able to be sent by NanoDLP to GRBL. Those seem to allow for direct digital output.
Apparently you can set the pin you want them to use in the <code>cpu_map.h</code> file, with the... | <p>I think you don't have to use the Arduino. There´s an option in NanoDLP to control the z-axis through the Raspberry GPIO.</p>
| 689 |
<p>I have a website that works correctly under IIS 6.0: It authenticates users with windows credentials, and then when talking to the service that hits the DB, it passes the credentials.</p>
<p>In IIS 7.0, the same config settings do not pass the credentials, and the DB gets hit with NT AUTHORITY\ANONYMOUS.</p>
<p>Is... | <p>There has been changes between IIS7 and IIS6.0. I found for you one blog post that might actually help you (<a href="http://mvolo.com/blogs/serverside/archive/2007/12/08/IIS-7.0-Breaking-Changes-ASP.NET-2.0-applications-Integrated-mode.aspx" rel="noreferrer">click here to see it</a>).</p>
<p>Are you running your ap... | <p>Interesting... I have the opposite problem - <strong>Not being able</strong> to get the authentication to be passed from the client browser, through the webserver and onto the database within a large corporate network over firewalls.</p>
<p>I also feel that "end to end user" authentication to the database is a bad ... | 3,161 |
<p>When I use Cura with the Pronterface UI it sometime just stops printing.</p>
<p>When it stops the printer just stops, the UI looks like it's still printing but nothing is moving in the printer, also, trying to control the printer from the UI does nothing.</p>
<p>It always stops early in the printing process, usual... | <p>The Monoprice Architect is is a bare-bones FlashForge Creator that has been re-badged for Monoprice. The Creator line is a very popular set of printers, so there is lots of good advice out there. The FlashForge Google Group is a good community to join: <a href="https://groups.google.com/forum/#!forum/flashforge" rel... | <p>Since the printer has no heater, I'd advise some sleuthing</p>
<ol>
<li>Look at the motherboard. Find the big black square chip and see if it is a ATmega 1280 or 2560. Likely it's a 1280, but you never know. This will impact which firmware build you use.</li>
<li>If you will eventually add a heater PCB, then fig... | 157 |
<p>I'm trying to figure out how to automatically extract the part after it was printed.</p>
<p>One of the ideas is to wait until the bed get cooled enough (let's say to 40-50 °C, usually the part can be just slide of at this bed temperature) and turn on the powerful fan blowing off the part to a tray or something.</p>
... | <p>You can do this provided the part releases consistently after cooling. Your filament choice may cause problems, though. ABS is prone to warping and a fan constantly blowing on the part would make it worse. The second thing to consider would be the release agent. I assume you are using gluestick or something similar ... | <p>In theory you could knock the item off the build plate and into a bin by positioning the print head behind the part and then pushing.</p>
<p>However your build plate would need to have a smooth front edge, so no clips in the way.</p>
<p>You'd also want to have some delay to let the bed cool down before attempting th... | 2,026 |
<p>I have a CR-10S 500 and want to change a capacitor on it to improve and solve temperature issues. This capacitor that needs to be changed should be labeled as "C4" as mentioned on <a href="https://www.jozerworx.com/creality-cr-10s-c4-capacitor-diy-fix-tutorial/" rel="nofollow noreferrer">this</a> post but it's not p... | <p>You are looking for a capacitor that must be connected to Pin 4 of the LM2596.</p>
<p>Maybe you could provide a better picture of that area so we could see the different tracks on the board.</p>
<p>The LM2596 is in the center of the right side of the board (it is also labeled with LM2596D). The pins should be cou... | <h1>You are looking at the wrong board</h1>
<p>Your board might on the surface look like a Creality v 2.0 board, and is indeed from the same family of boards. After trying to discern the parts and finally resorting to google image search, I almost had to maniacally laugh:</p>
<p>The currently latest version is the <a h... | 1,098 |
<p>Let's say I have a parent DIV. Inside, there are three child DIVs: header, content and footer. Header is attached to the top of the parent and fills it horizontally. Footer is attached to the bottom of the parent and fills it horizontally too. Content is supposed to fill all the space between header and footer.</p>
... | <p>I'm going to get downmodded for this, but this sounds like a job for a table.</p>
<p>What you're trying to do is to set the total height of three contiguous divs as a unit, and a 1x3 table with height 100% is actually a cleaner solution.</p>
| <p>Absolute positioning is messing you up. Try something like this:</p>
<p>HTML:</p>
<pre><code><div id="wrapper">
<div id="header">
header
</div>
<div id="content">
content
</div>
<div id="footer">
footer
</div>
</div>
</code></pre>
<p>CSS:</p>
<pre class... | 8,128 |
<p>I'm building a 3d printer of size 500 x 500 x 500 build area. For the Z axis, I'm planning to use this <a href="https://www.3dprintronics.com/Linear-Actuator-Ball-Screw-1204-p108536003" rel="nofollow noreferrer">Linear actuator</a>. </p>
<p>The maximum weight Z axis might encounter is 15 Kg due to it being a clay p... | <blockquote>
<p>My question is a ball screw of pitch 4mm or 5mm, will it be able to Maintain it's position when motor is deenergized under a load of 15 kg shared by two systems.</p>
</blockquote>
<p>The detent torque of a <a href="https://motion.schneider-electric.com/downloads/quickreference/NEMA23.pdf" rel="norefe... | <p>Adding to the other more scientific answers here. The backdriving force will move the lead screws depending on the stiction between the lead screw and the nut. If it was friction less then it will always slide. Basically you need to keep the lead screw from turning while the machine is off. You can make a basic elec... | 1,043 |
<p>Story: The user uploads an image that will be added to a photo gallery. As part of the upload process, we need to A) store the image on the web server's hard drive and B) store a thumbnail of the image on the web server's hard drive.</p>
<p>"Best" here is defined as </p>
<ul>
<li>Relatively easy to implement, un... | <p>I suppose your best solution would be using the <a href="http://msdn.microsoft.com/en-us/library/system.drawing.image.getthumbnailimage.aspx" rel="noreferrer">GetThumbnailImage </a> from the .NET <a href="http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx" rel="noreferrer">Image</a> class.</p>
<pre><... | <p>You can use the Image.GetThumbnailImage function to do it for you.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/system.drawing.image.getthumbnailimage.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/system.drawing.image.getthumbnailimage.aspx</a> (.NET 3.5)</p>
<p><a href="http:/... | 4,759 |
<p>Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it.</p>
<p>However, we've found the pain point with ClickOnce is in <em>creating</em> the deployments. We have the standard dev/test/production environments and need to be able to create deployments for each of the... | <p>I would look at using <a href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx" rel="noreferrer">msbuild</a>. It has built in <a href="http://msdn.microsoft.com/en-us/library/6wc2ccdc.aspx" rel="noreferrer">tasks</a> for handling clickonce deployments. I included some references which will help you get start... | <p>I've used nAnt to run the overall build strategy, but pass parameters into MSBuild to compile and create the deployment package.</p>
<p>Basically, nAnt calls into MSBuild for each environment you need to deploy to, and generates a separate deployment output for each. You end up with a folder and all ClickOnce file... | 4,105 |
<p>Has anybody come up with a better technique for managing tags and branches in subversion than what is generally recommended (the parallel directories called 'tags' and 'branches')?</p>
| <p>Using the repository namespace to convey information like branches / tags / etc is fundamentally the SVN model; if what you want is a different model, you probably really want something other than SVN.</p>
<p>The lack of metadata like CVS-style labels in SVN is an intentional design decision. No matter what arrange... | <p>The only other thing you can do besides having parallel directories when you have Branches is to do an SVN Switch between two branches whenever you want to work on one or the other. Perhaps you should clarify what you want to be "better" about this system and people could make suggestions.</p>
| 9,212 |
<p>I've had this long term issue in not quite understanding how to implement a decent Lucene sort or ranking. Say I have a list of cities and their populations. If someone searches "new" or "london" I want the list of prefix matches ordered by population, and I have that working with a prefix search and an sort by fie... | <p>dlamblin,let me see if I get this correctly: You want to make a prefix-based query, and then sort the results by population, and maybe combine the sort order with preference for exact matches.
I suggest you separate the search from the sort and use a CustomSorter for the sorting:
Here's <a href="http://blog.tremend.... | <p>My current solution is to create an exact searcher and a prefix searcher, both sorted by reverse population, and then copy out all my hits starting from the exact hits, moving to the prefix hits. It makes paging my results slightly more annoying than I think it should be.</p>
<p>Also I used a hash to eliminate dup... | 2,996 |
<p>Is there a simple method of parsing XML files in C#? If so, what?</p>
| <p>I'd use <a href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/linq-to-xml" rel="noreferrer">LINQ to XML</a> if you're in .NET 3.5 or higher.</p>
| <p>You can use <a href="https://github.com/wojtpl2/ExtendedXmlSerializer" rel="nofollow noreferrer">ExtendedXmlSerializer</a> to serialize and deserialize.</p>
<p><strong>Instalation</strong>
You can install ExtendedXmlSerializer from <a href="https://www.nuget.org/packages/ExtendedXmlSerializer/" rel="nofollow norefe... | 7,964 |
<p>I have seen many people saying on this site and many other 3D printing websites that 24 V systems are safer, compared to 12 V systems. By safer, I am talking in terms of fires or other electrical and component failures. </p>
<p>Why would a 24 V system cause less danger? I would think that 12 V would be safer becaus... | <p>The most important "safety" advantage when using 24V (compared to 12V) is that to get the same power, you only need half the current. A 192W heated bed would need 16A at 12V, but only 8A at 24V.</p>
<p>Since one of the most common safety issues is underrated screw terminals being used for the heated bed (just searc... | <p>From a pure safety standpoint there is nothing about a 24v system that is distrinctly more safe than a 12v system. I see you added comments about something involving wire sizes. This is not really a factor.. I would say not knowing what wire size to use is a whole other issue. There is nothing stopping you from putt... | 503 |
<p>I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005. </p>
<p>The database has the same name, and all tables are identical but the hostname is different. </p>
<p>... | <p>If I understand your problem correctly, you simply change the database's connection string in your app.config / web.config.</p>
<p><strong>Edit</strong>, post clarification: You have the connection strings stored somewhere. They might be in the app.config of your server. Still, you get them from somewhere and that ... | <p>I believe you can store the connection information in an app.config file and retrieve it from there. <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3716857&SiteID=1" rel="nofollow noreferrer">Here</a> is a post about doing that with LINQ to SQL. Once you deploy it to a production server, you ca... | 7,175 |
<p>I have an application that reads a table from a database. </p>
<p>I issue an SQL query to get a result set, based on a unique string value I glean from the results, I use a case/switch statement to generate certain objects (they inherit TreeNode BTW). These created objects get shunted into a Dictionary object to b... | <p>Is there a reason you are using the external dictionary? I would populate the tree directly as the data is queried.</p>
<p>If you do require the dictionary, you could set the .Tag property of the tree node to point to the data in your dictionary.</p>
| <p>have you considered using a Virtual Tree view which only loads the nodes the user actually wants to look at - i've had good success with the component from www.infralution.com </p>
| 8,010 |
<p>Is there any visible progress? Is it now just an academic exercise? Do you believe Perl will continue to evolve with or without Perl 6 or will soon be forgotten?</p>
| <p>At the risk of sounding like a Perl fanboy, I'm still excited about Perl 6 and feel like the end result will be relevant when it's released. The last nine months have yielded some nice accomplishments on the Parrot front () and have even resulted in some <a href="http://news.perlfoundation.org/2008/05/tpf_receives_... | <p>It'll be out by Christmas. ;-) I've heard on podcasts that there there will be some kind of alpha before this Christmas. They were explicit about that but it has been a while since I heard that.</p>
| 9,181 |
<p>Octoprint warns me that the objects do not fit into the print volume. I noticed that this happens after a power-off cycle. Since I was overly anxious until today, I always uploaded the GCode file again and it didn't complain any more.</p>
<p>Of course, always uploading the files again is also error prone. So today ... | <p>That's the purging that Slic3r PE adds, the broad line of filament at the edge of the sheet. That is outside the official print volume, which triggers this error.</p>
<p>The G-Code generated by Slic3r PE at the start of the file contains the following lines:</p>
<pre><code>G1 Y-3.0 F1000.0 ; go outside print area
... | <p><a href="/a/8267">This answer</a> is correct, it's normal for Prusa printers to purge at -3 mm on the Y axis.</p>
<p>This answer is an addition that describes how to get rid of the error.</p>
<ol>
<li>Open Octoprint web UI</li>
<li>Go to <code>Settings</code> -> <code>Printer Profiles</code></li>
<li>Find act... | 1,222 |
<p>I homebuilt a delta 3D printer (like Kossel mini) with a Z probe near the hotend with manual deploy and RAMPS 1.4 board:</p>
<ul>
<li>I configured the Repetier firmware with the online tool;</li>
<li>All my endstops (included the Z probe endstop) work in reverse mode, so I reversed the endstops triggering option;</... | <p>As a guess, you are using the wrong command. If set for n x n grid, you get 3 point measurement with G29, but that is not auto leveling, it is just setting Z height - based on average height at 3 points.</p>
<p>What you need is <code>G32 S2</code> with <code>S2</code> to store result in EEPROM (and therefore you sh... | <p>Delta bed leveling has been dodgy in Repetier for a long time. There are a number of fixes occurring in the dev branch right now (June 2016) if you look at Github. So it's getting better, but I wouldn't call it mature yet. (Delta auto-calibration is one of the only big shortcomings of Repetier, in my opinion.)</p>
... | 335 |
<p>I have a nullable property, and I want to return a null value. How do I do that in VB.NET ?</p>
<p>Currently I use this solution, but I think there might be a better way.</p>
<pre><code> Public Shared ReadOnly Property rubrique_id() As Nullable(Of Integer)
Get
If Current.Request.QueryString(... | <p>Are you looking for the keyword "Nothing"?</p>
| <p>Or this is the way i use, to be honest ReSharper has taught me :)</p>
<pre><code>finder.Advisor = ucEstateFinder.Advisor == "-1" ? (long?)null : long.Parse(ucEstateFinder.Advisor);
</code></pre>
<p>On the assigning above if i directly assign null to finder.Advisor*(long?)* there would be no problem. But if i try t... | 9,804 |
<p>A little backstory to help you understand the situation. I put the 3D printer together and turned it on and everything seemed fine until I started printing. It didn't even get the first layer down when the screen reset and so did the print. I didn't think anything of it, I just went back and tried again, but this... | <p>The fuse rating is same as described on the board - so that shall be no issue with it.</p>
<p><strong>My main concern is why the fuse is down?</strong></p>
<p>Was there a short-circuit? As this is mains fuse - that suggest a big-bang, so, please check carefully hot-end and bed heater connections before restarting ... | <p>To add to the answer of <em>@profesor79</em> (which you <strong>absolutely need to address first</strong> (find the cause why it blew); else the fuse might blow again), you might be interested in installing fuse clamps. As <em>@fred_dot_u</em> mentions:</p>
<blockquote>
<p>use caution when soldering leads to the ... | 947 |
<p>I've seen binary trees and binary searching mentioned in several books I've read lately, but as I'm still at the beginning of my studies in Computer Science, I've yet to take a class that's really dealt with algorithms and data structures in a serious way.</p>
<p>I've checked around the typical sources (Wikipedia, ... | <p>Red Black trees are good for creating well-balanced trees. The major problem with binary search trees is that you can make them unbalanced very easily. Imagine your first number is a 15. Then all the numbers after that are increasingly smaller than 15. You'll have a tree that is very heavy on the left side and has n... | <p>If you would like to see how a Red-Black tree is supposed to look graphically, I have coded an implementation of a Red-Black tree that you can <a href="http://brockwoolf.com/redblacktree" rel="nofollow noreferrer">download here</a></p>
| 4,107 |
<p>I'm looking at developing a device which will need to support Ethernet over USB (hosted in Linux, XP, and Vista). As I understand it, Vista and Linux support the industry standard USB CDC. However, in classic Windows style, XP only supports it's own Remote NDIS. So, now I'm thinking of just bowing down and doing it ... | <p>The filesystem backend is only worth looking at if you're not going to use a database for any other part of your system. If you are using a database then the filesystem backend has nothing to recommend it.</p>
<p>The memcache backend is much quicker than the database backend, but you run the risk of a session being... | <p>If the database have a DBA that isn't you, you may not be allowed to use a database-backed session (it being a front-end matter only). Until django supports easily merging data from several databases, so that you can have frontend-specific stuff like sessions and user-messages (the messages in django.contrib.auth ar... | 7,338 |
<p>I'd like to to associate a file extension to the current executable in C#.
This way when the user clicks on the file afterwards in explorer, it'll run my executable with the given file as the first argument.
Ideally it'd also set the icon for the given file extensions to the icon for my executable.
Thanks all.</p>
| <p>There doesn't appear to be a .Net API for directly managing file associations but you can use the Registry classes for reading and writing the keys you need to.</p>
<p>You'll need to create a key under HKEY_CLASSES_ROOT with the name set to your file extension (eg: ".txt"). Set the default value of this key to a un... | <p>There are two cmd tools that have been around since Windows 7 which make it very easy to create simple file associations. They are <a href="https://technet.microsoft.com/en-us/library/cc770920(v=ws.11).aspx" rel="nofollow noreferrer">assoc</a> and <a href="https://technet.microsoft.com/en-us/library/cc771394(v=ws.11... | 9,515 |
<p>I would like to flash a success message on my page.</p>
<p>I am using the jQuery <code>fadeOut</code> method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange.</p>
<p>What I would like to happen is have the element be displayed for five seconds, the... | <p>The new <code>delay()</code> function in jQuery 1.4 should do the trick.</p>
<pre><code>$('#foo').fadeIn(200).delay(5000).fadeOut(200).remove();
</code></pre>
| <p>Update for 1.6.2</p>
<p>Nathan Long's answer will cause the element to pop off without obeying delay or <code>fadeOut</code>.</p>
<p>This works:</p>
<pre><code>$('#foo').delay(2000).fadeOut(2000);
</code></pre>
| 6,370 |
<p>When I process a cube in Visual Studio 2005 I get following message:</p>
<blockquote>
<p>Process succeeded. Trace information
is still being transferred. If you do
not want to wait for all of the
information to arrive press Stop.</p>
</blockquote>
<p>and no trace info is displayed. Cube is processed OK by ... | <p>I get the same message when I process a cube, but if I wait for a few seconds the trace information arrives. Are you dealing with a very large quantity of data or a very complex cube? Maybe this is a silly question, but have you tried waiting a few minutes?</p>
| <p>how are you processing the cube? through XMLA or through the GUI? If you do it in XMLA then you should see the results as they come in the output window</p>
| 3,361 |
<p>My custom 3D printer prints everything inverted. I guess this is a homing problem as the motor moves in correct direction.</p>
<p>In Pronterface,</p>
<ul>
<li>if I press -Y — bed moves forward (towards the Y endstop)</li>
<li>if I press +Y — bed moves backward (away from Y endstop)</li>
<li>if I press -X — hotend mo... | <h1>Heater polarity doesn't matter</h1>
<p>The heater cartridges are just large resistors and so polarity is irrelevant. Either can be positive or negative.</p>
<p>You can extend the leads by cutting and splicing in ~20 gauge wires* to a two pin JST connector line you suggest.</p>
<hr />
<p>*<sup>At 24 volts and 30 wat... | <p>1 meter puts you far enough away from the heater than you don't need high temperature wiring to extend it. The larger the guage(e.g. 20 guage) the less resistance you will add to the heater circuit. This doesn't matter as long as you can still achieve your maximum temperature (if you can still achieve the same cur... | 1,919 |
<p>I have a few Visual Studio Solutions/Projects that are being worked on in my company, which now require a scheme for automatic nightly builds. Such a scheme needs to be able to check the latest versions from SVN, build the solutions, create the appropriate downloadable files (including installers, documentation, etc... | <p>At my work we use CCNET, but with builds on check-in more than nightly - although it's easily configured for either or both.</p>
<p>You can very easily set up unit testing to run on every checkin as well, FXCop testing, and a slew of other products.</p>
<p>I would also advise checking out <a href="http://www.jetbr... | <p><a href="http://www.conifersystems.com/cascade/" rel="nofollow noreferrer">Cascade</a> supports doing a build on every single change committed to the repository.</p>
<p>I would not recommend doing only nightly builds -- that's a pretty long window where a build break can slip in before it's reported.</p>
| 5,846 |
<p>I've been using WWF for a while as part of an internal call center application (ASP.NET), and while learning it was a good practice in understanding how a state machine based workflow system <em>should</em> work, I am definitely not in love with WWF itself. In my opinion it is:</p>
<ol>
<li>Overly complex, especial... | <p>You could try <a href="http://www.thefreakparade.com/2008/05/simplestatemachine-codeplex-project/" rel="noreferrer">Simple State Machine</a>. You would have to implement access control and background timers yourself, but that shouldn't be a big deal. SSM was also built out of frustration with WF. <a href="http://www... | <p>Do you have the option to consider BizTalk Server?</p>
| 3,974 |
<p>I'm using LINQ to SQL classes in a project where the database design is still in a bit of flux.</p>
<p>Is there an easy way of synchronising the classes with the schema, or do I need to manually update the classes if a table design changes?</p>
| <p>You can use SQLMetal.exe to generate your dbml and or cs/vb file. Use a pre-build script to start it and target the directory where your datacontext project belongs. </p>
<pre><code>C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\x64\sqlmetal.exe
/server:<SERVER>
/database:<database>
/code:"... | <p>How about modifying the Properties of the entity/table within the DataContext design surface within Visual Studio?</p>
<p>For instance if I added a column to an SQL Server table:</p>
<ol>
<li>Open the *.dbml file.</li>
<li>Right click the entity and select Add > Property.</li>
<li>Fill out the values in the Proper... | 6,120 |
<p>This has me stumped. I had been printing normally until this happened. Below is an expurgated version of my headache over two days. Some help would be appreciated.</p>
<p>Printer is Hypercube Evolution (CoreXY) using Bowden tube and eSun PLA+ filament. Bowden tube goes from inside the feed cone in the extruder strai... | <p>The lump at the top of the heatbreak is because there is a gap between your bowden tube and the heatbreak. Liquid filament is leaking out of the heatbreak and solidifying there. When you reassemble, you need to close this gap.</p>
<p>There should not be smoke coming out of your nozzle. Maybe when it is new, there... | <p>Worked out the reason for the thickening filament. A number of sites refer to heat creep and suggest that you check that the heatsink is clear and the heatsink fan is working properly. In my case, they were. However, the fan outlet (where it blows on the heat sink) was full of garbage. Cleaned that out things improv... | 2,061 |
<p>I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm.</p>
<p>One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and compl... | <p>You sound as if you're looking for three major things: code templates, refactoring tools, and auto-completion.</p>
<p>The good news is that Xcode 3 and later come with superb auto-completion and template support. By default, you have to explicitly request completion by hitting the escape key. (This actually works... | <p>I found some xtmacro files in Xcode.app package:
<strong>/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources</strong></p>
<p>Installed Xcode ver. 3.2.5.</p>
| 4,079 |
<p>I've had my Ender 3 Pro for a few months, and it's been working great. Then, after a failed print (the STL had extra seams, causing the print to get mangled), I've started having issues that I have attributed to under-extrusion.</p>
<p>As evidenced by the below image, some lines in each layer are missing. The gaps a... | <p>It turns out the extruder <em>was</em> slipping, but not due to a nozzle or Bowden tube pressure issue. The extruder arm (?) that holds the passive wheel (as opposed to the drive gear) was cracked, so the pressure between the wheel and the gear was weak. A bit of glue fixed it.</p>
<p>These printers should ship with... | <p>This is a big red flag and severely wrong:</p>
<blockquote>
<p>93 had to be changed to 150 steps/mm</p>
</blockquote>
<p>It can be reasonable to tune steps per mm by a few percent, but needing an increase of more than 50% versus the standard value for the same physical gearing indicates either you did something wron... | 2,003 |
<p>I want to parse a config file sorta thing, like so:</p>
<pre><code>[KEY:Value]
[SUBKEY:SubValue]
</code></pre>
<p>Now I started with a <code>StreamReader</code>, converting lines into character arrays, when I figured there's gotta be a better way. So I ask you, humble reader, to help me.</p>
<p>One restr... | <blockquote>
<p>I considered it, but I'm not going to use XML. I am going to be writing this stuff by hand, and hand editing XML makes my brain hurt. :')</p>
</blockquote>
<p>Have you looked at <a href="http://www.yaml.org/" rel="noreferrer">YAML</a>?</p>
<p>You get the benefits of XML without all the pain and suff... | <p>Regardless of the persisted format, using a Regex would be the fastest way of parsing.
In ruby it'd probably be a few lines of code.</p>
<pre><code>\[KEY:(.*)\]
\[SUBKEY:(.*)\]
</code></pre>
<p>These two would get you the Value and SubValue in the first group. Check out MSDN on how to match a regex against a stri... | 3,486 |
<p>I am aware of <a href="http://www.capify.org/" rel="nofollow noreferrer">Capistrano</a>, but it is a bit too heavyweight for me. Personally, I set up two <a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow noreferrer">Mercurial</a> repositories, one on the production server and another on my local dev mac... | <p>I used to use git push to publish to my web server but lately I've just been using rsync. I try to make my site as agnostic about where it's running as possible (using relative paths, etc) and so far it's worked pretty well. The only challenge is keeping databases in sync, and for that I usually use the production d... | <p>@Andrew</p>
<p>To use git push to deploy your site you will need to do first set up a remote server in your .git/config file to push to. Then you need to configure a hook that will basically perform a git reset --hard to copy the code you just copied to the repository to the working directory.</p>
<p>I know this i... | 5,873 |
<p>I am getting some errors thrown in my code when I open a Windows Forms form in Visual Studio's designer. I would like to branch in my code and perform a different initialization if the form is being opened by designer than if it is being run for real. </p>
<p>How can I determine at run-time if the code is being exe... | <p>To find out if you're in "design mode":</p>
<ul>
<li>Windows Forms components (and controls) have a <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.component.designmode.aspx" rel="noreferrer">DesignMode</a> property.</li>
<li>Windows Presentation Foundation controls should use the <a href="ht... | <pre><code> /// <summary>
/// Whether or not we are being run from the Visual Studio IDE
/// </summary>
public bool InIDE
{
get
{
return Process.GetCurrentProcess().ProcessName.ToLower().Trim().EndsWith("vshost");
}
}
</code></pre>
| 9,921 |
<p>Has anyone used <a href="http://web.archive.org/web/20090803092709/http://www.aptana.com:80/Jaxer" rel="nofollow noreferrer">Jaxer</a> in a production environment, I am curious as to how it holds up compared to something like php, ruby, etc. and if anyone knows of any pitfalls to using it that are well known.</p>
| <p>@Stu: Not necessarily, maybe there's a bunch of people using it and having no issues. I love the concept having to only write validations once, using one language for everything both client and server side sounds like a interesting approach.</p>
| <p>I'll add this <a href="http://www.ibm.com/developerworks/web/library/wa-aj-jaxer/index.html?ca=dgr-jw64wa-aj-jaxer&S_TACT=105AGY46&S_CMP=GRsitejw64" rel="nofollow noreferrer">Url</a> to my post I found it today, it has some information regarding the subject but no real "performance" information.</p>
| 3,149 |
<p>Is it possible to merge to a branch that is not a direct parent or child in TFS? I suspect that the answer is no as this is what I've experienced while using it. However, it seems that at certain times it would be really useful when there are different features being worked on that may have different approval cycl... | <p>I agree with Harpreet that you may want to revisit how you you have setup you branching structure. However you if you really want to perform this type of merge you can through something called a baseless merge. It runs from the tfs command prompt, </p>
<pre><code>Tf merge /baseless <<source path>> <... | <p>I am far from a TFS expert, but I think you can merge siblings, and I think it is not a baseless merge. </p>
<p>We branched off our main branch (branch name "main") for a feature (branch name "feature"), then I needed some of the work in a branch that was also branched off the main branch (branch name "dev"). I wou... | 7,616 |
<p>Whenever a 3D printer that uses linear rails is announced (case in point: the <a href="https://www.cetus3d.com/cetus-3d-printer.html" rel="noreferrer">cetus</a>), the Internet (well... at least that corner of it dealing with 3D printing) gets abuzz with excitement.</p>
<p>I researched a bit the topic myself, and wh... | <p>The following is a compilation of the input from a number of sources.</p>
<p>Linear rails in general are mechanical components that - when designing equipment - offer great flexibility.</p>
<p><strong>The profile of the rail can be designed in nearly infinite ways.</strong> This in turn allows for:</p>
<ul>
<li><... | <p>Linear rails will always produce a high degree of accuracy and stability and more so than round rod with PTFE bushings and/or bearings. </p>
<p>One may argue the fact however even as a product developer and one who is involved with the mechanicals and development of machinery on a day to day basis comparing the two... | 783 |
<p>While working between a Windows MySQL server and a Debian MySQL server, I noticed that warnings were fatal on Windows, but silently ignored on Debian. I'd like to make the warnings fatal on both servers while I'm doing development, but I wasn't able to find a setting that effected this behavior. Anyone have any idea... | <p>I think what you're looking for is the sql_mode parameter in my.conf. STRICT_ALL_TABLES is the value. I guess it depends what you mean by "fatal".</p>
<p><a href="http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html" rel="nofollow noreferrer">http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html</a><... | <p>Look at enabling strict mode in the /etc/my.ini file.</p>
| 8,975 |
<p>I am using a class library which represents some of its configuration in .xml. The configuration is read in using the <code>XmlSerializer</code>. Fortunately, the classes which represent the .xml use the <code>XmlAnyElement</code> attribute at which allows me to extend the configuration data for my own purposes with... | <p>So you need to have your class contain custom configuration information, then serialize that class to XML, then make that serialized XML into an XML node: is that right?</p>
<p>Could you just take the string created by the XMLSerializer and wrap that in it's own XML tags?</p>
<pre><code>XmlSerializer xs = new XmlS... | <p>One solution is to serialize the inner object to a string and then load the string into a XmlDocument where you can find the XmlNode representing your data and attach it to the outer object. </p>
<pre><code>XmlSerializer xser1 = new XmlSerializer(typeof(Config));
XmlSerializer xser2 = new XmlSerializer(typeof(MyCon... | 6,835 |
<p>What did I do wrong?</p>
<p>Here is an excerpt from my code:</p>
<pre><code>public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
ScrolledComposite scrollBox = new ScrolledComposite(parent, SWT.V_SCROLL);
scrollBox.setExpandHorizontal(true);
mParent = new Composite(scrollBox... | <p>This is a common hurdle when using <code>ScrolledComposite</code>. When it gets so small that the scroll bar must be shown, the client control has to shrink horizontally to make room for the scroll bar. This has the side effect of making some labels wrap lines, which moved the following controls farther down, whic... | <p>Don't you need to recompute the size of the scrollBox after the layout?</p>
| 5,557 |
<p>What is the proper way for an MFC application to cleanly close itself?</p>
| <p>Programatically Terminate an MFC Application</p>
<pre><code> void ExitMFCApp()
{
// same as double-clicking on main window close box
ASSERT(AfxGetMainWnd() != NULL);
AfxGetMainWnd()->SendMessage(WM_CLOSE);
}
</code></pre>
<p><a href="http://support.microsoft.com/kb/117320">http://s... | <p>If it is a dialog based application you can do it by calling EndDialog() function.</p>
<p>If it is an SDI/MDI based application you can call DestroyWindow. But before which you will need to do the cleanup yourself (closing documents, deallocating memory and resources, destroying any additional windows created etc).... | 3,530 |
<p>What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5</p>
<p>I know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted to only web requests coming th... | <p>The Spring Validation framework can be used outside of Spring MVC. What WebServices Stack are you using? If you are using Spring-WS (Spring's Web Services stack) they have special instructions on how to set up the validator here:</p>
<p><a href="http://static.springframework.org/spring-ws/sites/1.5/reference/html/s... | <p>Recall that the Validator interface defines two methods:</p>
<pre><code>boolean supports(Class clazz)
void validate(Object target, Errors errors)
</code></pre>
<p>The <code>Object target</code> is your form object, which is the whole object representing the page to be shown to the user. The Errors instance will c... | 8,151 |
<p>I'm a novice in 3D printing. I have a <a href="https://en.wikipedia.org/wiki/Aleph_Objects#LulzBot" rel="noreferrer">Lulzbot Kittaz 3D printer</a> with a hexagonal hot end of 0.35 mm. I have printed a test subject, and while I was printing I encountered this extrusion problem. I'm using ABS with 230 °C hot... | <p>It looks like you are not extruding at the correct rate. I would check your slicer settings for nozzle and filament size. Also check and calibrate for your filament diameter.</p>
<p>It looks like you could be getting better adhesion too. Lulzbot recommends a 110C bed temperature. That might help. (lulzbot.com/store... | <p>Two things come to mind. First it is the first few layers. You could have the head Smashing into the print bed. Causing a massive build up of plastic the first few layers. And or you have over extrusion.</p>
<ol>
<li><p>Take a piece of paper. you want the distance from the head and the
bed to be that width. Just en... | 417 |
<p>Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using ... | <p>Dr Dobb's Journal has an article <a href="http://www.ddj.com/cpp/204202899?cid=RSSfeed_DDJ_Cpp" rel="nofollow noreferrer">Building Your Own Plugin Framework: Part 1</a> which is pretty good reading on the subject. It is the start of a series of articles which covers the architecture, development, and deployment of a... | <p>I have my own game engine that has a C++ plug-in system.</p>
<p>I have some code in header files so it gets put into the plugin's compilation unit.</p>
<p>Larger functions that live in the main engine are called via an exported C function (plugin calls MyObject_somefunction(MyObject *obj) which in the engine just ... | 6,494 |
<p>As I said in the title there is some issue with my z axis steppers. They will make a humming sound and vibrate a little but won't actually spin. I'm fairly sure this is an issue with the firmware (but I might be totally wrong) since they turn when the wires are switched with the ones for the Y axis and swapping the ... | <p>Try connecting Y-motor to your Z ports. If Y-motor will behave like Z-motors, then there's problem with your Z ports, be it hardware or software. I'm not a RAMPS user, but have heard that there is voltage regulator for every motor port. Sounds like your motors may be underpowered.</p>
| <p>Hello it's seems to be the voltage regutaltor on the steppers drivers for the nema motors. Check to adjust the voltage with a multimeter connecting the red pin from the multimeter on the voltage regulator on the driver and the black pin on the GND pin on the ramps 12v connector.</p>
<p>Also make sure that you have ... | 748 |
<p>What is the shortcut to open a file within your solution in Visual Studio 2008 (+ Resharper)?</p>
| <p><kbd>Ctrl</kbd> + <kbd>T</kbd> (ReSharper, Goto, type) will open a class file for you.</p>
<p>Looks like <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>T</kbd> opens files.</p>
| <p>It depends on the key mapping that you have set.
With default keymapping: Do <kbd>Ctrl</kbd> + <kbd>T</kbd> to open a type and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>T</kbd> to open a file.
With IntelliJ like mapping : Do <kbd>Ctrl</kbd> + <kbd>N</kbd> to open a type and <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd... | 7,536 |
<p>I'm using MinGW with GCC 3.4.5 (mingw-special vista r3).</p>
<p>My C application uses a lot of stack so I was wondering is there any way I can tell programatically how much stack is remaining so I can cleanly handle the situation if I find that I'm about to run out.</p>
<p>If not what other ways would you work aro... | <p>The getrusage function gets you the current usage . (see <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/getrusage.2.html" rel="noreferrer"><code>man getrusage</code></a>).</p>
<p>The <code>getrlimit</code> in Linux would help fetching the stack size with the <code>RLIMIT_STACK</code> parameter.</p>
... | <p>maybe this will help for Windows platform only:</p>
<p>in the PE header (IMAGE_NT_HEADERS) of your exe there are some records such as:</p>
<pre>
typedef struct _IMAGE_NT_HEADERS {
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
IMAGE_OPTIONAL_HEADER32 OptionalHeader;
} IMAGE_NT_HEADERS32, *PIMAGE_NT_HE... | 7,742 |
<p>Hy, does anyone worked with N2 Content Management System(<a href="http://www.codeplex.com/n2" rel="nofollow noreferrer">http://www.codeplex.com/n2</a>).
If yes, how does it perform, performance wise(under heavy load)?
It seems pretty simple and easy to use.</p>
<p>Adrian</p>
| <p>Maybe try this question at <a href="http://www.codeplex.com/n2/Thread/List.aspx" rel="nofollow noreferrer">http://www.codeplex.com/n2/Thread/List.aspx</a></p>
<p>They might be able to tell you about performance limitations or bottlenecks.</p>
| <p>I tried it and it looked promising at first but quickly had issues actually deploying it to a Medium Trust host.</p>
| 3,332 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.