View source
From Vandelay Wiki
for
Programming
Jump to:
navigation
,
search
[[Javascript/JQuery]] ---- [http://msdn.microsoft.com/flash/currentissue.htm Current MSDN Flash issue.]<br /> YCFHQ-9DWCY-DKV88-T2TMH-G7BH<br /> Tim Yen on Software and Technology: There is no MTS object context<br /> http://theoccasionalobservation.blogspot.com/2008/03/there-is-no-mts-object-context.html<br /> msdtc –uninstall<br /> [may need to reboot at this point]<br /> msdtc –install<br /> [[Tutorial: How to install Visual Studio 6 With Service Pack 5 on Windows Vista RTM]]<br /> [[Visual Studio 2008 Learning Guide]]<br /> [[Collection of Puzzles for Programmers]]<br /> Free Programming books - https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md ==Links== 25 Powerful and Useful jQuery Tutorials - http://speckyboy.com/2009/03/11/25-powerful-and-useful-jquery-tutorials-for-developers-and-designers/<br /> 40 Useful jQuery Techinques and Plugins - http://www.smashingmagazine.com/2010/04/27/45-useful-jquery-techniques-and-plugins/<br /> sprites - http://blogoscoped.com/archive/2006-08-08-n51.html<br /> 10 papers every programmer should read - http://blog.objectmentor.com/articles/2009/02/26/10-papers-every-programmer-should-read-at-least-twice<br /> Connection strings<br /> Convert C# to VB.NET - http://www.developerfusion.com/tools/convert/csharp-to-vb/<br /> Walkthrough: Creating and Using an ASP.NET Web Service in Visual Web Developer - http://msdn.microsoft.com/en-us/library/8wbhsy70.aspx<br /> Pro ASP.NET 2.0 in VB 2005 - http://books.google.com/books?id=V7-QBwpZYlgC&printsec=frontcover&dq=Pro+ASP.NET+2.0+in+VB+2005&cd=2#v=onepage&q=&f=false<br /> Microsoft SQL Server Community and Sample - Home - http://www.codeplex.com/SqlServerSamples<br /> Processing 1.0 - http://processing.org/<br /> MS SDKs - http://msdn.microsoft.com/en-us/dd299405.aspx<br /> How to be a Programmer: A Short, Comprehensive, and Personal Summary - http://samizdat.mines.edu/howto/HowToBeAProgrammer.html?p=1<br /> http://steve.yegge.googlepages.com/ten-challenges<br /> http://www.codekeep.net/home.aspx<br /> Introduction to Web Application Projects - http://msdn.microsoft.com/en-us/library/aa730880(VS.80).aspx<br /> https://www.squarefree.com/bookmarklets/forms.html<br /> http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/<br /> http://icant.co.uk/csstablegallery/index.php<br /> http://code.google.com/edu/courses.html<br /> http://catb.org/esr/faqs/hacker-howto.html<br /> http://norvig.com/21-days.html<br /> http://www.techotopia.com/index.php/Main_Page<br /> http://addyosmani.com/blog/essentialjsdesignpatterns/<br /> http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books<br /> http://pnotepad.org/upgrade/pn22.html<br /> http://www.devcurry.com/2010/06/collection-of-net-framework-and-visual.html<br /> cheat sheets - http://www.topdesignmag.com/all-the-cheat-sheets-that-a-web-developer-needs/#<br /> Google notebook APIs - http://code.google.com/apis/notebook/articles/<br /> http://wiki.thc.org/<br /> http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html<br /> http://www.codecademy.com/#!/exercise/0<br /> http://www.ibm.com/developerworks/opensource/library/os-php-7oohabits/ - 7 good object oriented habits<br /> http://www.devdaily.com/<br /> I don't use .Net Memberships. I created my own role-based security model (did this before I started using .Net) and created data providers to go with it. Also, I use a ConnectionProviderFactory (returns an IDbConnection) class to maintain connection strings so my Dals can be completely independant from the applications using them.<br /> [[The Hacker's Code]]<br /> https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla <pre> <html><head> <title>contentEditable</title> <style> iframe { width: 49%; height: 400px; float: left; } #writeroot { border: 1px solid #000000; margin-left: 1%; width: 49%; height: 400px; } span.separator { font-size: 250%; font-weight: bold; } </style> <script type="text/javascript" src="buttons.js"> window.onload = function () { var buttons = document.getElementById('testForm').getElementsByTagName('input'); for (var i=0;i<buttons.length;i++) { if (buttons[i].type != 'button') continue; buttons[i].onclick = command; } wr = document.getElementById('writeroot'); iframe = document.getElementById('test'); } var testEl; function command() { if (!testEl) { var oDoc = iframe.contentWindow || oIframe.contentDocument; if (oDoc.document) { oDoc = oDoc.document; } testEl = oDoc.getElementById('testElement'); } var cmd = this.id; var bool = false; var value = this.getAttribute('cmdValue') || null; if (value == 'promptUser') value = prompt(this.getAttribute('promptText')); var returnValue = iframe.contentWindow.inBetween(cmd,bool,value); var writestring = ''; if (returnValue) writestring += 'Return value: ' + returnValue + '\n\n'; writestring += testEl.innerHTML; wr.value = writestring; // iframe.contentDocument.execCommand(cmd,bool,value); } </script> </head> <body> <form id="testForm"> <input type="button" id="cut" value="Cut"> <input type="button" id="copy" value="Copy"> <input type="button" id="paste" value="Paste"> <span class="separator">|</span> <input type="button" id="bold" value="Bold"> <input type="button" id="italic" value="Italic"> <input type="button" id="underline" value="Underline"> <input type="button" id="strikethrough" value="<s>"> <input type="button" prompttext="URL of link?" cmdvalue="promptUser" id="createLink" value="<a>"> <input type="button" id="inserthorizontalrule" value="<hr />"> <input type="button" cmdvalue="/pix/logo_ppk.gif" id="insertimage" value="<img />"> <span class="separator">|</span> <input type="button" id="undo" value="Undo"> <input type="button" id="redo" value="Redo"> <span class="separator">|</span> <input type="button" prompttext="color?" cmdvalue="promptUser" id="backcolor" value="bgcolor"> <input type="button" prompttext="color?" cmdvalue="promptUser" id="forecolor" value="fgcolor"> <input type="button" prompttext="color?" cmdvalue="promptUser" id="hilitecolor" value="hilite"> <span class="separator">|</span> <input type="button" id="increasefontsize" value="A+"> <input type="button" id="decreasefontsize" value="A-"> <input type="button" prompttext="font name?" cmdvalue="promptUser" id="fontname" value="font-family"> <input type="button" prompttext="font size?" cmdvalue="promptUser" id="FontSize" value="font-size"> <input type="button" id="subscript" value="<sub>"> <input type="button" id="superscript" value="<sup>"> <span class="separator">|</span> text-align: <input type="button" id="justifyleft" value="left"> <input type="button" id="justifyright" value="right"> <input type="button" id="justifycenter" value="center"> <input type="button" id="justifyfull" value="justify"> <span class="separator">|</span> <input type="button" id="insertorderedlist" value="<ol>"> <input type="button" id="insertunorderedlist" value="<ul>"> <input type="button" id="insertparagraph" value="<p>"> <input type="button" prompttext="Valid HTML snippet" cmdvalue="promptUser" id="inserthtml" value="html"> <span class="separator">|</span> <input type="button" prompttext="Which block? (Header or paragraph)" cmdvalue="promptUser" id="formatblock" value="formatblock"> <input type="button" prompttext="Which header?" cmdvalue="promptUser" id="heading" value="heading"> <input type="button" id="indent" value="indent"> <input type="button" id="outdent" value="outdent"> <span class="separator">|</span> <input type="button" id="contentreadonly" value="readonly"> <input type="button" id="delete" value="del"> <input type="button" id="unlink" value="unlink"> </form> <iframe src="testpage.html" id="test"> <html xmlns="http://www.w3.org/1999/xhtml"><head> <title>contentEditable</title> <link type="text/css" href="/quirksmode.css" rel="stylesheet"> <link type="text/css" href="/blogs.css" rel="stylesheet"> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <script src="contentEditable.js" type="text/javascript"> window.onload = function () { if (self.initButtons) initButtons(); document.designMode = 'On'; // Moz, Op, Saf document.body.contentEditable = true; // Op, IE, Saf /* document.execCommand("styleWithCSS",false,false); */ // makes Moz use tags instead of style } function inBetween(command,bool,value) { /* var enabled = document.queryCommandSupported(command); if (!enabled) { alert('Command not available'); return false; } */ var returnValue = document.execCommand(command,bool,value); if (returnValue) return returnValue; } </script> <style> body { margin-left: 0; } div#header { top: 0; position: absolute; padding-left: 0; } span#cursor { display: inline-block; display: -moz-inline-box; width: 2px; background-color: #000000; } </style> </head> <body contenteditable="true"> <div id="testElement" class="entry"> <p class="dateline smaller"> 3 April 2007</p> <h4 id="entry1196"><a class="external" href="http://radar.oreilly.com/archives/2007/03/call_for_a_blog_1.html">Call for a Blogger's Code of Conduct</a></h4> <p>Tim O'Reilly calls for a Blogger Code of Conduct. His proposals are:</p> <p>An extra paragraph with a <br>break for testing purposes.</p> <ol> <li>Take responsibility not just for your own words, but for the comments you allow on your blog.</li> <li>Label your tolerance level for abusive comments.</li> <li>Consider eliminating anonymous comments.</li> <li>Ignore the trolls.</li> <li>Take the conversation offline, and talk directly, or find an intermediary who can do so.</li> <li>If you know someone who is behaving badly, tell them so.</li> <li>Don't say anything online that you wouldn't say in person.</li> </ol> <p>I find 1 interesting; I never thought of responsibility for comments, but it makes excellent sense. To me, 2 is something I decide in private, because I find it hard to articulate my exact tolerance, and it depends on my mood anyway. I implement 4 by deleting trolls.</p> <p class="smaller">(Via <a class="external" href="http://www.tbray.org/ongoing/">Tim Bray</a>.)</p> <p class="smaller">Society</p> </div> </body></html> </iframe> <textarea id="writeroot"></textarea> <a href="/dom/execCommand.html">Compatibility table</a><br> Undo/Redo doesn't work in IE. The problem is that the changes in the textarea to the right are also added to the Undo/Redo stack. There will be no textarea in the final version, so it's not necessary to solve the problem. </body></html> </pre> <pre> Function FTPUpload(sSite, sUsername, sPassword, sLocalFile, sRemotePath) 'This script is provided under the Creative Commons license located 'at http://creativecommons.org/licenses/by-nc/2.5/ . It may not 'be used for commercial purposes with out the expressed written consent 'of NateRice.com Const OpenAsDefault = -2 Const FailIfNotExist = 0 Const ForReading = 1 Const ForWriting = 2 Set oFTPScriptFSO = CreateObject("Scripting.FileSystemObject") Set oFTPScriptShell = CreateObject("WScript.Shell") sRemotePath = Trim(sRemotePath) sLocalFile = Trim(sLocalFile) '----------Path Checks--------- 'Here we willcheck the path, if it contains 'spaces then we need to add quotes to ensure 'it parses correctly. If InStr(sRemotePath, " ") > 0 Then If Left(sRemotePath, 1) <> """" And Right(sRemotePath, 1) <> """" Then sRemotePath = """" & sRemotePath & """" End If End If If InStr(sLocalFile, " ") > 0 Then If Left(sLocalFile, 1) <> """" And Right(sLocalFile, 1) <> """" Then sLocalFile = """" & sLocalFile & """" End If End If 'Check to ensure that a remote path was 'passed. If it's blank then pass a "\" If Len(sRemotePath) = 0 Then 'Please note that no premptive checking of the 'remote path is done. If it does not exist for some 'reason. Unexpected results may occur. sRemotePath = "\" End If 'Check the local path and file to ensure 'that either the a file that exists was 'passed or a wildcard was passed. If InStr(sLocalFile, "*") Then If InStr(sLocalFile, " ") Then FTPUpload = "Error: Wildcard uploads do not work if the path contains a " & _ "space." & vbCRLF FTPUpload = FTPUpload & "This is a limitation of the Microsoft FTP client." Exit Function End If ElseIf Len(sLocalFile) = 0 Or Not oFTPScriptFSO.FileExists(sLocalFile) Then 'nothing to upload FTPUpload = "Error: File Not Found." Exit Function End If '--------END Path Checks--------- 'build input file for ftp command sFTPScript = sFTPScript & "USER " & sUsername & vbCRLF sFTPScript = sFTPScript & sPassword & vbCRLF sFTPScript = sFTPScript & "cd " & sRemotePath & vbCRLF sFTPScript = sFTPScript & "binary" & vbCRLF sFTPScript = sFTPScript & "prompt n" & vbCRLF sFTPScript = sFTPScript & "put " & sLocalFile & vbCRLF sFTPScript = sFTPScript & "quit" & vbCRLF & "quit" & vbCRLF & "quit" & vbCRLF sFTPTemp = oFTPScriptShell.ExpandEnvironmentStrings("%TEMP%") sFTPTempFile = sFTPTemp & "\" & oFTPScriptFSO.GetTempName sFTPResults = sFTPTemp & "\" & oFTPScriptFSO.GetTempName 'Write the input file for the ftp command 'to a temporary file. Set fFTPScript = oFTPScriptFSO.CreateTextFile(sFTPTempFile, True) fFTPScript.WriteLine(sFTPScript) fFTPScript.Close Set fFTPScript = Nothing oFTPScriptShell.Run "%comspec% /c FTP -n -s:" & sFTPTempFile & " " & sSite & _ " > " & sFTPResults, 0, TRUE Wscript.Sleep 1000 'Check results of transfer. Set fFTPResults = oFTPScriptFSO.OpenTextFile(sFTPResults, ForReading, _ FailIfNotExist, OpenAsDefault) sResults = fFTPResults.ReadAll fFTPResults.Close oFTPScriptFSO.DeleteFile(sFTPTempFile) oFTPScriptFSO.DeleteFile (sFTPResults) If InStr(sResults, "226 Transfer complete.") > 0 Then FTPUpload = True ElseIf InStr(sResults, "File not found") > 0 Then FTPUpload = "Error: File Not Found" ElseIf InStr(sResults, "cannot log in.") > 0 Then FTPUpload = "Error: Login Failed." Else FTPUpload = "Error: Unknown." End If Set oFTPScriptFSO = Nothing Set oFTPScriptShell = Nothing End Function </pre> ---- Back to [[Main_Page|Main Page]]
Return to
Programming
.
Personal tools
Log in / create account
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
Actions
Search
Navigation
Main page
Community portal
Current events
Recent changes
Random page
Help
Toolbox
What links here
Related changes
Special pages