text
stringlengths
8
267k
meta
dict
Q: Video capture on Linux? We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience? A: Use the video4linux library. I've used it with a c++ program and was able to capture webcam frames within about an hour. (Very easy to u...
{ "language": "en", "url": "https://stackoverflow.com/questions/83899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to update a field with random data? I've got a new varchar(10) field in a database with 1000+ records. I'd like to update the table so I can have random data in the field. I'm looking for a SQL solution. I know I can use a cursor, but that seems inelegant. MS-SQL 2000,BTW A: update MyTable Set RandomFld = CO...
{ "language": "en", "url": "https://stackoverflow.com/questions/83914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: log4j log file names? We have several jobs that run concurrently that have to use the same config info for log4j. They are all dumping the logs into one file using the same appender. Is there a way to have each job dynamically name its log file so they stay seperate? Thanks Tom A: If the job names are known ahead...
{ "language": "en", "url": "https://stackoverflow.com/questions/83918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Listview Multiple Selection Is there any way to force a listview control to treat all clicks as though they were done through the Control key? I need to replicate the functionality of using the control key (selecting an item sets and unsets its selection status) in order to allow the user to easily select multiple i...
{ "language": "en", "url": "https://stackoverflow.com/questions/83945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Php $_GET issue foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field]; echo "$_GET[$field]"; echo "<br>"; } print_r($datarray); This is the output I am getting. I see the data is there in datarray but when I echo $_GET[$field] I only get "Array" But print_r($datarray) prints all the data. Any i...
{ "language": "en", "url": "https://stackoverflow.com/questions/83953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Do I have a gcc optimization bug or a C code problem? Test the following code: #include <stdio.h> #include <stdlib.h> main() { const char *yytext="0"; const float f=(float)atof(yytext); size_t t = *((size_t*)&f); printf("t should be 0 but is %d\n", t); } Compile it with: gcc -O3 test.c The GOOD out...
{ "language": "en", "url": "https://stackoverflow.com/questions/83962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I do a manual uninstall of Oracle? Sometimes my Oracle database on Windows gets hosed. How do I do a manual uninstall of Oracle? A: The six-step process to remove all things Oracle from a Windows machine: A. Delete the Oracle services: In the registry, go to \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/83967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Log4net with SyslogAppender, 1kb message limit Has anyone found a way to get around this? Or a better technique to conglomerate logging from multiple web servers reliably? Any ideas on good log4net log file analysis tools too (plain text not XML) - apart from good 'ol grep of course :) A: I read about logFaces on a...
{ "language": "en", "url": "https://stackoverflow.com/questions/83969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I provide dynamic CSS styles or custom theme for web site? There are plenty of ways to provide a dynamic style/theme for a web site, but I am looking for some help on some best practices or techniques that have worked well for others. I am creating a web site that needs to provide the ability for customers t...
{ "language": "en", "url": "https://stackoverflow.com/questions/83982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why isn't the 'len' function inherited by dictionaries and lists in Python example: a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object. Plus I keep trying the wrong solution since it appears...
{ "language": "en", "url": "https://stackoverflow.com/questions/83983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Is it the filename or the whole URL used as a key in browser caches? It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead. One solution is to embed a version number in the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/83990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How do I change the IP address on Oracle 10g What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot. A: If the server's IP address changed, these are the first things I would look at: The TNSNAMES.ORA file on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/83991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Curl command line for consuming webServices? Do you guys know how I can use the Curl command line to POST SOAP to test a web service? I have a file (soap.xml) which has all the soap message attached to it I just don't seem to be able to properly post it. Thanks! A: curl -H "Content-Type: text/xml; charset=utf-8" \ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: ReSharper sluggishness I like ReSharper, but it is a total memory hog. It can quickly swell up and consume a half-gig of RAM without too much effort and bog down the IDE. Does anybody know of any way to configure it to be not as slow? A: The next release 4.5 is going to based around performance and memory footprint...
{ "language": "en", "url": "https://stackoverflow.com/questions/84009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: What is the quickest way to find the shortest cartesian distance between two polygons I have 1 red polygon say and 50 randomly placed blue polygons - they are situated in geographical 2D space. What is the quickest/speediest algorithim to find the the shortest distance between a red polygon and its nearest blue pol...
{ "language": "en", "url": "https://stackoverflow.com/questions/84034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Is .NET a write once, run anywhere (WORA) platform like Java claims to be? I remember Sun's slogan so vividly... "Write Once, Run Anywhere". The idea being that since programs are compiled into standard byte codes, any device with a Java Virtual Machine could run it. Over the years, Java seems to have made it onto m...
{ "language": "en", "url": "https://stackoverflow.com/questions/84058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SQLBindParameter to prepare for SQLPutData using C++ and SQL Native Client I'm trying to use SQLBindParameter to prepare my driver for input via SQLPutData. The field in the database is a TEXT field. My function is crafted based on MS's example here: http://msdn.microsoft.com/en-us/library/ms713824(VS.85).aspx. I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/84064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting the default ssh key location ssh will look for its keys by default in the ~/.ssh folder. I want to force it to always look in another location. The workaround I'm using is to add the keys from the non-standard location to the agent: ssh-agent ssh-add /path/to/where/keys/really/are/id_rsa (on Linux and Ming...
{ "language": "en", "url": "https://stackoverflow.com/questions/84096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: What is idiomatic code? I'd be interested in some before-and-after c# examples, some non-idiomatic vs idiomatic examples. Non-c# examples would be fine as well if they get the idea across. Thanks. A: Practically speaking, it means writing code in a consistent way, i.e. all developers who work on your code base shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/84102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "113" }
Q: OO and how it works in PHP I've been writing PHP for about six years now and have got to a point where I feel I should be doing more to write better code. I know that Object Oriented code is the way to go but I can't get my head around the concept. Can anyone explain in terms that any idiot can understand, OO and ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/84125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Finding errors / warnings in Visual Studio I have experienced an annoying issue with Visual Studio 2005... sometimes when I rebuild, and even if I do a Rebuild Solution, it will come back with no errors or warnings, but then when I later edit another code file, even without changing it, and rebuild, it will find an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Uninstall Sharepoint Infrastructure Update I installed WSS Infrastructure Update and MOSS Infrastructure Update (http://technet.microsoft.com/en-us/office/sharepointserver/bb735839.aspx) and now I can't restore the content database on an older version. Do you know if there is a way to uninstall it ? A: The only opt...
{ "language": "en", "url": "https://stackoverflow.com/questions/84132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: org.eclipse.swt.SWTError: Item not added Does somebody know how to recover a never-starting eclipse when the error "org.eclipse.swt.SWTError: Item not added" is raising againg and again? I'm using WebSphere Studio Site Developer (Windows) 5.1.0 The only stack trace in the .metadata/log file is: SESSION -------------...
{ "language": "en", "url": "https://stackoverflow.com/questions/84147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Web Scripting for Java What is a good way to render data produced by a Java process in the browser? I've made extensive use of JSP and the various associated frameworks (JSTL, Struts, Tapestry, etc), as well as more comprehensive frameworks not related to JSP (GWT, OpenLaszlo). None of the solutions have ever been ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I cycle through pages? Here's a challenge that I was tasked with recently. I still haven't figured out the best way to do it, maybe someone else has an idea. Using PHP and/or HTML, create a page that cycles through any number of other pages at a given interval. For instance, we would load this page and it w...
{ "language": "en", "url": "https://stackoverflow.com/questions/84163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I prevent static variable sharing in the .NET runtime? I'm working on a game (C#) that uses a Robocode-like programming model: participants inherit a base Class and add strategic behaviors. The game then loads instances of participants' Classes and the competition begins. Unfortunately, participants can "chea...
{ "language": "en", "url": "https://stackoverflow.com/questions/84164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cross-Database information_schema Joins in SQL Server I am attempting to provide a general solution for the migration of data from one schema version to another. A problem arises when the column data type from the source schema does not match that of the destination. I would like to create a query that will perform ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Service factory: extremely long path/filenames problems I have been trying out Service Factory and have run into some problems in regards to long filenames - surpassing the limit in Vista/XP. The problem is that when generating code from the models service factory prefixes everything with the namespace specified. Ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/84174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I implement the Post Commit Hook with Trac & SVN in a Windows Environment? I'm running in a windows environment with Trac / SVN and I want commits to the repository to integrate to Trac and close the bugs that were noted in the SVN Comment. I know there's some post commit hooks to do that, but there's not muc...
{ "language": "en", "url": "https://stackoverflow.com/questions/84178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Samba, other non interactive accounts - noshell, nologin, or blank? Conducting a user account cleanup accross Solaris and Redhat linux systems, many of which have a number of Samba shares. What preference do people have for creating the local unix accounts for non interactive Samba users? In particular, the shell e...
{ "language": "en", "url": "https://stackoverflow.com/questions/84180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SSRS 2005 - Looping Through Report Parameters I would like to be able to loop through all of the defined parameters on my reports and build a display string of the parameter name and value. I'd then display the results on the report so the user knows which parameters were used for that specific execution. The only...
{ "language": "en", "url": "https://stackoverflow.com/questions/84195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Adding a guideline to the editor in Visual Studio Introduction I've always been searching for a way to make Visual Studio draw a line after a certain amount of characters. Below is a guide to enable these so called guidelines for various versions of Visual Studio. Visual Studio 2013 or later Install Paul Harrington'...
{ "language": "en", "url": "https://stackoverflow.com/questions/84209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "368" }
Q: Fade splash screen in and out In a C# windows forms application. I have a splash screen with some multi-threaded processes happening in the background. What I would like to do is when I display the splash screen initially, I would like to have it appear to "fade in". And then, once all the processes finish, I would ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I set up a custom build step in Visual Studio 6? Unfortunately it looks like for various reasons I'm going to have to use Visual Studio 6 instead of a newer version of VS. It's been a long time since I've used it. I'm looking through its menus and don't see any obvious way to set up any custom build steps (pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/84232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a single resource which explains windows memory thoroughly? Seriously, I've trawled MSDN and only got half answers - what do the columns on the Task Manager mean? Why can't I calculate the VM Usage by enumerating threads, modules, heaps &c.? How can I be sure I am accurately reporting to clients of my mem...
{ "language": "en", "url": "https://stackoverflow.com/questions/84234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to force browser to reload updated XML file? I am developing a website that relies much on XML data. The web site has an interface where user can update data. The data provided by user will be updated to the respective XML file. However, the changes is not reflected until after 1 or 2 minutes. Anyone knows how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/84243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: .NET abstract classes I'm designing a web site navigation hierarchy. It's a tree of nodes. Most nodes are pages. Some nodes are links (think shortcuts in Windows). Most pages hold HTML content. Some execute code. I'd like to represent these as this collection of classes and abstract (MustInherit) classes… This i...
{ "language": "en", "url": "https://stackoverflow.com/questions/84263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Component Object Model (COM) on non-Microsoft platforms I'm regularly running into similar situations : I have a bunch of COM .DLLs (no IDL files) which I need to use and invoke to be able to access some foreign (non-open, non-documented) data format. Microsoft's Visual Studio platform has very nice capabiliti...
{ "language": "en", "url": "https://stackoverflow.com/questions/84269", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Does an IIS worker process clear session variables when it recycles? We're writing an asp.net web app on IIS 6 and are planning on storing our user login variables in a session. Will this be removed when the worker process recycles? A: If session is stored in-proc then YES worker process recycle will remove it. Use...
{ "language": "en", "url": "https://stackoverflow.com/questions/84276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I use WPF bindings with RelativeSource? How do I use RelativeSource with WPF bindings and what are the different use-cases? A: If you want to bind to another property on the object: {Binding Path=PathToProperty, RelativeSource={RelativeSource Self}} If you want to get a property on an ancestor: {Binding Pat...
{ "language": "en", "url": "https://stackoverflow.com/questions/84278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "651" }
Q: What can you use to get an application to be able to receive SMS message? * *Do you need to use some kind of provider? *Can you setup your own SMS server? *Does any open source solutions exist? I am an SMS newbie so any insight on how this is accomplished would be great. I am partial to Java but any language...
{ "language": "en", "url": "https://stackoverflow.com/questions/84282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: calling thread.start() within its own constructor is it legal for a thread to call this.start() inside its own constructor? and if so what potential issues can this cause? I understand that the object wont have fully initialized until the constructor has run to completion but aside from this are there any other issu...
{ "language": "en", "url": "https://stackoverflow.com/questions/84285", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is there any tool which can generate a report for a valid C program Is there any tool that can parse a valid C program and generate a report which contains list of functions, global variables, #define constants, local variables in each function, etc. A: Doxygen does all of the above. A: Try exuberant-ctags with th...
{ "language": "en", "url": "https://stackoverflow.com/questions/84286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting a full list of the URLS in a rails application How do I get a a complete list of all the urls that my rails application could generate? I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application... Is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/84290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Code/Document Management for a very small company I work for a very small company (~5 employees, 2.5 coders). We have gotten away with no code or document management for several years, but it's starting to catch up with us as we grow a bit. Any suggestions for a management system. Free is better, but cheap is acce...
{ "language": "en", "url": "https://stackoverflow.com/questions/84303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do indicate the SQL default library in an IBM iSeries 2 connection string to an AS/400? I'm connecting to an AS/400 stored procedure layer using the IBM iSeries Access for Windows package. This provides a .NET DLL with classes similar to those in the System.Data namespace. As such we use their implementation of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are the perldoc perlxxx options? It appears that using perldoc perl gives the list of, e.g. perlre, perlvar, etc. Is this the best place to find the list of what's available as an overview or tutorial or reference manual section? Is there another, better list? A: perldoc perltoc is a bit more verbose about th...
{ "language": "en", "url": "https://stackoverflow.com/questions/84322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to protect Mac OS X software from cracking? We're releasing a Mac version of our Windows application. Under Windows, there are several tools for executable protection, for example Armadillo, ExeCryptor, AsProtect etc, however, none of these has a Mac version. So, my question is: Are there any executable protecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/84324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySql - Create Table If Not Exists Else Truncate? Here is the updated question: the current query is doing something like: $sql1 = "TRUNCATE TABLE fubar"; $sql2 = "CREATE TEMPORARY TABLE IF NOT EXISTS fubar SELECT id, name FROM barfu"; The first time the method containing this is run, it generates an error message ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Is there a macro to conditionally copy rows to another worksheet? Is there a macro or a way to conditionally copy rows from one worksheet to another in Excel 2003? I'm pulling a list of data from SharePoint via a web query into a blank worksheet in Excel, and then I want to copy the rows for a particular month to a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84331", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What can prevent an MS Access 2000 form from closing? My Access 2000 DB causes me problems - sometimes (haven't pinpointed the cause) the "book" form won't close. Clicking its close button does nothing, File -> Close does nothing, even closing Access results in no action. I don't have an OnClose handler for this f...
{ "language": "en", "url": "https://stackoverflow.com/questions/84332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to implement in-process full text search engine In one of our commercial applications (Win32, written in Delphi) we'd like to implement full text search. The application is storing user data in some kind of binary format that is not directly recognizable as a text. Ideally, I'd like to find either an in-process ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? I wonder why would a C++, C#, Java developer want to learn a dynamic language? Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "67" }
Q: How do I prepend a directory the library path when loading a core file in gdb on Linux I have a core file generated on a remote system that I don't have direct access to. I also have local copies of the library files from the remote system, and the executable file for the crashing program. I'd like to analyse this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Create an index on a MySQL column based on the length its contents? How do I create an index on a column in MySQL v 5.0 (myisam db engine) based upon the length of its value its a TEXT data type up to 7000 characters, do I have to add another column with the length of the first column? A: Yes, as MySQL doesn't supp...
{ "language": "en", "url": "https://stackoverflow.com/questions/84346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to choose between `class` and `id` When using divs when is it best to use a class vs id? Is it best to use class, on say font variant or elements within the html? Then use id for the structure/containers? This is something I've always been a little uncertain on, any help would be great. A: Use id to identify...
{ "language": "en", "url": "https://stackoverflow.com/questions/84378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Using Visual Studio's 'cl' from a normal command line Visual Studio 2003 and 2005 (and perhaps 2008 for all I know) require the command line user to run in the 'Visual Studio Command Prompt'. When starting this command prompt it sets various environment variables that the C++ compiler, cl, uses when compiling. This...
{ "language": "en", "url": "https://stackoverflow.com/questions/84404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How do you override the string representation the HTML helper methods use for a model’s properties? The html helper methods check the ViewDataDictionary for a value. The value can either be in the dictionary or in the Model, as a property. To extract the value, an internal sealed class named the ViewDataEvaluator us...
{ "language": "en", "url": "https://stackoverflow.com/questions/84418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Converting an integer to a hexadecimal string in Ruby Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent? Something like the opposite of String#to_i: "0A".to_i(16) #=>10 Like perhaps: "0A".hex #=>10 I know how to roll my own, but it's probably more efficient to use a built in Rub...
{ "language": "en", "url": "https://stackoverflow.com/questions/84421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "217" }
Q: Performance: call-template vs apply-template in XSLT processing, is there a performance difference between apply-template and call-template? In my stylesheets there are many instances where I can use either, which is the best choice? A: As with all performance questions, the answer will depend on your particular co...
{ "language": "en", "url": "https://stackoverflow.com/questions/84422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Is it legal to pass a newly constructed object by reference to a function? Specifically, is the following legal C++? class A{}; void foo(A*); void bar(const A&); int main(void) { foo(&A()); // 1 bar(A()); // 2 } It appears to work correctly, but that doesn't mean it's necessarily legal. Is it? Edit - ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/84427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: XML Serialize boolean as 0 and 1 The XML Schema Part 2 specifies that an instance of a datatype that is defined as boolean can have the following legal literals {true, false, 1, 0}. The following XML, for example, when deserialized, sets the boolean property "Emulate" to true. <root> <emulate>1</emulate> </root>...
{ "language": "en", "url": "https://stackoverflow.com/questions/84449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Reuse of SQL stored procedures across applications I'm curious about people's approaches to using stored procedures in a database that is accessed by many applications. Specifically, do you tend to keep different sets of stored procedures for each application, do you try to use a shared set, or do you do a mix? On t...
{ "language": "en", "url": "https://stackoverflow.com/questions/84453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problem with Java 1.6 and Desktop.open() I've been using Destop.open() to launch a .pdf viewer on Windows machines, both Vista and XP, and most of them work just fine. However, on one XP machine the call does not work, simply returning without throwing any exceptions, and the viewer does not launch. On that machin...
{ "language": "en", "url": "https://stackoverflow.com/questions/84460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to call a function dynamically that is part of an instantiated cfc, without using Evaluate()? For example I want to be able to programatically hit a line of code like the following where the function name is dynamically assigned without using Evaluate(). The code below of course doesn't work but represents what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you create a MANIFEST.MF that's available when you're testing and running from a jar in production? I've spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it. I just want to know the proper way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/84486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What is the best way to share files between Xen VM's? Is there some built-in way to share files between Xen guests? I don't currently need to share the actual images, just some data files. A: Do you mean between Xen and the host or between different guests? If guests, I don't think there is something provided but ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I use perldoc to lookup the %ENV variable? I find from reading perldoc perlvar, about a thousand lines in is help for %ENV. Is there a way to find that from the command line directly? On my Windows machine, I've tried the following perldoc ENV perldoc %ENV perldoc %%ENV perldoc -r ENV (returns info about Use...
{ "language": "en", "url": "https://stackoverflow.com/questions/84506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's your favorite "programmer" cartoon? Personally I like this one: P.S. Do not hotlink the cartoon without the site's permission please. A: Without a doubt... A: ("40% of OpenBSD installs lead to shark attacks. It's their only standing security issue.") A: I like this one: http://xkcd.com/149/ (Proper U...
{ "language": "en", "url": "https://stackoverflow.com/questions/84556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "836" }
Q: How to deploy SQL Reporting 2005 when Data Sources are locked? The DBAs here maintain all SQL Server and SQL Reporting servers. I have a custom developed SQL Reporting 2005 project in Visual Studio that runs fine on my local SQL Database and Reporting instances. I need to deploy to a production server, so I had a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error handling reporting methods with ASP.NET 2.0 / C# Does anyone know of an open source module or a good method for handling application errors and e-mailing them to an admin and/or saving to a database? A: ELMAH is a great drop-in tool for this. DLL in the bin directory, and some markup to add to the web.config...
{ "language": "en", "url": "https://stackoverflow.com/questions/84587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Keep pagination repeatable if change operations are performed If one wants to paginate results from a data source that supports pagination we have to go to a process of: * *defining the page size - that is the number of results to show per page; *fetch each page requested by the user using an offset = page numbe...
{ "language": "en", "url": "https://stackoverflow.com/questions/84615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Passing EXE data down to one or more DLLs Our current application is a single OpenGL EXE containing multiple pages. The EXE is responsible for accessing data sent across the network via UDP. It accumulates the data and stores it in a host of singleton structures. The individual pages within the EXE access the sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/84626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How To Read Active Directory Group Membership From PHP/IIS using COM? I have the following code: $bind = new COM("LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local"); When I execute it from a command-prompt, it runs fine. When it runs under IIS/PHP/ISAPI, it barfs. Fatal error: Uncaught exception 'com_...
{ "language": "en", "url": "https://stackoverflow.com/questions/84641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hibernate Query By Example and Projections To make it short: hibernate doesn't support projections and query by example? I found this post: The code is this: User usr = new User(); usr.setCity = 'TEST'; getCurrentSession().createCriteria(User.class) .setProjection( Projections.distinct( Projections.projectionList() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84644", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How can I avoid the warning fom an unused parameter in PLSQ? Sometimes, in PL SQL you want to add a parameter to a Package, Function or Procedure in order to prepare future functionality. For example: create or replace function doGetMyAccountMoney( Type_Of_Currency IN char := 'EUR') return number is Result num...
{ "language": "en", "url": "https://stackoverflow.com/questions/84661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Understanding how Ada serializes a record I would like to be able to predict what will be in the resulting binary when I call Write in Ada to serialize a record. Do you know where I can look this up? I have some legacy Ada software that produces a binary file by Write-ing a record, and I need to debug a C++ program ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you authenticate against an Active Directory server using Spring Security? I'm writing a Spring web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring Security to connect to the server. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/84680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Is there a better way to create an object-oriented class with jQuery? I use the jQuery extend function to extend a class prototype. For example: MyWidget = function(name_var) { this.init(name_var); } $.extend(MyWidget.prototype, { // object variables widget_name: '', init: function(widget_name) { /...
{ "language": "en", "url": "https://stackoverflow.com/questions/84716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: .NET Testing Naming Conventions What are the best conventions of naming testing-assemblies in .NET (or any other language or platform)? What I'm mainly split between are these options (please provide others!): * *Company.Website - the project *Company.Website.Tests or * *Company.Website *Company.WebsiteTests...
{ "language": "en", "url": "https://stackoverflow.com/questions/84717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Which thread should I process the RxTx SerialEvent.DATA_AVAILABLE event? I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial. My application has several threads and one of my biggest problems is that out of nowher...
{ "language": "en", "url": "https://stackoverflow.com/questions/84755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get IFile from IWorkspaceRoot and location String This is an Eclipse question, and you can assume the Java package for all these Eclipse classes is org.eclipse.core.resources. I want to get an IFile corresponding to a location String I have: "platform:/resource/Tracbility_All_Supported_lib/processes/gastuff/globa...
{ "language": "en", "url": "https://stackoverflow.com/questions/84759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Excel 2007 pivot tables - how to use calculated fields when connecting to a data cube? Can you use calculated fields in Excel 2007 pivot tables when the data source is an SSAS data cube? I am connecting to a SQL Server 2005 data cube with Excel 2007 and viewing the data though a pivot table. I want to create calcula...
{ "language": "en", "url": "https://stackoverflow.com/questions/84769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to accept REF cursor in JAVA without importing Oracle Package I am writting JAVA programme using JDBC for database conntectivity , I am calling one stored procedure in that which is returning ORACLE REF CURSOR , IS there any way I can handle that without importing ORACLE PACKAGES ? A: I think I tried to do this...
{ "language": "en", "url": "https://stackoverflow.com/questions/84782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I speed up data retrieval from .NET AD within ColdFusion? How can I optimize the following code, which currently takes over 2 minutes to retrieve and loop through 800+ records from a pool of over 100K records, returning 6 fields per record (adds approximately 20 seconds per additional field): <cfset dllPath="...
{ "language": "en", "url": "https://stackoverflow.com/questions/84795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the single best free Eclipse plugin for a Java developer Some Eclipse plugins are mandated by your environment. The appropriate source code management plugin, for example - and I'm not interested in those. Some provide useful enhancements, but in a specific niche. I'm not interested in those. Some are great,...
{ "language": "en", "url": "https://stackoverflow.com/questions/84799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: How do I efficiently search an array to fill in form fields? I am looking for an efficient way to pull the data I want out of an array called $submission_info so I can easily auto-fill my form fields. The array size is about 120. I want to find the field name and extract the content. In this case, the field name is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: tagName is null or not an object -- error msg in IE7 using latest version of jQuery (1.2.6) has anyone else seen this error message. a quick check with google doesn't show me much. A: You are probably trying to do something like this.... alert($("#myElement").tagName); You should do this... alert($("#myElement")[0...
{ "language": "en", "url": "https://stackoverflow.com/questions/84803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Dockable Form How do you create a "dockable" form, similar to the windows in Visual Studio? A: I've used Weifen Luo's "DockPanel Suite" to good effect. It's an open source library that mimics Visual Studio's docking system very well, including nested docking, floating windows, tabbed windows, etc. You can download ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What tool works for real-time tweaking of CSS in IE6, similar to what Firebug does for Firefox? All front-end developers know the pain of coding for Firefox, then viewing our then mangled pages in IE6. IE6 is still widely used (it is, however disappearing slowly but surely... in a year and a half from the writing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Super Robust as chrome c++ and portable - tips - help - comments We are producing a portable code (win+macOs) and we are looking at how to make the code more rubust as it crashes every so often... (overflows or bad initializations usually) :-( I was reading that Google Chrome uses a process for every tab so if somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/84817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Distributed hierarchical clustering Are there any algorithms that can help with hierarchical clustering? Google's map-reduce has only an example of k-clustering. In case of hierarchical clustering, I'm not sure how it's possible to divide the work between nodes. Other resource that I found is: http://issues.apache.o...
{ "language": "en", "url": "https://stackoverflow.com/questions/84820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: ASP.NET 1.1 Page_ClientValidate Debugging I have an ASP.NET 1.1 application, and on my local machine the submit button on my page works fine, but when I deploy it to our development application server, I click on Submit and nothing happens.. I'm assuming that the Page_Validate() function is failing and disabling the...
{ "language": "en", "url": "https://stackoverflow.com/questions/84837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XML node name clean up code I am trying to create an XML file based on data fields from a table, and I want to have the nodes named based on the value in a field from the table. The problem is that sometimes values entered in that column contain spaces and other characters not allowed in Node names. Does anyone have...
{ "language": "en", "url": "https://stackoverflow.com/questions/84839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I programmatically wire up ToolStripButton events in C#? I'm programmatically adding ToolStripButton items to a context menu. That part is easy. this.tsmiDelete.DropDownItems.Add("The text on the item."); However, I also need to wire up the events so that when the user clicks the item something actually happ...
{ "language": "en", "url": "https://stackoverflow.com/questions/84842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create a self-signed certificate for code signing on Windows? How do I create a self-signed certificate for code signing using tools from the Windows SDK? A: Updated Answer If you are using the following Windows versions or later: Windows Server 2012, Windows Server 2012 R2, or Windows 8.1 then MakeCert is...
{ "language": "en", "url": "https://stackoverflow.com/questions/84847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "284" }
Q: What is the best choice for .NET inter-process communication? Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine? A: WCF is the best choice. It supports a number of different transport mechanisms (including Named Pipes) and can be completely configuration driven. I woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/84855", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: Writing data over RxTx using usbserial? I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial. One of my biggest problems is that the RxTx SerialPortEvent.OUTPUT_BUFFER_EMPTY does not work on linux over usb serial. How...
{ "language": "en", "url": "https://stackoverflow.com/questions/84859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to communicate with a windows service from an application that interacts with the desktop? With .Net what is the best way to interact with a service (i.e. how do most tray-apps communicate with their servers). It would be preferred if this method would be cross-platform as well (working in Mono, so I guess remo...
{ "language": "en", "url": "https://stackoverflow.com/questions/84860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How do you maintain large t-sql procedures I'm about to inherit a set of large and complex set of stored procedures that do monthly processing on very large sets of data. We are in the process of debugging them so they match the original process which was written in VB6. The reason they decided to re write them in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/84880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }