instruction stringlengths 21 27.8k | chosen stringlengths 18 28.2k | rejected stringlengths 18 33.6k | __index_level_0__ int64 0 50k |
|---|---|---|---|
<p>Visual Studio randomly crashes when adding/removing references and projects.
Any thoughts why? Will installing Sp1 help?</p>
<p>EDIT: I do not work with any addons except SourceSafe. I do most of my development in connected mode.<br></p>
<p>Developing using:<br>
Visual Studio 2008 <br>
WinXp Terminal Servi... | <p>Try deleting your .user and .suo files - these are the user options files that VS creates. You get a .user file for each project and a .suo file for your solution. When they get corrupted, odd things happen. Deleting them will make you lose little things like which project is selected as the startup project when you... | <p>Search for and delete any .ncb files associated with your solution. In past versions these (debugging) files used to get corrupt and deleting them would fix the problem (Visual Studio will regenerate them automatically).</p>
| 12,230 |
<p>I'm adding windows event logging functionality to an existing Java application and I'd like to utilize event ids(our admin is using them already). Is there a way to specify the event ID when logging with NTEventLogAppender?</p>
| <p>From my research so far it seems like there's no way to modify the event ID from the default 4096.</p>
| <p>Check out <a href="http://log4jna.codeplex.com" rel="nofollow">log4jna</a>. It's a replacement for log4j NTEventLogAppender. It doesn't do what you want right now, but it's "this close". If you still need this, we can work on implementing it.</p>
| 24,829 |
<p>For the project I'm working on I noticed that file transfer* speed is really bad if I'm using IIS FTP and HTTP services. I know that the last thing I should think is "it's a Windows bug", but the fact that simply by using IIS on Windows Server or by changing IIS on that Windows XP machine to FileZilla and LightHTTPd... | <p>As other people have said, by default there is a 10 simultaneous connection limit for IIS 5 in Win XP. This can be increased to a maximum of 40 via the metabase variable setting script.</p>
<pre><code> cd \inetpub\adminscripts
cscript adsutil.vbs set w3svc/MaxConnections 40
iisreset
</code></pre>
<p>... | <p>There is also a limit to one site. Note that a site != to a Virtual Diretory/Application, so it's rarely an issue for a programmer.</p>
| 38,244 |
<p>In a LotusScript Agent that is being run via WebQueryOpen, how do you get the name of the current server?</p>
| <pre><code>Set s = New NotesSession
Set db = s.CurrentDatabase
If db.Server <> "" Then
Set sName = New NotesName(db.Server)
Else
Set sName = New NotesName(s.Username)
End If
</code></pre>
| <pre><code>'initialize event of a WebQueryOpen agent
Dim s As New notessession
Dim servername As String
servername = s.UserName
</code></pre>
| 8,436 |
<p>What is the difference between publishing a website with visual studio and just copying the files over to the server? Is the only difference that the publish files are pre-compiled?</p>
| <p>There is not much difference between "publish", and copying the files. Publish appears in a webapplication. The only difference really is publishing gives you the option to only include html and dll's, where as copying you would need to parse out source code manually. There is no full precompiling in the publish opt... | <p>I believe you are correct in your assumption. It has been my experience that the only difference is that published files are compiled. <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en" rel="nofollow noreferrer">Visual Studio® 2008 Web Deploymen... | 10,428 |
<p>I also want to save the font size in my <code>.emacs</code> file.</p>
| <pre class="lang-lisp prettyprint-override"><code>(set-face-attribute 'default nil :height 100)
</code></pre>
<p>The value is in 1/10pt, so 100 will give you 10pt, etc. </p>
| <p>In NTEmacs 23.1, the Options menu has a "Set default font..." option.</p>
| 37,615 |
<p>I have a small calculator that I am creating in C# (Sharp Develop). The user enters two values and the code returns the third. I am having trouble rounding the third value once it is returned. I have been through a couple of forums and the msdn site and I understand the code that is posted there, but I cant seem to ... | <p>Use <a href="http://msdn.microsoft.com/en-us/library/system.math.round.aspx" rel="nofollow noreferrer">Math.Round</a>. Or, since you're going into a string, you could use either the <a href="http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx" rel="nofollow noreferrer">Standard Numeric Format Strings</a>, or the <... | <p>Could Math.Round(z, nrofdecimals) be the answer to your problem?</p>
| 46,655 |
<p>My Outlook add-in handles NewInspector event of the Inspector object, in order to display a custom form for the mail item.</p>
<p>I can get EntryID of the CurrentItem of the Inspector object which is passed as a parameter of the event. But, the problem is that the EntryID of the current mail item is shorter than it... | <p>The idea is to remember every EntryID of the MailItem that was created by an add-in, so that it can be treated differently later. Problem was that EntryID of the item opened by an Inspector was the short one, and not in the list of remembered ids, although it should be.</p>
<p>Few lines of code where I was creating... | <p>Just in case this helps anyone, all I needed to do is to call <code>MailItem.Save()</code> before fetching <code>EntryID</code>. A newly created <code>MailItem</code> doesn't have any <code>EntryID</code> till it is saved (in <code>Drafts</code> folder in my case).</p>
| 19,598 |
<p>Has anyone used the new Java 1.6 JDK tool, <a href="http://web.archive.org/web/20070724060100/https://visualvm.dev.java.net/" rel="nofollow noreferrer">VisualVM</a>, to profile a production application and how does the application perform while being profiled?</p>
<p>The documentation say that it is designed for b... | <p>While i haven't personally used VisualVM, I saw this <a href="http://blog.xebia.com/loitering-objects-make-web-company-lose-money/" rel="nofollow noreferrer">blog post</a> just today that might have some useful information for you. He talks about profiling a production app using it.</p>
| <p>It is possible to remote connect to your server from a different computer using VisualVM. You just need to right click on the "Remote" node and say "Add Remote Host." </p>
<p>This would at least eliminate the VisualVM overhead (if there is any) from impacting performance while it is running.</p>
<p>This may not ... | 10,166 |
<p>What's the best way to get an array of all elements in an html document with a specific CSS class using javascript?</p>
<p>No javascript frameworks like jQuery allowed here right now, and I could loop all the elements and check them manually myself. I'm hoping for something a little more elegant.</p>
| <p>The below answer is now pushing four years old, so it's worth noting that native browser support for <a href="https://developer.mozilla.org/en-US/docs/Web/API/document.getElementsByClassName" rel="noreferrer"><code>getElementsByClassName()</code></a> has gotten a <em>lot</em> better. But if you must support older br... | <p>There is no such thing as a CSS class. CSS has rule-sets and selectors (including the class selector).</p>
<p>Do you mean an HTML class? The usual way is to loop over every element in the document (<code>using document.getElementsByTagName('*')</code> (for efficiency, use a specific tag name if you know the class w... | 25,821 |
<p>I know that cursors are frowned upon and I try to avoid their use as much as possible, but there may be some legitimate reasons to use them. I have one and I am trying to use a pair of cursors: one for the primary table and one for the secondary table. The primary table cursor iterates through the primary table in a... | <p>The value of @fName is evaluated at :DECLARE curScores CURSOR and not in the primary loop.
You must Declare and then deallocate the secon cursor in the primary loop.</p>
| <p>I'd try placing the</p>
<pre><code>DECLARE curScores CURSOR
FOR
SELECT FName,Score
FROM @Scores
WHERE Fname = @Fname
</code></pre>
<p>inside the first while, beacuse you're declaring the cursor only for the first name value</p>
| 30,243 |
<p>I want to point a file dialog at a particular folder in the current user's Local Settings folder on Windows. What is the shortcut to get this path?</p>
| <p>How about this, for example:</p>
<pre><code>String appData =
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
</code></pre>
<p>I don't see an enum for just the Local Settings folder.</p>
<p><a href="http://web.archive.org/web/20080303235606/http://dotnetjunkies.com/WebLog/nenoloje/a... | <p>Environment.GetFolderPath( Environment.SpecialFolders.LocalApplicationData);?</p>
<p>I can't remember if there is a "Local Settings" folder on Windows XP anymore, it seems vaguely familiar.</p>
| 8,154 |
<p>Every time I turn on my company-owned development machine, I have to kill 10+ processes using the Task Manager or any other process management app just to get decent performance out of my IDE. Yes, these are processes from programs that my company installs on my machine for security and compliance. What I'd like to... | <p>You can do this with '<strong>taskkill</strong>'.
With the /IM parameter, you can specify image names. </p>
<p>Example:</p>
<pre><code>taskkill /im somecorporateprocess.exe
</code></pre>
<p>You can also do this to '<strong>force</strong>' kill:</p>
<p>Example:</p>
<pre><code>taskkill /f /im somecorporateprocess... | <p>Use Powershell! Built in cmdlets for managing processes. <a href="http://blogs.msdn.com/powershell/archive/2007/01/16/managing-processes-in-powershell.aspx" rel="nofollow noreferrer">Examples here</a> (hard way), <a href="http://www.computerperformance.co.uk/powershell/powershell_process.htm" rel="nofollow norefer... | 5,392 |
<p>To present user specific data, where do I store the userID of the user currently logged in? the Session?</p>
| <p>Yes, the session would be an appropriate place for that information. Assuming you are using the authentication features baked into the ASP.NET framework, you will either be loading the user ID from HttpContext.Current.User.Identity.Name or looking it up from that value.</p>
| <p>yes. sesssion is used for storing user specific data.</p>
| 32,550 |
<p>I need to export multiple data tables to Excel on the clients machine, each to their own sheet. If it was just one sheet, I'd use the Excel/csv content type, but I've heard something about an XML format that can represent an entire workbook. I don't want to go down the Packaging and .xlsx route, so I need standard... | <p>You can use for example <a href="http://www.carlosag.net/Tools/ExcelXmlWriter/" rel="nofollow noreferrer">this library</a>, if you don't want to create your own Excel XML writer library.</p>
| <p>In Excel you can save a workbook in XML format. (in Excel 2007 it is called XML Spreadsheet 2003). </p>
<p>That might get you started.</p>
| 25,509 |
<p>I came across <a href="http://www.alistapart.com/articles/progressiveenhancementwithcss" rel="nofollow noreferrer">this article</a> on "A List Apart" that suggests spliting css information in (at least) three separate files, one for typography, one for layout and one for color information. Color seems pretty obvious... | <p>typography is typefaces (fonts), their sizes, spacing, kerning, etc.</p>
<p>layout is the positioning, spacing, etc. of elements (div, span, etc.).</p>
| <p>typography is typefaces (fonts), their sizes, spacing, kerning, etc.</p>
<p>layout is the positioning, spacing, etc. of elements (div, span, etc.).</p>
| 49,980 |
<p>Below is my table, a User could have multiple profiles in certain languages, non-English profiles have a higher priority.</p>
<pre>
+----------+--------+----------------+----------------+
|ProfileID |UserID |ProfileLanguage |ProfilePriority |
+----------+--------+----------------+----------------+
|1 |1 ... | <p>This may work, if profilepriority and userid could be a composite unique key;</p>
<pre><code>select p.* from Profile p join
(SELECT UserID, MIN(ProfilePriority) AS ProfilePriority
FROM Profile
WHERE ProfileLanguage = 'en-US' OR ProfilePriority = 2
GROUP BY UserID) tt
on p.userID = tt.UserID and p.ProfilePriority =... | <p>It seems to me, though it is not clear without your table and maybe some sample data, that your problem is solved by just extending your grouping as follows:</p>
<pre><code>SELECT UserID, ProfileID, MIN(ProfilePriority) AS ProfilePriority
FROM Profile
WHERE ProfileLanguage = 'en-US' OR ProfilePriority = 2
GROUP BY ... | 49,384 |
<p>I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached to it for each date field, I get several (11, in fact) external Java... | <p>I always preferred to write my Ajax calls in javascript using JQuery or Prototype. ASP.NET Ajax Toolkit does make things easier, but it never seems to do so elegantly.</p>
<p>I personally would make a new Calendar Controller. This way you can control the AJAX (using JQuery/Prototype) calls that are being made.</p>
| <p>ASP.NET AJAX allows you to register web services with the ScriptManager which will create JavaScript proxies for you to call. See <a href="http://msdn.microsoft.com/en-us/library/bb515101.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/bb515101.aspx</a>.</p>
| 3,660 |
<p>Nikhil Kothari's <a href="http://projects.nikhilk.net/ScriptSharp/" rel="nofollow noreferrer">Script#</a> is quite possibly one of the most amazing concepts I've seen in the JavaScript arena for quite some time. This question isn't about JavaScript, but rather about language compilation in the .NET runtime.</p>
<p>... | <p>It's important to realize that all a compiler does is take a source language (C# in this case), parse it so the compiler has a representation that makes sense to it and not humans (this is the abstract syntax tree), and then does a naive code generation to the target language (msil is the target for languages that r... | <p>So let's say you want to compile C# into Javascript. You are asking whether you can take advantage of the existing C# compilers, so instead of compiling C# into Javascript directly you actually convert the MSIL generated by the C# compiler into Javascript?</p>
<p>Sure, you can do that. Once you have the MSIL binary... | 10,089 |
<p>I have a windows service that runs various system monitoring operations. However, when running <code>SNMP</code> related checks, I always get a <code>NullReference exception</code>. </p>
<p>The code runs fine when run through the user interface (under my username and password), but always errors running as the se... | <p>Some ways to debug:</p>
<ul>
<li>Is there any additional information in the Windows events log?</li>
<li>I believe you should be able to listen to some kind of global-exception event like Application_Exception in windows services. I can't remember the exact name but you can atelast dump stack trace from there.</li>... | <p>A couple of things we've seen - more about differences between interactive vs services, but might help...</p>
<p>One thing we've seen that does not seem relevant is the difference with what is on the user vs system path. </p>
<p>Another thing we've seen relates to temporary files - the service we had was creating ... | 7,106 |
<p>For an interview in a few, I'm not at all familiar with Flash development. </p>
<p>What would you ask?</p>
| <p>Honestly, if you yourself aren't a flash developer, I'd caution against interviewing a potential Flash developer, unless you're only doing it to get a sense of their character (as opposed to their skill level). Experience in working with the technology is going to give you a much more realistic perspective - blindly... | <p>Do you know Object Oriented?</p>
<p>What do you like in ActionScript3 that ActionScript 2 haven't?</p>
| 16,358 |
<p>I'm trying to monitor the states of a group of threads in a Microsoft.NET application written in C#. I'd like to be able to also monitor any child threads spawned by the original threads.</p>
<p>In Java, you can assign threads to a thread group, and their children will also belong to the group. Is there an equivale... | <p>You can enumerate the threads in your process using the <a href="http://msdn.microsoft.com/de-de/library/system.diagnostics.process.threads(VS.80).aspx" rel="nofollow noreferrer">Threads</a> property of System.Diagnostics.Process.</p>
<p>Note however, that the objects you get here are not of the same type as those ... | <p>Make it simple:</p>
<p>Create your ThreadGroup class with a method wrapping the thread creation process.</p>
<p>When this method is called, it adds the created thread to a Collection and there is your group.</p>
| 18,609 |
<p>Having an issue with some images using IE7 - work fine in 6 and in all versions of Firefox.</p>
<p>Has anyone run across this before? I know I've had it happen in the past (and I googled a fix, but darned if I can find the fix again... note to self, document things like this for future ;) )</p>
<pre><code><div ... | <p>I've come across this type of problem before when images uploaded to our site were JPEGs in <a href="http://en.wikipedia.org/wiki/CMYK_color_model" rel="noreferrer">CMYK</a> format - Internet explorer would show them as a small red x, but Firefox would show them OK (definitely as of version 3, not sure about earlier... | <p>I have had similar issues in the past running the page locally on my machine with IE7. That could be the issue.</p>
| 25,900 |
<p>How do you debug <a href="http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)" rel="noreferrer">getResource</a>-style methods that are failing, returning null?</p>
<p>I am sure the file it's looking for is there, but it's returning NULL. How do I know what it is looking fo... | <p>Since <code>getResource()</code> searches the classpath (as others have mentioned), it might be helpful to dump the actual classpath being searched before your problemsome <code>getResource()</code> call:</p>
<pre><code>log.debug("classpath is: " + System.getProperty("java.class.path"));
//the line that is returni... | <p>I've usually experience this whenever the ClassLoader changes.</p>
<p>Depending on the exact context that an app is running ClassLoaders have different rules about when a resource file exists. For example in netbeans getResource is case insensitive, but in Sun's JRE it is.</p>
<p>Although not directly answering y... | 31,544 |
<p>I need to copy the content of a window (BitBlt) which is hidden, to another window. The problem is that once I hide the source window, the device context I got isn't painted anymore.</p>
| <p>What you need is the <a href="http://msdn.microsoft.com/en-us/library/ms535695.aspx" rel="noreferrer">PrintWindow</a> function that's available in Win32 API since Windows XP. If you need it to work with older versions of Windows, you can try <a href="http://msdn.microsoft.com/en-us/library/ms534856(VS.85).aspx" rel=... | <p>Maybe you can trigger a redraw operation on the window with InvalidateRect?</p>
| 30,025 |
<p>I came across a c library for opening files given a Unicode filename. Before opening the file, it first converts the filename to a path by prepending "\\?\". Is there any reason to do this other than to increase the maximum number of characters allowed in the path, per <a href="http://msdn.microsoft.com/en-us/librar... | <p>Yes, it's just for that purpose. However, you will likely see compatibility problems if you decide to creating paths over MAX_PATH length. For example, the explorer shell and the command prompt (at least on XP, I don't know about Vista) can't handle paths over that length and will return errors.</p>
| <p>I've been writing Windows code since 1995, and although I'm aware of that prefix, I've never found any reason to use it. Increasing the path length beyond <code>MAX_PATH</code> seems to be the only reason for it, and neither I nor any of my programs' customers have ever done so, to my knowledge.</p>
| 44,397 |
<p>I'm trying to write a greasemonkey script, and it would be preferable for it to be able to work with images (specifically, find the darkest pixel in an image). Is there a way to do this or must I embed flash?</p>
| <p>Since it's Firefox specific, you can use a canvas element. I've never written a greasemonkey script, so I don't know exactly how you would do it, but the idea is, you create a new canvas element and draw the image onto the canvas. Then, you can get the pixel values from the canvas.</p>
<pre><code>// Create the canv... | <p>Scrap the</p>
<pre><code>var r = imageData.data[index];
var g = imageData.data[index + 1];
var b = imageData.data[index + 2];
var a = imageData.data[index + 3];
</code></pre>
<p>part, Javascript doesn't pass by reference.</p>
| 47,793 |
<p>I have a form that displays file information in a TabControl, and I'd like the pages to have the file's icon in their tab. How do I get the icon associated with a file type?</p>
<p>I'd prefer solutions that don't involve looking things up in the registry, but if that's the only way then so be it.</p>
| <p><a href="http://www.codeproject.com/KB/dotnet/System_File_Association.aspx" rel="nofollow noreferrer">CodeProject</a> has some classes you can download.</p>
<p>First get the <code>FileAssociationInfo</code>, and from that get the <code>ProgramAssociationInfo</code>. The <code>pai</code> object can give you the ico... | <p><a href="http://msdn.microsoft.com/en-us/library/system.drawing.icon.extractassociatedicon.aspx" rel="noreferrer">System.Drawing.Icon.ExtractAssociatedIcon(string filePath)</a></p>
| 34,237 |
<p>Anyone know where to find a reference that describes how to output color on the Windows CLI interfaces using API and/or stdout?</p>
| <p>The Win32 <a href="http://msdn.microsoft.com/en-us/library/ms682010.aspx" rel="nofollow noreferrer">console API</a> has a function, <a href="http://msdn.microsoft.com/en-us/library/ms686047.aspx" rel="nofollow noreferrer">SetConsoleTextAttribute</a>, that can be used to set the text foreground and background colour... | <p>in powershell write-host takes -backgroundcolor and -foregroundcolor parameters</p>
| 31,345 |
<p>I know the standard way of using the <a href="https://en.wikipedia.org/wiki/Null_coalescing_operator" rel="noreferrer">null coalescing operator</a> in C# is to set default values.</p>
<pre><code>string nobody = null;
string somebody = "Bob Saget";
string anybody = "";
anybody = nobody ?? "... | <p>Well, first of all, it's much easier to chain than the standard ternary operator:</p>
<pre><code>string anybody = parm1 ?? localDefault ?? globalDefault;
</code></pre>
<p>vs.</p>
<pre><code>string anyboby = (parm1 != null) ? parm1
: ((localDefault != null) ? localDefault
: globalDefault... | <p>I have used it like this:</p>
<pre><code>for (int i = 0; i < result.Count; i++)
{
object[] atom = result[i];
atom[3] = atom[3] ?? 0;
atom[4] = atom[4] != null ? "Test" : string.Empty;
atom[5] = atom[5] ?? "";
atom[6] = atom[6] ?? "";
atom[7] = atom[7] ?? &quo... | 35,195 |
<p>How can I ignore accents (like ´, `, ~) in queries made to a SQL Server database using LINQ to SQL?</p>
<p><strong>UPDATE:</strong></p>
<p>Still haven't figured out how to do it in LINQ (or even if it's possible) but I managed to change the database to solve this issue.
Just had to change the collation on the fiel... | <p>In SQL queries (Sql Server 2000+, as I recall), you do this by doing something like select MyString, MyId from MyTable where MyString collate Latin1_General_CI_AI ='aaaa'.</p>
<p>I'm not sure if this is possible in Linq, but someone more cozy with Linq can probably translate.</p>
<p>If you are ok with sorting and ... | <p>A solution could be create an SQL Function to remove the diacritics, by applying to the input string the collation SQL_Latin1_General_CP1253_CI_AI, like so:</p>
<pre><code>CREATE FUNCTION [dbo].[RemoveDiacritics] (
@input varchar(max)
) RETURNS varchar(max)
AS BEGIN
DECLARE @result VARCHAR(max);
select @result =... | 41,737 |
<p>This is a followup to <a href="https://stackoverflow.com/questions/284428/avoiding-property-itis-ie-overuse-of-properties-when-are-they-appropriate">Avoiding @property-itis</a>.</p>
<p>UIWebView has the following property declarations:</p>
<pre><code>@property(nonatomic,readonly,getter=canGoBack) BOOL canGoBack;
@... | <p>My best guess is that UIResponder is meant to match NSResponder, which of course was designed before Objective-C 2.0 introduced properties. Why UIWebView doesn't do the same with regard to WebView, I don't know. I'd expect properties in Cocoa to be a little schizophrenic in this way for some time, and I wouldn't thi... | <p>A property should map, intuitively if not exactly, to some storage mechanism of your class - be it an ivar declared in your <code>@interface</code> or something synthesized by the runtime. The act of calling a method such as <code>canBecomeFirstResponder</code> need not necessarily query the class for a storage mec... | 38,845 |
<p>Ever since I first wrote</p>
<pre><code>if ($a = 5) {
# do something with $a, e.g.
print "$a";
}
</code></pre>
<p>and went through the normal puzzling session of </p>
<ul>
<li>why is the result always true</li>
<li>why is $a always 5</li>
</ul>
<p>until I realized, I'd assigned 5 to $a, instead of perform... | <p>This is a simple and obvious one, but I NEVER EVER NEVER repeat the same string constant twice in my code, cause I KNOW that if I do I will be spelling one of them wrong :) Use constants, people! </p>
| <p>Installed Resharper ;)
Then I don't need to write "5 == a" to get warned if I did something wrong :)</p>
| 33,587 |
<p>how do i implement an eval script in a sever side control?</p>
<p>eg. <code><a runat="server" href="?id=<%= Eval("Id") %>">hello world</a></code></p>
| <p>If the server-side control is within a databound control (ListView, GridView, FormView, DetailsView), then the syntax is: <code><%# Eval("Id") %></code>.</p>
<p>If the server-side control is not within a databound control, you will have to access it via the code-behind and set your attribute there.</p>
|
<p>as far as I know, its <%# instead of <%=</p>
| 16,127 |
<p>I'm working in a web application using VB.NET. There is also VisualBasic code mixed in it, in particular the Date variable and the Month function of VB.</p>
<p>The problem is this part:</p>
<pre><code>Month("10/01/2008")
</code></pre>
<p>On the servers, I get 10 (October) as the month (which is supposed to be cor... | <p>This normally has to do with the regional settings, and more specifically the date/time formats. If you set these formats so that they are all the same on the machines you're testing on, the results should be consistent. </p>
<p>Your idea of using ParseExact is definitely the better solution to go with, IMHO.</p>
| <p>This is because the runtime has to convert your given value "10/01/2008" which is indeed a string implicitly to the DateTime datatype.</p>
<p>When converting strings to dates and the other way round, the string format depends on the locale settings of windows.</p>
<p>See <a href="http://msdn.microsoft.com/en-us/li... | 21,957 |
<p>I have a block of code intended to pull text descriptions from a database table and save them to a text file. It looks like this (C# .NET):</p>
<pre><code> OdbcCommand getItemsCommand = new OdbcCommand("SELECT ID FROM ITEMS", databaseConnection);
OdbcDataReader getItemsReader = getItemsCommand.Execut... | <p>As I understand, the first time you run D* it finds the same path as A* with nearly the same runtime. However, when a node changes it's edge value or nodes are added A* recomputes ALL of the path while D* simply recomputes the inconsistent nodes the second time around rather than the whole thing.</p>
<p>Anthony St... | <p>I have implemented both D* and A* algorithm. So, I advice you that, if your map has no dynamic obstacles, you should implement A*. Else, implement D*. For the main reason is:
At the first search, D* calculates all nodes in the map, then shows you the shortest path, while A* only calculates a limited area around goa... | 28,252 |
<p>Spending thousand of hours in front of my computer, ergonomics became quickly a main issue.</p>
<p>For the monitor or the keyboard, technical solutions exist. But for the mouse, I never get used to the trackball and putting a little pillow under my wrist made me feel uncomfortable.</p>
<p>So I started to swap the ... | <p>Yeah I had that problem too for a while. The first thing I did was modify my chair so I had a flat area where I could put a mouse and rest my arm on the padded arm wrest. Now I have an L shaped desk, and can rest my whole arm on the desk ( from elbow to hand anyway ). I found that it makes a big difference over just... | <p>I tried a <a href="http://www.google.com/search?q=vertical+mouse" rel="nofollow noreferrer">vertical mouse</a> but found it to be more uncomfortable because you lose the wrist support afforded by resting your hand <em>on</em> the mouse.</p>
<p>It was a waste of money for me, but your mileage may vary.</p>
| 21,404 |
<p>I am looking for easy steps that are simple and effective in making a web application more secure.</p>
<p>What are your top tips for secure web applications, and what kind of attack will they stop?</p>
| <p>Microsoft Technet has en excellent article:</p>
<p><a href="http://technet.microsoft.com/en-us/library/cc512638.aspx" rel="nofollow noreferrer">Ten Tips for Designing, Building, and Deploying More Secure Web Applications</a></p>
<p>Here are the topics for the tips answered in that article:</p>
<ol>
<li>Never Dire... | <p>Set the secure flag on cookies for SSL applications. Otherwise there is always a highjacking attack that is <em>much</em> easier to conduct than breaking the crypto. This is the essence of CVE-2002-1152.</p>
| 6,953 |
<p>I would like to be able to fusion an <code>IEnumerable<IEnumerable<T>></code> into <code>IEnumerable<T></code> (i.e. merge all individual collections into one). The <code>Union</code> operators only applies to two collections. Any idea?</p>
| <p>Try </p>
<pre><code>var it = GetTheNestedCase();
return it.SelectMany(x => x);
</code></pre>
<p>SelectMany is a LINQ transformation which essentially says "For Each Item in a collection return the elements of a collection". It will turn one element into many (hence SelectMany). It's great for breaking down co... | <pre><code>var lists = GetTheNestedCase();
return
from list in lists
from element in list
select element;
</code></pre>
<p>is another way of doing this using C# 3.0 query expression syntax.</p>
| 41,571 |
<p>I'm in the process of building a 3D printer and have all the stepper motors wired up and the controller connected to the computer running pronterface.</p>
<p>I can move each axis and also send g-code to the printer.</p>
<p>Now <strong>how can I define the current position to be the 0/0/0 position?</strong>
I'd lik... | <blockquote>
<p>G92 X0 Y0 Z0</p>
</blockquote>
<p>tells the printer that the current position is (0,0,0).</p>
| <p>There's a handy list of G0-codes at <a href="http://reprap.org/wiki/G-code" rel="nofollow">http://reprap.org/wiki/G-code</a> -- though the list is too big to be convenient for finding a code if you're not already sure what it's called... :(</p>
| 158 |
<p>Right now I'm trying to add a button to a webpage that when pressed will start playing a .wav file by dynamically adding an embed tag to the DOM. The text switches to "Stop" while the sound plays, and I'd like to be able to switch it back automatically to "Play" once the file has finished playing.</p>
<p>How would ... | <p>I would wrap the sound in a very simple flash movie, and use actionscript to trigger a javascript function at the end. </p>
<p>Here is a list of open-source flash ide :
<a href="http://osflash.org/open_source_flash_projects" rel="nofollow noreferrer">http://osflash.org/open_source_flash_projects</a></p>
<p>(That's... | <p>If you are embedding a player to play the file (as opposed to just allowing the browser to try to figure what to use on its own (QT, WMP etc.)) then the player should have its own events you can hook into. That depends on the player you use.</p>
| 42,328 |
<p>When downloading both Firefox and Chrome, I've noticed that the default version I got was in my native tongue of Hebrew. I personally don't like my applications in Hebrew, since I'm used to the English UI conventions embedded in me since long ago by:</p>
<ol>
<li><strong>The lack of choice:</strong> Most programs d... | <p>I've helped develop an application that was used by Dutch, English, Spanish and Portuguese speaking users. Because the application installed from CD we just added all the language packs. Mostly because it saved us a lot of work not having to maintain 4 different versions.</p>
<p>If your application distributed from... | <p>I've never written an application for use by a large number of people, and never for anyone that didn't use English as their language, but if I did, I would probably take a route that installs all available language packs at install (unless the user did a custom install, where I would allow them to choose language p... | 8,419 |
<p>I am trying to programatically set the dpi metadata of an jpeg image in Java. The source of the image is a scanner, so I get the horizontal/vertical resolution from TWAIN, along with the image raw data. I'd like to save this info for better print results.</p>
<p>Here's the code I have so far. It saves the raw image... | <p>Some issues that were not considered here:</p>
<ol>
<li><p>The tree is not directly mapped to the IOMetaData. To apply data from tree, add following call after setting the densities and raster parameters:</p>
<pre><code>data.setFromTree("javax_imageio_jpeg_image_1.0", tree);
</code></pre></li>
<li><p>don't use the... | <p>I would seem this could be a bug. </p>
<p>I found this post <a href="http://www.velocityreviews.com/forums/t360709-imageio-iiometadatasetfromtree-cripples-data.html" rel="nofollow noreferrer">from a few google searches</a></p>
<p>Apparently there are alot more that point to a bug as well.</p>
<p>The post above ta... | 28,905 |
<p>I have a record set that includes a date field, and want to determine how many unique dates are represented in the record set.</p>
<p>Something like:</p>
<pre><code>Record.find(:all).date.unique.count
</code></pre>
<p>but of course, that doesn't seem to work.</p>
| <p>What you're going for is the following SQL:</p>
<pre><code>SELECT COUNT(DISTINCT date) FROM records
</code></pre>
<p>ActiveRecord has this built in:</p>
<pre><code>Record.count('date', :distinct => true)
</code></pre>
| <p>Also, make sure you have an index on the field in your db, or else that query will quickly become sloooow.</p>
<p>(It's much better to do this in SQL, otherwise you pull the entire db table into memory just to answer the count.)</p>
| 5,722 |
<p>Can I use a query in MSSQL to get the .mdf and .ldf filename/location for a specific database?</p>
| <p>SELECT * FROM <a href="http://msdn.microsoft.com/en-us/library/ms174397(SQL.90).aspx" rel="noreferrer">sys.database_files</a> (SQL 2005+)</p>
<p>SELECT * FROM dbo.sysfiles (SQL 2000)</p>
| <pre><code>SELECT * FROM sys.master_files
</code></pre>
<p>...will give you a basic view of where your database lives. It might not cope too well with filegroups, etc.</p>
| 46,085 |
<p>I have a Monoprice architect which is a barebones clone of the FlashForge Creator Pro, or Replicator 1 Dual. I have upgraded the power supply and added a heated bed and, after getting fed up with MakerBot software, I've started using Cura to slice then post process with GPX.</p>
<p>I did a lot of searching and fina... | <p>Yes, with the proper equipment.</p>
<p>Printing wax filament (at 51 seconds): <a href="https://youtu.be/tibkVZB_n9c?t=51s" rel="noreferrer">https://youtu.be/tibkVZB_n9c?t=51s</a></p>
<p>There are also options for melting wax, filling a heated reservoir head, and printing with that. I recommend doing this with a co... | <p>Just make a silicone mold of any of your prints and pour you wax in the silicone,you silicone putty is pretty cheap so is wax ,no need to break the bank as printers have become less expensive and can do a pretty good job </p>
| 631 |
<p>I had an unusual problem yesterday where I was suddenly unable to insert records into a table with an identity column.</p>
<p>A simple insert like this: INSERT INTO MyTable (Column1, Column2) VALUES ('text', 236764)</p>
<p>Started throwing a primary key constraint violation. </p>
<p>I ran DBCC CHECKIDENT on the t... | <p>Taken from its home page:</p>
<p>The <a href="http://trac-hacks.org/wiki/AccountManagerPlugin" rel="noreferrer">Account Manager plugin</a> offers several features for managing user accounts: </p>
<ul>
<li>allow users to register new accounts </li>
<li>login via an HTML form instead of using HTTP authentication </l... | <p>I second antispam on the Account Manager plugin. Also, if your trac needs to be web facing, you may be interested in the auth required plugin. Just be aware that it hasn't been upgraded for 0.11 and I suspect that there are some minor compatibility problems. It does do the job though.</p>
| 29,554 |
<p>I am a newcomer to ASP, and would like to experiment with it by writing a website for a club at my school using .net 2008 and the mySql database available from the school's apache server. What is the best way to set this up, since I see a lot of options to connect the web app to SQL Server or Oracle databases, but ... | <p>Get a hold of the <a href="http://dev.mysql.com/downloads/connector/net/5.2.html" rel="noreferrer">MySQL Connector</a> for ASP.NET and start coding as usual for MySQL. the connector gives you all the advantages of data adapters, data readers, etc. in the typical ADO.NET structure you are used to for SQL or Oracle. T... | <p>Check out this url: <a href="http://dev.mysql.com/tech-resources/articles/dotnet/index.html" rel="nofollow noreferrer">http://dev.mysql.com/tech-resources/articles/dotnet/index.html</a></p>
| 36,613 |
<p>We're using Infragistics grid (most probably, we'll have 8.2 version at the end) and we want to configure row/cells appearances "on-demand" in order to be able to provide sort of "dynamic appearance".</p>
<p>For example, I want some cell to be red or green, depending on its value. We might want to tweak other chara... | <p>I had to do exactly this with the IG WebGrid a few years back, and it was ... shall we say ... painful. However, the WebGrid had the advantage of a single render point -- once the HTML was emitted, we were set!</p>
<p>For dealing with this in WinGrid, I tried a variety of different events, both on the grid and the ... | <p>There is an event. I don't remember exactly what it's called, but it's got to be something like 'DataRowBound' or 'ItemDataBinding', etc..</p>
<p>Also, <a href="http://weblogs.asp.net/tonylombardo/archive/2008/01/29/demystifying-infragistics-webgrid-databinding.aspx" rel="nofollow noreferrer">this article</a> migh... | 36,067 |
<p>Examples could be Infragistics or DevExpress.</p>
<p>But I'm also looking for your opinions on other frameworks. It could even be WPF if that is your favorite.</p>
| <p>Infragistics is very good. I think they have a better product for windows than the web. However, I get very upset using their products sometimes. I just want to find some hidden property, and it is impossible to find. They have way to many properties. Sure, you can do anything with their grid, but it should be easie... | <p>What frameworks are you looking for? I currently use Janus Grids for grids on the winform side, but DevExpress has an awesome web grid that is amazing.</p>
| 21,726 |
<p>I am trying to capture output from an install script (that uses scp) and log it. However, I am not getting everything that scp is printing out, namely, the progress bar. </p>
<p>screen output:</p>
<blockquote>
<p>Copying
/user2/cdb/builds/tmp/uat/myfiles/* to
server /users/myfiles as cdb</p>
<p>cdb@se... | <p>scp prints its progress bar to the terminal using control codes. It will detect if you redirect output and thus omit the progress bar.</p>
<p>You can get around that by tricking scp into thinking it runs in a terminal using the "script" command which is installed on most distros by default:</p>
<pre><code>script -... | <p>Try: </p>
<pre><code>scp server:/file /tmp/ > /dev/tty
</code></pre>
| 24,751 |
<p>I have a problem with a ClickOnce deployment of a <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="nofollow noreferrer">Windows Forms</a> application. When I built the new setup, and tried to export it overwriting as usual the previous setup, Visual Studio came up stating that my certificate is expired.</p>... | <p>I found a blog entry, <em><a href="http://www.jamesharte.com/blog/?p=11" rel="nofollow noreferrer">ClickOnce and Expiring Code Signing Certificates</a></em> by James Harte, that describes a method to have your application remove itself and launch the new ClickOnce install. It worked for me.</p>
| <p>I ran into this problem almost two years ago. There is really no good workaround if RenewCert won't work for you. I even emailed the ClickOnce authority, Brian Noyes, and got confirmation that there were no good workarounds.</p>
<p>We ended up buying a 3 year cert and telling our users to uninstall. However, if ... | 14,745 |
<p>Is it possible to change the <code>RowCount</code> of a <code>DataGrid</code> in flash after it has been created on the stage?</p>
<p>I am loading an XML file externally that contains the number of rows the <code>DataGrid</code> should have, but the problem is that because this file is not loaded at runtime, it jus... | <p>RichTextBox has an AppendText method that is fast.
And it can handle large text well.<br>
I believe it is the best for what you need.</p>
| <p>set the selectedindex of the listbox to the last element to make it scroll to the bottom</p>
<p>also, limit the number of items in the listbox to something reasonable (delete from the top, keep the later items) so you don't chew up all of your memory</p>
| 31,443 |
<p>I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version:</p>
<pre><code>File | Source Control | Compare...
</code></pre>
<p>I can also do the same thing by clicking on an icon in the Source Control toolbar.</p>
<p>I'm not... | <p>Tools -> Options -> Keyboard -> Commands Containing "Compare"</p>
| <p>Nescio's <a href="https://stackoverflow.com/questions/188225/how-to-assign-keyboard-shortcut-to-source-control-commands-in-visual-studio-2008#188256">answer</a> is on the money. Here's a little more info:</p>
<ul>
<li>The shortcut assignment can be made at <code>Tools | Options | Environment | Keyboard</code></li>... | 22,814 |
<p>During software development, there may be bugs in the codebase which are known issues. These bugs will cause the regression/unit tests to fail, if the tests have been written well.</p>
<p>There is constant debate in our teams about how failing tests should be managed:</p>
<ol>
<li><p>Comment out failing test case... | <p>I would leave your test cases in. In my experience, commenting out code with something like</p>
<pre><code>// TODO: fix test case
</code></pre>
<p>is akin to doing:</p>
<pre><code>// HAHA: you'll never revisit me
</code></pre>
<p>In all seriousness, as you get closer to shipping, the desire to revisit TODO's i... | <p>I think you need a TODO watcher that produces the "TODO" comments from the code base. The TODO <em>is</em> your test metadata. It's one line in front of the known failure message and very easy to correlate.</p>
<p>TODO's are good. Use them. Actively management them by actually putting them into the backlog on ... | 18,860 |
<p>I am working on a project converting a "spreadsheet application" to a database solution. A macro was written that takes screen shots of each page and pastes them into a PowerPoint presentation. Because of the nice formatting options in Excel, the presentation looks very pretty.</p>
<p>The problem I'm having is th... | <p>Access has the capability to create downright beautiful reports. The problem is that it can't make a spreadsheet look better than Excel. You have to know when to use each tool.</p>
<p>Use Excel when you have spreadsheet-like formatting, need a lot of boxes and lines, or want to draw charts.</p>
<p>Use Access when ... | <p>I personally would not try to re-invent the wheel here. If you already have an Excel sheet that has the formatting you want, just export the data from Access into Excel for the report. Now, if you didn't have the original Excel sheet to begin with, that would be a completely different story.</p>
<p>As for breakin... | 6,532 |
<p>We have a web application that can be deployed on many application servers, including Oracle 10g. On that platform, however, we are having classpath issues. The webapp uses JAXB 2, but Oracle 10g ships with JAXB 1, and this was causing errors. To get around those we configured Oracle to prefer classes in our weba... | <p>This class is in half the WS Java libraries out there. It's really easy to load it from multiple classloaders and later compare them, causing a LinkageError.</p>
<p>One effective (but sledgehammer) technique to tracking this down is to modify Classloader from the Java source to dump which jar this particular class... | <p>May be it's completely unrelated, but I remember a problem Weblogic had with the very same class. The reason for the problem was the changed serial id of the class (Sun changed it accidentally). The workaround was to provide a -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 to the JVM.</p>
<p>Could ... | 16,218 |
<p>I am trying to manipulate a string using Jython, I have included below an example string:</p>
<p>This would be a title for a website :: SiteName<br />
This would be a title for a website :: SiteName :: SiteName</p>
<p>How to remove all instances of ":: Sitename" or ":: SiteName :: SiteName"?</p>
| <p>No different from regular Python:</p>
<pre><code>>>> str="This would be a title for a website :: SiteName"
>>> str.replace(":: SiteName","")
'This would be a title for a website '
>>> str="This would be a title for a website :: SiteName :: SiteName"
>>> str.replace(":: SiteName",... | <p>For such simple example it is unnecessary but in general you could use <code>re</code> module.</p>
<pre><code>import re
sitename = "sitename" #NOTE: case-insensitive
for s in ("This would be a title for a website :: SiteName :: SiteName",
"This would be a title for a website :: SiteName"):
print(re.s... | 28,486 |
<p>I am trying to figure out how to add a custom control to the iPhone MoviePlayer.
For an example of what I am trying to do see the following image.</p>
<p><img src="https://i.stack.imgur.com/Zt5MG.jpg" alt="alt text"></p>
<p>I am trying to add something like the controls on the right and left of the basic movie con... | <p>I found the BEST way to do this!</p>
<p>You create your movie player like normal and then do the following:</p>
<pre><code>id vvController = [theMovie videoViewController];
[[vvController _overlayView] addSubview:mainView];
</code></pre>
<p>Where 'mainView' is your custom overlay. Doing this makes it so your cust... | <p>I recommend VideoPlayerKit. Supports streaming, fullscreen, AirPlay. </p>
<p><a href="https://github.com/ign/VideoPlayerKit" rel="nofollow">https://github.com/ign/VideoPlayerKit</a></p>
| 23,116 |
<p>I usually create my SQL tables and stored procedures by writing a script inside Visual Studio. This works really well for me except for one simple annoyance: VS puts blue boxes around all the SQL queries and data-manipulation commands. The purpose of these boxes is to draw undue attention to the fact that VS thinks ... | <p>Open Visual Studio Tools --> options --> Database Tools --> General. Uncheck "Enable DML Markers"</p>
| <p>Set the color of the SQL query outline to the same color as the background.</p>
| 33,933 |
<p>I am digging into LINQ--trying to understand basic models (it seems pretty cool to me). The code below is the code to perform before committing an update. </p>
<pre><code> Linq01.Account acc = context.Accounts.Single( pc => pc.AccountID == AccountID );
acc.Name = textboxAccountNameRead.Text.Trim();
con... | <p>You should use <code>SingleOrDefault</code>, if the query does not return a value you can check it against null:</p>
<pre><code>var acc = context.Accounts.SingleOrDefault(pc => pc.AccountId == AccountId);
if(acc != null)
{
acc.Name = textboxAccountNameRead.Text.Trim();
context.SubmitChanges();
}
</code></pre... | <p>To add to Slace's answer, if you call Single and then account ID wasn't found, it will throw an exception. In <em>some</em> cases that's more appropriate than returning null and explicitly handling it.</p>
| 29,983 |
<p>I have a number of child tables that have a foreign key to a parent table.</p>
<p>How do I add an entry in the parent table and get the primary key of that entry, so that I can then enter rows in the child tables that point to the entry in the parent table?</p>
<p>I'm doing this in a MS Access Database from a C# a... | <p>Microsoft Access 2000 or later does support the @@IDENTITY property to retrieve the value of an Autonumber field after an INSERT. (<a href="http://msdn.microsoft.com/en-us/library/ks9f57t0(VS.71).aspx" rel="nofollow noreferrer">msdn</a>)</p>
<p>Edit: <a href="http://msdn.microsoft.com/en-us/library/ks9f57t0.aspx" r... | <p>Should be able to SELECT @@IDENTITY even though you will have to use a second query to do so. I don't think MS Access will allow it to be combined into one query.</p>
| 21,746 |
<p>This is a real issue that applies on tagging items in general (and yes, this applies to StackOverflow too, and no, it is not a question about StackOverflow).</p>
<p>The whole tagging issue helps cluster similar items, whatever items they may be (jokes, blog posts, so questions etc). However, there (usually but not ... | <p>This is a tough question. The two extremes are an ontology (everything is hierarchical) and a folksonomy (tags have no hierarchy). I have <a href="http://wiki.answers.com/Q/What_is_the_best_way_to_integrate_Taxonomy_with_Folksonomy_with_respect_to_creating_a_database_of_skills_that_can_be_tagged_but_also_searched_fo... | <p>The mechanism I have implemented was to not use the tags given themselves, but an indirect lookup table (not strictly DBMS terms) which links a tag to many implied tags (obviously, a tag is linked with itself for this to work).</p>
<p>In a python project, the lookup table is a dictionary keyed on tags, with values ... | 14,669 |
<p>This might be a similar problem to my earlier two questions - see <a href="https://stackoverflow.com/questions/169934/any-scrubyt-command-that-clicks-a-link-returns-a-403-forbidden-error">here</a> and <a href="https://stackoverflow.com/questions/168868/how-to-get-next-page-link-with-scrubyt">here</a> but I'm trying ... | <p>I had the same issue with relative links and fixed it like this... you have to set the :resolve param to the correct base url</p>
<pre><code> event do
title 'The Coast of Mayo'
link_url
event_detail :resolve => 'http://www.nuffieldtheatre.co.uk/cn/events' do
dates "1-4 October"
times "7:... | <p>Sorry I have no idea why this would be nil - every time I have run this it returns a url - the method self.fetch requires a URL which you should be able to access as the local variable doc_url. If this returns nil also may you should post the code where you have included the debugger call.</p>
| 20,559 |
<p>I need to serve up a few .asp pages from within my ASP.NET site.</p>
<p>This ASP.NET site has a handler that allows us to serve up pages out of the database instead of finding them on disk (where the .asp files are located).</p>
<p>The problem appears to be that the .NET isapi (C:\WINDOWS\Microsoft.NET\Framework\v... | <p>one alternative is to set up a virtual directory which only can execute .asp and without asp.net support.</p>
| <p>It sounds like you have a wild card script mapping in your application configuration forwarding all requests into the aspnet_isapi.dll. Is the a .asp mapping to asp.dll?</p>
| 47,372 |
<p>With a view to avoiding the construction of further barriers to migration whilst
enhancing an existing vb6 program.
Is there a way to achieve the same functionality as control arrays in vb6 without using them?</p>
| <p>In .NET you have a tag property. You can also have the same delegate handle events raised by multiple controls. Set the Tag property of the new control to the Index. </p>
<pre><code>Private Sub MyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click,Button2.Click
Di... | <p>Well, you could always create your own array of controls in code :) Perhaps a better container, though, is a Collection or Dictionary object. Depending on what you want to do, you could perhaps create a wrapper class for the control with a custom collection class... but creating an object model is far nicer using ge... | 22,967 |
<p>I would like to know and understand the steps involved in fetching mail from pop3 server
using plain c language </p>
| <p>Steps:</p>
<ol>
<li>Connect to the server's port (usually 995) using <a href="http://www.openssl.org/docs/ssl/ssl.html" rel="nofollow noreferrer">OpenSSL</a></li>
<li>Verify the certificate</li>
<li>Send regular pop3 commands over the SSL socket you just opened. (LIST, RETR and so on)</li>
<li>Retrieve the response... | <p>Use one of the thousands of libraries that already exist such as <a href="http://brouits.free.fr/libspopc/" rel="nofollow noreferrer">libspopc</a>.</p>
| 16,660 |
<p>We have a large MS Access project that requires GUI functionality that is difficult / impossible to do in the VBA / access forms environment. </p>
<p>Over time, we wish to re-write / migrate to a managed C# environment with WPF as the presentation layer.</p>
<p>The only practical way for us to do this is over a lo... | <p>What if you look into Visual Studio Tools for Office (VSTO) ?
You can write managed .NET addins for Office in C#, that will integrate as ribbons with office.</p>
<p>Now, the problem is that Access add-ins are not supported in VSTO AFAIK.
But, take a look <a href="http://blogs.msdn.com/andreww/archive/2008/02/19/vst... | <p>Thank you badbadboy - I will certainly experiment with this (using VSTO).</p>
<p>The <a href="http://blogs.msdn.com/andreww/archive/2008/02/19/vsto-add-ins-for-access.aspx" rel="nofollow noreferrer">solution</a> you suggested to allow VSTO to work with ms access, does seem slight hackery - not that I mind this, but... | 40,373 |
<p>I get the following error when building my Windows Forms solution: </p>
<blockquote>
<p>"LC.exe" exited with code -1</p>
</blockquote>
<p>I use two commercial Windows Forms Libraries: Infragistics and the Gantt-Control from plexityhide.com, that's why I have licenses.licx files in my WinForms Projects. We also u... | <p>Problem mainly arises due to license file. Exclude the file <code>licenses.licx</code> from your project</p>
| <p>There should be a <code>license.licx</code> file in the properties folder when you use commercial components. It is often corrupted. If you clean its contents, the <code>"LC.EXE" exited with code -1</code> disappears.</p>
| 5,446 |
<p>I've modified the Agile task template in TFS to include a new 'In Progress' state. When work is started on an item the 'assigned user' will set the task from 'Active' to 'In Progress'. This helps me to know which tasks have been started.</p>
<p>I was, however, thinking that I might be able to use this new state t... | <p>I don't have access to TFS so I am not sure if this is already built can't confirm, but one option you have is to add two new fields to the workitem, for the start and stop dates. You can have the worflow set those variables when you transition into and outof a state.</p>
| <p>I am curious as to the answer as well.</p>
<p>One thing to take into account, though, is that if a task runs over a weekend, you would not want those days to be taken into account if you are looking for a measure of "developer days". Taking it a step further, it would be nice to be able to somehow define days that... | 49,978 |
<p>Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo?</p>
| <p>Check <a href="http://www.abstraction-systems.com/ttf/HTML/TTFactory_TaskBasedTutorials_UltraWinGrid.htm" rel="nofollow noreferrer">this</a> out.</p>
<p>They don't convert the coordinates, but they use a special Infragistics grid event (<a href="http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/... | <p>There's a <code>.MousePosition</code> property which returns <code>System.Drawing.Point</code> and "Gets the position of the mouse cursor in screen coordinates" but I'm using an older version of their UltraWinGrid (2003).</p>
<p>They have a <a href="http://www.infragistics.com/downloads/default.aspx" rel="nofollow ... | 9,739 |
<p>Is there any way to use inheritance in database (Specifically in SQL Server 2005)?</p>
<p>Suppose I have few field like <strong>CreatedOn</strong>, <strong>CreatedBy</strong> which I want to add on all of my entities. I looking for an alternative way instead of adding these fields to every table.</p>
| <p>There is no such thing as inheritance between tables in SQL Server 2005, and as noted by the others, you can get as far as getting help adding the necessary columns to the tables when you create them, but it won't be inheritance as you know it.</p>
<p>Think of it more like a template for your source code files.</p>... | <p>You could create a template in the template pane in Management Studio. And then use that template every time you want to create a new table.</p>
<p>Failing that, you could store the CreatedOn and CreatedBy fields in an Audit trail table referencing the original table and id.</p>
<p>Failing that, do it manually.</p... | 2,764 |
<p>I am looking for a LaTeX package that does syntax highlighting on code. For example, right now I use the verbatim block to write code:</p>
<pre><code>\begin{verbatim}
<html>
<head>
<title>Hello</title>
</head>
<body>Hello</body>
</... | <p>You can use the <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/listings/" rel="noreferrer">listings</a> package. It supports many different languages and there are lots of options for customising the output.</p>
<pre><code>\documentclass{article}
\usepackage{listings}
\begin{document}
\begin{lstlist... | <p>I would suggest defining your own package based on the following tex code; this gives you complete freedom. <a href="http://ubuntuforums.org/archive/index.php/t-331602.html" rel="nofollow noreferrer">http://ubuntuforums.org/archive/index.php/t-331602.html</a></p>
| 38,527 |
<p>Just wondering if there is anything built-in to Javascript that can take a Form and return the query parameters, eg: <code>"var1=value&var2=value2&arr[]=foo&arr[]=bar..."</code></p>
<p>I've been wondering this for years.</p>
| <p>2k20 update: use <a href="https://stackoverflow.com/a/49701878/2750743">Josh's</a> solution with <a href="https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/toString" rel="noreferrer">URLSearchParams.toString()</a>.</p>
<p>Old answer:</p>
<hr>
<p>Without jQuery</p>
<pre><code>var params = {
par... | <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var params = { width:1680, height:1050 };
var str = jQuery.param( params );
console.log(str)</code></pre>
<pre class="snippet... | 40,905 |
<p>I've been trying to find a solution to a problem I've been having recently whereby the bottom layers of my print (1.2 mm; 12 layers) are either being compressed. over extruded or both. The problem results in the nozzle being dragged through previously extruded filament leaving deep groove marks and the bottom l... | <p>The first thing that comes to mind is that, even though you have levelled the bed, the print nozzle may be too close causing too much "squish" on the first layer. Squish isn't bad as it promotes adhesion, but in your case, as you are looking for finer tolerances on the holes, it may be a problem. I use a feeler gaug... | <p>I had similar issues during the past few days. My first 3~5 layers overlapped. I ended up with figuring out it was the screws to mount Z stepper became loose and the stepper shifted itself downwards instead shifting up the nozzle for the first several layers, until the stepper had nowhere to go.</p>
| 1,595 |
<p>MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from web services.</p>
<p>How does it work in general?</p>
| <p>If you put <a href="http://www.wireshark.org/" rel="noreferrer">Wireshark</a> (or enabled <a href="http://blogs.msdn.com/dgorti/archive/2005/09/18/471003.aspx" rel="noreferrer">System.Net Logging</a>) on the non-MTOM enabled service, you should see the SOAP requests with the binary data encoded as BASE64. Sending it... | <p>There are a few factors that other answers don't mention. One might think why MTOM is not used as default since it's <em>"faster"</em> than Text message encoding (Base64). It's because MTOM is not faster always. MTOM should only be used on large message transfers because it comes with an overhead. For small size of ... | 26,518 |
<p>Is there a way to define a macro that contains a <code>#include</code>
directive in its body?</p>
<p>If I just put
the "<code>#include</code>", it gives the error</p>
<pre><code>C2162: "expected macro formal parameter"
</code></pre>
<p>since here I am not using <code>#</code> to concatenate strings.<br>
If I use ... | <p>So like the others say, no, you can't have #include statements inside a macro, since the preprocessor only does one pass. However, you can make the preprocessor do basically the same thing with a gnarly trick I found myself using recently.</p>
<p>Realise that preprocessor directives won't do anything inside a macro... | <p>Contagious is right -- if you're doing:</p>
<p>myFile.c:</p>
<pre><code>#include "standardAppDefs.h"
#myStandardIncludeMacro
</code></pre>
<p>standardAppDefs.h:</p>
<pre><code>#define myStandardIncludeMacro #include <foo.h>
</code></pre>
<p>Why not just say:</p>
<p>myFile.c:</p>
<pre><code>#include "sta... | 33,412 |
<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>From time to time am I working in a completely disconnected environment with a Macbook Pro. For testing purposes I need to run a local DNS server in a VMWare session. I've configured the lookup system to use the DNS server (/etc/resolve.conf and through the network configuration panel, which is using configd underne... | <p>On OS X starting in 10.4, <code>/etc/resolv.conf</code> is no longer the canonical location for DNS IP addresses. Some Unix tools such as <code>dig</code> and <code>nslookup</code> will use it directly, but anything that uses Unix or Mac APIs to do DNS lookups will not. Instead, configd maintains a database which ... | <p>I run into this from time to time on different notebooks, and I have found the simplest is a low-tech, non software solution - create an ethernet loopback connecter. You can do it in 2 minutes with an old network cable, just cut the end off and join the send and receive pair just above the RJ45 connector. (obviously... | 9,155 |
<p>Is there a way to cast a user control as a specific user control so I have access to it's public properties? Basicly I'm foreaching through a placeholder's controls collection and I'm trying to access the user control's public properties.</p>
<pre><code>foreach(UserControl uc in plhMediaBuys.Controls)
{
uc.Pulb... | <pre><code>foreach(UserControl uc in plhMediaBuys.Controls) {
MyControl c = uc as MyControl;
if (c != null) {
c.PublicPropertyIWantAccessTo;
}
}
</code></pre>
| <h2>Casting</h2>
<p>I prefer to use:</p>
<pre><code>foreach(UserControl uc in plhMediaBuys.Controls)
{
ParticularUCType myControl = uc as ParticularUCType;
if (myControl != null)
{
// do stuff with myControl.PulblicPropertyIWantAccessTo;
}
}
</code></pre>
<p>Mainly because using the is keywor... | 28,101 |
<p>I downloaded Hex Workshop, and I was told to read a .dbc file.</p>
<blockquote>
<p>It should contain 28,315 if you read
offset 0x04 and 0x05</p>
</blockquote>
<p>I am unsure how to do this? What does 0x04 mean?</p>
| <p>0x04 is hex for 4 (the 0x is just a common prefix convention for base 16 representation of numbers - since many people think in decimal), and that would be the fourth byte (since they are saying offset, they probably count the first byte as byte 0, so offset 0x04 would be the 5th byte).</p>
<p>I guess they are sayi... | <p>Start <a href="http://en.wikipedia.org/wiki/Hexadecimal" rel="nofollow noreferrer">here</a>. Once you learn how to read hexadecimal values, you'll be in much better shape to actually solve your problem.</p>
| 17,063 |
<p>This came to my mind after I learned the following from <a href="http://www.stackoverflow.com/questions/8941/generic-type-checking">this question</a>:</p>
<pre><code>where T : struct
</code></pre>
<p>We, C# developers, all know the basics of C#. I mean declarations, conditionals, loops, operators, etc.</p>
<p>Som... | <p>This isn't C# per se, but I haven't seen anyone who really uses <code>System.IO.Path.Combine()</code> to the extent that they should. In fact, the whole Path class is really useful, but <strong>no one uses it!</strong></p>
<p>I'm willing to bet that every production app has the following code, even though it should... | <p>I don't know if this is a hidden feature (""). Any string function.</p>
| 3,052 |
<p>Consider:</p>
<pre><code>List<String> someList = new ArrayList<String>();
// add "monkey", "donkey", "skeleton key" to someList
</code></pre>
<pre><code>for (String item : someList) {
System.out.println(item);
}
</code></pre>
<p>What would the equivalent <code>for</code> loop look like without u... | <pre><code>for (Iterator<String> i = someIterable.iterator(); i.hasNext();) {
String item = i.next();
System.out.println(item);
}
</code></pre>
<p>Note that if you need to use <code>i.remove();</code> in your loop, or access the actual iterator in some way, you cannot use the <code>for ( : )</code> idiom... | <p>Using <em>forEach</em>:</p>
<pre class="lang-java prettyprint-override"><code>int[] numbers = {1,2,3,4,5};
Arrays.stream(numbers).forEach(System.out::println);
</code></pre>
<p>Response:</p>
<pre class="lang-none prettyprint-override"><code>1
2
3
4
5
The process finished with exit code 0
</code></pre>
<p>PS: You n... | 11,078 |
<p>So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page. </p>
<p>What the users have figured out is that they don't... | <p>Don't do this, just don't. It's bad interface design and forces the user's browser to behave in a way that they don't expect.</p>
<p>I would regard any script that successfully stopped my back button from working to be a hack, and I would expect the IE team to release a security-fix for it.</p>
<p>The back button ... | <p>There simply is no reliable way to do this. You cannot guarantee that 100% of the time you can stop the user from doing this.</p>
<p>With that in mind, is it worth going to extremely exotic solutions to disable "most" of the time? That's for you to decide.</p>
<p>Good luck.</p>
| 7,815 |
<p>My project uses Java libraries that have their own dependencies (Hadoop, Jetty for example). I end up with different versions of the same dependencies, like ant 1.4.5, 1.4.6. My project may want to use ant 1.4.7. This is a small example, can get more complicated with larger dependencies like HTTP Commons.</p>
<p... | <p>You may choose to manage all of these with a depenency management framework - like OSGI. Take a look at the spring framework dynamic modules <a href="http://www.springsource.org/osgi" rel="nofollow noreferrer">http://www.springsource.org/osgi</a></p>
<p>You can also take a look at the part of the framework where Ec... | <p>J G mentioned OSGi which was even my first thought when reading this question.</p>
<p>Having multiple versions of the same library is a strong point in OSGi.
If we have some third party products already mentioned i think its fair to mention the specification behind it as well. </p>
<p>You can get it from the offic... | 34,556 |
<p>I run a rather complex project with several independent applications. These use however a couple of shared components. So I have a source tree looking something like the below.</p>
<ul>
<li>My Project
<ul>
<li>Application A</li>
<li>Shared1</li>
<li>Shared2 </li>
<li>Application B </li>
<li>Application C</li>
</u... | <p>Your scheme is sound and achievable in VSS (although I would suggest you consider an alternative, VSS is really an outdated product).</p>
<p>For your "CI" Build - you would do the Versioning take a look at <a href="http://msbuildtasks.tigris.org/" rel="nofollow noreferrer">MSBuild Community Tasks Project</a> which ... | <p>UppercuT can do all of this with a custom packaging task to split the applications up. And to get the version number of the source, you might think about Subversion.</p>
<p>It's also insanely easy to get started.</p>
<p><a href="http://code.google.com/p/uppercut/" rel="nofollow noreferrer">http://code.google.com/... | 8,209 |
<p>What problems does MEF (Managed Extensibility Framework) solves that cannot be solved by existing IoC/DI containers?</p>
| <p>The principle purpose of MEF is extensibility; to serve as a 'plug-in' framework for when the author of the application and the author of the plug-in (<em>extension</em>) are different and have no particular knowledge of each other beyond a published interface (<em>contract</em>) library. </p>
<p>Another problem sp... | <p>Scott Hanselman and I covered this topic in more detail in the recent hanselminutes.</p>
<p><a href="http://www.hanselminutes.com/default.aspx?showID=166" rel="noreferrer">http://www.hanselminutes.com/default.aspx?showID=166</a> </p>
| 13,352 |
<p>I come across this problem when i am writing an event handler in SharePoint. My event handler has a web reference. When i create this web reference, the URL of the web service will be added in the .config file of the assembly. If i have to change the web reference URL i just have to change the link in the config fil... | <p>If you have Visual Studio 2008, use a Service Reference instead of a Web Reference, which will generate partial classes that you can use to override functionality without your code overwritten by the generator.</p>
<p>For Visual Studio 2005, you could just add the <em>partial</em> keyword to the class in Reference.... | <p>You could try this: Rather than using the dynamic web reference make it a static reference so that the code in Reference.cs won't go looking for a value in the .config file for the url. Then sub-class the generated web service client code and in that derived class, add your own logic to set the .Url property. Then... | 15,238 |
<p>I subscribe to a newsletter from www.sqlservercentral.com that I like because each day I get an email digest with some interesting headlines & summaries of SQL Server articles that are already out there on the web. It's a great way to learn something new a bit at a time.</p>
<p>Is there something like this for... | <p>In addition to <a href="http://www.codeproject.com/" rel="noreferrer">codeproject</a>, I believe there are other sites like <a href="http://www.c-sharpcorner.com/" rel="noreferrer">C# Corner</a>, <a href="http://www.csharphelp.com/" rel="noreferrer">C# help</a> which does the same..</p>
<p>Couple more I found usefu... | <p>check out <a href="http://wwww.codeproject.com" rel="nofollow noreferrer" title="wwww.codeproject.com">wwww.codeproject.com</a> they have a lot of articles and various newsletters.</p>
| 23,699 |
<p>I have a DataGrid, populated with objects in an ArrayCollection. After updating one of the objects' fields, I want the screen to update. The data source is not bindable, because I'm constructing it at runtime (and I don't understand how to make it bindable on the fly yet -- that's another question).</p>
<p>In thi... | <p>invalidateList tells the component that the data has changed, and it needs to reload it and re-render it.</p>
<p>invalidateDisplayList tells the component that it needs to redraw itself (but not necessarily reload its data).</p>
| <p>invalidateDisplayList() merely sets a flag so that updateDisplayList() can be called later during a screen update. invalidateList() is what you want. </p>
<p><a href="http://livedocs.adobe.com/flex/2/langref/mx/core/UIComponent.html#invalidateDisplayList()" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/2... | 9,995 |
<p>What are the key use cases for the use of virtualization -- that is, running one or more "virtual PCs" using software such as <a href="http://www.vmware.com/" rel="nofollow noreferrer">VMWare</a> and <a href="http://www.microsoft.com/windows/products/winfamily/virtualpc/default.mspx" rel="nofollow noreferrer">Micros... | <p>Application testing in multiple environments is one obvious use of virtualization that I'm aware of. Testing your application on other operating systems (without requiring additional physical computers to do so), as well as testing that involves software that generally only allows you to install a single version on... | <p>Some server applications can use VMs too. When one vm is not used much, the server can locate the resources to other vms.</p>
| 25,205 |
<p>Say I have a table called "xml" that stores XML files in a single column "data". How would I write a MySQL query that run an XPath and return only rows matching that XPath?</p>
| <pre><code>SELECT * FROM xml
WHERE EXTRACTVALUE(data, '<xpath-expr>') != '';
</code></pre>
<p>You should note, however, that there are limitations to MySQL's support of XPath.</p>
<ul>
<li><code>EXTRACTVALUE()</code> returns only CDATA.</li>
<li>Not all XPath constructions are supported. Details under the head... | <p>I just got the answer from a colleague, it seems trimming the xml often helps:</p>
<pre><code>select * from xml where
trim(both '\r\n' from ExtractValue(xml, '/some/xpath')) = 'value';
</code></pre>
| 45,470 |
<p>It seems that programming ON a mobile device (instead of FOR a mobile device) could be easier if a lisp existed that run on J2ME. </p>
<p>Do you know any (preferably opensource) lisp/smalltalk apps?
I searched the web and I couldn't find a working J2ME lisp.
Is it so difficult to port it to J2ME?</p>
<p>Thanks</p... | <p>I managed myself to make <a href="http://norvig.com/jscheme.html" rel="nofollow noreferrer">http://norvig.com/jscheme.html</a> work in j2me, by removing all UI related classes...It worked, but my cellphone is TOO small and I dont have the time...
I've only tested it with some (fac n)... but lisp is not for me, I'm n... | <p>You could try <a href="http://www.gnu.org/software/kawa/" rel="nofollow noreferrer">Kawa</a>, but I am not certain it will run.</p>
| 42,889 |
<p>Are there any statistics regarding how many units each manufacturer has sold, e.g. in 2019?</p>
<p><a href="https://3dprinterchat.com/top-selling-3d-printers/" rel="nofollow noreferrer">An article</a> from 2016 claims Monoprice to have led the market back then - but all of the printers in that article have become o... | <p>Getting this data is not easy. Many companies that make 3D printers are either private companies that do not report results or are larger companies where 3D printers are one of many products they manufacture. Some companies study this information through mining public sources and surveying users for their opinions... | <p>For sales figures of the smaller companies; it is very difficult because they don't publish (esp the Chinese brands). For the larger organizations there is </p>
<p>The Wholler's Report <a href="https://wohlersassociates.com/2019report.htm" rel="nofollow noreferrer">https://wohlersassociates.com/2019report.htm</a></... | 1,557 |
<p>Can someone suggest a small webserver implementation that will illustrate the concepts of what a webserver does? It should be in a language that is easily read, and understood, and should implement security and cgi, maybe javascript? </p>
| <p><a href="http://www.acme.com/software/thttpd/" rel="nofollow noreferrer">thttpd</a>, a tiny/turbo/throttling http server.</p>
<p>It is written in C. If by "a language that is easily read" you meant "not C," then nevermind.</p>
| <p><a href="http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=webserver.r" rel="nofollow noreferrer">http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=webserver.r</a></p>
<p>A web server written in a few lines - easily understood.</p>
<p>or, this one, with CGI</p>
<p><a href="http://www.r... | 35,679 |
<p>When authoring a library in a particular namespace, it's often convenient to provide overloaded operators for the classes in that namespace. It seems (at least with g++) that the overloaded operators can be implemented either in the library's namespace:</p>
<pre><code>namespace Lib {
class A {
};
A operator+(cons... | <p>You should define them in the library namespace.
The compiler will find them anyway through argument dependant lookup.</p>
<p>No need to pollute the global namespace.</p>
| <p>You should define it in the namespace, both because the syntax will be less verbose and not to clutter the global namespace.</p>
<p>Actually, if you define your overloads in your class definition, this becomes a moot question:</p>
<pre><code>namespace Lib {
class A {
public:
A operator+(const A&);
};
} /... | 20,720 |
<p>Within a spring webflow, i need to implement a navigation bar that will allow to "step back" or resume the flow to one of the previous view.</p>
<p>For example :</p>
<ul>
<li>View 1 = login</li>
<li>View 2 = My informations</li>
<li>View 3 = My messages</li>
<li>View 4 = Close session</li>
</ul>
<p>For this examp... | <p>It depends how you're going about doing this. If you're doing this within a single flow, you'll have something like this:</p>
<pre><code><view-state id="loginView" view="login.jsp">
<action-state bean="someBean" method="login" />
<transition on="success" to="informationView" />
</view-... | <p>I did this by defining some global flow that represented the tabs. I then defined an object that represented the tabs on the flows and indicated if the current tab was active. When the user moved through the tabs I updated the tab object as appropriate.</p>
<p>When the user went to click on one of the tabs it use... | 21,014 |
<p>Is the following safe?</p>
<p>I am new to threading and I want to delegate a time consuming process to a separate thread in my C++ program.
Using the boost libraries I have written code something like this:</p>
<p>thrd = new boost::thread(boost::bind(&myclass::mymethod, this, &finished_flag);</p>
<p>Where... | <p>You never mentioned the type of finished_flag...</p>
<p>If it's a straight <strong>bool</strong>, then it might work, but it's certainly bad practice, for several reasons. First, some compilers will cache the reads of the <em>finished_flag</em> variable, since the compiler doesn't always pick up the fact that it's ... | <p>Having the thread set a flag (or signal an event) before it exits is a race condition. The thread has not necessarily returned to the OS yet, and may still be executing. </p>
<p>For example, consider a program that loads a dynamic library (pseudocode):</p>
<pre><code>lib = loadLibrary("someLibrary");
fun = getFunc... | 5,433 |
<p>My team works on a project in cvs containing about 20,000 Java files. Because of the number of files, it takes a while to do a cvs update. I typically keep about 5 copies of the entire tree checked out, to make it easy to check in different requests without worrying about which files were modified for each. It's ... | <p>I use Git as a Subversion client on a large project (on the order of 10k files). Git is fast, really fast. It's so fast that I only keep <em>one</em> working clone, and switch between feature branches within that same clone. Like you, when I used Subversion I would have two or three similar checkouts and would switc... | <p>We do something similar at work. We basically use the <code>master</code> branch in git as a single, updated CVS version of the code; we don't do any development there, just CVS updates. Then, all of our development projects happen on feature branches that we rebase. When we do CVS updates on the <code>master</co... | 41,565 |
<p>Is there any alternative to stored procedures, secure and fast as well as stored procs. i know only Hibernate. Is there any other technologies like that?</p>
| <p>Stored procedures are a place to put code (SQL) which executes on the database, so I understand the question to mean </p>
<p><strong>"is there any other way to package up the code which runs on the database?"</strong></p>
<p>There are several answers: </p>
<ul>
<li>There is nothing else that is <em>quite</em> the... | <p>Hmm, seems to me that the obvious alternative to stored procedures is to write application code. Instead of, say, writing a store procedure to post a debit every time a credit is posted, you could write application code that writes both.</p>
<p>Maybe I'm being too simplistic here or missing the point of the questio... | 21,136 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.