text stringlengths 8 267k | meta dict |
|---|---|
Q: How verbose should validation output be? I have an application that reads a database and outputs alerts to any dependencies that are not being met. My thinking on this issue is "Give the minimum information that points the user to the issue." I have been told by a co-worker that I should be as verbose as possible,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/108947",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using Side-by-Side assemblies to load the x64 or x32 version of a DLL We have two versions of a managed C++ assembly, one for x86 and one for x64. This assembly is called by a .net application complied for AnyCPU. We are deploying our code via a file copy install, and would like to continue to do so.
Is it possibl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/108971",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "61"
} |
Q: How to simulate memory allocation errors My C application uses 3rd libraries, which do their own memory management.
In order to be robust, my application has code to deal with failures of library functions due to lack of free memory.
I would like to test this code, and for this, I need to simulate failures due to la... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Count the number of set bits in a 32-bit integer 8 bits representing the number 7 look like this:
00000111
Three bits are set.
What are the algorithms to determine the number of set bits in a 32-bit integer?
A: This is known as the 'Hamming Weight', 'popcount' or 'sideways addition'.
Some CPUs have a single built-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109023",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "994"
} |
Q: What is the best way to paginate results in php I need to display many pages of news in a site. Should I do the pagination in the database query using LIMIT or with the PHP script after getting all the results?
A: If you want only work with a DBMS that support this than do it on the DBMS. If you want support other ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109027",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: VB.NET - RichTextBox - Apply formatting to selected text I have a RichTextBox control on my form. I also have this button, labeled Bold, that I want, if someone selects text in the RichTextBox, then presses the button, the selected text turns bold. Any way to do that? Simple, everyday task for end users. Thanks.
A:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109032",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL.
Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Countdown timer on ASP.NET page Could you recommend me a way to place a coundown timer on ASP.NET page?
Now I use this code:
Default.aspx
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109064",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I use FlashVars with ActionScript 3.0? I found this guide for using the flash parameters, thought it might be useful to post here, since Flash CS3 lacks a usage example for reading these parameters.
See answers for the link
A: Not sure why his example calls LoaderInfo. The DisplayObject class has its own (re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there a .NET OS abstraction layer to make OS calls work cross-platform? I really want to write .NET apps that run on any platform (PC, Linux and Mac). I am not really concerned about UI capabilities because these are mostly background services. I have heard of MONO and that it allows you to write .NET apps that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Testing all classes which implement an interface in Java Is there anything out there (for Java specifically) that allow you to automatically test the behavior of an interface? As an example, let's say I have a bunch of tests for the Comparable interface, that should apply to anything that implements Comparable. What... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients? Does anyone know of any problems with using WCF to expose a SOAP interface for non .NET clients? For example incompatibilities with other SOAP libraries?
This is so that the SOAP interface can be exposed for third parti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109083",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Stop setInterval call in JavaScript I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event?
I want the user to be able to stop the repeated refresh of data.
A: You can set a new variable and have it incremented by ++ (count up one) e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109086",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1710"
} |
Q: How to get instance variables in Python? Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code:
class hi:
def __init__(self):
self.ii = "foo"
self.kk = "bar"
Is there a way for me to do this:
>>> mystery_method(hi)
["ii", "kk"]
Edit: I o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109087",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "148"
} |
Q: How do you capture stderr, stdout, and the exit code all at once, in Perl? Is it possible to run an external process from Perl, capture its stderr, stdout AND the process exit code?
I seem to be able to do combinations of these, e.g. use backticks to get stdout, IPC::Open3 to capture outputs, and system() to get exi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109124",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "58"
} |
Q: Dynamically created operators I created a program using dev-cpp and wxwidgets which solves a puzzle.
The user must fill the operations blocks and the results blocks, and the program will solve it. I'm solving it using brute force, I generate all non-repeated 9 length number combinations using a recursive algorithm. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109129",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you change the style of a div programmatically How do I change the style (color) of a div such as the following?
"<div id=foo class="ed" style="display: <%= ((foo.isTrue) ? string.Empty : "none") %>">
<%= ((foo.isTrue) ? foo.Name: "false foo") %>"`
A: If you want to alter the color ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109134",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How do you manage a large product backlog? We have a large backlog of things we should do in our software, in a lot of different categories, for example:
*
*New problem areas for our products to solve
*New functionality supporting existing problem areas
*New functionality requested by our existing users
*Usab... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109141",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Best javascript framework for drawing/showing images? What's the best javascript framework for drawing (lines, curves whatnot) on images?
A: jQuery has several plugins available for doing graphics. Raphael is a plugin that uses SVG (for Firefox and other browsers that support SVG), and VML for the IE products. In... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109149",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: .NET Reporting Tutorial Does anyone know a Tutorial for the Reporting in C# .NET. I mean the Reports in "Microsoft.Reporting" Namespace (not Crystal Reports).
A: I know you probably aren't looking for links that you can find on google yourself, but these cover reporting services in great detail and should cover mos... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109154",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Strict vs NonStrict NHibernate cache concurrency strategies This question is about the difference between ReadWrite and NonStrictReadWrite cache concurrency strategies for NHibernate's second level cache.
As I understand it, the difference between these two strategies is relevant when you have a distributed replicat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109179",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Bypass invalid SSL certificate errors when calling web services in .Net We are setting up a new SharePoint for which we don't have a valid SSL certificate yet. I would like to call the Lists web service on it to retrieve some meta data about the setup. However, when I try to do this, I get the exception:
The underl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109186",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "91"
} |
Q: How do I check if a directory is writeable in PHP? Does anyone know how I can check to see if a directory is writeable in PHP?
The function is_writable doesn't work for folders.
Edit: It does work. See the accepted answer.
A: to be more specific for owner/group/world
$dir_writable = substr(sprintf('%o', fileper... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109188",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: Deploying a site from VSS In answer to this question Joel Coehoorn said
Finally, only after the site's gone through a suitable QA process, the production server is updated from source control, not from within visual studio.
Does VSS Explorer have tools for deploying sites (via FTP, I would assume)? I noticed for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109199",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP GD, imagecreatefromstring( ); how to get the image dimensions? Normally I use imagecreatefromjpeg() and then getimagesize(), but with Firefox 3 I need to go round this different. So now im using imagecreatefromstring(), but how do I retreive the image dimensions now?
A: ah yes! i just found the answer on the in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109210",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: What is the best online book service for software development references? I'm a member of ACM, and I have limited access to both Books 24x7 and Safari Books Online, however if I was interested in moving up to a full account for greater access to other books what online book service would you recommend?
A: Safari Bo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109230",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is the best way to paginate results in SQL Server What is the best way (performance wise) to paginate results in SQL Server 2000, 2005, 2008, 2012 if you also want to get the total number of results (before paginating)?
A: Finally, Microsoft SQL Server 2012 was released, I really like its simplicity for a pagi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "574"
} |
Q: Why isn't there a standard memswap function Why doesn't have the c standard a memswap function, which would probably look like:
int memswap(void *ptr1, void *ptr2, size_t nbytes)?
I know it'd be easy to write, but i think the libc could do some awesome tricks to speed it up like some implementations do it for memcp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109249",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Binding TRANSFORM query in Access to a report Whats the best way to bind variable column names to a report field in Access when using a crosstab query?
A: This page has an exhaustive example of setting up a dynamic column ("crosstab"-type) report in Access.
http://www.blueclaw-db.com/report_dynamic_crosstab_field.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109251",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: WinForms context menu - not open in certain parts / detect underlying control I have a .NET 2.0 Windows Forms application. On this app there is a Form control with a Menu bar and a status bar. Also there's a ListView on this form.
If I add a context menu to this form, the context menu will open when the user right c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109262",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: databinding a property to either of two dependency properties I have two custom controls that are analogous to a node and the control that draws links between nodes.
I would like to have both controls written as much in xaml as possible. The link stores both nodes as dependency properties, and I use databinding t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109275",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: In ASP.NET how you get the physcial file path when HttpContext.Current is NULL? I'm working with DotNetNuke's scheduler to schedule tasks and I'm looking to get the physical file path of a email template that I created. The problem is that HttpContext is NULL because the scheduled task is on a different thread and t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109280",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: BSCMAKE: error BK1506 : cannot open file StdAfx.sbr No such file or directory I have converted one of my VS2006 projects into VS2008 and when trying to build the project in VS2008 I get the above error. What is .sbr file ? and how can I fix the compile error? Any help is hugely appreciated.
A: You can go to:
Config... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109281",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Testing rendering of a given layout with RSpec & Rails Is it possible to test the use of a given layout using RSpec with Rails, for example I'd like a matcher that does the following:
response.should use_layout('my_layout_name')
I found a use_layout matcher when Googling but it doesn't work as neither the response ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109284",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: What would you like to see in an beginner's ASP.NET security book This is a shameless information gathering exercise for my own book.
One of the talks I give in the community is an introduction to web site vulnerabilities. Usually during the talk I can see at least two members of the audience go very pale; and this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109293",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Are writes from within a Tomcat 6 CometProcessor non-blocking I have a CometProcessor implementation that is effectively doing a Multicast to a potentially large number of clients. When an event occurs that needs propagated to to all the clients, the CometProcessor will need to loop through the list of clients writ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109294",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.Net GridView Size Formatting I have an ASP.Net GridView control that I need to remain a fixed size whether there are 0 records or n records in the grid. The header and the footer should remain in the same position regardless of the amount of data in the grid. Obviously, I need to implement paging for larger da... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109305",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why use c strings in c++? Is there any good reason to use C-strings in C++ nowadays? My textbook uses them in examples at some points, and I really feel like it would be easier just to use a std::string.
A: Because that's how they come from numerous API/libraries?
A: Let's say you have some string constants in yo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109317",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Using .Net what limitations (if any) are there in using the XmlSerializer? Using .Net what limitations (if any) are there in using the XmlSerializer?
For example, can you serialize Images to XML?
A: Another problem is that calling the constructor of XmlSerializer will compile code at runtime and will generate a tem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109318",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: error PRJ0003 : Error spawning 'cl.exe' I converted VS2006 vc++ project to VS2008. When compiling I get the above error. How do i fix it? am I missing this exe ?
A: cl.exe is VS2008 (and any other VS) C/C++ compiler, so check for more detailed error message why it cannot be spawned. Be sure you've installed C++ lan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109319",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: PostgreSQL "DESCRIBE TABLE" How do you perform the equivalent of Oracle's DESCRIBE TABLE in PostgreSQL with psql command?
A: In addition to the PostgreSQL way (\d 'something' or \dt 'table' or \ds 'sequence' and so on)
The SQL standard way, as shown here:
select column_name, data_type, character_maximum_length, col... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2103"
} |
Q: Batching in REST With web services it is considered a good practice to batch several service calls into one message to reduce a number of remote calls. Is there any way to do this with RESTful services?
A: If you really need to batch, Http 1.1 supports a concept called HTTP Pipelining that allows you to send multip... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109343",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: All possible uses for the Application.SysCmd Method Is there a place to find all possible uses of the syscmd method in MS Access? I know Microsoft has a developer reference, but I have found there are many other uses for this method that are not listed here.
A: Access itself provides an interface to the full object... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109345",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Bezier clipping I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several existing algorithms doing the same with polygons, listed he... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109364",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Sort a Map by values I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.
Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109383",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1848"
} |
Q: Can you do Desktop Development using JavaScript? I know there's JScript.NET, but it isn't the same as the JavaScript we know from the web.
Does anyone know if there are any JavaScript based platforms/compilers for desktop development? Most specifically Windows desktop development.
A: "node-webkit is an app runtime ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109399",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: What are the key strengths of ASP.NET Webforms? What are the key strengths of ASP.NET Webforms (2.0-3.5)? I'm not looking for comparisons to other frameworks, I'm just am looking for feedback on ASP.NET as it stands today.
A: One key strength (to some) is a drag-and-drop development environment integrated into Visu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109409",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Reading datagridview I populated a datagridview from a datatable. How do I read from the datagridview when the application is running?
A: how did you populate it? is the DataSource something useful like a BindlingList?
If it is then something like:
BindingSource bindingSource = this.dataGridView1.DataSource as Bin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109417",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the easiest way for a non-programmer to learn the basics of iPhone App creation? I'm primarily a designer, with a fairly high level of understanding of CSS and HTML. I have an idea for a very simple iPhone app, largely involving a timer, an animated graphic, and some sound. If I get more advanced there could... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109429",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What not to test when it comes to Unit Testing? In which parts of a project writing unit tests is nearly or really impossible? Data access? ftp?
If there is an answer to this question then %100 coverage is a myth, isn't it?
A: The goal is not 100% code coverage nor is it 80% code coverage. A unit test being easy to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109432",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: PHP replace double backslashes "\\" to a single backslash "\" Okay so im working on this php image upload system but for some reason internet explorer turns my basepath into the same path, but with double backslashes instead of one; ie:
C:\\Documents and Settings\\kasper\\Bureaublad\\24.jpg
This needs to become C:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109444",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Getting a FILE* from a std::fstream Is there a (cross-platform) way to get a C FILE* handle from a C++ std::fstream ?
The reason I ask is because my C++ library accepts fstreams and in one particular function I'd like to use a C library that accepts a FILE*.
A: Well, you can get the file descriptor - I forget wheth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109449",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "80"
} |
Q: Reporting Services Line Graph: How to better control the smoothed curve I have a report that I built for a client where I need to plot x 0-100, y 0-100. Let's imagine I have these points:
0, 0
2, 24
50, 70
100, 100
I need to represent these as a smoothed line chart, as the application of it is a dot gain g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109464",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Caching paginated results, purging on update - how to solve? I've created a forum, and we're implementing an apc and memcache caching solution to save the database some work.
I started implementing the cache layer with keys like "Categories::getAll", and if I had user-specific data, I'd append the keys with stuff li... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109480",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is it bad design to use table tags when displaying forms in html? I keep hearing that div tags should be used for layout purposes and not table tags. So does that also apply to form layout? I know a form layout is still a layout, but it seems like creating form layouts with divs requires more html and css. So with t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109488",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Problems with accessing FlashVars via parameters in AS3 I keep getting compiler errors when I try to access flashVars in an AS3 class.
Here's a stripped version of the code:
package myPackage {
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.Sprite;
public class myClass {
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109491",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Rails and Gmail SMTP, how to use a custom from address I've got my Rails (2.1) app setup to send email via Gmail, however whenever I send an email no matter what I set the from address to in my ActionMailer the emails always come as if sent from my Gmail email address. Is this a security restriction they've put in p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109520",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I test that a Rails Helper defines a method? I am creating a Rails plugin and it is dynamically adding a method to a Helper. I just want to ensure that the method is added. How can I see if the Helper responds to the method name?
A: Try this:
def test_that_foo_helper_defines_bar
o = Object.new
assert !o.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109528",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I programmatically manage iptables rules on the fly? I need to query existing rules, as well as being able to easily add and delete rules. I haven't found any API's for doing this. Is there something that I'm missing?
The closest I've come to a solution is using iptables-save | iptables-xml for querying and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109553",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "46"
} |
Q: How do I access cookies within Flash? I'm looking to grab cookie values for the same domain within a Flash movie. Is this possible?
Let's see I let a user set a variable foo and I store it using any web programming language. I can access it easily via that language, but I would like to access it via the Flash movi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109580",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Speed up images in Tomcat 6 In tomcat 6 i have a servlet running openbluedragon, everything compiles and servers up quik, with the exception of images, they really lag significantly. Any suggestions optimization for image serving?
Here is my server.xml:
<Service name="Catalina">
<Connector port="8009" pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109592",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Finding SQL queries in compiled app I have just inherited a server application, however it seems that the only copy of the database is corrupt and the working version is gone, so is it possible to find what queries the application is running so I can try to rebuild the tables?
Edit: I have some files with no extensi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109594",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I position the content of a tabpage in Silverlight? When I place a control on a tabpage in Silverlight the control is placed ~10 pixels down and ~10 pixels right. For example, the following xaml:
<System_Windows_Controls:TabControl x:Name=TabControlMain Canvas.Left="0" Canvas.Top="75" Width="800" Height="525"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109608",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How would you achieve this table based layout using CSS instead of HTML tables? I want the following layout to appear on the screen:
FieldName 1 [Field input 1]
FieldName 2 is longer [Field input 2]
. .
. .
FieldName N [Field input N]
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: What are the bigger hurdles to overcome migrating from Winforms to WPF? I've been developing Winforms applications in C# for a few years now and have been interested in moving future development toward WPF, mainly because of the positive things I've been hearing about it. But, I'm wondering what sort of hurdles oth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109620",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Finding the right VPS The market is flooded with VPS (virtual private server) hosting options. It seems everyone and their mother has a overloaded server in his/her closet. Enterprise options always seem priced insanely high, which make the ones that are cheap and claim enterprise level seem shaky.
What do you loo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109631",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: C pointer assignment behavior temp2, temp1 are pointers to some struct x:
struct FunkyStruct x;
struct FunkyStruct *temp1 = &x, *temp2 = &x;
Now, after execution of following lines:
temp2=temp1;
temp1=temp1->nxt;
...Will temp2 and temp1 still point to the same memory location? If not, please explain why they would... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How do you do very quick (and dirty) estimations for coding tasks? So you've just been put on the spot by The Boss.
You've got 15 minutes to come up with a back of the envelope estimate for the addition of some new feature. Your boss (fortunately) recognizes that you can't provide an accurate estimate in that time s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109666",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: IoC, Where do you put the container? I'm using castle windsor for a pet-project I'm working on. I'm starting to notice that I need to call the IoC container in different places in my code to create new objects. This dependency on the container makes my code harder to maintain.
There are two solutions I've used to so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109668",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Python signal woes: SIGQUIT handler delays execution if SIGQUIT received during execution of another signal handler? The following program is very simple: it outputs a single dot each half a second. If it recieves a SIGQUIT, it proceeds to output ten Qs. If it recieves a SIGTSTP (Ctrl-Z), it outputs ten Zs.
If it re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109705",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do the likely/unlikely macros in the Linux kernel work and what is their benefit? I've been digging through some parts of the Linux kernel, and found calls like this:
if (unlikely(fd < 0))
{
/* Do something */
}
or
if (likely(!err))
{
/* Do something */
}
I've found the definition of them:
#define like... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109710",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "433"
} |
Q: Multiple Constructors with complex logic In C#, if you have multiple constructors, you can do something like this:
public MyClass(Guid inputId, string inputName){
// do something
}
public MyClass(Guid inputId): this(inputId, "foo") {}
The idea is of course code reuse. However, what is the best approach when th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109717",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Unit-testing COM written in .NET Is there a way to unit-test COM-visible .NET assemblies from .NET (not via direct .NET assembly reference)? When i add reference in my test project to the COM component whitten in .NET it complains.
A: There's always vbunit. Unit testing vb code (vb classic / VB6) and com objects is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to branch a virtual server in Hyper-V? We use Hyper-V extensively in our development environment. Each developer has a virtual server that they own and then we have a bunch of build, test, R&D, and staging virtual servers.
Is there any documented or best practice way to duplicate a virtual machine in Hyper-V?
W... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: salient concerns and questions to consider in designing a website content management system I'm designing my website and was curious, before I go rip someone else's ideas, what were the salient considerations and questions one should ask in designing a database?
A: I think the most important question is, "Why are ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109736",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Update a backend database on software update with Java With which tool / library it is possible to update an existing database structure. On the update of the software it is also needed to change the database. Because there can be different versions of the software it should compare the current status with the targe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Creating a shiny Graphic/Gloss Effect I would like to programmatically create a gloss effect on an Image, kinda like on the Apple-inspired design that the Web has adopted when it was updated to 2.0 Beta.
Essentially this:
example icons http://nhc.hcmuns.googlepages.com/web2_icons.jpg
Now, I see two approaches here: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109753",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Rails ar_mailer fails to send emails I've just switched an application to use ar_mailer and when I run ar_sendmail (after a long pause) I get the following error:
Unhandled exception 530 5.7.0 Must issue a STARTTLS command first. h7sm16260325nfh.4
I am using Gmail SMTP to send the emails and I haven't changed any o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to setup Trac to run at / with Lighttpd on a subdomain I have the following config in my lighttpd.conf:
$HTTP["host"] == "trac.domain.tld" {
server.document-root = "/usr/home/daniels/trac/htdocs/"
fastcgi.server = ( "/trac" =>
( "trac" =>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Defining objects when using Jaxer I've been playing with Jaxer and while the concept is very cool I cannot figure out how to define objects that are available on both the client and the server. None of the examples I can find define objects at all.
I'd like to be able to define an object and specify which methods wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you serialize javascript objects with methods using JSON? I am looking for an enhancement to JSON that will also serialize methods. I have an object that acts as a collection of objects, and would like to serialize the methods of the collection object as well. So far I've located ClassyJSON. Any thoughts?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to logically organize recurring tasks? What's the best way to create recurring tasks?
Should I create some special syntax and parse it, kind of similar to Cronjobs on Linux or should I much rather just use a cronjob that runs every hour to create more of those recurring tasks with no end?
Keep in mind, that you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109776",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Uniq by object attribute in Ruby What's the most elegant way to select out objects in an array that are unique with respect to one or more attributes?
These objects are stored in ActiveRecord so using AR's methods would be fine too.
A: I had originally suggested using the select method on Array. To wit:
[1, 2, 3, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109781",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "141"
} |
Q: Use of the Exception class in c# Errors that occur deep down in a data access layer or even higher up, (say within ADO.net operations for example) rarely make much sense to an end user. Simply bubbling these errors up to a UI and displaying them will usually achieve nothing except frustration for an end user.
I have... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109790",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is the current state of art in Linux virtualization technology? What VM technologies exist for Linux, their pros and cons, and which is recommended for which application?
Since this kind of question can be asked for X other than "VM technologies for Linux", and since the answer changes with progress, I suggest ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109797",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Database Choice for a C# 2008 front end I was wondering what and why you would choose to be able to make a database that can support no more than 100 users with no more than 10 using it at once with a Visual Studio 2008 C# Windows Form front end to access it by. I have to access the database over a network connectio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109810",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Programmatically determine video file format? Ok, I get the basics of video format - there are some container formats and then you have core video/audio formats. I would like to write a web based application that determines what video/audio codec a file is using.
How best can I programmatically determine a video cod... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109815",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Should I bind directly to objects returned from a webservice? Should I bind directly to objects returned from a webservice or should I have client-side objects that I bind to my gridcontrols? For instance if I have a service that returns object Car should I have a client side Car object that I populate with values f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109825",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Not getting emails from ExceptionNotifier I followed this tutorial on configuring the Rails plugin ExceptionNotifier.
I know that I have ActionMailer configured correctly because I am getting mail from other forms. I even have local_addresses.clear set so that it should be delivering mail no matter what.
I am using ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Object Memory Analysis in .NET Is there a tool or a way to find out how much memory consumed by each DLL or object in .NET?
The more detail it analyzes the better. Thanks.
A: You could try CLR Profiler which is free, or maybe the trial version of ANTS Profiler.
A: .NET Memory Profiler should allow you to do that: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Auto-format structured data (phone, date) using jQuery plugin (or failing that vanilla JavaScript) I like jQuery and I was wondering if anyone have used a good plugin or (non-jQuery) JavaScript library that allows for auto-formatting of structured fields like phone numbers or dates. I know of the jquery-ui-datapick... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Where can I find a complete reference of the ncurses C API? Where can I find a complete reference of the ncurses C API?
A: The documentation that comes with the library actually isn't that bad.
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/
A: You can buy this book. I have it and recommend: John Strang, Programm... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109855",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: PHP with AWASP framework Who here is using WASP (http://wasp.sourceforge.net/content/) to in real world applications? What impressions do you have? Good? Bad? If you can provide any inputs, how good it is comparing with rails for example.
I'm really looking for MVC frameworks for PHP
Update: This comparation I foun... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109858",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What does "DateTime?" mean in C#? I am reading a .NET book, and in one of the code examples there is a class definition with this field:
private DateTime? startdate
What does DateTime? mean?
A: it basically gives you an extra state for primitives. It can be a value, or it can be null. It can be usefull in situatio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "77"
} |
Q: Converting PostgreSQL database to MySQL I've seen questions for doing the reverse, but I have an 800MB PostgreSQL database that needs to be converted to MySQL. I'm assuming this is possible (all things are possible!), and I'd like to know the most efficient way of going about this and any common mistakes there are t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109861",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is there a Perl solution for lazy lists this side of Perl 6? Has anybody found a good solution for lazily-evaluated lists in Perl? I've tried a number of ways to turn something like
for my $item ( map { ... } @list ) {
}
into a lazy evaluation--by tie-ing @list, for example. I'm trying to avoid breaking down and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109880",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to return JSON from a HandleError filter? aspnet mvc has the HandleError filter that will return a view if an error occurs, but if an error occurs when calling a JsonResult Action how can I return a JSON object that represents an error?
I don't want to wrap the code in each action method that returns a JsonResul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109883",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Regular expression to match only the first file in a RAR file set To see what file to invoke the unrar command on, one needs to determine which file is the first in the file set.
Here are some sample file names, of which - naturally - only the first group should be matched:
yes.rar
yes.part1.rar
yes.part01.rar
yes.p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Multithreading in visual basic 6.0 How to implement multi-threading in visual basic 6.0. It would be great if someone can give an example.
A: If the problem that you are trying to solve is a long calculation and you want to keep the UI responsive, then one possibility is to frequently call the DoEvents function wit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109931",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: linq equivalent of 'select *' sql for generic function? I've got a generic<> function that takes a linq query ('items') and enumerates through it adding additional properties. How can I select all the properties of the original 'item' rather than the item itself (as the code below does)?
So equivalent to the sql: se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/109934",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.