instruction stringlengths 0 30k ⌀ |
|---|
What are the main differences (if any) between the box models of IE8 and Firefox3?
Are they the same now?
What are the other main differences between these two browsers? Can a web developer assume that these two browsers as the same since they (seem to) support the latest web standards? |
Well, for start, you don't need distributed one :)
I'm not sure what this physical part means, because you could put svn server on your own machine in little trouble.
On the other hand, NetBeans have local history module that logs all local changes of a file. Maybe something like that would be enough for you if Vi... |
You can use Vault from SourceGear, **the** replacement tool for visual studio source safe.
The IDE is integrated in Visual Studio.
The tool is free for single user.
More information: http://www.sourcegear.com/vault/index.html
|
Go for subversion and tortoiseSVN, you don't need to set it up on a server.
* Costs are zero
* The subversion documentation is great and fun to read
* tortoiseSVN is a very convenient client
|
I use [Mercurial][1]. It runs a treat running stand alone on my Vista development system with no other dependencies required. I use the command line but there's also [TortoiseHG][2] to integrate with Explorer.
Two comments:
1. There are other tools which probably integrate with VS better. I think Subversion h... |
I use [Mercurial][1]. It runs a treat running stand alone on my Vista development system with no other dependencies required. I use the command line but there's also [TortoiseHG][2] to integrate with Explorer.
Two comments:
1. There are other tools which probably integrate with VS better. I think Subversion h... |
As far as i know it compiles everything in memory because it has to run some heuristics to to optimize the code (i.e.: inlining over time) but you can have a look at the [Shared Source Common Language Infrastructure 2.0][1] rotor release. The whole codebase is identical to .NET except for the Jitter and the GC.
... |
I have installed both Smultron and Textwrangler, but find myself using Smultron most of the time. |
You could start looking at caching strategies. Static files like CSS (even compressed ones) and images (even optimized ones) should only need to be downloaded once by the browser for a period of time.
Scirpt combining for AJAX has already been mentioned, but I didn't notice reference to the ScriptReferenceProfiler ... |
How can I render a tree structure (recursive) using a django template? |
|python|django| |
I have a tree structure in memory that I would like to render in HTML using a Django template.
class Node():
name = "node name"
children = []
There will be some object `root` that is a `Node`, and `children` is a list of `Node`s. `root` will be passed in the content of the template.
I have f... |
Use [Java Preprocessor][1]? (google foo low but this is a link to the old Joel forums discussing it)
[1]: http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=63500 |
I don't think it's possible to do it with `Timer/TimerTask`, but depending on what exactly you want to achieve you might be happy with using `java.util.concurrent.ScheduledThreadPoolExecutor`. |
The ScriptManager.RegisterStartupScript allows a script to run on startup inside of an update panel. if you use the old ClientScript.RegisterStartupScript then the script you render will be outside the bounds of the udpate panel, and thus won't be executed during async page loads. |
RegexOptions.IgnoreCase |
|regex| |
[Source][1]
> RegexOptions.IgnoreCase is more expensive than I would have thought (eg, should be barely measurable)
Assuming that this applies to PHP, Python, Perl, Ruby etc as well as C# (which is what I assume Jeff was using), how much of a slowdown is it and will I incur a similar penalty with "/[a-zA-z]/" as ... |
Is regex case insensitivity slower? |
|language-agnostic|regex| |
How do I extract the inner exception from a soap exception in ASP.NET? |
|c#|loop|goto|continue| |
|c#|loops|goto|continue| |
Setting PHP Include Path on a per site basis? |
|php|include|bestpractice| |
I can set the php include path in the php.ini:
include_path = /path/to/site/includes/
But then other websites are effected so that is no good.
I can set the php include in the start of every file:
$path = '/path/to/site/includes/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
... |
|php|include| |
|php|include|bestpractices| |
|php|include| |
|php|include| |
Example of the whole XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="ancestors" select="descendant::li[@id = 'z']/ancestor::li"/>
<xsl:template match="li">
<xsl:copy>
<xsl:if test="count($ancestors | .) = coun... |
Example of the whole XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="ancestors" select="descendant::li[@id = 'z']/ancestor::li"/>
<xsl:template match="li">
<xsl:copy>
<!-- test if current li is in the $ancesto... |
Is Tools | Options | Environment | General | "items shown in recently used lists" set to a number greater than 0? |
I enjoy the classic "what's the difference between a LinkedList and an ArrayList (or between a linked list and an array/vector) and why would you choose one or the other?"
The kind of answer I hope for is one that includes discussion of:
* insertion performance
* iteration performance
* memory allocation/reallo... |
|graphics|creativity| |
Proprietary plug-ins for GPL programs: what about interpreted languages? |
|python|interpreted|licensing|opensource|plugins| |
I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is [what the FSF has to say][1] on the issue:
> **If a program released under the GPL uses plug-ins, what are the requirements for the licenses of a plug-in?**
> It depends on how... |
|python|plugins|licensing|interpreted|opensource| |
|python|open-source|plugins|licensing|interpreted| |
I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is [what the FSF has to say][1] on the issue:
> **If a program released under the GPL uses plug-ins, what are the requirements for the licenses of a plug-in?**
> It depends on how... |
[Sourcegear's Valt][1] is a great option, it runs on SqlServer and it has been around for many years. I would not use any version of Visual Source safe.
[1]: http://www.sourcegear.com/vault/index.html |
[Sourcegear's Valt][1] is a great option, it runs on SqlServer and it has been around for many years. I would not use any version of VSS (Visual Source Safe).
[1]: http://www.sourcegear.com/vault/index.html |
Subversion has very low barrier to entry.
[TortoiseSVN][1] is a free client, and integrates into your explorer- i.e. in right mouse click menu.
The repository can be just a directory somewhere on your PC or on a network drive. Backing up just means zipping up this directory
There are a few plugins to Visual s... |
Did you try [Irrlicht][1].
> Recently Irrlicht has acquired official .NET bindings, allowing users to develop in .Net languages such as VB.NET, C# and Boo.
There is also [Ogre 3D][2] and also [Axiom Engine][3]
[1]: http://irrlicht.sourceforge.net/
[2]: http://en.wikipedia.org/wiki/OGRE_3D
[3]: http:... |
GTK-- and Glade.
Thats' the C++ bindings on GTK
GTK will work on windows ( just look at GIMP )
Works everywhere, no QT license to mess with your millions-making.
|
Struts 2: return to calling page |
|java|struts|struts2| |
I'm using <b>Struts 2</b>.
I'd like to return from an <tt>Action</tt> to the page which invoked it.
Say I'm in page <tt>x.jsp</tt>, I invoke <tt>Visual</tt> action to change CSS preferences in the session; I want to return to <tt>x.jsp</tt> rather than to a fixed page (i.e. <tt>home.jsp</tt>)<br/>
Here's the relevan... |
If you use [Unobtrusive JavaScript][1] then you don't need to check whether the user has JavaScript enabled.
If they have got JavaScript enabled then they'll get the full effect, but if they haven't then users will still be able to use your site. And as well as being better for accessibility you might find this appr... |
SQL file encoding in Visual Studio |
|sql|visual-studio|stored-procedures| |
When we create stored procedures in Visual Studio (with the extension .sql) the file encoding is automatically set to 'Unicode (UTF-8 with signature) - Codepage 65001'.
This causes ours DBA's problems as their scripts don't like it.
We have to manually go in and change them to 'Western European (windows) - Codepa... |
I don't see what is so confusing about pointers. They point to a location in memory, that is it stores the memory address. In C/C++ you can specify the type the pointer points to. For example:
int* my_int_pointer;
Says that my_int_pointer contains the address to a location that contains an int.
The problem... |
The reason pointers seem to confuse so many people is that they mostly come with little or no background in computer architecture. Since many don't seem to have an idea of how computers (the machine) is actually implemented - working in C/C++ seems alien.
A drill is to ask them to implement a simple bytecode based v... |
Stand alone charts in GWT |
|gwt|google|charts| |
I've been trying to get pretty charts to work in GWT on our internal network.
Playing around with [GWT-Ext][1]'s charts is nice, but it requires flash and is really messy to control (it seems buggy, in general).
I'd like to hear about something that works with the least amount of dependencies and it also must wor... |
|google|charts|gwt| |
I've been trying to get pretty charts to work in GWT on our internal network.
Playing around with [GWT-Ext][1]'s charts is nice, but it requires flash and is really messy to control (it seems buggy, in general).
I'd like to hear about something that works with the least amount of dependencies and it also must wor... |
In Asp.net 3.5, you should be able to set up the Link tag in the header as a server tag. Then in the codebehind you can set the href property for the link element, based on a cookie value, querystring, date, etc.
In your aspx file:
<head>
<link id="linkStyles" rel="stylesheet" type="text/css" runat="se... |
In Asp.net 3.5, you should be able to set up the Link tag in the header as a server tag. Then in the codebehind you can set the href property for the link element, based on a cookie value, querystring, date, etc.
In your aspx file:
<head>
<link id="linkStyles" rel="stylesheet" type="text/css" runat="se... |
1. Write a method that takes a string, and returns true if that string is a number.(anything with regex as the most efficient answer)
2. Please write an abstract factory method, that doesn't contain a switch and returns types with the base type of "X". (Looking for patterns, looking for reflection, looking for them ... |
1. Write a method that takes a string, and returns true if that string is a number.(anything with regex as the most efficient answer)
2. Please write an abstract factory method, that doesn't contain a switch and returns types with the base type of "X". (Looking for patterns, looking for reflection, looking for them ... |
I would recommend [Memcached][1] or [APC][2]. Both are in-memory caching solutions with dead-simple APIs and lots of libraries.
The trouble with those 2 is you need to install them on your web server or another server if it's Memcached.
##APC
####Pros:
* Simple
* Fast
* Speeds up PHP execution also
####Con... |
This is a good fit for jQuery if that's available to you.
$("#z").parent().parent().addClass("foo");
|
Once when I was interviewing for Microsoft in college, the guy asked me how to detect a cycle in a linked list.
Having discussed in class the prior week the optimal solution to the problem, I started to tell him.
He told me, "No, no, everybody gives me that solution. Give me a different one."
I argued that my ... |
Nemerle: Functional
def fact(n) {
| 0 => 1
| x => x * fact(x-1)
}
|
I would say try and go OO just because what you have can be reused much easier than procedural *if done right*
I will also say that OO is much more organized then procedural. When your at a small scale it's easy to get away with sloppy code OO or not. But when you get to larger projects your procedural must be much... |
C#, Java and Python have a standard implementation of the Iterator pattern. In C# and Python this has been intergrated in the language so you can just use yield return statements. |
Generic Type Conversion FROM String |
|c#|generics|primitives|type-safety| |
Here is the problem I am having, I have a class that I want to use to store "properties" for another class, these properties simply have a name and a value. Ideally, what I would like is to be able to add _typed_ properties, so that the "value" returned is always of the type that I want it to be.
The type should a... |
Here is the problem I am having, I have a class that I want to use to store "properties" for another class, these properties simply have a name and a value. Ideally, what I would like is to be able to add _typed_ properties, so that the "value" returned is always of the type that I want it to be.
The type should a... |
|c#|generics|type-safety|primitives| |
|c#|generics|primitive|type-safety| |
Here is the problem I am having, I have a class that I want to use to store "properties" for another class, these properties simply have a name and a value. Ideally, what I would like is to be able to add _typed_ properties, so that the "value" returned is always of the type that I want it to be.
The type should a... |
i love doing these little problems, can't help myself.
not sure if it was worth doing though since it's very similar to the java answer.
private readonly Regex phoneNumExp = new Regex(@"(\({0,1}\d{3}\){0,1}[- \.]\d{3}[- \.]\d{4})|(\+\d{2}-\d{2,4}-\d{3,4}-\d{3,4})");
public HashSet<string> Search(string... |
You can't access the browser history (neither client side nor server side). All you can do, client side, is to send the browser back a number of steps. The entries of the history are otherwise hidden from programmatic access. |
You can't access the values for the entries in browser history (neither client side nor server side). All you can do is to send the browser back or forward a number of steps. The entries of the history are otherwise hidden from programmatic access.
Also note that HTTP_REFERER won't be there if the user typed the add... |
You could also have a system tray representation of the service which would show a small notification about any errors and ask the user whether they want it reported or not. I think that it is still better to be able to give the user the choice whenever you are sending 'out' data from their computer. |
You can also name your foreign key constraint by using
CONSTRAINT YOURNAMEHERE FOREIGN KEY (question_exam_id) REFERENCES EXAMS (exam_id) |
<http://www.refactoring.com/> might help you. They have a long list of methods here:
* <http://www.refactoring.com/catalog/index.html> |
<http://www.refactoring.com/> might help you. They have a long list of methods here:
* <http://www.refactoring.com/catalog/index.html>
Joel's article [Rub a dub dub][1] shows you why you should refactor and not rewrite (but I guess you already knew that rewriting is [a thing you should never do][2]..)
[1]:... |
I have used [Ubuntu][1] 8.04 and [Fedora][2] 9 with success.
For Ubuntu, the community forums were very helpful and if I remember correctly one of the repositories provided apt packages for Sun's Java6 distribution.
On Fedora 9, the Sun rpms work alright.
In either case, alternative/galternative is your f... |
Try this:
#topnav {
overflow:hidden;
}
#topnav li {
float:left;
}
And for IE you will need to add the following:
#topnav {
zoom:1;
}
Otherwise your floated < li > tags will spill out of the containing < ul >.
|
NCover, TypeMock and MSTest |
|ncover| |
has anyone got NCover, TypeMock and MSTest to work together? and if so how.
I've had 2 or 3 serious tries at this now and just can't get it to work.
I'm using MSTest 9, NCover 2.1 and TypeMock 4.1.
Ideally I would like to run them from an MSBuild task.
Cheers
Mat |
[Ultimate++][1] is a cross platform rapid application development framework for C++. It is aimed specifically at rapid development. The Ultimate++ website provides some [comparisons to other frameworks][2] mentioned such as Qt and wxWidgets.
[1]: http://www.ultimatepp.org/
[2]: http://www.ultimatepp.org/www$uppweb$... |
[Ultimate++][1] is a cross platform rapid application development framework for C++. It is aimed specifically at rapid development. The Ultimate++ website provides some comparisons to other frameworks mentioned such as Qt and wxWidgets.
[1]: http://www.ultimatepp.org/
[2]: http://www.ultimatepp.org/www$uppweb$compa... |
GUIDs may cause you a lot of trouble in the future if they are used as "uniqifiers", letting duplicated data get into your tables. If you want to use GUIDs, please consider still maintaining UNIQUE-constraints on other column(s). |
<a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx">Process Monitor</a> from sysinternals could help too. |
you could write
<script type="text/javascript" language="javascript">document.write("<input type='hidden' name='hasJs' value='1' />");
or otherwise write a cookie via js and then read it at the server if you want to check server side for js. |
Perhaps this is something that can be done via WMI? |
I would use Subversion (in fact I use it). SVN is:
- free,
- good enough,
- simple,
- works fine on Windows (and Linux too),
- a lot of people use it so it's easy to get help,
- can integrate with most of IDEs i.e. Visual Studio or Eclipse.
I would **strongly** recommended separate machin... |
@John ah Sorry I thought that your "refresh" meant postbacks.
In that case, just use a Session variable. |
@John ah Sorry I thought that your "refresh" meant postbacks.
In that case, just use a Session variable.
FYI, I suggested you use the ViewState dictionary instead of Session because the variable is used inside only _that_ single page, so it shouldn't be using session-wide variable, that's bad practice. |
As for streaming, you can do it all in an (at least memory-) efficient way. On the upload side, file parameters in forms are abstracted as IO objects that you can read from; on the download side, look in to the form of `render :text =>` that takes a Proc argument:
render :content_type => 'application/octet-strea... |
If you want to update the version number in a projects AssemblyInfo.cs you may be interested in this article:
[CodeProject: Use Subversion Revision numbers in your Visual Studio Projects][1]
> If you enable SVN Keywords then every time you check in the project Subversion scans your files for certain "keywords" an... |