text:
I am having an odd error while essentially following the library

error:``` C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\reader\DataReader.js:26
throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
^
Error: End of data reached (data length = 0, asked index = 4). Corrupted zip ?
at NodeBufferReader.checkIndex (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\reader\DataReader.js:26:19)
at NodeBufferReader.checkOffset (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\reader\DataReader.js:17:14)
at NodeBufferReader.readData (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\reader\NodeBufferReader.js:14:10)
at NodeBufferReader.readString (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\reader\DataReader.js:75:49)
at ZipEntries.isSignature (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\zipEntries.js:39:37)
at ZipEntries.readEndOfCentral (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\zipEntries.js:164:35)
at ZipEntries.load (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\zipEntries.js:255:14)
at C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\jszip\lib\load.js:48:24```
code in part" ```const automizer = new pptx2.Automizer({
templateDir: ui/resources,
outputDir: ui/resources,
useCreationIds: false,
autoImportSlideMasters: true,
removeExistingSlides: true,
cleanup: false,
compression: 0,
});
async function test () {
let pres = automizer
.loadRoot('base.pptx')
.load('templateRef.pptx')
.load('generated.pptx')
.addMaster('generated.pptx', 1)
.addSlide('templateRef.pptx', 2)
.addSlide('templateRef.pptx', 3)
await pres.write(`create-presentation.test.pptx`);

expect(pres).toBeInstanceOf(pptx2.Automizer);

}
test();```

Hi! I'm sorry about your trouble, but it seems as if one of your .pptx files can't be decompressed by jszip. You could e.g. try to manually extract the contents of base.pptx, templateRef.pptx and generated.pptx and see which one is affected.
Did you create all of your template files with PowerPoint? If not, try to open and save the files in PowerPoint.
Please let me know if I could help.

I'm also seeing this: https://github.com/Stuk/jszip/issues/543. It could be a problem with larger files.

authors: Jcoumarb singerla

repo: singerla/pptx-automizer


text:
how to make it run with a source data in a .xlsx or a csv. file

Hi,
I have never worked with python. My objective is to make your code work with excel or csv file, as I have some collected twitter messages to be clustered. I have encountered two problems:

when i tried to run the example data, there is no output anywhere, the command line finished execution. Then nothing happened. Where can I see the output?
I don't know what exactly is the desired data source should look like, from code it looks like some html file. So how exactly can I parse a xlsx file with two columns: twitter id, twitter text?

Thanks!

Hi Vanessa, you do have python 2.7.x installed, right?
You want to run serial.py from the command line, like python serial.py eaxmple_data/Peerbelt.hello.bg.xs.chunked.zip. This will help you run the example.
Once that is working, you want to change the class PeerbeltLine to parse your csv. Given that you don't have html-formatted text, it is safe to remove the calls to BeautifulSoup.
Hope this helps.

Hi,
yes, I did install python 2.7.10. And run exactly as you recommended, but I didn't see any output in the console. Has it been output to somewhere else? Or what should I do additionally to check how the output look like?
Also, I didn't find the class "PeerbeltLine", do you mean this one "peer_belt_driver.py"?
Thanks!

Hi Vanessa,
You can use the peer_belt_driver.py code  or read_tweepy.py as examples on how to hook your code into a pipeline to process your tweets from the csv. You should need to write additional code to parse the csv / text file similar to what is is done in the peer_belt_driver.py to parse html files.
Hope this helps, please let us know if it doesn't.

Hello.
I seem to have the same problem.
I am trying to run the code in the in-memory database using your example data.
I have installed Python 2.7.10.
I have modified settings.py in order to select the in-memory database.
When I am trying to run serial.py from the command line as following
py -2 serial.py example_data/Peerbelt.hello.bg.xs.chunked.zip
although the process is completed without any errors, I can not find the output of that process.
Am I doing something wrong? Is a file created but I cannot find it? Or I am missing the point entirely?
Any help would be much appreciated

Hi Ilias Chanis,
This code was working on Google App Engine. The instructions on the home page should still work, though it's possible they have made changes in the platform that are not backward compatible.
If you find that's the case, I'm happy to help make it run in the "upgraded" environment. I suggest trying to run it as-is. And once that works, adapting it to the in-memory database.
Good luck, and if it fails in the AppEngine environment, I'm happy to get it working again in that environment.
Best,

Thank you for responding singhj.
So, if I understood correctly, there is no way to run the code entirely in your own PC, the only way is by creating a Google App?
Because as stated in your homepage, there is an option to run it using an in-memory database (which i thought it meant that you can run it entirely on your own machine).
Thank you in advance,

source: gharchive/issue

repo: singhj/locality-sensitive-hashing

license: mit

license_type: permissive

license_source: bigquery


text:
[python] Adding missing context in ingest uns ndarray

Issue and/or context: Hypothesized cause of https://forum.tiledb.com/t/tiledberror-tiledb-s3-error-storing-h5ad-with-soma-format/602/1 -- although I cannot yet repro this myself on a cross-region write.
Changes: Add the visibly missing context argument in the particular .open
Notes for Reviewer:

Codecov Report
Patch coverage: 100.00% and project coverage change: +26.63 :tada:

Comparison is base (e11e495) 64.66% compared to head (7a9890a) 91.29%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1552       +/-   ##
===========================================
+ Coverage   64.66%   91.29%   +26.63%
===========================================
  Files         104       30       -74
  Lines        8685     2551     -6134
===========================================
- Hits         5616     2329     -3287
+ Misses       3069      222     -2847

Flag
Coverage Δ

python
91.29% <100.00%> (ø)

r
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

apis/python/src/tiledbsoma/io/ingest.py
84.92% <100.00%> (ø)

... and 74 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

source: gharchive/pull-request

authors: codecov-commenter johnkerl

repo: single-cell-data/TileDB-SOMA

license: MIT

license_source: github-api


text:
perf: unbounded memory usage

Describe the bug

When ingesting data into RisingWave without QPS limit, memory usage keeps growing.
To Reproduce
Run TPC-H bench.
Expected behavior
Memory usage should be limited.
Additional context
will update config and git hash later

config:
shared_buffer_threshold = 268435456
sstable_size = 268435456
block_size = 4096
bloom_false_positive = 0.1
data_directory = "hummock_001"
async_checkpoint_enabled = true
block_cache_capacity = 268435456
meta_cache_capacity = 67108864

I'll double check tomorrow and run some benchmarks on latest main...

I guess it's due to "almost unlimited" block cache size: https://github.com/singularity-data/risingwave/issues/2578#issuecomment-1128874077

Oh, that's true. I forgot this again 🤣 Let me check this and revert the config change tommorrow.

block_cache_capacity is actually the memory usage instead of entry cnt, so it's 256MB here indeed. I'll bench again later with latest main 😇

repo: singularity-data/risingwave


text:
Navi

old structure (about with subelements)
new typo
change order of contact and news

do not merge, until @SandyStrobel and/or @julehen give their ok

repo: sinnerschrader/sinnerschrader-website


text:
Create phraseActions.yml & add self assignment on comment

/assignme or /assign me - assigns the issue to commentor

is there anyway to make the phrase trigger case-insensitive?

I think yes

GitHub ignores case when comparing strings.
Source: https://docs.github.com/en/actions/learn-github-actions/expressions#operators

random edge case i though of.
If someone types '... test/assignment ...'. This would get the issue assigned to that person who didn't actually want to be assigned.

might as well add a '/unassignme' and '/unassign me'. That way we don't have to worry about unintentional assigns lol.

You can unassign yourself from UI

mb, I didn't know.
LGTM

If someone types '... test/assignment ...'. This would get the issue assigned to that person who didn't actually want to be assigned.

tried fixing it.
Any more edge cases?

I actually don't like this approach.
At this point I think the logic should be handled inside bash.

I am saying this because I want to make it able handle things like assigning tags, stale issues, running tests, running scans, etc.

Is it possible to use a regex match

Yes, but the workflow will every time have to spin up ubuntu & do regex in bash. Right now bash only sends the POST request.

Or maybe we can go ahead & make the bot interact on GitHub too or make another bot for this.

GPT-4 suggested this. can you test this?
Prompt:
I want to build a github action that will assign an issue to a specific user on which they comment `/assignme` or `/assign me`. But it should only work when nothing else is in the message

Code:
name: 'Assign Issue'
on:
  issue_comment:
    types: [created]

jobs:
  assign_to_user:
    runs-on: ubuntu-latest
    steps:
    - name: Assign issue to user
      uses: actions/github-script@v3
      with:
        script: |
          const commentBody = context.payload.comment.body;
          const issue = context.payload.issue;
          if (commentBody.trim() === "/assignme" || commentBody.trim() === "/assign me") {
            const assignee = context.payload.comment.user.login;
            github.issues.addAssignees({
              owner: context.repo.owner,
              repo: context.repo.repo,
              issue_number: issue.number,
              assignees: [assignee]
            })
          }

This did create an Ubuntu instance.

A simpler way is to just ask the command users to add a leading & trailing space for it to work.

I think starting with \assign me will work, we dont need extra ifs

@droxtal  Thanks 👍 , looks good to me; maybe in the future, we can add more functionality
Welcome aboard ⛵

authors: droxtal kry0sc0pic sinsniwal

repo: sinsniwal/iitm-server-bot


text:
Sisimai string improvement

Improved code at Sisimai::Data to remove string like "550-5.1.1" from an error message for to be matched exactly with regular expressions defined in each class of Sisimai::Reason.

Coverage increased (+0.02%) to 94.943% when pulling 750a12c9c166e995a9d9cd8952bd1127f2765f90 on sisimai-string-improvement into 3cde0fd3638b6fd6f8305fd5a121a379a96034dc on master.

authors: azumakuniyuki coveralls


text:
Add Sitecore 8.2 rev. 161221 (Update 2)

Adds Sitecore 8.2 rev. 161221 (Update 2) standalone installation. Includes:

Sitecore images for Win 1709 and 1803.
SQL images
Test docker-compose

Looks good. Is this version something that you actively use? It's pretty old :) I was kind of hoping to not have every single older version here, but again if you have a need I will accept your PR.

Yep, I still use it ;)
Question: I decided to go with sitecore-base tag name like in 9.x images. Would it be ok if I send another PR getting rid of the sitecore repository in all the existing 8.2 images? It seems there is no need in keeping both.

I see that you have called the new 8.x image sitecore-base, this is as intended when it's not a base image for other images (like with the 9.x images). The other base images are not intended to use directly but only as base for other images for a given version.

Renamed to sitecore. Please take a look when you have time.

Thank you! Can you please rename the folder also? then we are good to go.

Folder? Sorry, do not understand which one...

My fault, the folder name is correct :) I will merge now and thank you!

authors: pbering sergeyshushlyapin

repo: sitecoreops/sitecore-images


text:
SSLCertVerificationError

Describe the bug
Not able to run the script
The collection you were trying to download
Any Random collection for test
Expected behavior
It should download
Terminal output (please show the error that the console showed)
(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

@santosh-kumar-kaushal Are you on macOS?

authors: santosh-kumar-kaushal sj-dan

repo: sj-dan/OpenSea-NFT-Stealer


text:
27 Recruiter Page- Live Career Fair w/ Students in Queue Component

issue #27 recruiter page- live career fair w/ students in queue component

added the live career fair page for recruiters
this page includes the queue where students are waiting to meet with recruiter
recruiter are able to join a meeting with a students and also view their resume/basic profile
you can get to this page from the home page by clicking "get started" for recruiters, and then "join now" on the live career fairs section

for visual approval:
before considering backend feasibility:

after considering backend feasibility:

@sjoshi804 this is the frontend for the recruiter live career fair page! does this look feasible with the backend? lmk if you want any modifications made to this

This looks good, but is a bit of an issue with respect to our backend functionality.
In particular, there is no way to look at all students in a queue.
What do you think about something like this instead?

We should probably discuss frontend tomorrow to clarify what pages since we figured out our API on sunday

We should probably discuss frontend tomorrow to clarify what pages since we figured out our API on sunday

@sjoshi804 Okay, I changed the entire page to match what you have based on the image you attached above! It now has an editable form that has the student applicants' names, interests, notes, and resume. Also has a component card with time left, students remaining, and join now button that links to a Google meet. I attached another gif in the description! You can check it out there.


text:
Bitbucket:288 ランチャーアイテムのボタン間に区切りを表示

ほったん: https://groups.google.com/forum/#!topic/pe_development/6JBix9xueQI
FormsとWPFでその辺りの実装方法が異なるのでWPF終わってからそもそも可能なのか調査する。

BitBucket から移植

項目
内容

元課題
#288

起票日時
2015-08-16T15:52:53Z

起票者
sk_0520

Removing component: PeMain-Toolbar (automated comment)

BitBucket から移植

項目
内容

元コメント
#288 コメント

コメント日時
2020-02-24T21:18:24Z

コメントユーザー
sk_0520

LauncherGroupItems にカラム追加すれば気持ちいけるけどテーブルの使い方が完全に実装に合わせてるからそうもいかんのよなぁ。
明日以降やる。

BitBucket から移植

項目
内容

元コメント
#288 コメント

コメント日時
2020-09-23T21:16:57Z

コメントユーザー
sk_0520

やっぱあとでやる。

BitBucket から移植

項目
内容

元コメント
#288 コメント

コメント日時
2020-09-24T20:16:23Z

コメントユーザー
sk_0520

フィードバック: 9
アイコンの上下に仕切りの－があれば見やすくなると思う。

license: WTFPL


text:
Bitbucket:551 もしかしてだけど Pe から Pe.Main に --wait が飛んでる？

たぶん飛んでる。
不要なので飛ばさなくてもいいんだけど、処理が難しいならもうこのままでもいいかなぁと思ってる。
(Cでコマンドライン引数ぐちゃぐちゃさわるのしんどい)

Software: Pe
Version: 0.88.000-9f7ef85d2083c34d7b486d9eb2f902a91f6465de
BuildType: Release
Process: 64
Platform: 64
OS: Microsoft Windows NT 10.0.18363.0
CLR: .NET Core 3.1.1

BitBucket から移植

項目
内容

元課題
#551

起票日時
2020-03-02T21:00:03Z

起票者
sk_0520

とんどるわー。
めっちゃ面倒、もう対応せんでいいんちゃう？

BitBucket から移植

項目
内容

元コメント
#551 コメント

コメント日時
2020-03-04T18:37:21Z

コメントユーザー
sk_0520


text:
UI: Start of front-end styling

This PR adds some basic CSS, as well as roughing out support for future static pages. Right now it only "prettifies" the login and registration forms. More work will come in the future.

Coverage remained the same at 85.221% when pulling fde46f4e97a293a4ecee5fd2ebd1b526b2003a7b on sylae:master into 48e6fb32f9b20406f58fb2f9cf37727e2a440e84 on skairunner:master.

authors: coveralls sylae

repo: skairunner/pctnet


text:
Content of element cut off by script tag at the time the created callback is fired

If you have an element that uses the current innerHTML of an element:
document.registerElement('my-element', {
  prototype: Object.create(window.HTMLElement.prototype, {
    createdCallback: {
      value: function () {
        console.log(this.innerHTML);
      }
    }
  })
});

And the content of that element contains a

</my-element>

The console.log() from the component will only log:

And will not include any content after the first script tag. This only happens when the usage of innerHTML happens synchronously. If you registered the component after the element was put on the page, or use innerHTML asynchronously, then this does not happen.
Test case:
<!doctype html>

    <my-element>

    </my-element>

Trying to reproduce this in something like JSBin won't work even if you paste it in to the HTML tab and don't use the JavaScript tab. I think they still munge the HTML so that scripts are executed on DOMContentLoaded. It must be a normal HTML document.
I think this is because when the first script tag is encountered it blocks the rest of the content from executing. Using defer or async don't yield any results. I wonder if this is a bug in Chrome.

Logged on the Chromium and V8 bug trackers.

https://code.google.com/p/chromium/issues/detail?id=502872
https://code.google.com/p/v8/issues/detail?id=4204

From the responses I got, this is intended behaviour because:

When the base element queue (list of elements that need to be processed) becomes non-empty, a microtask is queued to process them.
When the closing tag to the script element is encountered, it causes the microtask to execute, which causes the custom element's lifecycle to be invoked from that exact point. Everything after it doesn't get processed until that microtask is finished.

This is translated from what I have read and the response on the Chromium issue. Our take-away from this should be that you cannot rely on the content inside a custom element to be complete by the time the created lifecycle callback is invoked. This shouldn't be a problem for most use-cases, but if you're templating engine uses the initial innerHTML from the element, it may not be complete and cause improper rendering. Currently, I've no solution for this other than to defer template rendering until you can be sure the html has been rendered (setTimeout()). This does not affect core Skate.

repo: skatejs/skatejs


text:
Added wildcard search

I've added wildcard searching.  I made most of the changes in the validator._parseRules function in order to be able to generate the rules based on the property paths for the attribute and the rules; particularly around the required_if rules.
So, given the object
{ id: 2,
addresses:[
{street: "", city:"Nashville", requireStreet: true },
{street: "", city:"Nashville", requireStreet: false }
]}
and the validation rule:
{
"addresses..street: required_if:addresses..street.requiredStreet,true"
}
The following rules are what are actually applied.
{
"addresses.0.street: required_if:addresses.0.street.requiredStreet,true",
"addresses.1.street: required_if:addresses.1.street.requiredStreet,true"
}
Thanks,
Brian

@bricox Thanks! Could you also update the README? You can base it off of Laravel's documentation, or just copy it if it behaves the same way.
@garygreen @LKay Want to also review?

Yes, I'll update the readme.  I also plan to add documentation about the required_if option.  I believe that is missing from the readme right now.

@bricox cool thanks let me know when that is done.

Looks fine, I guess.
Btw. What about this typescript rewrites code I put a while ago?

@LKay I'll address it in that issue.

@bricox any update?

@skaterdav85 Has this been implemented?  Desperately need validation on array objects. :)

Hi guys, this idea died?

@alanhr Looks like there are some merge conflicts.   If you could cure them and make sure all tests pass (as well as adding any tests which support your work), I will have a look and merge accordingly.

ok @mikeerickson,  I'll try solved theses problem and do more tests

Hi
This has some progress ? It's really necessary
Thanks

hi @blacktrue ,
Today I was done  this PR #190 with these fix

authors: LKay alanhr blacktrue bricox itaylorweb mikeerickson skaterdav85


text:
Codeblock not working correctly with mdsvex

Current Behavior
I can pass a string into the Codeblock prop without issues, however passing line numbers or buttonCopied isn’t working for me. Also, the animation upon clicking copy does not work, nor does the text copying at all.
I am not using your highlight store, but doing Syntax highlighting with highlight js myself.
Here is an example of what I have tried:

<CodeBlock language="rust" code={code} buttonCopied="test" lineNumbers=True/>

Expected Behavior

Clicking the copy button should copy the text and display the thumbs up emoji (or whatever was passed into the prop)
Line numbers should show up when passing in the line numbers prop

Steps To Reproduce
mdsvex config:
import { defineMDSveXConfig as defineConfig } from 'mdsvex';
import relativeImages from 'mdsvex-relative-images'
import autolinkHeadings from 'rehype-autolink-headings'
import slugPlugin from 'rehype-slug'
import remarkExternalLinks from 'remark-external-links'
import readingTime from 'remark-reading-time'

const config = defineConfig({
	extensions: ['.svelte.md', '.md', '.svx'],

	smartypants: {
		dashes: 'oldschool'
	},

	remarkPlugins: [
		readingTime(),
		relativeImages,
		// external links open in a new tab
		[remarkExternalLinks, { target: '_blank', rel: 'noopener' }],
	],
	rehypePlugins: [
		slugPlugin,
		[
			autolinkHeadings,
			{
				behavior: 'wrap',
			},
		],
	]
});

export default config;

.md file:
---
title: Markdown test
date: 2021-08-30
published: true
tags:
  - svex
  - markdown
  - svelte
  - skeleton
---

This is just here whilst I'm testing a few things.

<CodeBlock language="rust" code={code} buttonCopied="test" lineNumbers=True/>

Package.json
{
	"name": "veloxide.dev",
	"version": "0.0.1",
	"private": true,
	"scripts": {
		"dev": "vite dev",
		"build": "vite build",
		"preview": "vite preview",
		"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
		"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
		"test:unit": "vitest",
		"lint": "prettier --plugin-search-dir . --check . && eslint .",
		"format": "prettier --plugin-search-dir . --write .",
		"codegen": "kysely-codegen --dialect postgres --out-file ./src/lib/db.d.ts"
	},
	"devDependencies": {
		"@floating-ui/dom": "^1.4.4",
		"@iconify-json/fe": "^1.1.6",
		"@skeletonlabs/skeleton": "^1.9.0",
		"@sveltejs/adapter-auto": "^2.0.0",
		"@sveltejs/kit": "^1.5.0",
		"@tailwindcss/forms": "^0.5.3",
		"@tailwindcss/typography": "^0.5.9",
		"@total-typescript/ts-reset": "^0.4.2",
		"@types/gtag.js": "^0.0.12",
		"@types/pg": "^8.10.2",
		"@types/showdown": "^2.0.1",
		"@typescript-eslint/eslint-plugin": "^5.45.0",
		"@typescript-eslint/parser": "^5.45.0",
		"autoprefixer": "^10.4.14",
		"better-sqlite3": "^8.4.0",
		"eslint": "^8.28.0",
		"eslint-config-prettier": "^8.5.0",
		"eslint-plugin-svelte": "^2.26.0",
		"highlight.js": "^11.8.0",
		"kysely-codegen": "^0.10.1",
		"mdsvex": "^0.11.0",
		"mdsvex-relative-images": "^1.0.3",
		"postcss": "^8.4.25",
		"prettier": "^2.8.0",
		"prettier-plugin-svelte": "^2.8.1",
		"rehype-autolink-headings": "^6.1.1",
		"rehype-slug": "^5.1.0",
		"remark-external-links": "^9.0.1",
		"remark-reading-time": "^2.0.1",
		"sass": "^1.64.0",
		"sqlite3": "^5.1.6",
		"svelte": "^3.54.0",
		"svelte-check": "^3.0.1",
		"tailwindcss": "^3.3.2",
		"tslib": "^2.4.1",
		"typescript": "^5.0.0",
		"unplugin-icons": "^0.16.5",
		"vite": "^4.3.0",
		"vitest": "^0.25.3"
	},
	"type": "module",
	"dependencies": {
		"@lucia-auth/adapter-postgresql": "^1.0.1",
		"html": "link:highlight.js/lib/languages/html",
		"kysely": "^0.26.1",
		"lucia-auth": "^1.8.0",
		"pg": "^8.11.1",
		"rehype-document": "^6.1.0",
		"rehype-external-links": "^2.1.0",
		"rehype-format": "^4.0.1",
		"rehype-infer-reading-time-meta": "^1.1.0",
		"rehype-meta": "^3.3.2",
		"rehype-parse": "^8.0.4",
		"rehype-sanitize": "^5.0.1",
		"rehype-stringify": "^9.0.3",
		"remark-parse": "^10.0.2",
		"remark-rehype": "^10.1.0",
		"showdown": "^2.1.0",
		"unified": "^10.1.2"
	}
}

Link to Reproduction / Stackblitz
No response
More Information
Svelte Config
import { mdsvex } from 'mdsvex';
import mdsvexConfig from './mdsvex.config.js';
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @type {import('@sveltejs/kit').Config} */
const config = {
	extensions: ['.svelte', ...mdsvexConfig.extensions],

	// Consult https://kit.svelte.dev/docs/integrations#preprocessors
	// for more information about preprocessors
	preprocess: [vitePreprocess(), mdsvex(mdsvexConfig)],

	vitePlugin: {
		inspector: true
	},

	kit: {
		// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
		// If your environment is not supported or you settled on a specific environment, switch out the adapter.
		// See https://kit.svelte.dev/docs/adapters for more information about adapters.
		adapter: adapter()
	}
};
export default config;

@liamwh
I didn't try your setup with mdsvex but you have incorrect syntax in the CodeBlock.
you should either do:
<CodeBlock language="rust" code={code} buttonCopied="test" lineNumbers/>

or
<CodeBlock language="rust" code={code} buttonCopied="test" lineNumbers={true}/>

after changing this, the component should work as expected, please confirm it, If it is still not working I will replicate your setup and try to find the problem. 😄

@liamwh just following up to check if this resolved your issue or not

Unfortunately the problem is not resolved. Even if I just do this:

    <CodeBlock language="html" code={`<div>This is meta</div>`}></CodeBlock>

The button still doesn't work with mdsvex. Double checked and there are no console errors.

@liamwh thanks for confirming. We'll take a look.

@liamwh , fwiw, I've had issues getting Skeleton's CodeBlock utility to work inside of MDSveX. I'm not sure, but I think MDSveX's built in syntax highlighter somehow interferes. I've found it much easier to just use MDSveX triple fenced blocks, and they work just fine inside of Skeleton. Other users have definitely added copy buttons to those (https://github.com/pngwn/MDsveX/issues/385).

@liamwh thanks for confirming. We'll take a look.
In the meantime it might be worth looking at using Highlight.js directly per their instructions here:
https://highlightjs.org/usage/

I am already using it directly, so syntax highlighting is fine. Just the copy button and line numbers aren't working 🤔

@liamwh we're going to close this due to inactivity. Happy to reopen if the suggestions above are tested and and reproduction is provided though.

authors: Mahmoud-zino endigo9740 liamwh riziles

repo: skeletonlabs/skeleton


text:
Update how keyed feature works in the Table of Contents docs

Link to the Page
https://www.skeleton.dev/utilities/table-of-contents
Describe the Issue (screenshots encouraged!)

We need a few small changes:

Self reference how this is used in the doc site (page tabs update on change)
Change the const to a let to indicate this value can change
Implement a simple example of how this can change, and what it will do:

let tabindex = 0;
// tabindex = 1; -> triggers an update!

I can give this a go.


text:
Toast preset setting currently only works with success and error

Current Behavior
Currently when using the Toast utility, the preset property only works when using success or error. This is because tailwind classes cannot be constructed dynamically the way its done with the Toast component. @endigo9740 Is aware of this bug and request a ticket is made so it doesn't get forgotten
Work Around
You can just use the classes property in toastSettings to set the color. E.G !bg-warning-500
Steps To Reproduce
Follow steps on Skeleton.dev for creating a Toast element, set preset to "warning" and it defaults to secondary color.
Anything else?
No response

General idea is we've set this up to dynamically generate the Tailwind class within the toastStore. But Tailwind doesn't allow for this. So we need to instead pass a direct reference for the class through or ensure we expand the Switch/Case to cover all color options.

@JustBarnt This has been resolved and will be part of the new release next week. Thanks!


text:
'AES' object has no attribute 'block_size'

I am getting an AttributeError when trying to decode blobs using master key. I installed pypykatz using pip. It looks like a problem with dependencies. Do I need to install any additional package(s) with pip?
pypykatz dpapi blob masterkey encrypted_key.blob

Traceback (most recent call last):
  File "/usr/sbin/pypykatz", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.10/site-packages/pypykatz/__main__.py", line 89, in main
    helper.execute(args)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 121, in execute
    self.run(args)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 233, in run
    dec_sec = dpapi.decrypt_securestring_file(args.blob)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 541, in decrypt_securestring_file
    return self.decrypt_securestring_hex(data)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 536, in decrypt_securestring_hex
    return self.decrypt_securestring_bytes(bytes.fromhex(hex_str))
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 533, in decrypt_securestring_bytes
    return self.decrypt_blob_bytes(data)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 449, in decrypt_blob_bytes
    return self.decrypt_blob(blob, key = key)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 434, in decrypt_blob
    return dpapi_blob.decrypt(key)
  File "/usr/lib/python3.10/site-packages/pypykatz/dpapi/structures/blob.py", line 109, in decrypt
    cleartext = unpad(cipher.decrypt(self.data), cipher.block_size)
AttributeError: 'AES' object has no attribute 'block_size'

This is a bug caused by the change of crypto library in the recent month and the lack of tests on the DPAPI module.

@skelsec I'll check it out and probably make a PR, thanks!

Don't sweat it, modifying these 2 lines solve the problem:
cleartext = unpad(cipher.decrypt(self.data), ALGORITHMS_DATA[self.crypto_algorithm][3])
hash_block_size = ALGORITHMS_DATA[self.hash_algorithm][4]

Looks good, thanks. I get another error though, might be or might not be related.
ValueError: Input is not padded or padding is corrupt

I am pretty sure my input is correct. It's an encrypted chrome aes key. I stripped the "DPAPI" prefix.

can you provide a stack trace? (the ... part)
can you try with an older version of pypykatz?
I'm testing the DPAPI now (with the modifications) and blob decryption looks okay to me

Which version should I try with?
$ pip show pypykatz
Name: pypykatz
Version: 0.5.7
Summary: Python implementation of Mimikatz
Home-page: https://github.com/skelsec/pypykatz
Author: Tamas Jos
Author-email: info@skelsecprojects.com
License: UNKNOWN
Location: /home/sealmove/.local/lib/python3.10/site-packages
Requires: aesedb, aiosmb, aiowinreg, minidump, minikerberos, msldap, unicrypto, winacl
Required-by:

$ pypykatz dpapi blob masterkey key.blob
Error! non-hexadecimal number found in fromhex() arg at position 0
Traceback (most recent call last):
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 230, in run
    bytes.fromhex(args.blob)
ValueError: non-hexadecimal number found in fromhex() arg at position 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/sealmove/.local/bin/pypykatz", line 8, in <module>
    sys.exit(main())
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/__main__.py", line 89, in main
    helper.execute(args)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 121, in execute
    self.run(args)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 233, in run
    dec_sec = dpapi.decrypt_securestring_file(args.blob)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 541, in decrypt_securestring_file
    return self.decrypt_securestring_hex(data)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 536, in decrypt_securestring_hex
    return self.decrypt_securestring_bytes(bytes.fromhex(hex_str))
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 533, in decrypt_securestring_bytes
    return self.decrypt_blob_bytes(data)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 449, in decrypt_blob_bytes
    return self.decrypt_blob(blob, key = key)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/dpapi.py", line 434, in decrypt_blob
    return dpapi_blob.decrypt(key)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/structures/blob.py", line 109, in decrypt
    cleartext = unpad(cipher.decrypt(self.data), ALGORITHMS_DATA[self.crypto_algorithm][3])
  File "/home/sealmove/.local/lib/python3.10/site-packages/unicrypto/backends/pure/padding/pkcs7.py", line 11, in unpad
    raise ValueError('Input is not padded or padding is corrupt')
ValueError: Input is not padded or padding is corrupt

I'd suggest 0.5.2 That one is before unicrypto got added.

Tested on a clean environment. I get the same error with v0.5.2.

in that case I believe the error could be that the masterkeys you have do not match the one which was used to encrypt the blob OR the decryption code is buggy.
you can check the masterkey GUID required by the blob by parsing the blob (no decryption) and the GUID of the header should match one of the GUIDS of the masterkeys you have.

Looks like there is a slight difference in the GUIDs. Could it be a version incompatibility?
$ pypykatz dpapi masterkey 865be7a6-863c-4d73-ac9f-233f8734089d prekeys
[GUID] 865be7a6-863c-4d73-ac9f-233f8734089d [MASTERKEY] 138f089556f32b87e53c5337c47f5f34746162db7fe9ef47f13a92c74897bf67e890bcf9c6a1d1f4cc5454f13fcecc1f9f910afb8e2441d8d3dbc3997794c630

cat encrypted_key.blob
01000000d08c9ddf0115d1118c7a00c04fc297eb01000000a6e75b863c86734dac9f233f8734089d00000000020000000000106600000001000020000000273b46c4c77da6aec6b84106322aaa686ba6ee18801ba89ef3674ba9b01e1e3a000000000e8000000002000020000000bfdc532d088604106c3adcf8abceaacafe54242c77d414c19382d2ff7ad877f43000000041c108468a6b567d2736ac03bc294c72393e3782260a547129b2ecb7ca9df129d2a3d8423a7e71c083a1c2400000003a4218497890c65b8514dbafd35f7ab87338602e4bb38ea5c581e1fe08776b4cb8e42bdd2f684a5725eadbc38d5ea8561296ca2e42ca41a3fe51d0761e5f6f790a%

If my comparason is correct then:
masterkey GUID:                      a6e75b863c86734dac9f233f8734089d
masterkey GUID used to encrypt blob: 865be7a6863c4d73ac9f233f8734089d

@skelsec could you please try decrypting this blob with this masterkey?

I can verify that decryption fails, thank you for providing the data.
At first glance it looks like either the encrypted.blob has errors at the end OR the parser code is incorrect somehow, as the end of the encrypted blob reports an impossibly large signature_length

I can verify the blob is not corrupted. Let me also provide the original source of the information, in case I did something wrong when extracting it:
AppData/Local/Google/Chrome/User Data/Local State
"os_crypt": {
    "encrypted_key": "RFBBUEkBAAAA0Iyd3wEV0RGMegDAT8KX6wEAAACm51uGPIZzTayfIz+HNAidAAAAAAIAAAAAABBmAAAAAQAAIAAAACc7RsTHfaauxrhBBjIqqmhrpu4YgBuonvNnS6mwHh46AAAAAA6AAAAAAgAAIAAAAL/cUy0IhgQQbDrc+KvOqsr+VCQsd9QUwZOC0v962Hf0MAAAAEHBCEaKa1Z9JzasA7wpTHI5PjeCJgrNbSTeklRxKbLst8qd8SnSo9hCOn5xwIOhwkAAAAA6QhhJeJDGW4UU26/TX3q4czhgLkuzjqXFgeH+CHdrTLjkK90vaEpXJerbw41eqFYSlsouQspBo/5R0HYeX295"
}

@skelsec
Hmm, after decoding this base64 string, I removed the first 5 bytes ("DPAPI" prefix) manually using a hex editor. Previously I was using the command cut -c 6- to achieve this. The two methods of removing the prefix yield different result! So you were right, cut -c 6- somehow corrupts the information. It seems to decrypt it just fine. Sorry for the confusion!
P.S.: The output could be improved:
Error! non-hexadecimal number found in fromhex() arg at position 0
HEX: 46befddb52a607c5e775b7a930b6b6c4f3a35e7c1c30aaa4ce0d2277fbca6c19
Traceback (most recent call last):
  File "/home/sealmove/.local/bin/pypykatz", line 8, in <module>
    sys.exit(main())
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/__main__.py", line 89, in main
    helper.execute(args)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 121, in execute
    self.run(args)
  File "/home/sealmove/.local/lib/python3.10/site-packages/pypykatz/dpapi/cmdhelper.py", line 238, in run
    print('STR: %s' % dec_sec.decode('utf-16-le'))
  File "/usr/lib/python3.10/encodings/utf_16_le.py", line 16, in decode
    return codecs.utf_16_le_decode(input, errors, True)
UnicodeDecodeError: 'utf-16-le' codec can't decode bytes in position 2-3: illegal UTF-16 surrogate

The decrypted information is not necessarily utf-16. Maybe the output could be more friendly instead of a stack trace in this case.

The reason you get that message is that I like stack traces, don't kink shame me.
You are using the incorrect decrypt function for chrome. Not your fault as I forgot to push the code for that part tho.
Please wait till I push the new code because it fixes another error which came in -again- because of the unicrypto lib.

Which step is wrong? The command pypykatz dpapi blob masterkey encrypted_key.blob? Ok, standing by =)

That command is okay, but I guess you want to see the actual logindata/cookies. There is a command to do just that in the not-yet-uploaded version

Try now with a clean environment, cloning master (new version uploaded)
There will be a new command for chrome like:
pypykatz dpapi chrome masterkey Local\ State --logindata Login\ Data

Thank you very much for the release! Works like a charm =)
P.S.: Nevertheless I'd like to know what went wrong while trying to decrypt the chrome key manually so I might post again here after investigating.

authors: sealmove skelsec

repo: skelsec/pypykatz


text:
Aaron-LaStarre-Kyng

https://github.com/octocat/Spoon-Knife/issues/34804

https://github.com/octocat/Spoon-Knife/issues/34804

repo: skills/introduction-to-github


text:
🛑 한울타리 mcfamily is down

In f95ec97, 한울타리 mcfamily (https://mcfamily.or.kr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: 한울타리 mcfamily is back up in ff585ea after 12 minutes.

repo: sknkwoxs/upptime


text:
Getting errors while navigating UI

Skooner version: stable
Metrics server version: 4.2
Getting error at cluster overview tab:

Error:
react-dom.production.min.js:209 TypeError: Cannot read properties of undefined (reading 'usage')
    at podRamChart.tsx:39
    at Ot (lodash.js:954)
    at Function.kn.sumBy (lodash.js:16567)
    at podRamChart.tsx:39
    at Gr (podRamChart.tsx:9)
    at Yo (react-dom.production.min.js:153)
    at Fs (react-dom.production.min.js:175)
    at ya (react-dom.production.min.js:263)
    at lu (react-dom.production.min.js:246)
    at au (react-dom.production.min.js:246)

Getting error at node details tab:

Error:
react-dom.production.min.js:209 TypeError: Cannot read properties of undefined (reading 'conditions')
        at node.tsx:149
        at Sn.render (node.tsx:64)
        at Ns (react-dom.production.min.js:182)
        at js (react-dom.production.min.js:181)
        at ya (react-dom.production.min.js:263)
        at lu (react-dom.production.min.js:246)
        at au (react-dom.production.min.js:246)
        at Qa (react-dom.production.min.js:239)
        at react-dom.production.min.js:123
        at t.unstable_runWithPriority (scheduler.production.min.js:19)

How to solve?

Looks like something isn't correctly testing for undefined. We'll take a look. thx!

That seems like it could be partially related to permissions to view those resources.  However the code does fail to check for this condition and assumes if it received a response, that it should proceed it looks like.  I just started using Skooner yesterday for a project, but will submit a PR this since I'm running into it too.

Also seeing these errors consistent under the same situations as @akelge - while viewing pods in the kube-system namespace or viewing nodes. Started happening when I upgraded to the latest version of skooner.

authors: ankurpshah herbrandson jeff-mccoy zemaj


text:
Problem with HomePageLogoUri when deploying STS project as Virtual Application on IIS

When I tried to publish STS.Identity project as Virtual Application as */auth subdomain of existing website  /images/skoruba-icon.png image defined under HomePageLogoUri parameter in appsettings.json is not shown properly in Home/Index.cshtml page.
Note: I deployed STS project under \auth virtual appliciation
After reviewing rendered HTML h1 element is rendered as:
<img class="icon" alt="Logo" src="/images/skoruba-icon.png"
but should be rendered as
<img class="icon" alt="Logo" src="/auth/images/skoruba-icon.png"
There is solution that will work in any cases

when STS project is deployed as normally
when it's deployed as subdomain or virtual application

Solution is:

To use @inject IUrlHelper UrlHelper that could be added

into Index.cshtml page directly or
into _ViewImports.cshtml

and to change h1 element from

@RootConfiguration.AdminConfiguration.PageTitle

to

@RootConfiguration.AdminConfiguration.PageTitle

Difference is in
src="@UrlHelper.Content(RootConfiguration.AdminConfiguration.HomePageLogoUri)"

appsettings.json entry
"HomePageLogoUri": "/images/skoruba-icon.png",
sholud be
"HomePageLogoUri": "~/images/skoruba-icon.png",

Screenshot 01 - defined IIS virtual applications under parent website

Screenshot 02  - current STS implementation

Screenshot 03  - layout after provided solution has been implemented

Thanks,
Sasa Tancev

Hi, can you please send PR for this? :-)
Thanks

Fixed in master, thanks 👍🏼

authors: skoruba tancevsasa


text:
Order of torchsummary and model.eval() change model behaviour

Dear torchsummary developer(s),
I really appreciate the function of your model but I found a kinda big thing/bug/feature today that fucked up a lot of my development (and computation time).
Apparently, the order in which you use summary(model, ()) and model.eval() matters a lot. Here is an easy example:
without the help of torchsummary:
model0 = models.resnet18(pretrained=True)
model0.eval()
dummy_input0 = torch.from_numpy(np.ones(shape=(1, 3, 224, 224))).float()
with torch.no_grad():
    output0 = model0(dummy_input0)
print(output0[0, :10])

this results in
[-0.0391,  0.1145, -1.7968, -1.2343, -0.8190,  0.3240, -2.1866, -1.2877, -1.9019, -0.7315]

Awesome - now we know what we can expect as output.
Let's try with torchsummary after the .eval():
model1 = models.resnet18(pretrained=True)
model1.eval()
torchsummary.summary(model1, (3, 224, 224))
dummy_input1 = torch.from_numpy(np.ones(shape=(1, 3, 224, 224))).float()
with torch.no_grad():
    output1 = model1(dummy_input1)
print(output1[0, :10])

results in
[-0.0391,  0.1145, -1.7968, -1.2343, -0.8190,  0.3240, -2.1866, -1.2877, -1.9019, -0.7315]`

Still working - cool.
Let's now mix some things up a bit: Let's try calling torchsummary before .eval():
model2 = models.resnet18(pretrained=True)
torchsummary.summary(model2, (3, 224, 224))
model2.eval()

dummy_input2 = torch.from_numpy(np.ones(shape=(1, 3, 224, 224))).float()
with torch.no_grad():
    output2 = model2(dummy_input2)
print(output2[0, :10])

results in
[-0.7597, -0.2707, -1.3314, -1.1444, -0.6266, -0.0564, -1.3227, -0.8387, -1.7826, -0.7907]

well now something weird happened.
This happens on cpu, gpu and 2 gpus. I'm using torchsummary 1.5.1, Python 3.7, PyTorch 1.7.0, CUDA 10.1. and Cudnn 7.6
Can you explain why this happens and if this is intended or a bug? It would be great if you added this behaviour to your documentation (or did I miss something?).
Thanks!
Ugh, and happy christmas! 🎄 🎅

maybe also checkout the solution for this bug in this very similar repo: https://github.com/TylerYep/torchinfo/issues/21

Can confirm that we experienced this as well when using torchsummary. This resulted in the output of our evaluation scripts being inconsistent and it took a while for us to realize the innocuous looking torchsummary.summary(model, size) call was the cause of the problem.

authors: evantkchong maikefer


text:
compatibility issue on radio button list

I Have upgraded my v7.15.7 site to v8.5.4 but some compatibility issues come up for DTGE v0.6.1 like no value selected for radio button list under nested content on edit mode. No console error.
Is there anyone encounter this issue?

Did you upgrade DTGE too? It needs to be on 1.x for Umbraco 8

Disclaimer, I'm not yet 100% sure about the following. There's a U7 - U8 migration of RadioButtonList and similar "prevalues" which changes the stored value from being an integer to it being a string value. What I think is happening is that this migration is not able to "reach into" the DTGE json contents, and hence when U8 (and later) reads the value of a RadioButtonList property (in an embedded DTGE document) it expects that string value, but finds the non-migrated integer value. The result is none of the radio buttons are selected. Selecting a value in the backoffice and saving the document fixes it (but that of course is a cumbersome work around on a large site).
If I'm correct, I'm in need of a fix for this as well. I'll probably write my own migration/fix code which will iterate into site contents and properties and fix incorrect values. But it would be nice if someone already has implemented a DTGE aware migrator.

Perhaps to do with the way the U7 version of DTGE stored indexed values? I know it was also incompatible with Umbraco-Deploy.

authors: c9mb mitraganesh skttl tormnator

repo: skttl/umbraco-doc-type-grid-editor


text:
Make a and kvisc more precise for hard-coded sea level values

The hard-coded "quick return" sea level values for a and kvisc are less precise than what would normally be returned at other altitudes close to 0.  Observe:

[rho,a,T,P,nu,z,sigma] = atmos(-eps); fprintf('rho=%.17g\na=%.17g\nT=%.17g\nP=%.17g\nnu=%.17g\nz=%.17g\nsigma=%.17g\n', rho, a, T, P, nu, z, sigma);
rho=1.2250000000000001
a=340.29399054347107
T=288.14999999999998
P=101325
nu=1.4607185943490473e-05
z=-2.2204460492503131e-16
sigma=1
[rho,a,T,P,nu,z,sigma] = atmos(0); fprintf('rho=%.17g\na=%.17g\nT=%.17g\nP=%.17g\nnu=%.17g\nz=%.17g\nsigma=%.17g\n', rho, a, T, P, nu, z, sigma);
rho=1.2250000000000001
a=340.29399999999998
T=288.14999999999998
P=101325
nu=1.4607186e-05
z=0
sigma=1
[rho,a,T,P,nu,z,sigma] = atmos(eps); fprintf('rho=%.17g\na=%.17g\nT=%.17g\nP=%.17g\nnu=%.17g\nz=%.17g\nsigma=%.17g\n', rho, a, T, P, nu, z, sigma);
rho=1.2250000000000001
a=340.29399054347107
T=288.14999999999998
P=101325
nu=1.4607185943490473e-05
z=2.2204460492503131e-16
sigma=1

Fix a and kvisc so that there isn't a discontinuity around h=0.

Good catch. Thank you. I took the somewhat cleaner approach of using the defining equations and constants, simplified:
a = sqrt(115800)
kvisc = (1.458e-6 * 288.15^1.5 / 398.55) / 1.225

authors: ErichRitz sky-s

repo: sky-s/standard-atmosphere


text:
metadata: missing k8s fields

Missing k8s specific fields such as K8s.Namespace and others

Missing access to the extended k8s object

I can see that you have filters on the screenshot and not the k8s one that could the reason of this.

correct. closing

authors: hunchback safchain

repo: skydive-project/skydive-ui


text:
print-ndn causes build to fail

Description
When setting print-ndn = false the build fails and several incomprehensible errors appear.
For example: "Undefined control sequence" line 68 in uhdhbwvst-title-default.def, for details see screenshot below.
How to reproduce
Steps to reproduce the behavior:

Set print-ndn = false
Build LaTex project

Screenshots

Additional context
I tried defining a new title page completely without the ifbool-Block for printing the ndn, the bug still appears.

I was able to reproduce and fix the bug.
Disabling print-ndn led to rotating and textpos packages not being loaded. I'll release the fix asap.

repo: skyfrk/dhbw-vs-latex-template


text:
[core] Incorrect decompilation for breaks inside switches

Describe error
Hi. Here is the second case that the decompiled code presents different semantics.
Source code
        int i , i21 , i22 = 14;
        for(i = 2; i < 151; ++ i)
            for(i21 = 4; i21 < 168; ++ i21)
                switch(i){
                case 113 : i22 += i21;
                case 135 : i22 += i21;
                    break;
                default : i22 >>= 53209;
            }

and here is the decompiled code that have different semantics:
        int i22 = 14;
        for (int i = 2; i < 151; i++) {
            for (int i3 = 4; i3 < 168; i3++) {
                if (i == 113) {
                    i22 += i3;
                } else if (i != 135) {
                    i22 >>= 53209;
                }
                i22 += i3;
            }
        }
}

Here in the source code, if 'i=130', only statement 'i22 >>= 53209' will be executed; however, in the generated code, if 'i=130', not only 'i22 >>= 53209'  but also 'i22 += i3' will be executed. I guess it is because Jadx gives an incorrect solution in decompiling the 'break' inside the switch.
Would you like to have a look? All the source file, the compilation file and the decompiled files are available at
Version:
Jadx : 1.4.1 and also confirmed in 1.4.3, the latest build
Java JDK: 11.0.3
Android decompiler: dx8 of 30.0.2 building tool
Input Version: dex files

incorrectBreaksIn.zip here is the attachment containing all the source files

repo: skylot/jadx


text:
[feature] Add exclusion rule

Describe your idea
Hello, when decompiling an apk file through the command line and outputting a java file, can the specified class name or package name be excluded according to the rules to reduce useless code? For example, most third-party SDKs do not have the ability to reverse analyze and understand application logic. what help

+1@skylot


text:
Registers are not replaced in decompiled sources

Hi, open com.segment.analytics.Analytics and browse to that method:
        public com.segment.analytics.Analytics build() {
            if (com.segment.analytics.internal.Utils.isNullOrEmpty(this.tag)) {
                r1.tag = r1.writeKey;
            }
            //.....
            if (r1.defaultOptions == null) {
                r1.defaultOptions = new com.segment.analytics.Options();
            }
            if (r1.logLevel == null) {
                r1.logLevel = com.segment.analytics.Analytics.LogLevel.NONE;
            }
            if (r1.networkExecutor == null) {
                r1.networkExecutor = new com.segment.analytics.internal.Utils.AnalyticsNetworkExecutorService();
            }
            if (r1.connectionFactory == null) {
                r1.connectionFactory = new com.segment.analytics.ConnectionFactory();
            }
            if (r1.crypto == null) {
                r1.crypto = com.segment.analytics.Crypto.none();
            }
            //.....

I lot of references to this were not replaced
APK: https://www.apkmirror.com/apk/simple-finance-technology-corp/simple-better-banking/simple-better-banking-2-55-1-release/

@sergey-wowwow  fixed!

@skylot
Thanks! Works perfect now!

authors: sergey-wowwow skylot


text:
Specify forced entity id upon creation

It would be convenient to be able to specify an entity's id upon creation.
For multiplayer games this would mean that clients do not have to translate the server id to the local id to know which entity the server is referring to.

What should happen in this case if the id already exists or the versions differ? As an example, if you ask to create id 1 with version 0 and it already exists, either alive or not, either with the same or a different version?

I think the version should also be forced to make the entity id unique in the specified scenario (as it usually does everywhere)
The registry should throw an error if the entity is already existing: there should be none since entities are always synchronized with the server, which means that if the server wants to create entity id=123|version=12 then the client should not have an entity with id=123 (maybe it did, but since the server destroyed that entity, the client should've done the same before creating the new one).
This would be the way i thought about replicating entities via network, but any way of forcing entity ids would be extremely helpful.

Ok and what about entities in the middle?
I mean, imagine the server create 3 entities for its purposes, then as to the client to force-create entity 3. The client create it but there are also entities 0, 1 and 2 there and they are not in use yet. Should they be put in the list of destroyed entities (even if they haven't been destroyed yet) or what? I cannot easily keep track of the fact that they are available otherwise.

Sadly i did not have the time to look into implementing this yet.
Before i used entt, i implemented a "slotmap" which created entities in chunks of lets say 256 entities.
If the server requested to create entity id=532|version=1, which would live in the third chunk, then this chunk was created and the entity was put in there. When it was removed and the chunk became empty, the chunk was deleted.
Now for entt, if the server has entities 1-10000 and it tells the client to create entity 10000, at the first sight it would be suboptimal for the client to create 9999 'destroyed' entities, but still doable in most non-MMO situations.
This would be the way you thought of it i guess, maybe one of us will have a better idea over time.
I'll have to think about the implementation - but first i wanted to ask if this would even somehow fit into this framework.
PS: isn't forcing entity id's what the snapshot loader does?

Don't worry, it's not a matter of implementing it, I'm just trying to figure out how it should work. :wink:
The fact is that entity 1 is considered alive but an orphan (no components) if you force-create entity 2. Therefore it won't be returned in any case when you create new entities and you've to explicitly clean up it. That's all.
In both cases, everything works just fine btw.

PS: isn't forcing entity id's what the snapshot loader does?

Yes and no. It force-create entities but to an empty registry. Moreover, it has more or less the same problem, that is the fact that it can leave around orphans if you don't guarantee that all the entities have at least one component. That's why it exposes also a member function to remove them. :wink:

In my case the server does not simply tell the clients to create an entity, it tells them to instantiate prefabs which are registered and referred to by simple handles, so there will never be any orphans.

Therefore it won't be returned in any case when you create new entities and you've to explicitly clean up it.
What do you mean with 'it won't be returned'?

Forgot to mention: in my case the server does not simply tell the clients to create an entity, it tells them to instantiate prefabs which are registered and referred to by simple handles, so there will never be any orphans.

That's good. New spawn & stomp stuff will be of interest for you in this case. What game are you working on? Is it an open source or a private one?

Therefore it won't be returned in any case when you create new entities and you've to explicitly clean up it.

What do you mean with 'it won't be returned'?

I mean, if you force-create entity 1 and never delete entity 0, the latter is created anyway in the array of entities but it isn't appended to the one of destroyed entities. Therefore, from the point of view of the registry it's alive, it's just an entity without components attached.
When you create a new entity, destroyed ones are returned first if any. In this case, entity 0 won't be returned because it's not considered as destroyed.
The only problem is that if you never force-create entity 1 or explicitly destroy it, there will be an unused entity of which you know nothing. The good news is that it won't affect performance nor anything else (unless you create 1M of them probably, but just because they occupy memory, iterations are never affected y them anyway).
Does it make sense?

What game are you working on? Is it an open source or a private one?

It will be an MMORTS, somehow inspired by factorio - procedurally generated worlds and automation.
Performance will be a huge concern, which is why i picked entt 😉
I don't know about open sourcing yet - i love the idea and i love looking at other game's source code but there's always that other ugly, incompatible side called monetization... still possible though.

Does it make sense?

Yes, thank you 👍

which is why i picked entt :wink:

And you've not starred it yet. Shame on you!! :smile:

And you've not starred it yet. Shame on you!! 😄

Now it's starred 😄
From what i could get from the documentation for stomp, what it does is transfer components from entities living in other registries, right?
I think this does not solve the original problem - which was identifying server entities on clients.
Do you have any other mechanisms one could use to replicate entities for multiplayer games? Since the game is in a early stage, architecural changes are still possible.

stomp allows to copies entities (and components) from a source to a target. Therefore, you can also copy within the same registry.
I'm not working on a multiplayer game but I'm loading stuff from a json file and I'm using the meta part for that. How do you transfer information from the server to the client? If it's in a similar format, you can transparently do that in an opaque way without having to rely on the C++ type system in the net module.

Json is out of question for performance reasons.
I have not yet looked into the meta stuff - the way I do it (for now, just a first prototype):
using ReplicationCallback = void (*)(Packet& packet, Entity entity, Registry& registry); // Registered for one component: tries to get the component and writes its data into the packet
void World::update() {
    for (every player) {
        Packet packet; // The packet the replication stuff goes into
        for (every entity in range of player) {
            for (every registered replication callback) {
                replicationCallback(packet, entity, m_registry)
            }
        }

        player.send(packet);
    }
}

// For every component that should get replicated there will be a registered callback:
world->registerReplicationCallback(
    [] (Packet& packet, Entity entity, Registry& registry) {
        // Executed on server
        if (const auto playerCharComponent = registry.get<PlayerCharComponent>(entity)) {
            packet << playerCharComponent.someThing << playerCharComponent.anotherThing;
        }
    },
    [] (Packet& packet, Entity entity, Registry& registry) {
       // Executed on client
        const auto playerCharComponent = registry.get<PlayerCharComponent>(entity));
        assert(playerCharComponent);
        packet >> playerCharComponent.someThing >> playerCharComponent.anotherThing;
    });

If you are fine with working with the C++ type system in this part for performance reasons, then you've no need to use meta.
I must admit that the pseudocode doesn't help much with to have a clear idea of your approach. :)

The pseudocode was the answer to

How do you transfer information from the server to the client

Every player gets information about the entities in the range of the character via callbacks which check if an entity has some component and if so, write it into a packet.
The pseudocode shows how the replication of components would work if server and client could refer to entities with their 'unified' id.
Since there is no way of ensuring this, the approach is only working with another indirection:
world->registerReplicationCallback(
    [] (Packet& packet, Entity entity, Registry& registry) {
        // Executed on server
        if (const auto playerCharComponent = registry.try_get<PlayerCharComponent>(entity)) {
            packet << playerCharComponent->someThing << playerCharComponent->anotherThing;
        }
    },
    [] (Packet& packet, Entity entity, Registry& registry) {
       // Executed on client
        const auto translatedEntityId = lookupEntitiyId(entity); // <<<<<<<<<<< have to look up the client id for the server entity
        const auto playerCharComponent = registry.try_get<PlayerCharComponent>(translatedEntityId));
        assert(playerCharComponent);
        packet >> playerCharComponent->someThing >> playerCharComponent->anotherThing;
    });

I am delaying this ticket because most likely it will become part of the review of the snapshot part (for various reasons that I won't explain in details right now because it's half past midnight here). :)
To be honest, I'm still not sure of the semantics of this operation, but something similar is definitely useful to offer serialization/deserialization of the registry that is much faster than the current one.
As a side effect it will probably be possible to do this too, although I don't recommend it. My two cents: I would still separate local and remote ids rather than pretending to have an exact copy of the server locally.

Maybe you can use some kind of netId in a network component to identify the
entity over the network.
You could also use this component to know what to replicate.
On Mon, Sep 9, 2019, 00:22 Michele Caini notifications@github.com wrote:

I am delaying this ticket because most likely it will become part of the
review of the snapshot part (for various reasons that I won't explain in
details right now because it's half past midnight here). :)
To be honest, I'm still not sure of the semantics of this operation, but
something similar is definitely useful to offer
serialization/deserialization of the registry that is much faster than the
current one.
As a side effect it will probably be possible to do this too, although I
don't recommend it. My two cents: I would still separate local and remote
ids rather than pretending to have an exact copy of the server locally.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/skypjack/entt/issues/303?email_source=notifications&email_token=ACF5UVQCSW6FSSELBIFWOCTQIV3KLA5CNFSM4ISMECHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6F2WZA#issuecomment-529247076,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACF5UVQ3OCGTIOIUTJSUN2TQIV3KLANCNFSM4ISMECHA
.

Maybe you can use some kind of netId in a network component to identify the
entity over the network.
You could also use this component to know what to replicate.

So if the server sends some message referencing an entity by its id - how would the client know which one the server meant? By linearly searching all the local entities for a network component with a matching "server entity id"? Or should the server store a client entity id for every connected client for each replicated entity? I don't know how that would work in constant time...

I usually decouple the local simulation from the remote one, so that both can evolve independently from each other. To do that, I use a map local/remote id.
That said, the new changes for the serialization should allow also to create locally a mirror copy of the server, but then you've to manage all the potential errors for yourself (the one already discussed above and that could create inconsistencies).

having a network component is the same as a map then :)
yes i was thinking using a view to find your entity (which doesnt have to
be linear since you can sort the component pool).
if you think that's a concern in terms of perfs then maybe you have too
much entities to synchronize and you should go with something like lockstep.
this entity networkID can be unique, generated by the server or composed
from the peer id, that's up to you and depends on your model.
if you have only 1 entity per player then it could be it's peer id.
On Mon, Sep 9, 2019 at 1:20 PM Michele Caini notifications@github.com
wrote:

I usually decouple the local simulation from the remote one, so that both
can evolve independently from each other. To do that, I use a map
local/remote id.
That said, the new changes for the serialization should allow also to
create locally a mirror copy of the server, but then you've to manage all
the potential errors for yourself (the one already discussed above and that
could create inconsistencies).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/skypjack/entt/issues/303?email_source=notifications&email_token=ACF5UVXERHIMHW2O62XCW33QIYWRLA5CNFSM4ISMECHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6HGBLI#issuecomment-529424557,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACF5UVTXTZSWOZ7CMDSW4ELQIYWRLANCNFSM4ISMECHA
.

having a network component is the same as a map then :) yes i was thinking using a view to find your entity (which doesnt have to be linear since you can sort the component pool). if you think that's a concern in terms of perfs then maybe you have too much entities to synchronize and you should go with something like lockstep. this entity networkID can be unique, generated by the server or composed from the peer id, that's up to you and depends on your model. if you have only 1 entity per player then it could be it's peer id.

Interesting idea - but binary searching for entities with a view would still require O(log n) time - I think I'll stay with my specialized hashmap for now. Yes, there will be many entities to synchronize.
Lockstep is an excellent suggestion, but i can't imagine how to secure my game which is competetive from cheaters with lockstep since every client knows everything... but I'm still thinking and doing some research about this. Thanks for the suggestion!

every client knows everything

may be, clients should not know everything, just enough related to what is visible, even if that means to keep non visible outdated (exist locally but wont get updated until seen).

may be, clients should not know everything, just enough related to what is visible, even if that means to keep non visible outdated (exist locally but wont get updated until seen).
Thats exactly what i do and why i created this issue in the first place. What you just descibed just doesn't work with lockstep, because lockstep means that every client only sends its inputs to the server and the server then distributes the input to all other clients, so every gamestate is the same since it is simulated deterministically and every client has received the same set of inputs in each frame. You can't leave out any (input) information because the gamestate would get desynced.
So your architecture is what I had i mind and is called something like "authorative server-dumb clients"
Anyway, this is getting off topic. If there are people who are interested in this, I'd be happy to chat on other platforms.

Then, may I invite you in the gitter channel of EnTT? This topic is really interesting imho and I have an answer to your last comment but I don't want to go off-topic as you correctly pointed out. :wink:

Then, may I invite you in the gitter channel of EnTT? This topic is really interesting imho and I have an answer to your last comment but I don't want to go off-topic as you correctly pointed out. 😉

Yes, please :+1:

Oh, no, well, I mean, I invite you to join it. The channel is public and the link is on the README file. :smile: Here it is btw.

oh :satisfied: thanks

I'm in the same shoes as @roepel. I want to use ENTT but don't see a way to synchronize entities to/from the server.
Just a quick side-note, @roepel: Factorio uses lock-step. They mentioned it in one of their Friday dev updates.
However, in my case, lock-step just isn't a possibility. Using ENTT's built-in serialization is out of the question as well, as my entities are being updated out-of-order based on both priority as well as bandwidth caps.
Therefore, I need a quick way to refer to single entities that maps well on the server and client. I think the only way to do this is with a map, unfortunately.

Ironically, yesterday I merged experimental on master and started to write the create-with-hint function (and a few others actually) so as to close this issue and review the snapshot part with a dual model (that is a line in the TODO file).
The timing of your comment is impressive. @Qix- :smile:
The final result for this specific issue will be something like this:
if(auto entity = registry.create(hint); entity == hint) {
    // ...
} else {
    // ...
}

You can only provide the registry with an hint because it cannot guarantee all the times that the entity you want is returned. The identifier may be already in use and with a different version, in this case we cannot just override it for many reasons I won't explain here.
However, if you keep in sync the entities and delete them on both sides, it will work as expected.and you can even get rid of the if. It's up to you to make it work properly in a sense.
The review of the snapshot part is something larger than this and aimed to offer a dual model that... Well, I'll write everything in the documentation, I'm from mobile now and it's a bit long to explain. :wink:
I'm pretty sure you'll appreciate it though.

That's not going to work for my case, unfortunately. The entity deletions and creations are not guaranteed to come in order, so there's no point in using hints if it's not guaranteed.
I'm not sure what the hint system provides anyway, actually. A map still makes more sense.

@Qix- it couldn't work anyway though.
If you've a sequence destroy/create on one side and you receive it as create/destroy on the other side, the final result is that you've entity E alive and death at the same time in different spaces, no matter what create does here. Even the map won't solve this problem actually.
If you can't guarantee consistency in the long term, how could it work?

Should have been more specific.
If an entity is deleted on the server and a new entity is created that re-uses the old ID, but the events are sent reversed to the client, then the client won't have the same IDs when using creation hints, but can safely solve this with a map.

Yeah, I was re-reading your previous comments and I've just realized you are not using lockstep. :+1:
Sorry for the noise. In this case, yes, I think decoupling local and remote ids is the best bet.

If you cannot gaurantee the order in which the client receives the updates from the server, it would make sense to include a sort of "order".
The scenario I imagined in my head was something along the lines of
Server - Delete Entity 60
Server - Create Entity 60 (This is a new entity different from the previous, aka reused id)
Server - Packs Packets

Client - Receives Packets
Client - Create Entity 60
Client - Delete Entity 60

So the problem here is pretty apparent, if the client does already have a entity 60, which would be implied by the fact that the server sent a specific request to delete that entity, then how exactly do you handle create? Regardless of what you do, you'll end up with no entity with id 60, because if you ignore the create when an entity already exists, then the existing entity will be deleted after by "Delete Entity 60", and if you override the existing entity, the same problem occurs.
So how exactly would we solve this?
Fundamentally, I would always recommend writing code in such a way that you can gaurantee the order in which a packet is received, but we don't have to rely on the order of the packet, instead we can keep an internal id on the server that is used and incremented when senting a packet related to deleting or creating a new entity, thus it would look something like this
Server - Enttiy Update Id = 1
Server - Delete Entity 60 ( Update Id: 1)
Server - Create Entity 60 ( Update Id: 2)
Server - Packs Packets

Client - Receives Packets
Client - Create Entity 60 (Update Id: 2)
Client - Delete Entity 60 (Update Id: 1)
Client - Sort Entity Update Packets by Packet Id

You should ideally receive both packets in the same read, but if not, you can always create a list of entity updates, and sort them, thus if you receive Id 2 first, and then later Id 1, you know that you should ignore Id 1, or you can backtrack and figure out if you should execute 1 and 2 again.
So how would this work with Entt?
Since we know that you can provide a "Hint", as to what ID you'd want a specific entity to use, you can always use a single registry just for entities provided by the server, and by keeping track of what Entity Updates happened, you can always ensure that you can safely reconstruct server state on the client.
Let me know if I missed something.

I've pushed a create-with-hint on experimental.
As @NixAJ said, you won't write anything that works if you can't guarantee the order of construction/destruction of entities on both sides. In all other cases, this function can help you.
It's part of the upcoming review for the snapshot stuff but I've pushed this separately to match this issue.
There is no guarantee that the requested entity is returned. This happens only in case the entity isn't already in use (that is, it hasn't been generated yet or it has been destroyed and never recycled). Otherwise, a randomly generated identifier is returned as if you invoked create().
Please, do not close this issue. It will be closed automatically when I merge everything on master.
Let me know if it works as expected or if you spot any issue. Thank you.

authors: AquariusPower NixAJ Qix- roepel skypjack trashuj

repo: skypjack/entt


text:
remove prototype fwd.

https://github.com/skypjack/entt/blob/688e6ad79fcc443d395351f15e447005b668d8dc/src/entt/entity/fwd.hpp#L36-L39

Good point. Thanks. :+1:

Thanks
On Saturday, September 7, 2019, Michele Caini notifications@github.com
wrote:

Closed #307 https://github.com/skypjack/entt/issues/307 via cc3d0d8
https://github.com/skypjack/entt/commit/cc3d0d821149bc371cea3348d3feea7029870146
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/skypjack/entt/issues/307?email_source=notifications&email_token=AAZNT5SI5F62U65H5LOATCLQIQRPFA5CNFSM4IURC4YKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTPZ35HY#event-2616442527,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAZNT5UAJSBTPXKEQXG2LATQIQRPFANCNFSM4IURC4YA
.

authors: pgruenbacher skypjack


text:
Is it possible to use the server for handling incoming HTTP requests?

Description
I'm building a Slack app using Bolt that posts messages to a channel in response to both Slack events (messages, app mentions) as well as events from GitHub (the same message gets posted on Slack in each case). In order to handle the events coming from the GitHub webhook, I've had to set up a separate Express server to handle the POST requests, which I then pass on using axios to the Slack webhook.
Is it possible to avoid having two servers (bolt for handling Slack events, express for handling GitHub events) and just use bolt? If it's built on top of express anyway, can I somehow use the .post from express to register a request handler on the same server that listens to Slack events?
What type of issue is this?

[ ] bug
[ ] enhancement (feature request)
[x] question
[ ] documentation related
[ ] testing related
[ ] discussion

Requirements

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've searched for any related issues and avoided creating a duplicate issue.

Hello, I appreciate that this is 3 years old now but I have the exact same question and cannot find an answer anywhere online. Did you find a suitable solution before closing this?

authors: baxter-ben elisehein

repo: slackapi/bolt-js


text:
Spelling

Summary
related, but oddly, doesn't appear to conflict: #1608
This PR corrects misspellings identified by the check-spelling action.
The misspellings have been reported at https://github.com/jsoref/bolt-js/commit/5399f4ab8d4829f1eb354082a25becabbec3c208#commitcomment-85398439
The action reports that the changes in this PR would make it happy: https://github.com/jsoref/bolt-js/commit/a3290d71980ecd35c8a7f0f295a3876840c82e3c
Note: this PR does not include the action. If you're interested in running a spell check on every PR and push, that can be offered separately.
Requirements (place an x in each [ ])

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.

I've dropped the added in-to and passed in-to changes. I might have a different opinion, but my goal is to get as many changes that the project will accept in. I'll probably eventually write a blog post explaining which ones I believe should remain split.... But it'll take me months of learning/experimenting to be able to define the ruleset I personally believe in (and that probably will involve it actually evolving as I encounter more projects).


text:
Updated app start error to output the expected var names when not specified

Previously, the message would output advising the need for specification of TOKEN, CLIENTSECRET, and CLIENTID. This change modifies the requests messaging to state the actual names (with underscores) for the secret and ID variables.

disregard, i broke it.

repo: slackapi/easy-peasy-bot


text:
Acknowledgment is not sent immediately (as in Python API)

It is possible in Python to acknowledge immediately and then run a long process and show the result once it is available. As shown in this code:
@app.command("/my_command")
def list_files(ack, respond, command):
  ack(
    response_type="in_channel",
    text=f"Request received from <@{command['user_id']}>",
  )
  result = long_running_process(command['text'])
  respond(text=result, response_type="in_channel")

Unfortunately, this way is impossible in the Java API (I use Kotlin of course, but it is not important here)
The acknowledgment must be returned at the end. It means I have to create async process for long-running tasks. It adds unnecessary complexity.
Is there a way to acknowledge it immediately in Kotlin?
        app.command("/list_cdr") { request: SlashCommandRequest, ctx: SlashCommandContext ->
            val res = ctx.ack { r: SlashCommandResponseBuilder ->
                r.text(":white_check_mark: Request from <@${ctx.requestUserId}>")
                    .responseType("in_channel")
            }
            // the Acknowledgment should be sent now !!!

            val text = request.payload.text
            val textResponse =  service.longRunningProcess(text)
            ctx.respond { r: SlashCommandResponseBuilder ->
                r.text(textResponse).responseType("in_channel")
            }
            res
        }

@asomov Thanks for asking the question! The way to asynchronously acknowledge a request is a bit different in the Java SDK. Please refer to https://github.com/slackapi/java-slack-sdk/issues/825#issuecomment-906409841 for details.

Thank you for the quick response. The proposed solution works perfectly for me !
Should it be somehow described in the docs? Because there are many similar questions already:
https://github.com/slackapi/java-slack-sdk/issues/700

Thanks for the great suggestion! We will update the documents to have this information 🙌

authors: asomov seratch

repo: slackapi/java-slack-sdk


text:
I can't verify Production URL for events API

Description
Hello, everyone! I'm trying to integrate Slack API to my web app using node-slack-events-api (v2.1.1)
But I'm getting error every time when I'm trying to verify my production URL.
@slack/events-api version: 2.1.1
node version: 10.13.0
Attachments:

Code
const path = require('path')
const express = require('express')
const http = require('http')
const { createEventAdapter } = require('@slack/events-api')
const slackEvents = createEventAdapter(process.env.SLACK_SIGNING_SECRET)

const port = process.env.PORT || 3000

const app = express()
const server = http.createServer(app)

app.use('/slack/events', slackEvents.expressMiddleware())

// Attach listeners to events by Slack Event "type". See: https://api.slack.com/events/message.im
slackEvents.on('message', event => {
  console.log(
    `Received a message event: type: ${event.type}, user ${
      event.user
    } in channel ${event.channel} says ${event.text}`
  )
  if (clients.length > 0) {
    clients.map(clientWs => {
      clientWs.send(
        JSON.stringify({
          channel: event.channel,
          author: event.user,
          text: event.text
        })
      )
    })
  }
})

// *** Handle errors ***
slackEvents.on('error', error => {
  console.error(error)
})

server.listen(port, function(err) {
  if (err) {
    return console.error(err)
  }

  console.log('Listening at port: ', port)
})

It seems like you might have already figured this out since you closed the issue, but I’m case you haven’t, all the code looks correct but you’d need to check that your request signing secret is in the SLACK_SIGNING_SECRET environment variable.

authors: alexeyvakarchuk aoberoi

repo: slackapi/node-slack-events-api


text:
travis CI build fails because of slackclient websocket dependency

What type of issue is this? (place an x in one of the [ ])

[x] bug
[ ] enhancement (feature request)
[ ] question
[ ] documentation related
[ ] testing related
[ ] discussion

Requirements (place an x in each of the [ ])

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report
I have slackclient as a dependency in one of my project.
My tests are failing on Travis CI because of slackclient / websocket.
Stacktrace
eNMS/__init__.py:207: in create_app
    configure_services(path)
eNMS/__init__.py:173: in configure_services
    spec.loader.exec_module(module)
eNMS/automation/services/miscellaneous/swiss_army_knife_service.py:9: in <module>
    from slackclient import SlackClient
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/slackclient/__init__.py:1: in <module>
    from .client import SlackClient # noqa
../../../virtualenv/python3.6.3/lib/python3.6/site-packages/slackclient/client.py:8: in <module>
    from .server import Server
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    from .channel import Channel
    from .exceptions import SlackClientError
    from .slackrequest import SlackRequest
    from .user import User
    from .util import SearchList, SearchDict

    import json
    import logging
    import time
    import random

    from requests.packages.urllib3.util.url import parse_url
    from ssl import SSLError
>   from websocket import create_connection
E   ModuleNotFoundError: No module named 'websocket'

To fix my build, I had to add websocket-client to my own requirements.txt.
Expected result:
My build doesn't fail because of slackclient.
Actual result:
My build fails because of slackclient.

Same Behavior can be reproduced in GitLab CI

@afourmy and @MatejMecka thanks for letting me know about this issue. The old version was mistakenly packaged with the new v2 client. I've since removed this and shipped "2.0.1". This package requires users to use the new RTMClient. If you're migrating an existing app I'd recommend taking a look at our Migration Guide.
If you'd like to continue using the old version of our client you'll have to lock your version to 1.x in your requirements.txt file. slackclient >=1.3, <2

Hello Rodney, when I pin slackclient >=1.3, <2 I getting the following issue with websocket. Can you please advise if anything else is needed? I have tried with both websocket 0.2.1 installed and websocket-client-0.56.0
from .server import Server
File "/usr/lib/python3.6/site-packages/slackclient/server.py", line 14, in
from websocket import create_connection
ModuleNotFoundError: No module named 'websocket'

Hey @shorton3 , if you do a pip freeze | grep slackclient, can you tell me what version it returns? You may have already updated it version 2.x, in which case you'll need to remove it and then revert it to v 1.3.1

Thanks, yes, its reporting slackclient==2.0.1. It was being specified in my automation in another place without the locking revision, so must have upgraded. Thanks for that help!

I'm glad @splinterific was able to help you get this sorted.

repo: slackapi/python-slackclient


text:
Create new Message types for slack messages

Regular text messages now use a TextMessage subclass called
SlackTextMessage, which includes both the parsed text (as text) and
the unparsed text (as rawText).
Other messages that used to be ignored are now received as either
SlackRawMessage or SlackBotMessage. These do not descend from
TextMessage so they won't be seen by normal hear or respond
listeners.
A few new Listener classes were created, SlackRawListener and
SlackBotListener, to make it slightly easier to write code tailored for
these new message types.
This PR is based on #131.

Sorry, I was hoping to work on Hubot-slack over the holidays but was unexpectedly offline and couldn't. I just merged this - thank you for the code, and for responding to all the feedback!

@paulhammond Thanks. Can I encourage you to push a new version so I can start depending on this stuff in my bot?

I had someone in #hubot ask about using this, which makes me think it needs some documentation cc https://github.com/slackhq/hubot-slack/issues/245

authors: kballard paulhammond technicalpickles

repo: slackhq/hubot-slack


text:
Timeout Waiting For Response

Hi!
Your library is very simple and easy to use, I have been searching to find a simple on like that!
I have a problem that the AT+CWJAP=.. command (wifi.setupAsWifiStation(ESP8266_SSID, ESP8266_PASS, &Serial);) shows me "Timeout Waiting For Response" error before actual connecting nu merous times. Is there a way to increase the timeout milliseconds?
Thanks,
Panos

Hi, you can use
wifi.setTimeout( [number of seconds] );
example
wifi.setTimeout(10);
On 2015-09-02 08:32, Panos B wrote:

Hi!
Your library is very simple and easy to use, I have been searching to find a simple on like that!
I have a problem that the AT+CWJAP=.. command (wifi.setupAsWifiStation(ESP8266_SSID, ESP8266_PASS, &Serial);) shows me "Timeout Waiting For Response" error before actual connecting nu merous times. Is there a way to increase the timeout milliseconds?
Thanks,
Panos
--
Reply to this email directly or view it on GitHub [1].

Links:
[1] https://github.com/sleemanj/ESP8266_Simple/issues/8

Thanks a lot! Should have known :-D

authors: sincetomorrow sleemanj


text:
waitUntil() for FetchEvent?

AKA: should FetchEvent be an ExtendableEvent?
It's possible today to write code that fetches from the network, adds to a cache, and then matches from the cache in order to feed a document. This seems a bit weird...why invoke the Cache matching mechanism for a Response you've already got a handle to and can simply .clone()?
The answer, today, is the lifetime concern: you want the respondWith promise to extend beyond the point where the Cache is savvy to the cache entry. This is a bit weird. Mightn't it be better to give FetchEvent a waitUntil()?

Is this a more realistic use case for waitUntil()?
http://jakearchibald.com/2014/offline-cookbook/#stale-while-revalidate
A cache.put() call after resolving the respondWith() promise with a in-progress Response.

Yeah, you're right, that is more realistic. Analytics pings are another area that this might be useful in.

How long to hold the worker alive with outstanding network requests came up in our internal discussion again today.  Would be nice to move forward on this or define some other life cycle guidelines here.
I believe @annevk would like a fully defined life cycle model.  While that would be nice, I personally think we can make progress by defining something like waitUntil().

I'm not sure those are in opposition. waitUntil is the signal to the UA
that we're not at an interruptable phase in the lifecycle and so can help
us clarify what is allowed to happen when.
On Thu, Feb 12, 2015 at 1:24 PM, Ben Kelly notifications@github.com wrote:

How long to hold the worker alive with outstanding network requests came
up in our internal discussion again today. Would be nice to move forward on
this or define some other life cycle guidelines here.
I believe @annevk https://github.com/annevk would like a fully defined
life cycle model. While that would be nice, I personally think we can make
progress by defining something like waitUntil().
—
Reply to this email directly or view it on GitHub
https://github.com/slightlyoff/ServiceWorker/issues/584#issuecomment-74155648
.

I agree.  I was trying to say I don't want to wait until we have a fully defined life cycle model.  I'd like to clarify this particular use case sooner.

Ah, right. Good call.
On Thu, Feb 12, 2015 at 1:29 PM, Ben Kelly notifications@github.com wrote:

I agree. I was trying to say I don't want to wait until we have a fully
defined life cycle model. I'd like to clarify this particular use case
sooner.
—
Reply to this email directly or view it on GitHub
https://github.com/slightlyoff/ServiceWorker/issues/584#issuecomment-74156661
.

@jungkees @jakearchibald?

Interesting question: do you need to let it run at least as long as the TCP timeout, which 60 seconds on modern Linux? I'd suggest that as a reasonable starting point.
Thoughts? @jakearchibald? @KenjiBaheux? @coonsta? @kinu?

@wanderview In your comment above, did you mean cache.put() in the example should have been called within e.waitUntil()?
@jakearchibald What patterns can you expect for devs with the FetchEvent.waitUntil()? I'm having hard time trying with the code patterns when e.respondWith(r) and e.waitUntil(p) are coming together.

I agree that there could probably be a situation where one wants to explicitly extend the lifetime of an event (and hence ServiceWorker) up to a certain point after it returns a response, assuming that in general we want ServiceWorker to return a response as early as possible for performance reasons.
Reg: TCP timeout-- it's not clear if we need to tie the lifetime of SW to the completion of async network/cache operation.  It looks we could say that async network/cache operation that is triggered by a ServiceWorker will NOT be cancelled even after the ServiceWorker is killed (by UA), like we don't for Beacon API on page unload.  (Currently the behavior of async operations upon SW termination doesn't seem to be really spec'ed?)

@wanderview In your comment above, did you mean cache.put() in the example should have been called within e.waitUntil()?

Yes.  I meant if we had a general waitUntil(), it could be used to keep the worker alive until cache.put() completes, even though respondWith() has already been called.
As a side note, I am changing the gecko Cache implementation to keep the worker alive as long as there are Cache operations in flight.  This is partly for ipc implementation details, but also partly due to the lack of waitUntil().

but also partly due to the lack of waitUntil().

I believe adding FetchEvent.waitUntil() has been decided from the discussion above. I'll work on it.

Reg: TCP timeout-- it's not clear if we need to tie the lifetime of SW to the completion of async network/cache operation.

Yeah, so it sounds like it's an optimization point in the implementation rather than a constraint in the spec.

It looks we could say that async network/cache operation that is triggered by a ServiceWorker will NOT be cancelled even after the ServiceWorker is killed (by UA), like we don't for Beacon API on page unload. (Currently the behavior of async operations upon SW termination doesn't seem to be really spec'ed?)

Yes, I think I need to add more text to make it clear. IMO, ongoing fetch can just be dropped as there's no context to process or relay the response through. And for cache operations, those responses already committed to the request to response map might better be retained unless it fails. Thoughts?

ff93a4630866dcb9080bdf83fa5b82ddfed593a1 made the FetchEvent an ExtendableEvent.

Opened https://github.com/slightlyoff/ServiceWorker/issues/679 for the default lifetime limit issue.
Closing.

Gecko impl bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1214772

authors: annevk jungkees kinu slightlyoff wanderview

repo: slightlyoff/ServiceWorker


text:
安卓，问答功能：已经回答问题后，显示问题

TS+ Version: v#.#.#
PHP Version:
Database Driver & Version:

Description:

我已经回答问题了！
回答完后的页面是这样的

1，我并不知道我已经回答成功
2，添加回答，按钮并没人任何变化
直到我下拉刷新后
才恢复显示正常
Steps To Reproduce:

Fixed step:

[ ] fixed.

后面效果如图

建议最新的回答应该默认排在最前面

您好，这个是这样的，我们产品的需求是这里的问答有邀请回答和采纳回答的功能，所以这里列表显示的回答，优先显示被邀请的回答和被采纳的回答

第一是显示问题。刷新动作逻辑要优化
第二是回答的排序设置，建议后台选项【是否采纳最佳回答】【默认排序策略：被采纳的回答、被邀请的回答、最新的回答】

好的，谢谢你的建议和反馈😁

repo: slimkit/thinksns-plus


text:
Is it possible to get more information for a HttpNotFoundException?

In my server logs I'm seeing a lot of 404 errors coming in, the issue is I can't seem to find out what is causing them, is it possible in some way to add more information into the errors?
I'm using the ErrorMiddleware as follows
<?php
return function ($app) {
    $app->addBodyParsingMiddleware();
    $app->addRoutingMiddleware();

    // Error Middleware
    $loggerFactory = $app->getContainer()->get(\App\Factory\LoggerFactory::class);
    $logger = $loggerFactory->addFileHandler('error.log')->createInstance('error');
    $app->addErrorMiddleware(true, true, true, $logger);
};

This is the error message
[2020-11-15T12:20:54.214532+01:00] error.ERROR: 404 Not Found Type: Slim\Exception\HttpNotFoundException Code: 404 Message: Not found.
File: /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php Line: 93

Trace:
#0 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\Middleware\RoutingMiddleware->performRouting()
#1 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\RoutingMiddleware->process()
#2 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous->handle()
#3 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/MiddlewareDispatcher.php(140): Slim\Middleware\ErrorMiddleware->process()
#4 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous->handle()
#5 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle()
#6 /var/www/initialdeck.notflip.be/vendor/slim/slim/Slim/App.php(199): Slim\App->handle()
#7 /var/www/initialdeck.notflip.be/public/index.php(19): Slim\App->run()
#8 {main}

You could make a custom error handler to extract the URI from the ServerRequest. You can do $e->getRequest() on the HttpNotFoundException to obtain the request that caused the error to be raised. From there you can extract the URI that caused it and log it to add more insight to your logs.

You could make a custom error handler to extract the URI from the ServerRequest. You can do $e->getRequest() on the HttpNotFoundException to obtain the request that caused the error to be raised. From there you can extract the URI that caused it and log it to add more insight to your logs.

Do you mean overwriting the ErrorMiddleware with my own implementation?

@notflip no, I mean you could implement your own custom ErrorHandler where you could add custom logging.
Example Custom Handler:
<?php
declare(strict_types=1);

use Slim\Handlers\ErrorHandler;

class CustomErrorHandler extends SlimErrorHandler
{
    protected function logError(string $error): void
    {
        $uri = $this->request->getUri();

        // We add the requested URI here so you can get more context within your logs
        $this->logger->error($error, ['requestedUri' => (string) $uri]);
    }
}

return function ($app) {
    $app->addBodyParsingMiddleware();
    $app->addRoutingMiddleware();

    // Logger
    $loggerFactory = $app->getContainer()->get(\App\Factory\LoggerFactory::class);
    $logger = $loggerFactory->addFileHandler('error.log')->createInstance('error');

    // Custom Handler
    $customErrorHandler = new CustomErrorHandler(
        $app->getCallableResolver(),
        $app->getResponseFactory(),
        $logger,
    );

    // Error Middleware
    $errorMiddleware = $app->addErrorMiddleware(true, true, true, $logger);
    $errorMiddleware->setDefaultErrorHandler($customErrorHandler);
};

@l0gicgate Thanks for clarifying! That makes sense

repo: slimphp/Slim


text:
ui/placement resource

removed call to PRS
simply return JSON built to call PRS
updated unit tests
removed placement validation for Run
removed PRS from server configuration

Connected to #941

Migration in ES DB will be required. The following config parameters should be removed from configuration/slipstream
:prsEndpoint "http://localhost:8203/filter-rank"
:prsEnable true

The branch builds for me without problems. However, it seems that this requires changes on the UI and the PRS before this can be merged without breaking the deployments.  @konstan is this correct?

Yes, this is correct.  Clients definitely should change before this can be merged.

authors: konstan loomis

repo: slipstream/SlipStreamServer