Skip to content

Instantly share code, notes, and snippets.

View itween.cs
void OnTriggerStay(Collider other) {
ins = Instantiate(PlusMoneyPrefab) as GameObject;
Vector3 startPosition = new Vector3(startX, startY, -1);
ins.transform.parent = Respawn.transform;
ins.transform.localPosition = startPosition;
ins.transform.localScale = new Vector3(50, 50, 0);
Hashtable parameters = new Hashtable();
parameters.Add("y", startY + 80);
View Scratch.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class Scratch : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler {
[SerializeField]
private Image m_Image;
private Texture2D m_TmpTexture;
private RectTransform m_ImageRT;
View utils.dart
class Utils {
static bool isNullOrEmpty(String s) {
return s == null || s == '';
}
static String stripTags(String s) {
return s.replaceAll(new RegExp('<[^>]*>'), '');
}
static Set<String> urlMatchs(String s) {
View circle_indicator.dart
import 'package:flutter/material.dart';
class CircleIndicator {
static Widget show() {
return Center(
child: new SizedBox(
height: 50.0,
width: 50.0,
child: new CircularProgressIndicator(
value: null,
View scrollable_view_test.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
View application.html.erb
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
<% if content_for?(:title) %><%= yield(:title) %> | <%= Settings.service_name %>
<% else %><%= Settings.service_name %>
<% end %></title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" charset="UTF-8">
View distributive.py
import sys
result_str = ''
for val1 in sys.argv[1].split():
for val2 in sys.argv[2].split():
result_str += val1 + '*' + val2
result_str += '+'
if result_str[-1] == '+':