text
stringlengths
8
267k
meta
dict
Q: Subversion - how do I control user access for single repository when SVNParentPath is used? I have subversion repositories that are working fine with password authentication required for all users. My config is posted below. How do I go about modifying this configuration so that I can allow a single user to have rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/350588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IdbConnection vs. SqlConnection When I write an app, I use the System.Data interfaces (IDbConnection, IDbCommand, IDataReader, IDbDataParameter, etc...). I do this to reduce vendor dependencies. Unless, I'm doing a simple test app, it just seems like the ethical thing to do when consulting. However, it seems like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Eclipse Custom Variable for Java Code Templates How do you add a new variable to be inserted into a Java code template. How do I add a variable to the list in Window->Preferences->Java->Code Style->Code Templates->Code->New Java Files->Edit->Insert Variable... ? Currently my new files get created with: ${filecomment...
{ "language": "en", "url": "https://stackoverflow.com/questions/350600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: SVN/Tortoise - Label generation In Clearcase I can generate a "label" for a given set of files and always go back to that label to regenerate all the files as they were when I generated the label. How do I do this in Subversion? I'm using the Tortoise front end [Windows] to SVN and I'm not sure how to accomplish thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/350603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Trouble with PHP MySQL fetch array function I have a database with 2 tables. One of the tables holds a row containing numbers, from 0 to 10. In PHP, I do this: $query = "SELECT ".$param." FROM issues WHERE ".$param." >=0"; $result = @mysql_query($query) or showError("query failed"); if (!($record = mysql_fetch_arr...
{ "language": "en", "url": "https://stackoverflow.com/questions/350608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is it possible to make Eclipse ignore syntax checking/formatting for one specific file? I'm using Eclipse as an IDE for Ruby/Rails development (using Aptana plugin). I have one very, very large file that encompasses an initial data load of several thousand rows of data. When this file is open, everything grinds to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/350611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Inserting rows in table that has a relationship with another table In my database schema I have an entity that is identified. The identifier can be reused and thus there is a one-to-many relation with the entity. Example: A person can have a nickname. Nicknames are not unique and can be shared amongst many people. S...
{ "language": "en", "url": "https://stackoverflow.com/questions/350617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use a variable in a grep with groovy? I need to grep for lines with bunch of names, say clientLogin=a@yahoo.com, clientLogin=b@gmail.com from a file.txt. file.txt has junk which is email=a@yahoo.com email=b@gmail.com. I need to filter these out Once I get these lines I need to grep for gmail and yahoo and g...
{ "language": "en", "url": "https://stackoverflow.com/questions/350620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Accessing Active Directory in ASP.NET? I use a console application to write some test code: /// <summary> /// Returns AD information for a specified userID. /// </summary> /// <param name="ntID"></param> /// <returns></returns> public ADUser GetUser(string ntID) { Dire...
{ "language": "en", "url": "https://stackoverflow.com/questions/350628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Ensuring Network Redundancy: How to switch from default ISP to backup ISP without downtime Here is the situation. This small company I'm working with wants to have a redundant internet access. They run bunch of services from their office - a website, POP+SMTP server and use VPN for accessing network shares from home...
{ "language": "en", "url": "https://stackoverflow.com/questions/350631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Book about .Net Compact Framework development I'm searching for a book about developing with .Net Compact Framework. Does anybody have any hints? Thanks. Yours, Thomas A: This one "Microsoft® Mobile Development Handbook " is certainly one of the best. Some of the authors are also involved with the open source OpenN...
{ "language": "en", "url": "https://stackoverflow.com/questions/350637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do i save a web form into a MySQL database? I have an ASP.Net form and i would like to save it into a database any ideas?? A: Your best bet is to read up on ORMs like NHibernate. If you use that with a code generator like myGeneration, then you can easily not have to worry about the 'harder' parts of Data Acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/350638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to disable mouseout events triggered by child elements? Let me describe the problem in details: I want to show an absolute positioned div when hovering over an element. That's really simple with jQuery and works just fine. But when the mouse goes over one of the child elements, it triggers the mouseout event of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "111" }
Q: SQL Server Tool to script drop statements which have check existence statements before them? I have tried SQL Server 2008 Management Studio and other third party tools to script all database objects (views, SPs & tables) and I can't get anything to generate a one file script which has a drop statement preceded with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Check if the node set contains any value in XSLT I need some help with XSLT syntax. Here is my scenario, I have an XML file that needs to be transformed in to a different look and feel of XML file, I have several sections where if particular node set don't contain any value the whole section shouldn't be processed. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: One Date Picker UIViewController for all Parent Controllers Couldn't think of an intuitive way to paraphrase the topic for this question, and I apologize for that. My question is the following: I have several UIViewController's which need to call in a UIDatePicker. I didn't want to subclass the Date Picker several t...
{ "language": "en", "url": "https://stackoverflow.com/questions/350645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is my Python C Extension leaking memory? The function below takes a python file handle, reads in packed binary data from the file, creates a Python dictionary and returns it. If I loop it endlessly, it'll continually consume RAM. What's wrong with my RefCounting? static PyObject* __binParse_getDBHeader(PyObjec...
{ "language": "en", "url": "https://stackoverflow.com/questions/350647", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: C#/Winform: Enter data into HTML page, submit form I have a Winform with a BackgroundWorker. The BackgroundWorker, among other things, has to make an HTTP call to a page, fill out some data, submit the form, and retrieve the HTML that comes back after "clicking" the submit button. I've run into a number of roadblock...
{ "language": "en", "url": "https://stackoverflow.com/questions/350649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I keep an svn:external up to date using git-svn? Treating my repository as a SVN repo, I get: svn co http://myrepo/foo/trunk foo ... foo/ bar/ baz/ -> http://myrepo/baz/trunk Treating it as a Git repo, I get: git svn clone http://myrepo/foo --trunk=trunk --branches=branches --tags=tags ... foo/ bar/ I...
{ "language": "en", "url": "https://stackoverflow.com/questions/350651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: How do I associate the Enter key with a button on an aspx page? I have an asp.net ascx control file and I have put the control on an aspx page. The aspx page has a button in which when I press enter on the keyboard, I want it to fire the event handler for the button. Is there a way to set this? I am using a master...
{ "language": "en", "url": "https://stackoverflow.com/questions/350655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Displaying International Text I am looking to create an ASP.net page that will have a control like GridView or Repeater and the data to be displayed in this page can be either unicode or Utf-8 . I am really struggling to display languages like Hebrew and some asian languages. How do I show any type of language on t...
{ "language": "en", "url": "https://stackoverflow.com/questions/350659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Vim: \n vs. \r I haven't used vim in a Unix system in a while, but as I recall there was no \r, it was always \n. I'm using gVim under windows and when I search for new line characters I use \n. Searching for \r returns nothing. But when I replace the characters I have to use \r's. \n's give me ^@ Can anyone explain...
{ "language": "en", "url": "https://stackoverflow.com/questions/350661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Who here actually keeps their Project Specification up-to-date? Yes we all get a warm and fuzzy feeling when we read about project specifications, and how they help keep a project on time and within scope etc etc. Who here actually works for a company that keeps and up-to-date specification? If you do, what are the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a DIP Switch control in WPF In an effort to teach myself more about WPF, I'm trying to build a simple application. Where I work we have some hardware that has a bank of 8 dip switches used for setting an address from 0 to 255 (as an 8-bit number). It's a simple concept that I would like to build into a WPF ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create a trigger to replace sql injected A: I think a constraint would be better. Anything that has compromised content would be better rejected. Set up a constraint on the field something like CHARINDEX('<script&gt',[fieldname]) = 0 A: something like: UPDATE table SET field = REPLACE(field, '</script>'...
{ "language": "en", "url": "https://stackoverflow.com/questions/350697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Shell script numbering lines in a file I need to find a faster way to number lines in a file in a specific way using tools like awk and sed. I need the first character on each line to be numbered in this fashion: 1,2,3,1,2,3,1,2,3 etc. For example, if the input was this: line 1 line 2 line 3 line 4 line 5 line 6 li...
{ "language": "en", "url": "https://stackoverflow.com/questions/350701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Do you have any tips for C# Minification? I need to minify some C# code in a handful of Silverlight .cs and .xmal files. What are your tips for maintaining one code base and running a "tool" to generate minified code for a project? Are there any tools (like Resharper) that will do this? If not fully, partially or as...
{ "language": "en", "url": "https://stackoverflow.com/questions/350705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Set the file path and name properties before uploading If you know the local path and file name of the file you want the end user to upload (via browser). Then is it possible to pre-set these properties for the HTML file input element (or any upload control)? So when the user clicks 'browse' to select the file to up...
{ "language": "en", "url": "https://stackoverflow.com/questions/350734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I view 'raw' PNG image data I'm trying to write an application that converts 48 bit-per-pixel PNG files to a proprietary (Bayer) format. The code (courtesy here) below works great for some PNG file formats, but when I try a bona fide 48 bit PNG the code throws an exception - is there an alternative? st...
{ "language": "en", "url": "https://stackoverflow.com/questions/350736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I limit git log (or svn log) to revisions that regard one particular file? I'd like to see a series of diffs for a file. I'd settle for simply the log listing restricted to only those entries that modified the file. A: SVN Log for a single file svn log filename.php SVN diff for changes on a file between ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Emacs and C++ Once again it is time to clean up my emacs setup. Before I go cleaning it up, are there any packages that you would recommend above and beyond c++-mode, cedet, ecb, speedbar etc. ? Especially stuff that's new in the last five years. A: This could be helpful! A: I use msf-abbrevs package for inserting...
{ "language": "en", "url": "https://stackoverflow.com/questions/350768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: TinyMCE - Pasting from word I'm trying to configure TinyMCE so that it accepts pasting from Microsoft Word and cleans it up in an expected HTML hierarchy. Most of our editorial staff use a single line break to denote a line break and a double return to indicate a paragraph. However, MS Word's output puts the next l...
{ "language": "en", "url": "https://stackoverflow.com/questions/350777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: SQL query to calculate visit duration from log table I have a MySQL table LOGIN_LOG with fields ID, PLAYER, TIMESTAMP and ACTION. ACTION can be either 'login' or 'logout'. Only around 20% of the logins have an accompanying logout row. For those that do, I want to calculate the average duration. I'm thinking of somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/350780", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Working with hex numbers in MySQL I have a stored procedure that needs to convert hexadecimal numbers to their decimal equivalent. I've read the documentation for the UNHEX() function, but it is returning a binary value. What I'm wanting to do is something like this: CREATE PROCEDURE foo( hex_val VARCHAR(10) ) BEG...
{ "language": "en", "url": "https://stackoverflow.com/questions/350787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Can apache's ProxyRemote be used to proxy HTTPS requests to mongrel for processing? So I have a custom proxy that is written in ruby using mongrel to handle some fairly complex caching logic. This works great for both http and ftp requests, however since mongrel is not designed to handle https requests, I wish to f...
{ "language": "en", "url": "https://stackoverflow.com/questions/350789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I read other parameters in a multipart form with Apache Commons I have a file upload form that is being posted back to a servlet (using multipart/form-data encoding). In the servlet, I am trying to use Apache Commons to handle the upload. However, I also have some other fields in the form that are just pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/350794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How does Django Know the Order to Render Form Fields? If I have a Django form such as: class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField() sender = forms.EmailField() And I call the as_table() method of an instance of this form, Django will render the fie...
{ "language": "en", "url": "https://stackoverflow.com/questions/350799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: MFC Equivalent to Java File#isDirectory() Is there an equivalent to the Java File method isDirectory() in MFC? I tried using this : static bool isDirectory(CString &path) { return GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY; } but it doesn't seem to work. A: CFileFind::IsDirectory() http://msdn.micros...
{ "language": "en", "url": "https://stackoverflow.com/questions/350811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Newbie LINQ Question: Is Paging in LINQ Queries Possible? Is it possible to using "paging" functionality in Linq queries? Let's say I have some XML like this: <Root> <BetaSection> <Choices> <SetA> <Choice id="choice1">Choice One</Choice> <Choice id="choice2">...
{ "language": "en", "url": "https://stackoverflow.com/questions/350819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Combobox KeyDown event handler firing multiple times In VB.NET, I have a Combobox on a WinForm form. The form allows the user to type in a query to be searched. When the user hits the Enter key, a query is performed against the database and the results are returned as a DataTable. The DataTable is then bound to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/350832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would you architect visitor and admin functions in a single ASP.Net MVC web application? So I have been working on a small web application (site) for a group of friends of mine and have come to the realization that things need to change. The application has two faces to it * *a public facing side that serve...
{ "language": "en", "url": "https://stackoverflow.com/questions/350836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to minimize a ASP.NET C# project DLL size? I´m working on a project, in Visual Studio 2008, which DLL currently surpasses 20 MB. Is there a way to profile that DLL, searching the main contributors to this size? I suspect that breaking it in smaller projects inside the solution would help, but I'm looking for a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350843", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Google Base Query Problems I am querying Google Base using the .NET library pretty much as described on this page. http://code.google.com/apis/base/docs/2.0/developers_guide_dotnet.html When I run the query a GBaseFeed is returned and it will usually have the TotalRecords property set to something like 35, but in th...
{ "language": "en", "url": "https://stackoverflow.com/questions/350847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Possible to save an integer array using NSUserDefaults on iPhone? Is it possible to save an integer array using NSUserDefaults on the iPhone? I have an array declared in my .h file as: int playfield[9][11] that gets filled with integers from a file and determines the layout of a game playfield. I want to be able t...
{ "language": "en", "url": "https://stackoverflow.com/questions/350848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Least Squares C# library I am looking to perform a polynomial least squares regression and am looking for a C# library to do the calculations for me. I pass in the data points and the degree of polynomal (2nd order, 3rd order, etc) and it returns either the C0, C1, C2 etc. constant values or the calculated values ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Excel ODBC and 64 bit server using ASP.NET I need to update an excel template. Our server is running Windows 2008 in 64 bit mode. I am using the following code to access the excel file: ... string connection = @"Provider=MSDASQL;Driver={Microsoft Excel Driver (*.xls)};DBQ=" + path + ";"; ... IF the app...
{ "language": "en", "url": "https://stackoverflow.com/questions/350858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How bad is ignoring Oracle DUP_VAL_ON_INDEX exception? I have a table where I'm recording if a user has viewed an object at least once, hence: HasViewed ObjectID number (FK to Object table) UserId number (FK to Users table) Both fields are NOT NULL and together form the Primary Key. My question is, s...
{ "language": "en", "url": "https://stackoverflow.com/questions/350860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: WPF RichTextBox with no width set I have the following XAML code: <Window x:Class="RichText_Wrapping.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1"> <Grid> <RichTextBox Height="100" Margin="2" Name="richTextBox1"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Clicking on UITextField in a UITableViewCell I have an issue where when a textField is clicked on in a UITableViewCell, the method tableView:didSelectRowAtIndexPath: does not get invoked. The problem is, I need to scroll my tableView into proper position, otherwise the keyboard goes right over the first responder. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/350868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Can I have multiple php.ini files? I want to set the include_path variable in my php.ini file (C:\Windows\php.ini). But, I want different include_path values for different sites hosted on the same Windows server. How can I do this? A: http://php.net/manual/en/configuration.file.php says: php.ini is searched for in...
{ "language": "en", "url": "https://stackoverflow.com/questions/350880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Create, sort, and print a list of 100 random ints in the fewest chars of code What is the least amount of code you can write to create, sort (ascending), and print a list of 100 random positive integers? By least amount of code I mean characters contained in the entire source file, so get to minifying. I'm interest...
{ "language": "en", "url": "https://stackoverflow.com/questions/350885", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do you create "Aliases" in Apache Tomcat? I am working on a web application that allows users to upload attachments. These attachments are stored on a different drive than that of the web application. How can I create an alias (equivalent to Apache HTTP server's aliases) to this drive so that users can downloa...
{ "language": "en", "url": "https://stackoverflow.com/questions/350901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: git-svn on Windows. Where to get binaries? I want to use git as a local repository against a remote SVN repository. I installed version 1.6.0.2 from http://code.google.com/p/msysgit/downloads/list. According to the documentation synchronization is done via the command git svn or a separate command wrapper called ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Proper synchronization of Java threads using wait/notifyAll? Here is a simplified version of my application showing what I'm doing. /* in my app's main(): Runner run = new Runner(); run.dowork(); */ class Runner { private int totalWorkers = 2; private int workersDone = 0; public synchronize...
{ "language": "en", "url": "https://stackoverflow.com/questions/350914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I clear IE's cache when running Web Developer Express? I'm trying to debug some IE-only issues for a site I'm developing. I'm running WDE because there's no Firebug for IE. I want to see whether some changes fix a bug, but no matter what I do, IE never picks up my changes. I've tried all of the following: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I tell CPAN.pm where to get modules? Here is the complete install command to CPAN and the output: sudo perl -MCPAN -e "install Bundle::CPAN" CPAN: Storable loaded ok (v2.13) Going to read /home/delgreco/.cpan/Metadata Database was generated on Mon, 08 Dec 2008 03:27:10 GMT CPAN: LWP::UserAgent loaded ok (v2...
{ "language": "en", "url": "https://stackoverflow.com/questions/350919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: PHP new operator returning reference I'm working with some old PHP code that has a lot of the following: $someVar =& new SomeClass(); Did the new operator ever return a value, um, not by reference? (That feels strange to type. I feel like I'm losing my mind.) A: It was one of those sort of optimization technique...
{ "language": "en", "url": "https://stackoverflow.com/questions/350920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: printf("something\n") outputs "something " (additional space) (g++/linux/reading output file with gedit) I have a simple C++ program that reads stdin using scanf and returns results to stdout using printf: #include <iostream> using namespace std; int main() { int n, x; int f=0, s=0, t=0; scanf("%d",&n...
{ "language": "en", "url": "https://stackoverflow.com/questions/350922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Timing out tests in TestNG Thanks to a library upgrade (easymock 2.2 -> 2.4), we're having tests that have started locking up. I'd like to have a time out on individual tests, all of them. The idea is to identify the locked up tests - we're currently guessing - and fix them. Is this possible, preferably on a suite-w...
{ "language": "en", "url": "https://stackoverflow.com/questions/350941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Multi column primary keys? For example I have 2 tables, Users and UserRelations, and it is a one to many relationship. For the UserRelations table, I can have an identity column and make it the primary key: [RelationID] [int] IDENTITY(1,1) NOT NULL, [UserID] [int] NOT NULL, [TargetID] [int] NOT NULL, Or I can desi...
{ "language": "en", "url": "https://stackoverflow.com/questions/350950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# Extension Method Oddity during Unit Test Using Visual Studio 2008 / C# / VS Unit Testing. I have a very straightforward extension method, that will tell me if an object is of a specific type: public static bool IsTypeOf<T, O>(this T item, O other) { if (!(item.GetType() is O)) return false; else ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Disabling redraw in WinForms app I'm working on a C#.Net application which has a somewhat annoying bug in it. The main window has a number of tabs, each of which has a grid on it. When switching from one tab to another, or selecting a different row in a grid, it does some background processing, and during this the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/350956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: help with an index Ok, I'm not great in mysql, but I know an index would help me out here, however I've done some plugging and can't find one to help... Anyone got any ideas? explain select `users_usr`.`id_usr` AS `id_usr`, `users_usr`.`firstname_usr` AS `firstname_usr`, `users_usr`.`lastname_usr` AS `lastname_...
{ "language": "en", "url": "https://stackoverflow.com/questions/350961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I make NetBeans not stop on the first line with xdebug? I'm using NetBeans 6.5 for developing PHP and I have xdebug setup. Is there a way I can tell it not to stop on the first line of the file on every request? JIT mode won't fix this because I don't want it to stop on every exception that I catch. A: For ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How to make my program DEP-compatible? I have a windows forms (.net 3.0) project that won't run on my customer's vista computer due to a DEP error. It runs on my vista machine, and in a clean version of vista sp1 in a virtual machine. I am having trouble tracking down ways to make my program DEP, Data Execution Prev...
{ "language": "en", "url": "https://stackoverflow.com/questions/350977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Switching from GUI to Command Prompt in Java? My professor assigned a project where a simulation is ran through a GUI. To edit it, we need to create a "New" menu item. We haven't learned how to get data from a GUI, and our book does not cover it at all. What I'm trying to do, is when the "New" command is hit, focus...
{ "language": "en", "url": "https://stackoverflow.com/questions/350978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Code Coverage generic functions/parameters? I am working on some code coverage for my applications. Now, I know that code coverage is an activity linked to the type of tests that you create and the language for which you wish to do the code coverage. My question is: Is there any possible way to do some generic code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How long does it take before a web page is saved in Google Cache? I've heard a lot of people asking how long information stays in Google Cache. To me, this is irrelevant (at least until someone libels my name). A: It depends. Google visits frequent-changing pages more often than static sites. And if google doesn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why is VB.net so verbose? Is it possible to trim down the fat? Do languages become more verbose as they mature? It feels like each new version of VB.net gains more syntax. Is it possible to trim down some fat like the keyword "Dim"? C# also feels like it is getting more syntax since version 1. A: There's nothing wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/350991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why is this code stopping? VB ASP.NET Hey I am coding using Visual Studio 2003. My program worked fine until I introduced a dll I made using CreateObject. Code: Set docs2 = server.CreateObject("DocGetter.Form1") docs2.GetDocument oXMLDom,numID It appears to be getting stuck at this code. I've already used regasm to...
{ "language": "en", "url": "https://stackoverflow.com/questions/350993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I change the scrollbar color in Emacs? Is it possible to change the scrollbar color in emacs? (Note: Not XEmacs) If it matters, I'm running emacs 22 on Ubuntu 8.10. A: In what environment? In, eg, Carbon EMACS, the scrollbar widgets come from the carbon native set; if so, you can't really change the color. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/350995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Four nodes with a width of 25% don't fit next to each other? I have a header node in which four child nodes reside. None have borders, padding nor margins. All four of them have the width:25%; css rule. In Opera it works just fine, in IE the last block flips to the next line sometimes depending on the width of the w...
{ "language": "en", "url": "https://stackoverflow.com/questions/351000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: php: pushing to an array that may or may not exist I want to create an array with a message. $myArray = array('my message'); But using this code, myArray will get overwritten if it already existed. If I use array_push, it has to already exist. $myArray = array(); // <-- has to be declared first. array_push($myArra...
{ "language": "en", "url": "https://stackoverflow.com/questions/351017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: An XSD to describe XSDs I have an application into which users can upload an XSD to describe certain kinds of user data. The application needs to parse this XSD to correctly initialise various bits of database metadata (e.g. translating xs:enumerations into lists of permitted values that will populate drop-down list...
{ "language": "en", "url": "https://stackoverflow.com/questions/351022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you put a breakpoint on a memory location in dbx? A co-worker has a C program that fails in a predictable manner because of some corrupted memory. He'd like to use dbx to monitor the memory location once it's allocated in order to pinpoint the code that causes the corruption. Is this possible? If so what is...
{ "language": "en", "url": "https://stackoverflow.com/questions/351052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Attaching source to a system scoped dependency I have a dependency which is scoped as "system". I'd like to know if there's a way to define the attached source and javadoc for the dependency. This seems like something that should've been taken care of, but I can't seem to fine any documentation on it or why it was ...
{ "language": "en", "url": "https://stackoverflow.com/questions/351055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Space between two rows in a table? Is this possible via CSS? I'm trying tr.classname { border-spacing: 5em; } to no avail. Maybe I'm doing something wrong? A: I stumbled upon this while struggling with a similar issue. I've found Varun Natraaj's answer to be quite helpful, but I would use a transparent border ...
{ "language": "en", "url": "https://stackoverflow.com/questions/351058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "861" }
Q: How do I call a VSTO function from a formula in excel? I'd like to be able to call a function exposed by a VSTO addin from a cell in an excel worksheet. More specifically, if I have a VSTO function Foo() that returns "bar" I'd like to be able to write =Foo() in A1 which evaluates to "bar" on calculation. Is this pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/351069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: asmx wsdl loading forever I have a web service application which has suddenly stopped working. I have enabled directory browsing in IIS, and can view the application directory. I can view the xml files within the application directory, but I cannot view the .config files, nor can I view the wsdls of any of the web...
{ "language": "en", "url": "https://stackoverflow.com/questions/351078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Google Sitemap - Should I provision for load control / caching? I have a community site which has around 10,000 listings at the moment. I am adopting a new url strategy something like example.com/products/category/some-product-name As part of strategy, I am implementing a site map. Google already has a good index o...
{ "language": "en", "url": "https://stackoverflow.com/questions/351096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: creating immutable objects in JSPs I know you can use the <jsp:useBean> tag to instantiate objects within JSPs without resorting to scriptlet code. However I'd like to instantiate an Integer who value is the result of an EL expression, something like: <jsp:useBean id="total" class="java.lang.Integer"> <jsp:setPr...
{ "language": "en", "url": "https://stackoverflow.com/questions/351117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where can I find a list of SocketErrorCode and NativeErrorCode thrown by SocketException? A SocketException has a SocketErrorCode and NativeErrorCode. I would like to find a list where these codes (or the common onces) are listed so I can respond in proper fasion. Does anybody know where to find such a list? A: MSD...
{ "language": "en", "url": "https://stackoverflow.com/questions/351120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Lookups in VB.NET Bogging Down LDAP Server My DBAs have informed me that one of my applications is really bogging down one of our LDAP servers. I've looked at the code several times, but I can't see any way to limit the amount of times I have to hit LDAP. So now I've decided to look at the way that I am actually o...
{ "language": "en", "url": "https://stackoverflow.com/questions/351121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Size of data obtained from SQL query via ODBC API Does anybody know how I can get the number of the elements (rows*cols) returned after I do an SQL query? If that can't be done, then is there something that's going to be relatively representative of the size of data I get back? I'm trying to make a status bar that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/351122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert a String to Stream I've download an image from the Internet and converted to a String (This is not changeable) Dim Request As System.Net.WebRequest = _ System.Net.WebRequest.Create( _ "http://www.google.com/images/nav_logo.png") Dim WebResponse As System.Net.HttpWebResponse = _ DirectCast(Request.GetR...
{ "language": "en", "url": "https://stackoverflow.com/questions/351126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How to get function's name from function's pointer in Linux kernel? How to get function's name from function's pointer in C? Edit: The real case is: I'm writing a linux kernel module and I'm calling kernel functions. Some of these functions are pointers and I want to inspect the code of that function in the kernel s...
{ "language": "en", "url": "https://stackoverflow.com/questions/351134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: How do you get access to the current System.Web.Routing.RequestContext from within a custom helper method in ASP.NET MVC? I'm writing a helper method for ASP.NET MVC and I need to call Url.Content to get an appropriate URL for the context. However, in order to create a new UrlHelper() I need to get the current Requ...
{ "language": "en", "url": "https://stackoverflow.com/questions/351149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: .Net: Read properties of and disable the screensaver and other power schemes I have a long-running GUI application that outputs various statuses to the user. The user wants to view every status but doesn't want to worry about the screensaver kicking in after the inactivity settings. Preferably in C#, how do I read ...
{ "language": "en", "url": "https://stackoverflow.com/questions/351160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Removing duplicate rows in vi? I have a text file that contains a long list of entries (one on each line). Some of these are duplicates, and I would like to know if it is possible (and if so, how) to remove any duplicates. I am interested in doing this from within vi/vim, if possible. A: I would combine two of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/351161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "147" }
Q: Dealing with lots of input parameters, lots of outputs I need to perform a complicated calculation. In my case it seemed most natural to create a Calculator class (abstracted using a strategy pattern). To perform the calculation the class needs to accept about 20 inputs, some of which are optional, some of which cou...
{ "language": "en", "url": "https://stackoverflow.com/questions/351165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to escape slash (/) in VBScript? How do you escape the forward slash character (/) in VBScript? For example, in the following string: bob = "VU administration/front desk" A: This is so wrong I have to comment on it. The question is about VBScript, not PHP, so who cares what PHP does with a slash? In VB, the f...
{ "language": "en", "url": "https://stackoverflow.com/questions/351172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Paging Lucene's search results I am using Lucene to show search results in a web application.I am also custom paging for showing the same. Search results could vary from 5000 to 10000 or more. Can someone please tell me the best strategy for paging and caching the search results? A: I would recommend you don't cach...
{ "language": "en", "url": "https://stackoverflow.com/questions/351176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Starting WPF project. Build own controls or buy? I am starting a WPF project, which will be fairly complicated in complexity and will make use of a lot of modern UIs, like outlook bar, grids, tabs, etc... I've looked around in the marketplace and there aren't too many control suites. Some of the available ones are...
{ "language": "en", "url": "https://stackoverflow.com/questions/351179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a simple way to detect mouse or keyboard activity in Linux/Xorg/Qt4/Kde4? Is there a simple way to detect mouse or keyboard activity in Linux or Xorg or Qt4 or Kde4 environment? Obviously not only on a particular window but in the entire Xorg desktop. A: You can use the XScreenSaver extension (man Xss). It...
{ "language": "en", "url": "https://stackoverflow.com/questions/351185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting absolute position and rotation from inside a scene graph? So I have run up against this problem a few times: I have some object in my 3D Scene Graph which is a child of some other object. Lets call them c (Child) and p (Parent). c's position is defined relative to p. Thus c may have a position (1,0,0) but of...
{ "language": "en", "url": "https://stackoverflow.com/questions/351197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Enumeration management with zend framework (ZF)? Is there any existing project or incubator to manage user administratable lists of options? We have several 100 lists (most populate dropdowns in our application), many are quite short < 50 items, several with a few hundred items and a handful with thousands (<30,000)...
{ "language": "en", "url": "https://stackoverflow.com/questions/351199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bad idea to chain exceptions with RMI? Is it a bad idea to use exception chaining when throwing RemoteExceptions? We have an RMI server that does something like this: public Object doSomething() throws RemoteException { try { return getData(); } catch (CustomException ex) { throw...
{ "language": "en", "url": "https://stackoverflow.com/questions/351205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Optimal DB structure for additional fields entity I have a table in a DB (Postgres based), which acts like a superclass in object-oriented programming. It has a column 'type' which determines, which additional columns should be present in the table (sub-class properties). But I don't want the table to include all po...
{ "language": "en", "url": "https://stackoverflow.com/questions/351214", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Should I ignore InterfaceMethodsShouldBeCallableByChildTypes for WPF generated code? When using FxCop 1.36 for a WPF application with a single window that has yet to be modified, I get the InterfaceMethodsShouldBeCallableByChildTypes error with the following details: Target : #System.Windows.Markup.ICompon...
{ "language": "en", "url": "https://stackoverflow.com/questions/351228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: copy hdc contents to bitmap How could you copy the contents of an HDC to a bitmap? A: Off the top of my head I think you need to: * *Create a new DC compatible with the source DC. Call this the memory DC. *Create a new bitmap of the correct size. *Select the bitmap into the memory DC. *BitBlt the source DC in...
{ "language": "en", "url": "https://stackoverflow.com/questions/351236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }