text string | meta dict |
|---|---|
Q: The simplest way of printing a portion of a char[] in C Let's say I have a char* str = "0123456789" and I want to cut the first and the last three letters and print just the middle, what is the simplest, and safest, way of doing it?
Now the trick: The portion to cut and the portion to print are of variable size, so ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256218",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Register allocation rules in code generated by major C/C++ compilers I remember some rules from a time ago (pre-32bit Intel processors), when was quite frequent (at least for me) having to analyze the assembly output generated by C/C++ compilers (in my case, Borland/Turbo at that time) to find performance bottleneck... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Which exception should I raise on bad/illegal argument combinations in Python? I was wondering about the best practices for indicating invalid argument combinations in Python. I've come across a few situations where you have a function like so:
def import_to_orm(name, save=False, recurse=False):
"""
:param n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256222",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "781"
} |
Q: Weird random data being sent from Arduino to Processing I'm trying to read data from a photocell resistor and my Arduino Diecimila and then graph it in real-time with Processing.
It should be painfully simple; but it’s growing into a little bit of a nightmare for me.
The code I'm running on my Arduino:
int photoPin;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256228",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Multi-lingual web application - how do I detect the user's language in ASP.NET? I'm building an ASP.NET web application, and all of my strings are stored in a resource file. I'd like to add a second language to my application, and ideally, I'd like to auto-detect the user's browser language (or windows language) and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256229",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How do I get access to SOAP response (If anything here needs clarification/ more detail please let me know.)
I have an application (C#, 2.* framework) that interfaces with a third-party webservice using SOAP. I used thinktecture's WSCF add-in against a supplied WSDL to create the client-side implementation. For rea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Functional Programming: Best Platform/Environment I have been researching and playing with functional programming lately, solely to broaden my thinking about programming, because I find thinking "functionally" difficult.
I have downloaded Glasgow Haskell and experimented with that.
What I am wondering is, what is th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256254",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: spring and interfaces I read all over the place about how Spring encourages you to use interfaces in your code. I don't see it. There is no notion of interface in your spring xml configuration. What part of Spring actually encourages you to use interfaces (other than the docs)?
A: No one has mention yet that in man... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256255",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: How do I get Emacs shell mode to either render (or ignore) my colors instead of printing ASCII codes? The symptom of the problem looks like "[0m[27m[24m[J[34;1" which on a terminal translates into the color blue.
-A
A: I've got the following in my .emacs
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256264",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: What causes DbDataAdapter.Fill to fill a DataSet with the incorrect number of columns? I have a windows service connecting to a SqlServer database on the local box. This works fine most all the time. At a large customer, however, the database connectivity gets corrupted for some rare and unknown reason. When this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256267",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is a good reference documenting patterns of use of ".h" files in C? "C Interfaces and Implementations" shows some interesting usage patterns for data structures, but I am sure there are others out there.
http://www.amazon.com/Interfaces-Implementations-Techniques-Addison-Wesley-Professional/dp/0201498413
A: L... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256277",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the best way to calculate page hits per day in MySQL On my blog, I display in the right nav the 10 most popular articles in terms of page hits. Here's how I get that:
SELECT *
FROM entries
WHERE is_published = 1
ORDER BY hits DESC, created DESC
LIMIT 10
What I would like to do is show the top 10 in terms of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256282",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do I run PartCover in x64 windows I am trying to run PartCover to test the coverage of some tests with Gallio on windows x64. However trying to run it gives the following error.
Retrieving the COM class factory for component with CLSID
{FB20430E-CDC9-45D7-8453-272268002E08} failed due to the following error:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Code profiling / performance analysis tools for Windows CE/Mobile What tools do you know, other than those in Visual Studio, to analyze performance bottlenecks in a Windows CE/Mobile application? I'm looking for something like AQTime for CE/Mobile, to profile C/C++ applications compiled to native code.
A: Windows C... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Best way to represent a 2-D array in C++ with size determined at run time In C++ I'd like to do something like:
int n = get_int_from_user();
char* matrix = new char[n][n];
matrix[0][0] = 'c';
//...
matrix[n][n] = 'a';
delete [][] matrix;
but of course this doesn't work. What is the best way to do something simi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256297",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Should a c# class generate instances of itself? I have a class that defines a CallRate type. I need to add the ability to create multiple instances of my class by reading the data from a file.
I added a static method to my class CallRate that returns a List<CallRate>. Is it ok for a class to generate new instances o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256306",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: What was the most advanced stuff you did with compact framework At work I use mostly the .NET Compact Framework 3.5 for developing applications that run on smart devices. Our devices are not phones or handhelds - they are measurement instruments which you get with a whole punch of features. Our application is pretty... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256322",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Django - filtering on related objects For my Django app I have Events, Ratings, and Users. Ratings are related to Events and Users through a foreign keys. When displaying a list of Events I want to filter the ratings of the Event by a user_id so I know if an event has been rated by the user.
If I do:
event_list = ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Do you know how to write this Scheme function? Could you write a function that takes one argument (a positive integer) and
*
*divides it by two if it's even, or
*multiplies it by three and adds one if it's odd
and then returns the resulting number.
And then a separate function that takes one argument (a positi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-7"
} |
Q: Recovering from ipconfig /release on a remote PC Not strictly a programming question, but I was programming at the time and couldn't find an answer, so I thought, "Hey, I'll give StackOverflow a try!"
So I'm connected to my Windows XP work PC over a Remote Desktop connection through VPN. In a command window (on the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256347",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What are the best/common RESTful url verbs and actions? I'm trying to find some info on the best and most common RESTful url actions.
for example, what url do you use for displaying the details of an item, for editing the item, updating, etc.
/question/show/<whatever>
/question/edit/<whatever>
/question/update/<what... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256349",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "90"
} |
Q: MSTest & AppDomains In some my project I notice that during executing unit tests under VSTS2008 its VSTestHost's memory consuming grows. As I have very many tests in my solution it leads to OutOfMemroyException eventually.
That looks very strange for me as I was sure that MSTest creates a new AppDomain for each unit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256354",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Tunneling proxy on VS 2008 Is there a way to tunnel a proxy to access a remote sql server database on visual studio 2008?
I'm working in a project at college that uses a sql server database but the access is restricted to the internal network. I'd like to access the database from my home too.
Thanks in advance.
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256360",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What IDE / Editor do you use for Ruby on Windows? The SciTE editor comes with the Ruby installer, and it's just a generic code editor. I installed FreeRIDE but it seems a little buggy; it actually just crashed on me for no reason. :(
So my question is...
What IDE / Editor do you use for Ruby on Windows? What are the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Delphi database: Setting up an array of ADT fields at runtime I'm using an in-memory dataset to represent an array of objects. I've got most of the code figured out to fill the dataset at runtime, but part of my object contains a dynamic array of TPoint records, and I have no idea how to set up the dataset and the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256367",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Fatal CLR Error 80004005 Today, everytime I try to open any .Net application I get:
CLR error: 80004005
The program will now terminate.
Any suggestions?
A: I had this problem and uninstalling/reinstalling dot net didn't help.
Randomly I found a suggestion to go to
c:\Windows\Microsoft.NET\
Then rename the director... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256370",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: How to plot Polyline Area, i.e. service coverage area, and also check to see if visitor's address lies within that area using Google Maps API and PHP? I am the owner of a business that is building a new website application. My partner is the programmer who is doing the development and neither one of us has any real ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256380",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How can you tell if a memory page is marked as read-only? When using copy-on-write semantics to share memory among processes, how can you test if a memory page is writable or if it is marked as read-only? Can this be done by calling a specific assembler code, or reading a certain spot in memory, or through the OS's ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the correct build system to use with Mono and multiple projects with dependencies, excluding MonoDevelop? In a prior question, I asked about using xbuild to compile a solution file, only to be told it doesn't work for that. NAnt seems a little out of date. What other options are there? I need something th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256396",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I keep the development web server (Cassini) running in Visual Studio 2008? I'm using Visual Studio 2008 to develop ASP.NET applications. Currently I'm debugging with running on IIS. I would like to switch to the development web server (Cassini) for debugging, so that I can use features like edit and continue.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256401",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Programmatically Create X509 Certificate using OpenSSL I have a C/C++ application and I need to create a X509 pem certificate containing both a public and private key. The certificate can be self signed, or unsigned, doesn't matter.
I want to do this inside an app, not from command line.
What OpenSSL functions will... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256405",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "90"
} |
Q: MySQL field management When I make a query, I often wonder about this:
Is it better to add extra field(s) to
the table, or just get the values and
calculate in your server side
language?
For example, table Student contains Student.score field. I want to get the grades.
Do I get the score and make a bunch of
if/el... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256413",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Python packages and egg-info directories Can someone explain how egg-info directories are tied to their respective modules? For example, I have the following:
/usr/local/lib/python2.5/site-packages/quodlibet/
/usr/local/lib/python2.5/site-packages/quodlibet-2.0.egg-info/
I'm assuming the egg-info directory is to ma... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256417",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "86"
} |
Q: How to implement such tool-tip in open-flash-chart 2.x To my way of thinking I need to use tooltip like the tooltip in 1.x and the magicword #tip# 's function.
Any suggestion?
A: You can try these two links:
http://teethgrinder.co.uk/open-flash-chart-2/tooltip.php
http://pullmonkey.com/2008/7/28/open-flash-chart-ii... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256428",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the best way to analyze a project's risk? Is there a fool-proof way to pull out all the risks involved in a project? And does it differ depending on the type of projects your working on (ie: website, client/server...)?
A: Definitely no fool-proof way. Whole books have been written on the topic. And speaking... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: The best way to check if SQL CE is installed, and if so what version? I've written a VB.NET application that uses SQL CE 3.5. I'm curious if anyone has any best practice or code to help check if A) SQL CE is installed and B) If so, what version.
I searched msdn and google for anything but I didn't find anything h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256451",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How can I profile serialization overhead in my application My application has a WCF service tier between the front-end and the database. Since we currently host in IIS6 we are using SOAP over HTTP. How can I find out how much real world time I am spending doing serialization activities in my application?
A: Not a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256456",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Populate a MS Access database in Linux Is there any way to create an Access / Jet database from within Linux?
I'm trying to feed data from a linux application server (mysql backend) and have not found any tools that let me do this - it seems there should be something.
If I can't create a database, is there a way to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: NSString indexOf in Objective-C Is there anything similar to an indexOf function in the NSString objects?
A: Use -[NSString rangeOfString:]:
- (NSRange)rangeOfString:(NSString *)aString;
Finds and returns the range of the first occurrence of a given string within the receiver.
A: If you want just know when Stri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256460",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "56"
} |
Q: Where to get more information on Dictionary ADT and Skip List for Java? I'm trying to go deep into Dictionary ADT and Skip List for Java. My textbook doesn't cover a lot about this and whatever it has covered is very complicated. Which is the best online site to get more information on Dictionary ADT and Skip List f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256490",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Targetable Compiler for Arbitrary Architecture Are there compilers for high-level languages (such as C) which can be targeted to various architectures by specifying the hardware resources of the target?
I'm wondering if there are compilers which can target an architecture by specifying features such as the available... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256495",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to get rid of stupid "pad" labels produced by RTML functions? I am unlucky to be in charge of maintaining some old Yahoo! Store built using their RTML-based platform.
Recently I've noticed that HTML code generated by some RTML functions is sprinkled all over with "padding images" (or whatever is the conventional... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256500",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I memoize a recursive function in Lisp? I'm a Lisp beginner. I'm trying to memoize a recursive function for calculating the number of terms in a Collatz sequence (for problem 14 in Project Euler). My code as of yet is:
(defun collatz-steps (n)
(if (= 1 n) 0
(if (evenp n)
(1+ (collatz-step... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256507",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Skip List vs. Binary Search Tree I recently came across the data structure known as a skip list. It seems to have very similar behavior to a binary search tree.
Why would you ever want to use a skip list over a binary search tree?
A: First, you cannot fairly compare a randomized data structure with one that gives... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256511",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "259"
} |
Q: Best programming approach/methodology to assure thread safety When I was learning Java coming from a background of some 20 years of procedural programming with basic, Pascal, COBOL and C, I thought at the time that the hardest thing about it was wrapping my head around the OOP jargon and concepts. Now with about 8 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256517",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: ASP.NET Image uploading from URL I have an aspx page,where the user will enter a valid image url(ex : https://stackoverflow.com/Content/Img/stackoverflow-logo-250.png).
I need the program to upload this image to the Server.
How can i do this ?
A: System.Net.WebClient webClient = new WebClient();
webClient.Downl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256526",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Parsing a local XML Document in WPF (works in debug, fails once published) I am building a WPF application. Inside that application I am using the XmlReader class to parse several local XML files. The code I have written works perfectly during debugging, but fails once I publish the application and install it.
I hav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256529",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Constantly repeating timer in an asp.net ajax page Today I had my first test with the ASP.NET AJAX Timer Control, in hope that it would allow me to constantly keep updating my site.
At the moment, it just updates once; this does not match the behavior of the previous .NET timers.
Was the AJAX Timer control only made... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256544",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Validator for type strings? Anyone know if there is already a validator for "type" strings?
I want to make sure that the type attributes in my custom config are one of the following:
type="TopNamespace.SubNameSpace.ContainingClass, MyAssembly"
type="TopNamespace.SubNameSpace.ContainingClass, MyAssembly, Version=1.3... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256546",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a way to log or intercept First Chance Exceptions Short of using a profiler, is there any way inside a running program to detect first chance exceptions? Ideally, I would like to record more detailed state information that is not available once the catch block has taken over the final exception.
A: I thin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256548",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Editing .plist files - are single quotes allowed as strings? In particular, I'm editing the AutoCompletion.plist file for CSSEdit (if that even matters).
My question is, are there any characters withing the STRING elements that need to be escaped? spaces? quotes?
EDIT:
Just to be clear, I'm not using CSSEdit to edit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256554",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I change the text size and component width of a UIPickerView? I have the following code to create a UIPickerView:
pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0.0f, 416.0f - height, 320.0f, height)];
pickerView.delegate = self;
pickerView.showsSelectionIndicator = YES;
[pickerView setSoundsEna... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256556",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Approaching STL algorithms, lambda, local classes and other approaches One of the things that seems to be necessary with use of STL is a way to specify local functions.
Many of the functions that I would normally provide cannot be created using STL function object creation tools ( eg bind ), I have to hand roll my f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256557",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Concept of "Data Directory" on each platform This is very similar to Where should cross-platform apps keep their data?, but expanding on it a bit.
There is some good advice on where the parent directory for data should be, but not so much on what a given app's directory should be.
For example, let's say we have a cr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256561",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Putting a pyCurl XML server response into a variable (Python) I'm a Python novice, trying to use pyCurl. The project I am working on is creating a Python wrapper for the twitpic.com API (http://twitpic.com/api.do). For reference purposes, check out the code (http://pastebin.com/f4c498b6e) and the error I'm getting (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256564",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Class Limiting and Archetypes I'm trying to create a function in C# which will allow me to, when called, return a reference to a given class type. The only types of functions like this that I have seen are in UnrealScript and even then the functionality is hard coded into its compiler. I'm wondering if I can do th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256566",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Cannot re-install apache 2.2 services on XP through xampp I'm trying to experiment with xampp. After having some space issues, I wanted to move my xampp install onto another drive (d:). However I have the apache 2.2 services in XP services which are still pointing to my original c: install. I only see how to start a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256575",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why use "Y"/"N" instead of a bit field in Microsoft SQL Server? I'm working on an application developed by another mob and am confounded by the use of a char field instead of bit for all the boolean columns in the database. It uses "Y" for true and "N" for false (these have to be uppercase). The type name itself is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How to evaluate the pros and cons when changing language I am working in a company that develops computing kernels. Their design is simple : it's a library in c++ which only has one function available to compute results out of available data.
There are essentially four steps in every one of these kernels :
*
*re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256622",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: When to use closure? I have seen samples of closure from - What is a 'Closure'?
Can anyone provide simple example of when to use closure?
Specifically, scenarios in which closure makes sense?
Lets assume that the language doesn't have closure support, how would one still achieve similar thing?
Not to offend anyone, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: How can I set up a callback to run *before* a jquery animation? I'm trying to set up a loop where an animation runs a certain number of times, and a function is run before each iteration of the animation. The timing ends up being off, though -- it runs the callback n times, then runs the animation n times. For exam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Constructing a simple interpreter I’m starting a project where I need to implement a light-weight interpreter.
The interpreter is used to execute simple scientific algorithms.
The programming language that this interpreter will use should be simple, since it is targeting non- software developers (for example, mathem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256629",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Calling Webservices in a loop won't execute the custom OnSuccess function I have a problem.
I am coding using VS2008.
I am calling webservices from my JavaScript Page.
An example
Services.ChangeDropDownLists.GetNowPlayingMoviesByLocationSVC(
blah,
OnSuccessMoviesByRegion,
OnError,
OnTimeOut
);
af... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256634",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Time Code in PLT-Scheme I want to see how long a function takes to run. What's the easiest way to do this in PLT-Scheme? Ideally I'd want to be able to do something like this:
> (define (loopy times)
(if (zero? times)
0
(loopy (sub1 times))))
> (loopy 5000000)
0 ;(after about a se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256647",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PL/Ruby equivalent in MySQL PL/Ruby is a loadable procedural language for Postgres that lets you use Ruby to write user defined functions for the database.
Anyone know of an equivalent way of writing user defined functions for MySQL in Ruby?
A: Starting from version 5 (I think) Mysql supports stored procedures, but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256681",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why would a typebuilder spit out two .ctor methods? I have a typebuilder that is generating two identical .ctors one that is has no method body and the other that has all the init code.
I am defining a field from another type and a property to access the type and therefore need to init it in the .ctor
Where should I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Scala combinator parsers - distinguish between number strings and variable strings I'm doing Cay Horstmann's combinator parser exercises, I wonder about the best way to distinguish between strings that represent numbers and strings that represent variables in a match statement:
def factor: Parser[ExprTree] = (wholeN... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256694",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Scala syntax - pass string to object While playing around with regexps in Scala I wrote something like this:
scala> val y = "Foo"
y: java.lang.String = Foo
scala> y "Bar"
scala>
As you can see, the second statement is just silently accepted. Is this legal a legal statement, and if so, what does it do? Or is it a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256697",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is a View in Oracle? What is a view in Oracle?
A: regular view----->short name for a query,no additional space is used here
Materialised view---->similar to creating table whose data will refresh periodically based on data query used for creating the view
A: A view is a virtual table, which provides access to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "59"
} |
Q: How to use boost::mpl to compose policies? I have used something like the following to compose policies for my application:
The policy classes look like this:
struct Policy {
static void init();
static void cleanup();
//...
};
template <class CarT, class CdrT>
struct Cons {
static void init() {
CarT::in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Code generators or ORMs? What do you suggest for Data Access layer? Using ORMs like Entity Framework and Hibernate OR Code Generators like Subsonic, .netTiers, T4, etc.?
A: For me, this is a no-brainer, you generate the code.
I'm going to go slightly off topic here because there's a bigger underlying fallacy at pl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256708",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to programmatically activate the menu in Windows mobile In most versions of windows, you can get to the menu by pressing the F10 key, thus avoiding having to use the mouse. This behaviour does not appear to be present in Windows Mobile 5.0, but is desirable as the device I am using will be more keyboard than to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SVN - Retrieving Useful Information We are using Subversion. We would like to
1. search across all commit messages ?
2. monitor the commits on certain important files ?
3. identify files that are never/rarely used ?
4. identify files that are most frequently changed ?
5. identify files that most developer... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256723",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: In C++, is it safe to extend scope via a reference? In C++, is it safe to extend scope via a reference?
In code, what I mean is:
MyCLass& function badIdea()
{
MyClass obj1;
...
return obj1;
}
A: It is NOT safe to extend the scope via reference. Objects in C++ are not reference counted when obj1 goes o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256724",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: JTextArea in vi mode Is there a free and open source extension of JTextArea that would support "vi mode"?
A: Maybe you can find useful info here: http://jvi.sourceforge.net/.
A: AFAIK, no. This is such an obscure request, I think you'd have to code it yourself.
A: Of course, I can't be sure that such a component... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256726",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Handle web service response (error scenario)not working function AddTheatres() {
Services.AdminWebServices.AddTheatresSVC(oTheatres, OnSuccessTheatres, OnError, OnTimeOut);
}
function OnSuccessTheatres(result1) {
Services.AdminWebServices.AddTicketPricesSVC(oTicketPrices, OnSuccessTicketPrices, OnError, OnTimeO... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256728",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: regex to match a maximum of 4 spaces I have a regular expression to match a persons name.
So far I have ^([a-zA-Z\'\s]+)$ but id like to add a check to allow for a maximum of 4 spaces. How do I amend it to do this?
Edit: what i meant was 4 spaces anywhere in the string
A: ^ # Start of string
(?!\... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Can I monitor the size of a thread's message queue? Our application is getting a System Call Failed RPC error from DCOM (0x80010100), we suspect that the target thread's message queue is full (although I'm not convinced this is ture). I know the queue is limited to 10,000 messages and I want to see if we're close to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256734",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to pass arguments to addEventListener listener function? The situation is somewhat like-
var someVar = some_other_function();
someObj.addEventListener("click", function(){
some_function(someVar);
}, false);
The problem is that the value of someVar is not visible inside the listener function of the addEventL... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256754",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "462"
} |
Q: Is there a resource to help convert Prototype JavaScript to jQuery? I have extensively used Prototype before and it helped us add considerable interactivity to our web applications. However we are looking at making the move to use jQuery in order to standardize on something better supported in Visual Studio.
I under... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256768",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Concurrency handling using the filesystem VS an RDMBS (MySQL) I'm building an English web dictionary where users can type in words and get definitions. I thought about this for a while and since the data is 100% static and I was only to retrieve one word at a time I was better off using the filesystem (ext3) as the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What defines data that can be stored in strings A few days ago, I asked why its not possible to store binary data, such as a jpg file into a string variable.
Most of the answers I got said that string is used for textual information such as what I'm writing now.
What is considered textual data though? Bytes of a cer... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256803",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: SQL custom functions in Enterprise Library Is there a way to execute SQL custom functions with Enterpise Library? I've tried Database.ExecuteScalar() but for some reason it returns null.
This is my function:
Database db = DatabaseFactory.CreateDatabase("ConnectionString");
DbCommand cmd = db.GetStoredProcCommand("Fu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256804",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is it possible to implement scoped lock in C#? A common pattern in C++ is to create a class that wraps a lock - the lock is either implicitly taken when object is created, or taken explicitly afterwards. When object goes out of scope, dtor automatically releases the lock.
Is it possible to do this in C#? As far as I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Check if array index exists Is there any way to check if a given index of an array exists?
I am trying to set numerical index but something like 1, 5, 6,10. And so I want to see if these indexes already exist and if they do just increase another counter.
I normally work with php but I am trying to do this in c++, so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256807",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you create non scrolling div at the top of an HTML page without two sets of scroll bars How do you create non scrolling div that looks like the MS Office 2007 ribbon on a web page without two sets of scroll bars. One for the window and one for the div.
A: Use a fixed position <div> element, that has 100% wid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How to use regex for utf8 in ruby In RoR,how to validate a Chinese or a Japanese word for a posting form with utf8 code.
In GBK code, it uses [\u4e00-\u9fa5]+ to validate Chinese words.
In Php, it uses /^[\x{4e00}-\x{9fa5}]+$/u for utf-8 pages.
A: Ruby 1.8 has poor support for UTF-8 strings. You need to write the b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256822",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Finding if a TextBox/Label caption fits in the control The scenario is trying to adjust font size to get a nice graphic arrangement, or trying to decide where to break a caption/subtitle.
a) In XL VBA is there a way to find out whether a text on a textbox, or caption on a label, still fits the control?
b) Is there a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256823",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C# - Fill a combo box with a DataTable I'm used to work with Java where large amounts of examples are available. For various reasons I had to switch to C# and trying to do the following in SharpDevelop:
// Form has a menu containing a combobox added via SharpDevelop's GUI
// --- Variables
languages = new string[2];... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Is there a performance difference between a for loop and a for-each loop? What, if any, is the performance difference between the following two loops?
for (Object o: objectArrayList) {
o.DoSomething();
}
and
for (int i=0; i<objectArrayList.size(); i++) {
objectArrayList.get(i).DoSomething();
}
A: There a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "204"
} |
Q: Can anyone show me a good source to learn web services? I currently don't know any thing about web services, except that they are used to allow an application to share its functions.
*
*Where & how to start?
*Does any book on web services work with me if I use PHP as my programming language?
*Does anyone know ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How do i backup a SQL database using PHP? How do i backup a SQL database using PHP.
Is there a vendor agnostic way to do this that conforms to ANSI SQL?
If not maybe you can list how to do it for each of the database vendors?
A: Every database system comes with some program for dumping its contents.
*
*PostgreSQ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256892",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: SerialPort and the BSOD I've written some C# code that checks whether a device is present on any SerialPort by issuing a command on the port and listening for a reply. When I just set the port speed, open the port, get the serial stream and start processing, it works 100% of the time. However, some of our devices wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256893",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to use Defining Query in SSDL in Entity Framework? Advantages and Examples will be helpful I need some info about using the Defining Query element within the SSDL of the Entity Framework.
Advantages of using it and scenarios where it would be helpful would really help.
An example and links will be great.
A: I'm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Mocking WebService consumed by a Biztalk Request-Response port I'm using BizUnit to unit-tests my Biztalk orchestrations, but some orchestrations consume a WebService,and testing these seems more like integration testing than unit testing.
I'm familiar with using a mocking framework to mock the generated proxy objec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256897",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to go about web service security in Java Does anyone have a recommendation about web service security architecture in Java (preferably under JBoss)? Any recommended reading?
I want to expose a fairly rich web service to the world but the data are sensitive and it requires authentication from the current client ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using keyboard interrupt to display something different than what the user typed In the C language, using keyboard interrupt, how can I display an alternate key from what the user typed? E.g., when I press 'Q' on the keyboard, then the screen should display 'A'.
A: Handling keyboard interrupt is not a good idea on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256902",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: JSTL forEach tag: problems with enumeration, and with understanding how it should work I've experienced rather strange behavior of JSTL forEach tag.
I have some bean called SessionBean:
public class SessionBean {
private Collection<MyObject> objects;
public Collection<MyObject> getObjects() {return objects;}
.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256910",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: StructureMap IOC/DI and object creation I'm building small web shop with asp.net mvc and Structuremap ioc/di. My Basket class uses session object for persistence, and I want use SM to create my basket object through IBasket interface. My basket implementation need HttpSessionStateBase (session state wrapper from mvc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256915",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Using C: How can I determine the sizes of the components of a floating point? I am looking for suggestions on how to find the sizes (in bits) and range of floating point numbers in an architecture independent manner. The code could be built on various platforms (AIX, Linux, HPUX, VMS, maybe Windoze) using different... | {
"language": "en",
"url": "https://stackoverflow.com/questions/256919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |