text
stringlengths
8
267k
meta
dict
Q: Using post commit hook to export in VisualSVN Server What is the easiest way to use post-commit hook with VisualSVN Server to export from the repository to a directory for staging / testing after a developer commits his changes? A: Do the following in the VisualSVN Server Manager MMC console: * *Select your repo...
{ "language": "en", "url": "https://stackoverflow.com/questions/389759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Simplest method to determine if the current time is AM or PM? What is the best method to determine if the current time is AM or PM using VB.NET? Currently I'm using If Date.Today.ToString.Contains("AM") but I'm sure there is a better method. Good <%If Date.Today.ToString.Contains("AM") Then Response.Write("Morning")...
{ "language": "en", "url": "https://stackoverflow.com/questions/389761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to install CodeRush Xpress on VS2005 I know that CodeRush Xpress is intended to be used on VS 2008 and not on VS 2005. But since I can't migrate to VS2008 yet, I want to install it on VS2005 and don't care it's not supposed to work. My base assumption is that it can be done, this is based on the fact that the re...
{ "language": "en", "url": "https://stackoverflow.com/questions/389763", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: LINQ Query - Explanation needed of why these examples are different I'm reading the book "LINQ Pocket Reference" and there is a particular example (slightly modified below) that I'm having difficulty getting my head around... The explanation in the book is a bit brief, so I was wondering if someone could break it do...
{ "language": "en", "url": "https://stackoverflow.com/questions/389767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Should I use static data members? (C++) Let's consider a C++ class. At the beginning of the execution I want to read a set of values from an XML file and assign them to 7 of the data members of this class. Those values do not change during the whole execution and they have to be shared by all the objects / instances...
{ "language": "en", "url": "https://stackoverflow.com/questions/389779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: z-index not behaving as i'd expect so i've got this, roughly: <div id="A"> <ul> <li id="B">foo</li> </ul> </div> <div id="C"> ... </div> These are positioned so that B and C overlap. A has a z-index of 90, B has a z-index of 92, and C has a z-index of 91. But C shows up in front of B. What am i ...
{ "language": "en", "url": "https://stackoverflow.com/questions/389788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can't Get ASP.NET MVC Form To Post I am having problems getting my form to Post to my Save method in a controller. I am new to MVC, and have followed several examples to try to get this to work. Here is my html markup: <form action="Edit/Save" method="post"> <fieldset> <legend>Personal Inform...
{ "language": "en", "url": "https://stackoverflow.com/questions/389789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LinqToSQl and adapting from linq to Domain objects in a centralised manner Imagine the following code: return from a in DBContext.Acts join artist in DBContext.Artists on a.ArtistID equals artist.ID into art from artist in art.DefaultIfEmpty() select new Shared.DO.Act { I...
{ "language": "en", "url": "https://stackoverflow.com/questions/389792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: GCC Template issue Visual Studio compiles this code fine, but gcc only lets it compile without the Template operator. With the Template operator it gives the following errors: Line 29: error: expected `;' before "itrValue" class Test { public: Test& operator<<(const char* s) {return *this;} // not implemented y...
{ "language": "en", "url": "https://stackoverflow.com/questions/389797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a setting in SQL Server to have null = null evaluate to true? Is there a setting in SQL Server to have null = null evaluate to true? A: It is not SQL Server's fault, it is due to the ternary logic introduced by the NULL value. null=null will never be true, and null <> null is not true either. you could use...
{ "language": "en", "url": "https://stackoverflow.com/questions/389803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a SortedList class in .NET? (not SortedList) I need to sort some objects according to their contents (in fact according to one of their properties, which is NOT the key and may be duplicated between different objects). .NET provides two classes (SortedDictionary and SortedList), and both are implemented usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/389813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Details View and CSS Compliance I'm still having a hard time not wanting to use Tables to do my Details View Layout in HTML. I want to run some samples by people and get some opinions. What you would prefer to see in the html for a Details View? Which one has the least hurddles cross browser? Which is the most co...
{ "language": "en", "url": "https://stackoverflow.com/questions/389821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: When should I dispose of a data context I'm currently writing a data access layer for an application. The access layer makes extensive use of linq classes to return data. Currently in order to reflect data back to the database I've added a private data context member and a public save method. The code looks somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/389822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: Dismiss iphone keyboard I am trying to recreate something similar to the popup keyboard used in safari. I am able to visually reproduce it by placeing a toolbar over my view and the appropriate buttons, however i cant figure out any way to dismiss the keyboard once the user has touched the done button. A: If your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/389825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Namespaces in C Is there a way to (ab)use the C preprocessor to emulate namespaces in C? I'm thinking something along these lines: #define NAMESPACE name_of_ns some_function() { some_other_function(); } This would get translated to: name_of_ns_some_function() { name_of_ns_some_other_function(); } A: Anoth...
{ "language": "en", "url": "https://stackoverflow.com/questions/389827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How to use ImageIO to save multiple BufferedImages to a file I tried both of the following options: 1. BufferedImage Buffered_Image; MemoryCacheImageOutputStream MemoryCache_OutputStream = new MemoryCacheImageOutputStream(new FileOutputStream("C:/Test.mov",false)); while (notFinished) // Main recording loop....
{ "language": "en", "url": "https://stackoverflow.com/questions/389831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Java Statement Object Reuse? I would like to know if we can reuse the same Statement object for executing more than one query. Or, should we create a new statement for different queries. For example, Connection con = getDBConnection(); Statement st1 = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CO...
{ "language": "en", "url": "https://stackoverflow.com/questions/389832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: SQL Statements in a Windows Batch File Is there any way to have a Windows batch file directly input SQL statements without calling a script? I want the batch file to login to SQL and then enter in the statements directly. EDIT: I'm using Oracle v10g A: For a single command you can use this trick: echo select * fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/389844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Different ways of storing data in session state I have been asked up to come up with a state management strategy for a ASP .NET / MVC C# 3.5 web app I have chose to go with storing sessions on a state server - this will be a separate physical box. I am concerned about the time that would be taken to serialize/dese...
{ "language": "en", "url": "https://stackoverflow.com/questions/389845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why does Flex's ArrayCollection's Contain method look at memory reference? When using .contains() on an ArrayCollection in Flex, it will always look at the memory reference. It does not appear to look at an .equals() method or .toString() method or anything overridable. Instead, I need to loop through the ArrayCol...
{ "language": "en", "url": "https://stackoverflow.com/questions/389846", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL Native Client crashes when second connection is opened when connection pooling is on? I'm working with a C++ application that uses SQL Native Client to communicate via ODBC with a SQL Server 2000 database. Before doing any database work, I allocate an environment handle as follows: retcode = SQLAllocHandle( SQL_...
{ "language": "en", "url": "https://stackoverflow.com/questions/389859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the maximum number of characters allowed in a Note field in SharePoint? A Text field (SPFieldText) has a limit of 255 characters. What, if any, is the limit of the Note field (SPFieldMultiLineText)? The associated documentation on MSDN (linked above) doesn't list these limitations. A: Well, according to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/389863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Catching events from dynamically added ASP.NET User Controls I have an ASP.NET web form which I am adding a variable number User Controls to. I have two problems: * *The User Controls are added to a PlaceHolder on the form in the first PageLoad event (I only add them when "(!this.IsPostback)", but then when the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/389904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I create a user control that can be sized larger than its created size with WPF I've created a user control using WPF and I want to add it to window. I've done that, but I can't make my control have a height higher than the height it has in its own xaml file. My MaxWidth and MaxHeight are both infinity, but I...
{ "language": "en", "url": "https://stackoverflow.com/questions/389905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ namespace and include Why do we need both using namespace and include directives in C++ programs? For example, #include <iostream> using namespace std; int main() { cout << "Hello world"; } Why is it not enough to just have #include <iostream> or just have using namespace std and get rid of the other? (I am...
{ "language": "en", "url": "https://stackoverflow.com/questions/389922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Why can I not get system V message queues working with fork()? I have a program here: #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/ipc.h> #include <sys/types.h> #include <sys/msg.h> #include <sys/wait.h> #include <errno.h> #include "linkedlist.h" #include "globals.h" #include "card.h" #...
{ "language": "en", "url": "https://stackoverflow.com/questions/389923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Does the Unix kill command ensure that dynamically allocated memory will return properly? I found a bunch of scripts in the project I have been newly assigned to that are the "shutdown" scripts. They just do some basic searches and run the Unix kill command. Is there any reason they shouldn't shutdown the process ...
{ "language": "en", "url": "https://stackoverflow.com/questions/389927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do I get Hpricot 0.6 Gem Built on FreeBSD? When I run rake gems:build with hpricot 0.6.164 on my FreeBSD server I get: Error: Failed to build gem native extension. /user/localbin/ruby18 extconf.rb gems:build RB_USER_INSTALL checking for main() in -lc... yes creating Makefile make make install /usr/bin/ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/389931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I read Perl data structures from Python? I've often seen people use Perl data structures in lieu of configuration files; i.e. a lone file containing only: %config = ( 'color' => 'red', 'numbers' => [5, 8], qr/^spam/ => 'eggs' ); What's the best way to convert the contents of these files into Pyt...
{ "language": "en", "url": "https://stackoverflow.com/questions/389945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Forward Declaration of a Base Class I'm trying to create proper header files which don't include too many other files to keep them clean and to speed up compile time. I encountered two problems while doing this: * *Forward declaration on base classes doesn't work. class B; class A : public B { // ... } *F...
{ "language": "en", "url": "https://stackoverflow.com/questions/389957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Source code analysis tools for C# Possible Duplicate: What static analysis tools are available for C#? Guys, I'm looking for an open source or free source code analysis tool for C#. The tool should be able to generate metrics from the source code such as cyclomatic complexity, number of lines, number of commented...
{ "language": "en", "url": "https://stackoverflow.com/questions/389968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: _nolock CRT functions I have recently discovered the existence of _nolock functions, and I am surprised by how little info I can find on these. It says it increases performance, but I can't find any benchmark. It also says they can be used in a multi-threaded program if the program does its own locking, but what has...
{ "language": "en", "url": "https://stackoverflow.com/questions/389989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Extracting mantissa and exponent from double in c# Is there any straightforward way to get the mantissa and exponent from a double in c# (or .NET in general)? I found this example using Google, but I'm not sure how robust it would be. Could the binary representation for a double change in some future version of the...
{ "language": "en", "url": "https://stackoverflow.com/questions/389993", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How can I split "lastname, firstname" into separate strings? Whats the best way to separate the string, "Parisi, Kenneth" into "Kenneth" and "Parisi"? I am still learning how to parse strings with these regular expressions, but not too familiar with how to set vars equal to the matched string & output of the matched...
{ "language": "en", "url": "https://stackoverflow.com/questions/390000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to organize Controllers and Views into namespaces or subfolders? I'm working on an ASP.NET MVC application. The app is broken up into a dozen "sections", each of which has multiple tasks the user can perform. Many of these subtasks deserve their own controller, I don't like "kitchen sink" controllers. I want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: OpenOffice and .NET Is there a .NET API for OpenOffice? EDIT: Is there a OpenOffice SDK for .NET? A: If you have OpenOffice installed, then you can use the "OpenOffice SDK" (current version here) to control that instance from several programming environments, including .NET. You can use OpenOffice this way to acco...
{ "language": "en", "url": "https://stackoverflow.com/questions/390006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Hide a table column in a nested ListView I have a ListView inside another ListView, and I'd like to hide a table column in the inner ListView whenever a particular parameter is passed. Given the setup below, how would I hide the ID column (both the header and the data) if the URL contains "...?id=no"? <asp:ListView ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Template ifs using regex Hey everyone, I'm working on a PHP application that needs to parse a .tpl file with HTML in it and I'm making it so that the HTML can have variables and basic if statements in it. An if statement look something like this: ` <!--if({VERSION} == 2)--> Hello World <!--endif --> To parse that, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ActiveMQ Message Receipt Event Only One Message Per Second? We've built up an application infrastructure based on ActiveMQ. We can send and receive messages just fine, and for the most part things are pretty fast and OK. However, we've noticed that if we submit a batch of messages "at once", say 5,000 messages - tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/390044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In C#, how can I serialize System.Exception? (.Net CF 2.0) I want to write an Exception to an MS Message Queue. When I attempt it I get an exception. So I tried simplifying it by using the XmlSerializer which still raises an exception, but it gave me a bit more info: {"There was an error reflecting type 'System.E...
{ "language": "en", "url": "https://stackoverflow.com/questions/390051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do you display a Combo Box in a ListView when binding? I am displaying many rows of data in a list view that is bound to a list of a custom class. The custom class has a property called type. The number of allowable Types is limited and I would like to limit the user to making changes by selecting from a combo...
{ "language": "en", "url": "https://stackoverflow.com/questions/390052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to create a "pass through" form / file POST to remote server in .NET? I'm trying to post a file to a remote server and pass along some hidden values. So within my code I want to create a request to http://www.someotherdomain.com/upload.php and retrieve the xml results from that post. Thanks. A: You would use t...
{ "language": "en", "url": "https://stackoverflow.com/questions/390057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Real-time multiplayer game (concept question) I've been reading this article from Valve that seems to explain the architecture of their multiplayer system. It seems they delay rendering by a couple ticks on the client so they can handle dropped packets, but they also send packets as "delta snapshots" (the difference...
{ "language": "en", "url": "https://stackoverflow.com/questions/390067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC - Html.DropDownList - Value not set via ViewData.Model Have just started playing with ASP.NET MVC and have stumbled over the following situation. It feels a lot like a bug but if its not, an explanation would be appreciated :) The View contains pretty basic stuff <%=Html.DropDownList("MyList", ViewData[...
{ "language": "en", "url": "https://stackoverflow.com/questions/390083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Unique 'code' for each application deployment We are developing a WinForm application that we want to deploy to certain users machine. We would like to uniquely identify each application installed with some sort of "code" that we can define before installing on their system. Right now we plan to put the unique code...
{ "language": "en", "url": "https://stackoverflow.com/questions/390087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding the same comment to every code file in a Visual Studio solution Background: We are using VS 2008 and are in the process of upgrading from TFS 2005 to 2008. We have a solution that contains several projects and overall have hundreds of code files. We want to add the same text as a comment to all of these file...
{ "language": "en", "url": "https://stackoverflow.com/questions/390095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: arm-linux-gcc vs arm-elf-gcc I am looking at uClinux system that builds the kernel with arm-linux-xxx, but builds the user apps with arm-elf-xxx. If the apps are intended to run on linux, wouldn't it be better to build everything with arm-linux-xxx ? Where does one set that option in the overall uClinux build config...
{ "language": "en", "url": "https://stackoverflow.com/questions/390099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: MVC pattern in .NET: Can View call Exceptions in Model? I'm using the MVC pattern in a .NET winform app. There are places in the Controller that can cause an exception. Rather than catching the exception and dislpaying a messagebox, which is a View responsibility, I do nothing in the Controller and let the View wr...
{ "language": "en", "url": "https://stackoverflow.com/questions/390100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Memory allocation and deallocation across threads I'm still trying to debug a very sneaky memory corruption problem. I came across a section of my code that allocates memory on one thread and deletes it on another. I have a vague feeling that this is wrong, but I'm not sure why. The threads share the process memory ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390102", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Change items in the LayoutTemplate of a nested ListView This is related to my earlier question, but I thought I'd simplify it and make a challenge out of it. Given the code below, can you change the value of "ChangeThisLabel" from the code behind? <asp:ListView ID="OuterListView" runat="server"> <LayoutTemplate>...
{ "language": "en", "url": "https://stackoverflow.com/questions/390103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jQuery UI datepicker doesn't work in IE7 I've have finally got the datepicker to work on my MVC demo site. One thing though it doesn't work when browsing with IE7, I havn't testet with IE6 yet. Does anyone know how to fix this problem or can't I use jQuery if I want IE users to be able to pick dates? It works like a...
{ "language": "en", "url": "https://stackoverflow.com/questions/390105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I build a search mechanism for my application? It seems to be a common requirement nowadays to have a search feature that can search almost anything you want. Can anyone give me samples or tips as to how to go about building a one stop search for an application? For example: you have 3 tables customers, produ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: .Net implicit conversion guidelines What are general guidelines on when user-defined implicit conversion could, should, or should not be defined? I mean things like, for example, "an implicit conversion should never lose information", "an implicit conversion should never throw exceptions", or "an implicit conversion...
{ "language": "en", "url": "https://stackoverflow.com/questions/390108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Logging Commons and Mapped Diagnostic Context What have others done to get around the fact that the Commons Logging project (for both .NET and Java) do not support Mapped or Nested Diagnostic Contexts as far as I know? A: Exec summary: We opted to use the implementor logging framework directly (in our case, log4j)...
{ "language": "en", "url": "https://stackoverflow.com/questions/390115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Populating nested collections from database I have the following 3 classes Book Product SpecialOptions There are many Books, and there are many Products per Book. Likewise in a Product there are many SpecialOptions. There are other properties of each of these three classes so each class has the following interface...
{ "language": "en", "url": "https://stackoverflow.com/questions/390118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: matlabs linprog too slow I am working on a matlab application for which I need much improved speed. I am using linprog to solve a 2-constraint linear program with around 10,000 variables bounded by zero and one. Linprog is extremely slow for my application. Is there any way I can reformulate to improve speed? Or...
{ "language": "en", "url": "https://stackoverflow.com/questions/390126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to stream semi-live audio over internet I want to write something like Skype, i.e. I have a constant audio stream on one computer and then recompress it in a format that's suitable for a latent internet connection, receive it on the other end and play it. Let's also assume that the internet connection is fairly ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: IIS website deployment with subdirectories throwing 404 error for pages in subdirectory In IIS 6, I am trying to deploy a Web Site project from Visual Studio 2008. This site has a sub-folder with some aspx pages in it. When I deploy the project to the server and navigate to the site, everything works except for the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390132", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Executing code that is preloaded in flash NOR I'm building a uClinux system to run on an NXP LPC2478. The chip has 512k on-board fast flash from which it can directly execute code. I want to load and run a user app out of regular external SDRAM. But I have a special graphics library that I would like to pre-load to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Inserting a Comment in Docx file *around* a text inside a run How do you search for a specific text inside a text run (in Docx using the OpenXML SDK 2.0) and once you find it how do you insert a comment surrounding the 'search text'. The 'search text' can be a sub string of an existing run. All example in the sample...
{ "language": "en", "url": "https://stackoverflow.com/questions/390135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Increase request timeout for a thread in CFML I have a web application that is generating hundreds of PDFs in batch, using ColdFusion 8 on a Windows/IIS server. The process runs fine on my development and staging servers, but of course the client is cheap and is only paying for shared hosting, which isn't as fast as...
{ "language": "en", "url": "https://stackoverflow.com/questions/390148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Authenticating against Active Directory with Java on Linux I have a simple task of authenticating against Active Directory using Java. Just verifying credentials and nothing else. Let's say my domain is "fun.xyz.tld", OU path is unknown, and username/password is testu/testp. I know there's a few Java libraries out ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: Javascript Include Tag Best Practice in a Rails Application Say I need to call a javascript file in the <head> of an ERb template. My instinct is to do the usual: <head> <%= javascript_include_tag :defaults %> <!-- For example --> </head> in my application's layout. The problem of course becoming that these javascr...
{ "language": "en", "url": "https://stackoverflow.com/questions/390164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Counter is not single instance, an instance name needs to be specified In developing a performance monitoring console app, what is passed into the getcategories method?: PerformanceCounter[] pcArr = pc.GetCounters(string instance); When using the no param overload, a runtime exception is thrown: Counter is not sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/390166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In Vim, how do I apply a macro to a set of lines? I have a file with a bunch of lines. I have recorded a macro that performs an operation on a single line. I want to repeat that macro on all of the remaining lines in the file. Is there a quick way to do this? I tried Ctrl+Q, highlighted a set of lines, and presse...
{ "language": "en", "url": "https://stackoverflow.com/questions/390174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "282" }
Q: What can I do to pass a list from C# to F#? I know that the f# list is not the same at the c# List. What do I need to do to be able to pass a list of ints from a c# application to an f# library? I'd like to be able to use pattern matching on the data once it's in the f# code. A: You can use Seq.toList : IEnumerable...
{ "language": "en", "url": "https://stackoverflow.com/questions/390176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Implementing my own XPathNavigator in C# I am looking for a C# example implementation of a class derived from Microsoft's XPathNavigator class. Can any one point me at such an article? As you may (or may not) know, the XmlNavigator is designed to allow one to superimpose XPath navigation on most any data model. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/390178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sparse matrices / arrays in Java I'm working on a project, written in Java, which requires that I build a very large 2-D sparse array. Very sparse, if that makes a difference. Anyway: the most crucial aspect for this application is efficency in terms of time (assume loads of memory, though not nearly so unlimited ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: Copying frameworks into project? When attempting to copy a framework into the Frameworks folder of my project in Xcode, I get the error Could not copy /Developer/Platforms/.../Frameworks/OpenAL.framework to /Users/.../OpenAL.framework I had accidentally copied the wrong framework with the same name into the projec...
{ "language": "en", "url": "https://stackoverflow.com/questions/390187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Telnet Library Is there a good, free telnet library available for C# (not ASP .NET)? I have found a few on google, but they all have one issue or another (don't support login/password, don't support a scripted mode). I am assuming that MS still has not included a telnet library as part of .NET v3.5 as I couldn't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "54" }
Q: Autocomplete for PHP Objects with classes in PDT/Netbeans? When I define an object of a class using new like this $blah = new Whatever(); I get autocomplete for $blah. But how do I do it when I have $blah as a function parameter? Without autocomplete I am incomplete. Edit: How do I do it if it's in an include and P...
{ "language": "en", "url": "https://stackoverflow.com/questions/390192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How can I view differences in VS2008 before checking a file into SourceSafe? We have an old Classic ASP application that we have been using Visual Studio 6 to maintain. This has worked fine, but we're ready to step out of the stone age and I'd like to see if I can use Visual Studio 2008 (SP1) to maintain the applic...
{ "language": "en", "url": "https://stackoverflow.com/questions/390195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VS2008 IDE giving 5 second latency when switching tabs between aspx and aspx.cs , how come? I have VS2008 (SP1) installed on a XP sp2 laptop. One thing weired on IDE, I don't know how to fix it. I'm programming a web application, have many tabs openning at the same time. When I switch from aspx to aspx.cs back and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Convert > to HTML entity equivalent within HTML string I'm trying to convert all instances of the > character to its HTML entity equivalent, >, within a string of HTML that contains HTML tags. The furthest I've been able to get with a solution for this is using a regex. Here's what I have so far: public stat...
{ "language": "en", "url": "https://stackoverflow.com/questions/390205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why won't asp.net create cookies in localhost? Okay, this is really kinda starting to bug me. I have a simple Web project setup located at: "C:\Projects\MyTestProject\". In IIS on my machine, I have mapped a virtual directory to this location so I can run my sites locally (I understand I can run it from Visual Stu...
{ "language": "en", "url": "https://stackoverflow.com/questions/390219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "46" }
Q: Helping a beginner for java web application I have pretty big background of .net, and I've decided that i want to port one of my websites to Java. (now with the asp.net MVC craze, I've figured I'd better learn a more mature approach to MVC). i've downloaded eclipse (easyeclipse distro to be exact, and am ready and w...
{ "language": "en", "url": "https://stackoverflow.com/questions/390231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display a single record (row) as a single column I'm looking for ways to display a single row of data as a single column (with multiple rows). For example, FieldA FieldB ------- --------- 1 Some Text [row] Header Value [col] ------ ------ FieldA 1 [row1] FieldB SomeText [row2] Is there a way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/390238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java while loop and Threads! I have a program that continually polls the database for change in value of some field. It runs in the background and currently uses a while(true) and a sleep() method to set the interval. I am wondering if this is a good practice? And, what could be a more efficient way to implement thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/390242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Elegant ways to support equivalence ("equality") in Python classes When writing custom classes it is often important to allow equivalence by means of the == and != operators. In Python, this is made possible by implementing the __eq__ and __ne__ special methods, respectively. The easiest way I've found to do this is...
{ "language": "en", "url": "https://stackoverflow.com/questions/390250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "524" }
Q: onbeforeunload in Opera I'm using the code that netadictos posted to the question here. All I want to do is to display a warning when a user is navigating away from or closing a window/tab. The code that netadictos posted seems to work fine in IE7, FF 3.0.5, Safari 3.2.1, and Chrome but it doesn't work in Opera v9....
{ "language": "en", "url": "https://stackoverflow.com/questions/390260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Interpreting Excel Currency Values I am using python to read a currency value from excel. The returned from the range.Value method is a tuple that I don't know how to parse. For example, the cell appears as $548,982, but in python the value is returned as (1, 1194857614). How can I get the numerical amount from exce...
{ "language": "en", "url": "https://stackoverflow.com/questions/390263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: check string for nothing and then for certain value in 1 line? I always seem to see if a string (querystring value usually) has a value but first I have to check that it is not nothing first so I end up with 2 if then statements - am I missing somethign here - there has to be a better way to do this: If Not String....
{ "language": "en", "url": "https://stackoverflow.com/questions/390265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LiteSpeed vs Apache httpd I've been hearing things lately about the LiteSpeed webserver as being a drop-in replacement for Apache webserver. Even my web host is going to replace their shared webhost environment with LiteSpeed (I'm currently not sure if I must be happy about that or not). Does anyone have any experie...
{ "language": "en", "url": "https://stackoverflow.com/questions/390266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to programmatically determine the document root in PHP? Here's a problem that I've been running into lately - a misconfigured apache on a webhost. This means that all scripts that rely on $_SERVER['DOCUMENT_ROOT'] break. The easiest workaround that I've found is just set the variable in some global include files...
{ "language": "en", "url": "https://stackoverflow.com/questions/390276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: ASP.NET Development Server - 403 Forbidden I'm setting up a new PC and I installed my project to work with. It is a .NET Remoting 2.0 application that uses the ASP.NET development server to host the server side while developing. I'm getting the following error when I make requests to the server: "The remote server r...
{ "language": "en", "url": "https://stackoverflow.com/questions/390278", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I write a standalone ColdFusion class in Flex 3? Using Flex 3 with the ColdFusion plugin, can I not write a standalone ColdFusion class which I can invoke from my flex website (mxml)? Thanks A: You can invoke methods in a standalone ColdFusion CFC using RemoteObject. Note these methods should be marked with...
{ "language": "en", "url": "https://stackoverflow.com/questions/390284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generic Parse Method without Boxing I am trying to write a generic Parse method that converts and returns a strongly typed value from a NamedValueCollection. I tried two methods but both of these methods are going through boxing and unboxing to get the value. Does anyone know a way to avoid the boxing? If you saw...
{ "language": "en", "url": "https://stackoverflow.com/questions/390286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: What types of coding anti-patterns do you always refactor when you cross them? I just refactored some code that was in a different section of the class I was working on because it was a series of nested conditional operators (?:) that was made a ton clearer by a fairly simple switch statement (C#). When will you t...
{ "language": "en", "url": "https://stackoverflow.com/questions/390289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: windows service vs scheduled task What are the cons and pros of windows services vs scheduled tasks for running a program repeatedly (e.g. every two minutes)? A: Update: Nearly four years after my original answer and this answer is very out of date. Since TopShelf came along Windows Services development got easy. N...
{ "language": "en", "url": "https://stackoverflow.com/questions/390307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "124" }
Q: C# calling overridden subclass methods without knowledge that it's a subclass instance I have a base class with a virtual method, and multiple subclasses that override that method. When I encounter one of those subclasses, I would like to call the overridden method, but without knowledge of the subclass. I can think...
{ "language": "en", "url": "https://stackoverflow.com/questions/390326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQLTransaction and T-SQL transactions I am using .NET 2.0 and SQL Server 2005. For historical reasons, the app code is using SQLTransaction but some of the stored procedures are also using T-SQL begin/commit/rollback tran statements. The idea is that the DBTransaction can span many stored procedures, which each indi...
{ "language": "en", "url": "https://stackoverflow.com/questions/390354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does it make a difference in security whether a form POSTs to its own file or a different one? Assuming I do the same field validation in either case, is there any difference in terms of security whether you POST a form back to its own file or to another? Note that I'm not referring to sensitive information or passw...
{ "language": "en", "url": "https://stackoverflow.com/questions/390359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using variable in SQL LIKE statement I've got a sproc (MSSQL 2k5) that will take a variable for a LIKE claus like so: DECLARE @SearchLetter2 char(1) SET @SearchLetter = 't' SET @SearchLetter2 = @SearchLetter + '%' SELECT * FROM BrandNames WHERE [Name] LIKE @SearchLetter2 and IsVisible = 1 --WHERE [Name...
{ "language": "en", "url": "https://stackoverflow.com/questions/390362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "74" }
Q: How to build a simple source code editor using WPF? Hello there and Merry Christmas !!! I am new to WPF and I am trying to build a text editor for a assembly language. The assembler provides me a two lists: * *a list of errors *a list of warnings My editor should have the ability to inport the contents of a f...
{ "language": "en", "url": "https://stackoverflow.com/questions/390365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Stop Google from indexing Is there a way to stop Google from indexing a site? A: Remember that preventing Google from crawling doesn't mean you can keep your content private. My answer is based on few sources: https://developers.google.com/webmasters/control-crawl-index/docs/getting_started https://sites.google.co...
{ "language": "en", "url": "https://stackoverflow.com/questions/390368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: How to make a fully customizable hosted ASP.NET MVC application This is related to my previous question regarding serving static html files but that doesn't seem to be a good solution, I want to make a fully customizable ASP.NET MVC application as a hosted service. See allowing the user to customize the look/feel o...
{ "language": "en", "url": "https://stackoverflow.com/questions/390370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Play WMA Files in CF.NET 2.0 I'm using this code from Microsoft to play audio notifications for my application. It's working fine when the user chooses a wav file, but it doesn't play when they choose a wma file. Is there any way I can support wma files? A lot of the built-in alarm and ringtones seem to be wma. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/390372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Locking class members in PHP In PHP, if you define a class, and then instantiate an object of that class, it's possible to later arbitrarily add new members to that class. For example: class foo { public $bar = 5; } $A = new foo; $A->temp = 10; However, I'd like the ability to make it impossible to add new me...
{ "language": "en", "url": "https://stackoverflow.com/questions/390375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to open an email message using applescript? I am writing a small applescript which retrieves all "unread" messages in the viewer and loops them. I have two goals to complete: * *I need to get the subject of each message and perform a regular expression to see if it's suitable for step 2 (ex: get emails with s...
{ "language": "en", "url": "https://stackoverflow.com/questions/390381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Cannot convert (*)[] to ** If I create a file: test.cpp: void f(double **a) { } int main() { double var[4][2]; f(var); } And then run: g++ test.cpp -o test I get test.cpp: In function `int main()': test.cpp:8: error: cannot convert `double (*)[2]' to `double**' for argument `1' to `void f(double**)' Why...
{ "language": "en", "url": "https://stackoverflow.com/questions/390385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }