Atrix Raspberry Pi Laptop

 

 

 

 

The lapdock is a screen, keyboard, battery pack, USB hub in one nice ultraportable laptop case.  Specifically it has USB out for its hub, the keyboard and trackpad are on the hub.  The screen is a HDMI display.

Well guess what, the Pi has HDMI out, and USB plugs.  All you need are the correct connectors.

The Lapdock has male micro usb and HDMI plugs where the cellphone would dock in.  I picked up a 12″ micro HDMI extension cable (male-female) and 12″ micro USB extender.  I also picked up a microHDMI female to HDMI male adapter, and the same thing in a USB adapter.

  • USB 2.0 type A male to Micro USB B type 5pin female Connector Adapter convertor,
  • HDMI Male to Female Micro HDMI socket adapter convertor,
  • 50cm Micro USB 2.0 type 5Pin Male to micro USB Female tablet extension cable,
  • HDMI 1.4 D type Micro HDMI Male to Micro HDMI Female M/F Extension Cable 30cm

The Raspberry Pi has a micro USB power plug…but the latest version can take USB power through the normal USB ports also…and this allows the Pi access to the Lapdock hub/keyboard.

 

Found Interesting, Watch and DIY

https://www.youtube.com/watch?v=yZkz_a52I6s

Also check out

http://rasathus.blogspot.in/2012/10/a-raspberry-pi-laptop-easy-way.html

UML with Plant – PlantUML extension for MediaWiki

The Unified Modeling Language™ – UML – is OMG’s most-used specification, and the way the world models not only application structure, behavior, and architecture, but also business process and data structure.

Draw professional looking UML diagrams just with simple textual descriptions. Check out how.

 

Achieve using PlantUML extension for MediaWiki.

1. MediaWiki

MediaWiki is a free software open source wiki package written in PHP, originally for use on Wikipedia. It is now also used by several other projects of the non-profit Wikimedia Foundation and by many other wikis, including this website, the home of MediaWiki.
http://www.mediawiki.org/wiki/MediaWiki

Procedure to install Media Wiki on Ubuntu is here.

2. PlantUML

PlantUML is an open-source tool that uses simple textual descriptions to draw UML diagrams.
http://www.mediawiki.org/wiki/Extension:PlantUML

Procedure to install PlantUML extension on Media Wiki is here.

Interesting Libraries/Frameworks for Linux (C/C++)

 

1. CLISH (Command Line Interface SHell)

A modular framework for implementing a CISCO-like CLI on a *NIX system. Arbitary command menus and actions can be defined using XML files. This software handles the user interaction, and forks the appropriate system commands to perform any actions.
http://clish.sourceforge.net/

2. Libconfig – C/C++ Configuration File Library

Libconfig is a simple library for processing structured configuration files, like this one: test.cfg. This file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code.
Libconfig is very compact — a fraction of the size of the expat XML parser library. This makes it well-suited for memory-constrained systems like handheld devices.
http://www.hyperrealm.com/libconfig/

3. libevent – an event notification library

The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts.
libevent is meant to replace the event loop found in event driven network servers. An application just needs to call event_dispatch() and then add or remove events dynamically without having to change the event loop.
http://libevent.org/

4. libcurl – the multiprotocol file transfer library

libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos), file transfer resume, http proxy tunneling and more!
libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more…
libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported, fast, thoroughly documented and is already used by many known, big and successful companies and numerous applications.
http://curl.haxx.se/libcurl/

5. jsmn – Minimalistic JSON parser in C

jsmn (pronounced like ‘jasmine’) is a minimalistic JSON parser in C. It can be easily integrated into resource-limited or embedded projects.
jsmn is designed to be robust (it should work fine even with erroneous data), fast (it should parse data on the fly), portable (no superfluous dependencies or non-standard C extensions). An of course, simplicity is a key feature – simple code style, simple algorithm, simple integration into other projects.
http://zserge.bitbucket.org/jsmn.html

6. libmraa – Low Level Skeleton Library for Communication on GNU/Linux platforms

Libmraa is a C/C++ library with bindings to javascript & python to interface with the IO on Galileo, Edison & other platforms, with a structured and sane API where port names/numbering matches the board that you are on. Use of libmraa does not tie you to specific hardware with board detection done at runtime you can create portable code that will work across the supported platforms.

The intent is to make it easier for developers and sensor manufacturers to map their sensors & actuators on top of supported hardware and to allow control of low level communication protocol by high level languages & constructs.
https://github.com/intel-iot-devkit/mraa

Method Call Interception (MCI) in C++

Method Call Interception (MCI) is the technique of intercepting methods, and performing certain extra, specified, operations before / instead of / after the called method. MCI while not the same as Aspect Oriented Programming is the most common technique, used to implement AOP.

As such MCI is often used for

  • Tracing
  • Code Profiling
  • Transaction management
  • Thread safety (locking)

MCI with VC++

When you compile your code with the /Gh option, the compiler automatically adds a call to a function with the prototypeextern "C" void __declspec(naked) _penter(void);

More…

MCI with GCC

GCC has the -finstrument-functions flag which allows you to define two functions that will be called at the beginning and end of each function call:

  • void __cyg_profile_func_enter(void *this_fn, void *call_site);
  • void __cyg_profile_func_exit(void *this_fn, void *call_site);

More…

Also See

Useful Linux Commands

  • How to find out mount/partition a directory or file is on?
    $df -P file/goes/here | tail -1 | cut -d' ' -f 1
    $df –h
  • Patch a diff
    $patch [-C] –I <diff filename>
  • List all process
    $ps -aux
  • List eclipse packages and uninstall
    $dpkg --get-selections | grep eclipse
    $apt-get purge eclipse*
    $rm -r ~/.eclipse/
  • Install Java 7
    $add-apt-repository ppa:webupd8team/java
    $apt-get update
    $apt-get install oracle-java7-installer
    $apt-get install oracle-java7-set-default
  • Autostart Samba Server
    $apt-get install sysv-rc-conf sysvinit-utils
    $sysv-rc-conf smbd on
  • Copy files with Progress
    $rsync -avh --progress sourceDirectory destinationDirectory
  • disk space for current directory
    $stat -c '%m' .
    $df -k
    $du / --max-depth=1 -h