text:
⚠ Bofrost.at has degraded performance

In 14350f6, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1242 ms

Resolved: Bofrost.at performance has improved in be18498 after 8 minutes.


text:
⚠ Bofrost.fr has degraded performance

In bb3603a, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 820 ms

Resolved: Bofrost.fr performance has improved in 00fccdd after 1 hour, 55 minutes.

source: gharchive/issue

repo: Ckal/Uptime

license: MIT

license_type: permissive

license_source: github-api


text:
⚠ Bofrost.de has degraded performance

In 745504f, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 906 ms

Resolved: Bofrost.de performance has improved in dc6dd3d.


text:
Remove Fedora i686 configuration

This configuration has been dropped, as support for 32-bit x86 was
dropped in Fedora 31.
We do not actually lose much coverage, as we had this configuration
disabled for most recent clang versions due to
https://github.com/ClangBuiltLinux/linux/issues/1442.
Link: https://src.fedoraproject.org/rpms/kernel/c/ec96983c95a52f6df6e20e276ff9c761139e32d8
Link: https://fedoraproject.org/wiki/Changes/Stop_Building_i686_Kernels

It helps that the build errored :)
https://github.com/ClangBuiltLinux/continuous-integration2/runs/5743129779?check_suite_focus=true
Thanks for the review as always!

source: gharchive/pull-request


text:
Add script to locally build TuxSuite configurations

Sometimes, it may be desirable to perform the same set of builds that
TuxSuite does locally, such as validating that a local tree does not
have any problems.
TuxMake is the backend of TuxSuite and it is written in Python, so we
can import it, parse the TuxSuite YAML files ourselves, then offload all
the builds onto TuxMake.
Add scripts/build-local.py to take care of this and add a note of it in the
tuxsuite configurations.

Thanks a lot for the review as always!


text:
patches: mainline: Add patch for drivers/scsi/aacraid

Same as #576 but for mainline, as -fstrict-flex-arrays=3 has been merged, causing -Warray-bounds in drivers/scsi/aacraid/commsup.c.
There is another set of warnings in drivers/staging/ks7010 but the fix for that is pending in a pull request, so I am not adding it here with the assumption that it will be pulled shortly (the wireless patch):
https://lore.kernel.org/ZJxZJDUDs1ry84Rc@work/
cc @kees @GustavoARSilva

I have the rebase series ready for this here:
https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=testing/fam01-next20230627
I'll send it out this afternoon. :)

Here is the new series:
https://lore.kernel.org/linux-hardening/cover.1687974498.git.gustavoars@kernel.org/T/

Thanks! I have updated the patch, which is just metadata but it will help with tracking.

authors: GustavoARSilva nathanchance


text:
Update minos_microservice_common library to 0.0.7

Update minos_microservice_common library to 0.0.7 as it has changes in events and commands (location).

Command Broker Must be updated passing: saga_id and task_id
class MinosCommandBroker(MinosBroker):
    """Minos Command Broker Class."""

    ACTION = "command"

    def __init__(self, *args, saga_id: str, task_id: str, reply_on: str, **kwargs):
        super().__init__(*args, **kwargs)
        self.reply_on = reply_on
        self.saga_id = saga_id
        self.task_id = task_id

    @classmethod
    def from_config(cls, *args, config: MinosConfig = None, **kwargs) -> Optional[MinosCommandBroker]:
        """Build a new repository from config.
        :param args: Additional positional arguments.
        :param config: Config instance. If `None` is provided, default config is chosen.
        :param kwargs: Additional named arguments.
        :return: A `MinosRepository` instance.
        """
        if config is None:
            config = MinosConfig.get_default()
        if config is None:
            return None
        # noinspection PyProtectedMember
        return cls(*args, **config.commands.queue._asdict(), **kwargs)

    async def send(self, items: list[Aggregate]) -> int:
        """Send a list of ``Aggregate`` instances.

        :param items: A list of aggregates.
        :return: This method does not return anything.
        """
        command = Command(self.topic, items, self.saga_id, self.task_id, self.reply_on)
        return await self._send_bytes(command.topic, command.avro_bytes)


text:
Create color for the weakest cards

Pink is out of question. Maybe gre- white is not good, black is used already...
Brown then.

You know what? This can be done later.


text:
ack method can not found in delivery

I know this is a basic program method,
in the tokio directory (https://github.com/CleverCloud/lapin/blob/master/tokio/examples/pubsub-tokio.rs), run command:
cargo run --example pubsub-tokio.rs

It's works fine,
i try create a new demo from above code, just copy & paste,
code here
or here
    consumer.set_delegate(move |delivery: DeliveryResult| async move {
        let delivery = delivery.expect("error caught in in consumer");
        if let Some(delivery) = delivery {
            delivery
                .ack(BasicAckOptions::default())
                .await
                .expect("failed to ack");
        }
    });

but get this error message,
error[E0599]: no method named `ack` found for tuple `(lapin::Channel, Delivery)` in the current scope
  --> src/main.rs:49:18
   |
49 |                 .ack(BasicAckOptions::default())
   |                  ^^^ method not found in `(lapin::Channel, Delivery)`

I find the Acker own the ack method, DeliveryResult own Acker,
what am i miss?
any suggestions would be very appreciate!
thank you

pubsub_tokio trace info
Apr 22 11:53:16.271  INFO pubsub_tokio: delivery: Delivery { delivery_tag: 4243, exchange: ShortString(""), routing_key: ShortString("hello"), redelivered: true, properties: AMQPProperties { content_type: None, content_encoding: None, headers: None, delivery_mode: None, priority: None, correlation_id: None, reply_to: None, expiration: None, message_id: None, timestamp: None, kind: None, user_id: None, app_id: None, cluster_id: None }, data: [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33], acker: Acker { channel_id: 2, delivery_tag: 4243, internal_rpc: Some(InternalRPCHandle) } } delivery=Delivery { delivery_tag: 4243, exchange: ShortString(""), routing_key: ShortString("hello"), redelivered: true, properties: AMQPProperties { content_type: None, content_encoding: None, headers: None, delivery_mode: None, priority: None, correlation_id: None, reply_to: None, expiration: None, message_id: None, timestamp: None, kind: None, user_id: None, app_id: None, cluster_id: None }, data: [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33], acker: Acker { channel_id: 2, delivery_tag: 4243, internal_rpc: Some(InternalRPCHandle) } }

lapin-demo trace info:
[2021-04-22T03:54:36Z INFO  lapin_demo] delivery: (Channel { id: 2, configuration: Configuration { channel_max: 2047, frame_max: 131072, heartbeat: 60 }, status: ChannelStatus, connection_status: ConnectionStatus { state: Connected, vhost: "/", username: "guest", blocked: false }, acknowledgements: Acknowledgements { delivery_tag: IdSequence { allow_zero: false, max: None, id: 0 }, returned_messages: ReturnedMessages { waiting_messages: [], messages: [], non_confirm_messages: [] }, pending: [] }, consumers: Consumers, basic_get_delivery: BasicGetDelivery, returned_messages: ReturnedMessages { waiting_messages: [], messages: [], non_confirm_messages: [] }, frames: Frames { expected_replies: {2: [], 0: [], 1: []} }, executor: TokioExecutor(Handle { spawner: ThreadPool(Spawner), io_handle: Some(Handle), signal_handle: Some(Handle { inner: (Weak) }), time_handle: Some(Handle), clock: Clock, blocking_spawner: blocking::Spawner }) }, Delivery { delivery_tag: 1788, exchange: ShortString(""), routing_key: ShortString("hello"), redelivered: true, properties: AMQPProperties { content_type: None, content_encoding: None, headers: None, delivery_mode: None, priority: None, correlation_id: None, reply_to: None, expiration: None, message_id: None, timestamp: None, kind: None, user_id: None, app_id: None, cluster_id: None }, data: [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33], acker: Acker { channel_id: 2, delivery_tag: 1788, internal_rpc: Some(InternalRPCHandle), error: Some(ErrorHolder), used: false } })

CHANGELOG.md 1.0.0 (2020-05-27)
" * DeliveryResult now also carries the corresponding Channel "

Finally, I figure it out
    channel_b
        .basic_consume(
            "hello",
            "my_consumer",
            bcsoptions,
            FieldTable::default(),
        )
        .await
        .expect("basic_consume")
        .set_delegate(move |delivery: DeliveryResult| {
            // let channel = channel.clone();
            // let (_, delivery) = delivery;
            async move {
                // info!(message=?delivery, "received message");
                if let Ok(Some(delivery)) = delivery {
                    info!("delivery {:?}", delivery);
                    // delivery
                    //     .ack(BasicAckOptions::default())
                    //     .await
                    //     .expect("basic_ack");
                    let (_, delivery) = delivery;
                    info!("delivery2 {:?}", delivery.data);
                    // let msg =
                    // delivery
                    //     .basic_get("hello", BasicGetOptions::default())
                    //     .await;
                    // info!("msg {:?}", msg);
                }
            }
        });

repo: CleverCloud/lapin


text:
Adding a plot for scaling benchmark

Adds a plot for step time v/s horizontal elements.
Also updates the parameters z_elem and dt to be closer to the target resolution.
To-do

Should the output directory be read from the commandline arguments instead of being hardcoded?

[x] I have read and checked the items on the review checklist.

bors r+

Closes #1863

bors r+

authors: bloops charleskawczynski


text:
High frequency writing scene，execute prepareStatement.executeBatch() about 20 times, then it blocks!

My question is：
High frequency writing scene，execute prepareStatement.executeBatch() about 20 times, then it blocks for a while. The batch is 1000 records.
Jdbc version: 0.3.1
I tried all the versions(from 0.3.1 to 0.4.6), the problem is still there! Please help me!
And it does not work about this way: https://github.com/ClickHouse/clickhouse-java/issues/991

Hi @xlvchao, so you're reusing prepared statement to execute multiple batches, right? I wrote a simple loop but couldn't reproduce the issue.
Could you share more details like table structure and insert query etc.? Moreover, is there any clue in server log / system.query_log or output of show processlist?
Lastly, I want to understand how long it will take for a batch update at your end. In the case that the connection is idle for too long and the network is unstable, you may run into ClickHouse/clickhouse-docs#1178.

Thanks @xlvchao, I'm not sure how this related to the JDBC driver. If you look at heap usage and thread stack, you'll see JVM is occupied by fastjson which I'm afraid has nothing to do with the driver.
By the way, ClickHouse supports JSONEachRow format, which might be of use in your case, for instance:
https://github.com/ClickHouse/clickhouse-java/blob/c25ffc62c886c0cdc1fcf8d8bf2234690c131dca/examples/jdbc/src/main/java/com/clickhouse/examples/jdbc/Basic.java#L118-L137

Thanks @xlvchao, I'm not sure how this related to the JDBC driver. If you look at heap usage and thread stack, you'll see JVM is occupied by fastjson which I'm afraid has nothing to do with the driver.
By the way, ClickHouse supports JSONEachRow format, which might be of use in your case, for instance:
https://github.com/ClickHouse/clickhouse-java/blob/c25ffc62c886c0cdc1fcf8d8bf2234690c131dca/examples/jdbc/src/main/java/com/clickhouse/examples/jdbc/Basic.java#L118-L137

@zhicwu It seems doesn't work
JDBC version:
0.4.6
DB script is here:
https://github.com/ClickHouse/clickhouse-java/issues/1374#issuecomment-1569823589
My code:
import com.alibaba.fastjson.JSONObject;
import com.clickhouse.data.ClickHouseOutputStream;
import com.clickhouse.data.ClickHouseWriter;
import com.clickhouse.data.format.BinaryStreamUtils;
import com.clickhouse.jdbc.ClickHouseDataSource;
import com.test.xlc.utils.DateTimeUtil;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.*;

public class BatchInsertTest {
    public static final String USER = "default";
    public static final String PASSWORD = "xxx";
    public static final String URL = "jdbc:clickhouse://10.68.237.236:8123?collect_timeout=3600&max_execution_time=3600&socket_timeout=4800000";
    //public static final String sql = "INSERT INTO aiops_local_test.aiops_collect_1 (product,service,itf,accountErrorCode,addn,aggregateDelay,avgAggregateDelay,avgLatency,destinationId,errorDetail,fail,ip,ipCity,ipCountry,ipProvince,itfGroup,latency,nonAggregatedDelay,returnCode,sourceId,success,total,totalInterfaceLogAggregateDelay,type,sysTime,time,greyTag,minLatency,maxLatency,sumLatency,latency_p95,referenceTotal) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
    public static final String[] fields = new String[]{"product","service","itf","accountErrorCode","addn","aggregateDelay","avgAggregateDelay","avgLatency","destinationId","errorDetail","fail","ip","ipCity","ipCountry","ipProvince","itfGroup","latency","nonAggregatedDelay","returnCode","sourceId","success","total","totalInterfaceLogAggregateDelay","type","sysTime","time","greyTag","minLatency","maxLatency","sumLatency","latency_p95","referenceTotal"};
    public static Map<String, String> fieldTypeMap;
    public static ClickHouseDataSource dataSource;
    static {
        try {
            dataSource = new ClickHouseDataSource(URL);
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }

        fieldTypeMap = new HashMap<>();
        fieldTypeMap.put("product", "String");
        fieldTypeMap.put("service", "String");
        fieldTypeMap.put("itf", "String");
        fieldTypeMap.put("accountErrorCode", "String");
        fieldTypeMap.put("addn", "String");
        fieldTypeMap.put("aggregateDelay", "Nullable(Int64)");
        fieldTypeMap.put("avgAggregateDelay", "Nullable(Int64)");
        fieldTypeMap.put("avgLatency", "Nullable(Float64)");
        fieldTypeMap.put("destinationId", "String");
        fieldTypeMap.put("errorDetail", "String");
        fieldTypeMap.put("fail", "Nullable(Int64)");
        fieldTypeMap.put("ip", "String");
        fieldTypeMap.put("ipCity", "String");
        fieldTypeMap.put("ipCountry", "String");
        fieldTypeMap.put("ipProvince", "String");
        fieldTypeMap.put("itfGroup", "String");
        fieldTypeMap.put("latency", "Nullable(Int64)");
        fieldTypeMap.put("nonAggregatedDelay", "Nullable(Int64)");
        fieldTypeMap.put("returnCode", "String");
        fieldTypeMap.put("sourceId", "String");
        fieldTypeMap.put("success", "Nullable(Int64)");
        fieldTypeMap.put("total", "Nullable(Int64)");
        fieldTypeMap.put("totalInterfaceLogAggregateDelay", "Nullable(Int64)");
        fieldTypeMap.put("type", "String");
        fieldTypeMap.put("sysTime", "DateTime");
        fieldTypeMap.put("time", "DateTime");
        fieldTypeMap.put("greyTag", "String");
        fieldTypeMap.put("minLatency", "Nullable(Int64)");
        fieldTypeMap.put("maxLatency", "Nullable(Int64)");
        fieldTypeMap.put("sumLatency", "Nullable(Int64)");
        fieldTypeMap.put("latency_p95", "Nullable(Float64)");
        fieldTypeMap.put("referenceTotal", "Nullable(Int64)");
    }

    public static void main(String[] args) throws Exception {
        for (int k = 0; k < 5; k++) {
            new Thread(() -> {
                List<JSONObject> localBuffer = new ArrayList<>();
                for (int i = 1; i <= 100; i++) {
                    JSONObject jsonObject = JSONObject.parseObject("{\"accountErrorCode\":\"000\",\"addn\":\"no addn\",\"aggregateDelay\":1,\"avgAggregateDelay\":1," +
                            "\"avgLatency\":25.0,\"destinationId\":\"id-234\",\"errorDetail\":\"no error\",\"fail\":0,\"greyTag\":\"121\",\"id\":1,\"ip\":\"127.0.0.1\"," +
                            "\"ipCity\":\"shenzhen\",\"ipCountry\":\"china\",\"ipProvince\":\"guangdong\",\"itf\":\"itf11\",\"itfGroup\":\"itfGroup\",\"latency\":23,\"maxLatency\":1," +
                            "\"minLatency\":1,\"nonAggregatedDelay\":0,\"product\":\"product3\",\"returnCode\":\"000\",\"service\":\"service3\",\"sourceId\":\"id-123\"," +
                            "\"success\":1,\"sumLatency\":1,\"sysTime\":\"2023-05-30 19:00:00\",\"time\":\"2023-05-30 19:00:00\",\"total\":100,\"totalInterfaceLogAggregateDelay\":100," +
                            "\"type\":\"cli\"}\n");
                    localBuffer.add(jsonObject);
                    if(localBuffer.size() >= 100) {
                        try {
                            flushToClickHouse(localBuffer);
                            localBuffer.clear();
                        } catch (Exception e) {
                            throw new RuntimeException(e);
                        }
                    }
                }
            }).start();
        }
    }

    static void flushToClickHouse(List<JSONObject> dataList) {
        String sql = "insert into aiops_local_test.aiops_collect_1 format RowBinary";
        try (Connection conn = dataSource.getConnection(USER, PASSWORD);
             PreparedStatement prepareStatement = conn.prepareStatement(sql)) {

            long s = System.currentTimeMillis();
            prepareStatement.setObject(1, new ClickHouseWriter() {
                @Override
                public void write(ClickHouseOutputStream output) throws IOException {
                    for (JSONObject object : dataList) {
                        for (String field : fields) {
                            if(object.get(field) != null) {
                                String type = fieldTypeMap.get(field);
                                if("String".equals(type) || "Nullable(String)".equals(type)) {
                                    BinaryStreamUtils.writeString(output, object.getString(field));
                                } else if("Int32".equals(type) || "Nullable(Int32)".equals(type)) {
                                    BinaryStreamUtils.writeInt32(output, object.getIntValue(field));
                                } else if("Int64".equals(type) || "Nullable(Int64)".equals(type)) {
                                    BinaryStreamUtils.writeInt64(output, object.getLongValue(field));
                                } else if("Float32".equals(type) || "Nullable(Float32)".equals(type)) {
                                    BinaryStreamUtils.writeFloat32(output, object.getFloatValue(field));
                                } else if("Float64".equals(type) || "Nullable(Float64)".equals(type)) {
                                    BinaryStreamUtils.writeFloat64(output, object.getDoubleValue(field));
                                } else if("DateTime".equals(type) || "Nullable(DateTime)".equals(type)) {
                                    BinaryStreamUtils.writeDateTime(output, DateTimeUtil.parseLocalDateTime(object.getString(field)), TimeZone.getDefault());
                                }
                            } else {
                                BinaryStreamUtils.writeNull(output);
                            }
                        }
                    }
                }
            });
            prepareStatement.executeUpdate();
            long e = System.currentTimeMillis();
            System.out.println(String.format("Success flush data to ClickHouse, elapsed = {}ms, batch size = {}", (e - s), dataList.size()));
        } catch (Exception e) {
            e.printStackTrace();
            System.err.println("Failed while flush data to ClickHouse! ");
        }
    }

The Exception:
java.sql.SQLException: Code: 33, e.displayText() = DB::Exception: Cannot read all data. Bytes read: 18987. Bytes expected: 13585893.: (at row 6)
 (version 21.8.10.19 (official build))
, server ClickHouseNode [uri=http://10.68.237.236:8123/default, options={collect_timeout=3600,max_execution_time=3600,socket_timeout=4800000}]@-98731198
	at com.clickhouse.jdbc.SqlExceptionUtils.handle(SqlExceptionUtils.java:85)
	at com.clickhouse.jdbc.SqlExceptionUtils.create(SqlExceptionUtils.java:31)
	at com.clickhouse.jdbc.SqlExceptionUtils.handle(SqlExceptionUtils.java:90)
	at com.clickhouse.jdbc.internal.ClickHouseStatementImpl.executeInsert(ClickHouseStatementImpl.java:322)
	at com.clickhouse.jdbc.internal.StreamBasedPreparedStatement.executeAny(StreamBasedPreparedStatement.java:97)
	at com.clickhouse.jdbc.internal.StreamBasedPreparedStatement.executeLargeUpdate(StreamBasedPreparedStatement.java:161)
	at com.clickhouse.jdbc.internal.AbstractPreparedStatement.executeUpdate(AbstractPreparedStatement.java:135)
	at com.test.xlc.clickhouse.BatchInsertTest.flushToClickHouse(BatchInsertTest.java:127)
	at com.test.xlc.clickhouse.BatchInsertTest.lambda$main$0(BatchInsertTest.java:83)
	at java.lang.Thread.run(Thread.java:748)

Apologies for the confusion. The example I provided was for RowBinary format. JSONEachRow, on the other hand, is a text-based format where you simply need to write a JSON string into the output stream for insertion, with each row on a separate line. For example:
try (PreparedStatement ps = conn
        .prepareStatement(
                "INSERT INTO test_insert_with_format(s,i) format JSONEachRow")) {
    ps.setObject(1, new ClickHouseWriter() {
        @Override
        public void write(ClickHouseOutputStream out) throws IOException {
            // actually line-break is optional
            out.write("{\"i\":2,\"s\":\"22\"}\n".getBytes());
            out.write("{\"i\":5,\"s\":\"55\"}\n".getBytes());
        }
    });
    ps.executeUpdate();
}

If you already have the JSON string from the start, there is no need to use fastjson to deserialize it back into a Java object and then serialize it again for the JDBC driver. You can simply pass the JSON string directly to the driver, as demonstrated above. ClickHouse will handle the rest of the process for you.

Apologies for the confusion. The example I provided was for RowBinary format. JSONEachRow, on the other hand, is a text-based format where you simply need to write a JSON string into the output stream for insertion, with each row on a separate line. For example:
// CREATE TABLE test_insert_with_format(i Int32, s String) ENGINE=Memory
try (PreparedStatement ps = conn
        .prepareStatement(
                "INSERT INTO test_insert_with_format(s,i) format JSONEachRow")) {
    ps.setObject(1, new ClickHouseWriter() {
        @Override
        public void write(ClickHouseOutputStream out) throws IOException {
            // actually line-break is optional
            out.write("{\"i\":2,\"s\":\"22\"}\n".getBytes());
            out.write("{\"i\":5,\"s\":\"55\"}\n".getBytes());
        }
    });
    ps.executeUpdate();
}

If you already have the JSON string from the start, there is no need to use fastjson to deserialize it back into a Java object and then serialize it again for the JDBC driver. You can simply pass the JSON string directly to the driver, as demonstrated above. ClickHouse will handle the rest of the process for you.

I have implemented an efficient writing method based on JSONEachRow, but have encountered a problem.
@zhicwu  have conducted multiple tests of high-concurrency writing and added tracking logs in the code for analysis.
The problem is that sometimes the amount of data in the database matches, while sometimes it is missing a few thousand records.
I can ensure that every piece of data from the start of the test program to the data written to out.write() is not lost.
Therefore, I suspect that either our ClickHouse testing environment maybe has some problems, or there is a problem with the underlying driver code.
Or do I need to modify or add some configuration parameters? Currently, I have added connection parameters max_queued_buffers=0 after the JDBC URL.

sometimes it is missing a few thousand records.

Have you checked written_rows in system.query_log? In the case you're using InputStreamWriter etc., have you called flush() method in the write method?

Apologies for the confusion. The example I provided was for RowBinary format. JSONEachRow, on the other hand, is a text-based format where you simply need to write a JSON string into the output stream for insertion, with each row on a separate line. For example:
// CREATE TABLE test_insert_with_format(i Int32, s String) ENGINE=Memory
try (PreparedStatement ps = conn
        .prepareStatement(
                "INSERT INTO test_insert_with_format(s,i) format JSONEachRow")) {
    ps.setObject(1, new ClickHouseWriter() {
        @Override
        public void write(ClickHouseOutputStream out) throws IOException {
            // actually line-break is optional
            out.write("{\"i\":2,\"s\":\"22\"}\n".getBytes());
            out.write("{\"i\":5,\"s\":\"55\"}\n".getBytes());
        }
    });
    ps.executeUpdate();
}

If you already have the JSON string from the start, there is no need to use fastjson to deserialize it back into a Java object and then serialize it again for the JDBC driver. You can simply pass the JSON string directly to the driver, as demonstrated above. ClickHouse will handle the rest of the process for you.

@zhicwu It doesn't seem as fast as expected, and sometimes even slower!
DDL:
create table aiops_local_test.aiops_collect_123
(
    product          String,
    service          String,
    itf              String,
    addn             String,
    destinationId    String,
    errorDetail      String,
    ip               String,
    ipCity           String,
    ipCountry        String,
    ipProvince       String,
    itfGroup         String,
    latency          Int64,
    time             DateTime
)
engine = MergeTree()
PARTITION BY toYYYYMMDD(time)
PRIMARY KEY (product, service, itf, time)
ORDER BY (product, service, itf, time)
TTL time + toIntervalMonth(1)
SETTINGS index_granularity = 8192;

JDBC version:
0.4.6 or 0.3.x

Java demo:
import com.alibaba.fastjson.JSONObject;
import com.clickhouse.data.ClickHouseOutputStream;
import com.clickhouse.data.ClickHouseWriter;
import com.clickhouse.jdbc.ClickHouseDataSource;

import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.List;

public class BatchInsertTest {
    public static final String user = "default";
    public static final String password = "xxxxxxx";
    public static final String jdbcUrl = "jdbc:clickhouse://10.68.237.236:8123?collect_timeout=3600&max_execution_time=3600&socket_timeout=4800000";

    public static void main(String[] args) throws Exception {
        ClickHouseDataSource dataSource = new ClickHouseDataSource(jdbcUrl);
        String jsonString = "{\"addn\":\"no addn\",\"product\":\"product\",\"ipCity\":\"深圳\",\"ip\":\"127.0.0.1\",\"latency\":30,\"ipCountry\":\"中国\",\"destinationId\":\"id-234\",\"service\":\"service\",\"errorDetail\":\"no error\",\"ipProvince\":\"广东\",\"itf\":\"itf\",\"time\":\"2023-06-01 21:00:00\",\"itfGroup\":\"itfGroup\"}";

        for (int k = 0; k < 3; k++) {
            new Thread(() -> {
                List<String> localBuffer = new ArrayList<>();
                for (int i = 1; i <= 10000; i++) {
                    localBuffer.add(jsonString);
                    if(localBuffer.size() >= 1000) {
                        flushByJsonEachRow(dataSource, localBuffer);
                        localBuffer.clear();
                    }
                }
            }).start();
        }

        Thread.sleep(10000L);

        for (int k = 0; k < 3; k++) {
            new Thread(() -> {
                List<JSONObject> localBuffer = new ArrayList<>();
                for (int i = 1; i <= 10000; i++) {
                    localBuffer.add(JSONObject.parseObject(jsonString));
                    if(localBuffer.size() >= 1000) {
                        flushByStandardBatch(dataSource, localBuffer);
                        localBuffer.clear();
                    }
                }
            }).start();
        }

        Thread.sleep(10000000000000L);
    }

    static void flushByJsonEachRow(ClickHouseDataSource dataSource, List<String> dataList) {
        String sql = "insert into aiops_local_test.aiops_collect_123 format JSONEachRow";
        try (Connection conn = dataSource.getConnection(user, password);
             PreparedStatement prepareStatement = conn.prepareStatement(sql)) {

            prepareStatement.setObject(1, new ClickHouseWriter() {
                @Override
                public void write(ClickHouseOutputStream out) throws IOException {
                    for (String json : dataList) {
                        out.write(json.getBytes());
                    }
                    out.flush();
                }
            });

            long s = System.currentTimeMillis();
            prepareStatement.executeUpdate();
            long e = System.currentTimeMillis();
            System.err.println(String.format("Elapsed = %dms, batch size = %d", (e - s), dataList.size()));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    static void flushByStandardBatch(ClickHouseDataSource dataSource, List<JSONObject> dataList) {
        String sql = "INSERT INTO aiops_local_test.aiops_collect_123 (product,service,itf,addn,destinationId,errorDetail,ip,ipCity,ipCountry,ipProvince,itfGroup,latency,time) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)";
        String[] fields = new String[]{"product","service","itf","addn","destinationId","errorDetail","ip","ipCity","ipCountry","ipProvince","itfGroup","latency","time"};
        try (Connection conn = dataSource.getConnection(user, password);
             PreparedStatement prepareStatement = conn.prepareStatement(sql)) {

            for (JSONObject data : dataList) {
                int idx = 1;
                for (String field : fields) {
                    Object value = data.get(field);
                    prepareStatement.setObject(idx++, value);
                }
                prepareStatement.addBatch();
            }

            long s = System.currentTimeMillis();
            prepareStatement.executeBatch();
            long e = System.currentTimeMillis();
            System.out.println(String.format("Elapsed = %dms, batch size = %d", (e - s), dataList.size()));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

@xlvchao, do you still see execution being blocked, OOM, or serialization error?
As to performance, you're comparing insertion using different formats(JSONEachRow vs. RowBinary), so it's not surprising that the latter is faster. However, I'd suggest considering the cost of JSON deserialization etc. at client side as well as resource utilization on server in the comparison for better understanding.
Lastly, if you're handling small amount of data(as shown in above example), it's not worthy of using multi-threading with multiple batches. Instead, one insert with all the data you have should be good enough in most cases.  Simply put, it's faster to insert 1M rows directly in one go instead of 100 times each just for 10,000 rows.

Our team inserts over 15 billion pieces of data into Clickhouse every day, so if I only consider insertion performance, I should consider using clickhouse-client instead of clickhouse-jdbc. Am I right?

@zhicwu I adjusted the JVM parameters, and then I have never see execution being blocked, OOM, or serialization error.

Good to know.

Our team inserts over 15 billion pieces of data into Clickhouse every day, so if I only consider insertion performance, I should consider using clickhouse-client instead of clickhouse-jdbc. Am I right?

Yes, in general, clickhouse-client is faster than clickhouse-jdbc, especially when (de)serialization was involved. If you need to process data before ingesting into ClickHouse, there'll be not much difference - see comparison among clickhouse-client, curl, and Java Client(dump or load) in #928. Apart from that, if the source of data are messages from MQ, you probably just need to use the built-in connector in ClickHouse for ingestion.

authors: xlvchao zhicwu

repo: ClickHouse/clickhouse-java


text:
FieldFilter variables mapped to DateTime datatype don't show results correctly

Describe the bug
Hello. I didn't knew how to lable it - bug or suggestion, but IMHO this looks like a bug.
I've discovered, that Field Filter doesn't work "correctly" if being mapped to DateTime datatype. All Filter Widget types for dates are affected, except one - Single Date type.
Steps to reproduce
We are checking result of the following query for Date Filter  Filter Widget type:
select date_time
from date_filter
[[where {{date_time}}]]
order by date_time desc

Filter option
Where clause
Actual Result
Expected Result

Today
testing.date_filter.date_time = toDate('2024-03-19')
We got data only for midnight time: 19/3/2024, 00:00(check first screenshot [^1])
Should show all timestamps for 19/3/2024

Yesterday
testing.date_filter.date_time = toDate('2024-03-18')
We got data only for midnight time: 18/3/2024, 00:00(check first screenshot [^2])
Should show all timestamps for 18/3/2024

Last 7 days
testing.date_filter.date_time BETWEEN toDate('2024-03-12') AND toDate('2024-03-18')
For 18/3/2024 shows only midnight time: 18/3/2024, 00:00(check first screenshot [^3])
Should show all timestamps between 11/3/2024 till 18/3/2024 including timestamps from 18/3/2024

Specific dates -> Between without time
testing.date_filter.date_time BETWEEN toDate('2024-03-11') AND toDate('2024-03-12')
For 12/3/2024 shows only midnight time: 12/3/2024, 00:00(check first screenshot [^4])
Should show all timestamps for 12/3/2024

Specific dates -> Between with time
testing.date_filter.date_time BETWEEN '2024-03-11 00:00:00.000' AND '2024-03-12 23:59:00.000'
It didn't showed record for 2024-03-12 where time was 23:59:59(check first screenshot [^5])
Should show all timestamps for 2024-03-12 23:59

Specific dates -> After
testing.date_filter.date_time > toDate('2024-03-18')
We're missing midnight for 2024-03-18, and show other records for that day(screenshot [^6])
Shouldn't show any timestamps for 2024-03-18

Specific dates -> On
CAST(testing.date_filter.date_time AS date) = toDate('2024-03-12')
As expected - we got all records for 2024-03-12 (check screenshot[^7])
All timestamps for 2024-03-12 had been shown

Following table will be all affected with same issue as above, so i'll just mention

Filter type (& option)
Where clause

Month and Year
testing.date_filter.date_time BETWEEN toDate('2023-05-01') AND toDate('2023-05-31')

Quater and Year
where testing.date_filter.date_time BETWEEN toDate('2023-07-01') AND toDate('2023-09-30')

Data Range without time
testing.date_filter.date_time BETWEEN toDate('2024-03-18') AND toDate('2024-03-19')

Data Range with time
testing.date_filter.date_time BETWEEN '2024-03-18 00:00:00.000' AND '2024-03-19 23:59:00.000'

Data Range single date
testing.date_filter.date_time = toDate('2024-03-18')

Relative date
Basically the same as for Date Filter options

And here is table for Single Date Filter Widget type:

Filter option
Where clause
Result

Just date
CAST(testing.date_filter.date_time AS date) = toDate('2024-03-19')
As we wanted - all records for 2024-03-19 are shown by this query (screenshot [^8])

Date with time
toStartOfMinute(testing.date_filter.date_time) = '2024-03-19 23:59:00.000'
It showed every record for 23:59, as we expected(screenshot [^9])

Configuration
Environment

metabase-clickhouse-driver version:
metabase-clickhouse-driver configuration:
Metabase version:
OS:

ClickHouse server

ClickHouse Server version: 23.8.9.54 (official build)
CREATE TABLE statements for tables involved:

CREATE TABLE date_filter
(
date_time DateTime('Europe/Moscow'),
)
ENGINE = TinyLog
This is example of DateTime records from the table - 5 records with different time for a day:
2023-03-25 00:00:00
2023-03-25 06:30:34
2023-03-25 12:00:00
2023-03-25 18:45:58
2023-03-25 23:59:59
2023-03-26 00:00:00
Where max value for date_time is 2024-03-19 23:59:59 and min value for date_time is 2023-03-25 00:00:00
Screenshots:
[^1]:
[^2]:
[^3]:
[^4]:
[^5]:
[^6]:
[^7]:
[^8]:
[^9]:

Environment
metabase-clickhouse-driver version:
metabase-clickhouse-driver configuration:
Metabase version:
OS:

Could you share these? What is the driver version? OS? What is the timezone configuration (OS, CH, JVM/Metabase)?

Yeah, i forgot to put this information there, sorry. Accidentally ctrl-enter before finished whole report .-.

No worries. Thank you for the detailed report (emoji navigation is the next level).
In the latest driver (which requires MB 0.49.x), there was a fix related to this feature; see 1.4.0.

Added environment info.
TZ configuration is the same for all of OS, CH and Metabase - UTC +3
So yeah 1.4.0 is working perfectly fine, i was wondering is there any chance to implement this to other Filter Widgets?

I found that it could be made like this, but i have no idea how it will affect performance:
toStartOfMinute(date_time) BETWEEN '2024-03-17 23:59:00' AND '2024-03-19 23:59:00'
CAST(date_time as date) BETWEEN toDate('2024-03-18') AND toDate('2024-03-19')

OK, I see that 1.4.0 is affected. I will have a look when I am back from vacation next week.

@slvrtrn Just double checking on this one, hit the same issue as reported, where the filters basically exclude the start/end days of the intervals (so for example a last 7 days relative range filter will return the data only for 5 days).

As i said earlier - it seems that #218 fixed some particular cases, but not the issue itself.
I updated my
MB to 0.49.2 version:

driver version still 1.4.0:
[root@test ch_mt_driver]# cat metabase-plugin.yaml
info:
  name: Metabase ClickHouse Driver
  version: 1.4.0

ClickHouse to 24.3.2 version:
[root@test clickhouse-server]# clickhouse-server --version
ClickHouse server version 24.3.2.23 (official build).

The issue itself that many filters using toDate instead of Cast, which leads to strange results.( see examples below)
Generally speaking - toDate('some_date') = some_dateT00:00 .
I used same dataset for this.
Here are all examples for all filters:

Filter and Widget Type
Time Period
Actual Result
Expected Result
Comment

(x)
Field Filter: Month and Year
March 2024
Well, this query won't show any data beside with midnight timestamp for last day of the month [^1]
But if we use Cast it will show us all data we need [^2]

(x)
Field Filter: Quarter and Year
Q1 2024
Same result as previous example - no data for last day of the quarter [^3]
And the same solution - using Case will solve this issue [^2]
It is pointless to make a new separate screenshot for this as queries are identical

(/)
Field Filter: Single Date
8 April
Here we can see that, if we use Case there is no issue with showing all timestamps for one day [^4]
We got what we expected
No additional comments here

(x)
Field Filter: Date Range
8 April - 10 April
Well, this is default Date Range values here - it's using toDate without Cast so we're missing some data for 10/04/2024 [^5]
Same range with Case will get us missed timestamps [^6]
I actually don't get it why we have different result for this one :<

(/)
Filed Filter: Date Range with time
8 April  00:00 - 10 April 18:45
Because in this clause absolute values used without any functions we are getting pretty much what we've expected [^7]
<---
It could be considered as an issue, but i actually don't know if it should be - any timestamps after 18:45 won't be shown, for example 18:45:00.001. This is expected because we used absolute values with BETWEEN clause.

(x)
Field Filter: Relative Date
Today
No Cast in clause - no expected result. Nothing, besides midnight is shown [^8]
We're expecting same result as in Single Date widget [^4]
No additional comments here

(x)
Field Filter: Relative Date
Yesterday
Same result as in previous example [^9]
Using Cast will fix this [^4]
No additional comments here

(x)
Field Filter: Relative Date
Past 7 days
Same result as earlier with combination of BETWEEN and toDate without Cast [^10]
As always Cast makes anything better [^11]
I don't understand - same tests, same versions - different results ¯_(ツ)_/¯

(x)
Field Filter: Date Filter
Today
Same result as for Relative Date widget [^12]
Using Cast will fix this [^4]
No additional comments here

(x)
Field Filter: Date Filter
Last Week
Again usage toDate without Cast [^13]
We need Cast to fix this [^6]
No additional comments here

(x)
Field Filter: Date Filter
This Week
Same result as Last Week widget [^14]
We need Cast to fix this [^6]
No additional comments here

(x)
Field Filter: Date Filter
Previous 7 Days
Same result as earlier [^15]
We need Cast to fix this [^6]
No additional comments here

It's very strange that we have different results, despite using identical versions of MD, Driver and CH.
Also, i'm a little bit lost in this - as far as i understood how widget creating clauses was full on driver side. Am i wrong about that?
I'll try full clean install later to be sure that i missed nothing while updating to newer versions.
And again apologies for my poor English - it's not my native language. I hope you could understand what i was writing about)
Screenshots:
[^1]:
[^2]:
[^3]:
[^4]:
[^5]:
[^6]:
[^7]:
[^8]:
[^9]:
[^10]:
[^11]:
[^12]:
[^13]:
[^14]:
[^15]:

Thanks for the detailed answer :)

how widget creating clauses was full on driver side. Am i wrong about that?

This is correct. This is mainly handled by Metabase itself via the common code; the only tweak for CH is this.
Considering CAST calls, we had this issue: https://github.com/ClickHouse/metabase-clickhouse-driver/issues/196, which is why these were removed and that bit in the QP sources was introduced.
Regarding the statements: If you run the queries in clickhouse-client (from CLI), are the results the same as those shown in Metabase?
I suspect that this could be due to the disabled TZ switch (Related: #200, see the discussion); however, this shouldn't be the case since everything is in the same TZ on your configuration.
Lastly, could you contact me in the community Slack? I think it might be easier/faster to debug that way.

So i was wondering if it's possible to "map"  Cast(date_time as date) to  toDate function, so it will appear only if toDate is used in these filters.
Yeah i saw that some issues had been mentioned as fixed in the changelog for 1.3.0 version.
The #196 issue is relatable to this issue. But issue there had been caused by Cast used when it shouldn't be - with absolute values we don't need to use any functions (at least i believe so =D ).
If i run queries in CLI i have the same result.
Also, i perform a clean install of MB, MB driver and CH - latest versions for all mentioned, and still got same results
I don't think that this could be related to TZ issue, even if TZ would differ in my config - i believe TZ issue would show results which differ from expected for + or - 3 hours. ( If only +/-3 UTC is the only difference between configured timezones )
Unfortunately, Slack is restricted in my country and i can't join this community. Is it possible to communicate via different method/messenger? Telegram, perhaps?

Unfortunately, Slack is restricted in my country and i can't join this community. Is it possible to communicate via different method/messenger? Telegram, perhaps?

Feel free to contact me there. Same username.

This should be resolved as of 1.5.1+.
Please feel free to re-open or create a new one if the issue occurs again.

authors: anaklime ecyshor slvrtrn

repo: ClickHouse/metabase-clickhouse-driver


text:
⚠ Jerry Savelle Ministries International Australia has degraded performance

In 40ac445, Jerry Savelle Ministries International Australia (https://jsmiaustralia.org) experienced degraded performance:

HTTP code: 200
Response time: 9623 ms

Resolved: Jerry Savelle Ministries International Australia performance has improved in f0185bf after 12 minutes.

repo: Clicki-Digital/uptime


text:
🛑 Lounge Repair Guys is down

In ebdd343, Lounge Repair Guys (https://loungerepairguys.com.au) was down:

HTTP code: 500
Response time: 1043 ms

Resolved: Lounge Repair Guys is back up in 884d7b5 after 5 minutes.


text:
🛑 K-Thorne is down

In de17a66, K-Thorne (https://k-thorne.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: K-Thorne is back up in b665f65.


text:
Fix install issue on Creality K1 Series

This PR fix install issue with SSL verification on Creality K1 Series.
Fixes https://github.com/Clon1998/mobileraker_companion/issues/91

LGTM


text:
Collaborate on the std::vector wrapper?

Hello,
I started wrapping the std::vector in Nim with doc strings and tests in https://github.com/kaushalmodi/std_vector.
Would you like to merge the two libraries into yours? If so, I can send a PR that merges my comments and tests into your repo?
Ref: https://github.com/kaushalmodi/std_vector/issues/3

Hi @kaushalmodi,
This repository got transferred to me recently since I'll be in need to std::string.
Any PR that improves are welcome as I also think developing twice the same thing is not necessary.

@Clonkk Hello! Can you please review the PR's I opened in the process of closing this issue?
Thanks!

Sure !
I'll do this on Monday when I get back from my vacation 😁

authors: Clonkk kaushalmodi

repo: Clonkk/nim-cppstl


text:
is it possible to only use deterministic order where parent_id is not null?

Hello!
I'm looking at using closure_tree on a table with 4 million rows, I want to use a deterministic integer order but only where the record has a parent. Is that possible?
Right now it seems to be trying to put a sequence over all the records in the table, which is taking too long.

I've just tried
      def reorder_with_parent_id(parent_id, minimum_sort_order_value = nil)
        return if parent_id.nil?

Which seems to avoid the issue. Should I try to make this a config option?

@robguthrie So does this mean your roots have nil rank? Or do you set them to default to 0 or 1 or something?
Did you make any progress adding this as a config option?

authors: robguthrie smoyth


text:
🛑 Lemmy is down

In 1da0db6, Lemmy (https://lemmy.cloudhub.social) was down:

HTTP code: 500
Response time: 1104 ms

Resolved: Lemmy is back up in 0978763 after 43 minutes.

repo: CloudHub-Social/Status


text:
improve ssl security

improvements to SSL
not ready for merge - waiting for changes in operator and CWM

@OriHoch : Is there an issue listing all the requirements for this PR?

@iamazeem there isn't an issue but when testing on the cluster we have issues with low grade of the SSL security (e.g. when testing on https://www.ssllabs.com/ssltest/), this PR attempts to improve it

authors: OriHoch iamazeem


text:
Medium Class | Add docstring

Add docstring to the class and each of its methods(except the private ones)

A perfect docstring looks like

Reference
https://github.com/Clueless-Community/scrape-up/blob/c7ac4c8a842b9e2fb43f25257cd3902a0a8625f8/src/scrape_up/medium/publication.py#L14

I'd like to look into this.

Go ahead @tarunsamanta2k20

@nikhil25803 can i take up this issue as there is no response

@nikhil25803 ??

Wait for a few more times @Abhinavcode13 | Let @tarunsamanta2k20 take his time. If there's no response within the next 2 days, I'll re-assign it to you.

Hey if it is not done I can do this!

Sure @karthikbhandary2 | Go ahead

repo: Clueless-Community/scrape-up


text:
从网上提取的刷课浏览器js插件 远程加载js 做到视频挂机（不出问题） 以及题库查询

https://github.com/fuergaosi233/chaoxingshuake
远程加载代码的js 在background.js文件中
代码混淆了  希望会有帮助

好的,感谢分享,我有时间去看看

@fuergaosi233
看了一下,和我之前想过的一个方法差不多,修改了播放器,很厉害....
我没试过,觉得有些做不到,那天尝试一下不(不行偷他代码?逃)

已经自己尝试反编译flash成功,后面差不多也可以做成他的效果了

repo: CodFrm/cxmooc-tools


text:
[Feature]超星平台视频中间的题目

视频中间的题目都自动跳过了，是没答，还是答了直接跳过了？类似图里这样的。

屏蔽处理了

authors: CodFrm OOOOOKE


text:
トップページだけ上部のグラデーションが濃い

トップページ

/projects

理由が不明だが，トップのナビゲーションバーの分だけずれている模様．
最初の読み込みで，ナビゲーションバーがない状態でHTMLをレンダリングしているようにみえる．


text:
TypeError: Cannot read property 'profile_pic_url_hd' of undefined

I got this error .
TypeError: Cannot read property 'profile_pic_url_hd' of undefined
at got.then.res (C:\Users\ahmet\node_modules\instagram-profile-picture\index.js:31:24)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

Hi,
Instagram has done some changes and that's causing this problem. I'll fix it as soon as possible. Thanks for reporting the issue.
I'm keeping it open so that I don't forget to fix it.

Hi, The issue is fixed now!
Just update the package using $ npm install --save instagram-profile-picture and everything will work as it's mentioned in the readme!

repo: CodeDotJS/instagram-profile-picture

license: mit

license_source: bigquery


text:
Search bar scrolls with the list closes #1818

Description
The search bar in the SettingsView is now on a different List that has no contents, the only purpose is to contain the search bar. Now it functions like the macOS System Settings search bar
Related Issues
Search bar scrolls with the list closes #1818
Checklist

[x] I read and understood the contributing guide as well as the code of conduct
[x] The issues this PR addresses are related to each other
[x] My changes generate no new warnings
[x] My code builds and runs on my machine
[x] My changes are all related to the related issue above
[ ] I documented my code

Screenshots
https://github.com/user-attachments/assets/ae243097-9713-4cf3-9fc5-dc83b9501556

Could we add a divider line that fades in as you scroll as shown? If not we can do this in a follow up PR.
https://github.com/user-attachments/assets/fe3407a5-c4fa-4ed2-a492-a962ea577721

Couldn't hack it with the line, will do in a follow up.

Sounds good

@allcontributors please add @scaredcr6w for code

authors: austincondiff scaredcr6w thecoolwinter

repo: CodeEditApp/CodeEdit


text:
🛑 sensors.AFRICA - API is down

In 8b514b3, sensors.AFRICA - API (https://api.sensors.africa/docs) was down:

HTTP code: 0
Response time: 0 ms

Resolved: sensors.AFRICA - API is back up in ece390c after 1 hour, 24 minutes.

repo: CodeForAfrica/upptime


text:
Main Page Content

 The Y-Axis: Kilowatts (kW)
Kilowatts is the measured amount of electrical power.
 The X-Axis: Time
Fort Collins recorded its first solar PV installation in 2006, since then we have displayed the cumulative amount of solar installations over time.
 Fort Collins Climate Goal Line
This line pinpoints the climate action plan goals for 2020 and 2030. Are we on track? Are we moving fast enough? (See our methodology page)
 The dotted lines (Projections)
Using numerical methods and algorithms we have created a liner projection of the current course of solar installations. This helps us look at if we maintained our historical and current trend of solar installations, how much solar will we have in the future.
There of course will be unknown changes the may increase and decrease the amount of solar uptake such as tariffs, tax credits, technology, prices, etc. How can we as a community make sure that the curve becomes exponential?
 Boulder?
What is Fort Collins without some friendly competition with a familiar rival? How much solar do we have compared to our neighbor? Who can be the first to 100% renewable?
 Do you want to see more? Do you want to help?
Please contact us today for ideas, comments, and questions. This site is being built by volunteers at Code for FoCo with support from Sandbox Solar and the City of Fort Collins. Join us today to help reach 100% renewable.

Use our Scorecard to rate the current progress and give input on how to make a sustainable future.
https://docs.google.com/forms/d/e/1FAIpQLSfE6SuujFfr9nGeL_B2SPPd4R8_jSQp_GzhYXRFjGfZJ5jQIg/viewform

repo: CodeForFoco/solar-scorecard


text:
Best Library EVER !!!

Thank you very much

Thank you very much!
This is the best issue I've seen 😆

repo: Codelessly/ResponsiveFramework


text:
支持富文本

杰哥我再实现富文本的时候发现一个问题。
@implementation MJRefreshComponent 的262行
stringWidth =[self.text                       boundingRectWithSize:size                       options:NSStringDrawingUsesLineFragmentOrigin                       attributes:@{NSFontAttributeName:self.font}                       context:nil].size.width;
如果我给lable赋值的是富文本，到这里就cresh了，因为这个计算lable尺寸的函数式NSStreing的。不支持富文本文字。
我个人觉得改成
stringWidth = [self sizeThatFits:CGSizeMake(MAXFLOAT, MAXFLOAT)]
会更好点

来个 Demo?

正常你应该自己根据 Label 的 numberOfLines 的值, 来计算 Label 的宽高. 不要简单的使用 mj_textWidth 来算宽度.
你可能会用到这个方法
func textRect(forBounds bounds: CGRect, limitedToNumberOfLines numberOfLines: Int) -> CGRect

authors: PggMan wolfcon

repo: CoderMJLee/MJRefresh


text:
undefined method `name' for nil:NilClass

kata: https://www.codewars.com/kata/561e9c843a2ef5a40c0000a4/translation/new
Unable to re-publish the Scala translation because it always times out, I deleted it and wanted to redo it. All I get is:
Looks like there was a server error! (500)
We have taken note of the situation and will be looking into it.

If you would like to supply us with some details as to how this happened please visit our Github issues list. This will help us get things fixed faster.

undefined method `name' for nil:NilClass

It seems that it is impossible to re-publish Scala translations maybe because CW Scala is very very slow.
Similar : #851 #1090

Unable to re-publish the Scala translation because it always times out, I deleted it and wanted to redo it.

This is a duplicate of #1268, so I'm closing this one.


text:
Approving a kata translation should move kata back to top of the list

Instead of sorting by created by, it should sort by a new field that is updated whenever a new translation is approved.

Closing this because I believe this feature has been added (#859).

authors: jhoffner kazk


text:
Command Parameter in Xamarin.Android

Is it possible to pass a parameter to a command in "Xamarin. Andoid" with the binding service of Codon fx ? If existing, what is the attribute to be used in the binding expression ?

Not at the moment. I'll include that for an upcoming release.

authors: DVaughan kappesLab

repo: CodonFramework/Codon


text:
Contributing cl-gles-user-module to AGL

Hi,
I really like the cl-gles-user-module recipe! I don't see an explicit license to it, but would you be okay with me contributing it to the Automotive Grade Linux project? I think it will need some build adaptations, but I've already done most of the work to make that happen.
Thanks,
Martin

Thanks. To be clear, I was asking only about the bitbake packaging rather than cl-gles-user-module itself, which I know is proprietary. I see you added an MIT license to the recipes here, so I will use them, with attribution. Thanks!

repo: CogentEmbedded/meta-opencl


text:
4x: Starting to flesh out SSVM integration

Services offered

CommonVirtualService - Housing the shared VM instance
VirtualInvoker - Invoking method in the shared VM instance and reporting back what the return values were
VirtualOptimizer - Invoking methods with optimzer passes and reporting back an optimized version of methods where possible

Codecov Report
Attention: 241 lines in your changes are missing coverage. Please review.

Comparison is base (6a72a30) 66.75% compared to head (34f3d69) 66.08%.

Files
Patch %
Lines

.../coley/recaf/services/vm/CommonVirtualService.java
41.55%
76 Missing and 14 partials :warning:

...ley/recaf/util/io/BufferDelegatingPrintStream.java
17.00%
82 Missing and 1 partial :warning:

...tware/coley/recaf/services/vm/ArgumentBuilder.java
41.17%
56 Missing and 4 partials :warning:

.../java/software/coley/recaf/services/vm/VmTest.java
87.23%
6 Missing :warning:

...ftware/coley/recaf/services/vm/VirtualInvoker.java
90.00%
2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##               dev4     #721      +/-   ##
============================================
- Coverage     66.75%   66.08%   -0.67%
- Complexity     2240     2284      +44
============================================
  Files           305      311       +6
  Lines         13002    13453     +451
  Branches       1481     1517      +36
============================================
+ Hits           8679     8891     +212
- Misses         3644     3863     +219
- Partials        679      699      +20

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: Col-E codecov-commenter

repo: Col-E/Recaf


text:
希望能集成Mathjax功能

有许多需要写数学公式的场景
在md头加

好像并没有用。

我记得是有配置过的，针对了一位朋友添加的功能
请在config.yml把mathjax配置为true
如还有问题请告知

只需要改config不需要加script，如果觉得想自定义，要改的是
layout/_script/script.swig

啊抱歉抱歉，我发现还在用第一版，第一版没有mathjax。我现在试试新版，谢谢。

在config.yml中开启了Mathjax，提示cdn已经失效，公式解析不了。
然后去layout/_script/script.swig中
将

改成

（官网教的）
依然无法解析公式。
求解
另外希望可以不用每页都加载mathjax，只有在开启了mathjax的页才加载script

试试config=TeX-AMS-MML_HTMLorMML？

改了依然无法正确显示，是只有我有这个问题吗？我现在的_script.swig如下
`
{{ js('script/lib/jquery/jquery-3.2.1.min') }}
{% if theme.lightbox %}
{{ js('script/lib/lightbox/js/lightbox.min') }}
{% endif %}
{% if theme.mathjax %}

<script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

{% endif %}
{% if theme.plugins %}
{% for plugin in theme.plugins %}
{{js(plugin)}}
{% endfor %}
{% endif %}
{{ js('script/src/nlvi') }}
{{ js('script/src/utils') }}
{{ js('script/scheme/balance') }}
{{ js('script/src/plugins') }}
{{ js('script/bootstarp') }}
`

我不知道是您的网络问题还是怎么回事。我刚刚用我自己的菜鸡能力随便写了一个公式是能显示的如图：

不过您提到的按文章选择加载，我觉得值得实现，静候佳音？

没时间改了。。。按文章加载，给文章加个property就行了。。。类似文章的type这样的，然后在post的模型里面加这句话。。。
另外，我也觉得是网络的问题。。。

按你的改了还是不行，但也没有报错，你能正确显示的话应该是我问题。

不知道你解決了沒有。。。不過感覺你的 hexo-math 可能沒有成功安裝。。。

没，我最后换了一个主题。。。不过应该是我配置问题。。。

用别的主题应该也会涉及安装 hexo-math 的问题。。。只要这个能正常安好。应该都是没问题的。。。

@ShadowQuark 用别的主题没有问题。

@testsiling 不好意思打扰了，原谅我拖了好几个月，希望您能理解。我这次重新调整了mathjax，希望您能再尝试一次，假如您还有兴趣的话。以下两点关于您需求的解答：

您可以关闭config.yml的全局mathjax，在您想要使用该功能的文章头部加上mathjax:true也可以开启功能：

---
title:
date:
tags:
mathjax: true
---

我专门去了解了一下mathjax然后尝试一下并更新了版本，找个了很复杂的公式发现能显示。我不知道您在写公式的时候是否是$$...$$的形式，比如

$$
\alpha
$$

我尝试了这样是没有问题的，还有\begin{aligned}, \end{aligned}这种

FYI, MathJax.Hub.Config 参数里面的inlineMath可以改标记，如果你自己不习惯$$可以试试其它的

authors: ColMugX ShadowQuark colmugx ruinshe testsiling

repo: ColMugX/hexo-theme-Nlvi


text:
Appointment slots creation issue

Describe the task
Right now the appointment slots don't get created properly. They only get created automatically when there is no slot available. Users have reported that they can't see any slot as well.
Expected behavior

[x] Users should see appointment slots at all times
[x] New slots should be created automatically when the free slots are less than 15

This is complete. Closing.

repo: ColoredCow/portal


text:
Fix search button alignment on working staff page

Describe the bug
In mobile, the working staff page the search button is moving out of the page which needs to be fixed.
To Reproduce
Steps to reproduce the behavior:

Go to 'HR'
Click on 'Working Staff'

Screenshot

Expected behavior
The search button should be shown properly in screen sizes :

[x] #3058
[ ] 425px
[ ] 520px

Additional context

[ ] Read how variable.scss file works.
[ ] You may need to read about bootstrap for classes that are used to change sizes of elements and text.

This is not needed now as design team will work on the portal designs


text:
Typo in definition of cco:has_process_part

The definition of cco:has_process_part is:

For processes P1 and P2, P1 has process part P2 if and only if P2 occurs on a temporal interval that is during the temporal interval of P1 and P2 either provides an input to P1, recieves an output of p1 or both.

The last "p1" should be "P1".

Will fix

Typo fixed.

authors: APCox rorudn swartik

repo: CommonCoreOntology/CommonCoreOntologies


text:
Fix npm metadata expiration not working with new pathCalculator way

We should also use this new calculator in ScheduleManager to decide real metadata to expire.
BTW, this commit also includes a fix for the sibling http-metadata generation problem for npm package.json, but it depends on a galley fix here: https://github.com/Commonjava/galley/pull/285
But it still fails because of the group metadata generation problem now. Will continue on investigation.

@jdcasey The 3 commits I submitted today have fixed all ftests failures(Run them on my local env and passed). They need the galley fix https://github.com/Commonjava/galley/pull/285

Merged commits into one to make it simple.

Seems the fix break a httprox ftest. I'll continue on checking what happened.

Mark as not merge temporarily. We want to include this feature in 1.9.0, so will not merge this in 1.8.x for now. Will merge If agree to include this in 1.8.x.

Closed as we will not publish this on 1.8.x

repo: Commonjava/indy


text:
Fix addon make script

Make it work in python3
Fix version missing for pom parent

This is just a util script fix but not related to indy function itself, so I'll merge directly after ci success.


text:
Move SEIR code out of the repo (temporarily)

At the moment, the SEIR functionality is not tested so means we have a low coverage of tests. I'd propose, we remove this code for now whilst we develop it on a branch which'll then be merged in via the PR mechanism.

This is out of date and tests have been added.

repo: Como-DTC-Collaboration/como-models


text:
Detection of unnecessary then-clauses in message specifications

Unnecessary then-clauses should be considered as errors.
A : A
   then A;
B : B
   then C;
C : C

Realizing that feature could make the generation of message specifications harder, which is used for property-based testing.

Did you mean to write then A or is that supposed to be then B?

I fixed the mistake.

authors: senier treiher

repo: Componolit/RecordFlux


text:
Investigation: Make it easier to export to local file system

Description
If possible, it would be nice to be able to always choose to save exports to the local file system. Some users experience not being able to save locally, and only can export via e.g. chat and e-mail apps.
There are however some users who have no problem exporting using their file browsers, so the problem might be with the individual phones.
Versions

Software Version: ??
OS: Android

@jensvesti: Could you briefly describe your findings?

authors: concordium-cl jens-concordium


text:
Code clean up

Made this branch for general code tidying

LGTM 👍 thanks!

repo: ConorLeckey/Tileman-Mode


text:
Added manual color selection

Feature includes:
Manual color selection to the portfolio.ini file (added instructions in the readme). This is either from the approved list, or using Hex code (which gives the used complete freedom with the color, as you mentioned).
Color selection when actually drawing the graph (one of the three cases for no manual color, worded manual color, and hex manual color).
Input test in the Portfolio.populate function, where I check that the color entered is valid.

Made a few minor changes - including the redundant list of color names (webcolors already has that list! Why hard-code it into our program?) as well as fixing a bug preventing native color names (ex. "lime") from working. This bug was due to the fact that the color was being converted to hex but NOT rgb (the format plottile is actually looking for).
Also ran black *.py. @yonMaor you can find details on the formatter we're using here if you are interested in running that for yourself.
Overall incredible work! Thanks for doing 99% of the job here. Let me know when you are ready for your next ticket!

Reference for github: #3

Ah! I should've known that the list would be available elsewhere.

authors: ConradSelig yonMaor

repo: ConradSelig/cliStocksTracker


text:
Known [MEDIUM] vulnerability in spring-boot 1.5.9 and earlier

Could you update spring-boot from 1.5.6 to the latest 1.5.x version (1.5.17.RELEASE), because there is a known vulnerability in version 1.5.9 and earlier:
Published Vulnerabilities
CVE-2018-1196
Severity:Medium
CVSS Score: 4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
CWE: CWE-59 Improper Link Resolution Before File Access ('Link Following')
Spring Boot supports an embedded launch script that can be used to easily run the application as a systemd or init.d linux service. The script included with Spring Boot 1.5.9 and earlier and 2.0.0.M1 through 2.0.0.M7 is susceptible to a symlink attack which allows the "run_user" to overwrite and take ownership of any file on the same system. In order to instigate the attack, the application must be installed as a service and the "run_user" requires shell access to the server. Spring Boot application that are not installed as a service, or are not using the embedded launch script are not susceptible.
CONFIRM - https://pivotal.io/security/cve-2018-1196

Vulnerable Software & Versions: (show all)
cpe:/a:pivotal_software:spring_boot:1.5.9 and all previous versions
...

This vulnerability was found with OWASP dependency checker:https://www.owasp.org/index.php/OWASP_Dependency_Check
I tested IPFS-store version 0.1.14

Thanks. I upgraded to 1.5.17.RELEASE as recommended, it's in the development branch, I still need to perform some test before releasing it!
In the future (ipfs-store 0.2), I will move to spring-boot 2.

Release 0.1.16 Upgraded Spring-boot to 1.5.17.RELEASE
Planning to move to Spring-boot 2.1.x soon

authors: gjeanmart ivohuisjes

repo: ConsenSys/IPFS-Store


text:
force disarm

With this contract have trouble. Command  scribble --arm -m files Test.sol working, but command scribble --disarm -m files Test.sol doesn't.
pragma solidity ^0.6.0;

contract Test {

    /// if_succeeds {:msg "wrong byte"} checkBytes(_bytes) == result;
    function process(bytes calldata _bytes) external returns (bool result) {
        return this.checkBytes(_bytes);
    }

    function checkBytes(bytes calldata _bytes) pure external returns (bool result) {
        return _bytes.length > 0;
    }
}

log:
$ scribble --arm -m files Test.sol
Test.sol -> Test.sol.instrumented
Copying Test.sol to Test.sol.original
Copying Test.sol.instrumented to Test.sol

$ scribble --disarm -m files Test.sol
Compile errors encountered for Test.sol:
SolcJS 0.6.12:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.11:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.10:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.9:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.8:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.7:
Test.sol:8:15: DeclarationError: Undeclared identifier. "checkBytes" is not (or not yet) visible at this point.
        if (!(checkBytes(_bytes) == result)) {
              ^--------^

SolcJS 0.6.6:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.5:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.4:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.3:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.2:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.1:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

SolcJS 0.6.0:
Test.sol:14:37: TypeError: Data location must be "storage" or "memory" for parameter in function, but "calldata" was given.
    function _original_Test_process(bytes calldata _bytes) private returns (bool result) {
                                    ^-------------------^

If I change
    /// if_succeeds {:msg "wrong byte"} this.checkBytes(_bytes) == result;
to
    /// if_succeeds {:msg "wrong byte"} this.checkBytes(_bytes) == result;
disarm starting working, but for fix this I must manualy restore contract

Thank you for reporting this! Will investigate and root cause

repo: ConsenSys/scribble


text:
CLI to allow conversion between database versions

Implemented migrate-data subcommand to create a new database version.
The --network context is needed. It's probably easiest to specify --config-file as part of the CLI like normal, then execute the migrate-data subcommand, so the path, eth1 contract etc can be read from the config file while the new database is being created.

cannot create a database instance of the same type currently.

prints status updates every 100k records, and also a count of rows moved for each column.

no data validation is performed, byte data is literally copied. This makes the move fairly fast.

if an existing beacon.old is found, the program will abort. Beacon.old is theoretically a real database that was working, so removing it might be dangerous.

if there's an existing beacon.new, it's cleaned up at the start of the process - this was likely an incomplete conversion.

if the subcommand completes successfully, the 'beacon' folder will be the new database type. 'beacon.old' will be the original database, and will need to be manually cleaned up by the user.  It shouldn't be cleaned up until the new database is verified to be ok.

the 'beacon' folder is impacted by this subcommand, but other folders (eg. validator are not touched).

fixes #3882
Signed-off-by: Paul Harris paul.harris@consensys.net
Documentation

[X] I thought about documentation and added the documentation label to this PR if updates are required.

Changelog

[X] I thought about adding a changelog entry, and added one if I deemed necessary.

for documentation:

shutdown teku
run the migrate-database subcommand with your other normal parameters. if you're using a config-file, just specify that.
answer 'yes' if you want to proceed
after migrating, start teku and make sure it's happy
if it's happy, cleanup the beacon.old folder.

build/install/teku/bin/teku --config-file ~/Library/teku/mainnet.yaml migrate-database
Current database path: ~/Library/teku/mainnet/beacon/db
Current Database Version: 5
Requested database version: LEVELDB2
A beacon.new folder will be created with the new database
If the data is moved successfully:
 - The existing beacon folder will become beacon.old
 - The beacon.new folder will become beacon (the active database)
 - Once the new database is tested successfully, you can remove the old database
This operation will need to happen while teku is not running.

Proceed with database migration (yes/no)?
yes
Opening original database...
Creating a new database...
Migrating data to the new database
copy variable MIN_GENESIS_TIME_BLOCK
copy variable LATEST_FINALIZED_STATE
copy variable BEST_JUSTIFIED_CHECKPOINT
copy variable GENESIS_TIME
copy variable WEAK_SUBJECTIVITY_CHECKPOINT
copy variable ANCHOR_CHECKPOINT
copy variable FINALIZED_CHECKPOINT
copy variable PROTO_ARRAY_SNAPSHOT
copy variable JUSTIFIED_CHECKPOINT
copy column STATE_ROOT_TO_SLOT_AND_BLOCK_ROOT
 => Inserted 40 entries...
copy column HOT_BLOCK_CHECKPOINT_EPOCHS_BY_ROOT
 => Inserted 71 entries...
copy column CHECKPOINT_STATES
copy column DEPOSITS_FROM_BLOCK_EVENTS
copy column HOT_BLOCKS_BY_ROOT
 => Inserted 71 entries...
copy column VOTES
 => Inserted 169,978 entries...
copy column HOT_STATES_BY_ROOT
 => Inserted 1 entries...
Copy column SLOTS_BY_FINALIZED_ROOT
 => Inserted 80,041 entries...
Copy column FINALIZED_STATES_BY_SLOT
 => Inserted 1 entries...
Copy column SLOTS_BY_FINALIZED_STATE_ROOT
 => Inserted 161 entries...
Copy column NON_CANONICAL_BLOCKS_BY_ROOT
Copy column NON_CANONICAL_BLOCK_ROOTS_BY_SLOT
Copy column FINALIZED_BLOCKS_BY_SLOT
 => Inserted 80,041 entries...
Swapping new database to be active
SUCCESS.
The original database is stored in: ~/Library/teku/mainnet/beacon.old
This can be removed once the new database has been verified.

repo: ConsenSys/teku


text:
Opcode Pattern Matching in evm.dfy

Description of the Issue
When opening the evm.dfy file, the following internal error occurs, preventing the file from functioning properly:
Dafny encountered an internal error. Please report it at <https://github.com/dafny-lang/dafny/issues>.
System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.Dafny.Substituter.<>c__DisplayClass7_1.<Substitute>g__SubstituteForPattern|0(ExtendedPattern pattern)
   at Microsoft.Dafny.Substituter.Substitute(Expression expr)
   at Microsoft.Dafny.Translator.GetFunctionAxiom(Function f, Expression body, List`1 lits)
   at Microsoft.Dafny.Translator.AddFunctionAxiom(Function boogieFunction, Function f, Expression body)
   at Microsoft.Dafny.Translator.AddClassMember_Function(Function f)
   at Microsoft.Dafny.Translator.AddFunction_Top(Function f, Boolean includeAllMethods)
   at Microsoft.Dafny.Translator.AddClassMembers(TopLevelDeclWithMembers c, Boolean includeAllMethods, Boolean includeInformationAboutType)
   at Microsoft.Dafny.Translator.AddTypeDecl(RevealableTypeDecl d)
   at Microsoft.Dafny.Translator.DoTranslation(Program p, ModuleDefinition forModule)
   at Microsoft.Dafny.Translator.Translate(Program p, ErrorReporter reporter, TranslatorFlags flags)+MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Microsoft.Dafny.LanguageServer.Language.DafnyProgramVerifier.GetVerificationTasksAsync(DocumentAfterResolution document, CancellationToken cancellationToken)
   at Microsoft.Dafny.LanguageServer.Workspace.Compilation.PrepareVerificationTasksAsync(DocumentAfterResolution loaded, CancellationToken cancellationToken)
   at Microsoft.Dafny.LanguageServer.Workspace.Compilation.TranslateAsync()

Attempted Solution
Modifying the code in ExecuteBytecode and DeductGas to use if-else statements instead of pattern matching resolved the issue.
Original Code
function ExecuteBytecode(op: u8, st: ExecutingState): State {
   match op
      case STOP => Bytecode.Stop(st)
      case ADD => Bytecode.Add(st)
      ...
      case SELFDESTRUCT => Bytecode.SelfDestruct(st)
      case _ => ERROR(INVALID_OPCODE)
}

Modified Code
function ExecuteBytecode(op: u8, st: ExecutingState): State {
   if op == STOP then Bytecode.Stop(st)
   else if op == ADD then Bytecode.Add(st)
   ...
   else if op == SELFDESTRUCT then Bytecode.SelfDestruct(st)
   else ERROR(INVALID_OPCODE)
}

Execution Environment

Dafny: 4.4.0
Z3: 4.12.4
MacOS Monterey: 12.3
VSCode: 1.85.1
VSCode Dafny Extension: 3.2.2
dotnet: 6.0.125

While the issue was resolved by switching from pattern matching to if-else statements, the underlying cause remains unclear. Therefore, I am reporting this for further investigation.

Hi @gaxiiiiiiiiiiii ,
So, this is a Dafny bug of some kind and we often see this with new releases of Dafny.  There was a very similar issue with Dafny 4.3.0 which appears to have been fixed.  In actual fact, I cannot recreate this on my (Linux) machine.  I will try on the MacBook and see whether it shows up there.
It seems that, since you are running Z3 4.12.4 you have supplied some additional command-line arguments to Dafny.  Are there any other command-line arguments you are using?

There is one related open issue on the Dafny repo it seems.

So, I'm not recreating this on my M1 macbook either.  My setup is pretty much identical to what you have, so the only real difference is the version of Z3 (4.12.1 which is the default).  Can we rule that out first as the reason?  The error doesn't suggest to me that it would be Z3, but we need to rule it out first.
Also, if there are any other changes you've made to the code base etc, then let me know.

Thank you for your response. Upon further review, I realized that my execution environment was using z3-12.4.1.
This is because, although the Dafny installed via homebrew depends on z3-12.4.4, it seems that the VScode extension is using a separately built z3-12.4.1.
In my environment, the bug was reproduced with the code that has not been modified at all. If you can think of anything else I should check or try, please let me know.

Hey @gaxiiiiiiiiiiii , ok well that's helpful to know.  Hmmmm, yeah its an interesting one.  Can you let me know the git hash for the evm-dafny you see this problem on?  I'll have a look and see whether there are any other differences on my macbook.

Ok, so I went back and looked for the issue we previously had that was like this.  To be honest, this looks extremely similar to the issue you are reporting.  The stack trace reported in that issue:
Unhandled exception. System.AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'source'))
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector)
   at Microsoft.Dafny.Substituter.<>c__DisplayClass7_1.<Substitute>g__SubstituteForPattern|0(ExtendedPattern pattern)
   at Microsoft.Dafny.Substituter.Substitute(Expression expr)
   at Microsoft.Dafny.Translator.GetFunctionAxiom(Function f, Expression body, List`1 lits)
   at Microsoft.Dafny.Translator.AddFunctionAxiom(Function boogieFunction, Function f, Expression body)
   at Microsoft.Dafny.Translator.AddClassMember_Function(Function f)
   at Microsoft.Dafny.Translator.AddFunction_Top(Function f, Boolean includeAllMethods)
   at Microsoft.Dafny.Translator.AddClassMembers(TopLevelDeclWithMembers c, Boolean includeAllMethods, Boolean includeInformationAboutType)
   at Microsoft.Dafny.Translator.AddTypeDecl(RevealableTypeDecl d)

Upon checking the VSCode extension settings, I realized I was using Dafny version 4.1.0. Sorry for the incorrect info initially. After updating to 4.4.0, the issue is resolved. Thanks for the help and patience. I'm closing this thread now.

All good ... glad we got it resolved!

authors: DavePearce gaxiiiiiiiiiiii

repo: Consensys/evm-dafny


text:
Unproven Integer Type Checking

The goal here is to develop a type check for "unproven" types (e.g. i8 versus i8@prove, etc).  Two approaches:

(Simple) We could use integer range analysis, along with bounded unrolling to given a quick-and-dirty check.  This would unroll a given module to some number of rows, then fill in all proven columns with their ranges and then try to deduce the rest.  I don't know whether this will work well, however, for modules with CT_MAX.  The problem being that these modules have variable rows per call, and this will interfere.  We could hard-code knowledge of CT_MAX.
(Non-inductive Proof) We can improve upon the above by using a simple decision procedure for inequalities and, again, unrolling to some depth.
(Inductive Proof) Perhaps the hardest, but also the most powerful.

(see also #390)
Overview
Imagine expanding all constraints to the "balanced form" (i.e. non-negative polynomials on each side).  For example, 0 == X-Y becomes X==Y.  Then, increasing values for X and Y can only increase the lhs / rhs.
Therefore, consider each variable in turn whilst assuming the type of other variables. We can substitute the maximum value for each of the other variables into our constraint, thus producing a maximum possible value for the target variable.
Approach
As for field agnosticity, the presence of normalisations is a problem.  Again, the easiest solution here is work in the logical form.  Then, we can apply a simple decision procedure to check the bounds of the target whilst assuming those of others.

repo: Consensys/go-corset


text:
Simplify loading/freeing trusted setup

PR Description

Allow reloading different trusted setup without need to free the current one.
Simplify tests (not reload trusted setups all the time)

Fixed Issue(s)
N/A
Documentation

[X] I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

[X] I thought about adding a changelog entry, and added one if I deemed necessary.

I think passing kzg as AutoCloseable could be dangerous for production code, so my vote is for removing interface

Agree. Removed it.

repo: Consensys/teku


text:
Make share text editable

Not sure if you guys want me to use gatsby intl for the default message. Can look into making that happen if so.

Yes please!
On Fri, 3 Apr 2020, 00:22 kevinamick, notifications@github.com wrote:

Not sure if you guys want me to use gatsby intl for the default message.
Can look into making that happen if so.
You can view, comment on, or merge this pull request online at:
https://github.com/ContactTracing-app/Frontend/pull/54
Commit Summary

Make share text editable

File Changes

M src/app/ShareView/ShareView.tsx
https://github.com/ContactTracing-app/Frontend/pull/54/files#diff-dc7e3a79475cf8dba6de4e405ea7ce9b
(11)

Patch Links:

https://github.com/ContactTracing-app/Frontend/pull/54.patch
https://github.com/ContactTracing-app/Frontend/pull/54.diff

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ContactTracing-app/Frontend/pull/54, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGAKRGT3NXQZ67GUJITOUATRKUMZ7ANCNFSM4L3B6TZA
.

Yes please!
…
On Fri, 3 Apr 2020, 00:22 kevinamick, @.***> wrote: Not sure if you guys want me to use gatsby intl for the default message. Can look into making that happen if so. ------------------------------ You can view, comment on, or merge this pull request online at: #54 Commit Summary - Make share text editable File Changes - M src/app/ShareView/ShareView.tsx https://github.com/ContactTracing-app/Frontend/pull/54/files#diff-dc7e3a79475cf8dba6de4e405ea7ce9b (11) Patch Links: - https://github.com/ContactTracing-app/Frontend/pull/54.patch - https://github.com/ContactTracing-app/Frontend/pull/54.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#54>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGAKRGT3NXQZ67GUJITOUATRKUMZ7ANCNFSM4L3B6TZA .

How do we go about getting a hold of the other languages for this snippet?

Just went ahead and did it manually. Forgive my ignorance, but im wary of using the {siteTitle} tag. It doesnt seem to work locally. Will that be replaced during some build proccess? If so I'll add it back in.

Wow. This is great. Thanks!
values was broken everywhere so I did some investigation. The signature of FormatMessage was wrong. Once I corrected it, it worked!
I'd like to keep all those translation updates though. Would you mind fixing-up?

On it!

Awesome! Thanks for your hard work @kevinamick !

authors: kevinamick mmmoli pongponk

repo: ContactTracing-app/Frontend


text:
Fix zmq issues

There are a few warts in how we handle sockets.  Fixing here (WIP)

Merging soon if no comment

Some conversation here:  https://gitter.im/zeromq/pyzmq?at=555e203c4c81fa801b0eb936
Merging

repo: ContinuumIO/dask


text:
WIP: add data-source persistence

adds 'persist()' method to sources, which uses the container lookup to
find the appropriate thing to call for that source. Saves to one
particular format for each container type, only dataframe implemented so
far here.
Also includes GenericDataFrame, which can load anything given a set of
files and a function which can make an open file into a data-frame piece.

Additional suggestions for persistence, which may appear in another PR:

multiple checkpointing of some data source, such that you not only have the latest version, but can access previous ones
an "export" function that does the same as persist, but not into the persisted things location: you get files and a catalogue wherever specified. This could be done to an already-persisted source, which would mean just copying the files.

Filled out the API with what I imagine to be the final user experience, at least for the first iteration. No tests or documentation yet, beyond basic docstrings.

repo: ContinuumIO/intake


text:
DST for sgd dataset [BUG]

Trying to use DST for sgd dataset but I got the following error:

I am using (update) method in DST class similar to convlab-2..

BTW, please give a title for the issue to facilitate other users that may have similar question

You could also refer to https://github.com/ConvLab/ConvLab-3/blob/d19e48a30abca679aef42865146c2d7bccce8369/convlab/dialog_agent/agent.py#L45
to find how to initialize and push new utterances into the state of the DST class.

Thank you.. It works like this:

So, this T5DST model doesn't need the output from nlu?

Yes, it predicts state from utterances directly. however, the RL policy module need user dialog acts (nlu output)

authors: AtheerAlgherairy zqwerty


text:
🛑 The Coop Computer is down

In f8b145e, The Coop Computer (http://$COOPWEBSITE/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: The Coop Computer is back up in 9854cbd.

repo: CoopPlayzz/CoopWebsitesUptime


text:
⚠ Samsung has degraded performance

In 52631d3, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2203 ms

Resolved: Samsung performance has improved in 040f7f1.

repo: CoopPlayzz/Webstatus-electronicbrands


text:
⚠ Samsung has degraded performance

In 982c25a, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2908 ms

Resolved: Samsung performance has improved in ce79068.


text:
⚠ Samsung has degraded performance

In 2b71ffe, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2425 ms

Resolved: Samsung performance has improved in 4d3818d.


text:
⚠ Fortnite has degraded performance

In 9882756, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1595 ms

Resolved: Fortnite performance has improved in 3fd1497.

repo: CoopPlayzz/Webstatus-games


text:
⚠ Fortnite has degraded performance

In 1f19e8c, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1589 ms

Resolved: Fortnite performance has improved in d2d60ed.


text:
⚠ Fortnite has degraded performance

In bb4276c, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1632 ms

Resolved: Fortnite performance has improved in eb34597.


text:
⚠ Fortnite has degraded performance

In 366ee8f, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1495 ms

Resolved: Fortnite performance has improved in 11a77d6.


text:
⚠ ESPN has degraded performance

In 427c9a7, ESPN (https://espn.com) experienced degraded performance:

HTTP code: 200
Response time: 1313 ms

Resolved: ESPN performance has improved in 3e83d08.

repo: CoopPlayzz/Webstatus-sports


text:
compile php with php-cpp

How to compile php with php-cpp?
I don't know how else to do.

@nnnlog  php-cpp is not compiled PHP,It is a library that makes it easy for C + + developers to write PHP extensions, And I think you need to check the following file first,http://www.php-cpp.com/documentation

repo: CopernicaMarketingSoftware/PHP-CPP


text:
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28

edit: It's probably related to the pool space in the PoH, my most recent one I recognized I restored and then tp'd out.
I get this WARN in my logs literally all the time, I have powershell open so I notice it, but even then I'm not actively tracking every action I make, also I often don't notice it for a few minutes, so I'm not fully sure what is to blame.
2023-10-18 21:36:15 EDT [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28
	at com.consumablecooldowns.ConsumableCooldownsPlugin.onMenuOptionClicked(ConsumableCooldownsPlugin.java:301)
	at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
	at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
	at net.runelite.client.callback.Hooks.post(Hooks.java:194)
	at bz.ll(bz.java:22465)
	at client.bn(client.java:49860)
	at client.kt(client.java:40622)
	at client.hw(client.java:3486)
	at client.bo(client.java:1124)
	at bb.gv(bb.java:358)
	at bb.run(bb.java:335)
	at java.base/java.lang.Thread.run(Thread.java:833)

consistency example

I did run `debug` level logs one time for some other reason, and I noticed the log seems to blame slot `38` which one log mentions being the `occult altar` & others a teleport menu, which I assume is the jewellery box.

debug logs
2023-11-02 19:50:25 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 854 - Menu option clicked: drink. Slot: 38
2023-11-02 19:50:25 EDT [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28
	at com.consumablecooldowns.ConsumableCooldownsPlugin.onMenuOptionClicked(ConsumableCooldownsPlugin.java:301)
	at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
	at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
	at net.runelite.client.callback.Hooks.post(Hooks.java:194)
	at bz.ll(bz.java:22765)
	at client.xf(client.java:12436)
	at client.nb(client.java:19226)
	at client.hw(client.java:3486)
	at client.bl(client.java:1124)
	at bb.di(bb.java:358)
	at bb.fx(bb.java)
	at bb.run(bb.java:35113)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-11-02 19:50:25 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 855 - Menu option clicked: drink. Slot: 38
2023-11-02 19:50:26 EDT [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28
	at com.consumablecooldowns.ConsumableCooldownsPlugin.onMenuOptionClicked(ConsumableCooldownsPlugin.java:301)
	at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
	at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
	at net.runelite.client.callback.Hooks.post(Hooks.java:194)
	at bz.ll(bz.java:22765)
	at client.xf(client.java:12436)
	at client.nb(client.java:19226)
	at client.hw(client.java:3486)
	at client.bl(client.java:1124)
	at bb.di(bb.java:358)
	at bb.fx(bb.java)
	at bb.run(bb.java:35113)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-11-02 19:50:26 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 855 - Menu option clicked: drink. Slot: 38
2023-11-02 19:50:26 EDT [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28
	at com.consumablecooldowns.ConsumableCooldownsPlugin.onMenuOptionClicked(ConsumableCooldownsPlugin.java:301)
	at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
	at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
	at net.runelite.client.callback.Hooks.post(Hooks.java:194)
	at bz.ll(bz.java:22765)
	at client.xf(client.java:12436)
	at client.nb(client.java:19226)
	at client.hw(client.java:3486)
	at client.bl(client.java:1124)
	at bb.di(bb.java:358)
	at bb.fx(bb.java)
	at bb.run(bb.java:35113)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-11-02 19:50:26 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 855 - Menu option clicked: drink. Slot: 38
2023-11-02 19:50:26 EDT [Client] WARN  n.runelite.client.eventbus.EventBus - Uncaught exception in event subscriber
java.lang.ArrayIndexOutOfBoundsException: Index 38 out of bounds for length 28
	at com.consumablecooldowns.ConsumableCooldownsPlugin.onMenuOptionClicked(ConsumableCooldownsPlugin.java:301)
	at net.runelite.client.eventbus.EventBus$Subscriber.invoke(EventBus.java:70)
	at net.runelite.client.eventbus.EventBus.post(EventBus.java:223)
	at net.runelite.client.callback.Hooks.post(Hooks.java:194)
	at bz.ll(bz.java:22765)
	at client.xf(client.java:12436)
	at client.nb(client.java:19226)
	at client.hw(client.java:3486)
	at client.bl(client.java:1124)
	at bb.di(bb.java:358)
	at bb.fx(bb.java)
	at bb.run(bb.java:35113)
	at java.base/java.lang.Thread.run(Thread.java:833)
2023-11-02 19:50:28 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 859 - Menu option clicked: teleport menu. Slot: 38
2023-11-02 19:50:28 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 859 - Menu option skipped. Consumable: false, already in actions: false
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 860 - Menu option clicked: walk here. Slot: 550
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 860 - Menu option skipped. Consumable: false, already in actions: false
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option clicked: walk here. Slot: 448
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option skipped. Consumable: false, already in actions: false
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option clicked: edgeville. Slot: 46
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option skipped. Consumable: false, already in actions: false
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option clicked: edgeville. Slot: 46
2023-11-02 19:50:29 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 861 - Menu option skipped. Consumable: false, already in actions: false
2023-11-02 19:50:30 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 863 - Menu option clicked: edgeville. Slot: 46
2023-11-02 19:50:30 EDT [Client] DEBUG c.c.ConsumableCooldownsPlugin - 863 - Menu option skipped. Consumable: false, already in actions: false

In most cases it seems to handle everything fine, but other times it sees drink happened in slot 38 and it ⚠ 's

I can reproduce it by click the PoH pool. It makes sense that this happens because any options with drink or eat get evaluated by the plugin currently. I will add a check to prevent this unnecessary warning spam. Thanks for the report!

This was fixed in c4dbf59a698b4816c847c383d9997245a222d580

authors: CopyPastaOSRS Felanbird

repo: CopyPastaOSRS/consumable-cooldowns


text:
Can't paste values through CMD+V in Safari Mac 13.0.5

Hi there,
like stated in the subject I can't paste a hex value into the input fields with a CMD+V shortcut in Safari 13.0.5. I'm running Safari on Mojave.
Best regards,
Atilla

Confirmed.
CMD + v works in:

Google Chrome 80.0.3987.116 (Official Build) (64-bit)
Firefox 74.0b6

I wonder what it could be.

Here are my findings:
In src/components/control/background.js, the first HexWrapper:
        onKeyPress={e => {
          console.log(123, e)
          const result = e.key.match(/[^0-9a-fA-F]/)
          console.log(444, result)
          if (result) {
            e.preventDefault()
          }
        }}
        onPaste={e => {
          console.log(456, e)
          const text = e.clipboardData.getData('Text')
          e.preventDefault()
          if (chroma.valid(text)) {
            setBackground(
              chroma(text)
                .alpha(1)
                .hex()
                .replace('#', ''),
            )
          }
        }}

Google Chrome outputs:
456 Class {dispatchConfig: {…}, _targetInst: FiberNode, nativeEvent: ClipboardEvent, type: "paste", target: input.css-dwtz5p-HexWrapper.elv6yn64, …}

Safari outputs:
[Log] 123 – Class {dispatchConfig: {phasedRegistrationNames: {bubbled: "onKeyPress", captured: "onKeyPressCapture"}, dependencies: ["keypress"], eventPriority: 0}, _targetInst: FiberNode, _dispatchListeners: function, …} (commons.js, line 67529)
Class {dispatchConfig: {phasedRegistrationNames: {bubbled: "onKeyPress", captured: "onKeyPressCapture"}, dependencies: ["keypress"], eventPriority: 0}, _targetInst: FiberNode, _dispatchListeners: function, _dispatchInstances: FiberNode, nativeEvent: KeyboardEvent, …}Class
[Log] 444 – ["v"] (1) (commons.js, line 67529)

I'm not sure why they take different code paths.

Filed webkit bug here: https://bugs.webkit.org/show_bug.cgi?id=208088

Temporary workaround:
Right click > Paste

Absolute legend, thanks!

authors: CoreyGinnivan aesyondu helloatilla

repo: CoreyGinnivan/whocanuse


text:
Add the avoid_edge & center options

These commits add avoid_edge and center options.  The first prevents points from plotted on or next to the graph edges. The second allows the plot to be drawn from the center, outward.

Thank you very much!
I've released this as 0.03, on its way to CPAN

authors: Corion ology

repo: Corion/random-poissondisc