This file contains 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
// execution | |
// gcc size_converter.c -o size_converter && ./size_converter 512 | |
#include<stdio.h> | |
#include<stdlib.h> | |
typedef unsigned long long ULL; | |
char *types[] = {"Bytes", "KB", "MB", "GB", "TB", "PB", "EB"}; |
This file contains 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
fun hasNull(vararg list: Any?) = null in list |
This file contains 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 React, {Component, useState} from 'react'; | |
import {View, TouchableWithoutFeedback, StyleSheet, Animated, Easing} from 'react-native'; | |
import Svg, {Path} from 'react-native-svg'; | |
function getPos(x, y, radius, angle) { | |
let radians = (angle + 90.0) * Math.PI / 180.0; | |
return { | |
x: (radius * Math.sin(radians)) + x, | |
y: (radius * Math.cos(radians)) + y | |
}; |
This file contains 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 android.app.Activity; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.view.View; | |
public class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
This file contains 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
<color name="red_50">#ffebee</color> | |
<color name="red_100">#ffcdd2</color> | |
<color name="red_200">#ef9a9a</color> | |
<color name="red_300">#e57373</color> | |
<color name="red_400">#ef5350</color> | |
<color name="red_500">#f44336</color> | |
<color name="red_600">#e53935</color> | |
<color name="red_700">#d32f2f</color> | |
<color name="red_800">#c62828</color> | |
<color name="red_900">#b71c1c</color> |
This file contains 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 ExecutionTimer { | |
private static long startTime; | |
static { | |
startTime = -1; | |
} | |
public static void startTimer() { | |
startTime = System.currentTimeMillis(); | |
} |
This file has been truncated, but you can view the full file.
This file contains 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
000000 XEROX CORPORATION | |
000001 XEROX CORPORATION | |
000002 XEROX CORPORATION | |
000003 XEROX CORPORATION | |
000004 XEROX CORPORATION | |
000005 XEROX CORPORATION | |
000006 XEROX CORPORATION | |
000007 XEROX CORPORATION | |
000008 XEROX CORPORATION | |
000009 XEROX CORPORATION |
This file contains 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 java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.List; | |
public class ListFile { | |
String fileName = "address_book.txt"; | |
List<String> list; | |
ListFile() { |
This file contains 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 sample; | |
import java.awt.*; | |
import java.io.*; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
public class Connection extends Thread { | |
final int PORT = 12345; | |
private boolean isRunning = true; |
This file contains 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 java.net.*; | |
import java.util.*; | |
public class Ip { | |
public static void main(String[] args) { | |
getIPAddress(); | |
} | |
String getSubnetAddress(String ip) { |
NewerOlder