Twise Random

A site about computer science .
Skip to content
  • apple
  • android
  • c
  • cpp
  • data structure and algorithms
  • macos
  • python
  • tutorials

What is a trigraph in c ?

Posted on October 30, 2019August 27, 2021 by mohamad wael

A trigraph in C is formed of three characters, the first two characters are interrogation marks ??, and the last character is just a regular character.

ISO 646, standardized ASCII, and made national variants of it. The … Read More

c

The DisplayMetrics class in android a tutorial

Posted on October 18, 2019October 29, 2020 by mohamad wael

What is the DisplayMetrics class ?

The DisplayMetrics class is used to get various information about the screen in android .The information that we can get are the following :

  • DENSITY_DEVICE_STABLE : The density of the device in ppi read
… Read More
util densityDpi, scaledDensity

Screen measurement in android

Posted on October 14, 2019October 29, 2020 by mohamad wael

Screen measurement

What is Screen size ?

A smartphone , has a width and a height which can be expressed in inches . The screen size is the length of the diagonal of the smartphone , and which can be … Read More

android aspect ratio, density, dp, orientation, sp
2

The Ones’ complement operator ~ in python a tutorial

Posted on October 9, 2019February 13, 2021 by mohamad wael

 

The ones’ complement operator ~ , will flip the bits of an integer , so one will become zero , and zero will become one. An integer in python , has :

  • an unlimited number of bits .
  • is
… Read More
operators

Shift operators in java , a tutorial

Posted on October 1, 2019October 29, 2020 by mohamad wael

A shift operator will shift the bits by a number of positions . In java we have three shift operators , they are

  • The right shift signed operator , which shift the bits to the right , while keeping the
… Read More
operators java, shit operators

Regex in java , part two , The Matcher class

Posted on September 25, 2019October 29, 2020 by mohamad wael

The Pattern has some static methods such as matcher which allow us to match a regex against a string from its start till its end , and quote which allow us to quote or escape a regex String . This … Read More

regex

Regex in java , part one , The Pattern class

Posted on September 23, 2019October 29, 2020 by mohamad wael

What is a regex ?

Regex stands for regular expression . it is a string which is formed of characters used to perform :

  • searching
  • replacing
  • validation

in other string. In addition to the regular characters that a regex can … Read More

regex

How to generate random numbers in swift ?

Posted on September 19, 2019August 1, 2021 by mohamad wael

How to generate random number ins swift

We can generate random numbers in swift by one of these three methods :

  1. using the arc4random library
  2. using the default system random number generator SystemRandomNumberGenerator
  3. by using GamePlayKit classes that implement the
… Read More
swift

Bitmap in android a tutorial ?

Posted on September 17, 2019October 29, 2020 by mohamad wael

What is bitmap ?

A bitmap is an object , which is an instance of the Bitmap Class. This class represents a 2d coordinate system . The coordinate system move to the right on the x axis , and to … Read More

graphics
1

Color in android a tutorial

Posted on August 28, 2019October 29, 2020 by mohamad wael

what is Light ?

A light is a wave which doesn’t need a medium to propagate . Other examples of waves are water waves , or air waves which need water and air as a medium to propagate .Water , … Read More

graphics android color, color instance, int color, long color
  • «
  • 1
  • …
  • 7
  • 8
  • 9
  • 10
  • 11
  • »