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 "stm32l1xx.h" | |
| int main(void) | |
| { | |
| RCC->CR |= RCC_CR_HSEON; | |
| while(!(RCC->CR & RCC_CR_HSERDY)); | |
| RCC->APB2ENR |= RCC_APB2ENR_USART1EN; //USART1 Clock ON | |
| USART1->BRR = 0xD05; // Bodrate for 9600 on 32Mhz | |
| USART1->CR1 |= USART_CR1_UE | USART_CR1_TE | USART_CR1_RE; // USART1 ON, TX ON, RX ON |
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 | |
| function createDir { | |
| if [ ! -d $1 ]; then | |
| mkdir $1 | |
| fi | |
| } | |
| createDir imageset | |
| createDir imageset/drawable-xxxhdpi |
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 | |
| function createDir { | |
| if [ ! -d $1 ]; then | |
| mkdir $1 | |
| fi | |
| } | |
| createDir ios |
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
| from PIL import Image, ImageDraw | |
| def checkX(image, x): | |
| pixels = image.load() | |
| sum = 0; | |
| for i in range(image.size[1]): | |
| if (pixels[x,i][3] == 0): | |
| sum += 1 | |
| return (sum == image.size[1]) |
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.codename1.social; | |
| import com.codename1.io.Oauth2; | |
| import com.codename1.social.Login; | |
| import java.util.Hashtable; | |
| public class VkontakteConnect extends Login{ | |
| private static String scope = "email"; | |
| private static String tokenURL = "https://oauth.vk.com/access_token"; |
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 | |
| convert -resize 640x960! $1 "3.5-"$1 | |
| convert -resize 640x1136! $1 "4-"$1 | |
| convert -resize 750x1334! $1 "4.7-"$1 | |
| convert -resize 1242x2208! $1 "5.5-"$1 |
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 <math.h> | |
| int main() | |
| { | |
| float x; | |
| printf("Please, enter X: "); | |
| scanf("%f", &x); | |
| float y = pow((sin(x)+(7/3)),2/3); | |
| printf("f(%4.2f) = %4.2f\n",x,y); |
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
| #!/usr/bin/python | |
| import os | |
| listRoms = os.listdir("."); | |
| countRoms = len(listRoms); | |
| for i in range(0, countRoms): | |
| name = listRoms[i]; | |
| if (name[-4:] == ".bin"): |
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 | |
| ffmpeg -i video.MOV -r 6 image_%010d.png; | |
| mkdir resized; | |
| for i in image_*.png; do convert $i -resize 600 resized/$i; done | |
| rm -f image_*.png; | |
| cd resized; | |
| convert -delay 10 -layers optimize *.png ../animation.gif | |
| cd ..; | |
| rm -fr resized; |
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 | |
| WIDTH="2880"; | |
| HEIGHT="1868"; | |
| SHIFT_X="880"; | |
| SHIFT_Y="608"; | |
| ORIENT="left"; | |
| # If right page - first, insert "1", otherwise "0" | |
| RIGHT_FIRST="1"; |
OlderNewer