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
git rm -r --cached . | |
git add . | |
git commit -m "fixing .gitignore" |
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
└──╼ $./avr-objdump -S '/home/twisted/GradleProjects/ShiftAvr/shiftavr-examples/build/atmega328p/hello_gpio_write.c.elf' | |
/home/twisted/GradleProjects/ShiftAvr/shiftavr-examples/build/atmega328p/hello_gpio_write.c.elf: file format elf32-avr | |
Disassembly of section .text: | |
00000000 <__vectors>: | |
0: 0c 94 34 00 jmp 0x68 ; 0x68 <__ctors_end> | |
4: 0c 94 46 00 jmp 0x8c ; 0x8c <__bad_interrupt> |
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 Wrapper { | |
private Object object; | |
public Wrapper(Object object) { | |
this.object = object; | |
} | |
public void setObject(Object object) { | |
this.object = object; | |
} |
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.util.ArrayList; | |
class TestSuperCapture { | |
static class TestSuper {} | |
static class TestSub extends TestSuper {} | |
static class TestSub2 extends TestSub {} | |
static class TestSub3 extends TestSub2 {} | |
public static void main(String[] args) { |
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> | |
/* define a non-system-specific pointer type that can hold an address of up-to 8-bytes */ | |
typedef long long jlong; | |
jlong Java_util_getAddress() { | |
int* x = malloc(sizeof(int)); | |
*x = 2312; | |
void* address = x; |
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> | |
/** Header file */ | |
typedef struct { | |
int rows; | |
int columns; | |
} StarMatrixMetadata; | |
void print_star_matrix(StarMatrixMetadata metadata); |
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> | |
int main(void*) { | |
const char* user = "Andrew"; | |
const char* passwd = "ZirqfRopWpedsS0012#24"; | |
/* create a pointer to strings (notice, we are just creating references here) */ | |
const char* credentials[] = {user, | |
passwd}; | |
/* get an element from the 1st dimension */ |
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> | |
int main(void*) { | |
/* create an array of strings (arrays of characters) */ | |
/* This buffer is allocated in contigous memory chunks */ | |
const char credentials[][255] = {"Andrew", | |
"ZirqfRopWpedsS0012#24"}; | |
/* get an element from the 1st dimension */ | |
const char* user_cred = credentials[0]; /* or use *(credentials + 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
#include <stdio.h> | |
#include <stdlib.h> | |
int* mat_add(int*, int*, int); | |
int* mat_add(int* a, int* b, int enteries) { | |
// enteries * 4 = 2 * 4 = 8 bytes | |
int* summation = (int*) calloc(enteries, sizeof(int)); | |
for (int row = 0; row < enteries; row++) { | |
for (int column = 0; column < enteries; column++) { |
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
/** | |
* @brief Tests using pointer operations on a data structure to evaluate its members. | |
* | |
* @author pavl_g | |
*/ | |
#include <stdio.h> | |
struct Test { | |
int x; | |
int y; |