Skip to content

Instantly share code, notes, and snippets.

View ridhof's full-sized avatar

Ridho Febriansa ridhof

View GitHub Profile
@ridhof
ridhof / mahasiswa.service.ts
Created November 18, 2019 14:08
Upload files on Angular
updateFile(foto_param)
{
const formData: FormData = new FormData()
formData.append('pas_foto', foto_param, foto_param.name);
return this.http.post(''.concat( this.config.server_url ,"mahasiswas/beasiswa/berkas/", ""+this.user_id), formData);
}
<?php
/**
* Copyright 2016 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
<?php
namespace App;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Tymon\JWTAuth\Contracts\JWTSubject;
<?php
use \Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
<html>
<body>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<label>Masukkan jumlah kriteria: <input v-model.number="jumlahKriteria" type="number" placeholder="5"></label>
<p>Jumlah kriteria adalah: {{ jumlahKriteria }}</p>
<p v-for="(index, i) in jumlahKriteria">
Kriteria ke-{{i}}: <input type="text" v-model="kriteria[index-1]">
</p>
<html>
<body>
<!-- development version, includes helpful console warnings -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<label>Masukkan jumlah kriteria: <input v-model.number="jumlahKriteria" type="number" placeholder="5"></label>
<p>Jumlah kriteria adalah: {{ jumlahKriteria }}</p>
<p v-for="(index, i) in jumlahKriteria">
Kriteria ke-{{i}}: <input type="text" v-model="kriteria[index-1]">
</p>
<?php
require_once __DIR__.'/vendor/autoload.php';
use Phpml\FeatureExtraction\TokenCountVectorizer;
use Phpml\Tokenization\WhitespaceTokenizer;
use Phpml\FeatureExtraction\TfIdfTransformer;
use Phpml\Math\Distance\Manhattan;
use Phpml\Math\Distance\Minkowski;
$$(document).on('page:init', function(e, page) {
if(page.name == "about") {
//app.dialog.alert('Welcome to About', 'Welcome');
var about_id = page.router.currentRoute.params.aboutid;
$$(".about-js").html('<div class="block"><h1>Diubah via DOM7 dengan id ' + about_id +'</h1></div>');
//app.dialog.alert($$(".about-js").html());
//$$(".about-cotent").html('<div class="block"><h1>Diubah via DOM7</h1></div>');
}
else if(page.name == "cart"){
$$('.qty').on('keyup keydown change', function(e) {
.demo-card-header-pic .card-header {
height: 40vw;
background-size: cover;
background-position: center;
color: #fff;
}
.demo-card-header-pic .card-content-padding .date {
color: #8e8e93;
}