This file contains hidden or 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
html, body{ | |
height: 100%; | |
} | |
#clock { | |
font-size: 50px; | |
/* font-family: 'Helvetica, Arial'; | |
color: #3e3e3e; */ | |
} |
This file contains hidden or 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
require "Win32API" | |
require 'Date' | |
require 'etc' | |
api = Win32API.new( 'user32', 'GetLastInputInfo', ['P'], 'I') | |
# match the structure LASTINPUTINFO. First 4 byte int is size of struct | |
s = [8, 0].pack('l*') | |
t = Win32API.new("kernel32", "GetTickCount", nil, 'L') |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Inconsolata:400,700' rel='stylesheet' type='text/css'> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Editor</title> | |
<style id="jsbin-css"> | |
* { box-sizing: border-box } |
This file contains hidden or 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
<?php | |
namespace Bolt\Extension\Largo\SortOrder; | |
use Symfony\Component\HttpFoundation\Response; | |
use Bolt; | |
class Extension extends \Bolt\BaseExtension | |
{ | |
/** @var boolean */ | |
private $isAdmin; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Inconsolata:400,700' rel='stylesheet' type='text/css'> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Editor</title> | |
<style id="jsbin-css"> | |
* { box-sizing: border-box } |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,400italic,700italic' rel='stylesheet' type='text/css'> | |
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<meta charset="utf-8"> | |
<title>Whole lot of shaking going on</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" /> | |
<style id="jsbin-css"> | |
.box { |
This file contains hidden or 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
require 'csv' | |
require 'open-uri' | |
zeilen = CSV.read('images.csv', { :col_sep => ';' }) | |
listeMitBilderProSku = zeilen.group_by{|x| x[0] } | |
#p listeMitBilderProSku | |
listeMitBilderProSku.each do |bilderProSku| | |
sku = bilderProSku[0] |
This file contains hidden or 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
<?php | |
require_once('TwitterAPIExchange.php'); | |
function getLastPlayedSong($username, $apiKey) { | |
$url = "http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=" . $username . | |
"&api_key=" . $apiKey ."&format=json"; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$rawData = curl_exec($ch); | |
curl_close($ch); |
This file contains hidden or 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
I asked chatgpt for a workaround and it gave me this. you'll have to paste it into the developer console. (usually never ever do this) | |
you will then see the results in the developer console (the ones that manage to come in) | |
// Select the node that will be observed for mutations | |
const targetNode = document.body; | |
// Options for the observer (which mutations to observe) | |
const config = { childList: true, subtree: true }; | |
// Callback function to execute when mutations are observed |
This file contains hidden or 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
ChatGPTにハッシュキーを直接変数にするように依頼しました。何度か繰り返した結果、うまくいきました。一体どうすればいいのでしょうか? | |
Ruby: ハッシュを返すメソッドがあるのですが、そのメソッドを使うときにハッシュのキーを変数として使うにはどうしたらいいですか?繰り返しにならないようにね。ハッシュのキーは変数として使えるようにすればいいんだよ。 | |
Ruby: I have a method that returns a hash, how can use the hash keys as variables when I use the method. I don't want to repeat myself. The hash keys should just become variables that I can use. | |
To use the keys of a hash as variables, you can use Ruby's Object#instance_variable_set method, which allows you to set the value of an instance variable using a string that specifies the name of the variable. | |
ハッシュのキーを変数として使うには、Ruby の Object#instance_variable_set メソッドを使います。このメソッドでは、変数名を指定した文字列を使ってインスタンス変数の値を設定することができます。 |
OlderNewer