joi, 25 decembrie 2014

Server de fișiere ZyXel NSA325v2

 Aveam nevoie de un server de fișiere (video, imagini etc) și am cumpărat unul de pe emag.ro. Sistemul ZyXel NSA325v2 este foarte silențios și funcționează perfect. Sistemul de operare este bazat pe Linux NSA325-v2 2.6.31.8 armv5tel GNU/Linux.

Deocamdata am montat doar un singur hardisk de 500 GB dar dacă mai e nevoie mai pot sa adaug încă o unitate HDD până la 12 Terabytes.

 Network Storage ZyXEL NSA325v2, 2Bay

System Specifications

Networking

  • Network protocol:
    • CIFS/SMB, NFS (for Linux/Unix)
    • FTP, HTTP
    • DHCP client
    • PPPoE
    • Network Time Protocol (NTP)
  • Network application:
    • Personal cloud with ownCloud and Polkast support
    • Media server:
              - DLNA 1.5 media server
              - UPnP AV server
              - iTunes server
              - SqueezeCenter support
              - Photo album server
    • Web server:
              - FTP server
              - phpMyAdmin/MySQL/PHP
              - RSS client & server
    • Smartphone application:
      • zCloud, zMedia, ownCloud, Dropbox, Polkast, Twonky Beam
    • Network application management:
      • User & group management
      • Package Management for setting up applications
      • One-click-hosting sites download manager
    • Network security:
      • Support HTTPS and FTPES (FTP over explicit TLS/SSL)
      • Encrypted NSA to NSA remote replication
      • Encrypted NSA to external disk archive backup

Data Management

  • Backup support:
    • One-touch copy/sync button for external USB-capable devices backup
    • Backup planner:
    • - Instant/Scheduled backup
      - NSA to NSA synchronization/archive backup
      - NSA to external USB hard disk backup
    • Google Drive™** and dropbox support
    • Apple Time Machine support
  • Download/Upload support:
    • Auto-download from FTP/HTTP/P2P download service
    • Scheduled download
    • One-click hosting sites downloading
    • Auto-upload photos and videos to YouTube/Flickr/FTP server
  • File system support:
    • Internal HDD: EXT4
    • External HDD: NTFS, EXT2, EXT3, EXT4, FAT32, ReiserFS, XFS

System Management

  • RAID 0, 1, JBOD
  • Online firmware upgrade
  • Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.)

Power and Thermal Management

  • Power control:
    • Internal disk hibernation support
    • Scheduled power on/off/reboot
    • Wake-on-LAN support
    • System automatically resume after power outage
    • APC USB UPS monitoring and auto shutdown
  • Thermal management:
    • Smart fan speed control
    • High temperature alert/buzzer
    • Auto shutdown while high temperature
    • Special Feature:
    • - Hybrid cloud support for remote backup and download, intuitive user interface

Application Package Center

  • Backup Planner
  • Gallery
  • NZBGet
  • PHP-MySQL
  • Polkast
  • SqueezeCenter
  • Transmission
  • WrodPress

Minimum System Requirements

  • OS for utility: Windows XP/Vista/7 (32 & 64 bit)/8  (32 & 64 bit) 
  • Browser: IE 7.0+, Firefox 20+, Google Chrome 10+, Safari 5+

Hardware Specifications

  • 2.5" or 3.5" SATA I/II hard disk interface supported up to 12 Terabytes
  • One Gigabit Ethernet RJ-45 connector
  • Two USB 2.0 ports
  • One USB 3.0 port
  • Buttons:
    • Power button
    • Copy/Sync button
    • Reset button
  • Smart fan design
  • Power consumption:
    • Access mode: 27 watt
    • Hard disk spin-down mode: 7 watt
  • Power:
    • Input: 100 - 240 V AC, 50/60 Hz
    • Output: 12 V DC, 5 A

     Front Panel:

     Rear Panel:


    Physical Specifications

  • Item dimensions (WxDxH): 207 x 164 x 123 mm (8.15" x 6.46" x 4.84")
  • Item weight: 1,257 g (2.77 lb.)
  • Packing dimensions (WxDxH): 280 x 173 x 275 mm (11.02" x 6.81" x 10.82")
  • Packing weight: 2,260 g (4.99 lb.)

Environmental Specifications

  • Operating Environment
    • Temperature: 0ºC to 40ºC (32ºF to 104ºF)
    • Humidity: 10% to 95% (Non-condensing)
  • Storage environment
    • Temperature: -30ºC to 70ºC (-22ºF to 158ºF) 
    • Humidity: 10% to 95% (Non-condensing)

Certification

  • Safety: CE LVD, BSMI
  • EMC: CE, FCC class B, C-Tick, BSMI
  • Others: DLNA 1.5, UPnP

Package Contents

  • Network storage device
  • Power adapter
  • Ethernet cable
  • Quick start guide
  • Support CD
  • Warranty card


Crăciun Fericit !

sâmbătă, 29 noiembrie 2014

Noul meu laptop Lenovo G5070



Lenovo G5070
15.6" HD Widescreen Display
This display delivers bright, crisp visuals in 16:9 widescreen format and 1366 x 768 resolution.

AccuType Keyboard.
Featuring a modern look and feel, the acclaimed AccuType keyboard has island-style, ergonomic keys that allow a more fluid, spacious, comfortable, and accurate typing experience than standard keyboard designs.

Fast Data Transfer.
Move data between the G50-70 and other devices quickly with USB 3.0 SuperSpeed; it's up to ten times faster than previous USB technologies, and it's backward-compatible.

Simple Maintenance.
With OneKey Recovery, recovering from viruses or other technical difficulties is a snap.

Connectivity Options
With 802.11 b/g/n WiFi connectivity, 10/100 LAN, and Bluetooth, you'll be able to connect to the internet wherever you go.

Integrated Webcam
Lenovo G50-70's HD webcam will help you enjoy oweb conferences or online video chats like you're really there.

Ample Storage
You won't have to worry about where to put all your data, videos, music or photos.

LENOVO G50-70 LAPTOP
Processor: Intel Core i7-4510U Processor(3M Cache, up to 3.00 GHz)
Display: 15.6" HD (1366 x 768) Screen

Graphics: Dedicated AMD Radeon R5 M230 2GB graphics
Memory: 4GB PC3-12800 DDR3L Memory
Webcam: 720p HD
Storage: 1TB HDD 5400rpm
Optical drive: Integrated DVD Recordable
Audio: Dolby Advanced Audio
Keyboard: Non-Back Lit Keyboard
Connectivity:
Wireless LAN: 802.11 b/g/n Wireless
Eternet LAN: 100/100 LAN
Bluetooth 4.0
Battery 4 Cell (32Wh) for up to 4 hours (actual battery life depends on usage)
Ports
2 x USB 3.0
1 x USB 2.0
1x HDMI-out
VGA connector
2-in-1 card reader (SD/MMC)
Audio combo jack

Dimension (W x D x H): 384x265x25mm
Weight: 2.5 kg

Merge brici :)

Va recomand  un model asemănător : Laptop Lenovo B50-70 cu procesor Intel® Core™ i7-4510U, 2.00GHz, Haswell™, FullHD, 15.6", 8GB, 1TB, DVD-RW, AMD Radeon™ R5 M230 2GB, FreeDOS, Black

O zi plăcută tuturor!

duminică, 23 noiembrie 2014

Imprimanta 3D (1) - Sursa de tensiune si Controller-ul

De curând am început lucrul la o imprimanta 3D Prusa i3
Primul pas l-am făcut cumpărând o sursa serioasa și un controller pentru motorașe.

Controller-ul este un Arduino Mega 2560 ce are suficienți pini I/O pentru imprimanta mea.
MicrocontrollerATmega2560
Operating Voltage5V
Input Voltage (recommended)7-12V
Input Voltage (limits)6-20V
Digital I/O Pins54 (of which 15 provide PWM output)
Analog Input Pins16
DC Current per I/O Pin40 mA
DC Current for 3.3V Pin50 mA
Flash Memory256 KB of which 8 KB used by bootloader
SRAM8 KB
EEPROM4 KB
Clock Speed16 MHz
 



Sursa pe care o folosesc este una de 12 V și 29 A. Cred ca corespunde perfect aplicației meu.




Le-am și conectat și cred că se înțeleg destul de bine :)



Am folosit conector alimentare AC Standard IEC60320 cu întrerupător pentru ca o sa montez sursa într-o carcasa potrivita ;).

Ar urma în pasul următor driverele pentru motoare și motoarele Nema17 iar apoi componentele mecanice. Din cate am auzit parte mecanica ar fi cea mai complicata . 



marți, 5 august 2014

Vorbe de duh din cartea "The Mythical Man-Month"


Good cooking takes time. If you are made to wait, it is to serve you better, and to please you. 

More software projects have gone awry for lack of calendar time
than for all other causes combined. Why is this cause of disaster
so common?

First, our techniques of estimating are poorly developed. More
seriously, they reflect an unvoiced assumption which is quite untrue,
i.e., that all will go well.

Second, our estimating techniques fallaciously confuse effort
with progress, hiding the assumption that men and months are
interchangeable.

Third, because we are uncertain of our estimates, software
managers often lack the courteous stubbornness of Antoine's chef.

Fourth, schedule progress is poorly monitored. Techniques
proven and routine in other engineering disciplines are considered
radical innovations in software engineering.

Fifth, when schedule slippage is recognized, the natural (and
traditional) response is to add manpower. Like dousing a fire with
gasoline, this makes matters worse, much worse. More fire requires
more gasoline, and thus begins a regenerative cycle which
ends in disaster.



luni, 4 august 2014

Calcularea CRC-ului pentru standardul SAE-J1850 CRC8

CRC (Cyclic redundancy check ) este o metoda matematica bazata pe polinoame care verifica integritatea datelor.
Polinomul pentru standardul SAE-J1850 este P(x) = x^4+x^3+x^2+x^0 => 11101 = 0x1D Algoritmul cel mai rapid de calcul se bazeaza pe folosirea unui lookup table. Acest vector este calculat in prealabil si valorile se folosesc direct in formula de calcul. Algoritmul este bazat pe aritmetica polinomială de tipul modulo 2
Descriere algoritm:
Algoritmul acționează repetitiv la nivelul biților executându-se operatia XOR cu numarul divizor. Bitii rezultat sunt copiați apoi direct pentru pasul urmator. Divizorul este apoi mutat un bit mai la dreapta, iar procesul se repetă până când împărțitor-ul ajunge la capătul din dreapta al rândului de intrare.
Exemplu:

11010011101100 000 - input right padded by 3 bits
1011               - divisor
01100011101100 000 - result see note *
 1011              - divisor
00111011101100 000
  1011
00010111101100 000
   1011
00000001101100 000 - note **
       1011             
00000000110100 000
        1011
00000000011000 000
         1011
00000000001110 000
          1011
00000000000101 000 
           101 1
-----------------
00000000000000 100 <--- remainder (3 bits).  Division algorithm stops here as quotient is equal to zero.

* note the first four bits are the XOR with the divisor beneath, the rest of the bits are unchanged
** that the divisor moves over to align with the next 1 in the dividend (since quotient for that step was zero)
   (in other words, it doesn't necessarily move one bit per iteration)

Codul sursa:

#define CRC_8_POLYNOMIAL            (0x1DU)
#define CRC_8_RESULT_WIDTH          (8U)

static const uint8 crcTable[CRC_TABLE_SIZE] = {
    (0x00U), (0x1dU), (0x3aU), (0x27U), (0x74U),
    (0x69U), (0x4eU), (0x53U), (0xe8U), (0xf5U),
    (0xd2U), (0xcfU), (0x9cU), (0x81U), (0xa6U),
    (0xbbU), (0xcdU), (0xd0U), (0xf7U), (0xeaU),
    (0xb9U), (0xa4U), (0x83U), (0x9eU), (0x25U),
    (0x38U), (0x1fU), (0x02U), (0x51U), (0x4cU),
    (0x6bU), (0x76U), (0x87U), (0x9aU), (0xbdU),
    (0xa0U), (0xf3U), (0xeeU), (0xc9U), (0xd4U),
    (0x6fU), (0x72U), (0x55U), (0x48U), (0x1bU),
    (0x06U), (0x21U), (0x3cU), (0x4aU), (0x57U),
    (0x70U), (0x6dU), (0x3eU), (0x23U), (0x04U),
    (0x19U), (0xa2U), (0xbfU), (0x98U), (0x85U),
    (0xd6U), (0xcbU), (0xecU), (0xf1U), (0x13U),
    (0x0eU), (0x29U), (0x34U), (0x67U), (0x7aU),
    (0x5dU), (0x40U), (0xfbU), (0xe6U), (0xc1U),
    (0xdcU), (0x8fU), (0x92U), (0xb5U), (0xa8U),
    (0xdeU), (0xc3U), (0xe4U), (0xf9U), (0xaaU),
    (0xb7U), (0x90U), (0x8dU), (0x36U), (0x2bU),
    (0x0cU), (0x11U), (0x42U), (0x5fU), (0x78U),
    (0x65U), (0x94U), (0x89U), (0xaeU), (0xb3U),
    (0xe0U), (0xfdU), (0xdaU), (0xc7U), (0x7cU),
    (0x61U), (0x46U), (0x5bU), (0x08U), (0x15U),
    (0x32U), (0x2fU), (0x59U), (0x44U), (0x63U),
    (0x7eU), (0x2dU), (0x30U), (0x17U), (0x0aU),
    (0xb1U), (0xacU), (0x8bU), (0x96U), (0xc5U),
    (0xd8U), (0xffU), (0xe2U), (0x26U), (0x3bU),
    (0x1cU), (0x01U), (0x52U), (0x4fU), (0x68U),
    (0x75U), (0xceU), (0xd3U), (0xf4U), (0xe9U),
    (0xbaU), (0xa7U), (0x80U), (0x9dU), (0xebU),
    (0xf6U), (0xd1U), (0xccU), (0x9fU), (0x82U),
    (0xa5U), (0xb8U), (0x03U), (0x1eU), (0x39U),
    (0x24U), (0x77U), (0x6aU), (0x4dU), (0x50U),
    (0xa1U), (0xbcU), (0x9bU), (0x86U), (0xd5U),
    (0xc8U), (0xefU), (0xf2U), (0x49U), (0x54U),
    (0x73U), (0x6eU), (0x3dU), (0x20U), (0x07U),
    (0x1aU), (0x6cU), (0x71U), (0x56U), (0x4bU),
    (0x18U), (0x05U), (0x22U), (0x3fU), (0x84U),
    (0x99U), (0xbeU), (0xa3U), (0xf0U), (0xedU),
    (0xcaU), (0xd7U), (0x35U), (0x28U), (0x0fU),
    (0x12U), (0x41U), (0x5cU), (0x7bU), (0x66U),
    (0xddU), (0xc0U), (0xe7U), (0xfaU), (0xa9U),
    (0xb4U), (0x93U), (0x8eU), (0xf8U), (0xe5U),
    (0xc2U), (0xdfU), (0x8cU), (0x91U), (0xb6U),
    (0xabU), (0x10U), (0x0dU), (0x2aU), (0x37U),
    (0x64U), (0x79U), (0x5eU), (0x43U), (0xb2U),
    (0xafU), (0x88U), (0x95U), (0xc6U), (0xdbU),
    (0xfcU), (0xe1U), (0x5aU), (0x47U), (0x60U),
    (0x7dU), (0x2eU), (0x33U), (0x14U), (0x09U),
    (0x7fU), (0x62U), (0x45U), (0x58U), (0x0bU),
    (0x16U), (0x31U), (0x2cU), (0x97U), (0x8aU),
    (0xadU), (0xb0U), (0xe3U), (0xfeU), (0xd9U),
    (0xc4U)
};

/**
 * @brief : Calculation of SAE-J1850 CRC8
 * P(x) =  x^4 + x^3 + x^2 + 1 -> 0x1D
 * */
uint8 Crc( uint8 const DataPtr[],
           uint8 nBytes, 
           uint8 Crc_Polynomial, 
           uint8 InitValue )
{
  uint8 byte;
  uint8 Idx;
  uint32 crcValue = InitValue;

  /*
   * Divide the message by the polynomial, a byte at a time.
   */
  for (byte = 0; byte < nBytes; ++byte)
  {
      Idx = (DataPtr[byte] ^ crcValue) & (uint32)0x00FFU;
      crcValue = crcTable[Idx] ^ (crcValue << CRC_8_RESULT_WIDTH);
  }
  /*
   * The final remainder is the CRC.
   */
  return ~(crcValue);
}  

/**
 * @brief : AUTOSAR interface for CRC Calculation of SAE-J1850 CRC8
 * */
uint8 Crc_CalculateCRC8( const uint8* Crc_DataPtr,
                         uint32 Crc_Length,
                         uint8 Crc_StartValue8,
                         boolean Crc_IsFirstCall
                       )
{
  uint8 crc_local = E_NOT_OK;

  if(Crc_DataPtr != NULL_PTR)
  {
    if(Crc_IsFirstCall == TRUE)
    {
      crc_local = CRC_8_INITIAL_VALUE;
    }
    else
    {
      crc_local = Crc_StartValue8;
    }
    crc_local = Crc(Crc_DataPtr, Crc_Length, CRC_8_POLYNOMIAL, crc_local);
  }

  return (crc_local);
}

luni, 9 iunie 2014

Mini-proiectul de vineri (3) - Controlul unui panou LCD 16x2 folosind Arduino

Recent mi-am construit o noua placa bazata pe Arduino si m-am gandit sa o testez intr-un mod util. Folosind noua placa controlez un panoul LCD 16x2 si afisez cifrele de la 0 la 9. Am conectat totul dupa schema de mai jos si totul a mers ca uns.
Schema electronica de control:

Montajul folosind placa Arduino:


Montajul folosind placa DIY bazata pe Arduino:



Progrămelul de control :
/* include the library code: */
#include "LiquidCrystal.h"

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  // set up the LCD's number of columns and rows: 
  lcd.begin(16,2);
}

void loop() {
  // set the cursor to (0,0):
  lcd.setCursor(0, 0);
  // print from 0 to 9:
  for (int thisChar = 0; thisChar < 10; thisChar++) {
   lcd.print(thisChar);
   delay(500);
  }

  // set the cursor to (16,1):
  lcd.setCursor(16,1);
  // set the display to automatically scroll:
  lcd.autoscroll();
  // print from 0 to 9:
  for (int thisChar = 0; thisChar < 10; thisChar++) {
    lcd.print(thisChar);
    delay(500);
  }
  // turn off automatic scrolling
  lcd.noAutoscroll();
  
  // clear screen for the next loop:
  lcd.clear();
}

Tutorial inspirat de pe Arduino Lesson 11. LCD Displays - Part 1

Sper sa fie de folos cuiva.

O dupa-amiaza placuta!

luni, 5 mai 2014

Mini proiectul de vineri (luni :) ) (2) - Controlarea unui motor DC folosind Arduino

Azi am meșterit un circuit de control al turației unui motor DC. Cred ca e cel mai simplu circuit bazat pe un tranzistor, o dioda și o rezistenta, toate conectate ca în schema de mai jos. In plus am mai folosit un buton pentru a incrementa viteza de rotație cu 10 unități. In momentul în care butonul nu este apăsat atunci viteza de rotație a motorului va scădea cu 5 unități.
Schema electronica de control:

Montajul folosind placa Arduino:

Montajul folosind placa DIY bazata pe Arduino:

Progrămelul de control :
/*
Adafruit Arduino - Lesson 13. DC Motor
*/

// Pin 8 has an LED connected on most Arduino boards.
// give it a name:
int led1 = 8;
const int buttonPin = 2; // the number of the pushbutton pin
int motorPin = 3;
int speed = 100;
// variables will change:
int buttonState = 0;  // variable for reading the pushbutton status

void setup() 
{ 
  pinMode(motorPin, OUTPUT);
  // initialize the digital pin as an output.
  pinMode(led1, OUTPUT);
  //randomSeed(analogRead(0));
  analogWrite(motorPin, speed);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT); 
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);   
} 
void loop() 
{
 // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {     
    // increase DC motor speed:    
    speed += 10; 
  } 
  else {
    // reduce DC motor speed:    
    speed -= 5; 
  } 
  // print the results to the serial monitor:
  Serial.print("Speed = " );                       
  Serial.println(speed); 
  
  if (speed >= 0 && speed <= 255)
  {
    analogWrite(motorPin, speed);
  }
  SetToHigh(led1); //turn the LED on (HIGH is the voltage level)    
  SetToLow(led1); //turn the LED off by making the voltage LOW  
} 

void SetToHigh(int led)
{
  digitalWrite(led, HIGH); // turn the LED off by making the voltage LOW
  delay(500); // wait for a second
}
void SetToLow(int led)
{
  digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
  delay(500); // wait for a second
}


Tutorial inspirat de pe learn.adafruit.com/adafruit-arduino-lesson-13-dc-motors/.
Week-end plăcut tuturor!

RepRap open source 3D printer

Earth - Live streaming video by Ustream


Live streaming video by Ustream

3d-printed prosthesis

Imprimarea ortezelor si a protezelor a devenit foarte accesibila tuturor folosind imprimatele 3D personale. Foarte tare.

joi, 24 aprilie 2014

Singularity

Singularitatea este momentul în timp când inteligenta artificiala devine conștientă și independentă fizic și cognitiv. Mai departe de acel moment în timp, noi încetăm să existăm și viitorul nu mai poate fi prezis. Dezvoltarea acestei inteligente artificiale a început în momentul în care au apărut computerele. Toată omenirea își aduce contribuția cu câte un "bit" de informație (voluntar sau involuntar) la definitivarea inteligentei artificiale. Mi se pare ca suntem "ghidați" de o forță nevăzută spre inevitabil, spre singularitate.

miercuri, 23 aprilie 2014

Masina autonoma facuta de Budisteanu Ionut Alexandru

Tradiția încondeiatului ouălor

C embedded questions (4): What is the difference between strings and character arrays?

A major difference is: string will have static storage duration, whereas as a character array will not, unless it is explicitly specified by using the static keyword.
Actually, a string is a character array with following properties:
* the multi byte character sequence, to which we generally call string, is used to initialize an array of static storage duration. The size of this array is just sufficient to contain these characters plus the terminating NUL character.
* it not specified what happens if this array, i.e., string, is modified.
* Two strings of same value[1] may share same memory area. For example, in the following declarations:
char *s1 = “Perl has a strong linkage with PHP”;
char *s2 = “Perl has a strong linkage with PHP”;

The strings pointed by s1 and s2 may reside in the same memory location. But, it is not true for the following:
char ca1[] = “Perl has a strong linkage with PHP”;
char ca2[] = “Perl has a strong linkage with PHP”;

Fuziunea - energia viitorului

duminică, 20 aprilie 2014

C embedded questions (3): Advantages of a macro over a function?


Macro gets to see the Compilation environment, so it can expand
____TIME__ __FILE__ #defines. It is expanded by the preprocessor.

For example, you can’t do this without macros:

#define PRINT(EXPR) printf( #EXPR “=%d\n”, EXPR) 
PRINT( 5+6*7 ) // expands into printf(”5+6*7=%d”, 5+6*7 ); 

You can define your mini language with macros:

#define strequal(A,B) (!strcmp(A,B)) 

Macros are a necessary evils of life. The purists don’t like them, but

without it no real work gets done.

joi, 17 aprilie 2014

World's Toughest Job - #worldstoughestjob

C embedded questions (2): What does static variable mean?


There are 3 main uses for the static.

1. If you declare within a function:

It retains the value between function calls


2.If it is declared for a function name:

By default function is extern so it will be visible from other files, if the

function declaration is as static it is invisible for the outer files


3. Static for global variables:

By default we can use the global variables from outside files If it is

static global that variable is limited to with in the file

miercuri, 16 aprilie 2014

C embedded questions (1): What are the differences between malloc() and calloc()?

There are 2 differences. First, is in the number of arguments. malloc() takes a single argument(memory required in bytes), while calloc() needs 2 arguments(number of variables to allocate memory, size in bytes of a single variable). Secondly, malloc() does not initialize the memory allocated, while calloc() initializes the allocated memory to ZERO.

luni, 14 aprilie 2014

7 Reasons Why You Will Never Do Anything Amazing With Your Life

Nu prea sunt de acord cu folosirea "negatiei" cand vine vorba de incurajare, dar cateodata e bine sa cunosti adevarul crud ...

“Basically, what I am trying to tell you is that, in this game called life, you don’t stand a chance…

1. BECAUSE YOU HAVE NOT FAILED ENOUGH

Because you are comfortable in your mediocrity; because you choose not to try.
Because it is easier to talk about learning that new (programming?) language as opposed to actually learning it.
Because you think everything is too hard or too complicated so you will just “sit this one out”, or maybe you’ll, “do-it-tomorrow”!
Because you hate your job but won’t get a new one; because it is easy to reject rejection.
Because while you’re sitting around failing to try, I am out there trying to fail, challenging myself, learning new things and failing as fast as possible.
Because as I fail, I learn, and then adjust my course to make sure my path is always forward. Like the process of annealing steel, I’ve been through the fire and pounded into shape. The shape of a sword with polished edges and a razor sharp blade that will cut you in half if you are not equally hardened.

2. BECAUSE YOU CARE WHAT OTHERS THINK ABOUT YOU

Because you have to fit in.
Because you believe that being different is only cool if you’re different in the same way that other people are different.
Because you are afraid to embrace your true self for fear of how the world will see you. You think that because you judge others, this means that those people must, in-turn, be judging you.
Because you care more about the stuff you have as opposed to the things you’ve done.
Because while you’re out spending your money on new outfits, new cars, overpriced meals or nights at the bar, I’ll be investing in myself. And while you try to fit in with the world I’ll make the world fit in with me.
Because I will recklessly abandon all insecurities and expose my true self to the world. I will become immune to the impact of your opinion and stand naked in a crowd of ideas; comfortable in knowing that while you married the mundane I explored the exceptional.

3. BECAUSE YOU THINK YOU ARE SMARTER THAN YOU ARE

Because you did what everyone else did; you studied what they studied and read what they read.
Because you learned what you had to learn in order to pass their tests and you think that makes you smart.
Because you think learning is only something people do in schools.
Because while you were away at college, I was studying life; because instead of learning about the world in a classroom I went out and learned it by living.
Because I know more than any piece of paper you could ever frame from a university. Because smart is not what you learn, it’s how you live.
Because I might not have a degree but I challenge you to find a topic that I can’t talk to you about cohesively.
Because I could pass your tests if I had to, but you couldn’t stand for a single second in the face of the tests that life has thrown me. Tests that are not graded on a bell curve or by percentages; tests that are graded by one simple stipulation: survival!

4. BECAUSE YOU DON’T READ

Because you read the things you are required to read or nothing at all.
Because you think history is boring and philosophy is stupid.
Because you would rather sit and watch “E!” or “MTV” instead of exploring something new, instead of diving head first, into the brain of another man in an attempt to better understand the world around you.
Because you refuse to acknowledge that all the power in the world comes from the words of those that lived before us. That anything you desire can be had by searching through the multitude of words that are available to us now more abundantly than ever before.
Because you are probably not reading this article even though you know you should.
Because the people that are reading this already know these things.
Because you can lead a horse to water but you can’t make him drink.

5. BECAUSE YOU LACK CURIOSITY

Because you get your news from copy-cat members of the state-controlled media.
Because you are unwilling to ask this simple question… “What if it’s all a lie?”, and accept the possibility that maybe it is; that just maybe, the methods of mass media are under direct orders to: keep you distracted.
Because you call me a know-it-all but refuse to call yourself a know-nothing-at-all.
Because I thirst for knowledge, regardless the topic.
Because while you’re busy playing Candy Crush, or Megalopolis, I am reading about string theory and quantum mechanics.
Because while you waste your time with Tosh.o I am learning how to edit video, build websites and design mobile apps.
Because if we were to go heads-up in a debate, I would crush you. I would make it a point to defeat my own argument; from every imaginable angle; in order to understand everything you might be able to use against me.
Because I would dedicate myself to understanding both sides of the argument so thoroughly that I could argue your side for you and win; even after having just handed you a defeat in the same debate.

6. BECAUSE YOU DON’T ASK ENOUGH QUESTIONS

Because you do not question authority.
Because you don’t question yourself.
Because you don’t understand the power of properly placed questioning in life, respectful disagreements and standing up for what you know to be right in the face of someone telling you otherwise. Unable to question reality; stuck in a self imposed survival strategy within a matrix-style monotony.
Because I know that you will give me all the information I need to destroy you by letting you talk.
Because I study human behaviors and you ignore everyone but yourself.
Because I watch how you say the things you say just as closely as I listen to what you say; and you say way too much!
Because control comes, not from spewing your ignorance like some incurable case of logorrhea, but from properly structuring the context of your questions.
Because I study the premise of your argument and destroy it from the ground level before you even get a chance to establish your ideas.

7. BECAUSE YOU CAN’T HANDLE THE TRUTH

Because you refuse to admit that you don’t even know the things you don’t know.
Because there isn’t an article online that would make up for all the time you have wasted in life.
Because even if I told you everything could be different tomorrow you would wait until then to begin doing anything about it.
Because even when you think I’m not, I’m aware of my surroundings.
Because you think that since I have not acknowledged you, it means that I have not seen you.
Because, you walk around with your head up your ass, oblivious to the world around you. Blissfully ignorant of the reality that sits so close to your face that if you stuck your tongue out, just once, you would taste it and realize how delicious the truth actually is.
Because you would become an instant addict. Unable to pull yourself from the teat of truth. Finally able to understand your lack of understanding, and then you would see; then you would know that the only thing holding you back from doing something truly amazing, is you.
Explore the original article and join the discussion @ Raymmar.com

Heartbleed

vineri, 11 aprilie 2014

Mini-proiectul de vineri (1) - Controlarea unui LED RGB cu Arduino

Am fost foarte curios cum poți sa controlezi un LED RGB folosind Arduino și am purces la treaba. Mi-am cumpărat un LED RGB , 3 rezistente de 220 ohmi și 4 fire , iar apoi le-am conectat ca în imaginile de mai jos.
Schema electrica arata cam asa :

Conexiunea tuturor firelor cu placa Arduino:

Conexiunea la pinii LED RGB:

Conexiunea la pinii Arduino:

Placa DIY bazata pe Arduino:

Progrămelul de control :
    /*
    Adafruit Arduino - Lesson 3. RGB LED
    */
     
    int redPin = 11;
    int greenPin = 10;
    int bluePin = 9;
     
    //uncomment this line if using a Common Anode LED
    //#define COMMON_ANODE
     
    void setup()
    {
    pinMode(redPin, OUTPUT);
    pinMode(greenPin, OUTPUT);
    pinMode(bluePin, OUTPUT);
    }
     
    void loop()
    {
    setColor(255, 0, 0); // red
    delay(1000);
    setColor(0, 255, 0); // green
    delay(1000);
    setColor(0, 0, 255); // blue
    delay(1000);
    setColor(255, 255, 0); // yellow
    delay(1000);
    setColor(80, 0, 80); // purple
    delay(1000);
    setColor(0, 255, 255); // aqua
    delay(1000);
    }
     
    void setColor(int red, int green, int blue)
    {
    #ifdef COMMON_ANODE
    red = 255 - red;
    green = 255 - green;
    blue = 255 - blue;
    #endif
    analogWrite(redPin, red);
    analogWrite(greenPin, green);
    analogWrite(bluePin, blue);
    }


Tutorial inspirat de pe learn.adafruit.com.
Week-end plăcut tuturor!

Browserul Tor

Pentru un browsing anonim pe internet va recomand Tor impreuna cu Tails OS. Se poate folosi foarte usor si cu Windows dar chiar și cu RaspberryPi denumit Onion Pi (RaspberryPi + Tor).
Cum funcționează Tor ? Practic, transportul datelor se routeaza prin servere sigure si criptate. Routarea se face prin mai multe servere astfel încât sa se piardă adresa de origine. Mai mult IP-ul vostru este modificat iar alte site-uri va "vad" ca și cum ați fi în alta locatie .



Merita folosit in cazuri excepționale .. Happy browsing !

O opinie diferita despre Arduino :)

sâmbătă, 29 martie 2014

Masina de paine


 De curând am cumparat o masina de paine Moulinex. Tot ce pot sa spun este ca pâinea de casă este extraordinara si este cu mult mai bună decât cea din comerț.

Masina de paine Moulinex Homebread OW1101, 600W, 900g, 12 programe

Rețetă pâine neagră:
  • 320 ml apa
  • 2 lingurite rase de sare
  • 3 masuri mari de ulei de măsline
  • 1.5 masuri mici de  drojdie
  • 550 g de faina , de preferat 100 g de faina alba si restul faina neagra
  • 40 g de seminte de in
  • opțional se mai poate adaugă și o linguriță de miere 
Mod de preparare:
  • Se amesteca 10 ml de apa (luata din cei 320 ml cântăriți) cu drojdia si cu mierea până se topesc si devine ca o crema mai subțire
  • Se adaugă apa, sarea  și uleiul în cuva. 
  • Se cerne faina si se adauga in cuva. Faina trebuie cernuta pentru a se aera.
Programul folosit este numărul 3 cu grad de rumenire 2, iar semințele se adaugă atunci când se aude un bipait, după vreo oră. Rezultatul se vede mai jos și va asigura ca este o pâine delicioasă:


Poftă bună !

vineri, 28 martie 2014

What is fusion ?

Fusion is the process at the core of our Sun. What we see as light and feel as warmth is the result of a fusion reaction: hydrogen nuclei collide, fuse into heavier helium atoms and release tremendous amounts of energy in the process.The gravitational forces at play in the Universe have created the perfect conditions for fusion. Over billions of years, these forces caused the hydrogen clouds of the early Universe to gather into massive stellar bodies. In the extreme density and temperature of their cores, fusion occurs.

How does fusion produce energy?

Atoms never rest: the hotter they are, the faster they move. In the core of our Sun, temperatures reach 15,000,000° Celsius. Hydrogen atoms are in a constant state of agitation, colliding at very great speeds. The natural electrostatic repulsion that exists between the positive charges of their nuclei is overcome, and the atoms fuse.  The fusion of light hydrogen atoms (H-H) produces a heavier element, helium.The mass of the resulting helium atom is not the exact sum of the two initial atoms, however—some mass has been lost and great amounts of energy have been gained. This is what Einstein's formula E=mc² describes: the tiny bit of lost mass (m), multiplied by the square of the speed of light (c²), results in a very large figure (E), which is the amount of energy created by a fusion reaction.Every second, our Sun turns 600 million tons of hydrogen into helium, releasing an enormous amount of energy. But without the benefit of gravitational forces at work in our Universe, achieving fusion on Earth has required a different approach.

Tutorial Raspberry Pi - Cum se deschide o usa de garaj cu Raspberry Pi?

Raspberry Pi Garage Door Opener

Tutoriale Arduino despre motorașe de curent continuu


Tutoriale complete de pe adafruit:
Spor la studiat!

Review Arduino Uno

miercuri, 26 martie 2014

Cum se utilizeaza "grep/egrep/fgrep" ?

Utilitarul grep din Unix/Linux/Cygwin se folosește pentru a face căutări de text si de fisiere. Utilitarul are atât de multe opțiuni încât mi-e imposibil sa le acopăr pe toate. Va dau doar câteva exemple iar restul optiunilor va las pe voi sa le descoperiti.
Exemple:
grep "literal_string" filename
grep "string" FILE_PATTERN
grep -i "false" *.c - cauta cuvantul "false" case insensitive in toate fisierele c
grep "FALSE" *.* - cauta cuvantul "FALSE" case sensitive in toate fisierele c
grep -c "struct" *.h - cauta cuvantul "struct" in toate fisierele header h si afiseaza de cate ori a fost gasit

egrep '^(0|1)+ [a-zA-Z]+$' searchfile.txt
match all lines in searchfile.txt which start with a non-empty bitstring, followed by a space, followed by a non-empty alphabetic word which ends the line

egrep -c '^1|01$' lots_o_bits
- count the number of lines in lots_o_bits which either start with 1 or end with 01

egrep -c '10*10*10*10*10*10*10*10*10*10*1' lots_o_bits
- count the number of lines with at least eleven 1's

egrep -i '\' myletter.txt
- list all the lines in myletter.txt containing the word the insensitive of case.

Lista completa cu opțiuni le găsiți mai jos:
NAME
       grep, egrep, fgrep - print lines matching a pattern

SYNOPSIS
       grep [OPTIONS] PATTERN [FILE...]
       grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]

DESCRIPTION
       grep  searches  the named input FILEs (or standard input if no files are named, or if a single hyphen-minus (-) is given as file name) for lines
       containing a match to the given PATTERN.  By default, grep prints the matching lines.

       In addition, two variant programs egrep and fgrep are available.  egrep is the  same  as  grep -E.   fgrep  is  the  same  as  grep -F.   Direct
       invocation as either egrep or fgrep is deprecated, but is provided to allow historical applications that rely on them to run unmodified.

OPTIONS
   Generic Program Information
       --help Print a usage message briefly summarizing these command-line options and the bug-reporting address, then exit.

       -V, --version
              Print the version number of grep to the standard output stream.  This version number should be included in all bug reports (see below).

   Matcher Selection
       -E, --extended-regexp
              Interpret PATTERN as an extended regular expression (ERE, see below).  (-E is specified by POSIX.)

       -F, --fixed-strings
              Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched.  (-F is specified by POSIX.)

       -G, --basic-regexp
              Interpret PATTERN as a basic regular expression (BRE, see below).  This is the default.

       -P, --perl-regexp
              Interpret PATTERN as a Perl regular expression.  This is highly experimental and grep -P may warn of unimplemented features.

   Matching Control
       -e PATTERN, --regexp=PATTERN
              Use  PATTERN  as the pattern.  This can be used to specify multiple search patterns, or to protect a pattern beginning with a hyphen (-).
              (-e is specified by POSIX.)

       -f FILE, --file=FILE
              Obtain patterns from FILE, one per line.  The empty file contains zero patterns, and therefore matches  nothing.   (-f  is  specified  by
              POSIX.)

       -i, --ignore-case
              Ignore case distinctions in both the PATTERN and the input files.  (-i is specified by POSIX.)

       -v, --invert-match
              Invert the sense of matching, to select non-matching lines.  (-v is specified by POSIX.)

       -w, --word-regexp
              Select  only  those  lines  containing  matches  that  form  whole  words.  The test is that the matching substring must either be at the

        -x, --line-regexp
              Select only those matches that exactly match the whole line.  (-x is specified by POSIX.)

       -y     Obsolete synonym for -i.

   General Output Control
       -c, --count
              Suppress  normal  output;  instead  print a count of matching lines for each input file.  With the -v, --invert-match option (see below),
              count non-matching lines.  (-c is specified by POSIX.)

       --color[=WHEN], --colour[=WHEN]
              Surround the matched (non-empty) strings, matching lines, context lines, file names, line numbers,  byte  offsets,  and  separators  (for
              fields  and  groups  of  context  lines)  with  escape sequences to display them in color on the terminal.  The colors are defined by the
              environment variable GREP_COLORS.  The deprecated environment variable GREP_COLOR is still supported,  but  its  setting  does  not  have
              priority.  WHEN is never, always, or auto.

       -L, --files-without-match
              Suppress  normal  output;  instead print the name of each input file from which no output would normally have been printed.  The scanning
              will stop on the first match.

       -l, --files-with-matches
              Suppress normal output; instead print the name of each input file from which output would normally have been printed.  The scanning  will
              stop on the first match.  (-l is specified by POSIX.)

       -m NUM, --max-count=NUM
              Stop  reading  a  file  after NUM matching lines.  If the input is standard input from a regular file, and NUM matching lines are output,
              grep ensures that the standard input is positioned to just after the last matching line before exiting, regardless  of  the  presence  of
              trailing  context  lines.   This  enables a calling process to resume a search.  When grep stops after NUM matching lines, it outputs any
              trailing context lines.  When the -c or --count option is also used, grep does not output a count greater  than  NUM.   When  the  -v  or
              --invert-match option is also used, grep stops after outputting NUM non-matching lines.

       -o, --only-matching
              Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line.

       -q, --quiet, --silent
              Quiet; do not write anything to standard output.  Exit immediately with zero status if any match is found, even if an error was detected.
              Also see the -s or --no-messages option.  (-q is specified by POSIX.)

       -s, --no-messages
              Suppress error messages about nonexistent or unreadable files.  Portability note: unlike GNU grep, 7th Edition Unix grep did not  conform
              to  POSIX,  because  it  lacked  -q and its -s option behaved like GNU grep's -q option.  USG-style grep also lacked -q but its -s option
              behaved like GNU grep.  Portable shell scripts should avoid both -q and -s and should redirect standard and  error  output  to  /dev/null
              instead.  (-s is specified by POSIX.)
   Output Line Prefix Control
       -b, --byte-offset
              Print  the  0-based byte offset within the input file before each line of output.  If -o (--only-matching) is specified, print the offset
              of the matching part itself.

       -H, --with-filename
              Print the file name for each match.  This is the default when there is more than one file to search.

       -h, --no-filename
              Suppress the prefixing of file names on output.  This is the default when there is only one file (or only standard input) to search.

       --label=LABEL
              Display input actually coming from standard input as input coming from file LABEL.  This is especially useful for tools like zgrep, e.g.,
              gzip -cd foo.gz | grep --label=foo something

       -n, --line-number
              Prefix each line of output with the 1-based line number within its input file.  (-n is specified by POSIX.)

       -T, --initial-tab
              Make sure that the first character of actual line content lies on a tab stop, so that the alignment of tabs looks normal.  This is useful
              with options that prefix their output to the actual content: -H,-n, and -b.  In order to improve the probability that lines from a single
              file  will  all  start  at the same column, this also causes the line number and byte offset (if present) to be printed in a minimum size
              field width.

       -u, --unix-byte-offsets
              Report Unix-style byte offsets.  This switch causes grep to report byte offsets as if the file were a Unix-style text file, i.e., with CR
              characters  stripped  off.   This  will produce results identical to running grep on a Unix machine.  This option has no effect unless -b
              option is also used; it has no effect on platforms other than MS-DOS and MS-Windows.

       -Z, --null
              Output a zero byte (the ASCII NUL character) instead of the character that normally follows a file name.  For example, grep -lZ outputs a
              zero  byte  after  each  file  name instead of the usual newline.  This option makes the output unambiguous, even in the presence of file
              names containing unusual characters like newlines.  This option can be used with commands like find -print0, perl -0, sort -z, and  xargs
              -0 to process arbitrary file names, even those that contain newline characters.

   Context Line Control
       -A NUM, --after-context=NUM
              Print  NUM  lines of trailing context after matching lines.  Places a line containing a group separator (--) between contiguous groups of
              matches.  With the -o or --only-matching option, this has no effect and a warning is given.

       -B NUM, --before-context=NUM
              Print NUM lines of leading context before matching lines.  Places a line containing a group separator (--) between contiguous  groups  of
              matches.  With the -o or --only-matching option, this has no effect and a warning is given.

       -C NUM, -NUM, --context=NUM
              Print NUM lines of output context.  Places a line containing a group separator (--) between contiguous groups of matches.  With the -o or
              --only-matching option, this has no effect and a warning is given.

 File and Directory Selection
       -a, --text
              Process a binary file as if it were text; this is equivalent to the --binary-files=text option.

       --binary-files=TYPE
              If the first few bytes of a file indicate that the file contains binary data, assume that the file is of type TYPE.  By default, TYPE  is
              binary,  and  grep  normally outputs either a one-line message saying that a binary file matches, or no message if there is no match.  If
              TYPE is without-match, grep assumes that a binary file does not match; this is equivalent to the  -I  option.   If  TYPE  is  text,  grep
              processes  a  binary file as if it were text; this is equivalent to the -a option.  Warning: grep --binary-files=text might output binary
              garbage, which can have nasty side effects if the output is a terminal and if the terminal driver interprets some of it as commands.

       -D ACTION, --devices=ACTION
              If an input file is a device, FIFO or socket, use ACTION to process it.  By default, ACTION is read, which means that  devices  are  read
              just as if they were ordinary files.  If ACTION is skip, devices are silently skipped.

       -d ACTION, --directories=ACTION
              If  an input file is a directory, use ACTION to process it.  By default, ACTION is read, which means that directories are read just as if
              they were ordinary files.  If ACTION is skip, directories are silently skipped.  If ACTION is recurse, grep reads all  files  under  each
              directory, recursively; this is equivalent to the -r option.

       --exclude=GLOB
              Skip  files  whose  base  name  matches GLOB (using wildcard matching).  A file-name glob can use *, ?, and [...]  as wildcards, and \ to
              quote a wildcard or backslash character literally.

       --exclude-from=FILE
              Skip files whose base name matches any of the file-name globs read from FILE (using wildcard matching as described under --exclude).

       --exclude-dir=DIR
              Exclude directories matching the pattern DIR from recursive searches.

       -I     Process a binary file as if it did not contain matching data; this is equivalent to the --binary-files=without-match option.

       --include=GLOB
              Search only files whose base name matches GLOB (using wildcard matching as described under --exclude).

       -R, -r, --recursive
   Other Options
       --line-buffered
              Use line buffering on output.  This can cause a performance penalty.

       --mmap If possible, use the mmap(2) system call to read input, instead of the default read(2) system call.  In some  situations,  --mmap  yields
              better  performance.   However,  --mmap  can  cause  undefined  behavior  (including  core  dumps) if an input file shrinks while grep is
              operating, or if an I/O error occurs.

       -U, --binary
              Treat the file(s) as binary.  By default, under MS-DOS and MS-Windows, grep guesses the file type by looking at the contents of the first
              32KB  read  from the file.  If grep decides the file is a text file, it strips the CR characters from the original file contents (to make
              regular expressions with ^ and $ work correctly).  Specifying -U overrules this guesswork, causing all files to be read and passed to the
              matching  mechanism  verbatim;  if  the  file  is  a  text  file  with  CR/LF pairs at the end of each line, this will cause some regular
              expressions to fail.  This option has no effect on platforms other than MS-DOS and MS-Windows.

       -z, --null-data
              Treat the input as a set of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline.  Like the -Z or  --null
              option, this option can be used with commands like sort -z to process arbitrary file names.

REGULAR EXPRESSIONS
       A  regular  expression is a pattern that describes a set of strings.  Regular expressions are constructed analogously to arithmetic expressions,
       by using various operators to combine smaller expressions.

       grep understands two different versions of regular expression syntax: "basic" and "extended."  In GNU grep, there is no difference in  available
       functionality using either syntax.  In other implementations, basic regular expressions are less powerful.  The following description applies to
       extended regular expressions; differences for basic regular expressions are summarized afterwards.

       The fundamental building blocks are the regular expressions that match a single character.  Most characters, including all letters  and  digits,
       are regular expressions that match themselves.  Any meta-character with special meaning may be quoted by preceding it with a backslash.

       The period . matches any single character.

   Character Classes and Bracket Expressions
       A  bracket  expression is a list of characters enclosed by [ and ].  It matches any single character in that list; if the first character of the
       list is the caret ^ then it matches any character not in the list.  For example, the regular expression [0123456789] matches any single digit.

       Within a bracket expression, a range expression consists of two characters separated by a hyphen.  It matches any single  character  that  sorts
       between  the two characters, inclusive, using the locale's collating sequence and character set.  For example, in the default C locale, [a-d] is
       equivalent to [abcd].  Many locales sort characters in dictionary order, and in these locales [a-d] is typically not equivalent  to  [abcd];  it
       might  be  equivalent  to  [aBbCcDd], for example.  To obtain the traditional interpretation of bracket expressions, you can use the C locale by
       setting the LC_ALL environment variable to the value C.

       Finally, certain named classes of characters are predefined within bracket expressions, as follows.  Their names are self explanatory, and  they
       are  [:alnum:], [:alpha:], [:cntrl:], [:digit:], [:graph:], [:lower:], [:print:], [:punct:], [:space:], [:upper:], and [:xdigit:].  For example,
       [[:alnum:]] means [0-9A-Za-z], except the latter form depends upon the C locale  and  the  ASCII  character  encoding,  whereas  the  former  is
       independent  of  locale and character set.  (Note that the brackets in these class names are part of the symbolic names, and must be included in
       addition to the brackets delimiting the bracket expression.)  Most meta-characters lose their special meaning inside  bracket  expressions.   To
       include a literal ] place it first in the list.  Similarly, to include a literal ^ place it anywhere but first.  Finally, to include a literal -
       place it last.
 Anchoring
       The caret ^ and the dollar sign $ are meta-characters that respectively match the empty string at the beginning and end of a line.

   The Backslash Character and Special Expressions
       The symbols \< and \> respectively match the empty string at the beginning and end of a word.  The symbol \b matches the  empty  string  at  the
       edge of a word, and \B matches the empty string provided it's not at the edge of a word.  The symbol \w is a synonym for [[:alnum:]] and \W is a
       synonym for [^[:alnum:]].

   Repetition
       A regular expression may be followed by one of several repetition operators:
       ?      The preceding item is optional and matched at most once.
       *      The preceding item will be matched zero or more times.
       +      The preceding item will be matched one or more times.
       {n}    The preceding item is matched exactly n times.
       {n,}   The preceding item is matched n or more times.
       {,m}   The preceding item is matched at most m times.
       {n,m}  The preceding item is matched at least n times, but not more than m times.

   Concatenation
       Two regular expressions may be concatenated; the resulting regular expression matches any string formed by  concatenating  two  substrings  that
       respectively match the concatenated expressions.

   Alternation
       Two  regular  expressions  may  be joined by the infix operator |; the resulting regular expression matches any string matching either alternate
       expression.

   Precedence
       Repetition takes precedence over concatenation, which in turn takes precedence  over  alternation.   A  whole  expression  may  be  enclosed  in
       parentheses to override these precedence rules and form a subexpression.

   Back References and Subexpressions
       The back-reference \n, where n is a single digit, matches the substring previously matched by the nth parenthesized subexpression of the regular
       expression.

   Basic vs Extended Regular Expressions
       In basic regular expressions the meta-characters ?, +, {, |, (, and ) lose their special meaning; instead use the backslashed versions  \?,  \+,
       \{, \|, \(, and \).

       Traditional egrep did not support the { meta-character, and some egrep implementations support \{ instead, so portable scripts should avoid { in
       grep -E patterns and should use [{] to match a literal {.

       GNU grep -E attempts to support traditional usage by assuming that {  is  not  special  if  it  would  be  the  start  of  an  invalid  interval
       specification.   For  example,  the  command  grep -E '{1'  searches  for the two-character string {1 instead of reporting a syntax error in the
       regular expression.  POSIX.2 allows this behavior as an extension, but portable scripts should avoid it.
ENVIRONMENT VARIABLES
       The behavior of grep is affected by the following environment variables.

       The locale for category LC_foo is specified by examining the three environment variables LC_ALL, LC_foo, LANG, in  that  order.   The  first  of
       these  variables  that  is  set  specifies  the  locale.  For example, if LC_ALL is not set, but LC_MESSAGES is set to pt_BR, then the Brazilian
       Portuguese locale is used for the LC_MESSAGES category.  The C locale is used if none of these environment variables  are  set,  if  the  locale
       catalog is not installed, or if grep was not compiled with national language support (NLS).

       GREP_OPTIONS
              This  variable  specifies  default  options  to  be  placed in front of any explicit options.  For example, if GREP_OPTIONS is '--binary-
              files=without-match --directories=skip', grep behaves as if the two options --binary-files=without-match and --directories=skip had  been
              specified before any explicit options.  Option specifications are separated by whitespace.  A backslash escapes the next character, so it
              can be used to specify an option containing whitespace or a backslash.

       GREP_COLOR
              This variable specifies the color used to highlight matched (non-empty) text.  It is  deprecated  in  favor  of  GREP_COLORS,  but  still
              supported.   The  mt,  ms, and mc capabilities of GREP_COLORS have priority over it.  It can only specify the color used to highlight the
              matching non-empty text in any matching line (a selected line when the -v command-line option is omitted, or a context line  when  -v  is
              specified).  The default is 01;31, which means a bold red foreground text on the terminal's default background.

       GREP_COLORS
              Specifies  the  colors  and  other  attributes  used  to  highlight  various parts of the output.  Its value is a colon-separated list of
              capabilities that defaults to ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36 with the rv and ne boolean  capabilities  omitted  (i.e.,
              false).  Supported capabilities are as follows.

              sl=    SGR  substring  for  whole  selected lines (i.e., matching lines when the -v command-line option is omitted, or non-matching lines
                     when -v is specified).  If however the boolean rv capability and the -v command-line option are  both  specified,  it  applies  to
                     context matching lines instead.  The default is empty (i.e., the terminal's default color pair).

              cx=    SGR substring for whole context lines (i.e., non-matching lines when the -v command-line option is omitted, or matching lines when
                     -v is specified).  If however the boolean rv capability and the -v command-line option are both specified, it applies to  selected
                     non-matching lines instead.  The default is empty (i.e., the terminal's default color pair).

              rv     Boolean  value  that  reverses  (swaps) the meanings of the sl= and cx= capabilities when the -v command-line option is specified.
                     The default is false (i.e., the capability is omitted).

              mt=01;31
                     SGR substring for matching non-empty text in any matching line (i.e., a selected line when the -v command-line option is  omitted,
                     or  a  context line when -v is specified).  Setting this is equivalent to setting both ms= and mc= at once to the same value.  The
                     default is a bold red text foreground over the current line background.

              ms=01;31
                     SGR substring for matching non-empty text in a selected line.  (This is only used when the -v  command-line  option  is  omitted.)
                     The effect of the sl= (or cx= if rv) capability remains active when this kicks in.  The default is a bold red text foreground over
                     the current line background.

              mc=01;31
                     SGR substring for matching non-empty text in a context line.  (This is only used when the -v command-line  option  is  specified.)
                     The effect of the cx= (or sl= if rv) capability remains active when this kicks in.  The default is a bold red text foreground over
                     the current line background.

              fn=35  SGR substring for file names prefixing any content line.  The default is a magenta text foreground  over  the  terminal's  default
                     background.
              ln=32  SGR  substring  for  line  numbers prefixing any content line.  The default is a green text foreground over the terminal's default
                     background.

              bn=32  SGR substring for byte offsets prefixing any content line.  The default is a green text foreground  over  the  terminal's  default
                     background.

              se=36  SGR  substring  for  separators  that are inserted between selected line fields (:), between context line fields, (-), and between
                     groups of adjacent lines when nonzero context is specified (--).  The default is  a  cyan  text  foreground  over  the  terminal's
                     default background.

              ne     Boolean value that prevents clearing to the end of line using Erase in Line (EL) to Right (\33[K) each time a colorized item ends.
                     This is needed on terminals on which EL is not supported.  It is otherwise useful on  terminals  for  which  the  back_color_erase
                     (bce) boolean terminfo capability does not apply, when the chosen highlight colors do not affect the background, or when EL is too
                     slow or causes too much flicker.  The default is false (i.e., the capability is omitted).

              Note that boolean capabilities have no =...  part.  They are omitted (i.e., false) by default and become true when specified.

              See the Select Graphic Rendition (SGR) section in the documentation of the text terminal that is used  for  permitted  values  and  their
              meaning  as character attributes.  These substring values are integers in decimal representation and can be concatenated with semicolons.
              grep takes care of assembling the result into a complete SGR sequence (\33[...m).  Common values to concatenate include 1 for bold, 4 for
              underline,  5  for  blink,  7  for  inverse,  39 for default foreground color, 30 to 37 for foreground colors, 90 to 97 for 16-color mode
              foreground colors, 38;5;0 to 38;5;255 for 88-color and 256-color modes foreground colors, 49 for default background color, 40 to  47  for
              background  colors,  100  to  107 for 16-color mode background colors, and 48;5;0 to 48;5;255 for 88-color and 256-color modes background
              colors.

       LC_ALL, LC_COLLATE, LANG
              These variables specify the locale for the LC_COLLATE  category,  which  determines  the  collating  sequence  used  to  interpret  range
              expressions like [a-z].

       LC_ALL, LC_CTYPE, LANG
              These  variables  specify  the  locale  for  the  LC_CTYPE  category, which determines the type of characters, e.g., which characters are
              whitespace.

       LC_ALL, LC_MESSAGES, LANG
              These variables specify the locale for the LC_MESSAGES category, which determines the language that grep uses for messages.  The  default
              C locale uses American English messages.

       POSIXLY_CORRECT
              If  set,  grep  behaves  as  POSIX.2  requires; otherwise, grep behaves more like other GNU programs.  POSIX.2 requires that options that
              follow file names must be treated as file names; by default, such options are permuted to the front of the operand list and  are  treated
              as  options.   Also,  POSIX.2 requires that unrecognized options be diagnosed as "illegal", but since they are not really against the law
              the default is to diagnose them as "invalid".  POSIXLY_CORRECT also disables _N_GNU_nonoption_argv_flags_, described below.

       _N_GNU_nonoption_argv_flags_
              (Here N is grep's numeric process ID.)  If the ith character of this environment variable's value is 1, do not consider the  ith  operand
              of  grep  to  be  an  option,  even  if it appears to be one.  A shell can put this variable in the environment for each command it runs,
              specifying which operands are the results of file name wildcard expansion and therefore should not be treated as options.  This  behavior
              is available only with the GNU C library, and only when POSIXLY_CORRECT is not set.

EXIT STATUS
       Normally,  the  exit  status  is 0 if selected lines are found and 1 otherwise.  But the exit status is 2 if an error occurred, unless the -q or
       --quiet or --silent option is used and a selected line is found.  Note, however, that POSIX only mandates, for programs such as grep,  cmp,  and
       diff,  that  the exit status in case of error be greater than 1; it is therefore advisable, for the sake of portability, to use logic that tests
       for this general condition instead of strict equality with 2.

COPYRIGHT
       Copyright ▒ 1998, 1999, 2000, 2002, 2005 Free Software Foundation, Inc.

       This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS  FOR  A  PARTICULAR
       PURPOSE.

BUGS
   Reporting Bugs
       Email bug reports to , a mailing list whose web page is .  grep's Savannah bug
       tracker is located at .

   Known Bugs
       Large repetition counts in the {n,m} construct may cause grep to use lots of memory.  In addition, certain  other  obscure  regular  expressions
       require exponential time and space, and may cause grep to run out of memory.

       Back-references are very slow, and may require exponential time.

SEE ALSO
   Regular Manual Pages
       awk(1), cmp(1), diff(1), find(1), gzip(1), perl(1), sed(1), sort(1), xargs(1), zgrep(1), mmap(2), read(2), pcre(3), pcrepattern(3), terminfo(5),
       glob(7), regex(7).

   POSIX Programmer's Manual Page
       grep(1p).

   TeXinfo Documentation
       The full documentation for grep is maintained as a TeXinfo manual.  If the info and grep programs are  properly  installed  at  your  site,  the
       command

              info grep

       should give you access to the complete manual.