Sunday, September 1, 2019

test

import 'dart:async';
import 'package:flutter/material.dart';

class MyBeginner extends StatefulWidget {
var pindah;
MyBeginner({this.pindah});

_MyBeginnerState createState() => _MyBeginnerState();
}

class _MyBeginnerState extends State<MyBeginner> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Pentesting"),
),
body: Column(
children: <Widget>[
Expanded(
child: Container(
decoration: BoxDecoration(color: Colors.red),
),
),
Expanded(
child: Container(
decoration: BoxDecoration(color: Colors.yellow),
child: RaisedButton(
child: Text("Pindah Halaman Belajar"),
onPressed: (){
Navigator.push(context, MaterialPageRoute(builder: (context) => MyPindah()));
// Navigator.pushNamed(context, MyBeginner.pindah)
},
),
),
),
Expanded(
child: Container(
child: RaisedButton(
child: Text("Push Rauting Named"),
onPressed: (){
Navigator.of(context).pushNamed('/latihan');
// Navigator.pushNamed(context, 'latihan');
},
),
decoration: BoxDecoration(color: Colors.green),
),
),
],
),
);
}
}

class MyPindah extends StatefulWidget {
var pindah;
MyPindah({this.pindah});

_MyPindahState createState() => _MyPindahState();
}

class _MyPindahState extends State<MyPindah> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("App Back"),
),
body: Padding(
padding: const EdgeInsets.all(100.0),
child: SizedBox.expand(
child: Card(
color: Colors.blue,
child: Center(child: Text("Hello World")),
),
),
),
);
}
}

Monday, July 8, 2019

Membuat Crud Simle Dengan php dan angularjs Terbaru

index.html

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>insert data dengan angular js</title>
</head>
<link rel="stylesheet" href="js/sweetalert2.css">
<link rel="stylesheet" href="https://raw.githubusercontent.com/daneden/animate.css/master/animate.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> -->
<script src="angular.min.js"></script>
<script src="js/sweetalert2.js"></script>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> -->

<body>

<div ng-app="moduleapp" ng-controller="inicon">
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<div class="card mt-4">
<center> <b> Membuat Insert data pada Angular --learn of today</b></center>
<div class="card-body">
<form>

<div class="form-group">
<label for="">nomor</label>
<input type="text" ng-model="id" name="id" ng-disabled="obj.idisable"
class="form-control">
</div>
<div class="form-group">
<label>Name :</label>
<input type="text" ng-model="nama" name="nama" class="form-control">
</div>
<div class="form-group">
<label>Absen :</label>
<input type="text" ng-model="absen" name="absen" class="form-control">
</div>
<div class="form-group">
<label>Kelas :</label>
<input type="text" ng-model="kelas" name="kelas" class="form-control">
</div>
<input type="button" class="btn btn-primary" value="{{btnName}}"
ng-click="insertdata()">
<input type="reset" value="Reset" class="btn btn-danger">
</form>
</div>
</div>
</div>
<div class="col-md-6 mt-4">
<table class="table table-hover table-bordered">
<tr>
<th>id</th>
<th>nama</th>
<th>alamat</th>
<th>jenis kelamin</th>
<th>Edit</th>
<th>Delete</th>
</tr>

<tr ng-repeat="row in isi">
<td>{{row.id}}</td>
<td>{{row.nama}}</td>
<td>{{row.absen}}</td>
<td>{{row.kelas}}</td>
<td><button ng-click="edit(row.id, row.nama, row.absen, row.kelas);"
class="btn btn-primary">Edit</button></td>
<td><button ng-click="delete(row.id)" class="btn btn-danger">delete</button></td>
</tr>
</table>
</div>
</div>

</div>



</div>

</div>


<script type="text/javascript">
var app = angular.module('moduleapp', []);
app.controller('inicon', function ($scope, $http) {
show();
$scope.obj = { 'idisable': false };
$scope.btnName = "Simpan";
//funsgsi insert data
$scope.insertdata = function () {
$http.post("input.php", {
'nama': $scope.nama,
'absen': $scope.absen,
'kelas': $scope.kelas,
'btnName': $scope.btnName
}).then(function successCallback(response) {
console.log(response);
$scope.msg =
// let timerInterval
Swal.fire({
title: 'Success Insert Data!',
html: 'I will close in <strong></strong> seconds.',
timer: 2000,
onBeforeOpen: () => {
Swal.showLoading()
timerInterval = setInterval(() => {
Swal.getContent().querySelector('strong')
.textContent = Swal.getTimerLeft()
}, 100)
},
onClose: () => {
clearInterval(timerInterval)
}
}).then((result) => {
if (
// Read more about handling dismissals
result.dismiss === Swal.DismissReason.timer
) {
console.log('I was closed by the timer')
}
})
// $scope.displayStud();
show();
}, function errorCallback(response) {
$scope.msg = alert("gagal di simpan");
// $scope.displayStud();
});

}
//fungsi show data
function show() {
$http({
method: 'GET',
url: 'tampildata.php'
}).then(function (woy) {
// debugger
$scope.isi = woy.data;
}, function (error) {
console.log(error)
});

}

$scope.delete = function (studid) {
$http({
method: 'POST',
url: 'hapus.php',
data: {
id: studid
}
}).then(function (woy) {
// debugger;
// console.log(woy);
$scope.msg = Swal.fire(
'Succes Delete Data!',
'Succes Delete Data!',
'success'
);
show();
}, function (error) {
console.log(error)
});


}

$scope.edit = function (id, nama, absen, kelas) {
$scope.id = id;
$scope.nama = nama;
$scope.absen = absen;
$scope.kelas = kelas;
$scope.btnName = "Update";
$scope.obj.idisable = true;
// $scope.displayStud();
}


});
</script>



</body>

</html>

untuk komplit nya ane taro di gitlab ane om




Thursday, March 21, 2019

Join 2 table 3 table 4 table pada codeigniter

SELECT* FROM tbl_login JOIN tbl_siswa ON tbl_login.id_user = tbl_siswa.id JOIN tbl_pelajaran ON tbl_login.id_pelajaran = tbl_pelajaran.id WHERE tbl_login.id_user

Tuesday, March 19, 2019

Membuat Row Dal Column Pada flutter part 2

import 'package:flutter/material.dart';
void main(){
  runApp(new MaterialApp(
    title: "lihatcode.blogspot.com",    home: new HalamanSatu(),  ));}

class HalamanSatu extends StatelessWidget {
  @override  Widget build(BuildContext context) {
    return new Scaffold(
      backgroundColor: Colors.yellow[200],      appBar: new AppBar(
        backgroundColor: Colors.red[800],        leading: new Icon(Icons.home),        title: new Center(
          child: new Text("Coding Days"),        ),        actions: <Widget>[
          new Icon(Icons.search)
        ],      ),            body: new Container(
        child: new Column(
          children: <Widget>[
          new Icon(
            Icons.local_pizza,            size: 70.0,            color: Colors.red,          ),          new Row(
            children: <Widget>[
              new Icon(
                Icons.donut_large,                size: 70.0,                 color: Colors.orange,              ),              new Icon(
                Icons.donut_large,                size: 70.0,                color: Colors.orange,              ),              new Icon(
                Icons.donut_large,                size: 70.0,                color: Colors.orange,              )
            ],          ),          new Icon(
            Icons.donut_large,            size: 70.0,            color: Colors.red,          )
          ],
        )
      ),
    );  }
}

Monday, March 18, 2019

Membuat Aplikasi Flutter Dengan Mudah

import 'package:flutter/material.dart';//function yang dijalankanvoid main(){
// sedang memanggil widget "new"  runApp(new MaterialApp(
    home: new Hallo(),  ));}

class Hallo extends StatelessWidget {
  @override  Widget build(BuildContext context) {
    // TODO: implement build    return new Scaffold(
      body:
      new Center(
        child:  new Text("Hello Fharhan"),      )
    );  }
}

Thursday, January 24, 2019

Catatan ambil data dari php

catatan php
ambil data (fetch) dari table dari object result
mysqli_fetch_row ->mengembalikan array numerik
mysqli_fetch_assoc ->mengembalikan array assosiatif $row['nama'];
mysqli_fetch_array() -> mengembalikan array numerik dan array assosiatif $row['nama']
mysqli_fetch_object -> mengembalikan array dalam bentuk objek $row->nama


oke brookkkkk

Tuesday, December 25, 2018

Belajar Tipe Data Pada Java Dan Dibuktikan Melalui program


Hello kembali di bloger saya,saya akan men sharing materi tipe data pada java.
apa aja sih ?

sebelumnya anda harus sudah menginstal text editornya
di link dibawah ini

ini data pada java ada apa aja ?
1.integer
2.byte
3.short
4.long
5.double
6.float
7.char
8.bolean




package com.android;

public class
tipe_data {

    
public static void main(String[] args){
         System.
out.println("======INTEGER========");
         int
i = 2147483647;
        
System.out.println("Nilai Integer  = " +(i+1));
        
System.out.println("NIlai Max Integer = " + Integer.MAX_VALUE);
        
System.out.println("NIlai Min Integer = " + Integer.MIN_VALUE);
        
System.out.println("Besar Integer = " + Integer.BYTES + "bytes");
        
System.out.println("Besar Integer = " + Integer.SIZE + "bit");

        
System.out.println("======Byte========");
         byte
b = 10;
        
System.out.println("Nilai Integer  = " +b);
        
System.out.println("NIlai Max Byte = " + Byte.MAX_VALUE);
        
System.out.println("NIlai Min Byte = " + Byte.MIN_VALUE);
        
System.out.println("Besar Byte = " + Byte.BYTES + "bytes");
        
System.out.println("Besar Byte = " + Byte.SIZE + "bit");

        
System.out.println("======SHORT========");
         short
shrt = 8;
        
System.out.println("Nilai Integer  = " +shrt);
        
System.out.println("NIlai Max Short = " + Short.MAX_VALUE);
        
System.out.println("NIlai Min Short = " + Short.MIN_VALUE);
        
System.out.println("Besar Short = " + Short.BYTES + "bytes");
        
System.out.println("Besar short = " + Short.SIZE + "bit");

        
System.out.println("======LONG========");
         long
l = 30L;
        
System.out.println("Nilai Long  = " +l);
        
System.out.println("NIlai Max Long = " + Long.MAX_VALUE);
        
System.out.println("NIlai Min Long = " + Long.MIN_VALUE);
        
System.out.println("Besar Long = " + Long.BYTES + "bytes");
        
System.out.println("Besar Long = " + Long.SIZE + "bit");

        
System.out.println("======Double========");
         double
d = 20.2d;
        
System.out.println("Nilai Double  = " +d);
         
System.out.println("NIlai Max Double = " + Double.MAX_VALUE);
        
System.out.println("NIlai Min Double = " + Double.MIN_VALUE);
        
System.out.println("Besar Double = " + Double.BYTES + "bytes");
        
System.out.println("Besar Double = " + Double.SIZE + "bit");

        
System.out.println("======Float========");
         float
f = -20.5f;
        
System.out.println("Nilai Float  = " + f);
        
System.out.println("NIlai Max Float = " + Float.MAX_VALUE);
        
System.out.println("NIlai Min Float = " + Float.MIN_VALUE);
        
System.out.println("Besar Float = " + Float.BYTES + "bytes");
        
System.out.println("Besar Float = " + Float.SIZE + "bit");
          
//char (koma,bilangan real) Berdasarkan Ascii
        
System.out.println("======Char========");
         char
c = 'p';
        
System.out.println("Nilai Char  = " + c);
        
System.out.println("NIlai Max Char = " + Character.MAX_VALUE);
        
System.out.println("NIlai Min Char = " + Character.MIN_VALUE);
         
System.out.println("Besar Character = " + Character.BYTES + "bytes");
        
System.out.println("Besar Character = " + Character.SIZE + "bit");

        
System.out.println("======Boelean========");
         boolean
val = true;
        
System.out.println("Nilai Bolean  = " + val);
        
System.out.println("NIlai Boelean  = " + Boolean.TRUE);
        
System.out.println("NIlai Boelean = " + Boolean.FALSE);


    
}
}






Hasil program di atas akan menghasilkan di ketahuai Nilai max,Nilai Min semua tipe data pada java.... yaps bisa di coba yoww…





======INTEGER========
Nilai Integer  = -2147483648
NIlai Max Integer = 2147483647
NIlai Min Integer = -2147483648
Besar Integer = 4bytes
Besar Integer = 32bit
======Byte========
Nilai Integer  = 10
NIlai Max Byte = 127
NIlai Min Byte = -128
Besar Byte = 1bytes
Besar Byte = 8bit
======SHORT========
Nilai Integer  = 8
NIlai Max Short = 32767
NIlai Min Short = -32768
Besar Short = 2bytes
Besar short = 16bit
======LONG========
Nilai Long  = 30
NIlai Max Long = 9223372036854775807
NIlai Min Long = -9223372036854775808
Besar Long = 8bytes
Besar Long = 64bit
======Double========
Nilai Double  = 20.2
NIlai Max Double = 1.7976931348623157E308
NIlai Min Double = 4.9E-324
Besar Double = 8bytes
Besar Double = 64bit
======Float========
Nilai Float  = -20.5
NIlai Max Float = 3.4028235E38
NIlai Min Float = 1.4E-45
Besar Float = 4bytes
Besar Float = 32bit
======Char========
Nilai Char  = p
NIlai Max Char = ￿
NIlai Min Char = 
Besar Character = 2bytes
Besar Character = 16bit
======Boelean========
Nilai Bolean  = true
NIlai Boelean  = true
NIlai Boelean = false

Process finished with exit code 0


test

import 'dart:async' ; import 'package:flutter/material.dart' ; class MyBeginner extends StatefulWidget { var...