TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lessons learned from past counterinsurgencies [pdf]

7 点作者 thomasrossi将近 10 年前

1 comment

balnaphone将近 10 年前
It&#x27;s a lot easier to read if you paste the following into your linux terminal.<p><pre><code> wget http:&#x2F;&#x2F;www.princeton.edu&#x2F;~ppns&#x2F;papers&#x2F;counterinsurgency.pdf cat &lt;&lt; &#x27; EOF&#x27; | sed &#x27;s&#x2F;^ &#x2F;&#x2F;&#x27; &gt; pdfun2up #!&#x2F;usr&#x2F;bin&#x2F;env python import copy, sys from pyPdf import PdfFileWriter, PdfFileReader input = PdfFileReader(sys.stdin) output = PdfFileWriter() for p in [input.getPage(i) for i in range(0,input.getNumPages())]: q = copy.copy(p) (w, h) = p.mediaBox.upperRight if w &gt; h : p.mediaBox.upperRight = (w&#x2F;2, h) q.mediaBox.upperLeft = (w&#x2F;2, h) output.addPage(p) output.addPage(q) else : output.addPage(p) output.write(sys.stdout) EOF chmod a+rx pdfun2up .&#x2F;pdfun2up &lt; counterinsurgency.pdf &gt; counterinsurgency_1up.pdf xdg-open counterinsurgency_1up.pdf</code></pre>
评论 #9831954 未加载