text
stringlengths
8
267k
meta
dict
Q: Datagridview virtual model combobox how can you dynamically add items to a combobox using the datagridview virtual mode? A: Well, I assume you are working with a very large set of data, and thus are using virtual mode to implement your own data binding. If that is the case here is a link that demonstrates the proce...
{ "language": "en", "url": "https://stackoverflow.com/questions/111785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would you format multiple properties when using Property Initialization? (.Net) For example: root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 }); or: root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 }); A: I've don...
{ "language": "en", "url": "https://stackoverflow.com/questions/111792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best practice for naming convention of UI controls for referencing in code-behind? What is the best practice for naming UI controls (textboxes, drop-downs, etc.) on forms and reports for reference in the code-behind pages? I develop a lot of reports and forms in my office. I have several web applications providing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/111812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the best way to improve ASP.NET/C# compilation speed? UPDATE: Focus your answers on hardware solutions please. What hardware/tools/add-in are you using to improve ASP.NET compilation and first execution speed? We are looking at solid state hard drives to speed things up, but the prices are really high righ...
{ "language": "en", "url": "https://stackoverflow.com/questions/111814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the easiest way to upgrade a large C# winforms app to WPF I work on a large C# application (approximately 450,000 lines of code), we constantly have problems with desktop heap and GDI handle leaks. WPF solves these issues, but I don't know what is the best way to upgrade (I expect this is going to take a lon...
{ "language": "en", "url": "https://stackoverflow.com/questions/111817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Free open source asp.net file managers? Any good ones? So far I have found IZWebFileManager, OXFileManager and AWS File Picker. The file manager should be able to delete, copy, rename, download & upload files. A: You have WebFileManager created by our very own Jeff Atwood A: (shameless plug) The question is old, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/111851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Tools to work with stored procedures in Oracle, in a team? What tools do you use to develop Oracle stored procedures, in a team : * *To automatically "lock" the current procedure you are working with, so nobody else in the team can make changes to it until you are finished. *To automatically send the changes you...
{ "language": "en", "url": "https://stackoverflow.com/questions/111852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: GWT-EXT - What is the best way to widgets to a specific ContentPanel after an event? first post don't hurt me :) I am using a BorderLayout with the usual North, West, Center, South Panels. On the West ContentPanel, I've got a Tree. If an event (OnClick)occurs I want a particular dialog box displayed on the Center Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/111854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to remove from NSMutableArray while iterating? In Cocoa, if I want to loop through an NSMutableArray and remove multiple objects that fit a certain criteria, what's the best way to do this without restarting the loop each time I remove an object? Thanks, Edit: Just to clarify - I was looking for the best wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/111866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "198" }
Q: What is your latest useful Perl one-liner (or a pipe involving Perl)? The one-liner should: * *solve a real-world problem *not be extensively cryptic (should be easy to understand and reproduce) *be worth the time it takes to write it (should not be too clever) I'm looking for practical tips and tricks (compl...
{ "language": "en", "url": "https://stackoverflow.com/questions/111868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: source control with VB2005 Express Can anyone suggest a good source control system that interfaces with VB2005 Express? As the Express editions of Visual Studio do not allow add-ins does this mean that I will not be able to integrate source control into the IDE? I'm used to the check-in/check-out process of SourceSa...
{ "language": "en", "url": "https://stackoverflow.com/questions/111910", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to access the HttpServerUtility.MapPath method in a Thread or Timer? I use a System.Timers.Timer in my Asp.Net application and I need to use the HttpServerUtility.MapPath method which seems to be only available via HttpContext.Current.Server.MapPath. The problem is that HttpContext.Current is null when the Timer...
{ "language": "en", "url": "https://stackoverflow.com/questions/111927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: Is there a printf converter to print in binary format? I can print with printf as a hex or octal number. Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" printf("%b\n", 10); // prints "%b\n" A: There isn't a binary conversion spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/111928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "556" }
Q: Why shouldn't I use "Hungarian Notation"? I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/111933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "122" }
Q: How do I find out the size of a Canvas text object in tkinter? I want to create some text in a canvas: myText = self.canvas.create_text(5, 5, anchor=NW, text="TEST") Now how do I find the width and height of myText? A: This method seemed to work well if all you are interested in is the width and height of the can...
{ "language": "en", "url": "https://stackoverflow.com/questions/111934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is there any way to do HTTP PUT in python I need to upload some data to a server using HTTP PUT in python. From my brief reading of the urllib2 docs, it only does HTTP POST. Is there any way to do an HTTP PUT in python? A: You should have a look at the httplib module. It should let you make whatever sort of HTTP r...
{ "language": "en", "url": "https://stackoverflow.com/questions/111945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "227" }
Q: Using Python's ftplib to get a directory listing, portably You can use ftplib for full FTP support in Python. However the preferred way of getting a directory listing is: # File: ftplib-example-1.py import ftplib ftp = ftplib.FTP("www.python.org") ftp.login("anonymous", "ftplib-example-1") data = [] ftp.dir(data...
{ "language": "en", "url": "https://stackoverflow.com/questions/111954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: array.array versus numpy.array If you are creating a 1d array in Python, is there any benefit to using the NumPy package? A: It all depends on what you plan to do with the array. If all you're doing is creating arrays of simple data types and doing I/O, the array module will do just fine. If, on the other hand, you...
{ "language": "en", "url": "https://stackoverflow.com/questions/111983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: What are the cons of a web based application I am going to write a database application for the camp I work for. I am thinking about writing it in C# with a Windows GUI interface but using a browser as the application is seeming more and more appelaing for various reasons. What I am wondering is why someone would no...
{ "language": "en", "url": "https://stackoverflow.com/questions/111985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# class separation into a header and a .cs file Is there a way to separate a C# class into a header that contains the class definition and then an actual .cs file that contains the implementation? I suppose one can do this by creating an interface, but that doesn't seem right. I just want a file where I can just ...
{ "language": "en", "url": "https://stackoverflow.com/questions/111995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to enable inno-db support on MySql 5 installed above MySql 4? How to enable inno-db support on installed instance of MySql? I have installed mysql-5.0.67-win32. 'InnoDB' is 'DISABLED' when executing 'show engines'. According to documentation MySql is compiled with support of inno-db (From doc: A value of DISABLE...
{ "language": "en", "url": "https://stackoverflow.com/questions/112010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Creating a column of RadioButtons in Adobe Flex I'm using the AdvancedDataGrid widget and I want two columns to be radio buttons, where each column is it's own RadioButtonGroup. I thought I had all the necessary mxxml, but I'm running into a strange behavior issue. When I scroll up and down, the button change valu...
{ "language": "en", "url": "https://stackoverflow.com/questions/112036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to deal with pair programming issues? Some members of the team are having problems programming together. Different gender, different culture, different age. How to deal with those problems? - Do not pair them together, or - Pair them together and let them come to a "golden middle" A: How about rotating the...
{ "language": "en", "url": "https://stackoverflow.com/questions/112046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What does %~d0 mean in a Windows batch file? I'm looking at a batch file which defines the following variables: set _SCRIPT_DRIVE=%~d0 set _SCRIPT_PATH=%~p0 * *What do %~d0 or %~p0 actually mean? *Is there a set of well-known values for things like current directory, drive, parameters to a script? *Are there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/112055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "403" }
Q: What is an invariant? The word seems to get used in a number of contexts. The best I can figure is that they mean a variable that can't change. Isn't that what constants/finals (darn you Java!) are for? A: It is a condition you know to always be true at a particular place in your logic and can check for when debugg...
{ "language": "en", "url": "https://stackoverflow.com/questions/112064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "189" }
Q: Is this C++ structure initialization trick safe? Instead of having to remember to initialize a simple 'C' structure, I might derive from it and zero it in the constructor like this: struct MY_STRUCT { int n1; int n2; }; class CMyStruct : public MY_STRUCT { public: CMyStruct() { memset(this, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Background color stretches accross entire width of ul I have a simple list I am using for a horizontal menu: <ul> <h1>Menu</h1> <li> <a href="/" class="selected">Home</a> </li> <li> <a href="/Home">Forum</a> </li> </ul> When I add a background color to the selected class, only the te...
{ "language": "en", "url": "https://stackoverflow.com/questions/112093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Secure Gmail login on web browser from external Java program Is there a secure way of logging into a Gmail account on a web browser, from an external Java program? I know the following works, but is there a safer alternative? Desktop.getDesktop().browse(new URI( "https://www.google.com/accounts/ServiceLoginA...
{ "language": "en", "url": "https://stackoverflow.com/questions/112102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Javascript interpreter to replace Python In terms of quick dynamically typed languages, I'm really starting to like Javascript, as I use it a lot for web projects, especially because it uses the same syntax as Actionscript (flash). It would be an ideal language for shell scripting, making it easier to move code from...
{ "language": "en", "url": "https://stackoverflow.com/questions/112112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Should I prefix my method with "get" or "load" when communicating with a web service? I'm writing a desktop application that communicates with a web service. Would you name all web-service functions that that fetch data LoadXXXX, since they take a while to execute. Or would you use GetXXXX, for instance when getting...
{ "language": "en", "url": "https://stackoverflow.com/questions/112121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How long does it really take to do something? I mean name off a programming project you did and how long it took, please. The boss has never complained but I sometimes feel like things take too long. But this could be because I am impatient as well. Let me know your experiences for comparison. I've also noticed that...
{ "language": "en", "url": "https://stackoverflow.com/questions/112131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Searching for regex patterns on a 30GB XML dataset. Making use of 16gb of memory I currently have a Java SAX parser that is extracting some info from a 30GB XML file. Presently it is: * *reading each XML node *storing it into a string object, *running some regexex on the string *storing the results to the da...
{ "language": "en", "url": "https://stackoverflow.com/questions/112154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: is the + operator less performant than StringBuffer.append() On my team, we usually do string concatentation like this: var url = // some dynamically generated URL var sb = new StringBuffer(); sb.append("<a href='").append(url).append("'>click here</a>"); Obviously the following is much more readable: var url = // ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: How do you maintain your program vocabulary? In a not-so-small program, when you have not-so-few entities, in order to maintain code readability, common terms, and otherwise improve mutual understanding between team members, one have to define and maintain program vocabulary. How do you (or your company) deal with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/112161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I get my Twitter feed to integrate with a blog (with individual comment threads)? I would like to create a blog where my Twitter updates essentially create blog posts, with a comment thread. If there isn't blog software that does this right now (I did some searching but couldn't find the commenting aspect) wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/112162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Google Chrome broke ShellExecute()? For years I've been using ShellExecute() API to launch the default web browser from within my applications. Like this: ShellExecute( hwnd, _T("open"), _T("http://www.winability.com/home/"), NULL, NULL, SW_NORMAL ); It's been working fine until a couple of weeks ago, whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/112169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: php.ini & SMTP= - how do you pass username & password My ISP account requires that I send a username & password for outbound SMTP mail. How do I get PHP to use this when executing php.mail()? The php.ini file only contains entries for the server (SMTP= ) and From: (sendmail_from= ). A: I prefer the PHPMailer tool ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: What is the best way to return multiple tags from a Rails Helper? I want to create a hidden field and create a link in one helper and then output both to my erb. <%= my_cool_helper "something", form %> Should out put the results of link_to "something", a_path form.hidden_field "something".tableize, :value => "somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/112197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Click through transparency for Visual C# Window Forms? I made a panel and set it to fill the screen, now I can see the windows under it but I want it to be click through, meaning they could click a file or see a tool tip of another object through the transparency. RE: This may be too obvious, but have you tried se...
{ "language": "en", "url": "https://stackoverflow.com/questions/112224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Consistently retrieve "From" email addresses across Outlook versions I am working a standalone c# desktop application that sends out documents and then imports them from Outlook when they are sent back. The application picks up the emails from a specified folder processes them and then saves the senders name plus ot...
{ "language": "en", "url": "https://stackoverflow.com/questions/112227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sorting matched arrays in Java Let's say that I have two arrays (in Java), int[] numbers; and int[] colors; Each ith element of numbers corresponds to its ith element in colors. Ex, numbers = {4,2,1} colors = {0x11, 0x24, 0x01}; Means that number 4 is color 0x11, number 2 is 0x24, etc. I want to sort the number...
{ "language": "en", "url": "https://stackoverflow.com/questions/112234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Where can I get a list of what Crystal Reports features conflict? There are certain Crystal Reports features that cannot be combined in the same report, for example SQL command objects and server side grouping. However, as far as I can find, the built-in help doesn't seem to clearly document these conflicts. For exa...
{ "language": "en", "url": "https://stackoverflow.com/questions/112235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Building a web search engine I've always been interested in developing a web search engine. What's a good place to start? I've heard of Lucene, but I'm not a big Java guy. Any other good resources or open source projects? I understand it's a huge under-taking, but that's part of the appeal. I'm not looking to cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/112248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Update VERY LARGE PostgreSQL database table efficiently I have a very large database table in PostgresQL and a column like "copied". Every new row starts uncopied and will later be replicated to another thing by a background programm. There is an partial index on that table "btree(ID) WHERE replicated=0". The backgr...
{ "language": "en", "url": "https://stackoverflow.com/questions/112249", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to auto-focus RTE editor inside firefox? We have a RTE editor based on htmlarea which consists of content with editmode enabled inside an iframe. The question is how to automatically bring the focus into the editor? A: Where the id of the IFRAME is myRTE: var iframe = document.getElementById("myRTE"); if ( ifra...
{ "language": "en", "url": "https://stackoverflow.com/questions/112261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I overlap widgets with the Tkinter pack geometry manager? I want to put a Canvas with an image in my window, and then I want to pack widgets on top of it, so the Canvas acts as a background. Is it possible to have two states for the pack manager: one for one set of widgets and another for another set? A: Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/112263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Directory Modification Monitoring I'm building a C# application that will monitor a specified directory for changes and additions and storing the information in a database. I would like to avoid checking each individual file for modifications, but I'm not sure if I can completely trust the file access time. What wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/112276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best introduction to C++ template metaprogramming? Static metaprogramming (aka "template metaprogramming") is a great C++ technique that allows the execution of programs at compile-time. A light bulb went off in my head as soon as I read this canonical metaprogramming example: #include <iostream> using namespace st...
{ "language": "en", "url": "https://stackoverflow.com/questions/112277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "121" }
Q: SharePoint 2007 performance issues I don't expect a straightforward silver bullet answer to this, but what are the best practices for ensuring good performance for SharePoint 2007 sites? We've a few sites for our intranet, and it generally is thought to run slow. There's plenty of memory and processor power in the s...
{ "language": "en", "url": "https://stackoverflow.com/questions/112318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is static metaprogramming possible in Java? I am a fan of static metaprogramming in C++. I know Java now has generics. Does this mean that static metaprogramming (i.e., compile-time program execution) is possible in Java? If so, can anyone recommend any good resources where one can learn more about it? A: What d...
{ "language": "en", "url": "https://stackoverflow.com/questions/112320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: .NET - Can you over interface, and when shouldn't you interface Is it possible to over interface? when designing an system now, I will start from interfaces and progressively write unit tests along with the interfaces until I have a pattern that works well.. I'll move onto writing some concrete classes and set the u...
{ "language": "en", "url": "https://stackoverflow.com/questions/112372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I remove the passphrase for the SSH key without having to create a new key? I set a passphrase when creating a new SSH key on my laptop. But, as I realise now, this is quite painful when you are trying to commit (Git and SVN) to a remote location over SSH many times in an hour. One way I can think of is, dele...
{ "language": "en", "url": "https://stackoverflow.com/questions/112396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1472" }
Q: How does replication in team foundation server work We have two offices in different states and issues with performance when using integrated source control over the WAN. We were contemplating using replication in TFS to allow both office to have fast and robust connectivity. We need to understand network load, spee...
{ "language": "en", "url": "https://stackoverflow.com/questions/112411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using Visual Studio 2008 to Assemble, Link, Debug, and Execute MASM 6.11 Assembly Code I would like to use Visual Studio 2008 to the greatest extent possible while effectively compiling/linking/building/etc code as if all these build processes were being done by the tools provided with MASM 6.11. The exact version o...
{ "language": "en", "url": "https://stackoverflow.com/questions/112412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Should I use #define, enum or const? In a C++ project I'm working on, I have a flag kind of value which can have four values. Those four flags can be combined. Flags describe the records in database and can be: * *new record *deleted record *modified record *existing record Now, for each record I wish to kee...
{ "language": "en", "url": "https://stackoverflow.com/questions/112433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "129" }
Q: CPU Emulation and locking to a specific clock speed If you had read my other question, you'll know I've spent this weekend putting together a 6502 CPU emulator as a programming exercise. The CPU emulator is mostly complete, and seems to be fairly accurate from my limited testing, however it is running incredibly fas...
{ "language": "en", "url": "https://stackoverflow.com/questions/112439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Javascript error I'm getting a JS error on displaying a page: Nothing concrete is specified but the line where it seems to be thrown. When looking into the source code of the page, I see the error is thrown inside the following script, but I can't understand why! It's only about loading images! <SCRIPT language=...
{ "language": "en", "url": "https://stackoverflow.com/questions/112440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to have one appBase served by multiple context paths in Tomcat? Is it possible to have one appBase served up by multiple context paths in Tomcat? I have an application base that recently replaced a second application base. My problem is a number of users still access the old context. I would like to...
{ "language": "en", "url": "https://stackoverflow.com/questions/112480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the difference between "lang" and "type" attributes in a script tag? For <script> HTML tags, what is the technical difference between lang=Javascript and type=text/javascript? I usually use both, because I've always assumed that older browsers need one or the other. A: Per the HTML 4.01 Spec: type: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/112482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Does anyone know of a widget for a desktop toolkit(GTK, Qt, WX) for displaying a map of US states? I'm specifically looking for one that lets me display a map of US states with each one as it's own "object" in the sense that I can control the color, on click, and on mouseover of each one individually. GTK is my per...
{ "language": "en", "url": "https://stackoverflow.com/questions/112483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I remove objects from an array in Java? Given an array of n Objects, let's say it is an array of strings, and it has the following values: foo[0] = "a"; foo[1] = "cc"; foo[2] = "a"; foo[3] = "dd"; What do I have to do to delete/remove all the strings/objects equal to "a" in the array? A: You can use externa...
{ "language": "en", "url": "https://stackoverflow.com/questions/112503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: Can't attach to w3wp under Vista with UAC turned on I run Vista (business x32) on my work machine, in which I do ASP.NET development. Because I use IIS to server the sites I build (I do a lot of CMS integrations so I need to use IIS not the inbuilt web development server) I always need to attach to w3wp for debuggin...
{ "language": "en", "url": "https://stackoverflow.com/questions/112508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to build interface for such enum I have the following enum: public enum Status implements StringEnum{ ONLINE("on"),OFFLINE("off"); private String status = null; private Status(String status) { this.status = status; } public String toString() { return this.status; } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Calculate text diffs in PHP Are there any libraries (3rd party or built-in) in PHP to calculate text diffs? A: it depends exactly what you mean and what you want to do but there is PEAR Text_Diff - Engine for performing and rendering text diffs A: What sort of diffs? File diffs? There is array_diff() which act...
{ "language": "en", "url": "https://stackoverflow.com/questions/112523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: List all words in a dictionary that start with How would a go about making a program where the user enters a string, and the program generates a list of words beginning with that string? Ex: User: "abd" Program:abdicate, abdomen, abduct... Thanks! Edit: I'm using python, but I assume that this is a fairly languag...
{ "language": "en", "url": "https://stackoverflow.com/questions/112532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL Server Priority Ordering I have a table that contains tasks and I want to give these an explicit ordering based on the priority of the task. The only way I can think to do this is via an unique int column that indexes where the task is in term of the priority (i.e. 1 is top 1000 is low). The problem is that say ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112551", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I use genshi.builder to programmatically build an HTML document? I recently discovered the genshi.builder module. It reminds me of Divmod Nevow's Stan module. How would one use genshi.builder.tag to build an HTML document with a particular doctype? Or is this even a good thing to do? If not, what is the right...
{ "language": "en", "url": "https://stackoverflow.com/questions/112564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C101: the best way to fill an array from user input? I'm having a hard time understanding and therefore managing arrays and indexes manually in C. These are my two classic approaches but they doesn't seem to work as they keep looping when the condition is reached: #include<stdio.h> #define MAX 255 int main(){ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112582", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Select Element in a Namespace with XPath I want to select the topmost element in a document that has a given namespace (prefix). More specifically: I have XML documents that either start with /html/body (in the XHTML namespace) or with one of several elements in a particular namespace. I effectively want to strip ou...
{ "language": "en", "url": "https://stackoverflow.com/questions/112601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What is 'JNI Global reference' I am using jProfiler to find memory leaks in a Java swing application. I have identified instances of a JFrame which keeps growing in count. This frame is opened, and then closed. Using jProfiler, and viewing the Paths to GC Root there is only one reference, 'JNI Global reference'. Wha...
{ "language": "en", "url": "https://stackoverflow.com/questions/112603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Are C++ non-type parameters to (function) templates ordered? I am hosting SpiderMonkey in a current project and would like to have template functions generate some of the simple property get/set methods, eg: template <typename TClassImpl, int32 TClassImpl::*mem> JSBool JS_DLL_CALLBACK WriteProp(JSContext* cx, JSObje...
{ "language": "en", "url": "https://stackoverflow.com/questions/112612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: git instaweb gives 403 Forbidden - No projects found running git instaweb in my repository opens a page that says "403 Forbidden - No projects found". What am I missing? A: looks like the debian install of git sets $projectroot globally in a way that confuses instaweb. I removed the $projectroot line from /etc/gitw...
{ "language": "en", "url": "https://stackoverflow.com/questions/112613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: == vs. Object.Equals(object) in .NET So, when I was a comparative novice to the novice I am right now, I used to think that these two things were syntactic sugar for each other, i.e. that using one over the other was simply a personal preference. Over time, I'm come to find that these two are not the same thing, eve...
{ "language": "en", "url": "https://stackoverflow.com/questions/112625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: How can I dynamically create a selector at runtime with Objective-C? I know how to create a SEL at compile time using @selector(MyMethodName:) but what I want to do is create a selector dynamically from an NSString. Is this even possible? What I can do: SEL selector = @selector(doWork:); [myobj respondsToSelector:se...
{ "language": "en", "url": "https://stackoverflow.com/questions/112643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Comparison of embedded operating systems? I've been involved in embedded operating systems of one flavor or another, and have generally had to work with whatever the legacy system had. Now I have the chance to start from scratch on a new embedded project. The primary constraints on the system are: * *It needs a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Connect to SQL Server from cygwin window times out, from DOS prompt works I can connect to my SQL Server database via sqlcmd from a DOS command window, but not from a Cygwin window. From DOS: F:\Cygnus>sqlcmd -Q "select 'a test'" -S .\SQLEXPRESS a test (1 rows affected) F:\Cygnus> ================================...
{ "language": "en", "url": "https://stackoverflow.com/questions/112664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Restore a SQL Server database from single instance to cluster I need to transfer a database from a SQL Server instance test server to a production environment that is clustered. But SQL Server doesn't allow you to use backup/restore to do it from single instance to cluster. I'm talking about a Microsoft CRM complex ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Friendly url scheme? One of the many things that's been lacking from my scraper service that I set up last week are pretty URLs. Right now the user parameter is being passed into the script with ?u=, which is a symptom of a lazy hack (which the script admittedly is). However, I've been thinking about redoing it and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: py2exe - generate single executable file I thought I heard that py2exe was able to do this, but I never figured it out. Has anyone successfully done this? Can I see your setup.py file, and what command line options you used? Basically I'm thinking of it giving me a single executable file that does something like u...
{ "language": "en", "url": "https://stackoverflow.com/questions/112698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "152" }
Q: What are the advantages of using Objective-C over C++ I have heard mention of Objective-C but I have never used it myself. I was curious what everyones opinion of it was in general and also in relation to C++. Are there any types of projects where it would be more useful or less useful? A: Objective C's OO featur...
{ "language": "en", "url": "https://stackoverflow.com/questions/112702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I enable multimode emacs to program PHP without messing up my indents? Whenever I indent HTML in PHP mode, emacs (22.1.1, basic install on Redaht Linux over Putty-SSH) pops up a frame and tells me to get MUMODE or somesuch extra add-on. I installed PHP Mode without a big hassle, but I don't know how to get t...
{ "language": "en", "url": "https://stackoverflow.com/questions/112707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Combining Scriptaculous and jQuery in a Rails application I've got the following situation * *A rails application that makes use of rjs / Scriptaculous to offer AJAX functionality *Lot of nice javascript written using jQuery (for a separate application) I want to combine the two and use my jQuery based functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/112721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to avoid the dangers of optimisation when designing for the unknown? A two parter: 1) Say you're designing a new type of application and you're in the process of coming up with new algorithms to express the concepts and content -- does it make sense to attempt to actively not consider optimisation techniques at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112727", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I join two tables in a third n..n (hasAndBelongsToMany) relationship in CakePHP? I have a n...n structure for two tables, makes and models. So far no problem. In a third table (products) like: id make_id model_id ... My problem is creating a view for products of one specifi make inside my ProductsController ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does boost bind work behind the scenes in general? Without spending a long time reviewing the boost source code, could someone give me a quick rundown of how boost bind is implemented? A: I like this piece of the bind source: template<class R, class F, class L> class bind_t { public: typedef bind_t this_...
{ "language": "en", "url": "https://stackoverflow.com/questions/112738", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Shortest Root to Leaf Path What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path in a BST (Binary Search Tree). Java prefered, pseudocode okay. Thanks! A: This is in C++, but it is so simple you can convert it easily. Just change min to max to get the maximum tree depth. int T...
{ "language": "en", "url": "https://stackoverflow.com/questions/112739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to map geo location based on one or all of these services I'm looking for a solution to map one or all of the following Flickr, twitter, vimeo, by exif, keywords or whatever to google maps. I'm trying to show a map of my location from updating social sites. A: If each of the services you want supports GeoRSS, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/112759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would one log into a phpBB3 forum through a Python script using urllib, urllib2 and ClientCookie? (ClientCookie is a module for (automatic) cookie-handling: http://wwwsearch.sourceforge.net/ClientCookie) # I encode the data I'll be sending: data = urllib.urlencode({'username': 'mandark', 'password': 'deedee'}) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you re-attach a subversion local copy to a different remote? Our subversion repository has been moved to a new host, and we have old applications that connect to that host. We CANNOT add an alias for the new server with the old name, how can we re-connect our checked out clients to the new repository? A: Lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/112770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Possible to use multiple/nested MySQLi statements? Is it possible to have a MySQLi prepared statement within the fetch() call of a previous statement? If not, what's the best way around it? Example code: if($stmt = $link->prepare("SELECT item FROM data WHERE id = ?")) { $stmt->bind_param("i", $id); $stmt->ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/112775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Conflicting desires in Database Design, with fields of two similar functions Okay, so I'm making a table right now for "Box Items". Now, a Box Item, depending on what it's being used for/the status of the item, may end up being related to a "Shipping" box or a "Returns" box. A Box Item may be defective:if it is, a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/112780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP performance considerations? I'm building a PHP site, but for now the only PHP I'm using is a half-dozen or so includes on certain pages. (I will probably use some database queries eventually.) Are simple include() statements a concern for speed or scaling, as opposed to static HTML? What kinds of things tend to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to view contents of NSDictionary variable in Xcode debugger? Is there a way to view the key/value pairs of a NSDictionary variable through the Xcode debugger? Here's the extent of information when it is fully expanded in the variable window: Variable Value Summary jsonDict 0x45c540 4 key/value pairs N...
{ "language": "en", "url": "https://stackoverflow.com/questions/112796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: MD5 routines that are GLib friendly? Does anyone know of an MD5/SHA1/etc routine that is easily used with GLib (i.e. you can give it a GIOChannel, etc)? A: Unless you have a very good reason, use glib's built-in MD5, SHA1, and SHA256 implementations with GChecksum. It doesn't have a built-in function to construct a...
{ "language": "en", "url": "https://stackoverflow.com/questions/112802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Accessing URL parameters in Oracle Forms / OC4J How do I access parameters passed into an Oracle Form via a URL. Eg given the url: http://example.com/forms90/f90servlet?config=cust&form='a_form'&p1=something&p2=else This will launch the 'a_form' form, using the 'cust' configuration, but I can't work how (or even ...
{ "language": "en", "url": "https://stackoverflow.com/questions/112812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Displaying the current authenticated Sharepoint user from an asp.net Page Viewer Web Part I am creating a standalone asp.net page that needs to be embedded into a sharepoint site using the Page Viewer Web Part. The asp.net page is published to the same server on a different port, giving me the URL to embed. The req...
{ "language": "en", "url": "https://stackoverflow.com/questions/112818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to get a stack trace when C++ program crashes? (using msvc8/2005) Sometimes my c++ program crashes in debug mode, and what I got is a message box saying that an assertion failed in some of the internal memory management routines (accessing unallocated memory etc.). But I don't know where that was called from, be...
{ "language": "en", "url": "https://stackoverflow.com/questions/112831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to resolve a conflict with git-svn? What is the best way to resolve a conflict when doing a git svn rebase, and the git branch you are on becomes "(no-branch)"? A: While doing a git svn rebase, if you have merge conflicts here are some things to remember: 1) If anything bad happens while performing a rebase you...
{ "language": "en", "url": "https://stackoverflow.com/questions/112839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: What does either Java GUI editor offer for rapid development and maintainability (i.e., Eclipse/SWT and Netbeans/Matisse)? Between Eclipse/SWT or Netbeans/Matisse, what does either Java GUI editor give you in terms of rapid development and maintainability? A: You are really asking two different questions: SWT vs Sw...
{ "language": "en", "url": "https://stackoverflow.com/questions/112854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Qt: meaning of slot return value? According to the documentation the return value from a slot doesn't mean anything. Yet in the generated moc code I see that if a slot returns a value this value is used for something. Any idea what does it do? Here's an example of what I'm talking about. this is taken from code gen...
{ "language": "en", "url": "https://stackoverflow.com/questions/112861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }