text
string
meta
dict
Q: How to change the background color of a single cell in reporting services 2005 I'm trying to change the background color of single cell be based on a string value and wanted to see this expression code. I was reading a similar question here, but this is not the exact same issue I'm trying to solve. A: If you are pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/248035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does Oracle allow an ORDER BY within an IN clause? Oracle is giving me an error (ORA-00907: missing right parenthesis) when I run this query: select * from reason_for_appointment where reason_for_appointment_id in ( select reason_for_appointment_id from appointment_reason where appointment_id = 11 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I improve this SQL query? I'm checking for existing of a row in in_fmd, and the ISBN I look up can be the ISBN parameter, or another ISBN in a cross-number table that may or may not have a row. select count(*) from in_fmd i where (description='GN') and ( i.isbn in ( select bwi_isbn from bw_is...
{ "language": "en", "url": "https://stackoverflow.com/questions/248052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In DotNetNuke, how can I get a ModuleInfo object if I just have a ModuleId (and not a TabId) The only method provided by the DNN framework to get a module by ID also required a tab ID. What can I do if I don't have a tab ID? A: The GetModule method off of the DotNetNuke.Entities.Modules.ModuleController class will...
{ "language": "en", "url": "https://stackoverflow.com/questions/248067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I retrieve the version of an Assembly in C#? I have a reference to a type, for which I would like to retrieve the version number of the Assembly in which it is located. What is the best way to do this? A: you can use, x.GetType().Assembly.GetName().Version
{ "language": "en", "url": "https://stackoverflow.com/questions/248069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is calling an extension method on a "null" reference (i.e. event with no subscribers) evil? Evil or not evil? public static void Raise(this EventHandler handler, object sender, EventArgs args) { if (handler != null) { handler(sender, args); } } // Usage: MyButtonClicked.Raise(this, EventArgs.Empty); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Is there any command to toggle enable auto text wrapping? By default, I think my vimrc setttings enable the auto-wrapping. However, sometimes, I would like to see text lines are not wrapped. Is there any command I toggle the text line wrapping enabled and disabled? This would avoid me to exit and to change settings....
{ "language": "en", "url": "https://stackoverflow.com/questions/248102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How Do I Use Eclipse to Debug a C++ Program on Linux? I don't use Eclipse as an IDE, and have no interest in doing so. However, I do like its source-level debugging. Is there any way I can use it to debug a C++ Linux app without going through the ritual of creating a project? (In effect, can I just use it like a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/248104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Windows API for detecting out of paper on specific printer tray I'm looking for a way to determine if a specific tray on a given printer in Windows is out of paper. Currenly I'm using the WMI Win32_Printer object to get the status of the entire printer, and if one of the trays is out of paper I do get a status that...
{ "language": "en", "url": "https://stackoverflow.com/questions/248111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I call a c# windows application from a control? I need to invoke a c# application within my c# control, as I do not feel like rewriting the application as a control. I am able to launch the application using System.Diagnostics.Process.Start. Now how do I call the methods in my application from/via the c# con...
{ "language": "en", "url": "https://stackoverflow.com/questions/248112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: System.IO.IOException: The symbolic link cannot be followed because its type is disabled What does this mean exactly? I'm doing something like this: File.Copy(@"\\foo\bar\baz.txt", @"c:\test\baz.txt"); MSDN doesn't describe this exception except in general terms, and googling around just yields tables of error cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/248118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Inserting a value into an SQL float column generates a weird result I am working on a legacy ASP application. I am attempting to insert a value (40.33) into a field in SQL Server 2000 that happens to be a float type. Every place I can see (via some logging) in the application is sending 40.33 to the Stored Procedur...
{ "language": "en", "url": "https://stackoverflow.com/questions/248122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I experiment with garbage collection? I'm interested in how garbage collection works. I've read up on how some work such as mark-and-sweep, stop-and-copy, generational GC, etc... I'd like to experiment with implementing some of these and comparing their behaviors. What's a good way to get started experimenti...
{ "language": "en", "url": "https://stackoverflow.com/questions/248134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Remove surrounding whitespace from an image I have a block of product images we received from a customer. Each product image is a picture of something and it was taken with a white background. I would like to crop all the surrounding parts of the image but leave only the product in the middle. Is this possible? A...
{ "language": "en", "url": "https://stackoverflow.com/questions/248141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Should I catch exceptions thrown when closing java.sql.Connection Connection.close() may throw SqlException, but I have always assumed that it is safe to ignore any such exceptions (and I have never seen code that does not ignore them). Normally I would write: try{ connection.close(); }catch(Exception e) {} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: openCV doesn't compile on Leopard I've been for the past few hours trying to figure out why openCV doesn't compile on leopard. I've been googling for references but all point to a dead google group. So my question is quite simple: I've read INSTALL file, read all documentation i could find and still couldn't figure ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: New Check Signature File in Dynamics GP How do I add a new signature file in Microsofts Dynamics GP. I already have the signature scanned into a .bmp file. What do I need to do next? A: File needs to be in .bmp format note: on first page step one the menu selections should be Tools>Setup>Purchasing>MICR Payables...
{ "language": "en", "url": "https://stackoverflow.com/questions/248158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Palindrome detection efficiency I got curious by Jon Limjap's interview mishap and started to look for efficient ways to do palindrome detection. I checked the palindrome golf answers and it seems to me that in the answers are two algorithms only, reversing the string and checking from tail and head. def palindrome_...
{ "language": "en", "url": "https://stackoverflow.com/questions/248161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: WCF Callbacks and network traffic I like using WCF callbacks when I can because to me it is better than the client having to poll the server and its more real time than polling. The question I have is when I subscribe to a WCF service event is there any kind of heart beat that keeps the connection alive between the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Binding DataList Containing Checkboxes to a Dictionary I have a DataList like so: <asp:DataList ID="dlMyList" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" CellSpacing="5" > <ItemTemplate> <asp:CheckBox ID="cbMyBox" Runat="server" Text='<%# Container.DataItem%>' ToolTip=''></asp:...
{ "language": "en", "url": "https://stackoverflow.com/questions/248166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a perfect code generation tool to generate MVC Storefront? Does anybody know a good code generation tool (other than Subsonic because it doesn't support IQueryable in current version) to generate repository and other projects in a way Rob Conery worked in MVC Storefront? A: Rob Conery has put out a Visual ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248168", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Creating a VS .Net 2003 property macro/variable I'd like to create a macro/variable for my project properties, similar to $(ConfigurationName), $(OutDir), etc - without making environment variables. I've found that this can be done in later versions of Visual Studio, but I do not have the option of updating my IDE....
{ "language": "en", "url": "https://stackoverflow.com/questions/248172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Lisp DO variable syntax reasoning In Peter Seibel's Practical Common Lisp, he gives this example: (do ((nums nil) (i 1 (1+ i))) ((> i 10) (nreverse nums)) (push i nums)) I can see how it works, using nums inside the loop but not giving it a step-form. Why would you put nums in the variable-definition rather ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Using Subversion and Apache I've never used any kind of source control before although I understand the concept. What I am confused about (and perhaps just not aware) is what benefit do I achieve and/or why would I want to configure Subversion and Apache? Do I need to configure it with Apache to be able to access my...
{ "language": "en", "url": "https://stackoverflow.com/questions/248181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: My C++ ActiveMQ client can send messages, but not receive messages I have the ActiveMQ-CPP 2.2.1 Visual Studio 2005 project compiling and running. In the console window, it shows the messages are being sent, though they're not being received. I can both send and receive messages with ActiveMQ-CPP 2.0.1, but not 2....
{ "language": "en", "url": "https://stackoverflow.com/questions/248182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Service needs to detect if workstation is locked, and screen saver is active I'm working on a service that needs to detect user states for all user(s) logged on to a single machine. Specifically, I want to check to see whether or not the screen saver is active and whether or not their session is locked. This code wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/248186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: mysql import sql via cli from remote server i know how to import an sql file via the cli: mysql -u USER -p DBNAME < dump.sql but that's if the dump.sql file is local. how could i use a file on a remote server? A: Just thought I'd add to this as I was seriously low on space on my local VM, but if the .sql file exis...
{ "language": "en", "url": "https://stackoverflow.com/questions/248219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: COM calling convention on x64 I am trying to get a definitive answer regarding the way COM behaves on a x64 machine. Does Windows use the normal x64 calling convention when dispatching calls to COM interfaces on x64 machines (assuming the COM implementation is 64 bits)? Specifically, I dynamically generate my vtbl e...
{ "language": "en", "url": "https://stackoverflow.com/questions/248221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Method Overloading. Can you overuse it? What's better practice when defining several methods that return the same shape of data with different filters? Explicit method names or overloaded methods? For example. If I have some Products and I'm pulling from a database explicit way: public List<Product> GetProduct(int p...
{ "language": "en", "url": "https://stackoverflow.com/questions/248222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: CodeRush Xpress Colors I downloaded the free CodeRush Xpress version to try it. Is there a way to change the colors it uses for it's highlighting and line drawing? ie the matching braces. I have a dark color scheme and my monitor I have VS on must suck because I can't see the lines. Yet on the LCD I can. Is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/248224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Tool to find duplicate sections in a text (XML) file? I have an XML file, and I want to find nodes that have duplicate CDATA. Are there any tools that exist that can help me do this? I'd be fine with a tool that does this generally for text documents. A: Here is a first attempt, written in Python and using only sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/248227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ruby support for XML namespaces I work at a small company and our production system uses a hand-rolled RESTful API, implemented in Java with JAXB. We now find that we're taking on customers who use Ruby on Rails, and I have to come up with a reference implementation to show customers how to use our API in Ruby. I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/248232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to solve this compatibility-problem regarding large file support? A library using off_t as a parameter for one function (seek). Library and application are compiled differently, one with large file support switched off, the other with large file support. This situation results in strange runtime errors, because ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is RIGHT JOIN Ever Required? Do any queries exist that require RIGHT JOIN, or can they always be re-written with LEFT JOIN? And more specifically, how do you re-write this one without the right join (and I guess implicitly without any subqueries or other fanciness): SELECT * FROM t1 LEFT JOIN t2 ON t1.k2 = t2.k2 RI...
{ "language": "en", "url": "https://stackoverflow.com/questions/248246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Stateful tail (only shows the new lines from the last execution) I want to be able to see how many lines were added to a file since the last quering without reading the whole file again. Something like : ptail my_file | fgrep "[ERROR]" | wc -l A solution in simple Perl would be prefered, since I don't have an easy...
{ "language": "en", "url": "https://stackoverflow.com/questions/248254", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why can't I declare C# methods virtual and static? I have a helper class that is just a bunch of static methods and would like to subclass the helper class. Some behavior is unique depending on the subclass so I would like to call a virtual method from the base class, but since all the methods are static I can't cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/248263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Windows FTP client with SOCKS support Does anybody know of a Windows FTP client with SOCKS support? I need it to build a deployment script... I tried Filezilla but its command-line support seems quite poor, I need something completely non-interactive. A: Nevermind, I just found out that cURL supports FTP upload.
{ "language": "en", "url": "https://stackoverflow.com/questions/248271", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Count number of Mondays in a given date range Given a date range, I need to know how many Mondays (or Tuesdays, Wednesdays, etc) are in that range. I am currently working in C#. A: Try this: static int CountDays(DayOfWeek day, DateTime start, DateTime end) { TimeSpan ts = end - start; // T...
{ "language": "en", "url": "https://stackoverflow.com/questions/248273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: JQuery: how to add XML node? Assume parentNode exists and I want to add an element "Child" to it. Following intutive code won't work: $("<Child>").appendTo(parentNode); Because jQuery will create a node and append to parentNode. So I am wondering, how do you add xml child node in jQuery? p.s. Following ugly code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: jQuery: how to get xml system independently? Suppose xmlNode is a XML DOM node, how do you get its XML system independently? For IE, it is xmlNode.xml; For Netscape, it is new XMLSerializer().serializeToString(xmlNode). In jQuery, is there any built-in method I can leverage? A: I don't know of a native JQuery fun...
{ "language": "en", "url": "https://stackoverflow.com/questions/248297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: APIs in C# for grabbing CPU IDs and drive/volume serial I'm aware that I can grab the CPU identifier and the volume serial number for a physical drive by querying WMI, but WMI usually takes its sweet time. What other speedier options, if any, are available to retrieve this information? Are there Win32 APIs that woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/248305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do i update a table column based on a condition? Two table: StoreInfo: UserId uniqueidentifier StoreNo nvarchar UserName nvarchar Password nvarchar UserInfo: UserId uniqueidentifier UserName nvarchar Password nvarchar the UserId on StoreInfo is currently null. How do i update StoreInfo's UserId with UserInfo's...
{ "language": "en", "url": "https://stackoverflow.com/questions/248312", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Strange behaviour when dynamically resizing Flash / Flex embed object I have a simple Flex application that is a panel with a repeater inside of it; albeit a little simplified, it is like such: <mx:Panel id="pnl"> <mx:Repeater id="rp"> <mx:Label text = "foo" /> &lt/mx:Repeater> &lt/mx:Panel> I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/248315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using "this" with jQuery Selectors I have some HTML that looks like this: <ul class="faq"> <li class="open"> <a class="question" href="">This is my question?</a> <p>Of course you can, it will be awesome. </p> </li> </ul> Using CSS I'm setting the p tag to display:none;. I want to use jQuery ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What's the best storage for SQL Server 2000? I want to access my sql server database files in a INTEL SS4000-E storage. It´s a NAS Storage. Could it be possible to work with it as a storage for sql server 2000? If not, what is the best solution? A: I strongly recommend against it. Put your data files locally on th...
{ "language": "en", "url": "https://stackoverflow.com/questions/248327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the best way of executing tasks in parallel in Ksh and Perl? I have this large C++ project that I need to build on a platform that does not have a parallel make (like make -j on Linux). The server has 6 CPU's and I want to do a parallel build manually. I can generate a task list like this for about 300 objec...
{ "language": "en", "url": "https://stackoverflow.com/questions/248332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Config values in DB or File? I have some configuration values for an asp.net web app. They will be maintained by a system admin once the system goes live. Should I store these values in the database or in a config file? Is there a best practice for this sort of thing? A: It's easy and convenient to create a robu...
{ "language": "en", "url": "https://stackoverflow.com/questions/248340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: "spurious" leading in latex the following latex input: \rule{1cm}{1cm}\\ \rule{1cm}{1cm} leaves a gap of about .35mm between the boxes. what is the length that defines this gap? A: Edit: I was only partly right at first, but GoogleBooks knew. It pointed me at A Beginner's Book of TeX By Raymond Seroul, Silvio Lev...
{ "language": "en", "url": "https://stackoverflow.com/questions/248341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Winform create table in RichTextBox control I need to create a simple editor using a RichTextBox control in a windows forms application that includes the ability to create tables. Is it possible to create a table in a RichTextBox control? If so, any pointers on the best way to do this would be appreciated. A: The w...
{ "language": "en", "url": "https://stackoverflow.com/questions/248342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Functional body of a program What is the "functional body" of a program? I thought it was its functions' prototypes, is it? A: It's the code that actually gets executed, so that would be the code inside your methods. A: Unfortunately, many programs have no functional parts. Seriously, you are over-thinking this. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/248349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I change the locale that JasperReports uses? The windows installed on my machine has the locale en_AU and that's what JasperReports uses. I already tried changing the locale of all users, including the Administrator but it still uses en_AU. How can I change that locale? Is it possible to change the REPORT_LOC...
{ "language": "en", "url": "https://stackoverflow.com/questions/248350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: How can I create a javascript badge or widget? I want to create a javascript badge that displays a list of links. We host the javascript on our domain. Other sites can put an empty div tag on their page and at the bottom a reference to our javascript that would render the content in the div tag. How do you impleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/248351", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java GUI LayoutManagers I'm busy with an asignment where i have to make a graphical interface for a simple program. But i'm strugling with the layout. This is the idea: What is the easiest way to accomplish such a layout? And what method do you use to make layouts in java. Just code it, or use an IDE like netbeans?...
{ "language": "en", "url": "https://stackoverflow.com/questions/248353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I find out which line of which stored procedure an error occurred on? When I try to run a particular stored procedure on my MS SQL 2005 database, I get an error like the following: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is...
{ "language": "en", "url": "https://stackoverflow.com/questions/248354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I build a DataTemplate in c# code? I am trying to build a dropdown list for a winform interop, and I am creating the dropdown in code. However, I have a problem getting the data to bind based on the DataTemplate I specify. What am I missing? drpCreditCardNumberWpf = new ComboBox(); DataTemplate cardLayout =...
{ "language": "en", "url": "https://stackoverflow.com/questions/248362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "88" }
Q: C# Datasets, paging and large amounts of data I want to show a large amount of data in a dataset, 100,000 records approx 10 columns, this consumes a large amount of ram 700MB. I have also tried using paging which reduces this by about 15-20% but I don't really like the Previous/Next buttons involved when using pagin...
{ "language": "en", "url": "https://stackoverflow.com/questions/248381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Workflow Tools Comparison? There is a pretty strong need for us to design some workflows around various processes. The problem is none of us actually know any workflow technology yet, and finding good data to compare the available options has been tedious and not entirely fruitful. So I figured I'd ask you guys. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/248393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Search and replace with a batch file I am writing a batch file script using Windows command and want to change each occurrence of some blank space with "," What is the simplest way to do that? A: If your users are a list of words on one line in a text file, separated by spaces, eg: one two three four Create a ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/248396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MDX: Calculated Dimensions? I don't know if this is possible or not, or if my limited knowledge of MDX is pushing me in the wrong direction... The cube I'm dealing with has two different dimensions for dates, [Statement Dates] and [Premium Dates]. Further in the hierarchy of each looks like this: [Statement Dates]....
{ "language": "en", "url": "https://stackoverflow.com/questions/248397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Please recommend an open source project with quality comments in good English English is not my mother tongue. However, I have to write comments in English. I want to improve my "comment English" by studying a piece of code which is commented in a good English. Please recommend an open source project which contains ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Finding composite numbers I have a range of random numbers. The range is actually determined by the user but it will be up to 1000 integers. They are placed in this: vector<int> n and the values are inserted like this: srand(1); for (i = 0; i < n; i++) v[i] = rand() % n; I'm creating a separate function to fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/248400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: comparison of code performance, threaded versus non-threaded I have some thread-related questions, assuming the following code. Please ignore the possible inefficiency of the code, I'm only interested in the thread part. //code without thread use public static int getNextPrime(int from) { int nextPrime = from+1...
{ "language": "en", "url": "https://stackoverflow.com/questions/248405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Thread safety of Matlab engine API I have discovered through trial and error that the MATLAB engine function is not completely thread safe. Does anyone know the rules? Discovered through trial and error: On Windows, the connection to MATLAB is via COM, so the COM Apartment threading rules apply. All calls must occu...
{ "language": "en", "url": "https://stackoverflow.com/questions/248421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Global.asax and handling exceptions that occur in spawned Threads I have an exception handler . In my asp.net application. It’s written in Global.asax. In the the Application_Error() method. It works for Exceptions that happen in the context of pages and classes that are called as a result of a request to the appl...
{ "language": "en", "url": "https://stackoverflow.com/questions/248423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best Practice for following Subversion repository Trunk: Git (Mirror), Git-Svn, Subversion? I want to checkout, and then update as necessary, the Django Subversion trunk on a Mac OS X Leopard 10.5.5 machine. I am only interested in having updated Django code on my Mac. I am not interested in contributing patches to...
{ "language": "en", "url": "https://stackoverflow.com/questions/248425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I improve cold startup performance for a VSTO2SE MS Office add-in? If you create a simple "Hello World" VSTO2SE add-in targeting Microsoft Office Excel 2003, it takes 15 seconds to load on a cold startup. During that time, Excel is completely unresponsive. The cold-startup time is always poor in Excel 200...
{ "language": "en", "url": "https://stackoverflow.com/questions/248427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Total download size of *initial* page of major websites I'm quite surprised how large some major websites homepages are. This is the total amount downloaded just when opening the homepage. cnn.com - 845kb microsoft.com - 470kb yahoo.com - 235kb gillette.com (flash) - 3.8Mb abc.com - 3.4Mb nbc.com - 1.4Mb youtube.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/248428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Hooking into Windows with C# to Produce Windows 7 New Feature I just saw a really useful UI feature of the forthcoming Windows 7 ( visit http://www.gizmodo.com.au/2008/10/windows_7_walkthrough_boot_video_and_impressions-2.html and scroll down to the video entitled Super Scientific Video of New Window Resizing Featur...
{ "language": "en", "url": "https://stackoverflow.com/questions/248433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET Parsing raw HTML into Controls Is it possible in ASP.NET to take a string containing some HTML and make ASP.NET to parse it and create a Control for me? For example: string rawHTML = "<table><td><td>Cell</td></tr></table>"; HTMLTable table = MagicClass.ParseTable(rawHTML); I know that this is a bad thing to...
{ "language": "en", "url": "https://stackoverflow.com/questions/248437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Windows Forms - Multiple Event Loops I have a Windows Forms (.NET) application that can have multiple documents open simultaneously. It would be convenient to have each document (form) running its own event loop. With brief experimentation, starting several event loops in their own STA threads seems to work. Is ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/248449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Authenticating a Web Service We are deploying our ASP.NET 3.5 app to a production server for beta testing. Each page is secured using SSL. On our homepage (default.aspx) we have web services which populate flash objects. I am getting an error: The HTTP request is unauthorized with client authentication scheme 'Anony...
{ "language": "en", "url": "https://stackoverflow.com/questions/248459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are good ways to design or diagram state? The issue that prompted me to ask this is a web form that was not persisting data the way I expected it to. That's vague, but the point is, what do you like to do to model state, flow of data, and so forth? A: I'll second the whiteboard answer and add that explaining w...
{ "language": "en", "url": "https://stackoverflow.com/questions/248460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Bash script, match on dates like? I'm writing a script to remove some build artifacts older than 1 week. The files have names in the form artifact-1.1-200810391018.exe. How do I go about removing only the files that are greater than 1 week old, excluding the time in hours and minutes at the end of the date-time-sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/248470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can callback methods in PHP's session_set_save_handler be private? I am writing a custom session handler in PHP and trying to make the methods defined in session_set_save_handler private. session_set_save_handler( array('Session','open'), array('Session','close'), array('Session','read'), array('Sess...
{ "language": "en", "url": "https://stackoverflow.com/questions/248478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: IE CSS Fieldset border extends too far to the right: Why? I have defined a fieldset in HTML, and applied the following (simple) CSS rules to it: fieldset { margin: 2em 0; position:relative; padding: 1em; border:1px solid #ccc; } Everything is great, no big deal, except in all versions (well, up to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I compare an epoch time against 24 hours ago in SQL Server? I am using MS SQL Server 2005, I have dates stored in epoch time (starting 1970) I need to create a statement that will affect any record that has not been updated in the last 24 hours. A: To get the current datetime into epoch format, use (via): SE...
{ "language": "en", "url": "https://stackoverflow.com/questions/248501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a blocking StreamReader, TextReader, or StringReader in .NET? I want to run a background task that reads input from a TextReader and processes it a line at a time. I want the background task to block until the user types some text into a field and clicks the submit button. Is there some flavour of TextReade...
{ "language": "en", "url": "https://stackoverflow.com/questions/248502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best datatype for currencies in MySQL? I want to store values in a bunch of currencies and I'm not too keen on the imprecise nature of floats. Being able to do math on them directly in queries is also a requirement. Is Decimal the way to go here? A: Decimal is the best way to go. You can still do math ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: YUI Menu positioned behind div I have implemented a YUI split button with a menu. The button with menu appears in a scrolling div between header and a footer divs. When exposing the menu near the footer div, the menu appears behind the div. I have tried positioning the footer div with a z-index of -1. I have trie...
{ "language": "en", "url": "https://stackoverflow.com/questions/248523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I conditionally suppress application exceptions written to the event log? I am working on a windows service that polls for a connection to a network enabled devices every 15 seconds. If the service is not able to connect to a device, it throws an exception and tries again in 15 seconds. All of this works gr...
{ "language": "en", "url": "https://stackoverflow.com/questions/248527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Open Browser window from Java program Question I have an application written in Java. It is designed to run on a Linux box standalone. I am trying to spawn a new firefox window. However, firefox never opens. It always has a shell exit code of 1. I can run this same code with gnome-terminal and it opens fine. Ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/248534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to find the Number of Active Users when using a StateServer How can you find out the number of active users when you're using a StateServer? Also is it possible to query the StateServer and retrieve the contents in the Session State? I know that this is all possible if you use SqlServer for a backing store,...
{ "language": "en", "url": "https://stackoverflow.com/questions/248535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Observer pattern with WCF MSMQ Is it possible to have multiple listeners to messages carried by MSMQ? WCF appears to frame everything in terms of services, making communication a point-to-point affair. I want to use a message queue to buffer incoming traffic for another process that records the logs in a database. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WPF Trigger for IsSelected in a DataTemplate for ListBox items I have a listbox, and I have the following ItemTemplate for it: <DataTemplate x:Key="ScenarioItemTemplate"> <Border Margin="5,0,5,0" Background="#FF3C3B3B" BorderBrush="#FF797878" BorderThickness="2" Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/248545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: LinqToSQL Not Updating the Database // goal: update Address record identified by "id", with new data in "colVal" string cstr = ConnectionApi.GetSqlConnectionString("SwDb"); // get connection str using (DataContext db = new DataContext(cstr)) { Address addr = (from a in db.GetTable<Address>() ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When using Spring Security, what is the proper way to obtain current username (i.e. SecurityContext) information in a bean? I have a Spring MVC web app which uses Spring Security. I want to know the username of the currently logged in user. I'm using the code snippet given below . Is this the accepted way? I do...
{ "language": "en", "url": "https://stackoverflow.com/questions/248562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "304" }
Q: VS2005 SP1 breakpoints in Vista Ultimate 64 not working I just migrated to Windows Ultimate 64 SP1, because my system's hard drive crashed. I installed Visual Studio 2005 SP1 and all the patches that Microsoft has recommended. I finally got my source code from my SCM, but now debugging does not stop on any of my bre...
{ "language": "en", "url": "https://stackoverflow.com/questions/248568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Starting Outlook and having an email pre-populated from command line Is this possible? I want to have the To:, Body, and an Attachment all pre-populated so all the user has to do is click send. Thanks! A: You can attach files AND pre-fill in the To/Body if you simply place " " quotes around the command after the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/248569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Netbeans GUI Designer & Fixed-Size Application Panels I'm having a problem, creating a fixed-size overall panel for a touchscreen GUI application that has to take up the entire screen. In a nutshell, the touchscreen is 800 x 600 pixels, and therefore I want the main GUI panel to be that size. When I start a new GUI...
{ "language": "en", "url": "https://stackoverflow.com/questions/248580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: A Firefox tool that shows object and element structure on hover? on any element in the webpage. I need to look at what the element and children elements are. For e.g. A: Also the Web Developer extension does a good job for DOM inspection... A: Check out Firebug http://getfirebug.com A: Firebug's Inspect tool soun...
{ "language": "en", "url": "https://stackoverflow.com/questions/248585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Writing a unit testing framework for testing SQL stored procedures Today I had an idea of writing a unit testing framework for stored procedures in MySQL. The full idea is written on a recent post on my blog. In short it goes like this: I want to automate my procedure testing, I want to use a standardized way to te...
{ "language": "en", "url": "https://stackoverflow.com/questions/248587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Finding unused jars used in an eclipse project Are there any plugins/tools available to go through the classpath of an eclipse project (or workspace) and highlight any unused jars? A: You can use one of this plugins: UCDetector or Classpath Helper A: ClassPathHelper is a good start. It automatically identifies orp...
{ "language": "en", "url": "https://stackoverflow.com/questions/248589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "68" }
Q: Natural Sort Order in C# Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array? I am implementing the IComparer interface in my sorts. A: Just thought I'd add to this (with the most concise solution I could find): public static IOrderedEnumerable<T> OrderByAlphaNumeric...
{ "language": "en", "url": "https://stackoverflow.com/questions/248603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: Are UIs copyrighted? Is it legal to more or less "copy" (or euphemistically, be very "inspired by") the idea and UI of a copyrighted program? This question popped in my mind when looking at "Things" which is a Mac-only program. How legal would it be for someone to make a Windows version of this program with a basica...
{ "language": "en", "url": "https://stackoverflow.com/questions/248606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Force C# compiler error based on const value I have a private const int defined in a C# class. I want compilation to fail with an error if the value of this int mod 3 != 0. How can I accomplish this? A: Timothy Khouri almost got it. It should be this: int compilerError = 1 / (MY_CONST % 3 == 0 ? 1 : 0); A: Althou...
{ "language": "en", "url": "https://stackoverflow.com/questions/248615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c++ adding method to class defined in header file I'm wondering if it is possible to add methods in main program to an existing class defined in header file. For example: There is class CFun defined in file CFun.hpp, but in our party.cpp we want to add a method void hello() {cout << "hello" << endl;};without editing...
{ "language": "en", "url": "https://stackoverflow.com/questions/248617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: SQL query against a web page(or, advanced find) Suppose I have a table. Now, I'm interested in Getting Useful Data Easily. This means I'd rather not drop it into Excel and go through contortions, nor somehow get it into CSV and then into a DB, and then into SQL. I'd like to be able to execute a SQL query directly ag...
{ "language": "en", "url": "https://stackoverflow.com/questions/248618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does the concept of shared sessions exist in ASP.NET? I am working on a web application (ASP.NET) game that would consist of a single page, and on that page, there would be a game board akin to Monopoly. I am trying to determine what the best architectural approach would be. The main requirements I have identified...
{ "language": "en", "url": "https://stackoverflow.com/questions/248640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: GridView item text wrapping I have a GridView control that I am dynamically creating at runtime. I am creating all the columns like this. foreach (GridColumnConfig column in columns) { BoundField boundField = new BoundField(); boundField.HeaderText = column.Title; boundField.DataField = column.FieldName;...
{ "language": "en", "url": "https://stackoverflow.com/questions/248642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I observe what's happening under the hood of ActiveMQ? I'm experiencing an issue with ActiveMQ and would like to trace/view all ActiveMQ activity. The only log file I can find is one associated with persistent data (if this is turned on). Are there any other log files I view or generate to tell me what's h...
{ "language": "en", "url": "https://stackoverflow.com/questions/248664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }