text
stringlengths
8
267k
meta
dict
Q: How do I do a Date comparison in Javascript? I would like to compare two dates in javascript. I have been doing some research, but all I can find is how to return the current date. I want to compare 2 separate dates, not related to today. How do I do that. var startDate = Date(document.form1.Textbox2); A: You ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Do you use any of the features in the various Visual Studio 2008 Team editions? We're contemplating Visual Studio licensing and need to decide whether licenses for Architecture/Database/Test editions are necessary. Does anyone have enough experience with these tools to say whether they are useful? I'd love some sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/338464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a tutorial on C++ programming in Visual Studio 2008? Can anyone link me to a decent c++ tutorial that's actually currently in date? Almost everything I find applies to 2005 and the code examples are riddled with errors which won't run in my 2008 version of the visual compiler. A: The book Accelerated C++ i...
{ "language": "en", "url": "https://stackoverflow.com/questions/338467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is version control about deployment history or development history? ... say I check out some code, do a little dev or refactoring or whatever .. do I only check it back in when I'm completely happy? ... what if I change my mind about stuff while i'm coding? can I go back to a previous local version? is there a hist...
{ "language": "en", "url": "https://stackoverflow.com/questions/338469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: selectedIndex is lost during postbacks - ASP.NET I have a list box control: <asp:ListBox runat="server" id="lbox" autoPostBack="true" /> The code behind resembles: private void Page_Load(object sender, System.EventArgs e) { lbox.SelectedIndexChanged+=new EventHandler(lbox_SelectedIndexChanged); if(!Pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/338472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can You Determine Timezone from Request Variables? Is there a way to do your timezone offsets on the server side, by reading something in the request over http, instead of sending everything to the client and letting it deal with it? A: This is more complicated but I've had to resort to this scenario before because...
{ "language": "en", "url": "https://stackoverflow.com/questions/338482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Change displayed flash file by clicking a button I'm on Windows Vista and IE7. Here's what I'd like to do: * *I have two flash files: page1.swf and page2.swf. They are just page from a magazine. *Display page1.swf *Have a button that says "Change page" *When I click the button; display page2.swf instead of pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/338483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Making an Asynchronous WebService Call From ASP.Net MVC I would (as the question states) like to make an asynchronous call, preferably using ASP.net AJAX. The code for the WebMethod looks like this: [WebMethod] public void SendMail(string name, string email, string subject, string body) { MailMessage toSend = new ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When will C++0x be released? Possible Duplicates: C++0X when? When will C++0x be finished? When will C++0x be released? Anyone here know anything? A: The deadline is 2009. A: As stated on http://en.wikipedia.org/wiki/C%2B%2B0x : The ISO/IEC JTC1/SC22/WG21 C++ Standards Committee aims to introduce the new st...
{ "language": "en", "url": "https://stackoverflow.com/questions/338509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Mod Rewrite rule to Zeus Server rule (Codeigniter) I'm about to go live with a Codeigniter powered site. I want to remove index.php from the url so that instead of this: http://www.mysite.com/index.php/controller I get something like this: http://www.mysite.com/controller So far, pretty straightforward. In the pas...
{ "language": "en", "url": "https://stackoverflow.com/questions/338511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Delay a Shoutcast stream by 12 hours (Linux/bash) I am living on the other side of the world from my home (GMT+1 now, GMT+13 is home), and I miss my old terrestrial radio station. It has a Shoutcast stream, and I would like to simply delay it by 12 hours so that it is always available when I want to listen to it, in...
{ "language": "en", "url": "https://stackoverflow.com/questions/338516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I use the equals() method in a JSP? In my JSP I need to test two objects using the equals() method. Is there a way to do this using EL, JSTL, or another tag library? I am not allowed to use scriptlets due to team rules. I tried to use the JSTL <c:if> tag, but it only seems to use the == operator. A: The JS...
{ "language": "en", "url": "https://stackoverflow.com/questions/338518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: GetLocalValueEnumerator() Not Returning All Properties I am trying to perform validation in my WPF application using the solution in Detecting WPF Validation Errors. public static bool IsValid(DependencyObject parent) { // Validate all the bindings on the parent bool valid = true; LocalValueEnume...
{ "language": "en", "url": "https://stackoverflow.com/questions/338522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is SQL Server/Windows integrated security good for anything? The distinctions among Windows user permissions and any set of SQL Server GRANTs seem like unrelated concepts. As often as not, it seems to actually be implemented with pseudo-logins for database roles; but that doesn't map usefully back to Windows permiss...
{ "language": "en", "url": "https://stackoverflow.com/questions/338535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to consolidate config files in asp.net solution? I have several projects and a website in a large asp.net solution. In some of projects I have an app.config file and in the website I have my web.config. In each config I specify several things that are common amongst them, such as connection strings. Is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can an array be specified in an ini file to be parsed using Zend_Config_Ini Is there a way to specify a one dimensional array in a ini file. so in my ini I would like to do someproperty = [array of something] I am using Zend_Config_Ini config adapter (I prefer ini for base configuration). A: Although undocumented...
{ "language": "en", "url": "https://stackoverflow.com/questions/338537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: What is special about HashSet in .NET 3.5? Here's an interesting puzzle. I downloaded Snippet Compiler to try some stuff out, and wanted to write the following code: using System; using System.Collections.Generic; public class MyClass { public static void RunSnippet() { HashSet<int> h = new HashSet<...
{ "language": "en", "url": "https://stackoverflow.com/questions/338540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Displaying available strongly typed resource classes in Property Window I'm extending the Gridview Web Control as my first attempt at creating a custom control. As part of the extension I am encapsulating the localization of the grid column headers within the control. Among others, I'm exposing a couple of propertie...
{ "language": "en", "url": "https://stackoverflow.com/questions/338541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to Set the type of the Identity & Principle objects in WPF & WinForms In ASP.Net when you're using Master Pages, you can provide the page a "MasterPage Type" pre-processor command along these lines: <%@ MasterType VirtualPath="~/MasterPage.master" %> This is used to provide you access to methods and properties ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Building Gnuarm toolchain from source I want to build a toolchain from gnuarm.org from sources. I don't want to use binary version because i'm running x64 linux. Can you point me to some kind of tutorial? A: Here are the default commands/parameters used to build the binary packages. Download the sources, unpack and...
{ "language": "en", "url": "https://stackoverflow.com/questions/338559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to bootstrap NAnt environment from an existing solution (.sln) I have a Visual Studio 2005 solution (.sln) with a mix of .NET and C++ projects. What is the best way to generate the .build file I will need to run my build process with NAnt. I'm new to using NAnt, and I'm not sure how to set it up. Will I have to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338561", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Safari & Javascript - Same Origin policy? I have a Javascript that changes the host in links to match the current development/test server. Here's an example: var ndomain = document.domain; var mydomain = 'www.foo.com'; var alink = document.getElementsByTagName('a'); for (var i = 0; i < alink.length; i++) { if (a...
{ "language": "en", "url": "https://stackoverflow.com/questions/338563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting an asp:ButtonField to an asp:TemplateField in a GridView Control I currently have a gridview that has an asp:ButtonField as one of the columns. The event handler for the command extracts the row id of the gridview from the command argument and uses that to perform some logic. I now need to switch to using...
{ "language": "en", "url": "https://stackoverflow.com/questions/338567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any tutorials on public key encryption in java? I've been able find information on symmetric encryption and hashing but I've been having quite a bit of trouble finding much information on any sort of public key encryption for java. What I'd like to do is make a very simple proof of concept program that takes a strin...
{ "language": "en", "url": "https://stackoverflow.com/questions/338578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: What is commonly used for Encryption over simple Socket Communications I have X interfaces to Y computers that communicate over a public network (Think colleges and libraries). I am researching common industry standard techniques for encrypting the data that goes between us. I know there is SSL, but I'd rather find ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Crystal Reports - Horizontal page numbering Using Crystal Reports Developer XI I have a crosstab report. The crosstab can span many pages horizontally. For a report 10 pages wide and 3 pages long, I display page numbers as '1-1 of 3' through '3-10 of 3' but I'd like to be able to display them as '1 of 30' through '3...
{ "language": "en", "url": "https://stackoverflow.com/questions/338583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: NSString's initWithData:encoding: return type issue I have a couple of lines of trivial code such as the following: NSData *dataReply; NSString *stringReply; dataReply = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; stringReply = [[NSString alloc] initWithData:dataReply e...
{ "language": "en", "url": "https://stackoverflow.com/questions/338598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you run Trac on a public server? Since the TFS is too big for our project, we want to use subversion and Trac. The hosting environment is Windows 2003 and IIS. There are some options: * *Run tracd *Run Apache with mod_python *Run tracd with AJP Protocol and the isapi-redirector We tend to integrate Tra...
{ "language": "en", "url": "https://stackoverflow.com/questions/338601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Binding int64 (SQL_BIGINT) as query parameter causes error during execution in Oracle 10g ODBC I've got an insert into a table using ODBC 3.0 on Oracle 10g that is failing and I have no idea why. The database is on Windows Server 2003. The client is on Windows XP. The table: CREATE TABLE test ( testcol NUMBER(20,0)...
{ "language": "en", "url": "https://stackoverflow.com/questions/338609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: with just a plain html and js file, how can i force a link to an mp3 to download instead of just play? i have a link to a media file such as an mp3, and i want it to get downloaded when the user clicks on it, instead of just having the file get played. the page i have in mind is just a plain static html page. any i...
{ "language": "en", "url": "https://stackoverflow.com/questions/338616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Ftp transfer the rsync-way I'm downloading a logfile quite often from a ftp-server (which I'm not in control over, btw), and it seems rather rediciolus to download the whole file every time. So I'm looking for a program (linux-ish) or Perl module that in a way combines ftp and rsync, and only "updates" the file. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/338621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Why doesn't IIS support chunked transfer encoding? I am making an HTTP connection to an IIS web server and sending a POST request with the data encoded using Transfer-Encoding: chunked. When I do this, IIS simply closes the connection, with no error message or status code. According to the HTTP 1.1 spec, All HTTP/1...
{ "language": "en", "url": "https://stackoverflow.com/questions/338624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Flex profiling - what is [enterFrameEvent] doing? I've been tasked with finding (and potentially fixing) some serious performance problems with a Flex application that was delivered to us. The application will consistently take up 50 to 100% of the CPU at times when it is simply idling and shouldn't be doing anythi...
{ "language": "en", "url": "https://stackoverflow.com/questions/338626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What's the simplest way to override a Delphi property's default value? I'm trying to write a TCustomDBGrid descendant that's designed to feel like a TListBox. One of the things I want to change is the Options property's defaults. TCustomDBGrid defines Options as: property Options: TDBGridOptions read FOptions writ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I get Xcode to replicate project group structure in the folder structure on disk? I have an Xcode project with the following group structure: ProjectName/ Classes/ class1.h class1.m class2.h class2.m ... XMLDocs/ doc1.xml doc2.xml ... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Can you install an ActiveX control in IE without having administrator privileges? I'm working on a web app that needs an ActiveX control to function. It installs just fine when the user has admin privileges, but fails to load otherwise. Is this by design and if so, is this documented somewhere? (preferably MSDN) A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/338657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you round a .NET TimeSpan object? Can you round a .NET TimeSpan object? I have a Timespan value of: 00:00:00.6193789 Is there a simple way to keep it a TimeSpan object but round it to something like 00:00:00.62? A: Given some of the comments about rounding to seconds, I thought rounding to any TimeSpan would b...
{ "language": "en", "url": "https://stackoverflow.com/questions/338658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How to search for a person's name in a text? (heuristic) I have a huge list of person's full names that I must search in a huge text. Only part of the name may appear in the text. And it is possible to be misspelled, misstyped or abreviated. The text has no tokens, so I don't know where a person name starts in the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/338661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to "dock" a Silverlight control Is there any way to "dock" a Silverlight control to the browser window? For example, I'd like to have an HTML header at the top of a page and then have the Silverlight control take up precisely the rest of the window, neatly resizing whenever the window is resized. The default pag...
{ "language": "en", "url": "https://stackoverflow.com/questions/338665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there an upside down caret character? I have to maintain a large number of classic ASP pages, many of which have tabular data with no sort capabilities at all. Whatever order the original developer used in the database query is what you're stuck with. I want to to tack on some basic sorting to a bunch of these pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/338667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "323" }
Q: Will ASP.Net remove individual tables from a cached dataset to free up memory? I have a strange, sporadic issue. I have stored procedure that returns back 5 small tables (e.g. IDs and Text Descriptions for Status drop down lists and such). The code calls this and places the returning dataset into ASP.Net cache. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338673", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flash and CORBA How do I get AS3 and/or Flex/AIR applications to communicate with CORBA apps? A: Until somebody writes a CORBA-compliant library for Flex (which you may care to do yourself ;), your best bet may be to build a 'wrapper' web service (accessible via the standard Flex WebService object) that acts as a b...
{ "language": "en", "url": "https://stackoverflow.com/questions/338679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: TSQL: No value instead of Null Due to a weird request, I can't put null in a database if there is no value. I'm wondering what can I put in the store procedure for nothing instead of null. For example: insert into blah (blah1) values (null) Is there something like nothing or empty for "blah1" instead using null? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to call a client side javascript function after a specific UpdatePanel has been loaded How is it possible to call a client side javascript method after a specific update panel has been loaded? Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler) does not work for me because this will f...
{ "language": "en", "url": "https://stackoverflow.com/questions/338702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: What is your method of "folksonomy" tagging for files on your local machine? Way back in the days when "delicious" was just "del.icio.us", I had assumed that everyone had finally caught on that Ontology is overrated. So why am I still having to roll my own tagging system using sqlite and a bunch of ruby scripts in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: In C# would it be better to use Queue.Synchronized or lock() for thread safety? I have a Queue object that I need to ensure is thread-safe. Would it be better to use a lock object like this: lock(myLockObject) { //do stuff with the queue } Or is it recommended to use Queue.Synchronized like this: Queue.Synchronized...
{ "language": "en", "url": "https://stackoverflow.com/questions/338712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Can I write to the end of a 5GB file in Java? Can I write to the end of a 5GB file in Java? This question came up in my office and no one is sure what the answer is. A: Yes. Take a look at this link RandomAccessFile http://java.sun.com/javase/6/docs/api/java/io/RandomAccessFile.html#seek(long) That is , you open t...
{ "language": "en", "url": "https://stackoverflow.com/questions/338719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Bazaar (bzr) integration with Visual Studio What's the best way to use Bazaar (bzr) as the version control system in Visual Studio 2008? A: The best I found is TortoiseBZR and the command-line - nothing integrated with VS. A: I wouldn't even bother with TortoiseBZR; bzr is very easy to use from the command line. B...
{ "language": "en", "url": "https://stackoverflow.com/questions/338723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I determine at runtime whether the style applied to an object is the default style? I want to be able to apply a style at runtime to an object ONLY if the current style is the default style. I don't want to override any user defined styles. Anyone know how to do this? A: It appears you can do it this way: De...
{ "language": "en", "url": "https://stackoverflow.com/questions/338732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone proper usage of Application Delegate I'm looking to be able to reference certain state/objects through anywhere in my application. For instance, a user logs in to their application, I need to call a web service and retrieve the users information. Then I want to be able to access this information from anywhere...
{ "language": "en", "url": "https://stackoverflow.com/questions/338734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Inverse of SQL LIKE '%value%' I have a MySQL table containing domain names: +----+---------------+ | id | domain | +----+---------------+ | 1 | amazon.com | | 2 | google.com | | 3 | microsoft.com | | | ... | +----+---------------+ I'd like to be able to search through this table for a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/338739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I find the type of the object instance of the caller of the current function? Currently I have the function CreateLog() for creating a a log4net Log with name after the constructing instance's class. Typically used as in: class MessageReceiver { protected ILog Log = Util.CreateLog(); ... } If we r...
{ "language": "en", "url": "https://stackoverflow.com/questions/338740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I insert a DOM element in an ordered list (in Dojo)? I'm trying to make an AJAXy submission and have the resulting partial be inserted into my list at the proper place. I can think of a few options, but none is terribly good: Option 1: Return JSON, do rendering in Javascript. That seems like the wrong place...
{ "language": "en", "url": "https://stackoverflow.com/questions/338748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to Deal With Fear of Custom Dev I'm dealing with an issue with my current employer that has seriously made me consider seeking employment elsewhere. They are under the impression that 100% of custom development should be eliminated and replaced with COTS products, such as SharePoint. While I realize that this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do you calculate the angle between two normals in glsl? How do you calculate the angle between two normals in glsl? I am trying to add the fresnel effect to the outer edges of an object (combining that effect with phong shading), and I think that the angle is the only thing I am missing. Fragment Shader: varying...
{ "language": "en", "url": "https://stackoverflow.com/questions/338762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Style a WPF's ListView Header's hover color Anyone know how to style the header hover color of a WPF ListView? Thanks! A: You have to create a style for the GridView.ColumnHeaderContainerStyle property. Add the hover effect by setting some trigger to the Style. For example: <ListView VerticalAlignment="Bottom" Hei...
{ "language": "en", "url": "https://stackoverflow.com/questions/338763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: ServiceController.Start(string[]) I'm trying to start a service that has a argument that specifies a port number. For example, using the DOS net I would do the following: net start "SERVICENAME" /"ARGUMENT" How would I do the same in C# using Service.Controller.Start()? A: This should work: var sc = new ServiceCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/338766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tool to convert python indentation from spaces to tabs? I have a some .py files that use spaces for indentation, and I'd like to convert them to tabs. I could easily hack together something using regexes, but I can think of several edge cases where this approach could fail. Is there a tool that does this by parsing...
{ "language": "en", "url": "https://stackoverflow.com/questions/338767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Python error "ImportError: No module named" Python is installed in a local directory. My directory tree looks like this: (local directory)/site-packages/toolkit/interface.py My code is in here: (local directory)/site-packages/toolkit/examples/mountain.py To run the example, I write python mountain.py, and in the...
{ "language": "en", "url": "https://stackoverflow.com/questions/338768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "602" }
Q: Simple Variables in Java & C++ I saw this sentence in some matrials: "In Java, simple data types such as int and char operate just as in C." I am wondering that actually they are different in Java & C++? In C++, simple variables like the primitives in Java are assigned a memory address as well, so these primitive ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/338772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Creating a SQL table from a xls (Excel) file I'm trying to convert an Excel document into a table in SQL 2005. I found the link below and am wondering if it looks like a solution. If so, what would the @excel_full_file_name syntax be and where would the path be relative to? http://www.siccolo.com/Articles/SQLScri...
{ "language": "en", "url": "https://stackoverflow.com/questions/338776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Shared localization for asp.net, javascript and silverlight? How do you localize ASP.NET + javascript + Silverlight? I would like to be able to include the same texts in different languages in asp.net pages, javascript on the page, and Silverlight objects on the page. I have tried with the following method, but have...
{ "language": "en", "url": "https://stackoverflow.com/questions/338777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to insert a null value with Qt? Tip me plase, how to insert a null value into table using Trolltech Qt 4.x SQL classes? QSqlQuery, I guess, or something else from QtNetwork. As analog of it, in .NET there is the System.DbNull class, which represents sql NULL. And what type should I use for some object's property...
{ "language": "en", "url": "https://stackoverflow.com/questions/338809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Logging frameworks for embedded linux? I need a small, portable framework for logging on embedded linux. Ideally it would output to a file or a socket, and having some sort of log rotation/compression would also be nice. So far, I've found a lot of frameworks, but almost all of them have daunting build procedures o...
{ "language": "en", "url": "https://stackoverflow.com/questions/338813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Should controllers in an ASP.NET MVC web app call repositories, services, or both? The controllers in my ASP.NET MVC web app are starting to get a bit bloated with business logic. The examples on the web all show simple controller actions that simply pull data out of a repository and pass it to the view. But what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: ASP.NET: Setting the Style of an HTML element Programatically I'm generating a menu with a Repeater control bound to an XmlDataSource. <asp:Repeater ID="myRepeater" runat="server" DataSourceID="myDataSource" onitemdatabound="myRepeater_ItemDataBound" onitemcreated="myRepeater_ItemCreated"> <Head...
{ "language": "en", "url": "https://stackoverflow.com/questions/338817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Are subversion externals an antipattern? Subversion lets you embed working copies of other repositories using externals, allowing easy version control of third-party library software in your project. While these seem ideal for the reuse of libraries and version control of vendor software, they aren't without their c...
{ "language": "en", "url": "https://stackoverflow.com/questions/338824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Is there an event in compact framework that fires on suspend and resume? Or do I have to pinvoke native code? I don't want the power status...well I do, but I don't want to poll it all the time and would rather have an event fire. A: No there is not. Generally an application is completely unaware of the power st...
{ "language": "en", "url": "https://stackoverflow.com/questions/338833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Wrapping GridView text without a visible space I have a GridView with several fields, one of which can potentially have a crazy wide value in it like this: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa If that sort of thing is in the field, I want it to wrap. I can easil...
{ "language": "en", "url": "https://stackoverflow.com/questions/338836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: nvarchar(256)....? Why does nvarchar(256) seem to the be the standard for user names in SQL Server? Any system functions that return a user name return nvarchar(256), the ASP Membership provider uses nvarchar(256) 256 seems like an odd number (yes, I know its even...) - 255 I could understand (1 byte address) but 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/338853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Mysql "magic" catch all column for select statement Is there a way that I can do a select as such select * from attributes where product_id = 500 would return id name description 1 wheel round and black 2 horn makes loud noise 3 window solid object you can see through and the query select * fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/338856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: runnable pseudocode? I am attempting to determine prior art for the following idea: 1) user types in some code in a language called (insert_name_here); 2) user chooses a destination language from a list of well-known output candidates (javascript, ruby, perl, python); 3) the processor translates insert_name_here int...
{ "language": "en", "url": "https://stackoverflow.com/questions/338867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to use ODP 11 xcopy deployment and not change the PATH? I have an application that's using Oracle.DataAccess to connect. I've already discovered that the footprint can be lessened by using ODAC 11 with xcopy deployment. That's already a big win. Ideally, though, we would like to not have to alter an...
{ "language": "en", "url": "https://stackoverflow.com/questions/338875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why use hashing to create pathnames for large collections of files? I noticed a number of cases where an application or database stored collections of files/blobs using a has to determine the path and filename. I believe the intended outcome is a situation where the path never gets too deep, or the folders ever get ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Monitor .NET Threads Is there any way to monitor/log thread interactions in the .NET runtime much like VisualVM does for Java? I don't have a specific need at the moment but I think it would be nice to see how all the threads in my application interact. A: I am unfamiliar with VisualVM in Java....but.... If you a...
{ "language": "en", "url": "https://stackoverflow.com/questions/338884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Java Generics: Generic type defined as return type only I'm looking at some GXT code for GWT and I ran across this use of Generics that I can't find another example of in the Java tutorials. The class name is com.extjs.gxt.ui.client.data.BaseModelData if you want to look at all of the code. Here are the important p...
{ "language": "en", "url": "https://stackoverflow.com/questions/338887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: What ever happened to deltree, and what's its replacement? In earlier versions of MS-DOS - I want to say version 7, but I could be wrong - there was a deltree command, which recursively deleted all subdirectories and files from a given path. deltree no longer exists, but del didn't seem to inherit the ability to d...
{ "language": "en", "url": "https://stackoverflow.com/questions/338895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: Simple protocol for remote process startup/shutdown I'm looking for a simple protocol to control remote processes from one managing application. The remote processes will run on Windows and Linux (x86). Is there a simple protocol for managing remote processes, for which I could find daemons that run on both Windows ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Yahoo pipes - any way to combine items? I'm working on a pipe and am having trouble with combining two lists of items. List 1: [0] letter - a [1] letter - b [2] letter - c List 2: [1] word - apple [2] word - banana [3] word - cake I'd like something which emits the following: List 3: [1] letter - a word - appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/338912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How does the tooltip control enhance all controls on the form with a new property? When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does. For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to pass varargs into a method as an expanded list? Given the following Flash method: function sendToJava(name:String, ... args) { ExternalInterface.call("sendCommand", name, args); } How do I ensure that ExternalInterface.call() interprets args in its expanded form? Right now, if I pass a list into "args", th...
{ "language": "en", "url": "https://stackoverflow.com/questions/338927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: PHP, MSSQL2005 and Codepages I have a php script which accesses a MSSQL2005 database, reads some data from it and sends the results in a mail. There are special characters in both some column names and in the fields itself. When I access the script through my browser (webserver iis), the query is executed correctl...
{ "language": "en", "url": "https://stackoverflow.com/questions/338928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How could I add an entry to the right click menu? I'm not really sure how to google this one . I would like to know how would I add an entry to the right click menu in a Windows system . Something like "Open with ..." or "Archive with ... " . I would preffer a solution that works under Windows XP . A: in the regist...
{ "language": "en", "url": "https://stackoverflow.com/questions/338931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Unzipping a file error I am using the SharpZipLib open source .net library from www.icsharpcode.net My goal is to unzip an xml file and read it into a dataset. However I get the following error reading the file into a dataset: "Data at the root level is invalid. Line 1, position 1." I believe what is happening is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/338934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Binding to DataGridView - Is there a way to "bind" the background color of a cell? I am binding a List to a DataGridView. One property of the SomeObject class will be a status code (ex. Red, Yellow, Green). Can I "bind" the status to the background color of a cell easily? How about binding to a tooltip also? A: You...
{ "language": "en", "url": "https://stackoverflow.com/questions/338935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to Create a Listener for WCF ServiceHost events when service is hosted under IIS? I have a WCF service which will be hosted under IIS. Now I have some resources(Connections) that I create within service constructor. I need to free up those resources when IIS which is hosting the service shuts down or resets. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/338940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET wrapper for JIRA api? I'm working on a JIRA implementation and need to make use of the API. Does anyone know of an existing .NET wrapper for the JIRA SOAP API? A: JIRA SOAP API has been deprecated. So use REST API instead. Here is JIRA REST API .NET wrapper: Atlassian.Net SDK A: In a Visual Studio .NET pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/338944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What are some reasons I might be receiving this "Symbol not defined" error in Visual Studio 2005 (screenshot included) When debugging my VS2005 project, I get the following error when I attempt to step into the function that returns the vScenarioDescriptions local variable it's struggling with... image no longer ava...
{ "language": "en", "url": "https://stackoverflow.com/questions/338945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the Managed C++ equivalent to the C# using statement How would one code the following C# code in Managed C++ void Foo() { using (SqlConnection con = new SqlConnection("connectionStringGoesHere")) { //do stuff } } Clarificaton: For managed objects. A: Assuming you mean C++/CLI (not the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/338950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Output to command-line if started from command line I'm writing an application that can be started either as a standard WinForms app or in unattended mode from the command-line. The application was built using the VS 2k5 standard WinForms template. When the application is executed from the command-line, I want it to...
{ "language": "en", "url": "https://stackoverflow.com/questions/338951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: MySQL (InnoDB): need to delete column, and accompanying foreign key constraint and index Here's my table: CREATE TABLE `alums_alumphoto` ( `id` int(11) NOT NULL auto_increment, `alum_id` int(11) NOT NULL, `photo_id` int(11) default NULL, `media_id` int(11) default NULL, `updated` datetime NOT N...
{ "language": "en", "url": "https://stackoverflow.com/questions/338978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Using mod_rewrite in .htaccess in both website root and a subdirectory My dilema: In .htaccess in my website's root: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] In .htaccess in the subdirectory /foo RewriteEngine On RewriteRule ^page1\.ht...
{ "language": "en", "url": "https://stackoverflow.com/questions/338981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ To Entities and Lazy Loading In a controversial blog post today, Hackification pontificates on what appears to be a bug in the new LINQ To Entities framework: Suppose I search for a customer: var alice = data.Customers.First( c => c.Name == "Alice" ); Fine, that works nicely. Now let’s see if I can find on...
{ "language": "en", "url": "https://stackoverflow.com/questions/338986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Flash/AS3; get/set absolute position of MovieClip? How do you get/set the absolute position of a MovieClip in Flash/AS3? And by absolute, I mean its position relative to the stage's origo. I currently have this setter: class MyMovieClip extends MovieClip { function set xAbs(var x:Number):void { this.x = -(th...
{ "language": "en", "url": "https://stackoverflow.com/questions/338988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java - encrypt / decrypt user name and password from a configuration file We are busy developing a Java web service for a client. There are two possible choices: * *Store the encrypted user name / password on the web service client. Read from a config. file on the client side, decrypt and send. *Store the encryp...
{ "language": "en", "url": "https://stackoverflow.com/questions/339004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: ASP.NET MVP - Utilizing User Controls I'm writing my first app with ASP.NET MVP (attempting Supervisory Controller) and Unit Testing (better late than never!), and I've run into a bit of a dilemma. I've written 3 User Controls, all tested and Interfaced up, Presenters in tow. Now I have come to a Page which takes ...
{ "language": "en", "url": "https://stackoverflow.com/questions/339005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I pad a string with zeroes? How do I pad a numeric string with zeroes to the left, so that the string has a specific length? A: >>> '99'.zfill(5) '00099' >>> '99'.rjust(5,'0') '00099' if you want the opposite: >>> '99'.ljust(5,'0') '99000' A: For zip codes saved as integers: >>> a = 6340 >>> b = 90210 >>>...
{ "language": "en", "url": "https://stackoverflow.com/questions/339007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2037" }
Q: Best way to handle user authentication across website and gem client We are working on a service that will have website access for stats and other tasks, but the majority of use will be through a client gem and rake tasks. What is the best way to handle authentication for both pieces. It looks like fiveruns_tuneup, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/339018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Add appointment to calendar through Exchange programatically How can I add an item to a users calendar programatically through the Exchange 2003 Information Store. I need to know the interface or connector to research. I have full Exchange rights and want to be able to automate assigning appointments without the en...
{ "language": "en", "url": "https://stackoverflow.com/questions/339027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extract RSS/ATOM URLs from HTML LINK tags What is the best way to extract RSS/ATOM URLs from HTML LINK tags? I know regex is not the best way to do this, so I'm wondering what alternatives I have. Surely some kind of horrible string munging using .Contains after loading the HTML into a string is not optimal either. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/339035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }