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
| include: package:flutter_lints/flutter.yaml | |
| linter: | |
| rules: | |
| prefer_const_constructors: false | |
| prefer_final_fields: false | |
| use_key_in_widget_constructors: false | |
| prefer_const_literals_to_create_immutables: false | |
| prefer_const_constructors_in_immutables: false | |
| avoid_print: false |
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 axios from "axios"; | |
| import { useCallback, useEffect, useRef, useState } from "react" | |
| import { Badge, Button, Card, Col, Container, Form, Row, Table } from "react-bootstrap"; | |
| import useFormatter from "../../hooks/useFormatter"; | |
| import { FaCartPlus, FaSave, FaTrash } from "react-icons/fa"; | |
| const PageProduct = () => { | |
| const formatter = useFormatter(); | |
| const [products, setProducts] = 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
| import axios from "axios"; | |
| import { useCallback, useEffect, useMemo, useState } from "react" | |
| import { Badge, Button, Card, Col, Container, Form, Row, Table } from "react-bootstrap"; | |
| import useFormatter from "../../hooks/useFormatter"; | |
| import { FaBluetooth, FaCartPlus, FaPrint, FaTrash } from "react-icons/fa"; | |
| import useThermal, { StandardInvoice, StandardItemInvoice } from "../../hooks/useThermal"; | |
| const PageProduct = () => { | |
| const formatter = useFormatter(); |
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
| const Validate = (validations) => { | |
| return async (err, req, res, next) => { | |
| for (let validation of validations) { | |
| await validation.run(req); | |
| // if (result.errors.length) break; | |
| } | |
| const errors = validationResult(req); | |
| const errs = _.chain(errors.errors).groupBy("path").value() |
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
| class Mobil: | |
| def __init__(self, merk, tahun): | |
| self.merk = merk | |
| self.tahun = tahun | |
| def run(self): | |
| return f"Mobil {self.merk} berjalan..." | |
| class Honda(Mobil): |
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 logging | |
| import time | |
| from locust import HttpUser, constant, events | |
| # from barang.tests import HttpBarangTest | |
| from barang.tasks import BarangTask | |
| from customer.tasks import CustomerTask | |
| from orders.tasks import OrderTask | |
| import gevent | |
| from locust.runners import STATE_STOPPING, STATE_STOPPED, STATE_CLEANUP, MasterRunner, LocalRunner |
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
| <div class="row mb-3" [formGroup]="orderForm"> | |
| <div class="col-md-12" formArrayName="items"> | |
| <div class="card"> | |
| <div class="card-body"> | |
| <div class="card-title"> | |
| <h4>Daftar Item</h4> | |
| </div> | |
| </div> | |
| <table class="table table-hover table-stripped"> | |
| <thead> |
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
| from pytube import YouTube | |
| youtube_urls = [] | |
| is_running = True | |
| data_raw = [] | |
| while is_running: | |
| url = input("URL: ") | |
| if url: | |
| yt = YouTube(url) |
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
| daftarProdukBBM = { | |
| "Premium": 6450, | |
| "Pertalite": 7650, | |
| "Pertamax": 9000, | |
| "Pertamax Turbo": 9850, | |
| "Biosolar": 5150, | |
| "Dexlite": 9500, | |
| "DEX": 10200, | |
| } |
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
| tugasHarian = [] | |
| ## Menambahkan tugas baru ke dalam tugasHarian | |
| tugasHarian.append("Tugas memasak!") | |
| ## Cetak seluruh tugas | |
| print(tugasHarian) | |
| # Mengubah tugas memasak menjadi tugas menyapu | |
| tugasHarian[0] = "Tugas menyapu!" |