text stringlengths 8 267k | meta dict |
|---|---|
Q: Why @OneToMany does not work with inheritance in Hibernate @Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class Problem {
@ManyToOne
private Person person;
}
@Entity
@DiscriminatorValue("UP")
public class UglyProblem extends Problem {}
@Entity
public class Person {
@OneToMany(mapp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38057",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Generics in Java Is there any shorthand way of defining and using generic definitions without having to keep repeating a particular generic description such that if there is a change I don't have to change all definitions/usages though out the codebase for example is something like this possible:
Typedef myGenDef = ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38068",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Best way to handle LOBs in Oracle distributed databases If you create an Oracle dblink you cannot directly access LOB columns in the target tables.
For instance, you create a dblink with:
create database link TEST_LINK
connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID';
After this you can do stuff ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38074",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How to implement mouse dragging in Visual Basic? I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement ou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38081",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to prevent Write Ahead Logging on just one table in PostgreSQL? I am considering log-shipping of Write Ahead Logs (WAL) in PostgreSQL to create a warm-standby database. However I have one table in the database that receives a huge amount of INSERT/DELETEs each day, but which I don't care about protecting the dat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38090",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Cross Page Postback doesn't work for client-side enabled button I am using a cross page postback for Page A to pass data to Page B.
The button that causes the postback has its postbackurl set but is disabled until the user selects a value from a DDL at which point the button is enable using javascript. However this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38107",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Inbox Management (in Outlook) I've gone back and forth between having an organized inbox and having an inbox with absolutely everything I've received in it.
Would you recommend leaving everything in an inbox, or organize it? If you organize it, is there any method to your madness or possibly an Outlook (2003) plu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38117",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Strategies for keeping a Lucene Index up to date with domain model changes Was looking to get peoples thoughts on keeping a Lucene index up to date as changes are made to the domain model objects of an application.
The application in question is a Java/J2EE based web app that uses Hibernate. The way I currently h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: after opening target in new window - new window cannot be closed I've got a page with an control - the link is to a gif file. Right clicking on the link (in IE7) and selecting "open target in new window" correctly displays the image. However I can't then close the new IE window.
MORE INFO: Works OK in Firefox 3
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38151",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is a good maintainability index using Visual Studio 2008 code analysis? My company recently purchased TFS and I have started looking into the code analysis tools to help drive up code quality and noticed a good looking metric "maintainability index". Is anyone using this metric for code reviews/checkins/etc? ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38158",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Parallelize Bash script with maximum number of processes Lets say I have a loop in Bash:
for foo in `some-command`
do
do-something $foo
done
do-something is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 do-something's at once.
The naive approach seems to be:
for foo in `s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "98"
} |
Q: When should I mock? I have a basic understanding of mock and fake objects, but I'm not sure I have a feeling about when/where to use mocking - especially as it would apply to this scenario here.
A: Rule of thumb:
If the function you are testing needs a complicated object as a parameter, and it would be a pain to si... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38181",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "179"
} |
Q: Any data-driven open source JEE5 EJB3+JSF Sample Project out there? I am looking for an open source project that uses EJB3 as backend and JSF as frontend. It should not be a tutorial but a real application that real people are using.
The application should be data-driven, i.e. the following aspects are fundamental a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38183",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I read a disk directly with .NET? Is it possible to read a disk directly with .NET? By directly, I mean via the device bypassing the file system. I think I would go about this by opening the device some way "\Device\Ide\IdeDeviceP2T0L0-1" for example.
If I can't open the device with a .NET API, knowing whic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38190",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Determine if a ruby script is already running Is there an easy way to tell if a ruby script is already running and then handle it appropriately? For example: I have a script called really_long_script.rb. I have it cronned to run every 5 minutes. When it runs, I want to see if the previous run is still running an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38193",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Why is the subprocess.Popen class not named Subprocess? The primary class in the subprocess module is name Popen, and represents a subprocess. Popen sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38197",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Why does this C code produce a double instead of a float? celsius = (5.0/9.0) * (fahr-32.0);
Is it just a development choice that the C developers decided upon or is there a reason to this? I believe a float is smaller than a double, so it might be to prevent overflows caused by not knowing what decimal format to us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: IronRuby performance? While I know IronRuby isn't quite ready for the world to use it, I was wondering if anyone here tried it and tested how well it faired against the other Rubies out there in terms of raw performance?
If so, what are the results, and how did you go about measuring the performance (which benchmark... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38235",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the purpose of class methods? I'm teaching myself Python and my most recent lesson was that Python is not Java, and so I've just spent a while turning all my Class methods into functions.
I now realise that I don't need to use Class methods for what I would done with static methods in Java, but now I'm not s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38238",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "288"
} |
Q: Practices for programming in a scientific environment? Background
Last year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38239",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "92"
} |
Q: Best browser for web application I am in a position where I can choose the client browser for my web app. The app is being used internally, and we are installing each client "manually".I would like to find a better solution for the browser,so :
What is a good browser that I can use as a client to a web application?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38280",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I add a user in Ubuntu? Specifically, what commands do I run from the terminal?
A: Here's the command I almost always use (adding user kevin):
useradd -d /home/kevin -s /bin/bash -m kevin
A: There's basicly 2 commands to do this...
*
*useradd
*adduser (which is a frendlier front end to useradd)
You h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38288",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "66"
} |
Q: Apply an ICC Color Profile to an image in C# (Dotnet) How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a managed way to do this with GDI+?
I need to use GDI+, not WPF. I'd prefer to have a managed ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38295",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Tutorial on understanding strings in Symbian I have Carbide.c++ Developer from Nokia and I want to create applications for my S60 phone.
I've looked at the samples that goes with the different SDK's for S60 but I haven't found any simple explanation on how strings, called descriptors, are used in Symbian.
One of the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38299",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Pinning pointer arrays in memory I'm currently working on a ray-tracer in C# as a hobby project. I'm trying to achieve a decent rendering speed by implementing some tricks from a c++ implementation and have run into a spot of trouble.
The objects in the scenes which the ray-tracer renders are stored in a KdTree stru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38302",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I strip the fluff out of a third party library? It may not be best practice but are there ways of removing unsused classes from a third party's jar files. Something that looks at the way in which my classes are using the library and does some kind of coverage analysis, then spits out another jar with all of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38305",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there any way to draw an image to use 4 points rather than 3 (perspective warp) Drawing a parallelgram is nicely supported with Graphics.DrawImage:
Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height);
using (Graphics gr = new Graphics.FromImage(destImage))
{
Point[] destPts = new Point[] { new Poin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38308",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: VMware or Hyper-V for Developers I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38323",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: On the web, what fonts should I use to create an equivalent experience cross-platform? Because Linux (and its variants) have a completely different set of fonts than Windows and Mac OS X, is there anyone with any experience of creating cross-platform font families - ideally finding equivalents to the common fonts fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38336",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Is there an elegant zip to interleave two lists in Perl 5? I recently "needed" a zip function in Perl 5 (while I was thinking about How do I calculate relative time?), i.e. a function that takes two lists and "zips" them together to one list, interleaving the elements.
(Pseudo)example:
@a=(1, 2, 3);
@b=('apple', 'o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Finding all messages with a given PR_SEARCH_KEY I need to query an Exchange server to find all messages having a certain value in PR_SEARCH_KEY. Do I have to open every mailbox and iterate through it or is there a faster solution?
Edit: This is for a program that needs to prepend something to the subject line of all... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38348",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Address book DB schema I need to store contact information for users. I want to present this data on the page as an hCard and downloadable as a vCard. I'd also like to be able to search the database by phone number, email, etc.
What do you think is the best way to store this data? Since users could have multiple ad... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Error Code Reference for OSX/Cocoa If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?
A: The sections on 'Error Domains' and 'Error Codes' in Apple's Error Handling Programming Guide addre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38357",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Best version control system for managing home directories I have 3 Linux machines, and want some way to keep the dotfiles in their home directories in sync. Some files, like .vimrc, are the same across all 3 machines, and some are unique to each machine.
I've used SVN before, but all the buzz about DVCSs makes me th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38362",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: PHP : session variable aren't usable when site is redirected I've to admin a small website for my alumni group which is hosted by my ISV. The url is something like www.myIsv.com/myWebSite/ which is quite ugly and very forgetable. The main admin of the webserver has registered a domain name www.mysmallwebsite.com and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38370",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Clone a control in silverlight What's the best way to clone a control in Silverlight (including it's children)?
UPDATE
Is there a better way in Silverlight 2?
A: Here's a great thread about serializing and deserializing objects in Silverlight 1.1.
As for a "best way," I'd say it would definitely be caching the xa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38378",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I make flash cs3, actionscript send events to javascript? I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing.
What is the best way to do that in Flash CS3 using Actionscript 3.0 ?
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38408",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I convert a Ruby string with brackets to an array? I would like to convert the following string into an array/nested array:
str = "[[this, is],[a, nested],[array]]"
newarray = # this is what I need help with!
newarray.inspect # => [['this','is'],['a','nested'],['array']]
A: You could also treat it as al... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38409",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Security advice for jquery ajax data post? I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data.
My stack is PHP on Apache against a MySQL backend.
Advice greatly appreciated!
A: Use sessions to ens... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38421",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Tips for working in a large library? I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minut... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38427",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Positioning controls in the middle of a CheckBox THis is a followup to my previous question "Font-dependent control positioning." It's an attempt to solve the real problem behind that question, perhaps in ways different than the one I was asking about.
Example of the problem statement: I want a checkbox that says "A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38428",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: ASP.NET MVC - How do action names affect the url? Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach/understanding is wrong.
Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38431",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Retrieving an Oracle timestamp using Python's Win32 ODBC module Given an Oracle table created using the following:
CREATE TABLE Log(WhenAdded TIMESTAMP(6) WITH TIME ZONE);
Using the Python ODBC module from its Win32 extensions (from the win32all package), I tried the following:
import dbi, odbc
connection = odbc.o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38435",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to track data changes in a database table What is the best way to track changes in a database table?
Imagine you got an application in which users (in the context of the application not DB users ) are able to change data which are store in some database table. What's the best way to track a history of all change... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: Asynchronous Mysql connector Do any asynchronous connectors exist for Mysql that can be used within a C or C++ application? I'm looking for something that can be plugged into a reactor pattern written in Boost.Asio.
[Edit:] Running a synchronous connector in threads is not an option.
A: http://forums.mysql.com/read... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38447",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Is SOAP now a legacy technology? Are people still writing SOAP services or is it a technology that has passed its architectural shelf life? Are people returning to binary formats?
A: The alternative to SOAP is not binary formats.
I think you're seeing a surge in the desire to leave the complexities of WS-* behind ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38463",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Thread pool for executing arbitrary tasks with different priorities I'm trying to come up with a design for a thread pool with a lot of design requirements for my job. This is a real problem for working software, and it's a difficult task. I have a working implementation but I'd like to throw this out to SO and see... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38501",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: What's a good algorithm to generate a maze? Say you want a simple maze on an N by M grid, with one path through, and a good number of dead ends, but that looks "right" (i.e. like someone made it by hand without too many little tiny dead ends and all that). Is there a known way to do this?
A: It turns out there are ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38502",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "76"
} |
Q: What's the best way to return multiple values from a function? I have a function where I need to do something to a string. I need the function to return a boolean indicating whether or not the operation succeeded, and I also need to return the modified string.
In C#, I would use an out parameter for the string, b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38508",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "78"
} |
Q: C# WinForms - DataGridView/SQL Compact - Negative integer in primary key column I'm just getting dirty in WinForms, and I've discovered, through a lovely tutorial, the magic of dragging a database table onto the design view of my main form. So, all is lovely, I've got my DataGridView with all of the columns represen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38510",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Distributed caching with .NET 2.0+? What is the best approach to implement distributed caching with .NET?
Edit: I was looking for a general caching schema for internal and external applications
| {
"language": "en",
"url": "https://stackoverflow.com/questions/38548",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: What is the difference between "INNER JOIN" and "OUTER JOIN"? Also, how do LEFT OUTER JOIN, RIGHT OUTER JOIN, and FULL OUTER JOIN fit in?
A: The Venn diagrams don't really do it for me.
They don't show any distinction between a cross join and an inner join, for example, or more generally show any distinction betwee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38549",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5160"
} |
Q: What is the conversion specifier for printf that formats a long? The printf function takes an argument type, such as %d or %i for a signed int. However, I don't see anything for a long value.
A: On most platforms, long and int are the same size (32 bits). Still, it does have its own format specifier:
long n;
unsign... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38561",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "595"
} |
Q: Common lisp idiom - is there a better way? I find myself doing this sort of thing all the time. I've been considering writing a macro/function to make this sort of thing easier, but it occurs to me that I'm probably reinventing the wheel.
Is there an existing function that will let me accomplish this same sort of t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38571",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is .NET 3.5 SP1 Required on the server to use Dynamic Data? Is .NET 3.5 SP1 Required on the server to use Dynamic Data?
It looks like it generates a lot of code and therefore wouldn't require anything special on the server side. I ask because I would like to use it but the shared hosting provider my client is using ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38572",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error? Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error?
The only change that I've made to my computer is uninstalling AVG and installing the trial for Microsoft OneCare. Did OneCare change ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38589",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I make persistent network sockets on Unix in Ruby? I'd like to be able to write a ruby program that can restart without dropping it's socket connections.
A: This program gets Google's homepage and then when you pass it SIG_INT via Ctrl-C it restarts the program and reads the output of the homepage from the o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38592",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What's the best way to keep a PHP script running as a daemon? What is the best way to keep a PHP script running as a daemon, and what's the best way to check if needs restarting.
I have some scripts that need to run 24/7 and for the most part I can run them using nohup. But if they go down, what's the best way to m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do you unit test business applications? How are people unit testing their business applications? I've seen a lot of examples of unit testing with "simple to test" examples. Ex. a calculator. How are people unit testing data-heavy applications? How are you putting together your sample data? In many cases, data fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38598",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Using Django time/date widgets in custom form How can I use the nifty JavaScript date and time widgets that the default admin uses with my custom view?
I have looked through the Django forms documentation, and it briefly mentions django.contrib.admin.widgets, but I don't know how to use it?
Here is my template that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38601",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "183"
} |
Q: Best way to display/format SQL 2005 money data type in ASP.Net I am attempting to set an asp.net textbox to a SQL 2005 money data type field, the initial result displayed to the user is 40.0000 instead of 40.00.
In my asp.net textbox control I would like to only display the first 2 numbers after the decimal point e.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38602",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: asp:DropDownList Error: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items I have a asp.net 2.0 web site with numerous asp:DropDownList controls.
The DropDownList control contains the standard info city, state, county etc... info.
In addition to the standard codes the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38612",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: LSP in OO programming? Am I right in thinking the full name of the LSP is the Liskoff Substitution Principle? I'm having trouble finding an [online] source to cite for any information on this... it seems to be a cornerstone of OOP, and yet I'm having trouble finding definitions.
A: Yes, you are right. It's spelled... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET XML ObjectDataSource Wrapper Class Examples I want to use XML instead of SQLServer for a simple website.
Are their any good tutorials, code examples, and/or tools available to make a (prefer VB.NET) wrapper class to handle the basic list, insert, edit, and delete (CRUD) code?
The closest one I found was on ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38629",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What static analysis tools are available for C#? What tools are there available for static analysis against C# code? I know about FxCop and StyleCop. Are there others? I've run across NStatic before but it's been in development for what seems like forever - it's looking pretty slick from what little I've seen of it,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38635",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "174"
} |
Q: What are some efficient ways to combine two structures in MATLAB? I want to combine two structures with differing fields names.
For example, starting with:
A.field1 = 1;
A.field2 = 'a';
B.field3 = 2;
B.field4 = 'b';
I would like to have:
C.field1 = 1;
C.field2 = 'a';
C.field3 = 2;
C.field4 = 'b';
Is there a more ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38645",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Performance of Linq to Entities vs ESQL When using the Entity Framework, does ESQL perform better than Linq to Entities?
I'd prefer to use Linq to Entities (mainly because of the strong-type checking), but some of my other team members are citing performance as a reason to use ESQL. I would like to get a full idea ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38647",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Any way to have an ActionScript 3 (Flex/AIR) project print to standard output? Is there any way to have a binary compiled from an ActionScript 3 project print stuff to stdout when executed?
From what I've gathered, people have been going around this limitation by writing hacks that rely on local socket connections a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38651",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Automatically floating all fields in a VFP report? I want to set all the fields and labels on a VFP7 report to Float and Stretch with overflow. I tried Using the .frx file and doing the following REPLACE but it didn't work.
Is there some other field I need to change too?
REPLACE float WITH .T. FOR objtype = 8
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38654",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can IIS 6 serve requests for pages with no extensions? Is there any way in IIS to map requests to a particular URL with no extension to a given application.
For example, in trying to port something from a Java servlet, you might have a URL like this...
http://[server]/MyApp/HomePage?some=parameter
Ideally I'd like t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38661",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can you modify text files when committing to subversion? I want to ran the following script on text files that are being committed:
# Send the commands H and w to ed
# ed will append newline if the file does not end in one
printf "%s\n" H w | ed -s $1
# Strip trailing whitespace
sed -i 's/[ \t]*$//g' $1
# Convert ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38664",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Does the PHP mail() function work if I don't own the MX record I'm not sure I'm using all the correct terminology here so be forgiving.
I just put up a site with a contact form that sends an email using the PHP mail() function. Simple enough. However the live site doesn't actually send the email, the test site does.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38669",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: ASP.NET controls cannot be referenced in code-behind in Visual Studio 2008 Ok, so, my visual studio is broken. I say this NOT prematurely, as it was my first response to see where I had messed up in my code. When I add controls to the page I can't reference all of them in the code behind. Some of them I can, it seem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38670",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Does Adobe Flash support databases? Which databases does Adobe Flash support, if any?
A: None.
Instead, you would need to create some middleware (say, a webservice) that you talked to that did the database CRUD for you.
A: None, really.
As others have said, the best solution is to have something in between. I per... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38674",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to provide next page of updated content? Feel free to edit the title if you know how to formulate the question better. (Tagging is a problem as well.) The problem may be too difficult in this general form, so let us consider a concrete example.
You get a screenful of stackoverflow questions by requesting /questi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38680",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to grab the contents of HTML tags? Hey so what I want to do is snag the content for the first paragraph. The string $blog_post contains a lot of paragraphs in the following format:
<p>Paragraph 1</p><p>Paragraph 2</p><p>Paragraph 3</p>
The problem I'm running into is that I am writing a regex to grab everything... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: ruby idioms for using command-line options I'm trying to pick up ruby by porting a medium-sized (non-OO) perl program. One of my personal idioms is to set options like this:
use Getopt::Std;
our $opt_v; # be verbose
getopts('v');
# and later ...
$opt_v && print "something interesting\n";
In perl, I kind of grit my... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What is the best way to create a wizard in C# 2.0? I have a winforms application where users will be creating stock items, and a time of creation there are a number of different things that need to happen.
I think the UI for this should probably be a wizard of some kind, but I'm unsure as to the best way to achieve ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: WebClient.DownloadFileAsync fails to raise exception An odd issue that I have been trying to address in a project - my calls to WebClient.DownloadFileAsync seem to be getting ignored and no exceptions are being raised. So far I have been able to determine this might be due to destination folder not existing, but fr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38726",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Do you know how to implement transactions in Castle ActiveRecord? I decided to make a system for a client using Castle ActiveRecord, everything went well until I found that the transactions do not work, for instance;
TransactionScope t = new TransactionScope();
try
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to detect file ends in newline? Over at Can you modify text files when committing to subversion? Grant suggested that I block commits instead.
However I don't know how to check a file ends with a newline. How can you detect that the file ends with a newline?
A: Using only bash:
x=`tail -n 1 your_textfile`
if [ ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Concurrent collections in C# I'm looking for a way of getting a concurrent collection in C# or at least a collection which supports a concurrent enumerator. Right now I'm getting an InvalidOperationException when the collection over which I'm iterating changes.
I could just deep copy the collection and work with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38756",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What design pattern is PEAR DB_DataObject implementing? DB_DataObject does not appear to be ActiveRecord because you do not necessarily store business logic in the "table" classes. It seems more like Table Data Gateway or Row Data Gateway, but I really cannot tell. What I need is good ORM layer that we can use with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I use a different database connection for package configuration? I have an SSIS Package that sets some variable data from a SQL Server Package Configuration Table. (Selecting the "Specify configuration setings directly" option)
This works well when I'm using the Database connection that I specified when devel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How would you extract data from a MS Project .mpp file? I need to extract data from a .mpp file on the network and combine it with other data from several different databases. The application can be written in Perl, VB6, VB.net or C# but must be easily scheduled from a Windows based server.
What would you recommend ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What SPN do I need to set for a net.tcp service? I have a wcf application hosted in a windows service running a local windows account. Do I need to set an SPN for this account? If so, what's the protocol the SPN needs to be set under? I know how to do this for services over HTTP, but have never done it for net.tcp.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Visual Studio equivalent to Delphi bookmarks I use Delphi for many years, and although I have now moved on to Visual Studio I still fondly remember numbered bookmarks (CTRL+K+1 to set bookmark 1, CTRL+Q+1 to goto bookmark 1).
Is there a Visual Studio equivalent? I'm find the dumb bookmarks in VS a chore after Delphi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Web Service Namespace Dynamic Naming I have a web-service that I will be deploying to dev, staging and production. Along with this will be an ASP.net application that will be deploying separately but also in those three stages.
What is the most pragmatic way to change the following line in the web-service to match ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Which database table Schema is more efficient? Which Database table Schema is more efficient and why?
"Users (UserID, UserName, CompamyId)"
"Companies (CompamyId, CompanyName)"
OR
"Users (UserID, UserName)"
"Companies (CompamyId, CompanyName)"
"UserCompanies (UserID, CompamyId)"
Given the fact that user and compan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: SQL - How to store and navigate hierarchies? What are the ways that you use to model and retrieve hierarchical info in a database?
A: FYI: SQL Server 2008 introduces a new HierarchyID data type for this sort of situation. Gives you control over where in the "tree" your row sits, horizontally as well as vertically.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "48"
} |
Q: Which class design is better? Which class design is better and why?
public class User
{
public String UserName;
public String Password;
public String FirstName;
public String LastName;
}
public class Employee : User
{
public String EmployeeId;
public String EmployeeCode;
public String De... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38820",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: Best full text search alternative to MS SQL, C++ solution What is the best full text search alternative to Microsoft SQL? (which works with MS SQL)
I'm looking for something similar to Lucene and Lucene.NET but without the .NET and Java requirements. I would also like to find a solution that is usable in commercial... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38822",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is Wiki Content Portable? I'm thinking of starting a wiki, probably on a low cost LAMP hosting account. I'd like the option of exporting my content later in case I want to run it on IIS/ASP.NET down the line. I know in the weblog world, there's an open standard called BlogML which will let you export your blog conte... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Two-way password encryption without ssl I am using the basic-auth twitter API (no longer available) to integrate twitter with my blog's commenting system. The problem with this and many other web APIs out there is that they require the user's username and password to do anything useful. I don't want to deal with t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How to do a simple mail merge in OpenOffice I need to do a simple mail merge in OpenOffice using C++, VBScript, VB.Net or C# via OLE or native API. Are there any good examples available?
A: I haven't come up with a solution I'm really happy with but here are some notes:
*
*Q. What is the OO API for mail merge?
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38842",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to encrypt one message for multiple recipients? What are the fundamentals to accomplish data encryption with exactly two keys (which could be password-based), but needing only one (either one) of the two keys to decrypt the data?
For example, data is encrypted with a user's password and his company's password, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Will this hardware be 64bit Windows Server 2008 compatible? I recently printed out Jeff Atwood's Understanding The Hardware blog post and plan on taking it to Fry's Electronics and saying to them "Give me all the parts on these sheets so I can put this together." However, I'm going to be installing 64bit Windows Ser... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38861",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you find out which NIC is connected to the internet? Consider the following setup:
A windows PC with a LAN interface and a WiFi interface (the standard for any new laptop). Each of the interfaces might be connected or disconnected from a network. I need a way to determine which one of the adapters is the one ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: One or Two Primary Keys in Many-to-Many Table? I have the following tables in my database that have a many-to-many relationship, which is expressed by a connecting table that has foreign keys to the primary keys of each of the main tables:
*
*Widget: WidgetID (PK), Title, Price
*User: UserID (PK), FirstName, L... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Best way to avoid code injection in PHP My website was recently attacked by, what seemed to me as, an innocent code:
<?php
if ( isset( $ _GET['page'] ) ) {
include( $ _GET['page'] . ".php" );
} else {
include("home.php");
}
?>
There where no SQL calls, so I wasn't afraid for SQL Injection. But, appare... | {
"language": "en",
"url": "https://stackoverflow.com/questions/38875",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.