instruction
stringlengths
0
30k
[Apparently][1] express support will come with the final release [1]: http://blogs.msdn.com/webdevtools/archive/2008/05/12/error-installing-visual-studio-2008-sp1-beta-and-silverlight-tools-beta-1.aspx#8636636
See the question: [Best javascript compressor][1] Depending on whether or not you are going to gzip your JavaScript files may change your choice of compressor. (Currently Packer isn't the best choice if you are also going to gzip, but see the above question for the current best answer) [1]: http://stackoverflow...
Yes, the [MZ-Tools][1] addin has a review dead code feature. [1]: http://www.mztools.com/index.aspx
The book Java Virtual Machine by Jon Meyer has an example of a series of bytecode instructions that caused the JVM to core dump. I can't find my copy of this book. If anyone out there has one please look it up and post the answer.
<style> #content { width: 300px; height: 300px; border: 1px solid black; position: relative; } .topright { position: absolute; top: 5px; right: 5px; text-align: right; } .bottomright { position: absolute; bottom: 5px; right: 5px; text-align: right; } </style> <div id="content"> ...
[Dojo Shrinksafe](http://shrinksafe.dojotoolkit.org/) is a Javascript compressor that uses a real JS interpreter, so it won't break your code. The other ones can work well, but Shrinksafe is a good one to use in a build script, since you shouldn't have to re-test the compressed script.
I would think this depends largely on the language you are using, and what sort of data set objects you have available to you. In python, for example, you could create a Dictionary object of all the different handling statements, and just iterate through that to find the right method/function to call. Case/Switc...
Well, if VS doesn't do this natively, a simple method is to right click on the method and select "find all references" . If there is only 1 reference (where it is declared) it most likely isn't used anywhere else.
Try placing a breakpoint in the File class' constructors and the mkdir and createNewFile methods. Generally, code will use the File class to create its files or directories. You should have the Java source code for these classes included with your JVM.
hey, be practical. use select * when prototyping and select specific columns when implementing and deploying. from an execution plan perspective, both are relatively identical on modern systems. however, selecting specific columns limits the amount of data that has to be retrieved from disk, stored in memory and sent o...
The very first alias I made once I started customizing my profile in powershell was 'which'. New-Alias which get-command That's it!
The very first alias I made once I started customizing my profile in powershell was 'which'. New-Alias which get-command To add this to your profile, type this: "`nNew-Alias which get-command" | add-content $profile The `n is to ensure it will start as a new line.
You have a *PivotTables* collection on a the VB *Worksheet* object. So, a quick loop like this will work: Sub RefreshPivotTables() Dim pivotTable As PivotTable For Each pivotTable In ActiveSheet.PivotTables pivotTable.RefreshTable Next End Sub Notes from the tren...
They are similiar but very different technologies. Astoria or what is now called at [Microsoft ADO.NET Data Services][1] is a programming library that will allow data to be passed through RESTful web services. You develop these web services to be run against data you have access to. ADO.NET Data Services is now inclu...
Try using the [RichFaces Paint 2D][1] tag It exposes the [Graphics2D][2] package to the user interface. Track user drag events on the image using javascript, then post the co-ordrdinates to the backing bean to re-render the image with a drawn on selection box. [1]: http://livedemo.exadel.com/richfaces-demo...
Even if you are not a developer go for [**Source Insight**][1] And if you are, its a MUST HAVE :) [1]: http://www.sourceinsight.com/
I have created the same thing with a set of stored procedures. Database B will have its own primary keys, but store Database A's primary keys, for debuging purposes. It means I can have more than one Database A! Data is copied via a linked server. Not too fast; SSIS is faster. But SSIS is not for beginners, and ...
Yes it's possible. I've done the same thing with .NET : UI in ext-JS which communicates with the server trough JSON. In .NET world you can use DataContractSerializer (class from WCF) or JavascriptSerializer (ASP.NET) I'm sure that there's several good JSON Serializer in the Java world too. I used [Jabsorb][1] (b...
I respectfully disagree Tom! this _is_ a bug !! V3.5.0f is not a valid version for rake migrations. Rake should not use it to migrate:down just because ruby chose to consider that "V3.5.0f".to_i is 0 ... Rake should loudly complain that VERSION is not valid so that users know what is up (between you and me, checki...
I don't think there is a global answer to your question. It depends on the specific query. You would have to compare the execution plans for the two queries to see if there are significant differences. I personally prefer the first form: select * from t1, t2 where t1.country='US' and t2.country=t1.country and...
From MSDN's "[New Recommendations for Using Strings in Microsoft .NET 2.0][1]" > Summary: Code owners previously using the InvariantCulture for string comparison, casing, and sorting should strongly consider using a new set of String overloads in Microsoft .NET 2.0. Specifically, data that is designed to be culture-...
How do you detect Credit card type based on number?
|e-commerce|
I'm trying to figure out how to detect the type of credit card based purely on it's number. Does anyone know of a definitive, reliable way to find this?
Test each character in turn to see if it is a valid alphabetic or numeric character and if not then remove it from the string. The character test is very simple, just use... char.IsLetterOrDigit; Please there are various others such as... char.IsSymbol; char.IsControl;
Creating SharePoint 2007 list items via the Web Dav interface
|sharepoint|
SharePoint 2007 (both Moss and Wss) exposes document libraries via web dav, allowing you to create documents via essentially file system level activities (e.g. saving documents to a location). SharePoint also seems to expose lists via the same web dav interface, as directories but they are usually empty. Is it poss...
The extressions should be equivalent with any decent optimizer, but it depends on which database you're using and what indexes are defined on your table. I would suggest using the EXPLAIN feature to figure out which of expressions is the most optimal.
How do I use .htaccess to redirect to a URL containing HTTP_HOST?
|.htaccess|mod-rewrite|mod-alias|
**Problem** I need to redirect some short convenience URLs to longer actual URLs. The site in question uses a set of subdomains to identify a set of development or live versions. I would like the URL to which certain requests are redirected to include the HTTP_HOST such that I don't have to create a custom .htacc...
Page compressiong sounds really nice to me. Haven't used it yet, though. [http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-compression-ratios-from-real-world-databases.aspx][1] [1]: http://sqlblog.com/blogs/linchi_shea/archive/2008/05/11/sql-server-2008-page-compression-com...
You could use a [DateTime][1] object: use DateTime; my $dt; while ( my ($date, $sum) = $sth->fetchrow ) { if (defined $dt) { print CSV $dt->ymd . ",0\n" while $dt->add(days => 1)->ymd lt $date; } else { my ($y, $m, $d) = split /-/, $date; ...
Try using `svn diff > out.patch` then copy the `out.patch` file to `out.patch.add` and `out.patch.modify` *Only when you have a working patch file* revert the original file using `svn revert out.c`. Edit the patch files by hand so that they only contain the *hunks* for adding or modifying. Apply them to the or...
Try using `svn diff > out.patch` then copy the `out.patch` file to `out.patch.add` and `out.patch.modify` *Only when you have a working patch file* revert the original file using `svn revert out.c`. Edit the patch files by hand so that they only contain the *hunks* for adding or modifying. Apply them to the or...
using System.Configuration; Configuration config = ConfigurationManager.OpenExeConfiguration("C:\Test.exe"); You can then access the app settings, connection strings, etc from the config instance. This assumes of course that the config file is properly formatted and your app has read access ...
There is also Hope: http://hope.bringert.net/about although it doesn't seem to have gained as much traction as HApps and WASH. The site has also been quiet for about a year.
Are SQL Server Integration Services (SSIS) an option? If so, I'd use that.
You mention that you don't want to use a named pipe for internal use; it's probably worth poining out that the documentation for <a href="http://msdn.microsoft.com/en-us/library/aa365152(VS.85).aspx">CreatePipe()</a> states, *"Anonymous pipes are implemented using a named pipe with a unique name. Therefore, you can oft...
" ~/.vimrc " Turn on line numbering set nu " Turn on syntax highlighting syntax on " Set 4 space expanding tabs set tabstop=4 set shiftwidth=4 set softtabstop=4 set expandtab "turn off line wrapping set nowrap " Map CTRL-N to create a new tab :map...
You could add a constraint to the default rule so that the {Controller} tag cannot be "Pages".
How do you unit-test code that interacts with and instantiates third-party COM objects?
|unit-testing|delphi|com|mocking|
One of the biggest issues currently holding me back from diving full steam into unit testing is that a really large percentage of the code I write is heavily dependent on third-party COM objects from different sources that also tend to interact with each other (I'm writing add-ins for Microsoft Office using several hel...
I eventually found the answer to my own question. Comparing the projects files using Notepad I noticed that a setup project in VS2008 has an entry that requests version 3.5 and the same section in the VS2005 project was marked as 2.0. What is strange is that the section looks like something you cannot manually alte...
If you cant find anything else, you can always port this [**java version from Google Code**.][1] [1]: http://code.google.com/p/radixtree/
I would very much recommend Programming Perl, but beware you may need a subscription to Safari in order to [read it online][1]. [1]: http://books.google.ch/books?id=ezqe1hh91q4C&dq=%22programming+perl%22&pg=PP1&ots=juByzz8TT3&sig=y9WxaVAvJL-4tYCWgSklb7wqaN8&hl=en&sa=X&oi=book_result&resnum=1&ct=result#PPA11,M1
I think it is because Format doesn't take a string per se, but a "format string". Most strings are equal to things like "Bob Smith" or "1010 Main St" or what have you and not to "Hello {0}", generally you only put those format strings in when you are trying to use a template to create another string, like a factory met...
[The Cookbook](http://www.amazon.com/Python-Cookbook-Alex-Martelli/dp/0596007973/ref=sr_1_1?ie=UTF8&s=books&qid=1221560867&sr=8-1) is absolutely essestial if you want to know idiomatic python.
Managing large volumes of data - stored procedures or datasets or other...?
|c#|database|
I have an application that imports large volumes of data daily, several 100 thousands records.<br> Data comes from different sources. The data is read using C#, then bulk inserted into the database. <br> <br> This data is then processed: - different tables are linked - new tables are generated - data is correc...
if the table is large and performance is an issue, you can always move 'deleted' records to another table, which has additional info like time of deletion, who deleted the record, etc that way you don't have to add another column to your primary table
I would lean towards the "Rails way" with a deleted_at column that contains the datetime of when the deletion took place. Then you get a little bit of free metadata about the deletion. For your SELECT just get rows WHERE deleted_at IS NULL
No. AIR applications can only have one instance running at a time. If you need multiple apps running, the solution is to instantiate one app, with the app view in a separate native window (one for each "app instance"). The reason it is marked closed is because it is not considered a bug, ut rather a design / implime...
What library are you using to make Ajax calls? If you are using JQuery then you can create static methods and call them on your page. Let me know if you need further help!
View/edit MP3 id3 data in C#
|c#|mp3|
What's a quick and easy way to view and edit MP3 id3 tags (artist, album, etc.) using C#?
|c#|mp3|id3|
Good Java Practices in Ubuntu
|java|ubuntu|linux|school|
Hey all, my Computational Science course this semester is entirely in Java. I was wondering if there was a good/preferred set of tools to use in ubuntu. Currently I use gedit with a terminal running in the bottom, but I'd like an API browser. I've considered Eclipse, but it seems to bloated and unfriendly for qui...
|java|linux|ubuntu|
I don't think there is a level of complexity that necessitates a framework. For me whenever I am writing a dynamic site I immediately consider a framework, and if it will save me time, I use it(it almost always does, and I almost always do).
<iframe style="overflow:hidden;" src="about:blank"/> should work in IE. IE6 had issues supporting overflow-x and overflow-y. One other thing to note is that IE's border on the iframe can only be removed if you set the "frameborder" attribute in camelCase. <iframe frameBorder="0" style="overflow:hidden;"...
*Disclaimer: I'm currently running MVC Preview 5, so some of this may be new.* The best-practices way: Just implement a static utility class that provides a method that does the model look-up, taking the RouteData from the action as a parameter. Then, call this method from all actions that require the model. The...
Your best bet is to knock together your own spider in your scripting language of choice, it could be done recursively along the lines of: // Pseudo-code to recursively check for broken links // logging all errors centrally function check_links($page) { $html = fetch_page($page); ...
Specifying the column list is *usually* the best option because your application won't be affected if someone adds/inserts a column to the table.
TCL: proc a {} a I don't have a tclsh interpreter that can do tail recursion, but this might fool such a thing: proc a {} "a;a"
First of all, I would suggest against adding all entries on the querystring as parameter names, I'm not sure this is unsafe, but I wouldn't take that chance. The problem is you're calling Command.Parameters.AddWithValue("@val2", null) Instead of this you should be calling: If MyValue Is Nothing Then...
I'd use any SCM that does not have pessimistic locking (http://davidtanzer.net/?q=node/118) mechanisms. Especially because you want people to be able to "edit" the same file at the same time in any sizable project. Personally I'd choose SVN with some solution for distribution, but since in SVN you only submit what y...
off the cuff I'd say use prime numbers, id = 3 * value1 + 5 * value2 + .... + somePrime * valueN Make sure you don't overflow your id space (long? long long?). Since you've got a fixed number of values just crap some random primes. Don't bother generating them, there are enough available in lists to get you g...
[bananascript.com][1] used to give me best results. [1]: http://www.bananascript.com/
!<first few characters of the command> will execute the last command which matches. Example: !b will run "build whatever -O -p -t -i -on" !. will run ./a.out works the best with long and repetitive commands, like compile build execute etc. Saved me sooo much time when coding/testing.
With git-svn you can make a local GIT repository of the remote SVN repository, work with it using the full GIT feature set (including partial commits) and then push it all back to the SVN repository. [git-svn (1)][1] [1]: http://www.kernel.org/pub/software/scm/git/docs/git-svn.html
There is [mod_rails][1] and it can run [Rack][2] applications, what more can you need? [1]: http://www.modrails.com/ [2]: http://rack.rubyforge.org/
>Can anyone speak to the reliability and safety of running a C# program closer to Ring 0 than would normally be the case? C# runs in the .NET Virtual Machine, you can't move it any closer to Ring 0 than the VM is, and the VM runs in userspace.
I used to do this: - In my editor (I use vim), edit the file so that only one of the changes appear - Save the file (but don't quit the editor) - Commit the changed file to svn - Hit "undo" in the editor so the second set of changes reappear - Save the file again - Commit the second set of changes. This is a...
I used to do this: - In my editor (I use vim), edit the file so that only one of the changes appear - Save the file (but don't quit the editor) - Commit the changed file to svn - Hit "undo" in the editor enough times for the second set of changes reappear - Save the file again - Commit the second set of changes...
Undo with GTK TextView
|python|text-editor|gtk|undo|
I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView widgets? I'll be ...
Script added by setting the innerHTML property of an element doesn't get executed. Try creating a new div, setting its innerHTML, then adding this new div to the DOM. For example: <pre> &lt;html&gt; &lt;head&gt; &lt;script type='text/javascript'&gt; function addScript() { var str = &quot;&lt;script&gt;alert('...
For all EJBs you can use EJB 3.0 Interceptors (This is something similar to Servlet filter) and another similar interceptor for Spring (not familiar with spring) As you are using EJBs as well as Spring that may not cover the whole transactions. Another approach could be using a Front Controller however that requires s...
Why would you want to do that? Your composite ID should map the primary key of your table, and it doesn't sound wise to put null values in a key, does it?
Why would you want to do that? Your composite ID should map the primary key of your table, and it doesn't sound wise to put null values in a key, does it? **EDIT:** Hibernate does not allow to do so; you might put the property outside the key and tweak the DAO a little to take the field into account wherever necessa...
Change the service account to an AD account and register the SPN's as shown. Use your own service name e.g. fooservice setspn -A fooservice/servermachinename domain\serviceAccountName setspn -A fooservice/servermachinename.fullyqualifieddomainname domain\serviceAccountName in the client config set [ident...
While you can't thread, you do have some degree of process control in php. The two function sets that are useful here are: Process control functions http://www.php.net/manual/en/ref.pcntl.php POSIX functions http://www.php.net/manual/en/ref.posix.php You could fork your process with pcntl\_fork - returning...
Well, you can use the CASE statement: SELECT CASE WHEN Date1 >= Date2 AND Date1 >= Date3 THEN Date1 WHEN Date2 >= Date1 AND Date2 >= Date3 THEN Date2 WHEN Date3 >= Date1 AND Date3 >= Date2 THEN Date3 ELSE Date1 ...
^A A switches back to the screen you just came from.
I'd recommend [Think Python][1]. [1]: http://www.greenteapress.com/thinkpython/thinkpython.html
Can't help with SharpZipLib, but you can try to create zip file using [ZipPackage][1] class [System.IO.Packaging][2] without using 3rd part libraries (requires .NET 3+). [1]: http://msdn.microsoft.com/en-us/library/system.io.packaging.zippackage.aspx [2]: http://msdn.microsoft.com/en-us/library/system.io.pack...
Ask for the specific details you need. People won't be aware of stuff you are interested in. Also try to put forth some guidelines for better and effective presentation before the meeting.
In common with most security requirements, you need to understand the level of threat. What damage can be done if the email addresses are compromised? What's the chance of it happening? The damage done if email addresses are REPLACED could be much greater than if they're EXPOSED. Especially if you're, for exam...
At minimum, firewall protection, from a certain interface at least, needs to allow the traffic from each machine to go to the other. That alone can be considered a form of 'coupling' and therefore, coupling is inherent to machines that communicate, at least to a certain level.
I would usually say the one you know best which can achieve the results you want. Like all religious wars, and after learning a large number of languages, you realise that you can do most things in most languages (Note I did say most). I use Perl. It is maybe not as up to date as Python or Ruby, but it does have mas...
Mono's DateTime Serialization
|.net|datetime|mono|remoting|