text
stringlengths
8
267k
meta
dict
Q: How did you choose your Visual Studio productivity addon? I'm evaluating Visual Studio productivity addons for my development team, which includes some folks who are very new to C# and some folks who are very experienced. We don't use VB.NET. I personally like ReSharper, but before I suggest something that I persona...
{ "language": "en", "url": "https://stackoverflow.com/questions/166987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java table model design I have a table class that creates modifies a table of items. I want to display those items in a JTable using a table model. To me table model belongs to my GUI package but table needs table model in order to fire changes and table model needs table class in order to display it so I can not se...
{ "language": "en", "url": "https://stackoverflow.com/questions/166996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Perforce repository monitor for Windows I used to work with Subversion and a system tray tool (SVN Notifier) to monitor the repository so I would immediately see when my local copy was not up-to-date anymore, and I am wondering if some equivalent was available for Perforce (on Windows). A: stimms answer will certa...
{ "language": "en", "url": "https://stackoverflow.com/questions/167002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Need a regular expression to match three character strings I generally stay away from regular expressions because I seldom find a good use for them. But in this case, I don't think I have choice. I need a regex for the following situation. I will be looking at three character strings. It will be a match if the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/167003", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using nmake with wildcards in the makefile I am attempting to set up an nmake makefile to export our balsamiq mockup files to png files automatically, but I'm afraid I can't make heads nor tails of how to make a generic rule for doing so, without explicitly listing all the files I want exported. This page details th...
{ "language": "en", "url": "https://stackoverflow.com/questions/167004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Fast compiler error messages in Eclipse As a new Eclipse user, I am constantly annoyed by how long it takes compiler error messages to display. This is mostly only a problem for long errors that don't fit in the status bar or the "Problems" tab. But I get enough long errors in Java—especially with generics—that this...
{ "language": "en", "url": "https://stackoverflow.com/questions/167007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best practice for creating subversion repositories? Our team (5-10 developers) plans to adopt Subversion for our .NET (Visual Studio) projects/solutions (VisualSVN Server, TortoiseSVN / VisualSVN). What is the best way to organize a new repository tree? Is it okay to use one big repository or is it better to create...
{ "language": "en", "url": "https://stackoverflow.com/questions/167014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Should I use threading and recursion together? I have been tinkering with BSP trees for a while now and am also playing with threads. When adding a triangle to a BSP tree, an opportunity arises to create a new thread for the purposes of processing data in parallel. insert(triangle, bspnode) { .... else if(tria...
{ "language": "en", "url": "https://stackoverflow.com/questions/167018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do you right-justify text in an HTML textbox? I have a need to display many numerical values in columns. These values need to be easily editable so I cannot just display them in a table. I am using textboxes to display them. Is there a way for me to right-justify the text displayed in a textbox? It would also be...
{ "language": "en", "url": "https://stackoverflow.com/questions/167027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "73" }
Q: Programmatically change keyboard to Dvorak Does anyone know the API call I can use to change the keyboard layout on a windows machine to Dvorak? Doing it through the UI is easy but I'd like to have a script that I can run on new VM's to automate the process. A: You can do this via the registry. Just save it as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Multiple database connection I'm trying to understand the best way to get the connection to my databases. At the moment I've got a method which parses the URL (depending on the URL called the application has to connect to a different database, like customer1.example.com will connect to the customer1 database) and ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/167053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Adding durability to in-memory data structures What are some of the popular techniques you can adopt to add durability to your in-memory data structures (ie) if the process crashes, you can preserve all previously executed operations on that data structure? If my data structure involves just a list of tuples, then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Localizing applications on Mac OS I have an application which is supposed to work on both windows and Mac and is localized in Portuguese, Spanish and German. I have an ini file from where the localized strings are read from. But the ini file doesn't work with same encoding for the files on both platforms. For Window...
{ "language": "en", "url": "https://stackoverflow.com/questions/167066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL Limit with Many to Many Relationship Given a SCHEMA for implementing tags ITEM ItemId, ItemContent TAG TagId, TagName ITEM_TAG ItemId, TagId What is the best way to limit the number of ITEMS to return when selecting with tags? SELECT i.ItemContent, t.TagName FROM item i INNER JOIN ItemTag it ON i.id = it.Item...
{ "language": "en", "url": "https://stackoverflow.com/questions/167067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# code from desktop to the web If I develop a desktop app using C#, and later want to turn it into a webapp but don't want to use ASP.NET, what are my options? I did a bit of searching and it looks like there doesn't appear to be a good solution to integrate C# code with any scripting language other than running i...
{ "language": "en", "url": "https://stackoverflow.com/questions/167073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Do MembershipProviders in ASP.net MVC affect stylesheet links? I changed the MembershipProvider in my ASP.net MVC website, and now the stylesheet for the login page isn't referenced correctly. Below is a copy of the forms tag in my web.config if that could be the reason. It looks identical though to the one generate...
{ "language": "en", "url": "https://stackoverflow.com/questions/167074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Moving existing code to Test Driven Development Having recently discovered this method of development, I'm finding it a rather nice methodology. So, for my first project, I have a small DLL's worth of code (in C#.NET, for what it's worth), and I want to make a set of tests for this code, but I am a bit lost as to ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/167079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: Detecting Graphic Options in .NET What is the the best of detecting and later altering the screen resolution and multiple desktop within .net I have a small app that while runs at work on my multiple monitor/high(ish) resolution however what I want to be able to detect is the users primary monitor and set the applic...
{ "language": "en", "url": "https://stackoverflow.com/questions/167084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the proper naming convention for a web service in .NET? I'm creating a webservice, and I want to name it appropriately. Right now my service is named Service as per the /App_Code/Service.cs Should I rename it to something like: com.example.MyWebService.cs? How do I get around the class file not excepting '.'...
{ "language": "en", "url": "https://stackoverflow.com/questions/167088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is the order of objects returned by FOREACH stable? Is it safe to assume that two itterations over the same collection will return the objects in the same order? Obviously, it is assumed that the collection has not otherwise been changed. A: While the answer is “yes” for all builtin collections and probably any sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/167096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do I limit which countries can view my website ( PHP ) In there an easy way to do this in PHP. I want to make sure that only web requests from certain countries are able to access my website. Any ideas? A: Like Gilles, I've used MaxMind's GeoIP stuff for this in the past - configured with the PECL extension for...
{ "language": "en", "url": "https://stackoverflow.com/questions/167106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Does static array constness affect shared library layout? Consider these two C++ header cases: Case 1: class Test { public: static int TEST_DATA[]; }; int Test::TEST_DATA[] = { 1, 2, 3, 4 }; Case 2: class Test { public: static int const TEST_DATA[]; }; int const Test::TEST_DATA[] = { 1, 2, 3, 4 }; Is c...
{ "language": "en", "url": "https://stackoverflow.com/questions/167109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Removing a subset of a dict from within a list This is really only easy to explain with an example, so to remove the intersection of a list from within a dict I usually do something like this: a = {1:'', 2:'', 3:'', 4:''} exclusion = [3, 4, 5] # have to build up a new list or the iteration breaks toRemove = [] for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# - IEnumerable to delimited string What is the functional programming approach to convert an IEnumerable<string> to a delimited string? I know I can use a loop, but I'm trying to wrap my head around functional programming. Here's my example: var selectedValues = from ListItem item in checkboxList.It...
{ "language": "en", "url": "https://stackoverflow.com/questions/167129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How to properly use Struts ActionForms, Value Objects, and Entities? I've inherited a large Java app that uses Struts, Spring, and Hibernate. The classes and interfaces I deal with daily are: Struts Actions, Struts ActionForms, Value Objects, Service Interfaces and Implementations, DAO Interfaces and Implementations...
{ "language": "en", "url": "https://stackoverflow.com/questions/167131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: asp.net frameworks and libraries every developer should know...and use I'm still kinda new in ASP.NET and recently I found out about SubSonic, which I started to use. Now it seems funny and such a waste of time (and nerves) when I look back into times when I was developing without SubSonic and jQuery. And there prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/167151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Avoiding code change with Microsoft SQLServer and Unicode How can you get MSSQL server to accept Unicode data by default into a VARCHAR or NVARCHAR column? I know that you can do it by placing a N in front of the string to be placed in the field but to by quite honest this seems a bit archaic in 2008 and particuaril...
{ "language": "en", "url": "https://stackoverflow.com/questions/167152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Logic: Database or Application/2 (constraints check) This is a specific version of this question. I want to check if I am inserting a duplicate row. Should I check it programmatically in my application layer: if (exists(obj)) { throw new DuplicateObjectException(); } HibernateSessionFactory.getSession().save(obj...
{ "language": "en", "url": "https://stackoverflow.com/questions/167154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to copy files from one code project to another I have multiple branches of a project checked out, each under their own directory (pretty standard). src/branch1/some/code/directories src/branch2/some/code/directories I often find myself wanting to copy selected files from one branch to another. An example woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/167159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What C/C++ functions are most often used incorrectly and can lead to buffer overflows? I've been asked to maintain a large C++ codebase full of memory leaks. While poking around, I found out that we have a lot of buffer overflows that lead to the leaks (how it got this bad, I don't ever want to know). I've decided ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: JPA and 2 simple tables I have 2 tables: A s_id(key) name cli type B sa_id(key) s_id user pwd So in Jpa I have: @Entity class A...{ @OneToMany(fetch=FetchType.EAGER) @JoinTable( name="A_B", joinColumns={@JoinColumn(name="a_id", table="a",unique=false)}, inverseJoinColumns={@JoinColumn(name="b_id",...
{ "language": "en", "url": "https://stackoverflow.com/questions/167193", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What C/C++ tools can check for buffer overflows? I've been asked to maintain a large C++ codebase full of memory leaks. While poking around, I found out that we have a lot of buffer overflows that lead to the leaks (how it got this bad, I don't ever want to know). I've decided to removing the buffer overflows first....
{ "language": "en", "url": "https://stackoverflow.com/questions/167199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: PHP Module for reading torrent files Is there a PHP module that you can use to programmatically read a torrent to find out information about it, Seeders for instance? A: Google comes up with this PHP client on sourceforge and this torrent class on PHP classes. Should be all you need. A: Torrent files are basically...
{ "language": "en", "url": "https://stackoverflow.com/questions/167206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: RSpec Stories and Specs: When to use what? So I want to start using RSpec stories, but I am not sure where writing controller, model and view specs fit in. For example, you have the story "Logging in" with "User provides wrong password" scenario, don't you end up testing the same stuff than controller/model specs (...
{ "language": "en", "url": "https://stackoverflow.com/questions/167210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to obtain the sign of a Number in ActionScript 3.0? I have a variable of type Number, and i like to obtain the sign (if is '-' i like to have -1 and if '+' i like to have 1). So, i made this: var sign = Math.abs(n) / n; But, there is any other way? Better than this? A: That will give you an error if n is zero....
{ "language": "en", "url": "https://stackoverflow.com/questions/167224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Changing the application pool through a Web Deployment Project Is there a way to configure a Visual Studio 2005 Web Deployment Project to install an application into a named Application Pool rather than the default app pool for a given web site? A: You can use a CustomAction to modify IIS during deployment, Here is...
{ "language": "en", "url": "https://stackoverflow.com/questions/167232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: rsync ignoring --SUFFIX option rsync -auve ssh --backup --suffix='2008-10-03-1514539' --backup-dir='/tmp/' module.pm root@web1:/path/to/module.pm I run this command without the --backup-dir option and when it copies the file over, it creates a backup with a current timestamp. When I include the --backup-dir option,...
{ "language": "en", "url": "https://stackoverflow.com/questions/167233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the best way to tell if your perl's running on -e? The question is not how to tell in a oneliner. If you're writing the code in a one-liner, you know you are. But how does a module, included by -MMy::Module::Name know that it all started from a oneliner. This is mine. It's non-portable though and relies on U...
{ "language": "en", "url": "https://stackoverflow.com/questions/167238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I wrap a transaction around Membership.CreateUser? I'm using the asp.net SqlMembershipProvider and LinqToSql in a hobby/learning application. I have some user properties that I'm keeping in LinqtoSql, so my flow is: Membership.CreateUser -> MyClass.AddUserDetails. I'd like to wrap the whole thing in a transa...
{ "language": "en", "url": "https://stackoverflow.com/questions/167242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Stopping a function from been overridden in Delphi How do I stop a function/procedure in a superclass from been overridden in a subclass in Delphi (2007)? I want to mark it so it can not be altered, I believe there is a final keyword but can not for the life of me find the documentation for it, so I am not 100% sure...
{ "language": "en", "url": "https://stackoverflow.com/questions/167247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I access a private key with the ASPNET user account? I'm having some trouble importing and accessing a private key with the ASPNET user. I know that when one imports a private key (.pfx file) manually, in windows, you get an option to mark the key as exportable. Now, as far as I can tell, this is needed in o...
{ "language": "en", "url": "https://stackoverflow.com/questions/167252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Watching a table for change in MySQL? Is there a better way to watch for new entries in a table besides selecting from it every n ticks of time or something like that? I have a table that an external program updates very often, and clients can watch for this new data as it arrive, how can I make that without having ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How do you make a web application in Clojure? I suppose this is a strange question to the huge majority of programmers that work daily with Java. I don't. I know Java-the-language, because I worked on Java projects, but not Java-the-world. I never made a web app from scratch in Java. If I have to do it with Python, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "219" }
Q: How to prevent multiple database users from overwriting each other's data? If two users are accessing same database table, how do we prevent users from overwriting each other’s data? A: Look at This discussion for a review of different strategies or techniques for database locking in an application. A: There is no...
{ "language": "en", "url": "https://stackoverflow.com/questions/167282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get Https URL content I have a https link that requires user login & password. If I run it in FX like this: https://usernameassword@www.example.com/link/sublink it will return the xml data as expected. However, what i'm trying to do, is to automate this process. I try to use file_get_contents() in PHP. I even...
{ "language": "en", "url": "https://stackoverflow.com/questions/167294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I export the data in a DataGridView data to an Excel spreadsheet? In my Winforms application, I want to export the data from my DataGridView to a Excel spreadsheet. Is it simply a job of looping and outputting the results comma seperated? A: Is it simply a job of looping and outputing the results comma sepe...
{ "language": "en", "url": "https://stackoverflow.com/questions/167297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: non-DB attr_accessor attribute persistence in Rails I have an application in which attr_accessor is being used to keep temporary data for a model which will be passed to a rake task. Seeing there is not a database field for these attributes and they are not being calculated from database data, will the attr_accesso...
{ "language": "en", "url": "https://stackoverflow.com/questions/167302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to Pivot data using LINQ? I am wondering if it is possible to use LINQ to pivot data from the following layout: CustID | OrderDate | Qty 1 | 1/1/2008 | 100 2 | 1/2/2008 | 200 1 | 2/2/2008 | 350 2 | 2/28/2008 | 221 1 | 3/12/2008 | 250 2 | 3/15/2008 | 2150 into somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/167304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "186" }
Q: validating and adjusting a treeview label I've got a treeview control, and have caught its after-label-edit event. I want to be able to validate the user's input and adjust it - if for instance it's too long - but I only seem able to cancel the new value, not change it. Any ideas? I don't want to have to open a ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/167306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get the last possible time of a particular day I'm trying to achieve the last possible time of a particular day eg for Date of 2008-01-23 00:00:00.000 i would need 2008-01-23 23:59:59.999 perhaps by using the dateadd function on the Date field? A: Add -1 milliseconds to the start of the next day (DateAdd e...
{ "language": "en", "url": "https://stackoverflow.com/questions/167316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How to open a form in a thread and force it to stay open I am still having problems with figuring out how to create winforms in a separate UI thread that I discussed here. In trying to figure this out I wrote the following simple test program. I simply want it to open a form on a separate thread named "UI thread" a...
{ "language": "en", "url": "https://stackoverflow.com/questions/167323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: (Vocal code) Need some help finding text-to-speech addon I am looking for an addon that can say characters vocally. It is for non-commercial use, and it would be nice if it can vocalize more languages, like asian, english etc... I have googled it, but can't seem to find anything for free use. Update: This is for web...
{ "language": "en", "url": "https://stackoverflow.com/questions/167325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Class data responsibilities I have a 'Purchase Order' class. It contains information about a single purchase order. I have a DAO class for database methods. Where should the responsibility reside for the methods that will load and update the purchase order? Should the PurchaseOrder class have '.update', 'insert', 'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/167330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# Lambda expressions: Why should I use them? I have quickly read over the Microsoft Lambda Expression documentation. This kind of example has helped me to understand better, though: delegate int del(int i); del myDelegate = x => x * x; int j = myDelegate(5); //j = 25 Still, I don't understand why it's such an inn...
{ "language": "en", "url": "https://stackoverflow.com/questions/167343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "317" }
Q: How do I see what files were changed between 2 revisions? I just want to see what files were modded/added/deleted between 2 arbitrary revisions. How do I do this? Can I do this in tortoise as well? A: Right click the directory containing your repo. Choose SVN Show Log. Control+Click the two revisions. Right clic...
{ "language": "en", "url": "https://stackoverflow.com/questions/167371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Any clever way to launch a makefile in Visual Studio only if build succeeded? We have a makefile that is built last in our build process using Visual Studio to launch our unit tests. Unfortunately if the build fails the makefile is still processed and we have extra (annoying) errors. Any way to prevent that? Example...
{ "language": "en", "url": "https://stackoverflow.com/questions/167388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Lisp Web Frameworks? What are the popular (ok, popular is relative) web frameworks for the various flavours of LISP? A: For Clojure you can try Compojure. A: Common Lisp A lot of the usual suspects (Hunchentoot, UCW, LoL) have already been mentioned. Franz makes available for Allegro Common Lisp (and ported to oth...
{ "language": "en", "url": "https://stackoverflow.com/questions/167397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: Eclipse for IntelliJ Idea Users I have a coworker who is looking to switch from InteilliJ Idea to Eclipse, and is concerned about not knowing the Eclipse set of commands. I was wondering - would anyone have a link to keyboard mappings that can set Eclipse commands to at least sort of match Idea? Have you made this...
{ "language": "en", "url": "https://stackoverflow.com/questions/167400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I just get the "Year" portion from the output of timespan( ) in CodeIgniter? I have a "Date of Birth" field, and trying to use the timespan() method to get the age in years. But returns "28 Years, 2 Months, 2 Weeks, 3 Days, 15 Hours, 16 Minutes". Any idea how I can just get the "28 Years" portion? A: I sugg...
{ "language": "en", "url": "https://stackoverflow.com/questions/167406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Subversion and revision engineering - what are the best web resources to read about? We are migrationg from CVS to SVN and embracing some kind of revision management in order to enforce order to development/testing/release cycle. We are currently testing, developing and releasing on the same code line, we know its a...
{ "language": "en", "url": "https://stackoverflow.com/questions/167413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is an atomic file rename (with overwrite) possible on Windows? On POSIX systems rename(2) provides for an atomic rename operation, including overwriting of the destination file if it exists and if permissions allow. Is there any way to get the same semantics on Windows? I know about MoveFileTransacted() on Vista and...
{ "language": "en", "url": "https://stackoverflow.com/questions/167414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: Using .Net Framework Source debugging I'm getting a null-object exception deep within XsltCompiledTransform, and I'd like to use the .Net Framework Source debugging feature to see what isn't being initialized, but even after following the directions for enabling it, I can't figure out how to step into the .Transform...
{ "language": "en", "url": "https://stackoverflow.com/questions/167415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Share auto-incremented primary key between two tables Hi I want to have two tables each have an INT "id" column which will auto-increment but I don't want either "id" columns to ever share the same number. What is this called and what's the best way to do it? Sequence? Iterator? Index? Incrementor? Motivation: we're...
{ "language": "en", "url": "https://stackoverflow.com/questions/167416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Issue With Python Sockets: How To Get Reliably POSTed data whatever the browser? I wrote small Python+Ajax programs (listed at the end) with socket module to study the COMET concept of asynchronous communications. The idea is to allow browsers to send messages real time each others via my python program. The trick i...
{ "language": "en", "url": "https://stackoverflow.com/questions/167426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Creating a ruler bar in MFC What's the best way to go about creating a vertical and horizontal ruler bars in an SDI app? Would you make it part of the frame or the view? Derive it from CControlBar, or is there a better method? The vertical ruler must also be docked to a pane and not the frame. To make it a little ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best vbscript code to add decimal places to all numbers in a string? Example G76 I0.4779 J270 K7 C90 X20 Y30 If a number begins with I J K C X Y and it doesn't have a decimal then add decimal. Above example should look like: G76 I0.4779 J270 K7. C90. X20. Y30. Purpose of this code is to convert CNC code...
{ "language": "en", "url": "https://stackoverflow.com/questions/167432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I enter a pound sterling character (£) into the Python interactive shell on Mac OS X? Update: Thanks for the suggestions guys. After further research, I’ve reformulated the question here: Python/editline on OS X: £ sign seems to be bound to ed-prev-word On Mac OS X I can’t enter a pound sterling sign (£) into...
{ "language": "en", "url": "https://stackoverflow.com/questions/167439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does anyone know some cool PL/SQL plugin for IntelliJ Idea? I've evaluated some plugins from official IntelliJ repository, but none of them seems to provide more then basic syntax highlighting. Even highlighting is limited. For example, Database Navigator doesn't highlight IF. It would be great to have proper highli...
{ "language": "en", "url": "https://stackoverflow.com/questions/167440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: trace.axd returns a 404 error On a .Net production server, I am unable to look at the Application trace. The web server returns a 404 error. When copying the files on my local computer, the trace works, making further testing impractical. The trace seems to be correctly set: <trace enabled="true" requestLimit="20" p...
{ "language": "en", "url": "https://stackoverflow.com/questions/167449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XSLT Abstractions I'm exploring the XML -> XSLT -> HTML meme for producing web content. I have very little XSLT experience. I'm curious what mechanisms are available in XSLT to handle abstractions or "refactoring". For example, with generic HTML and a service side include, many pages can be templated and decomposed ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Can I connect to SQL Server using Windows Authentication from Java EE webapp? I am currently investigating how to make a connection to a SQL Server database from my Java EE web application using Windows Authentication instead of SQL Server authentication. I am running this app off of Tomcat 6.0, and am utilizing the...
{ "language": "en", "url": "https://stackoverflow.com/questions/167464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Oracle merge constants into single table In Oracle, given a simple data table: create table data ( id VARCHAR2(255), key VARCHAR2(255), value VARCHAR2(511)); suppose I want to "insert or update" a value. I have something like: merge into data using dual on (id='someid' and key='testKe...
{ "language": "en", "url": "https://stackoverflow.com/questions/167471", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is it possible to have a List as a property on an active record class Is it possible to have a HasMany relationship of a basic type such as String, on an ActiveRecord class, without the need for creating another entity such as (TodoListItem) to hold the value. [ActiveRecord] public class TodoList { [PrimaryKey] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSThread and UIViewController interaction If I spawn a new thread, and then within it I push a new controller onto my UINavigationController, using code like this... (a) not working -(void)myCallbackInThread { // move on... UIApplication* app = [UIApplication sharedApplication]; [app changeView]; } then...
{ "language": "en", "url": "https://stackoverflow.com/questions/167487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL Server 2005 Using DateAdd to add a day to a date How do I in SQL Server 2005 use the DateAdd function to add a day to a date A: The following query I have used in SQL Server 2008, it may be help you. For add day DATEADD(DAY,20,GETDATE()) *20 is the day quantity A: DECLARE @date DateTime SET @date = GetDate() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: UpdatePanelAnimationExtender - Resize not working This is the page that I'm having. But the resize part in the section does not seem to be working. I copied most of the code from the Ajax site. I placed a alert() in the tag (line 108) to find the value of 'b._originalHeight' and it shows up as '44'. I have also tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/167502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to sort gridview by column containing nullable integer? I have a GridView where one column is bound to an object property containing a nullable integer. I set SortExpression to the name of the property, and sorting works perfectly as long as all rows contain a value. If any rows contain null, however, I get an e...
{ "language": "en", "url": "https://stackoverflow.com/questions/167509", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pros and Cons of Developing on a VM on a PC I recently build myself a semi beef up PC (Q9450, 8GB DDR2 1066, 1TB HDD, Dual 8600GT, Vista Ultimate and Dual 22' Monitors) and I'm evaluating whether i should develop on a VPC/VMWare session on top of Vista or not? One benefit I can see is that I can run the same VM on m...
{ "language": "en", "url": "https://stackoverflow.com/questions/167512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Naked Objects. Good or Bad I have recently been exposed to naked objects. It looks like a pretty decent framework. However I do not see it in widespread use like say, Spring. So why is this framework not getting any mainstream application credit. What are its shortcomings as you see? A: It has been successfully use...
{ "language": "en", "url": "https://stackoverflow.com/questions/167517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Best Voice Compression Algorithms/Formats We have some raw voice audio that we need to distribute over the internet. We need decent quality, but it doesn't need to be of musical quality. Our main concern is usability by the consumer (i.e. what and where they can play it) and size of the download. My experience has s...
{ "language": "en", "url": "https://stackoverflow.com/questions/167533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I declare a multi-column PK in MySQL I'm trying to create a table with two columns comprising the primary key in MySQL, but I can't figure out the syntax. I understand single-column PKs, but the syntax isn't the same to create a primary key with two columns. A: CREATE TABLE table_name ( c1 INT NOT NUL...
{ "language": "en", "url": "https://stackoverflow.com/questions/167542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to know if there is a (compiled in/kernel module) device driver controlling a device on a running linux? How can I know if a device is supported on a running Linux and if so, which device driver controls it? For instance, lspci on a server (PowerEdge 2900) gives: 00:00.0 Host bridge: Intel Corporation 5000X Chip...
{ "language": "en", "url": "https://stackoverflow.com/questions/167562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: NUnit: Running multiple assertions in a single test I have been asked to write a testing application that needs to test a new stored procedure on multiple rows in a database, in essence I want to do something like this: [Test] public void TestSelect() { foreach(id in ids) { DataTable old = Database.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/167567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Problems executing compiled 3.5 code on a server which only has the 2.0 framework I can't seem to get my application up and running on my dev server and I'm not sure why. I have compiled my code in VS 2008 with a target framework of 3.5. I am using 3.5 mainly because I have implemented LINQ rather extensively. Com...
{ "language": "en", "url": "https://stackoverflow.com/questions/167569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can one create package for ClearQuest? I am modifying ClearQuest database schema and I wonder is there a way to create a package for future deployment. If there isn't what are best practices for tracking and deployment of schema modifications? A: In your CQ installation path, look for this "cqload" tool. basica...
{ "language": "en", "url": "https://stackoverflow.com/questions/167572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Check if table exists in SQL Server I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements. Here are two possible ways of doing it. Which one is the standard/best way of doing it? First way: IF EXISTS (SELECT 1 FROM INFORMATION_SCHEM...
{ "language": "en", "url": "https://stackoverflow.com/questions/167576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1387" }
Q: Access to old, no longer available, feed entries I am working on a project that requires reliable access to historic feed entries which are not necessarily available in the current feed of the website. I have found several ways to access such data, but none of them give me all the characteristics I need. Look at thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/167577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there a way to prevent the VB6 compiler from shuffling the contents of files? For reasons unknown, the VB6 compiler often likes to reorder the contents of .vbp files and the control descriptor block at the top of .frm files (The code that describes the properties of controls on the form. Code that you don't see ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Visual Studio database project designers I have this huge legacy database that I'm trying to get under source control. I looked around here on stackoverflow and decided to use the Visual Studio 2008 database project, then committing stuff on svn. I successfully imported the schema into the project, but I can't find ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loading Assemblies into separate AppDomain, getting InvalidCastException I'm trying to load assemblies in a separate app domain, but am running into a very strange problem. Here's some code: public static void LoadAssembly(string assemblyPath) { string pathToDll = Assembly.GetCallingAssembly().CodeB...
{ "language": "en", "url": "https://stackoverflow.com/questions/167587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I add Dispose functionality to a C# UserControl? I have a class which implements UserControl. In .NET 2005, a Dispose method is automatically created in the MyClass.Designer.cs partial class file that looks like this: protected override void Dispose(bool disposing) { if (disposing && (components != n...
{ "language": "en", "url": "https://stackoverflow.com/questions/167602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Should the Network Service Account receive temp file permissions by default? Recently I was working with generating a PDF from Crystal Reports through a webform. It was failing, which I determined to be caused by the permissions settings on the c:\windows\temp dir. I gave the Network Service account full access t...
{ "language": "en", "url": "https://stackoverflow.com/questions/167605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How best to modify my model in Spring MVC if I care about IOC I am building an application using Spring MVC. I want to make certain changes to my Model for every Controller in the application. In particular, I want to insert certain extra data into the model which will be present for all pages of the application. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/167609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bindable LINQ vs. continuous LINQ What are the major difference between bindable LINQ and continuous LINQ? •Bindable LINQ: www.codeplex.com/bindablelinq •Continuous LINQ: www.codeplex.com/clinq One more project was added basing on the provided feedback: •Obtics: obtics.codeplex.com A: May I draw your attention to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/167622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Migration To Trac We are managing our development with Subversion over HTTPS, Bugzilla, and Mediawiki. Some of our developers have expressed an interest in migrating to Trac, so I have to evaluate what the cost of doing so would be. For both the wiki and bugzilla, we would need to either migrate the existing data...
{ "language": "en", "url": "https://stackoverflow.com/questions/167628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Using ldconfig on Linux Let's say I 've added a library foo.so.1.1.1 to a path that is included in /etc/ld.so.conf When I run ldconfig on the system I get the links foo.so.1.1 and foo.so.1 to foo.so.1.1.1 How can I change the behavior to also get the foo.so link to foo.so.1.1.1? A: Just make the symlink yourself: l...
{ "language": "en", "url": "https://stackoverflow.com/questions/167635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to INSERT an array of values in SQL Server 2005? How do I write the SQL code to INSERT (or UPDATE) an array of values (with probably an attendant array of fieldnames, or with a matrix with them both) without simple iteration? A: Simple way to concatenate the values into a list and pass it to the sp. In the sp u...
{ "language": "en", "url": "https://stackoverflow.com/questions/167643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Will targeting IE8 with conditional comments work? When IE8 is released, will the following code work to add a conditional stylesheet? <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="ie-8.0.css" /> <![endif]--> I've read conflicting reports as to whether this works with the beta. I'm hoping someone c...
{ "language": "en", "url": "https://stackoverflow.com/questions/167657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to change NSIS Error message about CRCCheck Some of my users are complaining about some odd errors my installers had after downloading them from my web server. This are NSIS installer that when downloaded came crippled or incomplete (usually because of slow Internet connections), the message is very clear "The i...
{ "language": "en", "url": "https://stackoverflow.com/questions/167667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any problems with SVN merge on a multi column ( tab delimited ) text file? I have a multi-column text file ( tab delimited ) that I use for localized text in my project. I picked this format since it can easily be edited by anyone in most text editors (and excel too). My makefile processes it into a bunch of defin...
{ "language": "en", "url": "https://stackoverflow.com/questions/167670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }