通常我使用两台电脑,例如:PC1和PC2。
在他们两个上我都使用CygWinon Windows 10。
他们有相同的配置。
我试图PC1对如何显示日期和时间进行一些调整:
$ git log
Run Code Online (Sandbox Code Playgroud)
我正在尝试多个bashandgit命令。
过去和现在PC2我这样做时:
$ date
Run Code Online (Sandbox Code Playgroud)
我得到以下信息:
Tue Sep 25 16:17:34 CDT 2018
Run Code Online (Sandbox Code Playgroud)
但在PC1(错误的)上,使用相同的命令,我得到:
Tue, Sep 25, 2018 16:17:34
Run Code Online (Sandbox Code Playgroud)
您可以看到该TimeZone指示器没有显示。
另外,现在PC1,当我进行提交然后用以下命令列出历史记录时:$ git log日期如下:
Date: Tue Sep 25 22:58:42 2018 +0100
Run Code Online (Sandbox Code Playgroud)
它应该在哪里:
Date: Tue Sep 25 16:58:42 2018 -0500
Run Code Online (Sandbox Code Playgroud)
因为我当前的时区是:( CDT) America/Chicago( -05:00)
关于如何解决这个问题有什么想法吗?
谢谢!
[编辑1]
回应@Johan …
您对以下代码为何不起作用有任何想法吗 Android/Chrome?
它适用于Desktop/Chrome。
function console_log(data) {
console.log(data)
var data_str = String(data);
var $div = $('<div></div>');
$div.append(data_str);
$('.console').append($div);
}
$(function(){
var constraints = { audio: true, video:false }
//---
console_log('navigator.mediaDevices...');
console_log(navigator.mediaDevices);
//---
// # TEST 01 #
var userMedia = navigator.getUserMedia(constraints, function(){
console_log('---');
console_log('# TEST 01 # Inside Success Callback');
}, function(err){
console_log('---');
console_log('# TEST 01 # Inside Error Callback');
console_log(err);
});
//---
navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {
console_log('---');
console_log('# TEST 02 # Inside Success Callback');
}).catch(function(err) {
console_log('---');
console_log('# TEST …Run Code Online (Sandbox Code Playgroud)在 WooCommerce*(latest version)* I have one变量product withId: 9`。
通过下面的变体属性,我创建了多个产品变体。
然后我想从父产品 id ( Id: 9) 和以下属性值中获取特定的产品变体:
<attribute_for_variation>: <attribute_value_to_filter>
pa_size: size_8x10
pa_material: mat_luster_photo_paper
pa_frame: fra_silver_wood
pa_mat_usage: musa_yes
Run Code Online (Sandbox Code Playgroud)
下面是该变体的屏幕截图:
我已经尝试了以下代码及其相应的结果。为简单起见,目前仅尝试使用该pa_frame属性。
尝试 1:
static function filterVariations() {
$query = [
'post_parent' => 9,
'post_status' => 'publish',
'post_type' => ['product_variation'],
'posts_per_page' => -1,
];
$result = [];
$wc_query = new \WP_Query($query);
while ($wc_query->have_posts()) {
$wc_query->next_post();
$result[] = $wc_query->post;
}
return $result;
}
// ---> RESULT: all the variations, …Run Code Online (Sandbox Code Playgroud) 我正在使用Windows 7 与Git v2.8.3.
我有一个包含存储库的目录结构Git。
testing_gitignore\n\xe2\x94\x82 .gitignore\n\xe2\x94\x82 file_1.txt\n\xe2\x94\x82 file_2.txt\n\xe2\x94\x82\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dir_1\n\xe2\x94\x82 file_11.txt\n\xe2\x94\x82 file_12.txt\n\xe2\x94\x82 file_13.txt\n\xe2\x94\x82\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dir_2\n \xe2\x94\x82 file_21.txt\n \xe2\x94\x82 file_22.txt\n \xe2\x94\x82 file_23.xlsx\n \xe2\x94\x82 file_24.txt\n \xe2\x94\x82\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dir_21\n file_211.txt\n file_212.xlsx\n file_213.txt\nRun Code Online (Sandbox Code Playgroud)\n\n我想配置该.gitignore文件,以便dir_2递归地忽略内部的所有文件,但保留(用于提交)扩展名的文件:.xlsx。
在里面.gitignore我使用了以下内容:
/dir_2/*\n/dir_2/**/*\n!/dir_2/*.xlsx\n!/dir_2/**/*.xlsx\nRun Code Online (Sandbox Code Playgroud)\n\n但我没有成功,因为我将文件作为文件添加到commit以下列表(您也可以在此处看到):
.gitignore\nfile_1.txt\nfile_2.txt\ndir_1\\file_11.txt\ndir_1\\file_12.txt\ndir_1\\file_13.txt\ndir_2\\file_23.xlsx\nRun Code Online (Sandbox Code Playgroud)\n\n但我希望它应该包含在文件中(作为要提交的文件):
\n\ndir_2/dir_21/file_212.xlsx\nRun Code Online (Sandbox Code Playgroud)\n\n您能给我一个.gitignore配置来实现此目的吗?\n(在此处发布之前,您可以使用我之前在链接上附加的下载目录结构自行尝试一下吗?)