instruction
stringlengths
27
22.5k
chosen
stringlengths
27
28.2k
rejected
stringlengths
19
24.9k
__index_level_0__
int64
0
10k
<p>I am looking to buy an Ender-3 Pro, but the place I'm looking to buy from has this picture:</p> <p><a href="https://i.stack.imgur.com/RY2ds.jpg" rel="nofollow noreferrer" title="Confusing 3D printer publicity photo"><img src="https://i.stack.imgur.com/RY2ds.jpg" alt="Confusing 3D printer publicity photo" title="Conf...
<p>There is no such thing as a <em>Junior</em><sup>1</sup>, you can see the official Creality range of FDM printers on the <a href="https://www.creality.com/product/fdm-3d-printer" rel="nofollow noreferrer">FDM 3D PRINTER</a> page, on their web site.</p> <p>Upon a cursory comparison of the photo it is one of these:</p>...
<p>That is an Ender 3, with the vertical PSU, the older interface, and many tweaks like the drawer and filament loading knob isn't present.</p> <p>Consider the Ender 3 V2 instead, which is an iteration on the same basic design and is newer.</p> <p>Personally I found it cheaper to buy the V2 direct from Creality's websi...
2,065
<p>My first printer is Delta style Kossel clone and I have bad luck with Print In Place (PIP) models, especially with hinges. I suspect that my printer just can't achieve low enough tolerances to make the hinges work. </p> <p>Are there any tricks I can employ to get better prints for PIP models?</p>
<p>Delta printers are considered to be able to be accurate printers cause of the limited weight in the head (using Bowden extruder setup). The positioning can be very accurate (limited weight, limited overshooting) and because of the limited amount of weight, the print speed can be increased.</p> <p>An <a href="http:/...
<p>It is possible that your printer is over-extruding, and this will certainly give less satisfactory results when you try to print models which have internal clearances. </p> <p>It is also possible that you have some calibration issues which affect orthogonality, x/y/z dimensions or flatness in each axis.</p> <p>In ...
952
<p>I've having trouble directly accessing the <strong>Win32_OperatingSystem</strong> management class that is exposed via WMI.</p> <p>It is a singleton class, and I'm pretty certain "Win32_OperatingSystem=@" is the correct path syntax to get the instance of a singleton.</p> <p>The call to InvokeMethod produces the ex...
<p>Win32_OperatingSystem is not a singleton class - if you check its qualifiers, you'll see that there is no Singleton qualifier defined for it, so you'll have to use ManagementObjectSearcher.Get() or ManagementClass.GetInstances() even though there is only one instance of the class. Win32_OperatingSystem key property ...
<p>I'm not 100% sure of the answer, but have you tried using reflector to look at what ManagementObjectSearcher does? It may give you some clue as to what you are doing wrong.</p>
8,008
<p>I know Microsoft has made efforts in the direction of semantic and cross-browser compliant XHTML and CSS, but it still seems like a PitA to pull off elegant markup. I've downloaded and tweaked the CSS Friendly Adapters and all that. But I still find myself frustrated with bloated and unattractive code.</p> <p>Is el...
<p>The easiest way to generate elegant HTML and CSS is to use MVC framework, where you have much more control over HTML generation than with Web Forms.</p>
<p>As long as you use the Visual Studio designer, it's probably a pipe dream. I write all of my ASP.NET code (all markup, and CSS) by hand, simply to avoid the designer. Later versions of Visual Studio have gotten much better at not mangling your .aspx/.ascx files, but they're still far from perfect.</p>
5,323
<p>Obviously, that's 64-bit windows.</p> <p>Also, what's the maximum amount of memory a single 64-bit process can use? I was kind of counting on using it all... (Yes, I know what I'm doing, please don't tell me that if I need that much RAM i must be doing something wrong)</p> <p>Also, is this the same for a .Net 2.0...
<p>What version of windows? it differs from XP to vista and from home to business versions of vista, and I would guess again for server.</p> <p>see <a href="http://msdn.microsoft.com/en-us/library/aa366778.aspx" rel="nofollow noreferrer">here for more info on maximum ram for diffrent windows versions</a></p> <p>for W...
<p>Something we found out recently: with MySQL running on Win32, you can only use up to 2GB per process. On Win64, the memory is not managed as well and a single MySQL instance will run your memory into the ground. Ours used up all 16GB we have. So regarding how much memory 1 64-bit process can use: the answer is howev...
5,370
<p>I'm trying to create an SSIS package that takes data from an XML data source and for each row inserts another row with some preset values. Any ideas? I'm thinking I could use a DataReader source to generate the preset values by doing the following:</p> <pre><code>SELECT 'foo' as 'attribute1', 'bar' as 'attribute2...
<p>I've never tried it, but it looks like you might be able to use a <a href="http://msdn.microsoft.com/en-us/library/ms141069(SQL.90).aspx" rel="nofollow noreferrer">Derived Column transformation</a> to do it: set the expression for attribute1 to <code>"foo"</code> and the expression for attribute2 to <code>"bar"</cod...
<p>I would probably switch to using a Script Task and place your logic in there. You may still be able leverage the File Reading and other objects in SSIS to save some code.</p>
7,407
<p>In Linux, what is the difference between <code>/dev/ttyS0</code> and <code>/dev/ttys0</code>?</p> <p>I know that the first is a serial port, but what about the second, with the small <code>s</code>?</p>
<p><a href="http://www.linuxselfhelp.com/HOWTO/Text-Terminal-HOWTO-6.html" rel="nofollow noreferrer">see this</a></p> <blockquote> <p>For a pseudo terminal pair such as ptyp3 and ttyp3, the pty... is the master or controlling terminal and the tty... is the slave. There are only 16 ttyp's: ttyp0-ttypf (f is a...
<p>And this: <a href="http://lists.opensuse.org/archive/opensuse/2003-12/msg02404.html" rel="nofollow noreferrer">http://lists.opensuse.org/archive/opensuse/2003-12/msg02404.html</a></p>
4,210
<p>I'm looking at using OpenID for my authentication scheme and wanted to know what the best .NET library is to use for MVC specific applications?</p> <p>thx</p>
<p><a href="http://code.google.com/p/dotnetopenid/" rel="nofollow noreferrer">.Net OpenID project</a> is the best library to use right now that I know of. I think SO used it also. The source includes a sample ASP.NET MVC project using the library.</p> <p>Scott Hanselman did a <a href="http://www.hanselman.com/blog/T...
<p>We have been using .Net Open Id project and are pretty happy with it so far. Andrew Arnott does a great work of answering the queries and suggesting workarounds if you are struck. Give it a try and you will love it :)</p>
7,154
<p>In the code below I am using a recursive CTE(Common Table Expression) in SQL Server 2005 to try and find the top level parent of a basic hierarchical structure. The rule of this hierarchy is that every CustID has a ParentID and if the CustID has no parent then the ParentID = CustID and it is the highest level.</p> ...
<p>If you just want want the highest recursion depth couldn't you do something like this?Then, when you actually query the CTE just look for the row with max(Depth)? Like so:</p> <pre><code>DECLARE @LookupID int --Our test value SET @LookupID = 1; WITH cteLevelOne (ParentID, CustID, Depth) AS ( SELECT a.P...
<p>First the cte will not be finished if any of the parent child are same. As it is a recursive CTE it has to be terminated. Having Parent and cust id same , the loop will not end.</p> <p>Msg 530, Level 16, State 1, Line 15 The statement terminated. The maximum recursion 100 has been exhausted before statement complet...
5,577
<p>I am working on a cocoa software and in order to keep the GUI responsive during a massive data import (Core Data) I need to run the import outside the main thread.</p> <p>Is it safe to access those objects even if I created them in the main thread without using locks <strong>if</strong> I don't explicitly access th...
<p>With Core Data, you should have a separate managed object context to use for your import thread, connected to the same coordinator and persistent store. You cannot simply throw objects created in a context used by the main thread into another thread and expect them to work. Furthermore, you cannot do your own lock...
<p>The whole point of using locks is to ensure that two threads don't try to access the same resource. If you can guarantee that through some other mechanism, go for it.</p>
9,274
<p>I have always thought that the .equals() method in java should be overridden to be made specific to the class you have created. In other words to look for equivalence of two different instances rather than two references to the same instance. However I have encountered other programmers who seem to think that the de...
<p>Overriding the equals method is necessary if you want to test equivalence in standard library classes (for example, ensuring a java.util.Set contains unique elements or using objects as keys in java.util.Map objects).</p> <p>Note, if you override equals, ensure you honour the API contract as described in the docume...
<p>The Equals method is intended to compare references. So it should not be overriden to change its behaviour.</p> <p>You should create a new method to test for equivalence in different instances if you need to (or use the CompareTo method in some .NET classes)</p>
3,728
<p>I am working on a Customer Server Control that extends another control. There is no problem with attaching to other controls on the form.</p> <p>in vb.net: <code>Parent.FindControl(TargetControlName)</code></p> <p>I would like to pass a method to the control in the ASPX markup. </p> <p>for example: <code>&lt;c:...
<p>If you want to be able to pass a method in the ASPX markup, you need to use the <code>Browsable</code> attribute in your code on the event.</p> <p>VB.NET</p> <pre class="lang-vb prettyprint-override"><code>&lt;Browsable(True)&gt; Public Event InitializeStuffCallback </code></pre> <p>C#</p> <pre><code>[Browsable(...
<p>Your workaround is actually the better answer. If you have code that you must run at a certain part of your control's lifecycle, you <strong>should</strong> expose events to let the container extend the lifecycle with custom functionality.</p>
5,315
<p>I bought a buddha statue and I would like to scan it using photogrammetry and publish the result. </p> <p><strong>Am I allowed to do that?</strong></p> <p>Is this the same like scanning a book and publishing it? Sketchfab on the other hand is full of 3d models of commercial products.</p>
<p>If the design was made from an artist and is not public domain, than you should not upload that scan without the (written) permission of the creator of the design. Espacially a scan of a decorative object will likely be protected, so costumers buy the original instead of printing itself or buy a printed version. If ...
<p>First thing to do is get a lawyer skilled in copyright law as applicable where you live. It's going to depend in no small part on whether your scanned model is considered a copy or a transformative work of art. </p> <p>Personally, I see scanning an object as similar to photographing it (or sketching it). Lots of...
1,000
<p>I need to find/create an application that will create employee web usage reports from HTTP proxy logs. Does anyone know of a good product that will do this?</p> <p><em>@Joe Liversedge - Good point. I don't have to worry about this, however, as I am the only person in my company with the know-how to pull off an SSH...
<p>Here's a scenario: What's to stop two employees, let's call them 'Eric' and 'Tim', from running their own little SSH tunnel back home to prevent 'the Man', in this case <em>you</em>, from narc'ing out their use of the Internet. Now you have a useless report.</p> <p>If you're serious about getting real data, you'll ...
<p>or Sensage... which has a more formalized model {more like a normal relational database} of data - at the expense of requiring a little more thought and setup cost to start consuming logs. </p> <p>I don't think that they offer a free low-volume version like splunk do though.</p>
6,884
<p>If I have .Net Form with a component/object such as a textbox that I need to access from a parent or other form I obviously need to "upgrade" the modifier to this component to an Internal or Public level variable.</p> <p>Now, if I were providing a public variable of an int or string type etc. in my form class I wou...
<p>"<em>However, the VS designer doesn't seem to implement such Getters/Setters for those public objects that are components on a form (and therefore does not comply with good programming practice).</em>"</p> <p>If you mean the controls you're dragging and dropping onto the form, these are marked as private instance m...
<p>I always do that, and if you ARE following an MVP design creating getter/setters for your view components would be a design requirement.</p> <p>I do not understand what you mean by "does not comply with good programming practice". Microsoft violates <em>a lot</em> of good programming practices to make it easier to ...
2,785
<p>I'm trying to use <strong>NIS</strong> for authentication on a st of machines. I had to change one of the user ID numbers for a user account on the NIS server (I changed the userid for <code>username</code> from 500 to 509 to avoid a conflict with a local user account with id 500 on the clients). The problem is that...
<p>John O pointed me in the right direction. </p> <p>He is right. If you set "files: 0" in /etc/ypserv.conf, you can get ypserv to not cache files. If you have to restart ypserv after each make, this is the problem.</p> <p>The real solution is to look in /var/log/messages for this error: </p> <pre><code>ypserv[]...
<p>hmm, you're not supposed to have to restart the ypserver to have updates take effect; the <em>make</em> in /var/yp ought to do the trick. you might want to check the Makefile in /var/yp to be sure it's triggering on the right conditions (namely, passwd.by* should check the timestamp on /etc/passwd in some fashion,...
5,268
<p>What is the best approach to make sure you only need to authenticate once when using an API built on WCF?</p> <p>My current bindings and behaviors are listed below</p> <pre><code> &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="wsHttp"&gt; &lt;security mode="Transpor...
<p>If you're on an intranet, Windows authentication can be handled for "free" by configuration alone. </p> <p>If this isn't appropriate, token services work just fine, but for some situations they may be just too much.</p> <p>The application I'm working on needed bare-bones authentication. Our server and client run i...
<p>While I hate to give an answer I'm not 100% certain of, the lack of responses so far makes me think a potentially correct answer might be okay in this case.</p> <p>As far as I'm aware there isn't the kind of session token mechanism you're looking for out-of-the-box with WCF which means you're going to have to do so...
5,066
<p>I have a huge ear that uses log4j and there is a single config file that is used to set it up. In this config file there is no mention of certain log files but, additional files apart from those specified in the config file get generated in the logs folder. I've searched for other combinations of (logger|log4j|log)....
<p>Try placing a breakpoint in the File class' constructors and the mkdir and createNewFile methods. Generally, code will use the File class to create its files or directories. You should have the Java source code for these classes included with your JVM.</p>
<p>Formally SysInternal's, now Microsoft's Process Explorer <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx</a></p> <p>"Find" menu item -> "Find Handle or DLL..."</p>
9,088
<p>This query works great:</p> <pre><code>var pageObject = (from op in db.ObjectPermissions join pg in db.Pages on op.ObjectPermissionName equals page.PageName where pg.PageID == page.PageID select op) .SingleOrDefault(); </code></pre> <p>I get a ...
<p>You can use anonymous types for this, i.e.:</p> <pre><code>var pageObject = (from op in db.ObjectPermissions join pg in db.Pages on op.ObjectPermissionName equals page.PageName where pg.PageID == page.PageID select new { pg, op }).SingleOrDefault(); </code></pre...
<p>change </p> <pre><code>select op) </code></pre> <p>to</p> <pre><code>select new { op, pg }) </code></pre>
5,237
<p>Context: I'm in charge of running a service written in .NET. Proprietary application. It uses a SQL Server database. It ran as a user member of the Administrators group in the local machine. It worked alright before I added the machine to a domain.</p> <p>So, I added the machine to a domain (Win 2003) and changed ...
<p>There are two types of localisation in .NET, both the settings for the cultures can be found in these variables (fire up a .NET command line app on the machine to see what it says):</p> <p>System.Thread.CurrentThread.CurrentCulture &amp; System.Thread.CurrentThread.CurrentUICulture</p> <p><a href="http://msdn.micr...
<p>Great, I created the console app and indeed, the app is not crazy, CurrentCulture is in spanish, but for THAT User in THAT machine only. If I run the console app as another user it returns english for all cultures.</p> <p>Should I open a new question asking where are user-wise locale settings?</p>
8,347
<p>Having tries to target two of these environments at the same time I can safely say the if you have to use a database etc. you end up having to write unique code for that environment. Have you got a great way to handle this situation?</p>
<p>If you <em>do</em> find you need to write unique code for an environment, use pythons </p> <pre><code>import mymodule_jython as mymodule import mymodule_cpython as mymodule </code></pre> <p>have this stuff in a simple module (''module_importer''?) and write your code like this:</p> <pre><code>from module_importe...
<p>I'm pretty sure you already know this but unfortunately Jython <a href="http://www.jython.org/Project/userfaq.html#is-jython-the-same-language-as-python" rel="nofollow noreferrer">can't load c extension modules.</a></p>
7,705
<p>I am wondering how people that use standalone 3D printers (printers that have the ability to print autonomously from SD Card) feed in filament, prime the printhead and/or change filaments without a laptop ?</p> <p>Do the printers have a menu to arrange all these tasks ? I often only see the options to preheat the h...
<p>My printer (IdeaWerk 150) is very basic and doesn't have any options for this from the screen.</p> <p>I wrote a really simple GCODE file that brings the nozzle up to temperature, then runs the extruder for a few seconds, then waits, then extrudes for a bit again. I think it does this 3 or 4 times then stops. I can ...
<p>There are options for tablets. They are running software <strong><a href="http://www.3ders.org/articles/20130408-control-3d-printer-with-pengpod-touch-screen-linux-tablet.html" rel="nofollow noreferrer">(for example)</a></strong> on some device that has internal storage, wifi, USB connection etc. You can buy a new t...
180
<p>XML, granted, is very useful, but can be quite verbose. What alternatives are there and are they specialised for any particular purpose? Library support to interrogate the contents easily is a big plus point.</p>
<p>There seems to be a lot of multi-platform support for <a href="http://www.json.org/" rel="noreferrer">JSON</a>.</p>
<p>If you're asking in the perspective of a DSL, <a href="http://www.gnu.org/software/guile/guile.html" rel="nofollow noreferrer">Guile Scheme</a> could help, as already suggested with the S-expressions.</p> <p>Personally I also use JSON for AJAX transactions.</p>
6,592
<p>I just saw a <a href="https://stackoverflow.com/questions/5516/what-happened-to-all-of-the-java-developers-how-can-i-get-started-in-net#5522">comment of suggesting J#</a>, and it made me wonder... is there a real, beneficial use of J# over Java? So, my feeling is that the only reason you would even consider using J...
<p>J# is no longer included in VS2008. Unless you already have J# code, you should probably stay away.</p> <p>From <a href="http://msdn.microsoft.com/en-us/vjsharp/default.aspx" rel="noreferrer">j# product page:</a></p> <blockquote> <p>Since customers have told us that the existing J# feature set largely meets ...
<p>Strongly agree that syntactically C# beats Java hands down, so there is really no reason to lament the demise of j#. Now trying to get c# compiling to Java bytecode might be an interesting move as Sun's hotspot jvm is great software.</p> <p>Or, for a bit of fun with what might well become the next generation of Ja...
2,743
<p>I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is re...
<p>I just this week put together some slides and demo code for doing 2d graphics using OpenGL from python using the library pyglet. Here's a representative post: <a href="https://www.tartley.com/posts/pyglet-week-2-better-vertex-throughput/" rel="nofollow noreferrer">Pyglet week 2, better vertex throughput</a> (or <a h...
<p>QT's Canvas an QPainter are very good for this job if you'd like to use C++. and it is cross platform.</p> <p>There is a python binding for QT but I've never used it.</p> <p>As for Java, using SWT, pixel level manipulation of a canvas is somewhat difficult and slow so I would not recommend it. On the other hand Sw...
9,256
<p>I converted my company's calendar to XSL and changed all the tables to divs. It worked pretty well, but I had a lot of 8 day week bugs to work out initially owing to precarious cross-browser spacing issues. But I was reading another post regarding when to use tables v. divs and the consensus seemed to be that you sh...
<p>A calendar is the perfect reason to use a table! Calendars inherently present tabular data and HTML tables are good at presenting tabular data. And HTML table markup provides nearly all the CSS hooks you need to associate CSS selectors with various parts of the table to dress it up. </p> <p>I'm all for using DIVs f...
<p>Tables are for displaying tabular data. So I would say <code>&lt;table&gt;</code> is ideal.</p>
6,357
<p>What is the Reuse/Release Equivalence Principle and why is it important?</p>
<p>The Reuse/Release Equivalence Principle (REP) says:</p> <blockquote> <p>The unit of reuse is the unit of release. Effective reuse requires tracking of releases from a change control system. The package is the effective unit of reuse and release.</p> </blockquote> <p><b>The unit of reuse is the unit of release</b></p...
<p>From Clean Architecture, by Robert Martin.</p> <blockquote> <p>The Reuse/Release Equivalence Principle (REP) is a principle that seems obvious, at least in hindsight. People who want to reuse software components cannot, and will not, do so unless those components are tracked through a release process and ar...
8,869
<p>I hear that heated beds can help with removing finished prints, but not all printers have them! </p> <ul> <li>Is this a nice to have or must have feature? </li> <li>Are there any downsides to heated beds?</li> </ul>
<p>I'll try to give it a shot as the other answer (perfectly sound answer b.t.w.) does explain <strong>"how"</strong> we use heated beds, but not <strong>"why"</strong> they are actually needed for good prints.</p> <p>Plastics or polymers are mostly <strong>amorphous</strong> (no macro crystalline structure) and usual...
<p>There is no simple answer. I will only cover the three main filaments: PLA, ABS, and PETG.</p> <ul> <li><p><strong>ABS</strong>: </p> <ul> <li>ABS likes to warp, and dislikes breezes and temperature changes. so a heat bed is required, as is some way to keep breezes off and heat in (I use a plastic tarp over my pri...
870
<p>Not very technical, but... I have to implement a bad words filter in a new site we are developing. So I need a "good" bad words list to feed my db with... any hint / direction? Looking around with google I <a href="http://urbanoalvarez.es/blog/2008/04/04/bad-words-list/" rel="noreferrer">found this</a> one, and it's...
<p>Beware of <a href="http://thedailywtf.com/Articles/The-Clbuttic-Mistake-.aspx" rel="noreferrer">clbuttic mistakes</a>.</p> <blockquote> <p>"Apple made the clbuttic mistake of forcing out their visionary - I mean, look at what NeXT has been up to!"</p> <p>Hmm. "clbuttic".</p> <p>Google "clbuttic" - thous...
<p>In researching this topic I determined that what was needed was more than just a list that does arbitrary replacements. I have built a web service that allows you to identify the level of 'cleanliness' you desire. It also makes an effort to identify false positives - i.e. where a word may be bad in one context but n...
4,412
<p>I'm a beginner. I've a Printrbot Play with a heated bed add-on. I'm using it exclusively with PLA.</p> <p>It worked great initially, but then I took the nozzle out and put it back in, and the Z calibration was lost (and I didn't know the calibration was a thing). As a result, I started having issues with the piece ...
<p><strong>Options to check</strong> (in order of probability of occurenece and success):</p> <ol> <li>Z-calibration</li> </ol> <p>Maybe you should perform calibration again. It's possible that nozzle is now too close which causes the filament is spread on the heatbed, which causes that the bottom surface is "too fla...
<p>When I started, I got a lot of failed prints due to loss of adhesion. It still happens but much rarer. Dialling in settings improved that, but downside is that parts stay stuck to my glass bed really well even when completely cooled off.</p> <p>I now use a 30mm paint scraper to peel the brim up as far around the m...
373
<p>This line in YUI's <a href="http://developer.yahoo.com/yui/reset/" rel="nofollow noreferrer">Reset CSS</a> is causing trouble for me:</p> <pre class="lang-css prettyprint-override"><code>address,caption,cite,code,dfn,em,strong,th,var { font-style: normal; font-weight: normal; } </code></pre> <p>It makes my...
<p>If your strong declaration comes after YUI's yours should override it. You can force it like this:</p> <pre><code>strong, b, strong *, b * { font-weight: bold; } em, i, em *, i * { font-style: italic; } </code></pre> <p>If you still support IE7 you'll need to add <code>!important</code>.</p> <pre><code>strong, b,...
<p>I thought I had an ideal solution:</p> <pre><code>strong, b { font-weight: bold; font-style: inherit; } em, i { font-style: italic; font-weight: inherit; } </code></pre> <p>Unfortunately, Internet Explorer doesn't support "inherit." :-(</p>
4,046
<p>At my day job we have load balanced web servers which talk to load balanced app servers via web services (and lately WCF). At any given time, we have 4-6 different teams that have the ability to add new web sites or services or consume existing services. We probably have about 20-30 different web applications and co...
<p>The easiest way is to look through the logs, but if that doesn't include the referrer than you may also want to monitor what is going out from your web to the app server. You can use tools like Wireshark or Microsoft Network Monitor to see this traffic.</p> <p>The other "solution" and I use this loosely is to bind...
<p>You need a service registry (UDDI??)... If you had a means to catalog these services and their consumers, it would make this job of dependency discovery a lot easier. That is not an easy solution, though. It takes time and documentation to get a catalog in place.</p> <p>I think the quickest solution would be to que...
6,641
<p>Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class?</p> <pre><code>class Base { public: bool someGuaranteedResult() { return true; } }; class Child : public Base { public: bool someGuaranteedResult() { return false; /*...
<p>A couple of ideas:</p> <ol> <li>Make your function private.</li> <li>Do not make your function virtual. This doesn't actually prevent the function from being shadowed by another definition though.</li> </ol> <p>Other than that, I'm not aware of a language feature that will lock away your function in such a way whi...
<p>C++ methods are private and un-overridable by default.</p> <ul> <li>You cannot override a private method</li> <li>You cannot override a non-<code>virtual</code> method</li> </ul> <p>Are you perhaps referring to overloading?</p>
3,812
<p>I'd like some advice regarding defects on my print : <a href="https://i.stack.imgur.com/5x4u2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5x4u2.jpg" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/3CgUe.jpg" rel="nofollow noreferrer"><img src="https://i.stack...
<p>If you break up a large piece into multiple smaller pieces and properly glue them together, you basically add stiffeners (as a result of printing walls). This could lead to a more stiff model; this might have been confused by calling large prints more brittle opposed to constructed models.</p> <p>If printing is con...
<p>I'd recommend getting the object to fit together by design, rather than glue - though I tend (if the item is never to be disassembled) use Zap-a-gap - that stuff sticks like crazy though you must not squeeze the parts together but let it naturally sit.</p>
1,354
<p>How would you find the fractional part of a floating point number in PHP?</p> <p>For example, if I have the value <code>1.25</code>, I want to return <code>0.25</code>.</p>
<pre><code>$x = $x - floor($x) </code></pre>
<p>To stop the confusion on this page actually this is the best answer, which is fast and works for both positive and negative values of $x:</p> <pre><code>$frac=($x&lt;0) ? $x-ceil($x) : $x-floor($x); </code></pre> <p>I ran speed tests of 10 million computations on PHP 7.2.15 and even though both solutions give the ...
7,360
<p>I'm trying to set up a Creality Sprite Extruder on my Ender 3 Pro without using the kit (installing the extruder alone).</p> <p>I can see <a href="https://store.creality.com/products/sprite-extruder-pro-kit-300%E2%84%83-printing?official-website-top=&amp;spm=..product_0f7e137a-4505-43ca-958f-022f372863a0.products_di...
<p>Since I have been unable to find a way to fix the E3D V6 clone hotend I have instead replaced it with a Creality Mk 8 that I had on-hand, which has so far worked flawlessly.</p> <p>I am assuming that the improved performance is related to the use of a shorter nozzle and/or the Bowden tube butting directly against th...
<p>I had issues with my all metal hot-end where I got heat creep. I ended up doing e-steps, PID tune, and ensuring my speed wasn't too slow either. Is your printer in an enclosure? I found that mine being in an enclosure caused the hotend to not cool sufficiently, so I had to lower the hot bed temp by 10 degrees and th...
2,171
<p>What is a good challenge to improve your skills in object oriented programming?</p> <p>The idea behind this poll is to provide an idea of which exercises are useful for learning OOP.</p> <p>The challenge should be as language agnostic as possible, requiring either little or no use of specific libraries, or only th...
<p><a href="https://www.itmaybeahack.com/homepage/books" rel="nofollow noreferrer">Building Skills in Object-Oriented Design</a> is a free book that might be of use.</p> <p>The description is as follows:</p> <p>&quot;The intent of this book is to help the beginning designer by giving them a sequence of interesting and ...
<p>A given task has very little to do with being "OOP", it's more in how you grade it.</p> <p>I would look at the Refactoring book, chapter 3, and make sure none of the bad code smells exist in the solution. Or, more importantly, go over ones that do apply.</p> <p>Most importantly, watch for the existence of setters...
8,492
<p>I'm trying to add support for stackoverflow feeds in my rss reader but <strong>SelectNodes</strong> and <strong>SelectSingleNode</strong> have no effect. This is probably something to do with ATOM and xml namespaces that I just don't understand yet.</p> <p>I have gotten it to work by removing all attributes from th...
<p>Don't confuse the namespace names in the XML file with the namespace names for your namespace manager. They're both shortcuts, and they don't necessarily have to match.</p> <p>So you can register "<a href="http://www.w3.org/2005/Atom" rel="noreferrer">http://www.w3.org/2005/Atom</a>" as "atom", and then do a Select...
<p>I just want to use..</p> <pre><code>XmlNodeList itemList = xmlDoc.DocumentElement.SelectNodes("entry"); </code></pre> <p>but, what namespace do the <strong>entry</strong> tags fall under? I would assume xmlns="http://www.w3.org/2005/Atom", but it has no title so how would I add that namespace?</p> <pre><code>XmlD...
4,440
<p>I've created a learning application using <a href="http://jimneath.org/2008/09/09/bort-base-rails-application/" rel="noreferrer">Bort</a>, which is a base app that includes Restful Authentication and RSpec. I've got it up and running and added a new object that requires users to be logged in before they can do anyt...
<p>I have a very similar setup, and below is the code I'm currently using to test this stuff. In each of the <code>describe</code>s I put in:</p> <pre><code>it_should_behave_like "login-required object" def attempt_access; do_post; end </code></pre> <p>If all you need is a login, or</p> <pre><code>it_should_behave_l...
<p>To mock a user being logged in, I hack into the controller to set <code>@current_user</code> manually:</p> <pre><code>module AuthHelper protected def login_as(model, id_or_attributes = {}) attributes = id_or_attributes.is_a?(Fixnum) ? {:id =&gt; id} : id_or_attributes @current_user = stub_model(model, ...
9,045
<p>I need to create a linked server to a DB2 database on a mainframe. Has anyone done this successfully on a 64-bit version of SQL Server 2005? If so, which provider and settings were used?</p> <p>It's important that the linked server work whether we are using a Windows authenticated account to login to SQL Server or ...
<p>We had this same issue with a production system late last year (sept 2007) and the official word from our Microsoft contact was that they had a 64 bit oledb driver to connect to ASI/DB2 <strong>but</strong> it was in <strong>BETA</strong> at the time.</p> <p>Not sure when it will be out of beta but that was the new...
<p>What provider are you using for Sql 2000? I'm pretty sure MS has an x64 OLEDB driver for DB2 (part of Host Integration Server, but available as a separate download). IBM has x64 for .NET and ODBC, and possible OLEDB as well (though it's a PITA to find).</p> <p>Once you get the linked server setup, I'm pretty sure a...
3,208
<p>Is there an easy way to read an entire Access file (.mdb) into a DataSet in .NET (specifically C# or VB)?</p> <p>Or at least to get a list of tables from an access file so that I can loop through it and add them one at a time into a DataSet?</p>
<p>Thanks for the suggestions. I was able to use those samples to put together this code, which seems to achieve what I'm looking for.</p> <pre><code>Using cn = New OleDbConnection(connectionstring) cn.Open() Dim ds As DataSet = new DataSet() Dim Schema As DataTable = cn.GetOleDbSchemaTable(OleDbSchemaGu...
<p>There is a discussion on this point in <a href="http://forum.lessthandot.com/viewtopic.php?f=95&amp;t=1262" rel="nofollow noreferrer">Less Than Dot</a>. Here is one example of code from the discussion.</p> <pre><code> public DataTable GetColumns(string tableName) { string[] restrictions = new string[4...
6,859
<p>What is the Java equivalent of PHP's <code>$_POST</code>? After searching the web for an hour, I'm still nowhere closer.</p>
<p>Your <code>HttpServletRequest</code> object has a <code>getParameter(String paramName)</code> method that can be used to get parameter values. <a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getParameter(java.lang.String)" rel="noreferrer">http://java.sun.com/javaee/5/docs/api/javax...
<p>For getting all post parameters there is Map which contains request param name as key and param value as key.</p> <pre><code>Map params = servReq.getParameterMap(); </code></pre> <p>And to get parameters with known name normal</p> <pre><code>String userId=servReq.getParameter("user_id"); </code></pre>
2,718
<p>What profilers have you used when working with .net programs, and which would you particularly recommend?</p>
<p>I have used <a href="http://www.jetbrains.com/profiler/" rel="noreferrer">JetBrains dotTrace</a> and <a href="http://www.red-gate.com/products/ants_performance_profiler/" rel="noreferrer">Redgate ANTS</a> extensively. They are fairly similar in features and price. They both offer useful performance profiling and qui...
<p>I've found plenty of problems in a big C# app using <a href="https://stackoverflow.com/questions/375913/what-can-i-use-to-profile-c-code-in-linux/378024#378024">this</a>.</p> <p>Usually the problem occurs during startup or shutdown as plugins are being loaded, and big data structures are being created, destroyed, s...
2,596
<p>I've got a multiline textBox that I would like to have a label on the form displaying the current line and column position of, as Visual Studio does.</p> <p>I know I can get the line # with GetLineFromCharIndex, but how can I get the column # on that line?</p> <p>(I really want the Cursor Position on that line, no...
<pre><code>int line = textbox.GetLineFromCharIndex(textbox.SelectionStart); int column = textbox.SelectionStart - textbox.GetFirstCharIndexFromLine(line); </code></pre>
<p>Off the top of my head, I think you want the SelectionStart property.</p>
9,198
<p>I've been working with <a href="http://msdn.microsoft.com/en-us/library/aa479030.aspx" rel="noreferrer">providers</a> a fair bit lately, and I came across an interesting situation where I wanted to have an abstract class that had an abstract static method. I read a few posts on the topic, and it sort of made sense, ...
<p>Static methods are not <em>instantiated</em> as such, they're just available without an object reference.</p> <p>A call to a static method is done through the class name, not through an object reference, and the Intermediate Language (IL) code to call it will call the abstract method through the name of the class t...
<p>The abstract methods are implicitly virtual. Abstract methods require an instance, but static methods do not have an instance. So, you can have a static method in an abstract class, it just cannot be static abstract (or abstract static).</p>
2,547
<p>In my web application there is a process that queries data from all over the web, filters it, and saves it to the database. As you can imagine this process takes some time. My current solution is to increase the page timeout and give an AJAX progress bar to the user while it loads. This is a problem for two reasons ...
<p>To avoid excessive architecture astronomy, I often <a href="http://encosia.com/2007/10/03/easy-incremental-status-updates-for-long-requests/" rel="nofollow noreferrer">use a hidden iframe to call the long running process and stream back progress information</a>. Coupled with something like <a href="http://www.bram....
<ol> <li>How are you querying the remote data?</li> <li>How often does it change?</li> <li>Are the results something that could be cached for a period of time?</li> <li>How long a period of time are we actually talking about here?</li> </ol> <p>The 'best method' is likely to depend in some way on the answers to these ...
9,869
<p>How can i format currency related data in a manner that is culture aware in JavaScript?</p>
<p>Dojo has a <a href="http://api.dojotoolkit.org/jsdoc/dojo/HEAD/dojo.currency.format" rel="nofollow noreferrer">currency formatter</a> that's locale aware. </p> <p>If you don't want to include Dojo in your project just for this function, then perhaps you can localize the currency in your back-end?</p>
<p>there is a Number.localeFormat function but I'm not sure it's what your after</p> <p><a href="http://msdn.microsoft.com/en-gb/library/bb310813.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-gb/library/bb310813.aspx</a></p>
7,468
<p>I came across <a href="http://www.ddj.com/cpp/184403758" rel="noreferrer">this article</a> written by Andrei Alexandrescu and Petru Marginean many years ago, which presents and discusses a utility class called ScopeGuard for writing exception-safe code. I'd like to know if coding with these objects truly leads to be...
<p>It definitely improves your code. Your tentatively formulated claim, that it's obscure and that code would merit from a <code>catch</code> block is simply not true in C++ because RAII is an established idiom. Resource handling in C++ <em>is</em> done by resource acquisition and garbage collection is done by implicit...
<p>My experience shows that usage of <code>scoped_guard</code> is far inferior to any of the short reusable RAII classes that you can write by hand.</p> <p>Before trying the <code>scoped_guard</code>, I had written RAII classes to</p> <ul> <li>set GLcolor or GLwidth back to the original, once I've drawn a shape</li> <l...
7,112
<p>I'm developing an MFC application and I've recently been searching for a good method to remove the icon from a Windows title bar, but retain the close button. The two obvious candidate solutions are turning off the system menu style or using the tool window style, but I would prefer not to disable the system menu or...
<p>You can use <code>WM_NCRBUTTONDOWN</code> to detect if the user has right-clicked on your caption and then bring up the system menu.</p>
<p>what about getting rid of the system menu and then putting it back in another place yourseld (say next to the close button etc.)?</p>
3,132
<p>I have the situation where i use GIS software which stores the information about GIS objects into separate database table for each type/class of GIS object (road, river, building, sea, ...) and keeps the metadata table in which it stores info about the class name and its DB table.</p> <p>Those GIS objects of differ...
<p>@Brian Chiasson</p> <p>Unfortunately, it's not an option to create all classes of GIS data because classes are created dynamically in the application. Every GIS data of the same type should be a class, but my user has the possibility to get new set of data and put it in the database. I can't know in front which cla...
<p>one way you could do it is to declare an interface say IGisObject that has the common properties declared on the interface. Then implement a concrete class which maps to each table. That way they'll still be all of type IGisObject.</p>
7,483
<p>There are hundreds of shopping cart solutions available for every platform, and all hosting plans come with several already installed. As a developer I understand that most of these are fairly similar from a user perspective. </p> <p>But which ones are built with the developer in mind? For example, which ones have ...
<p>osCommerce is one of those products that was badly designed from the beginning, and becomes basically unmaintainable as time moves forward. Addons are patches, and custom code modifies core. (Unless things have drastically changed since I last looked at it - judging by the version numbers, they have not). </p> <p>W...
<p><a href="http://www.oscommerce.com/solutions/oscommerce" rel="nofollow noreferrer">osCommerce</a> seems to be pretty popular, and advertises ease of integration as one of it's main features.</p>
9,508
<p>I'm not sure how this question will be recieved here but lets give it a shot...</p> <p>It's time for me to get a new dev PC. What's the best choice these days?</p> <p>I typically have 2-3 Visual Studios open along with mail and all that stuff. Ideally I would imagine 2+ GB of RAM would be nice as my current XP box...
<p>I just built a quad core - 8 GB of RAM and run Server 2008 with Hyper-V on it. I have VMs for my build server, dev platform, and deployment options (XP, Vista, Server 2003/2008) with snapshots at the various service pack levels. What's nice is you can spin up a VM whenever you need it, and re-allocate the resource...
<p>People are probably going to yell at me...but I've found that Vista 64 is mostly worth it. The main reason for me though is that I'm always maxing out my memory and having a 64bit OS allows me to go past the &lt;4GB limit of 32bit.</p> <p>But even if you don't get 64bit, just buy 2 2GB RAM cards anyways....you wil...
3,635
<p>How do you stop the designer from auto generating code that sets the value for public properties on a user control?</p>
<p>Use the DesignerSerializationVisibilityAttribute on the properties that you want to hide from the designer serialization and set the parameter to Hidden.</p> <pre><code>[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string Name { get; set; } </code></pre>
<p>A slight change to Erik's answer I am using VS 2013.</p> <pre><code>[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public new string Name { get; set; } </code></pre>
4,943
<p>I have a basic cs-major understanding of multi-threading but have never had to do anything beyond simple timers in an application. Does anyone know of a good resource that will give me a tour how to work with multi-threaded applications, explaining the basics and maybe posing some of the more difficult stuff?</p>
<p>This is a great free resource by Joseph Albahari. <a href="http://www.albahari.com/threading/" rel="noreferrer">Threading in C#</a></p>
<p>One of the best resources I know on the subject is the "threading in C#" book: <a href="http://www.albahari.com/threading/" rel="nofollow noreferrer">http://www.albahari.com/threading/</a></p> <p>I has a great overview of all a .net developer need to understand in order to program multi threaded applications.</p>
7,243
<p>I am starting a new job on Monday. The company has a home grown enterprise case management application written in <code>ASP.NET/VB.NET</code>. They are attempting to implement an Agile development process. They have gone so far as to get two people Scrum Master certified and hire an Agile coach. They are currently f...
<p>Great question!</p> <p>I would say the first thing to do is get the daily scrums going. Your part in the scrum will be learning the code. It will provide you a way to ask questions and get a feel for who can help you learn the code.</p> <p>Once you have that guy (or guys) picked out start pair programming with t...
<p>Congratulations on the new job!</p> <p>Relax and keep your cool. Read something on <a href="http://www.refactoring.com/sources.html" rel="nofollow noreferrer">here</a>.</p> <p>I guess, the process itself will make sure you are productive as long as you apply common sense :)</p>
8,084
<p>What slicers have support for belt printers like the CR-30? Or what slicers can have an add-on, plugin, or extension added to them to support it (from a user level, not a dev level).</p> <p>I found more total slicers than I expected, since I was only expecting 3 (Cura, PrusaSlicer, Simplify3d). Surely that means I...
<p>It seems <strong>Creality</strong> provides a modified version of <strong>Cura 4.8.2</strong> for the <strong>CR30</strong>: <a href="https://www.creality.com/pages/download-cr-30-3d-printer" rel="nofollow noreferrer">Creality Download</a> ; <strong>BlackBelt</strong> does the same, another modified version of Cura ...
<p>I think most slicers don't distinguish printers based on if they have belts or delta configuration, etc. The slicer generates gcode, and the firmware on the printer translates the gcode into actuator motions specific to that printer to perform the gcode.</p> <p>The difference slicers generally care about is if it i...
2,184
<p>I have a DotNetNuke site where my main logo is a PNG file using transparency. I tried GIF but the quality wasn't good enough.</p> <p>Anyways it worked great on IE7 but I just saw my site in IE6 and noticed that the transparency isn't working with my logo.</p> <p>Does anyone know of a quick way to fix this in a Do...
<p>I don't know that it's a DotNetNuke issue as much as it is IE6. Anyways, here's a site that shows you how to work around IE6's png issues. Hope it helps.</p> <p><a href="http://24ways.org/2007/supersleight-transparent-png-in-ie6" rel="nofollow noreferrer">http://24ways.org/2007/supersleight-transparent-png-in-ie6</...
<p>Googling "pngfix" should find a lot of different techniques for enabling alpha transparency in IE6.</p> <p>One common one is a <a href="http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html" rel="nofollow noreferrer">HTC behaviour file</a>.</p>
6,878
<p>I'm using the <code>System.Windows.Forms.WebBrowser</code>, to make a view a-la Visual Studio Start Page. However, it seems the control is catching and handling all exceptions by silently sinking them! No need to tell this is a very unfortunate behaviour.</p> <pre><code>void webBrowserNavigating(object sender, WebB...
<p>I haven't seen the browser eat exceptions, unless you mean script errors. Script errors can be enabled via the <code>browser.ScriptErrorsSuppressed</code> property.</p> <p>If you're talking about real exceptions, not just script errors, can you show us some code that reproduces the problem? We've used the browser e...
<p>11 years late to the party here, but the following solution works for me.</p> <p>In <code>webBrowserNavigating</code>, replace <code>MessageBox.Show(exception.ToString());</code> with <code>Dispatcher.BeginInvoke(() =&gt; { throw exception; });</code>.</p> <p>As soon as the <code>webBrowserNavigating</code> method c...
3,867
<p>Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have ...
<p>I would create a new QT project in eclipse, then switch perspectives to subclipse and simply do a SVN checkout into the new eclipse project. You should be good to go.</p>
<p>Checkout the project. It will ask you some options like if you want to start with a blank project, or want to use the tree to make a new project. Choose the latter and you should be ok :). It seems to work for me with Ganymed and subversive(not sure about subclipse and i don't remember.) :)</p>
9,736
<p>I need to quickly (and forcibly) kill off all external sessions connecting to my oracle database without the supervision of and administrator.</p> <p>I don't want to just lock the database and let the users quit gracefully.</p> <p>How would I script this?</p>
<p>This answer is heavily influenced by a conversation here: <a href="http://www.tek-tips.com/viewthread.cfm?qid=1395151&amp;page=3" rel="noreferrer">http://www.tek-tips.com/viewthread.cfm?qid=1395151&amp;page=3</a></p> <pre><code>ALTER SYSTEM ENABLE RESTRICTED SESSION; begin for x in ( select...
<p>If Oracle is running in Unix /Linux then we can grep for all client connections and kill it </p> <p>grep all oracle client process:</p> <p>ps -ef | grep LOCAL=NO | grep -v grep | awk '{print $2}' | wc -l</p> <p>Kill all oracle client process :</p> <p>kill -9 <code>ps -ef | grep LOCAL=NO | grep -v grep | awk '{pr...
7,908
<p>I am trying to write a unit test for an action method which calls the <code>Controller.RedirectToReferrer()</code> method, but am getting a "No referrer available" message.</p> <p>How can I isolate and mock this method?</p>
<p>Have you thought about creating a <a href="http://xunitpatterns.com/Test%20Double.html" rel="nofollow noreferrer">test double</a>?</p>
<p>In <em>my</em> version of the trunk I'm working against, r5299, I had to do this to mock out RedirectToReferrer. I think it's been changed in recent commits, I'm not sure.</p> <pre><code>[TestFixture] public class LoginControllerTests : GenericBaseControllerTest&lt;LoginController&gt; { private string referrer...
8,737
<p>I'm building an application against some legacy, third party libraries, and having problems with the linking stage. I'm trying to compile with Visual Studio 9. My compile command is:</p> <pre><code>cl -DNT40 -DPOMDLL -DCRTAPI1=_cdecl -DCRTAPI2=cdecl -D_WIN32 -DWIN32 -DWIN32_LEAN_AND_MEAN -DWNT -DBYPASS_FLEX -D_IN...
<p>These are standard library references. Make sure that all libraries (including the standard library) are using the <em>same</em> linkage. E.g. you can't link statically while linking the standard lib dynamically. The same goes for the threading model used. Take special care that you and the 3rd party library use the...
<p>After trying to get this stuff to compile under VS 2008, I tried earlier versions of VS - 2005 worked with warnings, and 2003 just worked. I double checked the linkages and couldn't find any problems, so either I just couldn't find it, or that wasn't the problem. </p> <p>So to reiterate, downgrading to VS 2003 fi...
4,321
<p><a href="https://3dprinting.stackexchange.com/a/4642/233">This post</a> has been up for 4-5 days now. I flagged it originally when it was first posted and that flag aged away, I have now flagged it again and it's still here. We have one <a href="https://3dprinting.stackexchange.com/users/1263/szymon-b%C4%99czkowsk...
<p>The post has now been deleted and the user destroyed due to spam, so thank you for bringing this up.</p> <p>It either must have come up after I cleaned out the inbox or I must have overlooked it.</p> <p>Yes, we do need another moderator. I would have loved to be at a point by now that we could have had elections a...
<p>Seeing as I'm 20 days late to this question, you probably understand that I'm not very active at the moment myself. (At least, I'm inactive for longer periods of time.) With Ryan gone for almost a year now, that often leaves @tbm0115 as the only moderator on this site.</p> <p>In other words, we could do with anothe...
45
<p>Let's say I've made a 3D scan of my face and managed to get that into FreeCAD. How might I then create an object (it's a mask, okay?) that conforms to the shape of my face, with a given thickness, such that I can export and 3D-print that part only?</p> <p>So if I printed it, it would fit over my face, but still look...
<p>Instead of using FreeCAD, I would import the mesh data into a vertex-based 3D modeling software, such as blender.</p> <p>After stitching the model in any areas where you still have gaps, you remove any vertex belonging to areas you do not want to use for the mask. This leaves you with pretty much a skin-tight base f...
<p>It depends on the software you're using, but here is an example with TinkerCad.</p> <p>Step 1: Import your 3D model (imagine that the ball is a head):<br /> <a href="https://i.stack.imgur.com/vZwKP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vZwKP.jpg" alt="enter image description here" /></a>...
1,920
<p>Everyone is aware of Dijkstra's <a href="http://portal.acm.org/citation.cfm?doid=362947" rel="noreferrer">Letters to the editor: go to statement considered harmful</a> (also <a href="http://www.cs.utexas.edu/%7EEWD/transcriptions/EWD02xx/EWD215.html" rel="noreferrer">here</a> .html transcript and <a href="http://www...
<p>The following statements are generalizations; while it is always possible to plead exception, it usually (in my experience and humble opinion) isn't worth the risks.</p> <ol> <li>Unconstrained use of memory addresses (either GOTO or raw pointers) provides too many opportunities to make easily avoidable mistakes.</li...
<p>The basic idea is that goto gives you too much freedom to do something you didn't intend to. It can cause errors in places that don't appear to be related to the goto statement, so it makes code maintenance more difficult. If you think you need a goto statement, you're wrong :) and you should instead rethink your co...
6,877
<p>We have a fairly new Ultimaker 3 Extended.</p> <p>When printing ABS with the AA0.8 nozzle and the recommended settings (up-to-date CURA) we receive a very poor wall quality that exposes some kind of pores. I've attached an image of those pores.</p> <p>I assume those pores are dragged by the nozzle when it moves in...
<p>According to <a href="https://youtu.be/QnnPsoL5cHE?t=18" rel="nofollow noreferrer">Anycubic</a> this printer uses the E3D V5 type hotend as can be seen from the linked video of the AnyCubic Mega:</p> <p><a href="https://i.stack.imgur.com/WSL8p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WSL8p...
<p>We select nozzles depending on what project we want to,do and it must match with the hot end as well.</p>
1,275
<p>Haven't fired up reflector to look at the difference but would one expect to see the exact same compiled code when comparing <code>Func&lt;T, bool&gt;</code> vs. <code>Predicate&lt;T&gt;</code> </p> <p>I would imagine there is no difference as both take a generic parameter and return bool?</p>
<p>They share the same signature, but they're still different types.</p>
<p>Even without generics, you can have different delegate types that are identical in signatures and return types. For example:</p> <pre><code>namespace N { // Represents a method that takes in a string and checks to see // if this string has some predicate (i.e. meets some criteria) // or not. internal delega...
5,269
<p>I am trying to print with clay.</p> <p>These are my Slic3r speed settings,</p> <p><a href="https://i.stack.imgur.com/FE115.png" rel="nofollow noreferrer" title="Slic3r speed settings"><img src="https://i.stack.imgur.com/FE115.png" alt="Slic3r speed settings" title="Slic3r speed settings"></a></p> <p>Other informa...
<p>No, you did not set all the settings to the same speed, there are 2 different print speeds defined:</p> <ul> <li>Infill Solid: <strong>60</strong> mm/s</li> <li>First Layer Speed: <strong>30%</strong></li> </ul> <p>This means, that some walls will be printed 10 mm/s faster than the others, and that <em>first layer...
<p>Make sure that on the Print Settings tab, under Advanced, you have set the Extrusion widths for your custom nozzle settings.</p>
1,117
<p>Printer: FDM printer (FDM == Fusion Deposition Modelling).</p> <p>Raw Material: Thermoplastics.</p> <p>How do I do multicolor printing? What changes should I make to the printing process/to the raw material used?</p> <p>(Answer in the context of printing a basic 3X3 Rubix cube)</p> <hr> <p>Bonus: What are the ...
<p>There are a few different approaches I've seen which you could look into.</p> <p>The easiest and most common is multiple extruders, each with a different color of thermoplastic. Tools like Pronterface and Slic3r have built-in support for multiple extruders. With multiple extruders you can get one color per extruder...
<p>If you are trying to print something like a Rubic's Cube in the correct colors without using paint or stickers, there are only a couple of options.</p> <p>Assuming that you are using a printer with only a single extruder and no fancy gadgets, you will need to print each color cube you will need to print in a lot of...
124
<p>I have a <code>byte[]</code> array, the contents of which represent a TIFF file (as in, if I write out these bytes directly to a file using the <code>BinaryWriter</code> object, it forms a perfectly valid TIFF file) and I'm trying to turn it into a System.Drawing.Image object so that I can use it for later manipulat...
<p><strong>Edit:</strong> The assumption below is not correct, I had a chance to fire up my IDE later and tested with and without Write and both populated the MemoryStream correctly.</p> <p>I think you need to write to your MemeoryStream first.</p> <p>As if my memory (no pun intended) serves me correctly this:</p> <...
<p>All these were clues that helped me figure out my problem which was the same problem as the question asks. So i want to post my solution which i arrived at because of these helpful clues. Thanks for all the clues posted so far!</p> <p>As Time Saunders posted in his answer, that Write method to actually write the by...
5,276
<p>I have seen simple example Ajax source codes in many online tutorials. What I want to know is whether using the source code in the examples are perfectly alright or not?</p> <p>Is there anything more to be added to the code that goes into a real world application?</p> <p>What all steps are to be taken to make the ...
<p>The code you posted is missing one important ingredient: the function stateChanged.</p> <p>If you don't quite understand the code you posted yourself, then what happens is when the call to getchats.php is complete, a function "stateChanged" is called and that function will be responsible for handling the response. ...
<p>I would use a framework like <a href="http://www.domassistant.com/" rel="nofollow noreferrer">DOMAssistant</a> which has already done the hard work for you and will be more robust as well as adding extra useful features.</p> <p>Apart from that, you code looks like it would do the job.</p>
6,510
<p>On a recent Java project, we needed a free Java based real-time data plotting utility. After much searching, we found this tool called the <a href="http://www.epic.noaa.gov/java/sgt/" rel="noreferrer">Scientific Graphics Toolkit or SGT</a> from NOAA. It seemed pretty robust, but we found out that it wasn't terribl...
<p>I've had success using <a href="http://www.jfree.org/jfreechart/" rel="noreferrer">JFreeChart</a> on multiple projects. It is <em>very</em> configurable. JFreeChart is open source, but they charge for the <a href="http://www.jfree.org/jfreechart/devguide.html" rel="noreferrer">developer guide</a>. If you're doing so...
<p>You might want to check out JMathPlot</p>
2,832
<p>To analyze lots of text logs I did some hackery that looks like this:</p> <ol> <li>Locally import logs into Access </li> <li>Reprocess Cube link to previous mdb in Analisis Service 2000 (yes it is 2k)</li> <li>Use Excel to visualize Cube (it is not big - up to milions raw entries)</li> </ol> <p>My hackery is a suc...
<p>You could also try the other free open source OLAP server, PALO from Jedox (www.palo.net)</p>
<p>I dont think that Mondrian is better than SSAS but I do know that its free and you independently distribute it. It uses XMLA and its cube definition XML file is almost the same as SSAS.</p>
2,653
<p>Simply, are there any Java Developer specific Linux distros?</p>
<p>A real Sun geek would chime in here about the virtues of using Solaris as a Java development platform, but I am much more ambivalent. Developing with Java is about the same on any linux distro; you are going to wind up having to install the JDK and tools of your choosing (Eclipse, Sun Studio, Tomcat, etc) so you may...
<p>While not <em>really</em> a distribution, there is a virtual machine available for <a href="http://virtualappliances.net/products/tomcat.php" rel="nofollow noreferrer">Tomcat</a>. It could be adapted pretty easily for other Java based deployments (available for several virtualization technologies). </p> <p>There ...
7,057
<p>I have a multiple selection SELECT field which I don't want the end user to be able to change the value of. </p> <p>For UI reasons, I would like to be able to do this without using the disabled="true" attribute. I've tried using onmousedown, onfocus, onclick and setting each to blur or return false but with no succ...
<p>I know you mentioned that you don't want to, but I actually think that using the <code>disabled</code> attribute is a better solution:</p> <pre><code>&lt;select multiple="multiple"&gt; &lt;option value="volvo" selected="true" disabled="disabled"&gt;Volvo&lt;/option&gt; &lt;option value="saab" disabled="disa...
<p>@Jack &amp; @17 of 26, good point but the end user will be expecting the select box to be disabled so that confusion shouldn't be an issue. </p> <p>I should have been clearer about why I couldn't just disable the control. </p> <p>The application that will be using this will need to disable the selection of the opt...
6,551
<p>I'd like to have a <code>TabNavigator</code> component that has a close button for some of the tabs. How do I do that? <br> It seems that the <code>TabNavigator</code> component does not allow (or I could not find) extensibility of this form. Help. Thanks</p>
<p>You should take a look at the SuperTabNavigator component from the <a href="http://code.google.com/p/flexlib/" rel="nofollow noreferrer">FlexLib</a> project:</p> <ul> <li><a href="http://flexlib.googlecode.com/svn/trunk/examples/SuperTabNavigator_Sample.swf" rel="nofollow noreferrer">SuperTabNavigator example</a></...
<p>Spark Based Component</p> <p><a href="http://blog.flexwiz.net/spark-tabs-with-close-button/" rel="nofollow"> <strong>flexwiz</strong> spark-tabs-with-close-button</a></p>
9,305
<p>Having to upgrade a database schema makes installing a new release of software a lot trickier. What are the best practices for doing this?</p> <p>I'm looking for a checklist or timeline of action items, such as</p> <ul> <li>8:30 shut down apps</li> <li>8:45 modify schema</li> <li>9:15 install new apps</li> <li>9:...
<p>I have a lot of experience with this. My application is highly iterative, and schema changes happen frequently. I do a production release roughly every 2 to 3 weeks, with 50-100 items cleared from my FogBugz list for each one. Every release we've done over the last few years has required schema changes to support...
<p>This is a topic that I was just talking about at work. Mainly the problem is that unless database migrations is handled for you nicely by your framework, eg rails and their migration scripts, then it is left up to you. </p> <p>The current way that we do it has apparent flaws, and I am open to other suggestions. </p...
5,123
<p>I want to print a model of an animal cell.</p> <p>What I have so far: I managed to use different colors to print out the different parts of the cell.<br> My question is: what is the best way to connect plastic 3d printed parts?<br> Glue? Melted plastic? I need it to have a strong connection and not very visible whe...
<p>For ABS print, I recommend <a href="https://en.wikipedia.org/wiki/Acetone" rel="nofollow">acetone</a>. It is not a glue, but it will dissolve the plastic a bit and if you apply it to both connecting parts and push them together, they will stay connected after the acetone dries. However, it does not dry very fast and...
<p>After doing the processes that hroncok described, the edges of the print can be finished with a 3D printing pen. The pen extrudes filament as a regular print head does, but is hand held. The filament can be extruded on the previous gap between the two prints. It will melt between the two sides and can be finished...
100
<p>What is the configuration setting for modifying the default homepage in a Grails application to no longer be appName/index.gsp? Of course you can set that page to be a redirect but there must be a better way.</p>
<p>Add this in UrlMappings.groovy </p> <pre> "/" { controller = "yourController" action = "yourAction" } </pre> <p>By configuring the URLMappings this way, the home-page of the app will be yourWebApp/yourController/yourAction.</p> <p>(cut/pasted from <a href="http://blog.intelligrape.com/?p=18" rel="norefe...
<p>All the answers are correct! But let's imagine a scenario: </p> <p>I mapped path "/" with the controller: "Home" and action: "index", so when i access "/app-name/" the controller Home gets executed, but if i type the path "/app-name/home/index", it will still be executed! so there are 2 paths for one resources. it ...
4,751
<p>You have an ascending list of numbers, what is the most efficient algorithm you can think of to get the ascending list of sums of every two numbers in that list. Duplicates in the resulting list are irrelevant, you can remove them or avoid them if you like.</p> <p>To be clear, I'm interested in the algorithm. Fee...
<p>Edit as of 2018: You should probably stop reading this. (But I can't delete it as it is accepted.)</p> <p>If you write out the sums like this:</p> <pre><code>1 4 5 6 8 9 --------------- 2 5 6 7 9 10 8 9 10 12 13 10 11 13 14 12 14 15 16 17 18 </code></pre> <p>You'll noti...
<p>If you are looking for a truly language agnostic solution then you will be sorely disappointed in my opinion because you'll be stuck with a for loop and some conditionals. However if you opened it up to functional languages or functional language features (I'm looking at you LINQ) then my colleagues here can fill th...
2,324
<p>My printer is calibrated for a certain clearance from the heated bed, which is chosen based on PLA.</p> <p>I would like to try to increase it for the first layer for PETG, so that adhesion is reduced. The printer has M5 screws with 4000 steps/mm, so the resolution clearly allows that. </p> <p>I don't want to modif...
<p>Maybe you would be better off with TPU or some other type of flexible material...</p> <p>I have been able to print PLA and have it flex quite a bit, but that was an ~0.2mm single layer print, I guess maybe up to 0.3-0.4mm should still be a little bit flexible, but not much. Also since you want it to wipe things, ma...
<p>You can not 3D print that because there is no nozzle or method for producing filaments of the required size. A few microns at least. You might be able to spin molten pla like cotton candy and it might absorb; but I doubt it.</p> <p><a href="https://phys.org/news/2010-05-cotton-candy-machine-tiny-nanofibers.html" re...
1,627
<p>How would you design a database to support the following tagging features:</p> <ul> <li>items can have a large number of tags</li> <li>searches for all items that are tagged with a given set of tags must be quick (the items must have ALL tags, so it's an AND-search, not an OR-search)</li> <li>creating/writing items...
<p>About ANDing: It sounds like you are looking for the "relational division" operation. <a href="http://www.dbazine.com/ofinterest/oi-articles/celko1" rel="noreferrer">This article</a> covers relational division in concise and yet comprehendible way.</p> <p>About performance: A bitmap-based approach intuitively sound...
<p>You won't be able to avoid joins and still be somewhat normalized.</p> <p>My approach is to have a Tag Table.</p> <pre><code> TagId (PK)| TagName (Indexed) </code></pre> <p>Then, you have a TagXREFID column in your items table.</p> <p>This TagXREFID column is a FK to a 3rd table, I'll call it TagXREF:</p> <pre>...
7,092
<p>In C++ we acquiring a resource in a constructor and release it in a destructor.</p> <p>So when an exception rises in a middle of a function there will be no resource leak or locked mutexes or whatever.</p> <p>AFAIK java classes don't have destructors. So how does one do the resource management in Java.</p> <p>For...
<p>Yes you can and should put try/catch/finally block around your code. In C# there is a shorthand "using" statement, but in Java you are stuck with:</p> <pre><code>public int foo() { Resource f = new Resource(); try { DoSomething(f); } finally { f.Release(); } } </code></pre>
<p>Sorry to disappoint you but in Java we <strong>do</strong> use try\catch\finally blocks a lot. And with "a lot", I mean <strong>A LOT</strong>. I do sometimes wish that Java has the C# using block. Most of the time you won't need to free up resources as Java's garbage collector will take care of that.</p> <p>Howeve...
8,292
<p>I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;)</p> <p>I have <a href="http://woarl.com/board/rob.php?mode=map&a...
<p>I think you need to use <code>display: block</code> on your images. When images are <code>inline</code> there's a little extra space for the line spacing.</p>
<p>I haven't looked up the whole thing, but the problem lies somewhere in the style sheets.</p> <p>If you copy out only the table part of it, it is displaying the map correctly.</p> <p>If you remove the final <code>&lt;/span&gt;</code> tag from this part, it is also working (however the page gets mixed):</p> <pre><c...
4,202
<p>I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right direction or supply some first-hand help? </p>
<p>Generally, the way you implement it is simply to add the required function to your view's controller, and set its delegate. For example, if you want code to run when the view loads, you just delegate your view to the controller, and implement the awakeFromNib function.</p> <p>So, to detect a key press in a text vie...
<p>I've done some hard digging, and I did find an answer to my own question. I'll get at it below, but thanks to the two fellas who replied. I think that Stack Overflow is a fantastic site already--I hope more Mac developers find their way in once the beta is over--this could be a great resource for other developers lo...
3,244
<p>Perhaps the biggest risk in pushing new functionality to live lies with the database modifications required by the new code. In Rails, I believe they have 'migrations', in which you can programmatically make changes to your development host, and then make the same changes live along with the code that uses the revis...
<p>I've never come across a tool that would do the job. Instead I've used individual files, numbered so that I know which order to run them: essentially, a manual version of Rails migrations, but without the rollback.</p> <p>Here's the sort of thing I'm talking about:</p> <pre><code>000-clean.sql # wipe out e...
<p>I've always preferred to keep my development site pointing to the same DB as the live site. This may sound risky at first but in reality it solves many problems. If you have two sites on the same server pointing to the same DB, you get a real time and accurate view of what your users will see when it goes live. </p>...
5,548
<p>I am still at calibration stage and need some info from the PCB. I connected the USB and ran Repetier. The PCB wants to talk at a higher baud rate than my serial port says it can do. I tried setting the serial port to its highest setting 125k and reduced the PCB baud in Repetier setting to 125k. No joy. PC port reve...
<p>Sorted. Repetier Server was hijacking my com port. Uninstalled it and Repetier host worked fine. As I have no desire to monitor or control prints remotely I have no use for the server software.</p> <p>Hope that helps others.</p>
<p>My A8 just started doing this. </p> <p>I shut down repetier server, and voila, all is good! Since I will go do OctoPi eventually, I just uninstalled RS.</p>
787
<p>In <a href="http://www.codinghorror.com/blog/archives/001152.html" rel="nofollow noreferrer">Maybe Normalizing Isn't Normal</a> Jeff Atwood says, "You're automatically measuring all the queries that flow through your software, right?" I'm not but I'd like to. </p> <p>Some features of the application in question:<...
<p>In addition to Brad's mention of SQL Profiler, if you want to do this in code, then <strong>all your database calls need to funnelled through a common library</strong>. You insert the timing code there, and voila, you know how long every query in your system takes.</p> <p>A single point of entry to the database is ...
<p>The <a href="http://www.codeplex.com/dropthings" rel="nofollow noreferrer">Dropthings</a> project on CodePlex has a class for timing blocks of code. The class is named TimedLog. It implements IDisposable. You wrap the block of code you wish to time in a using statement.</p>
3,180
<p>What are some good resources to learn best practices for Javascript? I'm mainly concerned about when something should be an object vs. when it should just be tracked in the DOM. Also I would like to better learn how to organize my code so it's easy to unit test.</p>
<p>Seconding <a href="http://oreilly.com/catalog/9780596517748/" rel="noreferrer">Javascript: The Good Parts</a> and Resig's book <a href="http://jsninja.com/" rel="noreferrer">Secrets of the Javascript Ninja</a>.</p> <p>Here are some tips for Javascript:</p> <ul> <li>Don't pollute the global namespace (put all funct...
<p>You can pick up a lot from <a href="https://rads.stackoverflow.com/amzn/click/com/1590597273" rel="nofollow noreferrer" rel="nofollow noreferrer">Pro JavaScript Techniques</a>, and I'm looking forward to Resig's forthcoming <a href="http://jsninja.com/" rel="nofollow noreferrer">Secrets of the JavaScript Ninja</a>.<...
6,080
<p>I have a list of objects I wish to sort based on a field <code>attr</code> of type string. I tried using <code>-</code></p> <pre><code>list.sort(function (a, b) { return a.attr - b.attr }) </code></pre> <p>but found that <code>-</code> doesn't appear to work with strings in JavaScript. How can I sort a list of...
<p>Use <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/localeCompare" rel="noreferrer"><code>String.prototype.localeCompare</code></a> a per your example:</p> <pre><code>list.sort(function (a, b) { return ('' + a.attr).localeCompare(b.attr); }) </code></pre> <p>We forc...
<pre><code>&lt;!doctype html&gt; &lt;html&gt; &lt;body&gt; &lt;p id = "myString"&gt;zyxtspqnmdba&lt;/p&gt; &lt;p id = "orderedString"&gt;&lt;/p&gt; &lt;script&gt; var myString = document.getElementById("myString").innerHTML; orderString(myString); function orderString(str) { var i = 0; var myArray = str.split("...
7,412
<p>I'm working with a SQL Server 2000 database that likely has a few dozen tables that are no longer accessed. I'd like to clear out the data that we no longer need to be maintaining, but I'm not sure how to identify which tables to remove.</p> <p>The database is shared by several different applications, so I can't b...
<p>MSSQL2000 won't give you that kind of information. But a way you can identify what tables ARE used (and then deduce which ones are not) is to use the SQL Profiler, to save all the queries that go to a certain database. Configure the profiler to record the results to a new table, and then check the queries saved ther...
<p>If you have lastupdate columns you can check for the writes, there is really no easy way to check for reads. You could run profiler, save the trace to a table and check in there</p> <p>What I usually do is rename the table by prefixing it with an underscrore, when people start to scream I just rename it back</p>
5,552
<p>Most text editors have a navigation pane that lets you see all the files you currently have open. Or a pane that lets you browse a file directory.</p> <p>How do I do this in Emacs?</p>
<p>Try <kbd>Ctrl-x</kbd> followed by <kbd>Ctrl-b</kbd> (in Emacs terminology <kbd>C-x C-b</kbd>) to list buffers.</p>
<p>Also, if you want to get rid of the list of open buffers, type <kbd>C-x 1</kbd>.</p>
9,041
<p>Is there a way of reducing the amount and strength of Model support when slicing in Cura?</p> <p>Cleaning a model with large amounts of support can consume large amounts of time.</p>
<p>There's a lot that can be done to improve the removability of supports, and much of this is not widely known/published.</p> <p>One big wrong default in Cura that contributes to problems with support is <em>Limit Support Retractions</em>, which defaults to on. This causes heavy stringing between components of the sup...
<p>You could reduce the <code>Support Density</code>:</p> <blockquote> <p>A higher value results in better overhangs, but the supports are harder to remove.</p> </blockquote> <p>Furthermore read <a href="https://3dprinting.stackexchange.com/a/7991/">this answer</a> on question: &quot;<a href="https://3dprinting.stackex...
1,722
<p>We are trying to lighten our page load as much as possible. Since ViewState can sometimes swell up to 100k of the page, I'd love to completely eliminate it.</p> <p>I'd love to hear some techniques other people have used to move ViewState to a custom provider.</p> <p>That said, a few caveats:</p> <ul> <li>We serve...
<p>How do you handle Session State? There is a built-in "store the viewstate in the session state" provider. If you are storing the session state in some fast, out of proc system, that might be the best option for the viewstate.</p> <p>edit: to do this add the following code to the your Page classes / global page ba...
<p>Due to the typical organizational bloat, requesting new hardware takes eons, and requesting hardware that would involve a complete rewire of our current setup would probably get some severe resistance from the engineering department.</p> <p>I really need to come up with a software solution, because that's the only ...
7,042
<p>I find myself doing some relatively advanced stuff with memcached in PHP. It's becoming a mental struggle to think about and resolve race conditions and concurrency issues caused by the lock-free nature of the cache.</p> <p>PHP seems pretty poor in tools when it comes to concurrency (threads, anyone?), so I wonder ...
<p>PHP is not a language designed for multi-threading, and I don't think it ever will be.</p> <p>If you need mutex functionality, PHP has a <a href="http://us.php.net/sem" rel="nofollow noreferrer">Semaphore</a> functions you can compile in. </p> <p>Memcache has no mutex capability, but it can be emulated using the <...
<p>Not specifically for this issue but: <a href="http://www.firephp.org/" rel="nofollow noreferrer">FirePHP</a>?</p>
9,253
<p>I've been noticing in some of my linear advance test towers that the (very minor/fine) ripple pattern in walls varies with the K factor, which made me think that it isn't coming from any vibration in the print head motion, but rather from quantization of the extruder into discrete steps (i.e. wall gets slightly thic...
<p>Your calculations about the theoretical extruder resolution are spot on. I did a similar calculation to evaluate which extruder to use with different hot ends, I paste the results. The dark cells are the input cells, the rest is calculated. You can see that for some lines I entered directly the mm/microstep value, s...
<h2>Short answer</h2> <p><em>Usually</em> no.</p> <h2>Long answer</h2> <p>There are several big factors that limit how small things you can print. The bigger ones are pretty much:</p> <ul> <li>Positional accuracy and settings (limited by steps/mm in X, Y, Z)</li> <li>Nozzle diameter</li> </ul> <p>Now, why don't you nee...
1,602
<p>So I have a pointer to an array of pointers. If I delete it like this:</p> <pre><code>delete [] PointerToPointers; </code></pre> <p>Will that delete all the pointed to pointers as well? If not, do I have to loop over all of the pointers and delete them as well, or is there an easier way to do it? My google-fu d...
<p>Yes you have to loop over the pointers, deleting individually.</p> <p>Reason: What if other code had pointers to the objects in your array? The C++ compiler doesn't know if that's true or not, so you have to be explicit.</p> <p>For an "easier way," two suggestions: (1) Make a subroutine for this purpose so at lea...
<p>I don't know why this was answered so confusingly long.</p> <p>If you delete the array of pointers, you will free the memory used for an array of usually ints.<br> a pointer to an object is an integer containing the adress.</p> <p>You deleted a bunch of adresses, but no objects.</p> <p>delete does not care about ...
7,046
<p>I'd like to add some functionality to a site that would allow users to record video using their webcam and easily store it online. I don't even know if this is possible right now, but I think flash has access to local webcams running through the browser.</p> <p>Do you have any suggestions or resources to get me sta...
<p>This is possible with <a href="http://www.adobe.com/products/flashmediaserver/" rel="nofollow noreferrer">Adobe's Flash Media Server</a>. <a href="http://osflash.org/red5" rel="nofollow noreferrer">Red5</a> is an open source alternative. The protocol they use for this is <a href="http://en.wikipedia.org/wiki/Real_Ti...
<p>On the server side, you have three alternatives:</p> <ol> <li><a href="http://www.adobe.com/products/flashmediaserver/" rel="nofollow noreferrer">Adobe's Flash Media Server</a></li> <li><a href="http://osflash.org/red5" rel="nofollow noreferrer">Red5</a>, an open source version</li> <li><a href="http://www.wowzamed...
7,785
<p>Yes, it sounds crazy....It might be.</p> <p>The final updatepanel does not appear to trigger anything, it just refreshes the update panels and does not call back to the usercontrol hosting it.</p> <p>Any ideas?</p> <p>EDIT: I got it posting back, however the controls inside the final usercontrol have lost their d...
<p>I would suggest you start by removing the UpdatePanels at first, and make sure your control orgy is working correctly with postbacks. Once you have that working, try adding the UpdatePanels back in from the bottom up.</p>
<p>If you set the UpdateMode property to Conditional (default is Always) on both UpdatePanels it should stop the outer UpdatePanel triggering when only the usercontrols updatepanel should have refreshed.</p>
5,063
<p>I have a solution in Visual Studio 2005(professional Edition) which in turn has 8 projects.I am facing a problem that even after i set the Command Arguments in the Project settings of the relevant project, it doesnt accept those command line arguments and it shows argc = 1, inspite of me giving more than 1 command a...
<p>Hmm.. Are you sure the specified project is set as the start project (right click > set as startup project) ??</p> <p>Oh, and obviously you need to be in the correct configuration mode ^_^</p> <p>(Notice it can be changed to <em>debug | build | all configurations</em> )</p>
<p>Are you sure you are setting the command arguments on the same configuration (Debug|Release) you are debugging? As far as I remember command arguments are per configuration.</p>
4,956