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
#include <stdio.h> | |
#include <math.h> | |
int main (){ | |
char large_text[100]; | |
int i = 0; | |
char c; | |
printf("\nInput: "); | |
for (i = 0;(c = getchar()); i++){ |
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
#include <stdio.h> | |
#include <string.h> | |
char* highlight_word(char* text, char* word, char* final); | |
int main(int argc, char *argv[]){ | |
char tracks[][80] = {"i am not a dog you fool", | |
"what do you mean by this, bear?", | |
"now this is a silly situation", |
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
What do you think about bears in forests? | |
I for one, am avgains them. |
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
#include <stdio.h> | |
#include <string.h> | |
#define STRINGSIZE 80 | |
int cat(char *a, const char* b, const size_t max_size) | |
{ | |
//puts("FUNCTION BEGIN"); | |
size_t size = strlen(a); | |
a += size; | |
while (*b) |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int** count_chars(char *s) | |
{ | |
int **counts = (int**)malloc(256 * sizeof(int) * sizeof(char)); | |
int i; | |
for(i = 0; i < 256; i++) | |
{ |
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
func getPixel(surface *sdl.Surface, x, y int) uint32 { | |
var bpp uint8 = surface.Format.BytesPerPixel | |
/* Here p is the address to the pixel we want to retrieve */ | |
var p *uint32 = *uint32(int(surface.Pixels) + y*int(surface.Pitch) + x*bpp) | |
return *p | |
return 1 /* shouldn't happen, but avoids warnings */ | |
} |
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
#!/usr/bin/python | |
__author__ = 'jrenner' | |
import random | |
import sys | |
""" | |
This script is useful for testing the autoUnit function. It is not guaranteed | |
to be the same as in glances.py. You may need to copy and paste the exact | |
code you want to test from glances.py |
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
#!/usr/bin/python | |
# test memory info from a glances server | |
import xmlrpclib | |
import sys | |
if len(sys.argv) < 2: | |
print "Please give 'host:port' as argument" | |
sys.exit() | |
host = sys.argv[1] | |
print "Getting data from " + host |
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
float dragForce; | |
Vector2 appliedDrag = new Vector2(); | |
float dragAngle; | |
float p, A, Cd, v; // elements of the formula see wikipedia entry for Drag (physics) | |
/* | |
ρ is the density of the fluid, | |
v is the speed of the object relative to the fluid, | |
A is the cross-sectional area | |
Cd is the drag coefficient – a dimensionless number. | |
sample drag co-efficients (http://en.wikipedia.org/wiki/Drag_coefficient) |
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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0x00007f7e0ad30504, pid=10789, tid=140178498938624 | |
# | |
# JRE version: 7.0_21-b11 | |
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode linux-amd64 compressed oops) | |
# Problematic frame: | |
# C [libgdx64.so+0x23504] b2BlockAllocator::Allocate(int)+0x54 | |
# |
OlderNewer