status

502 HTTP Status Code

余生长醉 提交于 2019-11-26 16:02:36
问题 According to the RFC: 10.5.3 502 Bad Gateway The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. Can invalid response also mean no response at all (e.g. connection refused)? 回答1: Yes. Empty or incomplete headers or response body typically caused by broken connections or server side crash can cause 502 errors if accessed via a gateway or proxy. For more information about the network errors https

Git status ignore line endings / identical files / windows & linux environment / dropbox / mled

时光总嘲笑我的痴心妄想 提交于 2019-11-26 15:42:43
问题 How do I make git status ignore line ending differences? Background info: I use randomly Windows and Linux to work on the project. The project is in Dropbox. I found a lot about how do make git diff ignore line endings. Since i use meld git diff opens meld for each file. And meld says "identical file". So how do I avoid this. Git should only open meld for changed files. And git status should not report files as changed if only the file ending is different. EDIT: Cause: This happened because

How to change status bar color to match app in Lollipop? [Android]

泪湿孤枕 提交于 2019-11-26 14:57:28
In the new lollipop update I noticed that with the native Google apps the color of the status bar changes to match the action bar on the app you're running. I see it's on the Twitter app also so I'm guessing it's not exclusively Google who can do it. Does anyone know how to do this if it is possible? To change status bar color use setStatusBarColor(int color) . According the javadoc, we also need set some flags on the window. Working snippet of code: Window window = activity.getWindow(); window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.clearFlags

Ignore new commits for git submodule

自作多情 提交于 2019-11-26 11:59:43
问题 Background Using Git 1.8.1.1 on Linux. The repository looks as follows: master book The submodule was created as follows: $ cd /path/to/master $ git submodule add https://user@bitbucket.org/user/repo.git book The book submodule is clean: $ cd /path/to/master/book/ $ git status # On branch master nothing to commit, working directory clean Problem The master, on the other hand, shows there are \"new commits\" for the book submodule: $ cd /path/to/master/ $ git status # On branch master #

How to mark a build unstable in Jenkins when running shell scripts

十年热恋 提交于 2019-11-26 07:19:16
问题 In a project I\'m working on we are using shell scripts to execute different tasks. Some scripts are SH/Bash that runs Rsync and some are PHP scripts. One of the PHP scripts are running some integration tests that output to JUnit XML, code coverage reports and similar. Jenkins are able to mark the jobs as successful / failed based exit status . In PHP the script exits with 1 if it has detected that failed tests during the run. The other shell scripts runs commands and uses the exit codes from

How to change status bar color to match app in Lollipop? [Android]

谁说胖子不能爱 提交于 2019-11-26 04:06:40
问题 In the new lollipop update I noticed that with the native Google apps the color of the status bar changes to match the action bar on the app you\'re running. I see it\'s on the Twitter app also so I\'m guessing it\'s not exclusively Google who can do it. Does anyone know how to do this if it is possible? 回答1: To change status bar color use setStatusBarColor(int color). According the javadoc, we also need set some flags on the window. Working snippet of code: Window window = activity.getWindow

How to get current CPU and RAM usage in Python?

非 Y 不嫁゛ 提交于 2019-11-25 23:16:05
问题 What\'s your preferred way of getting current system status (current CPU, RAM, free disk space, etc.) in Python? Bonus points for *nix and Windows platforms. There seems to be a few possible ways of extracting that from my search: Using a library such as PSI (that currently seems not actively developed and not supported on multiple platform) or something like pystatgrab (again no activity since 2007 it seems and no support for Windows). Using platform specific code such as using a os.popen(\