text stringlengths 8 267k | meta dict |
|---|---|
Q: JAVA: Build XML document using XPath expressions I know this isn't really what XPath is for but if I have a HashMap of XPath expressions to values how would I go about building an XML document. I've found dom-4j's
DocumentHelper.makeElement(branch, xpath) except it is incapable of creating attributes or indexing. S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306863",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How can I use JavaScript to identify a client? I have a problem where I cannot identify visitors to my intranet page because their browser is configured to use a proxy, even for the local intranet. I always see the proxy IP and no other details about the client. The SOE that my company uses has the proxy set up alre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306867",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you detect if there is an index for a specific column on a table in Oracle? A table exists that someone else loaded. I need to query against the table, but the lack of indexes makes the query plan abysmal. What I would like to do is detect if there is an index for a particular column, so that I can created ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306871",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Can XmlSerializer deserialize into a Nullable? I wanted to deserialize an XML message containing an element that can be marked nil="true" into a class with a property of type int?. The only way I could get it to work was to write my own NullableInt type which implements IXmlSerializable. Is there a better way to do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306877",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Search for a regexp in a java arraylist ArrayList <String> list = new ArrayList();
list.add("behold");
list.add("bend");
list.add("bet");
list.add("bear");
list.add("beat");
list.add("become");
list.add("begin");
There is a way to search for the regexp bea.* and get the indexes like in ArrayList.indexOf ?
EDIT: r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306880",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Assembly not loading for ASP.NET web application I have a web application which references an external DLL (lets call this productA.dll)
I have updated my GAC, my web.config, and my references, checked the versions and everything looks consistent.
However, when I run my application, methods that I use from productA.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306891",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What naming conventions do you use in C#? As a beginning programmer, I'm trying to settle on a standard naming convention for myself. I realize that it's personal preference, but I was trying to get some ideas from some of you (well a LOT of you) who are much smarter than myself.
I'm not talking about camel notatio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306894",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: AS3 - Can I detect change of value of a variable using addEventListener? Is it possible to use EventListener to Listen to a variable and detect when the value of that variable changes? Thanks.
A: @BrianHodge: How do you actually use your example? How do you call the set function? How do you refer to it? Where do p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306896",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to use if then else to build a string in a crystal reports formula This is Crystal Reports 9 in Visual Studio 2003 by the way
Simple question about crystal reports formula syntax: How do I build the formula's result using if then clauses?
Specifically I would like something like this:
dim val as string
val = {t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do I disable PythonWin's “Redirecting output to win32trace remote collector” feature without uninstalling PythonWin? When I run a wxPython application, it prints the string “Redirecting output to win32trace remote collector”and I must open PythonWin's trace collector tool to view that trace output.
Since I'm not... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306901",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I perform an exact string match on a non-case sensitive field? I would like to find all the rows in a table and match on an exact case sensitive string. Unfortunately, my table has the case insensitive collation.
What is the most efficient way to perform this.
Eg.
I would like the following to return no rows... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306906",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: ASP.net 2.0 Gridview with Expanding Panel Rows -- How to build Panel "on the fly" I'm currently building a Gridview that has expandable rows. Each row contains a dynamically created Panel of Form elements. Right now, I have a javascript function that expands (or in my case, makes visible) the panel when an Image is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306920",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can I change the checkbox size using CSS? Is it possible to set the size of a checkbox using CSS or HTML across browsers?
width and size work in IE6+, but not with Firefox, where the checkbox stays 16x16 even if I set a smaller size.
A: This should work
input {
width: 25px;
height: 25px;
}
It worked for me fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "555"
} |
Q: Lightweight regex parser I'd like to use a Regex parser to aid in some string processing in a C application. I'm ideally looking for something lightweight and open-source. The target platform is an embedded system so we're looking to save as much as possible with memory consumption in particular. I've found a number... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: VB6 Cast Expression What is the cast expression equivalent of VB.NET's CType in Visual Basic 6?
A: Let's say you have an object of ChildClass (child) that you want to cast to BaseClass. You do this:
Dim base As BaseClass
Set base = child
Because of the way VB6 handles compile-time type safety, you can just do that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306937",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Is it possible to have a servlet forward to a jsp outside of its context root? We currently have an appserver setup where EVERYTHING is off of one big context root, and we copy class files and restart app servers to deploy. Not ideal.
I'm trying to set up an ant script to do the build and deploy using wdeploy, and e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306938",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why can't I edit my ASP.NET Web application at run time? Why are the code-behind pages for an ASP.NET web application locked at run time? I have older projects (probably defined as "web sites" instead of "web apps") where I can edit the code behind, refresh the browser, and see my changes. With the web app, I have t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306943",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I flush the PRINT buffer in TSQL? I have a very long-running stored procedure in SQL Server 2005 that I'm trying to debug, and I'm using the 'print' command to do it. The problem is, I'm only getting the messages back from SQL Server at the very end of my sproc - I'd like to be able to flush the message buffe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306945",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "254"
} |
Q: How, where to store objects within different scopes in Asp.net 2.0 need ask you about some help.
I have web app running in Net 2.0.
I wanna ask what storage (cache, session, file) I should use for my objects as they have different scope of using. Can be divide into several groups:
1) objects related directly to visi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306946",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PPP demand dial with modem bank in linux I have a linux box with a bank of modems and need to create demand-dial (outbound) PPP connections to a very large set of remote machines. Since I have far more remotes than local modems, I'd like to launch one or more instances of pppd in demand mode, but not allocate a par... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306968",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: VS 2008 pages open to left When I open a page(.aspx,xslt,css..etc) from the solution explorer in VS 2008 , it opens to the left of my current active tab. I am used to VS2003/VS2005 where the new page opens up to the right of current active page. How do i set all the pages to open to the right?
Thanks
A: It seems th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306971",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: .net cache size Is there a way to monitor the size of the cache on your web server? I just want to see how much of my server's memory is being taken up by the cache.
A: There's a performance counter named Cache % Process Memory Limit Used in the category ASP.NET Applications
| {
"language": "en",
"url": "https://stackoverflow.com/questions/306986",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I encrypt app.config file sections during install with WiX? I have found an example for encrypting a web.config during installation here, but my app is a windows service. The aspnetreg_iis method works only for web.config files.
I know how to programatically encrypt the config file, but I don't think I can d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306992",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What's a good way to write Unit tests for code with protected objects C# (using NMock, and NUnit framework) When writeing unit tests for a single class that contains other objects what's the best way to use
mock objects to avoid tests dependant on other classes.
Example 1:
public class MyClass
{
protected MyObj... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Vector Shape on Stage Appears Over Dynamic Textfield The subject pretty much explains it all. I start on frame one of a MovieClip with just a Bitmap covering the whole stage.
Then when a user clicks a button, it goes to frame two and a vector shape is on the stage covering part of the image. At the same time, throug... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Changing the cursor in WPF sometimes works, sometimes doesn't On several of my usercontrols, I change the cursor by using
this.Cursor = Cursors.Wait;
when I click on something.
Now I want to do the same thing on a WPF page on a button click. When I hover over my button, the cursor changes to a hand, but when I cli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "132"
} |
Q: Catching a direct redirect to /dev/tty I'm working on an application controller for a program that is spitting text directly to /dev/tty.
This is a production application controller that must be able to catch all text going to the terminal. Generally, this isn't a problem. We simply redirect stdout and stderr. This ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307006",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Quick Filter List Everyone is familiar with this functionality. If you open up the the outlook address book and start typing a name, the list below the searchbox instantly filters to only contain items that match your query. .NET Reflector has a similar feature when you're browsing types ... you start typing, and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307011",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I filter all HTML tags except a certain whitelist? This is for .NET. IgnoreCase is set and MultiLine is NOT set.
Usually I'm decent at regex, maybe I'm running low on caffeine...
Users are allowed to enter HTML-encoded entities (<lt;, <amp;, etc.), and to use the following HTML tags:
u, i, b, h3, h4, br, a, i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "38"
} |
Q: C# Connecting to a SQL server with a named instance? A client of mine has told me the program I made for them won't connect to a SQL server named instance, I have a standard SQL server with no named instance so I'm wondering how I can test this. A named instance connection string look like the one below, could the b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307014",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I include a pipe | in my linux find -exec command? This isn't working. Can this be done in find? Or do I need to xargs?
find -name 'file_*' -follow -type f -exec zcat {} \| agrep -dEOE 'grep' \;
A: If you are looking for a simple alternative, this can be done using a loop:
for i in $(find -name 'file_*' -... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307015",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "273"
} |
Q: Is it possible to register an asynchronous pluggable protocol user specific registry? See http://msdn.microsoft.com/en-us/library/aa767916(VS.85).aspx for Async Pluggable protocols.
We currently have it working, however it requires that we write to HKey_Class_Root. In the interest of trying to allow a non-admin ins... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307016",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: MySQL Joining Problems The following query returns strange results for me:
SELECT
`Statistics`.`StatisticID`,
COUNT(`Votes`.`StatisticID`) AS `Score`,
COUNT(`Views`.`StatisticID`) AS `Views`,
COUNT(`Comments`.`StatisticID`) AS `Comments`
FROM `Statistics`
LEFT JOIN `Votes` ON `Votes`.`StatisticID` = ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307019",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to rearchitect Hibernate DAO layer of ASP.NET app to move it to Silverlight? Last try to get an answer on this.
I have a simple ASP.NET app which uses Hibernate for data access.
GUI can call methods on Customer object like "CalculateTotalSumOfOrders()".
Lazy loading (even though it's not optimal) will work for m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307022",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Native Swing Menu Bar Support For MacOS X In Java A link that stands out is http://www.devdaily.com/blog/post/jfc-swing/handling-main-mac-menu-in-swing-application/ however the menu bar under Mac OS X displays as the package name as opposed to the application name. I'm using the code in the above link without any l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307024",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Is this a good way to model address information in a relational database? I'm wondering if this is a good design. I have a number of tables that require address information (e.g. street, post code/zip, country, fax, email). Sometimes the same address will be repeated multiple times. For example, an address may be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307027",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: makefile calling makefile error I have a working make, I have platform code and like several makes for each os in the folder. Right now I have one makefile which works. I renamed it to Makefile.ws and wrote this in Makefile
all:
make -f Makefile.w32
clean:
make -f Makefile.w32 clean
I ran it and got this e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Django foreign key access in save() function Here's my code:
class Publisher(models.Model):
name = models.CharField(
max_length = 200,
unique = True,
)
url = models.URLField()
def __unicode__(self):
return self.name
def save(self):
pass
class Item(model... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307038",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Rails best practice question: Where should one put shared code and how will it be loaded? The rails books and web pages I've been following have all stuck to very simple projects for the sake of providing complete examples. I'm moving away from the small project app and into a realm of non-browser clients and need ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307041",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Searching for Graphic libraries to draw seismic data in C# I am searching for graphic libraries that can draw seismic data; which is a large number of curves drawn vertically and gives you a shape like this:
alt text http://img237.imageshack.us/my.php?image=seismicdataxb2.png
and I need it to do be able to:
1) selec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307043",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to document folder permissions in Windows Server 2003? I manage a small group of Windows Server 2003 computers. ONE of the the servers is NOT performing the same as the others.
I expect that I have not set the folder and share permissions the same as the others.
I want to be able to create a text document c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307047",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Does anyone know if the crossdomain policy file at salesforce.com has changed? Suddenly my Flex Apps can no longer connect to salesforce.com via its API, I am getting a security sandbox violation. Login credentials are correct, I have tried them via a different means, and I have obfuscated them below.
This was work... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307048",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: 'Exports' naming convention - how does it work? What rules apply to the name that ends up in the exports section of an PE (Portable Executable)?
Roughly, I see names starting with an '_' underscore, a '?' question mark or an '@' at-sign. What do those mean, and what about the rest of the name?
Also - How can I rever... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307056",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the purpose of allocating pages in the pagefile with CreateFileMapping? The function CreateFileMapping can be used to allocate space in the pagefile (if the first argument is INVALID_HANDLE_VALUE). The allocated space can later be memory mapped into the process virtual address space.
Why would I want to do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307060",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do you spawn a child process in Ruby? I want to offload a block of code in my main process to child process to make it run concurrently. I also want to have the PID of the spawned child process so I can monitor and kill it if necessary.
A: In 1.9 you can use Process.spawn command.
See also http://en.wikibooks.o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: Resetting a field lazy-loaded with the double-check idiom Consider the "double-check idiom for lazy initialization of instance fields":
// Item 71 in Effective Java copied from this interview with Bloch.
private volatile FieldType field;
FieldType getField() {
FieldType result = field;
if (result == null) { ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307073",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is there a way to write to a memory stream, in a medium trust enviroment? I am working working on the early release of Azure from Microsoft and am not able to write to a memory stream. Keep getting an exception. I fixed the issue by using a different technique to achieve my end goal, however I wanted to know if ther... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307081",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Cleaning up an STL list/vector of pointers What is the shortest chunk of C++ you can come up with to safely clean up a std::vector or std::list of pointers? (assuming you have to call delete on the pointers?)
list<Foo*> foo_list;
I'd rather not use Boost or wrap my pointers with smart pointers.
A: For std::list<T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307082",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "51"
} |
Q: Move the cursor programmatically from one page to other page using JavaScript I have 2 pages on the screen (actually more as it is a kind of proprietary web application with a few frames and I cannot figure out actually the whole structure)
I enter the search criteria in a page, I press ‘Enter’ on the keyboard , sea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307083",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: System.Speech.Synthesis installing alternate language voices The .net framework 3.5 (or vista) provides me with an English voice (David I think) to use with the Speech.Synthesis api. I need a french voice to use with a french dictation practice app I am building for my kids to use to improve their french spelling. T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307084",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: PHP coding standards I've been looking for some guidelines on how to layout PHP code. I've found some good references, such as the following:
http://www.dagbladet.no/development/phpcodingstandard/
and this question on SO.
However, none of that quite gets to what I'm specifically wondering about, which is the integra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Joining NHibernate Classes that share a common column but no foreign key I have a couple of tables that I want to map to classes. The tables look like this:
Asset
---------
AssetId
AssetName
Product
---------
ProductId
ProductName
AssetId
Disposal
---------
DisposalId
AssetId
DisposalDate
Basically what I want to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307094",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Keeping content in two table columns stuck to the roof of the respective table column When using tables in a CSS-based layout, I've noticed if I have a table with 4 columns (2 on the side are small for spacing, 2 in the middle are for content), when I type content in one of the two middle columns, it will stay at t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: "Keyword not supported: " error in ASP .NET i get a Keyword not supported: '192.168.1.1;initial catalog'. error when trying to do this
Dim cn As New SqlConnection(str)
where str is the connection string starts with '192.168.1.1;initial catalog' ...
I have not specified the provider in the connection string
A: You... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Visual Studio Shell And F# (invalid license) Does anyone have any experience with installing the Visual Studio Isolated Shell and using it with F#?
It installed successfully, but when I click on the devenv.exe, it opens VS, but gives me the error "Invalid License Data. Reinstall is required". I have done that many ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to export a variable in Bash I need to set a system environment variable from a Bash script that would be available outside of the current scope. So you would normally export environment variables like this:
export MY_VAR=/opt/my_var
But I need the environment variable to be available at a system level though.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307120",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Can you have a WITH statement in a tabular user defined function I have the following code for a UDF but it errors with the message:
Msg 156, Level 15, State 1, Procedure
CalendarTable, Line 39 Incorrect
syntax near the keyword 'OPTION'.
is it because of my WITH statement as I can run the same code fine in a s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307122",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I cast id to a float? I'm having trouble with this code:
NSRect itemFrame;
id item;
// code to assign item goes here.
itemFrame.origin.y -= [item respondsToSelector:@selector(selectedHeight)] ? [item selectedHeight] : [self defaultSelectedHeight];
This is the problematic bit:
[item selectedHeight]
The com... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307128",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: I need a regEx to match general URLs I need to test for general URLs using any protocol (http, https, shttp, ftp, svn, mysql and things I don't know about).
My first pass is this:
\w+://(\w+\.)+[\w+](/[\w]+)(\?[-A-Z0-9+&@#/%=~_|!:,.;]*)?
(PCRE and .NET so nothing to fancy)
A: According to RFC2396:
^(([^:/?#]+):)?(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307141",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Vim Scrolling Slowly Vim is acting slow when I scroll. The cursor skips some lines when I'm pressing j/k continually.
I'm using xterm and urxvt. In both vim acts like this.
This happens locally, with small or big files. I do use Control + F/B they work just fine.
EDIT: ttyfast in small files did the trick but in big... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307148",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: What do I gain by adding a timestamp column called recordversion to a table in ms-sql? What do I gain by adding a timestamp column called recordversion to a table in ms-sql?
A: You can use that column to make sure your users don't overwrite data from another user.
Lets say user A pulls up record 1 and at the same t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307152",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: maintaining ids in database that match client software enumerations Lets say I have a table in a sql server 2000 database called TransactionType:
CREATE TABLE [dbo].[TransactionType](
[ID] [int] NOT NULL,
[Description] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
CONSTRAINT [PK_TransactionTy... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307160",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is JavaScript's highest integer value that a number can go to without losing precision? Is this defined by the language? Is there a defined maximum? Is it different in different browsers?
A: JavaScript has two number types: Number and BigInt.
The most frequently-used number type, Number, is a 64-bit floating ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307179",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1078"
} |
Q: Test for a syntactically correct path In .NET is there a function that tests if a string is syntactically a correct path? I specifically don't want it to test if the path actually exists.
my current take on this is a regex:
([a-zA-Z]:|\\)?\\?([^/\\:*?"<>|]+[/\\])*[^/\\:*?"<>|]*
matches:
c:\
bbbb
\\bob/john\
..\..\
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307183",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Remove quotes from named environment variables in Windows scripts I want to store a URL prefix in an Windows environment variable. The ampersands in the query string makes this troublesome though.
For example: I have a URL prefix of http://example.com?foo=1&bar= and want to create a full URL by providing a value for... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "58"
} |
Q: PHP function which does syntax color parsing for multiple languages? I'm doing a PHP site which displays code examples in various languages (C#, PHP, Perl, Ruby, etc.). Are there any PHP functions which add syntax coloring for these and other languages?
If not, I would at least like to find that one built-in PHP fu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307210",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: SQL Compact Problem After Installing on Vista Client I am trying to run an application that normally works when I install on XP, but it doesn't work when I install it on Vista. I am installing the prerequisite of .NET 3.5 SP1 and SQL Compact 3.5 included as part of the install but I still get this exception:
Unable... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307215",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I imitate the ASP.NET AjaxOptions delegate functions? When using the Ajax.BeginForm() helper in ASP.Net MVC, I can pass options with names of different functions, for example one to run OnBegin, one for OnSuccess etc. How do these work "under the hood"?
The reason I'm asking is that I'm extending this to prov... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Immutable beans in Java I am very curious about the possibility of providing immutability for java beans (by beans here I mean classes with an empty constructor providing getters and setters for members). Clearly these classes are not immutable and where they are used to transport values from the data layer this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307232",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to reproduce: Script Error, "Object does not support this property or method." Can any one give me a scripts (HTML/CSS/Javascript) that can reproduce this error on IE 7.0? I am trying to fix this bug in my page where I get this warning but could not exactly found the problem. Line number does not match with the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307236",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-4"
} |
Q: Having separate themes - if the same host address has www. and a version with no www. I have a set of themes for my website, which are to be used with different requests from different urls. So if the url = www.xyz.com I load a different theme, as opposed to www.abc.com.
However, I have tried having a theme called w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307237",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Win32 Overlapped Readfile on COM Port returning ERROR_OPERATION_ABORTED Ok, one for the SO hive mind...
I have code which has - until today - run just fine on many systems and is deployed at many sites. It involves threads reading and writing data from a serial port.
Trying to check out a new device, my code was sw... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Install custom Outlook 2003 form in user's Personal Form Library We've developed a custom Outlook 2003 form based on ipmNote. I need a way to push this to all the other users in the organization. At the same time we'll also be installing a custom Add-in built with VSTO so we could do the form install as part of that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307246",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I express this in HQL I've been stuck with this query for some time now. The SQL returns the result that I want, but I cannot work out how to express the query in HQL.
Here's the SQL:
select thread.ThreadId,
thread.Title,
thread.CreatedOn,
thread.ViewCount,
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307247",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How does a Scrum Master "manage" an out of control Product Owner? I new to Scrum and while I understand the team concept behind the Sprints, I imagine there still needs to be a guardian for the team who minimizes the interference from Product Owners who are not conversant in software development. What are your succ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307248",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I reformat form input before POST using Javascript (or Rails)? I have a field in my form labeled "Name" that will contain both the First & Last name.
Our existing dynamic server (to which the form is being POSTed to), expects two separate fields (first name, last name).
Can I use Javascript to split the use... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307250",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Where to use Zend Framework translation tool I have the whole MVC-Model set up and use HTML views as templates. But I have german strings in there that I would like to translate to other languages at some point.
What is the best way to do this? I know I have to use Zend_Translate, but do I have to implement a single... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307273",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: log4net - want to create a log file per web application user We are using log4net (replacing nLog) in our Asp.Net web application. nLog had a useful feature that would allow us to create a log file per user - which is helpful for organizing and locating the log statements.
Does anyone have any ideas on how to do thi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307279",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Haskell function definition and caching arrays I have a question about implementing caching (memoization) using arrays in Haskell. The following pattern works:
f = (fA !)
where fA = listArray...
But this does not (the speed of the program suggests that the array is getting recreated each call or something):
f n ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: One log file and one error handler for set of web services - possible? We have a set of web services which is also our internal API.
They perfectly share one common web.config file.
Is there a way to somehow make log4net create one log for the whole site, for all of them? And have common error handler? The problem I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307289",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How does the Google "Did you mean?" Algorithm work? I've been developing an internal website for a portfolio management tool. There is a lot of text data, company names etc. I've been really impressed with some search engines ability to very quickly respond to queries with "Did you mean: xxxx".
I need to be able t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "463"
} |
Q: How to use an AppDomain to limit a static class' scope for thread-safe use? I have been bitten by a poorly architected solution. It is not thread safe!
I have several shared classes and members in the solution, and during development all was cool...
BizTalk has sunk my battle ship.
We are using a custom BizTalk... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307292",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: IE does not render tag properly SOLVED: Nevermind, the links were visited, and the border definition was missing for visited links (as someone pointed out, thanks). As for the color being first place in the border definition, the snippet comes from the IE Developper Toolbar, this is not directly my code. Anyway, th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307294",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I convert an SQL Server SMALLDATETIME to a Unix timestamp? How do I convert an SQL Server SMALLDATETIME to Unix Timestamp?
date was stored as CAST(0x96040474 AS SmallDateTime) in MS Access DB. Data was dumped to SQL and I'm looking to convert those times to Unix Timestamps for MySQL.
Thanks
AO
A: select d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307304",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Play a Sound with Python What's the easiest way to play a sound file (.wav) in Python? By easiest I mean both most platform independent and requiring the least dependencies. pygame is certainly an option, but it seems overkill for just sound.
A: After the play() command add a delay of say 10 secs or so, it'll work
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307305",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "113"
} |
Q: Best way to save data on the iPhone I am writing an iPhone application, and need to save the state of my application (5K or so).
My main worry is data persisting across upgrades. Some of the applications I use clearly got this wrong, and I would prefer not to!
A: It really depends on what you're doing and your need... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307313",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: How Can I Display Static HTML After I've Used die() in a PHP Block? Let's say I have some code like this:
<html>
<head><title>Title</title></head>
<body>
<?php
if (!$someCondition){
die();
}
else{
#Do something
}
?>
</body>
<html>
I hope the purpose of this code is straightforward. If a certain condition is m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307322",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: DOM like API for working with XQuery in Java is there some open source Java API (ideally not GPL) for creating an object model from an XQuery string?
thanks
A: There's an extremely fast and powerful implementation in Saxon: http://www.saxonica.com/index.html
I've used it a number of times in production code and i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307329",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Overriding System.Web.Mvc.ViewMasterPage, where to make call to grab from cache? I need to grab a value from the HttpCOntext.Items request cache, where should I do this?
Is there a particular event or contsructor I should override?
A: ViewMasterPage is a subclass of Control; and you should be able to get at it in t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307332",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ITemplate and DataGrid Column in Codebehind I have a situation where I need to work with a datagrid and adding columns dynamically in PageInit as the grid has a few conditional requests that it must handle. I'm moving along easily with BoundColumns, and ButtonColumns, those are easy. The problem is with the creati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: DOM issue in Safari with buttons I was wondering if anyone has seen this issue before.
I have two button on a webpage. When I navigate away from the page and hit the back button to return the value of one button is placed in the value of the other.
E.g
<input class="SmallData" type="submit" id="logButton" value="Log... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Create plugins for python standalone executables how to create a good plugin engine for standalone executables created with pyInstaller, py2exe or similar tools?
I do not have experience with py2exe, but pyInstaller uses an import hook to import packages from it's compressed repository. Of course I am able to impor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307338",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Forward declare a standard container? Is it possible to forward declare an standard container in a header file? For example, take the following code:
#include <vector>
class Foo
{
private:
std::vector<int> container_;
...
};
I want to be able to do something like this:
namespace std
{
template <typena... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307343",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: How to draw 32-bit alpha channel bitmaps? I need to create a custom control to display bmp images with alpha channel. The background can be painted in different colors and the images have shadows so I need to truly "paint" the alpha channel.
Does anybody know how to do it?
I also want if possible to create a mask us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307348",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: g++ undefined reference to typeinfo I just ran across the following error:
(.gnu.linkonce.[stuff]): undefined
reference to [method] [object
file]:(.gnu.linkonce.[stuff]):
undefined reference to `typeinfo for
[classname]'
Why might one get one of these "undefined reference to typeinfo" linker errors?
Can anyone exp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "265"
} |
Q: How do I render a ViewPage to a string? I have tried to implement simple ViewPage caching with ASP.NET MVC, however I cannot get the page to render correctly into a custom HtmlTextWriter when it has a master page.
I have tried overriding Render. If I simply call the base implementation, then everything renders corre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307356",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Best test runner? (Unit Testing, .NET) I'm using MBUnit Framework for unit testing and looking for a good test runner.
MbUnit's runner is fast however lacking lots of stuff such as
*
*You can't set execution path
*It's collapsing all trees in every run which drives me crazy
*And almost all other test runner pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307357",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: C++ Problem : "Error external 'C::C()' referenced from C:\C++\CRP.OBJ" I'm trying to get this:
//C.h
#ifndef C_H
#define C_H
#include "c.h"
class C
{
public:
C();
int function(int, int);
};
#endif
which is defined in this:
//c.cpp
#include "c.h"
C::C()
{
}
int C::function(int a, int b)
{
r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307362",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to set execution path in MbUnit? Is there any way to set an execution path for the tested DLL so it can find resource folders when MbUnit copy files into a temporary folder without using Dependency Injection?
Trying to put these extra files as content and set behaviour to copy did not work.
A: If you are runnin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: JavaScript & IE7 - Why won't my *.onload = function() { } fire? I have a gallery I quickly coded up for a small site, and under Firefox 3 and Safari 3 works fine. But when I test on my old best friend IE7, it seems to not fire the imageVar.onload = function() { // code here }.. which I want to use to stop the load ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/307364",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.