This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: UTF-8 | |
import platform | |
import os | |
import ctypes | |
# windows | |
if platform.system() == 'Windows': | |
# need 'u' before "", if you are using UTF-8. if not you don't need to put it. | |
ctypes.windll.WINMM.mciSendStringW(u"set cdaudio door open", None, 0, None) | |
#ctypes.windll.WINMM.mciSendStringW(u"set cdaudio door closed", None, 0, None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding: utf-8 | |
import RPi.GPIO as GPIO | |
import os | |
import time | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(4, GPIO.IN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static const int VER_NUM = 3; | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// アプリバージョンを取得 | |
// NSString *currentVer = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; | |
NSString *currentVer = @"0.0.3" //example | |
// 最新のバージョン |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <arpa/inet.h> | |
#import <ifaddrs.h> | |
#import <net/if.h> | |
@implementation WifiUtils | |
- (BOOL) checkIsWifi { | |
struct ifaddrs *addresses; | |
struct ifaddrs *cursor; | |
BOOL available = NO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
Plugin.create(:ahiru_yakuna) do | |
DEFINED_TIME = Time.new.freeze | |
criminals = Set.new | |
あひる焼き = %w(burned\ duck) | |
filter_filter_stream_track do |watching| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just-In-Time (JIT) デバッグを呼び出すための詳細については、 | |
ダイアログ ボックスではなく、このメッセージの最後を参照してください。 | |
************** 例外テキスト ************** | |
System.UnauthorizedAccessException: パス 'C:\Program Files (x86)\TaskViewGestureToolkit\log.txt' へのアクセスが拒否されました。 | |
場所 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) | |
場所 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) | |
場所 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) | |
場所 System.IO.FileStream..ctor(String path, FileMode mode) | |
場所 TaskViewGestureToolkit.Log.Logger.writeToLogfile() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Throws(ClassCastException::class, InvalidClassException::class) | |
inline fun <reified T : Any> get(id: Int): T { | |
return get(sApp.getString(id)) | |
} | |
@Throws(ClassCastException::class, InvalidClassException::class) | |
inline fun <reified T : Any> get(key: String): T { | |
return when (T::class) { | |
String::class -> sPrefs.getString(key, "") as T? ?: "" as T | |
Set::class -> sPrefs.getStringSet(key, emptySet()) as T? ?: emptySet<String>() as T |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/', async (req, res) => { | |
const html = req.body.html; | |
if (!html) { | |
await res.status(400); | |
return; | |
} | |
try { | |
await page.goto( | |
`data:text/html,${html}`, { | |
timeout: pageTimeoutMsec, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import json | |
import requests | |
from bs4 import BeautifulSoup | |
TARGET = 'SCRAPING_TARGET_URL' | |
HOOK = 'SLACK_WEB_HOOK_URL' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'httpclient' | |
Plugin.create(:frozen_toshi_a) do | |
filter_is_toshi_a_frozen? do | |
[Plugin::Toshia.frozen?] | |
end | |
end | |
class Plugin::Toshia |
OlderNewer