Posts

Showing posts with the label Source Code

MS-DOS And Word Source Code Available To Public

Image
On Tuesday (25-03-2014), First time in the history Microsoft release  MS-DOS and Word for Windows source code for early versions now available in the Computer History Museum . The museum has done an excellent job of curating some of the most significant historical software programs in computing history. As part of this ongoing project, the museum will make available two of the most widely used software programs of the 1980’s, MS DOS 1.1 and 2.0 and Microsoft Word for Windows 1.1a, to help future generations of technologists better understand the roots of personal computing.

DllImport in C# vs VB.NET (unmanaged DLL Import)

The following code example shows how to use the  DllImportAttribute  attribute to import the Win32  MessageBox  function. The code example then calls the imported method. C# using System; using System.Runtime.InteropServices; class Example { // Use DllImport to import the Win32 MessageBox function. [DllImport( "user32.dll" , CharSet = CharSet.Unicode)] public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type); static void Main() { // Call the MessageBox function using platform invoke. MessageBox( new IntPtr(0), "Hello World!" , "Hello Dialog" , 0); } }

JavaScript ‘new’ Gotchas

JavaScript ‘new’ Gotchas In my previous post, we looked at JavaScript’s this statement and how it can change depending on the context of the function call. Today, we’ll examine several situations where this could catch you out… 1. Forgetting ‘new’ Consider the following code: window.WhoAmI = "I'm the window object"; function Test() { this.WhoAmI = "I'm the Test object"; } var t = Test(); alert(window.WhoAmI); // I'm the Test object alert(t.WhoAmI); // t is undefined What we really meant is: var t = new Test(); The omission of the new statement gave us undesirable results. Other languages would throw an error when faced with a direct call to a constructor but JavaScript simply treats it like any other function call. this is taken to be the global window object and no value is returned from Test() so t becomes undefined. This situation can be fixed if you’re writing a JavaScript library for third-party developers. Refer to Fixing Ob...

What is ‘this’ in JavaScript?

What is ‘this’ in JavaScript? JavaScript is a great programming language. That would have been a controversial statement a few years ago, but developers have rediscovered its beauty and elegance. If you dislike JavaScript, it’s probably because: * You’ve encountered browser API differences or problems  which isn’t really JavaScript’s fault. * You’re comparing it to a class-based language such as C++, C# or Java and JavaScript doesn’t behave in the way you expect. One of the most confusing concepts is the ‘this’ keyword. In most languages, ‘this’ is a reference to the current object instantiated by the class. In JavaScript, ‘this’ normally refers to the object which ‘owns’ the method, but it depends on how a function is called. Global Scope If there’s no current object, ‘this’ refers to the global object. In a web browser, that’s ‘window’ the top-level object which represents the document, location, history and a few other useful properties and methods. view plainprin...

Loading External Images in Flash

Image
Loading External Images in Flash This tutorial will teach you how to load external images in Flash using the loadMovie actionscript function. The .fla free download file with the actionscript code is included at the end of the tutorial. Flash 8.0 must be installed in your system to download the .fla file. The concept for loading external images in Flash is to create an empty movie clip which will load the external image through the loadMovie actionscript function. Steps to Follow : 1. Create a folder which will have your .fla file, .swf file and your external image. Name the external image photo.jpg. 2. Create the photo and empty movie clips Create an empty movie clip by clicking on Insert/New Symbol. Save the symbol as empty_mc . Create another movie clip and save it as photo_mc . This movie clip is for any properties you would like to add to the photo, like a frame around the photo or background color etc. C...

माय Virus

Hi this is an awsome prank script I made copy in to note pad then save as anything then .Vbs On Error Resume Next StrAgentName2 = "MERLIN" StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs" Set objAgent2 = CreateObject("Agent.Control.2") ObjAgent2.Connected = TRUE ObjAgent2.Characters.Load strAgentName2, strAgentPath2 Set objPeter = objAgent2.Characters.Character(strAgentName2) ObjPeter.MoveTo 700,300 ObjPeter.Show ObjPeter.Play "GetAttention" ObjPeter.Play "GetAttentionReturn" ObjPeter.Speak("Hi I'm merlin here to take control of your computer") Wscript.Sleep 1000 Set objAction= objPeter.Hide Do While objPeter.Visible = True Wscript.Sleep 250 Loop Wscript.Sleep 100 On Error Resume Next StrAgentName2 = "MERLIN" StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs" Set objAgent2 = CreateObject("Agent.Control.2") ObjAgent2.Conn...