Skip to content

Instantly share code, notes, and snippets.

Avatar

Mr. Obito96 iyawa-revo

View GitHub Profile
@iyawa-revo
iyawa-revo / JsonHelper.java
Created May 16, 2020 — forked from codebutler/JsonHelper.java
Convert Android JSONObject/JSONArray to a standard Map/List.
View JsonHelper.java
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 programs.md

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
iyawa-revo / Install_gcc7_ubuntu_16.04.md
Created Apr 16, 2019 — forked from jlblancoc/Install_gcc7_ubuntu_16.04.md
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial
View Install_gcc7_ubuntu_16.04.md

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
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 http://learnyouahaskell.com/chapters.


1. Introduction

  • Haskell is a functional programming language.
@iyawa-revo
iyawa-revo / pagination.php
Created Sep 18, 2018 — forked from rashedcs/pagination.php
Pagination with PHP & MYSQL
View pagination.php
<?php
$num_rec_per_page=10;
mysql_connect('localhost','root','');
mysql_select_db('apex1');
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
?>
<table>
View BaseController.php
<?php namespace PatrickMaciel;
class BaseController extends \Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
@iyawa-revo
iyawa-revo / php-style-guide.md
Created Aug 16, 2018 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.
View php-style-guide.md

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.