text
string
meta
dict
Q: Is MSMQ thread safe? I have multiple processes monitoring an MSMQ queue. I want to do multi-step operations like first peek the message and then based on some criteria receive the message. A single message may pass the receiving criteria of multiple processes so that more than one process may try to receive the same...
{ "language": "en", "url": "https://stackoverflow.com/questions/224618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: VB.NET error: Index was outside the bounds of the array This error comes out whenever I click the datagrid. The program does fill the datagrid every time data was selected in the combobox. For example, I choose data1 which has four records in datagrid, and then I click row index no 1. No problem, it will be shown, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/224624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Loader scripts for ARM STR7xx I'm trying to program ARM using Eclipse + CDT + yagarto (gnu toolchain) + OpenOCD. In several sample projects (from yagarto site for example) I found linker scripts (*.ld) where a lot of linking information specified (along with sections definitions). Actually I haven't faced this files...
{ "language": "en", "url": "https://stackoverflow.com/questions/224635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JSP custom tag library (Passing Attributes) I'm trying to use multiple attributes in my custom tag, e.g.: <mytaglib:mytag firstname="Thadeus" lastname="Jones" /> How can I access the attributes in the TagHandler code? A: In order to access the parameters your TagHandler class should define the private members and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Portability of Java Swing applications to OSX Recently I wrote an extremely basic Java Swing program with a couple of text fields and buttons. The program works fine for me on Ubuntu with Java 1.5. But when I try to run it on OSX (10.4), the main window is displayed correctly but the program seems unresponsive. Noth...
{ "language": "en", "url": "https://stackoverflow.com/questions/224643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Double cast for Double smaller than zero Double out = otherTypes.someMethod(c, c2); assertEquals((Double)-1.0D, out); I get error "Double cannot be resolved" (the Double in assertEquals), is there any way to hack around it except extracting variable? Is this bug in Java or just very usefull feature that wont be fix...
{ "language": "en", "url": "https://stackoverflow.com/questions/224646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: External Iterator vs Internal Iterator What is an external and internal iterator in Java ? A: Example of external iterator: int count = 0; Iterator<SomeStaff> iterator = allTheStaffs.iterator(); while(iterator.hasNext()) { SomeStaff staff = iterator.next(); if(staff.getSalary() > 25) { count++; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224648", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Design questions for an OOP library in Lua I implemented a small OOP library in Lua, and two things are not quite right yet. I need your advice! How to call super()? I need to make a choice. The three arguments I need to resolve a call to super() are: * *The class from where the call is being made (CallerClass) *...
{ "language": "en", "url": "https://stackoverflow.com/questions/224658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Incoming poplib refactoring using windows python 2.3 Hi Guys could you please help me refactor this so that it is sensibly pythonic. import sys import poplib import string import StringIO, rfc822 import datetime import logging def _dump_pop_emails(self): self.logger.info("open pop account %s with username: %s" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting AssociatedControlID on label fails I have a composite control that adds a TextBox and a Label control to its Controls collection. When i try to set the Label's AssociatedControlID to the ClientID of the Textbox i get this error Unable to find control with id 'ctl00_MainContentPlaceholder_MatrixSetControl_me...
{ "language": "en", "url": "https://stackoverflow.com/questions/224662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the difference between a proxy server and a reverse proxy server? What is the difference between a proxy server and a reverse proxy server? A: Here's an example of a reverse proxy (as a load balancer). A client surfs to website.com and the server it hits has a reverse proxy running on it. The reverse proxy h...
{ "language": "en", "url": "https://stackoverflow.com/questions/224664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1917" }
Q: datetime subtract .net i want to get datetime for 2days before. i.e) how to subtract 2 days from datetime.now A: or try: DateTime.Now.Subtract(TimeSpan.FromDays(2)); A: I think you are just looking for: DateTime.Now.AddDays(-2); A: Yet another solution: DateTime twoDays = DateTime.Now.Subtract(new TimeSpan(2,0,...
{ "language": "en", "url": "https://stackoverflow.com/questions/224665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Correct Rails 2.1 way of doing things Some of the answers to a question I had about redirect_to made me think about some other questions. Basically I'm writing a blog application using Rails 2.1. I've been trying to do most of it myself (as I know a bit of rails), but with reference to tutorials and references on th...
{ "language": "en", "url": "https://stackoverflow.com/questions/224669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Git: Find duplicate blobs (files) in this tree This is sort of a follow-up to this question. If there are multiple blobs with the same contents, they are only stored once in the git repository because their SHA-1's will be identical. How would one go about finding all duplicate files for a given tree? Would you h...
{ "language": "en", "url": "https://stackoverflow.com/questions/224687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Transactions in .net What are the best practices to do transactions in C# .Net 2.0. What are the classes that should be used? What are the pitfalls to look out for etc. All that commit and rollback stuff. I'm just starting a project where I might need to do some transactions while inserting data into the DB. Any res...
{ "language": "en", "url": "https://stackoverflow.com/questions/224689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "152" }
Q: How to make search engines find my AJAX content I have a page which dynamically loads a section of content via AJAX. I'm concerned that this means the content will not be found by search engines. To show you what I mean, the site is at http://www.gold09.net and the dynamic content is at /speakers.php - Normally no o...
{ "language": "en", "url": "https://stackoverflow.com/questions/224698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the exact rules for structure alignment on iPhone OS? I'm using the Objective-C NSMethodSignature / @encode facilities to do some cross-language data type translation, which means that I need to be able to programmatically copy values into a structure described in @encode() format. e.g., I may have 4 float...
{ "language": "en", "url": "https://stackoverflow.com/questions/224701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: boost lambda or phoenix problem: using std::for_each to operate on each element of a container I ran into a problem while cleaning up some old code. This is the function: uint32_t ADT::get_connectivity_data( std::vector< std::vector<uint8_t> > &output ) { output.resize(chunks.size()); for(chunk_vec_t::iterat...
{ "language": "en", "url": "https://stackoverflow.com/questions/224704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Provide password using Shell script I had setup my clients & server for passwordless login. Like passwordless login by copying RSA key of server to all client's /root/.ssh/id-rsa.pub. but this, I have done manually. I like to automate this process using shell script and providing password to the machines through scr...
{ "language": "en", "url": "https://stackoverflow.com/questions/224712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is Full Text Search vs LIKE I just read a post mentioning "full text search" in SQL. I was just wondering what the difference between FTS and LIKE are. I did read a couple of articles but couldn't find anything that explained it well. A: FTS involves indexing the individual words within a text field in orde...
{ "language": "en", "url": "https://stackoverflow.com/questions/224714", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "170" }
Q: Mocking non-public static methods in abstract classes with JMockit? I have the following class: public abstract class AbstractParent { static String method() { return "OriginalOutput"; } } I want to mock this method. I decide to use JMockit. So I create a mock class: public class MockParent { st...
{ "language": "en", "url": "https://stackoverflow.com/questions/224721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Tips for writing fluent interfaces in C# 3 I'm after some good tips for fluent interfaces in C#. I'm just learning about it myself but keen to hear what others think outside of the articles I am reading. In particular I'm after: * *when is fluent too much? *are there any fluent patterns? *what is in C# that mak...
{ "language": "en", "url": "https://stackoverflow.com/questions/224730", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: SQL Update from One Table to Another Based on a ID Match I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number so that I am only working with account numbers. I created a view linking the table to the account/card database to return the Tabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/224732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1168" }
Q: Tree view plus minus icon larger How do i make the plus minus icons bigger in the tree view in C# .net with out making visual styles disable. A: I don't think you have any control about it. The only thing you can do is override the DrawNode event and paint the nodes yourself. First you need to change the DrawMode t...
{ "language": "en", "url": "https://stackoverflow.com/questions/224733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Open Source Profiling Frameworks? Have you ever wanted to test and quantitatively show whether your application would perform better as a static build or shared build, stripped or non-stripped, upx or no upx, gcc -O2 or gcc -O3, hash or btree, etc etc. If so this is the thread for you. There are hundreds of ways to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the most optimized way to write a paged query in SQL Server 2005? I know several ways of writing paged query in SQL Server 2005. But I have no idea about their performance. Which one is the best and most optimized way for writing paging SQL queries? * *Using Row_Number() *Using Partition by *Using Tempo...
{ "language": "en", "url": "https://stackoverflow.com/questions/224741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JSP custom tag library (Unable to find setter method for the attribute) I'm having trouble with a custom tag:- org.apache.jasper.JasperException: /custom_tags.jsp(1,0) Unable to find setter method for attribute : firstname This is my TagHandler class: package com.cg.tags; import javax.servlet.jsp.JspException; impo...
{ "language": "en", "url": "https://stackoverflow.com/questions/224748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Java Application Hang on Linux at "java.io.UnixFileSystem.getBooleanAttributes0" Our customers application seems to hang with the following stack trace: java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(Unknown Sou...
{ "language": "en", "url": "https://stackoverflow.com/questions/224756", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Splitting WPF interface across multiple Xaml files I am trying to create a user interface using XAML. However, the file is quickly becoming very large and difficult to work with. What is the best way for splitting it across several files. I would like to be able to set the content of an element such as a ComboBox to...
{ "language": "en", "url": "https://stackoverflow.com/questions/224765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: How can I programmatically add playlists or views to iTunes? Is there a way to programmatically interface with iTunes to add new playlists or smart views? For example, say I download 10 new mp3 files from a website, is there a way of programmatically adding this list of mp3s to a new playlist called "New Album xx"? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you use the cursor for reading multiple files in database in python In python how do you read multiple files from a mysql database using the cursor or loop one by one and store the output in a separate table? A: I don't understand your question (what are files?, what's your table structure?), but here goes a...
{ "language": "en", "url": "https://stackoverflow.com/questions/224771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to embed Ruby in an XNA engine? I'm wondering if it's possible to embed Ruby as a scripting language in Microsoft XNA, and what's the best way to do that. I'm looking for something like Xnua, except for Ruby. I've stumbled upon Ruby.NET and IronRuby and both seem to be in very early stages, so I'm not sure how ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Thread local storage with __declspec(thread) fails in C++/CLI I'm working on a project where we mix .NET code and native C++ code via a C++/CLI layer. In this solution I want to use Thread Local Storage via the __declspec(thread) declaration: __declspec(thread) int lastId = 0; However, at the first access of the va...
{ "language": "en", "url": "https://stackoverflow.com/questions/224777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Visual Studio reference x64 GAC How can one get Visual Studio 2005/2008 to reference assemblies in the 64-bit GAC instead of the 32-bit GAC? We are settin the target platfom to x64 and the compiler is throwing the error of Error 2 Warning as Error: Assembly generation -- Referenced assembly 'System.Data.dll' target...
{ "language": "en", "url": "https://stackoverflow.com/questions/224786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I generate a report file (ODF, PDF) from a django view I would like to generate a report file from a view&template in django. Preferred file formats would be OpenOffice/ODF or PDF. What is the best way to do this? I do want to reuse the page layout defined in the template, possibly by redefining some blocks ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: End win32 process vbscript I've got the following code to end a process, but I still receive an error code 2 (Access Denied). strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'MSSEARCH....
{ "language": "en", "url": "https://stackoverflow.com/questions/224797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bitwise Flags abandoned? I've noticed that plenty of opensource project doesn't use BITWISE flags anymore, even if it's fully supported by programming enviroment common for web ( php/Mysql). It's that a "lost practise" for some effective problem, or is just that a lot of php programmers don't know how to handle this...
{ "language": "en", "url": "https://stackoverflow.com/questions/224799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: does regex comparisons consume lots of resources? i dunno, but will your machine suffer great slowdown if you use a very complex regex? like for example the famous email validation module proposed just recently? which can be found here RFC822 update: sorry i had to ask this question in a hurry anyway i posted the li...
{ "language": "en", "url": "https://stackoverflow.com/questions/224804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Insert firelog into mysql I'm interested of inserting the firewall log which I'm printing to the stdout to a mysql database as well. How would I do that? the line output is: 16:51:56 drop Nova <eth0 Attack Info: MS Word cascading style sheet vulnerability detected (MS08-026); attack: Content Protection Violatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/224806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I pass arguments to anonymous functions in JavaScript? I'm trying to figure out how to pass arguments to an anonymous function in JavaScript. Check out this sample code and I think you will see what I mean: <input type="button" value="Click me" id="myButton" /> <script type="text/javascript"> var myButt...
{ "language": "en", "url": "https://stackoverflow.com/questions/224820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: How to delete temporary ASP.net files in a production environment? I have deployed a new build on Production server, but I dont see the change in this version. I found out that it was caused due to old version of the DLL file under the temporary ASP.net folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary...
{ "language": "en", "url": "https://stackoverflow.com/questions/224823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Tips for optimizing an sqlite database with over a gig of data in it? I am working with a larger than average sqlite database (for use on both on windows and linux) and am looking to maximize the performance I get out of it. The database is to be installed on commodity hardware along with an sqlite gui. The users I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I set a SQL Server script's timeout from within the script? I have a large script file (nearly 300MB, and feasibly bigger in the future) that I am trying to run. It has been suggested in the comments of Gulzar's answer to my question about it that I should change the script timeout to 0 (no timeout). What is...
{ "language": "en", "url": "https://stackoverflow.com/questions/224830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Ruby Daemons will not start I am using the ruby daemons gem to create a custom daemon for my rails project. The only problem is that when I try to start the daemons ruby lib/daemons/test_ctl start that it fails and will not start. The log file has this output. # Logfile created on Wed Oct 22 16:14:23 +0000 2008 by ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Dragging & dropping items from one list to another in a ASP.NET page? I would like to move items from one list to another on a page, and I'm pretty flexible about what type of a list it is. What's the best way to do that? ASP.NET Ajax? jQuery? Anything else? A: There's a nice tutorial on CodeProject that covers dra...
{ "language": "en", "url": "https://stackoverflow.com/questions/224852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I get all installed fixed-width fonts? I'm wondering if there are any simple ways to get a list of all fixed-width (monospaced) fonts installed on a user's system in C#? I'm using .net 3.5 so have access to the WPF System.Windows.Media namespace and LINQ to get font information, but I'm not sure what I'm look...
{ "language": "en", "url": "https://stackoverflow.com/questions/224865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Easy, simple to use LRU cache in java I know it's simple to implement, but I want to reuse something that already exist. Problem I want to solve is that I load configuration (from XML so I want to cache them) for different pages, roles, ... so the combination of inputs can grow quite much (but in 99% will not). To h...
{ "language": "en", "url": "https://stackoverflow.com/questions/224868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Nested predicates in xslt Is it possible to do the equivalent of the following in xslt: .//TagA[./TagB/[@AttrA='AttrAValue'] = 'TagBValue'] This is failing within Visual Studio 2008 with the following error: error: Unexpected token '[' in the expression. .//TagA[./TagB/ -->[<-- @AttrA='AttrAValue'] = 'TagBValue'] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Find number range intersection What is the best way to find out whether two number ranges intersect? My number range is 3023-7430, now I want to test which of the following number ranges intersect with it: <3000, 3000-6000, 6000-8000, 8000-10000, >10000. The answer should be 3000-6000 and 6000-8000. What's the nice,...
{ "language": "en", "url": "https://stackoverflow.com/questions/224878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to insert/move/delete nodes in xml with Groovy? for example, I have the following xml document: def CAR_RECORDS = ''' <records> <car name='HSV Maloo' make='Holden' year='2006'/> <car name='P50' make='Peel' year='1962'/> <car name='Royale' make='Bugatti' year='1931'/> </records> ''' and...
{ "language": "en", "url": "https://stackoverflow.com/questions/224926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: runtime font loading in Flash/AS3 Imagine you're creating a presentation that will be translated into a dozen different languages, including ones with non-latin characters (Chinese, for instance). The client's branding style guide dictates that certain fonts are acceptable for certain languages. The content itself i...
{ "language": "en", "url": "https://stackoverflow.com/questions/224933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Should the timezone be a constant or a variable? I have a few places in the code where I need to use the TimeZone. I can get the timezone name using DateTime::TimeZone. Is it reasonable to put the timezone name in a constant? Or should it be in a variable? A: If the value can change, use a variable, of it is guaran...
{ "language": "en", "url": "https://stackoverflow.com/questions/224940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Raw partition access in Windows Vista Accessing a raw disk partition in Windows Vista requires kernel mode control, as opposed to for instance WinXP where you can access it from user mode. However, I've heard that when it comes to USB flash memory, a partition can still be accessed from user mode even on Windows Vis...
{ "language": "en", "url": "https://stackoverflow.com/questions/224942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Add warning for missing @Override annotation for interface implementation in Eclipse In Eclipse 3.4.1 using JDK1.6.0_10 how can I activate a warning on a missing @Override annotation on a method that implements an interface method? In the Preferences window this option: Java > Compiler > Errors / Warnings > Anno...
{ "language": "en", "url": "https://stackoverflow.com/questions/224945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is it possible to limit the maximum duration of queries in SQL Server 2000? Specifically I'd like to detect when a query has been executing for over 5 minutes and then cause it to rollback, I could no doubt do this at an application level but am investigating if SQL Server has any built in mechanism to do this for m...
{ "language": "en", "url": "https://stackoverflow.com/questions/224949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Most concise way to read the contents of a file/input stream in Java? What ist most concise way to read the contents of a file or input stream in Java? Do I always have to create a buffer, read (at most) line by line and so on or is there a more concise way? I wish I could do just String content = new File("test.txt...
{ "language": "en", "url": "https://stackoverflow.com/questions/224952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the difference between private and protected members of C++ classes? What is the difference between private and protected members in C++ classes? I understand from best practice conventions that variables and functions which are not called outside the class should be made private—but looking at my MFC projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/224966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "336" }
Q: Converting a string of numbers into integers I have a string (char) and I want to extract numbers out of it. So I have string: 1 2 3 4 /0 And now I want some variables, so I can use them as integer: a=1, a=2, a=3, a=4 How can I do that? A: The answers given so far are correct, as long as your string is formatted th...
{ "language": "en", "url": "https://stackoverflow.com/questions/224969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I make the children appear in a custom webcontrol for ASP.NET? For example, I have a custom control called SampleControl. To simplify things for this question, pretend I'm making just a Panel Control clone from scratch. <CC:SampleControl ID="Sample1" runat="server"> <asp:Label ID="Label1" runat="server" T...
{ "language": "en", "url": "https://stackoverflow.com/questions/224978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Implementing xunit in a new programming language Some of us still "live" in a programming environment where unit testing has not yet been embraced. To get started, the obvious first step would be to try to implement a decent framework for unit testing, and I guess xUnit is the "standard". So what is a good starting ...
{ "language": "en", "url": "https://stackoverflow.com/questions/224996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Spring-WS: How to access MessageContext from PayloadEndpoint What is the "canonical" way to access the MessageContext from a PayloadEndpoint? We are using PayloadEndpoint and AbstractMarshallingPayloadEndpoint which do not expose the MessageContext to their invoke / invokeinternal methods, but will now need to acces...
{ "language": "en", "url": "https://stackoverflow.com/questions/225009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I create CUDA apps now, or wait for DirectX 11? With Windows 7 probably going to RTM next October (and DirectX 11 with it), would it be worth waiting for DirectX 11's explicit GPGPU features, meaning it will be cross-platform (ATI/Nvidia, not Windows/Linux/Mac/Whatever); or should I create a CUDA application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to stop IE asking which debugger to choose when **trying** to debug? When debugging in Internet Explorer, I first get an alert box with extremely limited if not useless information (sorry IE) and choose to debug it. After selecting yes, I get another option every time to choose between 'New instance of Microsoft...
{ "language": "en", "url": "https://stackoverflow.com/questions/225030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Can I create a unit test for a method which marshalls a value from an IntPtr? I am using a native library which returns an IntPtr to a memory location, which contains the value of an attribute. I know what the type of the attribute is and I have a method for marshalling a value (taking the IntPtr and the type of th...
{ "language": "en", "url": "https://stackoverflow.com/questions/225032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to identify a font as symbolic in java? I'm currently looking for a possibility in Java to identify a font as symbolic like OpenOffice does. Characters with the font Windings or Webdings and so on should be rendered with the correct "pictures". Anyone an idea how to distinguish between normal fonts and fonts wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/225034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Code Coverage on Visual Studio Team System 2008 Developer Edition (on an NUnit application) Is this possible? I am looking forward to a tutorial which explains the steps to achieve this. A: TestDriven.NET has the ability to test (NUnit/MSTest/etc) with Team Coverage (which you already have since you have Team Syste...
{ "language": "en", "url": "https://stackoverflow.com/questions/225040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: FizzBuzz using ternary conditional operator I've been reading up on conditional-style expressions in ruby. However I came across one I couldn't quite understand to define the classic FizzBuzz problem. I understand the FizzBuzz problem and even wrote my own before finding the following quick solution utilising the te...
{ "language": "en", "url": "https://stackoverflow.com/questions/225045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Using KeyDown event in the parent window of a Delphi Mdi Application How do I get the KeyDown event to work in a Delphi (2007) MDI Applications Parent window, even if a Child window has focus? I would like to implement a shortcut key (F1) that brings up a help screen in a MDI application, I have added the KeyDown p...
{ "language": "en", "url": "https://stackoverflow.com/questions/225052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: groovy inside ant: how to access refids from grooy that are defined by ant tags I'm using a groovy code snippet in an ant build file. Inside the groovy code I'm trying to reference a fileset that has been defined outside of the groovy part, like this: <target name="listSourceFiles" > <fileset id="myfileset" dir=...
{ "language": "en", "url": "https://stackoverflow.com/questions/225063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Current Window should seen on the top I am making an web based appliaction in java (using jsp). When the appliaction is invoked login page will come, when the user enter the valid credientials, he will be taken to the index page. But the problem is, when the login is success, the index page is coming but it is openi...
{ "language": "en", "url": "https://stackoverflow.com/questions/225071", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing what's written to a Java OutputStream I am about to write junit tests for a XML parsing Java class that outputs directly to an OutputStream. For example xmlWriter.writeString("foo"); would produce something like <aTag>foo</aTag> to be written to the outputstream held inside the XmlWriter instance. The questi...
{ "language": "en", "url": "https://stackoverflow.com/questions/225073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How can I stream video from my application to the web? I have an application that grabs video from multiple webcams, does some image processing, and displays the result on the screen. I'd like to be able to stream the video output on to the web - preferably to some kind of distribution service rather than connectin...
{ "language": "en", "url": "https://stackoverflow.com/questions/225078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ejabberd - LDAP authentication I'm trying to configure an ejabberd installation, using LDAP authentication, but I just can't login, even with the admin user. This is part of my ejabberd.cfg file: %... {auth_method, ldap}. {ldap_servers, ["server2000.tek2000.local"]}. {ldap_port,389}. {ldap_uidattr, "uid"}. {ldap_bas...
{ "language": "en", "url": "https://stackoverflow.com/questions/225080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: RFC 1123 Date Representation in Python? Is there a fairly easy way to convert a datetime object into an RFC 1123 (HTTP/1.1) date/time string, i.e. a string with the format Sun, 06 Nov 1994 08:49:37 GMT Using strftime does not work, since the strings are locale-dependant. Do I have to build the string by hand? A: Y...
{ "language": "en", "url": "https://stackoverflow.com/questions/225086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: How do you store uploaded files in a filesystem? I'm trying to figure out the best way to store user uploaded files in a file system. The files range from personal files to wiki files. Of course, the DB will point to those files by someway which I have yet to figure out. Basic Requirements: * *Fairy Decent Se...
{ "language": "en", "url": "https://stackoverflow.com/questions/225088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can't we initialize members inside a structure? Why can't we initialize members inside a structure ? example: struct s { int i = 10; }; A: Edit2: This answer was written in 2008 and relates to C++98. The rules for member initialization have changed in subsequent versions of the language. Edit: The question...
{ "language": "en", "url": "https://stackoverflow.com/questions/225089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: RJS/Javascript conventions in Rails I'm starting to look into the whole world of RJS and Prototype/jQuery in Rails and am a little bit confused. There seems to be no clear line of where to use one or the other. Say I wanted one of the "Active, Hot, Week" tabs like the ones here on SO. When pressing one of them, I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/225096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Advice with Class Hierarchy for Game Items I'm writing a MUD engine and I've just started on the game object model, which needs to be extensible. I need help mainly because what I've done feels messy, but I can't think of a another solution that works better. I have a class called MudObject, and another class called...
{ "language": "en", "url": "https://stackoverflow.com/questions/225103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Resize a JPanel in line with a JDialog I've got a JDialog which contains a series of JPanels in a CardLayout. Some of these panels contain JTables which I would like to be resized in line with any resizing of the JDialog. I am not sure how to achieve this and any help would be greatly appreciated. At present the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/225108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What does each SVN automatic conflict resolution action perform? I wrote a batch script which recursively updates my source code against the company's working base. When conflicts occur, it prompts for an action. What is the difference between 'base' and 'theirs-full'? Does 'mine-full' means "keep my changes at the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Tooltip for a line of text <td title="this is a really long line that I'm going to truncate">this is a really long line that I'm going to trunc ...</td> Is this the correct way to do it? A: The title attribute doesn't work inside the td tag. Enclose the text within a span tag instead: <td> <span title="this is...
{ "language": "en", "url": "https://stackoverflow.com/questions/225114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delphi: Moving away from VSS We are team of few Delphi developers who have been using VSS since years (I know it's a pity), but we don't use any of the advanced features of VCS, so it was working fine in many cases (but some times it was driving me crazy :( ). The good thing that we have with VSS that we use third-...
{ "language": "en", "url": "https://stackoverflow.com/questions/225115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Profiler for Sql CE i wonder if there is something similar to Sql Profiler for Sql Server Compact Edition? i use SqlCE as backend for a desktop application and it would be really great to have something like sql profiler for this embedded database. or at least something simliar to the NHibernate show_sql feature... ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Receive parameter from request body in WCF/ADO.NET Data Service I'm tryint to post to a ADO.NET Data Service but the parameters seems to get lost along the way. I got something like: [WebInvoke(Method="POST")] public int MyMethod(int foo, string bar) {...} and I make an ajax-call using prototype.js as: var args = {...
{ "language": "en", "url": "https://stackoverflow.com/questions/225130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How come you can create an interface instance in Office Interop? I've seen this quite a few times while using Office Interop classes this.CustomXMLParts.Add(MyResources.Data, new Office.CustomXMLSchemaCollection()); If I hover over the CustomXMLSchemaCollection class, it shows up as an interface. Then how come I ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/225135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I look up an ejb in jBoss 4.2? I have a simple j2ee application: foo.ear - foo.war - foo.jar (ejb3 jar) I am deploying into jBoss 4.2.2, which is J2EE 1.4 compliant, with an ejb3 jar deployer. Thus, at present it is not possible to use the @EJB annotation in servlets. In a regular 1.4 j2EE app I could use ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get Asp.Net to redirect user back to their starting point Guys, I’ve been writing code for 15+ years, but managed to avoid “Web Development” until 3 months ago. I have inherited a legacy Asp.net application (started in .net 1.1, we’re now on .Net 2.0), it’s the administration tool for our product. In several ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are there any pitfalls / things you need to know when changing from MyISAM to InnoDB One of my projects use the MyISAM engine in MySQL, but I'm considering changing it to InnoDB as I need transaction support here and there. * *What should I look at or consider before doing this? *Can I just change the engine, o...
{ "language": "en", "url": "https://stackoverflow.com/questions/225150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can I load a 32 bit DLL into a 64 bit process on Windows? I recently upgraded a c# windows service to run as a 64 bit .net process. Normally, this would be trivial, but the system makes use of a 32-bit DLL written in C++. It is not an option to convert this DLL to 64 bit, so I wrapped the DLL in a separate 32 bit .n...
{ "language": "en", "url": "https://stackoverflow.com/questions/225151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Good pointers that a software requirement is in fact political? Probably an easy one: Are there any rules of thumb or pointers that could help recognise political requirements? Let’s say one of stakeholders (your boss, a head of another department or an actual user) asks for a feature or particular characteristic of...
{ "language": "en", "url": "https://stackoverflow.com/questions/225154", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: In Eclipse, what can cause Package Explorer "red-x" error-icon when all Java sources compile without errors? I'm using Eclipse for Java development. All my sources compile fine and the resulting application compiles fine. However, I keep getting an "red-x" error notification in the Package Explorer. All my sources i...
{ "language": "en", "url": "https://stackoverflow.com/questions/225167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: What kind of behaviour causes an interrupted exception? I'm relatively new to Threading in Java and I've noticed that everytime I use Thread.sleep() I have to catch InterrupetdException. What kind of behaviour causes this, and in simple applications where I have a monitor thread can I just Ignore the exception? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: What can I do if a Java VM crashes repeatedly? What is the best practice to solve a Java VM crash if the follow conditions are true: * *No own or third party native code. 100% pure java *The same program run on many other system without any problems. PS: With VM crash I means that the VM write a dump file like...
{ "language": "en", "url": "https://stackoverflow.com/questions/225207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Removing Duplicate Images We have a collection of photo images sizing a few hundred gigs. A large number of the photos are visually duplicates, but with differing filesizes, resolution, compression etc. Is it possible to use any specific image processing methods to search out and remove these duplicate images? A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/225210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: Business Interface pattern with EJB with Remote as well as local interfaces How can I use Business Interface pattern with an EJB (session bean) with Local as well remote interfaces? A: It does not matter whether the interface is local or remote. You can write all your business methods into one interface and then us...
{ "language": "en", "url": "https://stackoverflow.com/questions/225221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where is the documentation for My feature in VB.Net? No I'm not being a wise guy ... For those fortunate enough to not know the My class: It's something that was added in VB 2005 (and doesn't exist in C#) and is best described as a 'speeddial for the .net framework'. Supposed to make life easier for newbies who won...
{ "language": "en", "url": "https://stackoverflow.com/questions/225233", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Defaulting WebParts on a Users MySite in Sharepoint I am working on a project that is replacing an old portal system (Plumtree) with sharepoint and we want to make the transition as smooth as possible. One thing we are look at currently is taking all the gadgets (Plumtree term for WebParts) and making sure they appe...
{ "language": "en", "url": "https://stackoverflow.com/questions/225243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to generate empty definitions given a header file I have a 3rd-party library which for various reasons I don't wish to link against yet. I don't want to butcher my code though to remove all reference to its API, so I'd like to generate a dummy implementation of it. Is there any tool I can use which spits out em...
{ "language": "en", "url": "https://stackoverflow.com/questions/225250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Is there a way to data bind a single item without eg. a Repeater control? Lets say I have a single object of type Car which I want to render as HTML: class Car { public int Wheels { get; set; } public string Model { get; set; } } I don't want to use the ASP.NET Repeater or ListView controls to bind because it s...
{ "language": "en", "url": "https://stackoverflow.com/questions/225263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Customising word separators in vi vi treats dash - and space   as word separators for commands such as dw and cw. Is there a way to add underscore _ as well? I quite often want to change part of a variable name containing underscores, such as changing src_branch to dest_branch. I end up counting characters and using...
{ "language": "en", "url": "https://stackoverflow.com/questions/225266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }