yesJames.com
ahuh… sure… what ever you say…


howto: Format numbers in JavaScript

Posted in JavaScript,programming,Software by james on November 19th, 2008

Formatting Numbers

Numeric formatting in JavaScript can be very tedious. From handling non-numeric characters, to multiple-currency symbols, to alternate negative display methods. The functions below should be valuable in assisting to format numbers and currencies of all types.

(more…)

Delphi: Minimising child forms in an SDI application

Posted in Delphi,programming,Software by james on November 19th, 2008

In an SDI application (Single Document Interface), the main form acs as the “container” for the entire application. This means that child forms, are exactly that – children of the application. The long and short of which, means that when you minimise the main form of the application, all forms are hidden. In addition to which, when you minimise a child form of the application, it doesn’t minimise to the task bar, instead it minimises to the application desktop. This also has the side effect that only the main application form itself has a task bar button.

So, How do I change this behaviour?

(more…)

Enabling Remote Desktop access… remotely

Posted in Software by james on November 19th, 2008

Firstly you can edit the Registry of the remote machine by hand:

Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server on the remote machine, and find the key: fDenyTSConnections
If it doesn’t exist create it, then set it’s value to “0″.

Alternatively you can use the following batch file to do the job for you.
Note: You must be logged into your computer with credentials that allow you to remotely edit the Registry of the machine in question, otherwise the batch file will fail.

syntax: EnableRemoteDesktop.bat RemotePC
NB: This batch file must be run under Windows XP

Save the following to a file named EnableRemoteDesktop.bat

@echo off
setlocal
if {%1}=={} goto syntax

:loop
if {%1}=={} goto finish
set remote="\\%1\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"
shift
reg.exe ADD %remote% /v fDenyTSConnections /t REG_DWORD /d 0 /f>nul 2>&1
if NOT %ERRORLEVEL% EQU 0 @echo %remote% NOT found.
goto loop

:syntax
@echo Syntax: RemoteDesktop Computer1 [Computer2 .... Computern]
goto loop

:finish
endlocal

LightBlubs

Posted in Interesting by james on November 14th, 2008

Yes, you read it right… LightBlubs.

I found this talented young designer named Pieke Bergmans (from the Netherlands) work online and was immediately captivated by her stuff!. She’s done a lot of 3D, industrial and product design, and holds the philosophy that every product ever produced should be different, just like all of us…

Have a look here, and enjoy her work!

Bubbles on-air

Posted in creative,Writing by james on October 10th, 2008

Well, as awesome as community radio is, I think 3WBC got a few extra listeners today thanks to the creative efforts of a few of Melbourne’s favourite RedBubblers.

Kristy Lee (aka Miss Kristy), Lisa German and Chanel2, were all invited to read some of their creative writing and poetry on-air today. They did a great job, and for those of you who missed it, you can listen right here:

Part 1: LisaG – Memories
Memories

Part 2: Chanel2 – Man Eyes
Man Eyes

Part 3: Miss Kristy – Artist
Artist

Part 4: LisaG – My Superhero
My Superhero

Part 5: Chanel2 – Gravity
Gravity

Part 6: Miss Kristy – Literary Misunderstood
Literary Misunderstood

Enjoy!

Hidden dialog box in Outlook 2007 problem

Posted in Software by james on September 15th, 2008

Microsoft post updates to all of thier applications on a regular basis. Almost all of them relate to security patches of some sort, some update functionality.

One of the more recent updates to Microsoft Office 2007 caused quite some trouble to some users, specifically when running Outlook (or Word etc.) for the first time as a new user on a given machine.

The problem manifests itself by not allowing the user to perform any operations inside the program, or exit the application. In Outlook, this means you can’t open an email, or pretty much anything else. The program won’t even exit. There’s one hint however – if you try and tun a second copy of the program, you get the error message: “A dialog box is open. Close it and try again.

As it turns out, this is hafll correct. There is in fact a dialogue box open. But it’s not visible to the user. The dialog box is the setup window that asks the user for their name and initials. Unfortunately as fast as the window appearsm it’s hidden again from the user.

It turns out, the problem is related to KB946983 (Outlook 2007 Update), so removing this patch corrects the functionality… It’s important to note though, that update does correct a security vulnerability in Outlook, and you may wish to re-apply the update after you’ve fixed the problem.

The second option to resolve this issue, is to run one of the other Office 2007 programs (e.g. Word), fill in the dialogue box, save the settings, exit both programs (You’ll probably have to end the “Outlook.exe” taks from the task manager), then re-start it all. This usually works, but some users have claimed this did not help, which may or may not be related to the order in which they do these things.

Hope this helps someone.

Ref: http://office-outlook.com/outlook-forum/index.php/m/282796/

Confessions…

Posted in Interesting by james on August 15th, 2008

This is a little GEM!

Think LowBrow… think sinful, sinical and sordid…

http://www.TrueOnlineConfessions.com

Enjoy!

JavaScript Trim() function

Posted in JavaScript,programming by james on March 20th, 2008

Trim(), is one function that we all use almost every day in most languages, whether it’s a core function of the language you’re using or a member (or prototype in JavaScript) function of the String object itself (as in C#), it’s invaluable for developers.

Unfortunately JavaScript doesn’t have this sort of thing built in, so here’s how to implement your own trim() functions (as well as ltrim() and rtrim()) in various ways depending on the level of backward compatibility you require.

(more…)

howto: GET a URL parameter in JavaScript

Posted in JavaScript,programming by james on February 11th, 2008

A useful little piece of JavaScript for retrieving a URL parameter (Query String) from your page. If a requested parameter doesn’t exist it will return an empty string rather than a NULL object. It will also handle the inclusion of anchor tags in the URL and exclude them from possible results.

e.g. http://www.yesjames.com/test.php?myparam=justatest
calling “gerURLParam(‘myparam’) will return “justatest”

function getURLParam(name) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var pattern = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp(pattern);
  var aResult = regex.exec(window.location.href);
  if ( aResult == null ) {
    return "";
  } else {
    return aResult[1];
  }
}

Left or Right

Posted in Interesting by james on October 10th, 2007

Brain TestDo you see the dancer turning clockwise or anti-clockwise?

If you see her turning clockwise, you’re a right-side-of-the-brain kind of person (and vice versa).

Most people see the image turning anti-clockwise. Though some people (if they can focus properly) can change the direction…

LEFT BRAIN FUNCTIONS

  • uses logic
  • detail oriented
  • facts rule
  • words and language
  • present and past
  • math and science
  • can comprehend
  • knowing
  • acknowledges
  • order/pattern perception
  • knows object name
  • reality based
  • forms strategies
  • practical
  • safe

RIGHT BRAIN FUNCTIONS

  • uses feeling
  • “big picture” oriented
  • imagination rules
  • symbols and images
  • present and future
  • philosophy & religion
  • can “get it” (i.e. meaning)
  • believes
  • appreciates
  • spatial perception
  • knows object function
  • fantasy based
  • presents possibilities
  • impetuous
  • risk taking

source: AAP

« Older EntriesNewer Entries »