Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / GET_STRING_BETWEEN.vb
Created November 19, 2015 11:43
GET_STRING_BETWEEN
Function GET_STRING_BETWEEN(ByVal start As String, ByVal parent As String, ByVal [end] As String)
Dim output As String
output = parent.Substring(parent.IndexOf(start) _
, (parent.IndexOf([end]) _
- parent.IndexOf(start)) _
).Replace(start, "").Replace([end], "")
output = start & output & [end]
Return output
End Function
@Teino1978-Corp
Teino1978-Corp / login.php
Created November 19, 2015 11:04
E-banking
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login User</title>
</head>
<body>
<h1>Dream Bank</h1>
@Teino1978-Corp
Teino1978-Corp / dabblet.css
Created November 19, 2015 10:50
Translucent borders
/**
* Translucent borders
*/
body {
background: url('http://csssecrets.io/images/stone-art.jpg');
}
div {
border: 10px solid hsla(0,0%,100%,.5);
@Teino1978-Corp
Teino1978-Corp / 0_reuse_code.js
Created November 18, 2015 05:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package CompareImage;
import com.sun.media.jai.widget.DisplayJAI;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.image.RenderedImage;
import java.awt.image.renderable.ParameterBlock;
@Teino1978-Corp
Teino1978-Corp / app.js
Created November 17, 2015 14:36
Isomorphic React
'use strict';
import React from 'react';
import Router from 'react-router';
import { canUseDOM } from 'react/lib/ExecutionEnvironment';
import routes from './routes';
let app = {
start(bootstrap) {
return canUseDOM ? this.webStart() : this.serverStart(bootstrap);
@Teino1978-Corp
Teino1978-Corp / CTMCP-Section2.9-4-a-2.oz
Created November 17, 2015 14:28
CTMCP Section 2.9 Exercise 4 (a) 2
local X Y T in
X=1
Y=1
T=X==Y
case T of true then {Browse true} else {Browse false} end
end
@Teino1978-Corp
Teino1978-Corp / DemoJoin
Created November 17, 2015 07:19
final boolean isAlive (): call this method when thread is still alive, it will return true, otherwise return false
public class DemoJoin {
public static void main (String args []) {
NewThread ob [] = {new NewThread ("One"), new NewThread ("Two"), new NewThread ("Three")};
for (int i = 0; i <3; i ++)
System.out.println ("Thread" + ob [i] .name + "is alive:" + ob [i] .t.isAlive ());
try {
System.out.println ("Waiting for threads to finish.");
ob [0] .t.join ();
ob [1] .t.join ();
ob [2] .t.join ();
@Teino1978-Corp
Teino1978-Corp / notwoSimilar.cxx
Created November 17, 2015 07:10
Function returns true or false if string can be arranged in such a way so that no two adjacent characters are simliar. If so, do it. - http://gray-world.net/papers/ahsan02.pdf
#pragma once
#include <algorithm>
#include <cstring>
#include <unordered_map>
#include <string>
#include <utility>
#include <vector>
using ull = unsigned long long;
@Teino1978-Corp
Teino1978-Corp / isJsonMessage.php
Created November 17, 2015 05:14
playing with php to check ifJson
function isJSON($string){
return is_string($string) && is_object(json_decode($string)) ? true : false;
}
$app = '';
//if(isset($_POST['message'])) {
$message = '{"to": "me"}';