This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React ,{useState, useEffect} from 'react'; | |
import { Fragment } from 'react/cjs/react.production.min'; | |
import Currency from '../Currency/Currency'; | |
import './RateCurrency.css'; | |
const RateCurrency = () => { | |
const currencyFreaksAPILink = 'https://api.currencyfreaks.com/latest?apikey=YOUR_API_KEY&symbols=CAD,IDR,JPY,CHF,EUR,GBP'; | |
const [isLoading, setIsLoading] = useState(true); | |
const [currencies, setCurrencies] = useState([]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
$(document).ready(function () { | |
$('#example').DataTable({ | |
columns: [ | |
{data: "nama"}, | |
{data: "nisn"}, | |
{data: "kelas"}, | |
{data: "sekolah"}, | |
{data: "nilai"}, | |
{data: "hari"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { StyleSheet, Text, View } from "react-native"; | |
function NAProgressBar({ progress = 0 }) { | |
return ( | |
<View style={styles.progressbar}> | |
<View | |
style={[ | |
styles.on, | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% load citra dan ambil ukurannya (width dan height) | |
cover_img = imread("https://picsum.photos/512/512"); | |
[img_height, img_width] = size(cover_img); | |
pesan = "aku sangat ingin terbang"; | |
panjang_pesan = length(pesan) * 8; | |
% menggunakan fungsi uint8 untuk mengambil ascii | |
ascii_pesan = uint8(pesan); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
clc; | |
% load citra skala kelabu | |
img = imread("path ke gambar"); | |
hist_img = img; | |
total_piksel = rows(img) * columns(img); | |
max_piksel = max(max(img)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
clc; | |
% memuat citra awal | |
img = imread("lenna.png"); | |
% dapatkan tinggi dan lebar citra | |
[img_height, img_width] = size(img); | |
% kuantisasi citra dari 0 - 255 ke 0 - 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear; | |
clc; | |
img = imread("images/baboon.jpg"); | |
img = rgb2gray(img); | |
[img_height, img_width] = size(img); | |
d1 = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initShaderProgram(gl, vsSource, fsSource) { | |
const vertexShader = loadShader(gl, gl.VERTEX_SHADER, vsSource); | |
const fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fsSource); | |
const shaderProgram = gl.createProgram(); | |
gl.attachShader(shaderProgram, vertexShader); | |
gl.attachShader(shaderProgram, fragmentShader); | |
gl.linkProgram(shaderProgram); | |
if (!gl.getProgramParameter(shaderProgram, gl.LINK_STATUS)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadShader(gl, type, source) { | |
const shader = gl.createShader(type); | |
gl.shaderSource(shader, source); | |
gl.compileShader(shader); | |
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { | |
alert( | |
`Terjadi kesalahan saat proses kompilasi shaders: ${gl.getShaderInfoLog( | |
shader | |
)}` |
OlderNewer