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
GCClient *apiClient = [GCClient sharedClient]; | |
[apiClient setAuthorizationHeaderWithToken:@"YOUR_TOKEN"]; | |
[GCServiceAlbum getAlbumWithID:@(YOUR_ALBUM_ID) success:^(GCResponseStatus *responseStatus, GCAlbum *album) { | |
[album importAssetsFromURLs:@[@"YOUR_VIDEO_URL"] success:^(GCResponseStatus *responseStatus, NSArray *assets, GCPagination *pagination) { | |
/* | |
Imported the asset, do something. | |
*/ |
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
<article class="socialmediaicons"> | |
<span class="title"> Join the movement: </span> | |
<ul class="group"> | |
<% appdata.social.forEach(function(item) { %> | |
<li> | |
<a href="<%= item.url %>"> | |
<img class="icon" src="<%= item.imageURL %>" alt="icon for <%= item.shortname %>" />" | |
</a> | |
</li> | |
<% }); %> |
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
function solution(N, A) { | |
var counters = new Uint32Array(N), | |
max = 0, | |
gMax = 0; | |
for (i = 0; i < A.length; i++) { | |
var value = A[i]; | |
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
function solution(A) { | |
var cars0 = 0, | |
cars1 = 0, | |
combinations = 0; | |
for (var i = A.length - 1; i >= 0; i--) { | |
if (A[i] === 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
function solution(A, B, K) { | |
return (Math.floor(B/K) - ((A <= 1) ? 0 : Math.floor((A-1)/K))) + ((A === 0)?1: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
func delay(delay: Double, closure: ()->()) { | |
dispatch_after( | |
dispatch_time( | |
DISPATCH_TIME_NOW, | |
Int64(delay * Double(NSEC_PER_SEC)) | |
), | |
dispatch_get_main_queue(), | |
closure | |
) | |
} |
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
<%= form_for @changeset, @action, [multipart: true], fn f -> %> | |
<%= if @changeset.action do %> | |
<div class="alert alert-danger"> | |
<p>Oops, something went wrong! Please check the errors below.</p> | |
</div> | |
<% end %> | |
<div class="form-group"> | |
<%= label f, :title, class: "control-label" %> | |
<%= text_input f, :title, class: "form-control" %> |
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
module Main exposing (..) | |
import Html exposing (Html, text) | |
type Msg msg | |
= Internal | |
| Wrapped msg | |
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
module Elmo8.Console exposing (Command, putPixel, print, boot, Config, sprite) | |
{-| The ELMO-8 Fantasy Console | |
This is a PICO-8 inspired fantasy "console". This isn't really a console emulator but a simple graphics and game library for creating 8-bit retro games. | |
# Initialization | |
To start up the console you need to do a little bit of configuration (the pattern matches Elm's normal model/view/update): |