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 is_valid_ref(char *arg) | |
{ | |
do { | |
if (!isdigit(*arg)) | |
return 0; | |
} while (*++arg); | |
return 1; | |
} |
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
newpath | |
300.0 400.0 moveto | |
gsave | |
currentpoint translate | |
-241.66666666666669 0.0 rmoveto | |
108.33333333333334 0.0 rmoveto | |
gsave | |
currentpoint translate | |
-108.33333333333334 0.0 rmoveto | |
25.0 0.0 rmoveto |
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
/* | |
* The scanner definition for COOL. | |
*/ | |
/* | |
* Stuff enclosed in %{ %} in the first section is copied verbatim to the | |
* output, so headers and global definitions are placed here to be visible | |
* to the code in the file. Don't remove anything that was here initially | |
*/ | |
%{ |
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
/* | |
* String constants (C syntax) | |
* Escape sequence \c is accepted for all characters c. Except for | |
* \n \t \b \f, the result is c. | |
* | |
*/ | |
\" { | |
string_buf_ptr = string_buf; | |
BEGIN(STRING); |
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
/* | |
"The C++ Programming Language", Special Edition | |
Chapter 4, "Types and Declarations" | |
Exercise 5 | |
"What, on your system, are the largest and the smallest values of the | |
following types: char, short, int, long, float, double, long double, and | |
unsigned." | |
12 May 2012 |
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
/* | |
"The C++ Programming Language", Special Edition | |
Chapter 5, "Pointers, Arrays, and Structures" | |
Exercise 1 | |
"Write declarations for the following: a pointer to a character, an | |
array of 10 integers, a reference to an array of 10 integers, a | |
pointer to an array of character strings, a pointer to a pointer to | |
a character, a constant integer, a pointer to a constant integer, | |
and a constant pointer to an integer. Initialize each one." |
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
#!/usr/bin/env ruby1.9 | |
def merge_sort(a) | |
return a if a.length <= 1 | |
l = (merge_sort(a[0...(a.length / 2)]) << Float::INFINITY).each | |
r = (merge_sort(a[(a.length / 2)...a.length]) << Float::INFINITY).each | |
Array.new(a.length) {|i| l.peek < r.peek ? l.next : r.next} | |
end |
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
unsigned int count_inversions(unsigned int *ary, size_t len) | |
{ | |
if (len <= 1) { | |
printf("base: %u\n", ary[0]); | |
return 0; | |
} | |
size_t i; | |
size_t l_len = len / 2; |
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
Index: src/port1.0/portconfigure.tcl | |
=================================================================== | |
--- src/port1.0/portconfigure.tcl (revision 102270) | |
+++ src/port1.0/portconfigure.tcl (working copy) | |
@@ -170,11 +170,44 @@ | |
default configure.universal_cxxflags {[portconfigure::configure_get_universal_cflags]} | |
default configure.universal_ldflags {[portconfigure::configure_get_universal_ldflags]} | |
+# Internal function to set port dependencies for configure.compiler. | |
+# Defined up here so that it is available when setting the default value. |
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
[23:21:55] *** LordDeath has joined #macports | |
[23:22:04] <LordDeath> hi, is macports 2.1.3 out? | |
[23:22:19] <neverpanic> yes | |
[23:22:28] <LordDeath> I can't install it :-S | |
[23:22:31] <neverpanic> Raim: jmr_mp: can one of you fix the topic? | |
[23:22:42] <neverpanic> LordDeath: any error message? | |
[23:25:54] <LordDeath> http://pastebin.com/0mgBYNJH | |
[23:27:04] <larryv> can you run "port -d selfupdate" instead | |
[23:27:16] <LordDeath> as root? | |
[23:27:30] <larryv> as whatever you were doing before |