Among other things, the aim of writing this tic tac toe game, is showing what a computer is really about, which is just a machine which follow instructions. Instructions which are written by a human.

So, in other words, a computer is devoid from intelligence, or of a know-how. It can only follow instructions, which are written by a human being.

For the tic tac toe game, the programmer did some analysis of how the game is played, when a win is possible, when a tie is possible, and when losing is a possibility. …

Ohhhhh, you know, I have heard about this onMeasure method, but I have no idea how it works! Hopefully the folks at android, did provide some solid documentation. Wink, Wink Android :)

hmmm, let us first ask, what is onMeasure? onMeasure is a method, which is part of a View lifecycle, and in this method, a View is given the chance, of informing its parent, about its width and its height requirements, and the parent is given the chance, to inform the View back, about the parenting requirements for this View, with regards to width and height.

So, what you…

Having the ability to search the content of files is important, it provides a better workflow, and more productivity.

This is a rundown of the best software, which allows files content to be searched, as in for example, searching for the occurrence of a phrase, or of a word, in let us say a PDF or an EPUB file.

Regain

This is a free software which is based on Apache Lucene. Apache Lucene is used for document indexing. Regain is not limited for searching file contents, but it can additionally index websites. …

A disassembler is a program which is able to generate assembly code from binary code, and a decompiler is a program, which is capable of generating high level language, as for example C, or C++, from assembly code.

This is a list of the best disassemblers, and decompilers under Microsoft windows.

Snowman

The program is very simple, and is easy to use. It is actually open source, and can be used without any installation, so as a portable program.

The binary formats supported by Snowman, are PE, which is Microsoft executable binary format, ELF which is the Linux executable binary format…

The tmpnam function is part of the stdio.h header , which is part of the C standard library . The stdio.h header , is related to performing I/O operations , in a portable manner , across different operating systems .

The signature of the tmpnam function is as follows :

#include <stdio.h>char * tmpnam (char *storage);

The role of the tmpnam function , is to generate a unique file path , which does not exist . Although , at a later point of time , this path might exist or maybe created by other programs . As such it…

The tempfile function has a signature of :

#include <stdio.h>FILE *tmpfile (void);

It is part of the stdio.h header , which is a header related to performing input and output operations , in a portable way , across different operating system . The stdio.h header is part of the C standard library .

The role of the tmpfile function , is to create temporary binary files , that can be used as one’s sees fit , for example to write or read temporary data .

You can think that it is as if this function , is calling the…

The capability of renaming a file in C , is provided by the C standard library , rename function , which is part of the stdio header file .

This function takes the path of the file to rename , including the name of this file , and a path ending , with the new file name .

If a file already exists with that name , it is implementation defined , how this function behaves . …

To remove a file in C , you can use the remove function from the stdio header .

This functions takes the path to the file that should be removed , and it returns 0 on success , and a non zero value on failure . If the file is open , then what happens is implementation defined .

Under unix , more than one link can point to the same file , in this case only one of the links is removed , and not the actual file . …

The short story is that this can be done using the following command ,

sed -E \
-e 's|^[[:blank:]]+||g' \
-e 's|[[:blank:]]+$||g' \
-e 's|([^[[:blank:]]+)([[:blank:]]+)|\1 |g'

So for example if you have a string on which you want to execute this trim command , you can do it like so :

$ echo '    This is     a string    !   ' | sed -E \
> -e 's|^[[:blank:]]+||g' \
> -e 's|[[:blank:]]+$||g' \
> -e 's|([^[[:blank:]]+)([[:blank:]]+)|\1 |g'
This is a string
$ sed -E \
> -e 's|^[[:blank:]]+||g' \
> -e 's|[[:blank:]]+$||g' \
> -e 's|([^[[:blank:]]+)([[:blank:]]+)|\1 |g' <<\eol
> This is…

There are two syntaxes that can be used for a for loop in a linux shell , the first one is more sparse , as in :

for var in words
do
# The program
done

The second one is more terse as in :

for var in words ; do Program ; done ;

Here are some examples to illustrate the two syntaxes :

As with every other program which is run in the shell , the output of the for loop can be redirected to a file , or piped to another program . And the for loop can be run as a background job .

mohamad wael

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store