Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Wira Setiawan wirasetiawan29

🏠
Working from home
View GitHub Profile
View main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Text Field Focus',
home: MyCustomForm(),
View toast.xaml
<toast duration="long" launch="alarm(eb6c47a8-e5e2-40d0-bc4e-3aa957f36484)">
<visual>
<binding template="ToastImageAndText04">
<text id="1">Tampilkan Alarm</text>
<text id="2">New article by wirasetiawan29</text>
<text id="3">Windows 8.1: Alarm toasts</text>
<image id="1" src="ms-appx:///Assets/wirasetiawan29.png" alt="hallo" />
</binding>
</visual>
<audio loop="true" src="ms-winsoundevent:Notification.Looping.Alarm3" />
View TrackLocation.cs
public static async Task<string> TrackLocation()
{
Geolocator geoloc = new Geolocator();
Geoposition position = await geoloc.GetGeopositionAsync();
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri("http://nominatim.openstreetmap.org");
HttpResponseMessage httpResult = await httpClient.GetAsync(
String.Format("reverse?format=json&lat={0}&lon={1}", position.Coordinate.Latitude, position.Coordinate.Longitude));
JsonObject jsonObject = JsonObject.Parse(await httpResult.Content.ReadAsStringAsync());
return jsonObject.GetNamedObject("address").GetNamedString("road") + DateTime.Now.ToString("‘ (‘HH:mm:ss')'");
View MainApp
using System;
using System.Collections;
class MainApp
{
static void Main()
{
// Configure Observer pattern
ConcreteSubject s = new ConcreteSubject();
View sample.xml
xmlns:phone="clrnamespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
View MainPage.xaml
<phone:PhoneApplicationPage
x:Class="PhoneApp2.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
View CreateNumber.cs
int[] CreateNumber(int length)
{
Random random = new Random();
int[] digits = new int[length];
// For loop keeps default value of zero for
last slot in array
for(int i = 0; i < length - 1; i++)
{
digits[i] = random.Next(10);
}
View BungaBank.java
package bungabank;
public class BungaBank {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
View SelamatDatang.java
package selamatdatang;
public class SelamatDatang {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Selamat Datang!");
View Formula.text
=IF(RIGHT(B6,1)*1=IF(MOD(IF(LEFT(B6,1)*2>9,(LEFT(B6,1)*2)-9,LEFT(B6,1)*2)+IF(MID(B6,3,1)*2>9,(MID(B6,3,1)*2)-9,MID(B6,3,1)*2)+IF(MID(B6,5,1)*2>9,(MID(B6,5,1)*2)-9,MID(B6,5,1)*2)+IF(MID(B6,7,1)*2>9,(MID(B6,7,1)*2)-9,MID(B6,7,1)*2)+IF(MID(B6,9,1)*2>9,(MID(B6,9,1)*2)-9,MID(B6,9,1)*2)+IF(MID(B6,11,1)*2>9,(MID(B6,11,1)*2)-9,MID(B6,11,1)*2)+IF(MID(B6,13,1)*2>9,(MID(B6,13,1)*2)-9,MID(B6,13,1)*2)+MID(B6,2,1)+MID(B6,4,1)+MID(B6,6,1)+MID(B6,8,1)+MID(B6,10,1)+MID(B6,12,1)+MID(B6,14,1),10)=0,0,(10-MOD(IF(LEFT(B6,1)*2>9,(LEFT(B6,1)*2)-9,LEFT(B6,1)*2)+IF(MID(B6,3,1)*2>9,(MID(B6,3,1)*2)-9,MID(B6,3,1)*2)+IF(MID(B6,5,1)*2>9,(MID(B6,5,1)*2)-9,MID(B6,5,1)*2)+IF(MID(B6,7,1)*2>9,(MID(B6,7,1)*2)-9,MID(B6,7,1)*2)+IF(MID(B6,9,1)*2>9,(MID(B6,9,1)*2)-9,MID(B6,9,1)*2)+IF(MID(B6,11,1)*2>9,(MID(B6,11,1)*2)-9,MID(B6,11,1)*2)+IF(MID(B6,13,1)*2>9,(MID(B6,13,1)*2)-9,MID(B6,13,1)*2)+MID(B6,2,1)+MID(B6,4,1)+MID(B6,6,1)+MID(B6,8,1)+MID(B6,10,1)+MID(B6,12,1)+MID(B6,14,1),10))),"VALID","TIDAK VALID")
You can’t perform that action at this time.