Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
using UnityEngine.UI;
public class CountDown : MonoBehaviour
{
// 開始
private void Start()
{
_count = _initialCount;
_countText.text = _count.ToString();
$(document).ready(function () {
var isFound = false;
// ブログの新着記事の親を検索
var newBlogLists = document.getElementsByClassName('blogList clear heightAdjust heightLineParent');
if (newBlogLists.length > 0) {
// ブログの新着記事のリストを回す
var newBlogList = newBlogLists[0].children;
for (var i = 0; i < newBlogList.length; i++) {
var newBlog = newBlogList[i];
// 日付を検索
// リクエストを受け取る
chrome.runtime.onMessage.addListener(
function (values, sender, callback) {
switch (values.type) {
case "OpenPage": {
OpenPage(values, true);
callback(values.type);
break;
}
case "FindNotification": {
@hexagit
hexagit / popup.js
Last active October 10, 2019 07:51
$(document).ready(function () {
// 日付を追加
const year = $("#Year");
const month = $("#Month");
const date = $("#Date");
for (var i = 2019; i <= 2024; i++) {
year.append('<option value="' + i + '">' + i + '</option>');
}
<!DOCTYPE html>
<script src="jquery-3.4.1.min.js"></script>
<script src="popup.js"></script>
<html lang="ja">
<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" />
{
"name": "Test",
"version": "1.0.0",
"permissions": [
"tabs",
"notifications",
"https://hexadrive.jp/hexablog/*/*"
],
"manifest_version": 2,
"description": "Test",
@hexagit
hexagit / lottery
Created August 2, 2019 10:13
予測を行うためのマクロ
'パラメーター用変数
Dim RowCnt As Integer
Dim LotCnt As Integer
Dim Min As Integer
Dim Max As Integer
Dim NumMax As Integer
Dim MatchMax As Integer
'チェック用に設定された数字を入れる配列
Dim CheckNum() As Integer
'予想数を一時的に保存する配列
@hexagit
hexagit / enum_gethashcode_il
Last active July 24, 2019 09:36
Enum.GetHashCodeのIL
// num += TestEnum.Test0.GetHashCode();
IL_0012: ldloc.0
IL_0013: ldc.i4.1
IL_0014: stloc.3
// (no C# code)
IL_0015: ldloca.s 3
IL_0017: constrained. ConsoleApp1.Program/TestEnum
IL_001d: callvirt instance int32 [System.Runtime]System.Object::GetHashCode()
@hexagit
hexagit / int32_gethashcode_il
Last active July 24, 2019 09:37
Int32.GetHashCodeのIL
// num2 += num3.GetHashCode();
IL_006f: ldloc.s 4
IL_0071: ldloca.s 5
IL_0073: call instance int32 [System.Runtime]System.Int32::GetHashCode()
@hexagit
hexagit / enum_gethashcode_perf.cs
Created July 24, 2019 08:32
Enum.GetHashCodeの負荷を確認するCS
enum TestEnum : int {
Test0 = 1,
}
static void Main(string[] args)
{
// 500万回GetHashCodeを呼ぶ
const int MaxCount = 5000000;
// EnumTest