instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I am currently working on parts for a custom prosthesis.</p>
<p>My main concern at the moment is to find biocompatible materials that can be 3D printed from a UP or a Reprap.
The piece would need to be in contact with the skin for extended periods of time, probably around 17 hours a day on average.</p>
<p>The main... | <p>There are printers designed for medical use, and the manufacturers supply them with varying levels of <a href="http://www.medicalplasticsnews.com/opinion/passing-the-test_1/" rel="nofollow">certification and testing</a>, however I've not seen a filament manufacturer certify their material as bio-compatible separate ... | <p>If you want to know something about what you are questioning, it is interesting to you to read <a href="http://e-nable.org/resources/prosthetics-students-consultation/" rel="nofollow noreferrer">http://e-nable.org/resources/prosthetics-students-consultation/</a></p>
<p>That's a link with complementary information h... | 117 |
<p>Are there plans or ideas floating around for a logo contest, or is that a Public-Beta stage thing?</p>
| <p>Getting a logo is part of getting a design, which is something that happens when a site <em>graduates</em> out of public beta.</p>
<p>In short, not for a long time yet.</p>
<p>While the site is in beta it will keep this theme that it currently has.</p>
| <p>Getting a logo is part of getting a design, which is something that happens when a site <em>graduates</em> out of public beta.</p>
<p>In short, not for a long time yet.</p>
<p>While the site is in beta it will keep this theme that it currently has.</p>
| 5 |
<p>This confusion arises as most people are trained to evaluate arithmetic expressions as per <a href="http://en.wikipedia.org/wiki/PEMDAS#Mnemonics" rel="nofollow noreferrer">PEDMAS or BODMAS rule</a> whereas arithmetic expressions in programming languages like C# do not work in the same way.</p>
<p>What are your tak... | <p><em>Precedence</em> rules specify priority of operators (which operators will be evaluated first, e.g. multiplication has higher precedence than addition, PEMDAS). </p>
<p>The <em>associativity</em> rules tell how the operators of same precedence are grouped. Arithmetic operators are left-associative, but the assig... | <p>I am not sure there really is a difference. The traditional BODMAS (brackets, orders, division, multiplication, addition, subtraction) or PEDMAS (parentheses, exponents, division, multiplication, addition, subtraction) are just subsets of all the possible operations and denote the order that such operations should ... | 9,621 |
<p>We use an IBM database known as Universe that holds all of our user id's, passwords, and profile information in a table called USERINFO. </p>
<p>Can I use the Membership Provider to connect to this database and authenticate the user? </p>
<p>The database access is actually through a web service since we don't hav... | <p>As mentioned above, you'll need to create a custom membership provider which a fairly straightforward. You'll create a .NET class that inherits from System.Web.Security.MembershipProvider. There are several methods that need to be overriden in your class, but most are not even used by the MVC account controller. The... | <p>You'll have to create a custom provider for that. It isn't very hard, as long as you can access the web service without an issue.</p>
| 9,718 |
<p>I am just starting to play with Django/Python and am trying to shift into the MTV mode of programming that Django asks for (insists on). Deciding on what functions should be methods of a model vs simple being a function in a view has so far been confusing. Does anyone know of a book, website, blog, slideshow, what... | <p>My basic rule in Django is: if you could conceivably need the functionality from somewhere other than the view itself, it doesn't belong in the view function. </p>
<p>I'd also recommend downloading some of the plethora of apps on <a href="http://djangoplugables.com/" rel="nofollow noreferrer">Django Pluggables</a> ... | <p>If you aren't absolutely set on diving into Django and don't mind trying something else as a start, you might want to give <a href="http://www.python.org/dev/peps/pep-0333/" rel="nofollow noreferrer">WSGI</a> a shot, which allows you to template your application your own way using a <a href="http://pypi.python.org/p... | 4,220 |
<p>I'm trying to set up an enclosed (custom enclosure) Prusa i3 style printer for ABS, but having a fair amount of difficulty preventing the part corners from curling.</p>
<p><a href="https://i.stack.imgur.com/k9YT6.png" rel="nofollow noreferrer" title="Example of curling at part corners"><img src="https://i.stack.img... | <p>Adding 20mm mouse ears was sufficient to resolve the problem using the original extrusion / heatbed settings. I did not expect mouse ears to be required on the Benchy model, but given the lack of better advice it seems this may be a poorly documented "feature" of ABS.</p>
<p>Results on the original worst-case test... | <p>A tall skirt (like 1 cm tall or more, even as tall as the part) few millimetres from the part would shield the corners and the outer parts from colder air and keep the part temperature high, reducing curling. </p>
<p>It is in principle better than mouse ears, because these just pull the corners, which will still ha... | 1,280 |
<p>The below HTML/CSS/Javascript (jQuery) code displays the <code>#makes</code> select box. Selecting an option displays the <code>#models</code> select box with relevant options. The <code>#makes</code> select box sits off-center and the <code>#models</code> select box fills the empty space when it is displayed. </p>
... | <p>It's not entirely clear from your question what layout you're trying to achieve, but judging by that fact that you have applied "float:left" to the select elements, it looks like you want the select elements to appear side by side. If this is the case, you can achieve this by doing the following:</p>
<ul>
<li>To ce... | <p>Floating the select boxes changes their display properties to "block". If you have no reason to float them, simply remove the "float: left" declaration, and add "text-align: center" to #makes and #models.</p>
| 8,605 |
<p>Often, when I have a breakpoint on some line in Visual Studio, The program will run and stop there. great. I will then click the red circle (or press F9) to remove it. Obviously I don't want my program to keep stopping there. The problem is that the next time I refresh the page the breakpoint is back! The only way ... | <p>Helpful Key combo: to permanently delete all breakpoints, press CTRL + SHIFT + F9.</p>
| <p>Wipe the breakpoint out using the Breakpoints Window (Ctrl + Alt + B).</p>
<p>While debugging, when you hit the breakpoint, look at the BreakPoint window for the one that is bold. </p>
<p>Then, right-click it and choose Delete.</p>
| 8,338 |
<p>Creating a patch is very easy in SubVersion, With Tortoise, you right-click and select Create Patch. But for the life of me, I can't find this functionality in TFS. Is this possible?</p>
<p>If not, what's the standard way to submit patches in open source TFS hosted projects (a la CodePlex)?</p>
| <pre><code>tf diff /shelveset:shelveset /format:unified
</code></pre>
<p><strong>Edit:</strong> This writes to standard output. You can pipe the output to a file.</p>
<p>For more options, see <a href="http://msdn.microsoft.com/en-us/library/6fd7dc73%28v=vs.100%29.aspx" rel="noreferrer">Difference Command</a>.</p>
| <p>I wrote a blog post about a similar issue where I used the TF.exe command and 7Zip to <a href="http://codeblog.theg2.net/2014/09/create-tfs-patch-file-with-pending.html" rel="nofollow">create a TFS patch file</a> that could then be applied on another TFS server or workspace. I posted the the Powershell scripts at <a... | 7,547 |
<p>How does the new Microsoft asp.net mvc implementation handle partitioning your application - for example:</p>
<pre><code>--index.aspx
--about.aspx
--contact.aspx
--/feature1
--/feature1/subfeature/action
--/feature2/subfeature/action
</code></pre>
<p>I guess what I am trying to say is that it seems everything has ... | <p>There isn't any issues with organizing your controllers. You just need to setup the routes to take the organization into consideration. The problem you will run into is finding the view for the controller, since you changed the convention. There isn't any built in functionality for it yet, but it is easy to creat... | <p>In terms of how you arrange your views, you can put your views in subfolders if you'd like and create your own view structure. All views can always be referenced by their full path using the ~syntax. So if you put Index.aspx in \Views\Feature1\Home then you could reference that view using ~/Views/Feature1/Home/Index... | 4,626 |
<p>I'm currently implementing a raytracer. Since raytracing is extremely computation heavy and since I am going to be looking into CUDA programming anyway, I was wondering if anyone has any experience with combining the two. I can't really tell if the computational models match and I would like to know what to expect. ... | <p>One thing to be very wary of in CUDA is that divergent control flow in your kernel code absolutely KILLS performance, due to the structure of the underlying GPU hardware. GPUs typically have massively data-parallel workloads with highly-coherent control flow (i.e. you have a couple million pixels, each of which (or... | <p>It can certainly be done, has been done, and is a hot topic currently among the raytracing and Cuda gurus. I'd start by perusing <a href="http://www.nvidia.com/object/cuda_home.html" rel="nofollow noreferrer">http://www.nvidia.com/object/cuda_home.html</a></p>
<p>But it's basically a research problem. People who ... | 6,053 |
<p>Almost every Java book I read talks about using the interface as a way to share state and behaviour between objects that when first "constructed" did not seem to share a relationship. </p>
<p>However, whenever I see architects design an application, the first thing they do is start programming to an interface. How ... | <p>Programming to an interface means respecting the "contract" created by using that interface. And so if your <code>IPoweredByMotor</code> interface has a <code>start()</code> method, future classes that implement the interface, be they <code>MotorizedWheelChair</code>, <code>Automobile</code>, or <code>SmoothieMaker<... | <p>In one sense, I think your question boils down to simply, "why use interfaces and not abstract classes?" Technically, you can achieve loose coupling with both -- the underlying implementation is still not exposed to the calling code, and you can use Abstract Factory pattern to return an underlying implementation (in... | 7,108 |
<p>When using Google Chrome, I want to debug some JavaScript code. How can I do that?</p>
| <p>Try adding this to your source:</p>
<pre><code>debugger;
</code></pre>
<p>It works in most, if not all browsers. Just place it somewhere in your code, and it will act like a breakpoint.</p>
| <p>From the console in Chrome, you can do <code>console.log(data_to_be_displayed)</code>.</p>
| 9,192 |
<p>I implemented a Lucene search solution awhile back, and it got me interested in compressed file indexes that are searchable. At the time I could not find any good information on how exactly you would go about creating a custom search index, so I wonder if anyone can point me in the right direction? </p>
<p>My prima... | <p>It all depends on what you're doing: animation, video, calculation, etc? There are <a href="http://www.tobinharris.com/2008/8/30/performance-of-silverlight-vs-flash-vs-javascript-vs-tracemonkey" rel="nofollow noreferrer">some tests that show Silverlight being faster for raw computation</a>, while Flash's graphics en... | <p>Actually, you have to assume that Flash is probably already installed on the user's browser, and SilverLight probably not. So the cost of installing silverlight (though a small download) has to be taken in to consideration as well.</p>
<p>Silverlight, however, does have some pretty neat out of the box multimedia su... | 9,141 |
<p>For example: <code>man(1)</code>, <code>find(3)</code>, <code>updatedb(2)</code>? </p>
<p>What do the numbers in parentheses (Brit. "brackets") mean?</p>
| <p>It's the section that the man page for the command is assigned to.</p>
<p>These are split as</p>
<ol>
<li>General commands</li>
<li>System calls</li>
<li>C library functions</li>
<li>Special files (usually devices, those found in /dev) and drivers</li>
<li>File formats and conventions</li>
<li>Games and screensavers... | <p><a href="http://en.wikipedia.org/wiki/Man_page#Manual_sections" rel="nofollow noreferrer">Wikipedia</a> details about Manual Sections:</p>
<ol>
<li>General commands</li>
<li>System calls</li>
<li>Library functions, covering in particular the C standard library</li>
<li>Special files (usually devices, those found in... | 8,846 |
<p>With text-recognition improving and CAPTCHA-breakers using Mechanical Turks to break otherwise unbreakable keys, what's the next technology to keep scripts from spam-botting a site that relies on user input?</p>
| <p>I like the concept of an 'Invisible Captcha'. Phil Haack details one implementation <a href="http://haacked.com/archive/2006/09/26/Lightweight_Invisible_CAPTCHA_Validator_Control.aspx" rel="nofollow noreferrer">here</a>.</p>
<p>This banks on the fact that bots, spiders, and crawlers don't implement javascript engi... | <p>The most fundamental tool to keep people from spambotting a user input site is the "nofollow" tag on links. Most comment-spammers are interested in Google juice rather than actually having their stuff seen, so nofollow removes the incentive. </p>
| 8,443 |
<p>I want to print multiple objects in a single G-code file on my Maker Select Plus 3D Printer.</p>
<p>On the Cura "Machine>Machine Settings..." menu, what are the correct settings for "Printer head size" in the upper right quadrant?</p>
<p>My best guess is below:</p>
<p><a href="https://i.stack.imgur.com/hJkip.png"... | <h3>TL;DR</h3>
<p>The settings that you seem to need can be found here: <a href="https://www.thingiverse.com/groups/i3/topic:6818" rel="noreferrer">Print One At a time settings? CURA</a>:</p>
<blockquote>
<p>You actually can!</p>
<p>Providing that none of your object is too tall (taller than the Gantry
clear... | <p>Like the OP, I'm confused by this as well. I figured I'd need measurements from the center of the nozzle to the left, right, front, and back of the print head, as well as a height from the print surface to the gantry while the head was homed. I've carefully measured, but things aren't going quite as I expected. In t... | 607 |
<p>OK, so I don't want to start a holy-war here, but we're in the process of trying to consolidate the way we handle our application configuration files and we're struggling to make a decision on the best approach to take. At the moment, every application we distribute is using it's own ad-hoc configuration files, whet... | <p>XML XML XML XML. We're talking <em>config files here</em>. There is no "angle bracket tax" if you're not serializing objects in a performance-intense situation. </p>
<p>Config files must be human readable and human understandable, in addition to machine readable. XML is a good compromise between the two.</p>
<... | <p>What platform are you working on? I'd recommend trying to use the preferred/common method for it.</p>
<ol>
<li>MacOSX - plists</li>
<li>Win32 - Registry (or are there a new one here, long since I developed on it)</li>
<li>Linux/Unix - ~/.apprc (name-value perhaps)</li>
</ol>
| 3,325 |
<p>I have to create something similiar to Google Calendar, so I created an events table that contains all the events for a user.</p>
<p>The hard part is handling re-occurring events, the row in the events table has an event_type field that tells you what kind of event it is, since an event can be for a single date onl... | <p>As previously stated, <strong><em>don't reinvent the wheel</em></strong>, just enhance it.</p>
<p>Checkout <a href="http://www.ultraapps.com/app_overview.php?app_id=19" rel="nofollow noreferrer">VCalendar</a>, it is open source, and comes in PHP, ASP, and ASP.Net (C#)!</p>
<p>Also you could check out <a href="http... | <p>I think I understand your second paragraph to mean you are considering a second events table that has a row for each occurrence of an event. I would avoid that.</p>
<p>Re-occurring events should have a start date and a stop date (which could be Null for events that continue every X days "forever") You'll have to de... | 3,367 |
<p>For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like <a href="http://en.wikipedia.org/wiki/Vim_(text_editor)" rel="nofollow noreferrer">Vim</a... | <p><a href="http://pdcurses.sourceforge.net/" rel="nofollow noreferrer">PDCurses</a> works on Win32.</p>
| <p>This is the best tool for it I've ever seen!!<br>
1) Create any application using <strong><em>VB6 IDE</em></strong><br>
2) Convert it to <strong><em>Console Application</em></strong>, using <a href="http://nirsoft.net/vb/console_application_visual_basic.html" rel="nofollow"><strong>THIS!</strong></a></p>
| 6,487 |
<p>The amount of posts being voted to closed is getting ridiculous. The last two posts have been printing related, one looking for information and the other a design question for 3D printing yet both have been voted to be closed. </p>
<p>Yes, I have read the other Meta post about how closing is not permanent (<a hre... | <p>I absolutely agree. I believe we all want this site to maintain high quality, but right now almost no questions fall within our desired scope and form.</p>
<p>I think we either need to:</p>
<ul>
<li>Change the acceptable scope of questions to be asked</li>
<li>Change how we welcome new users</li>
</ul>
<p>Right n... | <p>I've been active on SO since it was in beta, and have participated in numerous SE sites when they were in beta.</p>
<p>It's my impression that there is much more enthusiasm for close votes here than in other sites which launched out of beta. I know that seems to discourage me from participating more, and may disco... | 25 |
<p>I'd like to add the <code>HttpOnly</code> flag to <code>JSF/richfaces</code> cookies, especially the session cookie, to up the level of security on my web app. Any ideas? </p>
| <p>There may be something that allows you to do this in your servlet engine. This is part of the Servlet 3.0 spec which is yet to be released.</p>
| <p>Something like:</p>
<pre><code>response.setHeader("Set-Cookie", "yourcookiename=yourcookievalue; HTTPOnly");
</code></pre>
<p>might work in a Java environment. I am not aware of a JSF-specific way to achieve this... sorry</p>
<p>This seems to be not an easy task in Java.</p>
| 9,795 |
<p>As I browse through the site, I find a lot of terms that many developers just starting out (and even some advanced developers) may be unfamiliar with.</p>
<p>It would be great if people could post here with a term and definition that might be unknown to beginners or those from different programming backgrounds. </p... | <p>You need to decorate the ListView property with the DesignerSerializationVisibility attribute, like so:</p>
<pre><code>[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public ListView MyListView { get { return this.listView1; } }
</code></pre>
<p>This tells the designer's code generator t... | <p>Just so I'm clear, you've done something like this, right?</p>
<pre><code>public ListView MyListView { get { return this.listView1; } }
</code></pre>
<p>So then you are accessing (at design time) the MyListView property on your UserControl?</p>
<p>I think if you want proper design-time support you're better off c... | 3,654 |
<p>I know nothing about 3D printing and I was wondering if it is a good candidate for what I want to make.</p>
<p>I want to make a custom game cartridge which looks like this:
<a href="https://i.stack.imgur.com/k0RpQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k0RpQ.jpg" alt="enter image descrip... | <p>Typically, for FDM, the resolution is different for height compared with the x-y plane.</p>
<p>In x-y, you will be constrained by the nozzle diameter (0.4mm is common), which effectively quantises your wall thickness (0.4, 0.8, 1.2 etc). These walls can be placed with maybe 0.05mm precision.</p>
<p>In Z, the const... | <p>With the experience I have with my 3d printer you can make (almost) everything you can draw with it.</p>
<p>0.6mm parts can be 3d printed but will not be very strong though.</p>
<p>For joining the 2 halves when they are so thin, I think the best solution is to glue them together. With the things I make for myself ... | 639 |
<p>In a project I'm working on FxCop shows me lots of (and I mean more than 400) errors on the InitializeComponent() methods generated by the Windows Forms designer. Most of those errors are just the assignment of the Text property of labels.</p>
<p>I'd like to suppress those methods in source, so I copied the suppres... | <p>You've probably got the right code, but you also need to add CODE_ANALYSIS as a precompiler defined symbol in the project properties. I think those SuppressMessage attributes are only left in the compiled binaries if CODE_ANALYSIS is defined.</p>
| <p>Module level suppression messages need to be pasted into the same file as the code that is raising the FxCop error before the namespace declaration or in assemblyinfo.cs. Additionally, you will need to have CODE_ANALYSIS defined as a conditional compiler symbols (Project > Properties > Build). Once that is in place,... | 5,609 |
<p>My printer stopped printing during a few prints, and i found that the extruder had stopped heating, and the motors had stopped running. I checked the code, and nothing was wrong. My 5A fuse though, was extremely hot. I wanted to verify whether it was my fuse that had turned bad or there was some kind of short in my ... | <p>As @Mikhail Z commented, it does sound like the fuse may be bad.</p>
<p>The first thing to do is put an ohmmeter across the fuse (with power off!) -- if you get high resistance the fuse is definitely bad. However, if you get low resistance that does not prove the fuse is good -- see @Tom's comments below re. polyfu... | <p>Its very likely the polyfuse is bad. In an ideal printer, given the heater cores and great deal of power, polyfuses are some of the worst things you can use. Polyfuses have a tendency to fail in "interesting" ways, especially around their trigger amperage. Fire is one of those failure modes.</p>
<p>Not only that, b... | 676 |
<p>I was using a CASE called <a href="http://www.magicsoftware.com/" rel="nofollow noreferrer">MAGIC</a> for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied.</p>... | <p>We use a CASE tool at my current company for code generation and we are trying to move away from it.</p>
<p>The benefits that it brings - a graphical representation of the code making components 'easier' to pick up for new developers - are outweighed by the disadvantges in my opinion.</p>
<p>Those main disadvantag... | <p>Just a couple questions for you:</p>
<p>How much productivity do you gain compared to the control that you use?
How testable and reliant is the code you create?
How well can you implement a new pattern into your design?</p>
<p>I can't imagine that there is a CASE out there that I could write a test first and then ... | 3,448 |
<p>How do you create a static class in C++? I should be able to do something like:</p>
<pre><code>cout << "bit 5 is " << BitParser::getBitAt(buffer, 5) << endl;
</code></pre>
<p>Assuming I created the <code>BitParser</code> class. What would the <code>BitParser</code> class definition look like?</p>... | <p>If you're looking for a way of applying the "static" keyword to a class, like you can in C# for example, then you won't be able to without using Managed C++.</p>
<p>But the looks of your sample, you just need to create a public static method on your BitParser object. Like so:</p>
<p><strong>BitParser.h</st... | <p>One case where namespaces may not be so useful for achieving "static classes" is when using these classes to achieve composition over inheritance. Namespaces cannot be friends of classes and so cannot access private members of a class.</p>
<pre><code>class Class {
public:
void foo() { Static::bar(*this); }
... | 3,075 |
<p>Can anyone explain this behavior or how to get around it?</p>
<p>If you execute this query:</p>
<pre><code>select *
from TblA
left join freetexttable ( TblB, *, 'query' ) on TblA.ID = [Key]
inner join DifferentDbCatalog.dbo.TblC on TblA.ID = TblC.TblAID
</code></pre>
<p>It will be very very very slow.</p>
<p>If... | <p>A general rule of thumb is that OUTER JOINs cause the number of rows in a result set to <em>increase,</em> while INNER JOINs cause the number of rows in a result set to <em>decrease.</em> Of course, there are plenty of scenarios where the opposite is true as well, but it's more likely to work this way than not. Wh... | <p>Index the field you use to perform the join.</p>
<p>A good rule of thumb is to assign an index to any commonly referenced <a href="http://en.wikipedia.org/wiki/Foreign_key" rel="nofollow noreferrer">foreign</a> or <a href="http://en.wikipedia.org/wiki/Candidate_key" rel="nofollow noreferrer">candidate keys</a>.</p>... | 6,929 |
<blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects-in-c">How to properly clean up Excel interop objects in C#</a> </p>
</blockquote>
<p>Suppose a ASP.NET web application generates automated Excel Reports on ... | <p>Sorry to say this, and I'm not trying to be smart, but... <strong>don't put office on the server!!!</strong></p>
<p>That's if I've understood correctly! :)</p>
<p><strong>EDIT:</strong> Even though I've been marked down for this, I will never <em>ever</em> advocate running Office on the server - it has proven <str... | <p>You need safely dispose all COM interop objects after you end your work. By "all" I mean absolutely <strong>all</strong>: collections property values and so on. I've created stack object and pushed objects during their setup:</p>
<pre><code>Stack<object> comObjectsToRelease = new Stack<object>();
...
Lo... | 7,451 |
<p>Does anyone know where I can get a free 3D design (STEP or STL) of an M4 Screw and nut? I have found only an M3 on Thingiverse: <a href="http://www.thingiverse.com/thing:729842" rel="nofollow noreferrer">M3 Bolt</a> by <a href="http://www.thingiverse.com/Kaleta" rel="nofollow noreferrer">Kaleta</a>.</p>
| <p>You can get a model for nearly everything McMaster-Carr sells from their website.</p>
<p>M4 Hex Head Screw - <a href="https://www.mcmaster.com/#91280a140/=15dmpx8" rel="nofollow noreferrer">https://www.mcmaster.com/#91280a140/=15dmpx8</a></p>
<p>M4 Nut - <a href="https://www.mcmaster.com/#90592a090/=15dmqjy" rel="... | <p>The thing you linked to describes itself as being generated from a parametric model:
<a href="http://www.thingiverse.com/apps/customizer/run?thing_id=193647" rel="nofollow noreferrer">http://www.thingiverse.com/apps/customizer/run?thing_id=193647</a></p>
<p>To generate any different bolt or nut, you will need to id... | 444 |
<p>I'm printing with anycubic i3 mega on an ultrabase bed. When I first got the printer the prints were easy to remove from the bed after it cools down, I didn't need to put any extra effort. However after I used 70% isopropyl to clean it it seems I removed some kind of extra coating as all next prints were sticking to... | <p>Heating PLA even to 60°C will make it pliable and may affect dimensional accuracy; 100°C is likely to make that severe. Being stuck to the bed and thus constrained by it might help some, but I think it's a bad idea.</p>
<p>If your PLA is hard to remove, you probably have bed leveling issues. PLA should remove easily... | <p>You did exactly the right thing:</p>
<ol>
<li>look,</li>
<li>see,</li>
<li>think,</li>
<li>evaluate and adapt</li>
<li>test</li>
<li>Back to 1. or continue to 7.</li>
<li>Solution found and applied!</li>
</ol>
<p>Congrats!
Johan</p>
<p>Ps: I use the tape in paper, used to mask before paint jobs, I was not that keen ... | 1,698 |
<p>Is there a way in .net 2.0 to discover the network alias for the machine that my code is running on? Specifically, if my workgroup sees my machine as //jekkedev01, how do I retrieve that name programmatically?</p>
| <p>Since you can have multiple network interfaces, each of which can have multiple IPs, and any single IP can have multiple names that can resolve to it, there may be more than one.</p>
<p>If you want to know all the names by which your DNS server knows your machine, you can loop through them all like this:</p>
<pre>... | <p>Use the <a href="http://msdn.microsoft.com/en-us/library/system.environment.aspx" rel="nofollow noreferrer">System.Environment</a> class. It has a property for retrieving the machine name, which is retrieved from the NetBios. Unless I am misunderstanding your question.</p>
| 8,440 |
<p>I am looking to do this in C/C++. I came across <a href="http://www.swig.org/Doc1.3/Varargs.html" rel="nofollow noreferrer"><strong>Variable Length Arguments</strong></a>, but this suggests a solution with Python and C using <a href="http://sourceware.org/libffi/" rel="nofollow noreferrer">libffi</a>.</p>
<p>Now, if... | <p>The problem is that you cannot use 'printf' with <em>va_args</em>. You must use <strong>vprintf</strong> if you are using variable argument lists. <em>vprint</em>, <em>vsprintf</em>, <em>vfprintf</em>, etc. (there are also 'safe' versions in Microsoft's C runtime that will prevent buffer overruns, etc.)</p>
<p>Yo... | <p>How do you mean a pure C/C++ solution?</p>
<p>The rest parameter (...) is supported cross platform in the C runtime.</p>
<p><em><a href="https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/va-arg-va-copy-va-end-va-start" rel="nofollow noreferrer">va_arg, va_copy, va_end, va_start</a></em></p>
| 6,267 |
<p>Is it possible to access the database backend of a sharepoint server? My company uses Sharepoint to store data and pictures of various assets. Ideally I would be able to access the data and display it in my application to allow users both methods of access.</p>
<p>Before I go talk to the IT department I would like ... | <p>Agree with Adam. Querying the Sharepoint Database is a big no-no, as Microsoft does not guarantee that the Schema is in any way stable. Only access the database if there is really no other way.</p>
<p>As for Sharepoint, usually the Lists.asmx Web Service is what you want to look at first.</p>
<p><a href="https://www... | <p>Just a small comment. Never ever go to the database direct. If there is no way to do it via published and supported API's, then there is no way to do it. End of story. This applies even to when you are "just reading data", as this can still cause significant issues.</p>
| 5,316 |
<p>How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary?</p>
| <p>The answer to your question depends on how your are authoring your installer.</p>
<p>For Visual Studio setup projects, create an installer class in one of your deployed assemblies. This is covered in the MSDN documentation, eg <a href="http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx" rel="nofollow nor... | <p>There is support for exactly this in .NET/Windows Installer</p>
<p>Create an assembly using VS.NET.
Add an installer class to the project - select 'Add - New Item'. Select intaller class.
This class derives from System.Configuration.Install.Installer. It has a number of virtual methods such as Install(). This will ... | 5,549 |
<p>At my job we make & sell websites. Usually we install our .NET C# based site on a customer's server and maintain and support it remotely. However, every once in a while, for bigger development works and just to make things simpler (and faster!), we will copy the site to a local server.</p>
<p>This is great, but ... | <p>I'd look at either <a href="http://www.selenic.com/mercurial/wiki/" rel="nofollow noreferrer">Mercurial</a> or <a href="http://bazaar-vcs.org/" rel="nofollow noreferrer">Bazaar</a>. I'm told Git also works on windows, but I suspect the windows port is still a second class port at best.</p>
<p>You'll probably need t... | <p>Maybe not exactly what you request but checkout <a href="http://www.aboutmyip.com/AboutMyXApp/DeltaCopy.jsp" rel="nofollow noreferrer">DeltaCopy</a> which is a windows version of <a href="http://en.wikipedia.org/wiki/Rsync" rel="nofollow noreferrer">rsync</a>. You can also read about another rsync solution <a href="... | 4,972 |
<p>I am new to 3D printing but have been in CNC Machining for a few years. I have a part I am trying to print that is a cylinder 1.000 in. in diameter and has a .200 in overhang starting at 1.300 in. In other words I am printing a 1.300 in. cylinder that is 1.500 in. tall that at 1.300 in. its diameter increases by .20... | <p>The world of 3D Printers usually uses the metric system, especially in nozzle sizes. 0.2 inches are therefore better referred to as 5 mm, which is a considerable amount: that's 11 to 13 perimeters from a 0.4 mm nozzle, depending on extrusion width (0.46 and 0.4 mm respectively). Furthermore, the bore of the item isn... | <p>It appears that your part could be printable upside down. If possible, I'd highly recommend this, as it mostly avoids supports all together.</p>
| 1,483 |
<p>As a classic <code>ASP developer</code> about once a year since <code>ASP.NET</code> came out I decide I really gotta buckle down and learn this fancy new <code>ASP.NET</code>. A few days in and messing with code-behinds and webforms and all this other stuff.</p>
<p>I decide the new fancy stuff is whack and go find... | <p>For a classic ASP developer moving to ASP.NET MVC you are looking at learning a new language (C# or VB.NET), a new database layer (ADO.NET), and a new framework (ASP.NET MVC).</p>
<p>That's a lot of new technologies to wrap your head around all at once.</p>
<p>Also, I don't think it is so much that ASP.NET MVC is ... | <p>ASP.NET MVC is sparsely documented at present -- and of course it depends on your background. If you don't know ASP.NET yet, I wouldn't recommend jumping into it with ASP.NET MVC, too many layers of learning at once.</p>
| 7,038 |
<p>What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is done by building the SQL inline in C# and calling to the SQL Server... | <p>I am not a fan of stored procedures</p>
<blockquote>
<p>Stored Procedures are MORE maintainable because:
* You don't have to recompile your C# app whenever you want to change some SQL</p>
</blockquote>
<p>You'll end up recompiling it anyway when datatypes change, or you want to return an extra column, or wh... | <p>For Microsoft SQL Server you should use stored procedures wherever possible to assist with execution plan caching and reuse. Why do you want to optimise plan re-use? Because the generation of execution plans is fairly expensive to do.</p>
<p>Although the caching and reuse of execution plans for ad-hoc queries has i... | 3,593 |
<p>Within c#, I need to be able to</p>
<ul>
<li>Connect to a remote system, specifying username/password as appropriate</li>
<li>List the members of a localgroup on that system</li>
<li>Fetch the results back to the executing computer</li>
</ul>
<p>So for example I would connect to \SOMESYSTEM with appropriate creds,... | <p>This should be easy to do using WMI. Here you have a pointer to some docs:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa394507.aspx" rel="nofollow noreferrer">WMI Documentation for Win32_UserAccount</a></p>
<p>Even if you have no previous experience with WMI, it should be quite easy to turn that VB Sc... | <p>You should be able to do this with System.DirectoryServices.DirectoryEntry. If you are having trouble running it remotely, maybe you could install something on the remote machines to give you your data via some sort of RPC, like remoting or a web service. But I think what you're trying should be possible remotely ... | 4,167 |
<p>Try loading <a href="http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg" rel="noreferrer">this normal .jpg file</a> in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web ... | <p>The JPG you uploaded is in <a href="http://en.wikipedia.org/wiki/Cmyk" rel="noreferrer">CMYK</a>, IE and Firefox versions before 3 can't read these. Open it using Photoshop (or anything similar, I'm sure GIMP would work too) and resave it in <a href="http://en.wikipedia.org/wiki/Rgb" rel="noreferrer">RGB</a>.</p>
<... | <p>It is possible for other applications to register themselves as a handler for files with a particular extension. Quicktime has (or at least had) a tendency to do this with .png files, so a .png file would display fine inline in an HTML page, but with an URL referring directly to the .png file, IE would immediately d... | 3,811 |
<p>I'm looking at working on a project which uses C#.NET (sitting on a windows box) as the primary language and PostgreSQL as the backend database (backend is sitting on a linux box). I've heard that ODBC.NET allows for easy integration of these two components. </p>
<p>Has anyone had experience actually setting C# a... | <p>I'm working with C# and Postgres using <b>Npgsql2</b> component, and they work fast, I recommend you.</p>
<p>You can download from <a href="https://github.com/npgsql/Npgsql/releases" rel="noreferrer">https://github.com/npgsql/Npgsql/releases</a></p>
<p><b>Note:</b> If you want an application that works with any da... | <p>Npgsql is excellent driver, but only issue Ive found so far is that Numeric value does not fit in a System.Decimal, so only option is correct each query or DB schema </p>
<p><a href="https://github.com/npgsql/Npgsql.EntityFrameworkCore.PostgreSQL/issues/438#issuecomment-486586272" rel="nofollow noreferrer">https:/... | 6,918 |
<p>I wrote a SQL function to convert a datetime value in SQL to a friendlier "n Hours Ago" or "n Days Ago" etc type of message. And I was wondering if there was a better way to do it. </p>
<p>(Yes I know "don't do it in SQL" but for design reasons I have to do it this way).</p>
<p>Here is the function I've written:</... | <p>As you say, I probably wouldn't do it in SQL, but as a thought exercise have a MySQL implementation:</p>
<pre><code>CASE
WHEN compare_date between date_sub(now(), INTERVAL 60 minute) and now()
THEN concat(minute(TIMEDIFF(now(), compare_date)), ' minutes ago')
WHEN datediff(now(), compare_date) = 1... | <p>The posts above gave me some good ideas so here is another function for anyone using SQL Server 2012.</p>
<pre><code> CREATE FUNCTION [dbo].[FN_TIME_ELAPSED]
(
@TIMESTAMP DATETIME
)
RETURNS VARCHAR(50)
AS
BEGIN
RETURN
(
SELECT TIME_ELAPSED =
CASE
... | 7,283 |
<p>By "better" I mean "more precise"...</p>
<p>With respect to a RepRap P3Steel or Wilson II, I am getting some 330 mm T8 leadscrews for the Z-axis movement.</p>
<p>There seems to be a choice between a <em>lead</em> of 1, 2 or 8 mm - the <em>pitch</em> is 1 mm in the first case and 2 mm in the last ... | <p>Based on what I've learned over 8 months of printing:</p>
<p>What matters the most is getting a very accurate zero relative to the bed surface. An offset of 30 or 40 microns can strongly affect first-layer adhesion. Now, unless you put in some of the advanced auto-levelling sensors, the repeatability of the Z-axi... | <p><strong>Longer lead</strong></p>
<p>Pros:</p>
<ol>
<li>Faster movement (mostly benefits homing)</li>
<li>More standard</li>
<li>Weak motor friendly</li>
<li>Might be slightly more stable (sideways) than shorter leads because of more starts creating more contact with nut (?)</li>
</ol>
<p>Cons</p>
<ol>
<li>Backla... | 594 |
<p><strong>Situation:</strong></p>
<p>I have a simple <em>XML</em> document that contains image information. I need to transform it into <em>HTML</em>. However, I can't see where the open tag is and when I use the <em>XSL</em> code below, it shows the following error message: </p>
<blockquote>
<p>"Cannot write an a... | <p>Just to clarify the problem here - the error is in the following bit of code:</p>
<pre><code><xsl:attribute name="src">
<xsl:copy-of select="/root/Image/node()"/>
</xsl:attribute>
</code></pre>
<p>The instruction xsl:copy-of takes a node or node-set and makes a copy of it - outputting a node ... | <p>The other option to try is a straightforward </p>
<pre><code><img width="100" height="100" src="/root/Image/image.jpeg" class="CalloutRightPhoto"/>
</code></pre>
<p>i.e. without {} but instead giving the direct image path</p>
| 6,792 |
<p>The last time I took on a non-trivial .Net/C# application I used Castle Monorail and, on the whole, enjoyed the experience. Early-access/preview releases of .Net MVC were not yet available. Many "Microsoft shops" will now find the "official" solution more appealing. Has anyone gone from Monorail to .Net MVC. </p>
<... | <p>While I haven't made the switch yet, I have developed on both platforms and have been doing some pre-switch analysis. </p>
<p>It looks like the biggest difference would be the View Engines. Our Monorail stuff uses the Brail view engine while asp.net mvc comes (stock) with a webforms like view engine. There are o... | <p>The ASP.NET MVC team is still making changes before v1.0, so now's a good time to <a href="http://forums.asp.net/1146.aspx" rel="nofollow noreferrer">provide feedback</a>.</p>
<p>Also, be aware that there are more frequent releases on <a href="http://www.codeplex.com/aspnet" rel="nofollow noreferrer">CodePlex</a>, ... | 4,389 |
<p>Our team is creating a new recruitment workflow system to replace an old one. I have been tasked with migrating the old data into the new schema. I have decided to do this by creating a small Windows Forms project as the schema are radically different and straight TSQL scripts are not an adequate solution.</p>
<p>T... | <p>Maybe you can try the BackgroundWorker component. It makes threading easier. Examples here:</p>
<ul>
<li><a href="http://www.codeproject.com/KB/cpp/BackgroundWorker_Threads.aspx" rel="nofollow noreferrer">BackgroundWorker Threads and Supporting Cancel</a></li>
<li><a href="http://www.c-sharpcorner.com/UploadFile/Li... | <p>Are you sure that the UI thread is running freely during all this process? i.e. it's not sitting blocked-up on a Join or some other wait? That's what it looks like to me.</p>
<p>The suggestion of using BackgroundWorker is a good one - definitely superior to trying to sledge-hammer your way out of the problem with... | 3,318 |
<p>I know that we can get the MAC address of a user via IE (ActiveX objects).</p>
<p>Is there a way to obtain a user's MAC address using JavaScript?</p>
| <p>I concur with all the previous answers that it would be a privacy/security vulnerability if you would be able to do this directly from Javascript. There are two things I can think of:</p>
<ul>
<li>Using Java (with a signed applet)</li>
<li>Using signed Javascript, which in FF (and Mozilla in general) gets higher pr... | <p>No you can't obtain a user's MAC address using JavaScript in another way, just by using active X op for Microsoft in IE browser</p>
| 2,551 |
<p>I am serializing a <code>JPEG</code> Image in <code>c#.net</code>. I am simply converting it into a byte steam and sending it through web service. </p>
<p>I observed that serialized byte stream is 30 times more than that of the size of actual image. Can any one <strong>suggest me a better approach</strong> to seria... | <p>JPEG is a compression technology, and it is expected that it will expand greatly once you read it in. This is the nature of the file format. Try to find a way to send the original JPEG file without reading it as an image first.</p>
| <p>Why not convert it to a Base64String?</p>
<pre><code>byte[] arr = File.ReadAllBytes(filename);
string str = Convert.ToBase64String(arr);
</code></pre>
<p>On the other end you can change it back to a byte[] by going:</p>
<pre><code>byte[] arr = Convert.FromBase64String(string);
</code></pre>
| 9,498 |
<p>We are currently developing a server whereby a client requests interest in changes to specific data elements and when that data changes the server pushes the data back to the client. There has vigorous debate at work about whether or not it would be better for the client to poll for this data. </p>
<p>What is consi... | <p>There's probably no ideal method for every situation, but push is usually better and used more often. It allows to optimize server caching and data transfers, which helps performance and scalability, and cuts network traffic a bit by avoiding client requests and empty responses. It can be important advantage for a s... | <p>What do you have on the client's side? Many firewalls allow outgoing requests but block incoming requests. In other words, pull may be your only option if you are crossing the Internet unless you are sending out e-mails.</p>
| 8,321 |
<p>According to Wikipedia, Tetrahydrofuran dissolves PLA. It also apparently dissolves PET.</p>
<blockquote>
<p>THF is considered a relatively nontoxic solvent, with the median lethal dose (LD<sub>50</sub>) comparable to that for acetone.</p>
</blockquote>
<p>Wikipedia further states that it's not particularly dang... | <p>According to Shuichi Sato, Daiki Gondo, Takayuki Wada, Shinji Kanehashi & Kazukiyo Nagai: <em>Effects of various liquid organic solvents on solvent‐induced crystallization of amorphous poly(lactic acid) film</em> in <em>Journal of Applied Polymer Science</em>, Volume 129 Issue 3 (2013), p1607-1617<sup><a href="h... | <p>From what I have read, THF is not super effective, it seems that Dichloromethane or DCM is actually a better solvent. Unfortunately I have no personal experience with either. </p>
<p>It is rather nasty though, as the LD<sub>50</sub> is just 0.5 to 5 g/kg<sup><a href="https://www.researchgate.net/post/Solubility_of... | 519 |
<p>I'm downloading some images from a service that doesn't always include a content-type and doesn't provide an extension for the file I'm downloading (ugh, don't ask).</p>
<p>What's the best way to determine the image format in .NET?</p>
<p>The application that is reading these downloaded images needs to have a prop... | <p>A probably easier approach would be to use Image.FromFile() and then use the RawFormat property, as it already knows about the magic bits in the headers for the most common formats, like this:</p>
<pre><code>Image i = Image.FromFile("c:\\foo");
if (System.Drawing.Imaging.ImageFormat.Jpeg.Equals(i.RawFormat))
M... | <p>Try loading the stream into a System.IO.BinaryReader. </p>
<p>Then you will need to refer to the specifications for each image format you need, and load the header byte by byte to compare against the specifications. For example here are the <a href="http://www.libpng.org/pub/png/pngdocs.html" rel="nofollow norefe... | 7,972 |
<p>Given an Oracle table created using the following:</p>
<pre><code>CREATE TABLE Log(WhenAdded TIMESTAMP(6) WITH TIME ZONE);
</code></pre>
<p>Using the Python ODBC module from its <a href="http://www.python.org/download/windows/" rel="nofollow noreferrer">Win32 extensions</a> (from the win32all package), I tried the... | <p>I believe this is a bug in the Oracle ODBC driver. Basically, the Oracle ODBC driver does not support the <code>TIMESTAMP WITH (LOCAL) TIME ZONE</code> data types, only the <code>TIMESTAMP</code> data type. As you have discovered, one workaround is in fact to use the <code>TO_CHAR</code> method.</p>
<p>In your exam... | <p>My solution to this, that I hope can be bettered, is to use Oracle to explicitly convert the TIMESTAMP into a string:</p>
<pre><code>cursor.execute("SELECT TO_CHAR(WhenAdded, 'YYYY-MM-DD HH:MI:SSAM') FROM Log")
</code></pre>
<p>This works, but isn't portable. I'd like to use the same Python script against a SQL Se... | 5,935 |
<p>I'm using RichFaces per a client requirement, but the markup it (and the stock JSF controls) generates is an awful mess of nested tables. Are there any control libraries out there that generate nicer markup? AJAX support is a huge plus!</p>
| <p>There is ICEFaces which provides more semantic support than RichFaces .Also you can try Nitobi suite which also provides similar kinda solution.If you are not satisfied with any of these I suggest try to write your own part extending the Sun faces</p>
| <p>Short answer: No I have not yet found one.
Your options include using less complicated controls and know what html the standard controls emit. Thing like h:panelGrid render as a table. There is nothing stopping you writing your own rendering family which produces more standards compliment html, but this would be a b... | 8,896 |
<p>I am a C++/C# developer and never spent time working on web pages. I would like to put text (randomly and diagonally perhaps) in large letters across the background of some pages. I want to be able to read the foreground text and also be able to read the "watermark". I understand that is probably more of a functi... | <pre><code><style type="text/css">
#watermark {
color: #d0d0d0;
font-size: 200pt;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
position: absolute;
width: 100%;
height: 100%;
margin: 0;
z-index: -1;
left:-100px;
top:-200px;
}
</style>
</code></pre>
<p>This lets yo... | <p>You could make an image with the watermark and then set the image as the background via css.</p>
<p>For example:</p>
<pre><code><style type="text/css">
.watermark{background:url(urltoimage.png);}
</style>
<div class="watermark">
<p>this is some text with the watermark as the background.<... | 9,407 |
<p>I am starting a new company using 3D printers and doing an advertisement, and I want to use the word FabLab to describe the kinds of field that my company is in.</p>
<p>Can I be sued by using the word FabLab in an advertisement? Is it a trademark? I mean, I can find <a href="https://www.ebay.fr/sch/i.html?_from=R40&... | <p>I did a simple search at <a href="http://www.huski.ai" rel="nofollow noreferrer">www.huski.ai</a>, and found 11 trademarks with the mark word "FabLab".</p>
<p><a href="https://i.stack.imgur.com/PXPXU.png" rel="nofollow noreferrer" title="Screenshot of search"><img src="https://i.stack.imgur.com/PXPXU.png" ... | <p>Sorry, I needed to learn to use the site. This site shows Fablab as a word mark, the same way it shows Apple: <a href="https://www.trademarkengine.com/free-trademark-search/trademark-search" rel="nofollow noreferrer">https://www.trademarkengine.com/free-trademark-search/trademark-search</a></p>
| 1,867 |
<p>Developing an electronic product for which I'll need an enclosure. It's about 50x30x20mm and should survive higher temperatures (50-60 degrees). Because of the low volume (under 500 required per year), I'd like to go for an enclosure option that doesn't require a huge upfront cost. So ended up at 3d printing. As th... | <p>ABS should be able to handle the the temperatures you describe. ABS will have a similar finish to PLA when it first comes off the printer, but you can refine and smooth your results via an acetone vapor treatment. This only takes a few minutes per piece, and can cost as little as a $1 bottle of fingernail polish rem... | <p>ABS would be ok for these temperatures. But 3d-printing, cleaning up the print and smoothing the surface to get a marketable device takes time and effort.
So I guess that for a few hundred enclosures you'd be far better/cheaper off having them manufactured (in China?) than trying to print them yourself.
Unless the d... | 1,389 |
<p>I am at my wits end with this problem. I start a print and the skirt goes down fine, then the outline of the parts go down fine (usually) and then when it goes to fill in the first layer, it will always get stuck to the hotend at some point and rip apart the layer. </p>
<p>Any ideas on how to solve this?</p>
<ul>
... | <p><strong>Step Zero:</strong> is always to check/adjust the bed level - if the height over the bed varies while putting down the first layer, it's hard to ever get first layer settings that work.</p>
<p><strong>Step One:</strong> is to adjust your first layer settings - height, temperature, extrusion width until you ... | <p>Try lowering your first layer temp to 205°C, and apply a gluestick to the bed before you print anything. By lowering the temp, this allows th plastic to cool faster, and doesn't risk the plastic sticking to the nozzle as much. Applying the glue stick will help the print to stick to the buildplate better, lowering th... | 626 |
<p>According to the <a href="http://uk3.php.net/features.safe-mode" rel="nofollow noreferrer">PHP Safe Mode Docs</a> on safe_mode_gid:</p>
<blockquote>
<p>By default, Safe Mode does a UID compare check when opening files. If you want to relax this to a GID compare, then turn on safe_mode_gid. Whether to use UID (FAL... | <p>This will just allow you a little more flexibility in your web server setup. Using safe_mode_gid, you should be able to run individual PHP/httpd processes for each user on your system, but give each process the ability to read some shared files as long as they are all run as the same group (GID) and the shared file... | <p>Safe mode UID check is used to prevent users from accessing other peoples files. GID is used to prevent a GROUP of users from accessing other GROUPS files.</p>
| 2,940 |
<p>I'm getting notifications to back up my encryption key for EFS in Vista, however i haven't enabled bit locker or drive encryption.</p>
<p>Anyone know how to find out what files may be encrypted or have an explanation for why it would notify me?</p>
| <p>To find out which files on your system have been encrypted with EFS, you can simply run this command:</p>
<pre><code>CIPHER.EXE /U /N
</code></pre>
| <p>Clippy noticed that you have sensitive information in your files and automatically encrypted them.</p>
<p>Are you sure it's for EFS? I've had things prompt me to backup my keys before, but I didn't know exactly what they were to. I was assuming it was like a DRM protected file or something. It was a while ago so i ... | 3,279 |
<p>I have a variable of type <code>Dynamic</code> and I know for sure one of its fields, lets call it <code>a</code>, actually is an array. But when I'm writing </p>
<pre><code>var d : Dynamic = getDynamic();
for (t in d.a) {
}
</code></pre>
<p>I get a compilation error on line two:</p>
<blockquote>
<p>You can't i... | <p>Haxe can't iterate over <code>Dynamic</code> variables (as the compiler says).</p>
<p>You can make it work in several ways, where this one is probably easiest (depending on your situation):</p>
<pre><code>var d : {a:Array<Dynamic>} = getDynamic();
for (t in d.a) { ... }
</code></pre>
<p>You could also chang... | <p>Another way to do the same is to use an extra temp variable and explicit typing:</p>
<pre><code>var d = getDynamic();
var a: Array<Dynamic> = d.a;
for (t in a) { ... }
</code></pre>
| 7,497 |
<p>I'm capturing data from a tablet using Java (JPen library rocks) and would like to be able to paint a penstroke in a more natural way.</p>
<p>Currently I'm drawing the pen stroke as straight line segments each with a different Stroke thickness. </p>
<p>There has to be something in Java's Graphics Library that let... | <p>I've never done this, but here are a couple things you could try. First, you could implement a custom <a href="http://java.sun.com/javase/6/docs/api/java/awt/Stroke.html" rel="nofollow noreferrer">Stroke</a> that creates skinny trapezoids. The width of the end caps would be a function of the pressure at the end poin... | <p>PostScript RIPs often convert circles to curves and curves to a series of straight line segments. The number of segments depends on the flatness setting which defaults to one suitable for the raster display resolution.</p>
<p>A thick line or thick line segments can be converted to a skinny filled polygon.</p>
| 6,407 |
<p>The .NET <a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx" rel="noreferrer">IDisposable Pattern</a> <em>implies</em> that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose.
This is logical, and is what I've always done in the rare situat... | <p>The .Net Garbage Collector calls the Object.Finalize method of an object on garbage collection. By <strong>default</strong> this does <strong>nothing</strong> and must be overidden if you want to free additional resources.</p>
<p>Dispose is NOT automatically called and must be <strong>explicity</strong> called if ... | <p>The documentation on <a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx" rel="nofollow noreferrer">IDisposable</a> gives a pretty clear and detailed explaination of the behavior, as well as example code. The GC will NOT call the <code>Dispose()</code> method on the interface, but it will call t... | 6,683 |
<p>I have just assembled the Creality3D Ender-4 kit a couple of days ago.
I completed some rewiring and everything seems to be wired correctly, I'm able to auto-home successfully, but this is the problem I'm having:</p>
<p>I tried printing a <a href="https://makerware.thingiverse.com/thing:1278865" rel="nofollow noref... | <p>The <strong>first problem</strong> is solved by removing the tick mark at <code>Origin at center</code>. Most printers have their origin at a corner (not Delta's, their origin is in the top center).</p>
<p>The <strong>second problem</strong> is a little more difficult to solve. Please note that a kit should be loa... | <p>Fix was actually pretty simple.</p>
<p>I just removed the printer that I had setup on CURA following the manual provided by Creality (found on the provided SD Card) and started from scratch.</p>
<p>The one that worked was actually setting up the printer as a <a href="https://www.inky.mx/MPRESORA-CREALITY-CR-10-,72... | 938 |
<p>Joe Van Dyk <a href="http://www.zenspider.com/pipermail/ruby/2008-August/004223.html" rel="noreferrer">asked the Ruby mailing list</a>:</p>
<blockquote>
<p>Hi,</p>
<p>In Ruby, I guess you can't marshal a lambda/proc object, right? Is
that possible in lisp or other languages?</p>
<p>What I was trying ... | <p>You cannot marshal a Lambda or Proc. This is because both of them are considered closures, which means they close around the memory on which they were defined and can reference it. (In order to marshal them you'd have to Marshal all of the memory they could access at the time they were created.)</p>
<p>As Gaius poi... | <p>If proc is defined into a file, U can get the file location of proc then serialize it, then after deserialize use the location to get back to the proc again</p>
<blockquote>
<p>proc_location_array = proc.source_location</p>
</blockquote>
<p>after deserialize:</p>
<blockquote>
<p>file_name = proc_location_arra... | 4,377 |
<p>Back when I was at school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of weapon. Pretty basic stuff, but ... | <p>I used to have a lot of fun coding my own robot with <a href="http://robocode.sourceforge.net/" rel="noreferrer">Robocode</a> in college.</p>
<p>It is Java based, the API is detailled and it's pretty easy to get a challenging robot up and running.</p>
<p>Here is an example : </p>
<pre><code> public class MyFirstR... | <p>There is a Spanish Java Page who organice a football leage in wich the users program the skills of their team and the strategy. You only need to download the framework and implement a little interface, then you can simulate matchs which are seen in the screen. When you are happy with your team and strategy you submi... | 4,552 |
<p>I'm having a Prusa i3 derivative printer with a capacitive sensor for the z-axis. It switches a tiny bit before the nozzle hits the print bed and hence needs a z-offset to be configured.</p>
<p>In Slic3r I have configured the z-offset to <code>-0.1</code> on the <em>General</em> page of the <em>Printer Settings</em... | <p>You can trick the printer into applying an offset using the <code>G92</code> command:</p>
<pre><code>G0 Z0
G92 Z0.1
</code></pre>
<p>First, we move the nozzle to <code>Z=0</code>. Next, through the <code>G92</code> command, we tell the printer to, from now on, treat the current position as <code>Z=0.1</code>. Thi... | <p>I built my printer five years ago with a similar issue and I strongly suggest that the physical 0 will be the actual 0 instead of tweeking it into the system. Especially if you are exploring and testing new methods, i.e. Cura vs Slic3r settings. In Marlin, you can insert a z adjustment for the endstops but it can cr... | 701 |
<p>I needed to know if typical UV curing resins, such as the ones from Anycubic, can withstand solar radiation over extended periods of time with little to no degradation. It has been quite difficult to find information about the subject online, so I'm wondering whether anyone here has experience here to share.</p>
| <p>What seems to be a difficulty is the stabilizers for plastic absorb UV. So if added to UV resin, they probably greatly increase the exposure time needed.</p>
<p>The following show characteristics of some plastics, taken from <a href="https://www.coleparmer.com/tech-article/uv-properties-of-plastics" rel="nofollow n... | <p>Sunlight contains the full spectrum of electromagnetic radiation, including the wavelength to photoinitiate your resin. Most UV-curable materials are kept in opaque containers for this reason. The extent to which your material is crosslinked will depend on your material and how much sunlight it receives.</p>
| 1,879 |
<p>I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)?</p>
<p>Some people pointed to <code>Application.LocalUserAppDataPath</code>. However, that creates a folder structure like:</p>
<blockquote>
<p>C:\Documents and Settings\user_name\Local ... | <p>I love using the built-in <a href="http://msdn.microsoft.com/en-us/library/a65txexh.aspx" rel="noreferrer">Application Settings</a>. Then you have built in support for using the settings designer if you want at design-time, or at runtime to use: </p>
<pre><code>// read setting
string setting1 = (string)Settings.De... | <p>Settings are standard key-value pairs (string-string). I could wrap them in an XML file, if that helps.</p>
<p>I'd rather use the file system instead of the registry. It seems to be easier to maintain. In support scenarios, if the user needs to manually open/change the settings, that would be easier if it's in the ... | 4,594 |
<p>When performing string concatentation of an existing string in the intern pool, is a new string entered into the intern pool or is a reference returned to the existing string in the intern pool? According to this article, String.Concat and StringBuilder will insert new string instances into the intern pool? </p>
<p... | <p>If you create new strings, they will not automatically be put into the intern pool, unless you concatenate constants compile-time, in which case the compiler will create one string result and intern that as part of the JIT process.</p>
| <p>You can see whether a string has been interned by calling <code>String.IsInterned</code>. The call will return a new string that is either a reference to an interned string equal to the string that was passed as an argument, or <code>null</code> if the string was not interned.</p>
| 5,889 |
<p>I love the way Mac OS <em>beautifully</em> renders fonts (not just browsers). I was wondering if we could somehow get the same rendering in browsers running on Windows?</p>
<p>Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts?</p>
| <p>Check out <strong>GDI++/FreeType</strong> (<a href="http://free.flop.jp/gdi++/" rel="noreferrer">link</a>, <a href="http://offset.skew.org/wiki/User:Mjb/GDI%2B%2B" rel="noreferrer">link</a>). It's a highly configurable font-rendering replacement for Windows. With some configuration of hinting, anti-aliasing, etc, yo... | <p>You could wait until IE9, which apparently has much better text rendering, using DirectX: <a href="http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/ie/archive/2009/11/18/an-early-look-at-ie9-for-developers.aspx</a></p>
| 8,275 |
<p>If I need to 3D print a hollow box that can not have any light permeating into the box, what would be the best course of action? Should I 3D print the hollow box as a whole or print out the 6 sides individually and put them together at the end? And if I do the second option, what would be the best way to put the pie... | <p>That depends very much on what your goal is with the box. If it needs to be hollow and you don't need any access to the inside (and also prefer it to be printed in one piece) than the answer provided by user77232 would probably be the best.</p>
<p>Alternatively, if you need access to the inside of the box you would ... | <ol>
<li>Print it as a whole object</li>
<li>Use 20% infill.</li>
<li>Profit!</li>
</ol>
| 1,738 |
<p>If I use <code>assert()</code> and the assertion fails then <code>assert()</code> will call <code>abort()</code>, ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefully... | <p>Yes, as a matter of fact there is. You will need to write a custom assert function yourself, as C++'s <code>assert()</code> is exactly C's <code>assert()</code>, with the <code>abort()</code> "feature" bundled in. Fortunately, this is surprisingly straightforward.</p>
<p><em>Assert.hh</em></p>
<pre><code>templat... | <pre><code>_set_error_mode(_OUT_TO_MSGBOX);
</code></pre>
<p>believe me, this function can help you.</p>
| 5,816 |
<p>What are the 'headline' basic design rules for FDM? </p>
<p>Which topics for design principles do you recommend to someone who has purchased an FDM machine and wants to understand what is practical? In other words, where is the place to start when you don't yet know what questions to ask?</p>
<p><a href="https:/... | <p>Designing a part for 3D printing often doesn't seem to have many special considerations, but I have learned the hard way, that there are some things to do differently. This is just a list of things to that one should keep in mind <em><strong>in addition to basic principles of design</strong></em><sup>1</sup> when de... | <p>In a <a href="https://drive.google.com/file/d/1p62P1ZvTwCKK0TGZL7FKhxg-lZQLMe3Q/view?usp=sharing" rel="nofollow noreferrer">presentation</a>(pdf) that I've used as an introduction to 3D printing, I listed out the following points:</p>
<ul>
<li>Structures have to be built-up from the build platform, with only about ... | 1,012 |
<p>Here is the deal. </p>
<p>$ gem --version</p>
<blockquote>
<p>1.1.0</p>
</blockquote>
<p>$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config</p>
<blockquote>
<p>Bulk updating Gem source index for:
<a href="http://gems.rubyforge.org/" rel="nofollow noreferrer">http://gems.rubyf... | <p>First of all as Orion Edwards said make sure you have rubygems 1.2. Unfortunately, </p>
<blockquote>
<p>gem update --system</p>
</blockquote>
<p>did not work for me. </p>
<p>Instead I had to:</p>
<ol>
<li>Manually download <a href="http://rubyforge.org/frs/download.php/38844/rubygems-update-1.2.0.gem" rel="nof... | <p>Do you have different ruby versions on your system? If you're running the Darwin-supplied ruby binary, but installed ruby gems under /usr/local, then you'll get errors like this. Even if you've aliased ruby to point to /usr/local, the gem command may fail if the proper ruby binary is not resolved correctly by your... | 6,240 |
<p>I am searching for 3D printing filaments, that are suitable for outdoor purposes, but printable on unheated beds.</p>
<p>I will mostly use it for sensor node enclosures (should withstand temperature up to 50°C/120°F) and car accessories (70°C/160°F).</p>
<p>If it requires annealing, it should have low shrinkage, s... | <p>This is not an easy one to solve, the firmware of the printer should be keeping the printer at a certain temperature depending on the temperature setting and the current value. If the firmware is not able to keep the temperature at the requested level, but goes beyond that level, that could be considered "strange". ... | <p>A similar condition occurred in my 3D printer. I solved the same. I checked all my connection and I came to know that I connected the thermistor of the extruder in the wrong port. So just check the connection of your thermistor.</p>
<hr>
<p>Actually my 3D printer circuit board frequently failed because of over cur... | 969 |
<p>I've just bought my first 3D printer (Malyan M200 V2). For the most part, it's been really good and I've had no issues, apart from when printing the first few layers the printer doesn't seem to extrude enough material and doesn't form the correct shape. Whether it's a circle, rectangle, or anything else. So for exam... | <p>PLA doesn't need a raft.</p>
<p>Try printing without a raft. If you print with a raft because of adhesion problems, solve those first. A raft is only needed for filaments that shrink a lot and/or are printing at very high temperatures.</p>
<p>If you want a raft, check the distance between raft and print object and k... | <p>In Cura, you can indeed set the height of the first layer separate from the subsequent layers. So if the first layer is printing nicely, that's a good sign. That's usually the place prints fail. There are a few settings, but here are a few things to just double check:</p>
<ul>
<li>Is your nozzle set to the right siz... | 2,176 |
<p>An obscure puzzle, but it's driving me absolutely nuts:</p>
<p>I'm creating a custom Information Management Policy in MOSS. I've implemented IPolicyFeature, and my policy feature happily registers itself by configuring a new SPItemEventReceiver. All new items in my library fire the events as they should, and it all... | <p>There's only a couple of things I can think of to try. First, are you developing on the box where you might be able to use Visual Studio to debug? So just stepping through it.</p>
<p>Assuming that's not the case - what I'd do is fire up WinDBG and attach it to the process just before I registered the policy. Turn o... | <p>Some nice ideas there, thanks. The Visual Studio debugger wasn't showing an exception (and I've wrapped everything in try/catch blocks just in case), but I hadn't thought of trying Windbg...</p>
| 6,885 |
<p>I'm presenting information from a DataTable on my page and would like to add some sorting functionality which goes a bit beyond a straight forward column sort. As such I have been trying to place LinkButtons in the HeaderItems of my GridView which post-back to functions that change session information before reloadi... | <p>You're on the right track but try working with the Command Name/Argument of the LinkButton. Try something like this:</p>
<p>In the HeaderTemplate of the the TemplateField, add a LinkButton and set the CommandName and CommandArgument</p>
<pre><code><HeaderTemplate>
<asp:LinkButton ID="LinkButton1" ru... | <p>Two things to keep in mind when using events on dynamically generated controls in ASP.Net:</p>
<ul>
<li>Firstly, the controls should ideally be created in the Page.Init event handler. This is to ensure that the controls have already been created before the event handling code is ran.</li>
<li>Secondly, you must ass... | 6,735 |
<p>What's the recommended source control system for a very small team (one developer)?<BR><BR>
Price does not matter. Customer would pay :-)<BR>
I'm working on Vista32 with VS 2008 in C++ and later in C# and with WPF. Setting up an extra (physical) server for this seems overkill to me. <BR><BR>Any opinions?</p>
| <p>I would use Subversion (in fact I use it) [<strong>update</strong>: Jul 2014 -- I use Git -- see end of the answer].
SVN is:</p>
<ul>
<li>free, </li>
<li>good enough (see disadvantages below), </li>
<li>simple, </li>
<li>works fine on Windows (and Linux too), </li>
<li>a lot of people use it so it's easy to get ... | <p>I dont see why the fact that your one developer changes anything on the source control issue. I would follow the same system (in fact I do on my solo projects). I use <a href="http://wush.net/" rel="nofollow noreferrer">wush.net</a> (svn and trac) in those cases. It's fast to set up and dont require that you yourse... | 6,725 |
<p>This <a href="https://stackoverflow.com/questions/11782/file-uploads-via-web-services">question and answer</a> shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this:</p>
<pre><code><... | <p>Typically a byte array is sent as a <code>base64</code> encoded string, not as individual bytes in tags. </p>
<p><a href="http://en.wikipedia.org/wiki/Base64" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Base64</a></p>
<p>The <code>base64</code> encoded version is about <strong>137%</strong> of the size ... | <p>I use this method for some internal corporate webservices, and I haven't noticed any major slow-downs (but that doesn't mean it's not there). </p>
<p>You could probably use any of the numerous network traffic analysis tools to measure the size of the data, and make a judgment call based off that.</p>
| 3,294 |
<p>What are the basic steps to compile an OpenGL application using <em>GLUT (OpenGL Utility Toolkit)</em> under Visual C++ Express Edition?</p>
| <ol>
<li>If you don't have Visual C++ Express Edition (VCEE), download and install <a href="http://msdn.microsoft.com/vstudio/express/visualc/default.aspx" rel="nofollow noreferrer">VCEE</a>.</li>
<li>The default install of Visual C++ Express Edition builds for the .Net platform. We'll need to build for the Windows pla... | <p>The GLUT port on Nate Robin's site is from 2001 and has some incompatibilities with versions of Visual Studio more recent than that (.NET 2003 and up). The incompatibility manifests itself as errors about redefinition of <code>exit()</code>. If you see this error, there are two possible solutions:</p>
<ol>
<li>Rep... | 3,503 |
<p>I have a small problem where plastic comes out of the nozzle while the printer is at a standstill (normally towards the end of heating the nozzle for a print), and whilst it moves from the line for clearing the nozzle on the left of the bed (Cura) before the actual print starts. This causes a slight problem where th... | <h1>basics first</h1>
<p>The viscosity of plastic is temperature dependent: the warmer it is, the lower it gets and thus the more "runny". The lower the viscosity is, the less force is needed to move it.</p>
<p>In printing, a pressure is applied to the filament from the extruder. Pressure is the force by area, thus f... | <p>This effect is called oozing. At the end of heating up the hot end, left filament becomes so liquid that it oozes out of the nozzle. This left filament could be a left over from the previous print where an insufficient retract prior to the last print finish causes this (you could retract the filament a little furthe... | 1,102 |
<p>I want to put relief text on curved surface but can't find way to do that in OpenSCAD. I'm aware it's possible to bend text in Blender and then <code>import stl</code>, but I don't like this workflow. I found sort of working solution but it's not perfect.</p>
<pre><code>$fn=50;
module bend_text(caption, angle, text... | <p>Yes - you should be able to turn the extruder by hand when it is unplugged and therefore not powered.</p>
<p>The V2 comes with a blue plastic knob for this purpose, it may be too small to turn the shaft by hand.</p>
<p>When powered and "steppers enabled" the motors need a lot more force to overcome, but ev... | <p>Criggie's answer is basically correct, but I disagree with the conclusion that it:</p>
<blockquote>
<p>Could be expensive - you might want to compare cost of parts with cost of a new printer, remembering there may be other non-functional components still undiscovered.</p>
</blockquote>
<p>If you want to turn the End... | 2,146 |
<p>I'm trying to generate custom e-mail addresses that get forwarded to a catch-all. I'm wondering how postfix would need to be configured to handle these types of e-mails</p>
<p>dropbox@123456.foobar.highrisehq.com</p>
| <p>I do believe that it is not totally a smtp server level thing. Like the mails where the ticket id is in the subject line and you have to keep that there, there would mostly be another application that would be checking TO address, doing a database lookup and then doing something useful.</p>
<p>I haven't signed up ... | <p>They're most likely piping a wildcard e-mail address into a script.</p>
| 9,055 |
<p>So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.</p>
<p>My question is this: Should there b... | <p>From your example, there is an argument for two tables, as you have files that can be associated with two different things.</p>
<ul>
<li>CVs, photos are associated with a user.</li>
<li>attachments are associated with a CMS page.</li>
</ul>
<p>If you put these in one table, (and you want to allow users to have mor... | <p>From what you've said I would just store files with random (UUID or what-not) filenames in one place. I would then have a 'attachments' table or something that contains references to all your external files. This table would also contain the meta-data for that file, so what type of file it is (picture, CV etc) and s... | 3,828 |
<p>Recently I have been having issues with Firefox 3 on Ubuntu Hardy Heron.</p>
<p>I will click on a link and it will hang for a while. I don't know if its a bug in Firefox 3 or a page running too much client side JavaScript, but I would like to try and debug it a bit.</p>
<p>So, my question is "is there a way to ha... | <p>It's probably the <a href="http://shaver.off.net/diary/2008/05/25/fsyncers-and-curveballs/" rel="noreferrer">awesome firefox3 fsync "bug"</a>, which is a giant pile of fail.</p>
<p>In summary</p>
<ul>
<li>Firefox3 saves its bookmarks and history in an SQLite database</li>
<li>Every time you load a page it writes t... | <p>There's no "process explorer" kind of tool for Firefox; but there's <a href="https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Venkman" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Venkman</a> with profiling mode, which you could use to see the time spent by chr... | 2,909 |
<p>I can set the PHP include path in the <code>php.ini</code>:</p>
<pre><code>include_path = /path/to/site/includes/
</code></pre>
<p>But then other websites are affected so that is no good.</p>
<p>I can set the PHP include in the start of every file:</p>
<pre><code>$path = '/path/to/site/includes/';
set_include_pa... | <p>If you're using apache as a webserver you can override (if you allow it) settings using <em>.htaccess</em> files. See <a href="http://us2.php.net/configuration.changes" rel="nofollow noreferrer">the PHP manual</a> for details.</p>
<p>Basically you put a file called <em>.htaccess</em> in your website root, which con... | <p>You can set <code>include_path</code> in your php.ini file too. I'm a perl guy, so I expect to be able to load includes and have <code>include</code> do the right thing. I have all my includes in a specific directory, which is added to <code>include_path</code>. I can do things like </p>
<pre><code>require_once "Cl... | 4,427 |
<p>I'm pretty new to my company (2 weeks) and we're starting a new platform for our system using .NET 3.5 Team Foundation from DotNetNuke. Our "architect" is suggesting we use one class project. Of course, I chime back with a "3-tier" architecture (Business, Data, Web class projects). </p>
<p>Is there any disadvantage... | <p>I guess a fairly big downside is that the extra volume of code that you have to write, manage and maintain for a <strong>small</strong> project may just be overkill.</p>
<p>It's all down to what's appropriate for the size of the project, the expected life of the final project and the budget! Sometimes, whilst doin... | <p>As with anything abstraction creates complexity, and so the complexity of doing N-tiered should be properly justified, e.g., does N-tiered actually benefit the system? There <em>will</em> be small systems that will work best with N-tiered, although a lot of them will not.</p>
<p>Also, even if your system is small a... | 2,774 |
<p>Is there a preferred way to handle animation when using Flex -- For instance, if I want to render a ball and bounce it around the screen?</p>
| <p>I prefer to use a tweening library for things like this. Check these out:</p>
<p><a href="http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fcode.google.com%2Fp%2Ftweener%2F&ei=X4nOSIPJAaioesqPveAI&usg=AFQjCNH06RZesH0SEvPCYbJ-J0OMFd7GGQ&sig2=Ki_WXXUX1aHzahMMMSctIw" r... | <p>You can use mx.effects.AnimateProperty even though your target is not a UIComponent. </p>
<p>If the tween you want to acheive is a simple one (Move, Resize, Fade etc) this saves you writing the boiler plate code that mx.effects.Tween requires.</p>
| 8,936 |
<p>I installed TortoiseHg (Mercurial) in my Vista 64-bit and the context menu is not showing up when I right click a file or folder.
Is there any workaround for this problem?</p>
| <p>Update: TortoiseHg 0.8 (released 2009-07-01) now includes both 32 and 64 bit shell extensions in the installer, and also works with Windows 7. The workaround described below is no longer necessary.</p>
<hr>
<p>A workaround to getting the context menus in Windows Explorer is buried in the TortoiseHg development mai... | <p>According to the <a href="http://bitbucket.org/tortoisehg/stable/wiki/FAQ" rel="nofollow noreferrer">TortoiseHg FAQ</a> the context menus will work in 64-bit Vista <a href="http://bitbucket.org/tortoisehg/stable/wiki/FAQ#does-tortoisehg-work-on-vista" rel="nofollow noreferrer">if you start a 32-bit instance of explo... | 6,089 |
<p>I'm setting up a server which is on a network behind a firewall and I want programs on this computer to be able to use sendmail to send emails to any email address. We have an SMTP server running on this network (let's call it mailrelay.example.com) which is how we're supposed to get outgoing emails through the fir... | <p>@eli: modifying sendmail.cf directly is not usually recommended, since it is generated by the macro compiler. </p>
<p>Edit /etc/mail/sendmail.mc to include the line:</p>
<pre><code> define(`SMART_HOST',`mailrelay.example.com')dnl
</code></pre>
<p>After changing the sendmail.mc macro configuration file, it must ... | <p>@Espo: Thanks for the great advice on where to start. Your link would have been better if I had been configuring sendmail for its first use instead of taking an existing configuration and making this small change. However, once I knew to look for stuff on "SmartHost", I found an easier way.</p>
<p>All I had to do... | 6,559 |
<p>Using CFML (ColdFusion Markup Langauge, aka ColdFusion), how can you compare if two single dimension arrays are the same?</p>
| <p>There's a very simple way of comparing two arrays using CFML's underlying java. According to a recent blog by Rupesh Kumar of Adobe (<a href="http://coldfused.blogspot.com/" rel="nofollow noreferrer">http://coldfused.blogspot.com/</a>), ColdFusion arrays are an implementation of java lists (java.util.List). So all t... | <p>All of these solutions check that two arrays are equal. They don't check that they are the same object. The only way I know to do that in native CF is to change the object in some way and see if both references have the change in. </p>
<p>I also think that you should be wary of relying on CF implementing certain ja... | 5,016 |
<p>I'd like to find the different ways to solve a real life problem I had: imagine to have a contest, or a game, during which the users collect points. You have to build a query to show the list of users with the best "n" scores. </p>
<p>I'm making an example to clarify. Let's say that this is the Users table, with th... | <p>Untested, but should work:</p>
<pre><code>select * from users where points in
(select distinct top 3 points from users order by points desc)
</code></pre>
| <p>@bosnic, I don't think that will work as requested, I'm not that familiar with MS SQL but I would expect it to return only 3 rows, and ignore the fact that 3 users are tied for 3rd place.</p>
<p>Something like this should work:</p>
<pre><code>select userid, points
from scores
where points in (select top 3 ... | 5,853 |
<p>I am having a strange intermittent printing error specific to one particular object I'm trying to print.</p>
<p><a href="https://i.stack.imgur.com/L7Sxz.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/L7Sxz.jpg" alt="A picture of my print error"></a></p>
<p>My printer is a BCN3D Sigma R17. I am printing ... | <p>Well, for a 0.6 wall thickness using a 0.6 nozzle you should have one line for the whole wall. But I´m seeing in your prints walls of 0.1 and 0.4 as infill, Why?
I´m using simplify3D and I can see the results about walls and infill prior to send to the printer. On this kind of parts avoid infill and give priority to... | <p>I'd suggest you change the Flow (%).</p>
<p>It is usually at 100%, but can be adjusted.
I'd suggest printing at 80%, and adjusting from there.</p>
<p>Layer height, printing speed or other configurations always change the Extrusion Rate with it, because for example higher layers always require more material extrude... | 625 |
<p>I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but now I need the fol... | <p>Just finished watching <a href="http://www.dnrtv.com/default.aspx?showNum=124" rel="nofollow noreferrer">Brian Noyes on Prism</a> at dnrTV. This answered all my question... </p>
| <p>to save you time, check <a href="http://johnpapa.net/building-a-presentation-framework-with-prism-for-silverlight" rel="nofollow noreferrer">John Papa's Presentation Framework article</a>. It will be more easy if you have 3rd object(<code>Screen Conductor</code>) to handle your screens in showing or hiding from regi... | 7,181 |
<p>I would like to rename files and folders recursively by applying a string replacement operation.</p>
<p>E.g. The word "shark" in files and folders should be replaced by the word "orca".</p>
<p><code>C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe</code> </p>
<p>should be moved to:</p>
<p><code>C:\Pro... | <p>So you would use recursion. Here is a powershell example that should be easy to convert to C#:</p>
<pre><code>function Move-Stuff($folder)
{
foreach($sub in [System.IO.Directory]::GetDirectories($folder))
{
Move-Stuff $sub
}
$new = $folder.Replace("Shark", "Orca")
if(!(Test-Path($new))... | <pre><code>string oldPath = "\\shark.exe"
string newPath = oldPath.Replace("shark", "orca");
System.IO.File.Move(oldPath, newPath);
</code></pre>
<p>Fill in with your own full paths</p>
| 3,765 |
<p>Please check following image, Dog looks smooth from left side but its rough from right side , similar on back too.</p>
<p>What could have caused this ?</p>
<p></p>
<p>Can it be due to moisture due to Air Conditioner in my room ?
<a href="https://i.stack.imgur.com/u3VOP.jpg" rel="nofollow noreferrer"><img src="htt... | <p>I was making following mistakes </p>
<p>a) X-axis belt needed a tightening
( I calibrated all X,Y,Z and they were perfect)</p>
<p>b) There was under extrusion .
( I had to increase number of steps per mm for extruder motor and store the setting) </p>
<p>XYZ calibration cube was really helpful in debugging the... | <p>It is most likely caused by inadequate part-cooling due to poor air-flow. Fit a [better] part cooling fan. There are plenty of designs on Thingiverse.</p>
<p>You may also be able to resolve the issue by adjusting the printing temperature, but the easiest solution is to install a good part-cooling fan.</p>
| 1,323 |
<p>How can I drop all tables whose names begin with a given string? </p>
<p>I think this can be done with some dynamic SQL and the <code>INFORMATION_SCHEMA</code> tables.</p>
|
<p>You may need to modify the query to include the owner if there's more than one in the database.</p>
<pre class="lang-sql prettyprint-override"><code>DECLARE @cmd varchar(4000)
DECLARE cmds CURSOR FOR
SELECT 'drop table [' + Table_Name + ']'
FROM INFORMATION_SCHEMA.TABLES
WHERE Table_Name LIKE 'prefix%'
OPEN cmds... | <p>Try following code:</p>
<pre><code>declare @TableLst table(TblNames nvarchar(500))
insert into @TableLst (TblNames)
SELECT 'DROP TABLE [' + Table_Name + ']'
FROM INFORMATION_SCHEMA.TABLES
WHERE Table_Name LIKE 'yourFilter%'
WHILE ((select COUNT(*) as CntTables from @TableLst) > 0)
BEGIN
declare @ForExecCms nv... | 2,640 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.