text string | meta dict |
|---|---|
Q: What is the easiest way to align the Z axis with a vector? Given a point such as (0, 0, 0) and a vector like (x, y, z). What is the easiest way to align the negative Z-axis centered at (0, 0, 0) to point in the direction of this vector? Examples using OpenGL would be welcome, but not neccessary.
A: There's lots of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193918",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What are good rules of thumb for Python imports? I am a little confused by the multitude of ways in which you can import modules in Python.
import X
import X as Y
from A import B
I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "74"
} |
Q: Call and Callvirt What is the difference between the CIL instructions "Call" and "Callvirt"?
A: According to MSDN:
Call:
The call instruction calls the method indicated by the method descriptor passed with the instruction. The method descriptor is a metadata token that indicates the method to call...The metadata to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193939",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: Flexibility in the project scope? How flexible should a programmer be if a client requests requirements that is not in the project scope?
A: General perspective:
You need to earn a living; the client needs a computing solution: the client has the right to make sure that the solution you will supply fits his needs. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193940",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: When is a new language the right tool for the job? For a long time I've been trying different languages to find the feature-set I want and I've not been able to find it. I have languages that fit decently for various projects of mine, but I've come up with an intersection of these languages that will allow me to do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193941",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Are there any good open source BDD tools for C/C++? I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++?
A: The original link (CppSpec) is dead, but it is still accessible at the Internet Archive at CppSpec.
And as @VickyChijwani already mentioned, there's a copy of the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193965",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: How to correctly name a variable which represents a value of 1 - n? It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context.
I've often seen:
float k = someValue;
float oneMinusK = 1 - ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193973",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using function prototypes dynamically in PHP I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this:
// The definition of what to call
$function_call_spec = array( "prototype" => "myFunction",
"parameters" => array( "first_par" =>... | {
"language": "en",
"url": "https://stackoverflow.com/questions/193994",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Anti virus integration with .net application I would like to use anti virus integration with my .net application when uploading files using the application. Has any anti virus API available for .Net?
A: Why not install the antivirus software on the receiving server? That way you could keep the definitions updated,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Users Authentication in ASP.NET I was wondering, what's the best approach in creating users authentication for my asp.net-mvc web application.
Should I use the Forms authentication using a custom MembershipProvider ?
Or should I implement my own login and registration mechanism for my users?
A: Seems silly to rein... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194015",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is the best way to implement a petition? (email send after signing the petition) I need to build a little webapp but I'm not sure what is the best thing to do.
A person that subscribe the petition is signing an email sent to X. This will be also saved to a db in order to show online who subscribed.
The idea is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194032",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is it possible to download the VS2008 "Test Project" template? For some reason, my visual studio 2008 installation doesn't have the "Create Test Project" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak)
Does anyone kno... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194035",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Unicode issues with acts_as_taggable_on_steroids I'm implementing a blog with tags with some French characters. My question has to do with how to deal with spaces and unicode (utf-8) characters in the url.
let's say I have a tag called: ohlàlà! and I have the following code in my tag cloud:
<%= link_to h(tag.name.ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194051",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you remove obsolete publications in the Replication Monitor? Through some bungling in creating and removing publications, I was left with a lot of obsolete publications which for some reason still remains in the Replication Monitor.
How do you remove these publications? It doesn't seem to have a clear way t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Records not replicated when inserted by custom replication stored procedure I've just recently setup a custom replication for my subscriber database, as described in another post here. Basically, when the publisher pushes a new record to the subscribers, the stored procedure will also insert a replicated time into a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ArrayIndexOutOfBoundsException in XMLEntityScanner.peekChar reading XML from HttpRequest I'm reading XML data from the HttpServletRequest in my servlets doPost() and passing the Reader from req.getReader() to a JAXB unmarshaller. I've tried a couple of different input XMLs but I always get this exception.
SEVERE: S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194086",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to check if a number is an integer in .NET? Say I've got a string which contains a number. I want to check if this number is an integer.
Examples
IsInteger("sss") => false
IsInteger("123") => true
IsInterger("123.45") =>false
A: There are two immediate options that you can use.
Option 1 - preferred - use In... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Model - View - Presenter with Virtual Grid What is the best breakdown of responsibility when using a virtual grid and the MVP pattern in a winforms application.
including:
*
*Getting callbacks from the grid on user changed cell updates
*Callback from the grid to set the style and value of a cell given a row and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194094",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the best way to track changes in a form via javascript? I'd like to track changes in inputs in a form via javascript. My intent is (but not limited) to
*
*enable "save" button only when something has changed
*alert if the user wants to close the page and something is not saved
Ideas?
A: Try
function i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194101",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: Retrieve calling url in Java Webservice We have a web service that is deployed on 2 separate machines in different locations. Is it possible to monitor the url that a person used to call our webservice using java code? We have a 3DNS url set up and we want all clients to use this url as oppossed hitting the boxes di... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194102",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I know if a system has powered on? I am writing a script that powers on a system via network. And then i need to run a few commands on the other host. How do I know whether the system has powered on?
My programming language is Perl and the target host is RHEL5.
Is there any kernel interrupt or network boot i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194104",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to deprecate a function in PHP? At the team with which I work, we have an old codebase using PHP's ibase_* functions all over the code to communicate with database. We created a wrapper to it that would do something else beside just calling the original function and I did a mass search-replace in the entire code... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194121",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: Is Ant still the best choice for a Java build tool? From my small amount of experience, I've only used Ant as a build tool. Are there any other projects which are better, and why?
A: in the enterprise, ant is still the entrenches player. dependencies don't change fast. unlike open source projects that keep moving t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: C# how can you get output of an other batch file? I have to use an other application (console) to pass some parameter to this program and inside my C# program get the output of that program. I would like not to see the console (all invisible to the user). How can I do that?
A: Process myProcess = new Process();
Pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Win32 WM_SETCURSOR, WM_MOUSEMOVE always in pair? I'm working on a Win32 control. There could be hundreds of "items" on this control. Those are not windows, but internal objects (eg: rectangles). Depending on the mouse position I want to change the mouse cursor. That is fine, I can use WM_SETCURSOR.
At the same time ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194133",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Are there good reasons not to use an ORM? During my apprenticeship, I have used NHibernate for some smaller projects which I mostly coded and designed on my own. Now, before starting some bigger project, the discussion arose how to design data access and whether or not to use an ORM layer. As I am still in my appren... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194147",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "117"
} |
Q: Check if SoundChannel is playing sound How to check reliably if a SoundChannel is still playing a sound?
For example,
[Embed(source="song.mp3")]
var Song: Class;
var s: Song = new Song();
var ch: SoundChannel = s.play();
// how to check if ch is playing?
A: I know this is really old but i found this link that i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194150",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: HCI: UI beyond the WIMP Paradigm With the popularity of the Apple iPhone, the potential of the Microsoft Surface, and the sheer fluidity and innovation of the interfaces pioneered by Jeff Han of Perceptive Pixel ...
What are good examples of Graphical User Interfaces which have evolved beyond the
Windows, Icons, ( M... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194156",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: C# - How to get Program Files (x86) on Windows 64 bit I'm using:
FileInfo(
System.Environment.GetFolderPath(
System.Environment.SpecialFolder.ProgramFiles)
+ @"\MyInstalledApp"
In order to determine if a program is detected on a users machine (it's not ideal, but the program I'm looking for is a ri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194157",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "154"
} |
Q: How do I change java logging console output from std err to std out? I'm using the standard ConsoleHandler from java.util.logging and by default the console output is directed to the error stream (i.e. System.err).
How do I change the console output to the output stream (i.e. System.out)?
A: I had a similar problem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194165",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: How to push pixels faster on the iPhone? I asked before about pixel-pushing, and have now managed to get far enough to get noise to show up on the screen. Here's how I init:
CGDataProviderRef provider;
bitmap = malloc(320*480*4);
provider = CGDataProviderCreateWithData(NULL, bitmap, 320*480*4, NULL);
CGColorSpaceRef... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I get notified when the user finishes editing a cell in an NSTableView? I need to know when the user finishes editing a cell in an NSTableView. The table contains all of the user's calendars (obtained from the CalCalendarStore), so in order for the user's changes to be saved I need to inform the CalCalendarS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194192",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Application design for processing data prior to database I have a large collection of data in an excel file (and csv files). The data needs to be placed into a database (mysql). However, before it goes into the database it needs to be processed..for example if columns 1 is less than column 3 add 4 to column 2. There... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194194",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Which is "better": COM DLL or Standard DLL with a Typelib? I put "better" in quotes because it's a qualitative question. I've been writing COM DLLs for a couple of years now and have only recently come upon, and successfully used, the standard DLL with Typelib concept.
Are there any compelling reasons to use COM DL... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Passing data between business layer and data access layer - bad code? I'm using the following code within the JCProperty class to retrieve data from a DAL:
Dim x As JCProperty
x = JCPropertyDB.GetProperty(PropertyID)
If Not x Is Nothing Then
Me.PropertyID = x.PropertyID
Me.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194208",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Database and version control system I'm work on project with django framework and use control version system to synchronize my code with other peoples. But i don't know how organize work with database.
In django, any people, worked on project, may changes django models, and tell 'syncdb' to synchronize model objects... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194213",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What's the right tier to obtain directory attributes for display? I have an intranet application that needs contact information for various locations on our campus that are served by our IT lab support organization. We have an enterprise directory that contains contact information so I'm not keeping the actual conta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194227",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Is there a key combination in Xcode to implement a Protocol? In Visual Studio if I define a class to implement an interface e.g.
class MyObject : ISerializable {}
I am able to right click on ISerializable, select "Implement Interface" from the context menu and see the appropriate methods appear in my class definiti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: How do I create a string from one row of a two dimensional rectangular character array in C#? I have a 2 dimensional array, like so:
char[,] str = new char[2,50];
Now, after I've stored contents in both str[0] and str[1], how do I store it in a
string[] s = new string[2];
?
I tried
s[0] = str[0].ToString();
but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194247",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: RAII in Java... is resource disposal always so ugly? I just played with Java file system API, and came down with the following function, used to copy binary files. The original source came from the Web, but I added try/catch/finally clauses to be sure that, should something wrong happen, the Buffer Streams would be ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194261",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: What is the best way to mix VB.NET's Option Strict and the new Option Infer directives? In a related question, my team is about to (hopefully) start using LINQ, and I'd like to take advantage of anonymous types. What is the best way to mix VB.NET's Option Strict (which we've been using through the life of the projec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194278",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Recommended data format for describing the rules of chess I'm going to be writing a chess server and one or more clients for chess and I want to describe the rules of chess (e.g. allowable moves based on game state, rules for when a game is complete) in a programming language independant way. This is a bit tricky si... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194289",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Logging, when and what? I am currently working on a rather large multi tiered app that will be deployed overseas. Although I hope it won't fall over or blow up once depolyed I can't be 100% sure of this. Therefore it would be nice to know that I could request the log file, to work out exactly what went wrong and w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194299",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What's the best way to write [0..100] in C#? I'm trying to think of clever, clear, and simple ways to write code that describes the sequence of integers in a given range.
Here's an example:
IEnumerable<int> EnumerateIntegerRange(int from, int to)
{
for (int i = from; i <= to; i++)
{
yield return i;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194304",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: iPhone to iPhone communication I'm kind of curious how I should approach a problem with iPhones and communication between two phones.
I have an idea for an application that needs to send data between two known phones. The problem is that the data could be very small or very large. I want to have intermediate storage... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194327",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to do memory profiling on remote java web application I know we can use tools like JProfiler etc.
Is there any tutorial on how to configure it to display the memory usage just by remote monitoring?
Any idea?
A: you have VisualGC, it's not very advanced but you can see the memory usage of your application (garba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194328",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Adding a method to a domain class I have a domain class containing a couple of fields. I can access them from my .gsps. I want to add a method to the domain class, which I can call from the .gsps (this method is a kind of virtual field; it's data is not coming directly from the database).
How do I add the method and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194331",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Python Code Organization Question : Eggs + Packages + Buildout + Unit Tests + SVN I have several python projects that share common modules. Until now, I've been ... ahem ... keeping multiple copies of the common code and synchronizing by hand. But I'd clearly prefer to do something else.
It looks to me now, as if zc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194339",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Can't access MySQL server, don't know the password of a root account For some reason beyond me I can't access the mysql server on a machine. I'm looking at an untouched MT (dv) server with CentOS 5. Any ideas on how to get the root going?
A: Start (first stop the running one) your MySQL in safemode with skiped gran... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Force iframe to Load Full Frame I have an HTML page (say welcome.html) which contains an iframe to a page I have no control over (say app.html). The user performs some actions using the app within the iframe and clicks submit. Once they do this, they are taken to a new page (say thanks.jsp), which loads within the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194346",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the proper way to store app's conf data in Java? Where do you store user-specific and machine-specific runtime configuration data for J2SE application?
(For example, C:\Users\USERNAME\AppData\Roaming</em> on Windows and /home/username on Unix)
How do you get these locations in the filesystem in platform-inde... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194349",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Oracle recommendations for high volume writes and low volume read Is there some general guidelines online on how to tweak oracle for doing a high number of inserts and low number of reads?
All the answers below are pretty good recommendations. I have to clarify the following things. I am using 10g and this is an abs... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Unmanaged C++ encrypted string into C# byte[] I have an unmanaged C dll I call from a C# class library that encrypts a string value into an encrypted string that contains non-ascii characters. I need to take the data and write its binary values to a file, but C# treats text as string rather than a byte[].
The encr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194358",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What are some recommended plugins for Trac? In particular, I need a more full fledged version of Trac to support robust project management, and task tracking. I went through the plugins and literally found over 50 that looked promising.
My question is to the admins/users of Trac: which ones are indespensible for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194361",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: what is the difference between using the visitor pattern and an interface? What is the difference between applying the visitor design pattern to your code and the following approach:
interface Dointerface {
public void perform(Object o);
}
public class T {
private Dointerface d;
private String s;
p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194382",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What are the best practices in creating a data access layer for an object that has a reference to another object? (sorry for my English)
For example, in my DAL,I have an AuthorDB object, that has a Name
and a BookDB object, that has a Title and an IdAuthor.
Now, if I want to show all the books with their correspon... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194384",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to determine MS Access field size via OleDb The existing application is in C#. During startup the application calls a virtual method to make changes to the database (for example a new revision may need to calculate a new field or something). An open OleDb connection is passed into the method.
I need to change a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I discover what is in the permanent generation Given a heapdump or a running VM, how do I discover what the contents of the permanent generation is ? I know about 'jmap -permstat' but that's not available on Windows.
A: The permanent generation contains the class object.
So you should check the heap dump or... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194395",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How can I obfuscate (protect) JavaScript? I want to make a JavaScript application that's not open source, and thus I wish to learn how to can obfuscate my JS code? Is this possible?
A: I would suggest first minify with something like YUI Compressor, and then convert all string and numbers to HEX Values using someth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194397",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "745"
} |
Q: Resources for Windows developer to switch to Linux I'm looking for some help and it goes like this:
I'm a fairly green software developer, and focus mainly on the web (python/PHP) but am pretty well experienced with Java applications and as an electrical engineering student, looking forward to dive into some c/c++. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194418",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to release the memory that has been used for a variable in C? How can i release the memory that I used for a variable (e.g. a long string) in C?
A: This question really cannot be answered without more information. The only way to know how to free an object (or even know whether or not it should be freed) is to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194428",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I properly store and retrieve internationalized Strings in properties files? I'm experimenting with internationalization by making a Hello World program that uses properties files + ResourceBundle to get different strings.
Specifically, I have a file "messages_en_US.properties" that stores "hello.world=Hello ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194430",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do you run a console application in the Visual Studio output window, instead of opening a new command prompt? I'm developing a simple console application in Visual Studio 2008 and want to run it in the output window inside Visual Studio 2008, instead of having a separate command prompt window come up. Is there a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How to send xml to asp page using webrequest from asp.net? I want to post an xml document to an asp page from an asp.net page. If I use WebRequest with content/type text/xml the document never gets to the asp page. How can I do this ?
A: Here is a sample without any error handling (do it yourself :) ):
HttpWebReque... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194443",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Multi-segmented PalmOS app/library in "background" the question I am having is: when running my app with a launch code other than sysAppLaunchCmdNormalLaunch, I can not use code outside the default code segment - but could I use a shared library that is multi-segmented, thus circumventing this problem?
A bit of back... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: "suggest" feature for textboxes in a rails app I'm looking for an easiest way how to implement the "suggest" feature for a text entry field in a Rails application. The idea is to complete names stored in a database column, giving the user a drop-down menu of possible matches as he types.
Thanks for any suggestions!
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194450",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to parse a .xfa file Hoping that someone has some info on how to parse a xfa file. I can parse csv or xml files just fine, but an xfa one has come along and I'm not familar with the format. Looks like tab delimited body with column metadata at the top.
Anyone dealt with these before or can give me a steer on how... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194460",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Have you ever crashed the compiler? Everyone (at least everyone who uses a compiled language) has faced compilation errors but how many times do you get to actually crash the compiler?
I've had my fair share of "internal compiler errors" but most went away just by re-compiling. Do you have a (minimal) piece of code... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194464",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: How to parse a string to an int in C++? What's the C++ way of parsing a string (given as char *) into an int? Robust and clear error handling is a plus (instead of returning zero).
A: You can use stringstream's
int str2int (const string &str) {
stringstream ss(str);
int num;
ss >> num;
return num;
}
A: I ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194465",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "286"
} |
Q: How do I get a list of local Windows users who are logged in? I'm trying to write a faster user switching app for Windows. Win+L and selecting users is very cumbersome. If I start Task Manager as administrator, it shows active users and I can select one and "Connect" (if I enter their password).
How do I get the lis... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194468",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What's the strangest corner case you've seen in C# or .NET? I collect a few corner cases and brain teasers and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core .NET things interesting too. For example, here's one which isn't on the page, but which I find inc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194484",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "322"
} |
Q: How do I create a dynamic library (dylib) with Xcode? I'm building few command-line utilities in Xcode (plain C, no Cocoa). I want all of them to use my customized version of libpng, and I want to save space by sharing one copy of the library among all executables (I don't mind re-distributing .dylib with them).
Do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194485",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Accessing protected members from subclasses: gcc vs msvc In visual C++, I can do things like this:
template <class T>
class A{
protected:
T i;
};
template <class T>
class B : public A<T>{
T geti() {return i;}
};
If I try to compile this in g++, I get an error. I have to do this:
template <class T>
class B... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194492",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Static factory methods vs Instance (normal) constructors? In a language where both are available, would you prefer to see an instance constructor or a static method that returns an instance?
For example, if you're creating a String from a char[]:
*
*String.FromCharacters(chars);
*new String(chars);
A: There's a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194496",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "57"
} |
Q: How to paralleize search for a string in a file with a help of fork? (GNU Linux/g++) I got a text file with a couple of lines and I am looking for a string in this file. I need to pass following command line parameters to the program:
- file path
- the string I am looking for
- maximum number of processes the progr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194499",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the best way to discover an existing project? recently I was given the task to discover a C# solution I have never seen before, and give suggestions on refactoring it. I think I will use NDepend (for the first time ever) to see the overall picture, and also to check a lot of code metrics to figure out what c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194516",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Creating standalone Lua executables Is there an easy way to create standalone .exe files from Lua scripts? Basically this would involve linking the Lua interpreter and the scripts.
I believe it is possible (PLT Scheme allows the creation of standalone executables in the same way), but how, exactly?
A: Besides the a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194520",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "41"
} |
Q: Multiple deletions using LINQ (more specifically Linq2Nhibernate, but...) Is there any smart way to do this?
If using Linq2Nhibernate, you really seem to have to rely on HQL or the likes to do multiple deletes from a database (without loading up and deleting one by one)?
It doesn't seem like Linq2Sql have it either... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194521",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: UDP and my computer? I recently turned on Windows Firewall logging on my computer and started tracking incoming and outgoing connections. Something curious about the logfiles is that I have noticed numerous UDP packets (in fact, it constitutes basically all of my incoming traffic) that don't have my host as destinat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194526",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: LINQ asp.net page against MS Access . I have a ASP.Net page using ADO to query MS access database and as a learning exercise i would like to incorporate LINQ. I have one simple table called Quotes.
The fields are: QuoteID, QuoteDescription, QuoteAuthor, QuoteDate. I would like to run simple queries like, "Give me... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194528",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Using Dependency Injection frameworks for classes with many dependencies I have been looking at various dependency injection frameworks for .NET as I feel the project I am working on would greatly benefit from it. While I think I have a good grasp of the capabilities of these frameworks, I am still a little unclear ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194534",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Class member organization What is the best way to sort class members?
I'm in conflict with a team member about this. He suggests that we should sort the members alphabetically. I think it's better to organize in a semantic manner: important attributes first, related methods together, etc.
What do you think?
A: Grou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Anyone out there used vinpower? I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it.
A: First step would be to put the VinPOWER Jar file into your lib directory, then restart the server.(Or, you can put... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194565",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Inserting data in XML file with PHP DOM I was trying to insert new data into an existing XML file, but it's not working. Here's my xml file:
<list>
<activity>swimming</activity>
<activity>running</activity>
<list>
Now, my idea was making two files: an index page, where it displays what's on the file and pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194574",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Is transforming internal DSL to external DSL anti-pattern? In our legacy system, we wrote our own VM to execute our internal DSL at run time. The in-house VM was designed to run our internal DSL only. We are in the process of rewriting our legacy application. One of the idea we are considering is, to transform our i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194576",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to detect when a user has successfully finished downloading a file in php I've got a php page which handles requets for file downloads. I need to be able to detect when a file has been downloaded successfully. How can this be done? Perhaps there's some means of detecting this client-side then sending a confirmat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do you write good PHP code without the use of a framework? Other than standard OO concepts, what are some other strategies that allow for producing good, clean PHP code when a framework is not being used?
A: Really this question is quite language agnostic, as it applies to most languages where you choose to "ro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: control robot via internet i have robot and want to control it via internet using radio wave .. but still i dont know the best language to do that . with the need to build scure site to insure not any body can use it . i expect for site asp with c# but what is the language i'll need it to control from sender device ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How to tell if a .NET application was compiled in DEBUG or RELEASE mode? I have an application installed on my computer. How do I find out if it was compiled in DEBUG mode or not?
I've tried to use .NET Reflector, but it does not show anything specific. Here is what I see:
// Assembly APPLICATION_NAME, Version 8.0.0... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194616",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: Distinguishing between HFS+ and HFS Standard Volumes IOKit and the DiskArbitration framework can tell me a lot of things about mounted volumes on a mac, but they don't seem to be able to differentiate between HFS+ and HFS Standard volumes.
The IOKit/DA keys Content, DAVolumeKind and DAMediaContent are always Apple_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: string c_str() vs. data() I have read several places that the difference between c_str() and data() (in STL and other implementations) is that c_str() is always null terminated while data() is not.
As far as I have seen in actual implementations, they either do the same or data() calls c_str().
What am I missing her... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194634",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "140"
} |
Q: 2D Javascript array Simply put, is there a way to create a 2D javascript array using similar syntax to this?
var newArray = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8]
]
A: Yes. This works fine:
<script>
var newArray = [
[0, 1, 2],
[3, 4, 5],
[6, 7, 8]
]
alert(newArray[0][2]);
</script>
A: Tested a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194650",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: SQL Server Regular expressions in T-SQL Is there any regular expression library written in T-SQL (no CLR, no extended SP, pure T-SQL) for SQL Server, and that should work with shared hosting?
Edit:
*
*Thanks, I know about PATINDEX, LIKE, xp_ sps and CLR solutions
*I also know it is not the best place for regex, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "138"
} |
Q: I need my scaled image to be aliased in C# This might be an odd question, but when I scale my image in C# I need it to be pixelated and not anti-aliased. Just like in MSpaint when you scale.
I hope images anti-alias by default in C#, or else I changed something I didn't want to.
I've tried playing around with the Gr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194659",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Resolving Component libs with Flex SDK mxmlc I'm new to Flex SDK and trying to implement a simple project using Doug Mccune's CoverFlow widget. Most of the documentation out there on how to do this assumes that one is using Adobe's FlexBuilder product, which is a $250 Eclipse plug-in that I'd rather avoid buying. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194663",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Is there a way to suppress warnings in Xcode? Is there a way to suppress warnings in Xcode?
For example I am calling an undocumented method and since the method is not in the header I get a warning on compile. I know I can add it to my header to stop the warning, but I am wondering if there is a way other than addin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194666",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "125"
} |
Q: How to cache images in memory on the web server for an ASP.NET MVC web app? I am working on a web application with many images, using ASP.NET MVC. I want to be able to cache the images in memory to improve the performance, but I would like to hear what is the best way to do this.
1) The images are accessible from U... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194674",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What language/platform would you recommend for CPU-bound application? I'm developing non-interactive cpu-bound application which does only computations, almost no IO. Currently it works too long and while I'm working on improving the algorithm, I also think if it can give any benefit to change language or platform. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194676",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to load a jar file at runtime I was asked to build a java system that will have the ability to load new code (expansions) while running.
How do I re-load a jar file while my code is running? or how do I load a new jar?
Obviously, since constant up-time is important, I'd like to add the ability to re-load existi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194698",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "75"
} |
Q: How to automatically register an HttpHandler required by a web server control? In ASP.NET, when building a web server control in a class library that includes an HttpHandler is there a way to automatically register the handler without having to manually edit the web application's web.config file?
I have a class libr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/194721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |