instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself.</p>
<p>I'd really love for that form to be transparent and to have the transparency be user-configurable.</p>
<p>Is there any easy way to achieve this?</p>
| <p>You could try using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.opacity.aspx" rel="nofollow noreferrer">Opacity</a> property of the Form. Here's the relevant snippet from the MSDN page:</p>
<pre><code>private Sub CreateMyOpaqueForm()
' Create a new form.
Dim form2 As New For... | <p>You can set the <code>Form.Opacity</code> property. It should do what you want.</p>
| 5,716 |
<p>I like a bit of TiVo hacking in spare time - TiVo uses a Linux variant and <a href="http://wiki.tcl.tk/299" rel="nofollow noreferrer">TCL</a>. I'd like to write TCL scripts on my Windows laptop, test them and then FTP them over to my TiVo.</p>
<p>Can I have a recommendation for a TCL debugging environment for Windo... | <p>Komodo from Activestate is a good IDE for Windows/Linux. There is a trial version - I am not sure if there is a free version after trial though.</p>
| <p>ActiveState has a Tcl development kit (not free, but cheap) that I've used in the past. It even worked with our embedded tcl interpreter.</p>
<p><a href="http://www.activestate.com/tcl_dev_kit/" rel="nofollow noreferrer">http://www.activestate.com/tcl_dev_kit/</a></p>
| 3,895 |
<p>Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, JGroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also.</p>
<p><strong>UPDATE</strong> : I will be a bit more specific -> not that ... | <p><a href="http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html" rel="nofollow noreferrer">Jboss clustering</a> was very easy to get up and running. </p>
<p>It seems to work well for us.</p>
| <p>JBossCache is a standalone open source project that JbossClustering makes use of in the Application Server.</p>
<p>Our company made use of it in our own custom network server, its working well so far in development, though yet to be deployed. </p>
<p>Its a pretty simple API, and it comes in two flavors, a flat cac... | 5,032 |
<p>I am wanting to use ActiveScaffold to create <em>assignment</em> records for several <em>students</em> in a single step. The records will all contain identical data, with the exception of the student_id.</p>
<p>I was able to override the default form and replace the dropdown box for selecting the student name with... | <p>I suppose you have defined your multi-select box adding :multiple => true to html parameters of select_tag. Then, in the controller, you need to access the list of names selected, what you can do like this:</p>
<pre><code>params[:students].collect{|student| insert_student(student, params[:assignment_id]) }
</code><... | <p>if your assingnments have <code>has_many :students</code> or <code>has_and_belongs_to_many :students</code>, then you can change the id of the multi-select box to assignment_student_ids[], and it should work.</p>
| 8,479 |
<p>I haven't seen any questions relating to GNU autoconf/automake builds, but I'm hoping at least some of you out there are familiar with it. Here goes:</p>
<p>I have a project (I'll call it myproject) that includes another project (vendor). The vendor project is a standalone project maintained by someone else. Inc... | <p>Some notes:</p>
<ul>
<li>you didn't mention how <code>config.h</code> was included - with quotes or angle brackets. See <a href="https://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename">this other question</a> for more information on the difference. In short, <... | <p>It turns out there was a very simple solution in my case. The vendor project gathers several header files into one monolithic header file, which is then <code>#include</code>d by the vendor sources. But the make rule that builds the monolithic header accidentally included the generated <code>config.h</code>. The ... | 2,897 |
<p>I remember first learning about vectors in the STL and after some time, I wanted to use a vector of bools for one of my projects. After seeing some strange behavior and doing some research, I learned that <a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=98" rel="noreferrer">a vector of boo... | <p>A short list might be:</p>
<ul>
<li>Avoid memory leaks through use shared pointers to manage memory allocation and cleanup</li>
<li>Use the <a href="https://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization" rel="noreferrer">Resource Acquisition Is Initialization</a> (RAII) idiom to manage resource clean... | <pre><code>#include <boost/shared_ptr.hpp>
class A {
public:
void nuke() {
boost::shared_ptr<A> (this);
}
};
int main(int argc, char** argv) {
A a;
a.nuke();
return(0);
}
</code></pre>
| 5,029 |
<p>I want to move various parts of my app into simple scripts, to allow people that do not have a strong knowledge of c++ to be able to edit and implement various features.</p>
<p>Because it's a real time app, I need to have some kind of multitasking for these scripts. Ideally I want it so that the c++ app calls a scr... | <p>You can use either Lua or Python. Lua is more "lightweight" than python. It's got a smaller memory footprint than python does and in our experience was easier to integrate (people's mileage on this point might vary). It can support a bunch of scripts running simultaneously. Lua, at least, supports stopping/start... | <p>You can also embed C/C++ scripts using <a href="http://softintegration.com/" rel="nofollow noreferrer">Ch</a>. I've been using it for a game project I'm working on, and it does well. Nice blend of power and adaptability.</p>
| 8,923 |
<p>Are there any open source (or I guess commercial) packages that you can plug into your site for monitoring purposes? I'd like something that we can hook up to our ASP.NET site and use to provide reporting on things like:</p>
<ul>
<li>performance over time</li>
<li>current load</li>
<li>page traffic</li>
<li>SQL per... | <p>It should be noted that google analytics is not an accurate representation of web site usage. This is because the web beacon (web bug) used on the page does not always load for these reasons:</p>
<ol>
<li>Google analytics servers are called by millions of pages every second and can not always process the requests i... | <p><a href="http://google.com/analytics" rel="nofollow noreferrer">Google Analytics</a> is free (up to 50,000 hits per month I think) and is easy to setup with just a little javascript snippet to insert into your header or footer and has great detailed reports, with some very nice graphs.</p>
| 3,869 |
<p>Anyone know if it's possible to databind the ScaleX and ScaleY of a render transform in Silverlight 2 Beta 2? Binding transforms is possible in WPF - But I'm getting an error when setting up my binding in Silverlight through XAML. Perhaps it's possible to do it through code?</p>
<pre><code><Image Height="60" Hor... | <p>ScaleTransform doesn't have a data context so most likely the binding is looking for SelectedDive.Visibility off it's self and not finding it. There is much in Silverlight xaml and databinding that is different from WPF... </p>
<p>Anyway to solve this you will want to set up the binding in code**, or manually list... | <p>Ah I think I see your problem. You're attempting to bind a property of type Visibility (SelectedDive.Visibility) to a property of type Double (ScaleTransform.ScaleX). WPF/Silverlight can't convert between those two types.</p>
<p>What are you trying to accomplish? Maybe I can help you with the XAML. What is "Selecte... | 4,697 |
<p>I am receiving SOAP requests from a client that uses the Axis 1.4 libraries. The requests have the following form:</p>
<pre><code><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3... | <p>I have the same issue. For the moment, I've worked around it by writing a BasicHandler extension, and then walking the SOAPPart myself and moving the namespace reference up to a parent node. I don't <em>like</em> this solution, but it does seem to work.</p>
<p>I really hope somebody comes along and tells us what ... | <p>Alter your client's wsdd to set <code>enableNamespacePrefixOptimization</code> to <code>true</code></p>
<pre><code><globalConfiguration >
<parameter name="enableNamespacePrefixOptimization" value="true"/>
</code></pre>
| 8,791 |
<p>Most people with a degree in CS will certainly know what <a href="http://www.nist.gov/dads/HTML/bigOnotation.html" rel="noreferrer">Big O stands for</a>.
It helps us to measure how well an algorithm scales. </p>
<p>But I'm curious, how do <em>you</em> calculate or approximate the complexity of your algorithms?</p>
| <p>I'll do my best to explain it here on simple terms, but be warned that this topic takes my students a couple of months to finally grasp. You can find more information on the Chapter 2 of the <a href="https://rads.stackoverflow.com/amzn/click/com/0321370139" rel="noreferrer" rel="nofollow noreferrer">Data Structures ... | <p>In addition to using the master method (or one of its specializations), I test my algorithms experimentally. This can't <em>prove</em> that any particular complexity class is achieved, but it can provide reassurance that the mathematical analysis is appropriate. To help with this reassurance, I use code coverage t... | 2,543 |
<p>I have a project where I would like to generate a report export in MS Word format. The report will include images/graphs, tables, and text. What is the best way to do this? Third party tools? What are your experiences?</p>
| <p>The answer is going to depend slightly upon if the application is running on a server or if it is running on the client machine. If you are running on a server then you are going to want to use one of the XML based office generation formats as there are know issues when <a href="http://support.microsoft.com/kb/25775... | <p>Another alternative is <a href="https://www.windwardstudios.com/programming-languages/csharp" rel="nofollow noreferrer">Windward Docgen</a> (disclaimer - I'm the founder). With Windward you design the template in Word, including images, tables, graphs, gauges, and anything else you want. You can set tags where data ... | 3,160 |
<p>The design for the website I am working on calls for a custom image on lists instead of a bullet. Using the image is fine, but I have been having difficulties ensuring that it is centered against the text of the list item across all browsers. Does anyone know of a standard solution for this?</p>
| <p>If you are referring to using a custom image bullet for your list this is the code you'll want to use, it will be vertically centered. I'm assuming here that the bullet image is 12px by 12px.</p>
<pre class="lang-css prettyprint-override"><code>ul li {
background: transparent url(/link/to/custom/bullet.gif) no-re... | <p>Have you tried adding the following code in your CSS file?</p>
<pre class="lang-css prettyprint-override"><code>li
{
background-image: URL('custom.png');
background-repeat: no-repeat;
background-position: center;
}
</code></pre>
| 8,985 |
<p><a href="https://3dprinting.stackexchange.com/questions/973/which-properties-of-real-organs-do-3d-printed-organs-have">A recent question</a> regarding bio-printing has been put on hold and I'd like to discuss the validity of the question here in the 3D Printing community.</p>
<p>I personally feel that the question f... | <p>It seems like a great subject to incorporate, since bioprinting is 1) pretty neat and 2) an important application for 3D printing in general... but I sort of suspect none of our active users have the necessary expertise at the moment. It's a highly specialized field. We don't want the question to sit for an extended... | <p>It seems like a great subject to incorporate, since bioprinting is 1) pretty neat and 2) an important application for 3D printing in general... but I sort of suspect none of our active users have the necessary expertise at the moment. It's a highly specialized field. We don't want the question to sit for an extended... | 24 |
<p>I've been looking for a decent guide to Haskell for some time, but haven't been able to find one that seems interesting enough to read through and/or makes sense.</p>
<p>I've had prior exposure to Haskell a few years back, but I can't remember much about it. I remember the "Aha!"-feeling was incredible when I final... | <p>Some good places to start are:</p>
<ul>
<li><a href="http://www.cs.auckland.ac.nz/references/haskell/haskell-intro-html/intro.html" rel="noreferrer">The Gentle Introduction To Haskell</a></li>
<li><a href="http://www.cs.kent.ac.uk/people/staff/sjt/Haskell_craft/probSolving.html" rel="noreferrer">Problem Solving in ... | <p>This is where I started.
<a href="http://www.haskell.org/haskellwiki/Category:Tutorials" rel="nofollow noreferrer">haskell.org</a></p>
| 3,760 |
<p>I'm faced with writing a framework to simplify working with a large and complex object library (<a href="http://resources.esri.com/help/9.3/ArcGISDesktop/ArcObjects/ao_start.htm" rel="noreferrer">ArcObjects</a>). What guidelines would you suggest for creating a framework of this kind? Are static methods preferred? H... | <p>Brad Abrams' <a href="https://rads.stackoverflow.com/amzn/click/com/0321246756" rel="noreferrer" rel="nofollow noreferrer">Framework Design Guidelines</a> book is all about this. Might be worth a look.</p>
| <p>I think that you're consistent is more important than what conventions you go with. As far as future-proofing yourself, that's a matter of the code that you're making a framework for. It's a lot easier to build on a brick house than a sand one.</p>
| 4,905 |
<p>There are a few ways to get class-like behavior in javascript, the most common seem to be prototype based like this:</p>
<pre><code>function Vector(x, y, x) {
this.x = x;
this.y = y;
this.z = z;
return this;
}
Vector.prototype.length = function () { return Math.sqrt(this.x * this.x ... ); }
</code>... | <p>Assigning functions to the prototype is better (for public methods) because all instances of the class will share the same copy of the method. If you assign the function inside the constructor as in the second example, every time you create a new instance, the constructor creates a new copy of the length function an... | <p>I'm a big fan of using <a href="http://ejohn.org/blog/simple-javascript-inheritance/" rel="nofollow noreferrer">John Resig's library</a> for this. Lightweight, straight-forward, and you already know how to use it if you're familiar with the 'usual' object-oriented style.</p>
| 2,823 |
<p>I am trying to print a model I designed in Blender on Shapeways.</p>
<p>The object has a hole in it:</p>
<p><a href="https://i.stack.imgur.com/iCaGP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iCaGP.png" alt="enter image description here"></a></p>
<p>But when I upload it to Shapeways as a S... | <p>Double-check that your model is solid (i.e. watertight). Holes in the mesh, or (as other's mentioned in the comments) or problems with thickness can cause those issues. You can use <a href="https://netfabb.azurewebsites.net/" rel="nofollow">Netfabb's Cloud Services</a>, or download the free version of their app. The... | <p>Just like the other already have mentioned, most likely your model has 3D printing errors. Either way, I would run it through a repairing service just to make sure it's free of 3D printing errors. I repair my models using this free automatic tool <a href="https://makeprintable.com/" rel="nofollow">https://makeprinta... | 378 |
<p>I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily be expanded to "How can we improve our support of technology X when we don't have tec... | <p>There is a <a href="https://secure-www.novell.com/center/regadmin/jsps/eval_app.jsp?buildid=GsODlkBPM2g~" rel="nofollow noreferrer">60 day evaluation trial of Open Enterprise Server 2</a> available (requires free registration). If you install it in a VM, there's nothing stopping you from reinstalling it after 60 day... | <p>There used to be some relatively cheap developers network which we used to belong to before the Novell questions all whithered and died away (famous last words, now I bet we will get one tomorrow), there is never any substitute for having the software / hardware, the only alternative is to write a test program and g... | 5,893 |
<p>Can anyone tell me how I can display a status message like "12 seconds ago" or "5 minutes ago" etc in a web page?</p>
| <p>Here is the php code for the same:</p>
<pre><code>function time_since($since) {
$chunks = array(
array(60 * 60 * 24 * 365 , 'year'),
array(60 * 60 * 24 * 30 , 'month'),
array(60 * 60 * 24 * 7, 'week'),
array(60 * 60 * 24 , 'day'),
array(60 * 60 , 'hour'),
array(60... | <p>PHP's <code>\DateTime::diff</code> returns a <a href="http://nl3.php.net/dateInterval" rel="noreferrer"><code>\DateInterval</code></a> object on which you can get the minutes by the public <code>i</code> property.</p>
| 3,923 |
<p>Is there a method of accessing an Exchange server that does not have <code>IMAP</code> or <code>POP3</code> enabled without Outlook?</p>
<p>It does not appear that Outlook Express supports Exchange (only <code>IMAP and POP3</code>).</p>
| <p>The only way I can think of is if the Exchange server has Outlook Web Access (OWA) turned on. You can test this by trying the server name in your browser like so: <a href="http://server/exchange" rel="nofollow noreferrer">http://server/exchange</a>.</p>
<p>If you mean programmatically then the recommended way is to... | <p>You can use <a href="http://www.mozilla.com/en-US/thunderbird/" rel="nofollow noreferrer">Thunderbird</a> to <a href="http://www.downloadsquad.com/2007/03/30/howto-thunderbird-and-ms-exchange-server/" rel="nofollow noreferrer">access Exchange e-mail and contact lists</a>.</p>
<p>Edit - Oops, this uses IMAP, didn't ... | 3,914 |
<p>I have read a lot that LISP can redefine syntax on the fly, presumably with macros. I am curious how far does this actually go? Can you redefine the language structure so much that it borderline becomes a compiler for another language? For example, could you change the functional nature of LISP into a more object... | <p>That's a really good question.</p>
<p>I think it's nuanced but definitely answerable:</p>
<p>Macros are not stuck in s-expressions. See the LOOP macro for a very complex language written using keywords (symbols). So, while you may start and end the loop with parentheses, inside it has its own syntax.</p>
<p>Exa... | <p>@sparkes</p>
<p>Sometimes LISP is the clear language choice, namely Emacs extensions. I'm sure I could use Ruby to extend Emacs if I wanted to, but Emacs was designed to be extended with LISP, so it seems to make sense to use it in that situation.</p>
| 2,420 |
<p>I use more than one machine for development in VS 2008. Is there a tool to automatically synchronize the snippets between the machines? Same concept of synchronizing browsers' bookmark.</p>
| <p>If you have Vista and the LiveMesh client installed try <a href="http://weblogs.asp.net/lduveau/archive/2008/06/30/sync-your-visual-studio-settings-with-live-mesh.aspx" rel="nofollow noreferrer">this suggestion</a></p>
<p>Hope this helps.</p>
| <p>Assuming you already know what files you need/want sync'd then some additional options to Mesh would be to tool-out. Maybe look at SyncToy or SyncBack to keeps these collection of files centralized - then have all your machines pull from the central data store.</p>
<p>There is also <a href="https://sync.live.com/"... | 8,726 |
<p>I have a Monoprice Maker Select Plus, currently using Ultimaker Cura 3.6.0 with the default settings for a Wanhao Duplicator i3 Plus. Right now when a print finishes, the bed retreats towards the back of the machine. I'd rather present the bed forward for easier part removal.</p>
<p>Here is my ending G-Code:</p>
<... | <p>Note that <a href="https://reprap.org/wiki/G-code#G28:_Move_to_Origin_.28Home.29" rel="nofollow noreferrer">this reference</a> states that:</p>
<blockquote>
<p>Because the behavior of <code>G28</code> is unspecified, it is recommended <strong>not</strong> to automatically include <code>G28</code> in your <strong>... | <p>You're correct that the G28 line should be changed. What I would do is the following:</p>
<pre><code>M104 S0 ;extruder heater off
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and... | 1,210 |
<p>Was looking to get peoples thoughts on keeping a Lucene index up to date as changes are made to the domain model objects of an application. </p>
<p>The application in question is a Java/J2EE based web app that uses Hibernate. The way I currently have things working is that the Hibernate mapped model objects all i... | <p>Change the message: just provide the primary key and the current date, not the key/value pairs. Your mdb fetches the entity by primary key and calls index(). After indexing you set a value "updated" in your index to the message date. You update your index only if the message date is after the "updated" field of the ... | <p>The accepted answer is 8 years old now and very out of date.</p>
<p>The Compass Project is not maintained anymore since a long time, as its main developer moved on to create the excellent Elasticsearch.</p>
<p>The modern answer to this is to use <a href="http://hibernate.org/search/" rel="nofollow noreferrer">Hibe... | 5,905 |
<p>I'm writing an app using asp.net-mvc deploying to iis6. I'm using forms authentication. Usually when a user tries to access a resource without proper authorization I want them to be redirected to a login page. FormsAuth does this for me easy enough.</p>
<p>Problem: Now I have an action being accessed by a console a... | <p>Ok, I worked around this. I made a custom ActionResult (HttpForbiddenResult) and custom ActionFilter (NoFallBackAuthorize).</p>
<p>To avoid redirection, HttpForbiddenResult marks responses with status code 403. FormsAuthentication doesn't catch responses with this code so the login redirection is effectively skippe... | <p>I did some googling and this is what I came up with:</p>
<pre><code>
HttpContext.Current.Response.StatusCode = 401;
</code></pre>
<p>Not sure if it works or not, I haven't tested it. Either way, it's worth a try, right? :)</p>
| 5,578 |
<p>I'm looking for a way to visually mark or tag a window (any OS) so that it stands out.</p>
<p>A while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked identical to one another. I'd like t... | <p>None that I'm aware of, but perhaps a <a href="http://en.wikipedia.org/wiki/Virtual_desktop" rel="nofollow noreferrer">virtual desktop</a> system for your OS of choice would help keep the separation a little better for you.</p>
| <p>Since you didn't restrict your question, I'll answer with my solution to this type of problem. I often am logged into multiple different machines with <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" rel="nofollow noreferrer">PuTTY</a> as different users (including as <code>root</code>). If I have a wind... | 5,447 |
<p>A couple of days ago I got my first 3D printer: Creality 3D Ender 3 Pro. I finished assembling it last night. I booted it up, but ran into problems (which I guess is not a common thing for a beginner in 3D printing). After booting and running the motors, it seemed that the lead screw got stuck about halfway down the... | <p>The threads of the screw are very damaged, this causes your brass nut to be damaged as well.</p>
<p>This is hardly accountable by misusage, this is a production or handling error in the factory.</p>
<p>You need to contact the vendor for a new screw and new threaded brass nut.</p>
<p>Although the nut is softer and ma... | <p>Both of the above answers are likely correct <strong>but also,</strong> I own an Ender 3 and it's kinda/sorta tricky to get it set up right. I had a similar problem and I was certain it was the lead screw -- and mine indeed does not have the marks that yours has -- but in the end the issue was that I had assembled ... | 2,183 |
<p>I've been hearing about triggers, and I have a few questions.<br />
What are triggers?<br />
How do I set them up?<br />
Are there any precautions, aside from typical SQL stuff, that should be taken?</p>
| <p>Triggers allow you to perform a function in the database as certain events happen (eg, an insert into a table). </p>
<p>I can't comment on mysql specifically.</p>
<p>Precaution: Triggers can be very alluring, when you first start using them they seem like a magic bullet to all kinds of problems. But, they make "ma... | <p>A trigger is a named database object that is associated with a table and that is activated when a particular event occurs for the table.<br />
<br />To create a trigger:<br /></p>
<pre><code>CREATE TRIGGER triggerName [BEFORE|AFTER] [INSERT|UPDATE|DELETE|REPLACE] ON tableName FOR EACH ROW SET stuffToDoHERE;
</code>... | 6,961 |
<p>I have a really bent heatbed PCB, the middle is elevated about 3 mm with respect to all edges.</p>
<p>I have found this thread <a href="http://midibox.org/forums/topic/17599-warped-pcbs/" rel="noreferrer">Warped PCBs</a>, where a heating method is applied by baking a PCB in the oven, as described here: <a href="htt... | <p>Baking PCB in an oven is not a good idea, I would say. I know PCBs are resistive to the heat (especially heatbeds) but, still, it sounds odd. But the real question is how baking would help. Let's leave it.</p>
<p>If your heatbed is such bent you can do few things depending on your situation/environment.</p>
<p>You... | <p>Easiest way would be to place a glass sheet on top of the bed and run a calibration... Although, that way you may lose a few millimeters of print height.</p>
| 255 |
<p>When I defragment my XP machine I notice that there is a block of "Unmovable Files". Is there a file attribute I can use to make my own files unmovable?</p>
<p>Just to clarify, I want a way to programmatically tell Windows that a file that I create should be unmovable. Is this possible, and if so, how can I do it?<... | <p>A lot of system files cannot be moved after the system boots, such as the page file and registry database files.</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx" rel="noreferrer">This utility</a> runs before Windows boots to defragment those files. I have it set to run at every boot, ... | <p>I assume you're using the defragger that comes with Windows. Some commercial ones like DiskKeeper can move some of these files (usually system files). You can try their trial versions.</p>
| 7,543 |
<p>I use OctoPrint on an Ubuntu system with a M3D printer.</p>
<p>Midway through a recent print, the filament just stopped extruding although the motor-functions of the printer were proceeding fine. Since then, every print I attempt has trouble extruding proper amounts of filament. It's always not enough. The output i... | <p>Depends on the glue and on your tolerance for messy undersides on your prints. It's fairly common for some of the glue to come off with the print. Or you may have marks from scrapers or rafts. Do you want to touch up that spot and have some artifacts on the bottom of the next print, or clean and redo the bed to get ... | <p>As noted in the answer to the other question you asked, the Flux Delta steel plate bed will handle multiple layers of glue. The determining factor regarding this particular printer and specific glue is how many ripples, bumps and/or lines you are willing to tolerate on the first layer of your prints. </p>
<p>You'll... | 312 |
<p>I'm on .NET 2.0, running under Medium Trust (so <a href="http://msdn.microsoft.com/en-us/library/system.timezoneinfo.aspx" rel="nofollow noreferrer">TimeZoneInfo</a> and the Registry are not allowed options). I'm asking the user for two dates and a time zone, and would really love to be able to automatically determ... | <p>In .NET 2.0 you have to code this yourself. It involves researching daylight savings time laws in various regions and building that into your own data structures. The problem is somewhat simplified if you only care about a subset of time zones, for example just in the USA, but if you need all global time zones, yo... | <p>Well, since <code>TimeZoneInfo</code> is excluded, you're probably not going to find a solution in the framework itself (but don't quote me on that).</p>
<p>In which case, have you considered reflectoring the <code>TimeZoneInfo</code> class and using what you find there?</p>
| 6,657 |
<p>I am completely on board with the ideas behind TDD, Refactoring and Patterns however it does seem like there is a huge gaping whole in these ideas, mainly that they are great for dev teams of 1, but when you start refactoring code that 10 people are working on you start getting merge conflicts all over the place and... | <p>Small changes committed often.</p>
<p>As for your example, you would start by creating the class, committing that change. Then adding a similar function in the class as the old one and commit that change. Then change all the references from the old function to the new class function, commit that. Then remove the ol... | <p>Communication.</p>
<p>Tools can't solve this for you, unless the specific tool is your email or IM client.</p>
<p>It's the same as if you were making any other major change in a shared project -- you need to be able to tell your coworkers/collaborators "hey, hands off for a couple of hours, I have a big change to ... | 9,395 |
<p>How do I select all records that contain "LCS" within the title column in sql.</p>
| <pre><code>SELECT * FROM TABLE WHERE TABLE.TITLE LIKE '%LCS%';
</code></pre>
<p>% is the wild card matcher.</p>
| <p>Look into the LIKE clause</p>
| 4,251 |
<p>I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. The technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple te... | <p>Trust me, you will spend more money trying to search/develop a solution for this as compared to buying a third party component. Do not reinvent the wheel and go for the paid solution.</p>
<p>Printing is a complex problem and I would love to see the day when better framework support is added for this.</p>
| <p>I think we are going to go the third party route. I like the XSL -> HTML -> PDF -> Printer flow... Winnovative's <a href="http://www.winnovative-software.com/" rel="nofollow noreferrer">HTML to PDF</a> looks good for the first part, but I'm running into a block finding a good PDF printing solution... any suggestion... | 2,953 |
<p>To illustrate, assume that I have two tables as follows:</p>
<pre><code>VehicleID Name
1 Chuck
2 Larry
LocationID VehicleID City
1 1 New York
2 1 Seattle
3 1 Vancouver
4 2 Los Angeles
5 2 Houston
</code></pre>
<p>... | <p>If you're using SQL Server 2005, you could use the FOR XML PATH command.</p>
<pre><code>SELECT [VehicleID]
, [Name]
, (STUFF((SELECT CAST(', ' + [City] AS VARCHAR(MAX))
FROM [Location]
WHERE (VehicleID = Vehicle.VehicleID)
FOR XML PATH ('')), 1, 2, '')) AS Locations
FROM [Vehi... | <p>If you're running SQL Server 2005, you can write a <a href="https://learn.microsoft.com/en-us/sql/relational-databases/clr-integration-database-objects-user-defined-functions/clr-user-defined-aggregates" rel="nofollow noreferrer">custom CLR aggregate function</a> to handle this.</p>
<p>C# version:</p>
<pre><code>u... | 2,858 |
<p>I have two machines, speed and mass. speed has a fast Internet connection and is running a crawler which downloads a lot of files to disk. mass has a lot of disk space. I want to move the files from speed to mass after they're done downloading. Ideally, I'd just run:</p>
<pre><code>$ rsync --remove-source-files spe... | <p>How much control do you have over the download process? If you roll your own, you can have the file being downloaded go to a temp directory or have a temporary name until it's finished downloading, and then mv it to the correct name when it's done. If you're using third party software, then you don't have as much ... | <p>Rsync can exclude files matching certain patters. Even if you can't modify it to make it download files to a temporary directory, maybe it has a convention of naming the files differently during download (for example: <code>foo.downloading</code> while downloading for a file named <code>foo</code>) and you can use t... | 7,094 |
<p>The short version of my question is:</p>
<blockquote>
<p><em>Are 3D printed parts made of ABS likely to survive for <strong>one year</strong> in an incubator at <strong>80℃</strong>?</em></p>
</blockquote>
<p>Please read on for more details.</p>
<p>I am printing some parts that will be used inside an incubator ... | <p>To answer your question briefly: <strong>No, ABS will not survive for a duration of at least one year at 80-100°C</strong>.</p>
<p><img src="https://i.stack.imgur.com/6X0uY.png" alt="1]">
If you look at the chart above (from Tiganis/Burn), you'll notice, that the blue line (ABS 90°C) is decreasing. I did an eyeball... | <p>I would recommend <a href="http://taulman3d.com/bluprint-spec.html" rel="nofollow noreferrer">Taulman Bluprint</a>, which has a T<sub>g</sub> of 100 °C and prints around 250 °C. </p>
<p>I got a small sample and it printed well with the recommended settings. I didn't do any thermal testing with my print (I... | 753 |
<p>When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change later.</p>
<p>The applicatio... | <p>There's always <a href="http://msdn.microsoft.com/en-us/library/system.web.security.membership.generatepassword.aspx" rel="noreferrer"><code>System.Web.Security.Membership.GeneratePassword(int length, int numberOfNonAlphanumericCharacters</code>)</a>.</p>
| <p>Insert a Timer: timer1, 2 buttons: button1, button2, 1 textBox: textBox1, and a comboBox: comboBox1. Make sure you declare:</p>
<pre><code>int count = 0;
</code></pre>
<hr>
<p>Source Code:</p>
<pre><code> private void button1_Click(object sender, EventArgs e)
{
// This clears the textBox, resets the coun... | 7,869 |
<p>How do I add an instance method to a class using a metaclass (yes I do need to use a metaclass)? The following kind of works, but the func_name will still be "foo":</p>
<pre><code>def bar(self):
print "bar"
class MetaFoo(type):
def __new__(cls, name, bases, dict):
dict["foobar"] = bar
retur... | <p>Try dynamically extending the bases that way you can take advantage of the mro and the methods are actual methods:</p>
<pre><code>class Parent(object):
def bar(self):
print "bar"
class MetaFoo(type):
def __new__(cls, name, bases, dict):
return type(name, (Parent,) + bases, dict)
class Foo(... | <p>I think what you want to do is this:</p>
<pre><code>>>> class Foo():
... def __init__(self, x):
... self.x = x
...
>>> def bar(self):
... print 'bar:', self.x
...
>>> bar.func_name = 'foobar'
>>> Foo.foobar = bar
>>> f = Foo(12)
>>> f.foobar()
bar: 12
... | 9,111 |
<p>Heavy emphasis on simple. I've never made an installer and I'd rather not have to learn much. A system that I could hand a pile of files to and it would make some smart guesses about where to put them would be ideal.</p>
<p>Go ahead and answer the general question.</p>
<p>However In my cases I'm stuck with some ex... | <p><a href="http://www.jrsoftware.org/" rel="noreferrer">InnoSetup</a> or <a href="http://nsis.sourceforge.net/" rel="noreferrer">NSIS</a>, whichever seems easier to you. <a href="http://www.istool.org" rel="noreferrer">ISTool</a> is a nice GUI tool for InnoSetup which makes creating setup scripts even easier.</p>
| <p>My advice is this. Try to keep the installer as simple as possible. Windows Installer is a very complicated piece of software and when things don't work right it can be hard to figure out what's going on. I'm sure we have all experienced the endless loop of Windows Installer trying to repair a file that you no longe... | 4,366 |
<p>I'm trying to generate a sitemap.xml on the fly for a particular asp.net website.</p>
<p>I found a couple solutions:<br /></p>
<ol>
<li><a href="http://sitemap.chinookwebs.com/" rel="nofollow noreferrer">chinookwebs</a></li>
<li><a href="http://web.archive.org/web/20080307061444/http://www.cervoproject.info:80/sitem... | <p>Usually you'll use an <a href="http://www.google.com/search?q=HTTPHandler+ASP.NET&spell=1" rel="noreferrer">HTTP Handler</a> for this. Given a request for...</p>
<blockquote>
<p><a href="http://www.yoursite.com/sitemap.axd" rel="noreferrer">http://www.yoursite.com/sitemap.axd</a></p>
</blockquote>
<p>...your... | <p>Custom handler to generate the sitemap. </p>
| 3,076 |
<p>We're thinking of buying a PETG-powered printer. When researching printers available on the market, there are machines with a 100 microns. I was wondering if there are machines with a 50 microns or close to 50 micros? Otherwise, why not?</p>
| <blockquote>
<p>I was wondering the other day why don't all three motors move at the same time?</p>
</blockquote>
<p>That is perfectly possible for most printers (with limitations, "3D Printing" with all steppers being used is called "non-planar" printing), but there are some major cons you need to ... | <p>The Z axis moves between each layer so you are indeed printing in the 3rd dimension. There are some techniques that move all three axis at the same time.</p>
| 1,925 |
<p>I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it insta... | <p>By using <code>__declspec</code> for export, the function name will get exported <em>mangled</em>, i.e. contain type information to help the C++ compiler resolve overloads.</p>
<p>VB6 cannot handle mangled names. As a workaround, you have to de-mangle the names. The easiest solution is to link the DLL file using an... | <p>A VB6 DLL is always a COM dll. I shall describe an example in as few words as possible. Suppose you have a ActiveX DLL project in VB6 with a class called CTest which contains a method as shown below</p>
<p>Public Function vbConcat(ByVal a As String, ByVal b As String) As String
vbConcat = a & b
End Function... | 6,052 |
<p>2 days into a 5-day build, I came home from work and found the build ruined because the build plate had slipped.</p>
<p>I'm using a Raise 3D N2 Plus printer, with the standard glass build plate that comes with it, attached via 4 clips: two stationary ones at the back, and two standard binder clips at the front, whi... | <p>Your nozzle may have caught up with the print somehow pushing the binder clip off by moving the glass slate. </p>
<p>Apparently this is a more <a href="https://www.3dhubs.com/talk/thread/raise3d-n2-plus-glass-bed-not-secure" rel="nofollow noreferrer">common</a> problem. Try adding more binder clips, this has been r... | <p>Your nozzle may have caught up with the print somehow pushing the binder clip off by moving the glass slate. </p>
<p>Apparently this is a more <a href="https://www.3dhubs.com/talk/thread/raise3d-n2-plus-glass-bed-not-secure" rel="nofollow noreferrer">common</a> problem. Try adding more binder clips, this has been r... | 923 |
<p>I'm using a custom-built inhouse application that generates a standard set of reports on a weekly basis. I have no access to the source code of the application, and everyone tells me there is no documentation available for the Oracle database schema. (Aargh!)</p>
<p>I've been asked to define the specs for a variant... | <p>On the data dictionary side there are a lot of tools you can use to such as <a href="http://schemaspy.sourceforge.net/" rel="noreferrer">Schema Spy</a></p>
<p>To look at what queries are running look at views sys.v_$sql and sys.v_$sqltext. You will also need access to sys.all_users</p>
<p>One thing to note that qu... | <p>I had (have) a similar problem in a Java application. I wrote a JDBC driver wrapper around the Oracle driver so all output is sent to a log file. </p>
| 7,974 |
<p>My understanding is that <a href="http://www.wxwidgets.org" rel="noreferrer">wxWidgets</a> is for a number of programming languages (C++, Python, Perl, and C#/.NET) but that does not include C. Is there a similar framework for the C programming language, or is this not something that C is used for?</p>
| <p>You can try <a href="http://www.gtk.org/" rel="nofollow noreferrer">GTK+</a>. I believe wxWidgets implementation for linux is written in GTK+.</p>
| <p>Obviously No, Because it has predefined classes but if you insist you can try GTK which is for C.</p>
| 4,968 |
<p>One of those classic programming interview questions...</p>
<p>You are given two marbles, and told that they will break when dropped from some certain height (and presumably suffer no damage if dropped from below that height). You’re then taken to a 100 story building (presumably higher than the certain height), an... | <p>The interesting thing here is how you can do it in the least amount of drops possible. Going to the 50th floor and dropping the first would be disastrous if the breaking floor is the 49th, resulting in us having to do 50 drops. We should drop the first marble at floor n, where n is the max amount of drops required. ... | <p>First thing I would do is use the dead simple algorithm that starts at floor 1 drops the marble one floor at a time until it reaches 100 or the marble breaks.</p>
<p>Then I'd ask why should I spend time optimizing it until somone can show that it will be a problem. Too many times people get all hung up on finding t... | 2,826 |
<p>Other than the most obvious issue with the filament kinking in the tube, what other issues could arise when trying to print flexibles (<em>i.e. TPU/TPE, Nylon, etc.</em>) with a Bowden style extruder setup? </p>
<p>Can the kinking issue be alleviated by a well-constrained filament path (<em>proper ID</em>) in a pro... | <p>As a user of an UM3E, which uses Bowden tubes and has TPU as an available material, I can tell you that the kinking issues can be alleviated or downright avoided. </p>
<p>I've printed quite a few things with the Ultimaker-brand TPU 95, and never had problems with kinking in the tube. </p>
<p>Ultimaker uses 2.85 mm... | <p>To also validate the first answer, I have been printing with TPU95A for a number of years and it has been one of the most reliable materials to use. The strength of the product alongside the flex makes it a test and production based outcome with fewer issues. My printer for the most part of this experience was the U... | 1,057 |
<ul>
<li>Printer: Kobra Max</li>
<li>Nozzle: 0.4 mm</li>
<li>Material: PLA</li>
<li>Slicer :Cura</li>
</ul>
<p>I have printed 1 model 3 times with different settings (different temperatures and different bed temperatures).</p>
<ul>
<li>Try 1: 190 °C / 50 °C</li>
<li>Try 2: 210 °C / 70 °C</li>
<li>Try 3: 230 °C / 50 °C<... | <p>There are a bunch of possible causes for the seam. But the main one is retraction.</p>
<p>In Cura the main setting affecting this is under '<strong>Travel</strong>'.</p>
<p>In the '<strong>Travel</strong>' settings is '<strong>Enable retraction</strong>', and '<strong>Retract at layer change</strong>'.</p>
<p>Retrac... | <p>Hiding the seam isn't really possible when the object is rotationally symmetric. The closest you can get is hiding it "statistically" by distributing the seam randomly so it's fractionally-bad everywhere rather than fully-bad in one place. Depending on your needs, this might be good, or it might be awful. ... | 2,214 |
<p>I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there.
You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem.
Does anyone know of a better way?</p>
| <p>Here's another solution that I just did, seeing that I understand what you want to do:</p>
<p><strong>Here's your ASCX / ASPX</strong></p>
<pre><code> <asp:ListView ID="ListView1" runat="server" DataSourceID="MyDataSource" ItemPlaceholderID="itemPlaceHolder" OnDataBound="ListView1_DataBound">
<... | <p>You can always set the column width to 0 (zero) if you don't find a better way.</p>
| 9,622 |
<p>I have a web application running on a Gentoo-based LAMP stack. My customers buy the software as a service and I host everything. However, there is some demand for on-site deployment inside the clients' own networks.</p>
<p>Currently, because I host the system, there is no built-in license management in the app. I b... | <p>Don't. Every hour that you spend writing a license key system is an hour that you are not spending fixing bugs or adding features. By writing a license management system, you are spending resources in order to reduce the value of your product!</p>
<p>Copyright your code, have a lawyer and be ready to prosecute an... | <p>I am sure you can get to the serial number of the cpu on most os's; you could use that, after all if they transplant the cpu its safe to assume that the old machine would no longer be in use?</p>
<p>Secondly a web service could be used to find out the current data capacity and what the client has paid for.</p>
| 7,437 |
<p>I'm trying to rebuild an old metronome application that was originally written using <code>MFC</code> in C++ to be written in <code>.NET</code> using <code>C#</code>. One of the issues I'm running into is playing the midi files that are used to represent the metronome "clicks".</p>
<p>I've found a few articles onli... | <p>I think you'll need to p/invoke out to the windows api to be able to play midi files from .net.</p>
<p>This codeproject article does a good job on explaining how to do this:
<a href="http://www.codeproject.com/KB/audio-video/vbnetSoundClass.aspx" rel="nofollow noreferrer">vb.net article to play midi files</a></p>
... | <p>System.Media.<strong>SoundPlayer</strong> is a good, simple way of playing WAV files. WAV files have some advantages over MIDI, one of them being that you can control precisely what each instrument sounds like (rather than relying on the computer's built-in synthesizer).</p>
| 3,027 |
<p>When using Groovy <code>MarkupBuilder</code>, I have places where I need to output text into the document, or call a function which outputs text into the document. Currently, I'm using the undefined tag <em>"text"</em> to do the output. Is there a better way to write this code?</p>
<pre><code>li {
text("${type.g... | <p>Actually, the recommended way now is to use <code>mkp.yield</code>, e.g.,</p>
<pre><code>src.p {
mkp.yield 'Some element that has a '
strong 'child element'
mkp.yield ' which seems pretty basic.'
}
</code></pre>
<p>to produce</p>
<pre><code><p>Some element that has a <strong>child element&... | <p>Include a method:</p>
<pre><code>void text(n){
builder.yield n
}
</code></pre>
<p>Most likely you (I) copied this code from somewhere that had a text method, but you didn't also copy the text method. Since MarkupBuilder accepts any name for the name of a tag and browsers ignore unknown markup, it just happene... | 4,314 |
<p>I'm looking for the best JavaScript editor available as an Eclipse plugin. I've been using Spket which is good. But, is there more better one?</p>
| <p><a href="http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor" rel="nofollow noreferrer">Eclipse HTML Editor Plugin</a></p>
<p>I too have struggled with this totally obvious question. It seemed crazy that this wasn't an extremely easy-to-find feature with all the web development happeni... | <p>Oracle Workshop for WebLogic (formally BEA Workshop) has excellent support for JavaScript and for visually editing HTMLs. It support many servers, not only WebLogic, including Tomcat, JBoss, Resin, Jetty, and WebSphere. </p>
<p>It recently became free, check out <a href="http://blog.zvikico.com/2008/08/the-best-js... | 4,433 |
<p>How do you store file permissions in a repository? A few files need to be read-only to stop a third party program from trashing it but after checking out of the repository they are set to read-write.</p>
<p>I looked on google and found a <a href="http://mamchenkov.net/wordpress/2005/04/27/subversion-and-file-permis... | <p>One possible solution would be to write a script that you check in with the rest of your code and which is run as the first step of your build process.</p>
<p>This script runs through your copy of the codebase and sets read permissions on certain files.</p>
<p>Ideally the script would read the list of files from a... | <p>Consider using <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.locking.html" rel="nofollow noreferrer"><code>svn lock</code></a> to disallow others from writing to the file.</p>
| 8,005 |
<p>Is it possible to embed an inline search box into a web page which provides similar functionality to the <a href="http://www.ie7pro.com/inline-search.html" rel="noreferrer">IE7Pro Inline Search</a> or similar plugins for Firefox/Safari?</p>
| <p>If I understand your schema and question correctly, how about something like this:</p>
<pre><code>select student_name, score
from students
join (select student_answers.student_id, count(*) as score
from student_answers, answer_key
group by student_id
where student_answers.question_id = ans... | <p>The architecture you are talking about could become very cumbersome in the long run, and if you need to change the questions it means more changes to the UDF you are using.</p>
<p>I would think you could probably do your analysis in code without necessarily de-normalizing your database. De-normalization could also... | 4,244 |
<p>I'm working on a project where I'm coding in C in a UNIX environment. I've been using the lint tool to check my source code. Lint has been around a long time (since 1979), can anyone suggest a more recent code analysis tool I could use ? Preferably a tool that is free.</p>
| <p>Don't overlook the compiler itself. Read the compiler's documentation and find all the warnings and errors it can provide, and then enable as many as make sense for you.</p>
<p>Also make sure to tell your compiler to treat warnings like errors so you're forced to fix them right away (<code>-Werror</code> on gcc).
By... | <p>There is a "-Weffc++" option for gcc which according to the Mac OS X man page will:</p>
<blockquote>
<p>Warn about violations of the following style guidelines from Scott Meyers' Effective C++ book:</p>
</blockquote>
<p><strong><em>[snip]</em></strong></p>
<p>I know you asked about C, but this is the closest I ... | 2,502 |
<p>Say I have a list as follows:</p>
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
<p>Is there a CSS selector that will allow me to directly select the last item of a list? In this case item 3.</p>
<p>Cheers!</p>
| <p>Not that i'm aware of. The traditional solution is to tag the first & last items with class="first" & class="last" so you can identify them.</p>
<p>The CSS psudo-class <a href="http://www.w3.org/TR/CSS2/selector.html#first-child" rel="noreferrer">first-child</a> will get you the first item but not all brow... | <p>The answer for this question should be updated! IE9 + Firefox (for a while back) + Chrome, Safari all support: <code>last-of-type</code> or <code>last-child</code> </p>
| 7,411 |
<p>When I load my iPhone app it always loads a black screen first then pops up the main window. This happens even with a simple empty app with a single window loaded. </p>
<p>I've noticed that when loading, most apps zoom in on the main window (or scale it to fit the screen, however you want to think about it) and the... | <p>Add a Default.png to your project. This should be the image you want shown instead of the black launch screen.</p>
| <p>You can also take a screenshot of your app as an aid to creating the Default.png - while holding the Home button, press and release the Lock Sleep/Wake button. The screenshot can be find in your Camery Roll library in the Photos app and can be synced back to your desktop.</p>
| 8,888 |
<p>As an electrician newbie I have a question..</p>
<h2>Short question</h2>
<p>My power plug is attached to the wall outlet and three wires are at the end of it.. the blue, the brown and the green/yellow oen.</p>
<p>How to determine which is the live, zero and ground wire WITHOUT depending on the colouring?
I want to k... | <p>As it is alternating current, why are you interested to know which is which? (I'm referring to the blue and the brown wire, the green/yellow has an obvious purpose) </p>
<p>E.g. a <a href="https://en.wikipedia.org/wiki/AC_power_plugs_and_sockets" rel="nofollow noreferrer">CEE 7/4 plug</a> can be flipped around in t... | <p>As it is alternating current, why are you interested to know which is which? (I'm referring to the blue and the brown wire, the green/yellow has an obvious purpose) </p>
<p>E.g. a <a href="https://en.wikipedia.org/wiki/AC_power_plugs_and_sockets" rel="nofollow noreferrer">CEE 7/4 plug</a> can be flipped around in t... | 1,243 |
<p>I had a working solution using ASP.NET MVC Preview 3 (was upgraded from a Preview 2 solution) that uses an untyped ViewMasterPage like so:</p>
<pre><code>public partial class Home : ViewMasterPage
</code></pre>
<p>On Home.Master there is a display statement like this:</p>
<pre><code><%= ((GenericViewData)ViewD... | <p>We made that change because we wanted a bit of symmetry with the [] indexer. The Eval() method uses reflection and looks into the model to retrieve values. The indexer only looks at items directly added to the dictionary.</p>
| <p>I've decided to replace all instances of ViewData["blah"] with ViewData.Eval("blah").
However, I'd like to know the cause of this change if possible because:</p>
<ol>
<li>If it happens on my other projects it'd be nice to be able to fix.</li>
<li>It would be nice to leave the deployed working code and not overwrite... | 8,712 |
<p>How would I remove the border from an iframe embedded in my web app? An example of the iframe is:</p>
<pre><code><iframe src="myURL" width="300" height="300">Browser not compatible.</iframe>
</code></pre>
<p>I would like the transition from the content on my page to the contents of the iframe to be sea... | <p>Add the <code>frameBorder</code> attribute (note the <strong>capital ‘B’</strong>).</p>
<p>So it would look like:</p>
<pre><code><iframe src="myURL" width="300" height="300" frameBorder="0">Browser not compatible.</iframe>
</code></pre>
| <pre><code>iframe src="XXXXXXXXXXXXXXX"
marginwidth="0" marginheight="0" width="xxx" height="xxx"
</code></pre>
<p>Works with Firefox ;)</p>
| 9,073 |
<p>Why do elements with the CSS <code>position: fixed</code> applied to them cause Firefox to eat 100% CPU when scrolling the page they are in? And are there any workarounds?</p>
<p>I've noticed this behavior on a few sites, for example the notification bar at the top of the page on StackOverflow. I'm using Linux in c... | <p>This is <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=201307" rel="nofollow noreferrer">bug #201307</a>.</p>
| <p>Are you sure that there's a direct link here? Have you created a static HTML page with fixed elements to verify your theory? Given how widely these CSS properties are used, I'd think someone else would have noticed it by now, whatever browser/OS you're running.</p>
| 9,313 |
<p>I had an idea for a client-side language other than JavaScript, and I'd like to look into developing a Firefox plugin that would treat includes of this new language in a page, like <script type="newscript" src="path/script.ns" />, just as if it were a natively supported language. The plugin would do all of the la... | <p><a href="https://stackoverflow.com/questions/69982/writing-a-firefox-plugin-for-parsing-a-custom-client-side-language#70239">@Nathan de Vries</a>: no, actually, NPAPI plugins you suggested don't let one implement support for <code><script type=...></code>.</p>
<p>OP: this is not easy, but look for PyDOM and P... | <p>Do you really want to tie your pages to your own custom scripting language? Or are you just looking to write your client-side code in something that's not javascript? If the latter try <a href="http://milescript.org/" rel="nofollow noreferrer">MileScript</a>, <a href="http://haxe.org/" rel="nofollow noreferrer">Haxe... | 9,541 |
<p>Plastic is used in 3D FDM/FFF printing partly because it had a wide temperature range for its glass state - where it can be flowed with some force, but won't flow due only to gravity.</p>
<p>Most metals have a very narrow, or non-existant, glass state. They transition from solid to liquid with almost no flowable-b... | <p>A few things are required for effective extrusion-style 3d printing materials:</p>
<ul>
<li>It must stay where placed by the nozzle long enough to harden (or, alternately for pastes and such, have a shear-thinning or thixotropic viscous profile so it will not flow under its own weight). </li>
<li>If using a filamen... | <p>I spent some time looking at making an FDM machine that would print bronze filament. An alloy commonly made into wire had a difference between the solidus and liquidus temperature of only 50 degrees C. I determined that one could make a conventional hot end, electrically heated, made of either molybdenum or tungst... | 85 |
<p>This is my first time asking for some help on here and I have Googled, but only found a few reference to this issue. I know I am doing something dumb but I have no clue what it is. </p>
<p>I get an unknown motherboard error every time I try to setup my MKS GEN L. At first I found that in the <code>boards.h</code> f... | <p>The MKS GEN L board was added in Marlin release 1.1.7 .</p>
<p>According to the configuration file you've linked and <a href="https://github.com/MarlinFirmware/Marlin/releases" rel="nofollow noreferrer">previous Marlin releases</a>, your copy of Marlin is release 1.1.6. While all Marlin releases before 1.1.7 had "0... | <p>As explained in the <a href="/a/11866/">answer by @towe</a>, you are using an older version of the configuration file, it appears that you aren't using the latest sources from the 1.1.x and the 2.0.x trees.</p>
<p>In addition to the answer, the MKS GEN L is basically a RAMPS board with RAMPS pin layout except for a... | 1,569 |
<p>I previously asked about Version Cue 3 vs Subversion. I think this is a better question and someone suggested <a href="http://www.gridironsoftware.com/Flow/" rel="noreferrer">http://www.gridironsoftware.com/Flow/</a> I hope this question will allow others to join in and suggest other tools or give specific recommend... | <p>Take a look at <a href="http://joshcarter.com/productivity/svn_hg_git_for_home_directory" rel="nofollow noreferrer">this article</a> comparing Subversion, Mercurial, Git and Bazaar for managing the files in a home directory, including image files and large Photoshop files that are being edited and versioned.</p>
<p... | <p>Take a look at Perforce (<a href="http://www.perforce.com" rel="nofollow noreferrer">www.perforce.com</a>), particularly if you are managing these files in the context of development projects. It is a code-oriented system, but it supports binary files well and has a Photoshop plugin. P4 isn't free, but it is worth e... | 5,688 |
<p>We have an ASP.NET application running at a customer site that uses ActiveDirectory for user login via the ActiveDirectoryMembershipProvider. Their primary domain controller that we were pointing to went down this morning, and in getting everything set back up the client was wondering if we could have a redundant co... | <p>If ActiveDirectory couldn't handle multiple domain controllers then it wouldn't be a very good technology.</p>
<p>You just need to make sure in your Membership configuration you are pointing to the 'Domain' rather than the 'Server' and then add two or more controllers to your domain.</p>
<p>Generally if you are re... | <p>It can be done, it will just take some work.</p>
<p>You will need to create a class that inherits off of the ActiveDirectoryMemberhsipProvider and use it has your provider instead. That way you can maintain most of the functionality. Then setup a way to specify two connectionStringName properties, one for primary... | 7,797 |
<p>I'm generating some xml files that needs to conform to an xsd file that was given to me. How should I verify they conform?</p>
| <p>The Java runtime library supports validation. Last time I checked this was the Apache Xerces parser under the covers. You should probably use a <a href="http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/Validator.html" rel="noreferrer">javax.xml.validation.Validator</a>.</p>
<pre><code>import javax.xml.X... | <p>I had to validate an XML against XSD just one time, so I tried XMLFox. I found it to be very confusing and weird. The help instructions didn't seem to match the interface.</p>
<p>I ended up using LiquidXML Studio 2008 (v6) which was much easier to use and more immediately familiar (the UI is very similar to Visual ... | 3,656 |
<p>I have three tables: page, attachment, page-attachment</p>
<p>I have data like this:</p>
<pre><code>page
ID NAME
1 first page
2 second page
3 third page
4 fourth page
attachment
ID NAME
1 foo.word
2 test.xsl
3 mm.ppt
page-attachment
ID PAGE-ID ATTACHMENT-ID
1 2 ... | <p>Change your "inner join" to a "left outer join", which means "get me all the rows on the left of the join, even if there isn't a matching row on the right."</p>
<pre><code>select page.name, count(page-attachment.id) as attachmentsnumber
from page
left outer join page-attachment on page.id=page-id
group by pa... | <p>Use this:</p>
<pre><code>SELECT p.name,(
SELECT COUNT(*) FROM [page-attachment] pa WHERE pa.[PAGE-ID] = p.id) as attachmentsnumber
FROM page p
</code></pre>
| 5,737 |
<p>What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time?</p>
<p>What are their typical usages?</p>
<p>Are they unique to Java? Is there a C++ equivalent?</p>
| <p>Annotations are primarily used by code that is inspecting other code. They are often used for modifying (i.e. decorating or wrapping) existing classes at run-time to change their behavior. Frameworks such as <a href="http://www.junit.org/" rel="noreferrer">JUnit</a> and <a href="http://www.hibernate.org/" rel="noref... | <p><a href="https://stackoverflow.com/questions/94361/when-do-you-use-javas-override-annotation-and-why">When do you use Java's @Override annotation and why?</a>
The link refers to a question on when one should use the override annotation(@override)..
This might help understand the concept of annotation better.Chec... | 4,396 |
<p>In slicer G-code is it possible to set the probe Z offset for the first layer only?</p>
<p>For my stock E3 plate I find -4.125 mm best however for glass I need to go to -4.175 mm for the first layer to get better adhesion. So it's a manual process every time. Any way to tell the slicer do the first layer at -4.175 m... | <p>I don't understand the reasoning behind a first layer having a different offset from the following layers, but, You can manually add a re-definition of the current height after the first layer, suppose your first layer is 0.2 mm, you just need to tell the printer to move to a slightly higher next layer to redefine t... | <p>Trying to change the Z level (NOT the offset) during a print isn't a good idea UNLESS you know that all future moves will be "relative".</p>
<p>The <code>M206</code> (if you use Marlin) is the right way to set it! Depending on the slicer, just create TWO "different" printer definitions and add t... | 1,910 |
<p>I have a tree encoded in a MySQL database as edges:</p>
<pre><code>CREATE TABLE items (
num INT,
tot INT,
PRIMARY KEY (num)
);
CREATE TABLE tree (
orig INT,
term INT
FOREIGN KEY (orig,term) REFERENCES items (num,num)
)
</code></pre>
<p>For each leaf in the tree, <code>items.tot</cod... | <p>You sound as if you're looking for three major things: code templates, refactoring tools, and auto-completion.</p>
<p>The good news is that Xcode 3 and later come with superb auto-completion and template support. By default, you have to explicitly request completion by hitting the escape key. (This actually works... | <p>I found some xtmacro files in Xcode.app package:
<strong>/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources</strong></p>
<p>Installed Xcode ver. 3.2.5.</p>
| 4,080 |
<p>One of the guys I work with needs a custom control that would work like a multiline ddl since such a thing does not exist as far as we have been able to discover</p>
<p>does anyone have any ideas or have created such a thing before<br>
we have a couple ideas but they involve to much database usage </p>
<p>We pref... | <p>From <a href="http://bytes.com/forum/thread16212.html" rel="noreferrer">this thread</a>, there are different ways to do this:</p>
<pre><code>double r = 5.1234;
System.out.println(r); // r is 5.1234
int decimalPlaces = 2;
BigDecimal bd = new BigDecimal(r);
// setScale is immutable
bd = bd.setScale(decimalPlaces, B... | <p>There are two approaches in the standard library. One is to use java.text.DecimalFormat. The other more cryptic methods (String.format, PrintStream.printf, etc) based around java.util.Formatter should keep C programmers happy(ish).</p>
| 7,333 |
<p>I always tend to forget these built-in <strong>Symfony</strong> functions for making links.</p>
| <p>If your goal is to have user-friendly URLs throughout your application, use the following approach:</p>
<p>1) Create a routing rule for your module/action in the application's routing.yml file. The following example is a routing rule for an action that shows the most recent questions in an application, defaulting ... | <p>In addition, if you actually want a query string with that url, you use this: </p>
<pre><code>link_to('My link name', 'yourmodule/youraction?key=value&key2=value',array('query_string'=>'page=2'));
</code></pre>
<p>Otherwise, it's going to try to route it as part of the url and likely break your action.</p>... | 5,465 |
<p>I am wanting to buy a 3D printer to add to my shop.</p>
<p>I am an engineer and enjoy making/building things so the kit idea sounds fun and economical.</p>
<p>I see Tronxy has two different styles for their larger printers:</p>
<ul>
<li>P802 (reprap frame) style</li>
<li>X3 (metal frame) style.</li>
</ul>
<p>As ... | <p>You can not tell this by looking at the STL file alone, because how much material will be used depends on the print settings (obviously, printing at 100% infill will consume much more material than 10%).</p>
<p>The best way to check the material usage is to load the model into a slicer and slice it using your prefe... | <p>This is a link I found that analyzes your G-code ( filament usage, time, etc.): <a href="http://gcode.ws/" rel="nofollow noreferrer">gCodeViewer</a></p>
<p>From the description (emphasis is mine):</p>
<blockquote>
<ul>
<li>Analyze GCode
<ul>
<li>Print time, <strong><em>amount of plastic used</em></stron... | 549 |
<p>Anybody have a script or alias to find untracked (really: unadded) files in a Perforce tree?</p>
<p>EDIT: I updated the accepted answer on this one since it looks like P4V added support for this in the January 2009 release.</p>
| <p><strong>EDIT:</strong> Please use <code>p4 status</code> now. There is no need for jumping through hoops anymore. See @ColonelPanic's <a href="https://stackoverflow.com/a/13864328/39648">answer</a>.</p>
<p>In the Jan 2009 version of P4V, you can right-click on any folder in your workspace tree and click "reconcile ... | <p>In P4V, under the "View" menu item choose "Files in Folder" which brings up a new tab in the right pane.
To the far right of the tabs there is a little icon that brings up a window called "Files in Folder" with 2 icons.
Select the left icon that looks like a funnel and you will see several options. Choose "Show ite... | 3,067 |
<p>I'm interested in learning some (ideally) database agnostic ways of selecting the <em>n</em>th row from a database table. It would also be interesting to see how this can be achieved using the native functionality of the following databases: </p>
<ul>
<li>SQL Server</li>
<li>MySQL</li>
<li>PostgreSQL</li>
<li>SQLit... | <p>There are ways of doing this in optional parts of the standard, but a lot of databases support their own way of doing it.</p>
<p>A really good site that talks about this and other things is <a href="http://troels.arvin.dk/db/rdbms/#select-limit" rel="noreferrer">http://troels.arvin.dk/db/rdbms/#select-limit</a>.</p... | <p>unbelievable that you can find a SQL engine executing this one ...</p>
<pre><code>WITH sentence AS
(SELECT
stuff,
row = ROW_NUMBER() OVER (ORDER BY Id)
FROM
SentenceType
)
SELECT
sen.stuff
FROM sentence sen
WHERE sen.row = (ABS(CHECKSUM(NEWID())) % 100) + 1
</code></pre>
| 3,730 |
<p>The manual page for <code>XML::Parser::Style::Objects</code> is horrible. A simple hello world style program would really be helpful.</p>
<p>I really wanted to do something like this: (not real code of course)</p>
<pre><code>use XML::Parser;
my $p = XML::Parser->new(Style => 'Objects', Pkg => 'MyNode');
... | <p>When ever I need to do something similar, usually I end up using <a href="http://search.cpan.org/~ebohlman/XML-Parser-EasyTree-0.01/EasyTree.pm" rel="nofollow noreferrer">XML::Parser::EasyTree </a> it has better documentation and is simpler to use.</p>
<p>I highly recommend it.</p>
| <p>When ever I need to do something similar, usually I end up using <a href="http://search.cpan.org/~ebohlman/XML-Parser-EasyTree-0.01/EasyTree.pm" rel="nofollow noreferrer">XML::Parser::EasyTree </a> it has better documentation and is simpler to use.</p>
<p>I highly recommend it.</p>
| 5,528 |
<p>Does anyone know of any free tools that can assist in converting an <code>SQL2005</code> database back to <code>SQL2000</code> format? I know that you can script all the objects and then do a dump of the data, but this is a lot of work to do manually.</p>
| <p>Reviewing some other related questions I just found Microsoft's <a href="http://www.codeplex.com/sqlhost/Wiki/View.aspx?title=Database%20Publishing%20Wizard" rel="nofollow noreferrer">Database Publishing Wizard</a>. It does most of what I need, although I have used nVarChar(max) in a couple of places and it simply ... | <p>Have you considered using DTS to transfer the data across? It should be independant of the version.</p>
| 6,457 |
<p>I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements..</p>
<p>Can anyone tell me what exactly consists of business logic? How can it be di... | <p>Simply define what you are doing in plain English. When you are saying things businesswise, like "make those suffer", "steal that money", "destroy this portion of earth" you are talking about business layer. To make it clear, things that get you excited go here.</p>
<p>When you are saying "show this here", "do not ... | <p>For me, " <em>business logic</em> " makes up all the entities that represent data applicable to the problem domain, as well as the logic that decides on "what do do with the data"..</p>
<p>So it should really consist of "data transport" (not access) and "data manipulation".. Actually data access (stuff hitting the ... | 6,034 |
<p>I'm trying to solve <a href="http://uva.onlinejudge.org/external/1/100.pdf" rel="noreferrer">the 3n+1 problem</a> and I have a <code>for</code> loop that looks like this: </p>
<pre><code>for(int i = low; i <= high; ++i)
{
res = runalg(i);
if (res > highestres)
... | <p>I'd try to declare <code>i</code> outside of the loop!</p>
<p>Good luck on solving 3n+1 :-)</p>
<p>Here's an example: </p>
<pre class="lang-c prettyprint-override"><code>#include <stdio.h>
int main() {
int i;
/* for loop execution */
for (i = 10; i < 20; i++) {
printf("i: %d\n", i);
... | <p>For Qt-creator: just add next lines to *.pro file...</p>
<pre><code>QMAKE_CFLAGS_DEBUG = \
-std=gnu99
QMAKE_CFLAGS_RELEASE = \
-std=gnu99
</code></pre>
| 4,451 |
<p>My i3 MK3 is printing very well for solid parts of an object, but it messes up with infill.</p>
<p><a href="https://i.stack.imgur.com/dc5BL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dc5BL.jpg" alt="Infill rough"></a></p>
<p>As you can see in the image, the infill is broken into pieces and ... | <p>From your comments can be read that you print infill at 200 mm/s. </p>
<p>Know that 200 mm/s is ridiculously fast (like high travelling speed), close to the limits of printing on certain machines (<a href="/a/8108">for an AtMega</a>)! It is hard for the filament to keep up at this speed. A value of 60&nbs... | <p>I have dealt with this on infill as well on multiple MK3s.</p>
<p>However, it was not the speed itself, but the hot end having difficulty extruding enough to keep up with the infill. </p>
<p>Some things to try:</p>
<ul>
<li>Raise hot end temperature 5 degrees (melt filament faster)</li>
<li>Lower infill speed, i... | 1,217 |
<p>What are the most common 3D printing file formats, and which one is more effective or used more than others?</p>
| <h1>3D-Model Exchange Files</h1>
<p>The <a href="https://all3dp.com/3d-file-format-3d-files-3d-printer-3d-cad-vrml-stl-obj/" rel="nofollow noreferrer">most common file formats</a> to exchange models for 3D printing are STL, OBJ, FBX, COLLADA, 3DS, IGES, STEP, and VRML/X3D.</p>
<p>Of these, STL, OBJ, AMF, and 3MF are th... | <p><a href="https://en.wikipedia.org/wiki/STL_(file_format)" rel="nofollow noreferrer">STL</a> is the standard for pretty much everything out there.</p>
<p>EDIT: This is for models to be sliced and printed. Gcode is what would actually be executed, after slicing, to create the print.</p>
| 1,085 |
<p>C# and Java allow almost any character in class names, method names, local variables, etc.. Is it bad practice to use non-ASCII characters, testing the boundaries of poor editors and analysis tools and making it difficult for some people to read, or is American arrogance the only argument against?</p>
| <p>I would stick to english, simply because you usually never know who is working on that code, and because some third-party tools used in the build/testing/bugtracking progress may have problems. Typing äöüß on a Non-German Keyboard is simply a PITA, and I simply believe that anyone involved in software development sh... | <p>There is another hazzard to using non-ASCII characters, though it will probably only bite in obscure cases. The allowed characters are <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8" rel="nofollow">defined</a> in terms of the methods <a href="http://docs.oracle.com/javase/7/docs/api/ja... | 8,683 |
<p>Given a specific <code>DateTime</code> value, how do I display relative time, like:</p>
<ul>
<li><code>2 hours ago</code></li>
<li><code>3 days ago</code></li>
<li><code>a month ago</code></li>
</ul>
| <p>Jeff, <a href="https://stackoverflow.com/questions/11/how-do-i-calculate-relative-time/12#12">your code</a> is nice but could be clearer with constants (as suggested in Code Complete).</p>
<pre class="lang-csharp prettyprint-override"><code>const int SECOND = 1;
const int MINUTE = 60 * SECOND;
const int HOUR = 60 *... | <p>My way is much more simpler. You can tweak with the return strings as you want</p>
<pre><code> public static string TimeLeft(DateTime utcDate)
{
TimeSpan timeLeft = DateTime.UtcNow - utcDate;
string timeLeftString = "";
if (timeLeft.Days > 0)
{
timeLeftString +=... | 2,233 |
<p>How do I create a new webpage in the Documentum front end Webtop? </p>
| <p>Why WebTop? You should use Web Publisher which is built on WebTop with the specific purpose of managing web content. Is this an OOTB installation? Web Publisher / WebTop requires significant amount of customization in order to start being useful. Do you have templates defined? If so, then just go to File New and... | <p>Why WebTop? You should use Web Publisher which is built on WebTop with the specific purpose of managing web content. Is this an OOTB installation? Web Publisher / WebTop requires significant amount of customization in order to start being useful. Do you have templates defined? If so, then just go to File New and... | 6,119 |
<p>Assuming a Cartesian printer with a belt and smooth rod design in which one axis moves another (i.e. the X-axis rails 'sit' on the Y-axis rails), what are the main considerations in sizing the rods and belts? For example, given a base design using 8 mm diameter rods and 6 mm belts (assume these are the limiting fac... | <p>8 mm rods and 6 mm GT2 belts are generally accepted as a good tradeoff between price and performance, an exact calculation is possible but might not be very relevant if another part is flexing. Also, generally speaking, the smaller the part the sooner it will wear out of specification. Thus your service interval mig... | <p>The 3D printing revolution started out with the idea/community project to build self-replicating machines:</p>
<blockquote>
<p>RepRap was the first of the low-cost 3D printers, and the RepRap Project started the open-source 3D printer revolution. It has become the most widely-used 3D printer among the global members... | 1,771 |
<p>Are there any tools available that will calculate code metrics (for example number of code lines, cyclomatic complexity, coupling, cohesion) for your project and over time produce a graph showing the trends? </p>
| <p>On my latest project I used <a href="http://www.campwoodsw.com/sourcemonitor.html" rel="noreferrer">SourceMonitor</a>. It's a nice free tool for code metrics analysis.<br>
Here is an excerpt from SourceMonitor official site:</p>
<blockquote>
<ul>
<li>Collects metrics in a fast, single
pass through source file... | <p>On the PHP front, I believe for example <a href="http://phpundercontrol.org" rel="nofollow noreferrer">phpUnderControl</a> includes metrics through <a href="http://www.phpunit.de/" rel="nofollow noreferrer">phpUnit</a> (if I am not mistaken).</p>
<p>Keep in mind that metrics are often flawed. For example, a coder w... | 8,525 |
<p>My model layers are printing much as I expect but the parts when removed from the plate are very soft and flexible and fail to harden any further in sunlight or UV lamplight. A tall or slender part will bend and distort under its own weight while printing. I am using LCD-T resin, I have increased time and reduced ... | <p>I could finally solve the issue. Calling <code>openscad</code> from command line with parameters does NOT work with the AppImage I used. It works fine with a "standard" installation, though.</p>
<p>Thanks for your support.</p>
| <p>You can specify variable values from command line using:</p>
<pre>
openscad ...\
... \
[ -D var=val [..] ] \
... \
... \
filename
</pre>
<p>See the <a href="https://en.m.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_env... | 1,228 |
<p>Why does the use of temp tables with a SELECT statement improve the logical I/O count? Wouldn't it increase the amount of hits to a database instead of decreasing it. Is this because the 'problem' is broken down into sections? I'd like to know what's going on behind the scenes.</p>
| <p>There's no general answer. It depends on how the temp table is being used.</p>
<p>The temp table may reduce IO by caching rows created after a complex filter/join that are used multiple times later in the batch. This way, the DB can avoid hitting the base tables multiple times when only a subset of the records are ... | <p>AFAIK, at least with mysql, tmp tables are kept in RAM, making SELECTs much faster than anything that hits the HD</p>
| 9,822 |
<p>Right now I have an <a href="http://en.wikipedia.org/wiki/SQL_Server_Integration_Services" rel="nofollow noreferrer">SSIS</a> package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the... | <p>If you're in Server Explorer, you can make them visible this way:</p>
<ul>
<li>Create a connection to the server you want.</li>
<li>Right-click the server and choose Change View > Object Type.</li>
<li>You should now see System Tables and User Tables. You should see sysjobs there, and you can easily drag it onto a... | <p>It may not be available in the designer, but why not just add it to the DBML file itself?</p>
| 7,786 |
<p>I have a ComboBox that I bind to a standard HTTPService, I would like to add an event listener so that I can run some code after the ComboBox is populated from the data provider.</p>
<p>How can I do this?</p>
| <p>Flex doesn't have a specific data-binding events in the way that say ASP .Net does. You have to watch for the dataProvider property like John says in the first answer, but not simply to the combobox or its dataProvider property. Let's say you have a setup like this:</p>
<pre><code><!-- Assume you have extracted ... | <p>You can use <code>BindingUtils</code> to get notified when the <code>dataProvider</code> property of the combo box changes:</p>
<pre><code>BindingUtils.bindSetter(comboBoxDataProviderChanged, comboBox, "dataProvider");
</code></pre>
<p><code>BindingUtils</code> lives in the <code>mx.binding.utils</code> package.</... | 4,605 |
<p>Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?</p>
<p>If so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with. </p>
<p>I currently have a Ruby rake file that has steps for doing building and running... | <p>Yes, you just run xcode builds via the command line (xcodebuild) which makes it simple to target from CC via an ant <code><exec></code>. I've been using just regular CC, not the ruby version and it works fine. Here's a barebones example:</p>
<pre><code><project name="cocoathing" default="build">
<t... | <p>Yes, CruiseControl has a <a href="http://cruisecontrol.sourceforge.net/main/configxml.html#git" rel="nofollow noreferrer">support for git</a>.</p>
| 5,048 |
<p>One of my co-workers checked in a some files in SVN and one of the files has a password in it. The password has been removed from the file and a new version checked in but the password is obviously still in the repository if we look at the revision history and go to that revision. (We're using TortoiseSVN as the cli... | <p><a href="http://subversion.apache.org/faq.html#removal" rel="nofollow noreferrer">link to subversion FAQ entry on this</a></p>
| <p>I'm not sure. You could always create a new file and copy the latest revision into that, wiping out prior revision history. </p>
| 5,387 |
<p>On my Ender 3 v2 printer I recently and consistently get some knocking.
This happens in only two scenarios.</p>
<p>First, it now occurs all the time when printing the initial test strip gets near the top (high Y value), and knocks several times.</p>
<p>Secondly, it occurs if the model (sliced with Cura) has a high Y... | <p>Embarassingly, I discovered that the cable to the heatbed was sometimes caught between the on/off switch and the adjacent power plug. So, for high Y values the cable was very tight and the bed could not be moved. Presumably the "knocking" came from the Y-axis motor. The problem was fixed by attaching this ... | <p>Your bed has become unleveled or skewed in Y direction.</p>
<p>When the nozzle is closer to the bed the extruder has to push harder to get the same filament flow through a smaller space, the stresses the extruder to a point that the stepper skips or grinds the filament. This is generally described as a knocking soun... | 2,186 |
<p>I'm using an Xml field in my Sql Server database table. I'm trying to search a word using the XQuery <strong>contains</strong> method but it seems to search <strong>only</strong> in case sensitive mode. The lower method isn't implemented on Sql Server XQuery implementation also.
¿Is there a simple solution to this p... | <p>If you're using SQL Server 2005, I'm afraid you're out of luck.</p>
<p>If you're using SQL Server 2008, you can use the upper-case function like this :</p>
<pre><code>DECLARE @x xml = N'abcDEF!@4';
SELECT @x.value('fn:upper-case(/text()[1])', 'nvarchar(10)');
</code></pre>
<p>Here's a link on MSDN for the upper-c... | <p><em><a href="http://www.google.ru/search?complete=1&hl=en&newwindow=1&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=MdF&q=Sql+Server+contains+function+xquery+case-insensitive&btnG=%CF%EE%E8%F1%EA&lr=&aq=f&oq=" rel="nofollow noreferrer">First</a></em> link from google ... | 9,742 |
<p>I've seen news of <a href="http://github.com/jeresig/sizzle/tree/master" rel="noreferrer">John Resig's fast new selector engine named Sizzle</a> pop up in quite a few places, but I don't know what a selector engine is, nor have any of the articles given an explanation of what it is. I know Resig is the creator of j... | <p>A selector engine is used to query a page's DOM for particular elements, based on some sort of query (usually CSS syntax or similar). </p>
<p>For example, this jQuery:</p>
<pre><code>$('div')
</code></pre>
<p>Would search for and return all of the <div> elements on the page. It uses jQuery's selector engi... | <p>A selector engine is used to find elements in a document, in the same way as CSS stylesheets does. Currently only Safari has the built-in querySelectorAll function which does just that. With other browser you have to use external JavaScript implementations as <a href="http://llamalab.com/js/selector/" rel="nofollow ... | 4,596 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.