instruction stringlengths 0 30k ⌀ |
|---|
There are a couple ways, create an action for each step of the wizard process, or create a parameter that is passed in to the action method. Like *step* that will allow you to know what the state of the wizard is in. |
Since hard drives are very cheap these days, I would suggest buying a larger hard drive and installing VS on that drive.
You should never run your OS hard drive close to max capacity, this can seriously reduce the performance of your system.
Also, you may be able to install VS but I'm quite sure it'll use alot of... |
It's all about the purpose of the DB Layer.
If you use an instance to access the DB layer, you are allowing multiple versions of that class to exist. This is desirable if you want to use the same DB layer to access multiple databases for example.
So you might have something like this:
DbController acrhive = ... |
It depends which model you subscribe to. ORM (Object Relational Model) or Interface Model. ORM is very popular right now because of frameworks like nhibernate, LINQ to SQL, Entity Framework, and many others. The ORM lets you customize some business constraints around your object model and pass it around with out act... |
Mozilla's Taras Glek worked the last year or two on C++ analysis and code rewriting tools. His blog is at <http://blog.mozilla.com/tglek/>, you can find links to the tools they created there. They are of course free and open-source. No GUI, but I thought I'd link it in case it's interesting to anybody. |
Joel also mentioned RedGate in [podcast #11][1]
[1]: http://blog.stackoverflow.com/2008/06/podcast-11/ |
I like a single object to be correlated to a single record in the database, i.e. an object must be instantiated. This is your basic [ActiveRecord](http://martinfowler.com/eaaCatalog/activeRecord.html) pattern. In my experience, the one-object-to-one-row approach creates a much more fluid and literate presentation in ... |
Visual Studio 2008 ASP.NET projects has debugging enabled by default. You can set breakpoints within your .js file while the website/web app project is run in the ASP.NET debug server. |
Unless your SSL certificate is the "wildcard" or multi-site kind, then I don't think this will work. The rewrite will display in the browser and the name in the address bar must be valid against the certificate, or your users will see a security error (which they can always accept and continue, but that doesn't sound ... |
[awk](http://www.grymoire.com/Unix/Awk.html) |
Aha, I was really just testing everyone once again! :) The real answer is, you rarely need to iterate the datagrid. Because even when binding to an ArrayList, the binding is 2 way. Still, it is handy to know how to itereate the grid directly, it can save a few lines of code now and then.
But NotMyself and Orio... |
From memory SSRS has [built in logging][1] for this exact situation
[1]: http://msdn.microsoft.com/en-us/library/ms159110.aspx |
Have a look at the ExecutionLog table in the ReportServer database. This contains information on who ran what report and with what parameters.
I'm not sure how this is going to work without Windows authentication though, as it'll have no way of knowing who's running what report. |
Keep in mind that the Rewrite engine only kicks in once the HTTP request has been received - which means you would still need a certificate, in order for the client to set up the connection to send the request over!
However if the backup machine will appear to have the same hostname (as far as the client is concerne... |
I have to say that I don't use the hourly recurrence feature as really how many people have events that repeat in the same day? I could see if someone however was to schedule when they needed to take a particular medicine at recurring times throughout the day.
I would say support full features in the application its... |
I prefer using [FireBug](http://getfirebug.com/) for projects I can't use 2008 on. |
This should get you started. In Visual Studio, choose "File Open..." then "File...". Then pick the Shel32.dll. A folder tree should be opened, and you will find the icons in the "Icon" folder.
To save an Icon, You can right click on the icon in the folder tree and choose "Export". |
I think keep it simple and don't over think it. Don't over abstract and layer too much. Just keep it neat, and as it grows, refactoring it is trivial. One of the best features of IDEs is refactoring, so why not make use of it and save you brain power for solving problems that are related to your app, rather then meta i... |
I've finally gotten my "fully automated data back-up strategy" down to a fine art. I never have to manually intervene, and I'll never lose another harddrive worth of data. If my computer dies, I'll always have a full bootable back-up that is no more than 24 hours old, and incremental back-ups no more than an hour old. ... |
As for any remoting architecture, you'll want to avoid loading a full object graph "down the wire" in an uncontrolled way (unless you have a trivially small number of objects).
The [Wikipedia article][1] has the standard techniques pretty much summarised (and in C#. too!). I've used both ghosts and value holders and... |
Here's an example from one of my pages:
UltraWebGrid uwgMyGrid = new UltraWebGrid();
uwgMyGrid.Columns.Add("colTest", "Test Dropdown");
uwgMyGrid.Columns.FromKey("colTest").Type = ColumnType.DropDownList;
uwgMyGrid.Columns.FromKey("colTest").ValueList.ValueListItems.Insert(0, "ONE", "Choice 1");
... |
Here's an example from one of my pages:
UltraWebGrid uwgMyGrid = new UltraWebGrid();
uwgMyGrid.Columns.Add("colTest", "Test Dropdown");
uwgMyGrid.Columns.FromKey("colTest").Type = ColumnType.DropDownList;
uwgMyGrid.Columns.FromKey("colTest").ValueList.ValueListItems.Insert(0, "ONE", "Choice 1");
... |
As lomaxx mentioned, it's all about the purpose of the DB model.
I find it best to use static classes, as I usually only want one instance of my DAL classes being created. I'd rather use static methods than deal with the overhead of potentially creating multiple instances of my DAL classes where only 1 should exist ... |
Using the ACPrintManager I was able to get firefox 3 to print perfectly!
The one thing I had to add to the example was to check if stage was null, and callLater if the stage was null.
private function initPrint():void {
//if we don't have a stage, wait until the next frame and try again
if ( stage... |
How do you configure VS2008 to only open one webserver in a solution with multiple projects? |
|visual-studio|debugging| |
Starting with 2005, VS started this behavior of when starting debugging session it spawns up a webserver for every project in a solution. I have a solution with 15 projects so it takes a while and is a waste of resources. Is there a way to configure it differently besides just using IIS? |
You should be able to expose the underlying error message by setting the following in the web.config:
customErrors mode="Off"
Could you elaborate on "and uploading the site files"? New instance of DNN? updating an existing site? upgrading DNN version? If upgrade or update -- what files are you adding/overwrit... |
PostGRESQL's phppgadmin Reports Database |
|database|php|postgresql|phppgadmin| |
phppgadmin comes with instructions for creating a reports database on the system for use with phppgadmin. The instructions describe how to set it up, but do not really give any indication of what its purpose is, and the phppgadmin site was not very helpful either.
It seems to allow you to store SQL queries, so is it... |
It is possible to remove registry keys using a .reg file, although I'm not sure how well it's documented. Here's how:
REGEDIT4
[-HKEY_CURRENT_USER\Software\<otherpath>]
The `-` in front of the key name tells `Regedit` that you want to remove the key.
To run this silently, type:
regedit /... |
Well... It looks like you have three options.
1. In your batch file, issue a tf get at each directory branch you want.
2. reorganize your solution so that all of the dependencies are under the same root path.
3. Use the visual way of right clicking on the loaded project and issuing the get command.
The only... |
@Hershi: the problem with that approach is that each instance of each derived class has a copy of the data, which may be expensive in some way.
Perhaps you could try something like this (I'm spit-balling without a compiling example, but the idea should be clear).
<pre><code>
class BaseClass {
public:
... |
@Hershi: the problem with that approach is that each instance of each derived class has a copy of the data, which may be expensive in some way.
Perhaps you could try something like this (I'm spit-balling without a compiling example, but the idea should be clear).
<pre><code>
#include <iostream>
#include &... |
Verilog automatic task |
|verilog| |
What does it mean if a task is declared with the automatic keyword in Verilog?
task automatic do_things;
input [31:0] number_of_things;
reg [31:0] tmp_thing;
begin
// ...
end
endtask;
Note: This question is mostly because I'm curious if there are any hardware programm... |
Take a look at Perforce ([www.perforce.com][1]), particularly if you are managing these files in the context of development projects. It is a code-oriented system, but it supports binary files well and has a Photoshop plugin. P4 isn't free, but it is worth every penny if you need professional-grade SCM - it is solid, f... |
C++ has templates. Java has generics, which look kinda sorta like C++ templates, but they're very, very different.
Templates work, as the name implies, by providing the compiler with a (wait for it...) template that it can use to generate type-safe code by filling in the template parameters.
Generics, as i under... |
You need to encapsulate it into another object[] array, like this:
Foo(new Object[] { new object[]{ (object)"1", (object)"2" }});
|
There is a big difference between them. In C++ you don't have to specify a class or an interface for the generic type. That's why you can create truly generic functions and classes, with the caveat of a looser typing.
<typename T> T sum(T a, T b) { return a + b; }
The method above adds two objects of the same... |
The term lazy loading is usually used when talking about object relational mappers. If you use ADO.NET directly you always get eager loading (ie it always loads just what you specify).
OR-mappers like nHibernate support returning proxy objects that get "filled in" with the right data only when you access the data. T... |
|hardware|specman|eda| |
No specific ideas on this problem, I'm afraid - but you could look into a '[genetic algorithm][1]' (which would go *something* like this)...
Place the lengths to cut in a random order and give that order a score based on how good a match it is to your ideal solution (0% waste, presumably).
Then, iteratively make ... |
Hm, I'm not sure what you're trying to accomplish.
Usually implementing NTLM on an internal site is as simple as unchecking "Enable Anonymous Access" in "Authentication and Access Control" in the "Directory Security" tab of website properties in IIS. If that is cleared, then your web application users will see a pop... |
Why don't you use LinqToSql - everything you need is done automatically. For the sake of being general you can use any other [ORM tool](http://en.wikipedia.org/wiki/Object-relational_mapping) for .NET |
I would call reader.GetOrdinal for each field name before starting the while loop. Unfortunately GetOrdinal throws an IndexOutOfRangeException if the field doesn't exist, so it won't be very performant.
You could probably store the results in a Dictionary<string, int> and use its ContainsKey method to determine if t... |
As I understand it.
NTLM is one of IIS built in authentication methods. If the the Host is registered on the domain of said active directory, it should be automatic. One thing to watch out for is the username should be in one of two formats.
- domain\username
- username@domain.tld
If you are trying t... |
In my scenario, I am not using the built-in "save" button. I have a data connection that I use to "post" the data to another list.
Yes, that's what I mean by site-specific. I don't think you can use localhost 'cos then when a user saves the form, it'll try to post to the user's computer (i.e. localhost). I have trie... |
From what i've tried (and are still up to do), a good addition to an erlang dev. environment would be a virtual machine running ubuntu/yaws/erlang. Perhaps [Erlyweb][1] (erlang/yaws framework) would be nice checking out too.
[Ciaran][2]'s posts (this would be the first of his "series") about his erlang install is ni... |
For the asynchronous bit, I would suggest checking into java.util.concurrent, and especially the Future<T> interface. The future interface is used to represent objects which are not ready yet, but are beeing created in a seperate thread. You say that objects can be modified at any time by a third party, but I would sti... |
How do I avoid read locks in my database? |
|sql|database|performance|locking| |
Answers for multiple databases welcome! |
The operating system takes care of multi-threading when the virtual machine is using native threads (as opposed to green-threads), and you can't specify low level details, like choosing a processor for a certain thread. It is better that way because you usually have many more threads than you have processors available,... |
In SQL Server you can use the with(nolock) keyword in your select statements. For example:
Select table1.columna, table2.columna
from table1 with(nolock), table2 with(nolock)
Make sure to specify with(nolock) for each table/view in the query.
|
CSS - Make divs align horizontally |
|css|xhtml| |
I have a container div with a fixed width and height, with overflow: hidden.
I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of their parent. This will happen even if the height of the parent shou... |
Use for the phppgadmin Reports Database? |
|php|database|postgresql|phppgadmin| |
Nope, you must save in order for the EntLib (and, I suspect, any other tool) to see the changes. |
@svrist If you don't know the schema the XStream solution probably isn't the way to go. At least XStream is on your radar now -- might come in handy in the future! |
Yes, drag and drop is different in AIR. I HATE that! It takes a lot of playing around to figure out how to get things to work the same as custom dnd that was built in flex.
As for the coordinates, maybe play around with localToContent, and localToGlobal methods. They may help in translating the coordinates to someth... |
If you are looking for performance, I tested a few hash keys and
I recommend [Bob Jenkin][1]'s hash function. It is both crazy fast
to compute and will give as little collisions as the cryptographic
hash you used until now.
I don't know C# at all and I don't know if it can link with C, but
here is its [implemen... |
URL Redirection for SSL virtual hosts |
|apache|mod-rewrite|https| |
What is the best way to transparently rewrite a URL over an SSL connection with Apache 2.2?
Apache 2 does not natively support multiple name-based virtual hosts for an SSL connection and I have heard that mod_rewrite can help with this. I would like to do something like this:
I have set up the server so that the ... |
Using mod_rewrite to Mimic SSL Virtual Hosts? |
|apache|https|mod-rewrite| |
The hash code of an object shouldn't be unique.
The checking rule is: hash codes are equal? Then call the full (slow) Equals method
Hash codes are not equal? Then the two items are definitely not equal.
All you want is a `GetHashCode` algorithm that splits up your collection into roughly even groups - it shoul... |
I've never used (or even heard of) Stripes.
Regardless, there's a book from [The Pragmatic Bookshelf][1] called [Stripes: ...and Java web development is fun again][2] that may be worth checking out. You could also check out the Stripes [mailing list archive][3].
[1]: http://www.pragprog.com/
[2]: http://ww... |
Without doubt, you should purchase Don Syme's excellent book "Expert F#". The book is very well written and is suitable for both beginners and experts alike. In it, you'll find both introductory material and much more challenging material too. At nearly 600 pages it is good value for money.
I found that it taught me... |
I've been dabbling in Cocoa for the past couple years, and recently picked up Fritz Anderson's "[Xcode 3 Unleashed][1]." Highly recommended for getting into Xcode — especially with some of the big changes 3.0/Leopard brought.
Don't forget Hillegass' defacto Cocoa bible, "Cocoa Programming for Mac OS X - Third ... |
One option is you can wrap it into another array:
Foo(new object[]{ new object[]{ (object)"1", (object)"2" } });
Kind of ugly, but since each item is an array, you can't just cast it to make the problem go away... such as if it were Foo(params object items), then you could just do:
Foo((object) new obj... |
One option is you can wrap it into another array:
Foo(new object[]{ new object[]{ (object)"1", (object)"2" } });
Kind of ugly, but since each item is an array, you can't just cast it to make the problem go away... such as if it were Foo(params object items), then you could just do:
Foo((object) new obj... |
A simple typecast will ensure the compiler knows what you mean in this case.
Foo((object[])new object[]{ (object)"1", (object)"2" }));
Bit of an odd semantic though, I'll agree. |
A simple typecast will ensure the compiler knows what you mean in this case.
Foo((object)new object[]{ (object)"1", (object)"2" }));
As an array is a subtype of object, this all works out. Bit of an odd semantic though, I'll agree.
Edit: Woops, typoed my example code. |
I'm still fiddling with this -- no answer yet, or even a clear direction, but some of this random assortment of facts might be useful to someone..
**Meta: Is there any way to mark "read more" in an answer? Sorry in advance for all the scrolling this answer will cause!**
The code is 708 digits long. Prime factor... |
I'd suggest you use a **Assymmetric Key Encryption** to encrypt your configuration file, wherever they are stored, inside the executable or not.
Store the "reading" key in your executable and keep to yourself the "writing" key. So no one but you can modify the configuration.
**It's not hard** there are plenty o... |
I'd suggest you use a **Assymmetric Key Encryption** to encrypt your configuration file, wherever they are stored, inside the executable or not.
If I remember correctly, RSA is one the variants.
For the explanation of it, see [Public-key cryptography][1] on Wikipedia
Store the "reading" key in your executable ... |
In native code, if the corruption always occurs in the same place in memory, you can use a [data breakpoint][1] to break the debugger when that memory is changed. Unfortunately, you can not set a data breakpoint in the managed C++ environment, presumably because the GC could move the object in memory.
Not sure if th... |
MochiKit is great -- and was my first love, so-to-speak, as far as js libraries go. But I found that while MochiKit has very expressive syntax, it didn't feel nearly as comfortable to me as Prototype/Scriptaculous or jQuery did for me.
I think if you know or like python, then MochiKit is a good tool for you. |
The only way to change the instance name is to re-install - uninstall and install as default instance. |
Are null and an empty string equivalent? If they are, I would include logic in my application (or maybe a trigger if the app is "out-of-the-box"?) to force the field to be either null or '', but not the other. If you went with '', then you could set the column to NOT NULL as well. Just a data-cleanliness thing. |
How do I fix a NoSuchMethodError? |
|java| |
I'm getting a NoSuchMethodError when running my Java program. What's wrong and how do I fix it? |
This is usually caused when using a build system like [Apache Ant](http://ant.apache.org) that only compiles java files when the java file is newer than the class file. If a method signature changes and classes were using the old version things may not be compiled correctly. The usual fix is to do a full rebuild (usu... |
Also check out this [extension method I wrote][1] for use on data commands:
public static void Fill<T>(this IDbCommand cmd,
IList<T> list, Func<IDataReader, T> rowConverter)
{
using (var rdr = cmd.ExecuteReader())
{
while (rdr.Read())
{
l... |
Microsoft [Concurrency and Coordination Runtime](http://msdn.microsoft.com/en-us/library/bb648752.aspx) for .NET.
> The CCR is appropriate for an
> application model that separates
> components into pieces that can
> interact only through messages.
> Components in this model need means to
> coordinate between m... |
You might want to have a look at the Compensating Resource Manager:
[http://msdn.microsoft.com/en-us/library/8xkdw05k(VS.80).aspx][1]
[1]: http://msdn.microsoft.com/en-us/library/8xkdw05k(VS.80).aspx |
Use the GetSchemaTable() method to retrieve the DataReader's metadata. The DataTable that is returned can be used to check if a specific column is present or not. |
Why not just have each sproc return complete column set, using null, -1, or acceptable values where you don't have the data. Avoids having to catch IndexOutOfRangeException or re-writing everything in LinqToSql. |
I think most of the answers here take a designer's point of view. On a small-to-medium project it might seem like an overhead to synchronize code and CSS/HTML and make them standards-compliant and clean. A designer's way to do that is to have full control over rendered HTML. But there's many ways to have that full cont... |
Have you tried putting in the *standard library directories*? It should be picked up by the **linker** if it's in one of those directories.
For example:
/lib/
/usr/lib/
/usr/share/lib/
/usr/local/lib/ |
i assume that you are wanting get to some of the attributes that are set against the LDAP account - role - department etc.
for coldfusion check this out [http://www.adobe.com/devnet/server_archive/articles/integrating_cf_apps_w_ms_active_directory.html][1]
[1]: http://www.adobe.com/devnet/server_archive/arti... |
I've had the same problem, and built a tool on top of Subversion that adds permission, ownership and secontext tracking, keeps the .svn directories out of the actually versioned trees, and adds a concept of layers so you can for example track all your config related to development, which you then only check out on mach... |
What do you mean?
Are you saying that when you go from www.mysmallwebsite.com to www.myIsv.com/myWebSite/ then the PHP session is lost?
PHP recognizes the session with an ID (alpha-numeric hash generated on the server). The ID is passed from request to request using a cookie called PHPSESSID or something like that ... |