Tuesday, October 22, 2013

Cook your own IOT recipe ...

With the craze for IOT catching up with the neard world IBM has pitched in to satisfy the hunger first hand!
 IBM and hardware partner Libelium hope to cut through the complexities of the so-called "Internet of things" through a do-it-yourself kit allowing users to test and deploy sensor networks. The companies on Monday introduced the Waspmote Mote Runner, a computer that can collect and share data with other devices within wireless range. IBM is providing the software tools while Libelium is making the hardware, which will include sensors to collect weather, server temperature and other information.

Hardware

It is a motherboard with sensors for :-
  •  gases( oxygen, carbon dioxide)
  •  temperature
  •  motion
  •  light
  •  soil temperature
  •  GPS and others.

 The board comes with standard interfaces including Ethernet and serial interfaces, so it can be plugged into existing hardware.
IBM is providing software tools called Mote Runner so programs can be written for the device using Java and C-Sharp. The tools support a range of data transfer protocols being proposed for the Internet of things including MQTT (Message Queuing Telemetry Transport), which has been adopted by many hardware and software makers.With the kit, users will be able to simulate a mesh network in which data is collected and transferred. Programming is simpler as the APIs (application programming interfaces) are smaller.
IBM is also working with the Internet of Things-Architecture consortium to define a standard around data transfer protocols and device interconnects. The development effort is partly funded by the European Union, with consortium partners including Siemens, NEC, Hitachi, Alcatel-Lucent and others.

If you are scared of programming looking to cook some ready made recipe, checkout this interesting startup:- https://ifttt.com/


Saturday, October 19, 2013

Paradigm of Prodigious Prolixity


A GRE STUDENT : All articles that coruscate with resplendence are not truly auriferous.
A NORMAL PERSON : All that glitters is not gold.

A GRE STUDENT : Sorting on the part of mendicants must be interdicted.
A NORMAL PERSON : Beggars are not choosers.

A GRE STUDENT : Male cadavers are incapable of rendering any testimony.
A NORMAL PERSON : Dead men tell no tales.

A GRE STUDENT : Neophite's serendipity.
A NORMAL PERSON : Beginner's luck.

A GRE STUDENT : A revolving lithic conglomerate accumulates no congeries of small, green, biophytic plants.
A NORMAL PERSON : A rolling stone gathers no moss.

A GRE STUDENT: Members of an avian species of identical plumage tend to congregate.
A NORMAL PERSON : Birds of the same feather flock together.

A GRE STUDENT : Pulchritude possesses solely cutaneous profundity.
A NORMAL PERSON : Beauty is only skin deep.

A GRE STUDENT : Freedom from incrustations of grime is contiguous to ectitude.
A NORMAL PERSON : Cleanliness is godliness.

A GRE STUDENT : It is fruitless to become lachrymose of precipitately departed lactile fluid.
A NORMAL PERSON : There's no use crying over spilt milk.

A GRE STUDENT : Eschew the implement of correction and vitiate the scion.
A NORMAL PERSON : Spare the rod and spoil the child.

A GRE STUDENT : The stylus is more potent than the rapier.
A NORMAL PERSON : The pen is mightier than the sword.

A GRE STUDENT : It is fruitless to attempt to indoctrinate a superannuated canine with innovative maneuvers.
A NORMAL PERSON : You can't try to teach an old dog new tricks.

A GRE STUDENT : Surveillance should precede saltation.
A NORMAL PERSON : Look before you leap.

A GRE STUDENT : Scintillate, scintillate, asteroid minim.
A NORMAL PERSON : Twinkle, twinkle, little star.

A GRE STUDENT : The person presenting the ultimate cachinnation possesses thereby the optimal cachinnation.
A NORMAL PERSON : He who laughs last, laughs the best.

A GRE STUDENT : Exclusive dedication to necessitous chores without interludes of hedonistic diversion renders Jack a hebetudinous fellow.
A NORMAL PERSON : All work and no play makes Jack a dull boy.

A GRE STUDENT : Individuals who make their abodes in vitreous edifices would be advised to refrain from catapulting petrious projectiles.
A NORMAL PERSON : People who live in glass houses should not throw stones.

A GRE STUDENT : Where there are visible vapors having their provenance in ignited carbonaceous materials, there is conflagration.
A NORMAL PERSON : Where there's smoke, there's fire.

Friday, October 18, 2013

Ubuntu Officially Available for the Nexus 4 and Galaxy Nexus


Coinciding with the desktop Ubuntu 13.10 release, Ubuntu for phones is now officially available for installation on the Google Nexus 4 and Samsung Galaxy Nexus. The release bills itself as being feature complete, with many exciting features available including:
gesture control for multitasking and regularly used apps,
click packages
cloud photo storage
easy access to search from anywhere
extensive personalization possibilities,(My Personal Favorite)
and a set of APIs with which to build new applications. And because all of the included core applications run natively rather than through an interpreter, Ubuntu promises high levels of performance.

But as this is just a beta release, not everything is fully baked just yet. For starters, only two devices are currently supported. And even for those devices, the experience isn’t quite perfect. For starters airplane mode and a lock screen have not yet been added. And remember the promise of convergent computing where a smartphone can function as a complete PC, as long as it meets the minimum requirements? Well, that’s not yet available. Despite the limitations, today’s release is quite exciting. It’s always nice to see other software options available for the devices that some of us already own.

Ubuntu coder Michael Hall held a Ubuntu Touch Development Workshop aimed at spurring and fostering application development for the soon-to-be-ready platform. Both of these presentations can now be viewed online.

The installation process is relatively simple but at the same time at risk of bricking your phone as this is just a evaluation version.

Saturday, October 12, 2013

Hiding your data!

This trick is evil, you can hide your (top-secret)data and no one will know.
You can put your secret files in a folder and convert the folder to recycle bin, so whoever will see it will think it as recycle bin and even if they open it, they will be navigated to the actual recycle bin and no one can access your data. 
Steps to hide:-
1. Create a folder in your desktop.2. Rename it and add .{645FF040-5081-101B-9F08-00AA002F954E} extension to the folder name(Try to avoid spaces in the folder name to avoid problems, Eg:- Top_secret)
Eg:- Top_secret.{645FF040-5081-101B-9F08-00AA002F954E}
3. Hit enter.....
You're done... you made your secret folder recycle bin, rename it to recycle bin so people will think it is the recycle bin and they won't doubt that there is any secret data inside it.
Steps to retrieve:-
1. make sure your folder(in disguise of recycle bin) name is in one word eg:-: top_secret.(Rename again)2. Open command prompt.Navigate to desktop (cd desktop)3. Now type the following command :-
ren top_secret.{645FF040-5081-101B-9F08-00AA002F954E} top_secret
5. Hit enter.
You will get your folder back in normal form and the data is present inside it.Happy fooling!!


Note:-
{645FF040-5081-101B-9F08-00AA002F954E}  is the registry code for recycle bin in windows 

Sunday, September 1, 2013

Frame of Reference aka point of view


"The rule for objectivity is not that everyone lives in the same reality, it is that no two observers' realities can be inconsistent with each other. This also means that "complete" information does not imply a unique description of the reality, it merely implies access to all the information that is locally available to that observer in principle. The locality of the information is what preserves causality…”
I read this very interesting quote on a Physics forum and firstly found it confusing, but after re-reading many times my take isreality  is not necessarily/entirely dependent on information, it may vary from one frame of reference to other. That is:- In Physics:- Considering speed of light has a limit 'c' is a conclusion from our frame of reference. If we were to live inside a (visible)world made of water my limit 'c' would have been lesser. There would also be less accuracy in measuring the speed of light if we were to discover the world outside our(watery)  world. Now though we have complete information still there is a difference in reality. On the other account i once had a very interesting discussions about  absolute measure for good deed(punya) and bad deed(paap).  It is so objective.  We buy and store things much more than we need just to keep us and our family happy/contended while knowing the fact that many people in this world are starving.  A soldier takes life on battelfield, bombs other civilizations killing many people be it first time attack or a counter attack, in both scenarios it done for saving his motherland and thousands of innocent inhabitants of his country. But again considering the complete information he is just willing to serve the country risking his own life at the same time taking life of others in reality by order from his supervisors.


Source 

Sunday, August 25, 2013

Hudson as Continuous System Integration tool for Dot Net projects.



Hudson is a JAVA web application that allows you to monitor your build process. Hudson is extendable via plug-ins.( Official Hudson Website.)Hudson can be used in an environment where we have to maintain many applications/jobs, for example, multiple applications which generate reports in csv, tsv, txt etc formats whose data and format integrity is quite essential, and thus their Unit Test must be verified with every major-minor change in a common component or with every check-in to the version control tools like SVN/TFS.

Hudson can also be used for automated versioning of assemblies/dlls which get version with every build.

Installing The Hudson

The only pre-requisite is that you have Java installed. Here are the links to the files:
o    Java
o    Hudson
Once installed you can start Hudson by doing the following:

Open up a console window (Command Prompt), navigate to the folder containing the ‘Hudson. War’ file and issuing the following command:

java -DHUDSON_HOME=c:Hudson -jar hudson.war


Hudson is now running and can be accessed via your web browser at http://localhost:8080/

 To install Hudson as a Windows service use the “Install as Windows Service” option on the “Manage Hudson” page and follow the instructions.
Configuring Hudson
Configuration of Hudson is done using the “Manage Plugins” and “Configure System” options on the Manage Hudson page. First visit the “Manage Plugins” option and click on the “Available” tab to display a list of plug-ins that can be installed.
Select the following Hudson plug-ins and click ‘Install’:
o    MSBuild Plugin – This plugin allows you to use MDBuild to build .NET projects.
o    MSTest Plugin – This plugin converts MSTest TRX file metadata into a format that it can be integrated into the Hudson’s JUnit features. This will make the test reports available as build output.

After the install, be sure to restart your Hudson service.

To configure the MSBuild plugin. Select the “Configure System” option and look for the “MSBuild Builder” section. Configure it to look like the following and click the ‘Save’ button
Notice that you can have multiple MSBuild configurations. This might be handy for building projects using the different versions of the .NET Framework.

Building a Job

Build jobs are added via the “New Job” option on the Hudson main page. Select a name and the “Build a free-style software project” option as shown below. Then click “OK”.
Now a ‘job’ will appear in the main Hudson page.
To manage the new project, click the link for the project you just created click the ‘Configure’ link in the list on the left. First select the “Discard Old Builds” option and configure the policy for limiting disk consumption.

Then configure your “Source Code Management” options. Notice the period in the “Local module directory (optional)” field. That will force Hudson to check out the project directly into the workspace rather than into a subdirectory.

To setup the build select the “Build a Visual Studio project of solution using MSBuild” option from the “Add build step” drop down list. After selecting the “MS Build Version” that we configured before and adding other configuration information.
This will get the solution built. Now we want Hudson to execute the unit tests for the project. We can add a “Windows batch command” to call MSTest.

Finally, select the “Publish MSTest test result report” from the “Post Build Actions” section and assign a name e.g.: TestResults.trx. This will take the ‘trx’ test results metadata file (XML), you can transform it into HTML and make it available as part of the build output.

Click “Save” at the bottom and the project should be ready to build manually. Restart Hudson for the configuration to take effect.
Manual Build
On the main Hudson page you will see a list of all the jobs. On the right-hand side there is a button that allows you to schedule a job. Clicking that button will start the build process. Hudson also shows you a progress bar for your build.


Continuous System Integration

To kick off a build we can also navigate to the following URL:
http://HOSTNAME/job/PROJECTNAME/build
where HOSTNAME is your server / port and PROJECTNAME is the project name. You can get these parameters by looking at the URL in Hudson when your project is selected. This knowledge is key to having the source control system trigger Hudson to build a project.
Having Hudson perform builds based upon changes in the source code, requires that we install a post commit hook into the source control repository. This will vary depending upon your source control system. For Visual-SVN, I add a hook by right clicking on the repository and selecting the “All Tasks” – “Manage Hooks…” option, then configure a post commit hook to execute a Ruby script.
 The Ruby script takes an argument for the project name. Here is the Ruby script:


# Push a notice to the hudson server to initiate a build.

# Ensure the required libs are present
require "net/http"
require "uri"

# Get the project name
hudsonProject = ARGV[0]

# Create the uri and issue the request
uri = URI.parse("http://hppav1:8080/job/" + hudsonProject + "/build/")
Net::HTTP::get_print uri
Now whenever code is checked in, Hudson will be triggered to build and run the tests for the project.
The next step may be to setup email or IM notification of build results.


Thursday, March 28, 2013

How to create structures in C# ? [keyword: struct]


Structures are basically user defined types. Structures differ from classes
as they do not contain data directly unlike 'Classes'.
While the functionality is similar, structures are usually more efficient as compared to classes.

A structure is preferred over a class if, a type will perform better as value type than as value type.

A structure must meet following criteria:-
1.It should logically represent a single value.
2.The size of an instance should not be more than 16 bytes.
3.It need not be changed frequently after creation.
4.It is not cast to a reference type.(i.e converted to another type or typecast)

This is an example of employee structure.

using System;
using System.Collections.Generic;
using System.Text;

namespace Structures
{
    class Program
    {
        static void Main(string[ ] args)
        {
            Employee E = new Employee("Shantanu", "Shirpure", 666);
            Console.WriteLine(E.ToString());
            Console.ReadLine();
        }

        struct Employee
        {
            public string firstName;
            public string lastName;
            public int id;

            public Employee(string firstName, string lastName, int id) // this is a constructor.
            {
               //   firstName = firstName;
                this.firstName = firstName;
                // Here string firstName of struct Employee has scope
                //all through the methods hence to distinguish from parameters invoke this method.
                this.lastName = lastName;
                this.id = id;
            }

            public override string ToString() // this is a method.
            //override is a key word used to duplicate the systems method ToString with our own method
            //this is called as polymorphism
            {
                return firstName + " " + lastName + ", ID " + id;
            }
        }
    }
}