text
stringlengths
8
267k
meta
dict
Q: Tasklist replacement for Visual Studio I would like to use the task-list in Visual Studio but it really lacks almost any useful feature a task-list should provide. So I use Todo-List externally, to keep track of the things I need to get done. Would be nice to have it all in one place. So does anyone know of a cool r...
{ "language": "en", "url": "https://stackoverflow.com/questions/94864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I attach an .mdf to sql2005? Running sp_attach_single_file_db gives this error: The log scan number (10913:125:2) passed to log scan in database 'myDB' is not valid Isn't it supposed to re-create the log file? How else would I be able to attach/repair that .mdf file? A: It depends what mode your database w...
{ "language": "en", "url": "https://stackoverflow.com/questions/94866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Image Processing, In Python? I've recently come across a problem which requires at least a basic degree of image processing, can I do this in Python, and if so, with what? A: There's also pycairo, which might be more suitable depending on your needs. A: There is actually a wonderful Python Imaging Library (PIL). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/94875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: What is the best method of inter-process communication between Java and .NET 3.5? A third-party application reads some Java code from an XML file, and runs it when a certain event happens. In Java, I want to tell a .NET 3.5 application, running on the same machine, that this event occurred. The total data transferre...
{ "language": "en", "url": "https://stackoverflow.com/questions/94882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generics vs. Array Lists The system I work on here was written before .net 2.0 and didn't have the benefit of generics. It was eventually updated to 2.0, but none of the code was refactored due to time constraints. There are a number of places where the code uses ArraysLists etc. that store things as objects. Fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/94884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: looking for a good summary of SQL 2005 Partitioning I'm looking at this as a baseline explanation of the SQL 2005 Enterprise partitioning. Is there a resource that goes deeper into fine points and considerations of this issue. Some more examples would be useful too. My main scenario is a time based partition system....
{ "language": "en", "url": "https://stackoverflow.com/questions/94885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I return random numbers as a column in SQL Server 2005? I'm running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I'd also like to return 1 column of random numbers along with them. I tried this: select column1, column2, floor(rand() * 10000) as column3 from ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/94906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I load xml from a url instead of a file path in .NET? We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we know how to do it currently is by using a file path and impersonation (since this file is on a secured network path). I've looked at XDocument.Load on MSDN, but I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/94912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Fetch one row per account id from list I have a table with game scores, allowing multiple rows per account id: scores (id, score, accountid). I want a list of the top 10 scorer ids and their scores. Can you provide an sql statement to select the top 10 scores, but only one score per account id? Thanks! A: select u...
{ "language": "en", "url": "https://stackoverflow.com/questions/94930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ColdFusion mail queue stops processing Our CF server occasionally stops processing mail. This is problematic, as many of our clients depend on it. We found suggestions online that mention zero-byte files in the undeliverable folder, so I created a task that removes them every three minutes. However, the stoppage...
{ "language": "en", "url": "https://stackoverflow.com/questions/94932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What debug logging tools are available from Javascript? I'd like to create a "universal" debug logging function that inspects the JS namespace for well-known logging libraries. For example, currently, it supports Firebug's console.log: var console = window['console']; if (console && console.log) { co...
{ "language": "en", "url": "https://stackoverflow.com/questions/94934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the difference between range and xrange functions in Python 2.X? Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about for i in range(0, 20): for i in xrange(0, 20): A: Some of the other answers m...
{ "language": "en", "url": "https://stackoverflow.com/questions/94935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "832" }
Q: Restarting ColdFusion mail queue We are currently experiencing intermittent mail queue stoppages. I'm seeking diagnostic help in another area. In the meantime, is there a way to restart the CF mail queue without restarting the service as a whole? CF8 standard Win2k3 Solution: We are now checking the age of the old...
{ "language": "en", "url": "https://stackoverflow.com/questions/94948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Python implementation of Parsec? I recently wrote a parser in Python using Ply (it's a python reimplementation of yacc). When I was almost done with the parser I discovered that the grammar I need to parse requires me to do some look up during parsing to inform the lexer. Without doing a look up to inform the lexe...
{ "language": "en", "url": "https://stackoverflow.com/questions/94952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How do you priortize multiple triggers of a table? I have a couple of triggers on a table that I want to keep separate and would like to priortize them. I could have just one trigger and do the logic there, but I was wondering if there was an easier/logical way of accomplishing this of having it in a pre-defined ord...
{ "language": "en", "url": "https://stackoverflow.com/questions/94959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you solve the 15-puzzle with A-Star or Dijkstra's Algorithm? I've read in one of my AI books that popular algorithms (A-Star, Dijkstra) for path-finding in simulation or games is also used to solve the well-known "15-puzzle". Can anyone give me some pointers on how I would reduce the 15-puzzle to a graph of n...
{ "language": "en", "url": "https://stackoverflow.com/questions/94975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Why aren't variables declared in "try" in scope in "catch" or "finally"? In C# and in Java (and possibly other languages as well), variables declared in a "try" block are not in scope in the corresponding "catch" or "finally" blocks. For example, the following code does not compile: try { String s = "test"; // ...
{ "language": "en", "url": "https://stackoverflow.com/questions/94977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "165" }
Q: How do you rate-limit an IO operation? Suppose you have a program which reads from a socket. How do you keep the download rate below a certain given threshold? A: Assuming a network transport, a TCP/IP based one, Packets are sent in response to ACK/NACK packets going the other way. By limiting the rate of packets ...
{ "language": "en", "url": "https://stackoverflow.com/questions/94997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Alternative to 'truss -p' instruction I am looking for a command in Unix that returns the status of a process(active, dead, sleeping, waiting for another process, etc.) is there any available? A shell script maybe? A: in linux, something like ps -p somepid --no-headers -o state should work, alternately you can look...
{ "language": "en", "url": "https://stackoverflow.com/questions/94999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Simplest way to update a client-side javascript array variable during a ASP.NET AJAX postback in an UpdatePanel? If I want to inject a globally scoped array variable into a page's client-side javascript during a full page postback, I can use: this.Page.ClientScript.RegisterArrayDeclaration("WorkCalendar", "\"" + dat...
{ "language": "en", "url": "https://stackoverflow.com/questions/95005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Explain the quantile() function in R I've been mystified by the R quantile function all day. I have an intuitive notion of how quantiles work, and an M.S. in stats, but boy oh boy, the documentation for it is confusing to me. From the docs: Q[i](p) = (1 - gamma) x[j] + gamma x[j+1], I'm with it so far. For ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Deleting rows in joined tables using ADO Now I have seen this question in another forum but it didn't had an acceptable answer. Suppose I have two tables, the Groups table and the Elements table. The tables have no defined relationships. The Elements table has an IdGroup field that refers to the IdGroup (PK) field o...
{ "language": "en", "url": "https://stackoverflow.com/questions/95041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: learning drupal fast track: how to create a stackoverflow clone? I've started figuring out drupal, and so far most of the results are just ugly. May be I need to learn it in something similar to a real-life project. I thought — to reproduce this site's functionality might be a good learning project. But I need help....
{ "language": "en", "url": "https://stackoverflow.com/questions/95053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java: Best Place to Begin Learning Basic Networking I am trying to write a simple networked chat program in Java. I have almost no networking experience. I was wondering what resources I should begin looking at (beside here of course). Sticking with the core Java API would be best for now. A: I recommend you to f...
{ "language": "en", "url": "https://stackoverflow.com/questions/95055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I automate the process of deploying an InfoPath Form to SharePoint Server 2007? It is a real pain to deploy my InfoPath 2007 Forms from the designer into our development environment's SharePoint server. All of our forms require "full trust" since they include business logic written in C#. Here are the manu...
{ "language": "en", "url": "https://stackoverflow.com/questions/95059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Stop Activerecord from loading Blob column How can I tell Activerecord to not load blob columns unless explicitly asked for? There are some pretty large blobs in my legacy DB that must be excluded for 'normal' Objects. A: I believe you can ask AR to load specific columns in your invocation to find: MyModel.find(id,...
{ "language": "en", "url": "https://stackoverflow.com/questions/95061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Gamepad code on OS X: Buh? I thought I was a decent programmer until I tried writing gamepad code for OS X. Now I feel deeply useless. Does anyone know of any code that I can legally use in my (non-free) game? Is it really this hard to talk to a gamepad on OS X? What am I missing? A: Check out the HID Manager, espe...
{ "language": "en", "url": "https://stackoverflow.com/questions/95071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Setting DataGridViewRow.Height slow I have noticed that setting row height in DataGridView control is slow. Is there a way to make it faster? A: What's caused similar layout delays for myself was related to the AutoSizeRowsMode and AutoSizeColumnsMode DataGridView1.AutoSizeRowsMode = None will likely fix it. Also ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: storing state across postback What is the best way to store string data across postback. I need to store an ID and name for multiple entities. I was thinking of using a datatable in viewstate, but would that make viewstate grow too large? I can't use a database yet because I'll be inserting a record that those ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/95077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQLite / Firebird embedded for numeric data I have an experiment streaming up 1Mb/s of numeric data which needs to be stored for later processing. It seems as easy to write directly into a database as to a CSV file and I would then have the ability to easily retrieve subsets or ranges. I have experience of sqlite2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to handle UTF-8 characters in sqlite2 to sqlite3 migration Trying the easy approach: sqlite2 mydb.db .dump | sqlite3 mydb-new.db I got this error: SQL error near line 84802: no such column: Ð In that line the script is this: INSERT INTO vehiculo VALUES(127548,'21K0065217',Ñ,'PA007808',65217,279,1989,3,468,'...
{ "language": "en", "url": "https://stackoverflow.com/questions/95089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is Application.Restart() not reliable? Using the method Application.Restart() in C# should restart the current application: but it seems that this is not always working. Is there a reason for this Issue, can somebody tell me, why it doesn't work all the time? A: The only time I've run into this kind of issue is...
{ "language": "en", "url": "https://stackoverflow.com/questions/95098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Is there any built-in way to convert an integer to a string (of any base) in C#? Convert.ToString() only allows base values of 2, 8, 10, and 16 for some odd reason; is there some obscure way of providing any base between 2 and 16? A: Probably to eliminate someone typing a 7 instead of an 8, since the uses for arbit...
{ "language": "en", "url": "https://stackoverflow.com/questions/95105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Vim shortcut for adding arguments to a function Is there a Vim shortcut for jumping to the argument list of the current function? I often find myself needing to mess with the argument list of a function, and it's kind of annoying to have to do ?def or ?function or 10k or what-have-you until I finally get to it, the...
{ "language": "en", "url": "https://stackoverflow.com/questions/95106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I delay code execution in Visual Basic (VB6)? I have a long running process in VB6 that I want to finish before executing the next line of code. How can I do that? Built-in function? Can I control how long to wait? Trivial example: Call ExternalLongRunningProcess Call DoOtherStuff How do I delay 'DoOtherStuf...
{ "language": "en", "url": "https://stackoverflow.com/questions/95112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Where is the best place to store user related data in asp.net? When a customer logs in to my site, I need to know their account id and their menu id. This lets me know what data they can see on a page and what menu they get. I don't want to have to read this data over and over. Should I store this in a session va...
{ "language": "en", "url": "https://stackoverflow.com/questions/95120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How does jstl's sql tag work? I'm using the following code to query a database from my jsp, but I'd like to know more about what's happening behind the scenes. These are my two primary questions. Does the tag access the ResultSet directly, or is the query result being stored in a datastructure in memory? When is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/95134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Differences between MSIL and Java bytecode? I'm new to .Net and I'm trying to understand the basics first. What is the difference between MSIL and Java bytecode? A: First off let me say that I don't think that the subtle differences between Java bytecode and MSIL is something that should bother a novice .NET develo...
{ "language": "en", "url": "https://stackoverflow.com/questions/95163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Java Serialization with non serializable parts I have: class MyClass extends MyClass2 implements Serializable { //... } In MyClass2 is a property that is not serializable. How can I serialize (and de-serialize) this object? Correction: MyClass2 is, of course, not an interface but a class. A: You will need to imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/95181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: How does one create an index on the date part of DATETIME field in MySql How do I create an index on the date part of DATETIME field? mysql> SHOW COLUMNS FROM transactionlist; +-------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Defaul...
{ "language": "en", "url": "https://stackoverflow.com/questions/95183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: CruiseControl + Starteam: not picking up all files Our CruiseControl system checks out from starteam. I've noticed that it is sometimes not checking out new versions of files, only added files. Does anyone know why this is? A: I cannot say why this happens, but for what it's worth, we avoid the problem entirely by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can you generate a Makefile from an Xcode project? I want to generate a Makefile from an existing Xcode project on the Mac. Specifically, an existing iPhone, Objective-C program on the Mac. I found PBToMake, but it looks like it is for Xcode 2.1 and when I tried using it, it did not work for an Xcode 3.1 project...
{ "language": "en", "url": "https://stackoverflow.com/questions/95211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Can jQuery read/write cookies to a browser? Simple example: I want to have some items on a page (like divs or table rows), and I want to let the user click on them to select them. That seems easy enough in jQuery. To save which items a user clicks on with no server-side post backs, I was thinking a cookie would be a...
{ "language": "en", "url": "https://stackoverflow.com/questions/95213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: T-SQL triggers firing a "Column name or number of supplied values does not match table definition" error Here's something I haven't been able to fix, and I've looked everywhere. Perhaps someone here will know! I have a table called dandb_raw, with three columns in particular: dunsId (PK), name, and searchName. I als...
{ "language": "en", "url": "https://stackoverflow.com/questions/95218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to evaluate Eclipse RCP for an in-house project? I have only a basic understanding of Eclipse RCP. I am about to start an in-house application for our technical support team, that will likely grow over time. The team is distributed across continents so I would like to be able to auto-update the application when...
{ "language": "en", "url": "https://stackoverflow.com/questions/95221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: GLSL major mode for Emacs? I found this link http://artis.imag.fr/~Xavier.Decoret/resources/glsl-mode/, but there isn't a lot of description around it, aside that it's "simple". Ideally, I'd like an extension to CcMode that can do it, or at least a mode that can handle auto-styling and has similar shortcuts to CcMod...
{ "language": "en", "url": "https://stackoverflow.com/questions/95222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the best way to send a file over a network using C#? Can anyone point me to a tutorial on the best way to open a connection from client to server, read in a binary file and send its contents reliably across the network connection? Even better, is there an open source library that already does this that I coul...
{ "language": "en", "url": "https://stackoverflow.com/questions/95235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to get a table of dates between x and y in sql server 2005 I just want a quick way (and preferably not using a while loop)of createing a table of every date between date @x and date @y so I can left outer join to some stats tables, some of which will have no records for certain days in between, allowing me to ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/95257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you create a parameterized query in MS Access 2003 and use other queries/forms to fill the parameters and obtain a resultset I'd like to be able to create a parameterized query in MS Access 2003 and feed the values of certain form elements to that query and then get the corresponding resultset back and do som...
{ "language": "en", "url": "https://stackoverflow.com/questions/95277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Log4Net: set Max backup files on RollingFileAppender with rolling Date I have the following configuration, but I have not able to find any documentation on how to set a maximum backup files on date rolling style. I know that you can do this with size rolling style by using the maxSizeRollBackups. <appender name="Ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/95286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: Legality of Encryption in Standard Libraries Some programming languages such as Java and C# include encryption packages in their standard libraries. Others such as Python and Ruby make you download third-party modules to do strong encryption. I assume that this is for legal reasons; perhaps Sun Microsystems has en...
{ "language": "en", "url": "https://stackoverflow.com/questions/95297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Looking for regex to extract email addresses from /etc/passwd Most of my users have email addresses associated with their profile in /etc/passwd. They are always in the 5th field, which I can grab, but they appear at different places within a comma-separated list in the 5th field. Can somebody give me a regex to gr...
{ "language": "en", "url": "https://stackoverflow.com/questions/95305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What tools and techniques do you use to fix browser memory leaks? I am trying to fix memory leaks in IE 7. Using Drip for investigations but it is not helping much when most dynamically generated DOM elements do not have unique ids. Tips? A: You should try the Javascript Memory Leak detector developed internally at...
{ "language": "en", "url": "https://stackoverflow.com/questions/95326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: RSS Statistics/Traffic Metrics I want to track how much traffic I'm getting on an RSS feed that is set up using .Net 2.0 & SQL Server. Is there an industry standard on what metrics I should use, for example, page hits? A: Feedburner analysis gives you statistics like: (source: blogperfume.com) (source: blogp...
{ "language": "en", "url": "https://stackoverflow.com/questions/95346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Visual Studio 2005. RC File includes I'm programming in C++ on Visual Studio 2005. My question deals with .rc files. You can manually place include directives like (#include "blah.h"), at the top of an .rc file. But that's bad news since the first time someone opens the .rc file in the resource editor, it gets ov...
{ "language": "en", "url": "https://stackoverflow.com/questions/95361", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I modify a ReadOnly Linq property I have a LINQ to SQL generated class with a readonly property: <Column(Name:="totalLogins", Storage:="_TotalLogins", DbType:="Int", UpdateCheck:=UpdateCheck.Never)> _ Public ReadOnly Property TotalLogins() As System.Nullable(Of Integer) Get Return Me._TotalLogins...
{ "language": "en", "url": "https://stackoverflow.com/questions/95364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Batch source-code aware spell check What is a tool or technique that can be used to perform spell checks upon a whole source code base and its associated resource files? The spell check should be source code aware meaning that it would stick to checking string literals in the code and not the code itself. Bonus poi...
{ "language": "en", "url": "https://stackoverflow.com/questions/95378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Passing parameters to start as a console or GUI application? I have a console application that will be kicked off with a scheduler. If for some reason, part of that file is not able to be built I need a GUI front end so we can run it the next day with specific input. Is there as way pass parameters to the applicati...
{ "language": "en", "url": "https://stackoverflow.com/questions/95379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I force a Java subclass to define an Annotation? If a class defined an annotation, is it somehow possible to force its subclass to define the same annotation? For instance, we have a simple class/subclass pair that share the @Author @interface. What I'd like to do is force each further subclass to define the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95389", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What are all the different ways to create an object in Java? Had a conversation with a coworker the other day about this. There's the obvious using a constructor, but what are the other ways there? A: Cloning and deserialization. A: There are various ways: * *Through Class.newInstance. *Through Constructor.new...
{ "language": "en", "url": "https://stackoverflow.com/questions/95419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: Unit Testing in .NET: How to Mock Entity Data Provider Does anyone know whether there's a way to mock Entity Data Provider so Unit Tests don't hit the live data? I found this blog but it seems the project hasn't been released: http://www.chrisdoesdev.com/index.php/archives/62 Thanks A: Mattwar has a great article ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I open "Find Files" dialog from command-line in Windows XP to search a specific folder? I'd like to create a hotkey to search for files under a specific folder in Windows XP; I'm using AutoHotkey to create this shortcut. Problem is that I need to know a command-line statement to run in order to open the stand...
{ "language": "en", "url": "https://stackoverflow.com/questions/95432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sniffing traffic between a Flex app and ColdFusion backend What is a good strategy for sniffing/tracing function calls between a Flex application and a ColdFusion-based backend running on ColdFusion server? I understand they use AMF protocol. I'm used to using Fiddler to sniff transactions between HTTP clients and s...
{ "language": "en", "url": "https://stackoverflow.com/questions/95442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the canonical way to store arbitrary (possibly marked up) text in SQL? What do wikis/stackoverflow/etc. do when it comes to storing text? Is the text broken at newlines? Is it broken into fixed-length chunks? How do you best store arbitrarily long chunks of text? A: I guess if you need to offer the abilit...
{ "language": "en", "url": "https://stackoverflow.com/questions/95459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Messaging solution for a serial hardware device I have a serial hardware device that I'd like to share with multiple applications, that may reside on different machines within or spanning multiple networks. A key requirement is that the system must support bi-directional communication, such that clients/serial devi...
{ "language": "en", "url": "https://stackoverflow.com/questions/95485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I convert a date/time to epoch time (unix time/seconds since 1970) in Perl? Given a date/time as an array of (year, month, day, hour, minute, second), how would you convert it to epoch time, i.e., the number of seconds since 1970-01-01 00:00:00 GMT? Bonus question: If given the date/time as a string, how woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/95492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Can this macro be converted to a function? While refactoring code and ridding myself of all those #defines that we're now taught to hate, I came across this beauty used to calculate the number of elements in a structure: #define STRUCTSIZE(s) (sizeof(s) / sizeof(*s)) Very useful as it is but can it be converted int...
{ "language": "en", "url": "https://stackoverflow.com/questions/95500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I use JUnitPerf with JWebUnit and JUnit 4? I have a series of functional tests against a web application that correctly run, but each require the class level setup and teardown provided with the @BeforeClass and @AfterClass annotations, and hence require JUnit 4.0 or above. Now I want to perform load testing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to detect whether Vista UAC is enabled? I need my application to behave differently depending on whether Vista UAC is enabled or not. How can my application detect the state of UAC on the user's computer? A: This post has sample code in C# to test if UAC is on and if the current app has been given elevated righ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Why is my program asking for permission to run on Vista? I've just built a VS C++ 6.0 program using VS 2008. When I attempt to run or debug the application, Vista asks for permission. What is it about how the program is built that causes this? The program is being built and run from a subfolder of C:\Dev This res...
{ "language": "en", "url": "https://stackoverflow.com/questions/95525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Subversion Error: "Working copy [directory] not locked" I am trying to merge a directory in subversion, but I get the following error when I do so: svn: Working copy '[directory name]' not locked' I tried deleting the working directory and doing a fresh update, but that did not solve the issue. I also did a cleanup...
{ "language": "en", "url": "https://stackoverflow.com/questions/95543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I catch exceptions only to log them? Should I catch exceptions for logging purposes? public foo(..) { try { ... } catch (Exception ex) { Logger.Error(ex); throw; } } If I have this in place in each of my layers (DataAccess, Business and WebService) it means the exception is logged...
{ "language": "en", "url": "https://stackoverflow.com/questions/95547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Overriding a MIME type in Rails I want to override the JSON MIME type ("application/json") in Rails to ("text/x-json"). I tried to register the MIME type again in mime_types.rb but that didn't work. Any suggestions? Thanks. A: Try: render :json => var_containing_my_json, :content_type => 'text/x-json' A: This s...
{ "language": "en", "url": "https://stackoverflow.com/questions/95554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there any benefit to using Cocoa's version of MVC with .NET? There's a diagram depicting the difference between traditional MVC and Cocoa MVC here: Cocoa Design Patterns: The Model-View-Controller Design Pattern Are there any benefits of doing it the "Cocoa" way in .NET using Visual Studio? A: There's no reason ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to determine the Schemas inside an Oracle Data Pump Export file * *I have an Oracle database backup file (.dmp) that was created with expdp. *The .dmp file was an export of an entire database. *I need to restore 1 of the schemas from within this dump file. *I don't know the names of the schemas inside this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: JQuery error option in $.ajax utility The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the XHR instance (Book: JQuery in Action) Using the following (in the $.ajax call) I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: XNA File Load In XNA, how do I load in a texture or mesh from a file without using the content pipeline? A: The .FromFile method will not work on xbox or zune. You have two choices: * *Just use the content pipeline ... on xbox or zune (if you care about them), you can't have user-supplied content anyways, so it...
{ "language": "en", "url": "https://stackoverflow.com/questions/95606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Append Subject Header in Outlook (VBA) Basically, we have a rule setup to run a script when a code word is detected in the body of an incoming message. The script will append the current subject header with a word in front. For example, Before: "Test Message", After: "Dept - Test Message". Any ideas? A: Or if you n...
{ "language": "en", "url": "https://stackoverflow.com/questions/95625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to build a 64-bit .NET DLL, with 64-bit COM interop? I need to build a managed DLL, targeted for x64, and expose it via x64 COM. I need a walk through, good article, etc... Interop is fairly straightforward, but when you talk about x64 on both sides, I can't find anything. A: Take a look at this discussion. And...
{ "language": "en", "url": "https://stackoverflow.com/questions/95628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Open a file with su/sudo inside Emacs Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is C-x C-f /sudo::/path/to/file but this requires an expensive round-trip through SSH. Is there a more direct way? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "187" }
Q: What does a just-in-time (JIT) compiler do? What does a JIT compiler specifically do as opposed to a non-JIT compiler? Can someone give a succinct and easy to understand description? A: JIT-Just in time the word itself says when it's needed (on demand) Typical scenario: The source code is completely converted into ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "631" }
Q: Does an application-wide exception handler make sense? Long story short, I have a substantial Python application that, among other things, does outcalls to "losetup", "mount", etc. on Linux. Essentially consuming system resources that must be released when complete. If my application crashes, I want to ensure these...
{ "language": "en", "url": "https://stackoverflow.com/questions/95642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: When should I consider changing thread priority I once was asked to increase thread priority to fix a problem. I refused, saying that changing it was dangerous and was not the root cause of the problem. My question is, under what circumstannces should I conider changing priority of threads? A: When you've made a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/95649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to use oAuth tokens I'm using a library to get an 'oAuth_token' and 'oAuth_token_secret'. If I make a request to a REST web service how are those two keys leveraged to verify authentication? A: Providing a C# example is a little difficult because there are a number of variables i.e. the signature method being u...
{ "language": "en", "url": "https://stackoverflow.com/questions/95651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: comparison of ways to maintain state There are various ways to maintain user state using in web development. These are the ones that I can think of right now: * *Query String *Cookies *Form Methods (Get and Post) *Viewstate (ASP.NET only I guess) *Session (InProc Web server) *Session (Dedicated web server) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: .NET property generating "must declare a body because it is not marked abstract or extern" compilation error I have a .NET 3.5 (target framework) web application. I have some code that looks like this: public string LogPath { get; private set; } public string ErrorMsg { get; private set; } It's giving me this comp...
{ "language": "en", "url": "https://stackoverflow.com/questions/95683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: VB.Net (or C#) 2008 Multi Threaded Import I am looking to build a multi-threaded text import facility (generally CSV into SQL Server 2005) and would like to do this in VB.NET but I am not against C#. I have VS 2008 trial and just dont know where to begin. Can anyone point me in the direction of where I can look a...
{ "language": "en", "url": "https://stackoverflow.com/questions/95700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What causes Firefox to make a GET request after submitting a form via the POST method? What causes Firefox to follow a POST request with a GET request when submitting a form via the POST method? The GET method is sent to the same url as the POST method but without the request parameters. If you change the form metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/95715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the easiest way to convert from asp classic to asp.net? I am a .Net developer that has been tasked with upgrading a classic asp website to asp.net. The website is currently running on luck and bubble gum but there is not enough time or money to stop progress and do a full rewrite. Of course I will still need...
{ "language": "en", "url": "https://stackoverflow.com/questions/95724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to convert floats to human-readable fractions? Let's say we have 0.33, we need to output 1/3. If we have 0.4, we need to output 2/5. The idea is to make it human-readable to make the user understand "x parts out of y" as a better way of understanding data. I know that percentages is a good substitute but I was ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "112" }
Q: Why does an onclick property set with setAttribute fail to work in IE? Ran into this problem today, posting in case someone else has the same issue. var execBtn = document.createElement('input'); execBtn.setAttribute("type", "button"); execBtn.setAttribute("id", "execBtn"); execBtn.setAttribute("value", "Execute"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "53" }
Q: Error List Freaking Out in VS 2008 while in large Aspx Files I've been having this irritating issue lately. The site I'm currently working on has large aspx pages with tons of client side js code. While I'm typing the Error List window will keep opening and closing at the bottom of VS (where I have the window docked...
{ "language": "en", "url": "https://stackoverflow.com/questions/95732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I generate a list of function dependencies in MATLAB? In order to distribute a function I've written that depends on other functions I've written that have their own dependencies and so on without distributing every m-file I have ever written, I need to figure out what the full list of dependencies is for a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How can I catch AWT thread exceptions in Java? We'd like a trace in our application logs of these exceptions - by default Java just outputs them to the console. A: A little addition to shemnons anwer: The first time an uncaught RuntimeException (or Error) occurs in the EDT it is looking for the property "sun.awt.ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/95767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I add FTP support to Eclipse? I'm using Eclipse PHP Development Tools. What would be the easiest way to access a file or maybe create a remote project trough FTP and maybe SSH and SFTP?. A: Install Aptana plugin to your Eclipse installation. It has built-in FTP support, and it works excellently. You can: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "93" }
Q: In Perl, how do I create a hash whose keys come from a given array? Let's say I have an array, and I know I'm going to be doing a lot of "Does the array contain X?" checks. The efficient way to do this is to turn that array into a hash, where the keys are the array's elements, and then you can just say if($hash{X}) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/95820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: Should I use haml or erb or erubis for potentially high traffic site? I have been playing with Haml recently and really like the way the resulting code looks to me...the developer. I'm also not too worried about a designer being able to consume or change it...we're a small team. That said, beginning work on a proje...
{ "language": "en", "url": "https://stackoverflow.com/questions/95821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Replace a character with a string in LaTeX I'm looking for a way to do a substring replace on a string in LaTeX. What I'd like to do is build a command that I can call like this: \replace{File,New} and that would generate something like \textbf{File}$\rightarrow$\textbf{New} This is a simple example, but I'd like...
{ "language": "en", "url": "https://stackoverflow.com/questions/95824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the most efficient way to handle the lifecycle of an object with COM interop? I have a Windows Workflow application that uses classes I've written for COM automation. I'm opening Word and Excel from my classes using COM. I'm currently implementing IDisposable in my COM helper and using Marshal.ReleaseComObje...
{ "language": "en", "url": "https://stackoverflow.com/questions/95834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to determine internal name of table-valued variable in MS SQL Server 2005 The name of a temporary table such as #t1 can be determined using select @TableName = [Name] from tempdb.sys.tables where [Object_ID] = object_id('tempDB.dbo.#t1') How can I find the name of a table valued variable, i.e. one declared by...
{ "language": "en", "url": "https://stackoverflow.com/questions/95842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }