Motaibi1989 Blog

Operating System Concepts 9th

Operating System Concepts 9th

Java Initialize Variable Test

public class TMotaibi1989 { public static void main(String[] args) { int x ; if(true) { x = 5; System.out.println(x); } } }

Object Oriented Programming in C

MySQL Commands

Handy MySQL Commands Description Command To login (from unix shell) use -h only if needed. [mysql dir]/bin/mysql -h hostname -u root -p Create a database on the sql server. create database [databasename]; List all databases on the sql server. show databases; Switch to a database. use [db name]; To see all the tables in the db. show tables; To see database’s field formats. describe ; […]

Simple Ubuntu install script

#!/bin/sh # update & upgrade # sudo apt-get update sudo apt-get upgrade # add custom sources and PPA’s # sudo sh -c “echo ‘## PPA ###’ >> /etc/apt/sources.list” # ubuntuzilla sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com C1289A29 sudo sh -c “echo ‘deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main #Ubuntuzilla’ >>/etc/apt/sources.list” # vlc sudo add-apt-repository ppa:c-korn/vlc # getdeb wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add – sudo sh […]

Java – Move cursor position (Any System)

import java.awt.Robot; import java.util.Random; public class MouseMover { public static final int FIVE_SECONDS = 5000; public static final int MAX_Y = 400; public static final int MAX_X = 400; public static void main(String… args) throws Exception { Robot robot = new Robot(); Random random = new Random(); while (true) { robot.mouseMove(random.nextInt(MAX_X), random.nextInt(MAX_Y)); Thread.sleep(FIVE_SECONDS); } } }

C++ – Move cursor position (windows)

#include “stdafx.h” #include “Windows.h” int main() { for(int i=1 ; i<200 ; i++) { SetCursorPos(200/i, 200*i); Sleep(500); } return 0; }

WordPress CSS Examples

.entry-header {     display: none; } .page .entry-title {     display: none; } .page #main .entry-title {     display: none; } .blog .entry-content {     display: none; } .jetpack-portfolio-shortcode .portfolio-entry-content {     display: none; } .pants {   color: green;   text-decoration: underline;   font-weight: bold; } #navigation {   margin: 30px 0 0 0;   border-top: 1px solid #efefef; […]

C++ Read From Memory

#include void ptr(int* ptr ) {     int* p = ptr;     std::cout <<  “Address:”   << p   << std::endl;     std::cout <<  “Value  :”   << *p  << std::endl; } int main(int argc, const char * argv[]) {     //0x7ffeefbff55c;     for(int i=0;i<15;i++)     {         int* p = (int*) 0x7ffeefbff551+i;       […]

Post from my email

Hello, This is a first post from my email.