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
| EGIN { | |
| FIELD_LIST = "Field1,Field2,Field3"; # fields definition, in order | |
| split(FIELD_LIST, fields, ","); | |
| } | |
| { | |
| pos = find(fields, $1); | |
| if (pos == 0) { | |
| print("unexpected field " $1); | |
| exit 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
| ''' | |
| Infix calculator | |
| First tokenize infix expression, | |
| then transform it into postfix, | |
| then calculate it. | |
| E.g.: | |
| 9 - 5 + 2 * 3 | |
| => 9 5 - 2 3 * + | |
| ''' | |
| import re |
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<string.h> | |
| #include<ctype.h> | |
| struct node{ | |
| int num; | |
| char *p; | |
| struct node *next; | |
| }; |
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
| var Base = { | |
| create: function(attrs){ | |
| var o=this.clone(); | |
| o.init(attrs); | |
| return o; | |
| }, | |
| clone: function() { | |
| var o={}; | |
| for(var i in this) | |
| if (this.hasOwnProperty(i)) |
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
| #authorized keys file name | |
| AK=authorized_keys | |
| #enabled pub key dir | |
| ENABLED=enabled_keys | |
| #disabled pub key dir | |
| DISABLED=disabled_keys | |
| if [[ $# = 0 ]] | |
| then | |
| printf "Usage:\n %s to_be_removed.pub\n" "$0" |
NewerOlder