text
stringlengths
8
267k
meta
dict
Q: Combining values from different files into one CSV file I have a couple of files containing a value in each line. EDIT : I figured out the answer to this question while in the midst of writing the post and didn't realize I had posted it by mistake in its incomplete state. I was trying to do: paste -d ',' file1 file2...
{ "language": "en", "url": "https://stackoverflow.com/questions/25225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 100% Min Height CSS layout What's the best way to make an element of 100% minimum height across a wide range of browsers ? In particular if you have a layout with a header and footer of fixed height, how do you make the middle content part fill 100% of the space in between with the footer fixed to the bottom ? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: Inserting at the very end in FCKeditor FCKeditor has InsertHtml API (JavaScript API document) that inserts HTML in the current cursor position. How do I insert at the very end of the document? Do I need to start browser sniffing with something like this if ( element.insertAdjacentHTML ) // IE element.insertA...
{ "language": "en", "url": "https://stackoverflow.com/questions/25240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unit testing IHttpModule How do you unit test a HttpModule in asp.net given that HttpApplication and HttpContext do no implement an interface ? A: In the past before moving to ASP.NET MVC, I used this library Phil Haack created for Unit Testing anything that used the HttpApplication and HttpContext. It in turned u...
{ "language": "en", "url": "https://stackoverflow.com/questions/25241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Remote Debugging PHP Command Line Scripts with Zend? I'm using Zend Studio to do remote debugging of my php scripts on a dev server. It works great for web code, but can I make it work with command line scripts? I have several helper apps to make my application run. It would be really useful to fire up the remote de...
{ "language": "en", "url": "https://stackoverflow.com/questions/25252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does Stack Overflow generate its SEO-friendly URLs? What is a good complete regular expression or some other process that would take the title: How do you change a title to be part of the URL like Stack Overflow? and turn it into how-do-you-change-a-title-to-be-part-of-the-url-like-stack-overflow that is use...
{ "language": "en", "url": "https://stackoverflow.com/questions/25259", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "266" }
Q: Set and Oldset in sigprocmask() I haven't completely understood, how to use sigprocmask(). Particularly, how the set and oldset and its syntax work and how to use them. int sigprocmask(int how, const sigset_t *set, sigset_t *oldset); Please explain with an example, to block, say SIGUSR1 for a few seconds and then u...
{ "language": "en", "url": "https://stackoverflow.com/questions/25261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: What are the best practices when using SWIG with C#? Has anybody out there used the SWIG library with C#? If you have, what pitfalls did you find and what is the best way to use the library? I am thinking about using it as a wrapper for a program that was written in C and I want to wrap the header files where I ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/25268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Remotely starting and stopping a service on a W2008 server I'm having an amazing amount of trouble starting and stopping a service on my remote server from my msbuild script. SC.EXE and the ServiceController MSBuild task don't provide switches to allow a username/password so they won't authenticate, so I'm using Rem...
{ "language": "en", "url": "https://stackoverflow.com/questions/25269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you perform an AND search of keywords using FREETEXT() on SQL Server 2005? There is a request to make the SO search default to an AND style functionality over the current OR when multiple terms are used. The official response was: not as simple as it sounds; we use SQL Server 2005's FREETEXT() function, and I c...
{ "language": "en", "url": "https://stackoverflow.com/questions/25277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How would you implement a hashtable in language x? The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example. Edit:...
{ "language": "en", "url": "https://stackoverflow.com/questions/25282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Reserved Keyword in Enumeration in C# I would like to use as and is as members of an enumeration. I know that this is possible in VB.NET to write it like this: Public Enum Test [as] = 1 [is] = 2 End Enum How do I write the equivalent statement in C#? The following code does not compile: public enum Test { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: WCF - Domain Objects and IExtensibleDataObject Typical scenario. We use old-school XML Web Services internally for communicating between a server farm and several distributed and local clients. No third parties involved, only our applications used by ourselves and our customers. We're currently pondering moving from...
{ "language": "en", "url": "https://stackoverflow.com/questions/25323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What's a good natural language library to use for paraphrasing? I'm looking for an existing library to summarize or paraphrase content (I'm aiming at blog posts) - any experience with existing natural language processing libraries? I'm open to a variety of languages, so I'm more interested in the abilities & accurac...
{ "language": "en", "url": "https://stackoverflow.com/questions/25332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Is there any way to automate windows forms testing? I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. I have seen watin and the watin recorder for automating tests on web application by accessing the controls and automating the...
{ "language": "en", "url": "https://stackoverflow.com/questions/25343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: What would be the fastest way to remove Newlines from a String in C#? I have a string that has some Environment.Newline in it. I'd like to strip those from the string and instead, replace the Newline with something like a comma. What would be, in your opinion, the best way to do this using C#.NET 2.0? A: Like this...
{ "language": "en", "url": "https://stackoverflow.com/questions/25349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Custom Attribute Binding in Silverlight I've got two Silverlight Controls in my project, both have properties TeamId. I would like to bind these together in XAML in the control hosting both user controls similar to: <agChat:UserTeams x:Name="oUserTeams" /> <agChat:OnlineUser x:Name="oOnlineUsers" Te...
{ "language": "en", "url": "https://stackoverflow.com/questions/25355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flash designer/coder collaboration best practices I've done several flash projects working as the ActionScripter with a designer doing all the pretty things and animation. When starting out I found quite a lot of information about ActionScript coding and flash design. Most of the information available seems to focus...
{ "language": "en", "url": "https://stackoverflow.com/questions/25356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the best calendar pop-up to populate a web form? I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a "true" change (in the event the same date was selected). Ideally, I would call a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/25367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I represent a very large integer in .NET? Does .NET come with a class capable of representing extremely large integers, such as 100 factorial? If not, what are some good third party libraries to accomplish this? A: Here is a link the documentation of big integer in framework 4.0 http://msdn.microsoft.com/e...
{ "language": "en", "url": "https://stackoverflow.com/questions/25375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What is appliance and how to use lambda expressions? I've read that Lambda Expressions are an incredibly powerful addition to C#, yet I find myself mystified by them. How can they improve my life or make my code better? Can anyone point to a good resource for learning such expressions? They seem cool as hell, but ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/25376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Family Website CMS I am looking for a CMS that would be incredibly user-friendly and would have the following features: * *really simple message board (no login required) *family tree *story telling area *photo section *news section Is there anything out there like this that is really easily configurable? I...
{ "language": "en", "url": "https://stackoverflow.com/questions/25379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ASP.NET Forms Authorization I'm working on a website built with pure HTML and CSS, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.NET Forms Authorization. I created the default Visual Studio log in form and set up th...
{ "language": "en", "url": "https://stackoverflow.com/questions/25396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Linq 2 SQL on shared host I recently ran into an issue with linq on a shared host. The host is Shared Intellect and they support v3.5 of the framework. However, I am uncertain to whether they have SP1 installed. My suspicion is that they do not. I have a simple News table that has the following structure: NewsID ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a pluginable Java program? I want to create a Java program that can be extended with plugins. How can I do that and where should I look for? I have a set of interfaces that the plugin must implement, and it should be in a jar. The program should watch for new jars in a relative (to the program) folder ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Abstraction away from CSS Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in an effort to make dealing with that particular kettle of fish easier. Is there anything you folks have used that has a similar concept applied to CSS? Something that does a bunch of cross-browser magic f...
{ "language": "en", "url": "https://stackoverflow.com/questions/25450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What is the most efficient way to populate a time (or time range)? While plenty of solutions exist for entering dates (such as calendars, drop-down menus, etc.), it doesn't seem like there are too many "standard" ways to ask for a time (or time range). I've personally tried drop-down menus for the hour, minute, and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How costly is .NET reflection? I constantly hear how bad reflection is to use. While I generally avoid reflection and rarely find situations where it is impossible to solve my problem without it, I was wondering... For those who have used reflection in applications, have you measured performance hits and, is it r...
{ "language": "en", "url": "https://stackoverflow.com/questions/25458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "227" }
Q: Asynchronous Stored Procedure Calls Is it possible to call a stored procedure from another stored procedure asynchronously? Edit: Specifically I'm working with a DB2 database. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ A: Executive summary: Yes, if your database has a message queue service. You can push a message onto a qu...
{ "language": "en", "url": "https://stackoverflow.com/questions/25460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: interfacing with stdbool.h C++ In a project I am interfacing between C++ and a C library that uses stdbool.h defined as such. #ifndef _STDBOOL_H #define _STDBOOL_H /* C99 Boolean types for compilers without C99 support */ /* http://www.opengroup.org/onlinepubs/009695399/basedefs/stdbool.h.html */ #if !defined(__cpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/25461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I put unicode characters in my Antlr grammar? I'm trying to build a grammar with the following: NUMERIC: INTEGER | FLOAT | INFINITY | PI ... INFINITY: '∞' PI: 'π' But Antlr refuses to load the grammar. A: Use the Java expression representing the Unicode character: * *'π' = '\u03C0' *'∞' = '\u221E' That...
{ "language": "en", "url": "https://stackoverflow.com/questions/25475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Where do I get the Antlr Ant task? I'm trying to call an Antlr task in my Ant build.xml as follows: <path id="classpath.build"> <fileset dir="${dir.lib.build}" includes="**/*.jar" /> </path> ... <target name="generate-lexer" depends="init"> <antlr target="${file.antlr.lexer}"> <classpath refid="classpath.b...
{ "language": "en", "url": "https://stackoverflow.com/questions/25481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the simplest way to execute a query in Visual C++ I'm using Visual C++ 2005 and would like to know the simplest way to connect to a MS SQL Server and execute a query. I'm looking for something as simple as ADO.NET's SqlCommand class with it's ExecuteNonQuery(), ExecuteScalar() and ExecuteReader(). Sigh offere...
{ "language": "en", "url": "https://stackoverflow.com/questions/25499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Filtering out anchor tags in a string I need to filter out anchor tags in a string. For instance, Check out this site: <a href="http://www.stackoverflow.com">stackoverflow</a> I need to be able to filter out the anchor tag to this: Check out this site: http://www.stackoverflow.com That format may not be constant, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Best Method to run a Java Application as a *nix Daemon or Windows Service? I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/25530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: ASP.NET Master Pages equivalent in Java What would be the Master Pages equivalent in the Java web development world? I've heard of Tiles, Tapestry and Velocity but don't know anything about them. Are they as easy to use as Master Pages? I want something as easy as set up one template and subsequent pages derive ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Securely sync folders over a public network I need to keep the files & folders on two Windows-based, non-domain machines synchronized across a public network. I was thinking rsync over SSH - but I was wondering if there is a simpler solution? Any possibility of using the sync framework over SFTP/SCP/SSH? Or I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/25546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What's the best way to import/read data from pdf files? We get a large amount of data from our clients in pdf files in varying formats [layout-wise], these files are typically report output, and are typically properly annotated [they don't usually need OCR], but not formatted well enough that simply copying several ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Get OS-level system information I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows. Has anyone been able to successfully extract information such as the current disk space used, CPU utilisation and memory used in the underly...
{ "language": "en", "url": "https://stackoverflow.com/questions/25552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "241" }
Q: Capturing a repeated group I am attempting to parse a string like the following using a .NET regular expression: H3Y5NC8E-TGA5B6SB-2NVAQ4E0 and return the following using Split: H3Y5NC8E TGA5B6SB 2NVAQ4E0 I validate each character against a specific character set (note that the letters 'I', 'O', 'U' & '...
{ "language": "en", "url": "https://stackoverflow.com/questions/25561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I write a sort worse than O(n!) I wrote an O(n!) sort for my amusement that can't be trivially optimized to run faster without replacing it entirely. [And no, I didn't just randomize the items until they were sorted]. How might I write an even worse Big-O sort, without just adding extraneous junk that coul...
{ "language": "en", "url": "https://stackoverflow.com/questions/25566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Which Java DOM Wrapper is the Best or Most Popular? I've used jdom in the past, and have looked briefly at XOM and DOM4j. Each seems to provide essentially the same thing, as they each provide a simplified wrapper over the (very obtuse) standard W3C DOM APIs. I know that JDOM went through some effort to develop a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Shutting down a computer Is there a way to shutdown a computer using a built-in Java method? A: Create your own function to execute an OS command through the command line? For the sake of an example. But know where and why you'd want to use this as others note. public static void main(String arg[]) throws IOExcepti...
{ "language": "en", "url": "https://stackoverflow.com/questions/25637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: When is NavigationService initialized? I want to catch the NavigationService.Navigating event from my Page, to prevent the user from navigating forward. I have an event handler defined thusly: void PreventForwardNavigation(object sender, NavigatingCancelEventArgs e) { if (e.NavigationMode == NavigationMode.Forwa...
{ "language": "en", "url": "https://stackoverflow.com/questions/25642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What could prevent OpenGL glDrawPixels from working on some video cards? The following code writes no data to the back buffer on Intel integrated video cards,for example, on a MacBook. On ATI cards, such as in the iMac, it draws to the back buffer. The width and height are correct (and 800x600 buffer) and m_PixelBuf...
{ "language": "en", "url": "https://stackoverflow.com/questions/25646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Height of NSTextView with one line? I want to programatically create an NSTextView. How can I determine the correct frame height so that the view displays one line of text in the current default font? A: The NSFont class has a method that can give you the size of a rectangle that would enclose a specific attributed...
{ "language": "en", "url": "https://stackoverflow.com/questions/25652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hide a column in ASP.NET Dynamic Data Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column? For instance, I can currently set the display name of a column like this: [DisplayName("Last name")] public object Last_name { get; set; } Is there a similar way to hide a column?...
{ "language": "en", "url": "https://stackoverflow.com/questions/25653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: pyGame within a pyGTK application What is the best way to use PyGame (SDL) within a PyGTK application? I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events. A: I've never attempted it myself, but hearing plenty about oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/25661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Python module for converting PDF to text Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use. A: I needed to convert a specific PDF to plain text within a python module. I used PDFMi...
{ "language": "en", "url": "https://stackoverflow.com/questions/25665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "414" }
Q: ColdFusion - When to use the "request" scope? Been going over my predecessor's code and see usage of the "request" scope frequently. What is the appropriate usage of this scope? A: There are several scopes that are available to any portion of your code: Session, Client, Cookie, Application, and Request. Some are in...
{ "language": "en", "url": "https://stackoverflow.com/questions/25672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: MVC - where to implement form validation (server-side)? In coding a traditional MVC application, what is the best practice for coding server-side form validations? Does the code belong in the controller, or the model layer? And why? A: From Wikipedia: Model-view-controller (MVC) is an architectural pattern used in...
{ "language": "en", "url": "https://stackoverflow.com/questions/25675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What is the best free memory leak detector for a C/C++ program and its plug-in DLLs? I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case). Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/25730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: What's the difference between a string constant and a string literal? I'm learning objective-C and Cocoa and have come across this statement: The Cocoa frameworks expect that global string constants rather than string literals are used for dictionary keys, notification and exception names, and some method parameter...
{ "language": "en", "url": "https://stackoverflow.com/questions/25746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: What does the @ symbol represent in objective-c? I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods. What's does the @ symbol mean in objective-c? A: From Objective-C Tutorial: The @ Symbol, the reas...
{ "language": "en", "url": "https://stackoverflow.com/questions/25749", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: How do I put a space character before option text in a HTML select element? In a drop down list, I need to add spaces in front of the options in the list. I am trying <select> <option>&#32;&#32;Sample</option> </select> for adding two spaces but it displays no spaces. How can I add spaces before option texts? A: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/25752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Java configuration framework I'm in the process of weeding out all hardcoded values in a Java library and was wondering what framework would be the best (in terms of zero- or close-to-zero configuration) to handle run-time configuration? I would prefer XML-based configuration files, but it's not essential. Please d...
{ "language": "en", "url": "https://stackoverflow.com/questions/25765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Most efficient way to get data from the database to session What is the quickest way to get a large amount of data (think golf) and the most efficient (think performance) to get a large amount of data from a MySQL database to a session without having to continue doing what I already have: $sql = "SELECT * FROM users...
{ "language": "en", "url": "https://stackoverflow.com/questions/25767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Output compile time stamp in Visual C++ executable? How can I insert compilation timestamp information into an executable I build with Visual C++ 2005? I want to be able to output something like this when I execute the program: This build XXXX was compiled at dd-mm-yy, hh:mm. where date and time reflect the time w...
{ "language": "en", "url": "https://stackoverflow.com/questions/25771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Delete all but the most recent X files in bash Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory? To give a bit more of a concrete example, imagine some cron job writing out a file (say, a log file or a tar-ed up backup...
{ "language": "en", "url": "https://stackoverflow.com/questions/25785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: Copy/duplicate database without using mysqldump Without local access to the server, is there any way to duplicate/clone a MySQL db (with content and without content) into another without using mysqldump? I am currently using MySQL 4.0. A: I can see you said you didn't want to use mysqldump, but I reached this page ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "439" }
Q: How do I intercept a method call in C#? For a given class I would like to have tracing functionality i.e. I would like to log every method call (method signature and actual parameter values) and every method exit (just the method signature). How do I accomplish this assuming that: * *I don't want to use any...
{ "language": "en", "url": "https://stackoverflow.com/questions/25803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "158" }
Q: Python super class reflection If I have Python code class A(): pass class B(): pass class C(A, B): pass and I have class C, is there a way to iterate through it's super classed (A and B)? Something like pseudocode: >>> magicGetSuperClasses(C) (<type 'A'>, <type 'B'>) One solution seems to be inspect mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/25807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Multiple YACC grammars in one program How do I compile, link and call different YACC grammars using yyparse() in one program? A: Use the -p option for each separate yacc grammar generation -p prefix Use prefix instead of yy as the prefix for all external names produced by yacc. For X/Open ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to open VS 2008 solution in VS 2005? I have seen Solutions created in Visual Studio 2008 cannot be opened in Visual Studio 2005 and tried workaround 1. Yet to try the workaround 2. But as that link was bit old and out of desperation asking here: Is there any convertor available? I dont have VS2008 yet and i wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/25833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Maximum buffer length for sendto? How do you get the maximum number of bytes that can be passed to a sendto(..) call for a socket opened as a UDP port? A: On Mac OS X there are different values for sending (SO_SNDBUF) and receiving (SO_RCVBUF). This is the size of the send buffer (man getsockopt): getsockopt(sock, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Installing Apache Web Server on 64 Bit Mac I know that MAC OS X 10.5 comes with Apache installed but I would like to install the latest Apache without touching the OS Defaults incase it causes problems in the future with other udpates. So I have used the details located at: http://diymacserver.com/installing-apache/...
{ "language": "en", "url": "https://stackoverflow.com/questions/25846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is a language binding? My good friend, Wikipedia, didn't give me a very good response to that question. So: * *What are language bindings? *How do they work? Specifically accessing functions from code written in language X of a library written in language Y. A: Okay, now the question has been clarified, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Webpart registration error in event log We created several custom web parts for SharePoint 2007. They work fine. However whenever they are loaded, we get an error in the event log saying: error initializing safe control - Assembly: ... The assembly actually loads fine. Additionally, it is correctly listed in the w...
{ "language": "en", "url": "https://stackoverflow.com/questions/25871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is a data binding? What is a data binding? A: Binding generally refers to a mapping of one thing to another - i.e. a datasource to a presentation object. It can typically refer to binding data from a database, or similar source (XML file, web service etc) to a presentation control or element - think list or ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/25878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What toolchains exist for Continuous Integration with C++? Continuous Integration toolchains for .NET, Java, and other languages are relatively well defined, but the C++ market seems to have a lot of diversity. By CI "toolchain" I specifically mean tools for the build scripts, automated testing, coding standards c...
{ "language": "en", "url": "https://stackoverflow.com/questions/25902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: CruiseControl.net duplicate NAnt timings I'm trying to setup CruiseControl.net webdashboard at the moment. So far it works nice, but I have a problem with the NAnt Build Timing Report. Firstly, my current ccnet.config file looks something like this: <project name="bla"> ... <prebuild> <nant .../> </prebuild> <tasks...
{ "language": "en", "url": "https://stackoverflow.com/questions/25914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is ASP.NET? I've been strictly in a C++ environment for years (and specialized statistical languages). Visual Studio until 2001, and Borland since. Mostly specialized desktop applications for clients. I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent ...
{ "language": "en", "url": "https://stackoverflow.com/questions/25921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Summary fields in Crystal Report VS2008 I need to have a summary field in each page of the report and in page 2 and forward the same summary has to appear at the top of the page. Anyone know how to do this? Ex: > > Page 1 > > Name Value > a 1 > b 3 > Total 4 > > Page 2 > Name Value > T...
{ "language": "en", "url": "https://stackoverflow.com/questions/25938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby Performance I'm pretty keen to develop my first Ruby app, as my company has finally blessed its use internally. In everything I've read about Ruby up to v1.8, there is never anything positive said about performance, but I've found nothing about version 1.9. The last figures I saw about 1.8 had it drastically sl...
{ "language": "en", "url": "https://stackoverflow.com/questions/25950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best programming based games Back when I was at school, I remember tinkering with a Mac game where you programmed little robots in a sort of pseudo-assembler language which could then battle each other. They could move themselves around the arena, look for opponents in different directions, and fire some sort of wea...
{ "language": "en", "url": "https://stackoverflow.com/questions/25952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: Insert into ... values ( SELECT ... FROM ... ) I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL engine of the day (MySQL, Oracle, SQL Server, Informix, and DB2). Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/25969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1756" }
Q: How can I get the name of the executing .exe? The Compact Framework doesn't support Assembly.GetEntryAssembly to determine the launching .exe. So is there another way to get the name of the executing .exe? EDIT: I found the answer on Peter Foot's blog: http://peterfoot.net/default.aspx Here is the code: byte[] buffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/25975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I measure the similarity between two images? I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly diffe...
{ "language": "en", "url": "https://stackoverflow.com/questions/25977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: What's the simplest way to connect to a .NET remote server object Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it? This is what I'm doing at the moment: ChannelServices.RegisterChannel(new HttpChannel(), false); RemotingConfiguration.Registe...
{ "language": "en", "url": "https://stackoverflow.com/questions/25982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Secure Online Highscore Lists for Non-Web Games I'm playing around with a native (non-web) single-player game I'm writing, and it occured to me that having a daily/weekly/all-time online highscore list (think Xbox Live Leaderboard) would make the game much more interesting, adding some (small) amount of community an...
{ "language": "en", "url": "https://stackoverflow.com/questions/25999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Develop on local Oracle instance I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options? A: I have had a lot of success using Oracle 10g Express Edition. It comes with Oracle Aplication Express which allows the simple admin and cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/26002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Iterating over a complex Associative Array in PHP Is there an easy way to iterate over an associative array of this structure in PHP: The array $searches has a numbered index, with between 4 and 5 associative parts. So I not only need to iterate over $searches[0] through $searches[n], but also $searches[0]["part0"] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What is the best way to connect and use a sqlite database from C# I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#? A: I'm with, Bruce. I AM using http://system.data.sqlite.org/ with great success as well. Here's a simple class example that I created: using System; using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: How is data compression more effective than indexing for search performance? For our application, we keep large amounts of data indexed by three integer columns (source, type and time). Loading significant chunks of that data can take some time and we have implemented various measures to reduce the amount of data th...
{ "language": "en", "url": "https://stackoverflow.com/questions/26021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cleanest & Fastest server setup for Django I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: * *Easy to set up *Fast and easy on resources ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Upgrading Sharepoint 3.0 to SQL 2005 Backend? We're trying to get rid of all of our SQL Server 2000 databases to re purpose our old DB server... Sharepoint 3.0 is being a showstopper. I've looked at a lot of guides from Microsoft and tried the instructions in those. I've also just tried the good ol' exec sp_detach_...
{ "language": "en", "url": "https://stackoverflow.com/questions/26028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Browser-based game - Which framework to choose? I'm starting to develop a browser-based game (and by this I mean text-based, no Flash or similar stuff on it) and I'm struggling to decide on which development framework to use. As far as requirements are concerned, the most important thing that I can think of right no...
{ "language": "en", "url": "https://stackoverflow.com/questions/26041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Can DTS Test for Presence of MS-Access Table I have an Access database in which I drop the table and then create the table afresh. However, I need to be able to test for the table in case the table gets dropped but not created (i.e. when someone stops the DTS package just after it starts -roll-eyes- ). If I were d...
{ "language": "en", "url": "https://stackoverflow.com/questions/26062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Model Based Testing Strategies What strategies have you used with Model Based Testing? * *Do you use it exclusively for integration testing, or branch it out to other areas (unit/functional/system/spec verification)? *Do you build focused "sealed" models or do you evolve complex onibus models over time? *When...
{ "language": "en", "url": "https://stackoverflow.com/questions/26065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Reconnect logic with connectivity notifications Say I have an application that wants a persistent connection to a server. How do I implement connection/re-connection logic so that I'm not wasting resources (power/bandwidth) and I have fast reconnect time when connectivity appears/improves? If I only use connectivity...
{ "language": "en", "url": "https://stackoverflow.com/questions/26072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How can I figure out how much memory a .Net Appdomain is consuming? I'm trying to programmatically restrict the memory consumption of plugins running in a .Net AppDomain, but I can't find any setup parameters for this, nor can I find a way to query an AppDomain to figure out how much memory it is consuming. Any idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/26074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Resize Infragistics GanttChart task with the mouse I loaded a custom DataTable into an UltraChart of type GanttChart. The data loads successfully. Do you know if it possible to add support for mouse resize(drag) to the tasks that show up into the chart? I have not been able to figure out if this is supported by the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In a PHP5 class, when does a private constructor get called? Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton. All of the docs I've read say to make the class constructor private so the class can't be directly instantiated. So if I have something like this: class SillyDB { private functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/26079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Most efficient implementation of a large number class When doing calculations on very large numbers where integral data types such as double or int64 falls short, a separate class to handle such large numbers may be needed. Does anyone care to offer an efficient algorithm on how best to do this? A: In C# 4.0 use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Overloaded functions in C++ DLL def file I'm writing a C/C++ DLL and want to export certain functions which I've done before using a .def file like this LIBRARY "MyLib" EXPORTS Foo Bar with the code defined as this, for example: int Foo(int a); void Bar(int foo); However, what if I want to declare an overloade...
{ "language": "en", "url": "https://stackoverflow.com/questions/26098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Failed to load resources from resource file Get the following error periodically in an IIS application: Failed to load resources from resource file. The full error message in the Application Event Log is: Event Type: Error Event Source: .NET Runtime Event Category: None Event ID: 0 Date: 8/8/...
{ "language": "en", "url": "https://stackoverflow.com/questions/26111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is your best tool or techniques for getting the same display on IE6/7 and Firefox? I'm not talking about tools that let one view a page in combinations of operating systems and browsers like crossbrowsertesting.com but in creating or figuring out the actual CSS. A: Use a css reset to level the field across bro...
{ "language": "en", "url": "https://stackoverflow.com/questions/26113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Accessing .NET components from Powershell I want to use Powershell to write some utilities, leveraging our own .NET components to handle the actual work. This is in place of writing a small console app to tie the calls together. My question is where I would find a good source of documentation or tutorial material ...
{ "language": "en", "url": "https://stackoverflow.com/questions/26123", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: VBScript/ASP Classic I have a couple of questions regarding VBScript and ASP Classic: * *What is the preferred way to access an MS SQL Server database in VBScript/ASP? *What are best practices in regards to separating model from view from controller? *Any other things I should know about either VBScript or ASP?...
{ "language": "en", "url": "https://stackoverflow.com/questions/26137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Cannot add a launch shortcut (Eclipse Plug-in) I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use. So I looked up all the documentations related, including this one The Launching Framework from eclipse.org and have managed to make everything else working with the exception...
{ "language": "en", "url": "https://stackoverflow.com/questions/26145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }