text stringlengths 8 267k | meta dict |
|---|---|
Q: C++ Parameter's Value Changes Between Stack Frames in std::vector I've run into a really strange bug, that I'm hoping someone can explain. I have a simple std::vector<V3x>, where V3x is a 3d vector (the linear algebra kind.) The following code causes a std::length_error exception to be thrown:
std::vector<V3x> verti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433274",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to split an SVN folder into its own repository when it has been renamed? I want to split a directory from a large Subversion repository to a repository of its own, and keep the history of the files in that directory.
I tried the regular way of doing it first
svnadmin dump /path/to/repo > largerepo.dump
cat large... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433276",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: C# Update combobox bound to generic list I have a combobox on my form that is bound to a generic list of string like this:
private List<string> mAllianceList = new List<string>();
private void FillAllianceList()
{
// Add alliance name to member alliance list
foreach (Village alliance in alliances)
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433281",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: What happened to the "TagLib#" library? What is the current status of TagLib# (TagLib sharp)?
The official homepage www.taglib-sharp.com (link removed due to the NSFW nature of the new site that's parked at that address. -BtL) doesn't exist anymore!
I've found the project on ohloh where the old homepage is still lin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to save and load a text mode game I went in late in a project of gamedev of a simple text game in C++.I studied the project and I think I know how to do everything but i get stuck on a thing:how to save and load the game as proposed.I don't want to have the thing done for me,only you show me a way to do it.
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433293",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Column comparison in Django queries I have a following model:
class Car(models.Model):
make = models.CharField(max_length=40)
mileage_limit = models.IntegerField()
mileage = models.IntegerField()
I want to select all cars where mileage is less than mileage_limit, so in SQL it would be something like:
se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433294",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Portable and simple unicode string library for C/C++? I'm looking for a portable and easy-to-use string library for C/C++, which helps me to work with Unicode input/output. In the best case, it will store its strings in memory in UTF-8, and allow me to convert strings from ASCII to UTF-8/UTF-16 and back. I don't nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433301",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Convert a String to Variable I've got a multidimensional associative array which includes an elements like
$data["status"]
$data["response"]["url"]
$data["entry"]["0"]["text"]
I've got a strings like:
$string = 'data["status"]';
$string = 'data["response"]["url"]';
$string = 'data["entry"]["0"]["text"]';
How can I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433302",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How to draw a surface plot without black edges in MATLAB? The black lines are awful, how can I get rid of them? I want only the colored surfaces.
A: Another choice is to set the edgeColor and/or lineStyle properties of the surface handle object to none.
>> hSurf = surf(X,Y,Z,'EdgeColor','none','LineStyle','none','F... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433312",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "41"
} |
Q: Running background services on a PocketPC I've recently bought myself a new cellphone, running Windows Mobile 6.1 Professional. And of course I am currently looking into doing some coding for it, on a hobby basis. My plan is to have a service running as a DLL, loaded by Services.exe. This needs to gather som data, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to create a new figure in MATLAB? Usually when I plot in MATLAB, it always draws on the same figure. How do I make it draw in a new figure?
I know it is pretty elementary, but I'm not finding it using Google Search.
A: figure;
plot(something);
or
figure(2);
plot(something);
...
figure(3);
plot(something else)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433326",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: Minimal XML library for C++? What XML libraries are out there, which are minimal, easy to use, come with little dependencies (ideally none), can be linked statically and come with a liberal license? So far, I've been a pretty happy user of TinyXML, but I'm curious what alternatives I have missed so far.
A: expat is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433327",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Python Library to Generate VCF Files? Know of any good libraries for this? I did some searches and didn't come across anything. Someone somewhere must have done this before, I hate to reinvent the wheel.
A: I would look at:
http://vobject.skyhouseconsulting.com/usage.html (look under "Usage examples")
Very easy p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433331",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is there is a software caching API out there? I'm looking for an API or an application that can cache data from a file or database.
My idea is that I have an application that reads a database, but the access to database is sequential and it is on a disk.
What I basically want to do is get the data from cache first a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Set the maximum character length of a UITextField How can I set the maximum amount of characters in a UITextField on the iPhone SDK when I load up a UIView?
A: Swift 4
import UIKit
private var kAssociationKeyMaxLength: Int = 0
extension UITextField {
@IBInspectable var maxLength: Int {
get {
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "488"
} |
Q: Best way to store commonly used values In my Webforms 3.5 application, I have a GridView of users that displays the last time they logged in. This value is stored in the Users table in UTC. When an Administrator views the grid, I want them to view it the time zone the Administrator has selected in their preference... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Do you think templates represent the best way for separating presentation logic from business logic? I think most template engines are hard to use for designers and front end developers leaving you, the programmer with the burden of maintaining them.
And frequently updating the templates after the designer updates t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433351",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Editing the IDL created by OLE view for a C++ component What things do I need to consider when doing this:
*
*What to remove/manipulate/add
Regards
A: Defining interfaces in IDL for client neutrality
A number of issues are described in the link above to take note
| {
"language": "en",
"url": "https://stackoverflow.com/questions/433356",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to get a more compact automatic indentation in Eclipse (for Java)? What is the code formating option to indent as:
Log.w(TAG, String.format(
"Upgrading database from version %s to %s which will destroy all old data",
oldVersion, newVersion));
instead of as:
Log
.w(
TAG,
String
.format(
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433358",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Equipping Notepad with Spell Check (as you type) feature -- Best choice available? I don't need any alternative text editor with bundle of features. I just want my text to be checked in Notepad (as I type) for any spelling mistake. What is the best choice available? Thanks in advance.
A: I asked Google and Google g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433361",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Turning numbers into colored bars automatically in HTML/Javascript I want to auto-generate a HTML table from some custom data. One of the columns in my data is a number in the range 0-100, and I'd like to show it in a more graphical way, most desirably a colored horizontal bar. The length of the bar would represent ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to draw (semi-)logarithmic 3d plots? (Matlab) I know semilogx and semilogy for 2D plots. There is any equivalent for SURF and MESH?
A: As stated in the mentioned link, to set all three axes to logarithmic scaling, use
set(gca, 'XScale', 'log', 'YScale', 'log', 'ZScale', 'log')
A: Have you looked at the XScale... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433364",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Ellipse bounding a rectangle Maths101 question - does anyone know how to calculate an ellipse (width/height) that will enclose a given rectangle. Obviously there is no single ellipse - I'm after an algorithm that will give me various width/height combinations - or perhaps the smallest area of ellipse? It's for a GUI... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433371",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: using dictionary as a key in other dictionary I would like to use Dictionary as TKey in another Dictionary. Something similar to python. I tried this but it gives me errors.
Dictionary<Dictionary<string, string>, int> dict = new Dictionary<Dictionary<string, string>, int>();
Dictionary<string, string> dict2 = new... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433372",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: SaaS-company structure What is the most typical structure of business where you want to develop several web services? Should one establish a company for each of them or keep under one? I would like to hear your experiences maintaining such situation, keeping in mind the global focus.
A: By far the two most critical... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433378",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Capistrano remote authentication problem I'm trying to deploy to a slicehost slice using this config/deploy/production.rb file. I'm clueless & haven't used capistrano before now. Here are the steps I followed. Sorry but I'm completely new to capistrano. It keeps asking for my password (have set up passwordless S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433379",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to configure the update interval for Yahoo! Pipes? I am creating some RSS using Yahoo! Pipes, but the update interval is too long. How can i change it? If it is not possible to change, how long it is exactly?
A: The Pipes docs says it honors the standard HTTP expiration headers, so it depends on your sources' ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433386",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Python-Regex, what's going on here? I've got a book on python recently and it's got a chapter on Regex, there's a section of code which I can't really understand. Can someone explain exactly what's going on here (this section is on Regex groups)?
>>> my_regex = r'(?P<zip>Zip:\s*\d\d\d\d\d)\s*(State:\s*\w\w)'
>>> add... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How do I use prepared statements in SQlite in Android? How do I use prepared statements in SQlite in Android?
A: jasonhudgins example won't work. You can't execute a query with stmt.execute() and get a value (or a Cursor) back.
You can only precompile statements that either returns no rows at all (such as an insert... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433392",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "108"
} |
Q: What does "subrange" mean in the HTTP spec? See, for example, §13.3.3 and §13.3.4.
It doesn't seem to me that this could be related to "media range" (§14.1, e.g. Accept: text/*), nor "language range" (§14.4, e.g. Accept-Language: da, en-gb;q=0.8, en;q=0.7).
Maybe it's the "accept range" (§14.5), which puts byte limi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433393",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to get the max sizes of the heap and permgen from the JVM? I am trying to find out programatically the max permgen and max heap size with which a the JVM for my program has been invoked, not what is currently available to them.
Is there a way to do that?
I am familiar with the methods in Java Runtime object, but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433406",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Javascript: Is it possible to get hold of the mouse position outside of an event handler? I want to get hold of the mouse position in a timeout callback.
As far as I can tell, this can't be done directly. One work around might be to set an onmousemove event on document.body and to save this position, fetching later.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433409",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Advatages to using virutalization for web development It's one of those things I see a lot but never really think of. Do you think for the purpose of web application development (specifically ASP.NET WebForms/MVC). Do you think it's advantageous to do such a thing and if so, what kind of advantages come out of it?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433424",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Silverlight: How to unload (dispose) an image from memory? I have an image control that displays a large jpg file and takes around 50mb of memory.
How do I dispose of this control when it is no longer needed? I tried removing it from the parent container, setting it to null and chaning its Source property to null, b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433434",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Sql count without duplication in statment i have an sql query that selects a bunch of data. I would also like to get the number of records selected by the query (before i limit it). All the examples i have seen of the count statment duplicated the select. My select statment is about 50 lines long and i would rarther... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Paletted textures with 8-bit alpha channel in OpenGL ES Can I get paletted textures with RGB palette and 8-bit alpha channel in OpenGL ES? (I am targetting the iPhone OpenGL ES implementation.) After peeking into the OpenGL documentation it seems to me that there is support for paletted textures with alpha in the pa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433440",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Fluent interfaces and leaky abstractions What is a fluent interface? I can't find a good definition of this, but all I get are long code examples in a language I am not very familiar with (e.g. C++).
Also, what is a leaky abstraction?
Thanks
A: A fluent interface a term Eric Evans coined and it's just another name ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433450",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Converting to Multi-Threaded Socket Application As I am currently doing this project in only C, I've up untill this point only used my webserver as a single threaded application. However, I dont want that anymore! So I have the following code that handles my Work.
void BeginListen()
{
CreateSocket();
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433461",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: If I make a new file type for my program, how do I use "Open With" properly? I made a program. I also made my own file type, which the program can create, open, and edit. In Explorer, I right clicked on this new file type and selected "Open With" and chose my program. Of course, it just opens the program without ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433474",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Performance impact of using aop We have started to use spring aop for cross cutting aspects of our application (security & caching at the moment).
My manager worries about the performance impact of this technology although he fully understands the benefits.
My question, did you encounter performance problems introd... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433475",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "48"
} |
Q: Lookup Tables Best Practices: DB Tables... or Enumerations If we have to store the available positions at a company (i.e. Manager, Team Lead, ... etc). What are the best practices for storing it? I have two opinions with comments... "sure, welcoming yours"
*
*Storing it as DB table with columns ID and Name, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433490",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "62"
} |
Q: Why does HTML require that multiple spaces show up as a single space in the browser? I have long recognized that any set of whitespace in an HTML file will only be displayed as a single space. For instance, this:
<p>Hello. Hello. Hello. Hello. Hello.</p>
displays as:
Hello. Hell... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433493",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "62"
} |
Q: Suggest terms to describe language proficiency level in your CV What's the best way to describe your level of skill in particular technologies (languages, platforms, OS, ...) when polishing your CV ?
Assume we are talking about the short CV of the kind where you don't spell out every project and system you have work... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433495",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Filtering a complete date in django? There are several filter methods for dates (year,month,day). If I want to match a full date, say 2008/10/18, is there a better way than this:
Entry.objects.filter(pub_date__year=2008).filter(pub_date__month=10).filter(pub_date__day=18)
A: How about using a datetime object. For ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433507",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Programmatically start moving a form I am trying to make a form move (using the titlebar) from a button click.
I thought this would be simple using SendMessage:
Const WM_LBUTTONDOWN As Integer = &H201
Button1.Capture = False
Cursor.Position = Me.Location + New Size(50, 8)
SendMessage(Me.Handle, WM_LBUTTONDOWN, CTy... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433518",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: XML Relationship Dupe: XML Relationship
I am unable to define a relationship between paper and author. Is it possible to define one?
<xsd:complextype name="Researcher'>
</xsd:complextype>
<xsd:complexType name = "Paper" >
<xsd:extension base = " Researcher " >
</xsd:extension>
</xsd:complexType>
<xsd... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433521",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: C# Assigning default property for class and operator = Problem 1:
I have a simple winforms app and I want to DataBind my Person.Name property to a textbox. Name is of type StringField. I originally defined the Name property as String. The data binding works great on value types such as String. I would like the Strin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433523",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What's actually wrong with my XML? I have an automatically generated XML file for the game that I run. It however apparently has an error.
The file is at: http://woarl.com/myXML.xml
And the error is apparently at line 520, here are lines 519-521
<type>Academy</type>
<typeid>23</typeid>
<completion>4</completion>
An... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433524",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C# - Problem with generics and inheritance I've got a problem with inheritance and generics.
This is the code that illustrates my problem:
namespace TestApplication
{
public class MyClass<T>
{
private T field;
public MyClass(T field)
{
this.field = field;
}
}
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433526",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: XML Relationship I am unable to define a relationship between paper and author. Is it possible to define one?
<xsd:complextype name="Researcher'>
</xsd:complextype>
<xsd:complexType name = "Paper" >
<xsd:extension base = " Researcher " >
</xsd:extension>
</xsd:complexType>
<xsd:complexType name = "Auth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433528",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: initWithFrame not called, but awakeFromNib is I am trying to subclass NSOutlineView. Here is my code:
OutlineViewSublcass.h:
#import <Cocoa/Cocoa.h>
@interface OutlineViewSubclass : NSOutlineView {
}
@end
OutlineViewSubclass.m:
#import "OutlineViewSubclass.h"
@implementation OutlineViewSubclass
- (id)initWithF... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433539",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: iPhone accelerometer in web applications I want my website to change its layout according to the device positon. The site has 2 layout types: vertical(height > width) ang horizontal(width > height).
do you see any solution?
upd: I don't see any complexity in changing the site layout. I want to know is there any even... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433543",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: JSON Security Do Pagemethods and Json have security risks?(I dont use cookies).Forexample i have a pagemethod and i am sending user id as a parameter but i dont want to show it to user.Can user get user id from pagemethod?
A: yes they can (see the user id). Any communication between the server and client can be see... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433558",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you distribute a .NET application? Before I start developing a desktop application, I was wondering how large the installer will turn out to be if I build it in .NET?
Now .NET probably is 5 years old. Do we still have to include the run time with the application? Or can we assume that most user will have it i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433567",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Entity Framework query with grouping (many to many) I have a classical many to many scenario with three tables (students, courses, and third StudentsCourses assignment table).
I'm using EF in my new project and EF designer doesn't create third table.
I need to select all cources along with number of students assigne... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433570",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why do C# and Java bother with the "new" operator? Why does the new operator exist in modern languages such as C# and Java? Is it purely a self documenting code feature, or does it serve any actual purpose?
For instance the following example:
Class1 obj = new Class1();
Class1 foo()
{
return new Class1();
}
Is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433591",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Function application: Why is $ used here? A while ago, I asked a question about $, and got useful answers -- in fact, I thought I understood how to use it.
It seems I was wrong :(
This example shows up in a tutorial:
instance Monad [] where
xs >>= f = concat . map f $ xs
I can't for the life of me see why $ was ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433595",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: (Encoded) String handling in C++ - questions / best practices? What are the best practices for handling strings in C++? I'm wondering especially how to handle the following cases:
*
*File input/output of text and XML files, which may be written in different encodings. What is the recommended way of handling this,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Grails domain class, String field TEXT and LONGTEXT In a Grails domain class, how do I set the constraint for a String field so that its MySQL column type is TEXT or LONGTEXT?
So far my best approach is to set the constraint's size:
myTextField(size:0..65535)
which results in TEXT
myTextField(size:0..2147483646)
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433621",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "41"
} |
Q: Concatenate two JSON objects I have two JSON objects with the same structure and I want to concat them together using Javascript. Is there an easy way to do this?
A: You can use Object.assign() method. The Object.assign() method is used to copy the values of all enumerable own properties from one or more source obj... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433627",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "101"
} |
Q: Why am I having a logical error with my homework? I'm a junior student in IT. I am facing a problem with the output of the program.
The idea of the program is that I should use functions to read an array of 10 elements, then get the average of the elements, then get the the max and min. I've got the max and min righ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is WPF production ready? I'm wondering if there are people out there with experience of WPF application development - and maybe more interesting - running WPF in production.
Is it mature enough to use in larger projects? What are the obvious pitfalls? Any best practices? (Databinding in WPF seems pretty nifty but do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433630",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How can I select rows that are null using bound queries in Perl's DBI? I want to be able to pass something into an SQL query to determine if I want to select only the ones where a certain column is null. If I was just building a query string instead of using bound variables, I'd do something like:
if ($search_undel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433632",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Objects and error handling in PHP What's the best practice to handle errors if using objects?
A) Before the method of object is called and not even getting to execute method if there's some error, or
B) Just pass parameters and perform error checking in method itself, returning error code or something.
Please pick y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433643",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why would subversion timeout when I try to commit changes to a directory? When attempting to commit file in the jsunit directory in my working-copy, I waited a really long time and got an error like:
svn: OPTIONS request failed on '/svn_repo/OSB_Project/trunk/OSB/test/web/jsunit'
svn: timed out waiting for server
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Scalability and Performance of Web Applications, Approaches? What various methods and technologies have you used to successfully address scalability and performance concerns of a website? I am an ASP.NET web developer exploring .NET remoting with WCF with SQL clustering and am curious as to what other approaches ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433647",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to set the RadioButton icon style to nothing in CSS (in Flex 3)? You can skin a RadioButton in Flex by setting the following values in CSS:
upSkin: Embed(...);
overSkin: Embed(...);
ownSkin: Embed(...);
disabledSkin: Embed(...);
selectedUpSkin: Embed(...);
selectedOverSkin: Embed(...);
selectedDownSkin: Embed(.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433654",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is late binding consistent with the philosophy of "readibility counts"? I am sorry all - I am not here to blame Python. This is just a reflection on whether what I believe is right. Being a Python devotee for two years, I have been writing only small apps and singing Python's praises wherever I go. I recently had th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I create an alias for a generic class in C#? How can I do the following in C#? What is the right way to write the first line of this code snippet?
using KVP<K, V> = System.Collections.Generic.KeyValuePair<K, V>;
class C { KVP<int, string> x; }
A: You can't, basically. You can only use fixed aliases, such ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433668",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Analyse python list with algorithm for counting occurences over date ranges The following shows the structure of some data I have (format: a list of lists)
data =
[
[1,2008-12-01],
[1,2008-12-01],
[2,2008-12-01]
... (the lists continue)
]
The dates range from 2008-12-01 to 2008-12-25.
The first field iden... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433669",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Where do you download Linux source code? Say I'm interested in the source for one particular Linux utility, like factor. Where can I find the source code for that utility?
A: To find the package a binary comes from, in rpm based system, you might type:
$ rpm -qf /usr/bin/factor
which will print the package name.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433670",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Modifying setter argument - is it hack or not? Is it normal to modify setter arguments? Let's imagine that we have setString method. And we really want to keep a trimmed form of the string. So a string with trailing spaces is invalid, but we don't want to throw an exception.
What's the best solution? To trim the val... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433678",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to convert struct to char array in C I'm trying to convert a struct to a char array to send over the network. However, I get some weird output from the char array when I do.
#include <stdio.h>
struct x
{
int x;
} __attribute__((packed));
int main()
{
struct x a;
a.x=127;
char *b = (char *)&a;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433682",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Converting Oracle Forms 10 to Java There are a number of commercial products available:
*
*Exodus
*Evo
Also Oracle Application Express (APEX) is releasing a Forms Converter in Oracle Application Express 3.2 (which is now in beta).
*
*Has anyone used any of these tools?
*How much of the process do they automa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Segfault from adding a variable I'm admittedly a straight-C newbie, but this has got me stumped. I'm working on a linked list implementation for practice, and I'm getting a segfault by simply adding a variable to the split_node function:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct Node {
s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how to restrict or filter database access according to application user attributes I've thought about this too much now with no obviously correct solution. It might be a real wood-for-the-trees situation, so I need stackoverflow's help.
I'm trying to enforce database filtering on a regional basis. My system has va... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433707",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Reading files in C#, differences in methods Studying C#, my books are showing me classes for readin files. I've found 2 that are very similar and the Visual Studio debugger doesn't show an obvious difference between the two.
code:
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
FileStream fs... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433711",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: FTP not uploading last 4 bytes I have a bash script to upload some files to my webserver. The problem is that it seems to assume that when they get to the webserver they are missing the final 4kb of the file.
On my computer the file is listed as 8kb (rounded up because blocks are 4kb) yet only 4kb are uploaded.
Here... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to export a DB2 database without a DB2 server I have a db2 database file, but do not have a db2 server. I would like to export this data into something else (e.g. SQL, but it doesn't really matter what), without having to setup a full db2 server (I started looking into this, but it seems very involved).
Ideally... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I run Rails integration tests without dropping DB contents? I've written some integration tests that I'd like to run against a copy of my prod database before I push to production. This lets me test all of my routes are still correct, all of the pages render without errors and some of the multipage workflows ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433724",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Free C# Grid/Graph component Can anyone recommend a free grid/graphing component for C#/.NET? I'm having a look at NPlot right now, but so far I'm finding it quite troublesome.
EDIT: I particularly need something that plugs into Windows Forms - I'm not doing ASP.NET, and don't really fancy reproducing my graph usin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Displaying Powerpoint slides on second monitor non-sequentially using VBScript If a Powerpoint presentation is not currently displayed - how can I display (for example) slide 7 of 10 on the secondary monitor, using vbscript?
A: Interesting.
There's some clues on Hey, Scripting Guy. Using TLViewer you can see the r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433735",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PostgreSQL Long VACUUM I am currently cleaning up a table with 2 indexes and 250 million active rows and approximately as many dead rows (or more). I issued the command VACCUM FULL ANALYSE from my client computer (laptop) to my server. It has been going about its business for the last 3-4 days or so; I am wondering ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433737",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: SQL Server Management Studio as Application Platform Could the SQL Server IDE ever become an application development platform for enterprise applications? In a similar way to the old xBase applications, but, you know, better?
The main reason is that the Management Studio is one of the best “data centric” application... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433738",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Dynamically create text inputs (ASP.net/C#) I have an input field on my page where the user will type in the number of text inputs they want to create. The action for the button is:
int num_flds = int.Parse(a_fld.Text);
for (int i = 0; i < num_flds; i++)
{
TextBox tmp = new TextBox();
tmp.ID = "answer_box" +... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433743",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I determine if a Perl function exists at runtime? I'm working on a test framework in Perl. As part of the tests, I may need to add precondition or postcondition checks for any given test, but not necessarily for all of them. What I've got so far is something like:
eval "&verify_precondition_TEST$n";
print $@... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433752",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: How do you implement context menu in a ListActivity on Android? How do you implement a context menu triggered by a long click or tap on a ListActivity that is using the built in layouts and a ListAdapter?
A: On the onCreate method call registerForContextMenu like this:
registerForContextMenu(getListView());
and th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "39"
} |
Q: How to convert DotnetNuke Modules created in 4.x to version 5.x I have around ~40 custom modules and a custom skin on a DotNetNuke site that I have created. I tried updating it to 5.0 and got a few exceptions.
I want to see what the effort would be to convert a bunch of modules and a skin to work in DotNetNuke 5.0.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433764",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: webjure vs compojure? I've heard of two Clojure based web application frameworks: Webjure and Compojure. Can someone let me know which is better?
A: Now you can add Ring to the list. All of these frameworks are very new and likely to evolve (or die) quickly, but Compojure does seem to be the most actively develope... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433767",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: How to get a beautiful color scale on (semi-)logarithmic 3d plots on Matlab? After having this question answered through a link to an external site, I realized that I solved a problem, just to get another one: On a logarithm scale the C=Z parameter of MESH and SURF functions don't work very well. All you get is a bl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Port of current call in Remoting There can be several instances of my service on the same computer, each of them on a different port.
How can I retrieve the port number from which the current request came through to differentiate them?
To clarify, if client is calling the following method:
class OrdersService : Mars... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433771",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Does PHP Have an Equivalent of Java's RequestDispatcher.forward? In Java I can write a really basic JSP index.jsp like so:
<% request.getRequestDispatcher("/home.action").forward(request, response); %>
The effect of this is that a user requesting index.jsp (or just the containing directory assuming index.jsp is a de... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Merging MbUnit and NUnit tests and displaying in CruiseControl We have a CruiseControl server running various AntUnit, MbUnit and NUnit tests via Ant.
In order to merge the outputs from them all we have the following in the CruiseControl config:
<log dir="logs/${project.name}/">
<merge dir="${q7.build.tests.dir}/r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Shorthand adding/appending in Python I like that in PHP I can do the following
$myInteger++;
$myString += 'more text';
With Python I must do the following
myInteger = myInteger + 1
myString = myString + "more text"
Is there a better way to add or append to a variable in Python?
A: Python doesn't have the incremen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Is there a good way of getting MethodInfo of open generic method? Consider type like this one
public interface IHaveGenericMethod
{
T1 Method<T1>(T1 parm);
T2 Method<T1,T2>(T1 parm);
int Method2(int parm);
}
How do I get a methodInfo for its methods?
for a regular non-generic method, like method2, I can go... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433798",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Getting my head around jQuery OK, I'm designing a site and thought I'd stick some jQuery in as I really need so js experience.
Page with my problem is here: http://new.focalpix.co.uk/moreinfo.php
JS in question is:
$(document).ready(function(){
$(".answer").css("display","none");
$("#maincontent a.animate"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433802",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Does the .NET framework provide any built in classes for performing geometric calculations? What does the .NET framework provide, if anything, in the way of classes for performing geometric calculations? For example, calculating the distance between two points (represented as (x,y)) or solving a right triangle's unk... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Table Module vs. Domain Model I asked about Choosing a method to store user profiles the other day and received an interesting response from David Thomas Garcia suggesting I use the Table Module design pattern. It looks like this is probably the direction I want to take. Everything I've turned up with Google seems t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433819",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: Help me understand FFT function (Matlab) 1) Besides the negative frequencies, which is the minimum frequency provided by the FFT function? Is it zero?
2) If it is zero how do we plot zero on a logarithmic scale?
3) The result is always symmetrical? Or it just appears to be symmetrical?
4) If I use abs(fft(y)) to com... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433831",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: MXML without Flex Framework/Components The Flex compiler can compile "pure AS3" SWF files that don't contain any Flex Component bytecode. So,
Would it be possible to create a custom component framework (used in place of the Flex Framework), that can still be visually laid out using MXML (read: markup), and compiled ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/433832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.