Skip to content

Instantly share code, notes, and snippets.


Mr. Obito96 iyawa-revo

View GitHub Profile
iyawa-revo /
Created May 16, 2020 — forked from codebutler/
Convert Android JSONObject/JSONArray to a standard Map/List.
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
public class JsonHelper {
public static Object toJSON(Object object) throws JSONException {
if (object instanceof Map) {
JSONObject json = new JSONObject();
View mpi installation on ubuntu with basic mpi

Installing and Basic Programs on MPI C

Installing MPI on Ubuntu

Run the following command on terminal

$ sudo apt-get install libcr-dev mpich2 mpich2-doc

Compiling MPI Programs

iyawa-revo /
Created Apr 16, 2019 — forked from jlblancoc/
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

iyawa-revo / gist:2b65a57554b21b24feb638dee5eb6573
Created Jan 23, 2019 — forked from mikehaertl/gist:3258427
Learn you a Haskell - In a nutshell
View gist:2b65a57554b21b24feb638dee5eb6573

Learn you a Haskell - In a nutshell

This is a summary of the "Learn You A Haskell" online book under

1. Introduction

  • Haskell is a functional programming language.
iyawa-revo / pagination.php
Created Sep 18, 2018 — forked from rashedcs/pagination.php
Pagination with PHP & MYSQL
View pagination.php
if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; };
$start_from = ($page-1) * $num_rec_per_page;
$sql = "SELECT * FROM student LIMIT $start_from, $num_rec_per_page";
$rs_result = mysql_query ($sql); //run the query
View BaseController.php
<?php namespace PatrickMaciel;
class BaseController extends \Controller {
* Setup the layout used by the controller.
* @return void
protected function setupLayout()
iyawa-revo /
Created Aug 16, 2018 — forked from ryansechrest/
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
You can’t perform that action at this time.