text
stringlengths
8
267k
meta
dict
Q: How can get all attributes on a property's interface/basetype ancestry? So, if i have: public class Sedan : Car { /// ... } public class Car : Vehicle, ITurn { [MyCustomAttribute(1)] public int TurningRadius { get; set; } } public abstract class Vehicle : ITurn { [MyCustomAttribute(2)] public ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: AES encryption, what are public and private keys? In AES encryption (.net framework), how are the public and private keys used? Are the public and private keys combined to form a full key, and then the algorithm uses the public + private key to encrypt the data? (simplified keys used below for example purposes) e.g....
{ "language": "en", "url": "https://stackoverflow.com/questions/273396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Sharepoint: Is it possible to make subgroups in top navigation menu? I need to make subgroups in the top navigation menu, like: Home -Group --Subgroup alt text http://img300.imageshack.us/my.php?image=topnavigationmenudr4.png Is it possible? I can not make more than two levels! A: See this blog entry by Heather So...
{ "language": "en", "url": "https://stackoverflow.com/questions/273400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is the Visual Studio 2008 Object Test Bench useful for anything? Is the Visual Studio 2008 Object Test Bench useful for anything? Maybe I'm missing something but aside from a flashy version of the immediate window, it doesn't seem like a developer would actually use it for anything. (And how many people knew it e...
{ "language": "en", "url": "https://stackoverflow.com/questions/273406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How many dimensions in my array or get the last one How can I find out the number of dimensions in an array in Classic ASP ( VBScript ) . I am being passed an Array with multiple dimensions but I only want to look at the last. Seems easy in other languages. A: Similar approach to feihtthief's answer here as I assum...
{ "language": "en", "url": "https://stackoverflow.com/questions/273410", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: NHibernate and query optimization I am using NHibernate as my ORM solution and have a need for a highly specialized object (for performance reasons) to be returned that is unlike my original object. Is it valid to actually set up a second object with its own mapping file so I can set special join fetching and set b...
{ "language": "en", "url": "https://stackoverflow.com/questions/273416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any way to use ASP.NET AJAX when my server does not and can not have the ASP.NET AJAX extensions Installed? I have a server with .Net 2.0 sp1 installed and have no ability to install the AJAX extensions on the server. Is there anyway I could work around this to incorporate ASP.NET AJAX functionality? A: You don'...
{ "language": "en", "url": "https://stackoverflow.com/questions/273418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Excel automation. Need to select multiple items from a Range I have code that lets me select a single item in arange: COleVariant vItems = cstrAddr; hr = AutoWrap( DISPATCH_PROPERTYGET, &vCell, irange, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .htaccess Redirections I've been Googling around for .htaccess redirection information, but nothing I find is quite what I'm looking for. Basically, I want a solution that will take a site example.com and allow you to enter URL's like: 123.example.com ksdfkjds.example.com dsf38jif348.example.com and this would r...
{ "language": "en", "url": "https://stackoverflow.com/questions/273433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you debug MySQL stored procedures? My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value of any variable at a given point in the script, but is there a better way t...
{ "language": "en", "url": "https://stackoverflow.com/questions/273437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "146" }
Q: How to ignore route in asp.net forms url routing I am using the .NET 3.5 SP1 framework and I've implemented URL routing in my application. I was getting javascript errors: Error: ASP.NET Ajax client-side framework failed to load. Resource interpreted as script but transferred with MIME type text/html. ReferenceEr...
{ "language": "en", "url": "https://stackoverflow.com/questions/273447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: iPhone: Detecting user inactivity/idle time since last screen touch Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that. There's this somewhat-related method in UIApplication: [UIApplicat...
{ "language": "en", "url": "https://stackoverflow.com/questions/273450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "158" }
Q: Which platform should I use : native C++ or C#? I want to develop a windows application. If I use native C++ and MFC for user interface then the application will be very fast and tiny. But using MFC is very complicated. Also If I use C# then the application will be slower than the native code and It reqiures .NET fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/273451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Using AES encryption in C# I can't seem to find a nice clean example of using AES 128 bit encryption. Does anyone have some sample code? A: Using AES or implementing AES? To use AES, there is the System.Security.Cryptography.RijndaelManaged class. A: For a more complete example that performs key derivation in add...
{ "language": "en", "url": "https://stackoverflow.com/questions/273452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Designing a Wiki, design considerations and feedback When designing a wiki application, what things should I take into consideration? So far I have: * *revisions *parsing some sort of markup text *keeping track of links in wikis, and pages that link to other pages. *related wikis i.e. wikis are related to othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/273460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you do calculations in Access? In Microsoft Access I have a table called Time Sheet and in this I have Time sheet no. , waiter no. , date and hours worked. I have 10 waiters. I have another table called Service Charge Distribution. In this table I have Service Charge No. , waiter no. , week no. and distribut...
{ "language": "en", "url": "https://stackoverflow.com/questions/273461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I support 'mysite.com' and 'www.mysite.com'? OpenID Problems? I implemented OpenID support for an ASP.Net 2.0 web application and everything seems to be working fine on my local machine. I am using DotNetOpenId library. Before I redirect to the third party website I store the orginal OpenID in the session to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VS2005 Resource Editor Keeps Eating my #ifdef's The resource editor keeps wiping out code of this form in my .rc: #ifndef V2 IDB_SPLASHSCREEN BITMAP "res\\xyz v1.bmp" #else IDB_SPLASHSCREEN BITMAP "res\\xyz v2.bmp" #endif Anyone know of a workaround? Better way to ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/273475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to compile libCurl with SSH support using vc8? I am working on an application, implemented in VC++ 2008 that needs to use sftp through libCurl. In order for this to happen, libCurl needs to be built with ssh support. The problem is that, unlike the mingw makefile, the makefile for vc8 does not have ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Better way to extend restful_authentication AASM states I recently had to extend the aasm states for the latest version of restful_authentication (github) in one of my apps. I removed the "include Authorization::AasmRoles", copied the existing states and events from the plugin and made the changes necessary to suppo...
{ "language": "en", "url": "https://stackoverflow.com/questions/273484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can java's assert statement allow you to specify a message? Seems likes it might be useful to have the assert display a message when an assertion fails. Currently an AssertionError gets thrown, can you specify a custom message for it? Can you show an example mechanism for doing this (other than creating your own exc...
{ "language": "en", "url": "https://stackoverflow.com/questions/273485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: How can I use Expression in NHibernate? I have read the very good blog post of Rob Conery Crazy Talk: Reducing ORM Friction How can I generalize this interface so I can implement it with NHibernate? using System; using System.Collections; using System.Linq; using System.Linq.Expressions; public interface ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can someone explain the concept of an "instance-hour" as used by cloud computing providers? I am looking at the pricing of various cloud computing platforms, particularly Amazon's EC2, and a lot of the quotes are based on a unit called an Instance-Hour. I am trying to get a handle on the exact definition of an inst...
{ "language": "en", "url": "https://stackoverflow.com/questions/273489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there a way to install all versions of all browsers on one machine? Is there a way to install all versions of all browsers on one machine? A: I use virtual machines to do different browser version configurations. I'm assuming you want to test different version of IE, Firefox etc. If you automate your testing at...
{ "language": "en", "url": "https://stackoverflow.com/questions/273494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does it make sense to set up a trusted relationship between Active Directory instances at partner companies? If a company often requires users to be created in a partner's active directory, and vice versa, does it make sense to set up a federated / trusted relationship between the AD instances? If so, what should be...
{ "language": "en", "url": "https://stackoverflow.com/questions/273496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What copyright license to select? What is copyright licence type to select in order to make the code free for the public in all possible ways. Is "The MIT License" the best option? A: MIT License is pretty close to being public domain, though it does require people to include the license itself, so it's slightly mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/273507", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I create an activeX in C# control and reference it in a ASP.NET site? How do I make an activeX control in a C# library project and then reference it in another ASP.NET wet site project? A: Is the ActiveX for the client, or for the server? If for the server, just use a direct reference to the managed assembl...
{ "language": "en", "url": "https://stackoverflow.com/questions/273508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you implement a good profanity filter? Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out. Where can one find a good list of swear words in various languages and dialec...
{ "language": "en", "url": "https://stackoverflow.com/questions/273516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "219" }
Q: Python 3.0 and language evolution Python 3.0 breaks backwards compatibility with previous versions and splits the language into two paths (at least temporarily). Do you know of any other language that went through such a major design phase while in maturity? Also, do you believe that this is how programming language...
{ "language": "en", "url": "https://stackoverflow.com/questions/273524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Best practices for control permissions? Hey all, I need some advice on this... We have certain permissions setup in the database for certain levels of control a user can have over the application. Disabled, ReadOnly and Edit. My question is: Are there more generic/better ways to handle permissions applied to a form...
{ "language": "en", "url": "https://stackoverflow.com/questions/273534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ASP.NET 2.0 Asynchronous User Control Not Working I'm trying to get a user control working asynchronously, yet no matter what I do it continues to work synchronously. I've stripped it down to its bare minimum as a test web application. This would be the user control: <%@ Control Language="C#" %> <script runat="serve...
{ "language": "en", "url": "https://stackoverflow.com/questions/273546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Tips from ASP.NET MVC and lessons for ASP.NET WebForms developers What are some helpful things that ASP.NET MVC developers could suggest that would help us ASP.NET WebForms developers to write better code/web apps? I'm a WebForms guy but with all the new hype around MVC I'd value some comments on helpful tips, trick...
{ "language": "en", "url": "https://stackoverflow.com/questions/273555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What is the best way to measure and cap bandwidth usage in a LAMP SaaS Web application? The company I work for is thinking of developing a LAMP SaaS Web application that would be plan based. We want to monitor usage because it involves external references, and would draw bandwidth through the placement of an iframe ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273558", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Decoding a PRF file Is there any way to decode a PICS Rules File? Contains settings and preferences used by the Windows operating system. The file is given by: Q:F]9y3n5|dp:n4hU)qbs;!&-bzh A: The PICSRules spec defines what PICS rules should look like. I don't think your file is one of those. Is that the entire fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/273560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Secret santa algorithm Every Christmas we draw names for gift exchanges in my family. This usually involves mulitple redraws until no one has pulled their spouse. So this year I coded up my own name drawing app that takes in a bunch of names, a bunch of disallowed pairings, and sends off an email to everyone with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: LINQ to SQL disconnected updating object from different data context Link I'm using ASP.NET with C# and trying to use linq to sql to update a data context as exhibited on the blog linked above. I created the timestamp field in the table just as stated and am using the following method: private void updateRecord(Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/273578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: WCF service to get a list of GUIDS from a server, what should my contract look like? I am designing a WCF service which a client will call to get a list of GUID's from a server. How should I define my endpoint contract? Should I just return an Array? If so, will the array just be serialized by WCF? A: The Guids, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C# 4.0 Feedback Does anyone know the official method for submitting feedback on C# 4.0 so that Anders and his team will get the feedback and be able to respond to the submission? A: Probably the forums here, or (for bugs) connect (they've added options for .NET 4.0 CTP and VS2010 CTP) A: Have you come across the V...
{ "language": "en", "url": "https://stackoverflow.com/questions/273610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: python - check at the end of the loop if need to run again It's a really basic question but i can't think at the second. How do i set up a loop that asks each time the function inside runs whether to do it again. So it runs it then says something like; "loop again? y/n" A: keepLooping = True while keepLooping: # ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When and why should I implement IComponent, IContainer, and ISite? I've wondered for a long time what IComponent, IContainer, and ISite are for. I've read the documentation, but it is extremely vague (or I'm thinking about it too hard). I know that if I create a class as a component, it can be used in the Visual Stu...
{ "language": "en", "url": "https://stackoverflow.com/questions/273615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: MySQL - Select from a list of numbers those without a counterpart in the id field of a table I have a list of numbers, say {2,4,5,6,7} I have a table, foos, with foos.ID, including say, {1,2,3,4,8,9} Id like to take my list of numbers, and find those without a counterpart in the ID field of my table. One way to achi...
{ "language": "en", "url": "https://stackoverflow.com/questions/273623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Create 1bpp mask from image How do you create a 1 bit per pixel mask from an image using GDI in C#? The image I am trying to create the mask from is held in a System.Drawing.Graphics object. I have seen examples that use Get/SetPixel in a loop, which are too slow. The method that interests me is one that uses only ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: If I use explicit constructor, do I need to put the keyword in both .h and .cpp files? Actually my question is all in the title. Anyway: I have a class and I use explicit constructor: .h class MyClass { public: explicit MyClass(const string& s): query(s) {} private: string query; } Is it obligatory or no...
{ "language": "en", "url": "https://stackoverflow.com/questions/273630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Force multi-threaded VB.NET class to display results on a single form I have a windows form application that uses a Shared class to house all of the common objects for the application. The settings class has a collection of objects that do things periodically, and then there's something of interest, they need to ale...
{ "language": "en", "url": "https://stackoverflow.com/questions/273639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is this way of detecting heartbeats threadsafe and consistent? This question has been discussed in two blog posts (http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/, http://dow.ngra.de/2008/10/28/what-do-we-really-know-about-non-blocking-concurrency-in-java/), but I haven't heard a definitive a...
{ "language": "en", "url": "https://stackoverflow.com/questions/273641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the most elegant and efficient way to provide AAA to web services using a WS gateway and LDAP? I'm looking for the best way to provide authorization, authentication, and auditing to web services. I'll be using a web service gateway appliance deployed to the DMZ, and there will be an LDAP instance as a user s...
{ "language": "en", "url": "https://stackoverflow.com/questions/273652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Reporting Services WS from Java - Getting (401)Unauthorized We're writing a web application that is trying to replace all ReportManager functionality using calls to Reporting Services SOAP API. We started working with SSRS 2008 and had our Java code working correctly. We've since had to downgrade to SSRS 2005 and n...
{ "language": "en", "url": "https://stackoverflow.com/questions/273658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: designing a distributed (over many servers) error logging feature, WCF or? I am designing a error logging feature so our servers (each donig different things) can have a central data store for logging errors. Would it be a good idea to have the various applications writing to the error log file using a WCF service, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Building with ant : dynamic build options? With multiple developers working on the same Tomcat application, I'd like to tell the application to install to a different path, based on the current user and revision control client/view. So, if Bob is building, the app should be installed in Bob's test environment, maybe...
{ "language": "en", "url": "https://stackoverflow.com/questions/273662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Obtaining Management Buy-in on Process The company I work for has historically had very little process as far as software development. Currently we don't really follow any specific method. The problem is of course it makes it difficult to plan, successfully have a decent release or even attract good software devel...
{ "language": "en", "url": "https://stackoverflow.com/questions/273663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best Awk Commands I find AWK really useful. Here is a one liner I put together to manipulate data. ls | awk '{ print "awk " "'"'"'" " {print $1,$2,$3} " "'"'"'" " " $1 ".old_ext > " $1 ".new_ext" }' > file.csh I used this AWK to make a script file that would rename some files and only print out selective col...
{ "language": "en", "url": "https://stackoverflow.com/questions/273664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: We're using JDBC+XMLRPC+Tomcat+MySQL to execute potentially large MySQL queries. What is a better way? I'm working on a Java based project that has a client program which needs to connect to a MySQL database on a remote server. This was implemented is as follows: Use JDBC to write the SQL queries to be executed whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/273668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hiding Safari User Interface Components on iPhone In an attempt to hide the Safari UI components for an web-app bookmarked as a Homescreen Icon. I am using this meta tag <meta name="apple-mobile-web-app-capable" content="yes" /> as specified on iPhone Dev Center but the address bar and toolbar are still there when...
{ "language": "en", "url": "https://stackoverflow.com/questions/273671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Print existing PDF (or other files) in C# From an application I'm building I need to print existing PDFs (created by another app). How can I do this in C# and provide a mechanism so the user can select a different printer or other properties. I've looked at the PrintDialog but not sure what file it is attempting t...
{ "language": "en", "url": "https://stackoverflow.com/questions/273675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Vista Business Login and RDP Problems At work, I running Vista Business on a lavishly new PC, which runs great excepting two issues. In order of annoyance, but not importance: * *When I reboot the machine, the Windows Splash is presented asking me to Press Ctrl + ALT + DELETE so I can logon. It takes three to f...
{ "language": "en", "url": "https://stackoverflow.com/questions/273676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using '__progname' instead of argv[0] In the C / Unix environment I work in, I see some developers using __progname instead of argv[0] for usage messages. Is there some advantage to this? What's the difference between __progname and argv[0]. Is it portable? A: Using __progname allows you to alter the contents of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/273691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What are some examples of commonly used practices for naming git branches? I've been using a local git repository interacting with my group's CVS repository for several months, now. I've made an almost neurotic number of branches, most of which have thankfully merged back into my trunk. But naming is starting to b...
{ "language": "en", "url": "https://stackoverflow.com/questions/273695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1331" }
Q: Is there a cross-platform way of getting information from Python's OSError? On a simple directory creation operation for example, I can make an OSError like this: (Ubuntu Linux) >>> import os >>> os.mkdir('foo') >>> os.mkdir('foo') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Er...
{ "language": "en", "url": "https://stackoverflow.com/questions/273698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: SWT Image concatenation or tiling / mosaic I have an Eclipse RCP application that displays a lot (10k+) of small images next to each other, like a film strip. For each image, I am using a SWT Image object. This uses an excessive amount of memory and resources. I am looking for a more efficient way. I thought of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I write a simple HTTP proxy in Perl? I don't want to use the HTTP::Proxy package because I want to dump out a couple requests. My one liner looks like this, but breaks on trying to pass the header in: perl -MData::Dumper -MHTTP::Daemon -MHTTP::Status -MLWP::UserAgent -e 'my $ua = LWP::UserAgent->new;my $d=ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/273718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Singleton Destructors Should Singleton objects that don't use instance/reference counters be considered memory leaks in C++? Without a counter that calls for explicit deletion of the singleton instance when the count is zero, how does the object get deleted? Is it cleaned up by the OS when the application is termin...
{ "language": "en", "url": "https://stackoverflow.com/questions/273720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Should I put html and java files in the same package (folder) in Apache Wicket? I wonder if there is an example which html files and java files are resides in different folders. A: I use Maven (as the user above points out) and typically put all my .html pages in src/main/resources/same/package/name/as/correspondi...
{ "language": "en", "url": "https://stackoverflow.com/questions/273721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting the GMarkers that have been added to a Google map? Is there a way to get a list of all the GMarkers that have been added to a map? A: I don't think there's a method in the API to return a list of GMarkers or overlays that have been added to a map. You'll have to keep track of them yourself by adding them ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I share a session across multiple subdomains in ASP.NET? I have an application where, in the course of using the application, a user might click from virginia.usa.com to newyork.usa.com Since I'd rather not create a new session each time a user crosses from one subdomain to another, what's a good way to sh...
{ "language": "en", "url": "https://stackoverflow.com/questions/273732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Using wget to recursively fetch a directory with arbitrary files in it I have a web directory where I store some config files. I'd like to use wget to pull those files down and maintain their current structure. For instance, the remote directory looks like: http://mysite.com/configs/.vim/ .vim holds multiple files ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "666" }
Q: How to execute an SSIS package from .NET? I have a SSIS package that eventually I would like to pass parameters too, these parameters will come from a .NET application (VB or C#) so I was curious if anyone knows of how to do this, or better yet a website with helpful hints on how to do it. So basically I want to ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/273751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: Is there a version of JavaScript's String.indexOf() that allows for regular expressions? In javascript, is there an equivalent of String.indexOf() that takes a regular expression instead of a string for the first first parameter while still allowing a second parameter ? I need to do something like str.indexOf(/[abc...
{ "language": "en", "url": "https://stackoverflow.com/questions/273789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "273" }
Q: MySQL: How to determine foreign key relationships programmatically? Similar to this question but for MySQL.... How can I programmatically determine foreign key references in MySQL (assuming InnoDB)? I can almost get them with: SHOW TABLE STATUS WHERE Name = 'MyTableName'; ...but alas, the comment column which seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/273794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How to run Google Earth Inside a WPF Control I’m trying to run Google earth inside WPF but I don’t know how. Basically I have managed to run Google Earth in a Windows Form Control inside a Windows Form, everything was OK. Trying to do the same thing in WPF, well, give strange result a small Google Earth screen plac...
{ "language": "en", "url": "https://stackoverflow.com/questions/273795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to trace a ASP.NET Security Exception How can I figure out what is actually causing the following error? The page is the same as other pages but for some reason, only this page is having this error. It also only happens on the ISP (GoDaddy) who has a trust level of Medium and I can't set a breakpoint and try to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Design Modular Web Wizards using .Net 2.0 Wizard Control We have about 10 applications that basically do the same thing, all written using the Wizard Control for .Net 2.0. The flow they follow is pretty simple: 1. User selects option from a drop downs. 2. Next page has more options more narrowed. 3. User sees confi...
{ "language": "en", "url": "https://stackoverflow.com/questions/273806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Disabling all but one child control in a WPF window I have a bunch of controls on my window. One of them is a refresh button that performs a cumbersome task on a background thread. When the user clicks the refresh button, I put the cursor in a wait (hourglass) status and disable the whole window -- Me.IsEnabled = F...
{ "language": "en", "url": "https://stackoverflow.com/questions/273809", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How does MbUnit work with VS 2008 I set up MbUnit and have been trying to get it to work with VS 2008 using the MbUnit GUI but every time I run a test it closes and I get a this program needs to close error. I had a similar problem with Gallio where I got a runner exception every time I ran a test. Do I need an addi...
{ "language": "en", "url": "https://stackoverflow.com/questions/273817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Encoding Mess - ASP.net,WCF,Linq-SQL I have been pushing to finish off this project since 1 week and have been stuck with one problem that god knows how I missed. We have a sql server database that has 2 tables (of concern here). Table 1 (id,langCode,englishText,translatedTextInUnicode{nvarchar(MAX)}) Table 2 (id,la...
{ "language": "en", "url": "https://stackoverflow.com/questions/273819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why Build Fails with CruiseControl.NET but it builds fine manually with same settings? I have a project that builds fine If I build it manually but it fails with CC.NET. The error that shows up on CC.NET is basically related to an import that's failing because file was not found; one of the projects (C++ dll) tries ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you handle translation of text with markup? I'm developing multi-language support for our web app. We're using Django's helpers around the gettext library. Everything has been surprisingly easy, except for the question of how to handle sentences that include significant HTML markup. Here's a simple example: P...
{ "language": "en", "url": "https://stackoverflow.com/questions/273847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: In C# 3.0, are there any classes that help me generate static html? I am developing a HTML form designer that needs to generate static HTML and show this to the user. I keep writing ugly code like this: public string GetCheckboxHtml() { return ("&lt;input type="checkbox" name="somename" /&gt;"); } Isn't there a...
{ "language": "en", "url": "https://stackoverflow.com/questions/273848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I process enormous numbers? Possible Duplicate: Most efficient implementation of a large number class Suppose I needed to calculate 2^150000. Obviously that number is going to exceed the size of an int, float, or double. How can I make a data type that allows normal math functions but exceeds the basic num...
{ "language": "en", "url": "https://stackoverflow.com/questions/273854", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Temporary SSL for Windows 2000 Server/IIS Classic ASP pages? I've got to set up temporary SSL security on my classic ASP application on Windows 2000 server, IIS5. What do I need to do to activate SSL? I won't be able to get an official cert for a little while so I think I have to make my own. Steps? Do I need access...
{ "language": "en", "url": "https://stackoverflow.com/questions/273867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Performance implications of &p[0] vs. p.get() in boost::scoped_array The topic generically says it all. Basically in a situation like this: boost::scoped_array<int> p(new int[10]); Is there any appreciable difference in performance between doing: &p[0] and p.get()? I ask because I prefer the first one, it has a mor...
{ "language": "en", "url": "https://stackoverflow.com/questions/273869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Timesheet reporting in FogBugz? Currently it's a big PITA to create timesheet report for say a week or month in FogBugz... maybe someone knows about a plugin to that for you? A: This question is kind of old so I am assuming you were using FB6, but if you are now using FB7 to do exactly this: ClarkKent. A: If you h...
{ "language": "en", "url": "https://stackoverflow.com/questions/273876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: J2ME Properties J2ME lacks the java.util.Properties class. Although it is possible to put application settings in the JAD file this is not recommended for many properties. (Since, some platforms limits the size of JAD file.) I want to put a configuration file inside my jar file and parse it. And I do not want to go ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Referencing in forms I have two forms in microsoft access, one called Bill and the other one called Payment. They both have Total amount as a field in both of the forms. I am trying to reference the Bill total amount to the Payment total amount. I have tried in the Payment total amount control source : =Forms!Bill!...
{ "language": "en", "url": "https://stackoverflow.com/questions/273898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why is Java on a Vista box reporting it is on XP? I have stumbled across something truly puzzling regarding System.getProperty("os.name"). According to a Java bug on the matter and the Java 5 release notes (search for "os.name"), there was a bug in Java with early "longhorn" versions of Vista that should have been f...
{ "language": "en", "url": "https://stackoverflow.com/questions/273899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: c++ integer->std::string conversion. Simple function? Problem: I have an integer; this integer needs to be converted to a stl::string type. In the past, I've used stringstream to do a conversion, and that's just kind of cumbersome. I know the C way is to do a sprintf, but I'd much rather do a C++ method that is typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "77" }
Q: How do I manipulate $PATH elements in shell scripts? Is there a idiomatic way of removing elements from PATH-like shell variables? That is I want to take PATH=/home/joe/bin:/usr/local/bin:/usr/bin:/bin:/path/to/app/bin:. and remove or replace the /path/to/app/bin without clobbering the rest of the variable. Extra p...
{ "language": "en", "url": "https://stackoverflow.com/questions/273909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Visual Studio's wsdl.exe can't find some info in my schema. Not sure if this is an error When I use wsdl.exe to create a client from my wsdl, it finishes O.K., but inserts the following comment in the file: // CODEGEN: Parameter 'VerificationData' requires additional schema information that cannot be captured using ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting distinct records from a mysql query In my application, there are publishers and categories. One publisher can belong to several categories. When I make my mysql transaction, it will return the same publisher record for each category it belongs to. Here's the query: SELECT grdirect_publisher.name, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the equivalent of Oracle’s REF CURSOR in MySQL when using JDBC? In Oracle I can declare a reference cursor... TYPE t_spool IS REF CURSOR RETURN spool%ROWTYPE; ...and use it to pass a cursor as the return value... FUNCTION end_spool RETURN t_spool AS v_spool t_spool; BEGIN COMMIT; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I Create an instance of a class in another class in Python I am trying to learn Python and WxPython. I have been a SAS programmer for years. This OOP stuff is slowly coming together but I am still fuzzy on a lot of the concepts. Below is a section of code. I am trying to use a button click to create an in...
{ "language": "en", "url": "https://stackoverflow.com/questions/273937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to send a message to a TThread from main thread in Delphi? I want to send a message to a thread and handle it in the thread. How can I do this in Delphi? I guess PostMessage is the way to go, but the examples I've seen so far are describing the other way, i.e. from the thread to main thread. A: I won't even try...
{ "language": "en", "url": "https://stackoverflow.com/questions/273938", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Get property name and type using lambda expression I am trying to write a function that will pull the name of a property and the type using syntax like below: private class SomeClass { Public string Col1; } PropertyMapper<Somewhere> propertyMapper = new PropertyMapper<Somewhere>(); propertyMapper.MapProperty(x ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Why do we need the decorator in the decorator design pattern? Presuming I have a class named A, and I want to use the decorator design pattern. Correct me if I'm wrong, but for that to work , we'll need to create a decorator class, say ADecorator, which will hold a reference to an A instance, and all the other decor...
{ "language": "en", "url": "https://stackoverflow.com/questions/273943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: J2EE Error Handling - Application and User I have a question regarding handling errors in a J2EE application. Our current application is in use by many many users and as a result we get a lot of support tickets. Most of these tickets are user-related but 5-10% are system related exceptions, unhandled errors, etc. We...
{ "language": "en", "url": "https://stackoverflow.com/questions/273944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I resize an image using PIL and maintain its aspect ratio? Is there an obvious way to do this that I'm missing? I'm just trying to make thumbnails. A: I also recommend using PIL's thumbnail method, because it removes all the ratio hassles from you. One important hint, though: Replace im.thumbnail(size) wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/273946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "610" }
Q: How do I ignore the inheritance chain when getting attributes? For some reason I'm not getting this. (Example model below) If I write: var property = typeof(sedan).GetProperty("TurningRadius"); Attribute.GetCustomAttributes(property,typeof(MyAttribute), false) the call will return MyAttribute(2) despite indicating...
{ "language": "en", "url": "https://stackoverflow.com/questions/273949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change background-color on text links on hover but not image links I have a CSS rule like this: a:hover { background-color: #fff; } But this results in a bad-looking gap at the bottom on image links, and what's even worse, if I have transparent images, the link's background color can be seen through the imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/273964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Escaping double quotes in a value for a sticky form in PHP I'm having a little bit of trouble making a sticky form that will remember what is entered in it on form submission if the value has double quotes. The problem is that the HTML is supposed to read something like: <input type="text" name="something" value="Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/273969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: HTTP status for functional redirect Right now we've got web pages that show UI elements, and web pages that just process form submissions, and then redirect back to the UI pages. They do this using PHP's header() function: header("Location: /other_page.php"); This causes a 302 Found response to be sent; according ...
{ "language": "en", "url": "https://stackoverflow.com/questions/273970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can someone tell me the very basics of how computer programming works? What makes all the words of a programming language actually do anything? I mean, what's actually happening to make the computer know what all of those words mean? If I verbally tell my my computer to do something, it doesn't do it, because it doe...
{ "language": "en", "url": "https://stackoverflow.com/questions/273978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }