Skip to content

Instantly share code, notes, and snippets.

View Dssdiego's full-sized avatar
🦄

Diego Santos Seabra Dssdiego

🦄
View GitHub Profile
import { Component, OnInit } from '@angular/core';
import { MatSnackBar } from '@angular/material';
@Component({
selector: 'app-toast',
templateUrl: './toast.component.html',
styleUrls: ['./toast.component.scss']
})
export class Toast implements OnInit {
<div fxLayout="row wrap">
<div fxFlex="100" fxFlex.gt-sm="25" fxFlex.sm="50">
<mat-card>
<mat-card-title>
<small class="text-muted">Despesas Fixas</small>
<span fxFlex></span>
<mat-chip class="icon-chip" color="accent" selected="true">
<mat-icon>trending_up</mat-icon>10%
</mat-chip>
</mat-card-title>
@Dssdiego
Dssdiego / datatable.html
Created April 16, 2019 12:56
Datatable Angular
<ngx-datatable #table class="material ml-0 mr-0 mb-5" [rows]="rows" [columnMode]="'flex'" [headerHeight]="50" [footerHeight]="50"
[limit]="10" [rowHeight]="'auto'" [sorts]="[{prop: 'name', dir: 'desc'}]" [loadingIndicator]="loadingIndicator">
<ngx-datatable-column name="Avatar" prop="avatar" [flexGrow]="0.5">
<ng-template ngx-datatable-cell-template let-rowIndex="rowIndex" let-row="row">
<img src="{{row?.avatar}}" alt="" class="avatar-img">
</ng-template>
</ngx-datatable-column>
<ngx-datatable-column name="Nome" prop="name" [flexGrow]="2">
<ng-template ngx-datatable-cell-template let-rowIndex="rowIndex" let-row="row">
{{ row?.name }}
@Dssdiego
Dssdiego / fab.html
Created April 16, 2019 12:49
FAB Angular
<div id="app-fab">
<div class="handle">
<button mat-fab color="primary" (click)="fabClick()">
<mat-icon>person_add</mat-icon>
</button>
</div>
</div>
Weight (Kg) Height (cm) Result Conclusion Correct Prediction?
94 182 -0.00157233 Male Yes
56 172 0.69436113 Female No
98 187 -0.07898268 Male Yes
65 172 0.59412349 Female Yes
87 175 0.02263017 Male Yes
50 160 0.80293757 Female Yes
Height (cm) Weight (kg) Sex (m/f)
172 62 Male
187 98 Male
153 70 Female
183 90 Male
173 68 Female
173 53 Female
176 52 Female
173 56 Female
160 50 Female
@Dssdiego
Dssdiego / BeforeLoginActivityTest.java
Last active April 27, 2018 13:28 — forked from adavis/BeforeLoginActivityTest.java
Using Screen Robots with Android Espresso Tests
package <your_package>;
import android.support.test.espresso.intent.rule.IntentsTestRule;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.LargeTest;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@Dssdiego
Dssdiego / SimpleTest.java
Created April 26, 2018 10:17
Simple functional test in java
import org.junit.Before;
import org.junit.Test;
import br.techhit.scanydrive.helpers.LoginHelper;
import static org.junit.Assert.*;
public class LoginHelperTest {
LoginHelper loginHelper;
@Dssdiego
Dssdiego / setupNavBar.swift
Last active June 2, 2022 20:49
Makes iOS 11 NavBar with Large Title and Search Bar (like whatsapp)
func setupNavBar() {
navigationController?.navigationBar.prefersLargeTitles = true
let searchController = UISearchController(searchResultsController: nil)
navigationItem.searchController = searchController
}
# Deletes the Name Column
del df['name']