Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Wira Setiawan wirasetiawan29

🏠
Working from home
Block or report user

Report or block wirasetiawan29

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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 MainPage.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using compass.Resources;
You can’t perform that action at this time.