text stringlengths 8 267k | meta dict |
|---|---|
Q: Is it "better" to have an update field or COUNT query? In a Django App I'm working on I've got this going on:
class Parent(models.Model):
name = models.CharField(...)
def num_children(self):
return Children.objects.filter(parent=self).count()
def avg_child_rating(self):
return Child.obj... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449230",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get the Icon of a file from a windows mobile app I'm working with C# developing app for windows mobible 6. I need get the icon of a file, but i don't know how to do that =P.
Is there way to get it?
A: Yes, though it's not painless, and requires using PInvoke. Here's how I do it. (WinApi is a helper static class tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449234",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Dynamically setting CSS values using ASP.NET I'm working on a site where the images and other resources will be located on a separate domain from the main content of the site. We will use something like 'www.example.com' for the main site, and then 'images.example.com' for all extra resources for styles, etc.
When d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449237",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to programmatically set every other column in a worksheet in Interop Using Excel Interop (.NET) how can we set programmatically two different Excel formulas for every other column. For instance,
Range r = _sheet.get_Range(_sheet.Cells[1, 1], _sheet.Cells[I, J])
r.Formula = "=something1"
will do it for every ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449240",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Horizontal scroller in CSS I have been trying to add a scroller to my context section that will only allow the box to scroll horizontally within the visible of the viewer's screen, not vertical.
Does anyone know any code to have scrollable content in a div in a fluid css layout design?
Also, here is a link to a webs... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the best practise for providing a method/class/component that supports cancellation? How do you design a method/class that should support cancellation of the operation?
I realized that I never do that in a consistent manner and I want to change that.
Some of the things I have used:
*
*a boolean property o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449268",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to round a time down to the nearest 15 minutes in Ruby? Is there an easy way to round a Time down to the nearest 15 minutes?
This is what I'm currently doing. Is there an easier way to do it?
t = Time.new
rounded_t = Time.local(t.year, t.month, t.day, t.hour, t.min/15*15)
A: Preface
There's quite a few solu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449271",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: Why the switch statement and not if-else? I've been wondering this for some time now. I'm by far not a hardcore programmer, mainly small Python scripts and I've written a couple molecular dynamics simulations. For the real question: What is the point of the switch statement? Why can't you just use the if-else st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449273",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: CSS Copy and paste problem I've developed a system in my application where emails are picked up with a regex, and then reversed in the source (to thwart bots). I then add the span class 'obfuscate email'. I then use CSS to reverse the the text back to be displayed and Javascript make sure that mailto: links still wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449280",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Auto-sync Visual Studio's Class View Is it possible to have Visual Studio's Class View pane (available under View > Class View) automatically synchronize to current symbol? Basically execute View.SynchronizeClassView whenever the current symbol changes.
A: See here and here. I find your phrasing more along the li... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449302",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Best way to convert XML to X12 and X12 to XML Looking for a tool/library to convert XML to X12 (270 - medical eligibility request) and then to convert the X12 response (271 - eligibility response) back to XML. This will be embedded in a server application (will consider any target language). I've toyed with idea o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449312",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: RESTful way to do degradable Multiple Models in a Form in Rails So far, I've not been able to find a solution that is able to allow a form to interact with two models that have a one-to-many relationship. Say for example, a customer has many items.
Currently, I've implemented solutions using Javascript that enables ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449317",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Stylecop tells me to add this keyword, but it's redundant - any performance implications? I use Stylecop for Resharper and whenever I call something in my class, Stylecop tells me to use the this keyword. But the IDE says this is redundant code (which it sure is), so why should I use the this keyword?
Does redundant... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449324",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Experiences With Active Objects ORM for Java? I'm looking at ORMs for Java and Active Objects caught my eye. Apparently, it was inspired by Rails' ActiveRecord. Based on what I've read, this approach seems to solve a lot of problems with existing Java ORMs by embracing convention over configuration.
What's been your... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449336",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do I update a fields in table with strings randomly selected from a known list? I have a table named "buildings" that contains a varchar(50) field named "use". The table already has several thousand records, however the "use" values are all null. I would like to update these this table with randomly chosen val... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Most Efficient way to access schema with ODBC and OleDB I am making a DAL template with C# and I am wondering what is the most efficient way to access schema information with ODBC and OleDB. I need the columns, column types, and primary key information.
thanks
A: For OleDb, there is an OleDbConnection.GetoleDbSchem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET DataList - defining "columns/rows" when repeating horizontal and using flow layout Here is my DataList:
<asp:DataList id="DataList" Visible="false" RepeatDirection="Horizontal" Width="100%" HorizontalAlign="Justify" RepeatLayout="Flow" runat="server">
[Contents Removed]
</asp:DataList>
This generate... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449344",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MySQL AUTO_INCREMENT does not ROLLBACK I'm using MySQL's AUTO_INCREMENT field and InnoDB to support transactions. I noticed when I rollback the transaction, the AUTO_INCREMENT field is not rollbacked? I found out that it was designed this way but are there any workarounds to this?
A: I do not know of any way to do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449346",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "86"
} |
Q: Performing XML Transformations in Flex I'd like to be able to run an xml transformation using an xslt file in my AIR project. What's the best way to accomplish this?
A: In AIR 1.5, a version of Webkit with support for XSLT is included.
Use the class XSLTProcessor from JavaScript just like you would in Firefox. (Not... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449367",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Play video from local file using Adobe AIR I'd like to play videos, as well as display images and possibly other flash content using adobe air, and reading from the local file system. I've been searching APIs and I have not yet been able to connect the dots.
I know of flash.filesystem.File and flash.filesystem.FileS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449369",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to prevent unauthorized spidering I want to prevent automated html scraping from one of our sites while not affecting legitimate spidering (googlebot, etc.). Is there something that already exists to accomplish this? Am I even using the correct terminology?
EDIT: I'm mainly looking to prevent people that would b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449376",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Is it possible to write extensions to Delphi's debugger? I know there's an API for creating extensions to Delphi. I use the GExperts package and various JVCL experts frequently. But I've never seen any extensions to the debugger. It would be very nice, for example, to be able to register viewers for various objec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449401",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: How many users is too much when using session variables? I'm currently using session variables as a cache to cut down the calls to the database.
I'm wondering at about how many concurrent users does this stop working at? 1,000, 10,000 ....100,000??? Also will iis start flaking out at a certain load? And are there
a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449404",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Does assigning objects to null in Java impact garbage collection? Does assigning an unused object reference to null in Java improve the garbage collection process in any measurable way?
My experience with Java (and C#) has taught me that is often counter intuitive to try and outsmart the virtual machine or JIT compi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449409",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "88"
} |
Q: Programmatically binding List to ListBox Let's say, for instance, I have the following extremely simple window:
<Window x:Class="CalendarGenerator.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1"
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449410",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Lucene index updation and performance I am working on a job portal site and have been using Lucene for job search functionality.
Users will be posting a number jobs on our site on a daily basis.We need to make sure that new job posted is searchable on the site as soon as possible.
In this context, how do I update Lu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449411",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can anybody explain the concept of pluggable adapter to me with good example? Can anybody explain the concept of pluggable adapter to me with good example?
A: You can read this article about adapter/pluggable pattern:
Table of content in this article:
* 1 Design Patterns
* 2 Intent of Adapter
* 3 Motivation
* 4 Str... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449424",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Singleton instance declared as static variable of GetInstance method, is it thread-safe? I've seen implementations of Singleton patterns where instance variable was declared as static variable in GetInstance method. Like this:
SomeBaseClass &SomeClass::GetInstance()
{
static SomeClass instance;
return instance... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Logging In: Background Details What happens when you log into a website?
I know cookies are stored and some info (what info?) gets sent to the server...but maybe some more detail?
A: Once upon a time, somewhere on the Internet....
*
*Browser: "hey, can I see this web page?, Trouble is, I don't remember speaking ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Interesting Applications of Interfaces Why are interfaces useful?
Actually, I have a [small] idea of why interfaces are useful/necessary but...
What are [interesting or realistic] applications of interfaces?
A: Interfaces are interesting because you can allow 2 classes to implement the same methods. Lets look at an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449444",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Java Static Duplicate: What does the 'static' keyword do in a class?
I've read this post already.
What does the "static" keyword in a method do?
I remember being told that static != clingy...but that is pretty much all I know about this keyword.
A: Static class variables can be thought of as a global class. No ma... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Fast Method to Intersect two Integer Quadratic Beziers? Given two Quadratic Beziers in 2D with integer coordinates, what is the best way to find their intersection point(s)? Also interesting is an early rejection if they do not intersect. If it makes it easier, they can both be assumed to be monotone in both x and y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449449",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Determine 'this week' in T-SQL This is locale specific to the US wherein it considered that the start of a week is Sunday; I want to be able to ask SQL to give me the date of the next Sunday relative to today [getDate()]. If today is Jan 15 it should return Jan 18; if today were Sunday it should return the following... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449475",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: variable button vb.net i declared a global variable button:
Dim button1 As New Button()
Now, i dont know how to add a click event in this button since it is a variable. Do you have any idea how do i do it?
A: AddHandler button1.click, AddressOf MyClickEventHandler (MSDN Documentation)
You have to make sure MyClickE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449480",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What do you call this functional language feature? ok, embarrassing enough, I posted code that I need explained. Specifically, it first chains absolute value and subtraction together, then tacks on a sort, all the while not having to mention parameters and arguments at all, because of the presense of "adverbs" that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449482",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Android: Capturing the return of an activity I have a question regarding launching new activities. It boils down to this.
I have 3 tabs on a view
A) contains gMap activity
B) camera activity
C) some random text fields.
Requirement is that the application runs in Portrait mode.
All 3 tabs work as expected w/ the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449484",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "82"
} |
Q: C++ SQL Sanitization Libraries or Query Builders Offering Sanitization In a project I am working on, I need to insert data into a SQLite3 database via C++. In order to avoid a "little Bobby Tables" incident, I need to sanitize my database inputs. I would like to find a library that does this in C++ rather than rolli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449485",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MMORPG protocol encryption Anyone know what the trend is with MMORPG developers encryption their client/server protocols these days?
The pro's and con's are as follows.
Encrypting protocol:
*
*protects trade secrets regarding client/server protocol to a degree?
*Botting isn't stopped, it is only changed because ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449497",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to send http request in asp.net without waiting for a response and without tying up resources In an ASP.Net application, I need to send some data (urlEncodedUserInput) via http POST to an external server in response to user input, without holding up the page response. It doesn't matter what the response from the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: TSQL puzzle, why is my update not random? I was looking at postgres question and it called for updating a table with random values.
I only noticed it was targeted at postgres after answering it, but in answering it I hit a mystery.
Here is my sample code in question:
create table #Buildings([Use] varchar(50), n in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449512",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Removing characters from strings with LINQ I'm trying to brush up on my LINQ by writing some simple extension methods. Is there any better way to write such a function as below that removes a given list of characters from a string (using LINQ)?
It helps me to think of the extension methods that LINQ relies on first... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449513",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Explain db tag storage method from this post What is the most efficient way to store tags in a database?
It was recommended to store tag tables like this.
Table: Item
Columns: ItemID, Title, Content
Table: Tag
Columns: TagID, Title
Table: ItemTag
Columns: ItemID, TagID
And another SO post said the same thing. Can... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449517",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Excluding System Databases while excecuting sp_databases in SQL Server I am retrieving the database list by executing the sp_databases stored proc. Is there any way I can exclude system databases from this list? I do not want to use the query SELECT name FROM dbo.sysdatabases where dbid > 6.
Thanks
A: sp_databases... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449523",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: PHP5: Some Session files 0 length? I'm seeing a strange situation, that I'm trying to figure out if it's a PHP issue, file issue, or normal operation. I have some users complaining about very fast timeouts on our site (session expires?), and checking the php tmp directory, I see things like this:
-rw------- 1 www-d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449528",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Should consecutive whitespace in an XML file be ignored by an XML reader? At my work we have our own XML classes which build a DOM, but I'm not sure how consecutive whitespace should be handled?
e.g.
<some-text>
Hello World
</some-text>
When this is read into the DOM, should the text node include the consecutiv... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449532",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: CSS: Liquid Bar with Text Won't Expand I have a horizontal bar that has been given a width of 100%. Within the horizontal bar, I have text that is left-aligned within a 978px container. Whenever the browser window is shrunk so that it is less than 978px wide, a scrollbar along the bottom of the page appears. Whene... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449533",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I selectively merge or pick changes from another branch in Git? I'm using Git on a new project that has two parallel -- but currently experimental -- development branches:
*
*master: import of existing codebase plus a few modifications that I'm generally sure of
*exp1: experimental branch #1
*exp2: exper... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1747"
} |
Q: Are technologies like LINQ, WPF, WF just libraries or development changing methodologies Lately, Microsoft keeps coming out with new technologies Linq, WF, WPF, etc... Seems to me that they are presented like technology inovations that completely change the way your applications are designed and coded.
Yet,they are ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449542",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Can I detect XHTML parsing errors using Javascript? When I have a markup error in my XHTML page, Mozilla Firefox displays the "Yellow Screen of Death", showing only a large red error message on a yellow background.
While these errors are rare, they are extremely user-unfriendly.
Is there a way I can detect these usi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449551",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Setup.exe and autorun.inf I have Visual Studio 2008 project on which I added a Setup Project. It generates all files to install the application correctly.
Now I am trying to add an autorun.inf to the cd, which is supposed to start the Setup.exe.
After a lot of attempts and every combinations possible, nothing works,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Scalaris: P2P key-value database - your opinion please Why wouldn't you use Scalaris?
A: I'm not going to use it without a disk persistence / snapshot system. My impression is, that in memory databases are not very reliable. If a cluster has only 2 nodes which can go down for maintenance the data is lost. The same,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449557",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Offline Java Documentation I've finally gotten around to learning Java and am looking for some documentation for Java that I can download and read offline. Something like Sun's stuff but zipped up or as a PDF or CHM.
I'm using Eclipse so something that integrates with that would be nice. It already seems to have som... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449558",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How do I determine the size of an object in Python? How do I get the size occupied in memory by an object in Python?
A: Just use the sys.getsizeof function defined in the sys module.
sys.getsizeof(object[, default]):
Return the size of an object in bytes.
The object can be any type of object.
All built-in objects ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449560",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "983"
} |
Q: How to implement "class versioning" (using different version of the same class) Here is the problem : our main class (say : Contract) change every year. Some properties are added, other are removed. We don't know how it will look next year. It may change a lot or not at all.
On the other hand, we now (new requiremen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Webbased MySQL interface better that phpMyAdmin Is there any webbased interface for MySQL better than phpMyAdmin? I use phpMyAdmin a lot but it is becoming a pain, especially it is slow sometimes.
I'd like to have deep export functionality like phpMyAdmin but more design features
A: Why don't you just use a client... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449570",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Why does Visual Studio give you Page_Load for WebForms as a default? When creating a new WebForm, Visual Studios creates a Page_Load handler in the code behind as a default, which is cool. So for years, I have always put code for doing things like set properties of controls in Page_Load. Recently, I used Reflector... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to rotate 4 (or more) images, fading between each one? I have 4 images, which I want to fade between each other in a loop. I have something like the following:
<img src="/images/image-1.jpg" id="featureImg1" />
<img src="/images/image-2.jpg" id="featureImg2" style="display:none;" />
<img src="/images/image-3.jpg... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Point to localhost\sqlexpress using only localhost Working on a common codebase, one developer is running SQL Server Express 2005 and the other 2 are running SQL Server 2005. Everything is working fine, but the connection strings differ. To maintain common configuration and build scripts we're looking to mask "local... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449607",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: Database and connections I am interested in knowing how databases handle connections that are not explicitly closed by the entity that initiated the connection.
*
*Say I have a database that can accept only 2 concurrent connections at a time. I have a piece of code that opens a connection and never closes it. Thi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449608",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: WPF RichTextBox Performance WPF's RichTextBox control's performance is real slow when a 50KB text document is loaded. Scrolling laggy and pressing Ctrl-A to select all the text takes more than 10 seconds. (This is intantaneous on Notepad).
I'm not doing any fancy bitmap effects. Is this normal? Even typing on an em... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449616",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: How should I close a socket in a signal handler? I'm writing a very simple server that loops forever until Ctrl-C is pressed. I'd like to have the signal handler for ctrl-c close the open sockets and shut down the server, but I don't know what the scope is for a signal handler, and I don't like the idea of declaring... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449617",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Working with USB devices in Mono I have a requirement where I need to detect USB port and read data from Devices. I can see lot of source code for detecting USB ports, but is it possible to read data from devices connected through USB port using C# and Mono? I need this component to run on Mac and Windows.
A: This ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449626",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Are line breaks in XML attribute values allowed? I realise that it's not elegant or desired, but is it allowed (in well-formed XML) for an attribute value in an XML element to span multiple lines?
e.g.
<some-xml-element value="this value goes over....
multiple lines!" />
Yeah I realise there's better ways of writin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449627",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "104"
} |
Q: Handling multiple changesets in source control systems I have a fairly infrequent problem occuring with source control. In the example here the problem was occuring with Perforce, but I suspect the same problem will occur with many SCMs, especially distributed SCMs.
Perforce supports changelists (or changesets if yo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449642",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Count and group by query for counting rows in database table based on 3 to 4 conditions I am running a market survey and all the survey data is saved in the database. I need a query for counting the number of rows in which option "1" is selected for question "1", option "2" for question "1" and so on for all questio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449648",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the difference between DoS and Brute Force attacks? I was reading about DoS attacks on Apache servers but the "Brute Force" word pops up sometimes I know DoS attacks but "Brute Force" seems to be similar, is there a difference or it is just another word of DoS?
A: DoS or Denial of Service is an attempt to m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449650",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to create a copy of a file having length more than 260 characters How to create a copy of a file having length more than 260 characters including file name using vb.net
When we are trying to create a copy using File.Copy method it throws exception as follows:
"The specified path, file name, or both are too long.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Exception while running number of queries concurrently on DB2 We are testing an application specific Design where we need to show progressive counts after firing many queries simultaneously.
When we are firing a single query, we are successfully able to get Results Asynchronously.
But, when we are firing 3-4 queries... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can I host two separate web servers on a LAN to the outside world through 1 IP address? I am a web programmer with a home web dev operation. I have multiple web servers in my house on a FIOS connection. I have my own domain pointed to my router through dyndns.org's custom domain service.
My ISP gives me ONE static I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449663",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Using ActiveRecord and Rails to insert Data into postgresql database get this error: RuntimeError: ERROR C22003 Minteger o I am using Ruby 1.8.6 and rails 2.1.1 (I have tested rails 2.2.2 as well). I have been using Sqlite3 and I recently migrated to Postgresql 8.2.6 for production use. Now this error shows up. T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449665",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: IE Add-on to Bypass Print Dialog - Where to Start? I need to write an add-on/plugin for IE 6/7 that will intercept any Javascript print() call and automatically print the page on the default printer, bypassing the standard print dialog. Unfortunately I know very little about Windows or IE programming (I come from th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449666",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Saving a View as a Photo in iPhone App Is there an easy way to programmatically save a view to the Photos library in an iPhone app?
A: I added these methods to my view's controller class. They save the photo and then pop up an alert box to tell the user whether it succeeded.
- (void)savePhotoOfView:(UIView *)view
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449683",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I monkey-patch an instance method in Perl? I'm trying to monkey-patch (duck-punch :-) a LWP::UserAgent instance, like so:
sub _user_agent_get_basic_credentials_patch {
return ($username, $password);
}
my $agent = LWP::UserAgent->new();
$agent->get_basic_credentials = _user_agent_get_basic_credentials_patc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449690",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: set up website on local machine I have a fast dedicated internet connection and a static IP address at my office. I also have a web site that I want to host on my server machine (win server 2003). I know how to setup a web site through IIS but have no clue how to point my domain to my site and configure my server to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449704",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: Design patterns to avoid A lot of people seem to agree, that the Singleton pattern has a number of drawbacks and some even suggest avoiding the pattern entirely. There's an excellent discussion here. Please direct any comments about the Singleton pattern to that question.
My question: Are there other design pattern... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "111"
} |
Q: Is there a tool for converting VB to a scripting language, e.g. Python or Ruby? I've discovered VB2Py, but it's been silent for almost 5 years. Are there any other tools out there which could be used to convert VB6 projects to Python, Ruby, Tcl, whatever?
A: I doubt there would be a good solution for that since VB6... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449734",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why can’t variables be declared in a switch statement? I want to know more about "Why can’t variables be declared in a switch statement?"
I read the post but i am not getting it exactly.
You can just declare variable inside switch but to decalre and initialize a variable or to declare object of class it gives compli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449736",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Error: The object cannot be deleted because it was not found in the ObjectStateManager Trying to get a handle on Entity Framework here and I am hitting some speed bumps...
I have a Get() method that works fine and has been tested, but my Delete method is not working:
public static void Delete(string name)
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449740",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Dividing workload on several threads I was wondering if anyone knows about a good article which describes dividing workload on to several Threads? Preferebly it would be written for C# but it's really the concept I'm after, so it's not an issue if it's written for a different, similar, language.
I have a problem whe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Where can I find Android source code online? Where can I browse the source code for any Android Open Source Project (AOSP) application (for example the Contacts application)? Is the only way to clone the entire source repository for all of AOSP?
A: 2020: The official AOSP code search https://cs.android.com/
You ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "662"
} |
Q: About mobile game porting I would like to ask a few questions regarding mobile game porting...
Let say if I have a simple 2D C++ game engine and have a PC game based on that engine and I want to port it to different mobile platforms BREW, J2ME, iPhone, Android, Symbian, etc..
Do I need to re-code the engine and the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449770",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: iPhone Development - Setting UIWebView font I have to show rich text that i pull from server, so i'm using UIWebView. Now the problem is that i have no control over the font which is used in UIWebView. How can i change the font to use system font (making it consistent with rest of the application)?
I'm doing somethi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449773",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "46"
} |
Q: How can I split a URL string up into separate parts in Python? I decided that I'll learn Python tonight :)
I know C pretty well (wrote an OS in it), so I'm not a noob in programming, so everything in Python seems pretty easy, but I don't know how to solve this problem:
let's say I have this address:
http://example.c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449775",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: print on dot matrix printer in .net anyone can please tell me the code how to print documents on dot matrix printer in C# windows application.
A: When you print to an inkjet or laser printer, you generally do not use built-in fonts of the printer. You use Windows fonts. What happens is that the printer driver eithe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a way to use errno safely in a multi-threaded application? If you are writing a multi-threaded application that uses system/library calls that make use of errno to indicate the error type, is there a safe way to use errno? If not, is there some other way to indicate the type of error that occurred rather th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449778",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "36"
} |
Q: Recommended JavaScript HTML template library for JQuery? Any suggestions on which HTML template library would go well with JQuery? Googling turns up quite a number of libraries but I'm not sure whether there is a well recognized library that would stand the test of time.
A: There is a reasonable discussion documen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "89"
} |
Q: HTTP authentication logout via PHP What is the correct way to log out of HTTP authentication protected folder?
There are workarounds that can achieve this, but they are potentially dangerous because they can be buggy or don't work in certain situations / browsers. That is why I am looking for correct and clean solut... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "155"
} |
Q: How to I use FixedPage markup on a Content Model control? In WPF, I have tried passing the mark-up of an XPS file's FixedPage to a control that has the Content property (ex. Button.Content = XamlReader.Load(<FixedPage markup>)).
Example of FixedPage markup:
<FixedPage Width="816" Height="1056" xmlns="http://schemas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I show file sizes with commas when getting a directory listing with 'ls -l'? You can do 'ls -l' to get a detailed directory listing like this:
-rw-rw-rw- 1 alice themonkeys 1159995999 2008-08-20 07:01 foo.log
-rw-rw-rw- 1 bob bob 244251992 2008-08-20 05:30 bar.txt
But notice how you have to slid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449803",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Best WPF open source projects I have programmed with WPF for more than a year. When I started there weren't so many examples and guidelines to follow, now the situation is much more better.
I would like to ask you some help in listing the best WPF (open) source code examples or projects that you suggest to study in ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "61"
} |
Q: Providing alternative images if Adobe Flash isn't available Are there any ways providing an alternate GIF/PNG image, in case the user has no Adobe Flash installed and/or deactivated.
I’ve found recommendations, like the following from W3C, which determine via JavaScript the existence of Adobe Flash on the client: W3... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449808",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Virtual functions and performance - C++ In my class design, I use abstract classes and virtual functions extensively. I had a feeling that virtual functions affects the performance. Is this true? But I think this performance difference is not noticeable and looks like I am doing premature optimization. Right?
A: A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449827",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "144"
} |
Q: ASP.NET: Can GridView be used to create a hierarchy? We are using the GridView controls in some pages of our project which we dont want to change drastically, would it be possible to create a hierarchy in a gridview? Can this be achieved by using a GridView inside a Gridview to get the parent - child relation?
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do i combine a list and a form in the same page using django? Am building a Q&A page, sort of stackoverflow kinda page! Am having a bit of a problem trying to render the form. Am pasing 3 objects to the template that renders the page i.e. Question object, Answers related to the question and Answer form object.
I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I use GDB from inside Visual Studio C++ (Express) to debug my GCC Makefile projects? I've a couple of Makefile projects on my visual studio (express) 2005/2008 (doesn't matter for now) to compile some application using the MinGW GCC compiler. I don't want to use the MS compiler because there are features tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Why do we need to use `int main` and not `void main` in C++? Why do we need to use int main and not void main in C++?
A: Main reason for changing
void main() { }
to
int main() { }
in later releases was to notify error occurred in program during execution to operating system on which it running
return 0;
ide... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: My ReSharper Gutter Icons for Unit Tests aren't showing I've installed ReSharper 4.1 and Gallio 3.0.5, but I don't get the gutter icons for unit tests. The tests seem to run fine in the Test Explorer, but I don't have icons next to the tests in code. What could be causing this? I previously had the MbUnit 2.4 ReS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to dynamically create an image with a specified number on it? I have a place holder image saying something like:
Your rating is:
[rating here]
My PHP code is supposed to dynamically insert the rating number where there is a blank space left out for it on the placeholder image. How can I do that?
A: Here's ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449858",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How drag and drop of files is done? as in winamp or vlc player, how to do a file drag and drop? i mean i want to know what sort of coding goes into application? i want to know for c++
A: With com:
Create a class that public extends IDropTarget
Register your class for drops. Do this in WM_CREATE
RegisterDragDrop(hw... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449872",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is it possible to increase the max columns of an Oracle database to store huge arrays? For reasons that are beyond my control I need to store huge arrays (10000+ entries) in database rows, and it has to be easy to access each index of the array individually, which means I'd rather avoid serialization/blobs, if at al... | {
"language": "en",
"url": "https://stackoverflow.com/questions/449882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.