Wednesday, January 19, 2011

Church Street Orlando New Years

BASH: read and change the value of the PATH variable

In BASH, the PATH environment variable contains the list of directories that look BASH commands typed by us, that we want to execute programs (of course those who do not type preceded by './').

A fairly typical example of the value associated with PATH is:
/ bin: / sbin: / usr / bin: / usr / sbin .
To get the value of the PATH variable on your system, simply run the following command: echo $ PATH
 
(we can print every environment variable in this way).

In the following examples we want to add the path / usr / local / bin to your PATH.
To completely replace the value already defined you can simply do this:
 PATH = / usr / local / bin 

More often add some useful new route to those already defined:
 PATH =% PATH: / usr / local / bin 

In general, all the environment variables can be modified in this way, but you must Use extreme care because modifying them improperly you risk corrupting the system and undermine its normal and proper operation.

To permanently change for all users and the value of the variable you must add the following two lines in the file / etc / profile (preferably before the line containing the string "umask"): PATH =
 % PATH: / usr / local / bin export PATH 

Sunday, January 16, 2011

Sailboat Cast Iron Stoves

BASH: verify possession superuser privileges

Sometimes you need to write a script to automate operations, in whole or in part, must be implemented as a superuser (root or root or administrator ). If we want to simplify that the entire script is executed in superuser mode can be useful to determine, prior to kick off the sequence of operations envisaged, if indeed the user that launched the script meets the root. In other words you want to check if the script was launched by the user root or a non-administrator user via the command sudo (on systems with this feature).
The following script provides an example of how to perform this verification.
 # / bin / bash 
if [`id-u`-eq 0] then echo
"Welcome My Lord" exit 0


else echo "Go away, miserable!" Exit 1 fi


For a more concrete example, although very simple.
 # / bin / bash 
if [`id-u`-eq 0] then rm-rf subdir


exit 0 else echo
"subdir not removed: insufficient priviliges"
exit 1 fi


The operating principle is very simple: the command id-u returns the numeric identifier of the user who launched the script. The user ID with administrative privileges is always 0, and if it's root in the person of a simple user using sudo .

NOTE: The symbol ` is not a simple peak and is obtained by pressing AltGr and ' the Italian keyboard layout (as here).

Thursday, January 13, 2011

How Does The Vitamix 3600 Work?

Sdruzzinà

I learned to see beyond the border, to enjoy being alive, riding the wave of the infinite ..... and you my sweet child that foods my dream and caress my heart, thank you for those moments of infinite life invaded by a glow of stars.
January 12, 2011 ore 17.45 caz ... I'm late ... in super late 42 km separate me from Sdruzzinà .... Ooooo tonight is his majesty " Sdruzzinà" to live with a bunch of friends: crazy eight ultra runners led by Francis, the "usual" Claudio, the stray dock Arco (Trento) Fabio, my son Roberto twenty super sport, low ..... nothing on the bike leg, never having Sdruzzinà , comes with a mtb 100 € ... him by my side to share these moments for me is an endless joy, eeee .... from a youngster of 41 flagship Ennio friend of life and a great sportsman. 19
Meeting at the foot of the climb, Fabio and I start from home by bike, the rest goes into the car. Valpolicella to throttle up and straight to the Adige valley .... nothing to do s ono late, no wind .... thank goodness !!!!! Francesco goes in the car .... from musseu passes Roby with Claudio ... vaiii musseu finally exhausted and with no less than 10 minutes late arriving at Sdruzzinà . What a sight ... 13 cores wrapped by Mother Nature caught by that as well as makes you vibrate .... viaaaaa part is towards the top, starry skies, mild temperatures, what more do you want out of life !!!!! Fire
crazy snake that wind along, view of the Adige Valley ... ... That show overwhelming edge and the white reflection of Mount Baldo ...." I WANT TO DIE "too good. Infinite moments lived on the ramps in the first 20% with Fabio and Francesco and then chasing back where real men from Roby Claudio and leave to enter the human soul of mother nature. Here they are ..... here it is .... Roby and Claudio? Eee .... and Claudio ?!!!!! tranqui Roby not worry Claudio arrives. SIII , flying side by side .... , my heart is full of joy ...... nothing can satisfy the soul like love, the contact, the strain of the forest the seventh km, ramp edges, delirious, wrapped in a slender trees beautiful starry sky. Reflections of my magic lamp in the snow drive us up there where the silence soul everything, THANKS ..... THANKS .... planet earth to exist.

Sunday, January 9, 2011

Biffy Clyro Mountains Piano Tabs

What's in the TODO of QVS-GTK 2.3? New

QVS-GTK 2.2.0 and can not wait to board the undersigned on 2.3, then you may want to know what's in the TODO of QVS-GTK.

I just finished compiling it, so I might as well publish it.
not expect anything great.

  • Classes: I've never been a great fan of OOP, but I must say that the classes greatly simplify the creation and reading the code, which is why, even the 2.3 will bring with it a new migration from "structured" to "object" full and final hope.
  • Link download new version of Windows: It is a fact, that link for the press it does not open anything, but we must solve it sooner or later. We hope the time right.
  • Gtk.store in windows: Some love them, others hate them, the icons on gtk buttons, I may have found a way to display them in windows. Why not?
  • File Translation: Let's face it, QVS-GTK you are doing great, it's time to get him to speak more languages, it is time to create translation files, as with any other applications on GNU / Linux. It will not be easy, but it is an important point.
  • Organizing files into folders: Image files in the / urs? I know you do not, QVS-GTK 2.3 will seek to align themselves with the protocols available for GNU / Linux. Everything in its place.
  • debuild without error: Son of the preceding paragraph. Doing things decent, nothing more Warring at compile time. Will it succeed?
is just like that, who expected great things will be disappointed, but now things are indeed little to do. Sure, could escape some other good news, but I could also keep a few tricks up its sleeve for the 2.4

is too soon to start work, but the road is drawn, who had other suggestions can always leave a comment.

Monday, January 3, 2011

Benzoic Acid Quinine Ch2cl2 Naoh

C + +: problems with copying objects stream

The following compile error (probably surrounded by a number of other lines for our specific code) returned by g + + compiler for a program written in C + + is a symptom of a very specific problem and sneaky:
 
/ usr / include / c + + / 4.4/bits/ios_base.h:
In copy constructor 'std:: basic_ios \u0026lt;char,
std:: char_traits \u0026lt;char>>:: basic_ios (const std:: basic_ios \u0026lt;char,
std::char_traits&lt char&gt &gt&)’:
/usr/include/c++/4.4/bits/ios_base.h:790: error:
‘std::ios_base::ios_base(const std::ios_base&)’ is private
/usr/include/c++/4.4/iosfwd:47: error: within this context
/usr/include/c++/4.4/iosfwd:
In copy constructor ‘std::basic_ofstream&lt char,
std::char_traits&lt char&gt &gt::basic_ofstream(const std::basic_ofstream&lt char,
std::char_traits&lt char&gt &gt&)’:
/usr/include/c++/4.4/iosfwd:84:
note: synthesized method ‘std::basic_ios&lt char,
std::char_traits&lt char&gt &gt::basic_ios(const std::basic_ios&lt char,
std::char_traits&lt char&gt &gt&)’ first required here
/usr/include/c++/4.4/streambuf:
In copy constructor ‘std::basic_filebuf&lt char,
std::char_traits&lt char&gt &gt::basic_filebuf(const std::basic_filebuf&lt char,
std::char_traits&lt char&gt &gt&)’:
/usr/include/c++/4.4/streambuf:770:
error: ‘std::basic_streambuf&lt _CharT, _Traits>::
basic_streambuf(const std::basic_streambuf&lt _CharT, _Traits&gt&)
[with _CharT = char, _Traits = std::char_traits&lt char&gt]’ is private
/usr/include/c++/4.4/iosfwd:78: error: within this context
/usr/include/c++/4.4/iosfwd:
In copy constructor ‘std::basic_ofstream&lt char,
std::char_traits&lt char&gt &gt::basic_ofstream(const std::basic_ofstream&lt char,
std::char_traits&lt char&gt &gt&)’:
/usr/include/c++/4.4/iosfwd:84:
note: synthesized method 'std:: basic_filebuf \u0026lt;char,
std:: char_traits \u0026lt;char>>:: basic_filebuf (const std:: basic_filebuf \u0026lt;char,
std:: char_traits \u0026lt;char>> &)' first required here

All these words really can be summarized in this way: you're trying to copy an object that can not be copied. The object is, in this case, a stream standard library (in my case it was an object of class ofstream).
is important to remember that when you pass an object (or, more generally, a variable) to a function code corresponding invocation of the function will generate a copy of the past, even in this case thus makes an illegal operation and will tell the compiler, so not too clear, that we are wrong.

The solution is simple: just change the function and its invocation so that the past is to be the reference (ie pointer) to the object and not the object itself.

Wrong version: class myclass {
 
...
public:
void print (ofstream file) const;}
;

[...]

ofstream file;
File.Open (filename, ios:: out);
myclass obj ();
obj.print (file);

Corrected version: class myclass {
 
...
public:
void print (ofstream * file) const;}
;

[...]

ofstream file;
File.Open (filename, ios:: out);
class obj ();
obj. print (& file);