text string | meta dict |
|---|---|
Q: How to check if OS is Vista in Python? How, in the simplest possible way, distinguish between Windows XP and Windows Vista, using Python and pywin32 or wxPython?
Essentially, I need a function that called will return True iff current OS is Vista:
>>> isWindowsVista()
True
A: The simplest solution I found is this o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196930",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: Reflection and generic types I'm writing some code for a class constructor which loops through all the properties of the class and calls a generic static method which populates my class with data from an external API. So I've got this as an example class:
public class MyClass{
public string Property1 { get; set; }... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196936",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Does Android WebView need permissions for opening external URLs? I was trying the following example, but with external URLs:
Using WebViews
The example shows how to load an HTML file from assets folder (file:// url) and display it in a WebView.
But when I try it with external URLs (like http://google.com), I am alw... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196946",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: How to run NOT elevated in Vista (.NET) I have an application that I have to run as Administrator.
One small part of that application is to start other applications with Process.Start
The started applications will also be run as administrators, but I'd rather see them run as the 'normal' user.
How do I accomplish th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196949",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Can you list the keyword arguments a function receives? I have a dict, which I need to pass key/values as keyword arguments.. For example..
d_args = {'kw1': 'value1', 'kw2': 'value2'}
example(**d_args)
This works fine, but if there are values in the d_args dict that are not accepted by the example function, it obvi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196960",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "120"
} |
Q: Where does jQuery UI fit in MVC? I need to develop a generic jQuery-based search plugin for the ASP.NET MVC application I'm building, but I can't figure out how it's supposed to fit, or what the best practice is. I want to do the following:
$().ready(function() {
$('#searchHolder').customSearch('MyApp.Models.Us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196966",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Convert string to Title Case with JavaScript Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like John Resig's solution, just (hopefully) some kind of one- or two-liner.
A: Try this:
function toTitleCase(str) {
return str.re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196972",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "746"
} |
Q: list iterator not incrementable I have an old project that was built using visual studio 2003 and I recompiled it with vs2005 recently. However, during runtime, I get the following error:
list iterator not incrementable
I traced the program to this function:
void InputQueue::update()
{
list<PCB>::iterator iter;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Can anyone recommend a Java rich text editor? The rich text editor must be implemented in Java, provide Swing support, and preferably be open source.
I'm looking to integrate it into an existing Java/Swing application.
Thanks.
A: You can embed the mother of all open source rich text editors in a Swing app: OpenOff... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: wordpress - having comments inline ajax like in stackoverflow i have a wordpress blog and want to give people the same user experience for adding comments that is in stackoverflow. There are a number of comments ajax plugins out there but i can't find a working one that allows you to inline on the main page, go in ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/196993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is there a good wrapper around ILGenerator? I'm using System.Reflection.Emit for a while now, and find it (who don't?) as painful as bug prone.
Do you know if there is a good wrapper around the IL Generator, something that I can rely on to emit IL in a more safe and easier manner than with playing directly with SRE?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197005",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What is the easiest way to learn ActionScript when you know JavaScript? I am an Ajax developer and I want to build a Flash application. Given my previous experience with JavaScript, what do you thing will be the easiest way to learn ActionScript and what are the obstacles I might encounter?
A: Don't whatever you d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197008",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to find out whether subversion working directory is locked by svn? A python script is running two parallel python processes ( created via os.fork() ) each of which eventually tries to check out a subversion repository leaf into the same working copy dir.
Before running 'svn co ...' command in a sub-process ( via... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197009",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I declare a dropdown box in a view to set a value to a model in ASP.NET MVC? I would like to declare a dropdown box in a view in an ASP.NET MVC application, for letting the user select a lookup value. I know how to declare plain text boxes but is there an official helper for declaring dropdown boxes (date ti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197027",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: system('php file.php'); doesn't work, why? neither
<?php system('php file.php'); ?>
nor
<?php system('/usr/bin/php file.php'); ?>
worked. Why?
I tried with -q, with !#/usr/bin/php etc.
A: You are supposed to call it with -f, but it should work without it as well:
<?php system('/usr/bin/php -f file.php'); ?>
What... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197028",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: where is the Oracle Event Log located? Where is the location of my oracle event log (on a default Linux installation)?
A: Using @cagcowboy's answer, a default Oracle XE installation on Linux writes out to:
/usr/lib/oracle/xe/app/oracle/admin/XE/bdump
A: select value from v$parameter where name = 'background_dump_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197033",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: What's the best scheme for eliminating blog- or comment-spam How can I combine the followings to fight spam and at the same time minimize annoyance imposed to the user?
*
*In registration page, sending an email to verify the email address
*In registration page, use CAPTCHA
*In every post page, use CAPTCHA
Fee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197041",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Setting default values for columns in JPA Is it possible to set a default value for columns in JPA, and if, how is it done using annotations?
A: I use columnDefinition and it works very good
@Column(columnDefinition="TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
private Date createdDate;
A: you can use the java reflect ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197045",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "291"
} |
Q: What is the difference between <% %> and <%=%>? What is the difference between <% %> and <%= %> in ASP.NET MVC? And when to use which?
A: Say you have a method on your page, called "SayHello":
protected string SayHello()
{
return "Hello!";
}
And on your page, you have these statements:
first: <%= SayHello() %>... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197047",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Idiomatic use of std::auto_ptr or only use shared_ptr? Now that shared_ptr is in tr1, what do you think should happen to the use of std::auto_ptr? They both have different use cases, but all use cases of auto_ptr can be solved with shared_ptr, too. Will you abandon auto_ptr or continue to use it in cases where you w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197048",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: javac.exe AST programmatic access example Is it possible to access the Abstract Syntax Tree(AST) inside the javac.exe programmatically? Could you provide an example?
A: Compile and run this with -cp tools.jar (where you have to specify the location of your tools.jar, obviously).
import com.sun.source.util.Trees;
im... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Convert dictionary values into array What is the most efficient way of turning the list of values of a dictionary into an array?
For example, if I have a Dictionary where Key is String and Value is Foo, I want to get Foo[]
I am using VS 2005, C# 2.0
A: There is a ToArray() function on Values:
Foo[] arr = new Foo[di... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197059",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "91"
} |
Q: Eclipse Abstract Syntax Tree Programmatic Access Could you provide an example of accessing the Eclipse Abstract Syntax Tree programmatically for a given piece of code?
eg getting the AST for:
Class1.java
package parseable;
public class Class1 {
/**
* @param args
*/
public static void main(String[] args) {
S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Which open-source comet/ reverse-ajax libraries will you recommend to be used with Tomcat 5.5? Why? I have seen continuations in Jetty 6.0 that addresses scaling for comet/reverse-ajax applications.
Are there any other libraries/frameworks to be used with Tomcat 5.5?
A: I would check out DWR(Direct Web Remoting).... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Flatten Ruby method in C# How can I do the Ruby method "Flatten" Ruby Method in C#. This method flattens a jagged array into a single-dimensional array.
For example:
s = [ 1, 2, 3 ] #=> [1, 2, 3]
t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]
a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197081",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Whats the difference between Keyboard.Focus(item) and item.Focus()? In WPF, there are two ways to set the focus to an element.
You can either call the .Focus() method of the input element, or call Keyboard.Focus() with the input element as parameter.
// first way:
item.Focus();
// alternate way:
Keyboard.Focus(item)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: WPF binding with StringFormat doesn't work on ToolTips The following code has a simple binding which binds the Text of the TextBlock named MyTextBlock to TextBox's Text and ToolTip property using the exact same Binding notation:
<StackPanel>
<TextBlock x:Name="MyTextBlock">Foo Bar</TextBlock>
<TextBox Tex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197095",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "91"
} |
Q: How to convert in SQL the number of seconds into a human-readable duration? In a SQL-database I make some selects, that get an duration (as result of a subtraction between two dates) in seconds as an int. But I want to format this result in a human-readable form like 'hh:mm' or 'dd:hh'. Is that possible in SQL and h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Oracle 10g - UTL_MAIL package I'm having a bit of trouble with the UTL_MAIL package in Oracle 10g, and was wondering if anyone had any solutions?
I connect to my DB as SYSMAN and load the following two scripts;
@C:\oracle\product\10.2.0\db_1\rdbms\admin\utlmail.sql
@C:\oracle\product\10.2.0\db_1\rdbms\admin\prvtmail... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197097",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Select specific rows with SQL Server XML column type I'm trying to select data from a table defined similar to the following :
Column | Data Type
-------------------------
Id | Int
DataType | Int
LoggedData | XML
but I only want to select those rows with a specific DataType value, and that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197099",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Fastest "Get Duplicates" SQL script What is an example of a fast SQL to get duplicates in datasets with hundreds of thousands of records. I typically use something like:
SELECT afield1, afield2 FROM afile a
WHERE 1 < (SELECT count(afield1) FROM afile b WHERE a.afield1 = b.afield1);
But this is quite slow.
A: This... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197111",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: PHP Static variable not working as expected This example is from php.net:
<?php
function Test()
{
static $a = 0;
echo $a;
$a++;
}
?>
And this is my code:
function getNextQuestionID()
{
static $idx = 0;
return $idx++;
}
And I use it in JavaScript:
'quizID=' + "<?php echo getNextQuestionID(); ?>"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197112",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I write a for loop that iterates over a CAtlMap selectively deleting elements as it goes? I'm trying to do the following without too much special case code to deal with invalidated POSITIONs etc:
What's the best way to fill in the blanks?
void DeleteUnreferencedRecords(CAtlMap<Record>& records)
{
for(____;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197121",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to develop a WPF datagrid control which supports databinding? I am fairly new to WPF. I want to develop a datagrid control which supports databinding.
There is a lot of information available about databinding to existing controls, but I cannot find any information how to develop a control from scratch which supp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197122",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Renaming accessor/mutator methods in Eclipse? Is there any way to automatically rename accessor/mutator when a variable they get/set gets refactored -> renamed (Eclipse 3.4)?
A: 1 - When you select Refactor->Rename on a variable, Eclipse prompts you to enter the new name in an "in-line" box. Directly below it, ther... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197123",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Data Cut off when exporting to excel in SQL Reporting Services 2005 I am having huge lines data which could accomdate in Textbox.
While I am exporting to excel the wrapping up of data occurs and the data
is being cut off.
When i manually change the textbox height i can see the full data but i need the full data to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197124",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Free Bug Tracker in .NET Is there any good bug tracker based on .NET which is free?
A: Countersoft offers a free license for up to 5 users for their product Gemini. I think they also have a free license for open source projects.
A: Two bug trackers I know:
*
*BugTracker.NET
BugTracker.NET is a free, open-sourc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Prevent exception messages from being translated into the user's language? How do I make my application always use English when displaying win32/.net exceptions messages?
I got this message, it looks like someone used babelfish to translate it (it's Swedish):
"System.ComponentModel.Win32Exception: Programmet kunde i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: How can I keep the session clean? This is in regards to a situation where Session is used to store some temporary data - one example being information entered during a multi-step registration process.
If a website has a number of such sections - which wants to utilize the session as temporary data store for pages wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197132",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Getting notifications when the user tries sending an SMS My application is implemented as a service (running under services.exe).
I am adding a new feature which requires being notified when the user sends an SMS.
I have tried using IMAPIAdviseSink, registering with both IMAPISession and IMsgStore, but I do not get ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197135",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the best implementation of STL for VS2005? I'm currently using default implementation of STL for VS2005 and I'm not really satisfied with it. Perhaps there is something better?
A: The Dinkumware STL implementation (supplied with VS2005) is actually quite good. The STL is a general purpose library and so it ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197140",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Skip file lines until a match is found, then output the rest I can write a trivial script to do this but in my ongoing quest to get more familliar with unix I'd like to learn efficient methods using built in commands instead.
I need to deal with very large files that have a variable number of header lines. the last ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197150",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Exception when not finding What is the rationale behind throwing an exeption in JPA, when something can't be found?
Added:
This behaviour was seen in EJB2, and has as far been removed from EJB3 - but... It remains when calling Query#getSingleResult() which throws a NoResultException.
Normally I would not expect it t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197155",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you optimise your Javascript? Well... simple question, right? But with no so simple answers.
In firefox i use firebug console (profile) but... what to do in other browsers? Like Internet Explorer / Opera / Safari (on windows)
A: This particular problem solves itself over time. ;-)
Version 8 of the Internet E... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: NTFS performance and large volumes of files and directories How does Windows with NTFS perform with large volumes of files and directories?
Is there any guidance around limits of files or directories you can place in a single directory before you run into performance problems or other issues?
E.g. is having a folde... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197162",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "202"
} |
Q: How do I test Rails block helpers with rSpec In my views I use a helper that takes arbitrary HTML as a block:
<% some_block_helper do %>
Some arbitrary HTML and ERB variables here.
More HTML here.
<% end %>
My helper does a bunch of things to the passed block of HTML before rendering it back to the view (Markdo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197164",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: VMWare ctrl-z key binding, how to remove When I Alt+Tab to my VM from my host the VM does not get keyboard input until I click inside it. This is causing me an issue as it looks like the VM has control of the input (as the cursor is flashing away). If while in this state, VMWare server has the focus rather then th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197170",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to set Visual Studio as the default post-mortem debugger? Not too long ago, I had a problem which required me to set WinDbg.exe as the default post-mortem debugger. Now that I've fixed that and am back doing normal work, it would be really nice if I could set VS to be my default post-mortem debugger. How does ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197171",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Error with no HashCode, Equals eclipse I'm looking for a very specific eclipse plugin that will tell me if a class in my project is not implementing hashCode or/and equals methods.
Does anyone know of such a plugin?
Thanks
A: Or you can use findbugs
The rule HE_EQUALS_NO_HASHCODE does what you want, and there is a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Windows Forms application like Google Chrome with multiple processes Is there any way to use C# to build a container application where each tab is actually its own process like with Google chrome?
A: The System.AddIn APIs introduced in .NET 3.5 lets you use UI controls in separate AppDomains. With some hoop jumping... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: Why can't I use a type argument in a type parameter with multiple bounds? So, I understand that the following doesn't work, but why doesn't it work?
interface Adapter<E> {}
class Adaptulator<I> {
<E, A extends I & Adapter<E>> void add(Class<E> extl, Class<A> intl) {
addAdapterFactory(new AdapterFactory<... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197190",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "60"
} |
Q: Proxy choices: mod_proxy_balancer, nginx + proxy balancer, haproxy? We're running a Rails site at http://hansard.millbanksystems.com, on a dedicated Accelerator. We currently have Apache setup with mod-proxy-balancer, proxying to four mongrels running the application.
Some requests are rather slow and in order to pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197199",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Class design with vector as a private/public member? what is the best way to put a container class or a some other class inside a class as private or a public member?
Requirements:
1.Vector< someclass> inside my class
2.Add and count of vector is needed interface
A: Whether a member is declared Private or Public de... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Active Reverse Proxy Does anyone know of any reverse proxy solutions that allow the content/data of an HTTP response to be directly modified before being relayed to the requesting client?
As an example:
Proxy relays client request for pdf document to another server, response received by proxy, watermark added to pag... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197215",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Getting System Date in MSVC 6.0 I am trying to get system date in a C program on a MSVC++ 6.0 compiler. I am using a system call:
system("date /T") (output is e.g. 13-Oct-08 which is date on my system in the format i have set)
but this prints the date to the i/o console.
How do i make take this date as returned ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197218",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SqlDataReader.HasRows returns false since SQL 2008 upgrade I've got an ASP.NET 2.0 website that connects to a SQL database. I've upgraded the SQL server from 2000 to 2008 and since then, one page refuses to work.
I've worked out the problem is that the call to SqlDataReader.HasRows is returning false even though th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What is a pre-revprop-change hook in SVN, and how do I create it? I wanted to edit a log comment in the repository browser and received an error message that no pre-revprop-change hook exists for the repository. Besides having a scary name, what is a pre-revprop-change hook, and how do I create it?
A: Thanks #patmo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "180"
} |
Q: How to check if a file exists in javascript? I'm using the jquery library to load the content of an html file. Something like this:
$("#Main").load("login.html")
If the file (in this case 'login.html') does not exist, I would like to detect it so that I can redirect the user to an error page for example. Any ideas h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197228",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: BizTalk Server BAM Portal on x64 Windows 2008/IIS 7.0 We are attempting to install BizTalk Server 2006 R2 on a fresh server with x64 Windows 2008. The basic configuration is complaining that the “Default Web Site” we select for the BAM Portal installation is not validated due to “IIS is not 32-bit enabled.” Despite ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197229",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: .net publishing I have a .net application and i published in the local location. while installing from the published location the application need to install in "c:\temp" how can i do this in clickonce method?
A: ClickOnce installers do not install to the "Program Files" or to any specific directory (C:\temp). For ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to parse a command line with regular expressions? I want to split a command line like string in single string parameters. How look the regular expression for it. The problem are that the parameters can be quoted. For example like:
"param 1" param2 "param 3"
should result in:
param 1, param2, param 3
A: I tend t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197233",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Removing contents of PlaceHolderPageTitleInTitleArea In sharepoint there is a content place holder called PlaceHolderPageTitlteInTitleArea. I'm trying to remove everything in it from a custom RenderingTemplate that I placed in CONTROLTEMPLATES. So is it possible to achieve this either by using inline code or some ot... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197236",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: About System.Linq.Lookup class I came across this class while reading a C# book and have some questions.
*
*Why is this added into System.Linq namespace and not into usuall Collections namespace?
*What the intention behind this class is
*Why this class is not intended for direct instantiation? This is available... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Calling a static member function of a C++ STL container's value_type I'm trying to get my head around why the following doesn't work. I have a std::vector and I want to call a static member function of it's contained value_type like so:
std::vector<Vector> v;
unsigned u = v.value_type::Dim();
where Vector is in fac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197258",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Table layout wrong in IE(7) Below is the code of a simple html with a table layout.
In FF it's looking as I think it should look like,
in IE7 it doesn't. what am I doing wrong?
And how can I fix it?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<TITLE>test</TITLE>
</he... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197266",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: WCF self-hosted service with transport security (Authentication failed because the remote party has closed the transport stream.) I have a self-hosted service that I want to add transport security to.
I've set WSHttpBinding.SecurityMode to Transport and the ClientCredentialType to HttpClientCredentialType.None.
I've... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197268",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What are "ForwardedTypes" in the context of Castle Windsor component registration? As the subject says, really! What do they do?
A: Forwarded types allow you to have more than one service implemented by a single implementation, for a concrete example say we have two interfaces for working with tree nodes of some s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197274",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Should I migrate a MySQL database with a latin1_swedish_ci collation to utf-8 and, if so, how? The MySQL database used by my Rails application currently has the default collation of latin1_swedish_ci. Since the default charset of Rails applications (including mine) is UTF-8, it seems sensible to me to use the utf8_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197275",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Using Castle Windsor's fluent interface to register components in a decorator chain, when there are also specialised service-types? I am trying to implement a decorator chain for my data-access based on
IRepository. I have a Repository that does the data-
access (at the moment just in-memory list) {1}, and I have o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197278",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Virtual 360º, stitching and presentation software, for use on PHP driven website? EDITED (after 1st answer):
Can anyone help by pointing to some good references for the creation and presentation of a 3D environment (a real room) on a website.
Ideally it will not involve too much expense or too high a learning curve ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197290",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Grouping by intervals Given a table (mytable) containing a numeric field (mynum), how would one go about writing an SQL query which summarizes the table's data based on ranges of values in that field rather than each distinct value?
For the sake of a more concrete example, let's make it intervals of 3 and just "summ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: LINQ Issue: Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder I have a simple lambda expression which runs fine as a UNIT test and also runs fine when I copy the code into the Main method of my application. However, when I run the same piece of code within a callb... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197294",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you design an enumerator that returns (theoretically) an infinite amount of items? I'm writing code that looks similar to this:
public IEnumerable<T> Unfold<T>(this T seed)
{
while (true)
{
yield return [next (T)object in custom sequence];
}
}
Obviously, this method is never going to retu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197297",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How to unset variable in C#? How can I unset variable? For example, PHP has an unset($var) function.
A: Maybe you'd like to free the object that the variable is referencing:
MyVar = null;
A: There is not really an equivalent to "unset".
The closest match I know is the use of the default keyword.
For example:
MyTy... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197302",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: local rails on Mac OSX loses connection to mysql On occasion, my local Rails app loses its connection to MySQL. I get some error that the connection failed, but if I just refresh the page, it works fine. This has never happpened in my STAGE or PROD environments (I deploy to Ubuntu), so it has not been that big a dea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197304",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Best way to search in a varchar column in sql server What would you recommend to search a sql server table (varchar(max) column) for a term?
Let's say, like in ebay, if you search for "wii brand new", you get results like "Brand New Nintendo Wii Fit Game + Balance Board Bundle", "Wii Fit (Wii) BRAND NEW WII FIT GAME... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197307",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Design question: How can I access an IPC mechanism transparently? I want to do this (no particular language):
print(foo.objects.bookdb.books[12].title);
or this:
book = foo.objects.bookdb.book.new();
book.title = 'RPC for Dummies';
book.save();
Where foo actually is a service connected to my program via some IPC, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197310",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Kohana PHP, ORM and MySQL BLOBs I'm trying to create and retrieve a BLOB in a MySQL table via Kohana's ORM library.
The code looks something like:
$attachment = new Attachment_Model();
$attachment->name = $info['FileName'];
$attachment->size = strlen($info['Data']);
$attachment->data = $info['Data'];
$attachment->mi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197319",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Getting DNS servers on Windows I'm using the DnsQueryConfig Win32 function to get the DNS servers used by Windows. This works fine for IPv4 addresses, but what if the DNS servers have IPv6 addresses?
A: I could not find an API in MSDN, but I did find this line command:
IPv6 dp6dns
A: Which version of Windows do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197344",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Flash Organisation Chart I've been searching for a library that can render organisation charts in either flash and/or javascript(preferably jQuery). I know of several javascript and/or flash chart libraries but none of them seem to be able to render an organisation chart such as this: http://www.fsai.ie/images/org_c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to Integrate PHPList with the Existing Site The existing site has it own "users" table in a database. I'm wondering how to integrate PHPList with the existing site so that a user can check the newsletter during registration. I installed phplist thru cpanel.
Any help is greatly appreciated.
A: PHPList lets you d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197353",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ASP.NET Forms Authentication With Only UserName I have a bit of a hybrid situation on my hands. I'm writing an intranet asp.net web app. I don't want to use full blown Windows Authentication, because I don't have proper groups set up in Active Directory to be able to authenticate users simply based on what group the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197357",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Select products where the category belongs to any category in the hierarchy I have a products table that contains a FK for a category, the Categories table is created in a way that each category can have a parent category, example:
Computers
Processors
Intel
Pentium
Core 2 Duo
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197362",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: VS Setup Project: Uninstall other component on install I am creating a Visual Studio Setup project. I want to un-install another component from the system from the install of my component. The other component is installed from my own setup created using Visual Studio.
Currently when I am calling the un-install of th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Library of Useful (Difficult) SQL scripts Does anyone know where I can find a library of common but difficult (out of the ordinary) SQL script examples. I am talking about those examples you cannot find in the documentation but do need very often to accomplish tasks such as finding duplicates etc.
It would be a big ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197369",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "68"
} |
Q: Parameterized test case classes in JUnit 3.x I have a JUnit 3.x TestCase which I would like to be able to parameterize. I'd like to parametrize the entire TestCase (including the fixture). However, the TestSuite.addTestSuite() method does not allow be to pass a TestCase object, just a class:
TestSuite suite = new... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197372",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Visual c++ "for each" portability I only just recently discovered that Visual C++ 2008 (and perhaps earlier versions as well?) supports for each syntax on stl lists et al to facilitate iteration.
For example:
list<Object> myList;
for each (Object o in myList)
{
o.foo();
}
I was very happy to discover it, but I'm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197375",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: How do you store all the things which you've learnt and information you want to keep? Granted knowledge is best retained when put into practice, but as programmers I'm sure there's just too much information. Besides annotating your books, what other methods do you use for your own personal knowledge-base so you can ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197376",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I create a symlink in Windows Vista? I am looking to create symlinks (soft links) from Java on a Windows Vista/ 2008 machine. I'm happy with the idea that I need to call out to the JNI to do this. I am after help on the actual C code though. What is the appropriate system call to create the link? Pointers to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197379",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Optimizing single-row queries from large tables in MySQL I am dealing with MySQL tables that are essentially results of raytracing simulations on a simulated office room with a single venetian blind. I usually need to retrieve the simulation's result for a unique combination of time and blind's settings. So I end up... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197381",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Locating bundles by identifier I want to create a bundle from an arbitrary bundle identifier
e.g. com.apple.iokit.IOStorageFamily
It's not an unreasonable thing to do as bundle IDs are supposed
to be unique, however the obvious code does not work:
NSString* bID = @"com.apple.iokit.IOStorageFamily";
NSBundle* bundle... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197383",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Docstrings for data? Is there a way to describe the module's data in a similar way that a docstring describes a module or a funcion?
class MyClass(object):
def my_function():
"""This docstring works!"""
return True
my_list = []
"""This docstring does not work!"""
A: To my knowledge, it ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Generate User Specific 1 Time Coupon Code So I need to generate a code that can be tied to a specific user/prospect with a dollar amount built into it. It needs to be reversible so that client application can confirm the validity of the code and apply the discount a manager intends.
I'd like to make the code as sho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Define a calculated member in MDX by filtering a measure's value I need to define a calculated member in MDX (this is SAS OLAP, but I'd appreciate answers from people who work with different OLAP implementations anyway).
The new measure's value should be calculated from an existing measure by applying an additional ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197407",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Enterprise Library Database Trace Listener? I'm using EntLib v4 for Logging and currently I'm saving the events to the default text file listener.
I would like to use MS SQL database as my event sink and I saw that the database listener is already provided, but I don't know how to create logging database and stored ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197410",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Handle errors with ErrorController rather than a direct view I'm trying to get my head around the Error Handling in MVC.
What I'm looking for is a centralized way to catch errors, log them, if possible resolve them, if nessecary take other actions and finally show the correct view to the user.
I think I can use the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197414",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Changing the upload limit in php I am developing a CMS where the clients will need to upload files larger than 2mb - up to 10mb at least. I have changed the details in the php.ini file and I cannot see anywhere else that the problem might be. Any help?
Cheers
A: Here's what I recommend changing (assuming Apache & P... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197419",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: When should I call Naming.unbind()? I have some code which I am making available via RMI.
If my program terminates abnormally, I won't have called Naming.unbind(), and a reference to the object will presumably be hanging around in the RMI registry, and subsequent calls to Naming.bind() with the same name will fail.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197421",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MATLAB error: Undefined function or method X for input arguments of type 'double' I'm a new user of Matlab, can you please help:
I have the following code in an .M file:
function f = divrat(w, C)
S=sqrt(diag(diag(C)));
s=diag(S);
f=sqrt(w'*C*w)/(w'*s);
I have stored this file (divrat.M) in the normal Matlab path, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197441",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Building libcurl with SSL support on Windows I'm using libcurl in a Win32 C++ application.
I have the curllib.vcproj project added to my solution and set my other projects to depend on it.
How do I build it with SSL support enabled?
A: Maybe this isn't the answer anyone is looking for, but I simply just downloaded ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/197444",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |