text:
Containerized SDK

The goal of this issue is gathering some feedback from your side WRT a new functionality in ISAR: creation of container images providing the SDK built with ISAR and distributing them using a container registry.
I got from @jan-kiszka the hint that I could demonstrate the functionality based in this project. I see the need of this functionality on ISAR users (like you). Therefore I thought that rather than convincing the ISAR developers/maintainers of the advantages of this functionality, I'll use your feedback to confirm that this is a meaningful functionality and feed this information back to the ISAR community.
NOTE 1: This is currently only a PoC (proof-of-concept) of a functionality that will hopefully get integrated into ISAR!
NOTE 2: The code that I'm linking to in this issue is not ready yet for integration!
How to use the containerized SDK

Go the directory containing the source code that you want to build
Run a container based on the SDK container image with docker run --rm -ti --volume $(pwd):/build ghcr.io/silvanoc/meta-iot2050/isar-sdk-arm64:latest.
From the container you can start using the SDK or copy&paste these steps for some minimalistic but fancy test.

Building the containerized SDK
I've documented how to build the SDK container image in the document BUILDING-SDK-CONTAINER.md. The images are being automatically built using CI (GitHub Actions)!
The whole building process is based on still ongoing contribution efforts from my side to ISAR and KAS, therefore patching ISAR and pulling a KAS image from my personal area. Once the contributions are through, they should be come part of upstream ISAR and KAS.
If you like this functionality as an ISAR user, please don't hesitate showing your interest in the corresponding mailing list discussion.

Very nice demo! I guess I need to give that a try soon.
Some remarks:

you likely miss some packages in the SDK because it builds way too fast (but would otherwise be terminated by github limits) and is supposed to have also linux-headers-iot2050 included
SDK_FORMATS could join the other SDK_* in conf/distro/isar.conf (yeah, isar is a bad name here, see also my Ubuntu queue)
once upstream Isar indicates acceptance of the approach, the patch to add the additional packages to kas-isar could be submitted for kas upstream

Very nice demo! I guess I need to give that a try soon.
Some remarks:

you likely miss some packages in the SDK because it builds way too fast (but would otherwise be terminated by github limits) and is supposed to have also linux-headers-iot2050 included
SDK_FORMATS could join the other SDK_* in conf/distro/isar.conf (yeah, isar is a bad name here, see also my Ubuntu queue)
once upstream Isar indicates acceptance of the approach, the patch to add the additional packages to kas-isar could be submitted for kas upstream

Very nice demo! I guess I need to give that a try soon.
Thanks!
Some remarks:
* you likely miss some packages in the SDK because it builds way too fast (but would otherwise be terminated by github limits) and is supposed to have also linux-headers-iot2050 included

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

* SDK_FORMATS could join the other SDK_* in conf/distro/isar.conf (yeah, isar is a bad name here, see also my Ubuntu queue)

I've used a KAS configuration file because it was the easiest for me without thinking about the "right place", what's fine for a PoC.
Your remark very valuable to place it at the right place, when I massage if for contribution.

* once upstream Isar indicates acceptance of the approach, the patch to add the additional packages to kas-isar could be submitted for kas upstream

Of course, it's in the pipeline!
I just didn't want to trigger a parallel integration process in KAS until the ISAR integration is done. I find it's fine for this demo to use the image from my personal GitHub space.

Very nice demo! I guess I need to give that a try soon.
Thanks!
Some remarks:
* you likely miss some packages in the SDK because it builds way too fast (but would otherwise be terminated by github limits) and is supposed to have also linux-headers-iot2050 included

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

* SDK_FORMATS could join the other SDK_* in conf/distro/isar.conf (yeah, isar is a bad name here, see also my Ubuntu queue)

I've used a KAS configuration file because it was the easiest for me without thinking about the "right place", what's fine for a PoC.
Your remark very valuable to place it at the right place, when I massage if for contribution.

* once upstream Isar indicates acceptance of the approach, the patch to add the additional packages to kas-isar could be submitted for kas upstream

Of course, it's in the pipeline!
I just didn't want to trigger a parallel integration process in KAS until the ISAR integration is done. I find it's fine for this demo to use the image from my personal GitHub space.

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

See README :smile:: kas-iot2050-example.yml.

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

See README :smile:: kas-iot2050-example.yml.

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

See README smile: kas-iot2050-example.yml.

Right, sorry. My fingers were faster than my brain :grimacing: It's building right now.
BTW running for 1h is not an issue, I've in fact built kas-iot2050-example.yml a couple of times using GitHub Actions :wink:

I didn't know which was the right configuration and have taken kas/iot2050.yml. That's the issue.
Which one should I take?

See README smile: kas-iot2050-example.yml.

Right, sorry. My fingers were faster than my brain :grimacing: It's building right now.
BTW running for 1h is not an issue, I've in fact built kas-iot2050-example.yml a couple of times using GitHub Actions :wink:

Really? That would be very valuable news. I once tried that, see https://github.com/siemens/meta-iot2050/commits/jan/workflow, but it ran into timeouts, already for the first image.

Really? That would be very valuable news. I once tried that, see https://github.com/siemens/meta-iot2050/commits/jan/workflow, but it ran into timeouts, already for the first image.

Really? That would be very valuable news. I once tried that, see https://github.com/siemens/meta-iot2050/commits/jan/workflow, but it ran into timeouts, already for the first image.

Follow this workflow and you'll get your answer :wink:

Really? That would be very valuable news. I once tried that, see https://github.com/siemens/meta-iot2050/commits/jan/workflow, but it ran into timeouts, already for the first image.

Follow this workflow and you'll get your answer :wink:

A new image providing the SDK container built from the right configuration is available now. It's taken 1h 25min to build, but it's done :tada:
@jan-kiszka you can give it a try now following this and whatever else you want to test.

A new image providing the SDK container built from the right configuration is available now. It's taken 1h 25min to build, but it's done :tada:
@jan-kiszka you can give it a try now following this and whatever else you want to test.

Any has been able to test it? Some feedback would be valuable.

Any has been able to test it? Some feedback would be valuable.

Not yet, currently working around npm packaging issues, once again. Will try once that is done.

Not yet, currently working around npm packaging issues, once again. Will try once that is done.

Just rebased over master - works great!
Would you move forward and submit a v2 of the Isar patch(es)?

Just rebased over master - works great!
Would you move forward and submit a v2 of the Isar patch(es)?

Would you move forward and submit a v2 of the Isar patch(es)?

Sure

Would you move forward and submit a v2 of the Isar patch(es)?

Sure

Merged into master, thanks for enabling this!

authors: Silvanoc jan-kiszka


text:
Missing advice on when triggers should fire

The spec currently states:
    Address and data trigger implementation are heavily dependent on how
    the processor core is implemented. To accommodate various
    implementations, load and store address and data triggers may fire at
    whatever point in time is most convenient for the implementation.
    Following the suggestions in the definitions of \Fstore and \Fload will
    lead to the best user experience, however.

However I can't see any such advice around the definition of store and load (https://github.com/sifive/riscv-debug-spec/blob/0.13/hwbp_registers.xml#L182). I think we discussed this issue in a call some time ago, and the consensus was that triggering before the store/load was most useful, especially when considering memory-mapped I/O.

Added a table for this and referred to it instead of the text about \Fstore, \Fload, in 793bb85

source: gharchive/issue

repo: sifive/riscv-debug-spec

license_type: permissive

license_source: github-api


text:
Messages history

Tell me please. How can I get a message history with a contact? Thank you!

After you have scanned the QR Code you get a binary representation object in JSON format that includes the chats you recently have in an Array, look for the binary object by clicking view that has a action key field with msg
{
"actionKey" :
"msg",
"meta" :
{ … },
"node" :
[
{ … }
]
}

@UrbanSwati, you're generally right, but I think @Arbuzzzzzz rather meant the entire history of messages with a contact, and this is a bit more complicated. When you scan the QR code, you just get the last message (i.e. just a single one) from every contact.
But even this is not directly obvious, because in the actionKey/meta/node structure, actual messages are still in a binary format. I have recently added a specification of this and it turned out that WhatsApp just uses protobuf for this. You can find the definitions for that here.
Still, without further action, you don't get the message history. For this, you need to send a binary message via the websocket that looks like this when it's in decoded JSON form:
[
	"query",
	{
	    "type": "message",
	    "kind": "before",
	    "jid": "49123456789@c.us",
	    "count": "50",
	    "index": "0123456789ABCDEF0123",
	    "owner": "false",
	    "epoch": "4"
	},
	null
]

I guess most of the values are self-explanatory. Every message you send has a unique ID (consisting of numbers 0-9 and letters A-F), thus in index you specify it to let WhatsApp know what your reference message is to get the 50 messages before it. I'm not sure about the epoch parameter yet.
I have already experimentally implemented a writer for the binary format and it's working flawlessly. In the next few weeks, I will add its details to the documentation.
The problem I currently face though is encrypting this message. When I just use normal AES-256-CBC with the encKey and prefix a message tag to it of course, the server just rejects my message by responding with {"error": 401} or something like that. As WhatsApp borrows its error codes from HTTP, 401 means Unauthorized, so something has to be wrong in the encryption step.
So is there anyone who may have encountered this issue and would be able to help?

@sigalor You should swap MAC and message here: https://github.com/sigalor/whatsapp-web-reveng/blob/248bf9dc3a9f45228a17a4143323c7427d00b5c6/backend/whatsapp.py#L62

@valga Tried it, but the issue persists.

@sigalor 401 means that your encKey and/or macKey aren't recognized by the app. I will look into it later.
By the way, WA doesn't always use protobuf: it depends on binary protocol version (binVersion from Conn object). WA uses protobuf since binary version 10, older ones use child nodes (JS code contains about 6 node parsers).

Thank you for your answers. I really wanted to receive the entire message history with the contact. As I understand this is difficult because of problems with encryption JSON?

@sigalor It seems that you forgot about binary options. There are two sending methods: sendBasic() and sendEphemeral(). First one always looks like this: messageTag,content. Second one has 2 variants:

messageTag,,content - when no binary options set.
messageTag,MFcontent - when there are some binary options set. M is a metric byte, F is a flags byte (see below).

For example, you must use M=7 to query messages list.
Available metrics:
DEBUG_LOG: 1,
QUERY_RESUME: 2,
QUERY_RECEIPT: 3,
QUERY_MEDIA: 4,
QUERY_CHAT: 5,
QUERY_CONTACTS: 6,
QUERY_MESSAGES: 7,
PRESENCE: 8,
PRESENCE_SUBSCRIBE: 9,
GROUP: 10,
READ: 11,
CHAT: 12,
RECEIVED: 13,
PIC: 14,
STATUS: 15,
MESSAGE: 16,
QUERY_ACTIONS: 17,
BLOCK: 18,
QUERY_GROUP: 19,
QUERY_PREVIEW: 20,
QUERY_EMOJI: 21,
QUERY_MESSAGE_INFO: 22,
SPAM: 23,
QUERY_SEARCH: 24,
QUERY_IDENTITY: 25,
QUERY_URL: 26,
PROFILE: 27,
CONTACT: 28,
QUERY_VCARD: 29,
QUERY_STATUS: 30,
QUERY_STATUS_UPDATE: 31,
PRIVACY_STATUS: 32,
QUERY_LIVE_LOCATIONS: 33,
LIVE_LOCATION: 34,
QUERY_VNAME: 35,
QUERY_LABELS: 36,
CALL: 37,
QUERY_CALL: 38,
QUERY_QUICK_REPLIES: 39,

Available flags:
ignore: 1 << 7,
ackRequest: 1 << 6,
available: 1 << 5,
!available: 1 << 4,
expires: 1 << 3,
skipOffline: 1 << 2,

@sigalor sendBasic is used for login sequence.

I hope this code might help people looking for fetching history:
#whatsapp.py
def getChatHistory(self):
        messageId = "3EB0"+binascii.hexlify(Random.get_random_bytes(8)).upper()
        msgData = ["query",{ "type": "message", "kind": "before", "jid": "5511975378537@s.whatsapp.net", "count": "1000", "index": "E9F5772C4EA6A3DFB55DD00BFD3D9F61", "owner": "false", "epoch": "4" }, None];
        encryptedMessage = WhatsAppEncrypt(self.loginInfo["key"]["encKey"], self.loginInfo["key"]["macKey"],whatsappWriteBinary(msgData))
        payload = bytearray(messageId) + bytearray(",") + bytearray(to_bytes(WAMetrics.QUERY_MESSAGES, 1)) + bytearray([0x80]) + encryptedMessage
        self.activeWs.send(payload, websocket.ABNF.OPCODE_BINARY)

Then you define a new message handler in whatsapp_web_backend.py

I hope this code might help people looking for fetching history:
#whatsapp.py
def getChatHistory(self):
        messageId = "3EB0"+binascii.hexlify(Random.get_random_bytes(8)).upper()
        msgData = ["query",{ "type": "message", "kind": "before", "jid": "NUMBER OF JID@s.whatsapp.net", "count": "NUMBER OF PREVIOUS MESSAGES", "index": "CONVO ID", "owner": "false", "epoch": "4" }, None];
        encryptedMessage = WhatsAppEncrypt(self.loginInfo["key"]["encKey"], self.loginInfo["key"]["macKey"],whatsappWriteBinary(msgData))
        payload = bytearray(messageId) + bytearray(",") + bytearray(to_bytes(WAMetrics.QUERY_MESSAGES, 1)) + bytearray([0x80]) + encryptedMessage
        self.activeWs.send(payload, websocket.ABNF.OPCODE_BINARY)

Then you define a new message handler in whatsapp_web_backend.py

hey Beleren
I have tested your code but i get 3EB06686A85A1561A7BF,{"status":404}

I hope this code might help people looking for fetching history:
#whatsapp.py
def getChatHistory(self):
        messageId = "3EB0"+binascii.hexlify(Random.get_random_bytes(8)).upper()
        msgData = ["query",{ "type": "message", "kind": "before", "jid": "NUMBER OF JID@s.whatsapp.net", "count": "NUMBER OF PREVIOUS MESSAGES", "index": "CONVO ID", "owner": "false", "epoch": "4" }, None];
        encryptedMessage = WhatsAppEncrypt(self.loginInfo["key"]["encKey"], self.loginInfo["key"]["macKey"],whatsappWriteBinary(msgData))
        payload = bytearray(messageId) + bytearray(",") + bytearray(to_bytes(WAMetrics.QUERY_MESSAGES, 1)) + bytearray([0x80]) + encryptedMessage
        self.activeWs.send(payload, websocket.ABNF.OPCODE_BINARY)

Then you define a new message handler in whatsapp_web_backend.py
Edit: the index attribute is optional, it gets the previous message from the last one by default.
Now i'm trying to figure out how groups work and if i can get by epoch time
Thank you @Beleren ! Is working well for me removing "index" parameter, and adding all requirements (Random from crypto and whatsappWriteBinary from whatsapp_binary_writer) in whatsapp.py.

I have no idea about epoch time, but for group, is exactly the same as "normal chat".
Replacing jid by your group JID : {"jid": "33333333333-111111111111@g.us",}
python --version : 2.7.16

@likeforreal @J4YF7O Sorry for the late response, I stopped working with it since I've posted the possible solution, so i totally forgot about it. I hope it was helpful somehow!

authors: Arbuzzzzzz Beleren J4YF7O UrbanSwati likeforreal sigalor valga

repo: sigalor/whatsapp-web-reveng

license: MIT


text:
🛑 signalwerk – ci is down

In 60a1708, signalwerk – ci (https://ci.signalwerk.ch/) was down:

HTTP code: 404
Response time: 76 ms

Resolved: signalwerk – ci is back up in ece2130.

repo: signalwerk/uptime


text:
Cosign copy multi arch/platform support

Description
Currently, when we build and sign a multi-platform container image, cosign creates one top-level signature and other platform-specific signatures. But when we use cosign copy with the specific platform, we cannot copy the signature for the specific platform, which leads to the sign verification error.
Please add a command to copy only specific platform.

Hello,
I would like to work on this issue. Is there anything I should know before starting (Besides the contributing guidelines)? Thank you

Hello @cpanato,
Sorry for the long delay since my last message. I finally had some time and patience to understand why I couldn't replicate the above-described issue locally (was following the scaffolding "get started" documentation and had to use an earlier version of cosign).
Now that I managed to replicate the issue locally I'm not sure if I'm understanding what is being requested/asked. I managed to sign a multi-arch/platform image and copy all signatures into another registry (with --sig-only it seemed to leave out some signatures). Just to confirm, is what's being asked the possibility of copying a specific arch/platform?

Hi @Gabrielopesantos ,
Yes, when we should be able to copy a single architecture with the signature.

authors: Gabrielopesantos shreelola

repo: sigstore/cosign


text:
add info about repository doc to repository readme.md files

Description

The repositories for Sigstore have a readme.md file that describes some of what is going on with the associated modules in the docs folder.   In addition, there are some repositories that in addition  have doc files that contain further information.  This issue is  for the editing of the readme files to contain short descriptions of the other documentation files and a reminder that docs must be updated to keep in sync with any code changes.
The following repositories will have changes:
Cosign
Fulcio
Rekor
Sigstore-Java
Sigstore-js
Each repository will be forked and have a branch named jvn-257.   The changes will be in that branch for each repository.

issue needed to be attached to repositories so closing this one.

repo: sigstore/docs


text:
資料庫來源表來源貢獻者名稱重複問題

>>> dic = {}
>>> for i in 來源表.objects.all():
...     if i.名 not in dic:
...         dic[i.名] = list()
...     dic[i.名].append(i.id)
...

result:
{'Ông Tsì-liông': [149, 190], '匿名': [119], 'Chongle Chhua': [176, 177], 'Van  Lai': [146, 187], '吳俊昌': [204], '台文華文線頂辭典': [269], 'Tan-nî Danny Chiou': [238], '陳冠綸': [199], 'WuPomin': [11, 12, 13, 14, 15, 8], '白麗芬': [272], '葉怡萱': [85], 'sui2@gmail.com': [3], '吳振嘉': [214], '郭瓊丹': [150], 'oosts': [203], '游威力': [147, 148, 281, 300], '林大鈞': [216], 'Francis Lee': [168, 184], 'Jûka Ng': [227], 'test': [144], '呂興昌': [283, 284], 'Jou Ying-cheng': [110, 138, 164], 'EPR': [266], 'Ki-seng Lim': [159], '莊文龍': [223], 'Liz Lim': [111, 112, 113, 114, 115, 116, 117, 118, 131, 104, 105, 107, 108, 192, 215], 'Vito Chang': [172, 183, 271], '黃偉晉': [80, 82, 79], '臺灣閩南語常用詞辭典': [2], 'Phoasit Ong': [244, 245, 246, 247, 248, 249, 250], 'Khóo Ka-ióng': [151], 'weli, hian': [268], 'liz': [121], 'Mei Lien Hung': [301, 302], 'Seng-hian Lau': [194], 'Min-de Ang': [306], 'Liāu Siok-hōng': [229, 230, 231], 'Tiunn Hông-bîng': [209, 210, 260], '費加洛': [157, 158], 'Pochung Pektiong Chen': [175, 262], '系統管理者': [120], 'Tsu Tsì-uí': [212, 277], 'Tâi-gí Bāng': [208, 280], '鄉民': [1], '吳冠霆': [178], 'a-uí': [181], 'Kuen Ming  Sh': [153], 'Ellen Post': [130], 'Moogoo Lee': [200, 201], '莊銘彥': [109, 83, 134, 198, 239, 240, 241, 242, 243], 'Hingge Lua': [289], 'Zeng Siu Lim': [220], 'Pomin Wu': [86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103], '師大台文': [237], 'Iûnn Kiàn-îng': [297], '邱文錫': [205, 206], 'Lin Hsuan-tung': [174], 'Tensai Tung': [141, 193, 270, 296], 'OôSts': [186], 'hian': [182], 'ShangKuan Liang-chih': [222], '王仁國': [285, 286], 'Thai Boi-Nguyen': [275, 276], 'Chili Kuo': [287], '陳憲緯': [135, 136], 'Ethan Tan': [232], '劉秉豪': [160], '駱勁成': [213], 'Tōo Sìn-liông Masa Tu': [188, 189], '陳威祐': [185], 'Tina Yang': [288], 'Hōe-bûn Ông': [154, 155], '志': [145], '彥': [143], '李孟軒': [218], 'Gôo Gān-iông': [219], 'Pierre Magistry': [106], 'Liz Lin': [81, 84], 'sh': [304], 'Miao Chiang Yen': [140, 166], 'Usiong Koo': [207, 233], '薛丞宏': [62, 63, 4, 5, 64, 7, 65, 9, 66, 10, 67, 68, 69, 17, 18, 70, 19, 20, 71, 21, 22, 72, 23, 24, 73, 25, 26, 74, 27, 28, 75, 29, 30, 76, 31, 32, 77, 33, 34, 35, 78, 36, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 122, 52, 53, 54, 123, 55, 56, 124, 57, 58, 59, 60, 61, 191, 224, 251, 252, 253, 254, 255, 256, 257, 290], '潘科元': [126, 235], 'ccps960718456@gmail.com': [259], 'Fu-Hsuan Ju': [132, 133, 195], '春吉林': [293, 294], 'Maple  Green': [298], '黃茶米': [305], 'Chinju Iunn': [211], 'TWkid Lai': [156, 267, 295], 'ElleryQueen Tiunn': [167], 'David Kang': [152], 'Lîm Tshong-bîng': [161, 162, 163, 179, 196, 221, 263], '巫培源': [258], 'Ôo Siok-tsing': [217, 228, 282], '簡嘉琳': [278, 279], 'Morrison Iûnn': [125, 142, 173], 'May Lin': [127, 128, 129], 'Payuholake Ukiam Len': [273, 274], 'ingsing': [197], 'E-Ping Rau': [264, 265], 'Tsì-sîng Tionn': [139], '楊涴婷': [299], 'Ingsing': [169], 'Blythe Chu': [171], '柯仲恩': [137, 236], 'Oô\u3000Siok-tsing': [202], 'Lûi Bêng-Hàn': [234, 303], 'TsaiMark': [16], 'weli': [170], 'Justin Richard Leung': [165, 180, 261, 292], 'Tony  Tsai': [225, 226], '李建德': [291]}

Liz 就有 [111, 112, 113, 114, 115, 116, 117, 118, 131, 104, 105, 107, 108, 192, 215] 這麼多個
不確定是哪邊出問題 XD

來源表.objects.filter(名='薛丞宏').count()

我itaigi重登入後，就加一个

臨時揣無原因，問題應該佇遮
https://github.com/sih4sing5hong5/tai5-uan5_gian5-gi2_phing5-tai5/blob/master/臺灣言語平臺/使用者模型.py
https://github.com/g0v/itaigi/blob/master/server-side/itaigi/settings.py#L149-L172

license: mit

license_source: bigquery


text:
How long does it take to train?

It's a very interesting job. I noticed that the resources required for training are not mentioned in the paper. How long will it take to train?🥳

It depends on the dataset complexity. For unconditional generation (UCF-101) it took 8 days with 8 x A100 gpus.

repo: sihyun-yu/PVDM


text:
call stored program, register out parameter

Hi
we're using your awesome package in our product and we're thankful for your good work here
as our developers try to call an stored program with out parameter, we face the same issue when we forget to set string size like this:
        name = strings.Repeat(" ", 200)
this approach is the only way to set output parameter size? is there any way to pass length or something more standard?
I think you've done something like that in last clob issue, if I got it right
another question: we have a huge table(with 300 columns😅) and our db is 11g, which approach is better if we want to write a plsql function and call it to insert into this table?
1- pass one json object and deserialize it to rowtype inside plsql function then insert(might have performance issue on high load).
2- have a parameter for each column(we test it with c code and it was ok, but code looks so dirty)
3- create a new type which is like rowtype and pass it to plsql and convert it to rowtype(as it does not neet to desrialize, theorically should be faster)
thanks for your support

second problem can you give me a simple example

second problem can you give me a simple example

for example:
create table huge_tab(
col_001 varchar2(10),
...
col_300 varchar2(10)
);
create procedure register_record_multi_param(
p_001 varchar2, ..., p_300 varchar2
) as
begin
insert into huge_tab
vlaues(
p_001, ..., p_300
);
end;
create or replace type my_type as object(
col_001 varchar2(10),
...
col_300 varchar2(10)
);
create procedure register_record_with_type(
param my_type
) as
rec huge_tab%rowtype;
begin
rec := convert (param);
insert into huge_tab
vlaues rec;
end;

you can create a custom type in oracle then use it in the package easily
see example UDT for more information

the old way was a huge string formatted as tlv, with a parser to serialize and deserialize it in plsql and c
it's problem was performance issue in high-load
we're using the 300 parameters method currently in c codes

Hi @hmmftg
I make a commit that introduce the following:
1- Support for user define type UDT as input parameter (still output not tested)
2- Add new structure go_ora.Out that contain Size member for setting output parameter size
you can see an example UDT_PARS for more help
please test it and inform me for any problems

tested oracle versions 12c and 19c

I am fixing some bugs now

I fix bug: when you have large UDT object will fail

Hi
thanks for your support
I'll test new version with 11g database and inform you

now UDT is supported as input and output parameters

add support for nullable parameters

authors: hmmftg sijms

repo: sijms/go-ora


text:
Add documentation about lock mode settings.

PdoSessionHandler has lock_mode settings which is really critical
for multi-server enviroment while using silex with DoctrineOrm.
DoctrineOrm uses transactional queries and PdoSessionHandler defaults
to transactional queries as well. Which creates a database leve error
notifiying transaction already exists. Changing the lock_mode to
other setting then the default one solves the issue.

@rajibahmed the PDO session handler is designed to use its own connection, not to reuse the PDO connection of the ORM

@stof that needs documenting somewhere then.

@davedevelopment please open an issue on the symfony-docs repository to ask for an update of the documentation of the PdoSessionHandler

and you could also add a note in the Silex doc in the page you are editing here

Closing as this is really something that needs to be done in the Symfony docs instead. As mentioned by @stof, this is not as simple as that.

source: gharchive/pull-request

authors: davedevelopment fabpot rajibahmed stof

repo: silexphp/Silex


text:
How to implement Cookie Consent code into website. [HELP NEEDED]

Hey everyone.
I am having trouble implementing the cookie consent code into my website. Could someone please provide me with detailed steps in installing this on my website (tjbruce17594.com)
Thanks very much!
Code I'm trying to use:
http://pastebin.com/hcPyp1FH
Thanks for any help! :D @Dolondro

Hullo!
You want to put it inside the  tag in your HTML the code that reads this in your source code:
`		<!--[if lte IE 9]>

<![endif]-->`

So just replace that with the Cookie Code?

What should the end result of the source code look like? @Dolondro

Sorry, it shouldn't replace it, it should to just underneath it. The end code will look like this:
`

Home | tjbruce17594

<!--[if lte IE 8]>

<![endif]-->

</head>

`

Thanks very much! Working now. :) Solved.


text:
Load testing

Commit the load testing script to Serval for future use. See here.

This change is

Codecov Report
All modified lines are covered by tests :white_check_mark:
:loudspeaker: Thoughts on this report? Let us know!.

repo: sillsdev/serval


text:
Bump nokogiri from 1.11.4 to 1.13.4

Bumps nokogiri from 1.11.4 to 1.13.4.

Release notes
Changelog
Commits

updated-dependencies:

dependency-name: nokogiri
dependency-type: indirect
...

Signed-off-by: dependabot[bot] support@github.com

I don't know where this was from, but I think not the lab.

repo: silvanet/github-slideshow


text:
fs test fails when silverbullet is already under a hidden directory

I don't know if this is intended. If the Silverbullet is repo already under a hidden directory, e.g. /home/user/.repos/silverbullet, the following test will fail.
https://github.com/silverbulletmd/silverbullet/blob/7af98e7c7bc9464cdd747a30a13ad9e809c292ce/plugos/syscalls/fs.deno.test.ts#L12-L18
It is because skip pattern in the following doesn't allow /. anywhere in the absolute path. In my example, it matches with .../user/.repos/... and stops walking.
https://github.com/silverbulletmd/silverbullet/blob/7af98e7c7bc9464cdd747a30a13ad9e809c292ce/plugos/syscalls/fs.deno.ts#L76-L81
Maybe relax the regex with ^.*\/\.[^/]+$ to skip only the current directories whose names start with a dot.

This is also an issue when building for Arch Linux, form AUR, with yay (which uses ~/.cache/yay as build directory).

I had already fixed this elsewhere, copied the fix

authors: pcaro90 rnbguy zefhemel

repo: silverbulletmd/silverbullet


text:
Follow OS theme (dark/light)

I've seen on https://developer.mozilla.org/

Same as #481 right?

Well, searched for theme among the issues, that's why I could not find.

authors: pihentagy zefhemel


text:
Orde Email r number/Reference problem

under lang/en.yml file.
OrderNotifier:
ADMINNOTIFICATIONSUBJECT: "Order #%d Notification"
CONFIRMATIONSUBJECT: "Order #%d Confirmation"
RECEIPTSUBJECT: "Order #%d Receipt"
all of above %d should be changed to %s.
because, not every order number is a number, and Order Reference field can be override to a different format.
I think there are many places been referenced to order ID. and all should change to %s.
otherwise , Order Email subject becomes "Order #0 Receipt".
for example:
there are many place in Shop OrderEmailNotifier.php has this sort of code:
$subject = sprintf(
_t("OrderNotifier.CONFIRMATIONSUBJECT", "Order #%d Confirmation"),
$this->order->Reference
);
$this->order->Reference may or may not be a number.
also, check Order's generateReference funciton, this function allows customized code to override
Order's Reference field.

This has been changed in 2.0, as we use the proper translation syntax (see https://docs.silverstripe.org/en/3.4/developer_guides/i18n/#the-t-function).
Feel free to create a PR with these changes against the 1 branch though…

repo: silvershop/silvershop-core


text:
[2010-03-07] Allow setting utf8_general_ci to one of the other utf8 variants

created by: @MarcusDalgren (smurkas)
created at: 2010-03-07
original ticket: http://open.silverstripe.org/ticket/5145

In general utf8_general_ci will work ok on a non English site but when running on utf8_general_ci MySQL doesn't understand the sorting order of special characters from other languages.
So for instance in Swedish ,  and  get treated as the characters a and o when sorting a result set. As far as I know the only way to fix this is to set the relevant columns to utf8_swedish_ci so that MySQL knows how to treat the special characters.

Configurable via Config::inst()->get('SilverStripe\ORM\Connect\MySQLDatabase', 'connection_collation') and $collation = Config::inst()->get('SilverStripe\ORM\Connect\MySQLDatabase', 'collation') now

authors: chillu silverstripe-issues

repo: silverstripe/silverstripe-framework


text:
Updated continuous integration worflows

:warning: Merge PR #112 first!
This PR:

updates the actions used by CI workflow
updates the release workflow to run on github release publication and relying on github environment rather than pypi secret token

CI changes are in commits: https://github.com/silx-kit/jupyterhub_moss/pull/113/commits/2602a14ff05673a0e4b85f301bb46246b4701a99
https://github.com/silx-kit/jupyterhub_moss/pull/113/commits/ccf116591303c84be8e3c5b7b168b0d2b35919b5


text:
Install error in virtualenv/python3.4 on debian8 using pip

Installing silx in a brand-new virtualenv on debian8 with pip3.4 fails:
############
favre@gpu2-1304:~$ export BASEDIR=~favre
favre@gpu2-1304:~$ cd $BASEDIR
favre@gpu2-1304:~$ mkdir -p test-env
favre@gpu2-1304:~$ virtualenv -p python3.4 test-env/
Running virtualenv with interpreter /usr/bin/python3.4
Using base prefix '/usr'
New python executable in test-env/bin/python3.4
Also creating executable in test-env/bin/python
Installing setuptools, pip...done.
favre@gpu2-1304:~$ source test-env/bin/activate
(test-env)favre@gpu2-1304:~$ pip3.4 install --upgrade pip
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Installing collected packages: pip
Found existing installation: pip 1.5.6
Uninstalling pip:
Successfully uninstalled pip
Successfully installed pip
Cleaning up...
(test-env)favre@gpu2-1304:~$ pip3.4 install numpy
Collecting numpy
Using cached numpy-1.12.0-cp34-cp34m-manylinux1_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.12.0
(test-env)favre@gpu2-1304:~$ pip3.4 install silx
Collecting silx
Using cached silx-0.4.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/tmp/pip-build-gw4145o3/silx/setup.py", line 505, in
long_description=get_readme(),
File "/tmp/pip-build-gw4145o3/silx/setup.py", line 86, in get_readme
long_description = fp.read()
File "/mntdirect/_users/favre/test-env/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1401: ordinal not in range(128)
silx.io.specfile WARNING:
A cleaner locale independent implementation
may be achieved setting SPECFILE_USE_GNU_SOURCE to 1
For instance running this script as:
SPECFILE_USE_GNU_SOURCE=1 python setup.py build
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-gw4145o3/silx/
----------------------------------------

Sorry I was too quick - this is not a dependency to numpy. I've updated the description

Exact steps to reproduce:
export BASEDIR=~favre
cd $BASEDIR
mkdir -p test-env
virtualenv -p python3.4 test-env/
source test-env/bin/activate
pip3.4 install --upgrade pip
pip3.4 install numpy
pip3.4 install silx

NB: "pip3.4 install -I silx==0.3.0" works

The word "egg" appearing at the end of your error log makes me think that you don't have wheelinstalled. Can you try
pip install setuptools --upgrade
pip install wheel --upgrade

(http://www.silx.org/doc/silx/dev/virtualenv.html#upgrade-setuptools-and-wheel)

Thanks. The following steps indeed work:
export BASEDIR=$PWD
cd $BASEDIR
mkdir -p test-env
virtualenv -p python3.4 test-env/
source test-env/bin/activate
pip3.4 install --upgrade pip
pip3.4 install numpy
pip3.4 install setuptools --upgrade
pip3.4 install wheel --upgrade
pip3.4 install silx

But it probably still should work with the non-wheel install (I don't know what the encoding error relates to), as it did for 0.3, or should install wheel & setuptools as a dependency.

A test you could try to do is to delete the content of the README.rst file and see if you still get the same error.
There are non-ASCII characters in the README file (my fault), and maybe when the setup.py tries to extract information from it, it uses a different encoding than utf-8 because of your locales.
On my machine it works:

~/git/silx$ python3.4
Python 3.4.2 (default, Oct  8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> def get_readme():
...     dirname = "/users/knobel/git/silx"
...     with open(os.path.join(dirname, "README.rst"), "r") as fp:
...         long_description = fp.read()
...     return long_description
...
>>> import os
>>> get_readme()
'\nsilx toolkit\n============\n\...

And this fails:
>>> def get_readme():
...     dirname = "/users/knobel/git/silx"
...     with open(os.path.join(dirname, "README.rst"), "r", encoding="ascii") as fp:
...         long_description = fp.read()
...     return long_description
...
>>> get_readme()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in get_readme
  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1401: ordinal not in range(128)

Thanks for the quick fix !

For future reference: the machine was configured with locale POSIX. So the built-in python 3.4 open expected to find only ASCII characters.

authors: PiRK vincefn

repo: silx-kit/silx


text:
Parsing into Map

Introduction
Sometimes users want to parse a JSON object into a map.
Let's assume that we have the following example object:
{
    "intKey": 123,
    "objKey": {
	"key1": "abc",
        "key2": false
    },
    "arrayKey": [1, 2, 3]
}

We expect the parser to produce a Map<String, Object> from which we should be able to extract the object's fields in the following way:
Map<String, Object> map = parser.parse(bytes, bytes.length, Map.class);

int intValue = (int) map.get("intKey");

Map<String, Object> obj = (Map<String, Object>) map.get("objKey");
String value1 = (String) obj.get("key1");
boolean value2 = (boolean) obj.get("key2");

List<Object> array = (List<Object>) map.get("arrayKey");

Question
Let’s assume that the parser exposes an API like:
Map<String, Object> map = parser.parse(bytes, bytes.length, Map.class);

The returned map is immutable.
JSON parsing benchmarks often show that, in Java, creating new strings takes a significant portion of the time. So, the question is: at which stage should this happen? I see two options:
Option 1
Map<String, Object> map = parser.parse(bytes, bytes.length, Map.class);

// at this point all Strings are created

String value1 = map.get("key"); // this doesn’t create a new one
String value2 = map.get("key"); // this doesn’t create a new one either

Option 2
Map<String, Object> map = parser.parse(bytes, bytes.length, Map.class);

// at this point, the map only holds its own copy of a byte array with all parsed strings, but no instance of String has been created so far

String value1 = map.get("key"); // this creates a new instance of String
String value2 = map.get("key"); // this also creates a new instance of String

I suppose the second option is far more efficient in situations where someone wants to access only a small set of all fields and they want to do so only once.
@ZhaiMo15 @zekronium since you reported this topic, what are your thoughts? I’d like to understand your use cases better to be able to choose a more suitable option or come up with something else.

In option2,

at this point, the map only holds its own copy of a byte array with all parsed strings

Does this byte array means buffer and stringBuffer in JsonValue? If so, I think https://github.com/simdjson/simdjson-java/issues/36 would occur. In my case as I mentioned in https://github.com/simdjson/simdjson-java/issues/47, UDFJson has a cache to save the parsing result, which will save parsing times if the same JSON string comes.
For example:
bytes1 =
{
    "intKey": 123,
    "objKey": {
	"key1": "abc",
        "key2": false
    },
    "arrayKey": [1, 2, 3]
}

bytes2 =
{
    "intKey": 987,
    "objKey": {
	"key1": "zyx",
        "key2": true
    },
    "arrayKey": [9, 8, 7]
}

Map<String, Object> map1 = parser.parse(bytes1, bytes1.length, Map.class);
cache.put(bytes1, map1);
Map<String, Object> map2 = parser.parse(bytes2, bytes2.length, Map.class);
cache.put(bytes2, map2);

// the second time bytes1 comes
map1 = cache.get(bytes1);
// map1.get("xxx") and etc.

If the second "bytes1" want to get correct result, I think the byte array needs to do save for each "bytes"? However, copy byte array may cost time as much as option1?
On one hand, option1 + cache can save parsing times (from x times to 1 time if no cache miss), but the only parsing could be costly, since all Strings are created; On the other hand, option 2 can reduce parsing cost, since no instance of String has been created, but the same JSON string may be parsed more than once.

But in the end, I'm convinced by

I suppose the second option is far more efficient in situations where someone wants to access only a small set of all fields and they want to do so only once.

I vote for option2.

Optimally would be nice to have the ability to do both, but in SIMD spirit, lazy parsing seems more appropriate, especially once full on stream parsing is eligible, that can be the underlying harness of most things if need be.
I think initially option 2 is better, but it should cache the result maybe? I think jackson does this alot and it bodes well.

@piotrrzysko I agree with @zekronium , Option 2 would be preferred, but even Option 1 a good start.
I wonder if we want to use a new TypeToken<Map<String, Object>>() {} to avoid the cast to Map<String, Object>. This is the approach Gson is following.

authors: ZhaiMo15 arouel piotrrzysko zekronium

repo: simdjson/simdjson-java


text:
[WIP] Fuzzer for buffer overflow

Fix #156
I am not entirely sure how to proceed, but this is my first fuzzer test to detect buffer overflows. It is not very sophisticated yet, but I just wanted to know if I had a good approach. From #92 , at least one case of overflow occurred when trying to predict the output length with utf*_length_from_utf*. Also, I think buffer overflows can only happen with valid inputs. Right now, the fuzzer test I have is pretty much just a UTF-8 to UTF-16 test, but the idea would be to generate maybe something uniform and insert some irregularities (like a single non-ASCII characters in the middle of long ASCII strings, something like that). I could also add extensive random tests with valid and invalid inputs. Is this reasonable?

I think that it is a good starting point. I would add pure random tests. Importantly, we want to log errors and have a way to reconstruct the failing test that is convenient. We would like to test a whole range of functions.

We will want to run those with SIMDUTF_SANITIZE.

We will want to run those with SIMDUTF_SANITIZE

Do I need to put something around the code (like #ifdef SIMDUTF_SANITIZE ...) or in the CMake file?

Do I need to put something around the code

That won't do anything because I don't think we pass the macro to the code. However, if you test your own code, you should build with it... so...
cmake -D SIMDUTF_SANITIZE=ON -B build && cmake --build build --target mytargethere

Similarly, the documentation (in the README) should mention the recommendation to use the sanitizer.

@NicolasJiaxin And you should add hooks, see this blog post...
Catching sanitizer errors programmatically

@lemire When I run the tests with the sanitizers, it does not crash but it finishes with the following message
==7013==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==7013==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

There are a lot of "poisoning/unpoisoning" messages as well. Is that normal? I see similar messages with other tests.

The approach I took for the fuzzer is to generate data using a state_tracker that will either generate a valid or an invalid UTF-8 character. The state_tracker can generate 20 different states: 4 valid states (valid ASCII, valid 2-byte, valid 3-byte, valid 4-byte) and 16 invalid states (which correspond to the type of errors defined in error.h). One can specify the different weights of each state. This way we can generate different kinds of data, with a lot of errors, with few errors, a mix of both, etc. For now, I just put 50% chance of a valid state and 50% of an invalid one, but we can vary this to make the fuzzer more robust.

I ran it on two different machines...
$ cmake -B build -D SIMDUTF_SANITIZE=ON && cmake --build build --target basic_fuzzer
$ ./build/tests/basic_fuzzer
Checking implementation haswell
basic fuzz...---------- OK
overflow fuzz...---------- OK
Checking implementation westmere
basic fuzz...---------- OK
overflow fuzz...---------- OK
Checking implementation fallback
basic fuzz...---------- OK
overflow fuzz...---------- OK

What we would like to see happening is that if a sanitizer catch an error, we log the state of the error so that we can reproduce the error later.
See https://lemire.me/blog/2022/08/20/catching-sanitizer-errors-programmatically/
To make sure this happens, you could introduce a bug (deliberately) where you write too much data and see the thing blow up. And then see that we get a log that makes sense. :-)

The fuzzer should work based on a user-provided seed (with maybe a default seed). I should be able to pass a seed and when I do so, I get the same tests running.

Ok I will add all of that!

@lemire I tried to follow the blog post, but I cannot retrieve the error message. It seems std::string message is empty. You can try to apply the patch and see...
diff --git a/tests/basic_fuzzer.cpp b/tests/basic_fuzzer.cpp
index 8483cb9..5699d8f 100644
--- a/tests/basic_fuzzer.cpp
+++ b/tests/basic_fuzzer.cpp
@@ -13,7 +13,7 @@ std::string message;

 extern "C" {
 void __asan_on_error() {
-  std::cout << "You caused an error: " << message << std::endl;
+  std::cout << "You caused an error: " << message << "END OF ERROR" << std::endl;
 }
 }

@@ -252,7 +252,7 @@ TEST(basic_fuzz) {
     state_tracker tracker(counter, 1, 1);
     for (size_t size : input_size) {
       std::vector<char> input(size);
-      std::vector<char> output(4*size);
+      std::vector<char> output(3);
       while (input.size() < size) {
         tracker.next(input);
       }

The message variable was an example… and you have to update it manually.
In your case, you could have another type of global variable… containing just enough information so that we can reproduce the error. E.g., the input string could be serialized (e.g., as base64).

Is there a standard library function to serialize to base 64 or should I do it myself?

Is there a standard library function to serialize to base 64 or should I do it myself?

Please don't code it by hand.
Give me a minute.

That should do...
https://github.com/lemire/fastbase64/blob/master/src/quicktimebase64.c

Not really a fan of base64 as it obscures the byte values in the string.  Why not print it as a sequence of \x... escape sequences such as
"\x00\x01\x02..."

This makes it super easy for the programmer to understand what is going on and can be copy-pasted as is into C++ source code.

When you debug a new algorithm, the fuzzer will find new exciting errors for you all the time.  So an output format that is directly understandable by the programmer is crucial.  In the test code in the clausecker branch I have just used some sort of ad-hoc format, but it was good enough for me.
I'm pretty sure C++ string notation works always.

When you debug a new algorithm, the fuzzer will find new exciting errors for you all the time.

I sure hope that it won't be the case here. We already have pretty decent testing and the fuzzer is really an add-on for in-depth testing.
This being said, @clausecker is right, and it might be nicer to have an escaped-string serializer that you can copy-paste in your code, with the caveat that it should be well tested so we are sure that it serializes strings as you'd expect. The code ought to be simple, but we want to make really sure that it is correct.

I am not sure I understand the serialization proposed by @clausecker. Suppose I have the byte 0b10100110. Then, what is the difference between char(0b10100110) and '\xa6' when you write to a log file?

In C, you can write "\xa6" and that's a string with the byte value 0xa6. I don't have C code handy, but the algo would like like this:
while I have more bytes
   append "\x" to the string
   append the two-character hex code value of the next byte

There may be a super clever way to do this.

Of course, you need unescaped quotes at the beginning and at the end.

https://en.wikipedia.org/wiki/Escape_sequences_in_C

Of course, it might be nice to know which function failed (e.g., given this input, and calling the transcoding function from UTF-8, we get an error).

You can just use a printf call to write these...
printf("\\x%02x", (unsigned)c);

where c is the UTF-8 byte.  Or for a UTF-16 byte
printf("\\x%04x", (unsigned)c);

If you want to build a string instead of printing directly, there's probably some C++ string building API for this (in C I'd use open_memstream).

You can print to an existing buffer in C using sprintf: https://cplusplus.com/reference/cstdio/sprintf/
There is no need for a dynamic buffer if you know the size of the input since you are using 4 bytes per input byte (except maybe for the null terminating byte).

I get an error on Visual Studio because I use sprintf instead of sprintf_s, but I am unable to fix it...

Don’t worry about the good old VS. I will investigate.

@NicolasJiaxin I have solved the VS issue. It was a little nothing.

Thanks!

Merging.

authors: NicolasJiaxin clausecker lemire

repo: simdutf/simdutf


text:
[Issue]: Fine-tuning Google Colab

Describe the issue
Running fine-tune.py and push the new model to hugging-face
read the guide to learn about PEFT, 4-bit quantization, QLoRA, and SFT.
References:
https://www.datacamp.com/tutorial/mistral-7b-tutorial    (fine-tuning section)
https://huggingface.co/docs/transformers/main/en/chat_templating   (chat templates)
https://huggingface.co/docs/peft/main/en/conceptual_guides/lora (lora)
https://medium.com/@ireihani/mastering-model-adaptation-fine-tuning-mistral-ai-using-lora-and-quantization-7541e3fdb56d
Steps to reproduce
No response
Screenshots and logs
No response
Additional Information
No response

Done.

repo: simges/autogen


text:
Unhandled Exception: Bad state: Expected exactly one element, but got 2

I seem to get this bug on a table with a joint primary key. I use getSingleOrNull to get one element and it returns two. The two returned have different primary keys even though I explicitly query by one primary key.
This is the exact error
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Bad state: Expected exactly one element, but got 2

I had a similar issue to this and resolved it by putting a limit on my queries where I know I only want 1.
  Stream<D?> getBy(String key, dynamic val) {
    CustomExpression<bool> findByExpression = CustomExpression<bool>("$key = '$val'");
    int? userId = db.sharedPreferences.getInt('current_user_id');

    return (select(_table)
          ..where((tbl) => findByExpression)
          ..where((tbl) => tbl.currentUserId.equals(userId))
          ..orderBy([(tbl) => OrderingTerm(expression: tbl.id, mode: OrderingMode.desc)])
          ..limit(1))
        .watchSingleOrNull();
  }

CREATE TABLE folder_entries (
    id TEXT NOT NULL,
    driveId TEXT NOT NULL,

    name TEXT NOT NULL,
    parentFolderId TEXT,
    path TEXT NOT NULL,

    dateCreated DATETIME NOT NULL DEFAULT (strftime('%s','now')),
    lastUpdated DATETIME NOT NULL DEFAULT (strftime('%s','now')),

    PRIMARY KEY (id, driveId)
) As FolderEntry;

The primary key is id and driveId
folderById:
    SELECT * FROM folder_entries
    WHERE driveId = :driveId AND id = :folderId;

You're where clause is filtering on driveId and folderId.
It's possible that theres duplicate entries in folder_entries.

I'm running into this issue too. Seems like two insertions are happening even if they violate the primary key constraint. It seems to be happening when insertions are made to the same database over different isolates simultaneously. Violating insertions in the same isolate doesn't cause duplicates. I am using worker_manager for managing isolates & hooking up drift for isolates using the pre flutter 3.7 way.
Let me build a reproducible code.

I realize that none of the databases (mysql & postgresql) allow nullability in any of the columns of a compound primary key. That is primary key is always non-nullable - be it a single column or multiple - all columns have to be non-nullable.

Drift allows columns of a compound primary key to be nullable
Drift doesn't guarantee primary key uniqueness when same records (with null in nullable columns) are inserted

Here's the reproducible code: https://github.com/srix55/drift_primary_key_issue

With sqlite3, it's possible to have nullable primary keys. As the docs mention, that is more of a defect in sqlite3 than anything else, but that's what it is.
Two nulls being counted as distinct values in primary key is also the intended behavior.
I wonder what the best course of action here is - adding a warning probably?

True... it's an SQLite bug. Many others are facing the same -
https://github.com/prisma/prisma/issues/3130
https://stackoverflow.com/questions/64753105/why-can-i-add-null-value-to-primary-key-in-sqlite
Drift should not be addressing this, imo. Let's make sure not to declare nullable primary keys.

Yeah. I'll consider making STRICT the default in a future drift version, which would fix this.
The original issue description had all involved columns declared as non-null though, so it's possible that something else is/was going wrong here as well.


text:
How to ensure that the generated entity has the ‘required’ keyword regardless of whether it can be null or not?

How to ensure that the generated entity has the ‘required’ keyword regardless of whether it can be null or not?
raw :
class Test2 extends DataClass implements Insertable<Test2> {
  String? client_content;
  DateTime created_at;
  int id;
  DateTime updated_at;
  Test2(
      {this.client_content,
      required this.created_at,
      required this.id,
      required this.updated_at});

to:
class Test2 extends DataClass implements Insertable<Test2> {
  String? client_content; // ----------  is nullable
  DateTime created_at;
  int id;
  DateTime updated_at;
  Test2(
      {required this.client_content, // ------- but mark required
      required this.created_at,
      required this.id,
      required this.updated_at});

The purpose of this requirement is to sometimes add members to an entity. If the added member is nullable, I cannot know whether there is code elsewhere that needs to write a value to this member. If we mark the nullable member as required, it would be easy for me to spot the error in the editor and make the necessary modifications.

At the moment, this is not possible. You'd have to temporarily make the column non-nullable, use that to spot missing use-sites not setting the value, and then make the column nullable. But then as you write new code using the constructor you might miss values then.
I think we could have a build option to always make all parameters on these generated classes required.
Thinking about how these classes are supposed to always represent a complete row in the database, it would even make sense to me to eventually make that option the default.


text:
Foreign keys not working on moor_flutter 2.1.1

I want to enable foreign so according this suggestion : https://github.com/simolus3/moor/issues/41
i write this code:
@UseMoor(tables: [Tasks, Tags], daos: [TaskDao, TagDao])
class Database extends _$Database {
  Database()
      : super(FlutterQueryExecutor.inDatabaseFolder(
            path: 'db.sqlite', logStatements: true));

  @override
  int get schemaVersion => 2;

  @override
  MigrationStrategy get migration {
    return MigrationStrategy(
      onUpgrade: (migrator, from, to) async {
        if (from == 1) {
          await migrator.addColumn(tasks, tasks.tagName);
          await migrator.createTable(tags);
        }
      },
      beforeOpen: (engine, details) async {
        await engine.customStatement('PRAGMA foreign_keys = ON;');
      },
    );
  }
}

But i got this error:
The method `customStatement` isn't defined for the class `OpeningDetails'.
Try correcting the name to the name of an existing methods, or defining a method name 'customStatement'

https://pasteboard.co/J2qNnvX.png
This is my pubsspace:
dependencies:
  flutter:
    sdk: flutter
  moor_flutter: ^2.1.1

I find my mistake, I think it is true:
        beforeOpen: (db) async {
          await customStatement('PRAGMA foreign_keys = ON;');
        },

Yes, the engine parameter was removed in moor 2.0. We have updated docs here.


text:
The method 'group_by' isn't defined for the type 'SimpleSelectStatement'.

Hello,
I am using trying to count the number of entries per month and per year, however I am getting
The method 'group_by' isn't defined for the type 'SimpleSelectStatement'.
with the following query :
final filesPerMonth = dbFiles.id.count();
final query = select(dbFiles)
    ..addColumns([filesPerMonth])
    ..group_by([dbFiles.date.year])
    ..group_by([dbFiles.date.month]);

This is my table :
class DbFiles extends Table {
  TextColumn get id => text().clientDefault(() => _uuid.v4())();
  DateTimeColumn get date => dateTime()();

  @override
  Set<Column> get primaryKey => {id};
}

What I would like to get as a result of the query is a map withe the years containing a map with month and number of files, like this :
{
  2020: {01: 160, 07: 10},
  2019: {02: 55}
}

If any other informations are required, feel free to ask.
Thank you very much.

The problem is that addColumns turns the SimpleSelectStatement to JoinedSelectStatement, and groupBy only works on the latter. So you'd have to write your query like this:
final query = select(dbFiles).addColumns([filesPerMonth]);
query.groupBy([dbFiles.date.year, dbFiles.date.month]);

Note how we're only using one dot before addColumns.

Thank you very much this worked perfectly.


text:
Unable to log in

The gmusicapi has been working for me fine up until today. Based on my debugging, it seems Google may have restricted how we can log in.
So I've been using the Mobileclient to login with simply:
from gmusicapi import Mobileclient
api = Mobileclient()
api.login(email, password, Mobileclient.FROM_MAC_ADDRESS)

That now returns False.
After some debugging, it seems that when I get to line 170 in session.py:
res = gpsoauth.perform_master_login(email, password, android_id)

It now returns the following error in the dict:
u'ErrorDetail': u'To access your account, you must sign in on the web. Touch Next to start browser sign-in.', u'Error': u'NeedsBrowser'

Anyone else had this? Or maybe I've just forgotten to do something...

I've never seen this before. Auth seems ok for me right now.
Maybe they're doing some kind of step-up for suspicious logins? Or they're rolling out an auth change that my accounts haven't received yet?

I hope not!

@marcuspen I just experienced this myself. Turning on 2 Step Authentication and creating an Application Specific Password solved this for me.

Cheers @timgws . That seemed to work. We should probably add this to the readme / documentation. I don't mind adding this and making a PR?

@marcuspen that'd be great. https://github.com/simon-weber/gmusicapi/blob/971f948bdc8f8f8e943933357815b90a303bdff1/gmusicapi/clients/mobileclient.py#L30 would be a good spot for it.

@timgws I've got 2 step auth enabled but cannot login with an application specific password, google shows a dash on https://security.google.com/settings/security/apppasswords  in the column "last usage".
My test code:
     >>> from gmusicapi import Mobileclient
     >>> api = Mobileclient()
     >>> print api.login(u, p)
     False

debug log:
version: 4.0.0
logging to: /home/xxx/.cache/gmusicapi/log/gmusicapi.log
2015-10-31 15:17:19,590 - gmusicapi.Mobileclient1 (shared:70) [INFO]: initialized
2015-10-31 15:17:19,596 - gmusicapi.Mobileclient1 (shared:93) [INFO]: logged out
2015-10-31 15:19:27,971 - gmusicapi.Mobileclient1 (shared:204) [DEBUG]: ClientLogin(<omitted>)

@pejobo it looks like you're on an old version. Upgrading to 7.0.0 should it :+1:

Hmm, my package manager says I'm on 7.0.0:
$ yaourt -Ss python2-gmusicapi
aur/python2-gmusicapi 7.0.0-1 [installed] (2)
    Allows control of Google Music with Python

Are there better means to see the version number?

Hm, the log is definitely from 4.0.0. Maybe you're referencing an old system-wide install when running the script?
You can try printing gmusicapi.__file__ or gmusicapi.__version__ in your script to narrow down which version you're running from.

Thanks for the hint, didn't pay attention to the log. Found the old version is in .local/lib. Thanks for your help, shame on me.

No worries! The only reason I know to look is because I've made the same mistake a million times :grin:

@pejobo I assume you were able to log in using the Application Specific Password after removing the older installed version of gmusicapi?

@timgws yes the login was successful (returned "True") and the google page showed me that the given app password has been used.

Whoops, forgot to close this one.

from gmusicapi import Mobileclient

api = Mobileclient()
api.login("", "",Mobileclient.FROM_MAC_ADDRESS)
False

authors: Jhilam2014 marcuspen pejobo simon-weber timgws

repo: simon-weber/gmusicapi


text:
🛑 Victoris Webby is down

In a272bf2, Victoris Webby (https://$VW_SITE1/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Victoris Webby is back up in c4f4710 after 8 minutes.


text:
Add support for storing OAuth2.0 tokens in AWS Secrets Manager

Closes #33, which features a substantive discussion about the design of this feature.
Objective
Provides an option to store tokens remotely in AWS Secrets Manager. By storing the authorization tokens remotely, this facilitates the administration of the proxy in a server-based configuration:

individual servers can be replaced without reauthorizing: a new server can fetch the remote tokens and remain authenticated as long as the tokens haven't expired
authenticating on a local computer can provide tokens to a headless server

Implementation
This implementation endeavours to minimize the complexity added to the proxy:

It adds an optional account-level configuration parameter, aws_secret:

[your.office365.address@example.com]
permission_url = https://login.microsoftonline.com/common/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/common/oauth2/v2.0/token
oauth2_scope = https://outlook.office365.com/IMAP.AccessAsUser.All https://outlook.office365.com/SMTP.Send offline_access
redirect_uri = http://localhost
client_id = *** your client id here ***
client_secret = *** your client secret here ***
aws_secret = *** ARN or name of secret in AWS Secrets Manager ***

The only dependency is boto3, and it is only loaded if one or more accounts have the aws_secret option specified in their config. This new dependency is documented in requirements-aws-secrets.txt

It adds new methods to the AppConfig class to handle the option of loading/saving OAuth 2.0 tokens from the remote AWS Secrets Manager.

These methods are only called from AppConfig._load() and AppConfig.save() if an account has the aws_secret option specified, which minimizes the risk that this new feature affects existing functionality.
These new methods are all named with the prefix aws_secrets.

If the proxy fails to access the AWS Secrets Manager, it logs an error but continues functioning normally: without fetching the remote secret, or without storing the secret remotely.

Manual Testing
I've tested this new feature quite carefully using the Terraform config in PR #1 of michaelstepner/email-oauth2-proxy-aws.
I've also verified that the proxy will seamlessly create the specified AWS Secret if it does not yet exist, using the Terraform config in PR #2 of michaelstepner/email-oauth2-proxy-aws.
This lists the various cases that are handled:

Proxy uses AWS-SM (AWS Secrets Manager) when secret is already created and populated
Proxy uses AWS-SM when secret exists but has no previously stored value
Proxy uses AWS-SM when secret does not yet exist, is specified with name, and IAM has permission to create it
Warning: boto3 is not installed
Warning: IAM user does not have secretsmanager:GetSecretValue permissions
Warning: secret does not exist, cannot create a secret with a specific ARN
Warning: secret does not exist, IAM user does not have secretsmanager:CreateSecret permissions
Warning: secret does not exist, IAM user does not have secretsmanager:PutSecretValue permissions
Warning: secret exists, IAM user does not have secretsmanager:PutSecretValue permissions

Thanks for this contribution! I've had a quick look and added some initial thoughts/suggestions.

@simonrob thanks for the careful review and thoughtful feedback! I plan to iteratively revise & respond to each point over the holidays, and will tag you in a comment when I've finished the first round of revisions.

@simonrob I did a pass through all your comments. Thanks again for the feedback!

I fixed a few minor issues and marked them resolved.
I asked a few clarifying questions for you.
I did some more research about error handling with boto3 and learned that the messiness of my first draft is not just a case of my inexperience. It's quite poorly designed and widely complained about.

I'm going to make some revisions after testing, but it's not going to end up as tidy as one would hope.

I will await your feedback on the clarifying questions before tackling the items that require more extensive testing with the AWS SDK.

@simonrob I've substantially refactored the code in commits 5b7d63b and 2c9c6be in order to:

Address all of your feedback in the code review thus far
Eliminate the proposed --aws-secrets argument, which was no longer necessary, so removing it simplifies configuration for the user.
Isolate the new code which implements the secrets manager within clearly-named methods in the AppConfig class

This feature only interacts with existing code via simple checks in AppConfig._load() and AppConfig.save() to see if AWS Secrets Manager functions should be called.

Provide more informative error messages

I'm much happier with this new design: I believe the code is more robust and more maintainable.
It's ready for a new round of code review when you have a chance.

I've approved all suggestions from your latest pass. Let me know if you find any issues running with these edits; otherwise I think this can be merged.

I've approved all suggestions from your latest pass. Let me know if you find any issues running with these edits; otherwise I think this can be merged.

Thanks @simonrob! I'll try to re-run my tests over the weekend so we can merge next week. I really appreciate the time you took to consider and improve my PR.

@simonrob based on @thiagomacieira's question in #33, I wonder if you'd like to adjust the way that we're specifying this feature in the config, in order to provide future flexibility for alternative token storage strategies.
Right now, we're enabling AWS Secrets Manager token storage by adding the following to config:
aws_secret = *** ARN or name of secret in AWS Secrets Manager ***

We could potentially modify the config syntax to "future-proof" it, ex:
token_storage = { "type": "aws_secrets_manager", "id": "*** ARN or name of secret in AWS Secrets Manager ***" }

In the future, if for example someone implemented token storage in an alternative local file, it could use the same config key, ex:
token_storage = { "type": "local", "file": "path/to/local/file" }

That's an interesting idea, but I wonder whether it is a little overly complex. Looking at the current implementation, is there actually any need to have a separate AWS Secrets Manager ID for each account entry, or could this be a global setting?
If not, both the AWS feature and the ability to store tokens in a local cache file could as you point out be implemented in a very similar way. I'd probably make this a little more generic, and have the AppConfig.save() method strip out everything except the key tokens from a ConfigParser deep copy, and then just pass this object to whichever saving method is configured. As it happens, this would also remove any issues with catch-all accounts, which makes things simpler in the AWS case too.
What do you think – could this all be handled via a global configuration parameter?

Although I don't personally store the credentials for different accounts in different locations, that's because I have only one account and am using the proxy in a single-user setting. I implemented it as an account-specific parameter because it seemed plausible to me that one might like to have separate access controls for the different accounts.
Suppose I'm running a remote server for two different users, each of whom I'd like to empower to update their own credentials from their local computers. If it's a global config parameter, then each user must have read/write access to each other's tokens. If it's an account-specific config parameter, then each user could have individual access controls to their own secrets.
Do you think the JSON value for token_storage is especially complex? It seems like it would be a very small change to the current code, although it allows complete flexibility for the configuration of other token storage options in the future. (Which I suppose could become complex, although they could remain simple.)

I think it becomes overly complex once additional external token stores come into the picture. I'm also not sure how often the sort of situation you've outlined would actually happen - remember each user would also have to have their own copy of the proxy to re-authenticate periodically and then synchronise with the server. Is that likely?
I think it's probably more common that someone running that setup would either be an individual (like yourself) or an organisation that uses one of the O365 methods that removes the need for local OAuth.
If this is made a global setting then everything becomes much simpler (and easier to maintain) - if you want to add a new token store you are simply provided with a ConfigParser object, and you write all of its contents to whatever storage you like. There are no issues with any other proxy features either (except possibly client secret encryption, but it's unlikely you'd be using that in this case).

I'm also not sure how often the sort of situation you've outlined would actually happen - remember each user would also have to have their own copy of the proxy to re-authenticate periodically and then synchronise with the server. Is that likely?

Not sure! In this case we're entirely in the realm of speculation regarding future use cases that neither of us will personally face.

If this is made a global setting then everything becomes much simpler (and easier to maintain) - if you want to add a new token store you are simply provided with a ConfigParser object, and you write all of its contents to whatever storage you like. There are no issues with any other proxy features either (except possibly client secret encryption, but it's unlikely you'd be using that in this case).

Ultimately you're the maintainer of the package and I will gladly defer to you on the tradeoffs regarding flexibility vs complexity/maintainability.
Do you want to refactor the current PR to make the token storage a global setting?

I spent some time just now thinking about how to balance the complexity, multi-account inheritance, desire for other external token caches and ongoing maintainability. 2e6b641 is what I ended up with – this adds a new --cache-store script parameter, removes the ability to specify a different AWS Secret per account, and also adds a new requirement to use a prefix if specifying a name rather than an ARN. But it means that other cache stores can be added far more easily, and in my opinion is a bit more maintainable going forward.
What do you think?

@michaelstepner I'm pretty happy with this new version, but it'd be useful to get your feedback if you have time.

@michaelstepner any thoughts about this?

Thanks @michaelstepner for all the work on this – I think it's time to merge.

It wouldn't have happened at all without your idea and contribution, so no worries at all. Really glad to hear it works well with your tool; thanks again for the work on this.

authors: michaelstepner simonrob


text:
setup.py missing

setup.py seems to be missing, so the installation instructions in the docs do not work.

sorry, please do pip install . for now
On Wed, Sep 23, 2020 at 11:49 AM Mathew S. Madhavacheril <
notifications@github.com> wrote:

setup.py seems to be missing, so the installation instructions in the docs
do not work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/simonsobs/mapsims/issues/75, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAC5Q4QAITTLUHHU56DLD43SHI7NPANCNFSM4RXMK7HQ
.

This makes it difficult to develop mapsims, since one has to reinstall every time a file is changed.

I agree, actually if you have the requirements installed no need to install, run tests inside the folder. I'll fix the docs

ok, I've updated the docs.
I wanted to test poetry but I'm not convinced it is useful, I will leave this issue open and most probably will switch back to standard setup.py using the last astropy project template.

authors: msyriac zonca

repo: simonsobs/mapsims


text:
Truncate really long lines, but let user click to un-truncate them

Following #21 really long lines mean you have to scroll down a long way in the results page.

Demo:

Demo: https://ripgrep.datasette.io/-/ripgrep?pattern=.&glob=**%2Fcodemirror.js

repo: simonw/datasette-ripgrep


text:
list-roles command

Refs #61. Still needs:

[x] Implement pagination (see #63)
[x] Tests (lots of mocking needed for the --details option)
[ ] Fix the JSON in CSV bug
[x] Documentation

I indented the JSON. Here's a fun trick:
s3-credentials list-roles --tsv | pbcopy

Then paste that directly into the top left cell in Numbers to get the following:

Another fun demo:
% s3-credentials list-roles --csv | sqlite-utils memory stdin:csv 'select RoleName, AssumeRolePolicyDocument from stdin limit 2' -t
RoleName                                     AssumeRolePolicyDocument
-------------------------------------------  --------------------------------------------------
AccessAnalyzerMonitorServiceRole_J87R0IQVOP  {
                                               "Version": "2012-10-17",
                                               "Statement": [
                                                 {
                                                   "Effect": "Allow",
                                                   "Principal": {
                                                     "Service": "access-analyzer.amazonaws.com"
                                                   },
                                                   "Action": "sts:AssumeRole"
                                                 }
                                               ]
                                             }
apprunner                                    {
                                               "Version": "2012-10-17",
                                               "Statement": [
                                                 {
                                                   "Effect": "Allow",
                                                   "Principal": {
                                                     "Service": "build.apprunner.amazonaws.com"
                                                   },
                                                   "Action": "sts:AssumeRole"
                                                 }
                                               ]
                                             }


text:
V-72095 Does not Check for Blanket auditd Rules

This check finds all setuid and setgid programs on the system and attempts to match them with an auditd rule. However, this does not account for blanket rules such as the ones SIMP creates with the auditd:: audit_suid_sgid parameter.
This check could be updated to describe.one either the blanket rule or the individual rules.

I think this is a good idea. Also, if you check for the blanket rule, you can prevent trolling the entire filesystem which would be great.

authors: Bialogs trevor-vaughan


text:
Unable to resolve the .NET SDK version as specified in the global.json located ..path

Please help me!

just cloning repo in vs2022 and trying run but error list count 46 item this namedly error "Unable to res...

just download 6.0.300 in global.json SDK. This much!

repo: simplcommerce/SimplCommerce


text:
Expose SimpleInjectorAddOptions from SimpleInjectorAspNetCoreBuilder for easier integration

SimpleInjectorAddOptionsAspNetCoreExtensions.AddAspNetCore accepts a SimpleInjectorAddOptions and returns a SimpleInjectorAspNetCoreBuilder instance. ASP.NET Core integrations added as extension methods for SimpleInjectorAspNetCoreBuilder, but might sometimes require interacting with SimpleInjectorAddOptions.
To prevent those extension methods from having to add an SimpleInjectorAddOptions argument, SimpleInjectorAspNetCoreBuilder can have an Options property of type SimpleInjectorAddOptions.

feature-11 branch created.

feature-11 branch created.


text:
OC 1.5.5.1

Hello, Is there any version for the Hosted payment that will work with OC 1.5.5.1?

Hey @esk1mox
Versions v1.0.0 to v1.0.4
Compatible with OpenCart versions up to 1.5.6.4.

repo: simplifycom/simplify-opencart-module


text:
No inlay hints shown and commands missing

HI! I have a hard time setting up inlay hints: when I run Neovim, only a fraction of commands are available and no inlay hints are shown at all.
Here are the only commands prefixed with :Rust that Neovim recognizes (nothing Inlay Hints-related here!):

The inlay hints appear only when I manually run :lua require('rust-tools.inlay_hints').toggle_inlay_hints() from Neovim but that's the only way to make it work.
Is there anything I did incorrectly in my setup?
My plugin setup
I use a fairly minimalistic plugin setup that is mirroring suggested config options in rust-tools.nvim's README, so it should be working as expected.
  use {
    'neovim/nvim-lspconfig',
    config = function()
      require('lspconfig').clangd.setup {}
      require('lspconfig').rust_analyzer.setup {}
    end,
  }
  -- ...
  use {
    'simrat39/rust-tools.nvim',
    requires = {
      'neovim/nvim-lspconfig',
    },
    config = function()
      require('rust-tools').setup()
      require('rust-tools.inlay_hints').set_inlay_hints()
    end,
  }

Full Neovim plugin setup
https://github.com/kirillbobyrev/dotfiles/blob/19aa0c2ebb9cfe5c848b6c1b5f4050bd0c5c4403/.config/nvim/lua/plugins.lua
rust-tools.nvim version
HEAD, i.e. https://github.com/simrat39/rust-tools.nvim/commit/876089969aa8ccf8784039f7d6e6b4cab6d4a2b1
Neovim version
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by runner@fv-az87-780

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

Nevermind, somehow the Inlay Hints are back.

for anyone who has this issue in the future, make sure you haven't setup rust_analzyer using lsp config.

require('lspconfig').rust_analyzer.setup {}

this will cause some conflict causing certain commands to not be available

authors: kirillbobyrev officiallyaninja


text:
Add version detection macros to fix compilation errors in UE versions below 5.5

It appears that in version 5.5, they moved the namespace for InstancedStruct.h. I've added version detection macros to ensure backward compatibility.

Thanks!

repo: sinbad/SPUD


text:
Persist timeline position

I'd like to retain the last seen/read post position to avoid losing unread posts every day.
It will be possible it will be great!

Doesn't it already? See https://github.com/sindresorhus/anatine/issues/8.

It's nothing about the scroll. It refers to keep the last read post like when you read an ebook and get the last read page.

What about use the Tweet Marker (http://tweetmarker.net/) ?.
Tweet Marker is an award-winning, cross-platform web service for syncing the reading position between multiple Twitter clients.

:-1: I'm not particularly interested in this idea and it seems antithetical to Twitter. The whole point of the firehose is it'll be up to the newest activity when I come back. What if I scroll down on Friday and don't open the app until Monday? I'll be 3 days behind?

I disagree @paulmolluzzo, It's important not to lose unread posts. It's vital to get the last reading position to avoid it.

@paulmolluzzo Can you imagine reading an ebook without knowing what page you read before?

This is Twitter's default behavior. I follow a few hundred people and have no interest in reading every tweet since my last login to "catch up". Personally I would just scroll to the top every time.
This isn't an ebook, most tweets are standalone content that require little/no context or are in a reply thread, and, IMHO, fully 100% of Twitter is non-vital information. I don't care how many tweets I miss.
All that said, we can just agree to disagree. :smile: If other people want the feature and someone wants to do a PR go for it.

You can disable it if you want. If you don't read the posts of people you follow, why are you following them?.
It is a bit inconsistent, isn't it?

I'd also be interested in Tweet Marker support, so I thought I'd contribute my view and reasoning:

I read Twitter mostly on my phone because I dislike re-reading Tweets I've already read. Syncing read status between phone and desktop would make this a much more pleasant experience for me.
Scrolling up to the latest Tweet is my preferred method because it avoids 1. Whenever I scroll from top to bottom I end up reading old stuff I've already read (until I notice it).
If I find myself with a backlog of days I sometimes just Goto most recent, and maybe scroll down a bit to see what's up.
My personal preference would be to have both a Goto most recent and a Goto last read, but it's not strictly necessary.

I used to use Echofon for its ability to sync my read position across mobile and desktop. I stopped using it when I was following so many people I just couldn't keep up, that point will come eventually for most people.

authors: gingerbeardman kevva mafredri paulmolluzzo rbatllet

repo: sindresorhus/anatine


text:
Not picking up configuration

My .editorconfig file is:
# top-most EditorConfig file
root = true

# Default
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 3

# 2 space indentation
[*.{xml,yaml,yml,cson,md,ini,conf}]
indent_style = space
indent_size = 2

But PHP files are using Spaces:3 instead of Tabs:3:

Do I have something configured wrong?

My config file has been having issues being picked up as well. Does editorconfig require the default whitespace plugin to be enabled?

Mine too. When saving a .js file in version 0.208.0, editorconfig does not trim trailing whitespace with the following config:
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.hbs]
indent_style = space
indent_size = 2

[*.css]
indent_style = space
indent_size = 2

[*.html]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false

When I add the line trim_trailing_whitespace = true to the .js block, it does trim the trailing whitespace. So it doesn't seem to be picking up the global configuration.

+1

Ok I thought I was going crazy when on load It looks like Atom 1.0 is going to use my .editorconfig, however after about 2 seconds it reverts back to the Atom settings config and not using my projects .editorconfig.
+1 on this issue

@brandonb927 This has proven to be a difficult mess. And I know the Atom folks have struggles with the "right" solution in the case of the file content, .editorconfig, and Atom's preferences differing. I don't think I've worked out how the conflict is handled within Atom.
If you hand edit your file to make it conform to your .editorconfig settings, will Atom respect that on load even if Atom's preferences are different?

I'm not sure what you mean by "hand edit"? Do you mean that I should just edit the cson file manually to have it reflect my editorconfig settings?

Yes.

That... is not ideal :} I have an editorconfig in many projects I work on daily, switching between them frequently too. You're saying I should manually edit the Atom config whenever I switch then?

No. I'm saying that Atom does not seem to handle .editorconfig, it's preferences, and what it finds in a file well if they don't all match up. I was suggesting a way to fix that for one file - make that file match .editorconfig and see if that "sticks."

Ah, simple misunderstanding. I'll try that and see if it works.

@lee-dohn has written up a bunch on the topic.

+1 on this.
I have absolutely no idea on how this package works, but it sure does not apply my .editorconfig settings. What am I supposed to do? Autoindent? How does this indent my source files, exactly? Is there any kind of magic keyboard shortcut?

Hi,
I deleted the following two lines from C:\Users\xxx\.atom\config.cson and when I restarted Atom my .editorconfig settings seemed match the formatting when I beautify (Ctrl+Alt+B), but not when I edit (auto-indentation isn't correct, for example).
    softTabs: false
    tabLength: 4

I'm having the same problem.

Atom seems to be picking up on my config now

Hmm I realized that Atom also stopped picking up my config a few releases ago :(

Same here.

+1

:+1:

Maybe it wasn't such a good idea to close the issue?

+1

+1, not working for me

+1

+1

+1

+1

+1

+1

@rochapablo: I would really appreciate if you could open a "new" issue with details about your problems.
For anyone else landing here: The atom-editorconfig-plugin is in a stable and mostly tested state and should work as intended.
The editor might behave unexpected if third-party plugins or languages conflict with the editorconfig-settings and/or the file is already malformed according to the editorconfig-rules.
ℹ Please open a new issue in that case - we're happy to help.
P.s.: please do not post to this issue. Since the plugin has evolved a bit in the past weeks it is absolutely unlikely that your issue belongs in any way to the reasons why this was opened in the first place.

this doesnt work

@noahehall: Please read my comment above - if you're facing any issues please open a new issue and consider especially:

The editor might behave unexpected if third-party plugins or languages conflict with the editorconfig-settings and/or the file is already malformed according to the editorconfig-rules.

Removing the "whitespace" plugin from config.cson and restarting atom solved this for me.

@kaifaust That worked for me too, thanks.

👍🏼

authors: EloB bobrocke brandonb927 bux578 c4milo carsy ezekg florianb garretmh gitgrimbo hiddentao ismay jaimeschettini jbatte47 kaifaust lucasmotta marcelombc matias91 nfantone noahehall rochapablo sikhote verlok

repo: sindresorhus/atom-editorconfig


text:
Add Node.js Best Practices

Re: Code of conduct bullet regarding existing items in the list
The nodebestpractices repository is better than the existing best practices resource as our content is much larger, and is a result of collaboration of the community, as opposed to one maintainer. That resource also seems to be out of date.
https://github.com/i0natan/nodebestpractices
By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 🖖
⬆⬆⬆⬆⬆⬆⬆⬆⬆⬆

This is an excellent resource. Thank you! :)

authors: js-kyle sindresorhus

repo: sindresorhus/awesome-nodejs


text:
update meow

Just like with dog names, also here, that meow@5 dependency triggers https://snyk.io/test/npm/meow/5.0.0 (the trim-newlines problem). Could this be updated please?

https://github.com/sindresorhus/cat-names/releases/tag/v3.1.0

authors: haraldschilly sindresorhus

repo: sindresorhus/cat-names


text:
Completely Signed and Notarized App doesn't work anymore when loaded from DMG

I created an app build and signed, notarized and stapled it completely.
See the Step Build, Sign & Notarize App in my github workflow.
This produces the 'dist' artefact, which is simply my complete dist folder uploaded as github actions artifact. You can:

download the zip directly: https://github.com/bjesuiter/macos-file-summoner/suites/819538575/artifacts/9026758
Run the app directly after unziping
Check the app signature and notarization with spctl -a -vvvv /Applications/File\ Summoner.app
(after putting it into your Applications folder)

The Problem
When Installing the same app from the DMG created with create-dmg,
the app does appear to be valid by spctl, but it can't be run.
(You can download the dmg from the same github actions run directly here:
https://github.com/bjesuiter/macos-file-summoner/suites/819538575/artifacts/9026759)
❯ spctl -a -vvvv /Applications/File\ Summoner.app
/Applications/File Summoner.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: Benjamin Jesuiter (BB38WRH6VJ)

When running, it produces the following error message:
(Which reads: 'The app File Summoner.app can't be opened' in german)

Could you please look into what is going on here?

(You can download the dmg from the same github actions run directly here:
bjesuiter/macos-file-summoner/suites/819538575/artifacts/9026759)

That one opens successfully for me:

If the DMG works before notarization, but not after, I don't think it's an issue with create-dmg.

Thanks again for looking into my issue!
I think, there is a small misunderstanding.
I can open the dmg just fine.
But when I copy the app package from the dmg to the application folder, the app package can't be launched anymore.
My confusion is, that the same app package in the 'dist' artifact from one github actions job earlier can be opened without a problem on my Mac after unzipping.
The dmg you tested is already notarized, I have to add the unnotarized version to the artifacts for testing whether there is a difference between the notarized and the unnotarized dmg variant.

I found the issue:
I built, signed and notarized my mac app in one github actions job,
stored it as an artifact in github,
opened a new job for creating the dmg,
downloaded the stored app into the new job
and built the dmg.
The problem was, that the binary in the downloaded artifact was missing the -x execute flag because of the download from github artifacts.
So my mac app has been signed and notarized correctly, but the binary could not be executed on filesystem level.
Thanks again for looking into it!
Here's the link to the latest release, if you're interested: https://github.com/bjesuiter/macos-file-summoner/releases/latest
I'll look into submitting this to some awesome lists, because i think it solves a big problem in macos :)

authors: bjesuiter sindresorhus

repo: sindresorhus/create-dmg


text:
sticky-discussion-sidebar resets on leaving a comment (and other interaction)

sticky-discussion-sidebar is really a nice feature, unfortunately it "resets" when you leave a comment (or interact with the discussion in other ways):

This makes it pretty nasty to use, as you get used to have the sidebar in view all the time and are pretty confused when it is not.

I think this needs to be updated to use on-updatable-content-update

authors: fregante janpio

repo: sindresorhus/refined-github


text:
Stylize OP name in comments

Similar to how StackOverflow does it, can the OP name be stylized slightly differently when adding a comment to issues and pull requests?

Any suggestion on what kind of styling?

Something simple, like a background color?
If you look at any question on StackOverflow, you can see how the OP's name is displayed with a light blue background, including in any comments on the page, and also if the OP provides an answer.

Made a couple of mockups:

Gray border (matching the Owner/Contributor tags)

GitHub's normal link color

Light gray background, the same gray as the border above

// @schmuli @sindresorhus

Actually, I just noticed that when viewing your own comments, GitHub will add a slight blue background color to the whole comment header. Maybe something along those lines?
Otherwise, @jacobbearden mockups are great too, and also reuse existing GitHub styles/colors. I would probably go with the light gray background (3rd option).

I really like the badges from GitHub saying "Owner", "Collaborator", "Contributor". Do you think we could another one next to it saying "OP" or something like that?

I really like the badges from GitHub saying "Owner", "Collaborator", "Contributor". Do you think we could another one next to it saying "OP" or something like that?

This idea is most aligned with GH's styling. Also, it's more accessible than a colored BG or something, which might be hard to see/notice for some users.

It's also more explicit as some people might not be aware what the colouring is for.

The thing about using the badge is that the User may have their own "Owner"/"Collaborator"/etc. badge, and adding another badge might not be so clean.
Additionally, this feature will be included in the README of the extension, so anyone can find out about it and what decoration it will use. Personally, I don't like the abbreviation "OP", especially as a badge in this case.

The thing about using the badge is that the User may have their own "Owner"/"Collaborator"/etc. badge, and adding another badge might not be so clean.

They'd have to stack to the left. I'm not sure this is a major detraction.
(I used @hkdobrev here only because he had the "Collaborator" badge already.)

Additionally, this feature will be included in the README of the extension, so anyone can find out about it and what decoration it will use.

LOL, I'm not sure I've read the whole README on this project. :rofl:

Personally, I don't like the abbreviation "OP", especially as a badge in this case.

"OP" might not be the best choice, I agree. What about "Original Poster"?
BTW, there is another project that is more robust, but doesn't "follow" the poster through all comments in a thread. Check out: https://github.com/hzoo/contributors-on-github

@paulmolluzzo Having seen your mockup, I agree that this is not bad at all.

I'm still not sure whether "Original Poster" should be on the left or on the right side when there's a badge already, but I'm leaning more on keeping the original position of the GitHub badges and adding new ones on the left.

I'm still not sure whether "Original Poster" should be on the left or on the right side when there's a badge already, but I'm leaning more on keeping the original position of the GitHub badges and adding new ones on the left.

Sure. That works fine too.

It's important to note that the user badge is on the left when the comment is left on a line of code. Example: https://github.com/sindresorhus/refined-github/pull/369#discussion_r105855587

I think our custom badge should be where the native ones are, either right or left, depending on context.

@schmuli @jacobbearden @jgierer12 If you haven't done it already, can you contact GitHub support and request this feature?
From the readme:

Our hope is that GitHub will notice and implement some of these much needed improvements. So if you like any of these improvements, please email GitHub support about doing it.

authors: hkdobrev jacobbearden paulmolluzzo schmuli sindresorhus


text:
When linking to a line in a file, the generated link should go to the newest commit, not just the branch

Situation now:
If I view a single file (like https://github.com/sindresorhus/refined-github/blob/main/license) and click a line, a link is generated like https://github.com/sindresorhus/refined-github/blob/main/license#L5.
Idea:
Since branches are a moving target, links to specific lines break all the time. Opening a file in its respective commit is needlessly complicated in github (you have to click on the file's newest commit, find the file in the diff view and then view that file again). It would be nice (if at all possible) if Refined GitHub could replace the link in the browser's url bar with one containing the latest revision. For the example linked above, this would be https://github.com/sindresorhus/refined-github/blob/57eea6faad444ba299da53439a72438c61122a67/license#L5
Since GitHub's issue viewer inlines these links in funny and different ways, here are the links in a raw form:
https://github.com/sindresorhus/refined-github/blob/main/license
https://github.com/sindresorhus/refined-github/blob/main/license#L5
https://github.com/sindresorhus/refined-github/blob/57eea6faad444ba299da53439a72438c61122a67/license#L5

I just found out there is already a way to do this: When a line is marked, use the appearing dot menu to copy the permalink.


text:
Fix reaction avatars with changed GitHub copy

Fixes #178
GitHub added "reacted with ... emoji" which we add to the last username and add an invalid avatar.
/cc @DrewML

LGTM :ship:

authors: DrewML hkdobrev


text:
Provide configuration to create Galera cluster using Vagrant

It seems useful to have an multi-node Galera cluster running locally in a multi-node Vagrant environment. To do this I would like to devise and commit back:

A pull request to allow Chef Solo to be used (currently by defining the cluster IPs manually as opposed to using the search functionality of Chef Server/Zero e.g. https://github.com/armakuni/mariadb/commit/0f13f6eb1ae37203047b03c4e0aa3c181e3c7299 )
Vagrant configuration for a multi-node Vagrant e.g. https://gist.github.com/bendodd/f599fa25da9d5cd80162

Advice need:

Which recipe(s) needs to be run to create a cluster?
Confirm the recipes are idempotent
Confirm additional nodes can be added
Approach to node failure
Approach to node load balancing - e.g. HAProxy implementation

^^^ This would be good documentation, for at least me

Here you will find more documentation on Galera Specific case:
https://github.com/sinfomicien/mariadb/blob/master/galera.md
Will merge the info from the README about Galera into it soon. Does it sound good to help you ?

The PR #64 close this ticket.

authors: bendodd sinfomicien

repo: sinfomicien/mariadb


text:
Feature request: add case-insensitive search and wrap around

Feature request: please add a setting/config to make the search case-insensitive.
Ideally, also add wrap around setting/config to be able to go from the last search result to the first one by pressing "Next".

We have search functionality already

That should be an easy change. Can you submit a PR for it?
Make it options that user can choose

authors: Alspb singerdmx

repo: singerdmx/flutter-quill