text stringlengths 8 267k | meta dict |
|---|---|
Q: .NET currency formatter: can I specify the use of banker's rounding? Does anyone know how I can get a format string to use bankers rounding? I have been using "{0:c}" but that doesn't round the same way that bankers rounding does. The Math.Round() method does bankers rounding. I just need to be able to duplicate how... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128443",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Calling 32bit Code from 64bit Process I have an application that we're trying to migrate to 64bit from 32bit. It's .NET, compiled using the x64 flags. However, we have a large number of DLLs written in FORTRAN 90 compiled for 32bit. The functions in the FORTRAN DLLs are fairly simple: you put data in, you pull d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "54"
} |
Q: Best Practices for reusing code between controllers in Ruby on Rails I have some controller methods I'd like to share. What is the best practice for doing this in ruby on rails? Should I create an abstract class that my controllers extend, or should I create module and add it in to each controller? Below are the con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128450",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "85"
} |
Q: Typical Kimball Star-schema Data Warehouse - Model Views Feasible? and How to Code Gen I have a data warehouse containing typical star schemas, and a whole bunch of code which does stuff like this (obviously a lot bigger, but this is illustrative):
SELECT cdim.x
,SUM(fact.y) AS y
,dim.z
FROM fact
INNER JOIN ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128456",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Use clipboard from VBScript I am looking for a method to place some text onto the clipboard with VBScript. The VBScript in question will be deployed as part of our login script. I would like to avoid using anything that isn't available on a clean Windows XP system.
Edit:
In answer to the questions about what this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128463",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: What's the best way to upgrade from Django 0.96 to 1.0? Should I try to actually upgrade my existing app, or just rewrite it mostly from scratch, saving what pieces (templates, etc) I can?
A: Although this depends on what you're doing, most applications should be able to just upgrade and then fix everything that br... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128466",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How do I write a working IThumbnailProvider for Windows Vista I have written a thumbnail provider following the interfaces specified on MSDN. However, I have been unable to figure out how to register it in a way that Vista actually calls into it. Has anyone gotten a thumbnail provider working for Vista? Sample co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128470",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Should import statements always be at the top of a module? PEP 8 states:
Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.
However if the class/method/function that I am importing is only used in rare cases, surely it is more effi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128478",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "514"
} |
Q: Recovering browser textareas Is there a way to recover the contents of a browser textarea? Say, you've typed a long post and then accidentally clicked on a link. Then when you come back, the textfields tantalizingly retain the text you typed in, but the textarea is blank. Where does IE and Firefox store the stuff th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128480",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I make ImageMagick talk to Ghostscript I am on Windows XP.
I am using ImageMagick (MagickNet) to convert PDF's to TIF's.
My problem is that when I load a PDF in the MagicNet.Image object, it doesn't throw an error, but when I look at the properties, it is obvious it didn't load the PDF (it doesn't contain a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128499",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Ruby error "Superclass mismatch for for class Cookie" from cgi.rb I've just updated my ruby installation on my gentoo server to ruby 1.8.6 patchlevel 287 and have started getting an error on one of my eRuby apps. The error given in the apache error_log file is:
[error] mod_ruby: /usr/lib/ruby/1.8/cgi.rb:774: supercl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128502",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Compile-time error for NotSupportedException in subclass function If I have a subclass that has yet to implement a function provided by the base class, I can override that function and have it throw a NotSupportedException. Is there a way to generate a compile-time error for this to avoid only hitting this at runti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128512",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Modify config file based on build constants I have an application dependent on some internal web services, and so we want our development and staging configurations to point to the development and staging servers for the web services.
Right now, this means manually editing my app.config file to point to the appropri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128513",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Any business examples of using Markov chains? What business cases are there for using Markov chains? I've seen the sort of play area of a markov chain applied to someone's blog to write a fake post. I'd like some practical examples though? E.g. useful in business or prediction of stock market, or the like...
Edit:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128517",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad? We have our JBoss and Oracle on separate servers. The connections seem to be dropped and is causing issues with JBoss. How can I have the JBoss reconnect to Oracle if the connection is bad while we figure out why the conn... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128527",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: PHP Async Web Services How do I make an asynchronous call to a web service using the PHP SOAP Extension?
A: My immediate answer should be: You can't.
PHP does not have threading abilities that can be used in "userland".
Now if you really want to do it, there are some ways you can go around it:
*
*Use the exec fu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128537",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: SQL Anywhere 11 (Sybase) with Entity Framework in Visual Studio SP1? Well, the question is pretty much in the title. I've just installed Visual Studio SP1, and now when I want to import a Entity Model from a database, it doesn't display the SQL Anywhere provider anymore.
Does anyone know if there is a patch or some ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128543",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: In ClearQuest, How do I generate a query in SQL Editor that allows me to prompt the user for a value? I generate a ClearQuest query using the Query Wizard. In the Query Editor, I am able to select a filter for a given field. However, I want to refine the query using the SQL Editor, but then I loose the ability to ha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there a way to Categorize my custom controls in the toolbox? I have built a number of asp.net servercontrols into a class library, & I would like them to be grouped a certain way when the other members of my team reference my dll. Is that possible? How?
A: There's a blog here that discusses how to add controls... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128558",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: When do I use the PHP constant "PHP_EOL"? When is it a good idea to use PHP_EOL?
I sometimes see this in code samples of PHP. Does this handle DOS/Mac/Unix endline issues?
A: From main/php.h of PHP version 7.1.1 and version 5.6.30:
#ifdef PHP_WIN32
# include "tsrm_win32.h"
# include "win95nt.h"
# ifdef PHP_EX... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128560",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "415"
} |
Q: Registering a custom win32 window class from c# I have a new application written in WPF that needs to support an old API that allows it to receive a message that has been posted to a hidden window. Typically another application uses FindWindow to identify the hidden window using the name of its custom window class.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128561",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: POSTing to webservice in .net 3.5 solution I'm at my wit's end here. I'm trying to use an auto-complete extender from the asp.net ajax extensions toolkit, which is filled from a bog-standard webservice. The application is a .net 3.5 web site, hosting the webservice in a subdirectory (real, not virtual).
Whenever I t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128570",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using property() on classmethods I have a class with two class methods (using the classmethod() function) for getting and setting what is essentially a static variable. I tried to use the property() function with these, but it results in an error. I was able to reproduce the error with the following in the interpr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128573",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "282"
} |
Q: How do I define my own errno values? When developing a module (device driver, middleware, etc...) that will run in the kernel space, we would like to have some way to capture the reason an operation might fail.
In VxWorks, The errno mechanism seems to be a good way to do this.
Is it possible to define my own errno ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Parsing XML with namespaces using jQuery $().find I'm trying to get the contents of a XML document element, but the element has a colon in it's name.
This line works for every element but the ones with a colon in the name:
$(this).find("geo:lat").text();
I assume that the colon needs escaping. How do I fix this?
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128580",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Recursive descent parsing - from LL(1) up The following simple "calculator expression" grammar (BNF) can be easily parsed with the a trivial recursive-descent parser, which is predictive LL(1):
<expr> := <term> + <term>
| <term> - <term>
| <term>
<term> := <factor> * <factor>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128584",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do you incentivize good code? Are there any methods/systems that you have in place to incentivize your development team members to write "good" code and add comments to their code? I recognize that "good" is a subjective term and it relates to an earlier question about measuring the maintainability of code as on... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128586",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: In a .Net winforms application, how do I obtain the path the current user's temp folder? Seems so basic, I can't believe I don't know this! I just need a scratch folder to dump some temporary files to. I don't care if it gets wiped out between usages or not, and I don't think I should have to go through the hassle o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128588",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: File-size format provider Is there any easy way to create a class that uses IFormatProvider that writes out a user-friendly file-size?
public static string GetFileSizeString(string filePath)
{
FileInfo info = new FileInfo(@"c:\windows\notepad.exe");
long size = info.Length;
string sizeString = size.ToStr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128618",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "72"
} |
Q: Disable all table constraints in Oracle How can I disable all table constrains in Oracle with a single command?
This can be either for a single table, a list of tables, or for all tables.
A: It's not a single command, but here's how I do it. The following script has been designed to run in SQL*Plus. Note, I've purp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128623",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "98"
} |
Q: Stand-alone text editor with Visual Studio editor functionality Is anyone aware of any text editors with Visual Studio editor functionality? Specifically, I'm looking for the following features:
CTRL+C anywhere on the line, no text selected -> the whole line is copied
CTRL+X or SHIFT+DEL anywhere on the line, no tex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to use system environment variables in VS 2008 Post-Build events? How do I use system environment variables in my project post-build events without having to write and execute an external batch file? I thought that it would be as easy as creating a new environment variable named LHDLLDEPLOY and writing the foll... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128634",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: .Net Data structures: ArrayList, List, HashTable, Dictionary, SortedList, SortedDictionary -- Speed, memory, and when to use each? .NET has a lot of complex data structures. Unfortunately, some of them are quite similar and I'm not always sure when to use one and when to use another. Most of my C# and VB books talk ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128636",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "223"
} |
Q: Menu control CSS breaks when inside UpdatePanel I have a menu control inside of an updatepanel. When I hover over a selected item, and then move back off of it, the css class gets set to staticSubMenuItem instead of staticSubMenuItemSelected. Is there a fix for this?
<asp:UpdatePanel runat="server">
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128658",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: AJAX.NET Reorderlist Control - "It does not a DataSource and does not implement IList." I keep getting this error when trying to re-order items in my ReorderList control.
"Reorder failed, see details below.
Can't access data source. It does not a DataSource and does not implement IList."
I'm setting the datasource ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128659",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I make Ruby's SOAP::RPC::Driver work with self signed certificates? How can I prevent this exception when making a soap call to a server that is using a self signed certificate?
require "rubygems"
gem "httpclient", "2.1.2"
require 'http-access2'
require 'soap/rpc/driver'
client = SOAP::RPC::Driver.new( url, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128660",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the most efficient way to save a byte array as a file on disk in C#? Pretty simple scenario. I have a web service that receives a byte array that is to be saved as a particular file type on disk. What is the most efficient way to do this in C#?
A: Not sure what you mean by "efficient" in this context, but I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128674",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "71"
} |
Q: How to setup non-admin development in Visual Studio 2005 and 2003 We have been given the directive to make sure that when we develop we are running out of the administrator and poweruser groups to prevent security holes. What are the steps to take to make this possible, but still be able to debug, code, and install... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128687",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Doing CRUD in Turbogears Are there any good packages or methods for doing extensive CRUD (create-retrieve-update-delete) interfaces in the Turbogears framework. The FastDataGrid widget is too much of a black box to be useful and CRUDTemplate looks like more trouble than rolling my own. Ideas? Suggestions?
A: You sh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Best java open source toolkit to visualize a GML fragment I'm looking for a way to visualize a piece of GML I'm receiving. What is the best freely available java library to use for this task?
A: GeoTools provides a library for reading GML files. They also provide UI components for displaying geospatial formats the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128699",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Best tool for Software System Diagramming Over the years, I have tried many times to find a good, easy to use, cross platform tool for some basic software system diagramming. The UML tools I have tried seemed to get in my way more than help. So far, the solution I keep returning to is Visio, which is both Windows-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128710",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Is there a way to have class variables with setter/getter like virtual variables? I am embedding Ruby into my C project and want to load several files that define a class inherited from my own parent class. Each inherited class needs to set some variables on initialization and I don't want to have two different vari... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Technology Themed Gift Basket For customer service week this year, I have the privileged task of creating a technology themed gift basket. I'm trying to keep the basket under $50 as I have a bluetooth keyboard/mouse combo that I'll be adding to it. Besides canned air and monitor wipes, are there any other recommenda... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: AIX 5.3: How to backup full machine to single bootable tape? Is it possible to use AIX's mksysb and savevg to create a bootable tape with the rootvg and then append all the other VGs?
A: Answering my own question:
To backup, use a script similar to this one:
tctl -f/dev/rmt0 rewind
/usr/bin/mksysb -p -v /dev/rmt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Web Services framework versus a custom XML over HTTP protocol? I am looking for specific guidelines for when to use Web Services frameworks versus a well-documented custom protocol that communicates using XML over HTTP.
I am less concerned about performance than I am about maintainability and ease-of-development bot... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Pretty URLs for search pages I really enjoy having "pretty" URLs (e.g. /Products/Edit/1 instead of /products.aspx?productID=1) but I'm at a loss on how to do this for pages that let you search by a large number of variables.
For instance, let's say you have a page that lets a user search for all products of a partic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128796",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Problems adding a COM component reference to a VB.NET project I have a third party COM dll that I'm trying to add to a vb.net (2008 express) project. I put the dll in C:\WINDOWS\system32\ and registered it with "regsvr32 vxncom.dll". When I go to projects > add reference and go to the COM tab it shows up in the list... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128807",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Does Django support multi-value cookies? I'd like to set a cookie via Django with that has several different values to it, similar to .NET's HttpCookie.Values property. Looking at the documentation, I can't tell if this is possible. It looks like it just takes a string, so is there another way?
I've tried passing it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128815",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: JavaScript intellisense in Visual Studio 2008 Have you guys and gals got any tips or hacks for making the most out of the JavaScript intellisense options in Visual Studio 2008?
Visual Studio shows me the "namespaces" and uses the documentation features (<param> and <summary>). I have not been able to get the <return... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Why is try {...} finally {...} good; try {...} catch{} bad? I have seen people say that it is bad form to use catch with no arguments, especially if that catch doesn't do anything:
StreamReader reader=new StreamReader("myfile.txt");
try
{
int i = 5 / 0;
}
catch // No args, so it will catch any exception
{}
read... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128818",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "205"
} |
Q: SQL sp_help_operator Anyone know what group I need to belong to show up in the sp_help_operator list?
A: Judging from the docs for sp_help_operator, it looks like you need to explicitly add/remove operators using sp_add_operator and sp_delete_operator.
http://msdn.microsoft.com/en-us/library/aa238703(SQL.80).aspx
| {
"language": "en",
"url": "https://stackoverflow.com/questions/128830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best Method to Spawn Process from SQL Server Trigger How would I go about spawning a separate process using a SQL Server 05/08 trigger? Ideally, I would like to spawn the process and have SQL Server not wait on the process to finish execution. I need to pass a couple parameters from the insert that is triggering the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I run a command in a loop until I see some string in stdout? I'm sure there's some trivial one-liner with perl, ruby, bash whatever that would let me run a command in a loop until I observe some string in stdout, then stop. Ideally, I'd like to capture stdout as well, but if it's going to console, that might... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Is this a proper way to get a WebProfile? I have a user reporting that when they use the back button to return to a web page that they come back as a different person. It seems like they may be accessing a different users profile.
Here are the important parts of the code:
//here's the code on the web page
public st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to compute the hashCode() from the object's address? In Java, I have a subclass Vertex of the Java3D class Point3f. Now Point3f computes equals() based on the values of its coordinates, but for my Vertex class I want to be stricter: two vertices are only equal if they are the same object. So far, so good:
class ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128888",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: setPrimitiveValue:forKey: and to-many relationships Apple's documentation on -setPrimitiveValue:forKey: is vague in two ways when using it to manage to-many relationships.
First they state:
If you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail.
Eventually?! What does that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128894",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Do you use a query handler? If so, what tasks does it perform for you? Several months ago my work deployed an in-house function that wraps the standard, php, mysql_query() function with additional options and abilities. A sample feature would be some handy debugging tools we can turn on/off.
I was wondering how pop... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128914",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Extreme Sharding: One SQLite Database Per User I'm working on a web app that is somewhere between an email service and a social network. I feel it has the potential to grow really big in the future, so I'm concerned about scalability.
Instead of using one centralized MySQL/InnoDB database and then partitioning it w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: Sharepoint : Is there a webpart filter that supports wildcards? I have a document library with a custom column named "compound" which is just text.
I want to put a filter (input text box) on that document library page so the view shows only the items where the compound column contains my typed-in text. Optimally, w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What's the effect of adding 'return false' to a click event listener? Many times I've seen links like these in HTML pages:
<a href='#' onclick='someFunc(3.1415926); return false;'>Click here !</a>
What's the effect of the return false in there?
Also, I don't usually see that in buttons.
Is this specified anywhere? ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128923",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "418"
} |
Q: C# Day from Week picker component This question is for C# 2.0 Winform.
For the moment I use checkboxes to select like this : Monday[x], Thuesday[x]¸... etc.
It works fine but is it a better way to get the day of the week? (Can have more than one day picked)
A: Checkboxes are the standard UI component to use when... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Perl or Python script to remove user from group I am putting together a Samba-based server as a Primary Domain Controller, and ran into a cute little problem that should have been solved many times over. But a number of searches did not yield a result. I need to be able to remove an existing user from an existing ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128933",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Cap invoke and sudo I want to install a gem on all my application servers, but gem install requires sudo access - how can I enable sudo only for running this capistrano command?
In other words, I don't wish to use sudo for all my deployment recipes, just when I invoke this command on the command line.
A: Found it ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What good template language is supported in JavaScript? Templates are a pretty healthy business in established programming languages, but are there any good ones that can be processed in JavaScript?
By "template" I mean a document that accepts a data object as input, inserts the data into some kind of serialized mar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128949",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Accessing created DOM elements I have code to create another "row" (div with inputs) on a button click. I am creating new input elements and everything works fine, however, I can't find a way to access these new elements.
Example: I have input element (name_1 below). Then I create another input element (name_2 bel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128954",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there something wrong with joins that don't use the JOIN keyword in SQL or MySQL? When I started writing database queries I didn't know the JOIN keyword yet and naturally I just extended what I already knew and wrote queries like this:
SELECT a.someRow, b.someRow
FROM tableA AS a, tableB AS b
WHERE a.ID=b.ID AN... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128965",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: How do I use scanf() with fopen I'm writing a program and am having trouble using the scanf and fopen working together.
From what I can tell my erroneous lines seems to be:
FiLE * DataFile
DataFile = fopen("StcWx.txt","r");
scanf(DataFile, "%i %i %i %.2f %i %i", &Year, &Month, &Day, &Precip, &High, &Low);
The file ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128981",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Absolute URL from base + relative URL in C# I have a base URL :
http://my.server.com/folder/directory/sample
And a relative one :
../../other/path
How to get the absolute URL from this ? It's pretty straighforward using string manipulation, but I would like to do this in a secure way, using the Uri class or someth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128990",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: Visual studio relative reference path I usually format my project directory like J-P Boodhoo. a main dir containing solution file, then a lib folder for all third-party lib, a src dir, a tools lib for third-party that wont be deployed.... For more info look here
I set in my project the reference path for all the nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/128998",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Generated image using PHP and GD is being cut off This is only happening on the live server. On multiply development servers the image is being created as expected.
LIVE:
Red Hat
$ php --version
PHP 5.2.6 (cli) (built: May 16 2008 21:56:34)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 199... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Does System.Windows.Forms have a non-static messagebox? I would like something that I can use as follows
var msg = new NonStaticMessageBox();
if(msg.Show("MyMessage", "MyCaption", MessageBoxButtons.OkCancel) == DialogResult.Ok)
{....}
But specifically non-static (I need to pass a reference to it around) does anyon... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129019",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: .NET Integer vs Int16? I have a questionable coding practice.
When I need to iterate through a small list of items whose count limit is under 32000, I use Int16 for my i variable type instead of Integer. I do this because I assume using the Int16 is more efficient than a full blown Integer.
Am I wrong? Is there no... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129023",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: Best place in spec/ for integration responses? I have some integration points where I want to test various responses - where do you think should I store these artifacts in my spec/ directory of my rails application?
A: In the past I've created a test/resources or spec/resources directory for other test/spec related... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129026",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: looking for Java GUI components / ideas for syntax highlighting I'm not committed to any particular GUI tookit or anything - just needs to be Java based. I want to do simple syntax highlighting ( XML and XQuery ) inside editable text areas.
My only candidate so far is Swing's JTextPane, as it supports seems to suppo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Unit testing code with a file system dependency
I am writing a component that, given a ZIP file, needs to:
*
*Unzip the file.
*Find a specific dll among the unzipped files.
*Load that dll through reflection and invoke a method on it.
I'd like to unit test this component.
I'm tempted to write code that deals... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129036",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "156"
} |
Q: Can I specify redirects and pipes in variables? I have a bash script that creates a Subversion patch file for the current directory. I want to modify it to zip the produced file, if -z is given as an argument to the script.
Here's the relevant part:
zipped=''
zipcommand='>'
if [ "$1" = "-z" ]
then
zipped='zipped... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129043",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Disable and later enable all table indexes in Oracle How would I disable and later enable all indexes in a given schema/database in Oracle?
Note: This is to make sqlldr run faster.
A: combining 3 answers together:
(because a select statement does not execute the DDL)
set pagesize 0
alter session set skip_unusable_... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129046",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Find Processor Type from compact .net 1.0 My application is targeted for Compact .Net 1.0 framework. The application has to check and download any updates available from a web-site. I am thinking of providing the updates as CAB files. Since the CAB files are processor type specific, I want to download the CAB file b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129052",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How does Google's javascript API get around the cross-domain security in AJAX How does Google's API make cross-domain requests back to Google, when it's on your website?
A: The accepted answer is wrong. Ben is correct. Below is the actually iframe node pulled off a page using the Google API JavaScript Client.
<ifra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129053",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: A reliable HTTP library for .Net 2.0 .Net's implementation of HTTP is ... problematic. Beyond some issues in compliance with HTTP/1.0, what's bugging me right now is that HttpWebResponse.GetResponse() with ReadTimeout and Timeout set to 5000 blocks for about 20 seconds before failing (the problem is it should fail a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129071",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is it possible to compile a Rails app to a Java VM JAR file? Essentially the only thing I can deploy to my deployment machine is a JAR file. I can't install JRuby, nor can I install Glassfish or Tomcat.
Is it possible to package up a Rails application (including Rails, vendored, of course) to a JAR file such that I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: What is the best pattern/solution to implement 'workflow (a process) for product development'? Present:
The product development is done in Visual Studio at the moment using .Net technologies, so it's important to stay in the same set of tools. Roles apart from developers are using spreadsheets, docs and diagramming ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129073",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: NULL values inside NOT IN clause This issue came up when I got different records counts for what I thought were identical queries one using a not in where constraint and the other a left join. The table in the not in constraint had one null value (bad data) which caused that query to return a count of 0 records. I s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "304"
} |
Q: Sql Server 2000 - How can I find out what stored procedures are running currently? I'd like to know what stored procedures are currently running to diagnose some performance problems. How can I find that out?
A: Very useful script for analyzing locks and deadlocks: http://www.sommarskog.se/sqlutil/aba_lockinfo.html... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129086",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What is the meaning of Powershell's Copy-Item's -container argument? I am writing a script for MS PowerShell. This script uses the Copy-Item command. One of the optional arguments to this command is "-container". The documentation for the argument states that specifying this argument "Preserves container objects d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "46"
} |
Q: Find OS type from .Net CF 1.0 What is the API for getting the OS type? Windows CE or Windows mobile?
Environment.OSVersion
just gives the CE version. It does not provide information if 'Windows Mobile' is installed on the device.
A: See these blog articles on Platform detection:
*
*Platform Detection I
*Pla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129094",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: When should I use Debug.Assert()? I've been a professional software engineer for about a year now, having graduated with a CS degree. I've known about assertions for a while in C++ and C, but had no idea they existed in C# and .NET at all until recently.
Our production code contains no asserts whatsoever and my ques... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129120",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "252"
} |
Q: How do I view the SQL that is generated by nHibernate? How do I view the SQL that is generated by nHibernate? version 1.2
A: Use sql server profiler.
EDIT (1 year later): As @Toran Billups states below, the NHibernate profiler Ayende wrote is very very cool.
A: You can also try NHibernate Profiler (30 day trial i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129133",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: Generic Exception Handling in Python the "Right Way" Sometimes I find myself in the situation where I want to execute several sequential commands like such:
try:
foo(a, b)
except Exception, e:
baz(e)
try:
bar(c, d)
except Exception, e:
baz(e)
...
This same pattern occurs when exceptions simply need ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: jQuery JSONP problem in IE6 I've encountered a problem when retrieving a JSONP response from a server in a different domain using IE6.
When I make the same AJAX call using JSONP to a server in the same domain as the web page, all goes well in all browsers (including IE6). However, when I make calls between domains ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129157",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to avoid storing passwords in the clear for tomcat's server.xml Resource definition of a DataSource? The resource definition in tomcat's server.xml looks something like this...
<Resource
name="jdbc/tox"
scope="Shareable"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@yourDBserver.yourCompany.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: Read data in FileStream into a generic Stream What's the most efficient way to read a stream into another stream? In this case, I'm trying to read data in a Filestream into a generic stream. I know I could do the following:
1. read line by line and write the data to the stream
2. read chunks of bytes and write to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129171",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Difference between int[] array and int array[] I have recently been thinking about the difference between the two ways of defining an array:
*
*int[] array
*int array[]
Is there a difference?
A: It is an alternative form, which was borrowed from C, upon which java is based.
As a curiosity, there are three ways ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129178",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "260"
} |
Q: Formatting Timestamps in Java Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me. Is there a way to do this?
A: D... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129181",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: Getting Spring Application Context Is there a way to statically/globally request a copy of the ApplicationContext in a Spring application?
Assuming the main class starts up and initializes the application context, does it need to pass that down through the call stack to any classes that need it, or is there a way fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129207",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "240"
} |
Q: Best practice: Self-referential scripts on a web site On the advice of a more experienced developer, I have always coded my web pages that require user input (form processing, database administration, etc.) as self-referential pages. For PHP pages, I set the action of the form to the 'PHP_SELF' element of the $_SERV... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129208",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Will a task using kill to send a signal be preempted? We have the following code in VxWorks:
sig_hdr () { ... }
task_low_priority() {
...
// Install signal handler for SIGUSR1
signal(SIGUSR1, sig_hdr);
...
}
task_high_priority() {
...
kill(pid, SIGUSR1); //pid is the ID of task_low_priority
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Network auto-discovery using SNMP and .NET Are there any libraries, (third party is fine) that can help do network auto-discovery using SNMP and .NET?
If not, have you ever rolled your own?
A: as the author of #SNMP, I can confirm that it supports basic auto discovery feature. Just simply call Manager.Discover. The... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129222",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What are the current state of affairs on threading, concurrency and forked processes, in Ruby on Rails? Ruby on Rails does not do multithreaded request-responses very well, or at least, ActiveRecord doesn't.
The notion of only one request-response active at the same time can be a hassle when creating web application... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129226",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Many to many table queries I have a many to many index table, and I want to do an include/exclude type query on it.
fid is really a integer index, but here as letters for easier understanding. Here's a sample table :
table t
eid | fid
----+----
1 | A
1 | B
1 | C
2 | B
2 | C
3 | A
3 | C
4 | A
4 | B... | {
"language": "en",
"url": "https://stackoverflow.com/questions/129248",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.