This file contains 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 'package:flutter/material.dart'; | |
import 'dart:convert'; | |
import 'ApiHelper.dart'; | |
import 'UserModel.dart'; | |
void main(){ | |
runApp(new MyApp()); |
This file contains 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 'package:http/http.dart' as http; | |
import 'dart:async'; | |
const baseUrl = "https://jsonplaceholder.typicode.com"; | |
class ApiHelper{ | |
static Future getAllUsers(){ | |
return http.get(baseUrl+"/users"); | |
} |
This file contains 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 UserModel { | |
int id; | |
String name; | |
String email; | |
String website; | |
UserModel(int id, String name, String email, String website){ | |
this.id = id; | |
this.name = name; | |
this.email = email; |
This file contains 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
<head> | |
<?php | |
include 'function/databaseHelper.php'; | |
include 'res/layout/header.php'; | |
$db = new DatabaseHelper(); | |
$data = $db->getAllUsers(); | |
?> | |
<nav class="navbar navbar-expand-lg navbar-dark cyan"> | |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarText" aria-controls="navbarText" | |
aria-expanded="false" aria-label="Toggle navigation"> |
This file contains 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
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>MDB OOP CRUD - Prieyudha Akadita S</title> | |
<!-- Font Awesome --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<!-- Bootstrap core CSS --> | |
<link href="res/style/css/bootstrap.min.css" rel="stylesheet"> | |
<!-- Material Design Bootstrap --> | |
<link href="res/style/css/mdb.min.css" rel="stylesheet"> |
This file contains 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
<head> | |
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Prieyuda Akadita S | |
* Date: 23/09/2018 | |
* Time: 12:47 | |
*/ | |
include 'function/databaseHelper.php'; | |
include 'res/layout/header.php'; |
This file contains 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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Prieyuda Akadita S | |
* Date: 23/09/2018 | |
* Time: 11:59 | |
*/ | |
return array( | |
'host' => 'localhost', | |
'user' => 'root', |
This file contains 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
package com.ydhnwb | |
import com.fasterxml.jackson.databind.SerializationFeature | |
import com.ydhnwb.services.DatabaseHelper | |
import com.ydhnwb.services.UserService | |
import com.ydhnwb.web.widget | |
import io.ktor.application.* | |
import io.ktor.features.CallLogging | |
import io.ktor.features.ContentNegotiation | |
import io.ktor.features.DefaultHeaders |
This file contains 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 sklearn import tree | |
#datasets | |
#outlook = 0 is sunny, 1 is overcast, 2 is rainy | |
#temperature = 0 is hot, 1 is mild, 2 is cool | |
#humidity = 0 is high, 1 is normal | |
#isWindy? 0 false : 1 true | |
#outlook #temperature #humidity #windy | |
x = [ | |
[0, 0, 0, 0], |
This file contains 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
private static void loadData(){ | |
Call<WrappedListResponse<Recipe>> data = postService.getPosts("Bearer "+getToken()); | |
data.enqueue(new Callback<WrappedListResponse<Recipe>>() { | |
@Override | |
public void onResponse(Call<WrappedListResponse<Recipe>> call, Response<WrappedListResponse<Recipe>> response) { | |
if(response.isSuccessful()){ | |
WrappedListResponse<Recipe> body = response.body(); | |
if(body.getStatus() == 1){ | |
mList = (ArrayList<Recipe>) body.getData(); | |
recipeAdapter = new RecipeAdapter(mList, context); |
OlderNewer