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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Google Material Design Color Palette for Android XML | |
http://www.google.com/design/spec/style/color.html#color-ui-color-palette | |
--> | |
<resources> | |
<color name="red_50">#FFEBEE</color> | |
<color name="red_100">#FFCDD2</color> |
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 <GL/GLUT.h> | |
void init(float r, float g, float b) { | |
glClearColor(r, g, b, 0.0); | |
glMatrixMode(GL_PROJECTION); | |
gluOrtho2D(0.0, 0.0, 0.0, 0.0); | |
} | |
void display() { | |
glClear(GL_COLOR_BUFFER_BIT); |
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
#!/bin/bash | |
# Update Indices | |
sudo apt-get update | |
# Apache 2.4 | |
sudo apt-get -y install apache2 | |
# PHP 7.1 | |
sudo apt-get -y remove php* |
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
public class TriangularNumbers { | |
public static void main(String[] args) { | |
int n = 0; | |
for (int i = 1; i <= 10; i++) | |
System.out.println(n += 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
int checkPrime(int n) { | |
int i; | |
int m = n / 2; | |
for (i = 2; i <= m; i++) { | |
if (n % 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
""" | |
Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print out the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. | |
""" | |
largest = None | |
smallest = None | |
while True: | |
try: | |
num = raw_input("Enter a number: ") |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Fake Co.</title> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" | |
crossorigin="anonymous"> |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>CSS Grid Playground</title> |
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
import 'package:encrypt/encrypt.dart'; | |
const CRYPT_KEY = ''; | |
String encrypt(String text) { | |
if (text == null || text.isEmpty) return null; | |
final key = Key.fromUtf8(CRYPT_KEY); | |
final encrypter = Encrypter(AES(key, mode: AESMode.ecb)); | |
return encrypter.encrypt(text).base64; | |
} |
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
<template> | |
<div class="contributors"> | |
<div v-for="i in items"> | |
<a :href="i.html_url" target="_blank" rel="noopener noreferrer"> | |
<img :src="i.avatar_url" /> | |
</a> | |
</div> | |
</div> | |
</template> |
OlderNewer