text
string
meta
dict
Q: Use Silverlight Isolated Storage To Keep Authentication Token? I would like to hear some opinions about using the isolated storage in Silverlight for storing sensitive data. For example, is it OK to store an authentication token (some GUID that identifies a server-side session) in this storage, or is it better to us...
{ "language": "en", "url": "https://stackoverflow.com/questions/252974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Full outer join in django How can I create a query for a full outer join across a M2M relationchip using the django QuerySet API? It that is not supported, some hint about creating my own manager to do this would be welcome. Edited to add: @S.Lott: Thanks for the enlightenment. The need for the OUTER JOIN comes fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/252976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Resource on computing time complexity of algorithms Is there any good resource (book, reference, web site, application...) which explains how to compute time complexity of an algorithm? Because, it is hard to make the things concrete in my mind. Sometimes it is talking about an iteration has time complexity of lg n;...
{ "language": "en", "url": "https://stackoverflow.com/questions/252985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is there an auto-update framework for C++/Win32/MFC (like Sparkle)? I've decided to add auto-update functionality to one of my applications and was looking for any existing solutions that compare the current running version with the latest version that is then downloaded from the web. I know Sparkle on Mac OSX which...
{ "language": "en", "url": "https://stackoverflow.com/questions/252986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to get database and tablenames along How to get all the database names and corresponding table names together ? A: CREATE TABLE #dbs ( DatabaseName VARCHAR(256), TableName VARCHAR(256) ) EXEC sp_msforeachdb 'INSERT INTO #dbs SELECT ''?'', [name] FROM dbo.SysObjects WHERE XType = ''U''' SELECT * FROM #dbs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/252988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Defining Up in the Direct3D View Matrix when Camera Is Constantly Moving In my Direct3D application, the camera can be moved using the mouse or arrow keys. But if I hard code (0,1,0) as the up direction vector in LookAtLH, the frame goes blank at some orientations of the camera. I just learned the hard way that when...
{ "language": "en", "url": "https://stackoverflow.com/questions/252991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Reliable real values generator for Excel for Office 2007 and Vista SP1 can you please tell me which add-in you are using to generate real/integer values in Excel 2007 (running on Vista SP1)? I have tried a couple of them and particularly Random Generator from AbleBits.com but there are some problems with entering l...
{ "language": "en", "url": "https://stackoverflow.com/questions/252999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best online reading to understand .NET Code Access Security? I'm thinking about learning CAS, but I need to quickly grasp basic architecture, performance implications and if it at all suits my needs. What should I read? A: MSDN itself provides the info here. You also can refer to patterns and practices advocated by...
{ "language": "en", "url": "https://stackoverflow.com/questions/253002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I mock objects without inheritance (in C)? We use a simple object model for our low level networking code at work where struct pointers are passed around to functions which are pretending to be methods. I've inherited most of this code which was written by consultants with passable C/C++ experience at best an...
{ "language": "en", "url": "https://stackoverflow.com/questions/253013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to configure the import path in Visual Studio IronPython projects I have built the IronPythonIntegration solution that comes with the Visual Studio 2005 SDK (as explained at http://www.izume.com/2007/10/13/integrating-ironpython-with-visual-studio-2005), and I can now use IronPython projects inside Visual Studio...
{ "language": "en", "url": "https://stackoverflow.com/questions/253018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: CListBox's Item size changed when changing the size of the list box even if I specify the size in MeasureItem() method? I used a class which derives from CListBox, and create it with following: style:WS_CHILD|WS_VISIBLE |LBS_OWNERDRAWFIXED | WS_VSCROLL | WS_HSCROLL I expect the ListBox's item to be have a fixed siz...
{ "language": "en", "url": "https://stackoverflow.com/questions/253026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best way to format if statement with multiple conditions If you want to some code to execute based on two or more conditions which is the best way to format that if statement ? first example:- if(ConditionOne && ConditionTwo && ConditionThree) { Code to execute } Second example:- if(ConditionOne) { if(Conditi...
{ "language": "en", "url": "https://stackoverflow.com/questions/253030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: What is the correct way to escape text in JSON responses? I am generating the json from PHP. A: The JSON is just a subset of Javascript, so everything you know about escaping strings in Javascript applies to JSON. And yes, the correct answer is to use one of library functions, there is a quite a few of them around:...
{ "language": "en", "url": "https://stackoverflow.com/questions/253031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Motion sensor programming for Windows Mobile I just got hold of a PDA (Samsung Omnia i900) with an embedded motion sensor (accelerometer) and would like to code something that would exploit this feature. Any pointers? A: Although this may not match your device, here is an article using an HTC accelerometer in mana...
{ "language": "en", "url": "https://stackoverflow.com/questions/253033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: A better way of forcing data bound WPF ListBox to update? I have WPF ListBox which is bound to a ObservableCollection, when the collection changes, all items update their position. The new position is stored in the collection but the UI does not update. So I added the following: void scenarioItems_CollectionChan...
{ "language": "en", "url": "https://stackoverflow.com/questions/253036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Windows Forms, getting a property from parent form I'm having a bit of a problem. I have a datatable in the parent form. I open a dialogbox form that gets the datatable property and creates a checkboxlist. This will be used to export those columns. But when I run the application the parentform property is null. I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/253038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What's the difference between #import and @class, and when should I use one over the other? I've been teaching myself Objective-C over the past month or so (I'm a Java head) and I've got my brain wrapped around most of it now. One thing that's confusing me at the moment: What's the difference between importing a cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/253051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How do I push amended commit to the remote Git repository? When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit: > git commit --...
{ "language": "en", "url": "https://stackoverflow.com/questions/253055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "816" }
Q: Why Can A C# Class Inherit From One Interface Both Implicitly and Explicitly? Today I happens to find that one C# class can inherit one interface both in implicit and explicit way. This surprises me. If C# works in this way, then one instance can behave differently when referenced in different way. interface IFoo { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Disable, but not uninstall Resharper 4.x onwards Any ideas on how to disable, but not uninstall Resharper 4.x or above? A: This didn't work for me. The checkbox in the Startup column was both checked and disabled. BUT! I found a fix elsewhere on the web. What you need to do is make the following file(s) writeable:...
{ "language": "en", "url": "https://stackoverflow.com/questions/253063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: .NET Spell Check control? Are there any libraries out there (preferably a self contained Text Edit Control) for .NET that have Spell Check capabilities. I would like to add the typical red underline to miss-spelled words in the edit area of my application. Edit: To clarify, this is for WinForms A: Not a redlining ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Debugging getResource* How do you debug getResource-style methods that are failing, returning null? I am sure the file it's looking for is there, but it's returning NULL. How do I know what it is looking for to try to spot any mismatch? A: You could use the Eclipse-debug-mode and set a breakpoint on the method that...
{ "language": "en", "url": "https://stackoverflow.com/questions/253066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to find files with ^M from linux using csh Is there a csh script/command to list all the files in source source tree which have line endings that show up as "^M" in emacs (under linux). Thanks! A: Based on my answer to another question: fgrep -rl `echo -ne '\r'` . A: find . -type f -exec grep $'\r' {} + The ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I print the elements of a C++ vector in GDB? I want to examine the contents of a std::vector in GDB, how do I do it? Let's say it's a std::vector<int> for the sake of simplicity. A: To view vector std::vector myVector contents, just type in GDB: (gdb) print myVector This will produce an output similar to: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "231" }
Q: NUnit and Visual Web Developer 2008SP1 - Integration problems I've decided to integrate NUnit with VWD2008. I did the following- 1) Installed NUnit - Ran a Sample project that was included with the installation all the tests were fine. 2) Installed TestDriven.Net 2.0 - Personal distribution. 3) I have written on an ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to simulate spacing between table cells such that vertical and horizontal spacing are different? In CSS, you can specify the spacing between table cells using the border-spacing property of a table. However, this results in uniform spacing between columns and rows, and I am finding more situations whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/253121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Add a css class with Html.RouteLink Does anyone know how I can add a class to the link rendered using the Html.RouteLink helper method in ASP.Net MVC, it has the htmlAttributes object as the last parameter which I assumed I would be able to use, but since class is obviously a reserved word, I cannot supply this as o...
{ "language": "en", "url": "https://stackoverflow.com/questions/253125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How do I do a many-to-many relationship in LINQ? I have two tables say, t1 and t2 that have t1.t1_id and t2.t2_id as primary keys. They are related by table t3 with columns t3.t1_id and t3.t2_id, respectively. Using LINQ I get an EntitySet<t3> on class t1 and t2, but what I want is an EntitySet<t2> on class t1 and...
{ "language": "en", "url": "https://stackoverflow.com/questions/253135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a way to do a reverse update with Subversion? I have a branch in an SVN tree which contains the source to a third party product. I need to update that branch with the latest version. If I check it out and copy the new source over the old source, I can easily add the new files and do a commit. However, I wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/253136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Anonymous method in Invoke call Having a bit of trouble with the syntax where we want to call a delegate anonymously within a Control.Invoke. We have tried a number of different approaches, all to no avail. For example: myControl.Invoke(delegate() { MyMethod(this, new MyEventArgs(someParameter)); }); where somePar...
{ "language": "en", "url": "https://stackoverflow.com/questions/253138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: How to post a page from asp.net to classic ASP I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them. The classic ASP page expects form variables Username a...
{ "language": "en", "url": "https://stackoverflow.com/questions/253142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best tools for testing bulk emailing in .net? Scenario is that we send out thousands of emails through SMTP server. Content is created in advance and picked up when sent. The thing is we want to find where our bottlenecks are in production environment and where work needs to be done. Goal is to be able to send hal...
{ "language": "en", "url": "https://stackoverflow.com/questions/253143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to downsize std::vector? Is there a way to resize a std::vector to lower capacity when I no longer need previously reserved space? A: Create a new, temporary, vector from the existing one then call the swap method on the existing one, passing the temporary one in. Let the temporary (now with the old, oversized,...
{ "language": "en", "url": "https://stackoverflow.com/questions/253157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How would I start learning how to program in Flex? Can anyone give me pointers to good books or web sites that teach how to do Flex programming? A: noone mentioned FlexExamples When I was working on a first flex project this resource helped alot to understand many things. The difference about it is, it has examples...
{ "language": "en", "url": "https://stackoverflow.com/questions/253159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Tips for using Vim as a Java IDE? I'm addicted to Vim, it's now my de facto way of editing text files. Being that it's mainly a text editor and not an IDE, has anyone got tricks for me to make it easier when developing Java apps? Some questions I have: * *How do I invoke a maven task without leaving vi? *Can I g...
{ "language": "en", "url": "https://stackoverflow.com/questions/253170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: Jython and Java nested class I'm using Jython to write tests for a Java project. It works well, but I can't figure how to get access to a java public nested class. package mypackage; public class NyClass { public class MyNestedClass { ... } } Does somebody knows how to do this? A: I'm not entire...
{ "language": "en", "url": "https://stackoverflow.com/questions/253171", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: VSTO: Why is OfficeRibbon.Context null? I'm developing my first Word 2007 addin, and I've added an OfficeRibbon to my project. In a button-click handler, I'd like a reference to either the current Word.Document or Word.Application. I'm trying to get a reference via the OfficeRibbon.Context property, which the docume...
{ "language": "en", "url": "https://stackoverflow.com/questions/253178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best primary key data type for Linq to SQL I am starting new project with SqlServer and Linq to Sql. What data type would be better for surrogate keys in tables: identity or uniqueidentifier ? As I understood, identity is automatically generated on insert, while uniqueidentifier should be generated in code (GUID). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to write vb code for custom paging and custom sorting in sql and asp:repeater pl give vb code for custom paging and sorting in asp:repeater using stored procedure A: Here is step one and two from 4guys that gives a very clear explanation along with zip download available of all code in VB and sample t-sql too. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: jboss with less memory I have now 1gb ram at work(i hope that will change soon) and jboss takes almost half of it and that is too much, i turned off logging to file, what more can i do to reduce memory usage ? A: You can limit the maximum memory used using the -Xmx parameter, as in any java process. Edit the $JBOSS...
{ "language": "en", "url": "https://stackoverflow.com/questions/253192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Place to store user settings in Sharepoint besides profiles Is user profiles an appropriate place to store things like number of items per page in a custom grid user selected? (I you can store it in the view, but it won't be per user this way). My first though was to store these settings in user profiles, but there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Outlook Express - sending e-mail from the command line What is the best way to send e-mail using outlook express from the command line? It has to be an automated operation with no user interaction. There will be some .jpg files in attachment. Thanks. A: Perhaps this post is helpful. It speaks pre-populating a new e...
{ "language": "en", "url": "https://stackoverflow.com/questions/253198", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Subsonic\ORM on Windows CE\Mobile Has anyone managed to get subsonic or a variant working on Windows Mobile? We cant get it to work as it has a dependency on System.Configuration. Any suggestions on an alternate ORMs that would work on a windows mobile device? A: Is the System.Configuration dependency the only issu...
{ "language": "en", "url": "https://stackoverflow.com/questions/253208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to block until an asynchronous job finishes I'm working on a C# library which offloads certain work tasks to the GPU using NVIDIA's CUDA. An example of this is adding two arrays together using extension methods: float[] a = new float[]{ ... } float[] b = new float[]{ ... } float[] c = a.Add(b); The work in this...
{ "language": "en", "url": "https://stackoverflow.com/questions/253211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What are assertions? and why would you use them? How are assertions done in c++? Example code is appreciated. A: Assertion are boolean expressions which should typically always be true. They are used to ensure what you expected is also what happens. void some_function(int age) { assert(age > 0); } You wrote t...
{ "language": "en", "url": "https://stackoverflow.com/questions/253212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Nested Java enum definition - does declaring as static make a difference? I have an interface - here's a nicely contrived version as an example: public interface Particle { enum Charge { POSITIVE, NEGATIVE } Charge getCharge(); double getMass(); etc... } Is there any difference in ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/253226", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: SSRS05 A one page report in preview shows a second page with only footer in print layout I have a user sign off report where it shows a users rights/access to the system which all fits nicely onto one page when I hit preview. However when I then go to print layout it shows me two pages with the second page only cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/253231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the fields that the user table should contain from the security/authenication perspective? When designing user table what would be the must have fields from the security/user authentication point of view for a Web based Application (.NET and SqlServer 2005) I came with with the following fields: userID user...
{ "language": "en", "url": "https://stackoverflow.com/questions/253238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to split date column & sum it up I have a query where i have a date column (time) which tells about "IN" & "OUT" timing of the people attendance by this single column My queries are :- 1) How to get the daily attendance of each employee 2) How to come to know if the employee is present less than 5 hours Please l...
{ "language": "en", "url": "https://stackoverflow.com/questions/253242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to pause a UIImageView animation I have an animation that I'm displaying using a UIImageView: imageView.animationImages = myImages; imageView.animationDuration = 3; [imageView startAnimating]; I know I can stop it using stopAnimating, but what I want is to be able to pause it. The reason is that when you call s...
{ "language": "en", "url": "https://stackoverflow.com/questions/253247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tab Navigation - Frames or AJAX? I have what I imagine to be a pretty standard web-interface. There are 4 different ListViews (grid controls) which are accessed by a series of Tabs on the top. I have implemented this as follows: alt text http://img402.imageshack.us/img402/1530/pagedu8.jpg Tab 1 will load Page 1 co...
{ "language": "en", "url": "https://stackoverflow.com/questions/253248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: When's the absolute latest you can call Page.ClientScript.RegisterClientScriptBlock? I need to output some JavaScript in a WebControl based on some processing and some properties that the consumer can set, doing it on the load of the page will be to early. When is the latest I can call RegisterClientScriptBlock and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253267", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you inherit from a class in a different header file? I am having dependency troubles. I have two classes: Graphic and Image. Each one has its own .cpp and .h files. I am declaring them as the following: Graphic.h: #include "Image.h" class Image; class Graphic { ... }; Image.h: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: designing model structure for django I'm trying to design a model for a application allowing 2 people to bet with each other (I know, sounds stupid...). What I'm wondering about is how to connect the bet with users. The structure is like this |-------------| |----------| | Bet | | User | | Be...
{ "language": "en", "url": "https://stackoverflow.com/questions/253286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Troubleshooting "unexpected $end" error I am new to PHP and trying to get the following code to work: <?php include 'config.php'; include 'opendb.php'; $query = "SELECT name, subject, message FROM contact"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row...
{ "language": "en", "url": "https://stackoverflow.com/questions/253289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cookies on IE6 Standalone on Windows server 2003? I cant seem to get IE6 and IE7 running alongside each other on my Windows Server 2003 VPC. I have tried both: http://browsers.evolt.org/?ie/32bit/standalone and: http://tredosoft.com/Multiple_IE , and yes, I tried putting the Wininet.dll in my standalone path. The br...
{ "language": "en", "url": "https://stackoverflow.com/questions/253296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why won't this XHTML form validate? Any ideas why this won't validate here: http://validator.w3.org/#validate_by_input It seems the form input tags are wrong but reading through the XHTML spec they should validate fine. Any ideas? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/...
{ "language": "en", "url": "https://stackoverflow.com/questions/253312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Conventions for exceptions or error codes Yesterday I was having a heated debate with a coworker on what would be the preferred error reporting method. Mainly we were discussing the usage of exceptions or error codes for reporting errors between application layers or modules. What rules do you use to decide if you t...
{ "language": "en", "url": "https://stackoverflow.com/questions/253314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "135" }
Q: How can I get SQL Server column definition with parentheses and everything? I need a smart way to get the data types out of INFORMATION_SCHEMA.COLUMNS in a way that could be used in a CREATE TABLE statement. The problem is the 'extra' fields that need to be understood, such as NUMERIC_PRECISION and NUMERIC_SCALE. O...
{ "language": "en", "url": "https://stackoverflow.com/questions/253324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: XSRF in a RESTful Application I am a ASP.NET Developer trying to learn Rails and RESTful approach. To understand, I am planning to write a Email client, which would make RESTful GET call to the server to fetch the emails and POST to send an email. What are the best practices (both generic and/or specific to Rails) t...
{ "language": "en", "url": "https://stackoverflow.com/questions/253327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Brace highlighting in Visual Studio for Javascript? Is there a way to get Visual Studio 2008 to do matching brace highlighting for Javascript? If there is no way to do it in Studio, can it be done using ReSharper? Thanks!! A: Note that Visual Studio will still find a matching brace in JavaScript via Ctrl + ]. A: H...
{ "language": "en", "url": "https://stackoverflow.com/questions/253338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Java - change focus on key press I am writing a Java Application for Data Entry using Eclipse and SWT. Naturally it has a great many Text objects. What I would like to happen is that when user enters something into one field focus automatically changes to the next field. Thanks in advance A: final Text textBox = n...
{ "language": "en", "url": "https://stackoverflow.com/questions/253351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Eclipse Problems View not showing Errors anymore For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View. It is still showing Warnings. This has suddenly happened and I cannot think of anything that I have changed which would affect this. I am using the "Maven Integration for Ecl...
{ "language": "en", "url": "https://stackoverflow.com/questions/253357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "78" }
Q: webservice.htc, moz-behaviors and Firefox 3 Whilst trying to get our app working in Firefox (I'm a big proponent of X-Browser support but our lead dev is resisting me saying IE is good enough). So I'm doing a little side project to see how much work it is to convert. I've hit a problem straight away. The main.aspx p...
{ "language": "en", "url": "https://stackoverflow.com/questions/253360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Redmine or Tracd to use for project management? Can anyone suggest which of the Redmine or Tracd would be a better option for project management? Currently I am planning to deploy it on a one project setup but plan to use it across multiple projects in the fututre. Which of the two is easier to deploy? I use windows...
{ "language": "en", "url": "https://stackoverflow.com/questions/253372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What Python bindings are there for CVS or SVN? I once did a cursory search and found no good CVS bindings for Python. I wanted to be able to write helper scripts to do some fine-grained manipulation of the repository and projects in it. I had to resort to using popen and checking stdout and stderr and then parsing...
{ "language": "en", "url": "https://stackoverflow.com/questions/253375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: mysql_fetch_array() returns 'supplied argument is not a valid MySQL result resource' I am trying the following code: <?php $link = mysql_connect('localhost', 'root', 'geheim'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; $query = "SELECT ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to insert text at beginning of a multi-line selection in vi/Vim In Vim, how do I insert characters at the beginning of each line in a selection? For instance, I want to comment out a block of code by prepending // at the beginning of each line assuming my language's comment system doesn't allow block commentin...
{ "language": "en", "url": "https://stackoverflow.com/questions/253380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "494" }
Q: Debugging using RealView Debug(RVDebug) I have some C code for an ARM926 target. I am trying to debug it using "Arm Xtended Debugger" (AXD). The main() of this code, takes 14 command line arguments which are mentioned in the code warrior project settings at proper place and behavior of the code is as expected. But...
{ "language": "en", "url": "https://stackoverflow.com/questions/253384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to modify an Excel spreadsheet, without Excel, using VBScript? I need to add a row to a spreadsheet using VBScript on a PC that does not have Microsoft Office installed. I tried [Set objExcel = CreateObject("Excel.Application")] Since Excel does not exist on the PC I cannot create this object. Is there a way to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: AJAX to WCF not working in FireFox I'm trying to get this sample for AJAX to WCF working, with the following code. When viewed in FF, nothing is displayed, and when viewed in IE, the time is displayed. I'm using IIS 7, btw. function getTime() { TimeService.TimeService.GetTimeFormatted("dd-mm...
{ "language": "en", "url": "https://stackoverflow.com/questions/253397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are good uses for class helpers? Delphi (and probably a lot of other languages) has class helpers. These provide a way to add extra methods to an existing class. Without making a subclass. So, what are good uses for class helpers? A: This sounds very much like extension methods in C#3 (and VB9). The best use I...
{ "language": "en", "url": "https://stackoverflow.com/questions/253399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How to prevent a user from seeing previous users' info by hitting the "Back" button I am developing a java web app using servlet, in order to prevent user from hitting the back button to see previous users' info, I have the following code : protected void processRequest(HttpServletRequest request,HttpServletRe...
{ "language": "en", "url": "https://stackoverflow.com/questions/253403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Fieldsets and legends Alright, I know how the fieldset/legend works out in HTML. Say you have a form with some fields: <form> <fieldset> <legend>legend</legend> <input name="input1" /> </fieldset> </form> What should I use the legend for? It's being displayed as a title, but isn't a legend s...
{ "language": "en", "url": "https://stackoverflow.com/questions/253410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Not getting the proper size of an ArrayList in JSP I'm having trouble getting the right number of elements in the ArrayList alt in the JSP page below. When I view the JSP it shows the size is 1 (<%=alt.size()%>) when it should be 3; I think I'm adding that method to the array in the generator class, so I don't under...
{ "language": "en", "url": "https://stackoverflow.com/questions/253415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Does TCL have some concept of function pointers? Working with TCL and I'd like to implement something like the Strategy Pattern. I want to pass in the "strategy" for printing output in a TCL function, so I can easily switch between printing to the screen and printing to a log file. What's the best way to do this i...
{ "language": "en", "url": "https://stackoverflow.com/questions/253426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it appropriate to use "Wingdings" fonts in a Windows Forms or WPF app? I have a WPF control, that has a list of "Investors", and in the right column of the list, a "Delete" button. I could either waste some time making an image of an "x" in photoshop. Or, I could just use Wingdings font and set the content to "Õ"...
{ "language": "en", "url": "https://stackoverflow.com/questions/253431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Saving a modified image to the original file using GDI+ I was loading a Bitmap Image from a File. When I tried to save the Image to another file I got the following error "A generic error occurred in GDI+". I believe this is because the file is locked by the image object. Ok so tried calling the Image.Clone functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/253435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Directory.GetFiles keeping the last access time It appears that Directory.GetFiles() in C# modifies the Last access date of a file. I've googled for hours and can't seem to find a work around for this issue. Is there anyway to keep all the MAC (Modified, Accessed, Created) attributes of a file? I'm using Directory....
{ "language": "en", "url": "https://stackoverflow.com/questions/253437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you comment an MS-access Query? How does one add a comment to an MS Access Query, to provide a description of what it does? Once added, how can one retrieve such comments programmatically? A: I know this question is very old, but I would like to add a few points, strangely omitted: * *you can right-click...
{ "language": "en", "url": "https://stackoverflow.com/questions/253446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: What is the practical use of "dynamic" variable in C# 4.0? What is their use if when you call the method, it might not exist? Does that mean that you would be able to dynamically create a method on a dynamic object? What are the practical use of this? A: First of all, you can't use it now. It's part of C#4, which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What's the best way to get the directory from which an assembly is executing For my apps, I store some configuration file in xml along with the assembly(exe), and something other temporary files for proccessing purpose. I found some quirk with ".\\" and Application.StartupPath. I've been using String configPath =...
{ "language": "en", "url": "https://stackoverflow.com/questions/253468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do I display a tooltip for a CMFCRibbonButton in the status bar? I have a CMFCRibbonStatusBar in my mainframe to which I add a CMFCRibbonButtonsGroup which again has a CMFCRibbonButton. This button has the same ID as a menu entry. Creating the button is done as follows: CMFCRibbonButtonsGroup* pBGroup = new CMFC...
{ "language": "en", "url": "https://stackoverflow.com/questions/253469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why doesn't anyone upgrade their C compiler with advanced features? struct elem { int i; char k; }; elem user; // compile error! struct elem user; // this is correct In the above piece of code we are getting an error for the first declaration. But this error doesn't occur with a C++ compiler. In C++ we don't nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/253475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hidden FreeTextBox bug on Firefox I have a problem with the FreeTextBox rich Text Editor in my ASP.NET site. The problem occurs when I access the site with firefox, and I have a freetextbox instance in a hidden div. The hidden div might also be an AJAX Tab Panel. The actual problem is that when the page loads it thr...
{ "language": "en", "url": "https://stackoverflow.com/questions/253490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Static nested class in Java, why? I was looking at the Java code for LinkedList and noticed that it made use of a static nested class, Entry. public class LinkedList<E> ... { ... private static class Entry<E> { ... } } What is the reason for using a static nested class, rather than an normal inner class? The onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/253492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "231" }
Q: best way to consume a webservice in an asp.net code behind I'm trying to bind a datasource to a repeater, for instance, to a web service (.asmx from a different website) on page load. The webservice returns a DataSet from an sql call. What is the best way to go about doing this? A: Because you're calling another w...
{ "language": "en", "url": "https://stackoverflow.com/questions/253503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Extended Camera control on Windows Mobile I know how to capture a camera snaphot on Windows Mobile 5.0/6 using SHCameraCapture. But is there something more extensive that allows me much finer control? Namely to get available zoom levels and to set the zoom level programmatically, also e.g. different ISO modes / ligh...
{ "language": "en", "url": "https://stackoverflow.com/questions/253508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create a subclass of TabPage that I can edit like a UserControl? I want to create a subclass of TabPage that contains some control, and I want to control the layout and properties of those controls through the designer. However, if I open my subclass in the designer, I can't position them like I could on a...
{ "language": "en", "url": "https://stackoverflow.com/questions/253517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Do numerical primary keys of deleted records in a database get reused for future new records? For example if I have an auto-numbered field, I add new records without specifying this field and let DB engine to pick it for me. So, will it pick the number of the deleted record? If yes, when? // SQL Server, MySQL. // Fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/253522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Demos of Mobile Web Abilities? I'm trying to determine what kinds of interactions a mobile website can handle. For example, I obviously can't track page-level dragging operations because this scrolls on mobile browsers. So, I'm looking for demos that can tell me what interactions work, how well, and hopefully for in...
{ "language": "en", "url": "https://stackoverflow.com/questions/253523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Printing without Page Setup - reacting to paper size and orientation changes? The AppKit release notes for Leopard say: In many applications it is not appropriate to present page setup panels to the user, or even include a Page Setup... item in the File menu, but there has been no other easy way to let th...
{ "language": "en", "url": "https://stackoverflow.com/questions/253529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you use the jQuery blockui add-in with MVC Ajax? I have been reading the post here: http://encosia.com/2008/10/04/using-jquery-to-enhance-aspnet-ajax-progress-indication/ But it wants to use the following object: Sys.WebForms.PageRequestManager.getInstance() Which doesn't exist when using the MVC AJAX code. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a good service for checking website/server vulnerability I have been asked to provide information on available techniques for assessing our current, and any future websites for security problems. the request is in the form of Do you know of any good free one that examines for security holes? I think our d...
{ "language": "en", "url": "https://stackoverflow.com/questions/253545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: 3D Geometry: Transform One Pair of Points to be Aligned Parallel to Another I have a line (actually a cube) going from (x1,y1,z1) to (x2,y2,z2). I would like to rotate it so that it is aligned along another line going from (x3,y3,z3) to (x4,y4,z4). Presently I am using Math::Atan2 along with Matrix::RotateYawPitchRo...
{ "language": "en", "url": "https://stackoverflow.com/questions/253546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use HttpWebRequest with GET method I have the following code which works just fine when the method is "POST", but changing to "GET" doesn't work: HttpWebRequest request = null; request = HttpWebRequest.Create(uri) as HttpWebRequest; request.ContentType = "application/x-www-form-urlencoded; charset=UTF-8"; r...
{ "language": "en", "url": "https://stackoverflow.com/questions/253549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: What parameter parser libraries are there for C++? I'd like to pass parameters on the command line to my C++ program in the following manner: ./myprog --setting=value Are there any libraries which will help me to do this easily?
{ "language": "en", "url": "https://stackoverflow.com/questions/253556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Oracle listener state blocked I have a webpp which works fine when under a light load. However, when we run a lot of threads each with their own database connection, then we start getting the error ORA-12519: TNS:no appropriate service handler found After looking online I found that running lsnrctl services was a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to test custom Model Binders in ASP.NET MVC? I've written some custom model binders (implementing IModelBinder) in our ASP.NET MVC application. I'm wondering what is a good approach to unittest them (binders)? A: dict could be refactored like this FormCollection form = new FormCollection ...
{ "language": "en", "url": "https://stackoverflow.com/questions/253574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How far do you take code coverage? I've recently started using code coverage tools (particularily Emma and EclEmma), and I really like the view that it gives me as to the completeness of my unit tests - and the ability to see what areas of the code my unit tests aren't hitting at all. I currently work in an organiza...
{ "language": "en", "url": "https://stackoverflow.com/questions/253587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }