text
stringlengths
8
267k
meta
dict
Q: ASP.NET - The request was aborted: Could not create SSL/TLS secure channel We get the following error; The request was aborted: Could not create SSL/TLS secure channel while using a WebRequest object to make an HTTPS request. The funny thing is that this only happens after a while, and is temporarily fixed when the...
{ "language": "en", "url": "https://stackoverflow.com/questions/42215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simple effects in Flex I would like to show some hidden text in a Flex application and have it fade out in a couple of seconds... I have looked into Delay and Pause effects in Flex, but have yet to see an example of how to do this realistically easy effect... anyone now how to do it or have a good resource? Thanks. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Make a CD run once We're doing an "Amazing Race" kind of event, and thought it would be cool to have CDs that could only play once... like a "this message will self destruct in 5 seconds..." Any thoughts on how to do this? I was thinking it could be a compiled HTML website that would write a cookie and only play o...
{ "language": "en", "url": "https://stackoverflow.com/questions/42239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Subversion Partial Export I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. Right now the solution I have worked out is to update my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are semicolons needed after an object literal assignment in JavaScript? The following code illustrates an object literal being assigned, but with no semicolon afterwards: var literal = { say: function(msg) { alert(msg); } } literal.say("hello world!"); This appears to be legal, and doesn't issue a warning (at l...
{ "language": "en", "url": "https://stackoverflow.com/questions/42247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Whither Managed Extensibility Framework for .NET? Has anyone worked much with Microsoft's Managed Extensibility Framework (MEF)? Kinda sounds like it's trying to be all things to all people - It's an add-in manager! It's duck typing! I'm wondering if anyone has an experience with it, positive or negative. We're curr...
{ "language": "en", "url": "https://stackoverflow.com/questions/42251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do you pause before fading an element out using jQuery? I would like to flash a success message on my page. I am using the jQuery fadeOut method to fade and then remove the element. I can increase the duration to make it last longer, however this looks strange. What I would like to happen is have the element be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Twitching Consumption of Web Services from Web Site to Web Application I am trying to consume multiple Web Services that redefine some of the same common classes in their wsdl. I currently have them referenced in a Web Site, but I want to convert to Web Application. Since some of the same classes are redefined from...
{ "language": "en", "url": "https://stackoverflow.com/questions/42262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: .Net [Windows] TreeView TreeNode does not retain color change after drag and drop I have a form with 2 tree views, the user can drag and drop a node from one to another. After a node has been dragged and dropped, I change the color[highlight] of the source node in the Drag-Drop event handles.The color of the node ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/42272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: IE6 and Caching It seems that IE6 ignores any form of cache invalidation sent via http headers, I've tried setting Pragma to No Cache and setting Cache Expiration to the current time, yet in IE6, hitting back will always pull up a cached version of a page I am working on. Is there a specific HTTP Header that IE6 doe...
{ "language": "en", "url": "https://stackoverflow.com/questions/42281", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which way do you prefer to create your forms in MVC? Which way do you prefer to create your forms in MVC? <% Html.Form() { %> <% } %> Or <form action="<%= Url.Action("ManageImage", "UserAccount") %>" method="post"> </form> I understand that Html.Form() as of PR5 now just uses the URL provided by the request. Howe...
{ "language": "en", "url": "https://stackoverflow.com/questions/42282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the best way to read the contents of a text file to a string in .NET? It seems like there should be something shorter than this: private string LoadFromFile(string path) { try { string fileContents; using(StreamReader rdr = File.OpenText(path)) { fileContents = rdr.ReadT...
{ "language": "en", "url": "https://stackoverflow.com/questions/42286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you get the footer to stay at the bottom of a Web page? I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "343" }
Q: Tool to track #include dependencies Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly. A: Thanks to KeithB. I looked up the docs for cl.exe (VS2008) and found the /showIncludes flag. From the IDE, this can b...
{ "language": "en", "url": "https://stackoverflow.com/questions/42308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "187" }
Q: Are There Adapters for CF Type II to MicroSD? I honestly have only started recently researching this so my knowledge is limited. I was approached about adapting some Pocket PC software to operate on the Windows 6 platform. After considering how I would go about doing that in the Compact Framework I received more det...
{ "language": "en", "url": "https://stackoverflow.com/questions/42312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Real image width with JavaScript I have the next function: function setImagesWidth(id,width) { var images = document.getElementById(id).getElementsByTagName("img"); for(var i = 0; i < images.length;i++) { // If the real width is bigger than width parameter images[i].style.width=width; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to display a live streaming video using VideoDisplay in Flex I'm wondering how to use a VideoDisplay object (defined in MXML) to display video streamed from FMS via a NetStream. The Flex3 docs suggest this is possible: The Video Display ... supports progressive download over HTTP, streaming from the Flash Media...
{ "language": "en", "url": "https://stackoverflow.com/questions/42333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: IE6 rending UL's incorrectly Sometimes IE6 will render the text of a <ul> list the same color as the background color. If you select it, they show back up, or if you scroll the page up and back down. It is obviously a rendering bug, but I was wondering if anyone knows of a workaround to make it reliable? A: try giv...
{ "language": "en", "url": "https://stackoverflow.com/questions/42342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to evaluate an IP? How can I determine if a string is an IP address? Either IPv4 or IPv6? What is the least and most number of characters? I assume this would be a regex answer. A: In .NET there's an IPAddress type which has a handy method TryParse. Example: if(System.Net.IPAddress.TryParse(PossibleIPAddress, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42345", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you check your URL for SQL Injection Attacks? I've seen a few attempted SQL injection attacks on one of my web sites. It comes in the form of a query string that includes the "cast" keyword and a bunch of hex characters which when "decoded" are an injection of banner adverts into the DB. My solution is to sca...
{ "language": "en", "url": "https://stackoverflow.com/questions/42357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What does the EXE do in the Visual Studio setup project output We are working on a winforms app in Visual Studio 2005 and the setup project we created output both an MSI and an EXE. We aren't sure what the EXE file is used for because we are able to install without the EXE. A: It's a bootstrapper that checks to ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/42366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Java object allocation overhead I am writing an immutable DOM tree in Java, to simplify access from multiple threads.* However, it does need to support inserts and updates as fast as possible. And since it is immutable, if I make a change to a node on the N'th level of the tree, I need to allocate at least N new nod...
{ "language": "en", "url": "https://stackoverflow.com/questions/42383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the C# equivalent of the Oracle PL/SQL COALESCE function? Is there a one statement or one line way to accomplish something like this, where the string s is declared AND assigned the first non-null value in the expression? //pseudo-codeish string s = Coalesce(string1, string2, string3); or, more generally, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/42386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I write a While loop How do you write the syntax for a While loop? C# int i = 0; while (i != 10) { Console.WriteLine(i); i++; } VB.Net Dim i As Integer = 0 While i <> 10 Console.WriteLine(i) i += 1 End While PHP <?php while(CONDITION) { //Do something here. } ?> <?php //MySQL query stu...
{ "language": "en", "url": "https://stackoverflow.com/questions/42395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ASP.Net: why is my button's click/command events not binding/firing in a repeater? Here's the code from the ascx that has the repeater: <asp:Repeater ID="ListOfEmails" runat="server" > <HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate> <ItemTemplate> [Some other stuff is here] <asp:Butto...
{ "language": "en", "url": "https://stackoverflow.com/questions/42396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I implement OpenID in my web application? Does Stackoverflow create a new OpenID when a user registers with an email address (i.e. does not provide an existing OpenID)? How do you do that? Do you have code examples in C#? Java? Python? A: The Plaxo OpenID recipe (from the OpenID site) was one of the bett...
{ "language": "en", "url": "https://stackoverflow.com/questions/42407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How can I install libgluezilla on Ubuntu 8.04? I want to use the Web Browser control within an mono application, but when I do get the error "libgluezilla not found. To have webbrowser support, you need libgluezilla installed." Installing the Intrepid Deb causes any application that references the web browser contr...
{ "language": "en", "url": "https://stackoverflow.com/questions/42416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is reusing a variable in VB6 a good idea? Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak. EG: try dim mySQL as new sqlcommand(sSQL, cnInput) // do a sql execute and read the data mySQL = new sqlcommand(sSQLdifferent, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Window managers for Windows and Macs X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions. Are there any consistent ways for writi...
{ "language": "en", "url": "https://stackoverflow.com/questions/42428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to handle input from a keyboard "wedge" I'm writing a C# POS (point of sale) system that takes input from a keyboard wedge magcard reader. This means that any data it reads off of a mag stripe is entered as if it were typed on the keyboard very quickly. Currently I'm handling this by attaching to the KeyPre...
{ "language": "en", "url": "https://stackoverflow.com/questions/42437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What's the best way to detect the presence of SMO? I have some code that uses SMO to populate a list of available SQL Servers and databases. While we no longer support SQL Server 2000, it's possible that the code could get run on a machine that SQL Server 2000 and not have the SMO library installed. I would perfer...
{ "language": "en", "url": "https://stackoverflow.com/questions/42438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I convert an IntPtr to a Stream? class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString) { return Foo::Bar(??); } }; MemoryStream will take a byte[] but I'd like to do this without copying the data if possible. A: You can avoid the copy if you...
{ "language": "en", "url": "https://stackoverflow.com/questions/42446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is BCEL == monkeypatching for java? a colleague pointed me the other day to BCEL which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thought was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more thou...
{ "language": "en", "url": "https://stackoverflow.com/questions/42452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Custom titlebars/chrome in a WinForms app I'm almost certain I know the answer to this question, but I'm hoping there's something I've overlooked. Certain applications seem to have the Vista Aero look and feel to their caption bars and buttons even when running on Windows XP. (Google Chrome and Windows Live Photo G...
{ "language": "en", "url": "https://stackoverflow.com/questions/42460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: MSDN subscriptions on the cheap? As a long time Microsoft developer, I find MSDN to be an invaluable resource. However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Microsoft as I cannot justify paying such a hefty price for what is essentiall...
{ "language": "en", "url": "https://stackoverflow.com/questions/42466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: How do I measure bytes in/out of an IP port used for .NET remoting? I am using .NET remoting to retrieve periodic status updates from a Windows service into a 'controller' application which is used to display some live stats about what the service is doing. The resulting network traffic is huge - many times the size...
{ "language": "en", "url": "https://stackoverflow.com/questions/42468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Best way to extract text from a Word doc without using COM/automation? Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Simulated OLAP We have a client that has Oracle Standard, and a project that would be ten times easier addressed using OLAP. However, Oracle only supports OLAP in the Enterprise version. Migration to enterprise is not possible I'm thinking of doing some manual simulation of OLAP, creating relational tables to simula...
{ "language": "en", "url": "https://stackoverflow.com/questions/42483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to implement a "related" degree measure algorithm? I was going to Ask a Question earlier today when I was presented to a surprising functionality in Stackoverflow. When I wrote my question title stackoverflow suggested me several related questions and I found out that there was already two similar questions. Tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/42489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: TFS - Branching for experimental development: Solution fails to load Disclaimer: I'm stuck on TFS and I hate it. My source control structure looks like this: * */dev */releases */branches */experimental-upgrade I branched from dev to experimental-upgrade and didn't touch it. I then did some more work in dev...
{ "language": "en", "url": "https://stackoverflow.com/questions/42490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: asp:UpdateProgress - suppressing the line-break I've started working with ASP.net AJAX (finally ☺). and I've got an update panel together with a asp:UpdateProgress. My Problem: The UpdateProgress always forces a line-break, because it renders out as a div-tag. Is there any way to force it being a span instead? I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/42499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Thread-safe use of a singleton's members I have a C# singleton class that multiple classes use. Is access through Instance to the Toggle() method thread-safe? If yes, by what assumptions, rules, etc. If no, why and how can I fix it? public class MyClass { private static readonly MyClass instance = new MyClass();...
{ "language": "en", "url": "https://stackoverflow.com/questions/42505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Deleting a Google App Engine application Is it possible to delete an GAE application after it has been created? I made a mistake while typing the name and now have a dummy application that I haven't been able to remove. A: There currently isn't a way to delete a GAE application. A: I was evaluating if we could u...
{ "language": "en", "url": "https://stackoverflow.com/questions/42512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: Dealing with Latency in Networked Games I'm thinking about making a networked game. I'm a little new to this, and have already run into a lot of issues trying to put together a good plan for dead reckoning and network latency, so I'd love to see some good literature on the topic. I'll describe the methods I've con...
{ "language": "en", "url": "https://stackoverflow.com/questions/42515", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How do you rotate a two dimensional array? Inspired by Raymond Chen's post, say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff. [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6] Becomes: [3][9...
{ "language": "en", "url": "https://stackoverflow.com/questions/42519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "355" }
Q: How do I call ::CreateProcess in c++ to launch a Windows executable? Looking for an example that: * *Launches an EXE *Waits for the EXE to finish. *Properly closes all the handles when the executable finishes. A: Something like this: STARTUPINFO info={sizeof(info)}; PROCESS_INFORMATION processInfo; if (Create...
{ "language": "en", "url": "https://stackoverflow.com/questions/42531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: How can I draw a curve that varies in thickness along its path? I'm capturing data from a tablet using Java (JPen library rocks) and would like to be able to paint a penstroke in a more natural way. Currently I'm drawing the pen stroke as straight line segments each with a different Stroke thickness. There has to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Extract Address Information from a Web Page I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/42550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can't get my event to fire When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event. However, when clicking the button, after the page reloads, my event handler does not fire. Can anyone explain why? A: @Brad: You...
{ "language": "en", "url": "https://stackoverflow.com/questions/42554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to incorporate spell checkers with a build process I try to externalize all strings (and other constants) used in any application I write, for many reasons that are probably second-nature to most stack-overflowers, but one thing I would like to have is the ability to automate spell checking of any user-visi...
{ "language": "en", "url": "https://stackoverflow.com/questions/42557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Python and the Singleton Pattern What is the best way to implement the singleton pattern in Python? It seems impossible to declare the constructor private or protected as is normally done with the Singleton pattern...
{ "language": "en", "url": "https://stackoverflow.com/questions/42558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: Getting the Hostname or IP in Ruby on Rails I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on R...
{ "language": "en", "url": "https://stackoverflow.com/questions/42566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: Troubleshoot Java Lucene ignoring Field We're currently using Lucene 2.1.0 for our site search and we've hit a difficult problem: one of our index fields is being ignored during a targeted search. Here is the code for adding the field to a document in our index: // Add market_local to index contactDocument.add( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Python re.sub with a flag does not replace all occurrences The Python docs say: re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string... So ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: What View Engine are you using with ASP.NET MVC? I know you can use several different view engines with ASP.NET MVC: * *ASPX, obviously *NVelocity *Brail *NHaml *et al... The default ASPX view engine seems to make the most sense to me, coming from an ASP.NET WebForms background. But, I wanted to get an id...
{ "language": "en", "url": "https://stackoverflow.com/questions/42582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Double dispatch in C#? I have heard/read the term but don't quite understand what it means. When should I use this technique and how would I use it? Can anyone provide a good code sample? A: C# 4 introduces the pseudo type dynamic which resolves the function call at runtime (instead of compile time). (That is, the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Metalanaguage to describe the Model from MVC to generate identical client and server side code I am looking for a powerful meta-language to describa behaviour for an application i intend to use in offline mode (google-gears + javascript) and server side sqlite + (php/ruby/java etc) and looking for a good format to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/42610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL Server Views, blessing or curse? I once worked with an architect who banned the use of SQL views. His main reason was that views made it too easy for a thoughtless coder to needlessly involve joined tables which, if that coder tried harder, could be avoided altogether. Implicitly he was encouraging code reuse v...
{ "language": "en", "url": "https://stackoverflow.com/questions/42620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Best practices for portable C# I am looking to write some C# code for linux/windows/mac/any other platform, and am looking for best practices for portable code. Project mono has some great porting resources. What are the best practices for portable C#? A: Don't use Windows.Forms for GUIs, but Mono probably mentione...
{ "language": "en", "url": "https://stackoverflow.com/questions/42627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Scripting the Visual Studio IDE I'd like to create a script that will configure the Visual Studio IDE the way I like it. Nothing vastly complicated, just a few Tools/Options settings, adding some External Tools, that kind of thing. I know that this can be done inside VS with Import/Export Settings, but I'd like to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to get the identity of an inserted row? How am I supposed to get the IDENTITY of an inserted row? I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY, but don't understand the implications or impacts attached to each. Can someone please explain the differences and when I would be using each? A: The bes...
{ "language": "en", "url": "https://stackoverflow.com/questions/42648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1337" }
Q: Can you recommend a database that scales horizontally? Generally the database server is the biggest, most expensive box we have to buy as scaling vertically is the only option. Are there any databases that scale well horizontally (i.e. across multiple commodity machines) and what are the limitations in this approac...
{ "language": "en", "url": "https://stackoverflow.com/questions/42649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I SCP a file programmatically using C? What would be the best way to do an scp or sftp copy in a Unix environment using C? I'm interested in knowing the best library to use and an example if at all possible. I'm working on a Solaris server with the Sun tools installed. A: Try Libcurl libcurl is a free and e...
{ "language": "en", "url": "https://stackoverflow.com/questions/42672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python? I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn. Having limited time, I really only have time to look learn one of them. Any opinions on w...
{ "language": "en", "url": "https://stackoverflow.com/questions/42690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best way to get user input for a menu-driven CLI in C What's the best way to get user input in a C program where the choices are of a limited number? Say for example the choices are: A) Print the list. B) Add 99 to the end of the list. C) Delete all duplicates. 5) Reset 5 times. Entering "A" and then Enter is OK. Or...
{ "language": "en", "url": "https://stackoverflow.com/questions/42693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: sp_send_dbmail attachment encoding I am using sp_send_dbmail in SQL2005 to send an email with the results in an attachment. When the attachment is sent it is UCS-2 Encoded, I want it to be ANSI or UTF-8. Here is the SQL EXEC msdb.dbo.sp_send_dbmail @recipients = 'temp@example.com' , @query = 'DECLARE @string...
{ "language": "en", "url": "https://stackoverflow.com/questions/42703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Dependency Injection Addiction? Is there a down side? I feel almost dependent on it now. Whenever a project gets past a certain size almost feel an allergic reaction to standard patterns and immediately re-wire it with a Dependency Injection framework. The largest issue I've found is it can be confusing for other de...
{ "language": "en", "url": "https://stackoverflow.com/questions/42706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Efficient synthesis of a 4-to-1 function in Verilog I need to implement a 4-to-1 function in Veriog. The input is 4 bits, a number from 0-15. The output is a single bit, 0 or 1. Each input gives a different output and the mapping from inputs to outputs is known, but the inputs and outputs themselves are not. I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/42710", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Override Working Folder with Starteam/CruiseControl For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view. I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work. Has anyone been able to do this...
{ "language": "en", "url": "https://stackoverflow.com/questions/42721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to catch unhandled exceptions when using .NET Remoting I want to catch all unhandled exceptions thrown in a remote object on the server and log them there before I translate them into some custom exception so that specific exceptions do not cross the client/server boundary. I think I have to use a custom channel...
{ "language": "en", "url": "https://stackoverflow.com/questions/42732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is WCF in simple terms? What is WCF in simple terms? It's hard to distill the meaning from the Wikipedia page. A: WCF allows you to create "services" without specifying that it's a Windows service or a Web service, or which protocols are used to communicate with it or how the data is serialized. All those deta...
{ "language": "en", "url": "https://stackoverflow.com/questions/42740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Does the Iphone 1/2 have a compass inside? Can one be simulated by periodicly syncing with GPS and in the meen while working with the accelerometer? I know for example that the N95 accelerometer is invarient to rotation on the Y axis (while beeing face up/down). A: The original iPhone and the iPhone 3G use GPS to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/42749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I get markdown to format this code properly? Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code: #define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/42762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a max number of options (values) in HTML drop down control? Does anyone know how many options a drop down list can have? Is it unlimited? How many before performance degrades? A: I've used right around 500 in a list with no noticeable performance impact if that helps! A: Yes, the maximum for Chrome and S...
{ "language": "en", "url": "https://stackoverflow.com/questions/42763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Writing/Using C++ Libraries I am looking for basic examples/tutorials on: * *How to write/compile libraries in C++ (.so files for Linux, .dll files for Windows). *How to import and use those libraries in other code. A: The code r.cc : #include "t.h" int main() { f(); return 0; } t.h : void f(); t.cc ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I disable a hotkey in GreaseMonkey while editing? I'm using Ctrl+Left / Ctrl+Right in a GreaseMonkey script as a hotkey to turn back / forward pages. It seems to works fine, but I want to disable this behavior if I'm in a text edit area. I'm trying to use document.activeElement to get the page active element...
{ "language": "en", "url": "https://stackoverflow.com/questions/42774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which Perl database interface should I use? Is CPAN DBI the best database interface to use in Perl for general database use? Are there some better options? A: It's worth pointing out that the vast majority of the "higher-level" interfaces (like SQL::Abstract) and (DBIx::Simple) use DBI itself when actually performi...
{ "language": "en", "url": "https://stackoverflow.com/questions/42778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do you retrofit unit tests into a code base? Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ? A: The best way to retrofit an existing project without any unit tests is to do it when fixing bugs. Write a test that fails on the logic that has the bug in i...
{ "language": "en", "url": "https://stackoverflow.com/questions/42785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: GUI design techniques to enhance user experience What techniques do you know\use to create user-friendly GUI ? I can name following techniques that I find especially useful: * *Non-blocking notifications (floating dialogs like in Firefox3 or Vista's pop-up messages in tray area) *Absence of "Save" button MS O...
{ "language": "en", "url": "https://stackoverflow.com/questions/42793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: What is a good deployment tool for websites on Windows? I'm looking for something that can copy (preferably only changed) files from a development machine to a staging machine and finally to a set of production machines. A "what if" mode would be nice as would the capability to "rollback" the last deployment. Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/42797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Chrome tabs and processes 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 2 tabs = 2 chrome processes 3 tabs = 3 chrome processes and so on .. right?? But i opened up some 20 or so tabs, but in task manager, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MAC address in Compact Framework How can I get the MAC Address using only the compact framework? A: 1.4 of the OpenNETCF code gets the information from the following P/Invoke call: [DllImport ("iphlpapi.dll", SetLastError=true)] public static extern int GetAdaptersInfo( byte[] ip, ref int size ); The physi...
{ "language": "en", "url": "https://stackoverflow.com/questions/42814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: "Out of Band" Processing Techiniques for asp.net applications Jeff has previously blogged about using the cache to perform "out of band" processing on his websites, however I was wondering what other techniques people are using to process these sorts of tasks? A: Years ago, I saw Rob Howard describe a way to use an...
{ "language": "en", "url": "https://stackoverflow.com/questions/42822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Where to start with Entity Framework Anyone know a good book or post about how to start in EF? I have seen the DnrTV any other place? A: Mike Taulty's Blog: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/category/1024.aspx A great EF intro deck: http://mtaulty.com/CommunityServer/blogs/mike_taul...
{ "language": "en", "url": "https://stackoverflow.com/questions/42826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Mixing jsp and jsf I will elaborate somewhat. Jsf is kind-of extremely painful for working with from designer's perspective, somewhat in the range of trying to draw a picture while having hands tied at your back, but it is good for chewing up forms and listing lots of data. So sites we are making in my company are j...
{ "language": "en", "url": "https://stackoverflow.com/questions/42828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Setting Focus with ASP.NET AJAX Control Toolkit I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. I've tried setting the focus in the Page_Load, Page_PreRender, and Page_Init ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I avoid having the database password stored in plaintext in sourcecode? In the web-application I'm developing I currently use a naive solution when connecting to the database: Connection c = DriverManager.getConnection("url", "username", "password"); This is pretty unsafe. If an attacker gains access to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How do I figure out what I need to know? I am a novice programmer who is trying to teach myself to code, specifically in C#. I've taken on a project from a friend of mine and I am not sure what I need to know to get the project done. I suppose the issue is I don't know what I need to know to even get the project sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/42852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What metrics for GUI usability do you know? Of course the best metric would be a happiness of your users. But what metrics do you know for GUI usability measurements? For example, one of the common metrics is a average click count to perform action. What other metrics do you know? A: Jakob Nielsen has several ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/42863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: PHP, Arrays, and References Why does the following code not work as I was expecting? <?php $data = array( array('Area1', null, null), array(null, 'Section1', null), array(null, null, 'Location1'), array('Area2', null, null), array(null, 'Section2', null), array(null, null, 'Location2') ); $ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/42876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Suggestions for migrating ASP.net app from 1.1 forward I am recently in charge of an older app written in C# using asp.net 1.1. * *Are there any resources to guide me in converting the application to a newer version of of the .NET Framework. My main pause is that there are ton's of customized DataGrids in the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: HTML blockquote vs div Is there any benefit in using a <blockquote> element over a <div>? I was looking at a website's markup to learn CSS and I couldn't figure out why the <blockquote> was being used. EDIT: Yeah sorry I didn't clarify, it was used to hold the <div> tag with username as 'text' and an input tag. Ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/42894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RDMS for C language newbie? What database should a beginner use in the C language? Can I use MySQL? Thanks A: You can use SQLite, MySQL, PostgreSQL, or any other DBMS with a C language binding. * *SQLite In 5 Minutes Or Less *MySQL C API *PostgreSQL C API A: If you question is "What RDBMS do you recommend for...
{ "language": "en", "url": "https://stackoverflow.com/questions/42899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where is the chink in Google Chrome's armor? While browsing with Chrome, I noticed that it responds extremely fast (in comparison with IE and Firefox on my laptop) in terms of rendering pages, including JavaScript heavy sites like gmail. This is what googlebook on Chrome has to say * *tabs are hosted in process ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What do people find so appealing about dynamic languages? It seems that everybody is jumping on the dynamic, non-compiled bandwagon lately. I've mostly only worked in compiled, static typed languages (C, Java, .Net). The experience I have with dynamic languages is stuff like ASP (Vb Script), JavaScript, and PHP. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: Load readonly database tables into memory In one of my applications I have a 1gb database table that is used for reference data. It has a huge amounts of reads coming off that table but there are no writes ever. I was wondering if there's any way that data could be loaded into RAM so that it doesn't have to be acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/42936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: URL Rewrite Module for IIS 7 Does anyone have experience using the URL Rewrite Module (see here)? Can it be used to do reverse proxy? A: No it can not. You have to use a tool like .NET URL Rewriter and Reverse Proxy http://codeplex.com/urlrewriter It also supports IIS 6.0, and is accomplished completely through th...
{ "language": "en", "url": "https://stackoverflow.com/questions/42937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get the last day of the month? Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month? If the standard library doesn't support that, does the dateutil package support this? A: import datetime now = datetime.datetime.now() start_month = datet...
{ "language": "en", "url": "https://stackoverflow.com/questions/42950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "860" }
Q: Backward Converting SQL Databases Does anyone know of any free tools that can assist in converting an SQL2005 database back to SQL2000 format? I know that you can script all the objects and then do a dump of the data, but this is a lot of work to do manually. A: Reviewing some other related questions I just found ...
{ "language": "en", "url": "https://stackoverflow.com/questions/42954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Google Suggestish text box (autocomplete) What would be the best way to develop a text box that remembers the last x number of entries that were put into it. This is a standalone app written with C#. A: This is actually fairly easy, especially in terms of showing the "AutoComplete" part of it. In terms of remembe...
{ "language": "en", "url": "https://stackoverflow.com/questions/42966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }