有一个典型的前端仓库,master分支自动部署到生产服务器
我希望当推送到容器中的任何一个分支时,项目被组装(很清楚如何实现)并且组装的程序集自动“服务”,即它从某个地址开始,你可以戳管道启动后至少 10-15 分钟
Gitlab CE,独立的,自己的运行器,目前是常规的 docker 容器。问题是如何教跑步者将组件分发到外面
PS 措辞非常歪曲,如何更清楚地表述它 - 我不知道,所以我会很高兴有任何澄清问题
有一个典型的前端仓库,master分支自动部署到生产服务器
我希望当推送到容器中的任何一个分支时,项目被组装(很清楚如何实现)并且组装的程序集自动“服务”,即它从某个地址开始,你可以戳管道启动后至少 10-15 分钟
Gitlab CE,独立的,自己的运行器,目前是常规的 docker 容器。问题是如何教跑步者将组件分发到外面
PS 措辞非常歪曲,如何更清楚地表述它 - 我不知道,所以我会很高兴有任何澄清问题
Yandex Metrica 在将您的代码添加到网站时,允许您接收有关年龄、地理和设备的信息。当用户进入网站时,哪些服务可以让您实时接收这些信息?
有一个通用查询,例如:
SELECT id FROM test BY time DESC
像这样的输出:
order - id
1 - 2
2 - 69
3 - 111
如何尽可能简单地理解在这样的请求中它将具有id什么序列号 ( )?order
PS如果不清楚 - 请写在评论中。我会再试一次
有一行形式
/user/%d/view/
如何在javascript中理解某行有这种形式?代码示例:
if (func(location.pathname) === func("/user/%d/view/")) {
// do smth
}
测试结构:
CREATE TABLE a (
id INT
);
CREATE TABLE b (
id INT,
a_id INT,
sum INT
);
INSERT INTO a SET id=1;
INSERT INTO b SET id=1, a_id=1, sum=2;
INSERT INTO b SET id=2, a_id=1, sum=3;
有必要从当前行的id相等a的记录数中获取每一行的一个select ,以及所有字段sum的总和。如果没有这样的记录,则该行仍应保留在输出中。我根本不知道怎么写,除了用.ba_idajoin
问题示例:
id -- count(*) -- sum(sum)
1 -- 2 -- 5
测试结构:
CREATE TABLE b (
id INT,
data TEXT
);
CREATE TABLE s (
id INT,
b_id INT,
time INT
);
INSERT INTO b VALUES (1, 2);
INSERT INTO b VALUES (2, 3);
INSERT INTO s VALUES (1, 1, 3);
INSERT INTO s VALUES (2, 1, 2);
INSERT INTO s VALUES (3, 1, 9);
INSERT INTO s VALUES (4, 2, 8);
INSERT INTO s VALUES (5, 2, 4);
INSERT INTO s VALUES (6, 2, 5);
一个任务:
在一个请求中,对于每个从具有最大值的字段id中b获取的值stime
这里的预期输出:
+------+------+------+------+-----------+
| id | data | b_id | sid | time |
+------+------+------+------+-----------+
| 1 | 2 | 1 | 3 | 9 |
| 2 | 3 | 2 | 4 | 8 |
+------+------+------+------+-----------+
(列名不是必需的。提供了一个示例以简化对任务的理解)
我自己能做的(好吧,我试过了)
select b.id as bid, b.data, s.time, s.b_id from b b inner join s s on b.id=s.b_id order by s.time DESC;
+------+------+------+------+
| bid | data | time | b_id |
+------+------+------+------+
| 1 | 2 | 9 | 1 |
| 2 | 3 | 8 | 2 |
| 2 | 3 | 5 | 2 |
| 2 | 3 | 4 | 2 |
| 1 | 2 | 3 | 1 |
| 1 | 2 | 2 | 1 |
+------+------+------+------+
6 rows in set (0.00 sec)
重要,启用模式预计在 subdsql_mode=only_full_group_by
问题
vpotseluyko@localhost:~/PhpstormProjects/easta-api$ node -v
v8.0.0
编码:
const redis = require('redis');
const util = require('util');
const client = redis.createClient();
client.get = util.promisify(client.get);
结论:
util.promisify is not a function
根据文档:https ://nodejs.org/api/util.html#util_util_promisify_original
你都干了什么
rm -rf node_modules && npm i
@keyframes rot {
0% {
background-color: #000 !important;
}
100% {
background-color: #c0c0c0 !important;
}
}
#telegramSiteHelperChatLabel
animation-name rot
animation-duration 2s
animation-iteration-count infinite
写上stylus前缀nib,它把自己。在 chrome 控制台中我看到了这个(sv-va chrome 的非特征被划掉了,其余的是有效的)
-webkit-animation-name: rot;
-moz-animation-name: rot;
-o-animation-name: rot;
-ms-animation-name: rot;
animation-name: rot;
-webkit-animation-duration: 2s;
-moz-animation-duration: 2s;
-o-animation-duration: 2s;
-ms-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
animation-iteration-count: infinite;
我看到的关键帧面板中稍微低一点
0% {
}
main.css:1041
100% {
}
main.css:1044
从上面的插入内容来看,这些行似乎具有有效的 St. Islands。有趣的是,如果将相同的代码手动添加到控制台,则一切正常。
如果你删除 !important 并且让background一切变得超级。为什么?!
我们需要一个将十六进制字母转换为十进制数字的函数。A-> 10,
F->15等等。阈值越高(大ss,X字母所在的地方也是)越好。
我正在从想法中运行一个项目。该团队sudo lsof | grep -E "java.*(out|txt|log)$"发现日志位于~/.IntelliJIdea2017.1/system/tomcat/Unnamed_hellomvc/logs
他们的名单:
total 128
-rw-r----- 1 vpotseluyko vpotseluyko 32196 янв 21 23:50 catalina.2017-01-21.log
-rw-r----- 1 vpotseluyko vpotseluyko 83853 янв 22 00:54 catalina.2017-01-22.log
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 21 21:32 host-manager.2017-01-21.log
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 22 00:19 host-manager.2017-01-22.log
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 21 21:32 localhost.2017-01-21.log
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 22 00:19 localhost.2017-01-22.log
-rw-r----- 1 vpotseluyko vpotseluyko 3766 янв 21 23:52 localhost_access_log.2017-01-21.txt
-rw-r----- 1 vpotseluyko vpotseluyko 958 янв 22 00:56 localhost_access_log.2017-01-22.txt
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 21 21:32 manager.2017-01-21.log
-rw-r----- 1 vpotseluyko vpotseluyko 0 янв 22 00:19 manager.2017-01-22.log
哪个错了?
大家好。
问题的症结在于有许多带有如下标记的元素。onclick 函数挂在它们上面。
document.addEventListener('DOMContentLoaded', function() {
var goods = document.querySelectorAll('div.good');
for (var z = 0; z < goods.length; z++) {
goods[z].onclick = function() {
var text = this.querySelector('.details p').innerHTML;
var img = this.querySelector('img').getAttribute('src');
alert(img + ' ' + text);
};
}
});
<div class="good">
<img src="/assets/img/good4.png">
<div class="details">
<div><span class="icon goods beef blue"></span>
</div>
<p>Курица по-тайски</p>
<span class="price">299</span>
</div>
</div>
<div class="good">
<img src="/assets/img/good2.png">
<div class="details">
<div><span class="icon goods beef blue"></span>
</div>
<p>Говядина томленая</p>
<span class="price">228</span>
</div>
</div>
this导致我们点击的元素与我们在函数中获取的内容不对应。我无法复制,所以只能提供观看直播-music.redeye.pro(我们说的是点击商品)。谢谢你。
其特点是下排表现出来,上排飞过它们
有一行+7 (495) 605-63-80 +7 (903) 270-70-00 +7 (495) 605-67-88
如何使用 Javascript||PHP 从此行获取三部电话的数组?
clip-path: polygon()需要特定点。下面代码中的某种示例。
.wrapper {
width: 960px;
height: 720px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto;
background-image: url(http://beerhold.it/960/722);
background-repeat: no-repeat;
backgorund-position: center center;
position: relative;
}
.key {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 10em;
height: 10em;
border: 2em solid rgba(255, 255, 255, .3);
border-radius: 10em;
}
.block1,
.block2 {
position: absolute;
top: 0;
width: 480px;
height: 720px;
}
.block1 {
left: 0;
background-color: rgba(255, 0, 0, .2);
}
.block2 {
right: 0;
}
.block3 {
top: 0;
width: 100%;
height: calc(50% - 7em);
background: rgba(0, 0, 0, 0.7);
}
.block4 {
top: calc(50% - 7em);
background: rgba(0, 0, 0, 0.7);
width: 100%;
height: 14em;
clip-path: polygon(1% 0%, 100% 0%, 100% 100%, 0% 100%, 8% 94%, 15% 88%, 22% 78%, 29% 69%, 34% 60%, 34% 48%, 33% 36%, 30% 22%, 23% 14%, 12% 7%);
}
.block5 {
bottom: 0;
height: calc(50% - 7em);
width: 100%;
background: rgba(0, 0, 0, 0.7);
}
<div class="wrapper">
<div class="block1"></div>
<div class="block2">
<div class='block3'></div>
<div class='block4'></div>
<div class='block5'></div>
<div class='block6'></div>
</div>
<div class="key"></div>
</div>
如您所见,此刻它只是一条曲线,凹进了图形。任务是画一个半圆(或尽可能接近它),凹入一个图形。在我的理解中,这需要less,sass依此类推。还有sin,cos。我不知道从哪里开始,如何开始,我没有遇到过。感谢@AndreyFedorov 在这里使用他的代码片段
(!) 我同意给出相同结果的任何其他选项。
我有这段代码:
push.on('notification', function(data) {
cordova.plugins.notification.local.schedule({
id: 1,
title: data.title,
style: "inbox",
icon: "res://ic_local_taxi_white_48dp",
smallIcon: "res://ic_local_taxi_white_48dp",
led: "FF0000" })});
以下数据被发送给它:
$msg = [
'body' => $message,
'title' => $title,
"content-available" => "1",
'sound' => "default",
'icon' => 'ic_local_taxi_white_48dp'
];
$fields = [
'to' => $key,
'priority' => 5,
'data' => $msg,
'notification' => NULL
];
content-availble 标头确保它push.on在后台运行,但是,android 本身也会显示来自自身的第二个通知。如何确保 android 不会重复一条消息?我需要用按钮显示通知,为此我使用 push.on 方法中的构造函数
有两个js文件(ts->js)。在 html 中连接。一个是上课,另一个是听众。第二个文件使用第一个文件中的函数,但类型编译器认为它们未定义。它之所以有效,是因为在编译时它不会触及它们的名称并且 js 从全局范围挂钩它们。但还是不愉快,但愿没有这种警告。我会指定:我写在客户端。不是节点第一个文件
/// <reference path="classes.d.ts" />
let digit = new Digit(number, cur_scale); // cannot find name Digit
类.ts
class Digit {
constructor(number, scale) {}
}
类.d.ts
export class Digit {}
import java.util.Scanner;
import java.io.PrintStream;
import java.util.Random;
public class Main {
public static PrintStream out = System.out;
public static Scanner in = new Scanner(System.in);
public static void main(String[] args) {
float a = 0, b = 0;
boolean d, l;
if (in.hasNextInt())
b = in.nextInt();
d = (-3.0 <= b) && (b <= 5.0);
l = (9.0 <= b) && (b <= 15.0);
out.print(d || l);
}
}
6.2 的结果 - d = true(??), l = false
为什么?(
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
...
try {
$result = $this->link->real_escape_string(
$this->link->query($query)
);
} catch (Exception $e) {
Service::error($e);
}
return $result;
// 以上应该绝对有效。下面的选项会起作用吗?如果是的话,不知何故评论一下,触发异常的原理不是很清楚。
try {
return $this->link->real_escape_string(
$this->link->query($query)
);
} catch (Exception $e) {
Service::error($e);
}
我这样做:
$ mysql -u root -p
mysql> create database your_db_name;
mysql> grant usage on *.* to your_user@localhost identified by 'your_user_password';
mysql> grant all privileges on your_db_name.* to your_user@localhost ;
第三行是做什么的?即,什么是*.*,什么是db_name.*?
如何正确创建一个只有一个数据库权限的mysql用户?
var Ajax = {
send: function(object) {
var xhr = new XMLHttpRequest();
xhr.open(object.method, object.url, true);
xhr.send(object.data);
xhr.onreadystatechange = function() {
if (xhr.status != 200)
object.error(xhr.responseText);
else
object.success(xhr.responseText);
}
}
};
window.onload = function() {
// grab all forms with 'ajax_form' class
var forms = document.querySelectorAll('form.ajax_form');
for (var i = 0; i < forms.length; i++) {
forms[i].onsubmit = function(event) { // listener
event.preventDefault();
var inputs = this.querySelectorAll('input.active'),
query = '',
form = this;
for (var z = 0; z < inputs.length; z++)
query += inputs[z].getAttribute('name') + '=' + inputs[z].value + '&';
query = query.slice(0, -1);
console.log('listener launchd');
Ajax.send({
method: this.getAttribute('method'),
url: this.getAttribute('url'),
data: query,
success: function(responce) {
window['form_' + form.id]['success'](responce);
},
error: function(responce) {
window['form_' + form.id]['error'](responce);
}
});
}
}
};
form_WriteMe = {
success: function(text) {
alert('Спасибо за обращение!');
},
error: function(text) {
console.log('error handled');
}
};
<form id="WriteMe" class="ajax_form" url="/ajax/letter" method="POST">
<input name='test' class="active" value="1">
<input type="submit" value="Отправить">
</form>
在本地主机上 alert() 重复两次。不在沙箱中(。也许问题出在 jsk 本身,所以我将非常感谢任何性质的代码审查。//是的,这仍然是“垃圾代码”。告诉我如何做得更好:)

主意:
window.onload = function() {
var forms = document.getElementsByClassName('ajax_form');
console.log(forms);
var forms = Array.prototype.slice.call(forms, 0);
forms.forEach(function(i, item, array) {
item.onsubmit = function() {
alert(i);
// start ajax from here
// by getting attributes from form.ajax_form
}
});
}
<form class='ajax_form' url='/ajax/somewhere/' method='post'>
<input name='test' send='1'>
<input type='submit' value='send'>
</form>
<form class='ajax_form' url='/ajax/somewhere/' method='post'>
<input name='test' send='1'>
</form>
onsubmit 什么都不做。假设我已将 html 集合转换为数组。如果是这样,请展示如何正确(并且漂亮地)迭代集合。请仅使用纯 javascript回答