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 <iostream> | |
#include <vector> | |
int main() { | |
std::vector <std::string *> pointers(10); | |
pointers[0] = new std::string("Hello"); | |
pointers[5] = new std::string("I'm index 5"); | |
for(int i=0;i<pointers.size();i++) { | |
if(pointers[i] != 0) { | |
std::cout << *pointers[i] << "\n"; |
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 <iostream> | |
int main() { | |
std::string * pointers[10]; | |
memset(&pointers,0,sizeof pointers); | |
pointers[0] = new std::string("Hello"); | |
pointers[5] = new std::string("I'm index 5"); | |
for(int i=0;i<10;i++) { | |
if(pointers[i] != 0) { | |
std::cout << *pointers[i] << "\n"; |
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
<html> | |
<head> | |
<title>Webmaster Exam 2012</title> | |
<link href='http://fonts.googleapis.com/css?family=Sevillana' rel='stylesheet' type='text/css'> | |
<link rel="stylesheet" type="text/css" href="http://www.redbrick.dcu.ie/~vadimck/webmasterexam2012LAWL/includes/style.css" /> | |
<script src="http://www.redbrick.dcu.ie/~vadimck/webmasterexam2012LAWL/includes/jquery-1.7.1.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$.post('http://www.redbrick.dcu.ie/~vadimck/webmasterexam2012LAWL/exam.php', { valid: "bundy" }, function(data) { |
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 <iostream> | |
class Test { | |
private: | |
std::string* message; | |
public: | |
Test(); | |
void setMessage(std::string* message); | |
void putMessage(); |
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 "Test.h" | |
Test::Test() {} | |
void Test::setMessage(std::string* message) { | |
this->message = message; | |
} | |
void Test::putMessage() { | |
std::cout << *this->message; | |
} |
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 <string> | |
#include "Test.h" | |
int main() { | |
Test item = Test(); | |
item.setMessage(new std::string("Hello World")); | |
item.putMessage(); | |
return 0; | |
} |
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
[alias] | |
# View the SHA, description, and history graph of the latest 20 commits | |
l = log --pretty=oneline -n 20 --graph | |
# View the current working tree status using the short format | |
s = status -s | |
# Show the diff between the latest commit and the current state | |
d = !"git diff-index --quiet HEAD -- || clear; git diff --patch-with-stat" | |
# `git di $number` shows the diff between the state `$number` revisions ago and the current state | |
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" | |
# Pull in remote changes for the current repository and all its submodules |
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
.data | |
N: .word 20 | |
a0: .word 23 ; a[0] | |
.word 12 ; a[1] | |
.word 19 ; a[2] | |
.word 9 ; . | |
.word 98 ; . | |
.word 4 ; . | |
.word 7 |
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
.data | |
N: .word 20 | |
a0: .word 23 | |
.word 12 | |
.word 19 | |
.word 9 | |
.word 98 | |
.word 4 | |
.word 7 |
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
.data | |
N: .word 1000 | |
CONTROL: .word 0x10000 | |
DATA: .word 0x10008 | |
max: .word 65536 ; size of primes space | |
primes: .space 65536 ; space for MAX/8 8-byte primes | |
.text | |
ld r20,CONTROL(r0) |