text:
Added variables to graphql page.

Added the ability to add variables for queries.
E.g. if you do the following query:
query MySearch($limit: Int, $where: JSON) {
  nodes(limit: $limit, where: $where) {
    id
    title
  }
}

You can now add the variables $limit and $where.

There is still one problem which requires discussion:
The type validation of variables is required. So if it's an Int it needs to be converted. I've done it with a regex for now, but apollo-client would do better with this. I wasn't really sure if I should introduce a new dependency or not.

Hey @pushrbx,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: ed84d980-2bd0-11ea-9b13-1f3f6380198b

authors: TravisBuddy pushrbx

repo: liyasthomas/postwoman


text:
提交一个MCH退款申请的改进

这个问题不知道是我使用API的问题, 还是的确你们没有注意到, 在MCH退款申请的时候需要双向HTTPS双向认证, 其中还会用到私钥文件.
不知道这里怎么代码格式化, 请自行复制再修改
修改如下(建议)
在HttpClientFactory增加如下方法(此方法为官方文档中的代码)
   public static CloseableHttpClient createSslHttpClient() {
	KeyStore keyStore;
	try {
		keyStore = KeyStore.getInstance("PKCS12");
		FileInputStream instream = new FileInputStream(new File(WxwebConfig.PKCS12_FILE));//这里是私钥文件
		try {
			keyStore.load(instream, WxwebConfig.MCH_ID.toCharArray());
		} finally {
			instream.close();
		}
		SSLContext sslcontext = SSLContexts
				.custom()
				.loadKeyMaterial(keyStore, WxwebConfig.MCH_ID.toCharArray())
				.build();
		SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
				sslcontext,
				new String[] { "TLSv1" },
				null,
				SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER);
		CloseableHttpClient httpclient = HttpClients.custom()
				.setSSLSocketFactory(sslsf).build();
		return httpclient;
	} catch (Exception e) {
		e.printStackTrace();
	}
	return null;
}

在进行退款申请的时候要用此方法构建CloseableHttpClient , 大致代码如下
/**
* 退款申请
*
* 注意：
*	1.交易时间超过1 年的订单无法提交退款；
*	2.支持部分退款，部分退需要设置相同的订单号和不同的out_refund_no。一笔退款失
*	败后重新提交，要采用原来的out_refund_no。总退款金额不能超过用户实际支付金额。
* @param secapiPayRefund
* @param key 商户支付密钥
* @return
*/
public static SecapiPayRefundResult secapiPayRefund(SecapiPayRefund secapiPayRefund,String key){
	Map<String,String> map = MapUtil.objectToMap( secapiPayRefund);
	String sign = SignatureUtil.generateSign(map,key);
	secapiPayRefund.setSign(sign);
	String secapiPayRefundXML = XMLConverUtil.convertToXML( secapiPayRefund);
	HttpUriRequest httpUriRequest = RequestBuilder.post()
			.setHeader(xmlHeader)
			.setUri(MCH_URI + "/secapi/pay/refund")
			.setEntity(new StringEntity(secapiPayRefundXML,Charset.forName("utf-8")))
			.build();
            //此为原始代码
	//return LocalHttpClient.executeXmlResult(httpUriRequest,SecapiPayRefundResult.class);
            //此为建议更新的代码
	CloseableHttpClient hc = HttpClientFactory.createSslHttpClient();
	try {
		return ((SecapiPayRefundResult) hc.execute(httpUriRequest, XmlResponseHandler.createResponseHandler(SecapiPayRefundResult.class)));
	} catch (ClientProtocolException e) {
		e.printStackTrace();
	} catch (IOException e) {
		e.printStackTrace();
	}
	return null;
}

感谢您的反馈！
已提交更新，我没有MCH 账号，请进行测试！
设置API-MCH-KeyStore 说明
https://github.com/liyiorg/weixin-popular/wiki/设置API-MCH-KeyStore

还没有测试新版本, 但退款查询都必须要使用相同的方方式, 所以退款查询部分也需要按照此修改

已提交更新

嗯。这个我也发现了，把微信官方提供的调用 p12文件的代码加上了。

source: gharchive/issue

authors: fancool fantycool i319962 liyiorg

repo: liyiorg/weixin-popular

license_type: permissive

license_source: bigquery


text:
tomcat安装失败

使用01-08版，在阿里云ECS的CentOS7.2下安装时，发生错误：
configure: error: Your version of OpenSSL is not compatible with this version of tcnative
Tomcat install failed, Please contact the author!
不论是使用系统自带的OpenSSL 1.0.1还是升级到1.1.0c都发生该错误。

wget mirrors.linuxeye.com/oneinstack-full.tar.gz


text:
没有监听到图片内容输出

postman调用了本地服务，这里没有监听到图片内容输入，是不是还有什么服务需要启动？

@japhet99 群聊里面机器人启动成功了吗  断点先看下中间件里面有没有收到消息  中间件收到这边没有收到 看下userKey对不对

@japhet99 你要把你账号设置下快速生成 否则要很久才能收到消息  聊天栏/setting 修改下 现在没计划 后续会把所有模型切换参数切换 账号设置接入进来

@japhet99群聊里面机器人启动成功了吗 断点先看下中间件里面有没有收到消息 中间件收到闹钟没有收到 看下用户按键对不对

没有进入断点

@japhet99 你要把你账号设置下快速生成 否则要很久才能收到消息 聊天栏/setting 修改下 现在没计划 后续会把所有模型切换参数切换 账号设置接入进来

这里修改什么，能详细贴一下吗？Thanks♪(･ω･)ﾉ

license_source: github-api


text:
目前版本小电视功能已失效

抓包发现目前B站有小电视蜜罐机制，发送假包导致无法正常领取小电视，同时已出现挂机账号被封的情况！
脚本会定时崩溃，Debug信息如下：
#0 /home/ownAccount/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 /home/ownAccount/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 /home/ownAccount/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 /home/ownAccount/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28):  in /home/ownAccount/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 185
PHP5.6 Centos6.9（Final）

同

authors: ZeusGamingPlay rhjdvsgsgks

repo: lkeme/BiliHelper

license: MIT


text:
🛑 까사미아 www.guud.com is down

In 8e9257d, 까사미아 www.guud.com (http://www.guud.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 까사미아 www.guud.com is back up in 92a31d0 after 12 minutes.

repo: lksjames/monitoring


text:
Scratch activity : Sugarizer android app

Irresponsive screen and button to stop the activity is not visible.

Clearly the Scratch activity is not adapted to be use on a small screen.
BTW you're right for the Stop button. Following rules here, it should be present to allow the user to quit the activity.
Can't reproduce the "irresponsive" screen you mention. It's always possible to drag&drop actions.

By "irresponsive" screen I mean the non-adaptiveness of the activity towards the small screen devices.

Fixed in https://github.com/llaske/sugarizer/pull/738

authors: abhishektanwar llaske

repo: llaske/sugarizer


text:
cleaning text

is it possible to use this ia to clean the dialogues to put translation?

https://moeka.me/mangaEditor/v2/#/
Change language in the upper right corner

https://moeka.me/mangaEditor/v2/#/
Change language in the upper right corner

how I use ?

authors: gceboh manotroll


text:
Battery Monitor

The Battery Monitor wont display the correct voltage or current

Issue fixed after ESC calibtration and enabeling battery monitoring in the standart params of ardupilot missionplaner

repo: lloois/Drone-Programming


text:
Unit Test for Topology Manager

Added unit tests for topology_manager and fake_topology_manager.

Approved

source: gharchive/pull-request

authors: Sreemanti-Ghosh lmdaly

repo: lmdaly/kubernetes


text:
Cerebro - Connection refused

Hello,
I am securizing Elasticsearch with the plugin "Readonlyrest". I specified a user/password for Cerebro.
In application.conf, I defined this user/password to connect to ES
hosts = [   {     host = "http://localhost:9200"     name = "Secured Cluster"     auth = {       username = "cerebro"       password = "cerebro"     }   } ]
However, I get the following error :

Caused by: java.net.ConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:9200

Are the values of the attributes "username" and "password" sent to connect to Elasticsearch ?
H.

yes, username/password are sent to connect to ES.
Is elastic search running on the same server as cerebro? Also, do you have a special value defined for network.host/bind_host?

I checked the configuration of the ReadOnlyRest plugin. It is working now.
Thanks

authors: hkhail lmenezes

repo: lmenezes/cerebro


text:
Flatten the curve!

flattened
linted
added prevention of premature switch

This change is

Looks cool.. ill test out the docker hub build (branches are built too)

Will test this out soon as I had to apply some commits that was left out
https://hub.docker.com/layers/lncm/neutrino-switcher/branch-leftist-flatland/images/sha256-95378b8f438d921ac50d4b1a613644f47c5505c26d21528584cfd240de8fffdf?context=repo

$ docker logs neutrino-switcher -f
Checking if synced...
If set to neutrino then lets check bitcoind
jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:
{"result":null,"error":{"code":-28,"message":"Loading block index..."},"id":"switchme"}} | .error
jq: 1 compile error
false
Not pruned
jq: error (at <unknown>): null (null) and null (null) cannot be subtracted
Sync seems complete!  Will switch on next check.

using lncm/neutrino-switcher:branch-leftist-flatland

though it does seem like its working as usual.. If someone could test this out on a full node it would be great

Cool will give this another go

repo: lncm/docker-lnd-neutrino-switch

license: Unlicense


text:
Create an SCPI server to interface pyrpl with other programs

Ideally, I would like to use this for the global experiment control:
https://exopy.readthedocs.io/en/latest/
However, this program really expect the connection to instruments to be instantaneous.
My current thinking is that we should have the instance of pyrpl running all the time with a SCPI server waiting for instructions on TCPIP.
Any thoughts ?

Exopy can easily accommodate an instrument that does not use VISA for the communication. The instruments using directly a dll (found in https://github.com/Exopy/exopy_hqc_legacy/tree/master/exopy_hqc_legacy/instruments/drivers/dll) can serve as example.
Exopy does not expect the communication to be instantaneous but does test whether the instrument is present or a different stage. This is done by default by opening the instrument but can easily be set a less costly operation if necessary. During a measurement, the driver is started a single time in which case the overhead of the start should be negligible (save if the measurement is really very short).

My current thinking is that we should have the instance of pyrpl running all the time with a SCPI server waiting for instructions on TCPIP.

There is a large demand for this kind of feature, i.e. a process manager for running multiple instance of pyrpl all the time, with the ability to connect to them at will. An SCPI server would not be the worst for this kind of feature, especially if we could natuarlly map the python API to SCPI commands (should not be too hard with the module and setup_attributes hierarchy we have, the only uncommon thing would be the flexibility of the setup-commands).
Do you know if there is a python library implementing a nice SCPI server? We could of course also write this from scratch.

I am ashamed to say that after spending at least 2 days googling and trying various things, I could not even make a dummy "hello world" Visa instrument, that could be accessed via the standard visa interface.
This would totally be the natural way, but at the moment I really got lost in the complexity of the Visa specifications, and could not find a working example anywhere.
An alternative strategy would be to have our own TCPIP server protocol, but of course this would be less "standard"...

You could use VISA over a raw socket to avoid the pain of the VXI11 specification.

You could use VISA over a raw socket to avoid the pain of the VXI11 specification.

I agree, since VISA was originally intended to be just a wrapper around different interfaces like USB and TCP (I think), why dont we create an SCPI service, and upgrade it to be VISA compliant when we have nothing better to do, since the benefit of that seems to be only marginal and the work >> 2 days.

Just to make clear what I wanted to achieve:
My goal was to have a service that can be discovered by doing:
import visa
rm = visa.ResourceManager
rm.list_resources()
...

This is what I could not achieve in > 2 days, but maybe I just didn't find the the right way to attack the problem...

Depending on which VISA implementation you use (NI, Keysight, etc) you may need to manually add the resource (through Keysight Connection Expert for example) since TCP resources are not always scanned. I would say what you really want is to be able to create the resource rather than list it and answer to something like *IDN? .

This is what I could not achieve in > 2 days, but maybe I just didn't find the the right way to attack the problem...

Would this be easier if we had a "gateway" application running on the Visa computer, allowing to talk to all Redpitayas on the network?

Depending on which VISA implementation you use (NI, Keysight, etc) you may need to manually add the resource (through Keysight Connection Expert for example) since TCP resources are not always scanned. I would say what you really want is to be able to create the resource rather than list it and answer to something like *IDN? .

Yes, sorry, I probably arrived at the point where I could create the instrument, but I had a dummy HTTP server running, and when I tried to ask strings such
inst.ask("Hello world?")
I didn't manage to have the server reply something like 'hello world' in a way that is understandable by the visa instrument.
But maybe you are right that I should use a socket rather than an HTTP server. Also, I will try to link code snippets suh that we discuss on more tangible facts!

Wanna share your code, maybe we can debug it here (or a separate github repository)?

Here is the code on the server side (it uses the QTcpServer from Qt)
from qtpy import QtCore, QtNetwork, QtWidgets

class MyServer(object):
	def __init__(self):
		self.server = QtNetwork.QTcpServer()
		self.server.newConnection.connect(self.on_new_connection)
		self.server.listen(QtNetwork.QHostAddress.Any, 4880)
		self.sockets = []

	def on_new_connection(self):
		print("so")
		print("so")
		client = self.server.nextPendingConnection()
		client.stateChanged.connect(self.on_socket_state_changed)
		self.sockets.append(client)
		print(client)
		client.write(QtCore.QByteArray("200\n".encode("ascii")))
		client.write(QtCore.QByteArray(" connected to server !\n".encode("ascii")))
		print("written")

	def on_socket_state_changed(self, socket_state):
		print("state changed to:", socket_state)

app = QtWidgets.QApplication(["dummy_server"])

print("yo")

w = QtWidgets.QPushButton("bonjour")

w.show()
M = MyServer()

app.exec_()

I run it in a first console, and then on the client side I run the following:
import visa
inst = visa.get_instrument("TCPIP0::localhost::4880")

I get some encouraging stuff happening the server side (the socket is created and the reply is sent properly to the client), however, the client is expecting some well defined reply to accept the connection : I get the following error on the client side:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\highlevel.py", line 1644, in open_resource
    res.open(access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\resources\resource.py", line 203, in open
    self.session, status = self._resource_manager.open_bare_resource(self._resource_name, access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\highlevel.py", line 1601, in open_bare_resource
    return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1211, in open
    ret = library.viOpen(session, resource_name, access_mode, open_timeout, byref(out_session))
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 188, in _return_handler
    raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.
>>> inst = rm.get_instrument("TCPIP0::localhost::4880")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\highlevel.py", line 1644, in open_resource
    res.open(access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\resources\resource.py", line 203, in open
    self.session, status = self._resource_manager.open_bare_resource(self._resource_name, access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\highlevel.py", line 1601, in open_bare_resource
    return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1211, in open
    ret = library.viOpen(session, resource_name, access_mode, open_timeout, byref(out_session))
  File "C:\Users\Samuel\Anaconda3\lib\site-packages\pyvisa\ctwrapper\highlevel.py", line 188, in _return_handler
    raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.

Apparently, the viOpen function within visa is expecting the instrument to return a 16 bytes string to acknowledge proper connection, since I get on the server-side either a timeout (VI_ERROR_TMO) or a protocol error (VI_ERROR_INP_PROT_VIOL) depending on whether the string sent by the server is below or above 16 characters...
My next problem is that I don't know what string is expected to avoid the VI_ERROR_INP_PROT_VIOL exception...

You could connect a raw socket or putty to an existing VISA instrument, e.g. a scope, and check what it returns..
However I have one big doubt with this endeavour: are you sure visa will discover the open socket automatically on the network? Otherwise you would still have to manually enter the ip address and port, and the visa approach would not have any advantage over a raw socket.

Another option: go through the visa source files mentioned in the traceback to dind out what string is expected. If you end up with a dll reference, try pyvisa-py instead (should be open source if you select the non-NI backend).

Are you sure the client is not automatically sending a command and gets no reply, e.g. IDN or so?

Another option: go through the visa source files mentioned in the traceback to dind out what string is expected. If you end up with a dll reference, try pyvisa-py instead (should be open source if you select the non-NI backend).

Here is an example implementation: https://github.com/coburnw/python-vxi11-server
It think it makes no sense to just try to implement the initialization stuff, rather if we go down this road we would have to fully stick to the VXI-11 or HISLIP protocol. Or just try
import visa
rm = visa.ResourceManager()
inst = rm.get_instrument("TCPIP0::localhost::4880::SOCKET")

Thanks Leo,
I had already seen this library, unfortunately, it really doesn't work "out of the box"...
I have posted a message on the issues of the project (https://github.com/coburnw/python-vxi11-server/issues/2#issuecomment-561704463), it looks like it might be a linux/windows problem (underlying rpcbind function doesn't exist ?!) but this goes way beyond my confort zone.
I am really starting to think that indeed if we want this to work anytime soon, we would have to fallback on a simple TCPIP socket, since anyways, translating this in a Qt eventloop framework would require to fully digest the code...

I would advocate to go with the socket, unless the reply in https://github.com/coburnw/python-vxi11-server/issues/2#issuecomment-561704463 is sufficient to get that working. Or is this feature not needed any more?

repo: lneuhaus/pyrpl

license: mit


text:
Facing Error while converting JMX which has SMTP sampler to send emails

I have JMX script which is needs to be converted into k6 project, but facing below issue
[root@vpc-centos7-bin]# jmeter-to-k6 smtpPROD.jmx -o k6script
(node:30105) UnhandledPromiseRejectionWarning: Error: Unrecognized element: SmtpSampler
    at element (/usr/lib/node_modules/jmeter-to-k6/src/element.js:61:11)
    at module.exports.args (/usr/lib/node_modules/jmeter-to-k6/src/element.js:3:10)
    at elements (/usr/lib/node_modules/jmeter-to-k6/src/elements.js:20:19)
    at module.exports.args (/usr/lib/node_modules/jmeter-to-k6/src/elements.js:2:10)
    at Object.hashTree (/usr/lib/node_modules/jmeter-to-k6/src/element/hashTree.js:4:10)
    at element (/usr/lib/node_modules/jmeter-to-k6/src/element.js:66:36)
    at module.exports.args (/usr/lib/node_modules/jmeter-to-k6/src/element.js:3:10)
    at elements (/usr/lib/node_modules/jmeter-to-k6/src/elements.js:20:19)
    at module.exports.args (/usr/lib/node_modules/jmeter-to-k6/src/elements.js:2:10)
    at Object.ThreadGroup (/usr/lib/node_modules/jmeter-to-k6/src/element/ThreadGroup.js:28:19)
(node:30105) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:30105) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Hi,
Yes, the SmtpSampler is not supported by the converter, unfortunately.
Please remove it and try again.
Best,
Simme

Hi,
Yes, the SmtpSampler is not supported by the converter, unfortunately.
Please remove it and try again.
Best,
Simme

authors: simskij sureshnepolian


text:
🛑 Løbner.dk is down

In 5ff07ab, Løbner.dk (https://www.løbner.dk) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Løbner.dk is back up in f3383c5 after 8 minutes.

repo: lobner/status


text:
i18n: Minor spelling errors (DE)

Correction of minor spelling errors in DE-language files

Thanks!

authors: Olivetti Tienisto

repo: localsend/localsend


text:
Minor Window Dimensions refactor

I meant to commit this with the previous Pull Request, but it was merged a couple of minutes before I could push it 😅
Sorry hahah

No worries


text:
default to bootstrap 4

Current documentation at https://github.com/twbs/bootstrap-rubygem. Should we default to 4 instead of using bootstrap-sass?

We definitely can. Though I'm not a big fan of asset gems, they tend to get abandoned/outdated. I think we should try managing it through Yarn eventually.

yeah that sounds right. plus this is still alpha and subject to change. unfortunately this one is just going to be a moving target.


text:
float division by zero

I have an error while trying to solve a ddp program. My model is based on cart pole example.
class DifferentialActionModelCartpole(crocoddyl.DifferentialActionModelAbstract):
    def __init__(self):
        crocoddyl.DifferentialActionModelAbstract.__init__(self, crocoddyl.StateVector(6), 3, 11) # nu = 1; nr = 6
        self.unone = np.zeros(self.nu)

        self.m = 3.7
        self.g = 9.81
        self.r1 = 0.25
        self.r2 = 0.34
        self.costWeights = [1., 1., 1., 1., 0.1, 0.001, 0.001, 0.001, 1., 1., 1.]
        # theta-theta_f, phi-phi_f, r-r_f, r*dtheta,
        # tanh(r**2-(r1+r2)*r+r1*r2), dr, dtheta, dphi, f, tau_theta, tau_phi

    def calc(self, data, x, u=None):
        if u is None: u=model.unone
        # Getting the state and control variables
        r, dr, theta, dtheta, phi, dphi = np.asscalar(x[0]), np.asscalar(x[1]), np.asscalar(x[2]), np.asscalar(x[3]), np.asscalar(x[4]), np.asscalar(x[5])
        print(r,dr, theta, dtheta, phi, dphi)
        f,tau_theta,tau_phi = np.asscalar(u[0]), np.asscalar(u[1]), np.asscalar(u[2])

        # Shortname for system parameters
        m, g, r1, r2 = self.m, self.g, self.r1, self.r2

        # Defining the equation of motions
        # ddr ddtheta ddphi
        ddr  = (f/m+r*dtheta**2+r*dphi**2-g*np.cos(theta))
        print(m)
        print(m*r**2)
        print(r)

        ddtheta = (tau_theta/(m*r**2)+g*np.sin(theta)/r-2*dr*dtheta/r)
        ddphi = (tau_phi/(m*r**2)-2*dr*dphi/r)

        data.xout = np.matrix([ ddr, ddtheta, ddphi]).T

        # Computing the cost residual and value
        data.r = np.matrix(self.costWeights * np.array([theta-theta_f, phi-phi_f, r-r_f, r*dtheta, np.tanh(r**2 - (r1 + r2)*r + r1*r2), dr, dtheta, dphi, f, tau_theta, tau_phi])).T
        data.cost = .5* np.asscalar(sum(np.asarray(data.r)**2))

    def calcDiff(self,data,x,u=None,recalc=True):
        # Advance user might implement the derivatives
        pass

I print out one variable r . It is zero at the beginning and I think that's why it can rise this error. Different from cart pole, there is one variable r which is at the denominator of the equation in my model.
Traceback (most recent call last):
  File "simple.py", line 211, in <module>
    done = ddp.solve([], [], 1000)
  File "simple.py", line 119, in calc
    ddtheta = (tau_theta/(m*r**2)+g*np.sin(theta)/r-2*dr*dtheta/r)
ZeroDivisionError: float division by zero

Is there any way to solve this problem?

In the first iteration r is equals to zero because you are warm-starting the solver with zeros. Thus, you could improve the warm-start.
Your EoMs presents a singularity point in r=0. A common approach to handle it, it will be by applying an tiny regulation (or like damping in the pseudo inverse). Therefore rnew=r+mu with mu as the tiny regularisation (e.g. 1e-9).
As side comment, I do not understand your EoMs. It seems that your confusing r with r1 and/or r2, isn't it? I will suggest you to double check your equations

I will close this issue since it is not related with Crocoddyl.
Feel free to ask more questions, I am happy to help you.

we want to bound r within r1 and r2 and right now we are using activation function tanh, but it doesn't work well. Is there other method to add bounding box constraint for a variable in a simple customized mode like cartpole?

Yes, it is possible through quadratic barrier. However, this is easy to integrate for our action models, you will need to handle by yourself.

Yes, you are right. But I am not familiar with crocoddyl structure.
Can you give some hints or an example which I can follow?
I tried to add a constraint like following in the DifferentialActionModelCartpole, but it doesn't work well.
        ddr  = (f/m+r*dtheta**2+r*dphi**2-g*np.cos(theta))
        if r < 1e-9:
            r+=1e-8
        if r < r1: r = r1
        elif r > r2: r = r2
        print(r)

        ddtheta = (g*np.sin(theta)/r-2*dr*dtheta/r)
        ddphi = (-2*dr*dphi/r)

Can you help me?

You create your cost model using CostModelAbstract (e.g. https://github.com/loco-3d/crocoddyl/blob/devel/bindings/python/crocoddyl/utils/init.py#L382)
You use the ActivationModelQuadraticBarrier as your activation model.
You add the data produced by this cost in each calc and calcDiff function.

If you have checked our notebooks, then you will have a clear idea about point 3.

First, I just copied the code to my code and rename the class.
class CostModelBound(crocoddyl.CostModelAbstract):
    def __init__(self, state, activation=None, xref=None, nu=None):
        activation = activation if activation is not None else crocoddyl.ActivationModelQuad(state.ndx)
        self.xref = xref if xref is not None else state.zero()
        crocoddyl.CostModelAbstract.__init__(self, state, activation, nu)

    def calc(self, data, x, u):
        data.r = self.state.diff(self.xref, x)
        self.activation.calc(data.activation, data.r)
        data.cost = data.activation.a

    def calcDiff(self, data, x, u, recalc=True):
        if recalc:
            self.calc(data, x, u)
        data.Rx = self.state.Jdiff(self.xref, x, 'second')[0]
        self.activation.calcDiff(data.activation, data.r, recalc)
        data.Lx = data.Rx.T * data.activation.Ar
        data.Lxx = data.Rx.T * data.activation.Arr * data.Rx

Second, I just changed it to follow the following code.
boundConstraint = crocoddyl.CostModelBound(
                self.state, crocoddyl.ActivationModelQuadraticBarrier(crocoddyl.ActivationBounds(cone.lb, cone.ub)), nu = self.actuation.nu)

For calc and calcDiff, I still have no clue after going through notebook.
In your examples, there are two totally different examples: one is for customized example, like cart pole. The other is Urdf model and all the costs are constructed with specific API.
My example need to mix these two method together?
I have  self-defined cost in the calc and don't know how to add the self-defined cost function CostModelBound to the library?

In cart pole example, I cannot create a state as the input of CostModelAbstract . How to do the following work without state?

About the quadratic barrier, I only know the following way to do that, is there a other way to integrate with the mode?
        costModel = crocoddyl.CostModelSum(self.state, self.actuation.nu)
        if isinstance(comTask, np.ndarray):
            comTrack = crocoddyl.CostModelCoMPosition(self.state, comTask, self.actuation.nu)
            costModel.addCost("comTrack", comTrack, 1e6)
        for i in supportFootIds:
            cone = crocoddyl.FrictionCone(self.nsurf, self.mu, 4, False)
            frictionCone = crocoddyl.CostModelContactFrictionCone(
                self.state, crocoddyl.ActivationModelQuadraticBarrier(crocoddyl.ActivationBounds(cone.lb, cone.ub)),
                cone, i, self.actuation.nu)
            costModel.addCost(self.rmodel.frames[i].name + "_frictionCone", frictionCone, 1e1)
        if swingFootTask is not None:
            for i in swingFootTask:
                xref = crocoddyl.FrameTranslation(i.frame, i.oMf.translation)
                footTrack = crocoddyl.CostModelFrameTranslation(self.state, xref, self.actuation.nu)
                costModel.addCost(self.rmodel.frames[i.frame].name + "_footTrack", footTrack, 1e6)

        stateWeights = np.array([0.] * 3 + [500.] * 3 + [0.01] * (self.rmodel.nv - 6) + [10.] * 6 + [1.] *
                                (self.rmodel.nv - 6))
        stateReg = crocoddyl.CostModelState(self.state,
                                            crocoddyl.ActivationModelWeightedQuad(np.matrix(stateWeights**2).T),
                                            self.rmodel.defaultState, self.actuation.nu)
        ctrlReg = crocoddyl.CostModelControl(self.state, self.actuation.nu)
        costModel.addCost("stateReg", stateReg, 1e1)
        costModel.addCost("ctrlReg", ctrlReg, 1e-1)

        lb = self.state.diff(0 * self.state.lb, self.state.lb)
        ub = self.state.diff(0 * self.state.ub, self.state.ub)
        stateBounds = crocoddyl.CostModelState(
            self.state, crocoddyl.ActivationModelQuadraticBarrier(crocoddyl.ActivationBounds(lb, ub)),
            0 * self.rmodel.defaultState, self.actuation.nu)
        costModel.addCost("stateBounds", stateBounds, 1e3)

File "simple.py", line 222, in <module>
    cartpoleDAM = DifferentialActionModelCartpole()
  File "simple.py", line 185, in __init__
    boundConstraint = CostModelBound(self.state, crocoddyl.ActivationModelQuadraticBarrier(crocoddyl.ActivationBounds(lb, ub,0.9)))
  File "simple.py", line 17, in __init__
    crocoddyl.CostModelAbstract.__init__(self, state, activation, nu)
Boost.Python.ArgumentError: Python argument types in
    CostModelAbstract.__init__(CostModelBound, StateVector, ActivationModelQuadraticBarrier, NoneType)
did not match C++ signature:
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, int nu)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, int nu, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, int nu)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, int nu, bool withResiduals)
server@server:~/landing/src/crocoddyl$ python simple.py
/home/server/.local/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2
************************************************************
You are running Setuptools on Python 2, which is no longer
supported and
>>> SETUPTOOLS WILL STOP WORKING <<<
in a subsequent release (no sooner than 2020-04-20).
Please ensure you are installing
Setuptools using pip 9.x or later or pin to `setuptools<45`
in your environment.
If you have done those things and are still encountering
this message, please comment in
https://github.com/pypa/setuptools/issues/1458
about the steps that led to this unsupported combination.
************************************************************
  sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60)
/home/server/.local/lib/python2.7/site-packages/robot_properties_solo/config/package_config.ini
/home/server/repos/humanoid_property/urdf/biped_new.urdf
['/home/server/repos/humanoid_property']
eigenpy warning: you use the deprecated class numpy.matrix without explicily asking for it. The default behaviour will change to numpy.array at next major release.
- Either call eigenpy.switchToNumpyMatrix() before using eigenpy to suppress this warning
- or call eigenpy.switchToNumpyArray() and adapt your code accordingly.
See https://github.com/stack-of-tasks/eigenpy/issues/87 for further details.
0.15
-2.42861286637e-17
9.99999998968e-06
6.93889390391e-18
3.46944695195e-18
9.99999998971e-06
(-0.05899000000000883, 0.10125000000000334, 2.5729418595688003e-14)
(9.999999989712682e-06, 0.0612500000000012, 2.5777990853015353e-14)
[0.007158208953623851, -5.05987806359964e-06, 0.3012260236425874]
[ 0.06614821 -0.10125506  0.30122602]
(0.32460020027441988, 21.876236037253879, 303.15590254307097)
(-2.0166440755912443, -1.2652270590217869, 1.2579138132248224)
(0.32460020027441988, 78.24169649626711, 108.57971727347046)
(matrix([[ 0.25],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ]]), matrix([[ 0.34],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ],
        [ 0.  ]]))
Traceback (most recent call last):
  File "simple.py", line 222, in <module>
    cartpoleDAM = DifferentialActionModelCartpole()
  File "simple.py", line 185, in __init__
    boundConstraint = CostModelBound(self.state, crocoddyl.ActivationModelQuadraticBarrier(crocoddyl.ActivationBounds(lb, ub,0.9)),2)
  File "simple.py", line 17, in __init__
    crocoddyl.CostModelAbstract.__init__(self, state, activation, nu)
Boost.Python.ArgumentError: Python argument types in
    CostModelAbstract.__init__(CostModelBound, StateVector, ActivationModelQuadraticBarrier, NoneType)
did not match C++ signature:
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, int nu)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, int nr, int nu, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, bool withResiduals)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, int nu)
    __init__(_object* self, boost::shared_ptr<crocoddyl::StateMultibody> state, boost::shared_ptr<crocoddyl::ActivationModelAbstract> activation, int nu, bool withResiduals)

The point 1 you mentioned cannot be applied to the cart pole example, can you help to solve this urgent issue?

At the time being, this class is made for robotics problem. I am afraid you will need to implement yourself the quadratic barrier function.

Is it easy to do that? Is there  a simplified way? Do you have the code I can followv

Yes, I would say so.
I don't have any code to provide you. You must want to see the c++ implementation of the quadratic barrier class.

Would that be possible if I encode the following into the cost function?
-mu*log[(y1-y)(y-y2)] and mu is a small number, say 1e-5

authors: cmastalli ddliugit


text:
Hi My scripts have started to fail with the same error as below, was fine until last week

Hi All,
All my scripts have started failing with the same error as below. This was working fine until last week and no changes have been made to the script. Also 0 requests are being sent.
Error:
Error: [2022-02-08 21:48:28,739] xxxxx.internal/ERROR/locust.user.task: [Errno Expecting value] : 0
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib64/python3.7/site-packages/simplejson/init.py", line 488, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python3.7/site-packages/simplejson/decoder.py", line 374, in decode
obj, end = self.raw_decode(s)
File "/usr/lib64/python3.7/site-packages/simplejson/decoder.py", line 393, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/locust/user/task.py", line 296, in run
self.execute_next_task()
File "/usr/local/lib/python3.7/site-packages/locust/user/task.py", line 321, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/usr/local/lib/python3.7/site-packages/locust/user/task.py", line 434, in execute_task
task(self.user)
File "/usr/local/Locust/Scripts/test.py", line 19, in launch_URL
if ("Accounts") in response.json():
File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] : 0

OS: Amazon Linux 2 (ec2 instance)
Python version: Python 3.7.9
Locust version: locust 2.7.3
Locust command line that you ran:
locust -f test.py --headless -u 1 -r 1 --run-time 45 --html=test1.html

Locust file contents (anonymized if necessary):
from locust import HttpUser,task, between, constant
class UserBehavior(HttpUser):
wait_time=constant(1)
host="https://google.com"
@task
def launch_URL(self):
    token = "XXXXXXX"

    headers={
    "Content-Type":"application/json",
    "Authorization":"Bearer " + token,
    "id":"test_test"}

    with self.client.get("/maps",headers=headers,catch_response=True) as response:
    #print(response.json())
    #Passing the request after validating the response from API
        if ("Accounts") in response.json():
            if response.status_code == 200:
                response.success()
            else:
                response.failure("HTTP 200OK not received")
        else:
            response.failure("Valid response not returned")

I created a simple script but removed the block where i am checking the response.json in the code above. Without that block  it does not throw the error. I am wondering what has changed since the same script which i pasted above was working fine and now its not?

simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

This means the response was not valid json (usually it means there was no response body at all, caused by the server refusing the connection or something else). This is most likely unrelated to locust. Try printing the response.text and see what it is.

You are right on this, it was an issue on my end. Sorry about that

repo: locustio/locust


text:
Multi-threading Tasks?

Locust seems to be waiting for requests to finish before spawning a new task.
Expecting that I can hit something like 600r/min using 20 parallel users and 100ms min and max wait time (I know it should be higher than 600 with this setting but, I'm hoping for something like 600)
On a high-latency (but high throughput) connection I max out at 50r/min even with a min and max wait time of 100ms and 20 parallel users.
Following Issue 198 https://github.com/locustio/locust/issues/198  I was able to dramatically increase my requests per minute so I think that before I used multithreading, locust was basically waiting for each request to finish before running a new task.  Which is awesome!
However, is there some way to do this in the Locust class instead of within the Task itself?
Right now my task is something like:
@task
def something(self):
from gevent.pool import Group
group = Group()
group.spawn
group.spawn
group.spawn
etc
but it seems like it would be more natural to have this somewhere else, so that each task is a thread, instead of each line within a task.  Is there a way to do this in Locust?
class MyLocust(HttpLocust):
task_set = MyTaskSet
min_wait = 100
max_wait = 1000
parallel_tasks = true #something like this?

Why do you want to do this in each Locust instead of having more Locusts?
Locust's concurrency is almost always increased by the number of Locusts (aka users) - not parallelization of each individual task within a Locust.

Locust seems to be waiting for requests to finish before spawning a new task.

This is by design. Locust is designed to simulate users, who perform various task sets - which reflect actual user activity (I suppose some users may open up 10 tabs and actively work in all 10 simultaneously, this seems very rare though).

Thanks, I will investigate parallel users instead.

I agree @argentlynx I am having the same problem I have two tasks want to one every 2 seconds and two every 30 seconds but locust seems to wait to finish the task and that's why my 30-second task is not running on the exact time.

does anyone have a solution for this?

hi, @racooninho in my case I want two-run task one at every 1 second and two at every 30 seconds so I created a timer which is running every 30 seconds and one locust task every 1 second.

authors: aldenpeterson-wf argentlynx kevalRPansuriya racooninho


text:
Push credentials don't work on cluster re-creation

What happened?
I'm currently trying to integrate my workflow into devspace, and am frequently creating/destroying clusters to experiment. I'm trying to put as much of the workload on the K8S cluster so that my warm laptop can survive the summer :-) OOT, but I have to say I love the potential devspace has. Thanks for the project!
If I re-create my Kubernetes cluster and container registry (via terraform destroy && terraform apply), I'm unable to build the image via kaniko, as it says it doesn't have permissions to push image:
[info]   Using namespace 'joaomlneto'
[info]   Using kube context 'admin@cluster'
[info]   Couldn't find a running docker daemon. Will fallback to kaniko
[info]   Building image 'rg.nl-ams.scw.cloud/my-namespace/myimage:XXXXXXX' with engine 'kaniko'
[warn]   Using CMD statement for injecting restart helper because ENTRYPOINT is missing in Dockerfile and `images.*.entrypoint` is also not configured
[done] √ Uploaded files to container
[done] √ Build pod has started
[info]   Printing logs of pod:container devspace-build-kaniko-pflrt:kaniko
E0424 21:53:27.458058       1 aws_credentials.go:77] while getting AWS credentials NoCredentialProviders: no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "rg.nl-ams.scw.cloud/my-namespace/myapp:XXXXXXX": creating push check transport for rg.nl-ams.scw.cloud failed: GET https://api.scaleway.com/registry-internal/v1/regions/nl-ams/tokens?scope=repository%3Amy-namespace%2Fmyapp%3Apush%2Cpull&service=registry: unexpected status code 401 Unauthorized: {"message":"Unauthorized request"}
[fatal]  error building image rg.nl-ams.scw.cloud/my-namespace/myapp:XXXXXXX: error building image (Exit Code 1)

Performing docker login [host] -u [user] -p [password] results in Login Succeeded.
I've checked the token used by kaniko matches that of my docker client.

Refreshing my credentials makes it work again (until re-creation). I'm unsure if this is related to the cloud provider, or to devspace.
As an alternate workaround I've tried to delete the .devspace folder and re-run devspace dev, but it doesn't work.
How can we reproduce the bug?

Create cluster and container registry with Scaleway
Use kaniko to build image and check everything works properly
Destroy and re-create the cluster (and edit ~/.kube/config with the new configuration)
Attempt to create the image using kaniko -- won't work due to insufficient push permissions.
Verify that credentials used by kaniko match those of the local docker client, and that docker login succeeds.
Create/refresh security and perform docker login with the new credentials.

Local Environment:

DevSpace Version: devspace version 5.12.1
Operating System: mac
Deployment method: helm (component chart)

Kubernetes Cluster:

Cloud Provider: Scaleway
Kubernetes Version:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T21:16:14Z", GoVersion:"go1.16.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.6", GitCommit:"8a62859e515889f07e3e3be6a1080413f17cf2c3", GitTreeState:"clean", BuildDate:"2021-04-15T03:19:55Z", GoVersion:"go1.15.10", Compiler:"gc", Platform:"linux/amd64"}

Anything else we need to know?
I'm unsure if this is caused by some stale devspace configuration lingering, or a problem with the cloud provider. I am more inclined towards the former, but as I'm unsure I'd ask you for assistance for debugging :-)

/kind bug

@joaomlneto thanks for creating this issue! For me it look like the scaleway provider is the issue and that the token (that is used by devspace) is invalid after you recreate the cluster, until you relogin with your username and password which refreshes the token.
Internally, DevSpace does not cache any registry credentials and will always just read the token from docker, but if docker returns a no longer valid token, there is not much we can do unfortunately.

Indeed. Problem seems to be with docker caching the token from the previous registry which stops being valid on registry recreation.
Thanks for the clarification!

authors: FabianKramm joaomlneto

repo: loft-sh/devspace


text:
Fix namespace creation

What issue type does this pull request address? (keep at least one, remove the others)
/kind bug
What is this pull request for? Which issues does it resolve? (use resolves #<issue_number> if possible)
resolves #1382
resolves #1384
Does this pull request has user-facing changes? (e.g. config changes, new/modified commands, new/modified flags)
yes
Does this pull request add new dependencies?
no
What else do we need to know?

Close in favor of #1390

authors: FabianKramm FlorianKutz


text:
text will post, but no response happens from other bots when using commands.

when using a commands that are supposed to call from another bot, theres no response. the text will post but there will be no response from other bots. so for example:
stream deck posts "-p lofi"
grovvy bot is supposed to respond and play music. instead nothing happens
if i myself do the command manually under my own account, it works fine. So if I specifically say -p lofi and dont use the stream deck, i can get the bot to respond.
any ideas? here is an example of -rots command. only when i typed the command myself does it work

Related to #7

Yes this is a known issue as a number of Discord bots will not parse messages being sent by other bot accounts and messages posted by webhooks are considered as coming from a bot account.
Yes, #7 is the canonical issue tracking this.

authors: eabase fallen1011 logicallysound


text: 사맞춤

repo: logistex/vc


text:
Fix memory orders and namespacestd

https://logrhythm.atlassian.net/browse/NM-1297

Are you sure you want to keep the loading as sequential load now that you use std::memory_order_acquire  for the store?
Ref: https://en.cppreference.com/w/cpp/atomic/memory_order
Hope you are doing well in Boulder/LogRhythm :)

Are you sure you want to keep the loading as sequential load now that you use std::memory_order_acquire for the store?
Ref: https://en.cppreference.com/w/cpp/atomic/memory_order
Hope you are doing well in Boulder/LogRhythm :)

What a gem you are, Kjell,
I missed the load call in StopWatch, so thank you for pointing that out. We decided to load/store like this based on Herb Sutter's video we watched with you. So you are correct, and it should be fixed in my PR now. Thanks again!

@KjellKod, Thanks for reviewing these changes. You're awesome!

authors: DylanSchneider KjellKod john-gress

repo: logrhythm/StopWatch


text:
provide a simpler example implementation of the shutdown strategy

resolves #6

LGTM. looks like @ph already reviewed

LGTM

authors: colinsurprenant jsvd suyograo

repo: logstash-plugins/logstash-input-example


text:
Mark database connection as dead even when disconnecting fails

The jdbc input pluging recently got support for automatically reconnecting when a database connection is lost. In this case it tries to cleanly close the old connection by calling disconnect, then setting its @database reference to nil.
@database being nil is then used as an indication that a new connection needs to be opened.
Calling disconnect leads to a call to java.sql.Connection.close() which may throw an SQLException.
In that case @database remains a reference to the broken connection and we try to reuse that.
This PR adds an exception handler to ensure that the database connection is marked dead even when disconnect throws an exception.

I do like your patch.
In order to properly close #220, please can you add the exception to the logging statement on line 173 of the same file?
@logger.warn("Failed test_connection.", :exception => e)

Thank you @guyboertje. I will do so tomorrow. After that, I´ll be on vacation until Sep 5.
Btw.: the elastic contributor license agreement page was broken for me earlier. It seems to work now, so I´ll take care about that too (although the patch is so trivial that copyright does not apply anyway)

What email did you sign the Agreement with? I think it needs to be the one attached to your Github account.
You should also bump the patch part of the version number in the .gemspec file and add a section to the CHANGELOG.md file.

no address at all. After choosing "individual contributor" I was forwarded to an empty page showing just the generic elastic links. Maybe just a browser hickup.
ok, will do as you say. Yay, finally learning ruby dev practices 101 ;-)

Hi @franklauterwald, we have found your signature in our records, but it seems like you have signed with a different e-mail than the one used in yout Git commit. Can you please add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile?

Hi @karmi, thanks for the reminder. Embarrassingly, one of my machines still had the mail address of a former employer.
I have amended the commits and force-pushed, so I hope all is well now.

authors: franklauterwald guyboertje karmi

repo: logstash-plugins/logstash-input-jdbc


text:
Improve zabbix_key documentation

Instruct that zabbix_key is required if not using multi_value.

LGTM

authors: jordansissel untergeek

repo: logstash-plugins/logstash-output-zabbix


text:
Integrate sonarcloud-github-action

See: https://github.com/SonarSource/sonarcloud-github-action

closing because sonarcloud is not giving good results with github actions

repo: loic-lopez/UMVC


text:
Update docs with Google AppEngine instructions

Extends the documentation to explain how to run BaGet on Google AppEngine, using Google Cloud Storage (enabled by #233) and Google Cloud SQL (enabled by #206).

This looks great so far! Thanks for expanding this documentation. I left some minor comments, I’ll merge this after :)

authors: bgrainger loic-sharma

repo: loic-sharma/BaGet


text:
How can we download the manuscript?

Greetings Sir, I look for this paper on IEEE but could not find it. Could you please share the link where to download? Thank you

This paper has not published on IEEE TNNLS. It is currently in the final proofreading stage. Please wait, thanks!

Greetings Sir, I look for this paper on IEEE but could not find it. Could you please share the link where to download? Thank you

This paper has not published on IEEE TNNLS. It is currently in the final proofreading stage. Please wait, thanks!


text:
Improve lokalise api error handling

Chain exceptions so debugging is easier and we know exactly what went wrong.
Attach the response object whenever available when throwing an api exception. Clients may be interested in further processing the response object. Currently the LokaliseApiException swallows the original exception and response.

Really good changes, can this be merged please?

authors: TheLevti specialtactics

repo: lokalise/php-lokalise-api


text:
DELETE CONFIRMATION BUG

This bug is reported by the developer. It was gotten when trying to use the fetch API for the DELETE method as I had to go with the flow since the beginning of the functionality was in Javascript
Anyhow, this bug will soon be fixed, hopefully so just hold on! 😊😊😊

This bug has been resolved in WUMPUS UPDATE(v1.2)


text:
auto_schema: remove edges doesn't always?? scope postgresql.UUID

    op.remove_edges([
        {'edge_type': UUID('78d0191d-842f-469d-a688-03f2f4631c36'), 'edge_name': 'ProfileToNotificationsCreatedEdge',
         'symmetric_edge': False, 'inverse_edge_type': None, 'edge_table': 'profile_notifications_created_edges'},
        {'edge_type': UUID('d0c1db57-b2c7-441b-8395-d3198d636808'), 'edge_name': 'ProfileToActiveTasksEdge',
         'symmetric_edge': False, 'inverse_edge_type': None, 'edge_table': 'profile_active_tasks_edges'},
        {'edge_type': UUID('409b8fd6-37f1-4c03-9db6-7109b9def455'), 'edge_name': 'ProfileToTasksEdge',
         'symmetric_edge': False, 'inverse_edge_type': None, 'edge_table': 'profile_tasks_edges'},
    ])

found while dealing with https://github.com/lolopinto/ent/issues/499

same in op.modify_edge
issue is when trying to run downgrade()

should just be strings
updating the file to postgresql.UUID leads to:
    value = compiler.process(value.self_group(), **kw)
AttributeError: 'UUID' object has no attribute 'self_group'
Error: exit status 1
Usage:
  tsent downgrade [flags]

Examples:
tsent downgrade --keep_schema_files -- -1
tsent downgrade --keep_schema_files revision
tsent downgrade -- -1
tsent downgrade revision

Flags:
  -h, --help                help for downgrade
      --keep_schema_files   keep schema files instead of deleting

Global Flags:
      --debug   debug mode. add debug information to codegen e.g. files written etc

repo: lolopinto/ent


text:
🛑 Northern Light is down

In f0e6869, Northern Light (https://northernlight.jau.co.jp) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Northern Light is back up in df47097.

repo: longforme/longforme-uptime-monitor


text:
replica: add compatibility check and handling for ReplicaAdd

Longhorn 4705
Signed-off-by: Derek Su derek.su@suse.com

After discussion, this is not quite right, because new changes to engine operations should only be added to the proxy interface instead of the old deprecated binary call anymore.

The root cause has been clarified with @derekbit and @mantissahz . @derekbit will update the context.

@derekbit Please backport to 1.3.2. Thanks!

Pre Ready-For-Testing Checklist

[ ] Where is the reproduce steps/test steps documented?
The reproduce steps/test steps are at: https://github.com/longhorn/longhorn/issues/4705#issue-1405685731

[ ] Is there a workaround for the issue? If so, where is it documented?
The workaround is at:

[ ] Does the PR include the explanation for the fix or the feature?
https://github.com/longhorn/longhorn/issues/4705#issue-1405685731

[ ] Have the backend code been merged (Manager, Engine, Instance Manager, BackupStore etc) (including backport-needed/*)?
The PR is at https://github.com/longhorn/longhorn-manager/pull/1523

[ ] Which areas/issues this PR might have potential impacts on?
Area: replica add
Issues

authors: derekbit innobead

repo: longhorn/longhorn-manager


text:
[BUG] [longhorn-engine] [s390x] intermittent fail pipeline on build step

Describe the bug (🐛 if you encounter this issue)
Multiple pipelines are randomly failing on build step in drone-pr and drone-publish ( longhorn.io)
Output of the error:
_________________________ ERROR at setup of test_close _________________________

process_manager_client = <rpc.instance_manager.process_manager_client.ProcessManagerClient object at 0x3ffad8a03c8>

    @pytest.fixture
    def grpc_replica_client(process_manager_client):
        r = create_replica_process(process_manager_client, REPLICA_NAME)

        listen = get_process_address(r)
        c = ReplicaClient(listen)
>       return cleanup_replica(c)

core/conftest.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
common/core.py:197: in cleanup_replica
    r = get_replica(grpc_client)
common/core.py:183: in get_replica
    raise(grpc_err)
common/core.py:180: in get_replica
    r = grpc_client.replica_get()
rpc/replica/replica_client.py:28: in replica_get
    return self.stub.ReplicaGet(empty_pb2.Empty()).replica
.tox/py3/lib/python3.6/site-packages/grpc/_interceptor.py:222: in __call__
    compression=compression)
.tox/py3/lib/python3.6/site-packages/grpc/_interceptor.py:257: in _with_call
    return call.result(), call
.tox/py3/lib/python3.6/site-packages/grpc/_channel.py:482: in result
    raise self
.tox/py3/lib/python3.6/site-packages/grpc/_interceptor.py:248: in continuation
    compression=new_compression)
.tox/py3/lib/python3.6/site-packages/grpc/_channel.py:701: in with_call
    return _end_unary_response_blocking(state, call, True, None)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

state = <grpc._channel._RPCState object at 0x3ffad8ab8d0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x3ffadcc9a48>
with_call = True, deadline = None

    def _end_unary_response_blocking(state, call, with_call, deadline):
        if state.code is grpc.StatusCode.OK:
            if with_call:
                rendezvous = _Rendezvous(state, call, None, deadline)
                return state.response, rendezvous
            else:
                return state.response
        else:
>           raise _Rendezvous(state, None, None, deadline)
E           grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
E           	status = StatusCode.UNAVAILABLE
E           	details = "Connection reset by peer"
E           	debug_error_string = "{"created":"@1698156096.796140700","description":"Error received from peer ipv4:127.0.0.1:10000","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"Connection reset by peer","grpc_status":14}"
E           >

.tox/py3/lib/python3.6/site-packages/grpc/_channel.py:592: _Rendezvous

Drone publish
Failed executions:

https://drone-publish.longhorn.io/Anarkis/longhorn-engine/9/1/3
https://drone-publish.longhorn.io/Anarkis/longhorn-engine/8/1/3
Succeeded executions:
https://drone-publish.longhorn.io/Anarkis/longhorn-engine/10/1/3
https://drone-publish.longhorn.io/Anarkis/longhorn-engine/6/1/3

Drone pr
Failed executions:

https://drone-pr.longhorn.io/Anarkis/longhorn-engine/11/1/3
https://drone-pr.longhorn.io/Anarkis/longhorn-engine/9/1/3
Succeeded executions:
https://drone-pr.longhorn.io/Anarkis/longhorn-engine/7/1/3
https://drone-pr.longhorn.io/Anarkis/longhorn-engine/10/1/3

To Reproduce
Repo forked from https://github.com/longhorn/longhorn-engine/commits/master 95b3fb85c9a415167e076a803964656e356a9f20
commented out all the archs that are not s390x, together with publish steps (in order to being able to run under drone-publish without any problem )
In this fork you can find the .drone.yaml https://github.com/Anarkis/longhorn-engine/commit/c911bd88d19e1bf70c4e44e9b8688e6d84d0abed?diff=split
Expected behavior
Successful execution on both environments drone-pr and drone-publish. Same behaviour than the other archs
Support bundle for troubleshooting

Environment
Internal drone runners.
Additional context
Please, keep in mind that recently the s390x team performed a infrastructure change on the runners. We need to discard if it's an issue related to that change or it's a new one.
Related to: https://github.com/longhorn/longhorn/issues/6891

In case that the team responsible want to test the code in s390x machines, there are two ways to proceed:
scenario 1 ( full flow )

fork repo, sync it with drone-pr and drone-publish
modify .drone.yaml as https://github.com/Anarkis/longhorn-engine/commit/c911bd88d19e1bf70c4e44e9b8688e6d84d0abed?diff=split
ping me for admin settings to enable the proper execution

scenario 2

request a new s390x machine with ssh access
This scenario does not assure the same environment that we have on the normal building servers. Nevertheless, If it's needed I could on that to match the requirements

@Anarkis feel free to self assign next time.

Highly related to https://github.com/harvester/harvester/issues/4642
Working on the permanent solution

The config of the new s390x runners differed from the previous one
cpuplugd was set on. But it did not work as expected, the number of cpus was not populated to the runners, allocating less resources to the runners and for that reason, increasing the execution time of the pipelines
Some background:

https://github.com/moby/moby/issues/27453
https://github.com/moby/moby/issues/40041

authors: Anarkis innobead

repo: longhorn/longhorn


text:
feat: add proto

issue: https://github.com/longhorn/longhorn/issues/6744
Test Plan
Please build images from following PRs:

https://github.com/longhorn/longhorn-engine/pull/1015
https://github.com/longhorn/longhorn-instance-manager/pull/404
https://github.com/longhorn/backing-image-manager/pull/194
https://github.com/longhorn/longhorn-share-manager/pull/139
https://github.com/longhorn/longhorn-manager/pull/2636

Case 1: New cluster

Clone longhorn/longhorn.

git clone https://github.com/longhorn/longhorn.git
cd longhorn/chart

Install the cluster with your images. For example:

helm install longhorn . --namespace longhorn-system --create-namespace \
    --set image.longhorn.engine.repository=frankyang/longhorn-engine \
    --set image.longhorn.engine.tag="arm64-latest" \
    --set image.longhorn.manager.repository=frankyang/longhorn-manager \
    --set image.longhorn.manager.tag="arm64-latest" \
    --set image.longhorn.instanceManager.repository=frankyang/longhorn-instance-manager \
    --set image.longhorn.instanceManager.tag="arm64-latest" \
    --set image.pullPolicy="Always" \
    --set image.longhorn.backingImageManager.repository=frankyang/backing-image-manager \
    --set image.longhorn.backingImageManager.tag="v3_20240229" \
    --set image.longhorn.shareManager.repository=frankyang/longhorn-share-manager \
    --set image.longhorn.shareManager.tag="arm64-latest" \
    --set defaultSettings.systemManagedPodsImagePullPolicy="always"

Create a volume or snapshot. Check basic operations can work.

Case 2: Upgrade from v1.6.0

Clone longhorn/longhorn and checkout to v1.6.0.

git clone https://github.com/longhorn/longhorn.git
cd longhorn/chart
git checkout v1.6.0

Install v1.6.0 cluster.

helm install longhorn . --namespace longhorn-system --create-namespace

Create a Volume, PVC, and try to write some data to the volume.
Upgrade the cluster to new images. For example.

git checkout master
helm upgrade longhorn . --namespace longhorn-system \
    --set image.longhorn.engine.repository=frankyang/longhorn-engine \
    --set image.longhorn.engine.tag="arm64-latest" \
    --set image.longhorn.manager.repository=frankyang/longhorn-manager \
    --set image.longhorn.manager.tag="arm64-latest" \
    --set image.longhorn.instanceManager.repository=frankyang/longhorn-instance-manager \
    --set image.longhorn.instanceManager.tag="arm64-latest" \
    --set image.pullPolicy="Always" \
    --set image.longhorn.backingImageManager.repository=frankyang/backing-image-manager \
    --set image.longhorn.backingImageManager.tag="v3_20240229" \
    --set image.longhorn.shareManager.repository=frankyang/longhorn-share-manager \
    --set image.longhorn.shareManager.tag="arm64-latest"

Before upgrading engine, delete a replica of the volume and make sure it can come back.
Detach the volume. Upgrade the engine to latest. Make sure it can be attached and data is still there.

Hi @innobead, currently, different LH projects use different protobuf package naming.

longhorn-engine: ptypes
longhorn-instance-manager: imrpc
longhorn-spdk-engine: spdkrpc
backing-image-manager: longhorn.backingimagemanager.pkg.rpc
longhorn-share-manager: don't specify package name

Originally, I would like to fix the naming in this PR like pkg.<service name>. However, this introduces another problem. New generated code has different invoke path. Let's use ReplicaCreate for example:

longhorn-engine ptypes: /ptypes.ReplicaService/ReplicaCreate
longhorn-types enginerpc: /pkg.enginerpc.ReplicaService/ReplicaCreate

In a new LH cluster, this is not a problem. However, when we upgrade an old LH cluster, we may have both old and new longhorn-instance-manager and longhorn-engine. This will be an issue. I get an error like:
level=error msg="Failed to initialize im client to instance-manager-b3561682e04c14c53967b1711a0905e7 before monitoring" func="controller.(*InstanceManagerController).startMonitoring" file="instance_manager_controller.go:1373" controller=longhorn-instance-manager error="failed to check version of Instance Manager Instance Service Client for instance-manager-b3561682e04c14c53967b1711a0905e7 IP 10.244.133.199: failed to get version: rpc error: code = Unimplemented desc = unknown service pkg.imrpc.InstanceService" instance manager=instance-manager-b3561682e04c14c53967b1711a0905e7 node=worker-2

We have two ways to solve the problem:

We introduce an old grpc server to conversion the request to the new server.
Pros: we can unify protobuf package naming in longhorn/types.
Cons: The longhorn-manager architecture will be complex.

We keep the package name.
Pros: We don't need any change for longhorn-manager server.
Cons: The naming is different even if we have a repository to collect all protobuf.

As discussed, we will adopt option 2 to keep the package name as usual, as this is the design principal of Protobuf before we figure out a better way to mitigate this design debt.

@ejweber @shuo-wu @ChanYiLin Please review this.

@FrankYang0529 In addition, please use Github Action instead and we only need to run this on amd64.

I am thinking we have the 3rd option:
Retain the old gRPC client code for existing longhorn-instance-manager and longhorn-engine. Then remove those codes in the next minor release.

I am thinking we have the 3rd option: Retain the old gRPC client code for existing longhorn-instance-manager and longhorn-engine. Then remove those codes in the next minor release.

Hi @shuo-wu, when users upgrade LH, longhorn-instance-manager needs to connect old and new longhorn-engine. If we change protobuf package name, longhorn-instance-manager has to create two gRPC clients, one for old protobuf and another for new. There are 3 package names need to be changed: imrpc, ptypes, and smrpc. This may introduce some complexity in longhorn-manager and longhorn-instance-manager.

I am thinking we have the 3rd option: Retain the old gRPC client code for existing longhorn-instance-manager and longhorn-engine. Then remove those codes in the next minor release.

Hi @shuo-wu, when users upgrade LH, longhorn-instance-manager needs to connect old and new longhorn-engine. If we change protobuf package name, longhorn-instance-manager has to create two gRPC clients, one for old protobuf and another for new. There are 3 package names need to be changed: imrpc, ptypes, and smrpc. This may introduce some complexity in longhorn-manager and longhorn-instance-manager.

@FrankYang0529 Have you tested the combability after upgrading Longhorn, for example, creating and deleting volumes in old/new longhorn-manager, instance-instance-manager and longhorn-engine?

I am thinking we have the 3rd option: Retain the old gRPC client code for existing longhorn-instance-manager and longhorn-engine. Then remove those codes in the next minor release.

Hi @shuo-wu, when users upgrade LH, longhorn-instance-manager needs to connect old and new longhorn-engine. If we change protobuf package name, longhorn-instance-manager has to create two gRPC clients, one for old protobuf and another for new. There are 3 package names need to be changed: imrpc, ptypes, and smrpc. This may introduce some complexity in longhorn-manager and longhorn-instance-manager.

@FrankYang0529 Have you tested the combability after upgrading Longhorn, for example, creating and deleting volumes in mixed old/new longhorn-manager, instance-instance-manager, and longhorn-engine cluster?

Yes, in my test steps, I think these two steps cover it.
5. Before upgrading engine, delete a replica of the volume and make sure it can come back.
6. Detach the volume. Upgrade the engine to latest. Make sure it can be attached and data is still there.

@FrankYang0529 In addition, please use Github Action instead and we only need to run this on amd64.

Added it. However, this is first PR to add GItHub Action, so it looks like it's not triggered in this PR.

No worries. You can update the action later if it doesn't work.

authors: FrankYang0529 derekbit innobead shuo-wu

repo: longhorn/types


text:
Improve error message when over-scoping a join

I find I keep writing (bad) joins like this:
explore users is ...

explore: order_items is ... {
  join_one: users on order_items.user_id = users.id
}

This gives me the error 'order_items' is not defined, and the predicate should be on user_id = users.id I keep making this mistake and the error does not seem to clue me in. Is this possibly an error we could make clearer or provide a hint on?

Thinking ...
All source statements are inside a refinement, because all sources are eventually backed by a table. Inside of a source refinement, we do not know if this is a nameless refinement, as in
query: table('xxx') + { join_one: ... } -> { group_by: ... }

so the code which is processing the join can't know the name of the thing being created, because there may not even be a name.
If we somehow added a special "by the way we are defining something called order_items in this source refinement" flag, we could maybe replace 'order_items' is not defined with Cannot refer to name order_itemsinside definition oforder_items... but that gets complicated because it is perfectly legal to define a field or a join calledorder_itemsinside of a source which you record in the model with a nameorder_items`, and what if i have a source which is refining a source which has a field which already matches the name of the join i am writing
So I would say the answer is ...
It is possible. It would take a significant amount of head scratching to do this in a way which doesn't break things.
But maybe a magic way to make this easy will pop up in my head at some point.

authors: anikaks mtoy-googly-moogly

repo: looker-open-source/malloy


text:
Support for TLSv1.1 and TLSv1.2 only servers

Using a webserver with only TLSv1.1 and/or TLSv1.2 enabled, it is impossible to connect to it using android-async-http. I found a solution on another project having a similar issue (https://github.com/owncloud/android/issues/362) by enabling all secure and supported protocols. Credits to https://github.com/sztyler

Is this something that you guys are fixing? is this something that you are going to accept the merge request for once the minSDK version is updated?  Is this resolved in the 1.4.9 release?  Please advise.

@stvn i think it's very likely we'll update the minSdkVersion because keeping compatibility with API 3 is still possible with recent versions of this library

@smarek is this a fix for #744 SSL Socket Read Time Out ?

@XYG6 , @eTryp your commits were merged into https://github.com/Vorlonsoft/AndroidAsyncHTTP
@stvn , @kbala fixed in https://github.com/Vorlonsoft/AndroidAsyncHTTP

authors: AlexanderLS XYG6 kbala smarek stvn

repo: loopj/android-async-http


text:
3.4

[ ] https://github.com/loppys/Container/issues/16
[ ] https://github.com/loppys/Container/issues/15

Не выпускать, пока не будет совершен переход на php8

repo: loppys/Container


text:
Outdated Link (Fidor Bank)

Good morning.
The URL for Fidor Bank is wrong, they moved it to https://api-docs.fidor.de/

Doesn't look like they're using Slate anymore. Probably best to remove it altogether.

authors: LalaSatalinDeviluke jdahdah

repo: lord/slate


text:
Dynamic Enabling/Disabling

Is there an example of this anywhere?  I'm using the disabled attribute on the <ol> element, and binding it to an attribute in my controller that toggles between true and false.  I am echoing {{controller.disabled}} on my page and can watch that value change, but the dropdown stays enabled.  What is the attribute, disable, disabled, nya-disable, nya-disabled, ng-disable?  The documentation doesn't mention it anywhere.
Edit: I reviewed the code and determined the proper attribute is 'disabled'.  However, even through I have disabled="{{controller.isDisabled}}", the watch function is only ever called once when the value is initially set, and never again even though where I have <pre>{{controller.isDisabled}}</pre> is being changed from true to false and vice-versa.

I am using Angular 1.5.6 (if that makes any difference), and switching the disabled attribute from using $scope.watch() to $attrs.$observe (https://docs.angularjs.org/api/ng/type/$compile.directive.Attributes) seems to have fixed it for me:
https://github.com/matt328/nya-bootstrap-select/commit/0902bd6ee920e29bee039a60ce56d48d85d80d37#diff-cb89a6b6dd42ce4891a0580a8cce1f7c
I'm not sure if this is an issue with something that changed in Angular 1.5.6 or what, but I can submit a pull request if you want.

There are examples here:
http://nya.io/nya-bootstrap-select/#!/examples/form-control-feature
And besides, the API doc is laid here:
http://nya.io/nya-bootstrap-select/#!/api/nya-bs-select
disabled attribute is a two-way binding property which means you need use the property name on your controller scope directly instead of warpping with double brackets

This documentation is incredibly helpful.  I had not found it until just now, thanks!

repo: lordfriend/nya-bootstrap-select


text:
some epub cannot be opened by win10 Edge

Some new generated epub not opened by Win10 Edge.
Found large number of errors when loaded to Sigil:
The OPF manifest contains duplicate ids for: img_ch05_images - A temporary id has been assigned to load this EPUB. You should edit your OPF file to remove the duplication.
As remedy, convert suspected epub to epub in latest Calibre, issue fixed then can be opened by Win10 Edge.
Would be good to fix epub format issue inside python script.

Try to convert the generated ebook into a new ebook using Calibre.

authors: lorenzodifuccia robertluwang

repo: lorenzodifuccia/safaribooks

license: WTFPL


text:
Download broken - not an auth issue

Download broken - not an auth issue..
python3 ./safaribooks.py --login --preserve-log 9781119383000
Gives the following error:
[-] Logging into Safari Books Online...
[-] Successfully authenticated.
[*] Retrieving book info...
[#] Unhandled Exception: 'rights' (type: KeyError)
[!] Aborting...

Good afternoon!
I got the same error. Pip updated.
I can read the book itself online on the website, but the download no longer works. This error is issued for any book.

Started today ~ worked till few hours ago

Started working again. It was maybe a server problem.

Experiencing the same today. It seems to be a server side problem... maybe a very slow connectivity on their side.

authors: Bomberdash piovac ungarida


text:
Error: unsupported subprotocols [ocpp2.0.1.1] for new client cs001

Is there a way to fix this error without having to add an extra code to configure the server to accept handshake w/ the ocpp2.0.1.1 protocol header?
Server log
% go run .
INFO[2022-02-23T01:52:02-03:00] starting central system on port 7777
INFO[2022-02-23T01:52:02-03:00] listening on tcp network :7777                logger=websocket
ERRO[2022-02-23T01:52:06-03:00] unsupported subprotocols [ocpp2.0.1.1] for new client cs001 ([::1]:64384)  logger=websocket

Possible Cause
https://github.com/lorenzodonini/ocpp-go/blob/a2707ff6494d9611bc56a949be3cf54aa7db64f9/ocpp2.0.1/types/types.go#L10-L13
https://github.com/lorenzodonini/ocpp-go/blob/a2707ff6494d9611bc56a949be3cf54aa7db64f9/ocpp2.0.1/v2.go#L208-L210
Server
func main() {
  // Run central system
  log.Infof("starting central system on port %v", listenPort)
  csms.Start(listenPort, "/{ws}")
  log.Info("stopped central system")
}

func init() {
  log = logrus.New()
  log.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})
  // Set this to DebugLevel if you want to retrieve verbose logs from the ocppj and websocket layers
  log.SetLevel(logrus.InfoLevel)
  ws.SetLogger(log.WithField("logger", "websocket"))

  server = ws.NewServer()
  server.SetBasicAuthHandler(func(user string, pass string) bool {
    ok := authenticate(user, pass) // ... check for user and pass correctness
    return ok
  })

  // This extra code solves the problem
  // would it be possible the default server setup itself
  // already include the subprotocol configuration?
  // server.AddSupportedSubprotocol(types.V201Subprotocol)

  csms = ocpp2.NewCSMS(nil, server)
  csms.SetNewChargingStationHandler(func(chargePoint ocpp2.ChargingStationConnection) {
    log.WithField("client", chargePoint.ID()).Info("new charge point connected")
  })
  csms.SetChargingStationDisconnectedHandler(func(chargePoint ocpp2.ChargingStationConnection) {
    log.WithField("client", chargePoint.ID()).Info("charge point disconnected")
  })
}

func authenticate(user string, pass string) bool {
  return user == "cs001" && pass == "s3cr3t"
}

Charging Station
const (
  csUrl = "ws://localhost:7777"
)

var log *logrus.Logger
var client *ws.Client
var cs ocpp2.ChargingStation

// Start function
func main() {
  // Connects to central system
  err := cs.Start(csUrl)
  if err != nil {
    log.Errorln(err)
  } else {
    log.Infof("connected to central system at %v", csUrl)
    // Disconnect
    cs.Stop()
    log.Infof("disconnected from central system")
  }
}

func init() {
  log = logrus.New()
  log.SetFormatter(&logrus.TextFormatter{FullTimestamp: true})
  // Set this to DebugLevel if you want to retrieve verbose logs from the ocppj and websocket layers
  log.SetLevel(logrus.InfoLevel)

  ws.SetLogger(log.WithField("logger", "websocket"))
  ocppj.SetLogger(log.WithField("logger", "ocppj"))

  client = ws.NewClient()
  client.SetBasicAuth("cs001", "s3cr3t")
  cs = ocpp2.NewChargingStation("cs001", nil, client)
}

Hey, thanks for spotting the issue, it's in the constant value of V201Subprotocol as you correctly identified (2.0.1.1 is a typo and obviously incorrect).
I pushed a fix, so you can at least work with this. The default configuration for the CSMS is now to support ocpp2.0.1.  The charging station will also negotiate 2.0.1 by default.
I haven't officially marked v2 as released yet, because it's still being tested (along with the official example implementations), but feel free to report any bugs or implementation inconsistencies you may find.

Thank you! May I contribute with testing/documentation?

Absolutely!
I'll add a contributing section soon, but I definitely appreciate extra help 😄

authors: fabiolnm lorenzodonini

repo: lorenzodonini/ocpp-go


text:
Add Upsert/Merge

It would be great if there was a method to Insert or Update entities (Upsert).
AddOrUpdate leads to multiple queries, while this could be done in a single query,

+1

+1

authors: marcelbuesing tohagan zbend


text:
Build fail with zh locale

See here: https://github.com/sanic-org/sanic-guide/runs/2158958551?check_suite_focus=true
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at Object.modifiedAt (/home/runner/work/sanic-guide/sanic-guide/node_modules/vuepress-plugin-seo/index.js:64:77)
Error: [vuepress-plugin-seo] execute extendPageData failed.
    at extendPageData (/home/runner/work/sanic-guide/sanic-guide/node_modules/vuepress-plugin-seo/index.js:27:37)
    at /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:296:19
    at /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:293:19
    at Array.map (<anonymous>)
    at Array.map (<anonymous>)
    at Page.enhance (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:290:17)
    at Page.enhance (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:290:17)
    at Page.process (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:148:16)
    at Page.process (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:148:16)
    at async App.addPage (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:354:5)
    at async App.addPage (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:354:5)
    at async /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:339:7
    at async Promise.all (index 56)
    at async App.resolvePages (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:337:5)
    at async App.process (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:115:5)
    at async build (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/index.js:26:3)
    at async /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:339:7
    at async Promise.all (index 56)
    at async App.resolvePages (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:337:5)
    at async App.process (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:115:5)
    at async build (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/index.js:26:3)
RangeError: Invalid time value
    at Date.toISOString (<anonymous>)
    at Object.modifiedAt (/home/runner/work/sanic-guide/sanic-guide/node_modules/vuepress-plugin-seo/index.js:64:77)
    at extendPageData (/home/runner/work/sanic-guide/sanic-guide/node_modules/vuepress-plugin-seo/index.js:27:37)
    at /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:293:19
    at Array.map (<anonymous>)
    at Page.enhance (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:290:17)
    at Page.process (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/Page.js:148:16)
    at async App.addPage (/home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:354:5)
    at async /home/runner/work/sanic-guide/sanic-guide/node_modules/@vuepress/core/lib/node/App.js:339:7
    at async Promise.all (index 57)

It seems like I am running into build issues, and I think this is related to the locale. I am build fine locally, but our CI and other contributors in China seem to be getting this error.
Any thoughts?

Funny, I also got the same error but with fr lang.
The seo plugin is based on $page.lastUpdated (added by @vuepress/plugin-last-updated) that can be a localized date:

And when the seo plugin encounters a date that can't be parsed through new Date(), it fails.
Ideally, it would be great to have a new key $page.lastUpdatedTimestamp with the timestamp value. This way, the seo plugin could easily use it without any issue.

Opened https://github.com/vuejs/vuepress/pull/2843, hoping this will help.

As a workaround, you can do this:

Update your Vuepress theme configuration, configure the plugin @vuepress/theme-default to always returns a timestamp:

// .vuepress/theme/index.js
module.exports = {
  extend: '@vuepress/theme-default',
  plugins: [
    ['@vuepress/last-updated', {
      transformer(timestamp) {
        return timestamp;
      }
    }],
    'seo',
  ],
  // ...
}

Create a new file theme/components/PageEdit.vue, which will extends the original component but override lastUpdate computed:

<template>

      {{ editLinkText }}
      <OutboundLink />

      {{ lastUpdatedText }}:
      <time class="time">{{ lastUpdated }}</time>

</template>

This way, you don't have any issues anymore from the seo plugin, and the last updated date is still formatted correctly:

with an english page (en-US):

with a french page (fr) :

Also affects es, es-ES and es-CL.

authors: Kocal ahopkins rodber

repo: lorisleiva/vuepress-plugin-seo


text:
The tag on the first line can be partial, as long as it is split where there would be whitespace

See https://spec.commonmark.org/0.30/#example-153
Follows #91

The corresponding unit test is testfiles/CommonMark_0.30/html_blocks/006.test:
%   ---RESULT--- "example": 153,
%
%

%

%
%   ---\RESULT---

<<<

>>>
documentBegin
inputBlockHtmlElement: ./_markdown_test/50364402fc2b6e3be554952f266f25ce.verbatim
documentEnd

Here is the result of running git checkout commonmark; cd tests; ./test.sh "testfiles/CommonMark_0.30/html_blocks/006.test":
Testfile testfiles/CommonMark_0.30/html_blocks/006.test
  Format templates/plain/
    Template templates/plain/input.tex.m4
      Command pdftex   --shell-escape                  --interaction=nonstopmode  test.tex
      Command xetex    --shell-escape --8bit           --interaction=nonstopmode  test.tex
      Command luatex                                   --interaction=nonstopmode  test.tex
    Template templates/plain/verbatim.tex.m4
      Command pdftex   --shell-escape                  --interaction=nonstopmode  test.tex
      Command xetex    --shell-escape --8bit           --interaction=nonstopmode  test.tex
      Command luatex                                   --interaction=nonstopmode  test.tex

I cannot reproduce any issues.

The wrong example was referenced.
Example https://spec.commonmark.org/0.30/#example-154; however, does fail due to the reason specified above.
The description has been updated accordingly.

The corresponding unit test is testfiles/CommonMark_0.30/html_blocks/007.test:
%   ---RESULT--- "example": 154,
%
%

%

%
%   ---\RESULT---

<<<

>>>
documentBegin
inputBlockHtmlElement: ./_markdown_test/5958c7398ed8f6528d1252e17621e13e.verbatim
documentEnd

Here is the result of running git checkout commonmark; cd tests; ./test.sh "testfiles/CommonMark_0.30/html_blocks/007.test":
Testfile testfiles/CommonMark_0.30/html_blocks/007.test
  Format templates/plain/
    Template templates/plain/input.tex.m4
      Command luatex                                   --interaction=nonstopmode  test.tex
*** test-expected.log	2022-12-29 21:47:14.831019443 +0100
--- test-actual.log	2022-12-29 21:47:21.770943624 +0100
***************
*** 1,3 ****
  documentBegin
! inputBlockHtmlElement: ./_markdown_test/5958c7398ed8f6528d1252e17621e13e.verbatim
  documentEnd
--- 1,3 ----
  documentBegin
! inlineHtmlTag:

  documentEnd

The issue seems related to the PEG patterns for parsing HTML blocks (1, 2), which use the rules for Gruber's Markdown rather than CommonMark.

authors: Witiko lostenderman

repo: lostenderman/markdown


text:
images not working

Describe the bug
Images are not displaying after pasting.
To Reproduce
When I paste an image into a gist, it is not getting rendered in VSCode. It instead returns a placeholder image icon as it can't seem to locate the file.
The keyboard shortcut of shift +CMD + v (on Mac) also opens a preview of the gist instead of pasting. I have to use right click "paste image".
When I also try to access the image using the url location, Github returns a 404 not found error (even after saving the Gist and it has synced to my Github gists.
The only way I can get images to render is to change the GistPad > Images: Paste Type setting to base64. This however is not practical for document use whilst editing as the output is huge requiring a lot of scrolling compared to the single line output when the format is set to file.
Expected behavior
Images should paste and display.
Screenshots

The output when I use right click paste image.

The output in my browser when I try to visit the url of the image.
Desktop (please complete the following information):

VSCode Version: 1.74.3 (Mac)
GistPad Version v0.4.1

Additional context
I have tried a fresh install of VSCode on my Mac where I only have GistPad installed (no other extensions) however the result is the same. I also had the same result on a Windows 10 laptop. Is this therefore a bug issue? If I change my markdown to use a url of an internet located image, it renders ok. It just will not work when I copy and paste images locally.

I can confirm the same exact issue on:
Windows 11.
VSCode version 1.76.0
GistPad: v0.4.1
The upload starts, but the generated link leads to a 404.
It appears that the "images" folder is not getting created at all either.

Closing this as a duplicate of #297 since the issue is related to pasting images from the clipboard.

This issue (which affects me) doesn't seem to be the same as the referenced issue #297 (though it's possible the cause is related?). When pasting the image, it says ** Uploading image XXXX...**, and after about a second it will be replaced by what looks like a valid path, e.g. ![image](https://gist.github.com/USER/LONG_ID_STRING/raw/images---DATE_SOMENUMBERS.png). Seems good. But nothing was actually uploaded.
In that other issue, the user didn't get that far.
Maybe related useful information: When I clone the gist manually and and upload images myself, gistpad shows something a bit weird with the naming. Here, I've uploaded 5 images, which show as 5 images/ directories as well as some odd recursion. The images themselves show fine though in my markdown preview in VSCode, and also on GitHub (if I use the HTML tags instead of markdown inline)

authors: aidin-foroughi celynw lostintangent markj-s

repo: lostintangent/gistpad


text:
'ReactFontManager' is deprecated

Description
getting errors when compiling android
[15:12:16]: ▸ w: file://node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/LottieAnimationViewPropertyManager.kt:20:38 'ReactFontManager' is deprecated. Deprecated in Java
[15:12:16]: ▸ w: file://node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/LottieAnimationViewPropertyManager.kt:72:24 'ReactFontManager' is deprecated. Deprecated in Java
[15:12:16]: ▸ w: file://node_modules/lottie-react-native/android/src/main/java/com/airbnb/android/react/lottie/LottieAnimationViewPropertyManager.kt:86:24 'ReactFontManager' is deprecated. Deprecated in Java

Steps to reproduce

cd android && ./gradlew assmbleDebug

Snack or a link to a repository
n/a
Lottie React Native version
7.1.0
React Native version
0.76.5
Platforms
Android
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Release app & production bundle
Device
None
Acknowledgements
Yes

Can you share a reproduction link?

facing the same issue, is there any update on this?

authors: ethanneff hafiz-saab matinzd

repo: lottie-react-native/lottie-react-native


text:
Interactor improvements

This is a proposal for a few Lotus::Interactor improvements.
:warning: The following change isn't backward compatible :warning:
--
Remove magic :sparkles: in favor of explicitness
Until now all the instance variables from an interactor were automatically exposed into the returning value of #call, which is an instance of Lotus::Interactor::Result.
Before
class Signup
  include Lotus::Interactor

  def initialize(params)
    @params = params
    @user = User.new(params.fetch(:user))
  end

  def call
    # ...
  end
end

result = Signup.new(user: { name: "Luca" }).call

result.user   # => #<User:0x007fa311105778 @id=1 @name="Luca">
result.params # => { :user=>{:name=>"Luca"} }

After
class Signup
  include Lotus::Interactor
  expose :user

  def initialize(params)
    @params = params
    @user = User.new(params.fetch(:user))
  end
end

result = Signup.new(user: { name: "Luca" }).call

result.user   # => #<User:0x007fa311105778 @id=1 @name="Luca">
result.params # => raises NoMethodError because we haven't exposed it

/cc @lotus/core-team @AlfonsoUceda @luislavena
Closes #77

@jodosha the changes looks much better than the ones I had :smile:
The only difference is that I considered backward compatibility to keep _instance_variables in case _exposures were empty.
If is ok to break that compatibility then :heart: :smile:
Once again thank you for taking the time and sorry not being able to deliver as promised :cry:

@luislavena We're gonna bump v0.5.0 for lotus-utils and write about these breaking changes in the lotusrb v0.4.0 ANN.

authors: jodosha luislavena

repo: lotus/utils


text:
Missing Implementation for Calculating Likelihood Values as per Equation (10)

Hello, thank you for your outstanding work! In the code, I don't seem to find the implementation for calculating likelihood values as given by equation (10) in the paper. Could you please inform me about when you plan to upload it to the GitHub repository? Or perhaps I missed a part of the code that covers this calculation. Could you please assist me in identifying where the code for calculating likelihood values is located?

Following up on this, it seems the only perplexity metric in the repo is using the SEDD predictions as GT and measuring the perplexity of a pre-trained GPT-2 model, presumably to measure alignment with that model.
Would it be at all possible to provide the perplexity metric used in the paper?
Thanks!

authors: Monohydroxides alexanderswerdlow


text:
Please add an ability to monitor a file / drive / share drive etc.

⚠ Please verify that this feature request has NOT been suggested before.

[X] I checked and didn't find similar feature request

🏷 Feature Request Type
New Monitor
🔖 Feature description
Please add an ability to monitor:

A file in such a way so the system can report if the file has been deleted.
A drive / folder has been deleted
SMB / Win Share Drive is not available

✔ Solution
At the moment I can't see any option to monitor the above and I would see quite few applications for it in the production environment.
❓ Alternatives
n/a
📝 Additional Context
I had a situation with a SQL server when the drive letter has changed the databases become unavailable. This has happened 2 times for some strange reasons only MS would know... The feature might also be useful to monitor a AD credentials and blips in the user access control... This kind of feature can also be used to check if the software on the presentation server has been removed by monitoring the presents of a config files etc.....

I feel like the ability for Kuma to execute a script for a check would cover this

Maybe but I would like to se things to stay simple...
Place a file on the SMB share or MS sharedrive and point a monitor at it.... script can do "more" but for a cost of KIS

@evildronepilot this seems like a duplicate of https://github.com/louislam/uptime-kuma/issues/2000
Can you please edit your feature request to make this more distictive or close this issue?

@CommanderStorm I'm not OP, but in my mind this is still a distinct feature request - #2000 is about monitoring that an SMB share is available (by specifying the server URL, share path, and SMB version) whereas this PR is about monitoring that a file path exists - i.e. that a share is mounted and accessible. This also exposes other monitoring options whereby a file can simply be deleted in order to fail the test - it doesn't have to be a file mounted on an SMB server.

Is being available and functional not the same issue? (=> I think these should be merged via a comment in #2000)
Said monitor being able to delete local files sounds like a different monitor though.

I don’t think they’re the same thing - an SMB share might be available, but has been unmounted for some reason. A file check would fail using this PR but pass using #2000.
Re deleting files - sorry I wasn’t clear earlier; I didn’t mean that the monitor could delete files, but that some other process could do so causing the file to become missing. The monitor would then fail because it can no longer see the file.

This feature would be nice, I have NFS mounts that randomly break when live migrating a VM to a different hypervisor. When this happens, my application crashes because a file is not accessible. After the automated restart everything works fine, but id like to know ahead of time.

The ability to also add an (sFTP) account and check if a file is present (or renewed) would be super nice. I use Uptime Kuma for everything I can ping / check, but files would be even nicer, some automatic exports sometimes fail and need to be checked.

authors: 6twenty AntonyterHorst CommanderStorm evildronepilot johntdyer susnick

repo: louislam/uptime-kuma


text:
In browser push / notification

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
I am completely overwhelmed with the issues and its hard to find if there is any duplicate. I would like to ask if there is any possibility to set up (maybe in the main settings tab) a boolean switch that will globally enable the web notifications service of the browser itself, so you can keep the uptime kuma tab open and get browser notifications (if permissions are requested correctly). This allows you to run and monitor services in networks where there is no internet connection and you just need to "ping" => hey, this service is down. I think this should not be a new "provider", but a global settings => Notifications that can be turned on and off as needed. I hope everyone understands what I am trying to say. I did not find any hints for this feature, but it can be really helpful in some situations.
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
beta
💻 Operating System and Arch
docker
🌐 Browser
Google Chrome
🐋 Docker Version
No response
🟩 NodeJS Version
No response

Currently there is no integration with browser notifications. Feature request is a duplicate of #2792.


text:
建议修改一下项目的描述

最好按照中文和英文文档上的来，这个大小写和英文描述都不规范。

👌

👍

repo: louislivi/smproxy