text
stringlengths
8
267k
meta
dict
Q: How to parse a time into a Date object from user input in JavaScript? I am working on a form widget for users to enter a time of day into a text input (for a calendar application). Using JavaScript (we are using jQuery FWIW), I want to find the best way to parse the text that the user enters into a JavaScript Date()...
{ "language": "en", "url": "https://stackoverflow.com/questions/141348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: How do I find what is using memory in a Python process in a production system? My production system occasionally exhibits a memory leak I have not been able to reproduce in a development environment. I've used a Python memory profiler (specifically, Heapy) with some success in the development environment, but it ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/141351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Team Foundation Server - Use API to Sync to SVN Has anyone out there used TFS's API to synchronize different types of repositories? I have a SVN repo that I want to sync with a TFS repo. More accurately, I just want to take everything latest from SVN occasionally (nightly) and dump it out to TFS as the latest vers...
{ "language": "en", "url": "https://stackoverflow.com/questions/141353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Flex Post Event Screen Updates I came across this topic today while investigating something very strange. Doing certain things in our Flex app can cause the number of frames rendered to rocket, from 12fps to ~30fps: loaded animations start playing at high speed and the GUI starts to lock up. Since everything I've re...
{ "language": "en", "url": "https://stackoverflow.com/questions/141360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Calculating the elapsed working hours between 2 datetime Given two datetimes. What is the best way to calculate the number of working hours between them. Considering the working hours are Mon 8 - 5.30, and Tue-Fri 8.30 - 5.30, and that potentially any day could be a public holiday. This is my effort, seem hideously ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: INotifyPropertyChanged property name - hardcode vs reflection? What is the best way to specify a property name when using INotifyPropertyChanged? Most examples hardcode the property name as an argument on the PropertyChanged Event. I was thinking about using MethodBase.GetCurrentMethod.Name.Substring(4) but am a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to emulate Emacs’ transpose-words in Vim? Emacs has a useful transpose-words command which lets one exchange the word before the cursor with the word after the cursor, preserving punctuation. For example, ‘stack |overflow’ + M-t = ‘overflow stack|’ (‘|’ is the cursor position). <a>|<p> becomes <p><a|>. Is it pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/141372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Dynamic RadioButtons Our resident Flex expert is out for the day and I thought this would be a good chance to test this site out. I have a dropdown with a dataProvider that is working fine: <ep:ComboBox id="dead_reason" selectedValue="{_data.dead_reason}" dataProvider="{_data.staticData.dead_reason}" labelFi...
{ "language": "en", "url": "https://stackoverflow.com/questions/141388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to handle block ciphers in C++? (Crypto++) I'm pretty new to both C++ and Block Cipher encryption, and I am currently in the process of writing a decryption function for AES (16 byte seed / 16 byte blocks). All is going well, but my total data size is not always a multiple of my block size. I'm wondering wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/141399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Yahoo GeoPlanet & XPathNavigator C# I am returning XML data from the Yahoo GeoPlanet web service using HttpWebRequest. I am loading the XML using XPathDocument doc = new XPathDocument(HttpWebResponse.GetResponseStream()) Next comes: XPathNavigator nav = doc.CreateNavigator(); If I do nav.Select("places"); or nav...
{ "language": "en", "url": "https://stackoverflow.com/questions/141405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I re-import a subreport into Crystal reports 9.0 without getting an Access Denied error? I'm using Crystal Reports 9.0. It has a subreport which is shared by 2 master reports. I modified the subreport as a result of fixing one of the master reports. When I try to re-import that subreport into my 2nd Master...
{ "language": "en", "url": "https://stackoverflow.com/questions/141406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tomcat 6.0.18 service will not start on a windows server I installed Tomcat 6.0.18 on a windows server 2003 box and it will not start as a service. I'm running it with jdk 1.6.0_07. It runs when I start it with tomcat6.exe. I got a vague error in the System Event Log on Windows. The Apache Tomcat 6 service terminate...
{ "language": "en", "url": "https://stackoverflow.com/questions/141411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can a transform a polynomial to another coordinate system? Using assorted matrix math, I've solved a system of equations resulting in coefficients for a polynomial of degree 'n' Ax^(n-1) + Bx^(n-2) + ... + Z I then evaulate the polynomial over a given x range, essentially I'm rendering the polynomial curve. Now...
{ "language": "en", "url": "https://stackoverflow.com/questions/141422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: If I register for an event in c# while it's dispatching, am I guaranteed to not get called again during that dispatch? In C#, I find myself occasionally wanting to register a method for an event in the middle of a dispatch of that same event. For example, if I have a class that transitions states based on successiv...
{ "language": "en", "url": "https://stackoverflow.com/questions/141423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Gracefully closing a frame (toolbar) around an iframe I've created a tool that is used with a fairly popular music retailer. The tool provides an enhanced search feature (transparent last.fm results, no ads, no lameness, nothing creepy) and I've found the most useful and unobtrusive way to display the search is as a...
{ "language": "en", "url": "https://stackoverflow.com/questions/141427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there a standard implementation for Electronic Signatures on fill-in-form web applications? I have a client who is interested in adding in electronic signature support to a long (40 question) seller application form. I'm a little stumped on whether there is an existing standard or process that's out there that fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/141428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I create a status bar item with Cocoa and Python (PyObjC)? I have created a brand new project in XCode and have the following in my AppDelegate.py file: from Foundation import * from AppKit import * class MyApplicationAppDelegate(NSObject): def applicationDidFinishLaunching_(self, sender): NSLog...
{ "language": "en", "url": "https://stackoverflow.com/questions/141432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Advantages of using MSBuild or NAnt versus running DevEnv.exe from command-line Can anyone explain what advantages there are to using a tool like MSBuild (or NAnt) to build a collection of projects versus running DevEnv.exe from the command-line? A colleague I had worked with in the past had explained that (at least...
{ "language": "en", "url": "https://stackoverflow.com/questions/141435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is a JavaScript try-catch ignoring an expected occasional error bad practice? In JavaScript is it wrong to use a try-catch block and ignore the error rather than test many attributes in the block for null? try{ if(myInfo.person.name == newInfo.person.name && myInfo.person.address.street == newInfo.person.a...
{ "language": "en", "url": "https://stackoverflow.com/questions/141441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I wrap a string in a file in Python? How do I create a file-like object (same duck type as File) with the contents of a string? A: If your file-like object is expected to contain bytes, the string should first be encoded as bytes, and then a BytesIO object can be used instead. In Python 3: from io import Byt...
{ "language": "en", "url": "https://stackoverflow.com/questions/141449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "126" }
Q: Javascript to detect whether the dropdown of a select element is visible I have a select element in a form, and I want to display something only if the dropdown is not visible. Things I have tried: * *Watching for click events, where odd clicks mean the dropdown is visible and even clicks mean the dropdown isn't...
{ "language": "en", "url": "https://stackoverflow.com/questions/141450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to purge expired items from cache? I've got a nice little class built that acts as a cache. Each item has an expiration TimeSpan or DateTime. Each time an attempt to access an item in the cache is made, the item's expiration is checked, and if it's expired, the item is removed from the cache and nothing is retur...
{ "language": "en", "url": "https://stackoverflow.com/questions/141452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jdbc driver for Microsoft SQL Server CE(Compact Edition) 3.5 I want to be able to explore the contents of a DB for this version of the DB. I was thinking of using the Squirrel DB client (which needs a JDBC driver). Therefore, I'm looking for a JDBC type 4 driver for SQL SERVER 3.5. Can somone point me to a FREE OR ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Recursive List Flattening I could probably write this myself, but the specific way I'm trying to accomplish it is throwing me off. I'm trying to write a generic extension method similar to the others introduced in .NET 3.5 that will take a nested IEnumerable of IEnumerables (and so on) and flatten it into one IEnum...
{ "language": "en", "url": "https://stackoverflow.com/questions/141467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How to configure secure RESTful services with WCF using username/password + SSL I'm looking to write a config file that allows for RESTful services in WCF, but I still want the ability to 'tap into' the membership provider for username/password authentication. The below is part of my current config using basicHttp b...
{ "language": "en", "url": "https://stackoverflow.com/questions/141484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Is there an easy way to populate SlugField from CharField? class Foo(models.Model): title = models.CharField(max_length=20) slug = models.SlugField() Is there a built-in way to get the slug field to autopopulate based on the title? Perhaps in the Admin and outside of the Admin. A: for Admin in Django 1.0 a...
{ "language": "en", "url": "https://stackoverflow.com/questions/141487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: What open source C++ static analysis tools are available? Java has some very good open source static analysis tools such as FindBugs, Checkstyle and PMD. Those tools are easy to use, very helpful, runs on multiple operating systems and free. Commercial C++ static analysis products are available. Although having suc...
{ "language": "en", "url": "https://stackoverflow.com/questions/141498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "306" }
Q: Any Java libraries out there that validate SQL syntax? I'm not sure if this even exists or not, so I figured I would tap the wisdom of others.. I was wondering if there are any Java libraries out there that can be used to validate a SQL query's syntax. I know that there are many deviations from common SQL spec, so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Visual Studio 2008 source control for small teams I work on a small web team where I am the only .NET developer currently using Visual Studio 2008 Professional to build and maintain a few web applications. I am about to start training another member of our team so we purchased him a copy of Visual Studio 2008 Profe...
{ "language": "en", "url": "https://stackoverflow.com/questions/141500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Does anyone know when the ASP.NET MVC will be fully released? When do you think we can expect the full release version of ASP.NET MVC? A: EDIT (16/Jul/2009) Updating to ensure this page contains the most recent details. ASP.NET MVC is now fully released http://www.asp.net/mvc/. EDIT (28/Jan/2009) ASP.NET MVC 1.0 R...
{ "language": "en", "url": "https://stackoverflow.com/questions/141508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which php variable debugging function do you use? var_dump, print_r, var_export, other? I personally use var_dump, but lots of people like print_r. What does everyone use? Pros and Cons? Does someone have a special home brew function of their own? A: I use print_r() because I like the pretty array structure... but...
{ "language": "en", "url": "https://stackoverflow.com/questions/141513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Windows clipboard CRLF/LF passing wrong for one user We have a pair of applications. One is written in C# and uses something like: string s = "alpha\r\nbeta\r\ngamma\r\ndelta"; // Actually there's wrapper code here to make sure this works. System.Windows.Forms.Clipboard.SetDataObject(s, true); To put a list of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are bitwise shift (bit-shift) operators and how do they work? I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators)... At a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas...
{ "language": "en", "url": "https://stackoverflow.com/questions/141525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1515" }
Q: MVC n-level route building I want to create a productcatalog with N-Level Categories e.g. /Catalog/Category1/Category2/../SubCategoryN/Product/{ProductActions}/{ID} And at the same time be able to /Catalog/Category1/Category2/../SubCategoryN/{CategoryActions} Is that possible and if Yes how? A: Not with the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/141534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to overload __init__ method based on argument type? Let's say I have a class that has a member called data which is a list. I want to be able to initialize the class with, for example, a filename (which contains data to initialize the list) or with an actual list. What's your technique for doing this? Do you j...
{ "language": "en", "url": "https://stackoverflow.com/questions/141545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "417" }
Q: What are the pitfalls of inserting millions of records into SQL Server from flat file? I am about to start on a journey writing a windows forms application that will open a txt file that is pipe delimited and about 230 mb in size. This app will then insert this data into a sql server 2005 database (obviously this ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/141556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Should try...catch go inside or outside a loop? I have a loop that looks something like this: for (int i = 0; i < max; i++) { String myString = ...; float myNum = Float.parseFloat(myString); myFloats[i] = myNum; } This is the main content of a method whose sole purpose is to return the array of floats. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: SQL to find the number of distinct values in a column I can select all the distinct values in a column in the following ways: * *SELECT DISTINCT column_name FROM table_name; *SELECT column_name FROM table_name GROUP BY column_name; But how do I get the row count from that query? Is a subquery required? A: You c...
{ "language": "en", "url": "https://stackoverflow.com/questions/141562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "423" }
Q: Bulk time entry into timesprite / fogbugz Is there a good way to import time data into either timesprite or fogbugz? Both seem to have very clunky interfaces for adding single items at a time. What I want is a spreadsheet-style format that I can enter a bunch of rows and suck them in. Noticed timesprite has an imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/141596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Storing Relational Data in XML I'm wondering what the best practices are for storing a relational data structure in XML. Particulary, I am wondering about best practices for enforcing node order. For example, say I have three objects: School, Course, and Student, which are defined as follows: class School { List...
{ "language": "en", "url": "https://stackoverflow.com/questions/141598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you get a list of changes from a Subversion repository by date range? What I would like is be able to generate a simple report that is the output of svn log for a certain date range. Specifically, all the changes since 'yesterday'. Is there an easy way to accomplish this in Subversion besides grep-ing the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: LINQ Syntext Sequence The following SQL SELECT * FROM customers converted to this in LINQ var customers = from c in customers select c; Is their any good reasones why the from and select is swaped? The only logical reason I can think of is for intellisens? For the intellesens to get resolved, it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I hide content in a HTML file from search engines? Say that I write an article or document about a certain topic, but the content is meant for readers with certain prior knowledge about the topic. To help people who don't have the "required" background information, I would like to add a note to the top of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/141606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: iterating over Enum constants in JSP I have an Enum like this package com.example; public enum CoverageEnum { COUNTRY, REGIONAL, COUNTY } I would like to iterate over these constants in JSP without using scriptlet code. I know I can do it with scriptlet code like this: <c:forEach var="type" items="<%=...
{ "language": "en", "url": "https://stackoverflow.com/questions/141611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Database structure to track change history I'm working on database designs for a project management system as personal project and I've hit a snag. I want to implement a ticket system and I want the tickets to look like the tickets in Trac. What structure would I use to replicate this system? (I have not had any suc...
{ "language": "en", "url": "https://stackoverflow.com/questions/141612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: RoR: Accessing models from with application.rb i am working on a simple web app which has a user model and role model (among others), and an admin section that contains many controllers. i would like to use a before_filter to check that the user of the user in the session has a 'can_access_admin' flag. i have this c...
{ "language": "en", "url": "https://stackoverflow.com/questions/141620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I access PostData from WebBrowser.Navigating event handler? I've got a windows form in Visual Studio 2008 using .NET 3.5 which has a WebBrowser control on it. I need to analyse the form's PostData in the Navigating event handler before the request is sent. Is there a way to get to it? The old win32 browser...
{ "language": "en", "url": "https://stackoverflow.com/questions/141626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I read raw (CF_HTML) clipboard data in a webpage or C#? If I drag and drop a selection of a webpage from Firefox to HTML-Kit, HTML-Kit asks me whether I want to paste as text or HTML. If I select "text," I get this: Version:0.9 StartHTML:00000147 EndHTML:00000516 StartFragment:00000181 EndFragment:00000480 S...
{ "language": "en", "url": "https://stackoverflow.com/questions/141630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Another JPA Question I have this code: @PersistenceContext(name="persistence/monkey", unitName="deltaflow-pu") ... @Stateless public class GahBean implements GahRemote { But when I use this: try{ InitialContext ic = new InitialContext(); System.out.println("Pissing me off * " + ic.lookup("java:comp/env/persistent...
{ "language": "en", "url": "https://stackoverflow.com/questions/141637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: What constitutes effective Perl training for non-Perl developers? I've been working with Perl long enough that many of its idiosyncracies have become second nature to me. When new programmers join our group, they frequently have little to no experience with Perl, and it's usually my task to train them (to the exten...
{ "language": "en", "url": "https://stackoverflow.com/questions/141641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What limitations have closures in Python compared to language X closures? Where X is any programming language (C#, Javascript, Lisp, Perl, Ruby, Scheme, etc) which supports some flavour of closures. Some limitations are mentioned in the Closures in Python (compared to Ruby's closures), but the article is old and m...
{ "language": "en", "url": "https://stackoverflow.com/questions/141642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Socket programming for mobile phones in Python I've written code for communication between my phone and comp thru TCP sockets. When I type out the code line by line in the interactive console it works fine. However, when i try running the script directly through filebrowser.py it just wont work. I'm using Nokia N95....
{ "language": "en", "url": "https://stackoverflow.com/questions/141647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you make a generic memoize function in Haskell? I've seen the other post about this, but is there a clean way of doing this in Haskell? As a 2nd part, can it also be done without making the function monadic? A: This largely follows http://www.haskell.org/haskellwiki/Memoization. You want a function of type (...
{ "language": "en", "url": "https://stackoverflow.com/questions/141650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Viewing the Visual SourceSafe log inside Visual Studio Is there any way to view the activity log for the integrate SourceSafe inside Visual Studio 2005 Pro? I'd like to be able to quickly see the results of any Get Latest Version, Check In and Checkout actions, and I can't find a way to get that information without ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Polyglot Programming: Is building applications with multiple languages a good practice? I am considering building an application that is a blend of a dynamic language (python or ruby) and compiled language and need some help getting convincing myself that this is a good idea. My thought are that I can use a dynamic ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I find a default constraint using INFORMATION_SCHEMA? I'm trying to test if a given default constraint exists. I don't want to use the sysobjects table, but the more standard INFORMATION_SCHEMA. I've used this to check for tables and primary key constraints before, but I don't see default constraints anywhere...
{ "language": "en", "url": "https://stackoverflow.com/questions/141682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "134" }
Q: Adding a flash after authentication with merb-auth What's the best way to add a flash message, for successful or unsuccessful login when using the merb-auth slice (Other than overriding sessions create)? A: Hey deimos. If you want to add an message without overwriting the create action you can always use an after...
{ "language": "en", "url": "https://stackoverflow.com/questions/141683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Web Deployment: build code, or deploy .war? Two main ways to deploy a J2EE/Java Web app (in a very simplistic sense): Deploy assembled artifacts to production box Here, we create the .war (or whatever) elsewhere, configure it for production (possibly creating numerous artifacts for numerous boxes) and place the...
{ "language": "en", "url": "https://stackoverflow.com/questions/141693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I use a shell command to tar a list of files and folders with exclusions How do I tar a list of files and folders (all in the same directory) with the exclusion of a single directory (which contains a huge amount of data) A: tar --exclude=PATTERN xvzf nameof.tar.gz ./* PATTERN can be the directory name. GNU ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to set CPU load on a Red Hat Linux box? I have a RHEL box that I need to put under a moderate and variable amount of CPU load (50%-75%). What is the best way to go about this? Is there a program that can do this that I am not aware of? I am happy to write some C code to make this happen, I just don't know what s...
{ "language": "en", "url": "https://stackoverflow.com/questions/141707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .NET Compact Framework 3.5 on Windows Mobile 2003 SE Does .NET Compact Framework 3.5 work on Windows Mobile 2003 SE without limitations? A: Yes, it works fine. The documentation for the download shows this as well.
{ "language": "en", "url": "https://stackoverflow.com/questions/141716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server Temp Tables and Connection Pooling I have a multi-user ASP.NET app running against SQL Server and want to have StoredProcA create a #temptable temp table - not a table variable - to insert some data, then branch to StoredProcB, StoredProcC, and StoredProcD to manipulate the data in #temptable per business...
{ "language": "en", "url": "https://stackoverflow.com/questions/141718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How do you compare structs for equality in C? How do you compare two instances of structs for equality in standard C? A: Note you can use memcmp() on non static stuctures without worrying about padding, as long as you don't initialise all members (at once). This is defined by C90: http://www.pixelbeat.org/programmi...
{ "language": "en", "url": "https://stackoverflow.com/questions/141720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "249" }
Q: OC4J 10.1.3.4 problem with deploying multiple 2.1 EJBs I am having troubles migrating from OC4J 10.1.2.3 to 10.1.3.1.4. The problem is for applications that have multiple EJBs (all are 2.1, no EJB 3.0). Jdeveloper will take the default ejb-jar.xml (the one required for Jdeveloper to run it on its stand-alone OC4J i...
{ "language": "en", "url": "https://stackoverflow.com/questions/141733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the default session timeout for a Java EE website? If I do not specify the following in my web.xml file: <session-config> <session-timeout>10</session-timeout> </session-config> What will be my default session timeout? (I am running Tomcat 6.0) A: You can also set this in code, for a specific session u...
{ "language": "en", "url": "https://stackoverflow.com/questions/141734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Float values behaving differently across the release and debug builds My application is generating different floating point values when I compile it in release mode and in debug mode. The only reason that I found out is I save a binary trace log and the one from the release build is ever so slightly off from the deb...
{ "language": "en", "url": "https://stackoverflow.com/questions/141752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: GDI has been accelerated. Does anyone know when this happened? To sketch the background of this question : at work we use Dell Precision workstations. My current one has got an NVidia Quadro FX1700. My team is developing the graphics components for a real time data acquisition system. So we are always looking out to...
{ "language": "en", "url": "https://stackoverflow.com/questions/141758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there an alternative to conditional display:none I inherited an application where display:none was used to control conditional display of input elements based the values of other input elements. The way this was handled is by running some pretty ugly code to evaluate field values and reset the display property in...
{ "language": "en", "url": "https://stackoverflow.com/questions/141775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Solving the NP-complete problem in XKCD The problem/comic in question: http://xkcd.com/287/ I'm not sure this is the best way to do it, but here's what I've come up with so far. I'm using CFML, but it should be readable by anyone. <cffunction name="testCombo" returntype="boolean"> <cfargument name="currentCombo...
{ "language": "en", "url": "https://stackoverflow.com/questions/141779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: KornShell (ksh) wraparound Okay, I am sure this is simple but it is driving me nuts. I recently went to work on a program where I have had to step back in time a bit and use Redhat 9. When I'm typing on the command line from a standard xterm running KornShell (ksh), and I reach the end of the line the screen slides ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: .Net Web Service Logging My ideal situation for logging in our web service would be to log all the method calls (authentication as well as data access) with the parameters passed to them as well as errors that may have occured, and have them linked with a single ID that associates them with the same call. In additi...
{ "language": "en", "url": "https://stackoverflow.com/questions/141781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I dump an entire Python process for later debugging inspection? I have a Python application in a strange state. I don't want to do live debugging of the process. Can I dump it to a file and examine its state later? I know I've restored corefiles of C programs in gdb later, but I don't know how to examine a...
{ "language": "en", "url": "https://stackoverflow.com/questions/141802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How do I rename an entire project in VC++ 2005 I've got a really large project I made for myself and rece3ntly a client asked for their own version of it with some modifications. The project name was rather silly and my client wants the source so I figured it'd be best if I renamed all my files from sillyname.h sil...
{ "language": "en", "url": "https://stackoverflow.com/questions/141807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to ignore accents in highlight function I have a micro-mini-search engine that highlights the search terms in my rails app. The search ignores accents and the highlight is case insensitive. Almost perfect. But, for instance if I have a record with the text "pão de queijo" and searches for "pao de queijo" the rec...
{ "language": "en", "url": "https://stackoverflow.com/questions/141808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I programmatically repair (not merely compact) an Access .mdb file? I have a corrupt database. If I open it in MS Access, MS Access offers to repair it, and it succeeds. How can I do that with code? On a machine where MS Access is not installed. I know from trying it that JRO.JetEngine.CompactDatabase doe...
{ "language": "en", "url": "https://stackoverflow.com/questions/141810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which Haskell package contains given module I know a Haskell module name, but I can't figure out in what package it is defined. This is bad because I can't compile without a package exposing this module. Specificaly it is Text.Regex that I can't locate, but I would like to know how to solve that problem in general. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: sql 2005 rollback transaction I just did a delete from table How do I roll back or undelete the rows?? A: if you called begin transaction before you did it, and have not yet called commit, then you can call rollback, otherwise... you're gonna have to restore A: Assuming you have a recent full backup of your data...
{ "language": "en", "url": "https://stackoverflow.com/questions/141828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Programmatically Lighten a Color Motivation I'd like to find a way to take an arbitrary color and lighten it a few shades, so that I can programatically create a nice gradient from the one color to a lighter version. The gradient will be used as a background in a UI. Possibility 1 Obviously I can just split out the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: Java, unicode and fonts I've looked at the java documentation and scoured the net for information on java's support for international characters with specific fonts (such as Monospace), but haven't been able to get a clear concrete answer. There has been a change between java 1.4 and java 1.5/1.6. For example, in ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/141859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there an issue sending XML via WCF? Suppose you have an XElement or an XmlElment or even a string containing xml that you want to send via WCF. Are there any special precautions you have to take? The question just came up, what happens when, within the xml message, you transmit an xml document declaration (<?xm...
{ "language": "en", "url": "https://stackoverflow.com/questions/141863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Operator overloading for C++ maps I need help understanding some C++ operator overload statements. The class is declared like this: template <class key_t, class ipdc_t> class ipdc_map_template_t : public ipdc_lockable_t { ... typedef map<key_t, ipdc_t*, less<key_t>> map_t; ... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best place for log files in an in-house IT environment All of my users are a short walk down the hall, and all of my programs run on workstations on the same LAN. Some years ago, I had the staff write the log files for all of their programs to a shared folder hierarchy, naming each log file after the machine name in...
{ "language": "en", "url": "https://stackoverflow.com/questions/141869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Antlr: Simplest way to recognize dates and numbers? What is the simplest (shortest, fewest rules, and no warnings) way to parse both valid dates and numbers in the same grammar? My problem is that a lexer rule to match a valid month (1-12) will match any occurrence of 1-12. So if I just want to match a number, I nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/141875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Application Title Cut Off In VB6 Platform: Windows XP Development Platform: VB6 When trying to set an application title via the Project Properties dialog on the Make tab, it seems to silently cut off the title at a set number of characters. Also tried this via the App.Title property and it seems to suffer from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to escape an underscore in a C preprocessor token? The following snippet is supposed to take the value of PROJECT (defined in the Makefile) and create an include file name. For example, if PROJECT=classifier, then it should at the end generate classifier_ir.h for PROJECTINCSTR I find that this code works as long...
{ "language": "en", "url": "https://stackoverflow.com/questions/141878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: taglib -> dependency injection pojo/service how? Is there a nice way to dependency inject using a jsp taglib? either using ejb 3.0, spring, or guice... I have a lot of services/pojos that I would like to use in my taglibs A: I think you want Seam, it enables you to refer to a component by name. However, the release...
{ "language": "en", "url": "https://stackoverflow.com/questions/141885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the methods for tokenizing strings in .Net? This must be a classic .NET question for anyone migrating from Java. .NET does not seem to have a direct equivalent to java.io.StreamTokenizer, however the JLCA provides a SupportClass that attempts to implement it. I believe the JLCA also provides a Tokenizer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Command line builds for VC 6? I have been used to working with VS2005 and 2008 - using msbuild, etc, but I have inherited a set of projects that have to remain in vc6.0 for now. I don't like opening each project in the developer studio and building. I prefer to build form command line (I am automating the builds)....
{ "language": "en", "url": "https://stackoverflow.com/questions/141894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Alternatives to the MVC What are the alternative "design methods" to the Model View Controller? MVC seems to be popular (SO was built with it, I know that much) but is it the only method used? A: DCI - "Data, Communication and Interaction" http://www.antonioshome.net/kitchen/nbdci/index.php#dci-introduction http://...
{ "language": "en", "url": "https://stackoverflow.com/questions/141912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: Pulling both the text and attribute of a given node using Xpath I'm parsing XML results from an API call using PHP and xpath. $dom = new DOMDocument(); $dom->loadXML($response->getBody()); $xpath = new DOMXPath($dom); $xpath->registerNamespace("a", "http://www.example.com"); $hrefs = $xpath->query('//a:Book...
{ "language": "en", "url": "https://stackoverflow.com/questions/141913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unable to link to shared library I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting ./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj Which c++filt describes as std::_Rb_tree<unsigned int, unsigned int, std::_Ide...
{ "language": "en", "url": "https://stackoverflow.com/questions/141939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rules for multi-user WinForms apps on Vista We have an MSI installer for a .Net WinForms app for Windows XP that installs and runs only as an admin. Users have to log in to the app when it runs. Customers want it to install and run under a user account under Vista, and to use their Windows account. A preliminary loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/141951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: class with valueTypes fields and boxing I'm experimenting with generics and I'm trying to create structure similar to Dataset class. I have following code public struct Column<T> { T value; T originalValue; public bool HasChanges { get { return !value.Equals(originalValue); } } publ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get the key value of a db.ReferenceProperty without a database hit? Is there a way to get the key (or id) value of a db.ReferenceProperty, without dereferencing the actual entity it points to? I have been digging around - it looks like the key is stored as the property name preceeded with an _, but I have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PostgreSQL's and MySQL's full text search How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different? A: PostgreSQL 8.3 has built in full text search which is an integrated version of the "tsearch2" Here is the documentation: http://www....
{ "language": "en", "url": "https://stackoverflow.com/questions/141975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Anyone used the ABC Metric for measuring an application's size? There are some nice things about it (like it encapsulates the concept of Cyclomatic complexity), and I was wondering if anyone has used it in "real life". If so, what are your experiences? Is it a useful measure of size (as opposed to KLOC or Function...
{ "language": "en", "url": "https://stackoverflow.com/questions/141979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Buffer a large file; BufferedInputStream limited to 2gb; Arrays limited to 2^31 bytes I am sequentially processing a large file and I'd like to keep a large chunk of it in memory, 16gb ram available on a 64 bit system. A quick and dirty way is to do this, is simply wrap the input stream into a buffered input stream,...
{ "language": "en", "url": "https://stackoverflow.com/questions/141987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why would an UpdatePanel stop working after a few minutes? What aspects of the UpdatePanel are sensitive to time? I have an UpdatePanel that works fine. If I leave the page for a few minutes and come back, the UpdatePanel doesn't work. Looking at firebug, I see that it sends the Request and gets a Response back. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/141989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to compare 2 XML documents in Java I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end. I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for...
{ "language": "en", "url": "https://stackoverflow.com/questions/141993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "217" }
Q: jQuery override form submit not working when submit called by javascript on a element I've got a page with a normal form with a submit button and some jQuery which binds to the form submit event and overrides it with e.preventDefault() and runs an AJAX command. This works fine when the submit button is clicked but w...
{ "language": "en", "url": "https://stackoverflow.com/questions/142000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }