instruction stringlengths 0 30k ⌀ |
|---|
|asp.net|http|response.redirect| |
|asp.net|https|response.redirect| |
Warning: Found conflicts between different versions of the same dependent assembly |
|warning|compiler-construction| |
I am currently developing a .NET application, which consists of 20 projects. Some of those projects are compiled using .NET 3.5, some others are still .NET 2.0 projects (so far no problem).
The problem is that if I include an external component I always get the following warning:
"Found conflicts between diff... |
|.net|compiler-construction|warning| |
|.net|compiler-construction|warnings| |
Kinda of an odd answer... but I thought that Blender could construct videos from sequences of images. Just a thought. |
Lua.
It's used as a scripting/extension language for a number of games (like World of Worcraft), and applications (Snort, NMAP, Wireshark, etc). In fact, according to an Adobe developer, Adobe's Lightroom is over 40% Lua.
The guys behind Lua have repeatedly listed Scheme and Lisp as major influences on Lua, and ... |
Yes normally each monitor which is locked must have an owner Thread. Maybe your stack dump was not complete (too long) or maybe the dumping was not consistent. I could imagine that it is not stopping the world, so a locked monitor is dumped but the thread who owns the lock releases it before beeing dumped (this is just... |
Not that it is ultra important, but using can also be used to change resources on the fly. Yes disposable as mentioned earlier, but perhaps specifically you don't want the resources they mismatch with other resources during the rest of your execution. So you want to dispose of it so it doesn't interfere elsewhere. |
When/Why to use Cascading in SQL Server? |
|sql-server|casdade|foreignkeys|rdbms|database-design| |
When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it?
This probably applies to other databases as well. |
|sql-server|database-design|rdbms|foreignkeys|casdade| |
When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, and what is the reasoning behind it?
This probably applies to other databases as well.
I'm looking most of all for concrete examples of each scenario, preferably from someone who has used them succ... |
|sql-server|database-design|rdbms|cascade|foreign-keys| |
It's probably quickest to just type it into Google in my experience. |
It's probably quickest to just type it into Google in my experience.
EDIT:
Now that you've edited your post to clarify what you actually meant I would say that embedding URLs in your comments is nice but you really have no guarantees that either the mangled URL or the pretty one will exist in future. |
I would think you could retrieve the data to a DataSet, call WriteXML on it, and then on the other end declare a new DataSet and call ReadXML on it. |
There's a fundamental difference in how the languages define an object's life time. In Java and .Net the object members are zero/null initialized before any constructor is run and is at this point that the object life time begins. So when you enter the constructor you've already got an initialized object.
In C++ the... |
Perl is in a state of (comparatively) rapid change, and has gotten into the position where the best documentation beyond a basic introduction to Perl 5 -- the current major version -- is the electronic documentation which comes with the language itself.
Read 'perldoc perlintro', then look to 'perldoc perl' for the r... |
I think you should make your own authentication method as you can make it fit your application best but use a library for encryption, such as [pycrypto][1] or some other more lightweight library.
[1]: http://www.pycrypto.org |
I think you should make your own authentication method as you can make it fit your application best but use a library for encryption, such as [pycrypto][1] or some other more lightweight library.
btw, if you need windows binaries for pycrypto you can get them [here][2]
[1]: http://www.pycrypto.org
[2]: htt... |
Ctrl+A is the base command
Ctrl+A N = go to the ***N***ext screen
Ctrl+A P = go to the ***P***revious screen
Ctrl+A C = ***C***reate new screen
Ctrl+A D = ***D***etach your screen |
The phrase commonly used is "we're all consenting adults here". By prepending a single underscore (don't expose) or double underscore (hide), you're telling the user of your class that you intend the member to be 'private' in some way. However, you're trusting everyone else to behave responsibly and respect that, unl... |
Make sure that you really need it. Do a google for "singleton anti-pattern" to see some arguments against it. There's nothing inheritantly wrong with it I suppose but it's just a mechanism for exposing some global resource/data so make sure that this is the best way. In particular I've found dependency injection more u... |
VMWare server includes the command line tool "vmware-cmd", which can be used to perform virtually any operation that can be performed through the console.
In this case you would simply add a "vmware-cmd <cfg-name> susepend" to your script before starting your backup, and a "vmware-cmd <cfg-name> start" after the bac... |
In Python, `__init__.py` files actually have a meaning! They mean that the folder they are in is a Python module. As such, they have a real role in your code and should most probably be stored in Version Control.
You could well imagine a folder in your source tree that is NOT a Python module, for example a folder co... |
>Someone recommended sIFR but I guess that's useful when I need to use non-standard fonts?
sIFR will not give you the intended effect. Like Windows's ClearType, Flash's anti-aliasing (which sIFR uses) optimizes towards the pixel grid, not towards accurate representation of the typeface.
You may be able to use Saf... |
One issue with transactions is that it's possible (unlikely, but possible) to get deadlocks in the DB. You do have to understand how your database works, locks, transacts, etc in order to debug these interesting/frustrating problems.
-Adam |
First, you need to have the proper symbols configured. The symbols will allow you to match memory addresses to function names. In order to do this you have to create a local folder in your machine in which you will store a local cache of symbols (for example: C:\symbols). Then you need to specify the symbols server pat... |
Perhaps you should take a look at L#. I don't know if it is what you are looking for (haven't touched Lisp since university) but it might be worth to check out.
[http://www.lsharp.org/][1]
[1]: http://www.lsharp.org/ |
The .Net 1.1 SDK contains a LISP compiler example. See SDK\v1.1\Tool Developers Guide\Samples\clisp |
I like Seam's Query objects: http://docs.jboss.com/seam/2.1.0.BETA1/reference/en-US/html_single/#d0e7527
They basically abstract all the SQL/JPA in a Seam component that JSF can easily use.
If you don't want to use Seam and/or JPA you could implement a similar pattern. |
XSLT: Cannot get xslt to output an (&) even after escaping the character. |
|xml|flash|xslt|invalid-characters|| |
I am trying to create a query string of variable assignments separated by the & symbol. (ex: "var1=x&var2=y&...") I plan to pass this string into an embedded flash file. I am having trouble getting an & symbol to show up in xslt. If I just type "&" with no tags around it there is a problem rendering the xslt document. ... |
|xml|flash|xslt|invalid-characters| |
How do you test cookies in MVC .net? |
|.net|testing|mvc| |
http://weblogs.asp.net/stephenwalther/archive/2008/06/30/asp-net-mvc-tip-12-faking-the-controller-context.aspx
This post shows how to test setting a cookie and then seeing it in ViewData. What I what to do is see if the correct cookies were written (values and name). Any reply, blog post or article will be greatly a... |
|asp.net-mvc|.net|testing|mvc| |
|.net|asp.net|asp.net-mvc|testing|mvc| |
[Trinidad][1] has a table component that supports paging, which may help. It is not ideal, but works well enough with Seam, as described in Pete Muir's [Backing Trinidad's dataTable with Seam][2] blog post.
If you don't find a JSF component you like, you'll need to write your own logic to set parameters for *limit* ... |
MS Access - what are the lowest required permissions for the backend file and for the folder containing it |
|ms-access| |
I maintain an ms-access application splitted to frontend and backend files.
The frontend file is in the users conputers.
The backend file is in a shared folder in the server.
What is the lowest permissions required?
can I give some of the users only read-only permissions in that folder? (or hide it from them in... |
|javascript|ajax|silverlight|asp.net-ajax|htmlbridge| |
The "accepted answer" is not fully correct - rotating around the Z will not help you see this triangle unless you've done some strange things prior to this code. Removing a glOrtho(...) call might have corrected the problem in this case, but you still have a couple of other issues.
Two major problems with the code ... |
The ability to change the underlying provider and thus modify the SQL did not make the final cut in LINQ to SQL. |
for more advanced python editing consider installing the [simplefold][1] vim plugin. it allows you do advanced code folding using regular expressions. i use it to fold my class and method definitions for faster editing.
[1]: http://eigenclass.org/hiki/simplefold |
Short answer: no. You can, however, create your own method for doing so, i.e. providing a specification for how to create such a struct. However, it's generally not necessary and is not worth the effort; just pass by reference. (`callFuncWithInputThenOutput(input, &struct.output);`) |
I want to see how this solution stacks up to the above Linq solutions. The trick here is modifying the predicate using the fact that the set of `(q % m)` starting from `s` is `(s + (s % m) + m*n)` (where n represent's the nth value in the set). In our case `s=q`.
The only problem with this solution is that it has t... |
There are other advantages to inheritance as well - such as the ability for a variable to be able to hold an object of either the parent class or the inherited class (without having to declare it as something generic, like "Object").
For example, in .NET WinForms, most UI components derive from System.Windows.Forms... |
I recently migrated a small project from 2.0 to 3.5 and didn't encounter any specific problems, as the framework versions ***are backwards compatible***. That said, there are a good number of optimisations and improvements that can be made by taking advantage of available features in the later framework versions. You... |
Perforce blame |
|svn|version-control| |
Is there an equivalent of svn's blame for Perforce on the command line? `p4 annotate` doesn't display usernames -- only changeset numbers (without ancestor history!).
I currently have to track code back through ancestors and compare against the filelog, and there just has to be an easier way -- maybe a F/OSS utility... |
You probably won't have any **breaking** issues, though you may get some deprecated method warnings. The compiler should generally tell you what the replacement is though. I know that some of the System.Configuration things were updated. |
The most compilation warnings you'll see are if you use app.config to store program settings. The 1.1 configuration class was deprecated for System.Configuration.ConfigurationManager.
Other warnings you may see coming from the compiler will be for uninitialized variables (set them to "= nothing" or "= null;" in the ... |
Other than that some users of the application will have to download the new framework run-time, none that I know of. |
To get around this, couldnt you just alter your usage as such:
public class GenericFactory<T> where T : MyAbstractType
{
public static T GetInstance()
{
return Activator.CreateInstance(typeof(T), true);
}
}
Your factory method will still be generic, but the ca... |
To get around this, couldnt you just alter your usage as such:
public class GenericFactory<T> where T : MyAbstractType
{
public static T GetInstance()
{
return Activator.CreateInstance(typeof(T), true);
}
}
Your factory method will still be generic, but the ca... |
Upgrading from .NET 1.1 to .NET 2.0, what to expect? |
First, you need to have the proper symbols configured. The symbols will allow you to match memory addresses to function names. In order to do this you have to create a local folder in your machine in which you will store a local cache of symbols (for example: C:\symbols). Then you need to specify the symbols server pat... |
If I understand the question correctly, the feature you are looking for is in the Qt toolkit.
Some info on this can be found at <http://doc.trolltech.com/4.4/richtext.html> |
CompileAssemblyFromDom compiles to a .cs file which is then run through the normal C# compiler.
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.CSharp;
using System.CodeDom;
using System.IO;
using System.Co... |
CompileAssemblyFromDom compiles to a .cs file which is then run through the normal C# compiler.
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.CSharp;
using System.CodeDom;
using System.IO;
using System.Co... |
Your given solution can be simplified quite a bit still.
In the first loop, you can use plain addition since you are only ever ORing with single bits, and you can narrow the scope of `$bit` by iterating over indices. In the second loop, you can subtract 1 from the index instead of producing an unnecessary 0th output... |
How do I list Oracle Apps profile options in PL/SQL? |
|c#|oracle-database|configuration| |
I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time.
Is there a snippet of code which will list profile options and at what level and who they are applied... |
DevArt http://www.devart.com/, formerly CoreLab (crlab.com) supplies a pure-C# Oracle client. That's a single dll, and it works fine. |
I have bumped into this a couple of times. My thoughts are:
1. Date arithmetic is always a pain
2. It is a bit easier when using EPOCH date format
3. date on Linux converts to EPOCH, but not on Solaris
4. For a portable solution, you need to do one of the following:
5. Install gnu date on solaris (alread... |
I want to see how this solution stacks up to the above Linq solutions. The trick here is modifying the predicate using the fact that the set of `(q % m)` starting from `s` is `(s + (s % m) + m*n)` (where n represent's the nth value in the set). In our case `s=q`.
The only problem with this solution is that it has t... |
This should be enough to get you going...
using System.Net
WebClient wc = new WebClient();
Stream st = wc.OpenRead(“http://example.com/feed.rss”);
using (StreamReader sr = new StreamReader(st)) {
string rss = sr.ReadToEnd();
}
|
I really think it is better to split the project as well, but it all depends on the size of the project and the number of people working on it. For larger projects, I have a projects for
data access (models)
services
front end
tests
I got the model from Rob Connery and his storefront application... seems to w... |
Eek! You've touched on one of the very platform-dependent topics of programming. On windows, you have DLLs, on linux, you have `ld.so`, `ld-linux.so`, and mac os x's `dyld`. |
You should use extern "C" anytime that you include a header defining functions residing in a file compiled by a C compiler, used in a C++ file. (Many standard C libraries may include this check in their headers to make it simpler for the developer)
For example, if you have a project with 3 files, util.c, util.h, and... |
Can using lambdas as event handlers cause a memory leak? |
|memory|leak|lambda|event|handler| |
Say we have the following method:
private MyObject foo = new MyObject();
// and later in the class
public void PotentialMemoryLeaker(){
int firedCount = 0;
foo.AnEvent += (o,e) => { firedCount++;Console.Write(firedCount);};
foo.MethodThatFiresAnEvent();
}
If the... |
|lambda|memory-leak|event-handling| |
|lambda|memory-leaks|event-handling| |
How to prevent the mouse cursor from being hidden after calling CComboBox::ShowDropDown? |
|mfc|cursor|mouse|ccombobox|hidden| |
In my MFC application, when I call CComboBox::ShowDropDown(), the mouse cursor is hidden until interaction with the combo box completes (when the combo box loses focus.) It doesn't reappear when the mouse is moved, like it does with edit boxes.
How can I keep the mouse cursor from being hidden? |
|mfc|mouse|cursors|hidden|ccombobox| |
Graph visualization code in javascript? |
|javascript|graph|layout|datastructure|jquery| |
I have a data structure that represents a directed graph, and I want to render that dynamically on an HTML page. Does anyone know of any javascript code that can do a reasonable job with graph layout? These graphs will usually be just a few nodes, maybe ten at the very upper end, so my guess is that performance isn't... |
|javascript|datastructure|jquery|graph|layout| |
I have a data structure that represents a directed graph, and I want to render that dynamically on an HTML page. Does anyone know of any javascript code that can do a reasonable job with graph layout? These graphs will usually be just a few nodes, maybe ten at the very upper end, so my guess is that performance isn't... |
|javascript|jquery|data-structures|graph|layout| |
there are a couple of strategies to do that. after a quick search on the web i've found these:
- [Start of week function][1]
- [End of week function][2]
[1]: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47307
[2]: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64760
[3]: http://www.devx.com/tip... |
Wikipedia has some [examples][1] of singletons, also in Java. The Java 5 implementation looks pretty complete, and is thread-safe (double-checked locking applied).
[1]:http://en.wikipedia.org/wiki/Singleton_pattern
|
See also http://developer.mozilla.org/en/Plugins . And yes, NPAPI plugins should work in Google Chrome as well. |
Sorry, I was wrong. This directory will allways be created. You can only set it's path in the Options/Projects and Solutions/General screen in the Projects location.
But be careful, because it also means that your standard project directory will be this directory. You cannot avoid VS to create this directory. |
Unfortunately, the lock file (ldb) must be created, updated and deleted. If a user with insufficient permissions opens the database, it will be locked for all other users, therefore all your users need Read/Write/Delete permissions on the back-end. |