text stringlengths 8 267k | meta dict |
|---|---|
Q: Linq2Sql: Manage DataContext In the following code doesn't work as
public void Foo()
{
CompanyDataContext db = new CompanyDataContext();
Client client = (select c from db.Clients ....).Single();
Bar(client);
}
public void Bar(Client client)
{
CompanyDataContext db = new CompanyDataContext();
db.Clie... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380720",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: What is the best way to properly get to know the Rails framework? I have been doing two projects on Rails which have worked out quite nicely but have in the process reinvented the wheel, running (and hot) water and painkillers which are as I have learned subsequently already present in the framework.
So basically, w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is the Action Design Pattern? What is the Action Design Pattern, I haven't heard of it before? I am suspecting it is the same as the Command Design pattern [wikipedia] but I can't find any resources on it.
A: I'm reading "The Action/Executor Pattern" at MSDN right now, and I have to disagree with the premise t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380724",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How do I get PIL to work when built on mingw/cygwin? I'm trying to build PIL 1.1.6 against cygwin or mingw whilst running against a windows install of python. When I do either the build works but I get the following failure when trying to save files.
$ python25
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Mono performance Are there any performance benchmarks for Mono compared to say Java in GNU/Linux?
Have you ever tested Mono's performance?
A: The latest version of this shoot-out can be found here.
In a nutshell, compared to Java, Mono uses much less memory and runs a little slower.
To keep things in perspective, t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380733",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: How do I traverse and search a python dictionary? I have nested dictionaries:
{'key0': {'attrs': {'entity': 'p', 'hash': '34nj3h43b4n3', 'id': '4130'},
u'key1': {'attrs': {'entity': 'r',
'hash': '34njasd3h43b4n3',
'id': '4130-1'},
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380734",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: How can I force Ruby to show a full stack trace? I just got this error message:
...
from c:/ruby/lib/ruby/gems/1.8/gems/...
... 10 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/...
...
and the bug (of course) is hidden somewhere in ... 10 levels....
How can I force Ruby to show a full stack trace?
A: begin
# Co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380744",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: A generic singleton What do you guys think about this for a generic singleton?
using System;
using System.Reflection;
// Use like this
/*
public class Highlander : Singleton<Highlander>
{
private Highlander()
{
Console.WriteLine("There can be only one...");
}
}
*/
public class Singleton<T> wher... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Microsoft Office PIA and how to reference and build correctly from WebApp I am currently trying to build on TeamCity, which uses Microsoft.Office.Interop dll. This will build and work fine locally as I have Office installed, however when trying to build it on TeamCity it fails as it has no reference.
I can't instal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Encrypting externally stored App blocks with exportable Key Provider I have been trying for quite a while to figure out how to encrypt Application blocks that are stored in an external file called dev_entlib.config
I can see in entlib (4.1) that it's possible to use the default protection providers to encrypt the bl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380772",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PHP Regular Expression to replace word with link I have a situation in which I parse a body of text and replace certain phrases with links. I then need to re-parse the string to replace a second set of phrases with links. The problem arises at this point, where certain words or phrases in the second set can be subst... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380773",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I limit the result set being pulled back by NHibernate's GetByCriteria? I have an NHibernate Dao..lets call it MyClassDao for want of a better name.
I am writing the following code.
MyClassDao myDao = new MyClassDao();
var values = myDao.GetByCriteria(Restrictions.Eq("Status", someStatusValue));
I am using ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380775",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Join Table On Self using Doctrine (DQL) I'm attempting to join a table on itself using doctrine's DQL. The scenario is:
I have a table of product attribute values at is linked to a products table via a reference table. The product attribute values are to serve as filters on the products, therefore, the products a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380776",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Iterate through the items of an MFC CComboBox I need to iterate through the items (strings) in a CComboBox to check which string is the longest. How can I get each item in the list?
A: Try the GetLBTextLen() function
Here's an example from MSDN:
// Dump all of the items in the combo box.
CString str, str2;
in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Architecture Critique: SQL Server FOR XML into XSLT for Rich HTML Interface Can I get some constructive feedback about the following architecture?
Simplified Architecture Summary:
Return XML from your SQL Server (using FOR XML) and pass it straight into a XSL transform to produce a rich HTML web site.
What are the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Using a ModelBinder to get an object by an ID I have multiple controller actions that takes an id
public ActionResult Get(int? id) {
...
}
public ActionResult Delete(int id) {
...
}
public JsonResult GetJson(int? id) {
...
}
I'm thinking its best practice to use a ModelBinder (SomeObjectFromIDModelBinder) on each... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Dev C++ Compiled Exe Information When I compile my project in Dev C++ how can I get information displayed on the summary page of the exe properties in windows?
I have tried using the "Version Info" tab in project properties with no luck.
A: You need to associate a resource with the .exe that has a VERSION info stru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380796",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: x86: Possible to debug-break when a particular pointer-to-string is pushed on the stack? I am debugging a third-party DLL for which I don't have the source code. This DLL maintains a pool of strings. I want to trap the earliest occurrence at which one of these strings is passed into a function...any function at all.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380798",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I know you have logged in a Sharepoint WebPage? We use Sharepoint as CMS for our webpages at work. I know how to create controls that can be only visible if you have logged in in SharePoint with:
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl1" runat="server" PermissionsString="AddAndCustom... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380804",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: msaccess.exe opens while trying to release the object I am opening a MS Access DB which is Password protected in vb.net using the folloing code:
Try
oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, _
ReadOnly:=False, Connect:="")
Catch ex As Exception
strErro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380805",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Downcasting in Java Upcasting is allowed in Java, however downcasting gives a compile error.
The compile error can be removed by adding a cast but would anyway break at the runtime.
In this case why Java allows downcasting if it cannot be executed at the runtime?
Is there any practical use for this concept?
publi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380813",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "199"
} |
Q: Best way to simulate "group by" from bash? Suppose you have a file that contains IP addresses, one address in each line:
10.0.10.1
10.0.10.1
10.0.10.3
10.0.10.2
10.0.10.1
You need a shell script that counts for each IP address how many times it appears in the file. For the previous input you need the following outp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "293"
} |
Q: Better interface for file downloads and uploads from a web page? I have what seems like a typical usage scenario for users downloading, editing and uploading a document from a web page.
*
*User clicks a link to download a document
*User edits downloaded file
*User saves the file
*User goes back to the web page... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380835",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I disable hotkeys in Dojo StackContainer I am using Dojo 1.2 to implement some functionality on my customer's webpage. One of the widgets I use is the dijit.layout.TabContainer, which inherits StackContainer. The StackContainer subscribes on keyboard events and creates a few hotkeys, like arrow left to move o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380846",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: In SQLServer, why doesn't granting object permissions add the user to db properly? This is my setup:
*
*SQL server 2005
*UserA already setup as user on the server but not on databaseA.
*GRANT Execute ON [GetOrders] TO [UserA] AS [dbo]
As you can see, i have missed out a step. I haven't added UserA to the dat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Pixel level 2D Graphics in Silverlight I am trying to port a WebForms app to Silverlight, this application is using the GDI Graphics class to draw polygons to a in-memory bitmap, it will then do pixel by pixel comparisons so I need access to the pixel buffer.
Example:
Graphics g = Graphics.FromImage(bmp);
g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380850",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: JSON syntax for property names What is the correct syntax to create objects in javascript that will work across the majority of web browsers (by that I mean : IE 6+, Firefox 2+, Opera 9+ )
Is this valid
var a = {
"class": "Person",
"name": "William Shakespeare",
"birthday": -12802392000000,
"nickname": "Bill... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380855",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Make sure only a single instance of a program is running Is there a Pythonic way to have only one instance of a program running?
The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, may... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "152"
} |
Q: Looking for info on custom drawing of interface components (Cocoa) It seems like more and more OS X apps these days are doing all kinds of fancy drawing stuff for custom controls. Apps like Twitterific, Things, EventBox, Versions just to name a few....
So basically I'm looking for any information on how to get start... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380875",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Can you simplify this expression? One for the mathematicians. This has gone around the office and we want to see who can come up with a better optimised version.
(((a+p) <= b) && (a == 0 || a > 1) && (b >= p)) &&
((b - (a + p) == 0) || (b - (a + p) > 1))
Edit: all data is positive int's
Edit: Better == simpler... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: T-SQL Stored Procedure NULL input values cause select statement to fail Below is a stored procedure to check if there is a duplicate entry in the database based upon checking all the fields individually (don't ask why I should do this, it just has to be this way).
It sounds perfectly straightforward but the SP fail... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380889",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Output Response in ANSI Characters format in ASP.net I am writing the data to the output browser using Response.write(some byte arrary)
Response.ContentType = "application/ms-excel";
Response.ContentEncoding = System.Text.Encoding.Default;
Response.OutputStream.Write(report, 0, report.Length)... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380893",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Are stored procedures a good idea when the server isn't under your control? Are there any ways to secure stored procedure consistency at the software level, so as to be sure that they're going to do what they're expected to do?
I'm reluctant to use sprocs because reading and modifying them is so easy as long as you ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to save XPathExpression result to separate XML with ancestor structure? I'm parsing big XML file with XPathExpression selection for some nodes existing at various depth levels.
What is the easiest way to export selected nodes to separate XML file, preserving all direct-ancestors nodes (and their attributes)? C# ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380911",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Invent new language, syntax check? i been thinking of a new programming language. Before trying to implement it i would like to check the syntax of code to see if there is much ambiguity. (i find it funny that its possibly to do var++++ to a class)
A: Write down the syntax in the correct format and use Antlr or any... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Flex Tooltip Positioning in a Resizeable App Our Flex app automatically resizes with the browser window, we've addressed a whole bunch of scaling issues quite easily but one that remains is tooltips. They show in the wrong location on screen, not being scaled properly based on the window size. Since tooltips are pos... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What is the best way to measure execution time of a function? Obviously I can do and DateTime.Now.After - DateTime.Now.Before but there must be something more sophisticated.
Any tips appreciated.
A: System.Environment.TickCount and the System.Diagnostics.Stopwatch class are two that work well for finer resolution ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "86"
} |
Q: Zend Zend_File_Transfer_Adapter_Http renaming question I've got a question about renaming a file after it's been uploaded in Zend. I don't know where to put the Rename Filter. Here's what I've got. I've tried moving things around, but I'm lost. Currently it does upload the file to my photos folder, but it doesn't re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Saving a Base64 string to disk as a binary using PHP As a "look under the covers" tutorial for myself I am building a PHP script to gather emails from a POP3 mailbox. While attempting to make use of binary attachments I am stuck trying to figure out what to do with the attachment information.
Given a string that wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380922",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Are there any timeframe selector web controls for .NET? I would like to use a timeframe selector in a web page, that is optimized for touchscreen usage. (e.g. large buttons).
I am actualy looking for a control that mimics iPhone UI for selecting a time frame or a time interval, say from 10:30 AM to 15:00 PM.
A: I d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380923",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I change database encoding for a PostgreSQL database using sql or phpPgAdmin? How can i change database encoding for a PostgreSQL database using sql or phpPgAdmin?
A: In short, you cannot do this with only phpPgAdmin or SQL without risking existing data corruption.
You have to export all data, create databa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: Own Localization Provider or build on top of the ResourceProvider in ASP.NET? To use the built in Localization (Resource Provider) in ASP.NET can only handle translated strings (see GetString("key", locale) with no user defined arguments if I have read the documentation correct.
What is the best, to build a custom r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380937",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: .NET method to round a number up to the nearest multiple of another number? I'm looking for a method that can round a number up to the nearest multiple of another. This is similar Quantization.
Eg. If I want to round 81 up to the nearest multiple of 20, it should return 100.
Is there a method built-in method in th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Microsoft Active Directory Port What ports do you need to open in a firewall to connect a remote Windows computer to a Microsoft Active Directory server domain behind that firewall?
A: *
*TCP 135 : MS-RPC
*TCP 1025 & 1026 : AD Login & replication
*TCP 389 : LDAP
*TCP & UDP 53 : DNS
*TCP 445 : SMB , Microsoft-d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380951",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Casting to a Class which is determined at run-time I have a method fetchObjects(String) that is expected to return an array of Contract business objects. The className parameter tells me what kind of business objects I should return (of course this doesn't make sense in this construed case because I already said I w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380952",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Best practices of unittesting methods that contain conditional conditions I am new to unittesting and currently have a problem with finding a decent way to test methods that contain branches.
I created a small demo method I hope could be used to explain the problem.
public void ExportAccounts()
{
int emptyAcco... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380962",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What programming language was Windows Vista programmed in? Which programming language(s) were used to code Windows Vista?
A: From working with the Windows CE operating system I'd say its a mix of C for the old school code and interfaces, and a lot of C++ behind the scenes for drivers and other code. It (WinCE) uses... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380988",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Network interface settings in embedded Windows XP How can we get the network interface name (i.e. the one that appears in the "Network connections" dialog) given the device description (i.e. the string that appears in the "Device Properties -> Connect using:" textbox)?
We must do it in pure C/C++ language, or throug... | {
"language": "en",
"url": "https://stackoverflow.com/questions/380990",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: AJAX + ASP.net to retrieve data from Sql Server? I'm looking to dynamically control a set of drop downs so that they'll filter their items after another drop down's index has been changed.
I'm working in C#/ASP.net and it would be great if I could get the necessary data straight from Sql Server. I suppose I could ge... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: WSF and ADO with DB2 , recordset.MoveNext not supported error in vbscript I am trying to loop on a recordset returned from db2 using a .wsf file and vbscript .
the vbscript libfile(lib.vbs) is as follows
'***************
Const ADOCon="Provider=IBMDADB2.1;Password=*****;User ID=*****;Data Source=yourdatasourc;"
'**... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381007",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ASP.NET MVC Error: Page is not allowed here because it does not extend class 'System.Web.Page' I have a new ASP.NET MVC project (my first), and I had been running fine with 1 controller, view, and model. After I added a new controller and view, my first view started throwing this error message when I try to run the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381008",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Session not reinitialized after timeout? I have this classic ASP site which has been working fine until we updated it. It was just a site-update, meaning .asp files which ran fine in our test enviroment, no service packs or patches. I can not reproduce the error at all on a test-site on the same server.
The system i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381010",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: asp.net panel statement am having trouble with visible attribute of an asp.net panel. Basically I have a page that calls a database table and returns the results in a detailsview. However, some of the values that are returned are null and if so I need to hide the image thats next to it.
I am using a panel to determ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381016",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Datacontext Lifetime in WinForm Binding Scenario This one has been stumping me for a while. But I'm no expert. This is a bit long...
I have a WinForms app with an Outlook style UI. That it to say there is a bar on the left hand pane that allows you to select a 'screen' which is a WinForms control, say the custome... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381017",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Team Foundation Server Source Control Structure I have been working on standardizing the source control structure for our Team Foundation Server rollout for the new year. I have started by using the Microsoft Team Foundation Server Branching Guidance documentation available on CodePlex.
I was hoping to get some fee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381020",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "48"
} |
Q: Launch safari from a Mac application How can I launch the Safari browser or the user's default browser pointing it to a specific address from within my Mac application?
I am using Objective-C as the programming language.
Thanks.
A: From a shell you can use the open command with a URL as a parameter, and that takes ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: True random generation in Java I was reading the Math.random() javadoc and saw that random is only psuedorandom.
Is there a library (specifically java) that generates random numbers according to random variables like environmental temperature, CPU temperature/voltage, or anything like that?
A: Quick and dirty:
pu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381037",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: What Malicious Things has Javascript Done To You? I asked the question:
What's with those Do-Not-Use Javascript People and many people said that Javascript allows security exploits through client-side attacks.
So I need to follow up and understand the how bad the nature of these attacks are:
I'd like to hear some d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381042",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Which .net ORM can deal with this scenario From a previous question, I learn that Linq to SQL is not able to eager load only certain files of foreingKey tables.
So I'm asking what .net ORM can support including this type of statement inside a entity class, with only one DB call and without manually mapping the resul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: RegSaveKey returns ERROR_PRIVILEGE_NOT_HELD I'm trying to save the contents of a particular registry key to a file using the RegSaveKey() API:
HKEY key;
LRESULT result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\MyProduct", 0, KEY_ACCESS_ALL, &key);
result = RegSaveKey(key, L"c:\\temp\\saved.reg", NULL);
However... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381055",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to handle the key presses in a J2ME GUI application I programmed a bluetooth Television-Remote control for cellphones in J2ME using javax.microedition.lcdui.* (Gauge, List, ChoiseGroup) GUI-Elements.
I want the cellphone to have real-time interaction with my Television, I would like to find way to send user inp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381062",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: asp.net mvc - one door filter I need fire a filter method with all string in GET or POST value from http request before it was bind into controller action
Can i do it in Global.asax.cs? and if yes, can u give me more details or example (great) about this?
A: You can do it in Global.asax.cs for all requests by
prot... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381063",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I replace strings in a text in Java? In a project we have text files looking like this:
mv A, R3
mv R2, B
mv R1, R3
mv B, R4
add A, R1
add B, R1
add R1, R2
add R3, R3
add R21, X
add R12, Y
mv X, R2
I need to replace the strings according to the following, but I am looking
for a more general solution.
R1 =>... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: ASP.NET MVC localization best practice? I need help with the best practice to localize asp mvc apps,
I saw Oxite having a base method named Localize in the BaseController, but is the Localization a task for the view or the Controller?
Or should I use resx files / or use db tables?
A: Since this a one year question ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Advantages/disadvantages of Glassfish v3 Prelude vs Springsource dm server for Web applications? Both of these appservers are at least in part OSGI based. One (Glassfish) is obviously Java EE while the other isn't. Now I'm at the stage of choosing a platform for a new project and the natural choice is Glassfish v3... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381071",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: DataGridView.CellContentClick DataGridView.CellContentClick is not firing if I mouse click a DataGridViewCheckBoxCell very fast. How can I solve this? I need to know when CheckBox's check state changes
A: Try handling the CellMouseUp event.
You can check which colum the MouseUp event occurred in to see if it is you... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: CVSListBox notification after delete I've just added one of the new (MFC Feature Pack) CVSListBox controls to a project. The list of items in the control is tracked by some other objects in my application, so I need to take lots of notifications from the list-box when anything changes so that I can update other stu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381077",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can dynamically pluggable modules be done in VHDL? In c (embedded) a plugin can be implemented by defining a function pointer table and an address range that the module can be loaded into.
This requires linker directive to allocate the space and define the location of the function table.
Is there a similar mechanism... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381082",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Worker process recycles because it reached its virtual memory limit We host a rather large (self written) ASP.NET website for our customers. It consists of a web service, a web site and a image serving web site, all three in their own virtual directory. The three virtual directories are together in one application p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How do you handle scheduling/deadlines around programmers? Do programmers like to create deadlines? Im a web developer, and schedules/deadlines are all over the place in my field. But I've worked with some software engineers/programmers who hate deadlines, is there a way around that?
A: Traditionally you can only a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Has anyone got a solution for the problem !=
*
* I'm using the asp:TreeView and would really rather just output it to a standard nested <HTML> list using <ul> and <li>, at the moment it produces some pretty ugly code using <div>s and <table>s.
Has anyone got a decent workaround?
I'm using <asp:XmlDataSource> to po... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Reverting CSS style of I'm using a bookmarklet that inserts a script tag into the current web page.
This script has some UI and an "input type=submit...." tag in it.
Web page A has chosen not to style "input type=submit.." tags whereas web page B has styled them.
This results in the bookmarklet displaying differentl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381100",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: MFC SetRegistryKey... Is there a GetRegistryKey function? I have these two lines of code.
CString strHost = AfxGetApp()->GetProfileString(_T("WebServices"), _T("Server"));
AfxMessageBox(strHost);
Nowhere in the app do I set the value. (the installer does that). So the strHost, should be the same no matter where or... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381131",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I test with multiple versions of Firefox? How can I test my website in multiple versions of firefox?
I have v2 installed. Now no matter where or how many times I install FF3, it always executes ff2..
I checked the interweb and it seems there used to be a MultiFireFox tool that could run several versions. It ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381134",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Algorithm to determine thread "hotness" I'm trying to come up with a way to determine how "hot" certain threads are in a forum. What criteria would you use and why? How would these come together to give a hotness score?
The criteria I'm thinking of include:
*
*how many replies
*how long since the last reply
*av... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381138",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Purpose of Restrictions parameter in MetaObject constructor? I currently have an issue in my DLR language implementation where subsequent calls to a method defined in the language occur with the same input parameters used by the first call to that method.
So... if I do this in my language:
PrintType( 34 );
PrintType... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381141",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to write a socket based Custom Transport for WCF I have a mobile platform that I am trying to write some communications code on.
The platform provides a proprietary communication mechanism that is based on standard socket functions. Basically, the platform's socket API looks exactly the same as the standard Win... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381142",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Anyone doing mainframe or AS/400 Batch processing with Java? I'm going to propose to a client that I build some batch jobs in Java that will run on their mainframe and/or AS/400s (sorry System z and System i). Both platforms are up to date system software wise. I'm wondering if anyone has done this and can provide a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to select a large amount of records in SQL SERVER I'm trying to select more than 80,000 record in SQL Server in a table that has millions of records. The issue is that I've the correct Index, but it takes more than 15 minutes to return the recordset.
I'm using MS SQL Server 2000, I found a pagination method usin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381145",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: linking groups of matches I have a table that represents a series of matches between ids from another table as follows:
CREATE TABLE #matches (
asid1 int,
asid2 int
)
insert into #matches values (1,2)
insert into #matches values (1,3)
insert into #matches values (3,1)
insert into #matches values (3,4)
insert in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381153",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Please explain this Perl regular expression $rowfetch =~ s/['-]//g; #All chars inside the [ ] will be filtered out.
$rowfetch =~ m/(\w+), ?(.)/;
printf $fh lc($2.$1);
I got help building this regular expression yesterday, but I don't fully understand it.It takes a name like Parisi, Kenneth and prints ou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381157",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Do XCode projects need special settings to use pre-compiled boost libraries? I have just installed boost for the first time on my Intel Mac, and it works fine in general, as long as I use only boost's header files.
But when I try to use a lib, in my case the regex lib, my app links and launches fine, but then it soo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381161",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: friend AND inline method, what's the point ? I see in a header that I didn't write myself the following:
class MonitorObjectString: public MonitorObject {
// some other declarations
friend inline bool operator==(MonitorObjectString& lhs, MonitorObjectString& rhs) { return(lhs.fVal==rhs.fVal); }
I can't under... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381164",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: How to change the layout of a WPF Control from outside of that Control I am big into code generation for the service/data layer of my apps. What I would really love to do is generate some basic WPF Controls, Data Templates, or some other XAML code based on the metadata I use to generate my service/data layer. EDIT:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381167",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to encourage non-anonymous editing on MediaWiki? Problem
At work we have a department wiki (running Mediawiki). Unfortunately several
persons edit without logging in, and that makes it very difficult to track
down editors to ask questions about the content.
There are two strategies to improve this
*
*encourag... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381169",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How does this milw0rm heap spraying exploit work? I usually do not have difficulty to read JavaScript code but for this one I can’t figure out the logic. The code is from an exploit that has been published 4 days ago. You can find it at milw0rm.
Here is the code:
<html>
<div id="replace">x</div>
<script>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381171",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "147"
} |
Q: JQuery source script causes "A script on this page is causing Internet Explorer to run slowly." message One of the web pages on our site is extremely long. Although the page itself does not call any javascript or jquery functions, its base page registers the JQuery source script (jquery-1.2.6.js) and this seems to c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381204",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Recording VBA code in Power Point 2007? In Office 2003 if I recall correctly you had a "record macro" option.
In PowerPoint 2007, under View->Macros, you get a macro box. None of the options are "record". If you put in a name, you can select "create", but that takes you to the VB editor. If you edit the slide manual... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381206",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: IEnumerable as return type Is there a problem with using IEnumerable<T> as a return type?
FxCop complains about returning List<T> (it advises returning Collection<T> instead).
Well, I've always been guided by a rule "accept the least you can, but return the maximum."
From this point of view, returning IEnumerable<T>... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381208",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "29"
} |
Q: Debugging (Tracing) WMI queries? I've got a third-party program that's making WMI queries to local WMI providers (so it's not using DCOM, so packet-sniffers are out). I'd like to find out what queries these are.
It's also on XP, so the new Vista WMI tracing infrastructure is out, as well, unfortunately.
Any pointers... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Javascript - MultiLine RegExp: lastIndex stuck on newlines? Some Context
From Javascript: The Definitive Guide:
When regexp is a global regular expression, however, exec() behaves in a slightly more complex way. It begins searching string at the character position specified by the lastIndex preperty of regexp. Wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What are your feelings on functional specs? And Software design? Does the functional spec help or hinder your expectations? Do programmers who practice the waterfall methodology, are they open to functional specs? I'm a web designer/developer working with a team of 5 programmers and would like to write a functional ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381216",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: SQL Server - Query Short-Circuiting? Do T-SQL queries in SQL Server support short-circuiting?
For instance, I have a situation where I have two database and I'm comparing data between the two tables to match and copy some info across. In one table, the "ID" field will always have leading zeros (such as "00000000123... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is it possible to monkey patch in Java? I don't want to discuss the merits of this approach, just if it is possible. I believe the answer to be "no". But maybe someone will surprise me!
Imagine you have a core widget class. It has a method calculateHeight(), that returns a height. The height is too big - this result... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381226",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Hidden features in Oracle I enjoyed the answers and questions about hidden features in sql server
What can you tell us about Oracle?
Hidden tables, inner workings of ..., secret stored procs, package that has good utils...
A: The cardinality hint is mostly undocumented.
explain plan for
select /*+ cardinality(@i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381231",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Rename my ServiceManager class Following Alan Green's "Naming Java classes without Manager" I've started hunting *Manager classes in my own code.
How would you rename the following class? ServiceLoader, maybe? but it doesn't "load" anything from anywhere.
class ServiceManager
{
public bool IsRunning { get; };
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Purpose of memory alignment Admittedly I don't get it. Say you have a memory with a memory word of length of 1 byte. Why can't you access a 4 byte long variable in a single memory access on an unaligned address(i.e. not divisible by 4), as it's the case with aligned addresses?
A: Fundamentally, the reason is becaus... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "264"
} |
Q: In .aspx, how to pass a value from asp:Repeater to code behind function So, I want to use jquery to set the text of a button, depending on the value of a property in the current row of a repeater.
I need to call a function in the code-behind to map the value to the text the button should have. So, I need to pass to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381253",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: PHP conditionals, brackets needed? I was just browsing a forum and someone asked about a PHP file they had found on the web. It has several spots like this in the code:
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
I have always thought brackets are needed to enclose what you want t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381259",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Better way to check variable for null or empty string? Since PHP is a dynamic language what's the best way of checking to see if a provided field is empty?
I want to ensure that:
*
*null is considered an empty string
*a white space only string is considered empty
*that "0" is not considered empty
This is wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/381265",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "210"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.