text
stringlengths
8
267k
meta
dict
Q: US Phone Number Verification I have a website form that requires a US phone number input for follow up purposes, and this is very necessary in this case. I want try to eliminate users entering junk data 330-000-0000. I have seen some options of third parties that validate phone numbers for you, however idk if that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/175488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I call SSIS programmatically from .NET? I have an application where whenever a file is uploaded to a directory, I have to call SSIS to parse the XML file. Can I call a SSIS directly from a .NET Windows service? A: you can run your SSIS package programmatically, as follow: using System; using Microsoft.SqlSe...
{ "language": "en", "url": "https://stackoverflow.com/questions/175505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I take preview of documents? I'm working on a file sharing website, I need a way to take screenshots of the uploaded documents. The site will support several file formarts, from plain text to office documents (doc, xls, ppt, ...), videos (mpeg, avi, ...), images (jpg, gif, png, ...) PDF's, Open Office, etc. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Should a retrieval method return 'null' or throw an exception when it can't produce the return value? I am using java language,I have a method that is supposed to return an object if it is found. If it is not found, should I: * *return null *throw an exception *other Which is the best practise or idiom? A: As ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "545" }
Q: writing optimization function I'm trying to write a tennis reservation system and I got stucked with this problem. Let's say you have players with their prefs regarding court number, day and hour. Also every player is ranked so if there is day/hour slot and there are several players with preferences for this slot th...
{ "language": "en", "url": "https://stackoverflow.com/questions/175544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fix for Hibernate error "Use of the same entity name twice" How you fix the following Hibernate error: What does "Use of the same entity name twice". A: This exception occures when you have more then one @Entity with the same class's name or explicit name. To fix the issue you have to set different explicit names f...
{ "language": "en", "url": "https://stackoverflow.com/questions/175547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to convert milliseconds into human readable form? I need to convert an arbitrary amount of milliseconds into Days, Hours, Minutes Second. For example: 10 Days, 5 hours, 13 minutes, 1 second. A: You should use the datetime functions of whatever language you're using, but, just for fun here's the code: int millis...
{ "language": "en", "url": "https://stackoverflow.com/questions/175554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "125" }
Q: How can I have my polling service call SSIS sequentially? I have a polling service that checks a directory for new files, if there is a new file I call SSIS. There are instances where I can't have SSIS run if another instance of SSIS is already processing another file. How can I make SSIS run sequentially during the...
{ "language": "en", "url": "https://stackoverflow.com/questions/175572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are named pipes? What are they and how do they work? Context happens to be SQL Server A: Pipes are a way of streaming data between applications. Under Linux I use this all the time to stream the output of one process into another. This is anonymous because the destination app has no idea where that input-strea...
{ "language": "en", "url": "https://stackoverflow.com/questions/175579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "157" }
Q: jQuery UI droppables - changing the image that's dropped I'm working with jQuery UI's droppables and am wondering what the best way to make the dropped clone use a different IMG SRC than the item being dropped. In the photo manager demo there, the thumbnail gets dropped into a slot that's the same size. I'd like to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Starting external process during integration testing in maven I want completely automated integration testing for a Maven project. The integration tests require that an external (platform-dependent) program is started before running. Ideally, the external program would be killed after the unit tests are finished, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: One entity shared across two web services? I'm working on a project where I have 2 web services that need the same entity. The 2 web services are on the same server so on the back-end, they share the same classes. On the front-end side, my code consumes both web services and sees the entities from both services as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to find where a method is defined at runtime? We recently had a problem where, after a series of commits had occurred, a backend process failed to run. Now, we were good little boys and girls and ran rake test after every check-in but, due to some oddities in Rails' library loading, it only occurred when we ran ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "350" }
Q: DB2 Online Database Backup I have currently 200+ GB database that is using the DB2 built in backup to do a daily backup (and hopefully not restore - lol) But since that backup now takes more than 2.5 hours to complete I am looking into a Third party Backup and Restore utility. The version is 8.2 FP 14 But I will be...
{ "language": "en", "url": "https://stackoverflow.com/questions/175684", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you use keyword explicit to prevent automatic conversion of method parameters? I know you can use C++ keyword 'explicit' for constructors of classes to prevent an automatic conversion of type. Can you use this same command to prevent the conversion of parameters for a class method? I have two class members, one...
{ "language": "en", "url": "https://stackoverflow.com/questions/175689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: I want to use an LDAP client here at work to talk to Active Directory. How can I discover on my own the IP I should be aiming at? I know I could just ask, but that would involve bureaucratic entanglements. A: Try ping or nslookup _ldap._tcp. with your AD Domain (e.g. _ldap._tcp.test.com) in a console (cmd.exe) - th...
{ "language": "en", "url": "https://stackoverflow.com/questions/175690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do i designate in XSD that an element only contains CDATA? How can I represent the following in XSD. <price-update> <![CDATA[ arbitrary data goes here ]]> </price-update> A: <element name="price-update" type="string"></element> is about as close as you can get. (I thought it best to move the a...
{ "language": "en", "url": "https://stackoverflow.com/questions/175695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: What class handles the popup/notification windows on iphone? I'm looking for the class name of the popup/message windows on the iPhone (it's a blueish window that comes up when you have a missed call, or a message comes in for example.) A: The class is called UIAlertView. From the documentation: Use the UIAlertVie...
{ "language": "en", "url": "https://stackoverflow.com/questions/175696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Script all stored procedures in Management Studio 2005 In Enterprise Manager you could script all SPs in a database through the right click menu, is there a way to do it in Management Studio? A: You can right click on the database and to go Tasks -> Generate Scripts... This will allow you to script all or selected ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: Is there a connection between SourceSafe (version control) and SharePoint (collaboration)? Or are they two distinct applications that are not related? A: They are very different, although some people push the list of source control commits or latest files (head) to their team wiki (which could be SharePoint) A: So...
{ "language": "en", "url": "https://stackoverflow.com/questions/175705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Why does the memory usage of a .NET application seem to drop when it is minimized? For example, launch Paint.NET. Then have a look on its memory usage with Task Manager: on my computer, it uses 36Mb. Then minimize Paint.NET: now it takes only a few more than 1Mb. This happens with every .NET Application. What happen...
{ "language": "en", "url": "https://stackoverflow.com/questions/175707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What is the best application of .dispose() This is something that I have never fully grasped in .NET as to the correct application of the .dispose() method. Say I have something like Public Class someClass() sub someMethod ' do some stuff tying up resources end sub End Class public class mainApp dim _cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/175717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is there an easy way to animate the ScrollableControl.ScrollControlIntoView method? I have a form where controls are dynamically added to a Panel. However, when they do so, they are many times added below the fold (bottom of the container). It's nice that the .NET Framework provides this ScrollControlIntoView meth...
{ "language": "en", "url": "https://stackoverflow.com/questions/175723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c#: Create new settings at run time c# windows forms: How do you create new settings at run time so that they are permanently saved as Settings.Default.-- values? A: Since the Settings class is generated at build time (or, actually, whenever you update the settings file from within the designer), you can't use this...
{ "language": "en", "url": "https://stackoverflow.com/questions/175726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Tools/Components for building a Survey Application We are designing a survey application with the following features * *The users will be able to select questions from a set of predefined questions. *Each question has a question type defined which dictates the type of answer (multiple choice, DB look up, free te...
{ "language": "en", "url": "https://stackoverflow.com/questions/175732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I create a MySQL JOIN query for only selecting the rows in one table where a certain number of references to that row exist in another table? I have two tables in my database, called ratings and movies. Ratings: | id | movie_id | rating | Movies: | id | title | A typical movie record might be like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WS_EX_TOOLWINDOW jumping to background on window destroy Weird issue: * *Open a large notepad window *create a toolwindow (style WS_EX_TOOLWINDOW) *create 2 more windows (normal overlapped) (WS_OVERLAPPED) *close those 2 overlapped windows (child of desktop or the toolwindow) *the toolwindow jumps behind the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I check if a string is a valid number? I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function? A: The accepted answer for this question has quite a few flaws (as highlighted by couple of other users). This is one of the easiest & proven way to approach it in javascript...
{ "language": "en", "url": "https://stackoverflow.com/questions/175739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1798" }
Q: Java Script 2 D Arrays allocation I want to allocate a 2 D Array in Java Script. I want do some thing similar to this in JavaScript typedef struct { int itemA, int itemB, string testC } myStruc; myStruct MyArray [100]; How to do this ? A: var arr = [] arr[0] = { "itemA": "A", "itemB": "B", "itemC": "...
{ "language": "en", "url": "https://stackoverflow.com/questions/175742", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Resources for learning c# Excel interop What are some resources that will help get me up and running quickly with the Excel interop in C#? A: 1) First thing first; Download the Office Interop Assemblies from which you will access all of the objects, properties and methods in Excel interop and the appropriate refe...
{ "language": "en", "url": "https://stackoverflow.com/questions/175763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How do I convert Word smart quotes and em dashes in a string? I have a form with a textarea. Users enter a block of text which is stored in a database. Occasionally a user will paste text from Word containing smart quotes or emdashes. Those characters appear in the database as: –, ’, “ ,†What function should...
{ "language": "en", "url": "https://stackoverflow.com/questions/175785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What is the most critical piece of code you have written and how did you approach it? Put it another way: what code have you written that cannot fail. I'm interested in hearing from those who have worked on projects dealing with heart monitors, water testing, economic fundamentals, missile trajectories, or the O2 c...
{ "language": "en", "url": "https://stackoverflow.com/questions/175806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Dynamically sizing tab made of images I'm trying add a tab to my web page that looks like this: Using this example as a basis, I've gotten it partially working. My case differs because I want the text section to be a fixed with, but the tail section to dynamically resize to take up the rest of the tab's container....
{ "language": "en", "url": "https://stackoverflow.com/questions/175835", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.Windows.Forms.WebBrowser open links in same window or new window with same session When using the .NET WebBrowser control how do you open a link in a new window using the the same session (ie.. do not start a new ASP.NET session on the server), or how do you capture the new window event to open the URL in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/175836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: DropDownList in Repeater control, can't fire SelectedIndexChanged I have a repeater control where in the footer I have a DropDownList. In my code-behind I have: protected void ddMyRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.Item...
{ "language": "en", "url": "https://stackoverflow.com/questions/175845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Valid jQuery on Development fails on Production I am writing a fairly basic script using jQuery. However, the script behaves differently depending on whether I am running it on my local Web server (localhost) or on a production server. On development, the following code returns the HTML I'm expecting: $('#objID')...
{ "language": "en", "url": "https://stackoverflow.com/questions/175847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you protect your commercial application from being installed on multiple computers with one license? How do you protect your commercial application from being installed on multiple computers from people who only own one license? Do you think it's a good idea to have more than just a serial based scheme? A: U...
{ "language": "en", "url": "https://stackoverflow.com/questions/175857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Can I save a FlowDocument to BAML in a programmatic way? Has anyone found a way to save a FlowDocument as BAML or other compressed format? I can import XML with images to create a new FlowDocument: <TextRange class instance>.Load(fs, DataFormats.Rtf) However, I haven't found a good way to save it in a 'native' com...
{ "language": "en", "url": "https://stackoverflow.com/questions/175858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamically add sender email to Message Header rule in Outlook 2007 via right-click I would like VBA code for Outlook 2007 to right-click a message in any mail view, choose a rule to add it to, and have the sender email be added to the Message Header contains value for that rule. Only particular rules use Message He...
{ "language": "en", "url": "https://stackoverflow.com/questions/175859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Watch for addition of a referenced library to a project (Visual Studio 2008 plug-in) I am hoping someone can help me with this. What I have been looking around for but can't seem to find is if there is someway to add an event, or anything else that will allow a visual studio plug-in to watch for an external referenc...
{ "language": "en", "url": "https://stackoverflow.com/questions/175860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I hook up a referencing outlet in Interface Bulider for a UIImage? I want to access a UIImage programmatically... i.e. myImage.hidden = TRUE; etc. I can do this fine for UILabel but when I repeat the process for UIImage it doesn't work. Specifically when I drag the blue line in Interface Builder over the ic...
{ "language": "en", "url": "https://stackoverflow.com/questions/175869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What percentage of marketshare does a browser need for your support? I'm building a website for a small non-profit org. and I was wondering at what kind of browser marketshare a browser should have before I support it. Chrome looks like a major contender, but it's still less than 5%, as is Opera. What browsers do y...
{ "language": "en", "url": "https://stackoverflow.com/questions/175878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Unmanaged Threads Spring Quartz Websphere Hibernate It appears that our implementation of using Quartz - JDBCJobStore along with Spring, Hibernate and Websphere is throwing unmanaged threads. I have done some reading and found a tech article from IBM stating that the usage of Quartz with Spring will cause that. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/175880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: SQL Server Express 2008 Install Side-by-side w/ SQL 2005 Express Fails When I try to install a new instance of SQL Server 2008 Express on a development machine with SQL 2005 Express already up and running, the install validation fails because the "SQL 2005 Express tools" are installed and I'm told to remove them. Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/175881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: What's the algorithm behind sleep()? Now there's something I always wondered: how is sleep() implemented ? If it is all about using an API from the OS, then how is the API made ? Does it all boil down to using special machine-code on the CPU ? Does that CPU need a special co-processor or other gizmo without which yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/175882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Is there a way to retrieve elements using only local names in a Linq-to-XML query? Lets assume we have this xml: <?xml version="1.0" encoding="UTF-8"?> <tns:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure" xmlns:tns="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:rim="...
{ "language": "en", "url": "https://stackoverflow.com/questions/175891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Prevent an element from "capturing" the mouse using jQuery? I'm trying to resize an embedded object. The issue is that when the mouse hovers over the object, it takes "control" of the mouse, swallowing up movement events. The result being that you can expand the div containing the object, but when you try to shrin...
{ "language": "en", "url": "https://stackoverflow.com/questions/175892", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use an ArrayFixture in FitNesse? I'm having a hard time getting an array fixture to work. Origanlly the test was written as a rowfixture, Requirements later changed and now the order of the results matters. It seems you have to pass the data into the base arrayfixture constructor but I don't see how that is...
{ "language": "en", "url": "https://stackoverflow.com/questions/175906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: "Favorites" or "macros" in SQL Server Management studio? I have a few databases that I always use SQL Server Management Studio with. I'd like to be able to create a toolbar button or keyboard shortcut that automatically opens a new query window (in the current SSMS instance) and connects to a given (registered, perh...
{ "language": "en", "url": "https://stackoverflow.com/questions/175944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can you use routed events with a MultiTrigger? Does WPF support using a triggers that respond to routed events but only given a condition is met? For example, WPF supports triggering on routed events through Event Triggers. ie: <Button> <Button.Triggers> <EventTrigger RoutedEvent="Click"> ... </.. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I stop Chrome from yellowing my site's input boxes? Among other text and visual aids on a form submission, post-validation, I'm coloring my input boxes red to signify the interactive area needing attention. On Chrome (and for Google Toolbar users) the auto-fill feature re-colors my input forms yellow. Here's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/175951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "151" }
Q: Import Text File into generic Database using SQL I am currently trying to import a semi-colon delimited text file into a database in c# using OleDb where I don't know the type (SQL Server, Access, Oracle, MySQL, postgreSQL, etc.) Currently I'm reading in the file as a database using the Jet text reader then creatin...
{ "language": "en", "url": "https://stackoverflow.com/questions/175955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I properly handle the viewstate of a child control within a composite control? I have a composite control that contains a ListBox child control. On postback, the items for the ListBox disappear. I have a property for the ListBox that initializes it, and I add it to the controls collection in CreateChildContro...
{ "language": "en", "url": "https://stackoverflow.com/questions/175958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Does List<>.IndexOf compare by reference or value? List<tinyClass> ids = new List<tinyClass(); ids.Add(new tinyClass(1, 2)); bool b = ids.IndexOf(new tinyClass(1, 2)) >= 0; //true or false? If it compares by value, it should return true; if by reference, it will return false. If it compares by reference, and I m...
{ "language": "en", "url": "https://stackoverflow.com/questions/175961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Dynamic SELECT TOP @var In SQL Server How can I have a dynamic variable setting the amount of rows to return in SQL Server? Below is not valid syntax in SQL Server 2005+: DECLARE @count int SET @count = 20 SELECT TOP @count * FROM SomeTable A: declare @rows int = 10 select top (@rows) * from Employees order by 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/175962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "364" }
Q: Create aliases in emacs? I have a copy of emacs that I use on a couple of different (windows) computers from a thumb drive, and I am wondering if it is possible to create something that is sort of the equivalent of a bash alias or symlink within emacs? Something that I could use within find-file is the main thing th...
{ "language": "en", "url": "https://stackoverflow.com/questions/175982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Using app.config with Interop Controls I have a .net project (MySolution.Common) that uses the app.config. I am using the project MySolution.Common in an InteropUserControl project called MySolution.InteropCtrl. MySolution.InteropCtrl is embedded into a VB6 project. When the MySolution.InteropCtrl is in the VB6 proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/175983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is the best way to migrate data in django After making some changes in my models (eg. new field in a model and a new model) what is the best way of reflecting these changes to my populated database? PS: I wanted to see many solutions in one place rated. Apparently more solutions are already listed here. A: D...
{ "language": "en", "url": "https://stackoverflow.com/questions/175993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Can I embed an icon to a .hta file? I have written an HTML Application (hta file) and am wondering if there is a way to embed an icon file into the hta file itself. I have seen html emails that include embedded graphic files, is there any way to do this with html applications and icons? HTA files have an HTA:APPLICA...
{ "language": "en", "url": "https://stackoverflow.com/questions/175994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Python list vs. array – when to use? If you are creating a 1d array, you can implement it as a list, or else use the 'array' module in the standard library. I have always used lists for 1d arrays. What is the reason or circumstance where I would want to use the array module instead? Is it for performance and memory...
{ "language": "en", "url": "https://stackoverflow.com/questions/176011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "438" }
Q: What do you recommend for setting up a shared server with php What do you recommend for setting up a shared server with php from a security/performance point of view? * *Apache mod_php (how do you secure that? other than safe_mode as it won't be in PHP6) *Apache CGI + suexec *Lighttpd and spawn a FastCGI per us...
{ "language": "en", "url": "https://stackoverflow.com/questions/176013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: When do you set "Index this resource" on IIS6? When setting up a Home Directory on IIS6 properties for a web site there's an option to "Index this resource" which is checked on by default. Microsoft's site says: Grant this permission to allow Microsoft Indexing Service to include this folder in a full-text i...
{ "language": "en", "url": "https://stackoverflow.com/questions/176031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I register a Web Reference for a SQL Server 2008 Reporting Service Report? I'm trying to access the Reporting Services via Web Services in my Visual Studio 2008 Application. How/where can I find my WSDL? A: The following example shows the format of the URL to the Reporting Services management WSDL file: h...
{ "language": "en", "url": "https://stackoverflow.com/questions/176038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java: Serializing beginner problem :-( I want to save and store simple mail objects via serializing, but I get always an error and I can't find where it is. package sotring; import java.io.*; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; import com.sun.org.apache.bcel.internal....
{ "language": "en", "url": "https://stackoverflow.com/questions/176051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Prevent dialogs appearing in unattended builds I was wondering is there is a fool-proof way to run a program on windows such that I'm guaranteed that no interactive dialogs of any kind are displayed. I've tried the registry ErrorMode hack, calling _CrtSetReportMode(), etc., but they all have holes in them or require...
{ "language": "en", "url": "https://stackoverflow.com/questions/176058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Manage multiple app config files during development I'm building an application that is used by several different customers. Each customer has a fair amount of custom business logic, which I have cleverly refactored out into an assembly that gets loaded at runtime. The name of that assembly, along with a number of...
{ "language": "en", "url": "https://stackoverflow.com/questions/176061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I disable and then enable the Retry button in a MessageBox? I have the following unmanaged C++ code: MessageBox( NULL, strMessage, "Cool Product", MB_RETRYCANCEL | MB_ICONEXCLAMATION); I want to disable the RETRY button for 10 seconds (for example), then enable it. How can I do this? A: Like @ffpf says, you...
{ "language": "en", "url": "https://stackoverflow.com/questions/176062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is your Development Environment Set up? Curious to know how people set up their personal and/or work development environment, in terms of: Do you just have all of your developer tools (for example Visual Studio, SSMS, etc.) installed on your main operating system; Do you use Virtual Machines to have a separate "...
{ "language": "en", "url": "https://stackoverflow.com/questions/176080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Why does the string "¿" get translated to "¿" when calling .getBytes() When writing the string "¿" out using System.out.println(new String("¿".getBytes("UTF-8"))); ¿ is written instead of just ¿. WHY? And how do we fix it? A: You don't have to use UTF-16 to solve this: new String("¿".getBytes("UTF-8"), "UTF-8");...
{ "language": "en", "url": "https://stackoverflow.com/questions/176084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Opening a page using actionscript in a custom frame Is it possible to open an HTML page using navigateToURL and specifying a named frame in your HTML document? For instance, if you have an iframe on the page called "Steven", can you call navigateToURL("someURL","Steven"); instead of something like navigateToURL("so...
{ "language": "en", "url": "https://stackoverflow.com/questions/176088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java2D: Clipping a Graphics object with a Line Is there a way to use a Graphics object's 'setClip()' method to clip using a Line-ish shape? Right now I'm trying to use a Polygon shape but I'm having problems simulating the "width" of the line. I basically draw the line, and when I reach the end, I redraw it but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/176093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Validate String against USPS State Abbreviations I need to be able to validate a string against a list of the possible United States Postal Service state abbreviations, and Google is not offering me any direction. I know of the obvious solution: and that is to code a horridly huge if (or switch) statement to check ...
{ "language": "en", "url": "https://stackoverflow.com/questions/176106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Every now and then, ABCpdf runs out of memory The project I'm on is using a 3rd party component to build dynamic PDFs in a VB.Net web system called ABCpdf.Net. (not a terrible tool, but not a great one either.) Every now and then, for reasons I can't fathom, the document object throws a SEHException. Digging futhe...
{ "language": "en", "url": "https://stackoverflow.com/questions/176113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When is it ok to use a global variable in C? Apparently there's a lot of variety in opinions out there, ranging from, "Never! Always encapsulate (even if it's with a mere macro!)" to "It's no big deal – use them when it's more convenient than not." So. Specific, concrete reasons (preferably with an example) * *Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/176118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Pro's of databases like BigTable, SimpleDB New school datastore paradigms like Google BigTable and Amazon SimpleDB are specifically designed for scalability, among other things. Basically, disallowing joins and denormalization are the ways this is being accomplished. In this topic, however, the consensus seems to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/176131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Java, convert lat/lon to UTM Does anyone know of a way, in Java, to convert an earth surface position from lat, lon to UTM (say in WGS84)? I'm currently looking at Geotools but unfortunately the solution is not obvious. A: The transformation of a coordinate can actually be done in only a few lines of code: Coordina...
{ "language": "en", "url": "https://stackoverflow.com/questions/176137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Swing: Is there a way to differentiate between a user-caused ItemEvent and an application-caused one? I'm working with a combobox in a Swing-based application, and I'm having a hard time figuring out what to do to differentiate between an ItemEvent that is generated from a user event vs one caused by the application...
{ "language": "en", "url": "https://stackoverflow.com/questions/176150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: STL non-copying wrapper around an existing array? Is it possible to create an STL-like container, or even just an STL-style iterator, for an existing array of POD-type elements? For example, suppose I have an array of ints. It would be convenient to be able to call some of the STL functions, such as find_if, count_...
{ "language": "en", "url": "https://stackoverflow.com/questions/176158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: In Delphi 7, can I set up 'Debug' and 'Release' modes? In most modern IDEs, you can have Debug and Release build configurations, and you can quickly switch between them. In Delphi 7, this does not seem to be possible. I have to go to Project Settings and toggle optimization and all the debug information stuff manual...
{ "language": "en", "url": "https://stackoverflow.com/questions/176159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Element-Enhancing Javascript in ASP.NET Master Pages I have run in to a bit of a problem and I have done a bit of digging, but struggling to come up with a conclusive answer/fix. Basically, I have some javascript (created by a 3rd party) that does some whizzbang stuff to page elements to make them look pretty. The c...
{ "language": "en", "url": "https://stackoverflow.com/questions/176171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Writing a reliable, totally-ordered multicast system in Python I have to write a reliable, totally-ordered multicast system from scratch in Python. I can't use any external libraries. I'm allowed to use a central sequencer. There seems to be two immediate approaches: * *write an efficient system, attaching a uni...
{ "language": "en", "url": "https://stackoverflow.com/questions/176179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Javascript tabs showing two different sets of information with same core variable types So basically, I have two tabs which contain regular and special e-mails. In order to get e-mails, you have to click on a calendar date and AJAX will then query the database for the regular e-mails and special e-mails. There is a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/176192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should I sanitize HTML markup for a hosted CMS? I am looking at starting a hosted CMS-like service for customers. As it would, it would require the customer to input text which would be served up to anyone that comes to visit their site. I am planning on using Markdown, possibly in combination with WMD (the live mar...
{ "language": "en", "url": "https://stackoverflow.com/questions/176195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is ¿ displayed different in Windows vs Linux even when using UTF-8? Why is the following displayed different in Linux vs Windows? System.out.println(new String("¿".getBytes("UTF-8"), "UTF-8")); in Windows: ¿ in Linux: ¿ A: Not sure where the problem is exactly, but it's worth noting that ¿ ( 0xc2,0xbf) is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/176196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Building a full text search engine: where to start I want to write a web application using Google App Engine (so the reference language would be Python). My application needs a simple search engine, so the users would be able to find data specifying keywords. For example, if I have one table with those rows: 1 Offi...
{ "language": "en", "url": "https://stackoverflow.com/questions/176213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Are there any recent Lua to JavaScript converters or interpreters somewhere? I need to find a good Lua to JavaScript converter; lua2js on luaforge.org is out of date (3 or so years old and looks like it doesn't work on Lua 5.1) and I haven't yet found anything on Google. Does anyone have any experience with any othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/176235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Suppressing warnings for JDK1.4 project Is it possible to suppress warnings in Eclipse for JDK1.4 project? EDIT: Longer version. There is a project which requires JDK1.4 (no annotations). Only way of suppressing warnings I know is using annotation @SuppressWarnings - no can do in JDK1.4. Is there any way to remove s...
{ "language": "en", "url": "https://stackoverflow.com/questions/176236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Profile debug or release build? I need to do some memory profiling of a .NET Framework application. Should I use a debug or a release build? A: A release build, built with debug symbols. That way there's no debug build overhead (like extra memory added after arrays for overrun detection), but you still have the n...
{ "language": "en", "url": "https://stackoverflow.com/questions/176253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Favorite Web Form Validation Technique What is everyone's favorite way to sanitize user data? I've been using Javascript, but have recently required something more secure (people can turn it off, after all), so I was looking at Flex, but thought I'd ask the community what they thought. A: NEVER NEVER NEVER use java...
{ "language": "en", "url": "https://stackoverflow.com/questions/176255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the difference between a URI, a URL, and a URN? What is the difference between a URL, a URI, and a URN? A: I was wondering about the same thing and I've found this: http://docs.kohanaphp.com/helpers/url. You can see a clear example using the url::current() method. If you have this URL: http://example.com/ko...
{ "language": "en", "url": "https://stackoverflow.com/questions/176264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4881" }
Q: Why should I both Unit test AND Web test (instead of just web test)? My current position is this: if I thoroughly test my ASP.NET applications using web tests (in my case via the VS.NET'08 test tools and WatiN, maybe) with code coverage and a broad spectrum of data, I should have no need to write individual unit tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/176267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Creating a virtual machine image as a continuous integration artifact? I'm currently working on a server-side product which is a bit complex to deploy on a new server, which makes it an ideal candidate for testing out in a VM. We are already using Hudson as our CI system, and I would really like to be able to deplo...
{ "language": "en", "url": "https://stackoverflow.com/questions/176273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you strip out the domain name from a URL in php? Im looking for a method (or function) to strip out the domain.ext part of any URL thats fed into the function. The domain extension can be anything (.com, .co.uk, .nl, .whatever), and the URL thats fed into it can be anything from http://www.domain.com to www.d...
{ "language": "en", "url": "https://stackoverflow.com/questions/176284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: How do I open an Access database (and wait for it to close before proceeding) in a batch file? I've tried these, and they did not work (Access opens, but it does not wait: start "C:\program files\Microsoft Office\Office\MSACCESS.EXE" filename.mdb start /WAIT "C:\program files\Microsoft Office\Office\MSACCESS.EXE" f...
{ "language": "en", "url": "https://stackoverflow.com/questions/176295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Forcing file deletion on Windows from Java Is there a programatic way from java to force a file deletion on windows even if the file is locked by some process? I cannot kill the process that locks the file. A: you can go through JNI. But the whole point of locking was NOT to allow for deletion from another process....
{ "language": "en", "url": "https://stackoverflow.com/questions/176302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Compare tools to generate update script for SQL server I would like to make the update of the web application as automated as possible. I'm looking for a tool that can compare two instances of a database and generate an update script for me. As part of the build process create a instance of the last version of the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/176316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Way to get the SearchPath API to not look in c:\windows? Is there a way to get the SearchPath API to not search in c:\windows when using the default search path (passing NULL as the first param)? I can't modify the caller to send in a specific path. I have a system with an application ini file in c:\windows (which I...
{ "language": "en", "url": "https://stackoverflow.com/questions/176318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use the TRUNCATE sentence avoiding MySql to write it into the binlog? It seems MySQL does not support the flag "NO_ WRITE_ TO_ BINLOG" for TRUNCATE. So I have to wait until delay is 0, then stop the replication, make the TRUNCATE of the table/s, reset the master, and then start replication again. Really pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/176319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where can I find a good tutorial for py2exe? Can somebody point me at a good tutorial for py2exe? I've read over the official tutorial but it is rather light on details, compared to all the options one can use when building an executable out of a python script. For the record, my python script uses Python 2.5.2, w...
{ "language": "en", "url": "https://stackoverflow.com/questions/176322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Shared memory access permissions on Windows I've developed a windows application that uses shared memory---that is---memory mapped files for interprocess communication. I have a windows service that does some processing and periodically writes data to the memory mapped file. I have a separate windows application t...
{ "language": "en", "url": "https://stackoverflow.com/questions/176331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }