text
stringlengths
8
267k
meta
dict
Q: What does the "static" modifier after "import" mean? When used like this: import static com.showboy.Myclass; public class Anotherclass{} what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass? A: Static import is used to import static fields / method of a class instead of: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "472" }
Q: Visual Studio 2008 - Add Reference When adding a DLL as a reference to an ASP.Net project, VS2008 adds several files to the bin directory. If the DLL is called foo.dll, VS2008 adds foo.dll.refresh, foo.pdb and foo.xml. I know what foo.dll is :-), why does VS2008 add the other three files? What do those three file...
{ "language": "en", "url": "https://stackoverflow.com/questions/162192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How does a "Schema changed after the target table was created" error occur? I hit this error while my web application was trying to execute a SELECT INTO on a MSSQL 2005 database. I really have two questions: * *What does this error mean and how does this happen? *Is there a way to prevent these errors by codin...
{ "language": "en", "url": "https://stackoverflow.com/questions/162205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Dataflow Programming API for Java? I am looking for a Dataflow / Concurrent Programming API for Java. I know there's DataRush, but it's not free. What I'm interested in specifically is multicore data processing, and not distributed, which rules out MapReduce or Hadoop. Any thoughts? Thanks, Rollo A: You might try g...
{ "language": "en", "url": "https://stackoverflow.com/questions/162208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to know if a jsp tag attribute is available for EL? I have the following piece of code in my jsp : <% pageContext.setAttribute("warnings",Globals.WARNING_MESSAGES); %> <c:choose> <c:when test="${requestScope[pageScope.warnings] or sessionScope[pageScope.warnings]}"> <html:errors header="warnings.head...
{ "language": "en", "url": "https://stackoverflow.com/questions/162221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I preserve markup tags? I've got an XML document containing news stories, and the body element of a news story contains p tags amongst the plain text. When I use XSL to retrieve the body, e.g. <xsl:value-of select="body" /> the p tags seem to get stripped out. I'm using Visual Studio 2005's implementation of...
{ "language": "en", "url": "https://stackoverflow.com/questions/162225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to open existing file using COM/ATL (no MFC) I have an existing Windows C++ application that links to ATL. I need to open an existing Excel file and access some properties. One of the things I need to do is determine if the user is currently viewing the Excel file. We can assume that the user has Excel install...
{ "language": "en", "url": "https://stackoverflow.com/questions/162229", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What constitutes 'high cpu' for SQL Server What level of CPU usage should be considered high for SQL Server? ie 80% 90% 100%? A: if under normal loads the CPU averages above 40% I start to get nervous. However, that's because I know the nature of our traffic and the spikes we get. Your mileage may vary. A: We actu...
{ "language": "en", "url": "https://stackoverflow.com/questions/162231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java development for the web I'm looking to start developing for the web using Java - I have some basic Java knowledge, so that's not a problem, but I'm at a loss when it comes to deciphering the various technologies for use in web applications. What options are available to me? How do they work? Are there any frame...
{ "language": "en", "url": "https://stackoverflow.com/questions/162253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to check the maximum number of allowed connections to an Oracle database? What's the best way, using SQL, to check the maximum number of connections that is allowed for an Oracle database? In the end, I would like to show the current number of sessions and the total number allowed, e.g. "Currently, 23 out of 80 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: JQuery Facebox Plugin : Get it inside the form tag I am wanting to use the Facebox plugin for JQuery but am having a few issues getting it running how I want. The div that houses the facebox content is created outside of the tag so even though I am loading up some web controls none of them are firing back to the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/162276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to check if a process is running via a batch script How can I check if an application is running from a batch (well cmd) file? I need to not launch another instance if a program is already running. (I can't change the app to make it single instance only.) Also the application could be running as any user. A: I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "299" }
Q: Font problems in charts (Reporting services 2008) While generating charts using RS 2008 betas, RC0 and such., I never specified any fonts for axis labels, legends etc. They were all rendered with the Arial font by default, which looked awesome. But as soon as we switched to RS 2008 final, the fonts got all messed up...
{ "language": "en", "url": "https://stackoverflow.com/questions/162295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to replay soap message? I would like to replay soap message against my server. I've recorded a few messages and i've tampered with Timestamps, soapbodies etc and now I would like to see that my SecurityAssertions lites up like xmastrees. The deployed server will use clientcertificates and servercertifivcates for...
{ "language": "en", "url": "https://stackoverflow.com/questions/162296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: RoR: Model validation question I have a basic ActiveRecord model in which i have two fields that i would like to validate. The requirement is that at least one of the fields must have a value. Both can have values, but at least one needs a value. How do i express this with validates_presence_of statements? For ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/162298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Convert Char[] to a List (c#) How can I convert a Char[] (of any length) to a List ? A: I have managed to use the following to get the job done: byte[] arr = new System.Text.UTF8Encoding( true ).GetBytes( str ); List<byte> byteList = new List<byte>( arr ); Thanks for your help A: First you need to understand tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/162303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I shutdown, restart, or log off Windows via a bat file? I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart. How do I control my computer's power state through the command l...
{ "language": "en", "url": "https://stackoverflow.com/questions/162304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "678" }
Q: How to launch a Windows process as 64-bit from 32-bit code? To pop up the UAC dialog in Vista when writing to the HKLM registry hive, we opt to not use the Win32 Registry API, as when Vista permissions are lacking, we'd need to relaunch our entire application with administrator rights. Instead, we do this trick: She...
{ "language": "en", "url": "https://stackoverflow.com/questions/162309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What is the role of Spring in Struts + Spring + Hibernate? What role is Spring taking in Struts + Spring + Hibernate? A: Well, Hibernate handles the persistence part, JSP handles your GUI, Struts controls the flow between pages/actions/etc, and Spring can manage all your beans which contain the main business logic,...
{ "language": "en", "url": "https://stackoverflow.com/questions/162310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Firebird 1.5.3: How to add FK with connected users to the DB? I use FB1.5.3 and need to eventually add some FK to the database. It happens that if I try to do it while anyone else is connected to the DB I get an exception. Is there a way to add an FK while the system is running? A: There's no way. It's a known limi...
{ "language": "en", "url": "https://stackoverflow.com/questions/162322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: SQL Duplicate Delete Query over Millions of Rows for Performance This has been an adventure. I started with the looping duplicate query located in my previous question, but each loop would go over all 17 million records, meaning it would take weeks (just running *select count * from MyTable* takes my server 4:30 min...
{ "language": "en", "url": "https://stackoverflow.com/questions/162325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get the checked option in a group of radio inputs with JavaScript? How to get the checked option in a group of radio inputs with JavaScript? A: http://www.somacon.com/p143.php A: If you need the actual element and not just the selected value, try this: function findSelected(){ for (i=0;i<document.formname...
{ "language": "en", "url": "https://stackoverflow.com/questions/162326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Finding the default application for opening a particular file type on Windows I'm developing an application targeting .NET Framework 2.0 using C# for which I need to be able to find the default application that is used for opening a particular file type. I know that, for example, if you just want to open a file usin...
{ "language": "en", "url": "https://stackoverflow.com/questions/162331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: What is wrong with DateTime.Parse(myString)? I was browsing Scott Hanselman's Developer Interview question list, and ran across this question: What is wrong with DateTime.Parse(myString)? While I know there are inherent risks in parsing a string of unknow format or origin, are there other reasons? Is it to use D...
{ "language": "en", "url": "https://stackoverflow.com/questions/162335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: With WinDbg, can I modify an item in memory while a process is running? Can I, using an address found in a map file, use windbg to alter a variable in memory while the app is running? I'm really interested in turning on/off functionality in run-time maybe with a variable. How would you do this? Does it require break...
{ "language": "en", "url": "https://stackoverflow.com/questions/162338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there any way to create a patch for an ASP.Net web application installer? Is it possible to create patch installers for web deployment installers generated in VS2005? I have a situation in which it is undesirable to perform a complete uninstall/reinstall of a web site, but in which periodic bug fixes and minor up...
{ "language": "en", "url": "https://stackoverflow.com/questions/162366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Streaming audio to a browser I have a large amount of audio stored on my web server in a very custom format that can't be replayed by anything other than my own application. That application is a Win32 app that can connect to my web server and stream and replay that audio. I'd really like to be able to do the str...
{ "language": "en", "url": "https://stackoverflow.com/questions/162375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Web Services authentication - best practices? We have SOAP web services in production that are relying on SOAP Headers (containing plain client credentials) for the authentication. The WS are used in heterogeneous environments with .NET/Java/PHP/Python/C++ clients both web app or desktop app. We are considering a v2...
{ "language": "en", "url": "https://stackoverflow.com/questions/162376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: SQL count query Hi why doesn't this work in SQL Server 2005? select HALID, count(HALID) as CH from Outages.FaultsInOutages where CH > 3 group by HALID I get invalid column name 'CH' i think having was the right way to go but still receive the error: Invalid column name 'CH'. When running: select HALID, count(HAL...
{ "language": "en", "url": "https://stackoverflow.com/questions/162399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the point of @import? Can someone explain what are the benefits of using the @import syntax comparing to just including css using the standard link method? A: As the answerer said, it lets you split your CSS into multiple files whilst only linking to one in the browser. That said, it's still wasteful to hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/162409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: With Rails, where should I put html snippets? I don't want partials but I want them reloaded during development Being lazy (and liking DRY code), I'm the kind of guy who's going to write a few little wrappers for recurring HTML markup. Those provided by Rails are good already, but sometimes I have something a little...
{ "language": "en", "url": "https://stackoverflow.com/questions/162421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Track started applications in Windows We're trying to put together kiosk solution where we can charge people by hour for applications they use. As such, we need a way to figure out when an application is started, when it is closed and log this information for billing. I am a reasonably experienced .NET programmer so...
{ "language": "en", "url": "https://stackoverflow.com/questions/162444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to know the real size of a web page? I wan't to know the real size of a web page (HTML + CSS + Javascript + Images + etc.) but from the browser side, maybe with a software, Firefox Add-On or similar? A: YSlow is a FireBug plugin (Firebug is a FireFox plugin), and it works great. If you meant the entire website,...
{ "language": "en", "url": "https://stackoverflow.com/questions/162445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: SQL Join question I have 3 tables * *Links Link ID Link Name GroupID (FK into Groups) SubGroupID (FK into Subgroups) *Groups GroupID GroupName *SubGroup SubGroupID SubGroupName GroupID (FK into Groups) Every link needs to have a GroupID but teh SubGroupID is optional. How do i write a SQL query to show: Link...
{ "language": "en", "url": "https://stackoverflow.com/questions/162459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 'const int' vs. 'int const' as function parameters in C++ and C Consider: int testfunc1 (const int a) { return a; } int testfunc2 (int const a) { return a; } Are these two functions the same in every aspect or is there a difference? I'm interested in an answer for the C language, but if there is something inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/162480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: Asking to see employer's code/database in an interview I've been asked to write code/design things in an interview. Sometimes even to provide code samples. Very reasonable and very wise (always surprised when this DOESN'T happen) I had a job a year or so back where the code was so awful that I would not have taken...
{ "language": "en", "url": "https://stackoverflow.com/questions/162484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Spring MVC Form tags: Is there a standard way to add "No selection" item? There is a select dropdown and I want to add "No selection" item to the list which should give me 'null' when submitted. I'm using SimpleFormController derived controller. protected Map referenceData(HttpServletRequest httpServletRequest, Obje...
{ "language": "en", "url": "https://stackoverflow.com/questions/162497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Is there a way to script diagrams in SQL 2000 (or save them another way)? It's possible to create digrams in SQL Server 2000 that can be useful to show the relationships between tables. The problem we run into is that when somebody refreshes our development database, the diagrams get lost. We can load tables, stor...
{ "language": "en", "url": "https://stackoverflow.com/questions/162520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SSAS Cube Browsing not working after SQL 2008 CTP uninstall I've had SQL 2005 & 2008 CTP installed side-by-side with no problems. Recently uninstalled the CTP after it expired and now whenever I try to browse an analysis services cube in SSMS 2005 or VS 2005, I get the follwoing error: Retrieving the COM class facto...
{ "language": "en", "url": "https://stackoverflow.com/questions/162533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mock IIdentity and IPrincipal I just wanna ask what would be better approach to supply these objects in my unit tests. In my unit test I am testing CSLA object. CSLA object is internally using one property and one method of ApplicationUser object. ApplicationUser is inherited from IPrincipal. The properties are: 1) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the difference between "global::System" and "System" in .NET? I just upgraded a VS 2005 project to VS 2008 and was examining the changes. I noticed one of the .Designer.cs files had changed significantly. The majority of the changes were simply replacements of System with global::System. For example, prote...
{ "language": "en", "url": "https://stackoverflow.com/questions/162537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Performing AJAX delete operations restfully in rails How do you perform delete and put operations restfully in rails? I have read the documentation and thought I was doing everything properly, but I can't seem to get it to work. For example, if I wanted to delete an employee I would create a controller called "Emplo...
{ "language": "en", "url": "https://stackoverflow.com/questions/162542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to find unused/dead code in java projects What tools do you use to find unused/dead code in large java projects? Our product has been in development for some years, and it is getting very hard to manually detect code that is no longer in use. We do however try to delete as much unused code as possible. Suggestio...
{ "language": "en", "url": "https://stackoverflow.com/questions/162551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "316" }
Q: Utilizing Java API from a Cobol program We have some COBOL programs running on our mainframe and we need one of those to communicate with our back end vault through a Java API. Is there any way a Cobol program can invoke the Java program? Would it be possible to use a Web Service from Cobol? How would I integrate a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Update Month value on datefield in MS sql 2005 I need a way to update the month value on a dateTime field in my db. I'm being past an int value for the month and need to use that for the update. Is it possible to do this in the sql statement or would I be best doing it in c# in the webservice? A: Shift down and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/162564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I get the row count in JDBC? I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this with high performance? I'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers. A: If your driver supports it(!), you c...
{ "language": "en", "url": "https://stackoverflow.com/questions/162571", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: How can I save email attachments to the server in PHP? I've been battling PHP's email reading functions for the better part of two days. I'm writing a script to read emails from a mailbox and save any attachments onto the server. If you've ever done something similar, you might understand my pain: PHP doesn't play w...
{ "language": "en", "url": "https://stackoverflow.com/questions/162576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Different team members on Visual Studio 2005 and 2008 I am currently working on an asp.net application in Visual Studio 2005. I would like to upgrade to 2008 to take advantage of some of the new features, but my remote team won't be able to upgrade to it for a while. Is it possible for only a few people on my team t...
{ "language": "en", "url": "https://stackoverflow.com/questions/162583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Subversion: deleting old feature branches vs. keeping them I have a subversion repository with the standard layout, i.e. trunk/ and branches/ (and tags/). When working on a bigger change, a feature branch is used, regularly synced with trunk, and later reintegrated back into trunk (using 1.5 now). Pretty standard st...
{ "language": "en", "url": "https://stackoverflow.com/questions/162591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Iterating shuffled [0..n) without arrays I know of a couple of routines that work as follows: Xn+1 = Routine(Xn, max) For example, something like a LCG generator: Xn+1 = (a*Xn + c) mod m There isn't enough parameterization in this generator to generate every sequence. Dream Function: Xn+1 = Routine(...
{ "language": "en", "url": "https://stackoverflow.com/questions/162606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I automatically add some skeleton code when creating a new file with vim When creating a new file with vim, I would like to automatically add some skeleton code. For example, when creating a new xml file, I would like to add the first line: <?xml version="1.0"?> Or when creating an html file, I would like...
{ "language": "en", "url": "https://stackoverflow.com/questions/162617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: .NET : How do you remove a specific node from an XMLDocument using XPATH? Using C# How do you remove a specific node from an XMLDocument using XPATH? A: Here you go. ChildNodeName, could be just the node name or an XPath query. XmlDocument doc = new XmlDocument(); // Load you XML Document XmlNode childNode = do...
{ "language": "en", "url": "https://stackoverflow.com/questions/162618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What tools and techniques do you use to find dead code? What tools and techniques do you use to find dead code in .NET? In the past, I've decorated methods with the Obsolete attribute (passing true so the compiler will issue an error, as described in MSDN). I'd be interested in seeing the suggestions of others (beyo...
{ "language": "en", "url": "https://stackoverflow.com/questions/162641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Why can't I save CSS changes in Firebug? Firebug is the most convenient tool I've found for editing CSS - so why isn't there a simple "save" option for CSS? I am always finding myself making tweaks in Firebug, then going back to my original .css file and replicating the tweaks. Has anyone come up with a better solut...
{ "language": "en", "url": "https://stackoverflow.com/questions/162644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "143" }
Q: How do I detect "Easter Egg" mode in my Palm OS application? Since the early days, Palm OS has had a special "easter egg" mode that's enabled by making the right gesture in one of the Preference panels. On current Palm Treo and Centro devices, this is turned on by doing a clockwise swirl above the "Tips" button in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the difference with these two sets of code What is the difference between these two pieces of code type IInterface1 = interface procedure Proc1; end; IInterface2 = interface procedure Proc2; end; TMyClass = class(TInterfacedObject, IInterface1, IInterface2) protected procedure Proc1...
{ "language": "en", "url": "https://stackoverflow.com/questions/162651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Interface to versioned dictionary I have an versioned document store which I want to access through an dict like interface. Common usage is to access the latest revision (get, set, del), but one should be able to access specific revisions too (keys are always str/unicode or int). from UserDict import DictMixin class...
{ "language": "en", "url": "https://stackoverflow.com/questions/162656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Non-interactive authentication/authorization for XML-RPC? We don't exactly comply with the XML-RPC spec, but the concepts are nearly identical. A client comes in over HTTP/HTTPS with an XML payload. We respond with an XML payload answering the request. This is primarily machine to machine, so no human to type a u...
{ "language": "en", "url": "https://stackoverflow.com/questions/162663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to change ToolTip's position on a TreeView? When using tooltips to show a detailed description of a TreeNode, the tooltip is drawn on top of the node, as if it was completing the node's text. Also, if the text is long, the tooltip is positioned in a way that the text exceeds the screen. But what I need is the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/162674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I handle HTTP file uploads? How would I write a Perl CGI script that receives a file via a HTTP post and saves that to the file system? A: Use the CGI module. my $fh = $query->upload('upload_field'); while(<$fh>) { print SAVE_FILE $_; } A: Just a note: however you will write it, don't save it in a place...
{ "language": "en", "url": "https://stackoverflow.com/questions/162677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: The value of hobby game development Does attempting to develop some sort of game, even just as a hobby during leisure time provide useful (professional) experience or is it a childish waste of time? I have pursued small personal game projects on and off throughout my programming career. I've found the (often) strict...
{ "language": "en", "url": "https://stackoverflow.com/questions/162680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to parse formatted email address into display name and email address? Given the email address: "Jim" <jim@example.com> If I try to pass this to MailAddress I get the exception: The specified string is not in the form required for an e-mail address. How do I parse this address into a display name (Jim) and emai...
{ "language": "en", "url": "https://stackoverflow.com/questions/162681", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Doing your own custom .NET event processing loop A few years ago, I read a book that described how you could override the default event 'dispatcher' implementation in .NET with your own processor. class foo { public event EventHandler myEvent; ... } ... myFoo.myEvent += myBar1.EventH...
{ "language": "en", "url": "https://stackoverflow.com/questions/162696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using system's standard Edit menu in a Palm OS app How can I use the standard Edit menu in my Palm OS application, instead of having to implement my own Cut/Copy/Paste/Keyboard handlers? A: Palm OS's system form code had built-in handlers for the command IDs in the Edit menu. If you use a standard form for these m...
{ "language": "en", "url": "https://stackoverflow.com/questions/162717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to embed a browser object, other than IE, in a Delphi application Using the default TWebBrowser makes things easy to embed a web browser. Unfortunately the one that comes in by default is IE<n>. I'm wondering how does one integrate a Gecko or WebKit one. * *Are there VCL examples somewhere? *If not, how woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/162718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Read fixed width record from text file I've got a text file full of records where each field in each record is a fixed width. My first approach would be to parse each record simply using string.Substring(). Is there a better way? For example, the format could be described as: <Field1(8)><Field2(16)><Field3(12)> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Rendered pIxel width data for each character in a browser's font I have a table column that needs to be limited to a certain width - say 100 pixels. At times the text in that column is wider than this and contains no spaces. For example: a_really_long_string_of_text_like_this_with_no_line_breaks_makes_the_table_unh...
{ "language": "en", "url": "https://stackoverflow.com/questions/162730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Dojo DnD acceptance of outside objects Is it possible to code a Dojo DnD target to accept external objects, such as files or folders from a file explorer? Windows Explorer, for example. A: I doubt it, because it will be the browser that will receive the DnD event... At best you can count on a plugin or extension t...
{ "language": "en", "url": "https://stackoverflow.com/questions/162733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C, C++, Java, what is next and what will it look like? What do you think the next evolution of languages will look like? A: You might assume C and C++ are being "phased out" and that Java/.Net/Python/whatever is an "advance" or the "next stop". They are all used heavily (see the number C or C++ of tags on this site...
{ "language": "en", "url": "https://stackoverflow.com/questions/162735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What are your favorite tools to backport modifications from branch to trunk in subversion directories? On a project I'm working on, we use subversion, with tortoiseSVN as a client, under windows XP. As we enter in production and continue development in parallel, many branches are created. Often, we have to backport ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Algorithm to calculate next set in sequence I am looking for an algorithm to calculate the next set of operations in a sequence. Here is the simple definition of the sequence. * *Task 1A will be done every 500 hours *Task 2A will be done every 1000 hours *Task 3A will be done every 1500 hours So at t=500, do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using Length() with multi-dimensional dynamic arrays in Delphi I am using a multi-dimensional dynamic array in delphi and am trying to figure this out: I have 2 seperate values for the first index and second index that are totally seperate of each other. As new values come I want to grow the array if that new value ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ora 12154 error I recently deploy one web application in one of my development servers. I'm using oracle, asp.net and c#. When I run the application in the server everything works fine, but when I try to run the application outside of the server (using my pc, for example) i get this error: ORA-12154: TNS:could not r...
{ "language": "en", "url": "https://stackoverflow.com/questions/162762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sql Server 2005 how to change dbo login name I have a database with user 'dbo' that has a login name "domain\xzy". How do I change it from "domain\xzy" to "domain\abc". A: If you are trying to remap a login to a db user you can use sp_change_user_login exec sp_change_user_login 'Update_One', 'user', 'login' A: I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Best way to store urls locally I am creating an RSS reader as a hobby project, and at the point where the user is adding his own URL's. I was thinking of two things. * *A plaintext file where each url is a single line *SQLite where i can have unique ID's and descriptions following the URL Is the SQLite idea to...
{ "language": "en", "url": "https://stackoverflow.com/questions/162778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Picture over Flash Do you know any solution to put a picture over a Flash? It must work in IE6, IE7, Firefox for Windows, MacOSX, Linux and Safari. A: Off the top of my head you could try this: Absolute positioned div with the image over the swf You must set swf's parameter "wmode" value as "transparent". You coul...
{ "language": "en", "url": "https://stackoverflow.com/questions/162797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Subclassing a class with private members One of the really nice things about python is the simplicity with which you can name variables that have the same name as the accessor: self.__value = 1 def value(): return self.__value Is there a simple way of providing access to the private members of a class that I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/162798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to retrieve n characters from char array I have a char array in a C application that I have to split into parts of 250 so that I can send it along to another application that doesn't accept more at one time. How would I do that? Platform: win32. A: From the MSDN documentation: The strncpy function copies the...
{ "language": "en", "url": "https://stackoverflow.com/questions/162804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Django and Python 2.6 I'm just starting to get into Django, and of course as of last night one of the two new Python versions went final (2.6 obviously ;)) so I'm wondering if 2.6 plus Django is ready for actual use or do the Django team need more time to finish with tweaks/cleanup? All the google searches I did w...
{ "language": "en", "url": "https://stackoverflow.com/questions/162808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you log the machine name via log4net? I am using Log4Net with the AdoNetAppender to log messages from a simple systray application into a SQL Server 2005 database. I want to log the machine name along with the log message because this application will be running on multiple machines and I need to know on whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/162810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Using PostMessage in Windows Mobile to simulate a menu pick I'm writing a routine to provide user definable keyboard short-cuts for any menu item in my Windows Mobile 5 application, which is in C++/MFC. To do this I am getting all of the available menu command IDs, and using the CWnd::PostMessage(WM_COMMAND,MyMenuI...
{ "language": "en", "url": "https://stackoverflow.com/questions/162819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Packaging up the .net framework with a .net application deployment Can you package up the .Net framework in an installer created in Visual Studio? If so how? I've seen this done with Install4J packaging a JVM but I think that was the JVM to run Install4J. A: I just learned this lesson about deployment projects: the...
{ "language": "en", "url": "https://stackoverflow.com/questions/162845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I fix the error unable to enlist Sybase database in distributed transaction? I know very little (arguably nothing) about Sybase setup, but I do know SSIS is having trouble enlisting Sybase in a distributed transaction. Has anyone been able to make this work? The SSIS Runtime has failed to enlist the OLE DB c...
{ "language": "en", "url": "https://stackoverflow.com/questions/162848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to compact a SQL2000/2005 MDF file? I deleted millions of rows of old data from a production SQL database recently, and it didn't seem to shrink the size of the .MDF file much. We have a finite amount of disk space. I am wondering if there is anything else I can do to "tighten" the file (like somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/162852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NHibernate Query problem I'm quite new to NHibernate and starting to find my way around. I have a domain model that is somewhat like a tree. Funds have Periods have Selections have Audits Now I would like to get all Audits for a specific Fund Would look like this if I made it in SQL SELECT A.* FROM Audit A JOIN Sele...
{ "language": "en", "url": "https://stackoverflow.com/questions/162871", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I include a file over 2 directories back? How do you include a file that is more than 2 directories back. I know you can use ../index.php to include a file that is 2 directories back, but how do you do it for 3 directories back? Does this make sense? I tried .../index.php but it isn't working. I have a file i...
{ "language": "en", "url": "https://stackoverflow.com/questions/162873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "124" }
Q: Why do Jars get Excluded from Enunciate's Deployment? I'm using Enunciate to build a prototype REST api and need to include a jar containing custom code as a library. My Ant Script looks like this: <!--include all jars--> <path id="en.classpath"> <fileset dir="${lib}"> <include name="**/*.jar" /> </...
{ "language": "en", "url": "https://stackoverflow.com/questions/162874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Same property, different types Let's say you have a class with a Uri property. Is there any way to get that property to accept both a string value and a Uri? How would you build it? I'd like to be able to do something like one of the following, but neither are supported (using VB, since it lets you specify type in...
{ "language": "en", "url": "https://stackoverflow.com/questions/162879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tracking Changes to a Directory Tree over Time Does anyone know of an application or system out there for tracking changes (files added/removed, diffs on text files) to a non-source controlled directory over time? Something that would let you * *Take a snapshot of a certain directory tree at time A *Come back a...
{ "language": "en", "url": "https://stackoverflow.com/questions/162886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Emacs on Mac OS X Leopard key bindings I'm a Mac user and I've decided to learn Emacs. I've read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard? Also, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/opti...
{ "language": "en", "url": "https://stackoverflow.com/questions/162896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "106" }
Q: Marshal "char *" in C# Given the following C function in a DLL: char * GetDir(char* path ); How would you P/Invoke this function into C# and marshal the char * properly. .NET seems to know how to do LPCTSTR but when I can't figure out any marshaling that doesn't cause a NotSupportedException to fire when calling th...
{ "language": "en", "url": "https://stackoverflow.com/questions/162897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How do I call Java code from JavaScript code in Wicket? If I can do this, how do I call Java code (methods for instance) from within JavaScript code, in Wicket. A: Excerpt from https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html If you add any class that extends AbstractDefaultAjaxBehavior to your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: SQL Server 2005 encryption trigger I have a script that successfully encrypts a credit card. I need it to work as a trigger, so that any insert done to the creditcard column automatically encrypts it. Right now, my trigger works BUT the creditcard column is a varchar. When an app tries to insert, I do this: DECLARE...
{ "language": "en", "url": "https://stackoverflow.com/questions/162915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I report an error midway through a chunked http repsonse without closing the connection? I have an HTTP server that returns large bodies in response to POST requests (it is a SOAP server). These bodies are "streamed" via chunking. If I encounter an error midway through streaming the response how can I report ...
{ "language": "en", "url": "https://stackoverflow.com/questions/162917", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Spawning multiple SQL tasks in SQL Server 2005 I have a number of stored procs which I would like to all run simultaneously on the server. Ideally all on the server without reliance on connections to an external client. What options are there to launch all these and have them run simultaneously (I don't even need t...
{ "language": "en", "url": "https://stackoverflow.com/questions/162919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Formatting a field using ToText in a Crystal Reports formula field I'm trying to create a Crystal Reports formula field (to calculate the percentage change in a price) that will return "N/A" if a particular report field is null, but return a number to two decimal places using accounting format (negative numbers surr...
{ "language": "en", "url": "https://stackoverflow.com/questions/162931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Readonly ComboBox in WinForms I'm writing a GUI in C#, Visual Studio 2008, using the Designer and WinForms. I've got a ComboBox control, and I'd like it to only allow to select from the provided options and not to accept a user-entered string. It doesn't appear to have a ReadOnly property, and disabling it hinders...
{ "language": "en", "url": "https://stackoverflow.com/questions/162936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Would it be possible to use web services from a Cobol program? We have some COBOL programs in our financial applications which need to interact with some of our backend systems. One of the available interfaces is through a web service. Can a program written in Cobol make requests to a web service? A: Microfocus pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/162940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why use pointers? I know this is a really basic question, but I've just started with some basic C++ programming after coding a few projects with high-level languages. Basically I have three questions: * *Why use pointers over normal variables? *When and where should I use pointers? *How do you use pointers wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/162941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "448" }
Q: Is there a source-control system that allows tracking of file name changes? So, I've been living with my cvs repositories for some time. Though there is a thing I miss - if i rename a file that is already in repository, I need to delete the one with old name from there and add the new one. Hence, I loose all my chan...
{ "language": "en", "url": "https://stackoverflow.com/questions/162960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }