Free SVN Tool for Visual Studio
Monday, June 9th, 2008After doing quite a bit of Java and using subclipse I fancied something similar for visual studio. I am going to give this one a go:
Its free so that’s a start!
Everthing I have found that might be useful in .NET, C#, SQL Server 2005, PHP and Actionscript 2.0 / 3.0 etc
After doing quite a bit of Java and using subclipse I fancied something similar for visual studio. I am going to give this one a go:
Its free so that’s a start!
Sometimes .NET really winds me up. Why do they by default put things that could potentially give a hacker some information. I know security by obscurity is not the best way forward but why leave your front door open!
Anywho - it is really easy to get rid of:
Find or add the element <httpRuntime> in your web.config and add the attribute enableVersionHeader=”false”.
The msd documentation can be found here: http://msdn.microsoft.com/en-us/library/e1f13641.aspx
Want to compress your CSS and Javascript files during your build process? Here is what you need.
Download CSSTidy, and add the executable somewhere on your build machine.
Download and install the MSBuild Community Tasks, or you can do just the Jazmin JSCompress task, though I didn’t do that so I don’t have any source XML for that.
To be clean, I added a Property for the location of CssTidy
<PropertyGroup>
<CssTidy>c:\BuildTools\CssTidy.exe</CssTidy>
</PropertyGroup>
Also I registered the MSBuildCommunityTasks
<!-- Required Import to use MSBuild Community Tasks -->
<Import Project=”$(MSBuildExtensionsPath)\MSBuildCommunityTasks\
MSBuild.Community.Tasks.Targets”/>
Then, build a list of all the files you want to compress.
<ItemGroup>
<CssFiles Include=”$(websitedir)\**\*.css”/>
<ScriptFiles Include=”$(websitedir)\**\*.js”/>
</ItemGroup>
$(websitedir) is just a variable for where the website is, obviously I could have used c:\inetpub\wwwroot or whatever instead.
Then I build two tasks, one that calls CssTidy…
<Target Name="compress_css">
<Attrib Files=”%(CssFiles.FullPath)” ReadOnly=”false”/>
<Exec Command=”$(CssTidy) %(CssFiles.FullPath) %(CssFiles.FullPath) –template=highest” />
</Target>
If your not familiar with the %() syntax, this causes MsBuild to iterate over each item in the CssFiles collection and run this tag for each instance. Otherwise I would get a semi-colon delimited list which nothing handles that well.
The Attrib tag makes everything write-able thus the ReadOnly=”false” attribute, this didn’t seem to be an issue for CssTidy, but it was for JSCompress and I put it here just incase it becomes an issue one day.
The Exec Line executes the CssTidy program, with the FullPath of the searched file (this is meta-data of the item), its included twice to represent the input and output. The –template=highest portion just says do your absolute best!
Then the you add one for JSCompress…
<Target Name="compress_js">
<Attrib Files=”%(ScriptFiles.FullPath)” ReadOnly=”false”/>
<JSCompress Files=”%(ScriptFiles.FullPath)”></JSCompress>
</Target>
Attrib we’ve been over, this is really important here, as JSCompress was failing on readOnly files.
Then I tell it to run the JSCompress tag for each of the ScriptFiles. I feel like I’m explaining exactly what your seeing and already understanding. I hate it when people do that.
Then you need to call these targets.
<CallTarget Targets="compress_css"/>
<CallTarget Targets=”compress_js”/>
Not much to it. Hopefully this helps you bring quick loading times to all the web surfers of the world.
Thanks from this link:
http://blackbeltcoder.net/2007/04/20/javascript-and-css-compression-in-msbuild/
Yet another great big pain in the £$% from IE7!
For example you do this:
var map = new GMap2(document.getElementById(”map”));
IE7 breaks, you do:
var map = new GMap2(document.getElementById(”google_map”));
it works fine.
When Flash Player 9 goes into full screen mode, it pops up a little security message that tells the user how to exit full screen mode. It appears as white text on a semi-transparent black background so it is generally always visible (which is good). Still, I wondered if it could be obscured.
The message is always on top, so it is impossible to draw over it. But what if we tried distracting the user from the actual security message?
Original article:
http://www.bunnyhero.org/2008/05/10/scaring-people-with-fullscreen/
for (var member in object) {
alert(’Name: ‘ + member);
alert(’Value: ‘ + object[member]);
}
This should be an easy procedure but its not.
Something I found really useful was this:
RESTORE HEADERONLY FROM DISK = ‘c:\xxx.bak’
RESTORE FILELISTONLY FROM DISK = ‘c:\xxx.bak’
Basically from the SQL above you can find out the correct names of the xxx_Data and xxx_Log files for the next command:
RESTORE DATABASE newXXXX
FROM DISK = ‘c:\xxx.bak’
WITH REPLACE,
MOVE ‘xxxx_Data’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\xxxx.mdf’
, MOVE ‘xxxx_Log’ TO ‘C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\xxxxx_log.ldf’
Currently I have the database ‘(Restoring…)’ in SQL Server 2005 Express but I cannot seem to get them out of their ‘Restoring’ process…..
These were useful:
http://www.mssqltips.com/tip.asp?tip=1150
http://doc.ddart.net/mssql/sql70/ra-rz_11.htm
Still got it ‘(Restoring…)’ but this may help someone:
Restore VerifyOnly From Disk=’c:xxxx.bak’
To start with pop hard drive into the SC101 unit. Use a coin to release the front panel. Make sure the HD is in cable select mode before sliding it in. Slide in the hard drive with the power cable to the top.
Once the hard drive is in place, replace the front.
Download the software for the SC101 from:
ftp://downloads.netgear.com/files/scm_3_0_6_setup.exe
Do your usual virus scans on the file and then install it. Once installed switch on the SC101 unit. In the manual it does say switch on the modem then the router and then the SC101 but in my experience it still works which ever way you do it.
When everything is up run the ‘Netgear Storage Control Manager Utility’ that you just installed. This will then search your network for the SC101. Run the upgrade wizard tool to get the latest updates.
Now all you have to do is create some drives. The easiest way to do this is just to use the wizard setup, so select the wizrd setup radio button and then select next -> create a new drive. If you have more than one hard drive in the unit at this point you will see two ip addresses, select the one you want and then click next.
Follow the rest of the instructions and that’s it really - dead easy!
If you want to access these drives with other computers on your network you will need to install the manager utility on each machine and use the wizard to attach each drive.