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 javafx.application.Application; | |
| import javafx.geometry.Pos; | |
| import javafx.scene.Scene; | |
| import javafx.scene.control.Label; | |
| import javafx.stage.Stage; | |
| public class HelloWorld extends Application { | |
| @Override | |
| public void start(Stage primaryStage) throws Exception { | |
| Label label = new Label("Hello World"); |
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 java.io.*; | |
| class WriteInts | |
| { | |
| public static void main ( String[] args ) | |
| { | |
| String fileName = "intData.dat" ; | |
| int value0 = 0, value1 = 1, value255 = 255, valueM1 = -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
| public class Euclid { | |
| //recursive implementation | |
| public static int gcd(int x, int y) { | |
| if( y == 0 ) return x; | |
| else return gcd( y, 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <title>CoffeScript on browser</title> | |
| </head> | |
| <body> | |
| <script type="text/coffeescript"> | |
| class Animal |
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
| curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - \ | |
| && sudo apt-get install -y nodejs |
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 | |
| # My first script | |
| echo "Hello $USER" | |
| echo "Hey I am " $USER " and will be telling you about the current processes" | |
| echo "Running processes list" | |
| ps |
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 <string.h> | |
| #include <malloc.h> | |
| int main(int argc, int **argv) { | |
| char ch; | |
| FILE *source, *target; | |
| char source_file[40], target_file[40]; |
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
| /** | |
| This example reads the contents of a root directory. | |
| Reference: https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxbd00/rtread.htm | |
| */ | |
| #include <stdio.h> | |
| #include <dirent.h> | |
| #include <errno.h> |
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
| /** | |
| Author: Adrian Statescu <http://adrianstatescu.com> | |
| How does fread really work?! | |
| The declaration of FREAD is as following: | |
| size_t fread(void *ptr, size_t size, size_t nmem, FILE *stream) | |
| There may or may not be any difference in performance. There is a difference in semantics. | |
| fread(a, 1, 1000, stdin); -> attempts to read 1000 data elements each of which is 1 byte long | |
| fread(a, 1000, 1, stdin); -> attempts to read 1 data element which is 1000 bytes long |
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 <malloc.h> | |
| #define FIN "algsort.in" | |
| typedef int (*Comparer)(int, int); | |
| typedef void (*fnPtr)(int*, int, Comparer); | |
| int sort_asc(int a, int b) { | |