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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <set> | |
#include <list> | |
#include <map> | |
using namespace std; | |
int main() | |
{ |
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) | |
{ | |
int i; | |
for(i = 1; i <= 100; i++) { | |
if(i % 15 == 0) { | |
puts("FizzBuzz"); | |
} else if(i % 3 == 0) { | |
puts("Fizz"); |
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 <memory> | |
#include <queue> | |
#include <string> | |
#include <utility> | |
#include <cassert> | |
#include <iostream> | |
#include <fstream> | |
class huffman { | |
public: |
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 <string> | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <vector> | |
#include <stdexcept> | |
class studentfile { | |
public: | |
studentfile(const std::string &filename); |
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
--- orig/resources/reddit_res/data/reddit_enhancement_suite.user.js 2012-08-13 00:17:26.000000000 -0700 | |
+++ resources/reddit_res/data/reddit_enhancement_suite.user.js 2012-11-01 14:09:45.769867200 -0700 | |
@@ -6878,7 +6878,7 @@ | |
], | |
checkToolbarLink: function(url) { | |
for (var i=0, len=this.toolbarFixLinks.length; i<len; i++) { | |
- if (url.indexOf(this.toolbarFixLinks[i]) != -1) return true; | |
+ if (url && url.indexOf(this.toolbarFixLinks[i]) != -1) return true; | |
} | |
return false; |
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 <iostream> | |
static bool is_palendrome(int n) | |
{ | |
if(n >= 100000) | |
return n / 100000 % 10 == n % 10 && | |
n / 10000 % 10 == n / 10 % 10 && | |
n / 1000 % 10 == n / 100 % 10; | |
else if(n >= 10000) | |
return n / 10000 % 10 == n % 10 && |
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 <string> | |
#include <iostream> | |
#include <cctype> | |
#include <iterator> | |
#include <algorithm> | |
#include <functional> | |
using namespace std; | |
int main() | |
{ |
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 <string> | |
#include <fstream> | |
#include <iostream> | |
#include <sstream> | |
#include <cstdlib> | |
using namespace std; | |
static unsigned binary_string_to_int(const string &s) | |
{ | |
unsigned converted = 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 <iostream> | |
#include <iterator> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
vector<int> vec((istream_iterator<int>(cin)), istream_iterator<int>()); | |
copy(vec.begin(), unique(vec.begin(), vec.end()), ostream_iterator<int>(cout, "\n")); |
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 <time.h> | |
#define COLORMAP_STEPS 2 | |
typedef double colormap[3][COLORMAP_STEPS + 1][3]; | |
/* interpolate 'val' from range [inlow, inhigh) into range [outlow, outhigh) */ | |
static double interpolate(double val, double inlow, double inhigh, double outlow, double outhigh) | |
{ |
OlderNewer