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
.text | |
main: | |
li $a0, 5 | |
jal fib | |
move $a0, $v0 | |
jal print_int | |
jal print_newline | |
fib: | |
addiu $sp, $sp, -12 |
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
pascal: add $sp, $sp, -16 # prologue | |
sw $31, 0($sp) | |
sw $4, 4($sp) | |
sw $5, 8($sp) | |
sw $16, 12($sp) | |
li $2, 1 # return 1 if base case | |
beqz $5, ret | |
beq $4, $5, ret |
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
int main () { | |
std::string *brr = new std::string("http://textfiles.com/100/914bbs.txt"); | |
std::string *grr = new std::string("http://textfiles.com/100/ad.txt"); | |
std::string *vrr = new std::string("http://textfiles.com/100/balls.txt"); | |
std::string *zrr = new std::string("http://textfiles.com/anarchy/001.txt"); | |
std::string *rrr = new std::string("http://textfiles.com/anarchy/176.txt"); | |
std::string *arr = new std::string("http://textfiles.com/hacking/22.txt"); | |
std::string *crr = new std::string("http://textfiles.com/hacking/2600-9-3.txt"); | |
download::JobInfo info1 = download::JobInfo(brr); |
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
void MultiFetcher::Add(JobInfo *info) { | |
assert(info != NULL); | |
assert(info->url != NULL); | |
Failures result; | |
result = PrepareDownloadDestination(info); | |
if (result != kFailOk) | |
return result; | |
if (info->expected_hash) { |
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
JobInfo* MultiFetcher::WaitForNext() { | |
int index; | |
int timeout = -1; | |
int length = getJobInfoList().size(); | |
download_mgr->watch_fds_ = | |
static_cast<struct pollfd *>(smalloc(length * sizeof(struct pollfd))); | |
download_mgr->watch_fds_size_ = length; | |
for (index = 0; index < length; index++) { | |
download_mgr->watch_fd_[index].fd = JobInfo[idx].pipe_fd | |
download_mgr->watch_fd_[index].events = POLLIN | POLLPRI; |
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
/* Problem 1.1: Implement an algorithm to determine if a string | |
* has all unique characters. What if you cannot use additional | |
* data structures? | |
* @author: Rafayel Mkrtchyan | |
* @date: 9/13/2015 | |
*/ | |
#include <iostream> | |
#include <algorithm> |
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
/* Problem 1.2: Implement a function void reverse(char* str) | |
* in C or C++, which reverses a null-terminated string. | |
* @author: Rafayel Mkrtchyan | |
* @date: 9/14/2015 | |
*/ | |
#include <iostream> | |
/* This function takes an iterative approach to problem | |
* using an O(n) speed. |
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
/* Given two strings, write a method to decide if one is a | |
* permutation of the other. | |
* @author: Rafayel Mkrtchyan | |
* @date: 9/16/2015 | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <algorithm> |
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
<head> | |
<title>First Meteor App.</title> | |
</head> | |
<body> | |
<h1> fb-welcome</h1> | |
<script> | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : '444506449070273', |
OlderNewer