Skip to content

Instantly share code, notes, and snippets.

View dassiorleando's full-sized avatar

Orleando Dassi dassiorleando

View GitHub Profile
@dassiorleando
dassiorleando / web_compoment_objects.html
Created April 9, 2019 11:42
TrackingJs - Web Compoment Objects Detection
<!DOCTYPE html>
<html>
<head>
<!-- Importing Web Component's Polyfill -->
<script src="bower/platform/platform.js"></script>
<!-- Importing Custom Elements -->
<link rel="import" href="../src/image-object-tracking.html">
</head>
<body>
<!-- Using Custom Elements -->
@dassiorleando
dassiorleando / object_detector.html
Created April 9, 2019 11:35
Object detection - TrackingJs
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<!-- include dataset for each objet type -->
<script src="data/face.js"></script>
<script src="data/eye.js"></script>
@dassiorleando
dassiorleando / color_detection_cutom_colors.html
Created April 9, 2019 11:31
Color detection with custom colors
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
@dassiorleando
dassiorleando / color_detection.html
Created April 9, 2019 11:28
Detect color into a video
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>tracking.js - first tracking</title>
<script src="tracking-min.js"></script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
@Test
public void safeToStringTest() {
ObjectB objectB = new ObjectB("Fake propB");
ObjectA objectA = new ObjectA("Fake propA", objectB);
String stringObjectA = Objects.toString(objectA);
System.out.println(stringObjectA);
assertNull(objectA.getObjectB2());
assertTrue(stringObjectA.contains("objectB2=null"));
ObjectB objectB = new ObjectB("Fake propB");
ObjectA objectA = new ObjectA("Fake propA", objectB);
System.out.println(Objects.toString(objectA));
public class ObjectA {
private String propA;
private ObjectB objectB1;
private ObjectB objectB2;
public ObjectA(String propA, ObjectB objectB1) {
this.propA = propA;
this.objectB1 = objectB1;
}
public class ObjectB {
private String propB;
public ObjectB(String propB) {
this.propB = propB;
}
// Getters and setters
@Override
@dassiorleando
dassiorleando / valueIOf.java
Created April 3, 2018 10:28
a part of valueOf method
/**
* Returns the string representation of the {@code Object} argument.
*
* @param obj an {@code Object}.
* @return if the argument is {@code null}, then a string equal to
* {@code "null"}; otherwise, the value of
* {@code obj.toString()} is returned.
* @see java.lang.Object#toString()
*/
public static String valueOf(Object obj) {
@dassiorleando
dassiorleando / script.js
Last active March 24, 2018 08:11
Using $timeout and setTimout in AngularJs App
/**
* Simple script to show how to solve the scrope update
* When using the native js TimeOut call
*
* @author dassiorleando
*/
(function (angular) {
'use strict';
angular