Google Chromium OS – first impression

I thought that I’d have a quick look at Google Chromium OS. I’m not sure that it’s living up to the hype yet.

Where did I get it?
So far it’s only available as a VMware or Sun Virtual box download. I downloaded both the VMWare .vmdk file and the Sun Virtual box .vdi files from http://gdgt.com/. I had problems with my VMWare installation so I thought I’d try it in Sun Virtual Box. I’m running Sun Virtual Box on a Windows 7 64-bit host.

First impressions
The Sun Virtual Box image doesn’t boot properly and only boots to a black screen. Because Sun Virtual Box can support VMWare images, I thought that I’d try the .vmdk file. I noticed other posts which recommend configuring the network in “bridged mode” and running Virtual Box with administrator credentials. I did both of these things and Chromium booted first time. I was presented with a simple login screen.
At this point I entered my gmail account details. The image uses a US keyboard so the @ symbol is “Shift-2”.

After login you see a very simple browser screen with your Google mail and Google calendar tabs. Other tabs can be opened and it can be used as s simple browser. At the moment, I can’t see much value in it, but couple it with some nicer fonts and the ability to save/sync your Google Docs to the local hard disk of a laptop/netbook or USB key and it could have potential.

What’s the point?

Perhaps one use could be for students to all be issued with their own OS and Docs on a USB key, all Docs are backed up centrally, but they could take their key to any machine and boot from it to get the same locked-down experience wherever they work.

Alternatively, banks could issue secure keys for online banking containing an OS that can only access the bank’s online banking site. This could greatly reduce online account fraud by only granting access to web based banking to people who have a physical device (encrypted USB key), know the password for the key as well as the online account password.

Google Chromium screenshot

Using strstr in LoadRunner

Brought to you by Mark Sibley.

The following is an example of how you can use the standard C function [strstr] within a LoadRunner script as a means of searching through long strings of text for the occurrence of any matching string. It has two examples that demonstrate how to use the output to do one of two things depending on whatever it is you want it to do.

A sample script can be downloaded here.
STRSTR.zip

Action()
{

// This creates an integer I decided to call [occurrence] and gives it a value of zero
int occurrence = 0;

// This creates a long string of text and then stores it in a parameter I’ve called {sLongString}
// In a real script you wouldn’t need this as you’d be searching through text that you’d captured.
lr_save_string(“peter piper picked a peck of pickled peppers”,”sLongString”);

//**************************************************
// Example 1:
// This is searching for the occurrence of [Poland] anywhere within the parameter {sLongString}
occurrence = strstr(lr_eval_string(“{sLongString}”),”Poland”);
if(occurrence != 0)
{
lr_output_message(“1) The string was found”);
}
else
{
lr_output_message(“1) The string was NOT found”);
}
//**************************************************

//**************************************************
// Example 2:
// This is searching for the occurrence of [peck] anywhere within the parameter {sLongString}
occurrence = strstr(lr_eval_string(“{sLongString}”),”peck”);
if(occurrence != 0)
{
lr_output_message(“2) The string was found”);
}
else
{
lr_output_message(“2) The string was NOT found”);
}
//**************************************************

return 0;
}

LoadRunner C functions to convert the case of a captured string

This sample script, kindly provided by Mark Sibley shows how to change the case of a captured string.
Mark has written functions which change the case of a string to upper case, lower case or title case.

Either download the script, or paste the functions below into a LoadRunner script “as is” and then call them using the ConvertToUpper, ConvertToLower or ConvertToTitle functions.

For each function, the syntax is as follows.

ConvertToXXXX(“sINPUT”,”sOUTPUT”);
Where XXXX is Upper, Lower or Title
sINPUT is the name of the captured string.
sOUTPUT is the name of the new output string.

ConvertToUpper function
int ConvertToUpper(char * sInput, char * sNew)
{
sInput = (char *)strupr(sInput);
lr_save_string(sInput,sNew);
}

ConvertToLower function
int ConvertToLower(char * sInput, char * sNew)
{
sInput = (char *)strlwr(sInput);
lr_save_string(sInput,sNew);
}

ConvertToTitle function
int ConvertToTitle(char * sInput, char * sNew)
{
int i = 0, s = 0, l = 0;
char buf1[50];
char buf2[2];
char n;

// Copy a single character into the address of [n]
strncpy(&n,sInput+i,1);

// Copy the single character into buf2
sprintf(buf2,”%c”,n);

// Convert the contents of buf2 to uppercase
strupr(buf2);

// Overwrite the contents of buf1 with buf2
strcpy(buf1,buf2);

i++;
while(i < strlen(sInput))
{
// Overwrite buf2 with one character
strncpy(&n,sInput+i,1);
sprintf(buf2,”%c”,n);

// If the previous character was a space then make the current character upper case
if(s == 1){
strupr(buf2);
strcat(buf1,buf2);
s = 0;
}
// Otherwise convert to lower case and concatenate the current character into the string buf1
else{
strlwr(buf2);
strcat(buf1,buf2);
}

// If the current character is a space set the value of [s] to [1] so that the next character gets capitalised
if(strcmp(” “,buf2)==0)
{
s = 1;
}
i++;
}
lr_save_string(buf1,sNew);
}

 

More sample scripts are avaiable at my GitHub library – https://github.com/richardbishop/LoadRunnerSamples