text stringlengths 8 267k | meta dict |
|---|---|
Q: Strategies to Avoid Transaction Escalation in System.Transactions So, based on the answer to my previous question, transactions do get elevated from the LTM to the DTC if multiple connections are opened during a transaction, even if the connections all have the same connection string.
So, my next question is, what s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395199",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Formatting text for a combobox, C# I have three values I need to align in a dropdown box. How can I do this? I've been trying this:
String.Format("{0,-30}{1,-15}{2,-10}{3,-8}", new object[] { cusJob, service, username, time });
But that leaves it uneven because it's not a monospaced font. I don't really want to us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395207",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: lossless video codec playback in Java I need to encode a sequence of frames with a lossless video codec and play them in a Java app. I don't care about the file size. The output frames should match the input frames exactly. Lossy codecs don't do this even at high bit rates.
None of these well-known lossless video co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395215",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Configure Emacs FlyMake to use Rakefile as well as Makefile I have been learning to use Emacs for a little while now. So far liking it a lot.
My problem is that for little C codes I prefer using Rake instead of Make. However flymake does not seem to want anything else than Make. As it complains that it can not find ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Exceptions from DLL/Shared libs Suppose you are developing a library with classes to be exported through a DLL (on Windows, or similar shared-library like Linux ELF shared libs). Member functions on those classes throw exceptions either from the standard library or library defined exceptions.
It is totally safe to c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395223",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: jQuery UI Datepicker and datejs I want to have a datepicker where you can also just type basically I want to have the jQuery UI Datepicker and datejs in one. I want to type "tomorrow" and I want it to select the right day. I want to be able to type "saturday" and it actually getting the date right.
A: If you have a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395230",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: We need to lock a .NET Int32 when reading it in a multithreaded code? I was reading the following article:
http://msdn.microsoft.com/en-us/magazine/cc817398.aspx
"Solving 11 Likely Problems In Your Multithreaded Code" by Joe Duffy
And it raised me a question:
"We need to lock a .NET Int32 when reading it in a multit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Any interesting uses of Makefiles to share? "make" is not only useful for building your programming project, but it seems to be under-used in other areas.
For example, many shell scripts can be rewritten as Makefiles to allow independent parts to run in parallel (with "make -jXX") to keep all your CPU cores busy, wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Is it possible to load a Rails helper at run time? I have a View that can vary significantly, depending on the 'mode' a particular user has chosen.
I thought I would extract the different behavior into two different Helpers, and then have code like this in the Controller:
class MyController < ApplicationController
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395237",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Extend System.Windows.Forms.ComboBox I would like to extend the System.Windows.Forms.ComboBox control with a ReadOnly property, which would display the selected item’s text (similar to a label) when ReadOnly = true. (I do not like the disabled look achieved by setting Enabled=false)
How do I do this in winforms? It ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395240",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Are there CPAN modules that will help me parse an RSS or ATOM feed in Perl? I need code in Perl for requesting and parsing ATOM and RSS feeds. Is there a CPAN module(s) for that?
A: XML::FeedPP is good ...
A: Both XML::RSS and XML::Atom exist. Be warned -- XML::Atom does not seem to be actively maintained and re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Examples of usability disasters? Anybody have good examples of usability disasters?
Here's an example. Hector is a manager with a large team. Department admin wants to send Hector a spreadsheet with his team's salaries. She types "Hector" in the Outlook "To:" field. It autocompletes to "Hector's Team" but she doesn'... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395247",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Transparent images with C# WinForms I am working on a Windows Forms application in VS 2008, and I want to display one image over the top of another, with the top image being a gif or something with transparent parts.
Basically I have a big image and I want to put a little image on top if it, so that they kinda appea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395256",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Generating Code in an MSBuild task I am creating an MSBuild task that will generate one or more files, I have a Task with an [output] property that is of type ITaskItem[]. My question is, do I need to implement that interface myself or is there a class I can use already?
I want them to be Compile task items that get... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Best Rails HTML Parser I know that Hpricot is still a standard but I remember hearing about a faster more expressive HTML parser for Ruby.
Does anybody know what it's called and if it is worth switching to from Hpricot??
Thanks in advance
A: There are multiple tools available. I use Nokogiri.
Demo:
require 'rubygem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395261",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: jquery equivalent for list.detect in prototype What would be the jquery equivalent for list.detect in prototype?
A: Returns the index of the first element with "value":
jQuery.inArray(value, array);
A: Prototype's detect takes an iterator and finds the first element for which the iterator returns true. jQuery's i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395262",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Where can I find or donate software of historical interest? Computer science and programming is a field with a relatively short history but it is developing very rapidly. Is there a repository for existing historical software or somewhere that I could submit software of historical interest?
I've asked this, and ans... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395264",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Obj C - Random @property error Still new to Objective C, and I'm having some trouble that I just can't seem to figure out on my own. The error occurs twice for each of the first three @properties below, and is:
error: "syntax error before ')' token".
#import <Foundation/Foundation.h>
@interface PolygonShape : N... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395271",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Trying to design an object model - using enums I am trying to design an object model (for C#), and can't work out the best way to store the data. I'll try to use a simple example to illustrate this!
I have an object "pet", which could be one of, "cat", "dog" etc. So I have created an "pet" class with a "petType" enu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395275",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Ideas on implementing Stack Overflow-style comments I like the Stack Overflow comment UI a great deal and I'm looking into implementing the same thing on my own website. I looked at the code and it looks like the main tool here is WMD, with the JQuery TextArea Resizer playing a supporting role.
WMD converts Markdow... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395286",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Display stocks data from Google Finance or Yahoo! Finance Can I use the Google Finance API to get stock data?
If there is a Flash or Javascript viewer for such stocks data it would be good.
I found some chart components that could be used for the same:
*
*amCharts
*Open Flash Chart
A: Yahoo! Finance gives you r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: What potential do you see in Silverlight? Silverlight has been available since quite some time, and Silverlight 2 allows .Net programming on the front-end. I've been thinking about the apps that I can make using Silverlight, but I can't decide if I should go for development in Silverlight because i am still concerne... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395292",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: How can I get the current CodeDomProvider in an MSBuild Task I have a task and I want to generate some code using the CodeDom. How can I get either the current "language" or the CodeDomProvider for the current project calling my task?
A: Ok I managed to figure it out eventually:
Geting a CodeDomProvider in an MSBu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395313",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: .NET Reflection - Finding the type that defines a static member I have a problem with reflection. I need to find the type that instantiates a static member. My code looks like this:
private class SimpleTemplate : PageTemplate
{
internal static readonly IPageProperty NameProperty =
Propert... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395314",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Cause of an unexpected behaviour using JUnit 4's expected exception mechanism? I am trying to test that a particular method throws an expected exception from a method. As per JUnit4 documentation and this answer I wrote the test as:
@Test(expected=CannotUndoException.class)
public void testUndoThrowsCannotUndoExce... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395317",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Is it Possible to Make a Generic Control in .Net 3.5? I've got the following Generic usercontrol declared:
public partial class MessageBase<T> : UserControl
{
protected T myEntry;
public MessageBase()
{
InitializeComponent();
}
public MessageBase(T newEntry)
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395321",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: HTML frame allocation I having trouble in dividing the HTML frames. I have been using the following fields in HTML:
<table width=900 border="1" cellspacing="10">
<tr>
<td width="500" height="170">section1 </td>
<td width="400" rowspan=2> section2</td>
</tr>
<tr>
<td width="500" height="400" val... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395322",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Looking for Matlab to F#/C# Script Convertor I have a bunch of <5 matlab scripts. Is there a tool that can spit out F# or c# equivalent from them.
A: Rajiv I'm not aware of any script converter but you can compile your Matlab code and then call it from .NET. Here's two links. Hope this helps.
Net Builder and an o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can I use a ForeignKey in __unicode__ return? I have the following classes: Ingredients, Recipe and RecipeContent...
class Ingredient(models.Model):
name = models.CharField(max_length=30, primary_key=True)
qty_on_stock = models.IntegerField()
def __unicode__(self):
return self.name
class Recipe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Get Element StyleSheet Style in JavaScript I've been using John Resig's getStyle function from Pro JavaScript Techniques to get the style of elements:
function getStyle(elem, name) {
// J/S Pro Techniques p136
if (elem.style[name]) {
return elem.style[name];
} else if (elem.currentStyle) {
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395341",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Using threadpool and func objects When using a thread pool and its queuecallbackitem, can I not pass in a func object (from the method parameter)?
I don't see a func which takes one parameter but returns nothing. There isfunc<T, TResult> but how can I set TResult to be null (want to indicate "this method returns vo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395349",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Honor a cookie in all open tabs I have a web app that authenticates against a SQL DB and sets a cookie with credentials, like a "remember me" sort of thing. Part of the app involves using a bookmarklet to add things into your personal slice of another DB. This works fine if you authenticate and, in the SAME TAB, beg... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395375",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is PHP truly faster on the JVM? Lately I've been hearing a lot of people evangelizing that PHP with Resin is actually much faster than with mod_php, but I cannot find any benchmark anywhere.
Is it true or just vendor BS?
A: InfoQ has this video presentation from the 2008 JVM Language Summit on "P8, an implementati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395376",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What setting might be causing an AMP server to only allow 1 request at a time per browser? I'm using an AMP server (Apache 1.3, MySQL 5.0, PHP 5.1.5) which I have found to only allow 1 connection/request per browser at one time. The easiest way to reporduce this is to request a large download which is passed through... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395377",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Problem when retrieving text in JSON format containing line breaks with jQuery I'm having a strange problem when retrieving JSON formatted text. I use jQuery post to send some data (also JSON formatted) to the server (running PHP) which works fine. Then, when I request the same data from the server using jQuery get,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395379",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: How to create ClearCase views automatically? I'm a configuration manager and I'm working on Windows and UNIX environments.
Currently, I have to create the views by myself for the developers and QA engineers.
Is there any better approach?
Thanks.
A: Yes: script the ClearCase view creation or explain them the mkview... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Printing Java Collections Nicely (toString Doesn't Return Pretty Output) I wish to print a Stack<Integer> object as nicely as the Eclipse debugger does (i.e. [1,2,3...]) but printing it with out = "output:" + stack doesn't return this nice result.
Just to clarify, I'm talking about Java's built-in collection so I ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395401",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "230"
} |
Q: How do I solve this issue with gethostbyname_r and DBI or DBD::MySQL on FreeBSD? I have some old perl code which recently stopped working on a FreeBSD box. The code which fails looks (in simplest form) like this:
#!/usr/local/bin/perl -w
use strict;
use DBI;
my $datasource = "DBI:mysql:dbname:hostname.domain.com"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there open source software available that analyses a string and guesses the gender of the author? I can't find anything other than closed-source web applications. Are there any active projects? I'd be interested in using the software in something I'm developing and getting involved.
A: Here's another web site th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395421",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Automatically Copying folders until a certain limit is reached Greetings.
1 - Let's say I have about 500 folders of variable size with a total size of 100 GB.
2 - I want to distribute these folders automatically in other folders until the size of 700 MB is reached with the best optimization of space.
Example: In fol... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395424",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do you deal with time slippage in your smaller programming deliverables? I'm asking this about smaller jobs: I think that with larger jobs you have all kinds of contractual issues to deal with. With larger jobs, if you haven't contemplated schedule slippage, you're basically hosed.
With smaller deliverables (10 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395425",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to animate a window with Processing? I am using Processing to learn programming and wondered if there is a way to make an OS window grow, shrink, make it transparent or give it round edges. As far as I know Processing uses Java's Frame class and not the JFrame class, but I just can't figure out how to do this.
T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395426",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Preventing a second instance from running except in a specific case Okay, I have this program and I don't want more than one instance of it running. So what I have right now is it grabs all instances that match it's name, and if there are more than one it quits and lets the user know it's already running in another ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395430",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: fluent nHibernate mapping I am working on a legacy system and have introduced fluent nHibernate but have one last mapping that I can not seem to get working.
Code:
public class Permit
{
public int PermitId { get; set; }
public char Discipline { get; set; }
public PermitDetails PermitDetails { get; se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395431",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: script/generate migration throws error about I18n in Rails 2.2.2 I have this on line 56 in my environment.rb:
I18n.load_path += Dir[ File.join(RAILS_ROOT, 'lib', 'locale', '*.{rb,yml}') ]
I can run the app just fine, but when I try to run:
script/generate migration
I get this error:
environment.rb:56: uninitialized... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395432",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to ensure fast startup times of mnesia Erlang with mnesia/dets is famous for it slow startup times after a crash. Basically the same issue as with fsck on older filesystems.
But I also experience slow startup times after regular shutdowns: about 8 Minutes for 250 MB on-disk data on a beefy machine.
So I have to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395433",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Blocks to KB/MB/GB from statfs on iPhone I am using statfs() which gives me the free blocks available to a non-superuser.
I am unsure how to convert this into KB/MB/GB.
The values that are returned are:
fundamental file system block size: 4096
total data blocks in file system: 3805452
free blocks in fs: 63425
free b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to download a file over http with authorization in python 3.0, working around bugs? I have a script that I'd like to continue using, but it looks like I either have to find some workaround for a bug in Python 3, or downgrade back to 2.6, and thus having to downgrade other scripts as well...
Hopefully someone her... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395451",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to loop through a checkboxlist and to find what's checked and not checked? I'm trying to loop through items of a checkbox list. If it's checked, I want to set a value. If not, I want to set another value. I was using the below, but it only gives me checked items:
foreach (DataRowView myRow in clbIncludes.Checked... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395454",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How to hack boot.rb to stop annoying warning? Gem::SourceIndex#search support for String patterns is deprecated Everytime I run rake or most rails commands, I get an annoying warning. I'm still a beginner with Ruby/Rails, and I would like advice on how to hack boot.rb to stop the annoying warning. I'm using Rails ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395472",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is the best way to center an html element within its containing element? Let's say you have the following chunk of code:
<div id="container">
<someelement>This is any element.</someelement>
</div>
What's the best CSS I could use to horizontally center "someelement" within its containing div?
A: if your <som... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395484",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is there any IDE for fast drag and drop php development? I am using Eclipse IDE with few plug-ins for PHP dev. I am using PHPEclipse plug-in and I know there are lotsa other plugins like EasyEclipse.But is there an IDE like Visual Studio with cool drag and drop stuff for PHP?
A: I use APTANA.
You can get it here h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395485",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you manage and organize your files? (scripts, repos, downloads, pdf's, etc) Like many of you, I have to deal with a large amount of files: source code, binary downloads, spreadsheets, pdf's, word docs, images, note files, quick scripts, and more.
These files can fall into many categories:
*
*Temporary file... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395486",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Is it possible to decrement a variable in MySQL? I'm wanting to decrement a variable in a MySQL table by one everytime an UPDATE query is ran.
What I have is this, which isn't working:
UPDATE forum SET replys = reply-- WHERE fid = '$id'
Is this possible in any way, or am I going to have to run a SELECT and get the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395504",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Compression algorithm for JSON encoded packets? What would be the best compression algorithm to use to compress packets before sending them over the wire? The packets are encoded using JSON. Would LZW be a good one for this or is there something better?
A: There are two more JSON compression algorithms: CJson & HPa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395505",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Implementing a self resetting XMLHttpRequest object I'm trying to implement a comet style, long polling connection using an XMLHttpResponse object.
The idea is to maintain an open connection to a server which sends data when it is available (faking push). As soon as the XHR object completes, I need to spawn a new on... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I install MySQL and the Python MySQL package on OS X Leopard? Or how do I learn about being a web developer using OS X? I'm new to the Mac OS X, and I'm just about ready to throw my brand new MacBook Pro out the window. Every tutorial on setting up a Django development environment on Mac OS X Leopard is insid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395509",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Alternatives to MySql Query Browser? I have been using the MySql Query Browser and [opinion]it has to be the worst UI that I've seen for anything. Ever.[/opinion] But it's free, so it's great and I love it.
Can anybody recommend any better, free tools for MySql DB admin? I want it to run on my local machine and not ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395512",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do I add a DOM element with jQuery? I have a funciton that I am currently using to show a hidden div.a_type
How can I modify this code so that instead of fading in the hidden div,
I can add the new div to the DOM
jQuery(function(){ // Add Answer
jQuery(".add_answer").click(function(){
if(count >= "... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395525",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Quick question about a naming convention for a C# CMS I am building a CMS and the naming convention for classes has been debated between the other developer involved and myself. The problem arises specifically with "Page", as it is a public class available in a typical library.
A natural response would be to call it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395526",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Best practices: XML attribute vs XML element - When should I use elements and when should I use attributes? Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two?
1.
<sitemap>
<category name="Animals">
<section title="Dogs">
<page url="/pics/grea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395527",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Given an Object, How can I programatically tell what Interfaces it supports? Given this:
Interface IBase {string X {get;set;}}
Interface ISuper {string Y {get;set;}}
class Base : IBase {etc...}
class Super : Base, ISuper {etc...}
void Questionable (Base b) {
Console.WriteLine ("The class supports the following i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395549",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Replace string characters from array I have a string (of undertermined length) that I want to copy a lot of times replacing one character at a time from an array (of undertermined length) of characters.
So say I have this string: 'aa'
And this array: ['a', 'b', 'c', 'd']
after some magic for-looping stuff there wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Are framework dependencies a problem? I know someone who has a one-man company developing applications in Delphi and Pascal. He is running into problems in handling the workload. Thus, he needs to find an employee.
Having trouble finding people, he said his company is not attractive for graduated students. One of th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395557",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Measuring memory use of device drivers in Windows How can I determine how much memory each device driver is consuming? I'm assuming this can be done with some Win32 or .NET API, but I just haven't been able to determine which.
A: Windows tracks device driver memory usage with pool tags. If you know what pool tags ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Grails getSomething(int i) method doesn't compile Can someone tell me why this Grails domain class will not compile (at runtime)?
class Person {
String name
String getSomething(int i) {
}
}
I get this error when I run with grails run-app:
2008-12-27 15:26:33.955::WARN: Failed startup of context org.mo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395586",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: JSON security best practices? While researching the issue of JSON vs XML, I came across this question. Now one of the reasons to prefer JSON was listed as the ease of conversion in Javascript, namely with the eval(). Now this immediately struck me as potentially problematic from a security perspective.
So I starte... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395592",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "79"
} |
Q: Elastic collision between oblique wall and ball I'm having trouble computing reflection angles for a ball hitting an oblique wall. I'm using an algorithm lifted from this tutorial. It looks like this (in Actionscript 3), with p1 being the current velocity vector and p2 the normal of the wall:
private function getRef... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Java graphic library for multicoloured text I would like to know the recommended library or procedure for dealing with multi-coloured text within Java. My current usage of java.awt.Graphics, while function, appears to be a bit more complex than necessary.
The main issue involves the frequent change of colour, crea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Is there a (free) windows test/dummy print device? We are creating a batch application which sends its documents (Java Jasperreports) directly to a printer device, running on a Windows server.
To test the application and measure the performace, we where looking for a test or dummy windows print device. This device w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395617",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there any significant difference between using if/else and switch-case in C#? What is the benefit/downside to using a switch statement vs. an if/else in C#. I can't imagine there being that big of a difference, other than maybe the look of your code.
Is there any reason why the resulting IL or associated runtime... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "266"
} |
Q: Saving graphs in Haskell I can easily define a datatype for a node of a directed graph.
data Node = Node String [Node] derving (Show, Read)
I can save the graph to a file using show function, then restore it using read. However, show will not cope with a cycle. Is there a trivial way to save and restore a graph?
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395628",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: What are the steps I need to take to add nice java code formatting to my blogger/blogspot blog? I'm looking for a sequence of steps to add java code formatting to my blogspot blog.
I'm really looking for a dummies guide - something so simple a cleaner could follow it if they found it on a piece of paper on the floo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395630",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: URL mapping in PHP? I come from a Java background and with any servlets-based technology, it's trivial to map a range of URLs (eg /reports/, /secure/.do) to a specified servlet. Now I'm less familiar with PHP but I haven't yet seen anything that does quite the same thing with PHP (or mod_php). It's entirely possib... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395650",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: DataBound WPF ListBox Styling on ListBoxItems I have a ListBox that during development I had the items in the ListBox hardcoded and styled. This is how the items were styled.
<ComboBoxItem Width="Auto" Height="Auto" Content="ComboBoxItem" >
<ComboBoxItem.Foreground>
<LinearGradientBrush EndPoint="0.5,1" ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395651",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a PHP equivalent to Java URL filters/interceptors? One of the things I like about Java servlets is the use of unobtrusive filters and interceptors. Basically you could use these things to enforce security, put extra information on the HttpRequest, do monitoring or whatever.
Is there some equivalent in PHP?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: WPF: How to swap Listview cell content with a datatrigger (or equivalent) I have a WPF App that implements a ListView. I would like to show an image (a small icon) in one of the columns depending on the type of the data that row represents. Sort of like the display you see in Windows Explorer.
I am using DataTrigge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395663",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Creating method in implementation without defining in header How can I create a method in the @implementation of a class without defining it in the @interface?
For example, I have a constructor that does some initialisation and then reads data from a file. I want to factor out the file-reading code into a separate ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395667",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Reference Groovy domain class from Java class using Eclipse? How can I reference a Groovy domain class from Java class using Eclipse?
I've put my domain class in package:
package com.me.myproject
public class Person {
String name
int age
}
Then in my Java class I attempt to reference com.me.myproject.Person... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395675",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Obj C - Understanding pointers I'm having a hell of a time understanding pointers in Objective C. They don't behave like I would assume based on various C tutorials.
Example:
// Define Name and ID
NSString *processName = [[NSProcessInfo processInfo] processName];
NSNumber *processID = [NSNumber numberWithInt:[[NSPro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395682",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you choose between a singleton and an unnamed class? I'd use a singleton like this:
Singleton* single = Singleton::instance();
single->do_it();
I'd use an unnamed class like this:
single.do_it();
I feel as if the Singleton pattern has no advantage over the unnamed class other than having readable error mess... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395685",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Migrating from SVN to Perforce -- Tips? Experience? We have a fairly large SVN repository which we are looking to migrate to perforce. We very much want to keep the ~20k revisions, the branches, etc, but in some initial tests the svn2p4 script that perforce provides wasn't able to replicate the full structure.
Hav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Threads in Python General tutorial or good resource on how to use threads in Python?
When to use threads, how they are effective, and some general background on threads [specific to Python]?
A: One thing to remember before spending time and effort in writing a multi-threaded Python application is that there is a Gl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395704",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What do you use to debug JavaScript besides Firebug? What are your favorite JavaScript debugging tools besides Firebug?
Thanks,
Eric
Duplicate: JavaScript Debugger
A: For IE, Developer Toolbar.
For Opera, Dragonfly.
For cross-browser log output, Blackbird (though it currently has some CSS class naming issues that n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to check whether a variable is a class or not? I was wondering how to check whether a variable is a class (not an instance!) or not.
I've tried to use the function isinstance(object, class_or_type_or_tuple) to do this, but I don't know what type would a class will have.
For example, in the following code
class F... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395735",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "319"
} |
Q: Do you name your arrays using plural or singular in PHP? When I'm naming array-type variables, I often am confronted with a dilemma:
Do I name my array using plural or singular?
For example, let's say I have an array of names: In PHP I would say: $names=array("Alice","Bobby","Charles");
However, then lets say I wa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "70"
} |
Q: Making a Difference @ Open Source Projects Can I make a difference at an open source project?
I haven't gotten a degree or anything but I am really interested in computer science and I have most of the fundamentals down.
Is there a project I can make a difference at? If not, any sites where I can further my knowled... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395758",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Ajax jQuery , beginner question I'm trying to make an ajax call to grab session data to insert into my page after it's loaded like this
jQuery(function(){ // Add Answer
jQuery(".add_answer").livequery('click',function(){
var count = $(this).attr("alt");
count++;
var count1 = count-1;
$.get('quiz/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What are the core essential features of a bug tracker software?
Possible Duplicate:
What should a good BugTracking tool be capable of?
Although there is a large set of features that a bug tracker can have I feel like it is a little overkill and was considering rolling out my own solution. With that being said I d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is the most efficient way to perform the reverse of Server.MapPath in an ASP.Net Application I am building an MVC application in which I am reading a list of files from the file system and I want to pass the relative URL to that file to the view, preferably prefixed with "~/" so that whatever view is selected c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Truncate Markdown? I have a Rails site, where the content is written in markdown. I wish to display a snippet of each, with a "Read more.." link.
How do I go about this? Simple truncating the raw text will not work, for example..
>> "This is an [example](http://example.com)"[0..25]
=> "This is an [example](http:"
I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Should I use Replace() instead of HtmlEncode()? Should HtmlEncode() be abandoned and Replace() used instead of I want to parse links in posts/comments (with regular expressions)? HtmlEncode() replaces & with & which I assume can cause problems with links, should I just use Replace() to replace < with <?
For e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395799",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Count occurrences of a word in a row in MySQL I'm making a search function for my website, which finds relevant results from a database. I'm looking for a way to count occurrences of a word, but I need to ensure that there are word boundaries on both sides of the word ( so I don't end up with "triple" when I want "... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395810",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Function pointers/delegates in Java? For my Java game server I send the Action ID of the packet which basically tells the server what the packet is for. I want to map each Action ID (an integer) to a function. Is there a way of doing this without using a switch?
A: Another similar approach could be using Java 8's S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Visual Haskell 2008 Is Haskell for Visual Studio 2005 compatible with VS2008 SP1 ?
A: The answer to your original question is a No. The code for visual haskell is written in Haskell and talks via COM to visual studio. Now the problem is, that even if you update the com wrappers to be compatible with the new visual ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395828",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to get code point number for a given character in a utf-8 string? I want to get the UCS-2 code points for a given UTF-8 string. For example the word "hello" should become something like "0068 0065 006C 006C 006F". Please note that the characters could be from any language including complex scripts like the east ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Integrating smartgwt and web2py I'd like to build an application using smartgwt and web2py.
I am new to both.
Ultimately what I would like to do is display objects obtained from a web2py backend in a smartgwt TileGrid.
Can anyone enumerate the broad strokes of what needs to be done? Or point me to any useful resourc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I send an ARP packet through python on windows without needing winpcap? Is there any way to send ARP packet on Windows without the use of another library such as winpcap?
I have heard that Windows XP SP2 blocks raw ethernet sockets, but I have also heard that raw sockets are only blocked for administrators. A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: C# Will "WindowState.ToString" change between cultures Take the following code for example;
if (Convert.ToString(frm.WindowState) == "Minimized")
Layout.WindowState = "Maximized";
else
Layout.WindowState = Convert.ToString(frm.WindowState);
We are analysing the string definition of the windo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Load JSON at runtime rather than dynamically via AJAX I don't think this can be done "cleanly", but I'll ask anyway.
I have a system which needs to get a JSON resource via a REST GET call in order to initialize. At the moment the system waits until the onLoad event and fires an ajax request to retrieve the resource,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/395857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.