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
#!newlisp | |
;; PING for newLISP (win32) | |
;; | |
;; Usage: | |
;; > newlisp ping.lsp localhost | |
;; > newlisp ping.lsp -w 2000 gist.github.com | |
;; | |
;; License: | |
;; MIT License |
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
@echo off | |
rem for Google Chrome v21 or later | |
rem set TARGET=*.tmp | |
rem set SRC=%LOCALAPPDATA%\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash | |
rem for Chrome v20 or older (and v25) | |
set TARGET=fla*.tmp | |
set SRC=%LOCALAPPDATA%\Temp |
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 newlisp | |
;; See also: http://id.fnshr.info/2013/01/25/upsidedowntext/ | |
(unless utf8 | |
(throw-error "newlisp cannot use UTF-8 encoding")) | |
(new Tree 'FlipTable) | |
(FlipTable |
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
;;; -*- Mode: Lisp; Encoding: Shift_JIS -*- | |
;;; 英数字を180度回転した文字を表示するプログラム | |
;;; 元ネタ: http://id.fnshr.info/2013/01/25/upsidedowntext/ | |
(provide "flippy") | |
(in-package "user") | |
(defvar *flippy-alist* nil) |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#define init(x) memset((x).byte, '\0', sizeof((x).byte)) | |
int main() | |
{ | |
union{ | |
char c; |
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
@echo off | |
setlocal | |
if not defined XYZZYHOME set XYZZYHOME=%CD% | |
set XYZZYCONFIGPATH= | |
path %XYZZYHOME%\bin;%PATH% | |
start %XYZZYHOME%\xyzzycli.exe %* |
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
;;; dotassoc.lsp | |
;; 連想リストの Key-Value 参照をドット記法で | |
;;; Example: | |
;; (let ((student '((id 1332412) | |
;; (name ((first "Student") | |
;; (last "Example")))))) | |
;; (with-dotassoc |
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
var app, chart; | |
app = new ActiveXObject("Excel.Application"); | |
app.Visible = true; | |
app.Workbooks.Add(); | |
app.Range("a1").Value = 3; | |
app.Range("a2").Value = 2; | |
app.Range("a3").Value = 1; | |
app.Range("a1:a3").Select(); | |
chart = app.Charts.Add(); | |
chart.Type = -4100; // xl3DColumn |
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
/* | |
* - Query the Value of a Semaphore | |
* http://www.codeguru.com/Cpp/W-P/win32/article.php/c1423/ | |
* - Code Snippet - Query Semaphore | |
* http://www.ragestorm.net/snippet?id=97 | |
* - Semaphores value - statckoverflow | |
* http://stackoverflow.com/questions/2579536/semaphores-values | |
* - NtQuerySemaphore - Undocumented function of NTDLL | |
* http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/NT%20Objects/Semaphore/NtQuerySemaphore.html | |
*/ |
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
;; FOOP in newLISP | |
;; * How find parent context? | |
(new Class 'Animal) | |
(new Animal 'Snake) (define Snake:super Animal) | |
(new Animal 'Horse) (define Horse:super Animal) | |
(context Animal) | |
;; constructor |