text
string
meta
dict
Q: Checking for Shift+Click or Ctrl+Click in a Web User Control I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink. Is this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MAX & MIN values on array using PHP Does anybody knows how can I get the max and min value of the 2nd and 3rd columns in PHP? $ar = array(array(1, 10, 9.0, 'HELLO'), array(1, 11, 12.9, 'HELLO'), array(3, 12, 10.9, 'HELLO')); Output should be like: max(12.9) min(10) A: Another o...
{ "language": "en", "url": "https://stackoverflow.com/questions/251688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Issues with using unsupported Win32 GDI Pens modes? The MSDN documentation is (somewhat) clear about the following two facts about GDI Pens: * *A Cosmetic pen (create via CreatePen or ExtCreatePen w/ PS_COSMETIC) must be 1 unit wide (well, <= 1, but let's not go there). *A Geometric (ExtCreatePen w/ PS_GEOMETRI...
{ "language": "en", "url": "https://stackoverflow.com/questions/251693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I require an optional Perl module if installed? I have Perl code which relies on Term::ReadKey to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception. How can I conditionally use an optional module, without ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251694", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Best way to read/set IE options? What is the best way to read and/or set Internet Explorer options from a web page in Javascript? I know that these are in registry settings. For example, I'm using the JavaScript Diagram Builder to dynamically generate bar charts within a web page. This uses the background color in...
{ "language": "en", "url": "https://stackoverflow.com/questions/251696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use a new Perl module without install permissions? Here is my situation: I know almost nothing about Perl but it is the only language available on a porting machine. I only have permissions to write in my local work area and not the Perl install location. I need to use the Parallel::ForkManager Perl module...
{ "language": "en", "url": "https://stackoverflow.com/questions/251705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Fetching items which has a specific set of child elements (advanced query - possible?) I have a SQL database (SQL Server 2008) which contains the following design ITEM * *ID (Int, Identity) *Name (NVarChar(50)) *Description (NVarChar(200)) META * *ID (Int, Identity) *Name (NVarChar(50)) There exists a N...
{ "language": "en", "url": "https://stackoverflow.com/questions/251711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Silverlight, Wpf Web App (xbap) or Click Once? Pros and Cons We are starting a new project and I'm trying to decide which of the Wpf-esque develop/deploy strategies we should go with. In our case we are looking at quite a complex business app that will be used by 100s (not 1000s) of people, So I'm leaning towards a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Is there a way to tell what files are not being used in a web application project I have a project with literally thousands of image files that aren't being used. The main problem is that they are intermixed with images that are. Is there a way to get a list of all project artifacts which aren't referenced? EDIT: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/251724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Enabling ehcache statistics in jboss 4.2.1 I've set hibernate.generate_statistics=true and now need to register the mbeans so I can see the statistics in the jmx console. I can't seem to get anywhere and this doesn't seem like it should be such a difficult problem. Maybe I'm making things overcomplicated, but in any...
{ "language": "en", "url": "https://stackoverflow.com/questions/251727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SAAS per seat authentication Our company makes the web based application which is priced per workstation. That means that user/pass credentials should only be used from one particular machine. Currently what is happening that several users are sharing credentials and we do not have any way to prevent this if they a...
{ "language": "en", "url": "https://stackoverflow.com/questions/251729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there a way to separate long running (e.g. stress tests) out so they're not run by default in Maven 2? We've had an ongoing need here that I can't figure out how to address using the stock Maven 2 tools and documentation. Some of our developers have some very long running JUnit tests (usually stress tests) that u...
{ "language": "en", "url": "https://stackoverflow.com/questions/251730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Should a user interface be implemented using the Singleton design pattern? I can't think of many reasons (or any at all) in which multiple independent user interfaces should be instantiated in a desktop application. Is it good practice to implement the UI as a singleton? Are there are advantages or disadvantages to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Mark an Active Directory Object as "Read-Only"? We had a bad day yesterday. One of our Domain Admins deleted an OU containing 700+ users and the same amount of computers as well as assorted other useful things like groups etc. We restored from a backup, but it wasn't pretty. I know that ADUC asks you if you're sure...
{ "language": "en", "url": "https://stackoverflow.com/questions/251738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Odd issue with textbox and ASP.NET This code was working properly before, basically I have a master page that has a single text box for searching, I named it searchBox. I have a method to pull the content of searchBox on form submit and set it to a variable userQuery. Here is the method: Public Function searchStri...
{ "language": "en", "url": "https://stackoverflow.com/questions/251740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to use scalax.io.CommandLineParser? I want to create a class that takes string array as a constructor argument and has command line option values as members vals. Something like below, but I don't understand how the Bistate works. import scalax.data._ import scalax.io.CommandLineParser class TestCLI(arguments: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best way to get a comma delineated string into xml format? Using VB.net (.net 2.0) I have a string in this format: record1_field1,record1_field2,record2_field3,record2_field1,record2_field2, etc... I wonder what the best (easiest) way is to get this into an xml? I can think of 2 ways: Method 1: - use split to get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/251753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pattern matching and placeholder values I'm writing an application that uses renaming rules to rename a list of files based on information given by the user. The files may be inconsistently named to begin with, or the filenames may be consistent. The user selects a list of files, and inputs information about the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/251759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why don't you source control your references directly? I'm in the process of establishing some new source control best practices for my organization, so I've been immersing myself in things like TreeSurgeon for the past few days. One thing I see a lot is that it's a best practice to include your references in your s...
{ "language": "en", "url": "https://stackoverflow.com/questions/251775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Misused design patterns Are there, in the canonical Gang of Four list, any design patterns that you often find misused, misunderstood or overused (other than the highly debated Singleton)? In other words, is there a design pattern you would advise to think twice before using? (And why?) A: I would also say the fact...
{ "language": "en", "url": "https://stackoverflow.com/questions/251778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to find the kth largest element in an unsorted array of length n in O(n)? I believe there's a way to find the kth largest element in an unsorted array of length n in O(n). Or perhaps it's "expected" O(n) or something. How can we do this? A: A Programmer's Companion to Algorithm Analysis gives a version that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/251781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "232" }
Q: Running Eclipse Junit Plugin tests with Junit 4.4 or newer -- why aren't tests detected? I need to use JUnit 4.4 (or newer) in a set of eclipse plugin tests, but I've run into the following problem: Tests are not detected when running with the junit 4.4 or 4.5 bundles from springsource (junit44 and junit45). The or...
{ "language": "en", "url": "https://stackoverflow.com/questions/251791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I manage version control when developing with SQL Server Express? I am developing a website using SQL Server Express on my development machine. My web hosting company is providing me with SQL Server 2005. At the moment all I have is a database that I develop with and a database that is on the live server. I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/251795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Attributes on an interface I have a interface that defines some methods with attributes. These attributes need to be accessed from the calling method, but the method I have does not pull the attributes from the interface. What am I missing? public class SomeClass: ISomeInterface { MyAttribute GetAttribute() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Programmatically generate an Eclipse project I use eclipse to work on an application which was originally created independently of eclipse. As such, the application's directory structure is decidedly not eclipse-friendly. I want to programmatically generate a project for the application. The .project and .classpat...
{ "language": "en", "url": "https://stackoverflow.com/questions/251807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: jQuery and "Organized Code" I've been struggling lately with understanding the best way to organize jQuery code. I asked another question earlier and I don't think I was specific enough (found in this question here). My problem is that the richer you make an application, the quicker your client side gets out of cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/251814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: Formview Being Cleared My problem is that all the textbox's my formview are getting cleared when I hit the submit button. I currently have a page with a small section that has an update panel around it. This small section adds an address to my databse. To the left of this form there is a gridview that is tied into t...
{ "language": "en", "url": "https://stackoverflow.com/questions/251816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How would I go about investigating and resolving a Mercurial authorization problem? I have a private repository with bitbucket. I'm using Mercurial Distributed SCM (version 0.9.3) on Ubuntu. When I try to clone my repository, I'm prompted for my username and password which I enter correctly. as a result i get: abort...
{ "language": "en", "url": "https://stackoverflow.com/questions/251817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retrieve an object that has a member variable with the longest string length Given a Generic List of objects that contain a member variable that is a string, what is the best way to get the object that contains the string with the longest length? ie. assuming val1 is the string I'm comparing: 0 : { val1 = "a" } 1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Asp.Net : Extended range validation I'm using Asp.Net 2.0. I have a scenario where i need to check a user input against any of two ranges. For e.g. I need to check a textbox value against ranges 100-200 or 500-600. I know that i can hook up 2 Asp.Net RangeValidators to the TextBox, but that will try to validate the...
{ "language": "en", "url": "https://stackoverflow.com/questions/251842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you check and see if a propel object has an i18n record? I'm using symfony and propel, and I'm trying to invoke a specific culture on an object and output some fields of that object to the screen in that specific culture. However, if the object's mapped database record doesn't have those fields in that specif...
{ "language": "en", "url": "https://stackoverflow.com/questions/251850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using PowerShell to add an extension to files I have a directory of files that I'd like to append file extension to as long as they don't have an existing, specified extension. So add .txt to all file names that don't end in .xyz. PowerShell seems like a good candidate for this, but I don't know anything about it. H...
{ "language": "en", "url": "https://stackoverflow.com/questions/251851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: DrawString over a TextBox Possible Duplicate: Watermarked Textbox for Compact Framework Using Visual Studio 2008 SP1, the latest Compact framework and Windows Mobile 5. I need to use DrawString to put a string over a TextBox. But as soon as I draw the string the TextBox Control just over writes it. (I Know becaus...
{ "language": "en", "url": "https://stackoverflow.com/questions/251861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java -> Apache Commons StringEscapeUtils -> escapeJavaScript For a very simple ajax name lookup, I'm sending an id from the client webpage to the server (Tomcat 5.5, Java 5), looking it up in a database and returning a string, which is assigned to a javascript variable back in the client (and then displayed). The ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/251865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should you declare methods using overloads or optional parameters in C# 4.0? I was watching Anders' talk about C# 4.0 and sneak preview of C# 5.0, and it got me thinking about when optional parameters are available in C# what is going to be the recommended way to declare methods that do not need all parameters speci...
{ "language": "en", "url": "https://stackoverflow.com/questions/251868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: a struct doesn't belong in an object oriented program Or does it? Should an object-oriented design use a language construct that exposes member data by default, if there is an equally useful construct that properly hides data members? EDIT: One of the responders mentioned that if there's no invariant one can use a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SPCrossListQuery fails to bring back results I am calling SPWeb.GetSiteData(anSpCrossListQuery). It fails to bring back any results or any errors when I call it with an accidental space at the end of the CAML query <Where></Where> clause. Anyone have an idea why? A: Because SharePoint is intent on making developmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/251888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Displaying unit test results in VS 2008 I am a rookie was using the Visual Studio 2008 built-in Unit Testing components, what would be the best way to record or display your results in a unit test? I want to test my service method when it returns a System.GUID and an empty System.GUID [TestMethod] public void GetGUI...
{ "language": "en", "url": "https://stackoverflow.com/questions/251890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: glDrawPixels causes AccessViolationException I am using glDrawPixels to display an image. I know, I should probably be using textures but there are reasons I'm not. Well at least not for now. Anyways, image being displayed is frequently being updated as if it is being scanned in. This works fine as long as I let it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to do full text search of all oracle packages and procedures? I would like to search through all of my procedures packages and functions for a certain phrase. Since it is possible to retrieve the code for compiled procedures using toad I assume that the full text is stored in some data dictionary tabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/251902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: How can I insert current date and time into a file using Emacs? What commands in Emacs can I use to insert into the text buffer of a file the current date and time? (For example, the equivalent in Notepad is simply pressing F5 which is about the only useful feature for Notepad!) A: Here's a package I wrote a while ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "92" }
Q: DSOFramer closing Excel doc in another window. If unsaved data in file, dsoframer fails to open with "Attempt to access invalid address" I'm using Microsoft's DSOFramer control to allow me to embed an Excel file in my dialog so the user can choose his sheet, then select his range of cells; it's used with an import b...
{ "language": "en", "url": "https://stackoverflow.com/questions/251909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: string.split returns a string[] I want a List is there a one liner to convert an array to a list? Lists in C# have the .ToArray() method. I want the inverse, where an array is transformed into a list. I know how to create a list and loop through it but I would like a one liner to swap it back. I am using the String....
{ "language": "en", "url": "https://stackoverflow.com/questions/251924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: What is your "Watch out" list regarding avoiding memory leaks when you write .NET code? What do you keep on mind to avoid memory leaks when you write thousands lines of .NET code? I'm a big fan of prevention over inspection , there is a famous example regarding this point which is using a "StringBuilder" to combine ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to use maven to export a project from subversion? Maven has a plugin called maven-scm-plugin, which can interact with source control systems. According to the documentation, I should be able to export a project like this: mvn scm:export -DconnectionUrl=scm:svn:svn://url... -DexportDirectory=./project-export How...
{ "language": "en", "url": "https://stackoverflow.com/questions/251939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: The fifteenth of February isn't found I'm in javascript, running this in the console d = new Date(); d.setMonth(1); d.setFullYear(2009); d.setDate(15); d.toString(); outputs this: "Sun Mar 15 2009 18:05:46 GMT-0400 (EDT)" Why would this be happening? It seems like a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Show a custom image for some images if image not found - Lighttpd I have a site that creates images for some bit of content after the content is created. I'm trying to figure out what to do in between the time the content is created and the image is created. My thought is that I might be able to set a custom image...
{ "language": "en", "url": "https://stackoverflow.com/questions/251945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you use Source Control without IDE integration? I am currently using Subversion as my Source Control system, mainly because I found ANkhSVN to be a quite nicely integrated into Visual Studio. But many people seem to be using Git or Mercurial and others with great success. Now, I am wondering how to use a syst...
{ "language": "en", "url": "https://stackoverflow.com/questions/251946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MS SQL 2005 Table to XML I have a simple table in SQL Server 2005, I wish to convert this to XML (using the "FOR XML" clause). I'm having trouble getting my XML to look like the required output. I've tried looking through various tutorials on the web, but I am struggling. Can someone help? The table I have looks lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/251957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which SQL Read TRANSACTION ISOLATION LEVEL do I want for long running insert? I have a long running insert transaction that inserts data into several related tables. When this insert is running, I cannot perform a select * from MainTable. The select just spins its wheels until the insert is done. I will be perf...
{ "language": "en", "url": "https://stackoverflow.com/questions/251960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sharing .NET session/authentication with Flex I have a .NET 1.1 application (VB.NET 1.1 shopping cart) into which a user authenticates. I want to 'bolt on' a Flex application but dont want to have to have the user reauthenticate. They shouldn't know it is a separate application. I want to use WebServices (C# 3.5) ov...
{ "language": "en", "url": "https://stackoverflow.com/questions/251961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to delete in perforce without syncing to your client? I often accidentally create a branch that contains more code than it needs to. When that happens, I delete the branch files, the branch tag, and then start over. The thing that stinks is having to sync the huge pile of data just so I can delete it....
{ "language": "en", "url": "https://stackoverflow.com/questions/251964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Databinding DropDown Control in .Net I am binding the dropdown with db entity. ddlCustomer.DataSource = Customer.GetAll(); ddlCustomer.DataTextField = "CustomerName"; ddlCustomer.DataBind(); I want to add "SELECT" as the first itemlist in dropdown and bind then entity to the dropdown. How can i do this? A: Add: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/251985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I access properties from global.asax in some other page's code behind Imagine I have a property defined in global.asax. public List<string> Roles { get { ... } set { ... } } I want to use the value in another page. how to I refer to it? A: It looks to me like that on...
{ "language": "en", "url": "https://stackoverflow.com/questions/251987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What's the difference between Managed/Byte Code and Unmanaged/Native Code? Sometimes it's difficult to describe some of the things that "us programmers" may think are simple to non-programmers and management types. So... How would you describe the difference between Managed Code (or Java Byte Code) and Unmanaged/Nat...
{ "language": "en", "url": "https://stackoverflow.com/questions/252014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: javax.jms does not exist - compiling activemq examples I'm trying to compile the examples that come with activemq in apache-activemq-5.1.0\example\src\ TopicPublisher.java, CommandLineSupport.java on compiling thru netbeans it has some referencing problems saying javax.jms does not exist. I've tried the j2ee.jar, op...
{ "language": "en", "url": "https://stackoverflow.com/questions/252016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What can modify the frame pointer? I have a very strange bug cropping up right now in a fairly massive C++ application at work (massive in terms of CPU and RAM usage as well as code length - in excess of 100,000 lines). This is running on a dual-core Sun Solaris 10 machine. The program subscribes to stock price feed...
{ "language": "en", "url": "https://stackoverflow.com/questions/252028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best way to serve static web pages from within a Django application? I am building a relatively simple Django application and apart from the main page where most of the dynamic parts of the application are, there are a few pages that I will need that will not be dynamic at all (About, FAQ, etc.). What is...
{ "language": "en", "url": "https://stackoverflow.com/questions/252035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Cross Resolution Applications in .NET We are developing a small in-house application that will run on monitor having multi resolutions. Now we want that the application should adjust itself and remain consistent over all monitors. I came from a Java background too where we used different layouts to accomplish the ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/252050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How have you applied ITSM concepts to your development projects? I have taken over a large project at work that requires a lot of TLC to get it into a manageable state. The whys and hows of this situation don't really matter at this point. I was thinking I could use some of the concepts of IT Service Management to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/252051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java Generics (Wildcards) I have a couple of questions about generic wildcards in Java: * *What is the difference between List<? extends T> and List<? super T>? *What is a bounded wildcard and what is an unbounded wildcard? A: If you have a class hierarchy A, B is a subclass of A, and C and D are both subclasse...
{ "language": "en", "url": "https://stackoverflow.com/questions/252055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "123" }
Q: Using .Net how do I use the Sort method to sort an Array in reverse i.e. Z to A? Using .Net how do I use the Sort method to sort an Array in reverse i.e. Z to A? A: You need to pass a IComparer object or Comparison delegate to the Sort function. Here is a sample code from C# 2.0 Array.Sort(array,delegate(string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/252066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the best way to execute an MS SQL Server 2000 DTS package from a trigger? I looked around and found some ideas about how to do this, but no definitive best way. One of the ideas was to use sp_start_job to kick off an SQL Server Agent job that runs the DTS package. If this is the best way to do it, then the...
{ "language": "en", "url": "https://stackoverflow.com/questions/252069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Visual Studio 2005 - Running a website under a different user account I am building a ASP.NET website, and when I click the START DEBUGGING icon, it runs Internet Explorer as the account that I ran Visual Studio with. I would like to run IE as a different user when debugging. A: You can use the runas command to r...
{ "language": "en", "url": "https://stackoverflow.com/questions/252072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What would be the best way to match up two object instances between two different applications in a J2EE server? I have a J2ee application where I basically want two objects, created by two separate servlets to communicate directly and I need these intances to be stable, i.e. to "know" each other during the session....
{ "language": "en", "url": "https://stackoverflow.com/questions/252082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the (M|m)akefile semantics? Is there a difference between using a makefile and a Makefile? A: gmake uses the first "make" file found using the following order: GNUmakefile, makefile, Makefile Otherwise, they are semantically equivalent. GNU recommends only using GNUmakefile if you are using GNU extensions...
{ "language": "en", "url": "https://stackoverflow.com/questions/252084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Timer and animation events trumping TouchesEnded events I've implemented a tap-and-hold handler using an NSTimer that I first set in the TouchesBegan overload. However, what I actually want is for an action to be continuously performed in quick-fire succession while the touch is being held. So, on timer expiry I cal...
{ "language": "en", "url": "https://stackoverflow.com/questions/252101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is AMQP suitable as both an intra and inter-machine software bus? I'm trying to get my head around AMQP. It looks great for inter-machine (cluster, LAN, WAN) communication between applications but I'm not sure if it is suitable (in architectural, and current implementation terms) for use as a software bus within one...
{ "language": "en", "url": "https://stackoverflow.com/questions/252115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What's the best way to give the user weekly updates from your program? I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing som...
{ "language": "en", "url": "https://stackoverflow.com/questions/252119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Overview of Virtual Server Migration? I'm looking for a broad overview of what I need to do and in what order to migrate a W2003 Server to a virtual server environment. Specifically: How does it work in general? Do I need to prepare my disks in any way? What do I install first? The toolkit? Virtual Server? Can I ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/252141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: JPEG -> more compressed JPEG — is it worth it? I'm working on a site that involves displaying a ton of product images from a variety of online retailers. Since most of the page weight is in the images, I thought it'd be worth looking into techniques for trimming down the file size a bit more. The images are already...
{ "language": "en", "url": "https://stackoverflow.com/questions/252144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Segment violation on attempt to initialize a memory mapped file The following is code I've used to create a memory mapped file: fid = open(filename, O_CREAT | O_RDWR, 0660); if ( 0 > fid ) { throw error; } /* mapped offset pointer to data file */ offset_table_p = (ubyte_2 *) shmat(fid, 0, SHM_MAP); /* Initial...
{ "language": "en", "url": "https://stackoverflow.com/questions/252149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Insert text in Javascript contenteditable div Is there any way to insert a text (string, may or may not have html tags) to a div? It has to be a div and not a textarea. First of all, I need to get the cursor position, then insert the text in that position. It's similar to function insertAdjacentText, but it can only...
{ "language": "en", "url": "https://stackoverflow.com/questions/252151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Sql Server 2005: what data type to use to store passwords hashed by SHA-256 algorithm? In Sql Server 2005 what data type should be used to store passwords hashed by SHA-256 algorithm? The data is hashed by the application and passed to the database A: varbinary(32) or binary (32). A: The "Hash" attribute of the S...
{ "language": "en", "url": "https://stackoverflow.com/questions/252156", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Passing data to server code from a client-side control using ASP.NET AJAX I have a ListView on a page that displays a list of widgets. When a user clicks on one of the items in the list, I want to display a ModalPopup that contains controls allowing the user to operate on the item they selected. I could easily acco...
{ "language": "en", "url": "https://stackoverflow.com/questions/252165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Equivalent is_file() function for URLs? What is the best way to check if a given url points to a valid file (i.e. not return a 404/301/etc.)? I've got a script that will load certain .js files on a page, but I need a way to verify each URL it receives points to a valid file. I'm still poking around the PHP manual to...
{ "language": "en", "url": "https://stackoverflow.com/questions/252179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Code Signing Certificate Options I've been assigned the task of buying a digital certificate for my company to sign our code. We develop applications in the Microsoft space - mostly WPF or Web Based. I've investigated options and found Comodo to be well priced and responsive, and we're ready to go ahead and purchase...
{ "language": "en", "url": "https://stackoverflow.com/questions/252180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How do I disable a system device? Is there any way to disable a system device from C#.NET. Basically emulating when you go to Device Manager and disable a device that way? I am assuming there is a WinAPI function that I can invoke, but I don't know which one it is? The reason I need to do this is that I need to disa...
{ "language": "en", "url": "https://stackoverflow.com/questions/252185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is Your Experience with TaskJuggler? We are an all Unix shop (Solaris, Linux). This last product cycle I returned to a project lead capacity, and needed to produce a schedule. I asked what tools my managers would accept, and was surprised to hear "text files". My teammate and I gamely tried this, and probably w...
{ "language": "en", "url": "https://stackoverflow.com/questions/252193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Should I use enum or query a table in my database? In my database I have tables that define types for example Table: Publication Types ID | Type ---------- 1 | Article 2 | Abstract 3 | Book .... Which is related through the ID key to a publication tables which has the field TypeID. I then create a PublicationT...
{ "language": "en", "url": "https://stackoverflow.com/questions/252202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Checking if a variable is not nil and not zero in ruby I am using the following code to check if a variable is not nil and not zero if(discount != nil && discount != 0) ... end Is there a better way to do this? A: unless discount.nil? || discount == 0 # ... end A: class Object def nil_zero? self.nil?...
{ "language": "en", "url": "https://stackoverflow.com/questions/252203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "314" }
Q: Possible Google Riddle? My friend was given this free google website optimizer tshirt and came to me to try and figure out what the front logo meant. t-shirt So, I have a couple of guesses as to what it means, but I was just wondering if there is something more. My first guess is that each block represents a page la...
{ "language": "en", "url": "https://stackoverflow.com/questions/252221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Access an asp:hiddenfield control in JavaScript What is the best way to access an ASP.NET HiddenField control that is embedded in an ASP.NET PlaceHolder control through JavaScript? The Visible attribute is set to false in the initial page load and can changed via an AJAX callback. Here is my current source code: <s...
{ "language": "en", "url": "https://stackoverflow.com/questions/252222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Signing a Windows EXE file I have an EXE file that I should like to sign so that Windows will not warn the end user about an application from an "unknown publisher". I am not a Windows developer. The application in question is a screensaver generated from an application that generates screensaver applications. As su...
{ "language": "en", "url": "https://stackoverflow.com/questions/252226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "265" }
Q: How to unify overlapping id systems into a single system? What's the best way to unify several overlapping id systems into a unified one while maintaining the old id system. I have several different ids on my website... (E.g /publisher/1234 and /designer/1234) I would like to unify the ids into a new system, but wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/252229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Stored procedures or inline queries? First of all there is a partial question regarding this, but it is not exactly what I'm asking, so, bear with me and go for it. My question is, after looking at what SubSonic does and the excellent videos from Rob Connery I need to ask: Shall we use a tool like this and do Inline...
{ "language": "en", "url": "https://stackoverflow.com/questions/252230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Ruby audio Library is there any good Ruby audio libraries that we can build upon? Need to manage/edit mp3 files!!! A: There's an interface to a C++ mp3 editor, and an active pure ruby project. A: ruby-audio is the best one right now, it's a wrapper for libsndfile A: There's also earworm and icanhasaudio which may...
{ "language": "en", "url": "https://stackoverflow.com/questions/252239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: In django, how do I sort a model on a field and then get the last item? Specifically, I have a model that has a field like this pub_date = models.DateField("date published") I want to be able to easily grab the object with the most recent pub_date. What is the easiest/best way to do this? Would something like the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/252242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do you run Lucene on .net? Lucene is an excellent search engine, but the .NET version is behind the official Java release (latest stable .NET release is 2.0, but the latest Java Lucene version is 2.4, which has more features). How do you get around this? A: One way I found, which was surprised could work: Creat...
{ "language": "en", "url": "https://stackoverflow.com/questions/252249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I constrain a *'s width to the width of the widest item? Given the following markup: <ul> <li>apple</li> <li class="highlight">orange</li> <li>pear</li> </ul> Both the uls and the lis widths appear to be 100%. If I apply a background-color to the list item, the highlight stretches the full width o...
{ "language": "en", "url": "https://stackoverflow.com/questions/252252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Why aren't classes sealed by default? I was just wondering, since the sealed keyword's existence indicates that it's the class author's decision as to whether other classes are allowed to inherit from it, why aren't classes sealed by default, with some keyword to mark them explicitly as extensible? I know it's somew...
{ "language": "en", "url": "https://stackoverflow.com/questions/252257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: java.sql.Connection extension for SSH I have a MySQL database behind a firewall which can only be accessed via an SSH connection. Does anyone know of an implementation of java.sql.Connection which would allow me to make an SSH connection to this database? A: You can use SSH's port forwarding to do this. While not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/252258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: using Reflector.Invoke Method on functions wih optional parameters I am trying to use reflector.InvokeMethod to invoke a function with an optional parameter. The function looks like this: Private Function DoSomeStuff(ByVal blah1 as string, ByVal blah2 as string, Optional ByVal blah3 as string = "45") as boolean 'st...
{ "language": "en", "url": "https://stackoverflow.com/questions/252260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can't I call a method outside of an anonymous class of the same name The code at the end produces a compile error: NotApplicable.java:7: run() in cannot be applied to (int) run(42); ^ 1 error The question is why? Why does javac think I am calling run(), and does not find run(in...
{ "language": "en", "url": "https://stackoverflow.com/questions/252267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best way to protect user inputs (not yet submitted) from session timeout? I develop and maintain small intranet web apps(JSP and Resin). Some users takes so much time to complete the forms that, when they submit, they lose all their input data because of session timeout. Currently I prolonged session tim...
{ "language": "en", "url": "https://stackoverflow.com/questions/252268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How is gmail source transformed? I open gmail, click on an inbox item, and look at source of the page. It doesn't look like there isn't any proper html to relate to what is shown on the actual page. How is the source getting processed into the actual page? Is there some javascript processing this information? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/252274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to get the previous selection when selection changes? I'm working on an import (from Excel) dialog to select ranges of cells. When the range is selected, I use the event sink to catch the event and highlight the first row and first column. I need to unhighlight the previous selection's first row and column. I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/252282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I perform string operations on variables in a for loop? This sounds dumb, but I can't get it to work. I think i just dont' understand the difference between %%v, %v% and %v Here's what I'm trying to do: for %%v in (*.flv) do ffmpeg.exe -i "%%v" -y -f mjpeg -ss 0.001 -vframes 1 -an "%%v.jpg" This successfully...
{ "language": "en", "url": "https://stackoverflow.com/questions/252286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Bizarre python ImportError Here's my setup: a Mac, running OS X Tiger. Windows XP running in a virtual machine (Parallels). Windows XP has my Mac home directory mapped as a network drive. I have two files in a directory of my Mac home directory: foo.py pass test.py import foo If I run test.py from within my virt...
{ "language": "en", "url": "https://stackoverflow.com/questions/252287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why is RegOpenKeyEx() returning error code 2 on Vista 64bit? I was making the following call: result = RegOpenKeyEx(key, s, 0, KEY_READ, &key); (C++, Visual Studio 5, Vista 64bit). It is failing with error code 2 ("File not found") even though "regedit" shows that the key exists. This code has always worked on 32b...
{ "language": "en", "url": "https://stackoverflow.com/questions/252297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }