text string | meta dict |
|---|---|
Q: Where are variables in C++ stored? Where are variables in C++ stored?
Inside the RAM or the processor's cache?
A: Variables in C++ are stored either on the stack or the heap.
stack:
int x;
heap:
int *p = new int;
That being said, both are structures built in RAM.
If your RAM usage is high though windows can swap... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: HashSet problem -- equals and hashCode with contains working differently than I'd expect I have the following code:
class IncidentTag:
def __init__(self,tag):
self.tag = tag
def equals(self,obj):
return self.tag.equals(obj.tag)
def hashCode(self):
return self.tag.hashCode()
fr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230585",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Problem sorting lists using delegates I am trying to sort a list using delegates but I am getting a signature match error. The compiler says I cannot convert from an 'anonymous method'
List<MyType> myList = GetMyList();
myList.Sort( delegate (MyType t1, MyType t2) { return (t1.ID < t2.ID); } );
What am I missing?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230588",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: XPath query with PHP Here's the XML code I'm working with:
<inventory>
<drink>
<lemonade supplier="mother" id="1">
<price>$2.50</price>
<amount>20</amount>
</lemonade>
<lemonade supplier="mike" id="4">
<price>$3.00</price>
<amount>20</amount... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230592",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Redirect depending on the Country? We basically have 2 sites ( Java /JSP / Apache Webserver) :
something.ca & something.com
The .ca is canadian content, and the .com is american content.
We need users to be redirected based on the ip addreess.
We want US users to get the .com site and Canadian users get the .ca sit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230594",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What artifacts to save for a nightly build? Assume that I set up an automatic nightly build. What artifacts of the build should I save?
For example:
*
*Input source code
*output binaries
Also, how long should I save them, and where?
Do your answers change if I do Continuous Integration?
A: Here are some ar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230595",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Implementing wait for condition or cancel with threading I am trying to implement the following functionality:
class WeightResolver {
WeightMonitor _source;
bool _cancelled;
Weight _threshold;
public Cancel() {
_cancelled = true;
}
public Weight Resolve(){
_cancelled = false;
while(_so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230636",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Multiple rail apps using Apache and Mongrel I am actually developing and application that has around 15 modules, all of them using the same database.
I am using Apache + Mongrel, I cannot use Passenger because I am working on Windows (please forgive me for this deadly sin!)
Which of the following is a better approac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230638",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: CREATE TRIGGER is taking more than 30 minutes on SQL Server 2005 On our live/production database I'm trying to add a trigger to a table, but have been unsuccessful. I have tried a few times, but it has taken more than 30 minutes for the create trigger statement to complete and I've cancelled it.
The table is one ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230642",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Android API for detecting new media from inbuilt camera & mic Is there any elegant way in the Android API for detecting new media when it is written to the device? I’m mainly interested in photos taken by the camera, video taken by the camera and audio recorded from the mic.
My current thinking is to periodically sc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230643",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How do I connect my tomcat app to apache 2 so the paths aren't lame? I've got a tomcat instance with several apps running on it... I want the root of my new domain to go to one of these apps (context path of blah).. so I have the following set up:
<Location />
ProxyPass ajp://localhost:8025/blah
ProxyPassRev... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Lightweight Java Object cache API Question
I'm looking for a Java in-memory object caching API. Any recommendations? What solutions have you used in the past?
Current
Right now, I'm just using a Map:
Map cache = new HashMap<String, Object>();
cache.put("key", value);
Requirements
I need to extend the cache to inclu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230649",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "100"
} |
Q: SQL - Calling "reader.NextResult" causes a long delay Our application executes a long, hairy stored procedure with multiple result sets. The users are experiencing long wait times for this query, so I set out to determine what is causing the delay.
I put a Stopwatch on executing and reading the data, and it takes 6... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Insert default value when parameter is null I have a table that has a column with a default value:
create table t (
value varchar(50) default ('something')
)
I'm using a stored procedure to insert values into this table:
create procedure t_insert (
@value varchar(50) = null
)
as
insert into t (value) value... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: Mapping strongly-typed DataSets in a generic FillDataSet method in C#? Edit: I am using SqlDataAdapters to fill the data sets. Sorry--I should have been more clear.
I'm working on a project where I need to fill a number of strongly-typed data sets with information from stored procedures. Right now, I have a generic ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230677",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Counterpart of PHP's isset() in C/C++ PHP has a very nice function, isset($variableName). It checks if $variableName is already defined in the program or not.
Can we build similar feature for C/C++ (some kind of symbol table lookup)?
A: There is no direct means of doing this in the language. However, it is possibl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230687",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Best way to throw exceptions in JNI code? I'd like a consistent and simple way to throw exceptions in JNI code; something that handles chained exceptions (implicitly from the env->ExceptionOccurred method, or explicitly by parameters, either way is good) and saves me looking up constructors every time I want to do t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "67"
} |
Q: Memory-efficient XSLT Processor I need a tool to execute XSLTs against very large XML files. To be clear, I don't need anything to design, edit, or debug the XSLTs, just execute them. The transforms that I am using are already well optimized, but the large files are causing the tool I have tried (Saxon v9.1) to run... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Explaining refactoring Question
My question is how can you teach the methods and importance of tidying-up and refactoring code?
Background
I was recently working on a code review for a colleague. They had made some modifications to a long-gone colleagues work. During the new changes, my colleague had tried to refact... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230706",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Mixed Mode Library and CRT Dependencies - HELP Alright, after doing a ton of research and trying almost every managed CPP Redist I can find as well as trying to copy my DLLs locally to the executing directory of the app I cannot figure out what dependencies i'm missing for this mixed mode library.
Basically I have a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230715",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Difference between lock(locker) and lock(variable_which_I_am_using) I'm using C# & .NEt 3.5. What is the difference between the OptionA and OptionB ?
class MyClass
{
private object m_Locker = new object();
private Dicionary<string, object> m_Hash = new Dictionary<string, object>();
public void OptionA(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230716",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: redirection and vim I was wondering if there's a way to see the output of any command,
straight inside vim, rather than first redirecting it into a file and
then opening that file.
E.x. I need something like
$ gvim < diff -r dir1/ dir2/
This gives ambiguous redirect error message
I just want to see the diffs betwe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Cancel a webform submit with PHP I'm using a small site to experiment with the uploading of pictures and displaying them.
When someone clicks "add a picture", they get taken to a page with a form on it. They can select a file and click the submit button.
But what I want to do now is this: put a second submit button ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230724",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can C# generics have a specific base type? Is it possible for a generic interface's type to be based on a specific parent class?
For example:
public interface IGenericFace<T : BaseClass>
{
}
Obviously the above code doesn't work but if it did, what I'm trying to tell the compiler is that T must be a sub-class of Ba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230736",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: How can I flush the output of the print function? How do I force Python's print function to flush the buffered output to the screen?
See also: Disable output buffering if the goal is to change the buffering behaviour generally. This question is about explicitly flushing output after a specific print call, even thou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230751",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1544"
} |
Q: Control Reuse and UpdatePanel I have a user control that is pretty basic. It contains several TextBox controls, a few DropDownList controls, a save Button and a cancel Button. I would like to use this control in two different modes. The first mode is in the normal postback mode to do the save and cancel actions. The... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Analyzing web application usage and user patterns using DB/application server logs? I assume that most of the analyzing and tracking is done based on the data gathered from browser actions like page requests. Tools like AWStats, Google Analytics and Omniture take place in this.
But there is also good amount of data ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting template text from FreeMarker in Spring app In my Spring app, I'd like to use FreeMarker to generate the text of emails that will be sent by my application. The generated text will never be returned to the view so I don't need to configure a FreeMarker view resolver. The documentation seems to indicate that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: convert nchar(20) field to a datetime data type in sql server 2005 I need to select from a table and filter on dates greater than a
specified date.
The problem I'm having is that the dates are stored as nchar(20) and I
can't seem to get it converted to date in the where clause.
SELECT CONVERT(DATETIME,log_time,2... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can initialization list in constructors be used in template classes? I find that most books concerning C++ templates don't tell anything about whether it's possible or not to use initialization list in constructor of a template class.
For example, I have code like this:
template <class T>
class Stack {
T* data;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230790",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting Precise Times in PHP I have noticed that regardless of a given script's execution time, every date() call will return the same timestamp regardless of where the function is called within the script. It looks like it just returns the time at which the script first started executing.
For logging purposes, it w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What's the difference between recycling an app pool manually vs automatically? I've noticed that you can manually recycle an application pool via IIS and that doing so seems to slow down my web app significantly less than making changes to files in App_Code or the web.config file. Is this because recycling the appl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What resolution .ico files do XP and Vista show on the desktop? There's loads of choices for .ico files but I can't see any logic in how Windows chooses which resolution/bit depth to show
A: There are the sizes of icons I bundle, which is the union of all the sizes you may need for XP and Vista depending on the set... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I ensure a column contains one of a set of values? I'm creating a table that looks something like this.
CREATE TABLE packages
(
productCode char(2)
, name nvarchar(100)
, ...
)
How do I make sure the productCode is always one of two values XJ or XD?
A: ALTER TABLE packages
ADD CONSTRAINT constraintna... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230796",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is a good non-WYSIWYG editor for HTML? I don't like WYIWYG editors, I want to be responsible for the selection and placement of each tag and attribute! Is there a good editor out there that allows you complete control over the HTML but offers useful features such as:
*
*syntax highlighting (of course)
*sug... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230829",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How is Wikipedia's example of an unbalanced AVL tree really unbalanced?
The image above is from "Wikipedia's entry on AVL trees" which Wikipedia indicates is unbalanced.
How is this tree not balanced already?
Here's a quote from the article:
The balance factor of a node is the height of its right subtree minus th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230831",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to save an stringbuilder's content to text file using SaveFileDialog? This is a winforms application.
In windows, I want the user to click and button, and then a popup should make the user select the path of where they want to save the file.
A: Think no longer...
using System;
using System.Collections.Generic;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230834",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Does foreach always create a copy on a none reference in PHP? I'm wondering if PHP has this optimization built in. Normally when you call foreach without using a reference it copies the passed array and operates on it. What happens if the reference count to that array is only 1?
Say for example if getData returns ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can I have multiple cases that do the same thing? The first one is definitely something that works, but which one below is the efficient way?
switch($type) {
case 1:
print 'success';
break;
case 2:
print 'success';
break;
case 3:
print 'success';
break;
case 4:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230842",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Make python enter password when running a csh script I'm writing a python script that executes a csh script in Solaris 10. The csh script prompts the user for the root password (which I know) but I'm not sure how to make the python script answer the prompt with the password. Is this possible? Here is what I'm using ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Converting a byte() array to a double in VB.Net I have this situation.
I have a real stored in a varbinary field in a sql 2005 database.
As I can't convert a varbinary to a real in sql 2005, I'm trying to do that in vb.net.
That field gets stored as a byte() array in a DataTable.
Now I would like to read that byte()... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230869",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: visual studio post-build script error calling gacutil I'm on vista, with VS2005 running as admin. Both vs2005 and vs2008 are installed. If I explicitly use the path to gacutil, it works, but not if I only call gacutil like this:
if NOT $(ConfigurationName) == Release gacutil /f /i "$(TargetPath)"
I would just... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230872",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you tell a ScrollPane to scroll up or down using actionscript? I want to trigger an event that causes the ScrollPane to start scrolling up or down.
Ideally the ScrollPane would scroll continue to scroll all the way up or down unless canceled by another event.
A: Would be something like this:
this.createClass... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the advantage of this peculiar formatting? I've seen this format used for comma-delimited lists in some C++ code (although this could apply to any language):
void function( int a
, int b
, int c
)
I was wondering why would someone use that over a more common format ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Membership and Role Providers in ASP.NET 2.0 with non SQL Server provider? I have quickly read (and will read with more care soon) the article of Scott Allen concerning the possibility to use an other provider of the default SQL Express or SQL Server database to use the "Membership and Role Providers" for ASP.NET.
W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230892",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Loading flatfiles into a normalized MySQL database What is the fastest way to load data from flatfiles into a MySQL database, and then create the relations between the tables via foreign keys?
For example... I have a flat file in the format:
[INDIVIDUAL] [POP] [MARKER] [GENOTYPE]
"INDIVIDUAL1", "CEU", "rs5555... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230893",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Given a list of variable names in Python, how do I a create a dictionary with the variable names as keys (to the variables' values)? I have a list of variable names, like this:
['foo', 'bar', 'baz']
(I originally asked how I convert a list of variables. See Greg Hewgill's answer below.)
How do I convert this to a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230896",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: System.Web.UI.WebControls.WebControl in VS2008 project I have created a website project in VS2008 and in the appcode folder I have created a class deriving from System.Web.UI.WebControls.WebControl. I need to use this control in one of my webforms. I can't figure out how to.
A: Have a look at this example: Creatin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Generating a CSV file to be imported into Excel, what should I use for a newline character? Creating a CSV file in a winforms application, it is to be improted into Excel.
The file output looks like:
"header1", "header2", "header3",
1,2,3,
4,5,6
What should I use to signify a newline character when generating the CS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Retrieve xml doc comments programmatically Visual Studio does it; Reflector does it; and now I want to as well :)
I want to retrieve the XML documentation for some members in some framework assemblies (i.e. mscorlib.dll, System.dll, etc). I assume this would involve:
*
*finding the XML file for the assembly,
*n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230925",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What would be the most convenient way to connect Visual Studio 2005 (C#) to Oracle8? I'm looking for best practices for establishing connections between Oracle 8 and Visual Studio 2005 applications. The target would be a Windows Forms application written in C# that hits the database once a second to monitor tables l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Need an example explaining why use of comparison operands != and == is considered bad practice in JavaScript As I've read somewhere it is advised to use !== and === instead.
A:
=== and !== Operators.
It is almost always better to use the
=== and !== operators. The == and != operators do type coercion. In
parti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230931",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: How to Convert all strings in List to lower case using LINQ? I saw a code snippet yesterday in one of the responses here on StackOverflow that intrigued me. It was something like this:
List<string> myList = new List<string> {"aBc", "HELLO", "GoodBye"};
myList.ForEach(d=>d.ToLower());
I was hoping I could use it ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230973",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "110"
} |
Q: IIS v7 disabling SSL v 2.0 I am attempting to disable SSL v2.0 protocol on IIS 7.
The following article refers to IIS v6:
http://support.microsoft.com/kb/187498
It doesn't seem to apply because the only protocol listed in the registry is SSL 2.0 (not all the others) and the setting "DisabledByDefault=1" is already i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230974",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Format/parse a string in Vb I am working with some input that is in the possible forms
$1,200
20 cents/ inch
$10
Is there a way to parse these to numbers in VB? Also printing these numbers?
EDIT: Regular expressions would be great.
EDIT: VB 6 in particular
A: You mean VB6/VBA or VB.net?
In VB6 or VBA you can do C... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230981",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Compression API on the iPhone Is there a compression API available for use on the iPhone? We're building some RESTful web services for our iPhone app to talk to, but we want to compress at least some of the conversations for efficiency.
I don't care what the format (ZIP, LHA, whatever) is, and it does not need to be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230984",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Find client IP and SOAP call info from a Delphi web service I have a Delphi Web Server setup and running, publishing Web Services, and I want to know some stuff on the calls to the web services:
*
*The IP address of the client who calls the web service.
*Some SOAP information on the call, such as username and pa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230985",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to persist a calculated GEOMETRY or GEOGRAPHY column I'm trying to create a table under SQL Server 2008 containing a GEOMETRY column and a calculated variation thereof.
Considering the following table where the calculated column returns a buffered geometry:
CREATE TABLE [dbo].[Test] (
[Geometry] GEOMETR... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230992",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Moving to office with a shared network - what should I look out for? We're moving to cheap office space that provides a lot of stuff: receptionist, copiers, printers, microwave and internet access - all of it shared with strangers.
What should I ask to find out if the network is safe to use, and if it's not inherent... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230994",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How can I convert an existing website, deployed to multiple servers, to be SVN managed and not blow away user files? I have an existing website that uses the same code base, but is deployed in a number of different configurations on different servers. Each configuration has a set of users, and they can upload person... | {
"language": "en",
"url": "https://stackoverflow.com/questions/230997",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: CSS Positioning Question - Tables vs. Absolute vs. DL I'd like to align label/value pairs in the center using CSS without using absolute positioning or tables (see screen shot). In that screen shot I positioned the value (ie. $4,500/wk) absolute and then floated the label right up against it. But absolute doesn't ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231023",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Stripping xml document of tags, removing line breaks and adding custom line breaks I make a request to an xml web service, and get back a response. This response, being a stream, is then saved to a string. The problem is, the response is full of tags, CDATA, etc (as you would expect). There is no line breaking eithe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231027",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I include a php variable within the value element of an html input tag? I am trying to include a value from a database table within the value element of an input field.
This is what I have, but it is not working:
?><input type="text" size="10" value="<?= date("Y-m-d",
strtotime($rowupd['upcoming_event_featur... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231029",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Properties page not displaying in Visual Studio 2008 I'm using Visual Studio 2008 Team Development Edition and my Project properties page will not display. I right-clicked the project name and selected "Properties" and no page displayed as it normally would. Also, when I double-click the Settings.settings the norm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there a memory-efficient replacement of java.lang.String? After reading this old article measuring the memory consumption of several object types, I was amazed to see how much memory Strings use in Java:
length: 0, {class java.lang.String} size = 40 bytes
length: 7, {class java.lang.String} size = 56 bytes
While... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231051",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "38"
} |
Q: Using WPF Validation rules and the disabling of a 'Save' button I have a page where a few textboxes cannot be empty before clicking a Save button.
<TextBox...
<TextBox.Text>
<Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged">
<Binding.Valid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231052",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: How to round/ceil/floor a bcmath number in PHP? Is there any library function for this purpose, so I don't do it by hand and risk ending in TDWTF?
echo ceil(31497230840470473074370324734723042.6);
// Expected result
31497230840470473074370324734723043
// Prints
<garbage>
A: This will work for you:
$x = '31497230... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: What are your most common uses for regular expressions? I'm building up a library of filters for a validation class in PHP, some of them using regular expressions. I have a lot of filters in mind, but I also don't want to potentially miss any. What do you most often use regular expressions to check? What are some of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231062",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to write default structure values multiple times using fwrite() I want to write a default structure, N times, to a file, using fwrite.
typedef struct foo_s {
uint32 A;
uint32 B;
char desc[100];
}foo_t;
void init_file(FILE *fp, int N)
{
foo_t foo_struct = {0};
foo_struct.A = -1;
foo_struct.B = 1;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231069",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Disable MOSS auto import of colleagues Upon AD Import for SharePoint, MOSS does this automatically: "Office SharePoint Server 2007 automatically adds your manager, peers, and direct reports as your colleagues". How do I disable this automatically so it's a clean list of colleagues?
A: The properties for the user ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Freeing in an atexit() Is there any point to freeing memory in an atexit() function?
I have a global variable that gets malloc'ed after startup. I could write an atexit() function to free it, but isn't the system going to reclaim all that memory when the program exits anyway?
Is there any benefit to being tidy and a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Loop from 0x0000 to 0xFFFF I'd like a loop that uses a UInt16 (ushort) to loop through all of its values. However, this doesn't do it:
for( ushort i = 0; i < UInt16.MaxValue; i++ )
{
// do something
}
The problem is that the loop will quit when i == 0xFFFF and not "do something".
If I change the 'for' statemen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Your least favorite C++ Coding guideline As a counterpart to C++ Coding Guideline 102, which of the 101 guidelines of Sutter & Alexandrescu do you violate or ignore most often, and why?
A: I'd say for me, it's probably 16. Avoid macros. I find there are a good number of things I can only do with macros (especially ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231121",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Detail Level of Use Case Documentation I am making a strong effort to discipline my projects and create a Vision/Scope document at the onset. Included in this are the use case diagrams. Just listing out the use cases has really helped me fully see all the requirements that the customer is asking for, and it has op... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231124",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Should I index a bit field in SQL Server? I remember reading at one point that indexing a field with low cardinality (a low number of distinct values) is not really worth doing. I admit I don't know enough about how indexes work to understand why that is.
So what if I have a table with 100 million rows in it, and I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "120"
} |
Q: mySQL get information from multiple tables in one query I'm terribly new to SQL, and cannot seem to get the desired information out, after trying a few different google searches, and reading through some SQL tutorials.
I think it involves some sort of joins, but cannot get them straight.
Given the following sample t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231126",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: C++ Error Handling -- Good Sources of Example Code? Just about every piece of example code everywhere omits error handling (because it "confuses the issue" that the example code is addressing). My programming knowledge comes primarily from books and web sites, and you seldom see any error handling in use at all ther... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231128",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Best way to utilize single codebase for multiple web sites What is the best method for utilizing a single code base for multiple websites?
We have validation and session management libraries that we use on multiple websites. Is there a best practice for keeping a single copy rather than having to maintain updates o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231131",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Wininet's INTERNET_OPTION_IGNORE_OFFLINE doesn't work? I'm trying to get Wininet to ignore Internet Explorer's "Work Offline" mode, for both HTTP and FTP.
So I'm trying to use InternetSetOption() with INTERNET_OPTION_IGNORE_OFFLINE. The documentation says "This is used by InternetQueryOption and InternetSetOption w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231132",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: std::string erase last character fails? I'm trying to change user input in wildcard form ("*word*") to a regular expression format. To that end, I'm using the code below to strip off the '*' at the beginning and end of the input so that I can add the regular expression characters on either end:
string::iterator ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Asp.Net jQuery $.getJSON sometimes causes full page postback? I'm writing an ASP.NET webforms app, and I'm using jQuery for my AJAX calls. This is working well, but on some occasions, the $.getJSON call is causing a full page postback. I am not using the ASP.NET AJAX library anywhere in the app. I can't reproduce th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231158",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Use "greater than or equals" or just "greater than" I remember from C days that we were encouraged to use
i > -1
instead of
i >= 0
because of performance.
Does this still apply in the C# .NET world? What are the performance implications of using one over the other with today's compilers? i.e. Is the compiler cleve... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231159",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Where is the MOQ documentation? Where can I find comprehensive documentation for MOQ? I'm just starting with mocking and am having difficulty getting my head around it. I've read through all the links at http://code.google.com/p/moq/wiki/QuickStart but can't seem to find a tutorial or gentle introduction.
I have als... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231175",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "70"
} |
Q: What's the best tool or method to search for a specific word in a codebase? What tool or method do you recommend to find and replace values in your code? If code is on Linux/Unix, are find and grep the best method?
A: Take a look at ack, which is designed for searching big codebases.
For replacing, look at Perl's -... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231189",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: jsf login times out Ok simple question. I have a JSF application, containing a login page. The problem is if the user loads the login page, leaves it for a while, then tries to login the session expires and a ViewExpiredException is thrown. I could redirect back to the login when this happens, but that isn't very sm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231191",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Correct way to use custom functor with std::generate_n() algorithm? The following code compiles correctly under VC++ 8 on XPSP3, but running it causes a runtime error.
My header looks like:
#include <stdexcept>
#include <iterator>
#include <list>
template<typename T>
class test_generator
{
public:
typedef... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Autostart Smart Client application Have a standard smart client application that we want to autostart when a user logs into their machine on our network. I've tried the following keys:
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
HKCU\Software\Micrisoft\Windows\CurrentVersion\Run
HKCU\Software\Micrisoft\Windo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231201",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Build "exit" page using Classic ASP avoiding major Cross Site Scripting pitfalls I'm working on updating a classic ASP web page used by a number of sub-sites maintained at the company I work for.
The purpose of the page is to notify the user that they are leaving "our" site and going to another site. It's basically ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231204",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Database Design - Hard Coded Row ID What's everyone take on tieing code enum's to row ID's in a database table? I'm really looking for a cleaner alternative. What if for example your static rows in a given table are ID's 1,2,3, and then that table gets filled with user transactional data using ID's 4-100, and then y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231206",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Using Git how do I find changes between local and remote Here are two different questions but I think they are related.
*
*When using Git, how do I find which changes I have committed locally, but haven't yet pushed to a remote branch? I'm looking for something similar to the Mercurial command hg outgoing.
*When... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "158"
} |
Q: ASP.NET MVC Beta - Grouping Controllers and Views possible? I am on the way to build an ASP.NET MVC application with the latest beta release and I wonder if it is possible to change the default project Layout of
/Views/Home/Index.aspx
/Views/Home/About.aspx
to
/Blog/Views/Home/Index.aspx
/Blog/Views/Home/About.aspx
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I set up an asp.net mvc app with Subversion? I plan to have 2 projects.
1. mbtech.crm.mvc
2. mbtech.crm.tests
I will have a solution named mbtech.crm
What is the best way to set these up so that I can track them in Subversion?
Option 1 (then where does my solution file go)?
- mbtech.crm.mvc
- tags
- t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231219",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Window Handle and window dimension The MFC application that i created is dialog based. Just one dialog thats all. How do I get the window handle to this window, while the application is performing the InitDialog. I need to find out its dimension as well. GetForegroundWindow not necessarily gives you the handle to th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Fatal error: Class 'COM' not found whilst trying to use ADODB include('adodb5/adodb.inc.php');
$myServer = "localhost";
$myUser = "root";
$myPass = "root";
$myDB = "database";
//create an instance of the ADO connection object
$conn = new COM("ADODB.Connectio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231226",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to generate a Makefile with source in sub-directories using just one makefile I have source in a bunch of subdirectories like:
src/widgets/apple.cpp
src/widgets/knob.cpp
src/tests/blend.cpp
src/ui/flash.cpp
In the root of the project I want to generate a single Makefile using a rule like:
%.o: %.cpp
$(CC) -c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231229",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "66"
} |
Q: How would you write a non-recursive algorithm to calculate factorials? How would you write a non-recursive algorithm to compute n!?
A: public double factorial(int n) {
double result = 1;
for(double i = 2; i<=n; ++i) {
result *= i;
}
return result;
}
A: In the interests of science I ran som... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231250",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Is non multiple of machine word primitives good idea? Let's say you have a dynamic language (similar to common scripting languages) and want to write a compiler for it. Is it good idea to reserve some bits of a machine word for something like type tags? Especially for microcontrollers and similar devices, is it a go... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231257",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Delete files from remote computer I'm trying to delete a directory that contains XML files from a remote computer. My code compiles and runs fine, but when I go to get a list of XML files in the path I specify, it is not returning anything. Am I missing something permission wise?
I have ran it from my computer logg... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Automatic Deployment Resources I know enough to know that we need to get our application to deploy with a single user action. However, I don't know:
*
*What are some good tools to use in a .NET shop?
*How do you manage config changes for each of your environments?
Can someone point me to some good resources fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231283",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Need help making Jython (dom4j) script more graceful :) I have started using Jython as it seems to be a excellent language, and has proved to be so far.
I am using dom4j to manipulate and retrieve data from the DOM of a bunch of HTML files I have on disk. I have wrote the below script to check threw the DOM using X... | {
"language": "en",
"url": "https://stackoverflow.com/questions/231288",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |