instruction stringlengths 27 22.5k | chosen stringlengths 27 28.2k | rejected stringlengths 19 24.9k | __index_level_0__ int64 0 10k |
|---|---|---|---|
<p>A while back, I had worked on building a <a href="https://biber-boote.ch/yostwerks/SeaCruiser.html" rel="nofollow noreferrer">Yostwerks Sea Cruiser</a>. Now I'm thinking of trying to create a 3D printable (or 3D millable) version of the plans.</p>
<p>The original design uses cross-sections cut from a half-inch thic... | <p>According to <a href="https://omnexus.specialchem.com/polymer-properties/properties/stiffness" rel="nofollow noreferrer">the chart on this page</a> HDPE has a flexural modulus of between 0.75 and 1.575 Gpa; meanwhile PETG has a flexural modulus of 2.20 Gpa, meaning PETG is the stiffer material.</p>
<p>HDPE, by defi... | <p>Because of the inherent nature of FDM, material properties will most certainly be always lower than casted/extruded sheet material. Furthermore, your question implies to use the same geometry of the ribs, I doubt whether there will be a filament that is able to get close to your requirements regarding strength and s... | 1,080 |
<p>I was reading googlebooks on chrome, where they talk about why they decided to spin up a process to host browser tab, every time you created a new tab.'
So </p>
<p>2 tabs = 2 chrome processes</p>
<p>3 tabs = 3 chrome processes and so on .. right??</p>
<p>But i opened up some 20 or so tabs, but in task manager, i ... | <p>it's being hosted in the first process. open up chrome. you'll see 2 processes (manager and initial tab). then open 10 more tabs, you'll notice the second process's memory jump a lot. then type in google.com or something into the first tab, and you'll see a new process get spawned.</p>
<p>also notice, if you do shi... | <p>Process creation is relatively expensive, certainly compared to thread creation. But the frequency of process creation in Chrome is <em>very</em> slow, so the real issue is the amount of resource overhead vs other techniques.</p>
<p>The Google team figured that the benefits of a separate process model justified th... | 6,439 |
<p>I find that the .NET event model is such that I'll often be raising an event on one thread and listening for it on another thread. I was wondering what the cleanest way to marshal an event from a background thread onto my UI thread is.</p>
<p>Based on the community suggestions, I've used this:</p>
<pre><code>// e... | <p>A couple of observations:</p>
<ul>
<li>Don't create simple delegates explicitly in code like that unless you're pre-2.0 so you could use: </li>
</ul>
<pre class="lang-cs prettyprint-override"><code> BeginInvoke(new EventHandler<CoolObjectEventArgs>(mCoolObject_CoolEvent),
sender,
... | <p>I am using something like</p>
<pre><code>Invoke((Action)(() =>
{
//your code
}));
</code></pre>
| 4,238 |
<p>I recently got a 3D printer and have been experimenting with it a lot, resulting in a lot of failed prints (as well as successes, fortunately).</p>
<p>I'd like to, if possible, find a way to reuse the material from these failed prints. I am thinking about two methods:</p>
<ol>
<li>The obvious thing to do with the... | <p>Here is a great article on the subject, <a href="https://www.3dhubs.com/talk/thread/how-make-your-own-filament-recycling-old-3d-prints-part-1" rel="nofollow noreferrer">How to make your own filament by recycling old 3D prints | Part 1</a>.</p>
<p>At $20/kg for new material, it is going to be hard for recycling to b... | <p>I ended up buying a little handheld 3D pen. It comes in handy when printing models that require assembly. You can use the leftover filament in the 3D pen. If you don't have a 3D pen, you can use a soldering iron (as long as you can control the temp) to weld items together. I works well for part repairs and assembly.... | 598 |
<p>In the project I am currently working on, we have the need to develop a web chat application, not a very complex chat, just a way to connect two people to talk about a very specific topic, we don't need any kind of authentication for one of the two users, we don't have to support emoticons, avatars, or stuff like th... | <p>You might also want to look into <a href="http://en.wikipedia.org/wiki/Comet_(programming)" rel="noreferrer">Comet</a>.</p>
<p>It's used by GTalk, Meebo, and many <a href="http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications" rel="noreferrer">other chat applications</a>. A few years ago when I was ... | <p>I thought everyone used cometd for this sort of thing. </p>
| 5,601 |
<p>I have a Printrboard rev. D which includes Allegro A4982 drivers. I would like to replace them, but it appears that newer TMC drivers all require several pins for proper operation.</p>
<p><a href="https://i.stack.imgur.com/ZnRf5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZnRf5.png" alt="ente... | <p>The developers from the Klipper firmware confirmed that Klipper doesn't care about the native functions of each pin, therefore it is indeed possible to use the expansion pins for controlling (including UART) TMC stepper drivers.</p>
<p>At this point I cannot confirm, but maybe Marlin allows the same by updating the... | <p>You can't. In fact, pretty much all boards with directly soldered drivers are not upgradable.</p>
<p>I'd recommend to buy a proper, contemporary, customizable board like the SKR 1.3 for TMCs.
The Fysetc F6 would also work, but uses "custom" connectors and is still AVR based.</p>
| 1,498 |
<p>Does anyone here know any resources on how to get started writing a plugin for Google's Picasa? I love it for photo management, but I have some ideas for how it could be better.</p>
<ul>
<li>Riya-esque facial search: given a large enough corpus of faces and pictures (people tend to be repeated often in individual... | <p>there is a an <a href="http://picasa2flickr.sourceforge.net/index.html#about" rel="nofollow noreferrer">Opensource Project</a> which created a "Upload To FlickR" Plugin. Maybe you could use it as an startingpoint... </p>
| <p>I would start with the Picasa API:</p>
<p><a href="http://code.google.com/apis/picasaweb/overview.html" rel="nofollow noreferrer">Picasa API</a></p>
| 3,481 |
<p>We have a rather large SVN repository. Doing SVN updates are taking longer and longer the more we add code. We added <code>svn:externals</code> to folders that were repeated in some projects like the <a href="http://en.wikipedia.org/wiki/CKEditor" rel="noreferrer">FCKeditor</a> on various websites. This helped, but ... | <p>If it's an older SVN repository (or even quite new, but wasn't setup optimally), it maybe using the older BDB style of repository database. <a href="http://svn.apache.org/repos/asf/subversion/trunk/notes/fsfs" rel="noreferrer">http://svn.apache.org/repos/asf/subversion/trunk/notes/fsfs</a> has notes on the new one.... | <p>If you have many folders in the root of repository and your local copy reflects the repository, then try to slit monolithic local copy into many separated downloadable folders and update these folders separately too, It will be really faster than one big folder.</p>
| 9,091 |
<p>What are some toolkits for developing 2D games in Python? An option that I have heard of is Pygame, but is there anything that has more range to do more things? What are the good and bad parts about the modules?</p>
| <p>I use <a href="http://www.pygame.org/news.html" rel="nofollow noreferrer">pygame</a> myself and it is very good. It has good documentation and tutorials, and is quite well designed. I've also heard wonderful reviews of <a href="http://www.pyglet.org/" rel="nofollow noreferrer">pyglet</a>.</p>
| <p>I've only heard people talk about pygame. It has tons of followers & plenty of functionality.</p>
<p>Recently I saw <a href="https://rads.stackoverflow.com/amzn/click/com/1590598725" rel="nofollow noreferrer" rel="nofollow noreferrer">this book</a> at barnes & noble which I might check out one day. It loo... | 5,492 |
<p>Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button look "pressed"?
Imagine this button is an on/off switch.
<code>ToolStripButton</code> has the Checked property, but the regular Button does not.</p>
| <p>One method you can used to obtain this option is by placing a "CheckBox" object and changing its "Appearance" from "Normal" to "Button" this will give you the same functionality that I believe you are looking for.</p>
| <p>I think you may need a <code>ToggleButton</code>. You can take a look at third party vendors of WinForms components such as Telerik, DevExpress, ComponentFactory, ViBlend which provide such control. They all provide toggle buttons.</p>
| 2,690 |
<p>I need to do date arithmetic in Unix shell scripts that I use to control the execution of third party programs. </p>
<p>I'm using a function to increment a day and another to decrement: </p>
<pre><code>IncrementaDia(){
echo $1 | awk '
BEGIN {
diasDelMes[1] = 31
diasDelMes[2] = 28
diasDelMes... | <p>Assuming you have <a href="http://www.gnu.org/software/coreutils/manual/coreutils.html#date-invocation" rel="noreferrer">GNU date</a>, like so:</p>
<pre><code>date --date='1 days ago' '+%a'
</code></pre>
<p>And <a href="http://www.gnu.org/software/coreutils/manual/coreutils.html#Date-input-formats" rel="noreferrer... | <p>This works for me:</p>
<pre><code>TZ=GMT+6;
export TZ
mes=`date --date='2 days ago' '+%m'`
dia=`date --date='2 days ago' '+%d'`
anio=`date --date='2 days ago' '+%Y'`
hora=`date --date='2 days ago' '+%H'`
</code></pre>
| 2,820 |
<p>I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python scri... | <p>Launching a Python interpreter instance just to select the right binary to run would be much heavier than you need. I'd distribute a shell .rc file which provides aliases.</p>
<p>In /shared/bin, you put the various binaries: /shared/bin/toolname-mac, /shared/bin/toolname-debian-x86, /shared/bin/toolname-netbsd-dre... | <p>You know, you should look at static linking.</p>
<p>These days, we all have HUGE hard drives, and a few extra megabytes (for carrying around libc and what not) is really not that big a deal anymore. </p>
<p>You could also try running your applications in chroot() jails and distributing those.</p>
| 6,099 |
<p>I have an object that has cutouts in it (alignment pins fit in the cutouts). The shape of the hole is a right triangle with the point clipped off to create a flat surface in the deep part of the hole.</p>
<p>When I print the object in vertical orientation the wall in the deepest part of the cutout is printed proper... | <p>I think this is caused by the shape of the hole. The shape is parabolic or circular, this means that if you slice it as in the green part, the slicer determines the placing of the layers along the curvature. If it has a shallow curvature, and slicing layer height is relatively thick, the curvature of the object cann... | <p>I think this is caused by the shape of the hole. The shape is parabolic or circular, this means that if you slice it as in the green part, the slicer determines the placing of the layers along the curvature. If it has a shallow curvature, and slicing layer height is relatively thick, the curvature of the object cann... | 1,148 |
<p>What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL.</p>
<p>But, it seems like it might also be a good time to investigate the market to see what else is out there.</p>
<p>What have you enco... | <p>I've used Cognos Series 7, Cognos Series 8, Crystal Reports, Business Objects XI R2 WebIntelligence, Reporting Services 2000, Reporting Services 2005, and Reporting Services 2008. Here's my feedback on what I've learned:</p>
<p><strong>Reporting Services 2008/2005/2000</strong></p>
<p>PROS</p>
<ol>
<li><p>Cost: ... | <p>Crystal Reports by <a href="http://businessobjects.com" rel="nofollow noreferrer">Business Objects</a> seems to be a popular choice.</p>
<p>I never wrote any reports in it myself, but others in my team who did sometimes struggled getting the more complex reports to work.</p>
<p>It also might be a bit pricey, depen... | 3,748 |
<p>I am not sure whether is it possible to change attribute's parameter during runtime? For example, inside an assembly I have the following class</p>
<pre><code>public class UserInfo
{
[Category("change me!")]
public int Age
{
get;
set;
}
[Category("change me!")]
public string ... | <p>Well you learn something new every day, apparently I lied:</p>
<blockquote>
<p>What isn’t generally realised is that
you can change attribute <strong>instance</strong> values fairly
easily at runtime. The reason is, of
course, that the instances of the
attribute classes that are created are
perfectly no... | <p>You can change Attribute values at runtime at Class level (not object):</p>
<pre><code>var attr = TypeDescriptor.GetProperties(typeof(UserContact))["UserName"].Attributes[typeof(ReadOnlyAttribute)] as ReadOnlyAttribute;
attr.GetType().GetField("isReadOnly", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(a... | 7,429 |
<p>We just added an autoupdater in our software and got some bug report saying
that the autoupdate wouldn't complete properly because the downloaded file's sha1 checksum wasn't matching. We're hosted on Amazon S3...</p>
<p>That's either something wrong with my code or something wrong with S3.</p>
<p>I reread my code ... | <p>Amazon's S3 will occasionally fail with errors during uploads or downloads -- generally "500: Internal Server" errors. The error rate is normally pretty low, but it can spike if the service is under heavy load. The error rate is never 0%, so even at the best of times the occasional request will fail.</p>
<p>Are you... | <p>More than sending bad data, I think I got an ERROR403. If I just try again it's usually ok.</p>
<p>And I agree : I saw a lot of report about people talking about amazon being totally down, but nobody talking about a "sometimes my access is refused" error, so I guess there might be an error on my side. I just set up... | 5,141 |
<p>I have a third party library that internally constructs and uses the SqlConnection class. I can inherit from the class, but it has a ton of overloads, and so far I have been unable to find the right one. What I'd like is to tack on a parameter to the connection string being used.</p>
<p>Is there a way for me to put... | <p>You can <a href="http://www.wintellect.com/cs/blogs/jrobbins/archive/2008/01/17/additional-net-framework-source-code-debugging-tricks.aspx" rel="nofollow noreferrer">download .NET source code</a> and set break point right in .NET FW source code.</p>
<p>You can use <a href="http://www.codeplex.com/NetMassDownloader"... | <p>OK, if you want definitive guide, here it is:</p>
<p><a href="http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx" rel="nofollow noreferrer">Configuring Visual Studio to Debug .NET Framework Source Code</a></p>
<p>If you want some help, go ahead and tel... | 8,644 |
<p>I want to keep logs of some things that people do in my app, in some cases so that it can be undone if needed.</p>
<p>Is it best to store such logs in a file or a database? I'm completely at a loss as to what the pros and cons are except that it's another table to setup.</p>
<p>Is there a third (or fourth etc) opt... | <p>You will almost certainly want to use a database for flexible, record based access and to take advantage of the database's ability to handle concurrent data access. If you need to track information that may need to be undone, having it in a structured format is a benefit, as is having the ability to update a row ind... | <p>I'd use a database simply for maintainability - also multiple edits on a file may cause some getting missed out.</p>
| 5,653 |
<p>Assume you are doing something like the following</p>
<pre><code>List<string> myitems = new List<string>
{
"Item 1",
"Item 2",
"Item 3"
};
ComboBox box = new ComboBox();
box.DataSource = myitems;
ComboBox box2 = new ComboBox();
box2.DataSource = myitems
</code></pre>
<p>So now we have 2 c... | <p>This has to do with how data bindings are set up in the dotnet framework, especially the <code>BindingContext</code>. On a high level it means that if you haven't specified otherwise each form and all the controls of the form share the same <code>BindingContext</code>. When you are setting the <code>DataSource</code... | <p>A better workaround (depending on the size of the datasource) is to declare two <code>BindingSource</code> objects (new as of 2.00) bind the collection to those and then bind those to the comboboxes.</p>
<p>I enclose a complete example.</p>
<pre><code>using System;
using System.Collections.Generic;
using System.Co... | 2,292 |
<p><a href="https://www.thingiverse.com/thing:4195002" rel="nofollow noreferrer">A part</a> I've printed (on a Monoprice Maker Select V2, sliced with Cura) has a small peg on it, which is an unsupported overhanging section of the model.</p>
<p>The first few layers of the peg end up a mess of PLA spaghetti. Here I've r... | <p>Unsupported parts need to be printed with support. If your supports are too hard to remove, try the Tree Support setting and make sure that your support structure is set up with a gap to the actual print. As we don't know which slier you use, I can't go into more details here.</p>
| <p>You could try printing slower and/or increase cooling ( possibly even a cooler bed temp) if you absolutely want to avoid supports, or just use supports with a support interface and tweak support distance.</p>
| 1,605 |
<p>WebKit/Safari supports the console object, which is similar to what Firebug does. But what exactly is supported? There is a <a href="http://getfirebug.com/wiki/index.php/Console_API" rel="noreferrer">console documentation for Firebug</a>, but where can I find the console documentation for Safari/WebKit?</p>
| <p>Supported methods were originally:</p>
<ul>
<li><code>console.log()</code></li>
<li><code>console.error()</code></li>
<li><code>console.warn()</code></li>
<li><code>console.info()</code></li>
</ul>
<p>Newer versions of WebKit also add the following methods making the WebKit console API almost identical to <a href=... | <p>The Console object appearantly has a built-in 'API', in the form of a 'private property' you can reveal by doing this in the Webkit javascript-console</p>
<pre><code>> for(o in console) console.dir(o)
_commandLineAPI
log
warn
…
</code></pre>
<p>_commandLineAPI:</p>
<pre><code>> console.dir(_... | 7,944 |
<p>I would like to buy a 3D printer, but I'm concerned about the health risks that are associated with its operation. Some groups of scientists say it can be <a href="http://www.techworld.com/news/personal-tech/scientists-warn-of-3d-printing-health-effects-as-tech-hits-high-street-3460992/">harmful</a> for humans.</p>
... | <p>There is very little information about safety available, as home 3D printers are relatively new. However, plastics such as ABS have a long history in making plastic products, and a study found that at traditional manufacturing methods (such as injection molding and hot wire cutting) <a href="http://annhyg.oxfordjour... | <p>Apart from the inherent process itself and direct health hazards from that, many 3D printers also require some complementary technology to work.</p>
<p><a href="/questions/tagged/fdm" class="post-tag" title="show questions tagged 'fdm'" rel="tag">fdm</a> printers have a printing head that needs to move arou... | 83 |
<p>Has anyone got a working solution without some Java/COM-bridge? E.g. process the Email as a file (.msg) rather than locating the data that is referenced in the Clipboard?</p>
| <p>Maybe this is a solution for your problem:
<a href="http://sourceforge.net/projects/javaoutlookdd/" rel="nofollow">http://sourceforge.net/projects/javaoutlookdd/</a>
It allows to handle outlook items like File objects during drag&drop.</p>
| <p>I assume that you've already ruled out the tools in "org.eclipse.swt.dnd" for some reason? There are some examples <a href="http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/Clipboard.htm" rel="nofollow noreferrer">here</a> on how to go about using them, in case you haven't. If what you really want to do is drag&a... | 4,281 |
<p>I've generated some JSON and I'm trying to pull it into an object in JavaScript. I keep getting errors. Here's what I have:</p>
<pre><code>var data = '{"count" : 1, "stack" : "sometext\n\n"}';
var dataObj = eval('('+data+')');
</code></pre>
<p>This gives me an error: </p>
<pre><code>unterminated string literal
</... | <p>This is what you want:</p>
<pre><code>var data = '{"count" : 1, "stack" : "sometext\\n\\n"}';
</code></pre>
<p>You need to escape the <code>\</code> in your string (turning it into a double-<code>\</code>), otherwise it will become a newline in the JSON source, not the JSON data.</p>
| <p>I encountered that problem while making a class in PHP 4 to emulate json_encode (available in PHP 5). Here's what I came up with:</p>
<pre><code>class jsonResponse {
var $response;
function jsonResponse() {
$this->response = array('isOK'=>'KO', 'msg'=>'Undefined');
}
fun... | 6,345 |
<p>Effectively I want to give numeric scores to alphabetic grades and sum them. In Excel, putting the <code>LOOKUP</code> function into an array formula works:</p>
<pre><code>{=SUM(LOOKUP(grades, scoringarray))}
</code></pre>
<p>With the <code>VLOOKUP</code> function this does not work (only gets the score for the fi... | <p>I'm afraid I think the answer is no. From the help text on
<a href="http://docs.google.com/support/spreadsheets/bin/answer.py?answer=71291&query=arrayformula&topic=&type=" rel="nofollow noreferrer">http://docs.google.com/support/spreadsheets/bin/answer.py?answer=71291&query=arrayformula&topic=&am... | <p>I know this thread is quite old, but I'd been struggling with this same problem for some time. I finally came across a solution (well, Frankenstiened one together). It's only slightly more elegant, but should be able to work with large data sets without trouble.</p>
<p>The solution uses the following:</p>
<pre><... | 4,744 |
<p>This is not specific to any language, it´s just about best practices. I am using JPA/Hibernate (but it could be any other ORM solution) and I would like to know how do you guys deal with this situation:
Let´s suppose that you have a query returning something that is not represented by any of your domain classes.
Do ... | <p>We have a situation that sounds similar to yours.</p>
<p>We use separate objects for reporting data that spans several domain objects. Our convention is that these will be backed by a view in the database, so we have come to call them view objects. We generally use them for summarising complex data into a flat form... | <p>I typically write a function that performs a query using SQL and then puts the results into either a list or dictionary (in Java, I'd use either an ArrayList or a HashMap).</p>
<p>If I found myself doing this a lot, I'd probably create a new file to hold all of these queries. Otherwise I'd just make them functions... | 7,482 |
<p>In postgis, is the <code>ST_GeomFromText</code> call very expensive? I ask mostly because I have a frequently called query that attempts to find the point that is nearest another point that matches some criteria, and which is also within a certain distance of that other point, and the way I currently wrote it, it's... | <p>Go to about:ubiquity in Firefox. Under the section "subscribed feeds" there should be an option to unsubscribe to command feeds you no longer desire.</p>
<p>Also, if you clear your entire browser history, it will delete all command feeds (this will be fixed by 0.2)</p>
| <p>Check this out:
<a href="http://getsatisfaction.com/mozilla/topics/how_do_you_edit_delete_the_default_ubiquity_commands_verbs" rel="nofollow noreferrer">http://getsatisfaction.com/mozilla/topics/how_do_you_edit_delete_the_default_ubiquity_commands_verbs</a></p>
<p>Also, you can find a utility to reset your ubiquity... | 5,686 |
<p>Let's say I had a program in C# that did something computationally expensive, like encoding a list of WAV files into MP3s. Ordinarily I would encode the files one at a time, but let's say I wanted the program to figure out how many CPU cores I had and spin up an encoding thread on each core. So, when I run the progr... | <p>Don't bother doing that.</p>
<p>Instead use the <a href="http://msdn.microsoft.com/en-us/library/system.threading.threadpool.aspx" rel="noreferrer">Thread Pool</a>. The thread pool is a mechanism (actually a class) of the framework that you can query for a new thread.</p>
<p>When you ask for a new thread it will e... | <p>One of the reasons you should not (as has been said) try to allocated this sort of stuff yourself, is that you just don't have enough information to do it properly, particularly into the future with NUMA, etc. </p>
<p>If you have a thread read-to-run, and there's a core idle, the kernel <em>will</em> run your thr... | 5,226 |
<p>With SVN, I had a single big repository I kept on a server, and checked-out on a few machines. This was a pretty good backup system, and allowed me easily work on any of the machines. I could checkout a specific project, commit and it updated the 'master' project, or I could checkout the entire thing.</p>
<p>Now, I... | <p>I would <strong>strongly</strong> advise against putting unrelated data in a given
Git repository. The overhead of creating new repositories is quite
low, and that is a <em>feature</em> that makes it possible to keep
different lineages completely separate.</p>
<p>Fighting that idea means ending up with unnecessari... | <p>There is another method for having nested git repos, but it doesn't solve the problem you're after. Still, for others who are looking for the solution I was:</p>
<p>In the top level git repo just hide the folder in .gitignore containing the nested git repo. This makes it easy to have two separate (but nested!) gi... | 5,745 |
<p>I'm having trouble with events in Internet Explorer 7.</p>
<p>When I have a form with <strong>two or more</strong> <code>input[type=text]</code> and I press enter, the events occurs in this order:</p>
<ol>
<li>submit button (<code>onClick</code>)</li>
<li>form (<code>onSubmit</code>)</li>
</ol>
<p>Sample code:</p... | <p>The button's onclick should (I think) only fire if the button is actually clicked (or when the focus is on it and the user clicks enter), unless you've added logic to change that.</p>
<p>Is the addition of the extra textbox possibly changing the tab order of your elements (perhaps making the button the default cont... | <p>You might want to include a dummy hidden input element to recreate the situation where you had two input elements... that way, you'll get both of the events fired</p>
<pre><code><FORM onSubmit="{alert('form::onSubmit'); return false;}">
<INPUT TYPE="text">
<input type="hidden" name="dummy">... | 3,071 |
<p>I'm writing my first iPhone app, so I haven't gotten around to figuring out much in the way of debugging.
Essentially my app displays an image and when touched plays a short sound.
When compiling and building the project in XCode, everything builds successfully, but when the app is run in the iPhone simulator, it cr... | <p>(This isn't really iPhone specific - the same thing will happen in regular Cocoa).</p>
<p>NSUnknownKeyException is a common error when using <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/KeyValueCoding.html" rel="nofollow noreferrer">Key-Value Coding</a> to... | <p>It seems you are doing</p>
<pre><code>@interface MyFirstIphoneAppViewController : UIViewController<> {
UIImageView *InitialkramerImage;
}
@property(nonatomic,retain) IBOutlet UIImageView *InitialkramerImage;
</code></pre>
<p>Then after synthesizing that imageview, When you open "MyFirstIphoneAppViewContr... | 6,828 |
<p>I'm stuck on a fix to a legacy Visual C++ 6 app. In the C++ DLL source I have put</p>
<pre><code>extern "C" _declspec(dllexport) char* MyNewVariable = 0;
</code></pre>
<p>which results in MyNewVariable showing up (nicely undecorated) in the export table (as shown by dumpbin /exports blah.dll). However, I can't fig... | <p>you must link against the lib generated after compiling the DLL. In the linker options of the project, you must add the <code>.lib</code> file. And yes, you should also declare the variable as:</p>
<pre><code>extern "C" { declspec(dllimport) char MyNewVariable; }
</code></pre>
| <p>I've never used _declspec(dllimport) when I was programming in Windows. You should be able to simply declare </p>
<pre><code>extern "C" char* MyNewVariable;
</code></pre>
<p>and link to the .libb created when DLL was compiled.</p>
| 8,044 |
<p>I took a look at the "Beginner's Guide to LINQ" post here on StackOverflow (<a href="https://stackoverflow.com/questions/8050/beginners-guide-to-linq">Beginners Guide to LINQ</a>), but had a follow-up question:</p>
<p>We're about to ramp up a new project where nearly all of our database op's will be fairly simple d... | <p>Some advantages of LINQ over sprocs:</p>
<ol>
<li><strong>Type safety</strong>: I think we all understand this.</li>
<li><strong>Abstraction</strong>: This is especially true with <a href="http://msdn.microsoft.com/en-us/library/bb386964.aspx" rel="noreferrer">LINQ-to-Entities</a>. This abstraction also allows the... | <p>Both LINQ and SQL have their places. Both have their disadvantages and advantages.</p>
<p>Sometimes for complex data retrieval you might need stored procs. And sometimes you may want other people to use your stored proc in Sql Server Management Studio.</p>
<p>Linq to Entities is great for fast CRUD development.</p... | 3,535 |
<p>Are there any systems out there where one can check in changes for a website and have that automatically update the website. </p>
<p>The website effetively runs off the latest stable build the whole time without the need to ftp the files to the server.</p>
| <p>I would look into using a <a href="http://svnbook.red-bean.com/en/1.4/svn.ref.reposhooks.post-commit.html" rel="nofollow noreferrer">post-commit hook</a> to update the site when changes are made. This could be something as simple as using "svn export" to export the current state of the repository to the live website... | <p>SVN's post_commit hook is ideal for things like this.</p>
<p><a href="http://amiworks.co.in/talk/ads-automatic-deployment-script/" rel="nofollow noreferrer">ADS (automatic deployment script</a> looks like a solution to this, but I've never tried it - just found it with a few seconds of Googling.</p>
| 9,662 |
<p>Does anyone here use VB.NET and have a strong preference for or against using <code>IsNothing</code> as opposed to <code>Is Nothing</code> (for example, <code>If IsNothing(anObject)</code> or <code>If anObject Is Nothing...</code>)? If so, why?</p>
<p>EDIT: If you think they're both equally acceptable, do you thin... | <p>If you take a look at the MSIL as it's being executed you'll see that it doesn't compile down to the exact same code. When you use IsNothing() it actually makes a call to that method as opposed to just evaluating the expression. </p>
<p>The reason I would tend to lean towards using "Is Nothing" is when I'm negating... | <p>Is Nothing requires an object that has been assigned to the value Nothing. IsNothing() can take any variable that has not been initialized, including of numeric type. This is useful for example when testing if an optional parameter has been passed.</p>
| 2,763 |
<p>I recall seeing that it's possible to "bake" or "anneal" or even "remelt" PLA prints to strengthen them. As I understand it, the main effect is improving layer adhesion, which is the main source of weakness in tension in the original Z-axis direction.</p>
<p>Yes, I can print with a hot... | <p>I've only annealed PEEK personally, but a quick search returns varying recommendations:</p>
<ul>
<li><p><a href="https://all3dp.com/2/annealing-pla-prints-for-strength-easy-ways/" rel="nofollow noreferrer">All3DP</a>
recommends 1 hour at 70 °C.</p>
</li>
<li><p><a href="https://x3d.com.au/blogs/tips-and-tricks/pla-b... | <p>I've only annealed PEEK personally, but a quick search returns varying recommendations:</p>
<ul>
<li><p><a href="https://all3dp.com/2/annealing-pla-prints-for-strength-easy-ways/" rel="nofollow noreferrer">All3DP</a>
recommends 1 hour at 70 °C.</p>
</li>
<li><p><a href="https://x3d.com.au/blogs/tips-and-tricks/pla-b... | 1,988 |
<p>I have a folder in my web server used for the users to upload photos using an ASP page.</p>
<p>Is it safe enough to give IUSR write permissions to the folder? Must I secure something else?
I am afraid of hackers bypassing the ASP page and uploading content directly to the folder.</p>
<p>I'm using ASP classic and I... | <p>also, I would recommend not to let the users upload into a folder that's accessible from the web. Even the best MIME type detection may fail and you absolutely don't want users to upload, say, an executable disguised as a jpeg in a case where your MIME sniffing fails, but the one in IIS works correctly.</p>
<p>In t... | <p>You'll have to grant write permissions, but you can check the file's mime type to ensure an image. You can use FSO as so:</p>
<pre><code>set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("upload.jpg")
'image mime types or image/jpeg or image/gif, so just check to see if "image" is instr
if ... | 4,256 |
<p>How to determine the applications associated with a particular extension (e.g. .JPG) and then determine where the executable to that application is located so that it can be launched via a call to say System.Diagnostics.Process.Start(...).</p>
<p>I already know how to read and write to the registry. It is the layo... | <p>Sample code:</p>
<pre><code>using System;
using Microsoft.Win32;
namespace GetAssociatedApp
{
class Program
{
static void Main(string[] args)
{
const string extPathTemplate = @"HKEY_CLASSES_ROOT\{0}";
const string cmdPathTemplate = @"HKEY_CLASSES_ROOT\{0}\shell\open\... | <p>The file type associations are stored in the Windows registry, so you should be able to use the <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx#Mtps_DropDownFilterText" rel="nofollow noreferrer">Microsoft.Win32.Registry class</a> to read which application is registered for which file f... | 4,459 |
<p>I´ve tried tunning printer settings with different Nozzle(190-210 ºC)/ Bed(0-60 ºC) Temperatures, Fan Speeds (0-100 %), Cura and Slicer adjustemens but nothing worked. I still get the same bubbles in the first 3 mm of every print.
I also tried a glass bed and the magnetic bed that comes with End... | <p>It seems like your bed might be too close to the nozzle, hence the large elephants foot (bulge on the first layer). You can try using babystep Z to increase the distance between the nozzle and the bed and see how that works out. I think you might need to reduce the flow multiplier (extrusion multiplier) a little too... | <p>It seems like your bed might be too close to the nozzle, hence the large elephants foot (bulge on the first layer). You can try using babystep Z to increase the distance between the nozzle and the bed and see how that works out. I think you might need to reduce the flow multiplier (extrusion multiplier) a little too... | 1,637 |
<p>It's big problem to convert mod_rewrite rules to lighttpd format</p>
| <p>It is generally a case of just going through one by one and converting them. I don't know of any automated means,</p>
<p>The docs - <a href="http://redmine.lighttpd.net/projects/1/wiki/Docs:ModRewrite" rel="nofollow noreferrer">http://redmine.lighttpd.net/projects/1/wiki/Docs:ModRewrite</a> - has the regexes avail... | <p>url rewriting does not work within a $HTTP["url"] conditional. [<a href="http://forum.lighttpd.net/topic/1092#3028]" rel="nofollow noreferrer">http://forum.lighttpd.net/topic/1092#3028]</a></p>
| 8,777 |
<p>I have an asp.net web page written in C#.<br>
Using some javascript I popup another .aspx page which has a few controls that are filled in and from which I create a small snippet of text.<br>
When the user clicks OK on that dialog box I want to insert that piece of text into a textbox on the page that initial "poppe... | <p>You will have to do something like:</p>
<pre><code>parent.opener.document.getElemenyById('ParentTextBox').value = "New Text";
</code></pre>
| <p>What you could do is create an ajax modal pop-up instead of a new window. The semantic and aesthetic value is greater not to mention the data-passing is much easier.</p>
<p><a href="http://www.asp.net/ajax/ajaxcontroltoolkit/samples/modalpopup/modalpopup.aspx" rel="nofollow noreferrer">http://www.asp.net/ajax/ajax... | 7,892 |
<p>I have the following HTML (note the CSS making the background black and text white)</p>
<pre><code><html>
<select id="opts" style="background-color: black; color: white;">
<option>first</option>
<option>second</option>
</select>
</html>
</code></pre>
<p>... | <p>Must be a <code>Vista</code> problem. I have <code>XP SP 2</code> and it looks normal. </p>
| <blockquote>
<p>I dropped that code into a file and pushed it to ff3 and I don't see what you see...the arrow is default color with gray background and black arrow.</p>
<p>Are you styling scrollbars too?</p>
</blockquote>
<p>I've updated the post, the HTML in there is now literally <em>all</em> the html that is being l... | 4,891 |
<p>I need to use XmlRpc in C++ on a Windows platform. Despite the fact that my friends assure me that XmlRpc is a "widely available standard technology", there are not many libraries available for it. In fact I only found one library to do this on Windows, (plus another one that claims "you'll have to do a lot of wor... | <p>I've written my own C++ library. It's available at sourceforge:
<a href="http://sourceforge.net/projects/xmlrpcc4win/" rel="noreferrer">xmlrpcc4win</a></p>
<p>The reason I wrote it rather than using Chris Morley's was that:</p>
<ul>
<li>The Windows "wininet.lib" library gives you all the functionality for handlin... | <p>There are dozens of implementations of the XML-RPC <a href="http://www.xmlrpc.com/directory/1568/implementations" rel="nofollow noreferrer">implementations</a>, some in C++, but most in other languages. For example, besides XmlRpc++ there is also <a href="http://xmlrpc-c.sourceforge.net/" rel="nofollow noreferrer">X... | 9,364 |
<p>This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.</p>
<p>I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When ... | <p>I started writing up a summary of my experience with my own code generator, then went back and re-read your question and found you had already touched upon the same issues yourself, focus on the execution results instead of the code layout/look.</p>
<p>Problem is, this is hard to test, the generated code might not ... | <p>Yes, results are the ONLY thing that matters. The real chore is writing a framework that allows your generated code to run independently... spend your time there.</p>
| 3,225 |
<p>Why should I or shouldn't I use dirty reads:</p>
<pre><code>set transaction isolation level read uncommitted
</code></pre>
<p>in SQL Server?</p>
| <p>From <a href="http://msdn.microsoft.com/en-us/library/aa259216(SQL.80).aspx" rel="noreferrer">MSDN</a>:</p>
<blockquote>
<p>When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transactio... | <p>The Thing is when you want to read the data before committing, we can do with the help of set transaction isolation level read uncommitted, the data may, or may not change.</p>
<p>We can read the data by using the query:</p>
<pre><code>Select * from table_name with(nolock)
</code></pre>
<p>This is applicable to ... | 4,119 |
<p>I have a Microsoft keyboard with a series of non-standard buttons such as "Mail", "Search" , "Web/Home" etc.</p>
<p>It would be nice to be able to bind these keys so they execute arbitrary programs.</p>
<p>Does anybody know how to do this in Debian Etch?</p>
| <p>I can't say for certain because I'm not using Debian but if you're using Gnome the easiest way is to run gnome-keybinding-properties (System > Preferences > Keyboard Shortcuts)</p>
<p>Instead of typing a shortcut such as <kbd>Ctrl</kbd>+<kbd>M</kbd>, hit the button on your keyboard.</p>
<p>If you would prefer to d... | <p>I used Gizmo Daemon for my PowerMate under Debian - it supports fancy keyboard keys as well (although I haven't tried it for those keys). Hacking on gizmod to get it to do what I wanted was pretty easy.</p>
<p><a href="http://gizmod.sourceforge.net/" rel="nofollow noreferrer">Gizmo Daemon</a></p>
| 2,851 |
<p>I’ve writen a little python script that just pops up a message box containing the text passed on the command line. I want to pop it up only when the window —resulting from a previous call— is not open.</p>
<pre><code>from Tkinter import *
import tkMessageBox
root = Tk()
root.withdraw()
# TODO not if a window wit... | <p>I believe you want:</p>
<pre><code>if 'normal' != root.state():
tkMessageBox.showinfo("Key you!", " ".join(sys.argv[1:]))
</code></pre>
| <p>The previous answer works accordingly to the code you have provided. You say it does not work because the answerer complies with "sois bête et discipliné" rule in that he did not add <code>root.mainloop()</code> to his code since your question does not either.</p>
<p>By adding the later line, for some reason caused... | 6,745 |
<p>I'd like to rollback a change I made recently in TFS. In Subversion, this was pretty straightforward. However, it seems to be an incredible headache in TFS:</p>
<h3>Option 1: Get Prior Version</h3>
<ol>
<li>Manually get prior version of each file</li>
<li>Check out for edit</li>
<li>Fail - the checkout (in VS2008) ... | <ol>
<li>Download and install <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=15836" rel="noreferrer">Team Foundation Power Tools</a>. </li>
<li>Open up the Visual Studio command prompt</li>
<li>Navigate to the directory on the file system that TFS is mapped to. If you don't do this you... | <p>The solution above is for TFS2008. TFS2010 has built-in rollback feature. see <a href="http://www.edsquared.com/2010/02/02/Rollback+Or+Undo+A+Changeset+In+TFS+2010+Version+Control.aspx" rel="nofollow">this</a> article for details.</p>
| 5,256 |
<p>I have a cheap cartesian printer with the usual arrangement - X axis with three linear bearings, build plate moving as Y axis on three linear bearings as well, Z axis with lead screws. After about 2 kg of filament printed, I can see that one of the linear bearings (the single bearing on one side of the Y axis) is le... | <p>After completion of the print job, I was able to perform a closer inspection. The black goo contains metallic particles, and the rail the bearings are riding on has a visible groove - which means replacing both the bearings and the rail.</p>
| <p>Your new oil butted out the old graphite lubricant. </p>
<p>Don't know about the metal particles though, might be dust, or your new oil caused damage to the bearings and/or rails.</p>
| 520 |
<p>I'm programming WCF using the ChannelFactory which expects a type in order to call the CreateChannel method. For example: </p>
<pre><code>IProxy proxy = ChannelFactory<IProxy>.CreateChannel(...);
</code></pre>
<p>In my case I'm doing routing so I don't know what type my channel factory will be using. I can p... | <p>What you are looking for is MakeGenericType</p>
<pre><code>string elementTypeName = Console.ReadLine();
Type elementType = Type.GetType(elementTypeName);
Type[] types = new Type[] { elementType };
Type listType = typeof(List<>);
Type genericType = listType.MakeGenericType(types);
IProxy proxy = (IProxy)Acti... | <p>Here's a question: Do you <i>really</i> need to create a channel with the exact contract type in your specific case?</p>
<p>Since you're doing routing, there's a very good chance you could simply deal with the generic channel shapes. For example, if you're routing a one-way only message, then you could create a cha... | 9,293 |
<p>We have a web application that uses SQL Server 2008 as the database. Our users are able to do full-text searches on particular columns in the database. SQL Server's full-text functionality does not seem to provide support for hit highlighting. Do we need to build this ourselves or is there perhaps some library or kn... | <p>Expanding on Ishmael's idea, it's not the final solution, but I think it's a good way to start. </p>
<p>Firstly we need to get the list of words that have been retrieved with the full-text engine: </p>
<pre><code>declare @SearchPattern nvarchar(1000) = 'FORMSOF (INFLECTIONAL, " ' + @SearchString + ' ")'
declare ... | <p>You might be missing the point of the database in this instance. Its job is to return the data to you that satisfies the conditions you gave it. I think you will want to implement the highlighting probably using regex in your web control.</p>
<p>Here is something a quick search would reveal.</p>
<p><a href="http... | 9,454 |
<p>I use an Ender 3, with cheap Amazon "Eryone PLA", which states a range from 190-220 °C, 1.75 mm dia. I have had this for about a year.</p>
<p>I use the rough build plate, not the glass. I have tried my best to level the bed but I am an amateur</p>
<p>I was originally getting poor adhesion so I cleane... | <p>This is clearly overextrusion relative to the volume the material is being deposited into, but that doesn't necessarily mean your extrusion rate is wrong. It could be:</p>
<ul>
<li>Nozzle smashed down into the bed (bed way too high) but somehow still extruding</li>
<li>Problem in Z axis movement preventing the head... | <p>Bad filament is my answer. I bought PRLine and both print terrible like your picture. Suspect 2 factors, one is that the line is less than 1.75, so they underextrude and so you see those lines and in some cases gaps, second is the material itself is slippery suggesting to me that it has florinated additives.</p>
| 1,621 |
<p>Can anyone recommend a good binary XML format? It's for a JavaME application, so it needs to be a) Easy to implement on the server, and b) Easy to write a low-footprint parser for on a low-end JavaME client device.</p>
<p>And it goes without saying that it needs to be smaller than XML, and faster to parse.</p>
<hr... | <p>You might want to take a look at <a href="http://en.wikipedia.org/wiki/WBXML" rel="noreferrer">wbxml</a> (Wireless Binary XML) it is optimized for size, and often used on mobile phones, but it is not optimized for parsing speed.</p>
| <p>It very much depends on the target device. If you have JSR172 available, then you are done with the parsing, the runtime does it for you. And XML is mainly about making your own format. As was alredy stated if your goal is performance, than XML is probably not the best way to go and you will end up doing some binary... | 3,003 |
<p>What is the SQL query to select all of the MSSQL Server's logins?</p>
<p>Thank you. More than one of you had the answer I was looking for:</p>
<pre><code>SELECT * FROM syslogins
</code></pre>
| <p>Is this what you're after?</p>
<pre><code>select * from master.syslogins
</code></pre>
| <p>Have a look in the syslogins or sysusers tables in the master schema. Not sure if this still still around in more recent MSSQL versions though. In MSSQL 2005 there are views called sys.syslogins and sys.sysusers.</p>
| 5,793 |
<p>I'm trying to pick up ruby by porting a medium-sized (non-OO) perl program. One of my personal idioms is to set options like this:</p>
<pre><code>use Getopt::Std;
our $opt_v; # be verbose
getopts('v');
# and later ...
$opt_v && print "something interesting\n";
</code></pre>
<p>In perl, I kind of grit my t... | <p>A while back I ran across <a href="http://blog.toddwerth.com/entries/5" rel="nofollow noreferrer">this blog post</a> (by Todd Werth) which presented a rather lengthy skeleton for command-line scripts in Ruby. His skeleton uses a hybrid approach in which the application code is encapsulated in an application class wh... | <p>The <a href="http://www.rubyinside.com/trollop-command-line-option-parser-for-ruby-944.html" rel="nofollow noreferrer">first hit</a> on google for "<a href="http://www.google.com/search?q=processing%20command%20line%20options%20in%20ruby&sourceid=mozilla2&ie=utf-8&oe=utf-8" rel="nofollow noreferrer">proc... | 5,965 |
<p>If I am 3D printing on my Ender 3, and I pause the print, the extruder lets out more filament for like 2 seconds. This leaves a glob of dry filament on my print, which the could contact the nozzle tip, causing it to slide the build platform.</p>
<p>I have fixed the build platform sliding problem by attaching the inc... | <p>They're caused by filament being pulled during travel so they qualify as stringing.</p>
<p>You need to look at your retraction and heat, speed as well makes a difference. You can try combing and other things or just pull them off.</p>
| <p>You should provide a better picture, i.e. a finished print.</p>
<p>Stringing is generally something you don't worry about - adjust your retraction settings a tiny bit to retract more.
I didn't see what software you used, that will help with where the settings are.</p>
<p>Also the plate is very different from the res... | 2,217 |
<p>I am looking for attributes I can use to ensure the best runtime performance for my .Net application by giving hints to the loader, JIT compiler or ngen.</p>
<p>For example we have <a href="http://msdn.microsoft.com/en-us/library/k2wxda47.aspx" rel="noreferrer">DebuggableAttribute</a> which should be set to not deb... | <p>Ecma-335 specifies some more CompilationRelaxations for relaxed exception handling (so-called e-relaxed calls) in Annex F "Imprecise faults", but they have not been exposed by Microsoft.</p>
<p>Specifically CompilationRelaxations.RelaxedArrayExceptions and CompilationRelaxations.RelaxedNullReferenceException are me... | <p>I found another: <a href="http://msdn.microsoft.com/en-us/library/system.resources.neutralresourceslanguageattribute.aspx" rel="nofollow noreferrer">NeutralResourcesLanguageAttribute</a>. According to <a href="http://blogs.msdn.com/bclteam/archive/2005/10/11/479330.aspx" rel="nofollow noreferrer">this</a> blog post ... | 9,555 |
<p>My license for Whole Tomatoes Visual AssistX is about to expire and I'm not really planning on renewing it. I use it for spell checking but that's about it. The refactoring abilities have been a little disappointing. Before I just jump into Resharper though what are your thoughts on other possible plugins?</p>
| <p>The other major player would be DevExpress and their CodeRush and Refactor products. <a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/Refactoring/" rel="nofollow noreferrer">Found here.</a></p>
| <p><a href="http://mztools.com/index.aspx" rel="nofollow noreferrer">MZ-Tools</a> is really good as well.</p>
| 3,262 |
<p>I've recently initialized OctoPi onto my Raspberry Pi, proceeded to connect it to my local internet, and then connected it to my FlashForge Creator Pro (2014 edition)</p>
<p>Everything seemed to be going smoothly until I tried to connect to the printer; the Pi didn't seem to be able to pick up a usable Baudrate (aft... | <p>I got the same problem.<br>
Auto-detect baud rate was not working too.<br>
So I manually tried every baud-rate and finally found one working, for me it was 115200.<br>
Good luck!</p>
| <p>Install GPX via command line. To do this, type</p>
<p><code>/home/pi/oprint/bin/pip install "https://markwal.github.io/octoprint-download/OctoPrint-GPX.tgz"</code>
then go ahead and restart octoprint and try connecting again.</p>
| 522 |
<p>I'm struggling with my new printer, and I just want to make sure that I have the basic configured correctly. </p>
<p>What motherboard ID in <a href="https://github.com/MarlinFirmware/Marlin/blob/1.1.x/Marlin/Configuration.h" rel="nofollow noreferrer"><code>configuration.h</code></a> is appropriate for MKS BASE V1.5... | <p>Marlin appears to support older versions of the board (and possibly this one) according to this line </p>
<pre><code>#define BOARD_MKS_13 47 // MKS v1.3 or 1.4 (maybe higher)
</code></pre>
<p>in <code>boards.h</code> which can be found <a href="https://github.com/MarlinFirmware/Marlin/blob/RC/Marlin/b... | <p>A more recent version of Marlin Firmware (<em>version 1.1.9 is the last release of this branch, new developments are done in the 2.x branch</em>) nowadays has a separate board constant for the MKS BASE v1.5 board (<code>BOARD_MKS_BASE_15</code>) as can be found in <a href="https://github.com/MarlinFirmware/Marlin/bl... | 583 |
<p>Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)?</p>
<p>Can it be done with Visio alone or do I need a plugin?</p>
<p>What about other diagrams?</p>
| <p>You have to get the Visio that for users of Visual Studio. See this link: <a href="http://msdn.microsoft.com/en-us/library/ms182014.aspx" rel="nofollow noreferrer">Visio for Enterprise Architects</a> for more details. The code generation capabilities are fairly weak and you might end up getting Visio into an incon... | <p>To the best of my knowledge, Visio can only forward-engineer code from class models. </p>
<p>As sequence diagrams only really show paths of communication between objects, I suspect that they do not contain the necessary information, except perhaps in trivial cases, for generating code. </p>
<p>Objects with any so... | 4,582 |
<p>So the ADO.NET Entity Framework has gotten a little bit of bad press (in the form of blog entries and a petition) but I don't want to rush to judgement. I'm limited in time for experimentation but I was wondering has anyone worked with it yet with more empirical feedback? </p>
<p>Finally, what are thoughts on using... | <p>NHibernate may be more mature. That does not necessarily mean it is a "better" solution. Having used it at my job for some time, I would personally prefer to use almost anything than NHibernate (even straight SQL, if migration were remotely feasible). The number of error messages thrown by NHibernate that don't mean... | <p>I do have a problem with SubSonic. SubSonic choked to death on tables with same name but different schema. I don't want to discuss the best practices of building a database, because I did not make the call to do so.( When it comes to raise voice make a point and keep the job, I'd rather keep my job. :) )</p>
| 3,875 |
<p>I have a VB.net test application that clicks a link that opens the Microsoft Word application window and displays the document. How do I locate the Word application window so that I can grab some text from it?</p>
| <p>This method has several limitations, but I still find it very useful. I'll list the limitations (I know of) up front and let whoever wants to use it do so at their own risk.</p>
<ol>
<li>The original version I posted over-reported time spent in recursive calls (as pointed out in the comments to the answer).</li>
<l... | <p>The article <em>Code profiler and optimizations</em> has lots of information about C++ code profiling and also has a free download link to a program/class that will show you a graphic presentation for different code paths/methods.</p>
| 8,646 |
<p>Is it possible to create "federated" Subversion servers?
As in one server at location A and another at location B that sync up their local versions of the repository automatically. That way when someone at either location interacts with the repository they are accessing their respective local server and therefore h... | <p>This is more or less the perfect use case for <a href="http://svk.bestpractical.com/view/HomePage" rel="nofollow noreferrer">SVK</a>. SVK is a command line front end for subversion that works with an entire local copy of the repository. So your commits, updates, etc. work on the local repository and you can then s... | <p>Its probably not exactly what your looking for, but you may be able to implement OS level clustering.</p>
| 2,408 |
<p>What's the cleanest, most effective way to validate decimal numbers in JavaScript?</p>
<p>Bonus points for:</p>
<ol>
<li>Clarity. Solution should be clean and simple.</li>
<li>Cross-platform.</li>
</ol>
<p>Test cases:</p>
<pre><code>01. IsNumeric('-1') => true
02. IsNumeric('-1.5') => true
03. IsNu... | <p><a href="https://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric/174921#174921">@Joel's answer</a> is pretty close, but it will fail in the following cases:</p>
<pre><code>// Whitespace strings:
IsNumeric(' ') == true;
IsNumeric('\t\t') == true;
IsNumeric('\n\r') == true;
// Number li... | <p>The following may work as well.</p>
<pre><code>function isNumeric(v) {
return v.length > 0 && !isNaN(v) && v.search(/[A-Z]|[#]/ig) == -1;
};
</code></pre>
| 3,870 |
<p>The need arose, in our product, to determine how long the current user has been logged on to Windows (specifically, Vista). It seems there is no straight forward API function for this and I couldn't find anything relevant with WMI (although I'm no expert with WMI, so I might have missed something).</p>
<p>Any ideas... | <p>For people not familiar with WMI (like me), here are some links:</p>
<ul>
<li>MSDN page on using WMI from various languages: <a href="http://msdn.microsoft.com/en-us/library/aa393964(VS.85).aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/aa393964(VS.85).aspx</a></li>
<li>reference about Win3... | <p>Using WMI, the Win32Session is a great start. As well, it should be pointed out that if you're on a network you can use Win32_NetworkLoginProfile to get all sorts of info.</p>
<pre><code>Set logins = objWMIService.ExecQuery _
("select * from Win32_NetworkLoginProfile")
For Each objSession in logins
Wscript.Ec... | 3,451 |
<p>I am looking for the temperature rating for hardboard. I want to use that as the base for my printer enclosure. </p>
<p>It has proven incredible hard get a ball-park figure from Google. </p>
<p>So, what is the maximum safe temperature for a hardboard panel at long term? (considering a print job can easily take 6 h... | <p>Hardboard is called <em>Masonite</em> here in the States because that is the trade name of the product. If you look up the <a href="http://www.gunnersens.co.nz/images/stories/products/Masonite%20Standard/specs/Australian_Hardboards_Masonite_MSDS.pdf" rel="noreferrer">Material Safety Data Sheet</a> you will see Mason... | <p>Masonite or hardboard is a high-density board without a resin. It is <a href="https://www.chromaluxe.com/wp-content/uploads/SDS-Hardboard-Universal-Woods.pdf" rel="nofollow noreferrer">listed</a> at around 200 to 275 °C for its autoignition temperature. Just for comparison, let's look at similar products.</p>
<p>Med... | 1,239 |
<p>We've been having some issues with a SharePoint instance in a test
environment. Thankfully this is not production ;) The problems started
when the disk with the SQL Server databases and search index ran out
of space. Following this, the search service would not run and search
settings in the SSP were not accessible.... | <p>As Daniel McPherson said, this is caused when SSPs are deleted but the associated
job are not and attempt to communicate with the deleted database.<br><br>If the SSP
database has been deleted or a problem occurred when deleting an SSP, the job may
not be deleted. When the job attempts to run, it will fail since t... | <p>Have you tried removing the SSP using the command line? I found this worked once when we had a broken an SSP and just wanted to get rid of it.</p>
<p>The command is:</p>
<pre><code>stsadm.exe -o deletessp -title <sspname> [-deletedatabases]
</code></pre>
<p>The <code>deletedatbases</code> switch is optional... | 2,675 |
<p>I am using .Net 2 and the normal way to store my settings. I store my custom object serialized to xml. I am trying to retrieve the default value of the property (but without reseting other properties). I use:</p>
<pre><code>ValuationInput valuationInput = (ValuationInput) Settings.Default.Properties["ValuationInput... | <p>BEX=Buffer overflow exception. See <a href="http://technet.microsoft.com/en-us/library/cc738483.aspx" rel="nofollow noreferrer">http://technet.microsoft.com/en-us/library/cc738483.aspx</a> for details. However, c000000d is STATUS_INVALID_PARAMETER; the technet article talks primarily about status c0000005 or c000040... | <p>Most likely there is an addon that is messing with IE.</p>
<p>You can try this.
1. Open IE
2. Switch to the Advanced tab.
3. Click the Reset Internet Explorer Settings button.
4. Click Reset to confirm the operation.
5. Click Close when the resetting process finished.
6. Uncheck Enable... | 7,492 |
<p>I'm planning to make an LCD Resin printer. I'm still learning and I found out that I need daylight resin (which hardens when white light comes from the LCD).</p>
<p>If I search for "Daylight resin" on Google, the only "useful" result I find is for <a href="https://photocentric3d.com/daylightresins/?v=9b6a28c805e0" ... | <p>It looks like <a href="https://store.ono3d.net/" rel="nofollow noreferrer">Ono</a> may fit what you are looking for.
They have several colors listed on their site.</p>
<p>Red <a href="https://i.stack.imgur.com/Em8Uu.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Em8Uu.jpg" alt="enter image des... | <p>ONO, as mentioned previously. But I do believe that resin will be rather expensive. Along the lines of $15 per 100ml. Since their resin sales are geared towards their printer (small, resin based printer that uses your smart phone as the light source) they sell smaller portions, as their printer can't hold all that m... | 658 |
<p>What's the easiest way to do an "instring" type function with a regex? For example, how could I reject a whole string because of the presence of a single character such as <code>:</code>? For example: </p>
<ul>
<li><code>this</code> - okay</li>
<li><code>there:is</code> - not okay because of <code>:</code></li>
</u... | <p>I'm still not sure whether you just wanted to detect if the Xpath contains a namespace, or whether you want to remove the references to the namespace. So here's some sample code (in C#) that does both.</p>
<pre><code>class Program
{
static void Main(string[] args)
{
string withNamespace = @"//foo/ns... | <p>I dont know regex syntax very well but could you not do:</p>
<p><code>[any alpha numeric]\*:[any alphanumeric]\*</code></p>
<p>I think something like that should work no?</p>
| 3,140 |
<p>Currently, I'm attempting to make multiple beziers have equidistant points. I'm currently using cubic interpolation to find the points, but because the way beziers work some areas are more dense than others and proving gross for texture mapping because of the variable distance. <strong>Is there a way to find point... | <p>distance between P_0 and P_3 (in cubic form), yes, but I think you knew that, is straight forward.</p>
<p>Distance on a curve is just arc length:</p>
<p><a href="http://www.codecogs.com/eq.latex?%5Cint_%7Bt_0%7D%5E%7Bt_1%7D%20%7B%20|P'(t)|%20dt" rel="nofollow noreferrer">fig 1 http://www.codecogs.com/eq.latex?... | <p>I know this is an old question but I recently ran into this problem and created a <code>UIBezierPath</code> extention to solve for an <code>X</code> coordinate given a <code>Y</code> coordinate and vise versa. Written in swift. </p>
<p><a href="https://github.com/rkotzy/RKBezierMath" rel="nofollow">https://github.c... | 3,166 |
<p>My FDM printer bed moves on the Y-axis and the print head moves on the X-axis and raises on the Z-axis. When printing rectangular objects (a model of Notre Dame in this case), are there print detail quality advantages to aligning the model perpendicular to the X or Y axis, or at 45 degrees? Part strength is not an i... | <p>In short: Not really.</p>
<p>longer version: It depends.</p>
<p>The main culprit of losing details in this case would be the weight and speed of the thing moving. So if you have a heavy X-axis carriage, acceleration and decelerating the carriage won't be instant. Same with the bed (Y-axis).</p>
<p>Another culprit... | <p>I'm under the impression that your question hints on rectilinear motion by aligning the print part to the axes motion of the printer. So, placing it under 45° would suggest movement of both steppers to make a straight line opposed to one stepper movement for a straight line.</p>
<p>Basically, the weight of the ... | 1,301 |
<p>I thought I have already had and fixed every problem one could possibly have with a 3D printer. Guess I was wrong.</p>
<p>I haven't used my Creality CR-10 for a few weeks, everything was working the last time I tried. Today I wanted to print something minor and the printer just randomly paused a few times in the mi... | <p><strong>Edit: The z-hop problem has been fixed in Cura 4.2.</strong></p>
<hr>
<p>This is a known issue with Cura 4.1 when z-hop is enabled.</p>
<p>If you touch the z-axis motor frame while it is apparently stationary, you may feel it is actually moving.</p>
<p>The solution is to set a value (I used something lik... | <p>I experienced the same with 4.1. Everything went back to normal after going back to 4.0 despite that all settings were identical as far as I could see. I compared the two g-code files using a simple file comparison tool. They were very different, hardly anything was the same. I still need to figure out what they mea... | 1,351 |
<p>I am printing ABS in an enclosure and most of the prints have worked out well with minor tweaking. However, the top layer always seems to split or skip a step (not sure which).</p>
<p><a href="https://i.stack.imgur.com/ZtGE7.jpg" rel="nofollow noreferrer" title="Split top layer"><img src="https://i.stack.imgur.com/Z... | <p>Since it happens in the same place each time, it's either G-code or mechanical. I've seen things like this happen with dirty gantries, or a dirty Z-axis guide.</p>
<p>If it's not mechanical, there may be something in the G-code that causes it, such as too many retractions in one area, or similar.</p>
| <p>Personally, I have dealt with this problem myself! I messed around with the slicer a little bit, and I found that if you make the print layer height 0.15 or 0.10 mm, it will be better. The image you attached looks as though the printer was splitting a step and only printing that part. I can't think of a reason why i... | 1,499 |
<p>In C#, if I need to open an HTTP connection, download XML and get one value from the result, how would I do that?</p>
<p>For consistency, imagine the webservice is at www.webservice.com and that if you pass it the POST argument fXML=1 it gives you back </p>
<pre><code><xml><somekey>somevalue</someke... | <p>I use this code and it works great:</p>
<pre><code>System.Xml.XmlDocument xd = new System.Xml.XmlDocument;
xd.Load("http://www.webservice.com/webservice?fXML=1");
string xPath = "/xml/somekey";
// this node's inner text contains "somevalue"
return xd.SelectSingleNode(xPath).InnerText;
</code></pre>
<hr>
<p>EDIT: ... | <p>It may also be worth adding that if you need to specifically use POST rather than SOAP then you can configure the web service to receive POST calls:</p>
<p>Check out the page on MSDN:
<a href="http://msdn.microsoft.com/en-us/library/aa719747(VS.71).aspx" rel="nofollow noreferrer">Configuration Options for XML Web S... | 7,405 |
<p>Is there a reliable way to detect whether or not WinHelp is installed on Windows Vista or newer versions of Windows? If possible, I'd like a solution that's not specific to any particular version of Windows.</p>
<p>I've posted this question to other message boards and got back answers regarding the size of Winhlp32... | <p>The download for WinHelp from Microsoft appears to be a hotfix (.msu) that enables the WinHelp program. This would explain why the size/registry keys don't change as the hotfix is just a "delta" change from the orginal file. </p>
<p>Since it's a hotfix, this means that you should be able to query the installed ho... | <p>I hate to say it, but move on from WinHelp. It's been deprecated for a reason. We were able to migrate to a .chm in only a few hours. It's pretty straight-forward to use the newer help authoring tools, and newer formats like .chm give you benefits like cascading style sheets. </p>
| 9,114 |
<p>I'm having issues with my SQL Reporting Services reports. I'm using a custom font for report headers, and when deployed to the server it does not render correctly when I print or export to PDF/TIFF. I have installed the font on the server. Is there anything else I need to do in order to use custom fonts?</p>
<p>Whe... | <p>The PDF files served up from SSRS, like many PDF files, have embedded postscript fonts. So, the local fonts used in the report are converted to a best matching postscript font when the conversion takes place so the PDF is totally portable without relying on locally installed fonts. </p>
<p>You can see the official ... | <p>We had to install NeoDynamic barcode software to render the barcode as an image since we can't include the barcode fonts in PDF exports.</p>
| 3,988 |
<p>The web applications I develop often require co-dependent configuration settings and there are also settings that have to change as we move between each of our environments.</p>
<p>All our settings are currently simple key-value pairs but it would be useful to create custom config sections so that it is obvious when... | <p><strong>Using attributes, child config sections and constraints</strong></p>
<p>There is also the possibility to use attributes which automatically takes care of the plumbing, as well as providing the ability to easily add constraints.</p>
<p>I here present an example from code I use myself in one of my sites. Wit... | <p>You can accomplish this with Section Handlers. There is a basic overview of how to write one at <a href="http://www.codeproject.com/KB/aspnet/ConfigSections.aspx" rel="nofollow noreferrer">http://www.codeproject.com/KB/aspnet/ConfigSections.aspx</a> however it refers to app.config which would be pretty much the same... | 2,435 |
<p>I've inherited a .NET application that automatically updates it's version number with each release. The problem, as I see it, is the length and number of digits in the version number.</p>
<p>An example of the current version number format is <code>3.5.3167.26981</code> which is a mouthful for the users to say when ... | <p>In one of the project files, probably AssemblyInfo.cs, the assembly version attribute is set to <code>[assembly: AssemblyVersion("3.5.*")]</code> or something similar. The * basically means it lets Visual Studio automatically set the build and revision number. </p>
<p>You can change this to a hard coded value in th... | <p>At a previous company we did something like this by writing an Ant task to get the current Subversion changeset string, which we used as the build number, appended after the major, minor, and tertiary numbers. You could do something like this with Visual Studio as well.</p>
| 6,206 |
<p>I'm writing this question here hoping someone will be able to help me with the fixing process that I'm currently involved in!</p>
<p>Last week during a printing session my Ultimaker original unexpectedly stop working. The problem was on the extruder step motor which push the filament from the back and literally is ... | <p>I'm not sure I know exactly what is wrong or what steps you've taken so far, but it seems like your extruder motor is broken and you've narrowed the problem down to electronics.
<br>
If so, replacing the Arduino, motor, and driver leaves only the Ultimaker PCB as the source of the problem. I would suggest ordering a... | <p>Your title says "x-axis" but your description leads me to think that your extruder is the part that's not working. Here are some tips which may (or may not) help...</p>
<ul>
<li>Make sure your extruder is not clogged.</li>
<li>Make sure your temperature setting is high enough to allow the filament to melt quickly ... | 379 |
<p>I wanted to build a 4-wheel ground robot vehicle with a payload of 25 kg for outdoor use, but I wanted to make the frame/chassis using a 3D printer. The outside temperature ranges between 30 °C-35 °C and the humidity is 70-90%. I think the vehicle would be outside for 4 hours at a time. The dimensions of the vehicle... | <p>The application doesn't look to be demanding at all from a material point of view. Operation below 40 °C and 70-90% RH is not that special.</p>
<p>Once taken out PLA for creep, most rigid filaments would work. Nylon deform under constant stress, so screws may get loose over time.</p>
<p>PETG, ABS, ABS+ (TitanX/niceA... | <p>My first choice for this would be PET. Not PETG, which is a mess of blobbing, stringing, warping, creep under load, etc., but real PET, also known as BPET (bottle PET) or HTPET (high temperature PET, because it needs high temperatures to print and has high HDT)</p>
<p>Unlike ASA, PC, and nylon, PET is easy to print.... | 2,195 |
<p>What's the simplest way of blocking a thread until a file has been unlocked and is accessible for reading and renaming? For example, is there a WaitOnFile() somewhere in the .NET Framework?</p>
<p>I have a service that uses a FileSystemWatcher to look for files that are to be transmitted to an FTP site, but the <em... | <p>This was the answer I gave on a <a href="https://stackoverflow.com/questions/41290/file-access-strategy-in-a-multi-threaded-environment-web-app#41559">related question</a>:</p>
<pre><code> /// <summary>
/// Blocks until the file is not locked any more.
/// </summary>
/// <param name="f... | <p>I do it the same way as Gulzar, just keep trying with a loop.</p>
<p>In fact I don't even bother with the file system watcher. Polling a network drive for new files once a minute is cheap.</p>
| 7,350 |
<p>Is it correct to link a static library (.lib) compiled with VS 2005 with a program which is compiled with VS 2008? Both library and my program are written in C++. This program is run on Windows Mobile 6 Professional emulator.</p>
<p>This seems to work, there are no linking errors. However the program crashes during... | <p>VS2005 and VS2008 use different STL implementations. When the VS2005 code returns a vector, the object has memory layout different from what VS2008 expects. That should be the reason for the broken values you see in the returned date.</p>
<p>As a rule of thumb, you should always compile all C++ modules of a project... | <p><strong>Addition:</strong> As <a href="https://stackoverflow.com/a/49423/4792058">Timbo has pointed out</a>, VS 2005 and VS 2008 use different STL implementations. However, you can use VS 2008 to build against the old STL if VS 2005 is installed, too:</p>
<ol>
<li><p>Open your library project in VS 2008.</p></li>
<... | 7,184 |
<p>I'm very new to 3D printing and I've had numerous failed prints. Sometimes, the print is good but while trying to get it off the base I end up bending or breaking the print.</p>
<p>My question is: How to I print and make it easier to release from the plate?</p>
<p>I'm printing with PETG, PLA and ABS. At the moment... | <p>I would reccomend heating up the base a bit. If your printer doesnt come with such an option, try heat-gun.</p>
| <p>I use multiple layers of Elmer's white glue on the glass bed (five layers I think). The glue is PVA which provides a textured surface onto which the PETG adheres. It sticks better when the bed is hot than when the bed is cold. I use a bed temp of 58 degrees on my Anet A8. I have found out that the temp reported by t... | 765 |
<p>Can anyone recommend a library for chart generation (bar charts, pie charts etc.) which runs on both Java and .Net?</p>
| <p><a href="http://www.advsofteng.com/" rel="noreferrer">ChartDirector</a> is fantastic and supports more than just Java and .NET.</p>
| <p>Flash Charts.<br>
<a href="http://www.fusioncharts.com/free/Gallery.asp" rel="nofollow noreferrer">http://www.fusioncharts.com/free/Gallery.asp</a></p>
| 4,677 |
<p><a href="http://en.wikipedia.org/wiki/Project_Darkstar" rel="nofollow noreferrer">Project Darkstar</a> was the topic of the monthly <a href="http://www.javasig.com/meeting/home.xhtml" rel="nofollow noreferrer">JavaSIG</a> meeting down at the Google offices in NYC last night. For those that don't know (probably ever... | <p><strong>Edit: This was written before Oracle bought Sun and started a rampage to kill everything that does not make them a billion $ per day. See the comments for an OSS Fork.</strong> <em>I still stand by my opinion that stuff like that (MMO Middleware) is realistic, you just need a company that doesn't suck behind... | <p>I don't work in the games industry, but it sounds to me like this will do the same thing for video games as the Quake and Half-Life engines did. That is they will promote getting young developers interested in the industry and promote development of indie games. </p>
<p>From what I can tell, video game companies do... | 4,036 |
<p>In Lucene if you had multiple indexes that covered only one partition each. Why does the same search on different indexes return results with different scores? The results from different servers match exactly. </p>
<p>i.e. if I searched for :</p>
<ul>
<li>Name - John Smith</li>
<li>DOB - 11/11/1934</li>
</ul>
<p>... | <p>The <a href="http://lucene.apache.org/core/3_6_0/api/all/org/apache/lucene/search/Similarity.html" rel="noreferrer">scoring</a> contains the Inverse Document Frequency(IDF). If the term "John Smith" is in one partition, 0, 100 times and in partition 1, once. The score for searching for John Smith would be higher sea... | <p>You may also be interested in the output of the <a href="https://lucene.apache.org/core/3_6_2/api/all/org/apache/lucene/search/IndexSearcher.html#explain(org.apache.lucene.search.Query,%20int)" rel="noreferrer"><code>explain()</code> method</a>, and the resulting <a href="https://lucene.apache.org/core/3_6_0/api/all... | 2,287 |
<p>What's a good program to record videos or screencasts being played on screen?</p>
| <p>I've had success with Camtasia / CamStudio. Check out <a href="http://showmedo.com" rel="nofollow noreferrer">http://showmedo.com</a> for tutorials. It's a little recursive though - it would be better to capture it from source.</p>
| <p>If you're using Vista the latest version of <a href="http://www.fraps.com/" rel="nofollow noreferrer">Fraps</a> might also do what you need. I haven't tried it for that, though, just games</p>
| 8,415 |
<p>In a VB.NET WinForms project, I get an exception</p>
<blockquote>
<p>Cannot access a disposed of object</p>
</blockquote>
<p>when closing a form. It occurs very rarely and I cannot recreate it on demand. The stack trace looks like this:</p>
<pre><code>Cannot access a disposed object. Object name: 'dbiSchedule'.... | <p>Try checking the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.isdisposed.aspx" rel="noreferrer">IsDisposed</a> property before accessing the control. You can also check it on the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx" rel="norefer... | <p>because the solution folder was inside OneDrive folder.</p>
<p>If you moving the solution folders out of the one drive folder made the errors go away.</p>
<p>best</p>
| 4,928 |
<p>Is there a way I can configure the MidPointRounding enumeration default setting in a config file (I.e. web.config or app.config) I have a considerable source code base, and I need to configure at the application scope how rounding will occur, whether used in Math.Round or decimal type rounding... I would like to d... | <p>You can play games with post-compile tools that alter the assembly to call your function instead of Math.Round. However, I would just bite the bullet and change the source code.</p>
| <p>Enum.Parse() is your friend here</p>
<pre><code>MyEnum GetEnumValue(string enumString) {
return (MyEnum)Enum.Parse(typeof(MyEnum),enumString);
}
</code></pre>
<p>Obviously you'd also need some error-checking on the string you're getting from you're config file in which case you might want to return a default.</p... | 8,911 |
<p>Does anyone know of a similar product to Citrix Server that'll run on the Mac OS?</p>
<p>Essentially, I'm looking to allow multiple remote users to log in to the same OSX Server at the same time (with full visual desktop, not SSH).</p>
| <p>OS X's Quartz window server has no remoting abilities, unlike <a href="http://en.wikipedia.org/wiki/Display_PostScript" rel="nofollow noreferrer">its predecessor</a>. X11 <em>does</em>, but 'native' OS X applications don't use that; of the few Mac apps typically run in X11 (such as GIMP or CrossOver), none are speci... | <p>John Vasileff,</p>
<p>Back to My Mac is a tunnelling / NAT traversal technique that enables the use of any networking (including VNC-based remote control). iChat screen sharing, Finder Screen Sharing and Remote Desktop all use VNC. Apple does not offer any non-VNC solutions.</p>
| 7,098 |
<p>I'm embedding the Google Maps Flash API in Flex and it runs fine locally with the watermark on it, etc. When I upload it to the server (flex.mydomain.com) I get a sandbox security error listed below: </p>
<pre><code>SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main.... | <p>This sounds like a <code>crossdomain.xml</code> related problem. I did a quick search and there seems to be many people with the same issue. Some proxy requests through XMLHttpRequest etc..</p>
<p><a href="http://code.google.com/p/gdata-issues/issues/detail?id=406" rel="nofollow noreferrer">Issue 406: Add crossdoma... | <p>Thanks for the help. Apparently this has something to do with including the Flex app on an ASP.NET page. When I moved it over to a flat HTML file, it worked fine. I don't have time to fully investigate right now, but that seems to have fixed it.</p>
| 8,485 |
<p>I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes selected item in one of dropdowns, ASP.Net doesn't seem to handle SelectedIndexChanged event until form is submitted with a 'Submit' button click.
How do I make my dropdowns handle SelectedIndexChanged instantly?</p>
<p>P.S. It'... | <p>Setting the <a href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.autopostback(VS.71).aspx" rel="noreferrer">AutoPostback</a> property to true will cause it to postback when the selection is changed. Please note that this requires javascript to be enabled.</p>
| <p>Set the AutoPostBack property of DropDownList to true.</p>
| 9,551 |
<p>In C, are the shift operators (<code><<</code>, <code>>></code>) arithmetic or logical?</p>
| <p>According to <a href="https://rads.stackoverflow.com/amzn/click/com/0131103628" rel="noreferrer" rel="nofollow noreferrer">K&R 2nd edition</a> the results are implementation-dependent for right shifts of signed values.</p>
<p><a href="http://en.wikipedia.org/wiki/Arithmetic_shift" rel="noreferrer">Wikipedia</a>... | <p>According to many <a href="/questions/tagged/c" class="post-tag" title="show questions tagged 'c'" rel="tag">c</a> compilers:</p>
<ol>
<li><code><<</code> is an arithmetic left shift or bitwise left shift.</li>
<li><code>>></code> is an arithmetic right shiftor bitwise right shift.</li>
</ol>
| 2,918 |
<p>When compiling my C++ .Net application I get 104 warnings of the type:</p>
<pre><code>Warning C4341 - 'XX': signed value is out of range for enum constant
</code></pre>
<p>Where XX can be</p>
<ul>
<li>WCHAR</li>
<li>LONG</li>
<li>BIT</li>
<li>BINARY</li>
<li>GUID</li>
<li>...</li>
</ul>
<p>I can't seem to remove... | <p>This is a <a href="http://forums.msdn.microsoft.com/en-US/vclanguage/thread/7bc77d72-c223-4d5e-b9f7-4c639c68b624/" rel="nofollow noreferrer">compiler bug</a>. Here's <a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=159519&SiteID=1" rel="nofollow noreferrer">another post</a> confirming it's a known... | <p>Either wait for a compiler fix or dont <code>#include</code> code that triggers it.</p>
<p>[A verbose way of saying you probably can't.]</p>
| 3,838 |
<p>How can I assign a keyboard shortcut to a VBA macro in Outlook 2007?</p>
<p>I know how to create a tool for the macro and put it in a menu with an underscore shortcut. This solution requires me to use a shortcut of <kbd>Alt</kbd> + <kbd>{menu key}</kbd> + <kbd>{tool key}</kbd>. What if I want to assign it to <kbd>A... | <p>Since Outlook doesn't have the OnKey event, the easiest way is to assign a toolbar button to the macro and put an ampersand in its name somewhere. This only works if your shortcut letter doesn't conflict with an existing shortcut.</p>
<p>You may also have luck with setting a global hotkey, but it's usually more pai... | <p>Since Outlook doesn't have the OnKey event, the easiest way is to assign a toolbar button to the macro and put an ampersand in its name somewhere. This only works if your shortcut letter doesn't conflict with an existing shortcut.</p>
<p>You may also have luck with setting a global hotkey, but it's usually more pai... | 8,127 |
<p>I'm looking for a way to find a the windows login associated with a specific group. I'm trying to add permissions to a tool that only allows names formatted like:</p>
<pre><code>DOMAIN\USER
DOMAIN\GROUP
</code></pre>
<p>I have a list of users in active directory format that I need to add:</p>
<pre><code>ou=group... | <p>Programatically or Manually?</p>
<p>Manually, i prefer <a href="http://technet.microsoft.com/en-us/sysinternals/bb963907.aspx" rel="noreferrer">AdExplorer</a>, which is a nice Active directory Browser. You just connect to your domain controller and then you can look for the user and see all the details. Of course, ... | <p>OU is an Organizational Unit (sort of like a Subfolder in Explorer), not a Group, Hence group1, 2 and 3 are not actually groups.</p>
<p>You are looking for the DN Attribute, also called "distinguishedName". You can simply use DOMAIN\DN once you have that.</p>
<p>Edit: For groups, the CN (Common Name) could also wo... | 4,351 |
<p>What are the ways that you use to model and retrieve hierarchical info in a database? </p>
| <p>The definitive pieces on this subject have been written by Joe Celko, and he has worked a number of them into a book called Joe Celko's Trees and Hierarchies in SQL for Smarties.</p>
<p>He favours a technique called directed graphs. An introduction to his work on this subject can be found <a href="http://web.archiv... | <p>If you're using SQL Server 2005 then <a href="https://web.archive.org/web/20210927200924/http://www.4guysfromrolla.com/webtech/071906-1.shtml" rel="nofollow noreferrer">this link</a> explains how to retrieve hierarchical data.</p>
<p>Common Table Expressions (CTEs) can be your friends once you get comfortable using... | 5,977 |
<p>I'm working with LINQ for the first time and wanted to get the Mapping to work when I have a money type in SQL, but my domain object property is of type double. How can I express this in the XML file, or in code so that the mapping does not throw the usual "invalid cast" exception?</p>
| <p>In the DBML XML file, you can set the Expression attribute of a Column element to something like this:</p>
<pre><code> <Column Name="Table1.Amount" DbType="smallint" Type="System.Int32"
Expression="CAST(Table1.Amount as int)" />
</code></pre>
| <p>pretty sure Money maps to System.Decimal</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb386947.aspx" rel="nofollow noreferrer">Check here</a></p>
| 3,698 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.