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
| commit 4d7f4a5e3b9561f37ee5f61727e7b48c3065c446 | |
| Author: Hussein El-Sayed <[email protected]> | |
| Date: Fri Dec 30 23:28:15 2011 +0000 | |
| servers/apfs/buffer.c: fixed put_block call to find_block instead of get_blo | |
| that creates the block if it doesn't exist. | |
| diff --git a/servers/apfs/buffer.c b/servers/apfs/buffer.c | |
| index a5c77b4..de18e8c 100644 | |
| --- a/servers/apfs/buffer.c |
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
| /** | |
| * In this code we have a very large array called arr, and very large set of operations | |
| * Operation #1: Increment the elements within range [i, j] with value val | |
| * Operation #2: Get max element within range [i, j] | |
| * Build tree: build_tree(1, 0, N-1) | |
| * Update tree: update_tree(1, 0, N-1, i, j, value) | |
| * Query tree: query_tree(1, 0, N-1, i, j) | |
| */ | |
| #include<iostream> |
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
| /** | |
| * In this code we have a very large array called arr, and very large set of operations | |
| * Operation #1: Increment the elements within range [i, j] with value val | |
| * Operation #2: Get max element within range [i, j] | |
| * Build tree: build_tree(1, 0, N-1) | |
| * Update tree: update_tree(1, 0, N-1, i, j, value) | |
| * Query tree: query_tree(1, 0, N-1, i, j) | |
| */ | |
| #include<iostream> |
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<cmath> | |
| #include<algorithm> | |
| #include<vector> | |
| #include<cstdio> | |
| using namespace std; | |
| int main() { | |
| int n; | |
| cin >> 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
| # Define 1 real worker using ajp13 | |
| worker.list=worker1 | |
| # Set properties for worker1 (ajp13) # Don't use ajp12 because it has lots of bugs | |
| worker.worker1.type=ajp13 | |
| worker.worker1.host=localhost | |
| worker.worker1.port=8009 |
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
| JkWorkersFile /usr/local/apache2/conf/workers.properties | |
| # Where to put jk logs | |
| JkLogFile /usr/local/apache2/logs/jk_error | |
| # Set the jk log level [debug/error/info] | |
| JkLogLevel info | |
| # Select the log format | |
| JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " | |
| # JkOptions indicate to send SSL KEY SIZE, | |
| JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories | |
| # JkRequestLogFormat set the request format |
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
| private void convertHtmlToPdf(File inputFile, File outputFile) throws IOException, FileNotFoundException, DocumentException { | |
| String path = inputFile.toURI().toURL().toString(); | |
| ITextRenderer renderer = new ITextRenderer(); | |
| ITextFontResolver fr = renderer.getFontResolver(); | |
| fr.addFont(properties.getProperty("itext.fonts.lucidaFontPath"), BaseFont.IDENTITY_H, BaseFont.EMBEDDED); | |
| renderer.setDocument(path); | |
| renderer.layout(); |
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<vector> | |
| #include<cstring> | |
| using namespace std; | |
| int mem[50][50][50]; // Memorize visited states | |
| void eval(const int& x, int &y, int &z) { | |
| if(x != -1) { | |
| y++; |
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
| bool hasUniqueChs(string s) { | |
| bool chs[256]; | |
| memset(chs, false, sizeof chs); | |
| for(int i = 0; i < s.size(); i++) { | |
| if(chs[s[i]]) | |
| return false; | |
| chs[s[i]] = true; | |
| } |
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 reverse(string s) { | |
| int len = s.size(); | |
| for(int i = 0; i < len/2; i++) { | |
| swap(s[i], s[len-i-1]); | |
| } | |
| return s; | |
| } |
OlderNewer