text string | meta dict |
|---|---|
Q: Singleton Data Access Layers In our data access layer at work we have this standard implementation where the class is accessed through a singleton public property which looks something like this:
public static CustomerController Instance
{
get
{
lock(singletonLock)
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252304",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: SharePoint editing for Web test, change pages properties using Visual Studio Test Suite I'm using Visual Studio 2008 (SP1) to create a web test that will allow me to edit a page using EditForm.aspx.
I am trying it using fiddler and the recorder. I have managed to get some tests to run, but they do not change the pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252319",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I add a console like element to a c# winforms program I have a program that monitors debug messages and I have tried using a TextBox and appended the messages to it but it doesn't scale very well and slows way down when the number of messages gets large. I then tried a ListBox but the scrolling was snapping ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252323",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Calculate product with LINQ I am learning LINQ and have a very simple question that I think will help my understand the technology better. How can I find the product of an array of ints?
For example, what is the LINQ way to do:
int[] vals = { 1, 3, 5 };
return vals[0] * vals[1] * vals[2];
A: This would work:
var p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: How to reload a DataGrid in Flash ActionScript after an XML file has loaded? Is it possible to change the RowCount of a DataGrid in flash after it has been created on the stage?
I am loading an XML file externally that contains the number of rows the DataGrid should have, but the problem is that because this file is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to write Asynchronous LINQ query? After I read a bunch of LINQ related stuff, I suddenly realized that no articles introduce how to write asynchronous LINQ query.
Suppose we use LINQ to SQL, below statement is clear. However, if the SQL database responds slowly, then the thread using this block of code would be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252355",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "64"
} |
Q: Creating a TCP Client Connection with SSL I'm trying to create a TCP connection and send/read data that uses SSL, but I haven't been able to successfully accomplish this.
What I'd like to do is something like this:
TcpClient _tcpClient = new TcpClient("host", 110);
BinaryReader reader =
new BinaryRe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Change depth of indentation in vi What's the easiest way to increase or decrease indentation for a large block of code in vi?
A: Autoidenting:
For a { } block I use the command: =iB (with the cursor inside the block to ident)
For re-identing a complete file, I use gg=G
Now for increase or decrease identation on a b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252371",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Shared Hosting I'm a bit surprised that this isn't on more forums as it is a total show stopper.
I have a ASP.NET app that calls a web service I wrote. It is hosted on a shared hosting site. Recently the company moved my server to allow for both 1.1 and 2.0 applications. The trust level has changed from 'full' to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252382",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I setup a friendly email name in the MailSetting section of web.config? Currently I have:
<system.net>
<mailSettings>
<smtp from="me@mydomain.com">
<network
host="localhost"
port="25"
/>
</smtp>
</mailSettings>
</system.net>
How can I chan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252391",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: restarting a java console application At the moment I have a console application. I would like to be able to exit the application, update through svn, recompile and then relaunch. This is running under a Linux environment. At the moment I'm not sure how I would be able to relaunch the application. Is there a way... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252411",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I use a DLL file from Python? What is the easiest way to use a DLL file from within Python?
Specifically, how can this be done without writing any additional wrapper C++ code to expose the functionality to Python?
Native Python functionality is strongly preferred over using a third-party library.
A: This pa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252417",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "220"
} |
Q: JSF & Facelets Flow I have a dynamic Facelets page that needs to show information from database when the page loads. At this point in the flow, there have not been any form submissions. Every JSF example I can find only shows a form submission with dynamic results on the next page.
Every call I make to our database ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252451",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: One SVN repository or many? If you have multiple, unrelated projects, is it a good idea to put them in the same repository?
myRepo/projectA/trunk
myRepo/projectA/tags
myRepo/projectA/branches
myRepo/projectB/trunk
myRepo/projectB/tags
myRepo/projectB/branches
or would you create new repositories for each?
myRepoA/t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "106"
} |
Q: How can I output NLog messages to Visual Studio's Output Window? I'm trying to send the output to the console (or colouredconsole) ... which I'm hoping would (also?) go to the Visual Studio's Output window for any ASP.NET web site/app/mvc app.
It doesn't by default, but if I change the target to 'file' then it works... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252464",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "69"
} |
Q: Why was the switch statement designed to need a break? Given a simple switch statement
switch (int)
{
case 1 :
{
printf("1\n");
break;
}
case 2 :
{
printf("2\n");
}
case 3 :
{
printf("3\n");
}
}
The absence of a break statement in case 2, impli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252489",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "153"
} |
Q: What's the latest version of Boost compatible with VC++6? What is the latest version of the Boost library that is compatible with Microsoft Visual C++ 6? And can you provide a link to download it directly?
The Downloads link at http://www.boost.org only gives a download for version 1.36.0, and the documentation for... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252492",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How to truncate a date in .net? Besides the DateTime ctor (new DateTime(year, month, day)) , is there any other way to truncate a date?
A: DateTime.Now.ToShortDateString();
Also, ToString() is overloaded in DateTime, you can pass a few dozen formatting options to it.
See:
http://authors.aspalliance.com/aspxtreme/s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252493",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Named queries with nHibernate I am having a great deal of trouble getting named queries to work with nHibernate. My latest problem is getting the error message "could not execute query" with no additional information. Are there any complete examples I can download from somewhere because all the tutorials and documen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252506",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Why do we even need the "delete[]" operator? This is a question that's been nagging me for some time. I always thought that C++ should have been designed so that the delete operator (without brackets) works even with the new[] operator.
In my opinion, writing this:
int* p = new int;
should be equivalent to allocati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252515",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: Streaming directly to a database I'm using c#, and have an open tcpip connection receiving data. Is it possible to save the stream to an ms sql server database as I'm receiving it, instead of receiving all the data then saving it all? If the stream could be sent to the database as it's being received, you wouldn't... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252517",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Count work days between two dates How can I calculate the number of work days between two dates in SQL Server?
Monday to Friday and it must be T-SQL.
A: Another approach to calculating working days is to use a WHILE loop which basically iterates through a date range and increment it by 1 whenever days are found to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252519",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "192"
} |
Q: Why won't Django 1.0 admin application work? I've just started playing with Django and am loosely following the tutorial with my own set of basic requirements. The models I've sketched out so far are a lot more comprehensive than the tutorial, but they compile fine. Otherwise, everything should have been the same.
M... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252531",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: WCF REST starter kit fails to install I just, quite anxiously, downloaded the spankin new WCF REST starter kit. The installed failed. Anyone else had this problem?
http://msdn.microsoft.com/en-us/netframework/cc950529.aspx
Edit: The install fails during the template installation. The VS JIT debugger window pops up. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252535",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Does adding many many subviews to a viewcontrollers default view make my app slow? I have an app where I create many uiviews and add them to the self.view of the UIViewController. My app is running really slowly. I am releasing all of my objects and have no memory leaks (I ran the performance tool). Can anyone tell ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252539",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: When is SqlConnection.RetrieveStatistics() useful? What are the problems that calling this method can help with?
Do you ever use it in debugging you data access?
A: This page from MSDN has more information. Seems like it contains useful debugging information but I must admit I've never used it.
| {
"language": "en",
"url": "https://stackoverflow.com/questions/252540",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do I upgrade mysql? When upgrading MySQL, I first create a backup of the database. Then I will uninstall the current version installed, and delete all the files that were left by the installer. Then I install the latest GA version, and restore the created back-up, using the MySQL Administrator.
Is there a better... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252548",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the difference between file and record in OS's view? In terms of general operating system concepts, what is the difference between a file and a record?
How the OS will manage them? I know what a file is and what a record is but how it is distinguished in an
OS?
A: yeap I got the answer
A file is a collect... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252550",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why do we need C Unions? When should unions be used? Why do we need them?
A: I'd say it makes it easier to reuse memory that might be used in different ways, i.e. saving memory. E.g. you'd like to do some "variant" struct that's able to save a short string as well as a number:
struct variant {
int type;
dou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252552",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "294"
} |
Q: How does Cauchy Reed-Solomon Algorithm work? Does anybody have any reference material that details Cauchy-Reed algorithm? Googling for Cauchy-Reed Solomon results cleversafe.org. Although they have an open sourced product based on Cauchy Reed-Solomon code, they haven't provided any material explaining how the algor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252555",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Redundant & inline functions What is meant by redundant function? What is the difference between a redundant function & an inline function?
A: A redundant function is one which has potentially been superseded by another function, and shouldn't be used anymore. I guess it can be thought of in the same way as a dep... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252559",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET Formview Item Inserting Event I'm using the FormView control in ASP.NET for a simple form to insert into a MS SQL DB. I have an event for onItemInserting to set some values behind (such as time stamp, etc) and was curious how to check some user entered values in the onItemInserting event and cancel the item ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252574",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can we call functions using function pointer in C? Can we call functions using function pointer? if yes how?
A: Yes. Here's a good tutorial with examples.
A: Yes you can.
A: Yes. Trivial example:
// Functions that will be executed via pointer.
int add(int i, int j) { return i+j; }
int subtract(int i, int j) {re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252575",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: .Net: FtpWebRequest "(503) Bad sequence of commands" error On large files (~200+ MB), I get the 503 error when I read the stream.
ftp = (FtpWebRequest)WebRequest.Create(new Uri(address.AbsoluteUri + @"/" + file.Name));
ftp.Credentials = new NetworkCredential(username, password);
ftp.Method = WebRequestMethods.Ftp.Do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252588",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How can I create an ASP.NET web service that isn't hosted in IIS? I want to create a stand-alone (i.e. not hosted in IIS) web service in ASP.NET. Is this possible, and if so what's the best way to do it?
A: So, you want to use ASP.NET to generate a web service, but you don't want to host ASP.NET using IIS. (For th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252593",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: "Mem Usage" higher than "VM Size" in WinXP Task Manager In my Windows XP Task Manager, some processes display a higher value in the Mem Usage column than the VMSize. My Firefox instance, for example shows 111544 K as mem usage and 100576 K as VMSize.
According to the help file of Task Manager Mem Usage is the worki... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252597",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Practices for Logging in a desktop application We are developing a desktop application(visual basic 6.0).We have our own logging framework. What are good practices? When we have a web application, then we can control the level of logging. How to go about in a desktop app?
A: Any answer needs to be considered based ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Locking down valid characters in a Textbox I need to be able to lock down the valid characters in a textbox, I presently have a regex which I can check each character against such as
[A-Za-z]
would lock down to just Alpha characters.
protected override void OnKeyPress(KeyPressEventArgs e)
{
if (e.KeyChar == (c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252611",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Sun Access Manager i'm looking to learn about SSO, and heard about Sun Access Manager and openSSO(?)
I want to build a small system that does SSO, like have Apache as a front end working with an SSO server.
Should I investigate Sun AM and is openSSO a product?
Do they offer these free for developers?
Thanks
A: Open... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252613",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting around PHP safe mode to write to server. Is it possible? I have got the following problem since the server has safe mode turned on, and directories are being created under different users:
*
*I upload my script to the server, it shows as belonging to 'user1'. All it is doing is making a new directory when... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252615",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Moving data from Sql Server to Excel via a Web Service My users want data from my application in Excel. The data resides in a SQL Server database but I don't want the users to have direct access to the database, I would rather provide them a web service to get the data. What is the best way to move data from SQL S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252624",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Need a simple RegEx to find a number in a single word I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word.
/page/{currentPage}
so.. can someone give me a regex which matches when the word is a numb... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252626",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Why this union is deleting the 1st records in arrays in the c code? Here is one of my header file which consists of a union template with 4 different structures.
#define MAX 3
union family
{
struct name /*for taking the name and gender of original member*/
{
unsigned char *namess;
unsigned ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can ADO.NET Data Services use named pipes as a transport I am well aware that the Rest based approach is targeting HTTP. I would love to use the REST APIs and other goodness between processes on the same computer. Since ADO.NET data services is built on top of WCF it would seem reasonable to assume that the transp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252655",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Does reflection expose if the last argument for a method was marked with 'params'? Using reflection on a method definition I would like to find out if the original method was defined with 'params' on the last parameter. So can I discover if the original definition was this...
public void MyMethod(int x, params objec... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252656",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Can offline web apps be a replacement for desktop apps? I work on a desktop sales app that is run off a tablet and was wondering if this and other "traditional" desktop tablet applications could be viable as a offline web application. The main difference with tablet applications being the inking support. I think a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252658",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I delete my browser cookies using javascript? How can I delete the session information from my browser by using javascript? Is it possible to do?
A: Session information is usually stored on the server. An HTTP request to a page that destroys the session would normally do the trick (using AJAX if you wish).... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252660",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Localization: How to map culture info to a script name or Unicode character range? I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the alphabets corresponding to the current culture on the screen... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: I need to get all the cookies from the browser I need to get all the cookies stored in my browser using JavaScript. How can it be done?
A: *
*You can't see cookies for other sites.
*You can't see HttpOnly cookies.
*All the cookies you can see are in the document.cookie property, which contains a semicolon separ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252665",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "125"
} |
Q: Is auto ever useful in C/C++? Has anyone ever seen the storage class auto explicitly used in C/C++? If so, in what situation?
A: I haven't seen auto used in code written in the last 10+ years. There is no reason to use auto since the only places you can use it is where it is implied anyway. The only reason it stil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Firefox add-on tools for checking JavaScript syntax? Not sure if there is any Firefox add-on tool for checking JavaScript syntax, var declaration, or even pre-compiling available?
I find out is very difficult to debug JavaScript in a web html page. I have to add some script there. When the scripts get very big or l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252677",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Is LINQ to SQL Dead or Alive? Just when I make friends with LINQ to SQL, it appears as though MS is pulling the rug out from under it.
http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx
From my little bit of research, EF is way overkill for simple work. But after... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252683",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "96"
} |
Q: Why does the DoubleBuffered property default to false on a DataGridView and why is it protected? We had a performance issue with DataGridViews where the redraw was horridly slow and found the solution Here to create a derived type and enable double buffering on the control.
(Derived type is necessary since the Doubl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252689",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Wrapping variable width text in Emacs Lisp I am hacking up a tagging application for emacs. I have got a tag cloud/weighted list successfully displaying on a buffer, but i am running into a snag. I need to be able to properly word-wrap the buffer, but I haven't a clue where to start.
The font I am using is a varia... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is the difference between Python's list methods append and extend? What's the difference between the list methods append() and extend()?
A: Append vs Extend
With append you can append a single element that will extend the list:
>>> a = [1,2]
>>> a.append(3)
>>> a
[1,2,3]
If you want to extend more than one ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3113"
} |
Q: How to produce Photoshop stroke effect? I'm looking for a way to programmatically recreate the following effect:
Give an input image:
input http://www.shiny.co.il/shooshx/ConeCarv/q_input.png
I want to iteratively apply the "stroke" effect.
The first step looks like this:
step 1 http://www.shiny.co.il/shooshx/ConeCa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252709",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ASP.NET MVC : Not sure how to make these routes i'm trying to make the following routes .. and currently i'm going about this in a really long way.. ie. one route instance for EACH route.
this is what i'm after... (assuming i'm doing a 'stackoverflow website')
/ <-- root site
/page/{page} ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I get a list of commit comments from CVS since last tagged version? I have made a bunch of changes to a number of files in a project. Every commit (usually at the file level) was accompanied by a comment of what was changed.
Is there a way to get a list from CVS of these comments on changes since the last ta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252735",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: How can I use an array of function pointers? How should I use array of function pointers in C?
How can I initialize them?
A: This "answer" is more of an addendum to VonC's answer; just noting that the syntax can be simplified via a typedef, and aggregate initialization can be used:
typedef int FUNC(int, int);
FUNC... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252748",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "200"
} |
Q: How to add line numbers to range of lines in Vim? How can I add line numbers to a range of lines in a file opened in Vim? Not as in :set nu—this just displays line numbers—but actually have them be prepended to each line in the file?
A: With Unix-like environment, you can use cat or awk to generate a line number ea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: Advanced Java Generics question: why do we need to specify redundant information I've got some generic class for my JPA model POJO that goes like this:
public interface Identifiable<PK extends Serializable> {
PK getUniqueId();
}
public interface GenericDao<T extends Identifiable<PK>> {
public T findById(PK ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252775",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why should we typedef a struct so often in C? I have seen many programs consisting of structures like the one below
typedef struct
{
int i;
char k;
} elem;
elem user;
Why is it needed so often? Any specific reason or applicable area?
A: Let's start with the basics and work our way up.
Here is an example ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "530"
} |
Q: strdup() - what does it do in C? What is the purpose of the strdup() function in C?
A: char * strdup(const char * s)
{
size_t len = 1+strlen(s);
char *p = malloc(len);
return p ? memcpy(p, s, len) : NULL;
}
Maybe the code is a bit faster than with strcpy() as the \0 char doesn't need to be searched again (I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252782",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "322"
} |
Q: What is the difference between IQueryable and IEnumerable? What is the difference between IQueryable<T> and IEnumerable<T>?
See also What's the difference between IQueryable and IEnumerable that overlaps with this question.
A: Here is what I wrote on a similar post (on this topic). (And no, I don't usually quote m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252785",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "468"
} |
Q: Timing a line of code accurately in a threaded application, C# What is the most accurate way of timing a thread or a line of code in C# assuming the application is multithreaded?
Kind regards,
A: What exactly do you mean by "timing a thread"?
To just time (in wall time) how long something takes, use System.Diagnost... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Is it best practice to achieve recursion via a partial? I have the need to display a nested set structure in HTML. I am doing it with the following partial:
<ul<%= ' id="tree"' if depth == 0 %>>
<% items.each do |item| %>
<li id="node_<%= item.id %>"><a><%= item.name %></a>
<% if item.has_children? %>
<%= re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252800",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Splitting time + duration into intervals in t-sql Does anyone know of a simple method for solving this?
I have a table which consists of start times for events and the associated durations. I need to be able to split the event durations into thirty minute intervals. So for example if an event starts at 10:45:00 and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: VB control crashes my app I am using this - otherwise excellent - vb tab control in one of my c# apps. When the app using it is installed on another machine, Windows tells the user in its usual friendly and descriptive manner that "The application encountered a problem and needs to close". I guess the control has so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252815",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What's the suffix (type character) for "Byte" numeric constants in VB.NET? Just out of curiosity:
I know I can tell the compiler if I want a value to be interpreted as a certain numeric type, e.g. as Integer (32 bit signed), this way appending an "I" (type character) to the constant value:
Private Function GetTheAns... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "26"
} |
Q: C++ : how to link against libA.so and not libA-X.Y.Z.so I have a library A, that I develop. When I deploy it on a machine, the corresponding libA.so and libA-X.Y.Z.so are put in /usr/lib (X.Y.Z being the version number).
Now I develop a library B, which uses A. When I link B, I use the flag -lA. Then "ldd libB.so" ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252819",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Syntax colouring using Swing Is it possible to have something like a JTextArea which will color some keywords based on some mappings I have ?
A: Here are a few other choices that you could try
*
*http://ostermiller.org/syntax/editor.html
*http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/index.html
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252820",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: DLL Building Question I have my sources split up in several directories, so for each directory I get back a DLL. Is it possible to create a DLL from several other DLL's ?
EDIT: I'm using C++ with Windows CE Platform Builder 6.0 ( it's not managed )
A: Use ILMerge
Here you can download this.
Here is Sample for imp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252827",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to remove a Run Script phase from Xcode I tried this step:
Select the menu options "Project > New Build Phase > New Run Script Build Phase", and enter the following script (don't forget to replace /Users/youruser/bin by the correct path to gen_entitlements.py) :
export CODESIGN_ALLOCATE=/Developer/Platforms/iPho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Center Align on a Absolutely Positioned Div div#thing {
position: absolute;
top: 0px;
z-index: 2;
margin: 0 auto;
}
<div id="thing">
<p>text text text with no fixed size, variable font</p>
</div>
The div is at the top, but I can't center it with <center> or margin: 0 auto;
A: To center it both vertical... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252856",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "97"
} |
Q: Extending PythonCE to Access gsm/camera/gps Easily from PythonCE As it seems there is no scripting language for Windows mobile devices that gives access to phone (sms, mms, make a call, take photo). I wonder how complex it would be to make a Python library that would enable that (write something in C, compile, and i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Access Web Service from a SQL Server 2005 Stored Procedure Currently I have a stored procedure that makes some updates to a table, and after it makes them, I need to call a web service.
The procedure uses a transaction, and I need to call the web service at the end of the transaction. If the web service call should ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252861",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: DB2 Query Output - Different Behavior I've two tables TAB_A and TAB_B. TAB_A is master table and TAB_B is child / transaction table. TAB_A is having COL_A (Primary key) and TAB_B is having COL_B (Primary key) and also COL_A.
For some business reason, Foreign key is not defined between TAB_A and TAB_B on column COL_A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252862",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: No indexes on small tables? "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." (Donald Knuth). My SQL tables are unlikely to contain more than a few thousand rows each (and those are the big ones!). SQL Server Database Engine Tuning Advisor dismiss... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252865",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Make UAC optional in Windows Installer on Vista I'm have written an msi file that offers a choice of "per-user" or "for all" installation in the UI phase, and now find that the installer fails on Vista:
*
*if I just reuse the installer that works for XP, Vista will trigger a UAC prompt even for the "per-user" ins... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252871",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Get a list of members of a WinNT group There are a couple of questions similar to this on stack overflow but not quite the same.
I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts. I also want to check whether a user is already a member so that... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Only allow one entry per User in a List - ListReceiver "Feature" for a List? I wonder if there is a way to create a Custom List in Sharepoint, but specify that each user may only create one item in the list.
I am thinking of two approaches:
*
*Develop a ListReceiver that checks if the user already created an item... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: in Am I allowed to place <noscript> in the <head>?
A: According to the XHTML Strict DTD, no, you're allowed script, style, meta, link, object, title and base only. Transitional allows isindex as well, but still not noscript.
A: Using the HTML5 Doctype, I have a declaration in my <head> with a <link> element th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252891",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: How do you change the CLASSPATH within Java? How do you change the CLASSPATH of a Java process from within the Java process?
Before you ask me "Why would you want to do that?" I'll explain it shortly.
When you have a Clojure REPL running it is common to need more jars in your CLASSPATH to load a Clojure source fi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252893",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "63"
} |
Q: Using regini from a c# app without bothering the user? I am developing an application that needs to use regini (because of legacy reasons) to insert something into the registry. I have been trying to do this in such a way the the user of the application is not aware of this. I have written the following code:
System... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252897",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to get the list of open windows from xserver Anyone got an idea how to get from an Xserver the list of all open windows?
A: If your window manager implements EWMH specification, you can also take a look at the _NET_CLIENT_LIST value of the root window. This is set by most modern window managers:
xprop -root|gre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252906",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "54"
} |
Q: Why does session_start cause a timeout when one script calls another script using curl I have two PHP scripts, both using the same session by calling session_name('MySessID').
When the first script calls the second script using curl, the second script hangs when session_start() is called.
Why would this happend?
A:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to send array through HTTPservice in Adobe Flex 3 How to send array in Httpservice in Adobe Flex3
A: I am not quite sure what you mean by sending an array to a httpservice. If you mean to send an array to a httpservice with the same field name, you can pass an array as field value.
var service:HTTPService = new... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252915",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Fastest way to iterate over a stack in c# I feel that using GetEnumerator() and casting IEnumerator.Current is expensive. Any better suggestions?
I'm open to using a different data structure if it offers similiar capabilities with better performance.
After thought:
Would a generic stack be a better idea so that the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Magento Custom Module. Redirect to another module and return to checkout Magento shopping cart is built on the Zend Framework in PHP. This is the first time I've dealt with the Zend framework and I'm having the following difficulty...
I'm creating a custom module that will allow users to upload images whenever they ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mock objects, nUnit, call log and log4net A very often scenario of unit test is as follows:
public void SetUp()
{
this.callLog = new StringBuilder();
}
public void TestBuzzBar()
{
var bar = new Bar(new MockFoo(callLog));
bar.Buzz(17);
Assert.AreEqual("MockFoo.Init(17) MockFoo.PrepareStuff MockFoo.DoTheJob "... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252923",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Javascript - how to replace a sub-string? This is a simple one. I want to replace a sub-string with another sub-string on client-side using Javascript.
Original string is 'original READ ONLY'
I want to replace the 'READ ONLY' with 'READ WRITE'
Any quick answer please? Possibly with a javascript code snippet...
A: s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252924",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Eclipse 3.4 TextViewer I am creating a plugin for Eclipse 3.4. I created a plug-in development project using the application with a view. Now I am trying to create a TextViewer the documentation says that it is located in org.eclipse.jface.text.TextViewer. But, this whole package is missing and eclipse cannot loc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252945",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Finding invocations of a certain function in a c++ file using python I need to find all occurrences of a function call in a C++ file using python, and extract the arguments for each call.
I'm playing with the pygccxml package, and extracting the arguments given a string with the function call is extremely easy:
from... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252951",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: "Streaming" results to a DataGridView from a BackgroundWorker Is there a way to "stream" a set of results (eg. a DataTable) from a BackgroundWorker to a DataGridView. What I want to do is to query data, and fill the results in a DataGridView as they come (like query grid results in SQL Server Management Studio). My ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252955",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is is possible to do mget with file patterns to only download certain files? I know we can do like mget *.xml which will download all xml files. But how is it possible that we using mget with certain file name patterns. can we do something like *SS.xml which mean it will download all files ending with SS.xml?
A: Do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252957",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I call a Sharepoint Webservice from a c# client using Kerberos authentication? We have developed a webservice that sits and runs in the context of a sharepoint site. This works fine using normal windows authentication.
We now have a client who wants to install this on a Kerberos enabled sharepoint site. What... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252961",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Read 64 bit integer string from file We have a file that has a 64 bit integer as a string in it. How do we scanf() or otherwise parse this numeric string into an unsigned 64 bit integer type in C++ ?
We are aware of things like %lld etc., but a lot of ways to do this parse seem to break compiles under different com... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252962",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: how can i use Hyperlink button in gridview? How can I use Hyperlink button in gridview. I mean when I run my program,all data is displayed in gridview,but I want hyperlink in gridview, so that when I will click in hyperlink it will show the select path which is in gridview : if there is pdf file path and I just clic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252963",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why is there a difference between the encoding of the Windows Command Prompt vs. a batch file? For example, suppose I have a batch file called 'test.cmd' and it simply contains:
echo %1
I can call this directly from the command prompt with 'test.cmd some¬arg' and the result is that the string 'some¬arg' is printed.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252970",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Dynamic patching of databases Please forgive my long question. I have an idea for a design that I could use some comments on. Is it a good idea to do this? And what are the pit falls I should be aware of? Are there other similar implementations that are better?
My situation is as follows:
I am working on a rewrite o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/252972",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |