text stringlengths 8 267k | meta dict |
|---|---|
Q: How to make a Template Window in WPF? So i am building an application that will have lots of windows, all with the same basic layout:
*
*A main Window
*A logo in the top corner
*A title block
*A status displayer down the bottom
*An area for window specific controls.
At the moment i have to recreate this str... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420538",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Is there any way to get a reference to the calling object in c#? What I'm wondering is if it's possible to (for instance) to walk up the stack frames, checking each calling object to see if matches an interface, and if so extract some data from it.
Yes, I know it's bad practice, I'm wondering if it's possible.
A: I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Using IE dev toolbar on a pop up windowed web app We are working on IE only web application that is run as a pop up window - without any toolbars. Is there a way to invoke IE developer's toolbar besides using a button on the IE toolbar, since it is not visible?
Thanks!
A: Press CTRL-n while the window is active. It... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420542",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Export a Unity container information to xml configuration In Microsoft Unity you can configure a container from an existing XML configuration but is there a way to do the opposite? From an initialized container export the corresponding XML configuration?
A: After "diving" the Unity source code my conclusion is it a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420546",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to limit SQL queries CPU utilization? After a large SQL Query is run that is built through my ASPX Pages I see the following two items listed in sql profiler.
Event Class TextData ApplicationName CPU Reads Writes
SQL:BatchCompleted Se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420554",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: WCF: is it possible to use streaming mode in a duplex channel? In WCF, contracts can be switched to streaming mode, to transfer large messages.
After reading and testing it seems to me, that streaming mode can not be used with duplex channels (channels with OneWay-calls and a callback interface).
Is this so? Do dupl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Interfaces in Class Files Should my interface and concrete implementation of that interface be broken out into two separate files?
A: If there is only one implementation: why the interface?
If there is more than one implementation: where do you put the others?
A: If you want other classes to implement that interfa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420581",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Would you use EnterpriseServices in a new enterprise development? As you may already know, managed code (.NET apps) can make use of COM+ through EnterpriseServices, making issues like distributed transactions, resource pooling and synchronization "simpler to program" because the solutions are provided as a supportin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420597",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to Test for Memory Leaks? We have an application with hundreds of possible user actions, and think about how enhancing memory leak testing.
Currently, here's the way it happens: When manually testing the software, if it appears that our application consumes too much memory, we use a memory tool, find the cause a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420599",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Is there around a straightforward way to invert a triangular (upper or lower) matrix? I'm trying to implement some basic linear algebra operations and one of these operations is the inversion of a triangular (upper and/or lower) matrix. Is there an easy and stable algorithm to do that?
Thank you.
A: Don't invert it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420612",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Accessing .NET/dll libraries/components from Java? Are there inexpensive or free gateways from .NET to Java? I'm looking at some data acquisition hardware which has drivers for C/C++ and .NET -- I really don't want to do any programming in .NET.
Update: I haven't done what I originally wanted to do, but I've done so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420617",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Guidelines for Using Brushes and Pens How expensive is it to create gdi brushes and pens? Should I create them on an add needed basis and wrap them in a using so they are disposed quickly, or should I create a static class similar to System.Drawing.Brushes class?
A: IMO, they're efficient enough that you should usu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420620",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to Convert date into MM/DD/YY format in C# In My Asp.net webpage I need to display today's date into one of the textbox , so in my form load I wrote the following code
textbox1.text = System.DateTime.Today.ToShortDateString();
this line is giving me date like 1/7/09 but I want date like 01/07/09 , Is there ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420623",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Drawing a line in Visual Studio .net at design time The owner of my company wants to be able to draw lines in Visual Studio.net as he did Visual Basic 6.0. So far the only method I have found is a runtime method using system.drawing which of course only work during runtime, and not quite practical for what he wants ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to remove the readonly attribute when building a setup The setup of my Windows Mobile app is created using VS2008. It contains a couple of data files to be copied to the target device.
These files are readonly on the dev machine (because they are under source control). The setup preserves the readonly attribute,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420631",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mapping a USB drive to a USB hub & port in Windows What's the best way of mapping out where all the USB drives are plugged in? Ideally, I'd like to be able to recursively start from the root hub and keep going down the tree finding connect usb drives and what port they are connected to (which physical USB slot).
A:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420638",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: http web request from batch file I need to execute a http web request from Plesk's Task Scheduler (using shared hosting on Windows/ASP.NET; no Powershell, whatsoever). Thought about using a batch file for this.
Is there an easy way to do this?
A: You can try using wget for Windows.
A: What are you allowed to insta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420646",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Unicode characters not showing in System.Windows.Forms.TextBox These characters show fine when I cut-and-paste them here from the VisualStudio debugger, but both in the debugger, and in the TextBox where I am trying to display this text, it just shows squares.
说明\r\n海流受季风影响,3-9 月份其流向主要向北,流速为2 节,有时达3 节;10 月至次年4 月份其流向... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420659",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Can an internal setter of a property be serialized? Is there any way to serialize a property with an internal setter in C#?
I understand that this might be problematic - but if there is a way - I would like to know.
Example:
[Serializable]
public class Person
{
public int ID { get; internal set; }
public str... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420662",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Programmatically editing Sharepoint Wiki content I'd like to edit my Sharepoint Wiki content programmatically. One of the advantages would be to add indexes to the Wiki environment automatically.
Has anyone been able to do this? Language doesn't matter, but looking for scripting solution.
A: Yes. I have rolled m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to store IPv6-compatible address in a relational database How do I do that?
Right now, IPv6 will not be used, but I need to design the application to make it IPv6-ready. It is necessary to store IP addresses and CIDR blocks (also BGP NLRI, but this is another story) in a MySQL database. I've alway used an INT fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420680",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Cannot get IIS ISAPI Tomcat connector to pass BASIC Authentication through to Tomcat We've successfully configured IIS to front 2 Tomcat instances using isapi_redirect.dll. It's doing everything smartly, and we've been very happy. Now, however, we're using one of the Tomcat instances to serve up web services through... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420693",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for me to learn ASP.NET: Could anyone provide some C# paging codes in Repeater or ListView controls for me to learn.
A: Here is a pager control that I created to drop into the PagerTemplate of a GridView. It's not the most complic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420699",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-6"
} |
Q: Primary servers in capistrano I have a task in capistrano wherein I want just a single line to run only if the server is a marked as primary. Is there a variable or method that I can reference inside a task? 'primary?' or 'primary' doesn't seem to work.
I've also tried something akin to the following:
after "deplo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Copy-pasting image into JavaScript rich-text editor I'm looking for a rich-text editor control that has some way of allowing users to copy-paste images into it, a la Google Mail. I guess I'm hoping there's some way to communicate the binary contents of an image on the clipboard to the browser (and perhaps store thes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420701",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I add multiple arguments to my custom template filter in a django template? Here's my custom filter:
from django import template
register = template.Library()
@register.filter
def replace(value, cherche, remplacement):
return value.replace(cherche, remplacement)
and here are the ways I tried using it i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "112"
} |
Q: Logging bugs directly from app to FogBugz I have several WPF apps, and I want users to be able to log bugs directly from these applications into my FogBugz database. Is there any way this can be done? Also, how would I make it so that, when their case is resolved, the application tells them about it?
A: I would sug... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420704",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: SQL Server / MySQL / Access - speeding up inserting many rows in an inefficient manner SETUP
I have to insert a couple million rows in either SQL Server 2000/2005, MySQL, or Access. Unfortunately I don't have an easy way to use bulk insert or BCP or any of the other ways that a normal human would go about this. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420705",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: linq2sql: Cannot add an entity with a key that is already in use I have a linq2sql setup where objects are sent from client side (flex via flourinefx) and attach them to a new datacontext a seen below:
I also have a "global" datacontext that is used throughout the session.
public static void Update(Enquiry enqu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: How can I identify unused/redundant columns given a list of tables? [This is on an iSeries/DB2 database if that makes any difference]
I want to write a procedure to identify columns that are left as blank or zero (given a list of tables).
Assuming I can pull out table and column definitions from the central system t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Model - View - ViewModel & WCF - is WCF the model? I'm just learning the Model / View / ViewModel pattern and it's variations (DataModel / View / ViewModel, or Model / View / Presenter).
What I wonder is: if I use this pattern with a WCF service, is the service the Model (DataModel), or do I need a separate Model to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420723",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to cast member variable pointer to generic type in C++ I have code similar to this in my application:
class A
{
public: int b;
}
class C
{
public: int d;
}
void DoThings (void *arg1, MYSTERYTYPE arg2);
A obj_a;
C obj_c;
DoThings(&obj_a, &A::b);
DoThings(&obj_c, &C::d);
The question is - What should MYST... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420726",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: In C++, can I define a pointer-to-member of a private class outside its scope? Consider:
class C {
private:
class T {int a, b;};
};
C::T *p;
As expected, this produces a compilation error saying that C::T is private in the context of Line 6.
Now change this to pointer-to-member:
class C {
private:
class T {i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420727",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Can I use Silverlight 2.0 with ASP.NET 2.0? I am working on an in-house tool for interfacing to a database. My current prototyping is written in C# using ASP.NET 2.0 with the intent to optimise some client-side operations using javascript.
However, I was hoping to leverage Silverlight to simplify the user interface ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420731",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Performance problems from dependency injection In my profiler reports I'm increasingly seeing the results of mock-based testing with dependency injection. Many of the dependencies were static, but because we want to test methods in isolation they are changed to instance members, like the following example:
class Sh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How does Sphinx store null fields, and how does this affect performance? I'm thinking about using asking sphinx to index many fields (in the hundreds), many of which will be null. My question is how much having many null fields will affect performance?
This situation arises not from having incredibly denormalized da... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420733",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best way to change pagination of existing PDF We have a PDF that is generated as A5 landscape pages.
With that, we need to do a PDF with A4 portrait page format, by putting 2 pages of the source PDF on top of each other on each page of the result PDF.
Do you know a good library that could do that kind of PDF manipul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Getting list of tables, and fields in each, in a database I'm looking at creating a basic ORM (purely for fun), and was wondering, is there a way to return the list of tables in a database and also the fields for every table?
Using this, I want to be able to loop through the result set (in C#) and then say for each ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420741",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "99"
} |
Q: I can SEE the space in an email address, but SQL SERVER can't? I am trying to clean up some email addresses in sql server. I can see examples of the problematic emails, and they look like this:
abc123 @xyz.com
However, when I try to run a query to find folks like these, say with:
NOT CHARINDEX(' ',LTRIM(RTRIM([Ema... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420746",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to do text full history in Django? I'd like to have the full history of a large text field edited by users, stored using Django.
I've seen the projects:
*
*Django Full History (Google Code)
*Django ModelHistory, and
*Django FullHistory
I've a special use-case that probably falls outside the scope of what th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420749",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How can I export data in a legacy DOS application when no export option is available? We've been given the task by my customer to export data from a legacy DOS system, using a RAIMA database, so it can be imported into a new system we are writing for them. It looks like the data is stored in a flat file format, tho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420762",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how can I get intellisense in a T4 template? When trying out these tutorials (T4 Tutorial: Creating reusable code generation templates) I noticed that although I was using plain c# I didn't get any intellisense, probably because of the file extension (.tt)
Isn't there anyway to say to Visual Studio to consider those... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "52"
} |
Q: Superscript underline in IE I'm going to be brief because I'm short on time, so I apologize if this isn't as detailed as I'd like it to be.
I have some code:
print("<a href='#'>Some text<sup>®</sup> some more text</a>");
In FF, this works like I would like, the link as a whole is underlined. However in IE, the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420770",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: foreach with generic List, detecting first iteration when using value type When foreaching through a generic list I often want to do something different for the first element in the list:
List<object> objs = new List<object>
{
new Object(),
new Object(),
new Object(),
new Object()
};
foreach (object... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: .NET Program Keeps Installing Old Version I'm having a rather annoying and time consuming problem with a .NET program. Our clients all use a piece of software we wrote in Visual Studio 2005 (running .NET framework 3.5). The application is a setup project that gets its files from another project. The problem is th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: CruiseControl.NET and TortoiseSVN Can the sourcecontrol block in CruiseControl.NET target TortoiseSVN?
A: It can't use Tortoise specifically, but it can talk to Subversion.
More info here.
A: CCNet is designed for using a subversion client of the form svn.exe rather than tortoisesvn directly (tortoisesvn has the s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is a good use case for static import of methods? Just got a review comment that my static import of the method was not a good idea. The static import was of a method from a DA class, which has mostly static methods. So in middle of the business logic I had a da activity that apparently seemed to belong to the c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "157"
} |
Q: Migrating from CPython to Jython I'm considering moving my code (around 30K LOC) from CPython to Jython, so that I could have better integration with my java code.
Is there a checklist or a guide I should look at, to help my with the migration? Does anyone have experience with doing something similar?
From reading ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420792",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Initialize multidimensional array Checkbox[,] checkArray = new Checkbox[2, 3]{{checkbox24,checkboxPref1,null}, {checkbox23,checkboxPref2,null}};
I am getting error . How do I initialize it?
A: OK, I think I see what's happening here. You're trying to initialize an array at a cl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420800",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Calling a private instance method from a class method in Ruby Can I create a private instance method that can be called by a class method?
class Foo
def initialize(n)
@n = n
end
private # or protected?
def plus(n)
@n += n
end
end
class Foo
def Foo.bar(my_instance, n)
my_instance.plus(n)
en... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420813",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Where is the Content Source Name in the SSP Search Database I need to locate the table that contains the Content Source Name (along with the ContentSourceId) in the SSP Search Database (OR anywhere else that it gets stored in).
I may be able to access this via the SharePoint Object Model, but I want it via the db ta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the meaning of the "xmbean-dd" attribute in an mbean in jboss-service.xml? For example,
<mbean code="org.jnp.server.NamingBeanImpl"
name="jboss:service=NamingBeanImpl"
xmbean-dd="resource:xmdesc/NamingBean-xmbean.xml">
</mbean>
A:
The optional xmbean-dd attribute specifies the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420819",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to properly lock a value type? I was reading about threading and about locking. It is common practise that you can't (well should not) lock a value type.
So the question is, what is the recommended way of locking a value type? I know there's a few ways to go about doing one thing but I haven't seen an example. A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420825",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: Can you nest a "double cons" pattern match? I want to strengthen a pattern to match only numbers which pass an additional validation function.
let (|IsValid|_|) n = ...
let (|Nil|One|Two|) (l : int list) =
match l with
| a :: b :: t -> Two(a + b)
| a :: t -> One(a)
| _ -> Nil
The 'O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to install libraries? I am trying to install the "libxml" Gem (http://libxml.rubyforge.org/install.xml) and it says that libxml requires a few other libraries to be installed in order to build and function properly:
* libm (math routines: very standard)
* libz (zlib)
* libiconv
* libxml2
I ins... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420838",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How does password salt help against a rainbow table attack? I'm having some trouble understanding the purpose of a salt to a password. It's my understanding that the primary use is to hamper a rainbow table attack. However, the methods I've seen to implement this don't seem to really make the problem harder.
I've ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "247"
} |
Q: Full Linq Query Instead of Lambdas with Fluent-NHibernate? I'm trying to use Fluent-NHibernate's Query method which looks like this:
public T[] Query<T>(Expression<System.Func<T, bool>> where)
{
return _session.Linq<T>().Where(where).ToArray();
}
I'm using VB, so to send it a lambda expr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: reading an application's manifest file? Is there an easy way to read an application's already embedded manifest file?
I was thinking along the lines of an alternate data stream?
A: Windows manifest files are Win32 resources. In other words, they're embedded towards the end of the EXE or DLL. You can use LoadLibrary... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: What is the purpose CAS (Code Access Security)? I have been a part of so many web applications but have never used CAS, perhaps have also never felt the need to use the same.
When is the need to use CAS? Do people actually use it in their applications?
A: CAS is really only useful (so to speak) in desktop applicati... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: how to load a div into html using jquery I'm trying to load a div into a page based on a change in the drop down. I either want to show a div which has state/zip or province/postal_code, (each is a file) but I am getting a "406 Not Acceptable [http://localhost/profiles/residency]"
Here is my JQuery code:
$(function(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420856",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Equivalent of java's ConcurrentHashMap in C#? is there anything?
A: There is a generic Dictionary class for implementing associative arrays (aka hashtables). Recently MS came out with the ConcurrentDictionary class: http://msdn.microsoft.com/en-us/library/dd287191.aspx which is probably what you want. It's .Net 4+ ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420860",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to create a stored procedure with dynamic from clause I have a problem with an application which uses the same stored procedure over and over again to populate people information in dropdown lists. The problem is that sometimes people aren't there anymore as the data changes. I have two views I can use to select... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420863",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best way to test RJS in RSpec Controller specs? What is the best way to ensure that the proper RJS is being generated in a Controller action?
For example, I want to ensure that a div is highlighted as such:
def new
render :update do |page|
page.visual_effect :highlight, :some_div
end
end
Rant:
This is quick... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Why isn't the Byte Order Mark emitted from UTF8Encoding.GetBytes? The snippet says it all :-)
UTF8Encoding enc = new UTF8Encoding(true/*include Byte Order Mark*/);
byte[] data = enc.GetBytes("a");
// data has length 1.
// I expected the BOM to be included. What's up?
A: Thank you both. The following works, and LIN... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420867",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How to Obfuscate SQL Sprocs? Is there a way to hide/protect/obfuscate MS SQL Stored Procedures?
A: See the ENCRYPTION option for the CREATE PROCEDURE statement.
http://msdn.microsoft.com/en-us/library/ms187926.aspx
A: No. At least, not in a way that is irreversible. SQL Server 2000's "WITH ENCRYPTION" can be rever... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420878",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: My Work Items gone in TFS We use VS2008 with TFS for source control at my workplace and it works fine, however today we experienced a problem when trying to associate our pending changes with a work item.
Usually when I want to associate changes with a work item I just go to the second tab from the top in the "pend... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420888",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I tell Windsor to add an Interceptor to all components registered that implement IMustBeIntercepted If I registered several components with Windsor.
IAnimal provides BigAnimal
IPerson provides SmellyPerson
IWhale provides BlueWhale
etc.. pretty standard component registeration
all the above types implement IM... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420891",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I know if this C# method is thread safe? I'm working on creating a call back function for an ASP.NET cache item removal event.
The documentation says I should call a method on an object or calls I know will exist (will be in scope), such as a static method, but it said I need to ensure the static is thread sa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "55"
} |
Q: Create Diagram in SQL Server Enterprise Manager (SQL 2000) What is the lowest permission level I need on a user to be able to create diagrams in SQL Server Enterprise Manager?
I'm currently set as data reader and I am unable to create diagrams. (I wouldn't expect to be able to at this permission level)
A: The datab... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Why can't I display the ASP.NET Framework version as 3.5? Can someone please confirm to me that when my application is written in .NET 3.5 that this code
System.Environment.Version.Major.ToString()
will produce this
2.0.50727.1433
I'm just moving to 3.5 and the first application I'm moving is an internal website.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420941",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: .NET Generics: Using an Activator created type as a generic shows wrong Type? Need workaround This really has my stumped today. I'm sure its simple, but... Here is my sample code:
using System;
using System.Collections;
namespace ConsoleApplication1
{
class Program
{
public ArrayList SomeProp { get;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: java package name convention failure I'm just coming up the learning curve for Java SE & have no problem with the usual Java convention for package names, e.g. com.example.library_name_here.package_name_here
Except.
I've been noticing a failure to abide by this in some fairly well-known packages.
*
*JLine: jl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420945",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Date ranges in views - is this normal? I recently started working at a company with an enormous "enterprisey" application. At my last job, I designed the database, but here we have a whole Database Architecture department that I'm not part of.
One of the stranger things in their database is that they have a bunch o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MySQL Non-Negative INT Columns I want to do the following query:
UPDATE `users` SET balance = (balance - 10) WHERE id=1
But if the balance will become a negative number I want an error to be returned. Any ideas on if this is possible?
A: If you do
UPDATE `users` SET balance = (balance - 10) WHERE id=1 and balance ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: LINQ to SQL Query Syntax I have several tables that center around an organization table that simply holds a unique ID value. Each Organization can then be at a particular location and have a particular name. The tricky part is that the organizations support location and name changes with a specified effective date o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Binding a ComboBox to an IList and using SelectedValue I have a ComboBox set up as follows, where KVPList is an IList (of KeyValuePair if it matters):
comboBox.DisplayMember = "Value";
comboBox.ValueMember = "Key";
comboBox.DataSource = KVPList;
I then have set up a binding with SelectedValue, binding to a BindingS... | {
"language": "en",
"url": "https://stackoverflow.com/questions/420998",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Indexing strategy on table I have an SQL Server 2005 table named 'EventTable' defined as such:
EventID, EventTypeCode, EventStatusCode, EventDate
Currently the table has a clustered index on the primary key 'EventID', there are no other indexes currently
EventTypeCode and EventStatusCode columns are CHAR(3) (example... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421002",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Am I wasting my time by designing my ASP.NET components for WYSIWYG tools A few days ago, I read a question asking how many developers hand code their HTML/XHTML rather than rely on the WYSIWYG tools - https://stackoverflow.com/questions/406052/do-most-web-programmers-not-designers-use-wysiwyg-editors-or-hand-code-t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Best practice creating dynamic sidebar with zend framework What is best practice to create dynamic sidebar or other non content layout places with zend framework. At this moment I created controller witch i called WidgetsController. In this controller i defined some actions with 'sidebar' response segment for my sid... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421013",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to convert a string to RegularTimePeriod in java? I am using Jfreechart. I have the code like this:
TimeSeries t1 = new TimeSeries("EUR/GBP");
t1.add(new Day(4, MonthConstants.JANUARY, 2001), new Double(1.5807));
But I get String from my SQL query. TimeSeries accepts only RegularTimePeriod or TimeSeriesDataItem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421020",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Eclipse Plug-in Development with TDD I want to add a view to a perspective without having access to the source code of the perspective. Is this possible?
Is there a good tutorial for plug-in development using TDD?
[edit]
I think I have a good starting point with TDDing in plugin development
Automating unit tests (ju... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to "sell" ruby on rails to a client Tomorrow, I will meet a client that is not working in technology but might ask if RubyOnRails is the right choice for his site. He might think that there's not enough RoR programmers and that he will be "hostage" of the language.
I have good reasons to use RoR and the client h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421026",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using Multiple Tables in a Zend Model and returning a combined result set Hi This is either a very specific or very generic quetion - I'm not sure, and I'm new to the Zend framework / oo generally. Please be patient if this is a stupid Q...
Anyway, I want to create a model which does something like:
Read all the it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421031",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Why does IE7 when clearing a float result in a margin bug? I have a very simple HTML page (validates as XHTML 1.0 Strict):
<div class="news-result">
<h2><a href="#">Title</a></h2><span class="date">(1-1-2009)</span>
<p>Some text...</p>
</div>
with the following CSS:
.news-result {
overflow: hidden;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421040",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What are all of the allowable characters for people's names? There are the standard A-Z, a-z characters, but also there are hyphens, em dashes, quotes, etc.
Plus, there are all of the international characters, like umlauts, etc.
So, for an English-based system, what's the complete set? What about sets for other lang... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421046",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "60"
} |
Q: SQL Server UNION - What is the default ORDER BY Behaviour If I have a few UNION Statements as a contrived example:
SELECT * FROM xxx WHERE z = 1
UNION
SELECT * FROM xxx WHERE z = 2
UNION
SELECT * FROM xxx WHERE z = 3
What is the default order by behaviour?
The test data I'm seeing essentially does not return the d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: python setup.py develop not updating easy_install.pth According to setuptools documentation, setup.py develop is supposed to create the egg-link file and update easy_install.pth when installing into site-packages folder. However, in my case it's only creating the egg-link file. How does setuptools decide if it nee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421050",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How can I save an image as a PNG or JPG file with a given output file size? (pref. in C#) I'd like to save an existing image as a PNG or JPG at a given file size, eg, 100KB.
A: Only if using JPG 2000 you could set the file size to a specific value. Using JPG, you'll have to try different quality values and using PN... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421056",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Applying the Hibernate filter attribute to a Bag with a many-to-many relationship Consider the following Hibernate mapping file:
<hibernate-mapping ...>
<class name="ContentPackage" table="contentPackages">
<id name="Id" column="id" type="int"><generator class="native" /></id>
...
<bag name="Clips" table... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421075",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: SSIS Transfer Task That Handles Schema Changes I'm using SSIS with SQL Server 2k5 to build a transfer task to copy all of the data from one database to another. This works quite well, except for one problem - the source database will periodically have schema changes (generally just additions like new columns) but th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421088",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How Do You Create Test Objects For Third Party Legacy Code I have a code base where many of the classes I implement derive from classes that are provided by other divisions of my company. Working with these other devisions often have the working relationship as though they are third party middle ware vendors.
I'm tr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421107",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there a simple way to emulate Objective-C Categories in C#? I have a weird design situation that I've never encountered before... If I were using Objective-C, I would solve it with categories, but I have to use C# 2.0.
First, some background. I have two abstraction layers in this class library. The bottom layer i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421119",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Visual Studio to Make While I love the Unix toolset family(including its black sheep Make) the project I'm working on currently is cross platform. That means having a Visual studio project ready for build.
So my question is, is there a tool/plugin for importing a Make file into VS or conversely is there a way to exp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421126",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I prevent unauthorized code from accessing my assembly in .NET 2.0? In .NET 1.x, you could use the StrongNameIdentityPermissionAttribute on your assembly to ensure that only code signed by you could access your assembly. According to the MSDN documentation,
In the .NET Framework version 2.0 and later, dema... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421137",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: rounding shortcuts in C I am working in C to implement pseudo-code that says:
delay = ROUND(64*(floatDelay - intDelay))
where intDelay = (int) floatDelay
The floatDelay will always be positive. Is there an advantage to using the round function from math.h:
#inlcude <math.h>
delay=(int) round(64*(floatDelay-intDelay... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421139",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you switch View Engines on the fly within an ASP.Net MVC Controller action? I want to write a custom view engine that returns custom text (like coma delimited) does anyone know how I'd change the view engine on the fly to handle this?
A: I'd create a custom ActionResult. I use Json() function to return a Js... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421143",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ldap vbscript : msExchOmaAdminWirelessEnable is randomly missing on different accounts In my script:
Function getDescript (strname, uname)
Set MyUser = GetObject ("LDAP://cn=" & uname & ",ou=" & strname & ",DC=tms-1,DC=net")
getDescript = myUser.Get("msExchOmaAdminWirelessEnable")
End Function
uname = "Bob G... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421154",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Why can't I .add a Dictionary(Key, Value) in a foreach? If I want to loop over a Dictionary(Key, Value)... why cant I add a new key-value pair in the loop?
Dictionary<string, string> persons = new Dictionary<string, string>();
persons.Add("roger", "12");
persons.Add("mary", "13");
foreach (KeyValuePair<string,stri... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421155",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is it possible to run custom actions during uninstall using InstallShield 2009 I need to run a custom action during uninstallation of a ManagedCode which is a part of the installation (Before it is removed in the uninstall process)
Is it possible in Install Shield 2009?
A: Yes. You can run a ManagedCode custom acti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421170",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Can I change the default config file? I'm using Jeff Atwood's Last Configuration Section Handler You'll Ever Need, but it only seems to work for the default app.config file. If I wanted to separate certain settings into another file, the deserializing doesn't work, since ConfigurationManager.GetSection only reads f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/421174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.