Object hyperlinking - Wikipedia, the free encyclopedia

By Unknown |

Cool Stuff: REF Wikipedia

Object hyperlinking - Wikipedia, the free encyclopedia

System components

Linking an object or a location to the Internet is a more involved process than linking two web pages. An object hyperlinking system requires seven components -

Components of an object hyperlinking scheme
  1. A physical or virtual tag to identify objects and locations. Some tagging systems are described below. To allow the smaller physical tags to be located they must be embedded in visual markers. For example, the Yellow arrow scheme [see below] prints SMS tags on large adhesive yellow arrows, which can then be stuck on buildings etc.
  2. A means of reading physical tags, or locating virtual tags.
  3. A mobile device such as a mobile telephone, a PDA or a portable computer.
  4. Additional software for the mobile device.
  5. A digital wide area wireless network, such as the existing 2G and 3G networks, for communication between the portable device and the server containing the information linked to the tagged object.
  6. Information on each linked object. This information could be in existing WWW pages, existing databases of price information etc, or have been specially created.
  7. A display to view the information on the linked object. At the present time this is most likely to be the screen of a mobile telephone.


Tags and tag readings systems

Google Wave

By Unknown |

I got my invite today for Google Wave. Really neat! I have only gotten a couple of invites out that have resulted in people coming on. Anyway I already have a pretty good concept of the first couple of test uses for the product. First I know I need to plan next years vacation with my wife, so I was happy to find trippy available for the first post.


Also I will be using the wave to coordinate with one of my fellow webmasters in managing a couple of the sites I manage. I will have to pace myself with any kind of development load since I am currently working on some code review for Google Chromium OS and am still doing dev work for AutoClerk.

a New Keyboard

By Unknown |

I was hanging around today and thinking about the qwerty problem. This mechanism was put in place to prevent typewriter jams, not much of a concern today. Today I propose a solution to the problem that enables to users used to the old way but flexibility for those living on the edge and creating the boundary. Each key or the entire keyboard surface is an LED touch interface. I prefer the first option to account for the tactile feel of pushing a key. Anyway the keys themselves are programmable and the led on the key will represent its new key assignment. This would allow users interested in creating a vowel break system or different layout without requiring a great deal of expenditure. If the software for this were released as an open source project with the purpose of devising the most effective keyboard implementation for future word input interfaces, we could expect to devise a more efficient system in just a few weeks and potentially affirm a new industry standard within a year.

Google Chrome OS and the Future of the Computing Experience

By Unknown | Labels: ,

I have the bug. It took me in the early evening and carried me through the next few days of heated investigation and discovery. Bouts of doubt and contemplation dotted a vast plain of consumption and digestion. Google had released its much awaited and touted open source project Chromium OS.

First I got my VirtualBox fired up and installed the image from gdgt and poked around feverishly to see what it was, what it does, and maybe most importantly why. This last point caught me unprepared. This was not my computing experience, this was not something I would use in 80% of my computer work as it is right now. I am a programmer, web application developer, graphic designer... how was I going to take advantage of this experience.

The reviewers had posted opinions ranging from the utopian to the disgusted. I was left baffled, reaching in the dark for answers and being forced to evaluate myself and my reliance on the PC experience of yore. What I soon discovered is that this was exactly what I had been wanting; for every other user in the world. It became clear to me that there has been a class based society sitting on the PC world from the beginning and google chrome set the lords and the vassals distinctly apart.

This new paradigm, the browsing experience model was brilliant for users eager to consume web applications, social networks and content. This is the PC for the masses. It is light, fast, and secure. You don't have to know what you don't know to stay protected and connected. This changes everything.

And where chrome is the village for the peasantry, the classic PC will become the Castles of the Land Owners. I see now a change for we the developers, the content providers, the makers of worlds that I have hoped for all my life. Where chrome lives on the cloud, the classic PC will become the cloud. The desktop PC must evolve into the server, the broadband connection no longer relegated to downloading but to serving up our constructions.

In turn this will result in services offering desktop like access to our castles via the chrome interface. Development will be done remotely on thin clients and compiled and published from any access point. Local will become a geographical statement once again and data will become simultaneously free and contained.

One immediately recognized reality is that linux is more suited for this transition than either Mac or Windows. The playing field will be leveled by this. Power users and creators will still get the castle of their preference, but they will act as beacons of power and community for the satellite chromebooks.

I also noted the number of people arguing against chrome for its absence of desktop applications, some for their graphics applications (photoshop), others for their business software. I use aviary.com now for most of my graphics work, and it works beautifully on chrome (though the screen resolution could do with a boost). Business software has been evolving rapidly online with big hitters like salesforce.com and microsoft bringing their applications to the ASP space. Maybe I am blind but I don't see the argument as very valid.

For me as a web application developer, the future is bright.

DNN User Merge for Multiple Portals

By Unknown | Labels: , , , ,


My boss was hounding me about why he had to have multiple usernames for our different DNN portals (we have one for Customer Support, one for Sales and one for Intranet purposes). By default DNN didn't allow me to create users for those portals with identical user names. So after playing with the data a bit I figured out a way and wanted to share it with you and keep it here in case I need to do it again and forget how.

First we need to understand the fundamental underpinnings of the Users structure inside the database. We will be using the Host SQL tab to perform data manipulation so make sure you have the database backed up before attempting these hacks.

So User permissions are basically set in three tables:

  1. Users
  2. UserPortals
  3. UserRoles
These are all important tables to keep consistent. So lets say you have user 'foo' in the Users table, his record would be something like this:

UserIDUsernameFirstNameLastNameIsSuperUserAffiliateIdEmailDisplayNameUpdatePassword
1fooFooBar
foo@bar.comFoo Bar

You could get access to this record to see it in this state by passing the SQL query:

SELECT * FROM Users WHERE Username = 'foo'


So now lets say that you have another portal where foo also needs access and you have set him up another user for that portal called foo2:

UserIDUsernameFirstNameLastNameIsSuperUserAffiliateIdEmailDisplayNameUpdatePassword
1fooFooBar foo@bar.comFoo Bar
2
foo2FooBar foo@bar.comFoo Bar

As you can see these are essentially identical users but DNN will not let you log into portal 1 with user 2 or into portal 2 with user 1. The secret here is UserPortals. First determine what user is assigned to which portal. To do this will use the SQL statement:

SELECT * FROM Users INNER JOIN UserPortals ON Users.UserID = UserPortals.UserID WHERE Email = 'foo@bar.com'


Now notice that since the usernames are not the same, the ticket was to use a field where they match and since email is the usual suspect I decided to use that. The results of that query would look something like this:

UserIDUsernameFirstNameLastNameIsSuperUserAffiliateIdEmailDisplayNameUpdatePasswordUserId1PortalIdUserPortalIdCreatedDateAuthorised
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM
6foo2FooBar foo@bar.comFoo Bar64511/11/2009 9:56:05 PM

Ok so now we know which portals are for which user, next lets also get the roles, because the roles are different for each portal. So we add to the above SQL statement:

SELECT * FROM Users INNER JOIN UserPortals ON Users.UserID = UserPortals.UserID INNER JOIN UserRoles ON Users.UserID = UserRoles.UserID WHERE Email = 'foo@bar.com'


Which yields us:

UserIDUsernameFirstNameLastNameIsSuperUserAffiliateIdEmailDisplayNameUpdatePasswordUserId1PortalIdUserPortalIdCreatedDateAuthorisedUserRoleIDUserID2RoleIDExpiryDateIsTrialUsedEffectiveDate
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM957
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM1058
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM1156
6foo2FooBar foo@bar.comFoo Bar64511/11/2009 9:56:05 PM12610
6foo2FooBar foo@bar.comFoo Bar64511/11/2009 9:56:05 PM13611
6foo2FooBar foo@bar.comFoo Bar64511/11/2009 9:56:05 PM1469

Ok so there is a lot going on now. Clearly these users are both administrators of their respective sites, now we just need to trim it down to one user, we will use UserID 5 since that is 'foo'. The SQL statement for this would be:

UPDATE UserPortals SET UserID = 5 WHERE UserID = 6;
UPDATE UserRoles Set UserID = 5 WHERE UserID = 6;
DELETE FROM Users WHERE UserID = 6;
SELECT * FROM Users INNER JOIN UserPortals ON Users.UserID = UserPortals.UserID INNER JOIN UserRoles ON Users.UserID = UserRoles.UserID WHERE Email = 'foo@bar.com'


This yields us the following result:

UserIDUsernameFirstNameLastNameIsSuperUserAffiliateIdEmailDisplayNameUpdatePasswordUserId1PortalIdUserPortalIdCreatedDateAuthorisedUserRoleIDUserID2RoleIDExpiryDateIsTrialUsedEffectiveDate
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM957
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM957
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM1058
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM1058
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM1156
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM1156
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM12510
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM12510
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM13511
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM13511
5fooFooBar foo@bar.comFoo Bar53411/11/2009 9:54:51 PM1459
5fooFooBar foo@bar.comFoo Bar54511/11/2009 9:56:05 PM1459

as you can see, user foo2 has been deleted entirely and if you log into either site with foo you will have the permissions of foo and foo2 from before the hack.

Hope this helps some people out there make sense of their DNN user issues.

Force javascript to run AFTER a DotNetNuke page is fully loaded

By Unknown | Labels: , , ,

REF

Here's the helper function courtesy of Simon Willison:


function addLoadEvent(func)
{ var oldonload = window.onload;
if (typeof window.onload != 'function')
{ window.onload = func; }
else
{ window.onload = function()
{ oldonload();
func();
}
}
}

To use the helper, call it with the name of our target function:

addLoadEvent(msgPgLoaded);


Now our 'msgPgLoaded' function will not fire until the page is fully loaded. Perfect!

Can I Combine Multiple Text Files Using a Script?

By Unknown | Labels: , , ,

REF


Const ForReading = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objOutputFile = objFSO.CreateTextFile("output.txt")

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set FileList = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_Directory.Name='C:\Logs'} Where " _
& "ResultClass = CIM_DataFile")

For Each objFile In FileList
Set objTextFile = objFSO.OpenTextFile(objFile.Name, ForReading)
strText = objTextFile.ReadAll
objTextFile.Close
objOutputFile.WriteLine strText
Next

objOutputFile.Close

Connecting to WMI on a Remote Computer

By Unknown | Labels: , , , ,

From REF


' Full Computer Name
' can be found by right-clicking My Computer,
' then click Properties, then click the Computer Name tab)
' or use the computer's IP address
strComputer = "FullComputerName"
strDomain = "DOMAIN"
Wscript.StdOut.Write "Please enter your user name:"
strUser = Wscript.StdIn.ReadLine
Set objPassword = CreateObject("ScriptPW.Password")
Wscript.StdOut.Write "Please enter your password:"
strPassword = objPassword.GetPassword()

Set objSWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objSWbemServices = objSWbemLocator.ConnectServer(strComputer, _
"root\cimv2", _
strUser, _
strPassword, _
"MS_409", _
"ntlmdomain:" + strDomain)
Set colSwbemObjectSet = _
objSWbemServices.ExecQuery("Select * From Win32_Process")
For Each objProcess in colSWbemObjectSet
Wscript.Echo "Process Name: " & objProcess.Name
Next

How do I decode an encoded URL?

By Unknown | Labels: , , ,

Sniped from REF


Function URLDecode(str)
str = Replace(str, "+", " ")
For i = 1 To Len(str)
sT = Mid(str, i, 1)
If sT = "%" Then
If i+2 < Len(str) Then
sR = sR & _
Chr(CLng("&H" & Mid(str, i+1, 2)))
i = i+2
End If
Else
sR = sR & sT
End If
Next
URLDecode = sR
End Function

VBScript Environment Variables

By Unknown | Labels: , , , , ,

Jerold SchulmanREF


Set oShell = CreateObject( "WScript.Shell" )
user=oShell.ExpandEnvironmentStrings("%UserName%")
comp=oShell.ExpandEnvironmentStrings("%ComputerName%")
WScript.Echo user & " " & comp

How can VBScript create multiple folders in a path, like the MkDir command?

By Unknown | Labels: , , , ,

This is a repost of Jerold Schulman's article on Windowsitpro.com: REF

MakeDir.vbs contains:


dim objArguments, Obj
Set objArguments = Wscript.Arguments
If WScript.Arguments.Count = 0 then
Wscript.Echo "Syntax: cscript //nologo MakeDir.vbs FolderPath"
Wscript.Quit
End If
Obj = objArguments(0)
X = MakeDir(Obj)
Wscript.Quit
Function MakeDir (strPath)
Dim strParentPath, objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
strParentPath = objFSO.GetParentFolderName(strPath)

If Not objFSO.FolderExists(strParentPath) Then MakeDir strParentPath
If Not objFSO.FolderExists(strPath) Then objFSO.CreateFolder strPath
On Error Goto 0
MakeDir = objFSO.FolderExists(strPath)
End Function

VBScript... Err codes and meanings

By Unknown | Labels: , , , , ,

I have compiled a list of the numbers and description of possible VBScript Error codes so I can use them later for more accurate error handling.

5: Invalid procedure call or argument
6: Overflow
7: Out of memory
9: Subscript out of range
10: This array is fixed or temporarily locked
11: Division by zero
13: Type mismatch
14: Out of string space
17: Can't perform requested operation
28: Out of stack space
35: Sub or Function not defined
48: Error in loading DLL
51: Internal error
52: Bad file name or number
53: File not found
54: Bad file mode
55: File already open
57: Device I/O error
58: File already exists
61: Disk full
62: Input past end of file
67: Too many files
68: Device unavailable
70: Permission denied
71: Disk not ready
74: Can't rename with different drive
75: Path/File access error
76: Path not found
91: Object variable not set
92: For loop not initialized
94: Invalid use of Null
322: Can't create necessary temporary file
424: Object required
429: ActiveX component can't create object
430: Class doesn't support Automation
432: File name or class name not found during Automation operation
438: Object doesn't support this property or method
440: Automation error
445: Object doesn't support this action
446: Object doesn't support named arguments
447: Object doesn't support current locale setting
448: Named argument not found
449: Argument not optional
450: Wrong number of arguments or invalid property assignment
451: Object not a collection
453: Specified DLL function not found
455: Code resource lock error
457: This key is already associated with an element of this collection
458: Variable uses an Automation type not supported in VBScript
462: The remote server machine does not exist or is unavailable
481: Invalid picture
500: Variable is undefined
501: Illegal assignment
502: Object not safe for scripting
503: Object not safe for initializing
504: Object not safe for creating
505: Invalid or unqualified reference
506: Class not defined
507: An exception occurred
1001: Out of memory
1002: Syntax error
1003: Expected ':'
1005: Expected '('
1006: Expected ')'
1007: Expected ']'
1010: Expected identifier
1011: Expected '='
1012: Expected 'If'
1013: Expected 'To'
1014: Expected 'End'
1015: Expected 'Function'
1016: Expected 'Sub'
1017: Expected 'Then'
1018: Expected 'Wend'
1019: Expected 'Loop'
1020: Expected 'Next'
1021: Expected 'Case'
1022: Expected 'Select'
1023: Expected expression
1024: Expected statement
1025: Expected end of statement
1026: Expected integer constant
1027: Expected 'While' or 'Until'
1028: Expected 'While', 'Until' or end of statement
1029: Expected 'With'
1030: Identifier too long
1031: Invalid number
1032: Invalid character
1033: Unterminated string constant
1034: Unterminated comment
1037: Invalid use of 'Me' keyword
1038: 'loop' without 'do'
1039: Invalid 'exit' statement
1040: Invalid 'for' loop control variable
1041: Name redefined
1042: Must be first statement on the line
1043: Cannot assign to non-ByVal argument
1044: Cannot use parentheses when calling a Sub
1045: Expected literal constant
1046: Expected 'In'
1047: Expected 'Class'
1048: Must be defined inside a Class
1049: Expected Let or Set or Get in property declaration
1050: Expected 'Property'
1051: Number of arguments must be consistent across properties specification
1052: Cannot have multiple default property/method in a Class
1053: Class initialize or terminate do not have arguments
1054: Property set or let must have at least one argument
1055: Unexpected 'Next'
1056: 'Default' can be specified only on 'Property' or 'Function' or 'Sub'
1057: 'Default' specification must also specify 'Public'
1058: 'Default' specification can only be on Property Get
4096: Microsoft VBScript compilation error
4097: Microsoft VBScript runtime error
5016: Regular Expression object expected
5017: Syntax error in regular expression
5018: Unexpected quantifier
5019: Expected ']' in regular expression
5020: Expected ')' in regular expression
5021: Invalid range in character set
30000: EN
32766: True
32767: False
32768: OK
32769: Cancel
32770: Help
32811: Element not found
32812: The specified date is not available in the current locale's calendar
I wrote a script to produce this list, it can be run from command line as

errout.vbs [count] [fileoutput]

count is the highest error you want to check (I verified up to 40000) and fileoutput is where you want the values stored on disk. The file will be overwritten so careful.

errout.vbs:

On Error Resume Next

Dim args : Set args = WScript.Arguments
Dim count : count = args(0)
Dim flout : flout = args(1)
Dim strValue : strValue = ""
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objTXT : Set objTXT = objFSO.CreateTextFile(flout, True)
Dim i : i = 0

For i = 1 to count
strValue = ""
Err.Raise i
If Not Err.Description = "Unknown runtime error" Then
strValue = Err.Number & ": " & Err.Description
objTXT.WriteLine strValue
End If
Err.Clear
Next

objTXT.Close
Set objTXT = Nothing
Set objFSO = Nothing