Skip to content

Instantly share code, notes, and snippets.

View ken-ty's full-sized avatar

kenty (ケンティー) ken-ty

View GitHub Profile
@ken-ty
ken-ty / main.dart
Created January 28, 2024 16:38
2024/01/29 時点の https://pub.dev/packages/video_player/example の サンプルコードをコピー。 video_player 2.8.2。
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ignore_for_file: public_member_api_docs
/// An example of using the plugin, controlling lifecycle and playback of the
/// video.
library;
@ken-ty
ken-ty / main.dart
Created January 25, 2024 16:13
2024/01/26 時点の https://pub.dev/packages/camera/example の サンプルコードをコピー。 camera 0.10.5+9。
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
void main() {
// 1. 必要最小限で実行
runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.black,
body: RichText(
text: const TextSpan(text: 'Hello World'),
@ken-ty
ken-ty / markdown-details-collapsible.md
Created May 16, 2023 22:38 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to add a collapsible section in markdown.

Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@ken-ty
ken-ty / Kernelとは
Created May 29, 2020 04:12
カーネルの機能を200文字程度にまとめる
OSを構成する基本機能の一つであるソフトウェアで、
CPUやメモリなどのリソースへのアクセスを行う。
そのため、デバイスドライバやミドルウェアはカーネルの機能を用いて作成される。
例えば、カーネルは割込みハンドラの監視・制御を行う機能を提供している。
割込みが発生すると、カーネルは中断された処理の再開に必要なデータを保存し、
発生した割込みに対応する割込みハンドラを起動する。
ほかにも、プロセス間通信や、システムコールなどを提供している。
@ken-ty
ken-ty / Upload an image to Gist.md
Created May 20, 2020 04:38
Gistにウエブで画像をアップロードする方法

Gistにウエブで画像をアップロードする方法

  1. Gistにファイルを作る
  2. コメント欄が出来るので、コメント欄にPCから画像をドラッグする。
  3. コードがコメント欄に出るので、それをコピーする。
  4. ファイルにコードを貼り付ける。
  5. 右下のアップデートボタンを押す

def fizz_buzz(start, stop, fizz, buzz):
ans = list(range(start, stop + 1))
for n in range(start, stop + 1):
isFizz = n % fizz == 0
isBuzz = n % buzz == 0
if isFizz and isBuzz:
ans[n-1] = 'FizzBuzz'
elif isFizz:
ans[n-1] = 'Fizz'
elif isBuzz:
@ken-ty
ken-ty / pythonでgifを保存し表示する.ipynb
Created May 19, 2020 11:42
pythonでgifを保存し表示する
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.