text
stringlengths
8
267k
meta
dict
Q: Maven replacement? What would you suggest as a replacement to the Maven Java build toolset? Just plain Ant scripts? SCons? A: It depends on what you use anyway. Maven 1? Maven 2? I find Maven 2 decently documented, and quite powerful, when used in combination with Ant tasks and some home baked Java plugins. There a...
{ "language": "en", "url": "https://stackoverflow.com/questions/385401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Prototype based object orientation. The good, the bad and the ugly? I come from classes object orientation languages and recently I have been learning those fancy dynamic languages (JavaScript, Python and Lua) and I want some tips about how to use OO in those languages. It would be useful to know the pitfalls and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/385403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Get program execution time in the shell I want to execute something in a linux shell under a few different conditions, and be able to output the execution time of each execution. I know I could write a perl or python script that would do this, but is there a way I can do it in the shell? (which happens to be bash) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "443" }
Q: Visualization data gathering for learning I'm just starting to take an interest in visualization and I'd like to know where I can get my hands on some data, preferably real world, to see what queries and graphics I can draw from it. Its more of a personal exercise to create some pretty looking representations of tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/385419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Variable watch in PHP Does PHP have the ability to watch a variable (or object property) and run a function when its value changes, similar to Gecko's Javascript watch function? A: XDebug might have this, but I don't know for sure. If you're trying to debug a member variable on an object, you can use overloading: p...
{ "language": "en", "url": "https://stackoverflow.com/questions/385420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: understanding EAGLView I am looking at the EAGLView files from the apple iphone sample code and I am trying to understand how EAGLViewDelegate protocol works. Question: How does this didResizeEAGLSurfaceForView function get called? I don't see any implementation of it? EAGLView.h @protocol EAGLViewDelegate <NSObject...
{ "language": "en", "url": "https://stackoverflow.com/questions/385428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP in Visual Studio I'm deving PHP at the moment using Visual Studio as my IDE. I've installed the Phalanger Visutal studio integration to get PHP projects etc but I want VS to recognise the PHP start and end tags like the standard ASP ones. i.e when I type <% %> into the html editor, I want the PHP tags to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/385437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL a numbering column - MySQL This is a sql newbie question. Basically, I want an extra column to return with my select statement to number the rows. I'm using mysql. Eg: select * from friends David Steve Joe What is the syntax to get: 1 David 2 Steve 3 Joe A: From: http://markmal.blogspot.com/2006/04/orac...
{ "language": "en", "url": "https://stackoverflow.com/questions/385441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WCF RESTful POST I have a WCF RESTFul service declared thus: [ServiceContract] public interface IGasPriceService { [OperationContract] [WebGet (ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/GetGasPrice/For/ZipCode/{zipCode}" )] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best practice for storing and referencing DLL libraries? Often times a developer on my team will create a new Visual Studio project and reference a DLL somewhere on their local machine (e.g., C:\mydlls\homersimpson\test.dll). Then, when I get the project from the source control repository, I cannot build the projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/385469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: How to restrict number of concurrent processes? My situation is as follow: * *I have an application that can be started only a fixed number of times (less than 50). *A separate central process to manage other processes is not allowed due to business requirement. (ie. if a nice solution that involves ONLY the app...
{ "language": "en", "url": "https://stackoverflow.com/questions/385497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is optimisation premature? As Knuth said, We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. This is something which often comes up in Stack Overflow answers to questions like "which is the most efficient loop mechanism", "SQL optimisation tec...
{ "language": "en", "url": "https://stackoverflow.com/questions/385506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: What is the relation between scrum agile and RUP? RUP in the dialogue with Scrum There is a relation between Agile and RUP. Actually I though that Agile development was a type of RUP. In the article from IBM above you can see that they are fitting the model to RUP. Does someone has any practical explanation of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/385511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: LINQ - Update null integer data field I have got a field with data type int? price and allow null, when I set book.price = null; and update, it is not saved and does not throw any exceptions, when I change value # null, it is ok. I want set it null. A: Make sure the field is nullable in the database and is reflect...
{ "language": "en", "url": "https://stackoverflow.com/questions/385512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Missing AVFoundation.framework AVFoundation.framework is not where the documentation says it should be. I have iPhone SDK 2.2 installed (never had previous sdk versions installed) and I can't find that folder under /System/Library/Frameworks I did find it under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/...
{ "language": "en", "url": "https://stackoverflow.com/questions/385530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Adding functions to PHP core I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files? I am running PHP5 A: You could add your libraries as a PEAR extension. Then you could add it to your local PEAR reposit...
{ "language": "en", "url": "https://stackoverflow.com/questions/385531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to configure JPA for testing in Maven Is there a way to set up a second persistence.xml file in a Maven project such that it is used for testing instead of the normal one that is used for deployment? I tried putting a persistence.xml into src/test/resources/META-INF, which gets copied into target/test-classes/ME...
{ "language": "en", "url": "https://stackoverflow.com/questions/385532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: Are there good reasons not to exploit '#!/bin/make -f' at the top of a makefile to give an executable makefile? Mostly for my amusement, I created a makefile in my $HOME/bin directory called rebuild.mk, and made it executable, and the first lines of the file read: #!/bin/make -f # # Comments on what the makefile is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Customize application starting Is there any way that I can Fix the time to start any application like internet Explorer, or any other application. so if I don't miss my schedule of work. ex: If every day evening I want my explorer to open certain page automatically, Is it possible ??? A: Scheduler in control pane...
{ "language": "en", "url": "https://stackoverflow.com/questions/385541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does Java pick which overloaded function to call? This is a purely theoretical question. Given three simple classes: class Base { } class Sub extends Base { } class SubSub extends Sub { } And a function meant to operate on these classes: public static void doSomething(Base b) { System.out.println("BASE ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How does C++ pick which overloaded function to call? Say I have three classes: class X{}; class Y{}; class Both : public X, public Y {}; I mean to say I have two classes, and then a third class which extends both (multiple-inheritance). Now say I have a function defined in another class: void doIt(X *arg) { } void ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Extract float/double value How do I extract a double value from a string using regex. import re pattr = re.compile(???) x = pattr.match("4.5") A: A regexp from the perldoc perlretut: import re re_float = re.compile("""(?x) ^ [+-]?\ * # first, match an optional sign *and space* ( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Asp.Net MVC - Best approach for "dynamic" routing I am trying to come up with an approach to create "dynamic" routing. What I mean, exactly, is that I want to be able to assign the controller and action of a route for each hit rather than having it mapped directly. For example, a route may look like this "path/{obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/385570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Typecasting in Python I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings. How can I do this? A: You can convert a string to a 32-bit signed integer with the int function: string = "1234" i = int(string) # i is a 32-bit integer If...
{ "language": "en", "url": "https://stackoverflow.com/questions/385572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: creating generic file in generic folder using QTP I created a generic folder by taking the name from DataTable: Dim fso Set fso = CreateObject("Scripting.FileSystemObject") strdata = Datatable.Value("Column name", "Sheet") fso.CreateFolder "C:\Documents and Settings\schoudar\Desktop\" & strdata Till this I am succe...
{ "language": "en", "url": "https://stackoverflow.com/questions/385575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Which talks/videos appealed to you as a developer? Which talks/videos appealed to you as a developer? I really like this talk by Clay Shirky: http://www.youtube.com/watch?v=Xe1TZaElTAs And, Startup School talk by David: http://www.omnisio.com/startupschool08/david-heinemeier-hansson-at-startup-school-08 Which ones y...
{ "language": "en", "url": "https://stackoverflow.com/questions/385586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lectures available as MP3/podcasts? Are there any particularly good university lectures available online for download as MP3 (or some other audio format)? I am particularly interested in hearing some of the more advanced classes that I didn't get to take in my engineering degree, like compilers, operating systems, A...
{ "language": "en", "url": "https://stackoverflow.com/questions/385588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How to hide/Unhide a MS Access DB form using vb.net If a form in Access DB is set as hidden. Then how to unhide it? so that we can manipulate the form programmentically using vb.net. Thank you. A: I cannot help with .net, in VBA: Sub FormHidden() Dim frm For Each frm In CurrentProject.AllForms SetHidde...
{ "language": "en", "url": "https://stackoverflow.com/questions/385605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Websphere Portal generating url longer than 2k We have a data entry portlet that occassionally generates urls in excess of the 2k limit enforced by Internet Explorer. Is there any way to stop these excessively long urls from being generated without loss of functionality? A: Can you use POST instead of GET? If not,...
{ "language": "en", "url": "https://stackoverflow.com/questions/385614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use PHP to obfuscate email addresses so they are not easily harvested by spammers? I'm programming in PHP and would like to create web pages which have email addresses that are easily read by humans but not easily harvested by spammers. The email addresses are coming from user input, and I think I can ide...
{ "language": "en", "url": "https://stackoverflow.com/questions/385620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Draw Order in OpenGL I am rendering an OpenGL scene that include some bitmap text. It is my understanding the order I draw things in will determine which items are on top. However, my bitmap text, even though I draw it last, is not on top! For instance, I am drawing: 1) Background 2) Buttons 3) Text All at the same...
{ "language": "en", "url": "https://stackoverflow.com/questions/385629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: US-format phone numbers to links in Python I'm working a piece of code to turn phone numbers into links for mobile phone - I've got it but it feels really dirty. import re from string import digits PHONE_RE = re.compile('([(]{0,1}[2-9]\d{2}[)]{0,1}[-_. ]{0,1}[2-9]\d{2}[-_. ]{0,1}\d{4})') def numbers2links(s): ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a difference between SSLv3 and TLS1.0? Is there a difference between SSLv3 and TLSv1? How does IIS6.0 control what type of security is used for a website enabled with HTTPS? MS says that there is a hierarchy in which the security and encryption level is negotiated before connection is established. What is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Getting Hourly statistics using SQL We have a table, name 'employeeReg' with fields employeeNo | employeeName | Registered_on Here Registered_on is a timestamp. We require an hourly pattern of registrations, over a period of days. eg. 01 Jan 08 : 12 - 01 PM : 1592 registrations 01 Jan 08 : 01 - 02 PM : 1020 regist...
{ "language": "en", "url": "https://stackoverflow.com/questions/385656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Event handling in Dynamic asp.net user Control I have a page, where I want to dynamically add asp.net user controls. The scenario is that we want that on specific event of a control, It disposes itself and loads another control in the page. I am not able to have solution about how to do this? Anyone have decent idea...
{ "language": "en", "url": "https://stackoverflow.com/questions/385658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I setup a callback mechanism for RichEdit in win32 In win32, how do I setup a callback mechanism for RichEdit I have not created myself? PART 1 I'm reading from a textedit field in another application's GUI. This works just fine now, except after the first read I'd like to fetch only new or modified lines. In...
{ "language": "en", "url": "https://stackoverflow.com/questions/385660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to highlight all occurrences of a word in an Emacs buffer? Notepad++ has a convenient feature: if you select a word in your text (not necessarily a keyword), the word is highlighted throughout the text. Can this be done in Emacs as well? And if so, how? It doesn't necessarily have to work exactly like Notepad++...
{ "language": "en", "url": "https://stackoverflow.com/questions/385661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Test data generators / quickest route to generating solid, non-repetitive, but not-real database sample data? I need to build a quick feasibility test / proof-of-concept of a remote database for a client, that will be populated with mostly-typical Company and People data (names, addresses, etc); 150K records or so. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multi-threaded Scientific data visualization in c++ I have a process which generates a data vector from a sensor.I'm using Intel Integrated Performance Primitives v5.3 update 3 for Windows on IA-32 to process it further for some calculations.I want to know if there is any c++ library which allows to plot the vector ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to know which Image has been requested C#,ASP.Net I am developing a web app. which will generate a random link pointing to an image on my server. something like -http://dummy.com/Images/Image1.jpg?id=19234 Here this link can then be used by anybody on their site, now I just want to know how many sites are using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.Runtime.InteropServices.ComTypes.IStream to System.IO.Stream In a .NET 3.0 project, I need to make some calls via P/Invoke (specifically to the PrintTicket Provider functions like PTConvertPrintTicketToDevMode() ). The framework has a managed definition of the COM IStream interface: System.Runtime.InteropServ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's a good name for an Enum for Yes & No values Background In a C# command-line app I'm writing, several of the parameters have "yes" and "no" as the possible values. I am storing their input using the Enum type shown below. enum YesNo { Yes, No } Which is fine - the code works. No problem there. NOTE...
{ "language": "en", "url": "https://stackoverflow.com/questions/385688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ASP.NET : Intermittent 'Access Denied' Error When Uploading Files I have a .NET program to upload an image to a webserver. I am using the ASP.NET file uploading control to do it. The program works alright in my local environment but when I run it on the webserver, I get the following error: > System.Unauthorized...
{ "language": "en", "url": "https://stackoverflow.com/questions/385705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Include softlinked folders in unix "find" How can I tell unix "find" to include in it's recursive search a folder which is softlinked? A: -L . This causes it to follow all symbolic (I assume this is what you mean by soft) links. A: Interesting - I hadn't come across '-L' (or the opposite, '-H') before. You can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Capturing Events For Logging Purpose When an application is launched, I need to know for certain methods when they are fired. How to do this using attributes and AOP techniques? The simplest way is to record the time in the event method such as this: private void Page_load() { DateTime dt = DateTime.Now; } And sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/385709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why use TryCast instead of DirectCast? When I am trying to cast Object obj to Type T, if it can not be cast then there is something wrong. And after I cast the object I will be looking for working with the cast object. Rather I will be expecting to get an exception at the place where I will be casting it than say wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/385714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: How do you deal with failing unit tests? I have a number of projects in a solution file that have unit tests written for them and I want to set them up to be run by our continuous integration server. However, because many of the tests have been written poorly and have not been run regularly, there are many that are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to stream movies I'm trying to make a front end for all my music and video files on a spare PC I have but have come up against a bit of a road block. I originally wanted to stream the movies (avi, mpeg, flv etc) using a flash media player but after a bit of searching it seems that flash can only stream flv'...
{ "language": "en", "url": "https://stackoverflow.com/questions/385732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to find out hosting provider from domain name? I am looking for a reliable service that has a good database of the hosting providers vs domain names. I guess some of the domains that are privately hosted cannot be resolved to a definite hosting provider (maybe just to ISP). I have used webhosting.info (their p...
{ "language": "en", "url": "https://stackoverflow.com/questions/385735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: NHibernate.Spatial and Sql 2008 Geography type i'm currently working on a project where i have to deal with sql server 2008 geography types. As big parts of the projects uses NHibernate as ORM i wonder how much work it will be to use/extend NHibernate.Spatial with this type (as far as i can see Nh Spatial only suppo...
{ "language": "en", "url": "https://stackoverflow.com/questions/385757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: An analog of C++ FQA for C# I have found C++ FQA Lite very edificatory and would like to read more criticism. Could you recommend me something similar but concerning C#, please? Thanks. A: I don't think there is such a document. Most of the problems mentioned in the C++ FQA are not relevant for C# (and other langua...
{ "language": "en", "url": "https://stackoverflow.com/questions/385762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Custom Product Attributes for eCommerce Web Site I am creating a database using MySQL 5 for an eCommerce web site. I want the database to be as flexible as possible so that the owners of the web site can add custom attributes for various types of products. For instance, they can have a product which has 4 shirt si...
{ "language": "en", "url": "https://stackoverflow.com/questions/385769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Access parent datacontext in listbox in Silverlight In Silverlight 2 I'm using a usercontrol which inherits the datacontext of the page that it's embedded on. This datacontext contains question text, a question type and a collection of answers. In the user control is a listbox which is bound to the collection of ans...
{ "language": "en", "url": "https://stackoverflow.com/questions/385784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Programmatically start application on login What's the best way to programmatically start an application on login for Windows? I know you can do it by adding an item to the startup folder in the start menu, but I want to have an option in my application to turn it off and on. A: This is how you could do it in C#: R...
{ "language": "en", "url": "https://stackoverflow.com/questions/385793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Sync Framework : Can I Sync only a subset of my tables? The regular code snippet of syncing data with sync framework is this: LocalDBSyncAgent syncAgent = new LocalDBSyncAgent(); Microsoft.Synchronization.Data.SyncStatistics syncStats = syncAgent.Synchronize(); Do anynody knows a way to sync a subset of my tables. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Techniques to monitor/improve performance in LINQ to SQL queries I have a webpage that is taking way too long and need to optimize it. Because uninformed optimizing is the devil, I need to know what exactly is holding me down. A quick glance showed me that it is probably a LINQ to SQL query that is most likely causi...
{ "language": "en", "url": "https://stackoverflow.com/questions/385804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Correctly incrementing values using Linq to SQL I have a MS SQL table that I don't have any control over and I need to write to. This table has a int primary key that isn't automatically incremented. I can't use stored procs and I would like to use Linq to SQL since it makes other processing very easy. My current so...
{ "language": "en", "url": "https://stackoverflow.com/questions/385809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java: In what order are the methods called in an Applet? Of all these methods what's being run and in what order?? I guess the first question to ask is whats being run first? And why does th.start() start run()? import java.applet.*; import java.awt.*; import javax.swing.JFrame; public class BallApplet extends App...
{ "language": "en", "url": "https://stackoverflow.com/questions/385824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Breakpoint not hit when remote debugging on Internet for ASP.NET I have sit up remote debugging on a Window 2003 server accessed through the Internet. I have VS 2008 SP1 installed on my XP dev box. I launched the site on the remote server and attached to all the w3wp.exe processes on the remote server. I noticed tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/385826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Simple web page layout and templating in PHP In the past I've written sites in ASP.NET just to get nice reusable templating via master pages (layouts) and user controls (partials). I'm talking about sites that have no more complicated code in them than simple variable substitution in templates - I'm just using it to...
{ "language": "en", "url": "https://stackoverflow.com/questions/385837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Does it help to use NGEN? Is it better to use NGEN an ASP.NET application when we know it is not going to change much? Or is the JIT good enough? The only reason I asked was because this article by Jeffrey Richter in 2002 says : And, of course, Microsoft is working quite hard at improving the CLR and its JIT comp...
{ "language": "en", "url": "https://stackoverflow.com/questions/385841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Do CALayers block Touch Events in underlying views? I have an application with a view containing several subviews. The subviews did not implement any touchesbegins logic. The Superview implemented all touchesbegins logic and manipulated each subview respectively if it was touched (determined by hit testing). I h...
{ "language": "en", "url": "https://stackoverflow.com/questions/385853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is RPC disguised as REST a bad idea? Our whole system is being designed around REST and are now considering how processes which are quite clearly RPC in intent can be mapped to RESTful resources without using verbs in the URL. Our remote procedure call is used to rebuild our search index when a content listing has b...
{ "language": "en", "url": "https://stackoverflow.com/questions/385861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Permissions on solution files to modify I have project solutions developed in VS2005. It is bound to TFS (Team Foundation Server). I want to convert the solution to VS2008 version, keeping the binding as is, however I am getting an error while converting. Error message: Solution file "C:\abc\abc.sln" cannot be con...
{ "language": "en", "url": "https://stackoverflow.com/questions/385874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Timed Subscription Schedule in SSRS sends out duplicate emails I have created a one-time subscription in SSRS report manager 2008. However I keep getting duplicate emails sent out by the subscription. The interval between each email is about 30 minutes. I have checked SQL agent job and it looks the SQL agent job is...
{ "language": "en", "url": "https://stackoverflow.com/questions/385890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Safe to uninstall .NET Framework 2.0 and 1.0 after installing 3.5? I'm new to Windows development and I have a question. I'm using a Mac with Boot Camp to run Windows in dual boot, but I have an extremely small Windows partition (10 GB, because Boot Camp failed with bigger partition, due to the disk usage). After in...
{ "language": "en", "url": "https://stackoverflow.com/questions/385893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Django model naming convention What is the preferred naming convention for Django model classes? A: Django models are just Python classes, so the Python naming conventions detailed in PEP-8 apply. For example: * *Person *Category *ZipCode If Django fails to pluralize the class name properly when creating the...
{ "language": "en", "url": "https://stackoverflow.com/questions/385895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Java Client to connect to Server with Openssl and Client Auth I have to write a Java Client to connect to an SSL server. The server uses openssl certificate, and is configured to do Client Auth. I can't seem to locate any useful resources online that can help me (who doesn't know anything about openssl and much abou...
{ "language": "en", "url": "https://stackoverflow.com/questions/385907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Impromtu plug in is not working I like to have a popup modal dialog that need to show the list of options (like a radio button select event). But I don't know what I am missing! It works fine when no HTML tag is embedded in Impromtu. Do I include it in CSS? <html> <head> <LINK REL=StyleSheet HREF="exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/385909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight WebPart in Sharepoint I am new to Silverlight 2.0 and I am actually trying to deploy the Silverlight as webpart in Sharepoint 2007. I have done the following Installations: * *VS 2008 with SP1 *Silverlight 2.0 SDK and exe *Silverlight Tools for VS 2008 *MOSS 2007 I have created the sample Silverl...
{ "language": "en", "url": "https://stackoverflow.com/questions/385910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby: Object.to_a replacement I need to convert a passed in argument (single object or collection) to an Array. I don't know what the argument is. If it is an Array already, I want to leave it, otherwise create a one-element array from it. I'm looking to allow both method(:objs => obj) and method(:objs => [obj1, obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/385912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Why wasn't the Java "throws" clause (in method declaration) included in C#? Why wasn't the Java "throws" clause (in method declaration) included in C#? A: The main reason is that C# designers decided not to use "checked exceptions". This means that the developer doesn't have to surround an exception throwing clause...
{ "language": "en", "url": "https://stackoverflow.com/questions/385913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: wxWidgets : non blocking copy to FTP I want to copy a file to a FTP server using wxFTP, but I would like to do this without blocking the UI, and much better, while displaying a progress bar. Can I do this without extra thread? I'm using wxLua, but I can adapt a solution written in any language as long as it uses a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/385916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to map to get value from primary table in Nhibernate? I face a problem when I try to get value from primary table in my mapping file. My tables: CREATE TABLE Customer ( [CustomerId] INT PRIMARY KEY, [FullName] NVARCHAR(50) NOT NULL ) CREATE TABLE CustomerOrder ( [CustomerOrderId] INT PRIMARY KEY, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ParameterizedTest with a name in Eclipse Testrunner When you run a JUnit 4 ParameterizedTest with the Eclipse TestRunner, the graphical representation is rather dumb: for each test you have a node called [0], [1], etc. Is it possible give the tests [0], [1], etc. explicit names? Implementing a toString method for th...
{ "language": "en", "url": "https://stackoverflow.com/questions/385925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I show a modeless dialog and display information in it immediately? I want to show a modeless dialog on the screen and display some information in it. However if I use it the following way, it has some problems: function() { showdialog(XXX). //heavy work. update the dialog.. //heavy work. update the dialog.....
{ "language": "en", "url": "https://stackoverflow.com/questions/385928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Log file is not being written to from an HttpHandler I want to capture all the requests going to *.jpg files on my server. To do so, I have created an HttpHandler whose code is as follows: using System; using System.Collections.Generic; using System.Text; using System.Web; using System.IO; using System.Globalization...
{ "language": "en", "url": "https://stackoverflow.com/questions/385945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: If exception handling should be centralised is the design of WinForm components flawed? Or any other design that has the gui widgets as being the first port of call where an unhandled exception will kill the app? We all want one main: "catch all" for face saving purposes (although in most cases this shouldn't have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/385949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does curl-loader support HTTP 1.0? I am writing an automated test program using curl-loader, to send calculated requests to a client. I need to know if curl-loader supports HTTP 1.0, in order to code for a test case. In case it supports it, I'd like to know how to use it. Thanks A: I found the answer by asking in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/385955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where can I get a list of the 'Custom Tool' code generators that come with VS2K8? I've used MSDataSetGenerator a fair bit and it causes a bunch of pain because the XMLSerializer rarely works on the output. Are there any other code generators that come with the SDK? A: Take a look at the registry in HKLM\SOFTWARE\Mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/385956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best practice for converting integer value column to string representation Lets say you have a model like the following: class Stock < ActiveRecord::Base # Positions BUY = 1 SELL = 2 end And in that class as an attribute of type integer called 'position' that can hold any of the above values. What is the Rail...
{ "language": "en", "url": "https://stackoverflow.com/questions/385959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JavaScript - Identify whether a property is defined and set to 'undefined', or undefined Say I have the following code: function One() {} One.prototype.x = undefined; function Two() {} var o = new One(); var t = new Two(); o.x and t.x will both evaluate to undefined. o.hasOwnProperty('x') and t.hasOwnProperty('x'...
{ "language": "en", "url": "https://stackoverflow.com/questions/385960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Strange c# overflow error Can someone explain me the reason of overflow in variable a? Note that b is bigger than a. static void Main(string[] args) { int i = 2; long a = 1024 * 1024 * 1024 * i; long b = 12345678901234567; System.Console.WriteLine("{0}", a); System.Console.WriteLine("{0}...
{ "language": "en", "url": "https://stackoverflow.com/questions/385966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: ExtAudioFileOpenUrl giving EXC_BAD_ACCESS I have created a sample application using the iPhone SDK that uses ExtAudioFileOpenURL from the AudioToolBox framework. I have a test.mp3 audio file in my app's document folder. When I tried to open this audio file using this API I received EXEC_BAD_ACCESS. I couldn't figure...
{ "language": "en", "url": "https://stackoverflow.com/questions/385968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is F# going to become a mainstream language? I'm very interested in what F# has to offer and I'm very keen to start the time based investment necessary to learn it. However are the F# jobs going to start to materialise or could it be a wasted investment? A: It is going to be part of Visual Studio 10 so it cannot hu...
{ "language": "en", "url": "https://stackoverflow.com/questions/385973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Error handling in C code What do you consider "best practice" when it comes to error handling errors in a consistent way in a C library. There are two ways I've been thinking of: Always return error code. A typical function would look like this: MYAPI_ERROR getObjectSize(MYAPIHandle h, int* returnedSize); The alway...
{ "language": "en", "url": "https://stackoverflow.com/questions/385975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "181" }
Q: Application Crashes as limited user I have a WPF application that runs fine under XP as an administrator. When I run as a limited user the application does not run at all, I get the hour glass for a half second and then nothing. Where do I start in working out what part of my application is causing it to crash when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problem with an expect script I'm trying to create a script to update a password in a non-interactive way. It's working on my laptop but fails on my server. Both are running the same configuration, using Etch. This is the script: #!/usr/bin/expect -f # Change user passwd set timeout 30 strace 4 set password [lindex ...
{ "language": "en", "url": "https://stackoverflow.com/questions/385980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problem looping data in a postgres function using %ROWTYPE I am trying to create a function in postgres that retrieves data from one table and inputs into another. I am using the %ROWTYPE type to store the temporary data from the select statement and then iterate through it with an insert statement but have been uns...
{ "language": "en", "url": "https://stackoverflow.com/questions/385985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Caching in asp.net-mvc I would like to cache my most database heavy actions in my asp.net-mvc site. In my research I have found * *donut caching on Phil's blog *Caching/compressing filters on Kazi's blog *Scott Hansleman's podcast about how they cached things in SO. But I don't feel I get it yet. I want to b...
{ "language": "en", "url": "https://stackoverflow.com/questions/385986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: How to Order a SQL Query with grouped rows I have the table (Product_Id, category priority, atribute1, atribute2...) in MS Access, and I am trying to make a query that orders the data grouped by Category and ordered by the highest priority. Priority can be Null, so it should be placed at the end. Example: Table 1, 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/386006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I learn F# or functional programming languages in general? Should I invest time learning Microsoft's new F# language? I am mainly a C# .NET developer and I wonder if learning F# will be of any help in developing today's typical applications. A: You said, "should I learn functional programming languages in ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/386011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Expect exceptions in nUnit without the ExpectedException attribute I have methods with more than one parameter that are guarded against bad input by throwing ArgumentNullExceptions and ArgumentExceptions whenever any parameter is null. So there are two obvious ways to test this: * *One test per Parameter using th...
{ "language": "en", "url": "https://stackoverflow.com/questions/386017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: IP phone to web application integration If I'd like to control the IP phone from my web application, how should I begin? Let's say I have a standalone IP phone connected to the provider of IP telephony services. On the other side I have a server-side web application for the sales support. I'd like to initiate a call...
{ "language": "en", "url": "https://stackoverflow.com/questions/386034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WPF TextBox and Scroll behavior I have a problem. I need to host grid with controls in ScrollViewer to prevent textbox from being either truncated or collapsed to zero-with at the UI. Also I want the with of textbox to be expanded when user change windows width. I'm setting Window's content to following code <DockPa...
{ "language": "en", "url": "https://stackoverflow.com/questions/386039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What's wrong with nullable columns in composite primary keys? ORACLE does not permit NULL values in any of the columns that comprise a primary key. It appears that the same is true of most other "enterprise-level" systems. At the same time, most systems also allow unique contraints on nullable columns. Why is it tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/386040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "180" }
Q: How to have a link in label of a form field I want to have a checkbox for terms and conditions, label of which should contain a link to a page with, well, terms and conditions. The following field will have the label with the tags escaped. BooleanField(label="I agree to <a href='terms-conditions.html'>terms&conditio...
{ "language": "en", "url": "https://stackoverflow.com/questions/386042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: What do I need to send emails from my domain I want to be able to send e-mail from my own domain (Domain.com) over Windows 2003 server, I tested my application and it's working alright on my local IIS. But I don't know exactly what's needed to get it work for out side. Thanks in advance. A: But I don't know exactl...
{ "language": "en", "url": "https://stackoverflow.com/questions/386043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does JavaScript treat the ++ operator? JavaScript does funky automatic conversions with objects: var o = {toString: function() {return "40"; }}; print(o + o); print((o+1)+o); print((o*2) + (+o)); will print: 4040 40140 120 This is because +, if any of the arguments are objects/strings, will try to convert all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/386044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I determine whether it's a mobile device with PHP? I am writing a website with PHP. Since it will need to be accessed by anyone on the network to access the internet I have to create a mobile version. How do I best check if it's a mobile device? I don't want to have a switch statement with 50 devices at the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/386046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }