鍍金池/ 問答/ 網(wǎng)絡安全問答
有你在 回答

可能是跟編譯的平臺有關,試著修改一下生成菜單下的 目標平臺

艷骨 回答

從實現(xiàn)角度,我的建議是直接放第三方。
至于你說的[視頻看的人多了,是不是搞破產(chǎn)了] 。這里有兩點你先理清楚

  • 你是希望別人看呢,還是不希望被人看到視頻。
  • 這種問法就是過早擔憂,類似一個小網(wǎng)站上線了,其實壓根沒人來訪問,就會擔憂高并發(fā)了怎么辦,服務器扛不住怎么辦
心癌 回答

隨機端口的問題:設置下列啟動參數(shù)為同一個端口即可。

com.sun.management.jmxremote.port
com.sun.management.jmxremote.rmi.port

對 Java 7 update 25以后的版本有效。

安全及防火墻的問題:建議采用ssh隧道的方式進行訪問,這是通用的安全遠程訪問方式,對所有類型的訪問都有效。

參考
https://bugs.java.com/bugdata...

https://stackoverflow.com/que...

http://blog.csdn.net/u0137936...

負我心 回答

問題解決,可能是網(wǎng)絡代理的問題,我翻墻之后就能成功安裝了,但我依然有疑問我之前是有安裝成功的,不需要翻墻,問題出在哪里?

我有想改過pyenv的安裝源,但沒有找到相應的配置安裝源的位置,不知道是否會受brew安裝源更改的影響呢?這是前一次安裝和本次安裝的區(qū)別。

遺莣 回答

修改路徑 /usr/app/nginx/html 為 /usr/share/nginx/html
詳情

default.conf 文件root默認的路徑為: /usr/share/nginx/html

命于你 回答

HTML 處理就不會帶名字空間:

# -*- coding: utf-8 -*-

from lxml import etree

content = '''
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="calibre:cover" content="true"/>
        <title>Cover</title>
        <style type="text/css" title="override_css">
            @page {padding: 0pt; margin:0pt}
            body { text-align: center; padding:0pt; margin: 0pt; }
        </style>
    </head>
    <body>
        <div>
            <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 200 266" preserveAspectRatio="none">
                <image width="200" height="266" xlink:href="cover1.jpeg"/>
            </svg>
        </div>
    </body>
</html>
'''

print etree.tostring(etree.HTML(content).xpath('//body/*')[0])
懷中人 回答

你數(shù)據(jù)庫和程序是部署在一起的嗎?如果是,其實直接都是localhost都是可以,都是指向的是自己本機。但是用127.0.0.1更好

無標題 回答

沒有遇到過誒。。。要不你去提一個issue吧。
如果現(xiàn)在急著改你可以看看他的這個邊框是怎么出現(xiàn)的追蹤一下。然后!important強行干掉吧

孤巷 回答

php掛了。看看是不是內(nèi)存泄露。

真難過 回答

注意:python3以后才支持yield from語法

import collections


def flatten(d, prefix="", sep="_"):
    def _take_prefix(k, v, p):
        if p:
            yield from flatten(v, "{}{}{}".format(p, sep, k))
        else:
            yield from flatten(v, str(k))

    if isinstance(d, dict):
        for k, v in d.items():
            if isinstance(v, str) or not isinstance(v, collections.Iterable):
                if prefix:
                    yield "{}{}{}".format(prefix, sep, k), v
                else:
                    yield k, v
            elif isinstance(v, dict):
                yield from _take_prefix(k, v, prefix)
            elif isinstance(v, list):
                for i in v:
                    yield from _take_prefix(k, i, prefix)
            else:
                pass
    else:
        pass

dic = {your dataset}
for key, value in flatten(dic):
    print("{}: {}".format(key, value))

結果如下,應該能拍平了

status: changed
dataset_id: 5a4b463c855d783af4f5f695
dataset_name: AE_E
dataset_label: 1- ADVERSE EVENTS - Not Analyzed
details_variables_variable_id: 5a4b4647855d783b494f9d3f
details_variables_variable_name: CPEVENT
details_variables_variable_label: CPEVENT
details_variables_status: changed
details_variables_details_r_type_new_value: unary
details_variables_details_r_type_old_value: factor
details_variables_message: Variable with different R Type
details_variables_variable_id: 5a4b4647855d783b494f9d25
details_variables_variable_name: CPEVENT2
details_variables_variable_label: CPEVENT2
details_variables_status: changed
details_variables_details_r_type_new_value: unary
details_variables_details_r_type_old_value: binary
details_variables_message: Variable with different R Type
details_variables_variable_id: 5a4b4647855d783b494f9d26
details_variables_variable_name: CP_UNSCHEDULED
details_variables_variable_label: CP_UNSCHEDULED
details_variables_status: changed
details_variables_details_r_type_new_value: undefined
details_variables_details_r_type_old_value: unary
details_variables_message: Variable with different R Type
details_variables_variable_id: 5a4b4647855d783b494f9d02
details_variables_variable_name: VISIT_NUMBER
details_variables_variable_label: VISIT_NUMBER
details_variables_status: changed
details_variables_details_r_type_new_value: unary
details_variables_details_r_type_old_value: integer
details_variables_message: Variable with different R Type
details_variables_variable_id: 5a4b4647855d783b494f9ccf
details_variables_variable_name: VISIT_NUMBER2
details_variables_variable_label: VISIT_NUMBER2
details_variables_status: changed
details_variables_details_r_type_new_value: unary
details_variables_details_r_type_old_value: binary
details_variables_message: Variable with different R Type
details_many_visits: None

針對你修改后的問題, 再加個函數(shù)就搞定:

# 這個fuck_all函數(shù)比較特例, 完全是針對你要區(qū)分的dataset下面的N個變量信息這種需求
def fuck_all(dic, prefix="details_variables"):
    lst = list(flatten(dic))  # flatten函數(shù)則比較通用,任何嵌套數(shù)據(jù)集都可以用它拍平
    lines = []
    top = {k: v for k, v in lst if not k.startswith(prefix)}
    index = 0
    for key, value in lst:
        if not key.startswith(prefix):
            continue
        else:
            if not lines:
                lines.append(top.copy())
        if key in lines[index].keys():
            index += 1
            lines.append(top.copy())
        lines[index][key] = value
    return lines

d = {your dataset}
for i in fuck_all(d):
    print(i)    

結果長這樣,應該是能滿足你需求了

{'status': 'changed', 'dataset_id': '5a4b463c855d783af4f5f695', 'dataset_name': 'AE_E', 'dataset_label': '1- ADVERSE EVENTS - Not Analyzed', 'details_many_visits': None, 'details_variables_variable_id': '5a4b4647855d783b494f9d3f', 'details_variables_variable_name': 'CPEVENT', 'details_variables_variable_label': 'CPEVENT', 'details_variables_status': 'changed', 'details_variables_details_r_type_new_value': 'unary', 'details_variables_details_r_type_old_value': 'factor', 'details_variables_message': 'Variable with different R Type'}
{'status': 'changed', 'dataset_id': '5a4b463c855d783af4f5f695', 'dataset_name': 'AE_E', 'dataset_label': '1- ADVERSE EVENTS - Not Analyzed', 'details_many_visits': None, 'details_variables_variable_id': '5a4b4647855d783b494f9d25', 'details_variables_variable_name': 'CPEVENT2', 'details_variables_variable_label': 'CPEVENT2', 'details_variables_status': 'changed', 'details_variables_details_r_type_new_value': 'unary', 'details_variables_details_r_type_old_value': 'binary', 'details_variables_message': 'Variable with different R Type'}
{'status': 'changed', 'dataset_id': '5a4b463c855d783af4f5f695', 'dataset_name': 'AE_E', 'dataset_label': '1- ADVERSE EVENTS - Not Analyzed', 'details_many_visits': None, 'details_variables_variable_id': '5a4b4647855d783b494f9d26', 'details_variables_variable_name': 'CP_UNSCHEDULED', 'details_variables_variable_label': 'CP_UNSCHEDULED', 'details_variables_status': 'changed', 'details_variables_details_r_type_new_value': 'undefined', 'details_variables_details_r_type_old_value': 'unary', 'details_variables_message': 'Variable with different R Type'}
{'status': 'changed', 'dataset_id': '5a4b463c855d783af4f5f695', 'dataset_name': 'AE_E', 'dataset_label': '1- ADVERSE EVENTS - Not Analyzed', 'details_many_visits': None, 'details_variables_variable_id': '5a4b4647855d783b494f9d02', 'details_variables_variable_name': 'VISIT_NUMBER', 'details_variables_variable_label': 'VISIT_NUMBER', 'details_variables_status': 'changed', 'details_variables_details_r_type_new_value': 'unary', 'details_variables_details_r_type_old_value': 'integer', 'details_variables_message': 'Variable with different R Type'}
{'status': 'changed', 'dataset_id': '5a4b463c855d783af4f5f695', 'dataset_name': 'AE_E', 'dataset_label': '1- ADVERSE EVENTS - Not Analyzed', 'details_many_visits': None, 'details_variables_variable_id': '5a4b4647855d783b494f9ccf', 'details_variables_variable_name': 'VISIT_NUMBER2', 'details_variables_variable_label': 'VISIT_NUMBER2', 'details_variables_status': 'changed', 'details_variables_details_r_type_new_value': 'unary', 'details_variables_details_r_type_old_value': 'binary', 'details_variables_message': 'Variable with different R Type'}

送佛送到西好了

from functools import reduce
import json

import pandas as pd


with open("your dataset file", "r") as fh:
    dic = json.load(fh)

df = pd.DataFrame(reduce(lambda x, y: x + y, (fuck_all(i) for i in dic)))
df.to_csv("out.csv", index=False)

成品

clipboard.png

遲月 回答

Go C++等語言的可執(zhí)行文件執(zhí)行是都是加載到內(nèi)存的

敢試 回答

沒有用過Thonny, 看上去Thonny是與系統(tǒng)的Python安裝地址是分開的,你可以看看你自己的ide Thonny的安裝包所在位置下是否有,沒有的話可以通過Thonny提供的Tools → Open system shell 來安裝

pip 安裝的的庫通常在下面類似的目錄下,你可以查看一下你的系統(tǒng)相應目錄下是否有相應的目錄

python2.7
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/site-packages

python3.5
/usr/local/lib/python3.5/dist-packages
/usr/lib/python3.5/site-packages

如果用VIRTUAL_ENV, 則會保存在相應環(huán)境的下的lib/pythonX.Y/dist-packages下

也可以用pip list加上pip show查看具體有哪些庫和安裝位置。

誮惜顏 回答

同問?解決了碼?

伐木累 回答
修改 node_modules/element-ui/lib/element-ui.common.js文件
TreeStore.prototype.getCheckedKeys函數(shù)中的if(node.checked)改為
if (node.checked||node.indeterminate)
筱饞貓 回答

goto也被詬病,但你仍然可以在C/C++中使用goto。

真正被詬病的不是eval,而且eval的濫用。如果你確認拿到的代碼是你自己的(或任何你信任的),用eval是完全可以接受的,而且可以享受到速度快的好處。

好難瘦 回答
.toLocaleString(undefined,{minimumFractionDigits:0,maximumFractionDigits:0})
詆毀你 回答

部署成功了...

就是要

on: master

附一下參考鏈接:
GitHub Pages Deployment
Conditional Releases with 'on:'