以任意文字編輯器編輯 /etc/systemd/logind.conf,並尋找 HandleLidSwitch 這個屬性,並且依照需要設定以下的其中一個值。
poweroff 闔上螢幕時關機 hibernate 闔上螢幕時待命 lock 闔上螢幕時鎖定 ignore 闔上螢幕不做任何動作
設定完以後,重新啟動對應的服務。
sudo restart systemd-logind
參考資料:
1、Ubuntu 14.04笔记本如何在合上盖子时关机
Software entities (class, modules, functions, etc.) should be open for extension, but closed for modification. Junior programmers create simple solutions to simple problems. Senior programmers create complex solutions to complex problems. Great programmers find simple solutions to complex problems. 註1:本部落格的範例程式碼在 2015 年以前的文章中,大多是以全型空白做縮排。如需服用,請自行用文字編輯器的取代功能把全型空白取代成半型空白。
- Bertrand Meyer
- Charles Connell
註2:本部落格的內容授權請參閱部落格底部的授權宣告。
poweroff 闔上螢幕時關機 hibernate 闔上螢幕時待命 lock 闔上螢幕時鎖定 ignore 闔上螢幕不做任何動作
sudo restart systemd-logind
html body { font-family: arial,verdana,sans-serif; font-size: small; }不過如果要在 Foswiki 上寫一些中英文夾雜的條目,預設的字體其實蠻不好閱讀的!
IP Range: Start 10.5.4.2, End 10.5.4.254 CIDR: 10.5.0.0/16 Use VLAN tagging: false Gateway: 10.5.0.1
CIDR: 192.168.101.0/24 Use VLAN tagging: false
CIDR: 192.168.102.0/24 Use VLAN tagging: false
Internal network CIDR: 192.168.111.0/24 Internal network gateway: 192.168.111.1 Floating IP ranges: Start 10.5.5.2, End 10.5.5.254 DNS Servers: 8.8.4.4, 8.8.8.8
post請求的OutputStream實際上不是網絡流,而是寫入內存,在getInputStream中才真正把寫道流裡面的內容作為正文與根據之前的配置生成的http request頭合並成真正的http request,並在此時才真正向服務器發送。
HttpURLConnection.setChunkedStreamingMode函數可以改變這個模式,設置了ChunkedStreamingMode後,不再等待OutputStream關閉後生成完整的http request一次過發送,而是先發送http request頭,正文內容則是網路流的方式實時傳送到服務器。實際上是不告訴服務器http正文的長度,這種模式適用於向服務器傳送較大的或者是不容易獲取長度的數據,如文件。
mei 0000:00:16.0: initialization failed.
sudo echo "blacklist mei" > /etc/modprobe.d/mei.conf
mount -o rw,remount /
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 379393E0AAEE96F6 gpg --export --armor 379393E0AAEE96F6 | sudo apt-key add -
root@ubuntu:~# gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv 379393E0AAEE96F6 gpg: directory `/root/.gnupg' created gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/root/.gnupg/secring.gpg' created gpg: keyring `/root/.gnupg/pubring.gpg' created gpg: requesting key AAEE96F6 from hkp server keyserver.ubuntu.com gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key AAEE96F6: public key "Fosiki Software Releases (Release signing user) <Releases@fosiki.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) root@ubuntu:~# gpg --export --armor 379393E0AAEE96F6 | sudo apt-key add - OK
嚴重: StandardWrapper.Throwable java.lang.ArrayIndexOutOfBoundsException: 48188 at org.objectweb.asm.ClassReader.readClass(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at org.objectweb.asm.ClassReader.accept(Unknown Source) at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:136) at com.sun.jersey.core.spi.scanning.JarFileScanner.scan(JarFileScanner.java:97) at com.sun.jersey.spi.scanning.servlet.WebAppResourcesScanner$1.f(WebAppResourcesScanner.java:94) at com.sun.jersey.core.util.Closing.f(Closing.java:71) at com.sun.jersey.spi.scanning.servlet.WebAppResourcesScanner.scan(WebAppResourcesScanner.java:92) at com.sun.jersey.spi.scanning.servlet.WebAppResourcesScanner.scan(WebAppResourcesScanner.java:79) at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:80) at com.sun.jersey.api.core.servlet.WebAppResourceConfig.init(WebAppResourceConfig.java:102) at com.sun.jersey.api.core.servlet.WebAppResourceConfig.<init>(WebAppResourceConfig.java:89) at com.sun.jersey.api.core.servlet.WebAppResourceConfig.<init>(WebAppResourceConfig.java:74) at com.sun.jersey.spi.container.servlet.WebComponent.getWebAppResourceConfig(WebComponent.java:668) at com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:415) at com.sun.jersey.spi.container.servlet.ServletContainer.getDefaultResourceConfig(ServletContainer.java:582) at com.sun.jersey.spi.container.servlet.WebServletConfig.getDefaultResourceConfig(WebServletConfig.java:87) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:699) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:674) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:203) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:374) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:557) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)
cipherLen = (clearLen/16 + 1) * 16;
windows找不到'C:\Program' 請確定您輸入的正確名稱,並且重試而解決方法就是把有空格的部分用 \" 包起來 [2-3],讓 C 語言執行時看到的字串是這樣:
C:\"Program Files"\....例如:
system("C:\\\"Program Files\"\\Java\\jdk1.7.0_45");
user@HTPC:/home$ sudo apt-get install -f 正在讀取套件清單... 完成 正在重建相依關係 正在讀取狀態資料... 完成 升級 0 個,新安裝 0 個,移除 0 個,有 59 個未被升級。 1 個沒有完整得安裝或移除。 此操作完成之後,會多佔用 0 B 的磁碟空間。 正在設定 openntpd (3.9p1+debian-9) ... Starting openntpd: /etc/openntpd/ntpd.conf: Permission denied invoke-rc.d: initscript openntpd, action "start" failed. dpkg:在處理 openntpd (--configure) 時發生錯誤: 子程序 已安裝的 post-installation script 傳回了錯誤退出狀態 1 在處理時有錯誤發生: openntpd E: Sub-process /usr/bin/dpkg returned an error code (1)
static { QueryBuilder db = new QueryBuilder(.....); db.execute("key", 1).ensureIndex(); }