Simple countdown using Greensock. You could add an "onComplete" to the Tweenlite to trigger an event when the countdown ends.
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
#include <Windows.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
HANDLE hToken; | |
OpenProcessToken(GetCurrentProcess(), | |
TOKEN_ADJUST_PRIVILEGES | | |
TOKEN_QUERY, | |
&hToken); |
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
package main | |
import ( | |
"crypto/md5" | |
"crypto/rand" | |
"crypto/sha1" | |
"crypto/sha256" | |
"crypto/sha512" | |
"testing" | |
) |
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
// dllmain.cpp : Defines the entry point for the DLL application. | |
#include "volumemonitor.h" | |
// We use a worker thread for all COM calls, since CoInitialize is not | |
// otherwise safe to execute in a DLL. | |
HANDLE worker_thread_; | |
// There is one global VolumeMonitor that is lazy-loaded. This helps us | |
// report errors on initialization, and will also re-attempt initialization | |
// at the next call. |
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
// http.FileSystem in-memory test stub | |
type TestOpener interface { | |
OpenAs(name string) http.File | |
} | |
type TestFileSystem TestDir | |
func (fs TestFileSystem) Open(name string) (http.File, error) { |
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
package main | |
import "sync" | |
type ExitGroup struct { | |
wg sync.WaitGroup | |
cl []func() | |
lk sync.Mutex | |
} |
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
package main | |
import "io" | |
type channelReader struct { | |
c chan []byte | |
b []byte | |
} | |
func NewChannelReader(c chan []byte) io.Reader { |
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
package multilock | |
import ( | |
"context" | |
) | |
// Resource represents a pool that, when drained, locks until a corresponding | |
// unlock is called. | |
type Resource struct { | |
c chan struct{} |
This implementation of bidirectional stream copy has the right behavior for closing streams. The first stream to return io.EOF
as a reader triggers a close on the second stream, and then the bidirectional copy may be considered done. The close on the second stream should trigger an error (e.g. io.EOF
) on the read of the first stream, closing that stream too.
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
../osdep/win32-console-wrapper.c:22:6: warning: no previous prototype for 'cr_perror' [-Wmissing-prototypes] | |
void cr_perror(const wchar_t *prefix) | |
^~~~~~~~~ | |
../osdep/win32-console-wrapper.c:37:5: warning: no previous prototype for 'cr_runproc' [-Wmissing-prototypes] | |
int cr_runproc(wchar_t *name, wchar_t *cmdline) | |
^~~~~~~~~~ | |
../osdep/win32-console-wrapper.c:73:5: warning: no previous prototype for 'wmain' [-Wmissing-prototypes] | |
int wmain(int argc, wchar_t **argv, wchar_t **envp) | |
^~~~~ |