Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
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
/* Copyright 2019 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* https://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, |
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 com.ssaurel.inappkeyboard; | |
import android.content.Context; | |
import android.text.TextUtils; | |
import android.util.AttributeSet; | |
import android.util.SparseArray; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.inputmethod.InputConnection; | |
import android.widget.Button; |
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
local widget = require("widget") | |
local function angleOf( ax, ay, bx, by, adjust, positive ) | |
local angle = math.atan2( by-ay, bx-ax ) * 180/math.pi | |
if (adjust) then | |
if (type(adjust) ~= "number") then adjust = -90 end | |
angle = angle - adjust | |
if (angle < -180) then angle=angle+360 end | |
if (angle > 180) then angle=angle-360 end |
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
-- ref: http://docs.coronalabs.com/daily/guide/graphics/effects.html#generator.radialgradient | |
local back, outer, inner = {0,1,0,1}, {0,.9,0,.05}, {0,1,0,.05} | |
-- backing colour rect | |
display.newRect( display.actualCenterX*.5, display.actualContentHeight*.25, 220, 220 ).fill = back | |
-- radial fill rect | |
local r = display.newRect( display.actualCenterX*.5, display.actualContentHeight*.25, 200, 200 ) | |
local function getRadius( r, xOffset, yOffset ) |
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
using UnityEngine; | |
using System; | |
// example: | |
// HFTDialog.MessageBox("error", "Sorry but you're S.O.L", () => { Application.Quit() }); | |
public class HFTDialog : MonoBehaviour { | |
Rect m_windowRect; | |
Action m_action; |
FROM HUE DESIGN DOCS
#Conversion between RGB and xy in the CIE 1931 colorspace for hue The conversion between RGB and xy in the CIE 1931 colorspace is not something Philips invented, but we have an optimized conversion for our different light types, like hue bulbs and LivingColors. It is important to differentiate between the various light types, because they do not all support the same color gamut. For example, the hue bulbs are very good at showing nice whites, while the LivingColors are generally a bit better at colors, like green and cyan.
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 tyrantgit.sample; | |
import android.view.View; | |
import android.widget.SeekBar; | |
/** | |
* Created by narendra on 30/9/15. | |
*/ | |
public class StepValueSeekbar { |
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
window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
if let window = window { | |
window.backgroundColor = UIColor.whiteColor() | |
window.rootViewController = UIViewController() | |
window.makeKeyAndVisible() | |
} |
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
-- polygon concave test | |
require("mathlib") | |
stage = display.getCurrentStage() | |
local text = display.newText{ text="- - -", x=display.contentCenterX, y=100, fontSize=24 } | |
lines = display.newGroup() | |
lines:insert(display.newGroup()) |
NewerOlder