text stringlengths 8 267k | meta dict |
|---|---|
Q: What languages support covariance on inherited methods' return types? I originally asked this question, but in finding an answer, discovered that my original problem was a lack of support in C# for covariance on inherited methods' return types. After discovering that, I became curious as to what languages do support... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47009",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: "Phantom" directories in an SVN repository I've somehow managed to get an SVN repository into a bad state. I've moved a directory and now I can't commit it in its new location.
As far as svn status is concerned, the directory is unknown (the name of the directory is type).
$ svn status
? type
When I try to ad... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47022",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Recursive function for an xml file (hierarchial data) I have an XML file in the following format:
<categories>
<category id="1"></category>
<category id="2">
<category id="3"></category>
<category id="4">
<category id="5"></category>
</category>
</category>
</categories>
Can anyone please gi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47026",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Sprintf equivalent in Java Printf got added to Java with the 1.5 release but I can't seem to find how to send the output to a string rather than a file (which is what sprintf does in C). Does anyone know how to do this?
A: Since Java 13 you have formatted 1 method on String, which was added along with text blocks ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47045",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "306"
} |
Q: What code would I use to convert a SQL like expression to a regex on the fly? I'm looking to convert a SQL like statement on the fly to the equivalent regex i.e.
LIKE '%this%'
LIKE 'Sm_th'
LIKE '[C-P]arsen'
What's the best approach to doing this?
P.S. I'm looking to do this on the .Net Framework (C#).
A: The foll... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47052",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: "Getting" the path in Linux I am writing a C program in Linux. Commands like execv() require a path in the form of a C string. Is there a command that will return the current path in the form of a C-style string?
A: The path argument to execv() is the path to the application you wish to execute, not the current w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Javascript tree views that support multiple item drag/drop We are currently using the ExtJS tree view in an application - a requirement has arisen requiring a user to select multiple nodes (which the tree view supports currently through a pluggable selection model) - but you can not then drag the multiple selections... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47078",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do you prevent SQL injection in LAMP applications? Here are a few possibilities to get the conversation started:
*
*Escape all input upon initialization.
*Escape each value, preferably when generating the SQL.
The first solution is suboptimal, because you then need to unescape each value if you want to use... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47087",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Best way in asp.net to force https for an entire site? About 6 months ago I rolled out a site where every request needed to be over https. The only way at the time I could find to ensure that every request to a page was over https was to check it in the page load event. If the request was not over http I would res... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "211"
} |
Q: Slow SQL Query due to inner and left join? Can anyone explain this behavior or how to get around it?
If you execute this query:
select *
from TblA
left join freetexttable ( TblB, *, 'query' ) on TblA.ID = [Key]
inner join DifferentDbCatalog.dbo.TblC on TblA.ID = TblC.TblAID
It will be very very very slow.
If you c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47104",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Disallow publishing of debug builds for ClickOnce deployment Is there a way to disallow publishing of debug builds with ClickOnce?
I only want to allow release builds through, but right now human error causes a debug build to slip through once in a while.
We're publishing the build from within Visual Studio.
A: O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47107",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Migrating to a GUI without losing business logic written in COBOL We maintain a system that has over a million lines of COBOL code. Does someone have suggestions about how to migrate to a GUI (probably Windows based) without losing all the business logic we have written in COBOL? And yes, some of the business logic ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47133",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is there a way to ensure entire code block execution in a .NET thread? In my C# program, I have a thread that represents a running test, which can be aborted by a click on a button labeled "Interrupt execution". In order for the thread (and therefore the test) to terminate in an elegant manner (and do some vital wor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Customising log4j adapter I want to build my own custom log4j (network) adapter to solve my problem that I posted here.
I have looked at the documentation on the log4j and I cant see where/if the developers go into how to do this.
Can anyone point me in the right direction to get started?
A: Write custom appenders ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47145",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to set the order in subnodes of a tree structure I have a tree representation of pages in a CMS application. I understand how to persist the tree in the database. However, I don't have a good way to:
A) Reorder subpages under a particular parent page.
B) Provide a UI implementation that allows the user to change... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47163",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Do you know of any "best practice" or "what works" vi tutorial for programmers? There are thousands of vi tutorials on the web, most of them generically listing all the commands. There are even videos on youtube which show basic functionality.
But does anyone know of a vi tutorial which focuses on the needs of progr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47167",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is there an event that triggers if the number of ListViewItems in a ListView changes? (Windows Forms) I'd like to enable/disable some other controls based on how many items are in my ListView control. I can't find any event that would do this, either on the ListView itself or on the ListViewItemCollection. Maybe the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47169",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I monitor the computer's CPU, memory, and disk usage in Java? I would like to monitor the following system information in Java:
*
*Current CPU usage** (percent)
*Available memory* (free/total)
*Available disk space (free/total)
*Note that I mean overall memory available to the whole system, not just the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47177",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "206"
} |
Q: Which Version of Python to Use for Maximum Compatibility If I was going to start an open source project using Python what version should I use to ensure that the vast majority of users can use it on their system?
I'm the kind of person who quickly jumps to the next version (which I'll do when Python 3 comes out) but... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: SQL Server, nvarchar(MAX) or ntext, image or varbinary? When should I choose one or the other? What are the implications regarding space and (full-text) indexing?
BTW: I'm currently using SQL Server 2005 planing to upgrade to 2008 in the following months.
Thanks
A: Once you put it in the blob, it's going to be diff... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47203",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How many rows should be in the (main) buffer of a virtual Listview control? How many rows should be in the (main) buffer of a virtual Listview control?
I am witting an application in pure 'c' to the Win32 API. There is an ODBC connection to a database which will retrieve the items (actually rows).
The MSDN sample... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47206",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Django: Print url of view without hardcoding the url Can i print out a url /admin/manage/products/add of a certain view in a template?
Here is the rule i want to create a link for
(r'^manage/products/add/$', create_object, {'model': Product, 'post_save_redirect': ''}),
I would like to have /manage/products/add in a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47207",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Is there a good Fogbugz client for Mac OS X? And/or: do I need one?
I've recently started using FogBugz for my hobby projects, and I'm very happy with things so far. Having read more about it, especially the evidence-based scheduling, I'd like to start using it for my PhD as well. (Heh; something tells me my supervi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47210",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: "Cannot change DataType of a column once it has data" error in Visual Studio 2005 DataSet Designer I've got a DataSet in VisualStudio 2005. I need to change the datatype of a column in one of the datatables from System.Int32 to System.Decimal. When I try to change the datatype in the DataSet Designer I receive the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: How would you migrate hundreds of MS Access databases to a central service? We have literally 100's of Access databases floating around the network. Some with light usage and some with quite heavy usage, and some no usage whatsoever. What we would like to do is centralise these databases onto a managed database and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47225",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is the .MSPX file extension? I've noticed a lot of Microsoft sites have the *.MSPX extension. While I'm very familiar with ASP.NET, I've not seen this extension before.
Does anyone know what this identifies?
A: A few internet searches led me to http://www.microsoft.com/backstage/bkst_column_46.mspx, but it wa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47235",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How can I generate database tables from C# classes? Does anyone know a way to auto-generate database tables for a given class? I'm not looking for an entire persistence layer - I already have a data access solution I'm using, but I suddenly have to store a lot of information from a large number of classes and I rea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47239",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: Is there a Firefox 3 addon similar to View Source Chart? Before I upgraded to Firefox 3 I used to constantly use the View Source Chart Firefox Addon which shows the source HTML in a very organized, graphical form. Unfortunately, this addon is only for Firefox 2 and the beta version for Firefox 3 now costs $10 on the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47248",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you set up a Python WSGI server under IIS? I work in a Windows environment and would prefer to deploy code to IIS. At the same time I would like to code in Python.
Having read that IIS can run fastCGI application, I went to the IIS site where it describes in detail how to get PHP up and running but not much a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47253",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Storing Windows passwords I'm writing (in C# with .NET 3.5) an administrative application which will poll multiple Windows systems for various bits of data. In many cases it will use WMI, but in some cases it may need to read remote registry or remotely execute some command or script on the polled system. This polli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47262",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Are there any good oracle podcasts? Are there any good oracle podcasts around? The only ones I've found is produced by oracle corp, and as such are little more than advertising pieces pushing their technology of the moment.
I'm specifically interested in Database technologies.
A: Here's a list: http://www.oracle.co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47279",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What's the best way to pass data into a Flex chart from a Ruby on Rails application? Quite a few methods exist for passing data into a Flex binary from a Rails application. Right now, I'm using the old e4x resultFormat with a xml.erb template. I've done AMF before, but I feel like inlining parameters into the embe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47297",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: GODI installation issue I'm trying to install GODI on linux (Ubuntu). It's a library management tool for the ocaml language. I've actually installed this before --twice, but awhile ago-- with no issues --that I can remember-- but this time I just can't figure out what I'm missing.
$ ./bootstrap --prefix /home/nlucar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47309",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Top tips for secure web applications I am looking for easy steps that are simple and effective in making a web application more secure.
What are your top tips for secure web applications, and what kind of attack will they stop?
A: Do not trust user input.
Validation of expected data types and formatting is essentia... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47323",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: UserControl rendering: write link to current page? I'm implementing a custom control and in this control I need to write a bunch of links to the current page, each one with a different query parameter. I need to keep existing query string intact, and add (or modify the value of ) an extra query item (eg. "page"):
"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47329",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: ASP.NET MVC Preview 5 routing ambiguity I have a problem with a sample routing with the preview 5 of asp.net mvc.
In the AccountController I have 2 actions:
public ActionResult Delete()
public ActionResult Delete(string username)
While trying to look for Account/Delete or Account/Delete?username=davide the Cont... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47338",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Versioning library like SQLite database library? I like how SQLite library can be included into an application and the application has a full-fledged database to use.
Similarly, is there an open source versioning library that I can include into my application so that I can save versions of files as well as do diffs ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47340",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you list all triggers in a MySQL database? What is the command to list all triggers in a MySQL database?
A: The command for listing all triggers is:
show triggers;
or you can access the INFORMATION_SCHEMA table directly by:
select trigger_schema, trigger_name, action_statement
from information_schema.trigge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "124"
} |
Q: SQL Compare-Like tool for Oracle? We're a .NET team which uses the Oracle DB for a lot of reasons that I won't get into. But deployment has been a bitch. We are manually keeping track of all the changes to the schema in each version, by keeping a record of all the scripts that we run during development.
Now, if a d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47366",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Best practices re: LINQ To SQL for data access Part of the web application I'm working on is an area displaying messages from management to 1...n users. I have a DataAccess project that contains the LINQ to SQL classes, and a website project that is the UI. My database looks like this:
User -> MessageDetail <- Messa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47374",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How can I monitor the executed sql statements on a SQL Server 2005 In a project of mine the SQL statements that are executed against a SQL Server are failing for some unknown reason. Some of the code is already used in production so debugging it is not an easy task. Therefore I need a way to see in the database itse... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47376",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Setting Up MySQL Triggers I've been hearing about triggers, and I have a few questions.
What are triggers?
How do I set them up?
Are there any precautions, aside from typical SQL stuff, that should be taken?
A: Triggers allow you to perform a function in the database as certain events happen (eg, an insert into a t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Best way to test a MS Access application? With the code, forms and data inside the same database I am wondering what are the best practices to design a suite of tests for a Microsoft Access application (say for Access 2007).
One of the main issues with testing forms is that only a few controls have a hwnd handle and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47400",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: Efficiently reverse the order of the words (not characters) in an array of characters Given an array of characters which forms a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
Example input and output:
>>> reverse_words("this is a string")
'string a is this'
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: MS-Access design pattern for last value for a grouping It's common to have a table where for example the the fields are account, value, and time. What's the best design pattern for retrieving the last value for each account? Unfortunately the last keyword in a grouping gives you the last physical record in the dat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47413",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Standard way to merge Entities in LlblGenPro I start with an entity A with primary key A1, it has child collections B and C, but they are empty, because I haven't prefetched them. I now get a new occurrence of A (A prime) with primary key A1 with the child collections B and C filled.
What is a good way to get the A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47414",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How can I break on exception using ddbg I'm using the d programing language to write a program, and I'm trying to use ddbg to debug it. When there is an exception, I want to have the program break whenever there is an exception thrown so that I can inspect the stack.
Alternatively, is there another debugger that wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47420",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Why do some websites add "Slugs" to the end of URLs? Many websites, including this one, add what are apparently called slugs - descriptive but as far as I can tell useless bits of text - to the end of URLs.
For example, the URL the site gives for this question is:
https://stackoverflow.com/questions/47427/why-do-som... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47427",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "115"
} |
Q: Would you recommend using "The C5 Generic Collection Library for C# and CLI" based on your experience with it? This free collection library comes from IT University of Copenhagen.
http://www.itu.dk/research/c5/
There is a video with one of the authors on Channel 9. I am trying to learn how to use these collections a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47432",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: subselect vs outer join Consider the following 2 queries:
select tblA.a,tblA.b,tblA.c,tblA.d
from tblA
where tblA.a not in (select tblB.a from tblB)
select tblA.a,tblA.b,tblA.c,tblA.d
from tblA left outer join tblB
on tblA.a = tblB.a where tblB.a is null
Which will perform better? My assumption is that in general... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47433",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What is the shortcut key for Run to cursor What is the shortcut key for Run to cursor in Visual Studio 2008?
A: The shortcut key is CTRL+F10.
A: While on debug mode click on 'Run' you will see 'Run to Line' there in-front of it there will be a short key give which is CTRL + R
A: The default is CTRL+F10 but it can... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47436",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "54"
} |
Q: Which is a better refactoring tool for a beginner (something easy to learn & use)? Resharper, RefactorPro, etc?
A: I have tried using Resharper for some while and also CodeRush with Refactor later on.
I have stayed with CodeRush/Refactor. There is one major difference - the discoverability of the commands. Their l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47437",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Child spans of the same width I am trying to create a horizontal menu with the elements represented by <span>'s. The menu itself (parent <div>) has a fixed width, but the elements number is always different.
I would like to have child <span>'s of the same width, independently of how many of them are there.
What I've... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47447",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: A Well-Designed Web App GUI Framework? As one of those people that never got around to properly learning design (or having no talent for it), the design seems to be the step always holding me back. It's not a problem for rich-clients, as the standard GUI toolkits provide some acceptable ways to design a good-looking... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47468",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Are unit-test names important? If unit-test names can become outdated over time and if you consider that the test itself is the most important thing, then is it important to choose wise test names?
ie
[Test]
public void ShouldValidateUserNameIsLessThan100Characters() {}
verse
[Test]
public void UserNameTestValida... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47475",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Passing switches to Xcode 3.1 user scripts I have a user script that would be much more useful if it could dynamically change some of its execution dependent on what the user wanted. Passing simple switches would easily solve this problem but I don't see any way to do it.
I also tried embedding a keyword in the scr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47483",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Tips for database design in a web application Does someone have any tips/advice on database design for a web application? The kind of stuff that can save me a lot of time/effort in the future when/if the application I'm working on takes off and starts having a lot of usage.
To be a bit more specific, the application... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47486",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Create a variable in .CSS file for use within that .CSS file
Possible Duplicate:
Avoiding repeated constants in CSS
We have some "theme colors" that are reused in our CSS sheet.
Is there a way to set a variable and then reuse it?
E.g.
.css
OurColor: Blue
H1 {
color:OurColor;
}
A: There's no requirement that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47487",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: How to make your website look the same on Linux I have a fairly standards compliant XHTML+CSS site that looks great on all browsers on PC and Mac. The other day I saw it on FF3 on Linux and the letter spacing was slightly larger, throwing everything out of whack and causing unwanted wrapping and clipping of text. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47519",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Using yield to iterate over a datareader might not close the connection? Here is a sample code to retrieve data from a database using the yield keyword that I found in a few place while googling around :
public IEnumerable<object> ExecuteSelect(string commandText)
{
using (IDbConnection connection = CreateConnec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47521",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Maven2 Eclipse integration There seem to be two rival Eclipse plugins for integrating with Maven:
m2Eclipse
and
q4e.
Has anyone recently evaluated or used these plugins?
Why would I choose one or the other?
A: Side by side comparison table of three maven plugins.
A: There is only one point where q4e is actually... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47522",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: JUnit for database code I've been trying to implement unit testing and currently have some code that does the following:
*
*query external database, loading
into a feed table
*query a view,
which is a delta of my feed and data
tables, updating data table to match
feed table
my unit testing strategy is this:
I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47524",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Reading from a socket in C# I am trying to read ASCII text response from a tcp open streaming socket
This is what I have come up with so far. I want to know what is the best way to do this that includes error handling. Should I also be checking the SocketError after the Receive call in the do loop?
IPEndPoint ep =... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47533",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: SQL to add column with default value - Access 2003 Updating an old ASP/Access site for a client - I need SQL to add a column to an existing table and set a default value. Doesn't work - any ideas?
This works fine
ALTER TABLE documents ADD COLUMN membersOnly NUMBER
I want this to work:
ALTER TABLE documents ADD COLU... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47535",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: C# Console? Does anyone know if there is a c# Console app, similar to the Python or Ruby console? I know the whole "Compiled versus Interpreted" difference, but with C#'s reflection power I think it could be done.
UPDATE
Well, it only took about 200 lines, but I wrote a simple one...It works a lot like osql. You ent... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47537",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: Where's the Win32 resource for the mouse cursor for dragging splitters? I am building a custom win32 control/widget and would like to change the cursor to a horizontal "splitter" symbol when hovering over a particular vertical line in the control. IE: I want to drag this vertical line (splitter bar) left and right (... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Practical Experience using Stripes? I am coming from an Enterprise Java background which involves a fairly heavyweight software stack, and have recently discovered the
Stripes framework; my initial impression is that this seems to do a good job of minimising the unpleasant parts of building a web application in Jav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Can I detect and handle MySQL Warnings with PHP? I'm dealing with a MySQL table that defines the JobName column as UNIQUE. If somebody tries to save a new Job to the database using a JobName that is already in the database, MySQL throws a warning.
I would like to be able to detect this warning, just like an error, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47589",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: How can I use Core Animation to interpolate property values over time on my own classes? Specifically, I am looking to use CA on properties of types other than
*
*integers and doubles
*CGRect, CGPoint, CGSize, and CGAffineTransform structures
*CATransform3D data structures
*CGColor and CGImage references
an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47591",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: String concatenation: concat() vs "+" operator Assuming String a and b:
a += b
a = a.concat(b)
Under the hood, are they the same thing?
Here is concat decompiled as reference. I'd like to be able to decompile the + operator as well to see what that does.
public String concat(String s) {
int i = s.length();
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47605",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "577"
} |
Q: How to do C++ style destructors in C#? I've got a C# class with a Dispose function via IDisposable. It's intended to be used inside a using block so the expensive resource it handles can be released right away.
The problem is that a bug occurred when an exception was thrown before Dispose was called, and the program... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47612",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What are the advantages of installing programs in AppData like Google Chrome? I just noticed that Chromium was installed in AppData in both Vista and XP. If Google does that and if other applications does this, than is that becuase there is some form of protection? Should we write installers that does the same thing... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47639",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: How do I do full-text searching in Ruby on Rails? I would like to do full-text searching of data in my Ruby on Rails application. What options exist?
A: I can recommend Sphinx. Ryan Bates has a great screencast on using the Thinking Sphinx plugin to create a full-text search solution.
A: You can use Ferret (which... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47656",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Standards Document I am writing a coding standards document for a team of about 15 developers with a project load of between 10 and 15 projects a year. Amongst other sections (which I may post here as I get to them) I am writing a section on code formatting. So to start with, I think it is wise that, for whatever re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47658",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Tomcat vs Weblogic JNDI Lookup The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds".
For development (localhost), we might be running Tomcat and when declared in the <context> section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47676",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Reconnecting JMS listener to JBossMQ We have a Java listener that reads text messages off of a queue in JBossMQ. If we have to reboot JBoss, the listener will not reconnect and start reading messages again. We just get messages in the listener's log file every 2 minutes saying it can't connect. Is there something we... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47683",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How can I reformat XAML nicely in VS 2008? Visual Studio 2008's XAML editor (SP1) cannot reformat the XML into a consistent style.
Which tools can I use to get a nicely formatted XAML file? Studio integration preferred.
A: While browsing through the options, I found that I had to set "Position each attribute on a s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47685",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do I become "test infected" with TDD? I keep reading about people who are "test infected", meaning that they don't just "get" TDD but also can't live without it. They've "had the makeover" as it were. The question is, how do I get like that?
A: Learn about TDD to start, and then begin integrating it into your... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47692",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Is there a way to attach a debugger to a multi-threaded Python process? I'm trying to debug a deadlock in a multi-threaded Python application after it has locked up. Is there a way to attach a debugger to inspect the state of the process?
Edit: I'm attempting this on Linux, but it would be great if there were a c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47701",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: Multiple threads and performance on a single CPU Is here any performance benefit to using multiple threads on a computer with a single CPU that does not having hyperthreading?
A: You can consider using multithreading on a single CPU
*
*If you use network resources
*If you do high-intensive IO operations
*If ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: How to start coding the "Dining Philosophers" simulation? I'm not a beginner at C# but I really need to increase my understanding, so I've picked a classic deadlock problem to code to help teach myself some of the more advanced concepts of C#. The Dining Philosophers Problem seems like a good one, but I need a litt... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47707",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How does google make make those awesome PDF reports in Analytics and when you print a Google Doc etc? When you print from Google Docs (using the "print" link, not File/Print) you end up printing a nicely formated PDF file instead of relying on the print engine of the browser. Same is true for some of the reports in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47709",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do you determine how far to normalize a database? When creating a database structure, what are good guidelines to follow or good ways to determine how far a database should be normalized? Should you create an un-normalized database and split it apart as the project progresses? Should you create it fully normaliz... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47711",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Are mocks better than stubs? A while ago I read the Mocks Aren't Stubs article by Martin Fowler and I must admit I'm a bit scared of external dependencies with regards to added complexity so I would like to ask:
What is the best method to use when unit testing?
Is it better to always use a mock framework to automati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47749",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Remove duplicates from a List in C# Anyone have a quick method for de-duplicating a generic List in C#?
A: Simply initialize a HashSet with a List of the same type:
var noDupes = new HashSet<T>(withDupes);
Or, if you want a List returned:
var noDupsList = new HashSet<T>(withDupes).ToList();
A: If you're using .N... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47752",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "615"
} |
Q: How-to: Ranking Search Results I have a webapp development problem that I've developed one solution for, but am trying to find other ideas that might get around some performance issues I'm seeing.
problem statement:
*
*a user enters several keywords/tokens
*the application searches for matches to the tokens
*n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Is there a way to parse a dependency tree from a build script output? I have an inherited project that uses a build script (not make) to build and link the project with various libraries.
When it performs a build I would like to parse the build output to determine what and where the actual static libraries being lin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Google App Engine: Is it possible to do a Gql LIKE query? Simple one really. In SQL, if I want to search a text field for a couple of characters, I can do:
SELECT blah FROM blah WHERE blah LIKE '%text%'
The documentation for App Engine makes no mention of how to achieve this, but surely it's a common enough proble... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47786",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "125"
} |
Q: Generator expressions vs. list comprehensions When should you use generator expressions and when should you use list comprehensions in Python?
# Generator expression
(x*2 for x in range(256))
# List comprehension
[x*2 for x in range(256)]
A: The important point is that the list comprehension creates a new list. T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "512"
} |
Q: User Authentication in Pylons + AuthKit I am trying to create a web application using Pylons and the resources on the web point to the PylonsBook page which isn't of much help. I want authentication and authorisation and is there anyway to setup Authkit to work easily with Pylons?
I tried downloading the SimpleSiteT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Most elegant way to force a TEXTAREA element to line-wrap, *regardless* of whitespace Html Textarea elements only wrap when they reach a space or tab character. This is fine, until the user types a looooooooooooooooooooooong enough word. I'm looking for a way to strictly enforce line breaks (eg.: even if it results ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: How do you remove all the options of a select box and then add one option and select it with jQuery? Using core jQuery, how do you remove all the options of a select box, then add one option and select it?
My select box is the following.
<Select id="mySelect" size="9"> </Select>
EDIT: The following code was helpful... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1220"
} |
Q: HTML Compression and SEO? At work, we have a dedicated SEO Analyst who's job is to pour over lots of data (KeyNote/Compete etc) and generate up fancy reports for the executives so they can see how we are doing against our competitors in organic search ranking. He also leads initiatives to improve the SEO rankings on... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47827",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: In C#, what is the best way to test if a dataset is empty? I know you can look at the row.count or tables.count, but are there other ways to tell if a dataset is empty?
A: What's wrong with
(aDataSet.Tables.Count == 0)
?
A: I have created a small static util class just for that purpose
Below code should read like ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Getting the base element from a jQuery object I'm struggling to find the right terminology here, but if you have jQuery object...
$('#MyObject')
...is it possible to extract the base element? Meaning, the equivalent of this:
document.getElementById('MyObject')
A: $('#MyObject').get(0);
I think that's what you wa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47837",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "69"
} |
Q: Justification for Reflection in C# I have wondered about the appropriateness of reflection in C# code. For example I have written a function which iterates through the properties of a given source object and creates a new instance of a specified type, then copies the values of properties with the same name from one ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Why is creating a new process more expensive on Windows than Linux? I've heard that creating a new process on a Windows box is more expensive than on Linux. Is this true? Can somebody explain the technical reasons for why it's more expensive and provide any historical reasons for the design decisions behind those ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "115"
} |
Q: Refer to/select a drive based only on its label? (i.e., not the drive letter) I'm trying to refer to a drive whose letter may change. I'd like to refer to it by its label (e.g., MyLabel (v:) within a Batch File. It can be referred to by V:\ . I'd like to refer to it by MyLabel.
(This was posted on Experts Echange f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do you create a virtual network interface on Windows? On linux, it's possible to create a tun interface using a tun driver which provides a "network interface psuedo-device" that can be treated as a regular network interface. Is there a way to do this programmatically on windows? Is there a way to do this with... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: Upgrade database from SQL Server 2000 to 2005 -- and rebuild full-text indexes? I'm loading a SQL Server 2000 database into my new SQL Server 2005 instance. As expected, the full-text catalogs don't come with it. How can I rebuild them?
Right-clicking my full text catalogs and hitting "rebuild indexes" just hangs fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/47862",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.