Friday 23 December 2016

Intellectual disability

Intellectual Disability (ID), also called intellectual developmental disability (IDD), general learning disability, or mental retardation (MR), is a generalized neurodevelopment disorder characterized by significantly impaired intellectual and adaptive functioning. It is defined by an IQ score under 70 in addition to deficits in two or more adaptive behaviours that affect every day, general living. Once focused almost entirely on cognition, the definition now includes both a component relating to mental functioning and one relating to individuals' functional skills in their environments. As a result of this focus on the person's abilities in practice, a person with an unusually low IQ may not be considered intellectually disabled. Intellectual disability is subdivided into syndrome intellectual disability, in which intellectual deficits associated with other medical and behavioural signs and symptoms are present, and non-syndromic intellectual disability, in which intellectual deficits appear without other abnormalities. Down syndrome and fragile X syndrome are examples of syndromic intellectual disabilities.
Intellectual disability affects about 2–3% of the general population. 75–90% of the affected people have mild intellectual disability. Non-syndromic or idiopathic cases account for 30–50% of cases. About a quarter of cases are caused by a genetic disorder. Cases of unknown cause affect about 95 million people as of 2013.
The signs and symptoms of intellectual disability are all behavioural. Most people with intellectual disability do not look like they are afflicted with such, especially if the disability is caused by environmental factors such as malnutrition or lead poisoning. The so-called typical appearance ascribed to people with intellectual disability is only present in a minority of cases, all of which are syndromic.
Children with intellectual disability may learn to sit up, to crawl, or to walk later than other children, or they may learn to talk later. Both adults and children with intellectual disability may also exhibit some or all of the following characteristics:
1. Delays in oral language development
2. Deficits in memory skills
3. Difficulty learning social rules
4. Difficulty with problem solving skills
5. Delays in the development of adaptive behaviors such as self-help or self-care skills
6. Lack of social inhibitors
Children with intellectual disability learn more slowly than a typical child. Children may take longer to learn language, develop social skills, and take care of their personal needs, such as dressing or eating. Learning will take them longer, require more repetition, and skills may need to be adapted to their learning levels. Nevertheless, virtually every child is able to learn, develop and become a participating member of the community.
Among children, the cause is unknown for one-third to one-half of cases. Down syndrome, velocariofacial syndrome, and fetal alcohol spectrum disorders are the three most common inborn causes. However, doctors have found many other causes. The most common are:
1. Genetic conditions. Sometimes disability is caused by abnormal genes inherited from parents, errors when genes combine, or other reasons. The most prevalent genetic conditions include Down syndrome, Klinefelter's syndrome, Fragile X syndrome (common among boys), neurofibromatosis, congenital hypothyroidism, Williams’s syndrome, phenylketonuria (PKU), and Prader-Willi syndrome. Other genetic conditions include Phelan-McDermid syndrome (22q13del), Mowat-Wilson syndrome, genetic ciliopathy, and Siderius typeX-linked intellectual disability (OMIM 300263) as caused by mutations in the PHF8 gene (OMIM 300560). In the rarest of cases, abnormalities with the X or Y chromosome may also cause disability. 48, XXXX and 49, XXXXX syndrome affects a small number of girls worldwide, while boys may be affected by 47, XYY, 49, XXXXY, or 49, XYYYY.
2. Problems during pregnancy. Intellectual disability can result when the fetus does not develop properly. For example, there may be a problem with the way the fetus' cells divide as it grows. A pregnant person who drinks alcohol (see fetal alcohol spectrum disorder) or gets an infection like rubella during pregnancy may also have a baby with intellectual disability.
3. Problems at birth. If a baby has problems during labor and birth, such as not getting enough oxygen, he or she may have developmental disability due to brain damage.
4. Exposure to certain types of disease or toxins. Diseases like whooping cough, measles, or meningitis can cause intellectual disability if medical care is delayed or inadequate. Exposure to poisons like lead or mercury may also affect mental ability.

ARDUINO MEGA 2560 R3 DEVELOPMENT BOARD


Features:

Microcontroller ATmega2560
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 256 KB of which 8 KB used by boot loader
SRAM 8 KB
EEPROM 4 KB
Clock Speed 16 MHz
                                      Table 2.1 features of arduino mega board
       
The Arduino Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila.

The Arduino Mega2560 can be powered via the USB connection or with an external power supply. The power source is selected automatically. External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and VIN pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.


The power pins are as follows:
1. VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
2. 5V. the regulated power supply used to power the microcontroller and other components on the board. This can come either from VIN via an on-board regulator, or be supplied by USB or another regulated 5V supply.
3. 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.  GND. Ground pins.

The ATmega2560 has 256 KB of flash memory for storing code (of which 8 KB is used for the boot loader), 8 KB of SRAM and 4 KB of EEPROM.

Each of the 54 digital pins on the Mega can be used as an input or output, using pin Mode (), digitalWrite (), and digitalRead () functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 ohms. The Mega2560 has 16 analog inputs, each of which provides 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analog Reference () function.

Thursday 22 December 2016

Arduino compatible audio playback board

 AUDIO PLAYBACK BOARD - aPR33A3


                         

FEATURES

1. Operating Voltage Range: 3V ~ 6.5V
2. Single Chip, High Quality Audio/Voice Recording & Playback Solution
3. No External ICs Required
4. Minimum External Components
5. User Friendly, Easy to Use Operation
6. Programming & Development Systems Not Required
7. 170/ 340/ 680 sec. Voice Recording Length in aPR33A1/aPR33A2/aPR33A3
8. Powerful 16-Bits Digital Audio Processor.
9. Non-volatile Flash Memory Technology
10. No Battery Backup Required
11. External Reset pin.
12. Powerful Power Management Unit
13. Very Low Standby Current: 1uA
14. Low Power-Down Current: 15uA
15. Supports Power-Down Mode for Power Saving
16. Built-in Audio-Recording Microphone Amplifier
17. No External OPAMP or BJT Required
18. Easy to PCB layout
19. Configurable analog interface
20. Differential-ended MIC pre-amp for Low Noise
21. High Quality Line Receiver
22. High Quality Analog to Digital and PWM module
23. Resolution up to 16-bits
24. Simple And Direct User Interface

The aPR33A series are powerful audio processor along with high performance audio analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). The aPR33A series are a fully integrated solution offering high performance and unparalleled integration with analog input, digital processing and analog output functionality. The aPR33A series incorporates all the functionality required to perform demanding audio/voice applications. High quality audio/voice systems with lower bill-of-material costs can be implemented with the aPR33A series because of its integrated analog data converters and full suite of quality-enhancing features such as sample-rate convertor.

The aPR33A series C2.0 is specially designed for simple key trigger, user can record and playback the message averagely for 1, 2, 4 or 8 voice message(s) by switch, It is suitable in simple interface or need to limit the length of single message, e.g. toys, leave messages system, answering machine etc. Meanwhile, this mode provides the power-management system. Users can let the chip enter power-down mode when unused. It can effectively reduce electric current consuming to 15uA and increase the using time in any projects powered by batteries.

Arduino and its features

ARDUINO – AN INTRODUCTION
Arduino is an open-source prototyping platform based on easy-to-use hardware and software.

Arduino boards are able to read inputs in the form of
1.Sensor data
2.Push buttons
3. Twitter message etc …
And can output in the form of
1.Twitter notification
2.Glow an LED
3.Turn on a motor


WHY ARDUINO?
Inexpensive
Cross-platform
Simple, clear programming environment
Open source and extensible software
Open source and extensible hardware

Coding languages for arduino
C
C++
C#
Java
Arduino using frameworks
.net


Digital pins-- Use these pins with digitalRead(), digitalWrite(), and     analogWrite(). analogWrite() works only on the pins with the PWM symbol.

Pin 13 LED --The only actuator built-in to your board. Besides being a handy target for your first blink sketch, this LED is very useful for debugging.

Power LED Indicates that your Genuino is receiving power. Useful for debugging.

ATmega microcontroller-- The heart of your board.

Analog input- Use these pins with analogRead().
GND and 5V pins-- Use these pins to provide +5V power and ground to your circuits.

Power connector-- This is how you power your Genuino when it’s not plugged into a USB port for power. Can accept voltages between 7-12V.

TX and RX LEDs --These LEDs indicate communication between your Genuino and your computer. Expect them to flicker rapidly during sketch upload as well as during serial communication. Useful for debugging.

USB port-- Used for powering your Genuino Uno, uploading your sketches to your Genuino, and for communicating with your Genuino sketch (via Serial. println() etc.).

Reset button --Resets the ATmega microcontroller

Tuesday 20 December 2016

Steps to use gdb

This document explains how to use gdb, a debugger for the unix environment. To use gdb, you first need compiled source code. If you have questions on how to do this in the unix environment, look at the quickstarts forcompiling code or using make. Remember, when you use make you must use the -g flag for gdb to perform correctly.
  1. Print out this document. 
    This is so you can have the instructions next to you without trying to flip between the web page and the IDE.
  2. Start gdb. 
    Type "gdb [filename]" where [filename] is the name of the compiled file you wish to debug (the name you type to run your program).
  3. Set the arguments. 
    If your program runs with any command line arguments, you should input them with "set args". For example, if you would normally run your program "test" with the command line "test -paramater1 -parameter2" you would type "set args -parameter1 -parameter2".
  4. Debugging your program
    To debug your program in gdb, you have to run it by typing "run". However, if you just type "run" gdb will run your program to completion without debugging it at all. If your program crashes, gdb will stop it and allow you to debug it. However, you will sometimes want to stop your program at other positions. To stop your program while it is running, type "(ctrl) + c" (hold down the ctrl key and press c). gdb will stop your program at whatever line it has just executed. From here you can examine variables and move through your program. To specify other places where gdb should stop, see the section on breakpoints below.
  5. Controlling program execution Once your program has stopped, you can move through your code one step at a time, or execute multiple lines at once. To execute one line of code, type "step" or "s". If the line to be executed is a function call, gdb will step into that function and start executing its code one line at a time. If you want to execute the entire function with one keypress, type "next" or "n". This is equivalent to the "step over" command of most debuggers.

    If you want gdb to resume normal execution, type "continue" or "c". gdb will run until your program ends, your program crashes, or gdb encounters a breakpoint.

    Since all of gdb is all in one window, when you are debugging you cannot see the source code for your program. To view the source code, type "list" or "l". gdb will print out the source code for the lines around the current line to be executed. To view other lines, just type "list [linenumber]", and gdb will print out the 20 or so lines around that line. gdb remembers what lines you have seen, so if you type "list" again it will print out the next bunch of lines.
  6. Setting breakpoints A breakpoint is like a stop sign in your code -- whenever gdb gets to a breakpoint it halts execution of your program and allows you to examine it. To set breakpoints, type "break [filename]:[linenumber]". For example, if you wanted to set a breakpoint at line 55 of main.cpp, you would type "break main.cpp:55".

    You can also set breakpoints on function names. To do this, just type "break [functionname]". gdb will stop your program just before that function is called. Breakpoints stay set when your program ends, so you do not have to reset them unless you quit gdb and restart it.
  7. Working with breakpoints
    • To list current breakpoints: "info break"
    • To delete a breakpoint: "del [breakpointnumber]"
    • To temporarily disable a breakpoint: "dis [breakpointnumber]"
    • To enable a breakpoint: "en [breakpointnumber]"
    • To ignore a breakpoint until it has been crossed x times:"ignore [breakpointnumber] [x]"
  8. Examining data When your program is stopped you can examine or set the value of any variable. To examine a variable, type "print [variablename]". To set the value of a variable, type "set [variablename]=[valuetoset]".
  9. General Tips
    • gdb has very good help files. Type "help [commandname]" while in gdb.
    • gdb also keeps lots of information about your program while it's running. Type "info" to see this information while you're in gdb.
    • if you change and recompile your program in another window, you don't need to restart gdb. Just type "run" again, and gdb will notice the changes and load the new copy of your program.
    • pressing enter executes the last command again. This makes it easily to step through your program line by line.
  10. Focus your inquiry. 
    When you debug, you can't look at everything all of the time. Be clever and focus your inquiry based on the currently incorrect behavior of your program. If a variable is being output but has the wrong value, study that variable. If a function is not being called, step through the code, study the flow of control, figure out the conditions that must be met for the function to be called, and figure out why they are not being met. If your program seems to enter an infinite loop, study the exit conditions for that loop and figure out why they are not being met. Use breakpoints to skip past parts of the code that you are not investigating.

Monday 19 December 2016

Writing on new indian currency notes makes the note invalid


File system not supported for USB. How to change file system type ?

how to change the format of the pendrive .

different file system types of the pendrive are
1. ext2
2. ext3
3. ext4
4. fat16
4. fat32
5. ntfs

if you are getting an error file format not supported then you need to change its file format.

steps to change the file format are :

1. install gparted
sudo apt-get install gparted
2. select you device
usually /dev/sdc for pendrive
3. delete the allocated memory
4. it shows memory as unallocated
5. right click on unalloted memory and select the file system type
6. click ok

your usb file type is changed







What is DBus

DBus is an inter-process communication (IPC) and remote procedure call (RPC) mechanism that allows communication between multiple computer programs (that is, processes) concurrently running on the same machine.
When there are multiple processes running on a system and each process requires to communicate with several other processes, Then multiple shared channels are required.Establishing an one-to-one shared channel is inefficient.D-Bus provides the communication between several processes by using a single shared channel.
A process can connect to any number of busses if it has an authoried access to it.D-Bus can also be used as a framework. The other implementations of D-Bus are GDBus, QtDBus, dbus-java, sd-bus.

Sunday 18 December 2016

simple way to resolve merge conflicts in git

In most cases, solution to merge-conflict is as simple as discarding local changes or remote/other branch changes.
Following is useful in those cases…
1. Search for all conflicting files.
grep -lr '<<<<<<<' .
2. At this point you may review each files. If solution is to accept local/our version, run:
git checkout --ours PATH/FILE
3. If solution is to accept remote/other-branch version, run:
git checkout --theirs PATH/FILE
4. If you have multiple files and you want to accept local/our version, run:
grep -lr '<<<<<<<' . | xargs git checkout --ours
5. If you have multiple files and you want to accept remote/other-branch version, run:
grep -lr '<<<<<<<' . | xargs git checkout --theirs


How to fix double free or corruption error using valgrind

he double free or corruption error will occur when there is a bad memory usage. Bad memory means you are using a location in memory which is not allocated or it is allocated to some other variable.

It can also occur if you try to free a memory other than the allocated memory.

This will generate segmentation fault. The segmentation fault may not occur sometimes because there are only few processes running in the system. The segmentation fault will usually occur with 100% probability in hardware boards but may not occur sometimes when running on the cpu.

The best ways that I suggest to analyse these crashes are the tools - Valgrind and Gdb.

Consider the example as shown 

#include<stdio.h>
#include<stdlib.h>

int main()
{
    int *p;
    p = (int *)malloc(1*sizeof(int));
    printf(" first free\n");
    free(p);
    printf(" first free done\n");
    printf(" second free\n");
    free(p);
    printf(" second free done\n");
    return 0;
}

1.compile the code with -g flag 
gcc -g memcheck.c 

2. run the executable generated as 
valgrind --tool=memcheck --leak-check=full ./a.out

3. The result/output will be 

==14861== Memcheck, a memory error detector
==14861== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==14861== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==14861== Command: ./a.out
==14861== 
 first free
 first free done
 second free
==14861== Invalid free() / delete / delete[] / realloc()
==14861==    at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14861==    by 0x400608: main (memcheck.c:12)
==14861==  Address 0x51fc040 is 0 bytes inside a block of size 4 free'd
==14861==    at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14861==    by 0x4005E8: main (memcheck.c:9)
==14861== 
 second free done
==14861== 
==14861== HEAP SUMMARY:
==14861==     in use at exit: 0 bytes in 0 blocks
==14861==   total heap usage: 1 allocs, 2 frees, 4 bytes allocated
==14861== 
==14861== All heap blocks were freed -- no leaks are possible
==14861== 
==14861== For counts of detected and suppressed errors, rerun with: -v
==14861== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

The result shows that the memory has been freed two times, Hence easy to analyse. 
Use the -g flag during the compilation so that the line number of the double free is also shown.

How to publish android apps for free

Every one are behind Playstore and Amazon store for publishing their apps. If you want to publish your app on google play store, you need to pay $25 for account activation. Once your developer account is activated in play store, You will be able to publish as many apps as you wish for either free or money.

If you are a developer and you want to publish your app without investing on it, There are many other platforms too.

Slideme is one such store where you can create a developer account for free. You can publish your apps for free or earn revenue. There is no limit on the number of apps you publish.
when you register with Slideme you will not be signed in as a developer. Under the my profile option you need to enable your developer option.

you can visit slide me by clicking on the link here
https://slideme.org

Saturday 17 December 2016

Apn settings to increase speed in jio

Steps to increase Jio 4G speed

  • First visit setting option on your phone
  • Then visit the Mobile Networks option from settings
  • Then click on access point name of your reliance Jio Sim
  • You need to select the sim slot of Jio Sim
  • Select Menu which is available at top right corner
  • and choose new APN then click Save

Setting the APN Network to increase jio 4g speed

  • Name – Flipshope.com
  • APN – jionet
  • APN Type – Default
  • Proxy – Not Set
  • Port – Not Set
  • Username – Not Set
  • Password – Not Set
  • Server – www.google.com
  • MMSC – Not Set
  • MMS proxy – Not Set
  • MMS port – Not Set
  • MCC – 405
  • MNC – 857, 863 or 874
  • Authentication type – Not Set
  • APN Protocol – IPv4/IPv6

Variable initialization in c

When you define a variable in c as global i.e a global variable will be intialized automatically.
The variables declared of type int, float, double will be initialized to 0 and 0.0 respectively.
Any pointer declared to be global will be initilized to NULL.
Some of the compilers give a warning on initialization of global variables.

It is very important to initialize local variables especially pointers . Local variables contain junk values and will result in unexpected behaviour. Sometimes unintialized pointers lead to crash due to segmentaion faults.

Admob vs startapp

Admob and startapp are app mediation platforms which any users can use for free to publish ads on their apps.
If you are trying out ads on your app for first time, I would recommend you to use startapp.

Because admob strictly moniters your account and will ban your account on receiving invalid clicks.

Startapp allows you to have test clicks and is quite leniant with its policy. Moreover many users say startapp earns more revenue than others.

Invalid clicks means the developer clicking on ads in his own app.

In the view of integration, Admob is easy and simple to integrate in android studio with your app. 

The double free or corruption error

The double free or corruption error will occur when there is a bad memory usage. Bad memory means you are using a location in memory which is not allocated or it is allocated to some other variable.

It can also occur if you try to free a memory other than the allocated memory.

This will generate segmentation fault. The segmentation fault may not occur sometimes because there are only few processes running in the system. The segmentation fault will usually occur with 100% probability in hardware boards but may not occur sometimes when running on the cpu.

The best ways that I suggest to analyse these crashes are the tools - Valgrind and Gdb.

arduino tutorial

Here you can go through the complete tutorial of arduino. https://drive.google.com/open?id=0B5HLcXu-WufUUUFNYWp0Mk9wRHc

Friday 16 December 2016

example of arduion code in java language

public class Blink extends JArduino {

public Blink(String port) {
    super(port);
}

@Override
protected void setup() {
    // initialize the digital pin as an output.
    // Pin 13 has an LED connected on most Arduino boards:
    pinMode(DigitalPin.PIN_12, PinMode.OUTPUT);
}

@Override
protected void loop() {
    // set the LED on
    digitalWrite(DigitalPin.PIN_12, DigitalState.HIGH);
    delay(1000); // wait for a second
    // set the LED off
    digitalWrite(DigitalPin.PIN_12, DigitalState.LOW);
    delay(1000); // wait for a second
}

public static void main(String[] args) {
    String serialPort;
    if (args.length == 1) {
        serialPort = args[0];
    } else {
        serialPort = Serial4JArduino.selectSerialPort();
    }
    JArduino arduino = new Blink(serialPort);
    arduino.runArduinoProcess();
}

}

programming languages for arduino

The official languages that are recommended for arduino are C and C++. However arduino will also respond for the following languages

1. C#
2. Python
3. Ada
4. Java
5. Pascal

However the GCC-AVR compiler can be extended to support other languages. If you want to interact with arduino with any other language, You can write your own compiler too.