Skip to content

Instantly share code, notes, and snippets.

View thuliumsystems's full-sized avatar

Thulium Inc thuliumsystems

View GitHub Profile
<ion-content>
<div *ngFor="let foto of fotos">
<ion-card tappable (click)="fn_whatsapp_share(foto.file)">
<img src="{{foto.file}}">
</ion-card>
</div>
</ion-content>
<ion-footer>
<ion-fab vertical="bottom" horizontal="end">
@thuliumsystems
thuliumsystems / in-app.html
Created January 4, 2020 19:27
in app purchase
<ion-row class="ion-text-center">
<ion-col>
<ion-button expand="full" (click)="fn_mensal()">$2.99</ion-button>
</ion-col>
<ion-col>
<ion-button expand="full" (click)="fn_trimestral()">$7.99</ion-button>
</ion-col>
<ion-col>
<ion-button expand="full" (click)="fn_semestral()">$14.99</ion-button>
</ion-col>
<?php
//no login, o id do aparelho é enviado ao banco
if (isset($post['pushid'])) {
//insere no banco o id do aparelho
$query = "UPDATE login SET push_id = '" . $post['pushid'] . "' WHERE id_login = " . $usuario->id_login;
$push_conn->query($query);
//isso é opcional, é para atualizar no site do onesignal o grupo do usuário
$playerID = $post['pushid'];
$fields = array(
//iphone 11 Pro Max e XS Max
@media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 3) {
}
//iphone 11 Pro e X
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) {
}
//iphone 11 e XR
@media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 2) {
async fn_inserir_pic_pessoal() {
const image = await Plugins.Camera.getPhoto({
quality: 50,
allowEditing: false,
resultType: CameraResultType.DataUrl,
source: CameraSource.Prompt
});
this.fn_resize_img(image.dataUrl, 1024, 1024, 0.5, f => {
this.data_profile.user_pic = f
@thuliumsystems
thuliumsystems / arquivo.html
Last active October 15, 2021 15:46
ion searchbar
<ion-searchbar placeholder="Pesquisar..." showCancelButton="focus" [(ngModel)]="filterHouse"></ion-searchbar>
<ion-item *ngFor="let h of houses | filter:filterHouse">
@thuliumsystems
thuliumsystems / build phases
Created November 9, 2021 22:06
Error: "The sandbox is not in sync with the Podfile.lock..." after installing RestKit with cocoapods
diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
to
diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null
//pegar apenas o id do caparelho
this.oneSignal.startInit('one signal id', 'google id').endInit();
const { userId } = await this.oneSignal.getIds()
//fazer algo quando o push é recebido e quando é aberto
this.oneSignal.startInit('', '')
.handleNotificationReceived(() => {})
.handleNotificationOpened(() => {})
.endInit();
FROM debian:latest
RUN apt update -y
RUN apt install net-tools curl -y
from sklearn.tree import DecisionTreeClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import (
RandomForestClassifier,
AdaBoostClassifier,
GradientBoostingClassifier,
)
from sklearn.preprocessing import StandardScaler
from sklearn.naive_bayes import GaussianNB
from sklearn.neighbors import KNeighborsClassifier