2011-05-01

my last post

this is my last post to this blog.

my new blog url is http://ozguraytekin.com/blog/

2011-04-28

Silverlight 5 Beta Is Available For Download

Silverlight 5 continues the pace of rapid innovation, building on Silverlight 4's capabilities in the areas of rich applications and premium media experiences. With over 40 new features, the Silverlight 5 beta highlights dramatic video quality and performance improvements, as well as new capabilities that improve developer productivity.

Top Beta Features

XAML Debugging with breakpoints for binding debugging
Implicit data templates for easy UI reuse
Double (and multi) click support
GPU-accelerated XNA-compatible 3D and immediate-mode 2D API
Low-latency sound effects and WAV support
Real operating system windows and multi-display support
Significant performance improvements, fixes and much more


Silverlight 5 Top Downloads

Recommended Downloads
Visual Studio 2010 SP1 (required)
Silverlight 5 Beta Tools for Visual Studio SP1 (required)
Expression Blend Preview for Silverlight 5 (optional)
Silverlight 5 Features Document (optional)

Additional Downloads

Silverlight 5 Beta Developer Runtime for Windows
Silverlight 5 Beta Developer Runtime for Mac
Silverlight 5 Beta SDK
WCF RIA Services for Silverlight 5 Beta


http://www.silverlight.net/getstarted/silverlight-5-beta/

The Future of Microsoft Silverlight

Microsoft Silverlight is a powerful tool for creating and delivering rich Internet applications and media experiences on the Web. Silverlight 5 builds on the foundation of Silverlight 4 for building business applications and premium media experiences. Among other capabilities, the Silverlight 5 beta highlights dramatic video quality and performance improvements, and features that improve developer productivity.

The final Silverlight 5 release will be available in 2011

http://www.microsoft.com/silverlight/future/

2011-04-27

SharePoint 2010 Sandboxed Solutions Solution Validator ( SPSolutionValidator )

Now that you already know how to create a Sandboxed Solution, in a typical scenario Farm Admins need some one or some mechanism to evaluate or validate the solutions developed using Sandboxed solutions by the developers. Here is the example of how and what you need to inherit and extend the ootb available classes to write your own.

http://codename-srini.blogspot.com/2010/01/sharepoint-2010-sandboxed-solutions.html

http://spsolutionvalidator.codeplex.com/

2011-04-26

SPFileVersionCollection.RecycleAll Method

Recycles all file version objects in the collection.

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfileversioncollection.recycleall.aspx

REST (Representational State Transfer

REST help developers rapidly build applications on the SharePoint framework, having the SharePoint APIs available everywhere makes it possible to integrate to SharePoint from almost any applications including those on non-Windows platforms whether they are on the client, server or in the cloud. Unlike SOAP, REST is not a protocol, is using HTTP to retrieve and send data and is more like a Web APIs with more direct communications.

http://www.eggheadcafe.com/tutorials/aspnet/84e8403e-a25c-49b7-a0d8-3e2773fa29b5/whats-new-for-developers.aspx

What about correlation tokens and SharePoint workflow?

Correlation tokens are something very important in SharePoint

A correlation token is a means of uniquely identifying each instance of a workflow, modification or task. When SharePoint initiates a workflow, it does not spawn a unique set of objects. Instead, if one instance of the workflow is already running when the second initiates, the second will reuse objects from the first. Correlation token properties ensure that the single activity object is operating on the correct workflow instance and accessing the correct details about the workflow.

http://jopx.blogspot.com/2007/08/what-about-correlation-tokens-and.html

Apply theme programmatically Sharepoint 2010

We can manage the theme from UI of Sharepoint also but sometimes we have a requirement like we need to manage theme through a feature i.e. on feature activation we need to apply some theme and on deactivation remove that theme and apply the default no-theme of Sharepoint.
Add the Microsoft.SharePoint.Utilities reference.

http://www.directsharepoint.com/2011/03/programmatically-apply-theme-to-web-in.html

Set Site Collection Search Settings by PowerShell

Setting your Site Collection Search Settings by Powershell, what a tongue twister, try saying that six times fast. Setting your search settings via PowerShell is not something that is immediately obvious and requires a bit of digging.

First – how do we see what settings we’ve currently got? First lets get our web and throw it into a variable to make it a bit easier to handle.
$web = get-spweb http://address

By digging down through the properties of the $web object we can see two areas that might house this : allProperties and Properties. I do not know why there are two property areas, seems a little confusing.

http://mrhodes.net/2010/09/14/set-site-collection-search-settings-by-powershell/

2011-01-30

Control 12 Servos with Arduino using Serial Monitor

Disclaimer: I have tested these instructions and this code and it works for me. However, you must use it at your own risk. I am not responsible for any damage it may do to your data or your hardware.

Using this code, you can control 12 servos with an Arduino.

For each servo, it's possible to define the position angle with Serial Monitor tool.

Syntax using Serial Monitor:
1.045 = move Servo 1 to position 45 degree
or
2.120 = move Servo 2 to position 120 degree
or
10.073 = move Servo 10 to position 73 degree

It's important prefix the position with 0 when the position angle is smaller then 100 degree!

Code:
#include <Servo.h>

// declare servo objects
Servo servo00;
Servo servo01;
Servo servo02;
Servo servo03;
Servo servo04;

Servo servo05;
Servo servo06;
Servo servo07;
Servo servo08;
Servo servo09;

Servo servo10;
Servo servo11;

// declare servo angle variables and setting initial values
int servo00Angle;
int servo01Angle;
int servo02Angle;
int servo03Angle;
int servo04Angle;

int servo05Angle;
int servo06Angle;
int servo07Angle;
int servo08Angle;
int servo09Angle;

int servo10Angle;
int servo11Angle;

// declare a char array to buffer (5 byte) the inputs from Serial Monitor window
char serialMonitorBuffer [5];

float value;
int row = 0;

// The setup() function is called when a sketch starts. 
void setup()
{
  // Sets the data rate in bits per second (baud) for serial data transmission.
  Serial.begin(9600);

  // Attach the Servo variable to a pin.
  servo00.attach(2);
  servo01.attach(3);
  servo02.attach(4);
  servo03.attach(5);
  servo04.attach(6);

  servo05.attach(7);
  servo06.attach(8);
  servo07.attach(9);
  servo08.attach(10);
  servo09.attach(11);

  servo10.attach(12);
  servo11.attach(13);
  
  setInitialPositionValues();
}

void loop()
{
  // Get the number of bytes (characters) available for reading from the serial port.
  // This is data that's already arrived and stored in the serial receive buffe
  if (Serial.available())
  {
    delay(5);

    // store serial data into buffer array (5 byte)
    int i=0;     
    while(i < 5)
    {
      serialMonitorBuffer[i] = Serial.read();
      i++;
    }

    // Flushes the buffer of incoming serial data.
    // That is, any call to Serial.read() or Serial.available() will return
    // only data received after all the most recent call to Serial.flush(). 
    Serial.flush();

    // convert numeric string to float
    value = atof(serialMonitorBuffer);

    row++;

    // Prints data to the serial port as human-readable ASCII text.
    Serial.print(row);
    Serial.print(";");
    Serial.print(value);
    Serial.print(";");

    // if 99 is given, set servos to initial position
    if(value > 99)
    {
      setInitialPositionValues();
    }
    else if(value > 11.0)
    {
      float angle = (value - 11.0) * 1000;
      servo11Angle = (int)angle;
    }
    else if(value > 10.0)
    {
      float angle = (value - 10.0) * 1000;
      servo10Angle = (int)angle;
    }
    else if(value > 9.0)
    {
      float angle = (value - 9.0) * 1000;
      servo09Angle = (int)angle;
    }
    else if(value > 8.0)
    {
      float angle = (value - 8.0) * 1000;
      servo08Angle = (int)angle;
    }
    else if(value > 7.0)
    {
      float angle = (value - 7.0) * 1000;
      servo07Angle = (int)angle;
    }
    else if(value > 6.0)
    {
      float angle = (value - 6.0) * 1000;
      servo06Angle = (int)angle;
    }
    else if(value > 5.0)
    {
      float angle = (value - 5.0) * 1000;
      servo05Angle = (int)angle;
    }
    else if(value > 4.0)
    {
      float angle = (value - 4.0) * 1000;
      servo04Angle = (int)angle;
    }
    else if(value > 3.0)
    {
      float angle = (value - 3.0) * 1000;
      servo03Angle = (int)angle;
    }
    else if(value > 2.0)
    {
      float angle = (value - 2.0) * 1000;
      servo02Angle = (int)angle;
    }
    else if(value > 1.0)
    {
      float angle = (value - 1.0) * 1000;
      servo01Angle = (int)angle;
    }
    else if(value > 0.0)
    {
      float angle = (value - 0.0) * 1000;
      servo00Angle = (int)angle;
    }
  }

  //  printOutServoAngles();
  if(value > 0.0)
  {
    printOutServoAnglesToCsv();
  }

  value = 0;

  servo00.write(servo00Angle);
  servo01.write(servo01Angle);
  servo02.write(servo02Angle);
  servo03.write(servo03Angle);
  servo04.write(servo04Angle);

  servo05.write(servo05Angle);
  servo06.write(servo06Angle);
  servo07.write(servo07Angle);
  servo08.write(servo08Angle);
  servo09.write(servo09Angle);

  servo10.write(servo10Angle);
  servo11.write(servo11Angle);

  delay(50);
}

void setInitialPositionValues()
{
  servo00Angle = 84;
  servo01Angle = 80;
  servo02Angle = 86;
  servo03Angle = 79;
  servo04Angle = 95;

  servo05Angle = 85;
  servo06Angle = 85;
  servo07Angle = 85;
  servo08Angle = 81;
  servo09Angle = 88;

  servo10Angle = 79;
  servo11Angle = 79;
}

void printOutServoAnglesToCsv()
{
  Serial.print(servo00Angle);
  Serial.print(";");
  Serial.print(servo01Angle);
  Serial.print(";"); 
  Serial.print(servo02Angle);
  Serial.print(";");
  Serial.print(servo03Angle);
  Serial.print(";"); 
  Serial.print(servo04Angle);
  Serial.print(";");
  Serial.print(servo05Angle);
  Serial.print(";"); 
  Serial.print(servo06Angle);
  Serial.print(";");
  Serial.print(servo07Angle);
  Serial.print(";");
  Serial.print(servo08Angle);
  Serial.print(";");
  Serial.print(servo09Angle);
  Serial.print(";"); 
  Serial.print(servo10Angle);
  Serial.print(";");
  Serial.println(servo11Angle);
}

2011-01-25

Color Schemer Online

Enter an RGB or HEX value, or click on the Color Palette below

http://www.colorschemer.com/online.html

2011-01-22

Processing in Eclipse

This tutorial is for Processing version 1.1+ and assumes you already have Java and Processing installed on your computer. This is also not an Eclipse tutorial, but just covers the basics to get you up and running with Processing in Eclipse.

http://processing.org/learning/eclipse/

2011-01-11

MHVLib - an efficiency oriented library for AVR microcontrollers

Whats Implemented
* Digital I/O
* Timers
* Serial (both busy-waiting and asynchronous)
* External Interrupts
* Servo control
* Analogue to digital
* Hardware PWM
* Gamma correction - calculate on the fly, or lookup tables (recommended)
* Fast synchronous serial shifter
* Software H Bridge for driving naked transistors (with PWM support)
* Realtime Clock & event triggering
* Debouncing (detect button presses, as well as held buttons)
* Software PWM Matrix (for passive LED matrices)
* HT1632 based LED matrix displays such as the Sure Electronics DE-DP105 (search for 0832 led matrix on Ebay)
* HD44780 & compatible LCD character displays

http://www.makehackvoid.com/mhvlib

2011-01-09

Android 3.0 Preview

2010-12-29

Using HM55B Compass Module from Parallax with Arduino and Processing

In this post, you'll find code samples for using HM55B Compass Module from Parallax with Arduino and Processing.

The Parallax Compass is a dual-axis magnetic field sensor built around the Hitachi HM55B. Parallax makes this compass accessible by providing their surface-mount sensor chip with a 3V onboard voltage regulator and resistor protection in a 0.3 wide 6-pin DIP module. The HM55B is compatible with the BASIC Stamps 5V supply and signal levels. Compass date is read using a simple synchronous serial interface (the BASIC Stamps SHIFTIN and SHIFTOUT commands).


You can buy the Thumb Joystick Module from: http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/hm55b/List/0/SortField/4/ProductID/98/Default.aspx or http://www.zerko.ch/parallaxshop/robotzubehoer/hm55b-digital-compass.php

Arduino part of this post is based on Arduino Playground sample from http://www.arduino.cc/playground/Main/HM55B

Pin connections are:
Compass Pin 1and Pin 2 => Arduino Pin 10
Compass Pin 3 => Arduino GND
Compass Pin 4 => Arduino Pin 8
Compass Pin 5 => Arduino Pin 9
Compass Pin 6 => Arduino 5V

The Processing code block is getting the miscellaneous (delivered from arduino) values from Serial protocol and using these values for rotating a box in a circle.


Arduino Code (from http://www.arduino.cc/playground/Main/HM55B):
/*
/////////////////////////////////
 Htachi HM55B Compass
 parallax (#)
 
 AUTHOR:   kiilo kiilo@kiilo.org
 License:  http://creativecommons.org/licenses/by-nc-sa/2.5/ch/
 
 http://parallax.com/Store/Microcontrollers/BASICStampModules/tabid/134/txtSearch/hm55b/List/1/ProductID/98/Default.aspx?SortField=ProductName%2cProductName
 http://sage.medienkunst.ch/tiki-index.php?page=HowTo_Arduino_Parallax_HM55B_Kompass
 http://arduino.cc/playground/HM55B
 
 /////////////////////////////////
 */
#include <math.h> // (no semicolon)
//// VARS
byte CLK_pin = 8;
byte EN_pin = 9;
byte DIO_pin = 10;

int X_Data = 0;
int Y_Data = 0;
int angle;

//// FUNCTIONS

void ShiftOut(int Value, int BitsCount) {
  for(int i = BitsCount; i >= 0; i--) {
    digitalWrite(CLK_pin, LOW);
    if ((Value & 1 << i) == ( 1 << i)) {
      digitalWrite(DIO_pin, HIGH);
      //Serial.print("1");
    }
    else {
      digitalWrite(DIO_pin, LOW);
      //Serial.print("0");
    }
    digitalWrite(CLK_pin, HIGH);
    delayMicroseconds(1);
  }
  //Serial.print(" ");
}

int ShiftIn(int BitsCount) {
  int ShiftIn_result;
  ShiftIn_result = 0;
  pinMode(DIO_pin, INPUT);
  for(int i = BitsCount; i >= 0; i--) {
    digitalWrite(CLK_pin, HIGH);
    delayMicroseconds(1);
    if (digitalRead(DIO_pin) == HIGH) {
      ShiftIn_result = (ShiftIn_result << 1) + 1; 
      //Serial.print("x");
    }
    else {
      ShiftIn_result = (ShiftIn_result << 1) + 0;
      //Serial.print("_");
    }
    digitalWrite(CLK_pin, LOW);
    delayMicroseconds(1);
  }
  //Serial.print(":");

  // below is difficult to understand:
  // if bit 11 is Set the value is negative
  // the representation of negative values you
  // have to add B11111000 in the upper Byte of
  // the integer.
  // see: http://en.wikipedia.org/wiki/Two%27s_complement
  if ((ShiftIn_result & 1 << 11) == 1 << 11) {
    ShiftIn_result = (B11111000 << 8) | ShiftIn_result; 
  }


  return ShiftIn_result;
}

void HM55B_Reset() {
  pinMode(DIO_pin, OUTPUT);
  digitalWrite(EN_pin, LOW);
  ShiftOut(B0000, 3);
  digitalWrite(EN_pin, HIGH);
}

void HM55B_StartMeasurementCommand() {
  pinMode(DIO_pin, OUTPUT);
  digitalWrite(EN_pin, LOW);
  ShiftOut(B1000, 3);
  digitalWrite(EN_pin, HIGH);
}

int HM55B_ReadCommand() {
  int result = 0;
  pinMode(DIO_pin, OUTPUT);
  digitalWrite(EN_pin, LOW);
  ShiftOut(B1100, 3);
  result = ShiftIn(3);
  return result;
}


void setup() {
  Serial.begin(115200);
  pinMode(EN_pin, OUTPUT);
  pinMode(CLK_pin, OUTPUT);
  pinMode(DIO_pin, INPUT);

  HM55B_Reset();
}

void loop() {
  HM55B_StartMeasurementCommand(); // necessary!!
  delay(40); // the data is 40ms later ready

  Serial.print(HM55B_ReadCommand()); // read data and print Status
  Serial.print(" ");  

  X_Data = ShiftIn(11); // Field strength in X
  Y_Data = ShiftIn(11); // and Y direction

  Serial.print(X_Data); // print X strength
  Serial.print(" ");
  Serial.print(Y_Data); // print Y strength
  Serial.print(" ");
  digitalWrite(EN_pin, HIGH); // ok deselect chip
  angle = 180 * (atan2(-1 * Y_Data , X_Data) / M_PI); // angle is atan( -y/x) !!!
  Serial.print(angle); // print angle
  Serial.println("");
  Hm55bCompassModuleProcessingHm55bCompassModuleProcessing
}

Processing Code:
// Author:  Özgür Aytekin - http://ozguraytekin.blogspot.com
// License: http://creativecommons.org/licenses/by-nc-sa/2.5/ch/

// The Processing serial library allows for easily reading and writing data to and
// from external machines.
// It allows two computers to send and receive data and gives you the flexibility
// to communicate with custom microcontroller devices, using them as the input or
// output to Processing programs. 
import processing.serial.*;

// Define variable for receiving data using the communication protocol
Serial serialPort;

// Define variables for storing miscellaneous variables (delivered from arduino)
float hm55bStatus, fieldStrengthInX, fieldStrengthInY, angleRawValue, angleRotateValue = 0;

// Define a variable for storing angle between 0 and 360 degree
float angleDisplayValue = 0;

// Called once when the program is started.
void setup()
{
  // Defines the dimension of the display window in units of pixels.
  // The size() function must be the first line in setup().
  size(640, 480);

  // Specifies the number of frames to be displayed every second.
  // If the processor is not fast enough to maintain the specified rate,
  // it will not be achieved.
  // For example, the function call frameRate(24) will attempt to refresh 24 times a second.
  // It is recommended to set the frame rate within setup().
  // The default rate is 60 frames per second.
  frameRate(24);

  // Gets a list of all available serial ports.
  // Use println() to write the information to the text window.
  println(Serial.list());

  // Class for sending and receiving data using the serial communication protocol.
  // Constructor Serial(parent, name, rate)
  // parent = PApplet: typically use "this", name = String: name of the port (COM1 is the default),
  // rate = int: 115200 
  serialPort = new Serial(this, Serial.list()[1], 115200);

  // Sets a specific byte to buffer until before calling serialEvent().
  // Don't generate a serialEvent() until get a newline character
  serialPort.bufferUntil('\n');
}

// Called when data is available.
void serialEvent(Serial serialPort)
{
  // Reads from the port into a buffer of bytes up to and including a particular character.
  // If the character isn't in the buffer, 'null' is returned.
  String inputString = serialPort.readStringUntil('\n');

  if (inputString != null)
  {
    // Removes whitespace characters from the beginning and end of a String.
    // In addition to standard whitespace characters such as space, carriage return,
    // and tab, this function also removes the Unicode "nbsp" character.
    inputString = trim(inputString);

    // The split() function breaks a string into pieces using a character or string as the divider.
    // filling substrings into a float array
    float[] values = float(split(inputString, " "));

    // we are waiting for four elements
    // put the numbers in the values array-variable
    if(values.length >= 4)
    {
      hm55bStatus = values[0];
      fieldStrengthInX  = values[1];
      fieldStrengthInY = values[2];
      angleRawValue = values[3];

      // hm55b is delivering values between 0 and 180 and 0 and -179
      // when the angle value is less than 0, adding 360 to angle
      // is delivering the degree between 0 and 359
      if(angleRawValue >= 0 && angleRawValue <= 180)
      {
        angleDisplayValue = angleRawValue;
      }
      else if(angleRawValue < 0)
      {
        angleDisplayValue = 360 + angleRawValue;
      }
    }
  }
}

// Called directly after setup() and continuously executes the lines of code contained inside
// its block until the program is stopped or noLoop() is called.
// The draw() function is called automatically and should never be called explicitly. 
void draw()
{
  // The background() function sets the color used for the background of the Processing window. 
  background(200);
  // Sets the color used to fill shapes.
  fill(153);

  print("angleRawValue: ");
  print(angleRawValue);
  print('\t');
  
  print("angleDisplayValue: ");
  println(angleDisplayValue);

  // Re-maps a number from one range to another.
  angleRotateValue = map(angleRawValue, 0, 359, 0, PI * 2);

  noFill();
  ellipseMode(CENTER);
  ellipse(width/2, height/2, 200, 200);
  ellipse(width/2, height/2, 20, 20);

  text("North", width/2 - 16, 130);
  text("South", width/2 - 16, 360);

  text("West", 180, height/2);
  text("East", 430, height/2);

  // Specifies an amount to displace objects within the display window.
  // The x parameter specifies left/right translation,
  // the y parameter specifies up/down translation,
  // and the z parameter specifies translations toward/away from the screen.
  translate(width/2, height/2);

  // Rotates a shape the amount specified by the angle parameter.
  rotate(angleRotateValue);

  // Draws a rectangle to the screen.
  rect(-6, - 100, 12, 100);

  // Forces the program to stop running for a specified time. 
  delay(500);
}

2010-12-27

Arduino Programming Notebook

A beginner's reference to the programming syntax of the Arduino microcontroller. Includes information on program structure, variables, datatypes, arithmetic, constants, flow control, and most of the common functions of the core library. Also includes an appendix with schematics and simple programs for several common tasks.

http://www.lulu.com/product/download/arduino-programming-notebook/3524028

2010-12-25

Arduino 0022 now available

Arduino 0022 now available: http://arduino.cc/en/Main/Software.

Includes an SD card library and lots of other fixes and improvements.

ARDUINO 0022 - 2010.12.24

[core / libraries]
* Adding an SD card library based on sdfatlib by Bill Greiman and the
MemoryCard library by Philip Lindsay (follower) for SparkFun.
http://arduino.cc/en/Reference/SD

* Added character manipulation macros (from Wiring): isAlphaNumeric(),
isAlpha(), isAscii(), isWhitespace(), isControl(), isDigit(), isGraph(),
isLowerCase(), isPrintable(), isPunct(), isSpace(), isUpperCase(),
isHexadecimalDigit(), toAscii(), toLowerCase(), toLowerCase().
http://code.google.com/p/arduino/issues/detail?id=418

* Added String.toInt() function.

* Refactoring core to use register-based, not CPU-based, #ifdefs.
Patch by Mark Sproul.
http://code.google.com/p/arduino/issues/detail?id=307
http://code.google.com/p/arduino/issues/detail?id=315
http://code.google.com/p/arduino/issues/detail?id=316
http://code.google.com/p/arduino/issues/detail?id=323
http://code.google.com/p/arduino/issues/detail?id=324
http://code.google.com/p/arduino/issues/detail?id=340

* Modification of serial baud rate calculation to match bootloader and 8U2
firmware at 57600 baud.
http://code.google.com/p/arduino/issues/detail?id=394

* Fixed bug in tone() function.
http://code.google.com/p/arduino/issues/detail?id=361

* Fixed SPI.setClockDivider() function.
http://code.google.com/p/arduino/issues/detail?id=365

* Fixed EEPROM library on Mega 2560.
http://code.google.com/p/arduino/issues/detail?id=381

* Hardware serial receive interrupt optimization.
http://code.google.com/p/arduino/issues/detail?id=391

* Applying the timeout parameter of pulseIn() during measurement of the
pulse, not just while waiting for it.


[environment]
* Fixed problem with copy as html and angle brackets.
http://code.google.com/p/arduino/issues/detail?id=29

* Showing serial port selection dialog if serial port not found on upload.

* Remembering serial monitor window size and line ending selection.
http://code.google.com/p/arduino/issues/detail?id=96
http://code.google.com/p/arduino/issues/detail?id=330

* Replaced oro.jar regular expressions with java.regex ones (patch by
Eberhard Fahle and Christian Maglie).
http://code.google.com/p/arduino/issues/detail?id=171

* Building the user sketch before the core or libraries, so errors appear
faster. Patch by William Westfield and Paul Stoffregen.
http://code.google.com/p/arduino/issues/detail?id=393

* Setting application icon under Windows.

2010-12-24

HTML5 Labs

The HTML5 Labs site is the place where Microsoft prototypes early and unstable web standard specifications from standards bodies such as the W3C. Sharing these prototypes helps us have informed discussions with developer communities, and contributes to a better implementation experience with draft specifications.

http://html5labs.interoperabilitybridges.com/

2010-12-23

VirtualBox 4.0 binaries are online

VirtualBox 4.0 released!
Oracle today released VirtualBox 4.0, a new major release. It now has an open architecture using extension packs and the base package is under GPLv2. See the ChangeLog for details.

http://www.virtualbox.org/wiki/Downloads

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL). See "About VirtualBox" for an introduction.

Presently, VirtualBox runs on Windows, Linux, Macintosh and OpenSolaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7), DOS/Windows 3.x, Linux (2.4 and 2.6), Solaris and OpenSolaris, and OpenBSD.

VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute while Oracle ensures the product always meets professional quality criteria.

2010-12-22

Using Thumb Joystick Module with Arduino and Processing

In this post, you find code samples for using a Thumb Joystick Module with Arduino and Processing.

You can buy the Thumb Joystick Module from: http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=7&products_id=33



The Arduino code block is reading the Thumb Joystick values from Port A0 and A1 and sending it to Processing using the Serial class.

The Processing code block is getting the X-Axis and Y-Axis values from Serial protocol and using these values for rotating a box.


Arduino code:
// Define Arduino Port A0 as input for X-Axis
#define pinAxisX 0

// Define Arduino Port A1 as input for Y-Axis
#define pinAxisY 1

// Define variables for storing X and Y values
int valueAxisX, valueAxisY = 0;

// The setup() function is called when a sketch starts.
// Use it to initialize variables, pin modes, start using libraries, etc.
// The setup function will only run once, after each powerup or reset of the Arduino board. 
void setup()
{
  // Sets the data rate in bits per second (baud) for serial data transmission.
  Serial.begin(9600);
}

// After creating a setup() function, which initializes and sets the initial values,
// the loop() function does precisely what its name suggests, and loops consecutively,
// allowing your program to change and respond. Use it to actively control the Arduino board. 
void loop()
{
  // Reads the X-Axis value from the specified analog pin and
  // stores in valueAxisX variable
  valueAxisX = analogRead(pinAxisX);
  
  // Prints data to the serial port as human-readable ASCII text.
  Serial.print(valueAxisX);
  Serial.print(",");

  // Reads the Y-Axis value from the specified analog pin and
  // stores in valueAxisY variable
  valueAxisY = analogRead(pinAxisY);
  Serial.println(valueAxisY);

  // Pauses the program for the amount of time (in miliseconds) specified as parameter.
  delay(50);
}

Processing code:
// The Processing serial library allows for easily reading and writing data to and
// from external machines.
// It allows two computers to send and receive data and gives you the flexibility
// to communicate with custom microcontroller devices, using them as the input or
// output to Processing programs. 
import processing.serial.*;

// Define variable for receiving data using the communication protocol
Serial serialPort;

// Define variables for storing x and y angles
float angleX, angleY = 0;

void setup()
{
  // Defines the dimension of the display window in units of pixels.
  // The size() function must be the first line in setup().
  size(640, 480, P3D);

  // Specifies the number of frames to be displayed every second.
  // If the processor is not fast enough to maintain the specified rate,
  // it will not be achieved.
  // For example, the function call frameRate(30) will attempt to refresh 30 times a second.
  // It is recommended to set the frame rate within setup().
  // The default rate is 60 frames per second.
  frameRate(30);

  // Gets a list of all available serial ports.
  // Use println() to write the information to the text window.
  println(Serial.list());

  // Class for sending and receiving data using the serial communication protocol.
  // Constructor Serial(parent, name, rate)
  // parent = PApplet: typically use "this", name = String: name of the port (COM1 is the default),
  // rate = int: 9600 is the default
  serialPort = new Serial(this, Serial.list()[1], 9600);

  // Sets a specific byte to buffer until before calling serialEvent().
  // Don't generate a serialEvent() until get a newline character
  serialPort.bufferUntil('\n');

  //  // The background() function sets the color used for the background of the Processing window. 
  //  background(128);
}

void serialEvent(Serial serialPort) 
{
  // Reads from the port into a buffer of bytes up to and including a particular character.
  // If the character isn't in the buffer, 'null' is returned.
  String inputString = serialPort.readStringUntil('\n');

  if (inputString != null)
  {
    // Removes whitespace characters from the beginning and end of a String.
    // In addition to standard whitespace characters such as space, carriage return,
    // and tab, this function also removes the Unicode "nbsp" character.
    inputString = trim(inputString);

    // The split() function breaks a string into pieces using a character or string as the divider.
    // filling substrings into a float array
    float[] values = float(split(inputString, ","));

    // we are waiting for two elements
    // put the numbers in the values array-variable
    if (values.length >= 2)
    {
      // Re-maps a number from one range to another.
      angleX = map(values[0], 0, 1023, 0, PI * 2);
      angleY = map(values[1], 0, 1023, 0, PI * 2);
    }
  }
}

// Called directly after setup() and continuously executes the lines of code contained inside
// its block until the program is stopped or noLoop() is called.
// The draw() function is called automatically and should never be called explicitly. 
void draw()
{
  // The background() function sets the color used for the background of the Processing window. 
  background(0);

  // Sets the default ambient light, directional light, falloff, and specular values.
  lights();

  // Specifies an amount to displace objects within the display window.
  // The x parameter specifies left/right translation,
  // the y parameter specifies up/down translation,
  // and the z parameter specifies translations toward/away from the screen.
  translate(width/2, height/2, 0);


  // Rotates a shape around the x-axis the amount specified by the angle parameter.
  rotateX(abs(angleX));

  // Rotates a shape around the y-axis the amount specified by the angle parameter.
  rotateY(abs(angleY));

  // A box is an extruded rectangle. A box with equal dimension on all sides is a cube.
  box(200, 100, 150);

  print("rotateX = ");
  print(angleX);
  print("\t");

  print("rotateY = ");
  println(angleY);
}

2010-12-11

Announcing Visual Studio 2010 Service Pack 1 Beta

This web installer downloads and installs Visual Studio 2010 Service Pack 1 Beta. An internet connection is required during installation. See the ‘Additional Information’ section below for alternative (ISO) download options. Please Note: This installer is for all editions of Visual Studio 2010 (Express, Professional, Premium, Ultimate).

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=11ea69cb-cf12-4842-a3d7-b32a1e5642e2&displaylang=en

2010-11-09

Free ebook: Programming Windows Phone 7, by Charles Petzold

This book is a gift from the Windows Phone 7 team at Microsoft to the programming community, and I am proud to have been a part of it. Within the pages that follow, I show you the basics of writing applications for Windows Phone 7 using the C# programming language with the Silverlight and XNA 2D frameworks.

Yes, Programming Windows Phone 7 is truly a free download, but for those readers who still love paper—as I certainly do—this book will also be available (for sale) divided into two fully-indexed print editions: Microsoft Silverlight Programming for Windows Phone 7 and Microsoft XNA Framework Programming for Windows Phone 7. [Note from Devon: we should have these ready for order in December 2010.]

With the money you’ve saved downloading this book, please buy other books. Despite the plethora of information available online, books are still the best way to learn about programming within a coherent and cohesive tutorial narrative. Every book sale brings a tear of joy to an author’s eye, so please help make them weep overflowing rivers.

http://blogs.msdn.com/b/microsoft_press/archive/2010/10/28/free-ebook-programming-windows-phone-7-by-charles-petzold.aspx

2010-10-26

Free ebook: Moving to Microsoft Visual Studio 2010

Here’s a little bit about the authors: Ken Haines is a software development engineer at Microsoft, working in the Consumer and Online Division. He has a passion for distributed applications in the cloud and strives to help customers and partners find the right solution for their needs. Pascal Paré has worked at Microsoft since 2006, where he has held positions as a software engineer on both development and testing teams. Patrice Pelland is a principal development manager at Microsoft, working in the Consumer and Online Division. He leads a development team that is focused on innovation and incubation across all Microsoft consumer products.

Moving to Microsoft Visual Studio 2010 was written with three audiences in mind:

Part I is for developers moving from Visual Studio 2003 to Visual Studio 2010.

Part II is for developers moving from Visual Studio 2005.

And Part III is for developers moving from Visual Studio 2008.

http://blogs.msdn.com/b/microsoft_press/archive/2010/09/13/free-ebook-moving-to-microsoft-visual-studio-2010.aspx

31 Days of Windows Phone 7 By Jeff Blankenburg

It's that time of year again...the time when I make an insane blogging announcement, and then you, my loyal reader, wait anxiously for me to fail. Well, I hate to disappoint you, but failure is not an option this time. This series has already been written, and it's just up to my trusty blogging platform to get these posts out on a timely basis.

Day #1: Project Template
Day #2: Page Navigation
Day #3: The Back Button Paradigm
Day #4: Device Orientation
Day #5: System Theming
Day #6: Application Bar
Day #7: Launchers
Day #8: Choosers
Day #9: Debugger Tips
Day #10: Input Scope

Day #11: Accelerometer
Day #12: Vibration Controller
Day #13: Location Services
Day #14: Tombstoning
Day #15: Isolated Storage
Day #16: Panorama Control
Day #17: Pivot Control
Day #18: WebBrowser Control
Day #19: Push Notification API
Day #20: Map Control

Day #21: Silverlight Toolkit
Day #22: Apps vs. Games
Day #23: Trial Versions of Your App
Day #24: Embedding Fonts, Video, and Images
Day #25: Talking to Existing APIs (like Twitter)

...

http://www.jeffblankenburg.com/post/31-Days-of-Windows-Phone-7.aspx

2010-10-24

7 Freely available E-Books/Guides I found essential for .NET Programmers and Architects

Who doesn't love free books? Take a look at this list of 7 useful free e-books for .NET programmers and budding architects.

http://amazedsaint.blogspot.com/2010/09/7-freely-available-e-booksguides-i.html

2010-07-20

List of SharePoint 2010 related documents and software

Below is a list of SharePoint 2010 related documents and software available from Microsoft.

Developing Applications for SharePoint 2010
Developing Applications for SharePoint 2010 contains guidance documentation, detailed examples, and a reusable class library.

SharePoint 2010 Walkthrough Guide
This guide was written as a companion to the SharePoint Server 2010 Evaluation Guide for Technical and Business Decision Makers.

Planning guide for Microsoft SharePoint Server 2010
This document provides information and guidelines to lead a team through the steps of planning the deployment of a solution based on Microsoft SharePoint Server 2010.

Technical reference for Microsoft SharePoint Server 2010
This document includes technical information about the Microsoft SharePoint Server 2010 provider for Windows PowerShell and other helpful reference information about general settings, security, and tools.
 
Operations guide for SharePoint Foundation 2010
This document describes how to operate and maintain your servers, server farms, sites, and solutions in Microsoft SharePoint Foundation 2010.

 Planning guide for Microsoft SharePoint Server 2010
This document provides information and guidelines to lead a team through the steps of planning the deployment of a solution based on Microsoft SharePoint Server 2010.

Upgrading to Microsoft SharePoint Foundation 2010
This document is designed to guide administrators and IT professionals through the process of upgrading to Microsoft SharePoint Foundation 2010 from Windows SharePoint Services 3.0.


Operations guide for SharePoint Foundation 2010
This document describes how to operate and maintain your servers, server farms, sites, and solutions in Microsoft SharePoint Foundation 2010.

Microsoft SharePoint Designer 2010 (32-bit)
SharePoint Designer 2010 is the tool of choice for the rapid development of SharePoint applications. Using SharePoint Designer, advanced users and developers alike can rapidly create SharePoint solutions in response to business needs.

Microsoft SharePoint Foundation 2010
SharePoint Foundation 2010 is the new version of Microsoft Windows SharePoint Services. It is the essential solution for organizations that need a secure, manageable, web-based collaboration platform.

 Sharepoint 2010 Developer Training Kit
The SharePoint 2010 Developer Training Kit provides developers with deep guidance on how to develop for SharePoint 2010.

...

http://www.mssharepointtips.com/tip.asp?id=1000

2010-06-05

ILMerge

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly. Also, if the primary assembly has a strong name, and a .snk file is provided, then the target assembly is re-signed with the specified key so that it also has a strong name.

ILMerge is packaged as a console application. But all of its functionality is also available programmatically.

There are several options that control the behavior of ILMerge. See the documentation that comes with the tool for details.

ILMerge runs in the v2.0 .NET Runtime, but it is also able to merge v1 or v1.1 assemblies. However it can merge PDB files only for v2 assemblies.

Currently, ILMerge works only on Windows-based platforms. It does not yet support Rotor or Mono.

http://www.microsoft.com/downloads/details.aspx?FamilyID=22914587-B4AD-4EAE-87CF-B14AE6A939B0&displaylang=en

2010-05-22

Silverlight 4 Application Themes

3 new application themes for Silverlight 4: Accent Color, Windows 7 and Cosmopolitan. These themes can be used for the navigation template provided by the Silverlight 4 Tools installer or using the various resource dictionaries provided in this download.

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=e9da0eb8-f31b-4490-85b8-92c2f807df9e

2010-05-04

Installing SharePoint Foundation 2010 on a Single Server - Part 1

SharePoint Foundation 2010 is the next version of Windows SharePoint Services. Formerly known as Windows SharePoint Services 4.0, SharePoint Foundation 2010 provides essential solutions for organizations to do secure, manageable and web-based collaboration. Best of all, it's technically free.

With the availability of 64-bit hardware, SharePoint Foundation 2010 (including the full-blown SharePoint Server 2010) now requires the 64-bit version of Windows Server 2008.

* Windows Server 2008 Service Pack 2 for non-R2 systems
* Web Server Role (IIS 7)
* Windows PowerShell 2.0 for non-R2 systems (Windows PowerShell 2.0 ships with Windows Server 2008 R2 and Windows 7 so you no longer have to worry about that)
* .NET Framework 3.5 with Service Pack 1 (in R2 systems, this can be enabled via the Add Roles Wizard)
* Windows Server 2008 hotfix for token authentication (non-R2 and R2 systems)

http://www.mssharepointtips.com/tip.asp?id=965

2010-04-24

Silverlight 4 Training

The Silverlight 4 Training Course includes a whitepaper explaining all of the new Silverlight 4 features, several hands-on-labs that explain the features, and a 8 unit course for building business applications with Silverlight 4. The business applications course includes 8 modules with extensive hands on labs as well as 25 accompanying videos that walk you through key aspects of building a business application with Silverlight. Key aspects in this course are working with numerous sandboxed and elevated out of browser features, the new RichTextBox control, implicit styling, webcam, drag and drop, multi touch, validation, authentication, MEF, WCF RIA Services, right mouse click, and much more!

http://www.microsoft.com/downloads/details.aspx?FamilyID=24CEA29E-042E-41C9-AA16-684A0CA5F5DB&displaylang=en