#{TiggrBitz}

.NET and Technology bitz in the key of Tiggr

Wednesday, September 28, 2005

Undocumented C# Types and Keywordsr

{#TIGGR} - Crossposted from http://www.eggheadcafe.com/articles/20030114.asp

Undocumented C# Types and Keywords: "Undocumented C# Types and Keywords
By Peter A. Bromberg, Ph.D.
Printer - Friendly Version Peter Bromberg

The C# language has a few interesting and undocumented (or in some cases, poorly so) Types and Keywords. One interesting set that I came across recently is the TypedReference type. This represents data by containing both a reference to its location in memory as well as a runtime representation of the type of the data.

Only local variables and parameters can be of the TypedReference type - fields cannot be. The TypedReference type, as you would guess from the above description, is not CLS complaint and the undocumented keywords that go with it appear nowhere in the ECMA C# Specification.

__makeref : You can create a typed reference from a variable by using the __makeref keyword:

int i = 21;
TypedReference tr = __makeref(i);

The original type of the variable represented by the typed reference can be extracted using the __reftype keyword:

int i = 32;
TypedReference tr1=__makeref(i);
Type t= __reftype(tr1);
Response.Write( t.ToString());

__refvalue: Lastly, the value can be extracted from the TypedReference using the __refvalue kyeword:

int q = __refvalue(tr, int);

Typed references come in handy when you want to represent method arguments in variable argument lists (varargs). These argument lists (in a manner similar to the params keyword) can be passed into methods and accessed with the also undocumented __arglist keyword:





The C# language has a few interesting and undocumented (or in some cases, poorly so) Types and Keywords. One interesting set that I came across recently is the TypedReference type. This represents data by containing both a reference to its location in memory as well as a runtime representation of the type of the data.

Only local variables and parameters can be of the TypedReference type - fields cannot be. The TypedReference type, as you would guess from the above description, is not CLS complaint and the undocumented keywords that go with it appear nowhere in the ECMA C# Specification.

__makeref : You can create a typed reference from a variable by using the __makeref keyword:

int i = 21;
TypedReference tr = __makeref(i);

The original type of the variable represented by the typed reference can be extracted using the __reftype keyword:

int i = 32;
TypedReference tr1=__makeref(i);
Type t= __reftype(tr1);
Response.Write( t.ToString());

__refvalue: Lastly, the value can be extracted from the TypedReference using the __refvalue kyeword:

int q = __refvalue(tr, int);

Typed references come in handy when you want to represent method arguments in variable argument lists (varargs). These argument lists (in a manner similar to the params keyword) can be passed into methods and accessed with the also undocumented __arglist keyword:



Curious users should note that since the above code examples use undocumented keywords, they aren't guaranteed to work in future versions of C#. The params keyword is, of course documented and you can accomplish a similar task using it. I found at least one tech-talk sponsored by Microsoft where a user asked about whether MS planned to document any of these. The answer was "Why should we?". Go figure....

Thursday, September 01, 2005

Bitkraft takes another step forward - No Base Class Required!

Due to overwhelming popular demand for Bitkraft to become compatible with other frameworks such as DotNetNuke, the requirement to inherit from the PageTemplate, UserControlTemplate and ControlTemplate base classes! This means that you can use Bitkraft functionality on normal ASP.NET pages and in other frameworks such as DNN Portals, Modules and User Controls!..

click here! to go straight to the new No Inheritance Demonstration!

Wednesday, August 24, 2005

Bitkraft - An "AJAX" Library for .NET with a difference

What is Bitkraft?

Bitkraft is a CLR based (.NET) web framework that allows distributed web content to be created and served in a unique fashion. It is written in C# and compiles for operation under the Microsoft .NET Framework 1.1+ or the .Mono Framework, making it portable to almost any platform.

At it's core, the Bitkraft framework extends the ASP .NET Architecture to fully support Javascript-based Server callbacks using the XmlHttpRequest object as a transport layer in a fashion referred commonly today as AJAX (Asynchronous Javascript Over XmlHttpRequest). There are many "AJAX" fameworks available today however, the Bitkraft framework is unique in the way that it seeks to blur the lines between client (browser) and server and the manner that it allows the development of truly Smart Web-Based applications that intelligently distribute their functionality between Client and Server in a seamless manner.

Indeed, Bitkraft deliberately tries not to describe it's technology as "AJAX" based because of the connotation of the use of XML (a'la SOAP/Webservices). Bitkraft does NOT use XML, instead JSON (JavaScript Object Notation) is used as the main transport for communications between client and server. Using JSON as opposed to XML for message formatting produces a lighter-weight message and also has the advantage of being a native format that can be accessed as a real object by most modern clients (browsers). the Bitkraft framework translates CLR Types directly to and from the JSON format resulting in objects that behave and appear the same both at the client and at the server.

The Bitkraft framework allows web content to be developed in a single environment and promotes the distribution of functionality between the client and the server. It allows objects to be created that behave predictably regardless of whether the implementation is being run at the client or at the server and allows objects to expose methods that are implemented either on the client or on the server without re-posting or rendering page content. This approach reduces the size and quantity of round-trips to the server, updating the content provided on a single page by requesting it on-demand from the server instead of relying on full -page re-posts and re-rendering of complete pages.

The end result?.....

  • Web content that is dynamic and fast!
  • A way of developing web content that hides the complexity of communicating between client and server from both the developer and the user.
  • A whole new breed of web applications that run inside the ever-popular and familiar Web Browser but break away from the mould of traditional a "Network Of Pages".
  • Not just Web Pages but real Web Applications.
  • Simply; a smarter web framework.
CHECK OUT THE BITKRAFT FRAMEWORK HERE!

Monday, August 22, 2005

Herald Sun: Laptops spark sale stampede [18aug05]

Herald Sun: Laptops spark sale stampede [18aug05]: "Laptops spark sale stampede

18aug05

VIRGINIA -- A rush to buy $US50 used laptops turned into a violent stampede yesterday, with people being thrown to the pavement and beaten with a folding chair.

One woman wet herself rather than surrender her place in line.

An estimated 5500 people turned out at the Richmond International Raceway in Henico County in hopes of getting their hands on four-year-old Apple iBooks, which sell for $1300 to $1690 new.

Henico public schools were selling 1000 of the computers to residents.

When the gates opened at 7am, people threw themselves forward, screaming and pushing.

Seventeen people suffered minor injuries, with four requiring hospital treatment, police said"

Thursday, August 11, 2005

DOS Ain't Done til Lotus Won't Run?

{#TIGGR} - I Cite the following article as an excellent read on the on-going M$-AntiTrust/AntiCompetative Trade Practices topic... for those of you familiar with my tack on this subject, you will note that despite my personal Anti-Monopo$oft track, this is an article from the Pro-M$ persepctive .....NOTE THe EXCELLENT conversation that follows from the Anti-M$ crowd though, some EXCELLENT POINTS!


Proudly Serving My Corporate Masters: DOS Ain't Done til Lotus Won't Run?: "August 01, 2005
DOS Ain't Done til Lotus Won't Run?
In response to the recent kerfuffle over Andrew Orlowski's claim on the Register that IE7 is deliberately disabling Yahoo! and Google's search toolbar, Robert Scoble's response, and the subsequent counter-claims and counter-counter-claims, Ed Bott posted this which included the following: 'The implication of Andrew's story is that Microsoft deliberately or negligently blocked IE7 from working with software from two rivals. It's the modern equivalent of the old 'DOS ain't done till Lotus won't run' canard. Which also wasn't true.'"

Thursday, August 04, 2005

Mozilla Goes Corporate to Build Market Share

{#TIGGR} - This Article Copied Verbatim from
Mozilla Goes Corporate to Build Market Share


"In an unexpected move, the nonprofit Mozilla Foundation on Wednesday announced that it was creating a for-profit subsidiary, the Mozilla Corporation, in order to more rapidly increase market share for its core product, the Firefox Web browser. Though the Mozilla Corporation will seek to make a profit, that won't be the primary goal of the company, Mozilla representatives say. Instead, the new company will help the Mozilla Foundation promote the use of open Web standards.

'We've done this to respond to the success and growing market-share of Mozilla Firefox and the new opportunities this makes possible,' Mozilla Corporation president Mitchell Baker noted in a blog posting describing the reorganization. 'Mozilla Firefox is approaching 10 percent market share, with figures showing usage several times higher in selected groups and countries. We're reaching the point where Mozilla Firefox is becoming a significant element of the Internet experience and has growing influence within the Internet and software industries.'

Because the Mozilla Corporation is a taxable entity, Baker says, it is granted greater legal freedom and can more easily interact with other corporate entities. However, the Mozilla Corporation is not designed as an investment vehicle and will not offer an IPO (initial public offering). Instead, it will continue to push the original goals of the Mozilla Foundation, albeit in a far more flexible fashion. And all profits made by the Mozilla Corporation will used to continue product development and further those goals. Put simply, the Mozilla Foundation became too successful, and basically outgrew its nonprofit status.

The new Mozilla Corporation will be based in Mountain View, California, at the same address as the Mozilla Foundation. It will have about 36 employees, compared to a handful that will remain as Mozilla Foundation employees.

According to the new company, future versions of Mozilla Firefox, the Mozilla Thunderbird email application, and other products, will remain free and be based on open source code. Firefox, in particular, has rocketed to mainstream success in recent months, and has logged over 76 million downloads since the 1.0 version was shipped late last year. According to NetApplications, Firefox grabbed 8.7 percent of the Web browser market in July and is the number two browser behind Microsoft Internet Explorer (IE), which still controls 86 percent of the market. IE is losing .5 to 1 percent of the market to Firefox each month, NetApplications says.

Firefox has been so successful, in fact, that it caused Microsoft to rethink its Web browser strategy. The original plan was for the next major Windows version, now called Windows Vista, to integrate Web browser functionality directly into the system shell and remove the concept of a standalone Web browser all together. During this time, Microsoft halted development of the standalone IE product, stranding Windows users with an out-of-date browser that required numerous security patches. Responding to the unexpected success of Firefox, Microsoft reconstituted the moribund IE team. In February 2005 the company announced that it would ship a new standalone IE version, IE 7, and include a version of IE 7 in Windows Vista. Since then, Microsoft has shipped the first beta version of IE 7, which includes a number of features Firefox and other browsers have had for some time, including tabbed browsing and RSS integration.

There are questions on both sides of the equation. For Microsoft, it's unclear whether IE 7 will be compelling enough to stem the slow trickle of users that vacate IE each month for Firefox. However, its bundling strategy has worked in the past, and some onlookers question whether Firefox will simply plateau at 10 or 15 percent of the market and never rise above niche status. That's the future the Mozilla Corporation is seeking to prevent.

Let's just hope Microsoft doesn't send a Terminator robot back in time to stop them.

Friday, July 15, 2005

African Grey Parrot Is First Bird To Comprehend Numerical Concept Akin To Zero

African Grey Parrot Is First Bird To Comprehend Numerical Concept Akin To Zero

Waltham, Mass. -- A Brandeis University researcher has shown that an African grey parrot with a walnut-sized brain understands a numerical concept akin to zero -- an abstract notion that humans don't typically understand until age three or four, and that can significantly challenge learning-disabled children.

Strikingly, Alex, the 28-year-old parrot who lives in a Brandeis lab run by comparative psychologist and cognitive scientist Dr. Irene Pepperberg, spontaneously and correctly used the label "none" during a testing session of his counting skills to describe an absence of a numerical quantity on a tray. This discovery prompted a series of trials in which Alex consistently demonstrated the ability to identify zero quantity by saying the label "none."

Dr. Pepperberg's research findings, published in the current issue of The Journal of Comparative Psychology, add to a growing body of scientific evidence that the avian brain, though physically and organizationally somewhat different from the mammalian cortex, is capable of higher cognitive processing than previously thought. Chimpanzees and possibly squirrel monkeys show some understanding of the concept of zero, but Alex is the first bird to demonstrate an understanding of the absence of a numerical set, Dr. Pepperberg noted.

"It is doubtful that Alex's achievement, or those of some other animals such as chimps, can be completely trained; rather, it seems likely that these skills are based on simpler cognitive abilities they need for survival, such as recognition of more versus less," explained Dr. Pepperberg.

Alex had previously used the label "none" to describe an absence of similarity or difference between two objects, but he had never been taught the concept of zero quantity. "Alex has a zero-like concept; it's not identical to ours but he repeatedly showed us that he understands an absence of quantity," said Dr. Pepperberg.

Historically, the use of "zero" to label a null set has not always been obvious even in human cultures, which in many cases lacked a formal term for zero as recently as the late Middle Ages. The value of number research lies mainly in its ability to help determine the extent of animal cognition and animals' potential for more complex capacities. To that end, Dr. Pepperberg's studies on the avian brain are continuing with research into Alex's ability to count, as well as add and subtract small quantities.

Yet significantly, Dr. Pepperberg's research, which uses a training method called the model-rival technique, also holds promise for teaching autistic and other learning-disabled children who have difficulty learning language, numerical concepts and even empathy.

The model rival technique involves two trainers, one to give instructions, and one to model correct and incorrect responses and to act as the student's rival for the trainer's attention; the model and trainer also exchange roles so that the student sees that the process is fully interactive. The student, in this case, a middle-aged parrot, tries to reproduce the correct behavior. So far, results using this learning technique with small groups of autistic children, taught by Diane Sherman, PhD, in Monterey, CA, have been very promising, said Dr. Pepperberg.

"This kind of research is changing the way we think about birds and intelligence, but it also helps us break down barriers to learning in humans -- and the importance of such strides cannot be underestimated," said Dr. Pepperberg.

This story has been adapted from a news release issued by Brandeis University.

Monday, June 27, 2005

TIGGER DIES: Paul Winchell, R.I.P.

Paul Winchell, R.I.P.

(this news sadly just in from the "News From ME" Archives - a sad day for all A.A. Milne devotees...TIGGR, you will be missed)

An amazing man died yesterday at the age of 82. Paul Winchell was a pioneer of early television, appearing on hundreds of shows with his wooden-headed friends, Jerry Mahoney and Knucklehead Smiff. He was a great ventriloquist -- maybe the best ever -- but he was also a great all-around entertainer and inventor.

Paul was born Paul Wilchin, and an early hero in his life was radio ventriloquist Edgar Bergen. (Years later, a whole generation of voice-throwers would cite Paul Winchell as their early hero.) Paul got his start on the popular radio program, Major Bowes' Original Amateur Hour and he later toured with stage presentations featuring talent discovered for that show. He debuted on television in 1948, at a time when few American homes even had sets, and was a mainstay of network programming for years with several different shows of his own and frequent guest appearances on others. Adults and kids alike loved the irreverent Jerry Mahoney who flirted with ladies and sassed the man who operated his head. They also loved the shy, silly Knucklehead, as well as other characters that Winchell devised. Paul was an extremely clever man and his shows were marked with inventive uses of the new medium.

Beginning in the mid-fifties, Paul turned that inventiveness into non-entertainment directions, especially medicine. His most famous achievement was in the invention of an artificial heart. Others advanced Paul's basic design to the point of making it practical but all acknowledged that the breaktrough, the underlying design, was the work of Paul Winchell. He invented numerous other things as well, including battery-heated gloves and a flameless cigarette lighter, and was as proud of his many patents as he was of all his awards as a performer.

During the sixties, Winch -- as many of his friends called him -- cut back on his ventriloquism and focused on his inventing. Most of his performing was limited to cartoon voice work -- a field in which he quickly became one of the top practitioners. He was Dick Dastardly on Wacky Races and Dastardly and Muttley, Gargamel on The Smurfs, Fleagle on The Banana Splits, and many more...but his most enduring characterization would surely be Tigger in the Disney cartoons of Winnie the Pooh. Paul played Tigger for various projects until a few years ago when a rasp in his voice finally (and controversially in some circles) caused Disney to replace him. He also did occasional on-camera acting jobs, many of them sans dummies, and was very good in them.

I was privileged to know Paul and to work with him on several occasions. He was a brilliant man who made no secret that he was also a troubled man, uncertain of his own accomplishments and torn between performing and doing something "more serious." At times, he seemed genuinely stunned that he had been a personal hero to so many of us.

He had an amazing thirst for what some would call "dirty jokes." One of my oddest memories is of sitting with a group of friends in the living room of a small condo he had in Encino. Completely impromptu, Paul picked up a Jerry Mahoney dummy and launched into what had to have been the filthiest and funniest routine ever performed by a beloved children's entertainer. I enjoyed the performance but couldn't help but "flash back" to being five years old and watching Paul and Jerry hosting Super Circus on ABC. It was one of those moments when you're acutely aware of how far you've come since childhood.

Last year, Paul published a dark, candid autobiography called Winch, detailing some of the demons that had plagued him over the years. The book troubled many of Paul's friends, and some of his fans regretted reading it. Here's the review I posted at the time. As noted, it's not one of those "here's a list of my successes" memoirs. It was more like, "Here's how I went crazy." The last few times we spoke, I got the feeling that he was more at peace with himself than he'd been in decades, and I hope that was not just wishful thinking on my part.

I do not believe word of Paul's death has hit the wire services yet, but it's been floating around the Internet since last night. Sadly, I was finally able to confirm it via a friend of the family so I decided to go ahead and post this here. I'm sure there will be news stories soon and tributes. In the meantime, you can learn more about this extraordinary man -- and even hear his theme song -- over at his website. Even that exhaustive collection of articles and clippings will only give you some inkling of the brilliance of Winch.

Tuesday, May 10, 2005

SCIENTISTS DISCOVER NEW ELEMENT - GOVERNMENTIUM

A major research institution has just announced the discovery of the
heaviest element yet known to science. The new element has been named
"Governmentium."

Governmentium has one neutron, 12 assistant neutrons, 75 deputy
neutrons, and 224 assistant deputy neutrons, giving it an atomic mass
of
311. These 311 particles are held together by forces called morons,
which are surrounded by vast quantities of lepton-like particles
called
peons.

Since Governmentium has no electrons, it is inert. However, it can be
detected, as it impedes every reaction with which it comes into
contact.

A minute amount of Governmentium causes one reaction to take over 4
days
to complete, when it would normally take less than a second.

Governmentium has a normal half-life of 4 years; it does not decay,
but
instead undergoes a reorganization in which a portion of the assistant
neutrons and deputy neutrons exchange places.

In fact, Governmentium's mass will actually increase over time, since
each re-organisation will cause more morons to become neutrons,
forming
isodopes.

This characteristic of moron-promotion leads some scientists to
believe
that Governmentium is formed whenever morons reach a certain quantity
in
concentration. This hypothetical quantity is referred to as "Critical
Morass."

When catalyzed with money, Governmentium becomes Administratium, an
element which radiates just as much energy, since it has 1/2 as many
peons but twice as many morons.

Wednesday, April 20, 2005

Debug Internet Explorer Javascript

Debug Internet Explorer Javascript: "Debug Internet Explorer Javascript

Only one tip that I didn't know before: When you want to debug Javascript code you can start your debugger (Visual Studio .NET or Script Debugger), search for the correct iexplore.exe process, attach it and go on debugging.

A very fast way is to write 'javascript:debugger;' in the address line, select your debugger and start debugging. Also, the 'debugger;' command can be used in Javascript code:

if(typeof(res)=='object') debugger;

This line will start the debugger if the type of res is object."

WTF: Introducing the PairOn

Cenqua: Introducing the PairOn: "So you do XP huh?

Introducing the PairOn

The PairOn by Cenqua: sit tight for eXteme XP

Welcome to Extreme XP

Cenqua have partnered with Herman Miller, makers of the legendary Aeron, to produce the ultimate must-have for Extreme XPers: The PairOn.



Key Features:

* Fully unit-tested in our ego-free ergonomics lab
* Essential office furniture for any eXtreme XP Pair (XXPP)
* Fully adjustable via individual or pair control
* can be levered to standup-meeting height
* 40-hour-week alarm buzzer built in
* Available in a range of attractive colours

Update: Order Now to avoid eXtreme disappointment*

The deluge of orders we've had for the PairOn since it's launch this morning has been staggering. So much corporate money, so easily well spent! Unfortunately we've sold out of our initial batch of 5000 to ThoughtWorks. But fear not! We've doubled our manufacturing capacity and hope to fill all orders placed in quick time.
*Orders taken only on April 1."

CoCo: German Song Lyric Sites Cease & Desisted

CoCo: German Song Lyric Sites Cease & Desisted: "German Song Lyric Sites Cease & Desisted
I've never really understood musicians that prefer to fill their CD booklets with fancy artwork at the expense of the inclusion of song lyrics. Worse are song lyrics written down in some cryptic handwriting, or cut-and-pasted and printed in a surreal collage, for the listener to decipher (Radiohead-syndrome). Whenever I really want and need to read the lyrics, because of a foreign tongue or unintelligible growling by the singer, I go to a song lyrics site. It may take a few searches and several sites before I get the lyrics I want, but music enthusiasm drives you a long way.

That may come to an end now. At least, there are signs that the amount of online resources for song lyrics are going to be trimmed down. In Germany 42 non-commercial websites that provide song lyrics have received warning notices to take down the lyrics, or face fines higher than usually demanded for the offering of copyright infringing MP3 files.

The (German) law seems pretty straightforward about it that placing (song) lyrics online without permission constitutes a copyright violation. Still, I can imagine it is pretty hard for the website owners in question and music fans to understand this kind of absolute enforcement. Fencing off the exploitation, commercially or not, of copyrights may be a right, but one may question if it is the right thing to do. Not in the last place from a business perspective, coming down on the true fan base."

This Day In History

Wednesday, April 20, 2005

Spotlight: Scientists Marie and Pierre Curie isolated the radioactive element radium on this date in 1902. A very rare metal, radium is found in minute amounts in uranium ore. In 1903 the Curies shared the Nobel Prize for physics with Henri Becquerel. Their daughter, Irene, and her husband, Frederic Joliot, won a Nobel Prize for Chemistry in 1935, for figuring out a way to synthesize new radioactive elements.

Quote: "I am one of those who think like Nobel, that humanity will draw more good than evil from new discoveries." -- Marie Curie