Question: "GET /admin/login/ HTTP/1.1" 200 11144 spamming logs

Please excuse me if this has already been discussed or is a total noob question.
I've set up archivebox as a docker container in an effort to have a simple daily backup of a static website.
I can reach the web GUI and managed to create an account and back up the page. But when looking in the logs, it keeps saying "GET /admin/login/ HTTP/1.1" 200 11144 every few minutes.
Here's my docker-compose:
version: '2.4'

services:
    archivebox:
        # build: .
        image: ${DOCKER_IMAGE:-archivebox/archivebox:master}
        command: server --quick-init <IP_ADDRESS>:8000
        ports:
            - 6969:8000
        environment:
            - ALLOWED_HOSTS=*
            - MEDIA_MAX_SIZE=750m
            - PUID=1000
            - PGID=1000

        volumes:
            - /home/{myuseraccount}/docker/archivebox:/data

Am i doing something wrong?

That's normal, it's the Docker healthcheck heartbeat making sure the container is running successfully. You can disable it if you need by adding healthcheck:  to the archivebox: section in your yml.


Cannot take image bytes to predict

final input = createTensor(
  pfile.bytes!,
);
final NamedTensorMap result = tfModel!.predict<NamedTensorMap>(input);
print((result['regressors'] as Tensor).size);

Depending on the model you are using, you probably need to normalize the pixels, and most models typically accept RGB input. Since pfiles.bytes gives you a byte array in RGBA format, this will not work.


Question on Adding Images

Hey, thanks for this awesome Nuxt plugin. I am customizing it for use in my own project but I am having issues figuring out how to add images. The official TipTap has VueJS documentation here TipTap working with images but I can seem to get it to properly work.
Any leads or code samples on how I can do this?

Hey sorry for the late answer
The documentation is actually incomplete about this right now, so let me first tell you that out of the box not all extensions are installed together with this plugin, because there are many external plugins that needs manual installation given by TipTap themselves.
By default all the extensions that come with StarterKit is installed and any other except the one mentioned in Extension section of README needs to be installed manually. Because if all of them are included then node_modules would end up taking space regardless of whether you use those extensions or not.
Atleast this is the case for now, which might change in future.
You can view in defaults.ts for list of available extensions without manual installation
For the Image that you are asking for you need to do something like below in your vue file:
<script setup>
import Image from "@tiptap/extension-image";

const editor = useEditor({
  autofocus: false,
  extensions: [
    TiptapStarterKit.configure({
      codeBlock: false,
    }),
    Image,
  ],
});

P.S you might need FileHandler if you are planning for uploading images.

Hey @modbender. Sorry it took time to come back with a response. Your works 100% fine. I am able to add an image by hard-coding a URL into the  .setImage() function like this:
.setImage({
	src: 'https://images.pexels.com/photos/104827/cat-pet-animal-domestic-104827.jpeg',
	alt: 'Sample Alt Text',
})

However, the FileHandler seems to be paid so it's not an option for me. That's not an issue though. A simple workaround is to change the button that inserts the file into an <input type="file" /> then add some event listener to upload the select file to a custom endpoint and get back the link then I can call the setImage() with that link. Thank you so much for your help.

Ok glad it helped!


Ensure libvirt stream are cleaned up properly

While looking at volumes upload I noticed we are not handling streams in the right way.
We have to free() the stream once they are no longer used.

Coverage increased (+0.07%) to 56.978% when pulling 47fa4efff290518b756a489da7be556d58d25688 on libvirt-stream-usage-ensure-cleanup into 7fbe405ecb15e4ab22da4a74368aafcc6b0c2ea8 on master.


Upgrade to MongoDB 5.0

Updates the fiftyone-db to use MongoDB 5.0.4
MongoDB feature compatibility between 4.4 and 5.0 is now supported. New users will use MongoDB 5.0.
In the future, when there is reason to require 5.0 and up features, an admin revision can be added.
Issues

Resolves #1268

Stale. Merged into #1369


⚠ Bofrost.es has degraded performance

In 7a9e933, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1480 ms

Resolved: Bofrost.es performance has improved in 5679919 after 6 minutes.


fix: the issues #47

I replaced the line of code
for macro in enums.replace("enum", "").split("{")[1].replace("}", "").split(","):

Indeed, this line indicated that one took from the first opening brace to the next opening brace, instead of taking from the first opening brace to the first closing brace
Instead, i used
for macro in enums.replace("enum", "").split("{")[1].split("}")[0].split(","):

Otherwise, I had no other worries, nice project! 🚀

Hello @Mikatech,
I tested your pull request against our Jenkins tests. V1 test results are OK & nothing else broke.
Since everything passed as expected, I'm merging your pull request.
Thanks for your contribution !


Which library is kmldom from?

This was run on Ubuntu 20 LTS.
$ sudo apt install ninja-build
$ git clone \
    --recurse-submodules https://github.com/duckdblabs/duckdb_spatial \
    ~/duckdb_spatial
$ cd ~/duckdb_spatial
$ GEN=ninja \
    make debug

...
[436/441] Linking CXX executable tools/sqlite3_api_wrapper/test_sqlite3_api_wrapper
FAILED: tools/sqlite3_api_wrapper/test_sqlite3_api_wrapper
: && /usr/bin/c++ -g -g -O0 -DDEBUG -Wall    -fsanitize=undefined -fno-sanitize-recover=all -Wunused -Werror=vla -Wnarrowing -pedantic -rdynamic tools/sqlite3_api_wrapper/CMakeFiles/test_sqlite3_api_wrapper.dir/test/test_sqlite3_api_wrapper.cpp.o tools/sqlite3_api_wrapper/CMakeFiles/test_sqlite3_api_wrapper.dir/test/test_sqlite3_udf_api_wrapper.cpp.o -o tools/sqlite3_api_wrapper/test_sqlite3_api_wrapper  -Wl,-rpath,/home/mark/duckdb_spatial/build/debug/tools/sqlite3_api_wrapper:/home/mark/duckdb_spatial/build/debug/src:/home/mark/duckdb_spatial/build/debug/dependencies/local/lib  tools/sqlite3_api_wrapper/libsqlite3_api_wrapper.so  src/libduckdb.so  third_party/fsst/libduckdb_fsst.a  third_party/fmt/libduckdb_fmt.a  third_party/libpg_query/libduckdb_pg_query.a  third_party/re2/libduckdb_re2.a  third_party/miniz/libduckdb_miniz.a  third_party/utf8proc/libduckdb_utf8proc.a  third_party/hyperloglog/libduckdb_hyperloglog.a  third_party/fastpforlib/libduckdb_fastpforlib.a  third_party/mbedtls/libduckdb_mbedtls.a  extension/jemalloc/libjemalloc_extension.a  extension/spatial/libspatial_extension.a  dependencies/local/lib/libgdal.a  dependencies/local/lib/libgeos_c.a  dependencies/local/lib/libgeos.a  dependencies/local/lib/libproj.a  -lm  -ldl  dependencies/local/lib/libsqlite3.a  dependencies/local/lib/libcurl.a  dependencies/local/lib/libexpat.a  /usr/lib/x86_64-linux-gnu/libssl.a  /usr/lib/x86_64-linux-gnu/libcrypto.a  -ldl  dependencies/local/lib/libsqlite3.a  dependencies/local/lib/libz.so  dependencies/local/lib/libmemvfs.a  -lpthread && :
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateLinearRing() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::AsInnerBoundaryIs(boost::intrusive_ptr<kmldom::Element>)'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateCoordinates() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::AsOuterBoundaryIs(boost::intrusive_ptr<kmldom::Element>)'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateLinkSnippet() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateData() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateNetworkLink() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateScreenXY() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::AsContainer(boost::intrusive_ptr<kmldom::Element>)'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateLatLonAltBox() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::KmlFactory::CreateStyle() const'
/usr/bin/ld: src/libduckdb.so: undefined reference to `kmldom::AsPolygon(boost::intrusive_ptr<kmldom::Element>)'
...
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:86: undefined reference to `kmlbase::intrusive_ptr_add_ref(kmlbase::Referent*)'
/usr/bin/ld: dependencies/local/lib/libgdal.a(ogrlibkmlfield.cpp.o): in function `boost::intrusive_ptr<kmldom::GxTimeSpan>::intrusive_ptr(kmldom::GxTimeSpan*, bool)':
/usr/include/boost/smart_ptr/intrusive_ptr.hpp:69: undefined reference to `kmlbase::intrusive_ptr_add_ref(kmlbase::Referent*)'
/usr/bin/ld: dependencies/local/lib/libgdal.a(ogrlibkmlfield.cpp.o):/usr/include/boost/smart_ptr/intrusive_ptr.hpp:69: more undefined references to `kmlbase::intrusive_ptr_add_ref(kmlbase::Referent*)' follow
/usr/bin/ld: dependencies/local/lib/libgdal.a(ogrlibkmlfeaturestyle.cpp.o): in function `kml2featurestyle(boost::intrusive_ptr<kmldom::Feature>, OGRLIBKMLDataSource*, OGRLayer*, OGRFeature*)':
/home/mark/duckdb_spatial/build/debug/dependencies/base/Source/GDAL/ogr/ogrsf_frmts/libkml/ogrlibkmlfeaturestyle.cpp:304: undefined reference to `kmldom::AsStyle(boost::intrusive_ptr<kmldom::Element>)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [Makefile:42: debug] Error 1

This is caused by GDAL finding libkml and enabling the driver, but we don't link it in in the final build. We need to make sure we disable all optional drivers.

How would I go about disabling it?

I would put: -DGDAL_USE_LIBKML=ON/OFF here:
https://github.com/duckdblabs/duckdb_spatial/blob/260e847d4d66dd1e8863124a539ffa7c657d907e/spatial/dependencies/CMakeLists.txt#L173

The works, thank you.
diff --git a/spatial/dependencies/CMakeLists.txt b/spatial/dependencies/CMakeLists.txt
index 9056280..01ef008 100644
--- a/spatial/dependencies/CMakeLists.txt
+++ b/spatial/dependencies/CMakeLists.txt
@@ -170,7 +170,7 @@ ExternalProject_Add(
     -DGDAL_USE_CURL=ON
     -DGDAL_USE_OPENSSL=ON
     -DOPENSSL_USE_STATIC_LIBS=ON # Propagate to FindOpenSSL.cmake
-
+    -DGDAL_USE_LIBKML=OFF
     # This is not true, but a bug in gdal's cmake files
     -DACCEPT_MISSING_SQLITE3_RTREE:BOOL=ON
     -DACCEPT_MISSING_SQLITE3_MUTEX_ALLOC:BOOL=ON

$ GEN=ninja \
    make release


Running it on Ubuntu

Tried to run it on Ubuntu 12.10 64bit, which seems way handier for developing new modules. Due to pip issues I wasn't able to get all the latest packages.
Did the following:
sudo apt-get install python-setuptools
sudo easy_install pip
sudo apt-get install python-pocketsphinx python-yaml python-tz python-requests build-essential python-pyaudio
git clone https://github.com/jasperproject/jasper-client.git
#sudo pip install -r jasper-client/client/requirements.txt
sudo pip install APScheduler CherryPy PyYAML Pykka RPi.GPIO argparse beautifulsoup4 facebook-sdk feedparser numpy pifacedigitalio --allow-external pygame python-dateutil python-mpd pytz quantities semantic six ws4py wsgiref requests sphinx
cd jasper-client/client
python populate.py
python main.py

results in:
===========================================================
 JASPER The Talking Computer
 Copyright 2013 Shubhro Saha & Charlie Marsh
===========================================================
INFO: cmd_ln.c(506): Parsing command line:
\
	-hmm /usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k \
	-lm languagemodel_persona.lm \
	-dict dictionary_persona.dic

Current configuration:
[NAME]		[DEFLT]		[VALUE]
-agc		none		none
-agcthresh	2.0		2.000000e+00
-alpha		0.97		9.700000e-01
-ascale		20.0		2.000000e+01
-backtrace	no		no
-beam		1e-48		1.000000e-48
-bestpath	yes		yes
-bestpathlw	9.5		9.500000e+00
-cep2spec	no		no
-ceplen		13		13
-cmn		current		current
-cmninit	8.0		8.0
-compallsen	no		no
-dict				dictionary_persona.dic
-dictcase	no		no
-dither		no		no
-doublebw	no		no
-ds		1		1
-fdict
-feat		1s_c_d_dd	1s_c_d_dd
-featparams
-fillprob	1e-8		1.000000e-08
-frate		100		100
-fsg
-fsgusealtpron	yes		yes
-fsgusefiller	yes		yes
-fwdflat	yes		yes
-fwdflatbeam	1e-64		1.000000e-64
-fwdflatefwid	4		4
-fwdflatlw	8.5		8.500000e+00
-fwdflatsfwin	25		25
-fwdflatwbeam	7e-29		7.000000e-29
-fwdtree	yes		yes
-hmm				/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k
-input_endian	little		little
-jsgf
-kdmaxbbi	-1		-1
-kdmaxdepth	0		0
-kdtree
-latsize	5000		5000
-lda
-ldadim		0		0
-lifter		0		0
-lm				languagemodel_persona.lm
-lmctl
-lmname		default		default
-logbase	1.0001		1.000100e+00
-logfn
-logspec	no		no
-lowerf		133.33334	1.333333e+02
-lpbeam		1e-40		1.000000e-40
-lponlybeam	7e-29		7.000000e-29
-lw		6.5		6.500000e+00
-maxhistpf	100		100
-maxhmmpf	-1		-1
-maxnewoov	20		20
-maxwpf		-1		-1
-mdef
-mean
-mfclogdir
-mixw
-mixwfloor	0.0000001	1.000000e-07
-mmap		yes		yes
-ncep		13		13
-nfft		512		512
-nfilt		40		40
-nwpen		1.0		1.000000e+00
-pbeam		1e-48		1.000000e-48
-pip		1.0		1.000000e+00
-rawlogdir
-remove_dc	no		no
-round_filters	yes		yes
-samprate	16000		1.600000e+04
-sdmap
-seed		-1		-1
-sendump
-silprob	0.005		5.000000e-03
-smoothspec	no		no
-spec2cep	no		no
-svspec
-tmat
-tmatfloor	0.0001		1.000000e-04
-topn		4		4
-toprule
-transform	legacy		legacy
-unit_area	yes		yes
-upperf		6855.4976	6.855498e+03
-usewdphones	no		no
-uw		1.0		1.000000e+00
-var
-varfloor	0.0001		1.000000e-04
-varnorm	no		no
-verbose	no		no
-warp_params
-warp_type	inverse_linear	inverse_linear
-wbeam		7e-29		7.000000e-29
-wip		0.65		6.500000e-01
-wlen		0.025625	2.562500e-02

ERROR: "acmod.c", line 88: Must specify -mdef or -hmm
Traceback (most recent call last):
  File "main.py", line 24, in <module>
    "languagemodel_persona.lm", "dictionary_persona.dic")
  File "/home/patrick/git/jasper-client/client/mic.py", line 41, in __init__
    hmm=hmdir, lm=lmd_persona, dict=dictd_persona)
  File "pocketsphinx.pyx", line 258, in pocketsphinx.Decoder.__cinit__
RuntimeError: Failed to initialize PocketSphinx

can u help me running on rpi b,plz respond,
guys just give a hint, i tried on B B+ UBUNTU 14.04
all get to same step
INFO:client.stt:Transcribed: ['NOW IN']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['IN']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['TODAY NEWS TODAY']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['IS BEING']
INFO:client.stt:Transcribed: ['']
still no outut yet

I don't have any idea what you need to do on ubuntu, but maybe on the raspberry, do you have an external usb sound card?
please post the output of aplay -l
Where are your speakers connected? usb sound card or audio out on the raspberry itself?
Did you try the other one?
Try alsamixer to raise up the volume. For the speakers and the microphone.
What kind of microphone are you using?
Try a speaker test with
speaker-test -c2 -D hw:1,0 for the raspberry pi onboard sound (which is default for jasper afaik)
If your speaker are working try with arecord -f dat test.wav to record something (Ctrl+C to stop recording) and after that try play that file with aplay -f dat -D hw:1,0 test.wav

joelvinaykumar@Deadpool:~$ cd ~/jasper/client
joelvinaykumar@Deadpool:~/jasper/client$ python main.py
No handlers could be found for logger "cmuclmtk"

        JASPER - THE TALKING COMPUTER           *

(c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *

WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
ERROR:root:Error occured!
Traceback (most recent call last):
File "../jasper.py", line 143, in
app = Jasper()
File "../jasper.py", line 102, in init
tts_engine_class = tts.get_engine_by_slug(tts_engine_slug)
File "../client/tts.py", line 665, in get_engine_by_slug
"missing dependencies, etc.)") % slug)
ValueError: TTS engine 'espeak-tts' is not available (due to missing dependencies, etc.)
joelvinaykumar@Deadpool:~/jasper/client$

Can somebody help me with this ! I'm not able to proceed after Pocket Sphinx & that too its not installing.
I tried youart command....but it says command not found.

Hello there
I was able to install all the components for Jasper on my Ubuntu Mate, but I get no sound return when I say "Jasper".
During alsa config and temp.wav test sound, I was able to record and hear the file.
Can someone help me figure out what's going on with the sound on jasper?
Thanks

are you using Jasper "master"-branch or "jasper-dev" Branch
In case of the master branch, have a look at client/tts.py. In line  76 is the aplay command used to play audio:
cmd = ['aplay', '-D', 'plughw:1,0', str(filename)]
You may need to adapt the plughw option depending on your system, e.g. specifying which audio output device should be used.

adndweber - I problably love you! Thanks


TP: /#!/cdns/{ID}/delivery-services is empty

This Bug Report affects these Traffic Control components:

Traffic Portal

What did you do?

Started the CDN in a Box for Developers
Went to TPv1 in my browser, https://localhost:444/
Navigated to CDNs -> dev
From the drop-down, chose View Delivery Services (https://localhost:444/#!/cdns/2/delivery-services)

What happened?

No table showed up, no Delivery Services were shown

What did you expect to happen?

A list of Delivery Services in the dev CDN

/#!/cdns/{ID}/delivery-services

Is that URL accurate? It should be something like #!/delivery-services?cdn={{ID}}.

Looks like that's been the URL since 2016
https://github.com/apache/trafficcontrol/blob/05e7f2157974d75dd79cedbdc8e9d2582789f921/traffic_portal/app/src/common/modules/form/cdn/FormCDNController.js#L57-L59
The URL format corresponds with that used for the table of Servers in a CDN, https://localhost:444/#!/cdns/2/servers

@zrhoffman @shamrickus  - was this not fixed with #7104

Reproduced at 2697a3fd29, the merge commit of #7104

I would guess the problem, then, is that link. Should be a link to a filtered DS list, not $location.path() + '/delivery-services'.

It's the same issue,  just a table I missed.


Fix link to KTX

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Texture coordinates without normals

https://github.com/greenmoss/PyWavefront/blob/d05ba434f105b1144defc7357d499f725c6086b0/pywavefront/__init__.py#L111
Having normals is not really a requirement. I can make a PR removing this, but I don't know what implications with will have for the drawing in this library. (Not something I use)

This is also linked to #22 were the core issue is that PyWavefront is hardcoded to one vertex format.

Having normals is not really a requirement. I can make a PR removing this, but I don't know what implications with will have for the drawing in this library.

The "good thing" is that all the examples in this lib employ the drawing routines, so whatever changes you decide to make, you can always try to see the results immediately.

The "good thing" is that all the examples in this lib employ the drawing routines, so whatever changes you decide to make, you can always try to see the results immediately.

This has no value to me, but seeing that pyglet have been part of this library for visualization I will definitely respect that. What was outlined in #22 also seems to preserve this.
Feel free to close this if #22 is renamed to something more generic related to vertex format.

I really had to do some digging to look this one up. The first iteration of this was a warning, because without normals the render showed a black screen. Ref:
https://github.com/greenmoss/PyWavefront/commit/e2347bedc92391f9c49701d9ab851f188e3a12cd#diff-c9d20f1c97263663c3302082b2179853L86
I changed it to an exception thinking it might be an error the user would otherwise miss. What is the most desirable behavior here? Should there be a warning, or nothing at all?

@greenmoss As mentioned in #22 we will update the pyglet drawing code so it works. We will only support the vertex formats pyglet supports with glInterleavedArray.

Just reading this after looking at the PR. So the updates in the PR remove the need for the normals check? If that is the case, the whole unit test can go away (it's currently just commented out).

Fixed in #38


Various ripple effects

Hi,
first of all, awesome work you did !
Far better than every other ripple library.
I am working on my Bootstrap buttons : https://djibe.github.io/material/docs/4.4/material/buttons/

I want a dark ripple on every button.
I want a light ripple on btn-primary, btn-secondary, btn-info, etc ...
I want a customized colored ripple on each btn-outlined-* and btn-flat-*

How can I declare these in Javascript ?
I started with
ripplet.defaultOptions.color = 'rgba(0, 0, 0, 0.12)';

let buttonsRippleArr = document.querySelectorAll('.btn:not([disabled])');

buttonsRippleArr.forEach(function(elem) {
  elem.addEventListener('mousedown', ripplet);
});

But I don't know how to create custom declarations for various components.
Thanks for your help and impressive work.

@djibe
Thank you for praising this library😄

But I don't know how to create custom declarations for various components.

window.addEventListener('mousedown', function(event) { ... }) handles all mousedown events for which event.stopPropagation() has not been called. (window. can be omitted)
addEventListener('pointerdown', function (event) {
  const cls = event.target.classList
  if (event.button !== 0 || !cls.contains('btn') || event.target.disabled) {
    return
  }

  const rippleTarget = {
    currentTarget: event.target,
    clientX: event.clientX,
    clientY: event.clientY,
  }

  if (cls.contains('btn-link')) {
    ripplet(rippleTarget, { color: 'rgba(255,255,255,.5)' })
  } else if (
    cls.contains('btn-outline-primary') ||
    cls.contains('btn-outline-secondary') ||
    cls.contains('btn-outline-danger') ||
    cls.contains('btn-outline-info') ||
    cls.contains('btn-outline-success') ||
    cls.contains('btn-outline-warning') ||
    cls.contains('btn-outline-dark') ||
    cls.contains('btn-outline-light')
  ) {
    ripplet(rippleTarget, { color: getComputedStyle(event.target).color, opacity: .2 })
  } else {
    ripplet(rippleTarget, { color: 'rgba(0,0,0,0.12)' })
  }
})

CodePen:
https://codepen.io/luncheon/pen/VwvdyEd
It would be good to learn about event bubbling and capture.
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Bubbling_and_capturing_explained

Thx a lot for your answer.
I'll investigate

Your work is awesome and we are nearly there : https://codepen.io/djibe89/pen/oNjMjQx
However when click goes on icon, event is not triggered.
Before I go take a MOOC of Ecmascript, how can I solve this (not only .material-icons but any element that could be in a button like svg, i, span)
Thanks a lot, I really appreciate your involvment.
See you

OK, I know.
The target buttons can be searched with event.target.closest('.btn').
https://codepen.io/luncheon/pen/zYvLNvM
(IE does not support closest(). See MDN for details.)
https://developer.mozilla.org/en-US/docs/Web/API/Element/closest

Perfect !
You are the best.
Thx for Ripplet and your help.


Modified error message output on host already or does not exist

What's changed

Modified error message outputs for docker-machine actions that result in host does not exist and host already exists to be a little more user-friendly

Related

Partially fixes an issue logged on the Docs repo as #4379

Reviewers
@shin- please take a look, and if you don't like this you can just close the PR. We got some feedback on confusing error messages in #4379. This slight change may help somewhat, and I can also see what else can do in the docs.
@johndmulhausen @mstanleyjones
Signed-off-by: Victoria Bialas<EMAIL_ADDRESS>

I'm inclined to say "host" is the correct terminology here, and it's a pretty common software eng term, so I'm not too sure what about it is confusing... :/

Well there is confusion about what a Docker machine is.  I understand that
"host" is common but in this case the fact that it's generic is causing the
confusion... and since confusion over the concepts of a "Docker Machine"
have surfaced before, I thought something like this isn't a bad idea . I
was even thinking of adding a second sentence about using "docker-machine
create" to add a machine. Thus hint might have helped this user and
clarified the nature of the problem right at the CLI, giving breadcrumbs to
the "create" command:
On Tue, Aug 29, 2017 at 3:52 PM Joffrey F<EMAIL_ADDRESS>wrote:

I'm inclined to say "host" is the correct terminology here, and it's a
pretty common software eng term, so I'm not too sure what about it is
confusing... :/
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/docker/machine/pull/4237#issuecomment-325827184, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALHuAyd2SD6x7JUadF-t6aYBrlLDpsuYks5sdJYrgaJpZM4PGo5D
.

@shin- So, there was some confusion about what a Docker machine is.
I understand that "host" is common but in this case the fact that it is a generic term, I think, caused the confusion. It's not a big deal, but there has been some confusion about the concept of a "Docker machine" have before. This was part of the impetus for me re-writing the Docker Machine Overview page when I got here.
Given that, making the error message outputs a little more specific in this case might not be a bad idea, even if it's a little less standard (e.g., specifying "Docker machine" instead "host") .
I was even thinking of adding a second sentence about using "docker-machine create" to add a machine. This hint might have helped this user and clarified the nature of the problem right at the CLI, giving breadcrumbs to the docker-machine create command.
That's my thinking on it, but if you disagree, of course will defer to you. You're the man! :-)

It might help if every docker web page has a link near the top, on the side, or some place easily spotted, to 'Glossary of Docker Terms' - in particular it should clarify the difference between generic terms like 'host' and specific terms like 'docker host'.
https://martinfowler.com/bliki/TwoHardThings.html

There is a Glossary link at the top of every page. :)
On Wed, Aug 30, 2017 at 11:12 AM Eric Kolotyluk<EMAIL_ADDRESS>wrote:

It might help if every docker web page has a link near the top, on the
side, or some place easily spotted, to 'Glossary of Docker Terms' - in
particular it should clarify the difference between generic terms like
'host' and specific terms like 'docker host'.
https://martinfowler.com/bliki/TwoHardThings.html
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/docker/machine/pull/4237#issuecomment-326074186, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHUa9ZobpYfmamfhH0FRah_Wv08vtE0qks5sdaYXgaJpZM4PGo5D
.

Doh! Found it. I was looking below the header instead of at it.
Cheers, Eric

@londoncalling Can you rebase this PR against the new master branch? This should clear the test failures. Changes LGTM.

@shin- let me take a look and see if I can do it

@shin- okay I think you should take over updating the unit tests in its/cli/create_rm_test.go. There is some aspect of it I don't think I understand well enough.


The examples in the docs do not work on stackblitz

Reproduction link
https://vtqmqy--run.stackblitz.io
Steps to reproduce
Open the stackblitz page of any example from the documentation
What is expected?
work examples
What is actually happening?
None of the examples in the documentation work on stackblitz

Environment
Info

ng-zorro-antd
12.0.1

Browser
chrome 93

close via #6861


missing Description for IpRange

Seems like when adding ingress rule to security group 'authorize_security_group_ingress()' the "Description" is ignored unlike in boto3.
Seems the code is in SecurityGroups class _process_rules_from_querystring method
            ip_ranges = []
            ip_ranges_tree = ip_permission.get('IpRanges') or {}
            for ip_range_idx in sorted(ip_ranges_tree.keys()):
                ip_ranges.append(ip_ranges_tree[ip_range_idx]['CidrIp'][0])

I don't know if is there a reason for that or is it a bug but it definitely makes it hard to test feature i've wrote using moto.

Thanks; setting as a feature request.

The description is now persisted as of moto >= 1.3.16.dev199

The description is now persisted as of moto >= 1.3.16.dev199


Update README.md

unless you want to rewrite a bit because of what I said, you can merge whenever you want

@charcol could you please also review the new README?
@ccoVeille we can merge it after she has a chance to go over it.

I would like to merge. It's better to use what you made. It's way better than what we have now. We can fix later


fedekunze/1409 fix bond amount

Closes #1409
Description:
Note, I can't test it since I can't receive tokens on the local-testnet due to bech32 prefix issues

❤ Thank you!

[x] Added entries in CHANGELOG.md with issue # and GitHub username
[x] Reviewed Files changed in the github PR explorer

can't you use the mocked testnet for this?

Blocked because unable to test because of https://github.com/cosmos/cosmos-sdk/issues/2654

codecov says the tests have decreased by 0.01% ...

In total but the touched code has full coverage. This is why the total coverage is not a required check.

@faboweb why did you reject my approval instead of merging?

This happens automatically when you merge in new code. This wasn't the disapprove your approval. ;)


[Explore] [Design] improving the experience when user creates a new chart

Context
When user creates a new chart, after choosing the dataset and the type of the chart they land of the page full of errors which is a bad user experience. There are some metrics that are required, but they should not immediately be shown as errors - when user lands on the page, they should be encouraged and guided to fill in the blanks - not shouted at.

Describe the solution you'd like
Redesign the experience. Add empty states that guide user through the process. Proposed flow below.

Requirements
-> disable the pills with number of rows and time in the right section of explore (data and chart)
-> removeerror icons
-> add one info icon next to metrics (tooltip) - active (blue) if the metrics field is empty, grayed out when the metrics field is filled, but still can hover over the tooltip
-> adda empty state with tips/guide
-> highlight all of the fields that are required
-> if user adds and removes the value - add red error (current solution)
Additional information
Flow
Components
cc: @junlincc

I have also run into this, and came up with a fairly simple solution of including documentation inline, under the error message if it is present. As a simple proof of concept, I have this.
While I have not yet written much of the documentation required, it seems that it would at least begin to solve the problem and is simple to implement.

@bluepython508 thanks for the input and idea! I think we are tackling two problems here:

When user creates their first chart they land on the page with ~6 error messages which is not a great experience and makes them feel like something is broken → related to empty state I proposed
It is hard to understand the language, patterns and general - how to create chart/visualisation → related to the description you proposed

I think that adding the empty state and highlighted fields is a good quick win as of now for the new chart/users.
Guiding the user through the process of creating a chart is a bigger thing and requires more research re: chart types, behaviours etc. You articulated a big problem (and thank you for that!), which we really need to address, but I think it should be a separate issue. What do you think?

maybe we can include the inline description in a tooltip on hover state, as the description can get long and overwhelm users visually? @kasiazjc

I think it would be a good middle ground, the empty state is universal, but the guide/description would have to be tailored to each chart.
We could add one tooltip with all the information next to the empty state or add the details to the tooltip next to the value to give the user the context which I think would be easier as we would have to define a few fields that are required and update the copy. I think the second solution would have less edge cases, thoughts?

Do you mean improving the tooltips on the controls, for example to clarify what is meant by "metric"? If so, I think that would help immensely.
I've been working on a proof of concept implementation of your original suggestion, essentially displaying errors as info until there are no validation errors. It's here.
Before correcting validation errors:

After correcting validation errors, then causing more:

(The changes only apply when the current loading of the page has had no state without validation errors)

@bluepython508 sorry for the late response, missed the notification!
Yes - I meant improving the tooltips on the controls as currently they are not really much help, are they. I will need to find the list of all of the required fields and work on the copy.
I proposed a generic copy when user enters the explore for the first time, but maybe listing the required controls would help - what do you think? I wanted to make the first encounter with explore more pleasant that's why I added more friendly empty state/illustration.

Thanks for working on the proof of concept and help 🙏

I think both specific guidance for some of the more common charts (pie, bar, etc) in the empty state, with a fallback that simply lists required controls or something would work reasonably well (It's fairly easy to get a list of required controls to include in a generic empty state). This is essentially what I was implementing in my inline-documentation branch. Better tooltips might reduce the needs for specific empty states for different charts, if things like metrics didn't have to be explained in the empty state section.

I think you're right and it's the best solution - generic information with the required controls listed in the empty state + improved tooltips. I can work on the copy for the tooltips and share the figma file with all of the details to check out.

I believe the bulk of this was tackled, but @kasiazjc if you disagree, we can re-open with updated details, or open a new thread/Discussion!


Correct typos & grammatical errors in README

What is this change?

Corrects typos
Corrects some grammatical errors
Corrects capitalization of proper nouns and acronyms
Corrects reference of Node.js v12 to appear as  Node Maintenance LTS as v12 is no longer the primary LTS version

Why is this change necessary?
These minor improvement will give readers a more polished reading experience.

Thanks for fixing this @brnnnfx !

Thanks for fixing this @brnnnfx !


Deferred destruction and dynamically sized types

I've been thinking quite a bit about the RFC published a few days ago. While implementing the RFC, a few issues with 'static bounds came up that @Vtec234 correctly pointed out to in this comment.
Somewhat relatedly, I also gave some thought to dynamically-sized types. Note that we can't, for example, create an Owned<[T]> and then store it into an Atomic<[T]>. The problem here is that atomic pointers would have to be two words wide (fat pointers), and AtomicPtr that is powering Atomic<_> behind the scenes is just a single-word pointer (thin pointer).
If we want to actually have an atomic pointer to a DST, then we have to embed the size (or length) inside the heap-allocated object to make the pointer thin. See for example thin-vec, which is a Vec the size of just 1 word (instead of 3 words).
Motivation
The Scope::defer method we have is quite nice:
impl Scope {
    fn defer<F: FnOnce() + Send + 'static>(&self, f: F);
}

The bounds on F are self-explanatory: this is a function that will be executed once, perhaps by another thread, after an arbitrary amount of time. This is a nice piece of documentation encoded in types, but I worry that every call to defer method will actually try to cheat around the bounds.
Example: stack
To see what I mean, consider the following scenario. We have a typical stack defined like this:
struct Node<T> {
    value: ManuallyDrop<T>,
    next: Atomic<Node<T>>,
}

struct Stack<T> {
    head: Atomic<Node<T>>,
}

unsafe impl<T: Send> Send for Stack<T> {}
unsafe impl<T: Send> Sync for Stack<T> {}

Now suppose that we have popped a node (p: Ptr<'scope, Node<T>>) from the top of the stack and need to destroy it. We'd typically do that using scope.defer_free, but let's forget about it today and try destructing by calling scope.defer instead:
scope.defer(|| drop(Box::from_raw(p.as_raw())));

But this doesn't compile, for two reasons:

p: 'static is false because p holds the lifetime 'scope.
Node<T>: Send is false because T: Send is false.

To work around bounds F: Send and F: 'static, let's cheat:
let raw = p.as_raw() as usize;
scope.defer(|| drop(Box::from_raw(raw as *mut Node<T>)));

Example: skiplist
Here's another example. In a skiplist we have dynamically sized nodes:
#[repr(C)]
struct Node<K: 'static, V> {
    value: ManuallyDrop<V>,
    key: ManuallyDrop<K>,
    refcnt: AtomicUsize,
    height: usize,
    pointers: [Atomic<Node<K, V>>; 0], // This array is of length `height`.
}

To allocate and deallocate such nodes, we implement our custom functions:
impl<K: 'static, V> Node<K, V> {
    // Allocates `size_of::<Self>() + size_of::<Atomic<Node<K, V>>>() * height` bytes.
    unsafe fn allocate(height: usize) -> *mut Self {
        // ...
    }

    // Reads `(*raw).height` first to compute the size in bytes, then deallocates the object.
    unsafe fn deallocate(raw: *mut Self) {
        // ...
    }
}

Now think how we would go about inserting a node into a skiplist:
fn insert(&self, key: K, value: V) -> bool {
    epoch::pin(|scope| unsafe {
        let height = self.random_height();
        let mut raw = Node::allocate(height); // Custom allocation.

        // Fill in the blanks.
        ptr::write(&mut (*raw).key, ManuallyDrop::new(key));
        ptr::write(&mut (*raw).value, ManuallyDrop::new(value));
        ptr::write(&mut (*raw).height, height);

        let mut node = Owned::from_raw(raw);

        loop {
            let (found, left, right) = self.search(&raw.key);
            if found {
                return false; // DANGER: `node` will be incorrectly deallocated!
            }

            node.deref().tower(0).store(right[0], SeqCst);
            if let Err((_, n)) = left[0].tower(0).compare_and_set_owned(right[0], node, SeqCst, scope) {
                node = n;
            } else {
                break;
            }
        }

        // TODO: Continue building the tower...
        true
    })
}

A glaring problem here is that, since we're using custom allocation and deallocation, Owned became unusable. We cannot create an Owned from our allocated raw pointer and then just drop it if insertion fails -- deallocation must happen through Node::deallocate!
A correct way of insertion would be:
fn insert(&self, key: K, value: V) -> bool {
    epoch::pin(|scope| unsafe {
        let height = self.random_height();
        let mut raw = Node::allocate(height); // Custom allocation.

        // Fill in the blanks.
        ptr::write(&mut (*raw).key, ManuallyDrop::new(key));
        ptr::write(&mut (*raw).value, ManuallyDrop::new(value));
        ptr::write(&mut (*raw).height, height);

        let node = Ptr::from_raw(raw);

        loop {
            let (found, left, right) = self.search(&raw.key);
            if found {
                // Custom drop and deallocation.
                node.deref().key.manually_drop();
                node.deref().value.manually_drop();
                Node::deallocate(node.as_raw() as *mut _);
                return false;
            }

            node.deref().tower(0).store(right[0], SeqCst);
            if left[0].tower(0).compare_and_set(right[0], node, SeqCst, scope).is_ok() {
                break;
            }
        }

        // TODO: Continue building the tower...
        true
    })
}

This is a bit unfortunate because now we can't rely on Owned anymore. Instead, we're fiddling with unsafe conversion to Ptr and then manually destructing the node where the destructor of Owned would otherwise be executed.
Moving on: let's turn to deferred destruction of nodes. Suppose that we've just removed a node: Ptr<'scope, Node<K, V>> and want to destroy it:
node.deref().value.manually_drop();
scope.defer(|| {
    node.deref().key.manually_drop();
    Node::deallocate(node.as_raw() as *mut _);
});

This is a curious case: why drop the value now and drop the key later? The reason is that we'll implement the skiplist so that other threads have to increment the refcount before using the value, but only if the node is not yet deleted (i.e. the refcount is positive). A node is removed only when the refcount becomes zero, and then we know no one has a chance of accessing the value anymore.
Disclaimer: We don't have to use refcounts, but for the sake of this text, please just accept that the skiplist is implemented this way. :)
Anyways... As before, this doesn't compile. Let's cheat around F: Send and F: 'static:
node.deref().value.manually_drop();
let node = p.as_raw() as usize;
scope.defer(|| {
    let node = node as *mut Node;
    (*node).key.manually_drop();
    Node::deallocate(node);
});

Problem summary
The key take away I want to make from this story is: even though defer's bounds F: Send and F: 'static are quite nice, what is the point if we have to circumvent them every time?
I would argue that defer is inherently very unsafe -- we have to guarantee several things:

That the node just became unreachable from the rest of the data structure.
That it's okay for another thread to execute the deferred destructor (but this is naturally true for all concurrent data structures).
That we won't touch non-'static data in the deferred destructor (e.g. that would be value in the case of skiplists).

When deferring destruction, we're performing the following steps:

Grab a few local variables (Ptrs, which are not 'static; or raw pointers, which are not Send).
Unsafely move them into a closure.
Unsafely drop and destroy some data in the closure.

We're already acutely aware of all the requirements for correct destruction, so the type bounds F: Send and F: 'static are not very helpful -- they're just getting in the way.
The other problem is that Owned does not support custom destructors. Sometimes it's useful to manually allocate and deallocate objects (actually, I'd say quite often: in deques, skiplists, Bw-Trees, even segmented queues).
Proposed solution
Think about Owned::drop and Scope::defer_drop we have in the current API. There is a strong connection between these two methods: they should do exactly the same thing, but the difference is when they do it. The former destructs immediately, and the latter destructs at a later time. They're like two sides of the same coin.
To support custom destructors, let's create the following trait with default implementation (note that we're using the unstable specialization feature):
pub trait Destroy {
    unsafe fn destroy(ptr: *mut Self);
}

impl<T> Destroy for T {
    default unsafe fn destroy(ptr: *mut Self) {
        drop(Box::from_raw(ptr));
    }
}

Next, implement Drop for Owned like this:
impl<T: Destroy> Drop for Owned<T> {
    fn drop(&mut self) {
        unsafe { T::destroy((self.data & !low_bits::<T>()) as *mut T) }
    }
}

Let's also add a similar method to Ptr:
impl<'scope, T: Destroy> Ptr<'scope, T> {
    pub unsafe fn destroy(self) {
        T::destroy(self.as_raw() as *mut T);
    }
}

Now instead of doing this:
scope.defer_drop(p);

we can do this:
scope.defer(|| p.destroy());

The only thing left to do is to relax the bounds on Scope::defer a bit by removing Send + 'static and making it unsafe:
impl Scope {
    unsafe fn defer<F: FnOnce()>(&self, f: F);
}

This makes the method Scope::defer_drop redundant -- of the original defer_free/defer_drop/defer trio, only defer survives. :)
Example: stack
Now let's see how would we destroy a popped node from a stack:
scope.defer(|| p.destroy());

This is not much less ergonomic than calling defer_drop!
Example: skiplist
Let's implement Destroy for Node:
impl<K: 'static, V> Destroy for Node<K, V> {
    unsafe fn destroy(ptr: *mut Self) {
        (*ptr).key.manually_drop();
        Self::deallocate(ptr);
    }
}

Since now we have support for custom destructors in Owned, we can leverage it to insert nodes into a skiplist:
fn insert(&self, key: K, value: V) -> bool {
    epoch::pin(|scope| unsafe {
        let height = self.random_height();
        let mut raw = Node::allocate(height); // Custom allocation.

        // Fill in the blanks.
        ptr::write(&mut (*raw).key, ManuallyDrop::new(key));
        ptr::write(&mut (*raw).value, ManuallyDrop::new(value));
        ptr::write(&mut (*raw).height, height);

        let mut node = Owned::from_raw(raw); // Nice!

        loop {
            let (found, left, right) = self.search(&raw.key);
            if found {
                return false; // Not dangerous anymore - awesome!
            }

            node.deref().tower(0).store(right[0], SeqCst);
            if Err((_, n)) = left[0].tower(0).compare_and_set_owned(right[0], node, SeqCst, scope) {
                node = n;
            } else {
                break;
            }
        }

        // TODO: Continue building the tower...
        true
    })
}

To clean up initialization of Node, we could take a step further and implement:
impl<K: 'static, V> Node<K, V> {
    fn new(key: K, value: V, height: usize) -> Owned<Node<K, V>> {
        // ...
    }
}

Finally, to destroy a removed node from skiplist, we can just do:
node.deref().value.manually_drop();
scope.defer(|| node.destroy());

Nice and clean.
Example: dynamically-sized arrays
Here's one more example. Let's implement a dynamically sized array that can be used as Atomic<Array<T>>:

Code (click to expand)
#![feature(specialization)]

extern crate crossbeam_epoch as epoch;
extern crate stable_heap;

use std::mem;
use std::ptr;
use std::ops::{Index, IndexMut};

use epoch::Owned;
use epoch::Destroy;

#[repr(C)]
struct Array<T: Default> {
    len: usize,
    arr: [T; 0],
}

impl<T> Array<T> {
    fn size_and_align(len: usize) -> (usize, usize) {
        let size = mem::size_of::<Self>() + len * mem::size_of::<T>();
        let align = mem::align_of::<Self>();
        (size, align)
    }

    fn new(len: usize) -> Owned<Self>
    where
        T: Default,
    {
        let (size, align) = Self::size_and_align(len);
        unsafe {
            let mut a = Owned::from_raw(stable_heap::allocate(size, align) as *mut Self);
            a.len = len;
            for i in 0..len {
                ptr::write(a.arr.get_unchecked_mut(i), T::default());
            }
            a
        }
    }

    fn len(&self) -> usize {
        self.len
    }
}

impl<T> Destroy for Array<T> {
    unsafe fn destroy(raw: *mut Self) {
        let (size, align) = Self::size_and_align((*raw).len);
        stable_heap::deallocate(raw as *mut u8, size, align);
    }
}

impl<T> Index<usize> for Array<T> {
    type Output = T;

    fn index(&self, index: usize) -> &T {
        assert!(index < self.len);
        unsafe { &*self.arr.get_unchecked(index) }
    }
}

impl<T> IndexMut<usize> for Array<T> {
    fn index_mut(&mut self, index: usize) -> &mut T {
        assert!(index < self.len);
        unsafe { &mut *self.arr.get_unchecked_mut(index) }
    }
}

fn main() {
    // Let's create an `Owned` array of length 5.
    let mut a = Array::<usize>::new(5);
    for i in 0..5 {
        a[i] = i;
    }
    assert!(a.len() == 5);

    unsafe {
        epoch::unprotected(|scope| {
            // We can convert it into a `Ptr`, if we want...
            let p = a.into_ptr(scope);

            // And destroy it!
            p.destroy();
        });
    }
}

In the Chase-Lev deque we have Buffer<T>, which simply wraps around Vec<T>, creating unnecessary levels of indirection.
To access an element from the deque, we have to:

Get a reference to the heap-allocated Buffer<T>.
Get a reference to the heap-allocated array within the Vec<T>.
Offset into the array.

Using Array<T>, we'd have to do the following steps only:

Get a reference to the heap-allocated Array<T>.
Offset into the array.

This gets us fewer memory allocations and faster access into the array.
But specialization is still in nightly only!
The Destroy trait has a default impl for all types T, so we provide custom implementations by specializing. Specialization is still an unstable feature. Until it gets stable, we can work around the problem like this:
impl<T> Destroy for T {
    #[cfg(not(feature = "nightly"))]
    unsafe fn destroy(ptr: *mut Self) {
        drop(Box::from_raw(ptr));
    }

    #[cfg(feature = "nightly")]
    default unsafe fn destroy(ptr: *mut Self) {
        drop(Box::from_raw(ptr));
    }
}

Of course, if you're not using the nightly feature, specialization is not available.
Alternatives
Now that we have the Destroy trait, would anyone ever use Scope::defer for anything else other than this?
scope.defer(|| ptr.destroy());

I can't imagine such a scenario off the top of my head, so perhaps we could ditch scope and have only defer_destroy:
impl Scope {
    unsafe fn defer_destroy<T>(&self, ptr: Ptr<T>);
}

Final words
Whew - that was a long text! If some parts of it are confusing, let me know and I'll try to clarify.
Finally, I'd like to summarize what all this is actually attempting to achieve:

Unify all the defer* methods into a single one to make the API smaller and simpler.
Get rid of pervasive 'static bounds and prevent scenarios like this one in sled. cc @jeehoonkang
Allow custom destructors in Owned to improve support for DSTs.
Introduce the equivalent of Owned::drop accessible via Ptr (namely, Ptr::destroy).

Let me know what you think! If you like at least some of the suggestions, I'll follow up with a more narrowly scoped RFC(s).

But this doesn't compile, for two reasons: [..] 2. Node<T>: Send is false because T: Send is false.
I don't think non-Send types should even be accepted, so T: Send should always be true. Firstly, if we have a non-Send type (and thus the structure is not Sync), using defer_drop will cause undefined behaviour if T::drop touches TLS or something like that and it gets recollected on another thread. The only way to guarantee that it doesn't do that is to require T: Send. Secondly, I don't see why anyone ever would want to use a concurrent structure with non-Send types, since it is then effectively a slower version of the serial implementation.
.. defer is inherently very unsafe -- we have to guarantee several things: [..] 2. That it's okay for another thread to execute the deferred destructor (but this is naturally true for all concurrent data structures).
By this, do you mean the same as I wrote above about regarding T: Send on concurrent structures?
Think about Owned::drop and Scope::defer_drop we have in the current API. There is a strong connection between these two methods: they should do exactly the same thing, but the difference is when they do it.
That's a good analogy, but not entirely true. Since Owned, well, owns the data, it can deallocate everything. On the other hand, defer_drop has to take into account when other threads might be using things. Your skiplist example demonstrates this - drop value immediately, defer key.
Then, since the solution code with Destroy has to take this into account and only destroys the key, the Owned drop on end of scope leaks values. I feel that this trait complicates things somewhat and the forgotten value.manually_drop() is a testament to that. I say that we do not introduce it for now.
Having said this, a sane usage for DSTs is an important problem to solve. The problem is not specific to concurrency and a solution would be useful for general usage. For now, I would use mem::forget, but it's not ideal.
In general, I agree that the boundaries are too restrictive - let's get rid of 'static on both defer and defer_drop. Then, defer_drop can be used with Ptr for most cases, and for types like the dynamically sized skiplist node, defer can be used. We should note in the descriptions of these functions that using them with Ptr makes the Ptr escape the scope that it was created for - thus epoch GC invariants must be upheld. If Ptr<T: Send> isn't Send, it should be.
To reiterate, I propose that we:

Remove the 'static requirement from the defer family, but leave Send.
Leave defer_drop to be used with "regular" types and use defer for types that need custom deallocation. Comment on how the interaction with Ptr makes it escape its original scope.
Defer (heh) the problem of more ergonomic DST usage for later.

I generally agree with @Vtec234.  Especially, I believe T: Send is essential for concurrent DST.  In particular, IMO, the PR I made for sled was necessary regardless of the use of Crossbeam.
How about using user-defined custom types instead of the Destroy trait?  If you want to provide a custom deallocation function, as for the skiplist, you need to make a struct type whose drop implementation does what needs to be done.

By this, do you mean the same as I wrote above about regarding T: Send on concurrent structures?

Yes. I actually fully agree on your point about T: Send.
After re-reading the text again, what I originally wrote doesn't make sense to me either. I probably wanted to argue that a *const Node<T> is not Send, which gets annoying if you want to move a raw pointer into the closure. Apologies for the confusion.

That's a good analogy, but not entirely true. Since Owned, well, owns the data, it can deallocate everything. On the other hand, defer_drop has to take into account when other threads might be using things. Your skiplist example demonstrates this - drop value immediately, defer key.

That's well put. I no longer think that the Destroy trait is a good idea. I also agree with your final proposal here. :)

If you want to provide a custom deallocation function, as for the skiplist, you need to make a struct type whose drop implementation does what needs to be done.

Well, the issue here is that you wouldn't really deallocate memory where T is stored from within T::drop. The T::drop function doesn't know where T is allocated - is it on the stack, the heap, or perhaps within a custom allocator? It can't deallocate the memory that is holding itself. :)
Regarding skiplist node allocation/deallocation, now I tend to think that the best way to do this would be using the (still in nightly only) Alloc trait. Naturally extending our Owned and Ptr, we could have something like the following:
struct Owned<T, A: Alloc = Heap> { ... }
struct Ptr<T: A: Alloc = Heap> { ... }

Then we would implement trait Alloc to create a custom skiplist node allocator.
I imagine Box<T> in the standard library will be similarly redefined as Box<T, A: Alloc = Heap>.

In particular, IMO, the PR I made for sled was necessary regardless of the use of Crossbeam.

Hmm, can you elaborate - why is it necessary? I don't know about Radix, but in Stack you don't have deferred drops. You have only deferred deallocation, so it's perfectly safe to just call scope.defer_free(head) regardless of whether the T in head is 'static or not.
For example, I think the following code should work:
let foo = "foo".to_string();
{
    let s: Stack<&str> = Stack::new();
    s.push(&foo);
}

You only need T: 'static when you're actually deferring calls to T::drop.

One more thing.
Removing 'static from the bounds in defer makes me a bit uneasy because now it's possible to accidentally do something like:
let type_name = "Foo";
let p: Ptr<T> = ...;

scope.defer(|| { // Whoops, this closure captures by reference!!!
    println!("I'm destroying an item of type {}", type_name);
    p.destroy(); // This `p` is a `&Ptr<T>`, not `Ptr<T>`.
});

By the time closure executes, the reference to p will become invalid and invoke UB.
For this reason, I'd advise always using move closures with defer, as in:
scope.defer(move || ...)

@stjepang oops, it's my mistake.  You're right on the PR.

How do you feel about removing defer_drop and introducing Ptr::destroy?
To see why the idea might be appealing, suppose that you wrote the following:
scope.defer_drop(p);

But now you're debugging the program and want to see if p actually gets dropped, or how many drops occur. In order to add logging, you change the code to:
scope.defer(move || {
    debug!("dropping p");
    drop(Box::from_raw(p.as_raw() as *mut _));
});

Well, this seems pretty ugly for such a small change, right?
But now imagine that there is no defer_drop and you have Ptr::destroy. You'd start with the following:
scope.defer(move || p.destroy());

Adding some logging is now much easier:
scope.defer(move || {
    debug!("dropping p");
    p.destroy();
});

Another benefit of Ptr::destroy is that it makes Drop impls easier.
Consider the destructor for Stack:
impl<T> Drop for Stack<T> {
    fn drop(&mut self) {
        unsafe {
            epoch::unprotected(|scope| {
                let mut curr = self.head.load(Relaxed, scope).as_raw();
                while !curr.is_null() {
                    let next = (*curr).next.load(Relaxed, scope).as_raw();
                    drop(Box::from_raw(curr as *mut Node<T>));
                    curr = next;
                }
            })
        }
    }
}

And this is how one may implement it using Ptr::destroy:
impl<T> Drop for Stack<T> {
    fn drop(&mut self) {
        unsafe {
            epoch::unprotected(|scope| {
                let mut curr = self.head.load(Relaxed, scope);
                while !curr.is_null() {
                    let next = curr.deref().next.load(Relaxed, scope);
                    curr.destroy();
                    curr = next;
                }
            })
        }
    }
}

@stjepang I think the following is also legit:
impl<T> Drop for Stack<T> {
    fn drop(&mut self) {
        unsafe {
            epoch::unprotected(|scope| {
                let mut curr = self.head.load(Relaxed, scope);
                while !curr.is_null() {
                    let next = (*curr.as_raw()).next.load(Relaxed, scope);
                    scope.defer_drop(curr);
                    curr = next;
                }
            })
        }
    }
}

Here, I exploited the fact that the defer_drop() method of unprotected scopes immediately drops the given object.

I fell that if a data structure needs it's custom allocation (DST or not) instead of Owned it should handle it's own destruction, Owned/Drop is definitely not suitable.
We probably shouldn't go out of our way to find a compromise (losing on the Owned/Drop front) at this point. This might become way easier to solve the common DST case when Rust has support for const generics.

@arthurprs Agreed, none of the options I originally proposed seem like the right thing to do... :/
I'm really looking forward to const generics, custom DSTs, allocas, and the Alloc trait.

Deferred destruction was revisited when we removed defer_free and defer_drop in favor of defer.
And regarding DSTs, it's pretty clear now that it would be best to just wait for several aforementioned Rust features.
Closing.


Game no longer open source?

It seems like it was closed in preparation for the Reality update, but that has since come and gone, yet https://github.com/IvarK/AntimatterDimensions is still not public.
Is this a permanent change?

From the Discord #web-updates - they intend to open-source it at some point, after cleaning it up; "Ideally it should be in a good enough state to be made public in a few weeks" said on Feb 22

The silence isn't exactly encouraging...
🫤

Hi, developer here with an update - as you may have noticed we updated the game on 7 Apr, with a few major changes. In our update message on our discord, developer SpectralFlame said:

Also, I know many people are waiting in anticipation for the github repo to become open-source so that they can look at the code and/or start modding the game. I apologize for how long sorting that how has been taking, but it should be coming really soon™ this time! We're on what should hopefully be the final step before we are able to make the code public - we just need to configure Cloud saving to only be allowed from official sources. Hang in there!

We've been discussing in tester chats how to approach this problem and have been making some progress with ideas - it's not like we don't want to release publicly, it's just this one last issue we need to resolve. You can interact with us further on Discord if you're at all interested.

Thanks for the update, and good luck with that issue!
Discord
Unfortunately for me, Discord always demands a mobile number whenever I try to use it, and I don't have one to give them, so I'll be sticking with Issues.

Has there been any progress towards the release?


provide examples of http posts

Im new to rust and am having a hard time figuring out how to compose an  simple http post request. I did find and example in an older 24 days of rust blog but it seems way out of date with current versions of the library

For clarification, you'd like to see a client post example?

Yes please :)

use hyper::Client;

fn main() {
    let mut client = Client::new();
    let res = client.post("https://example.domain/path")
            .body("foo=bar")
            .send();
    match res {
        Ok(res) => println!("Response: {}", res.status),
        Err(e) => println!("Err: {:?}", e)
    }
}

See more about the Client: http://hyperium.github.io/hyper/hyper/client/index.html

Wow. Super simple. Thanks!

Just a quick followup. I wanted to make sure request bodies were encoded correctly and I found a library for doing form encoding but I'm stumbling on what may be some basic rust basics
Building your example above I'm still running into some rust newbie issues
extern crate url;
use url::form_urlencoded;

let mut builder = client.post("https://example.domain/path")

let params = vec![("foo", "bar")];

// this fails with the following compiler message
// error: the trait `hyper::client::IntoBody<'_>` is not implemented for the type `collections::string::String` [E0277]
let body = form_urlencoded::serialize(params.into_iter());
builder.body(body);

I found the IntoBody trait impl that seems to point to basic string slices
so I tried to slice up the String  form_urlencoded::serialize returns and I get a borrowing error
extern crate url;
use url::form_urlencoded;

let mut builder = client.post("https://example.domain/path")

let params = vec![("foo", "bar")];

// this now fails because
// src/main.rs:48:15: 48:61 error: borrowed value does not live long enough
//src/main.rs:48    let body = form_urlencoded::serialize(params.into_iter()).as_slice();
//
let body = form_urlencoded::serialize(params.into_iter()).as_slice();
builder.body(body);

do you have any pointers for what I'm maybe doing wrong?

Yep, your slice doesn't live long enough, because you don't store the backing String in a variable on the stack. Try:
let body = form_urlencoded::serialize(params.into_iter())
build.body(&body)

without the as_slice() and with  &. I still run into the missing IntoBody impl for String
//src/main.rs:50:12: 50:23 error: the trait `hyper::client::IntoBody<'_>` is not implemented for the type `&collections::string::String` [E0277]
//src/main.rs:50    builder.body(&body);
let body = form_urlencoded::serialize(params.into_iter());
builder.body(&body);

adding the as_slice()
// src/main.rs:49:12: 49:34 error: the trait `hyper::client::IntoBody<'_>` is not implemented for the type `&&str` [E0277]
//src/main.rs:49    builder.body(&body.as_slice());
let body = form_urlencoded::serialize(params.into_iter());
builder.body(&body.as_slice());

I feel like I'm probably missing something very fundamental.

Hm, I assumed the deref coercions would work for that. You could use &*body. *String gives you a str, and then add & to get a &str.
You can use as_slice(), but I believe that is going away in favor of using deref or slicing syntax &body[].

it looks like *body does give me back a str but adding the & gets me back to "error:  body does not live long enough"
Here's a more cut & paste example
extern crate hyper;
extern crate url;

use hyper::{ Client, Url };
use url::form_urlencoded;

fn main() {
  let mut client = Client::new();
  let uri = Url::parse("https://api.service.com").ok().expect("malformed url");
  let mut builder = client.post(uri);
  let params = vec![("foo", "bar")];
  let body = form_urlencoded::serialize(params.into_iter());
  builder.body(&*body);
}

@softprops It's due to the new scoping rules, you need to bring params and body to be declared above builder.
fn main() {
  let mut client = Client::new();
  let uri = Url::parse("https://api.service.com").ok().expect("malformed url");
  let params = vec![("foo", "bar")];
  let body = form_urlencoded::serialize(params.into_iter());
  let mut builder = client.post(uri);

  builder.body(&*body);
}

@Ryman @seanmonstar thanks for rounding this out for me. I got up an running after following @Ryman's last suggestion. Thanks for your patience.


GridSplitter possible issue

Hi,
I have an issue where the GridSplitter will stop working if I change the elements in ListView in the adjacent grid cells.
If I selectively render the GridSplitter via a button - remove and then add - it will work again
Repo can be accessed here: https://github.com/sharp-fsh/funcui_gridsplitter_issue
Example gif:

`
open Avalonia.Controls
open Avalonia.FuncUI.DSL
open Avalonia.Layout
open Avalonia.FuncUI.Components
open Avalonia.Controls.Primitives
type FixGridSplitIssue =
| RenderGridSplitter
| DoNotRenderGridSplitter

type State = {
    ListOneItems : string list
    ListTwoItems : string list
    FixGridSplitIssue : FixGridSplitIssue
    }

let generateStrings total word =
    [
        for i in 0..total-1 do
            sprintf "%s: %i" word (i+1)
    ]

let rowDefinition1 = "35, 100*, 5, 400*"

let listViewA1 = generateStrings 20 "List A V1"
let listViewB1 = generateStrings 30 "List B V1"

let listViewA2 = generateStrings 5 "List A V2"
let listViewB2 = generateStrings 15 "List B V2"

let init = {
    ListOneItems = listViewA1
    ListTwoItems = listViewB1
    FixGridSplitIssue = RenderGridSplitter
}

type Msg =
| ChangeItems
| ToggleFix

let update (msg: Msg) (state: State) : State =
    match msg with
    | ChangeItems -> { state with ListOneItems = if state.ListOneItems = listViewA1 then listViewA2 else listViewA1
                                  ListTwoItems = if state.ListTwoItems = listViewB1 then listViewB2 else listViewB1}
    | ToggleFix -> { state with FixGridSplitIssue =  if state.FixGridSplitIssue = RenderGridSplitter then  DoNotRenderGridSplitter else RenderGridSplitter }

let buttonPanel gridPosition state dispatch =
    StackPanel.create [
        gridPosition
        StackPanel.orientation Orientation.Horizontal
        StackPanel.children [
            Button.create [
                Button.content "Change Lists"
                Button.width 120.
                Button.height 35.
                Button.onClick (fun _ -> dispatch ChangeItems)
            ]
            Button.create [
                Button.content (if state.FixGridSplitIssue = RenderGridSplitter then "Click Twice To Fix (1 of 2)" else "Click Again To Fix (2 of 2)")
                Button.width 120.
                Button.height 35.
                Button.onClick (fun _ -> dispatch ToggleFix)
            ]
        ]
    ]

let genericListBox (items : string list) =
    ListBox.create  [
            ListBox.dataItems items
            ListBox.itemTemplate (
                DataTemplateView<string>.create (fun (text) ->
                    TextBlock.create [ TextBlock.text text ]
                )
            )
        ]

let verticalScrollerWithItems gridPostion items =
    ScrollViewer.create     [
        gridPostion
        ScrollViewer.verticalScrollBarVisibility ScrollBarVisibility.Auto
        ScrollViewer.content (
           genericListBox items
        )
    ]

let gridSplitterComponent gridPosition =
    GridSplitter.create [
        gridPosition
        GridSplitter.horizontalAlignment HorizontalAlignment.Stretch
    ]

let view (state: State) (dispatch) =
    Grid.create [
        Grid.rowDefinitions rowDefinition1
        Grid.showGridLines true
        Grid.children [
            buttonPanel (Grid.row 0) state dispatch
            verticalScrollerWithItems (Grid.row 1) state.ListOneItems
            match state.FixGridSplitIssue with
            | RenderGridSplitter -> gridSplitterComponent (Grid.row 2)
            | DoNotRenderGridSplitter -> StackPanel.create [ (Grid.row 2) ]
            verticalScrollerWithItems (Grid.row 3) state.ListTwoItems
        ]
    ]

`

Thanks JaggerJo. Good to know.

@sharp-fsh v0.5.0-beta is on nuget.


When SO_BINDTODEVICE is set in SocketOptions, the error "No such device" is reported.

Recently, we have created an Envoy container using docker, The host network used by Docker. And we want to bind the listener to the specified network interface (eth0) by setting SO_BINDTODEVICE in SocketOptions. The configuration is as follows:
  socket_options:  { description: "####test envoy###"，state: 0，level: 1，name: 25，buf_value: 'eth0' }
However, an No such device error is reported. The error content is as follows:
[warning][connection] [source/common/network/socket_option_impl.cc:28] Setting 1/25 option on socket failed: No such device [error][config] [source/server/listener_manager_impl.cc:1034] listener 'listener_0' failed to bind or apply socket options: ListenSocket: Setting socket options failed
The ip addr does have this interface:
17: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000      .....

Hi,
we're having exactly the same issue. Did you find a solution for this, or why have you closed this?

Okay, we found the solution.
For the record: The string passed to buf_value must be base64 encoded:
printf 'vrf-name\0' | base64


24.7 Dashboard widgets dont load.

After upgrade to 24.7 the new dashboard is beautiful. The only issue is alot of them fail to load with a red !  Im guessing they are still working out some bugs but i figured i would post just incase someone else is having issue or if the developers dont know about it. There are no steps to reproduce just login and the dashboard fails to load. This is over my reverse proxy and when i go to the gui through the ip address.
Type 	opnsense
Version 	24.7_5
Architecture 	amd64
Commit 	6578c5a18
Mirror 	https://pkg.opnsense.org/FreeBSD:14:amd64/24.7
Repositories 	OPNsense
Updated on 	Fri Jul 26 03:03:38 EDT 2024
Checked on 	Fri Jul 26 15:31:19 EDT 2024

sounds like a duplicate of https://github.com/opnsense/core/issues/7651


audio

App not record audio from web pages

Hi, audio recording isn't implemented in the stable version, it's currently in the beta one, but it'll come in some weeks to the stable version 😄

Please make it soon! I really want actual audio with the recording :<

@AqilCont you can join the Discord server and get in touch with me, I could give you early access


Elasticsearch 8 / Opensearch

PHP Version
8.2
Shopware Version
<IP_ADDRESS>
Actual behaviour
When switching to the Docker image elasticsearch:8.7.1 or opensearchproject/opensearch:latest the frontend just shows "Elasticsearch is not enabled."
While using elasticsearch:7.17.10, everything works fine.
Expected behaviour
Should show the ES dashboard
Steps to Reproduce?
Docker compose service:
    elasticsearch:
        image: elasticsearch:7.17.10
        container_name: shopware_elasticsearch_PROD
        restart: unless-stopped
        environment:
            ES_JAVA_OPTS: -Xms512m -Xmx512m
            discovery.type: single-node
        networks:
            - web

Just replace the image tag and run docker compose up -d --force-recreate elasticsearch
From .env
OPENSEARCH_URL=elasticsearch:9200

SHOPWARE_ES_HOSTS=elasticsearch:9200
SHOPWARE_ES_ENABLED=1
SHOPWARE_ES_INDEXING_ENABLED=1
SHOPWARE_ES_INDEX_PREFIX=apcsw6
SHOPWARE_ES_THROW_EXCEPTION=1

ADMIN_OPENSEARCH_URL=elasticsearch:9200
SHOPWARE_ADMIN_ES_ENABLED=1
SHOPWARE_ADMIN_ES_REFRESH_INDICES=1
SHOPWARE_ADMIN_ES_INDEX_PREFIX=sw6_admin

*Edit: When running the indexing from comandline, the error message is as follows:

But that seems that like a normal connection problem and nothing related to this plugin.
I assume https/login is active and you didn't have configured that stuff


feat(precheck): add warning for flattened cells

Flattened sky130 devices in analog layouts can lead to DRC errors. They are difficult to test for, so as a heuristic we add a warning when magic DRC fails and there are no unflattened sky130 cells.

Thank you!


I can't access my PDF file from my local assets in my flutterweb app hosted on firebase

Hello, I am making a flutter web app that's hosted on firebase. I have a PDF file that's located in my assets/documents/CV.pdf. I want my users to be able to download and view the file. When I run the web app on my local machine they are able to do it however when I deploy my web app they are faced with this page:

Here is the line where I call for the file to be downloaded and viewed: html.window.open('assets/documents/CV.pdf', 'CV');
Here is the error I get in my browsers console: Failed to load resource: the server responded with a status of 404 ()
and here is the link to my web app: https://portfolio-34678.web.app/#/Home

@jake1808
Failed to load resource: the server responded with a status of 404 () usually indicates an error between server and browser and Flutter didn't yet get a chance to do anything. The server doesn't seem to recognize it and then correctly sent 404.
You'll probably need to configure the server to respond upon the request you are sending with Flutter's index.html.
You can ask about it on support channels like Stackoverflow.
Closing from here.


Does not work anymore...

Hey there,
I was using the standard MMM-Carousel until yet. I wanted to spice up things with the ability to receive keyevents.
This fork though does simply not work anymore. The module seems to be ignored completely.
Here is the part of the config:
{ 			module: 'MMM-Carousel', 			config: { 				slides: [                     ['MMM-germanwordclock'],                     ['worldclock']                                     ], 				transitionInterval: 1000, 				mode: 'slides'						 			} 		}
The exact same config does work with the standard Carousel. The configured slides are the only other modules present.
I dont get any error message nor anything..

Nevermind, it works now, although I do not really understand what I changed...


fix: combine the form map and queryParams to pass to RequestWrapper

#3244
combine the form map and queryParams to pass to RequestWrapper

Fixes gh-3244


How can i run your tts locally on cpu, 16gb ram, Windows 11?

CPU inference MMS TTS is supported now after this PR. Please try it again.

CPU inference MMS TTS is supported now after this PR. Please try it again.

Is there any installation guide for PC users?

@JohnClaw The general installation is same. Basically, you need to install VITS.  You can find a step-by-step guide in this colab notebook.


CSS Object Model

Wrap the CSS Object Model and allow setting the style property on the document and elements.

Fixed by #45. I decided to only provide a method to set CSS properties on HTML elements. There are several reasons:

This seems to be the recommended way to set reactive CSS custom properties in JavaScript, React and Vue.
The CSS Object Model doesn't modify the text of style elements when we change the style-sheet. This makes hydration difficult and error prone, and is also confusing when looking at the DOM with developer tools.
The style-sheet isn't available on <style> elements until they are in the document. This makes the implementation.
Reactive CSS in general seems like a bad idea, at least from a performance perspective. Much better to limit reactivity to CSS custom properties.


[Plugin request] Dota2.com

Website URL: http://www.dota2.com/watch/
Example stream URL: http://www.dota2.com/watch/76561198198486997

duplicate of #621

Ok didn't know that it's the same system.


Improve API Priority and Fairness for clients

This PR improves https://kubernetes.io/docs/concepts/cluster-administration/flow-control/ with a couple of comments answering questions from a client programmer.
This addresses https://github.com/kubernetes/kubernetes/issues/105494

/sig api-machinery

Preview of updated page:
https://deploy-preview-29964--kubernetes-io-main-staging.netlify.app/docs/concepts/cluster-administration/flow-control/

Based one what I could see in https://github.com/kubernetes/kubernetes/issues/105494 it appears there's already consensus from a tech review perspective.
/lgtm
/approve


[Feature Request]  undo, redo and reset all measurement action

What feature or change would you like to see made?
undo, redo and reset all measurement action
Why should we prioritize this feature?
to make it easier to measure and delete all measurements that have been made without deleting one by one.

It is coming very soon, stay tuned https://ohif.org/news


Roblox provider token revoke error

I run into this error every time I try to revoke the token: Error: Failed to parse response body
When reading the Roblox.ts provider file, I have found out it uses a function from Requests.ts where it tries to get the json body of the response.
Problem is, however, that Roblox does not return any body data as a response - see documentation.
Could this be handled somehow?

Can you try manually sending the revocation request and sharing the response body? The current code should work if the provider returns no response body or if it returns an empty json object.

I was experiencing the same error with a custom provider. If it's the same issue, this can be fixed with https://github.com/pilcrowonpaper/arctic/pull/199

I was experiencing the same error with a custom provider. If it's the same issue, this can be fixed with #199

Yes, I use bun as well.

Can you try manually sending the revocation request and sharing the response body? The current code should work if the provider returns no response body or if it returns an empty json object.

Took me a while but here you go:
Code:
const base64Credentials = Buffer.from(`${ROBLOX_CLIENT_ID}:${ROBLOX_CLIENT_SECRET}`).toString('base64');
const response = await fetch("https://apis.roblox.com/oauth/v1/token/revoke", {
    method: "POST",
    body: new URLSearchParams({
        token: session.refreshToken,
    }),
    headers: {
        "Authorization": `Basic ${base64Credentials}`,
        "Content-Type": "application/x-www-form-urlencoded"
    },
}); console.log(response, "\nBody:", await response.text())

Response:
Response {
  status: 200,
  statusText: 'OK',
  headers: Headers {
    date: 'Sat, 09 Nov 2024 17:53:58 GMT',
    server: 'public-gateway',
    'content-length': '0',
    'x-envoy-upstream-service-time': '35',
    vary: 'Origin',
    'strict-transport-security': 'max-age=3600',
    'x-ratelimit-limit': '10000, 10000;w=60',
    'x-ratelimit-remaining': '9998',
    'x-ratelimit-reset': '2',
    'x-roblox-region': 'us-central_rbx',
    'x-roblox-edge': 'fra4',
    'report-to': '{"group":"network-errors","max_age":604800,"endpoints":[{"url":"https://ncs.roblox.com/upload"}]}',
    nel: '{"report_to":"network-errors","max_age":604800,"success_fraction":0.001,"failure_fraction":1}'
  },
  body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
  bodyUsed: true,
  ok: true,
  redirected: false,
  type: 'basic',
  url: 'https://apis.roblox.com/oauth/v1/token/revoke'
}
Body:

This should already be fixed with #212. The issue was that response.body is not null even if the response has no body.


why not in chrome web store?

It works as charm, why not to put it in a place where everybody could use it?

But I did, it's right there:
https://chrome.google.com/webstore/detail/youtube-collections/pmeoacbdkacmcjgfcadjigglammpehep

hmm, that's weird, I could not find it before, thank you

I'm not sure how or how much I'm able to manipulate the related extensions, so I really don't know how to answer that =P

well, dude it's a great work!
utb delete that feature, and even I can't find the channel I'd subscribed.
And can I suggest a feature? could we have a page which for the collection?
I mean when I click the collection icon it will shows the new upload video of this collection on the page.
O/ Thanks alot dude. Really useful for me.

Thanks for the feedback, I'm glad you like the exxtension! I'll have to look into that, but I'm kind of busy at the moment, so don't hold your breath.
Also, to keep things more organized, could you open a different issue for this feature requesst? Thanks :)


Error doesn't show up in Dart pad

What happened?
I was trying to reproduce an error in dart-pad to better understand it. I expected an error to show up but I didn't see a runtime exception

Steps to reproduce problem
I just entered code and it stops responding after it hits the problematic line.

Additional info
Browser
Browser:
Firefox
Version:
74.0.1 (64-bit)
Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)?
uBlock Origin
Are there any warnings or errors in your browser's JavaScript console?
If so, paste them below:
Error: frame_dark.html:340:17
    wrapException https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:340
    throwExpression https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:353
    add$1 https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:968
    main https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:940
    <anonymous> https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:1198
    <anonymous> https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:1182
    dartProgram https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:1193
    <anonymous> https://dartpad.dev/scripts/frame_dark.html#/ line 38 > scriptElement:1200
    replaceJavaScript https://dartpad.dev/scripts/frame_dark.html:38
    messageHandler https://dartpad.dev/scripts/frame_dark.html:54
[paste warnings or errors here]

Machine
Operating system: Windows
Version: 10
Your code
What code was in the editor, if any, when the failure occurred? You
can paste it in below:
`void main() {
  for (int i = 0; i < 5; i++) {
    print('hello ${i + 1}');
    var foo = const <String>[];
    foo.add("bar");
  }
}
`
// Paste code here.

DartPad's output
Did DartPad print anything to the console pane? If so, paste it below:
[paste console output here]

If you were running Flutter code, you can also paste an image of the
Flutter output directly into this bug report.

Odd, this is working for me in Chrome. Yay, browser differences...

I just tried the linked code snippet in Firefox 75.0, and couldn't reproduce the issue. @Tinhorn can you confirm you are still seeing this?

I got the following output @johnpryan in 75
hello 1
: Unsupported operation: addError: Unsupported operation: add
Looks like you can close this ticket.
Thanks for looking into it


Hosted API somewhere?

Hi,
I've seen that there was work done to create a kind of completions endpoint similar to ChatGPT. That's absolutely awesome.
However it seems like it was running locally in the example provided there.
Is there a URL or examples of using a publicly available endpoint with this to integrate it into downstream applications?
I'm really loving the performance of this and we're now experimenting with this at my day job. I think this could be a great alternative to openai. Is there any docs or road map with details about this?

https://github.com/h2oai/h2ogpt#h2ogpt has links to live demos, but there is no hosted endpoint with per-token pricing for general consumption yet. If this is something you are interested in, please reach out to<EMAIL_ADDRESS>


[rbond] observing blocks?

In Ruby, it's pretty common to pass a block as an argument to a method. Should we include this in our observation? If so, how? The blocks can be pretty important to the program's execution but I see no easy way to include them in observations.

Are you thinking of spying the blocks as data, or with spy_points (as
methods to be spied)? The former does not make sense, for the latter you
can do if you name it.
This passing-blocks style is called higher-order programming and it is just
a different way to organize the flow of control. Bond is for spying the
first-order data values, not the higher-order ones. Even in Python you
would not spy the lambdas.
George.
On Wed, Oct 14, 2015 at 7:50 PM, Erik<EMAIL_ADDRESS>wrote:

In Ruby, it's pretty common to pass a block as an argument to a method.
Should we include this in our observation? If so, how? The blocks can be
pretty important to the program's execution but I see no easy way to
include them in observations.
—
Reply to this email directly or view it on GitHub
https://github.com/necula01/bond/issues/9.

I was thinking the former, but yeah, I suppose you're right that it doesn't really make sense. Nevermind.


Starlight Package Crafting Altar not working mc 1.12.2

Good day. The problem is the same as the title. There is such a design. The most common Starlight Altar design, while the Starlight Altar itself works, but the Starlight Package Crafting Altar.

Starlight Package Crafting Altar

Starlight Altar:

Should be fixed, try updating to <IP_ADDRESS> and re-placing the altar

Thanks for the quick fix


[Bug]:  Consider dropping TLS 1.0 support from webhook server

What happened?
TLS 1.0 is old, consider dropping from: http://action.beam.apache.org:443/.
Issue Priority
Priority: 3 (minor)
Issue Components

[ ] Component: Python SDK
[ ] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[ ] Component: IO connector
[ ] Component: Beam YAML
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[X] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

@damccorm


sqlc generate:when I change uri localhost to aliyun  RDS  PG16, some problems appeared

Version
1.27.0
What happened?
The database has two schema.

1 The SQL statement needs to specify the schema name.When the uri is local, this is not required.
2 For All  statements with arguments , the automatically generated arguments are column 1,2,3... . When the uri is local, The parameters are clear.
3 'select * ' and 'returning * ' is not allowed.   Must specify parameters. When the uri is local, * is   allowed.
4 Parameters of the int type are automatically converted to pgtype.Int. Parameters of the String type are automatically converted to pgtype.Text. When the uri is local, int64 is int64. Override db type bigint to go type int64 didn't work when I used it.
5 timestamp(6) with time zone is changed to  interface{}. When the uri is local, It is right pgtype.Timestamptz.
6 else: the uri password  don’t support '@' '#' '%' .

Relevant log output
1 dto/pg/query/a.sql:13:7: relation "table_a" does not exist
3 dto/pg/query/a.sql:14:1: star expansion failed for query
6 invalid URL escape "%A")

Database schema
CREATE TABLE IF NOT EXISTS blacklist
(
    id bigint NOT NULL DEFAULT nextval('blacklist_id_seq'::regclass),
    created_at timestamp(6) with time zone NOT NULL DEFAULT now(),
    state smallint NOT NULL DEFAULT 0,
    remark character varying(255) COLLATE pg_catalog."default" NOT NULL DEFAULT ''::character varying,
    CONSTRAINT blacklist_pkey PRIMARY KEY (id)
)

TABLESPACE pg_default;

SQL queries
-- name: CreateBlackList :one
INSERT INTO a.table_a(id,type,name)
VALUES ($1,$2,$3)
returning id;

type CreateBlackListParams struct {
	Column1 pgtype.Int8 `json:"column_1"`
	Column2 pgtype.Int2 `json:"column_2"`
	Column3 pgtype.Text `json:"column_3"`

}

type GetBlackListRow struct {
 	CreatedAt     interface{} `json:"created_at"
}

Configuration
version: "2"
sql:
- schema: "dto/pg/schema/"
  queries: "dto/pg/query/"
  engine: "postgresql"
  gen:
    go:
      package: "db"
      sql_package: "pgx/v5"
      out: "dto/pgtree/sqlc"
      emit_json_tags: true
      emit_interface: true
      emit_empty_slices: true
  database:
    uri: xxx

Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go

version: "2"
sql:

schema:

"dto/pgtree/schema/st_user.sql"
"dto/pgtree/schema/st_tree.sql"
queries:
"dto/pgtree/query/st_user"
"dto/pgtree/query/st_tree"
engine: "postgresql"

change to this,can solved it 1-5 question.


Refactor Bytes type to use From trait

Description
The current use of converting Bytes to and from raw_slice and Vec use a special define function. This should use the From trait.

Note: This is a breaking change.

Checklist

[x] I have linked to any relevant issues.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have updated the documentation where relevant (API docs, the reference, and the Sway book).
[x] I have added tests that prove my fix is effective or that my feature works.
[x] I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
[x] I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
[x] I have requested a review from the relevant team or maintainers.

The storage bytes tests also need to get updated


fix: lower version of vscode required

To keep extension compatible with Eclipse Theia, we lower
the version of vscode engine we require.
Related: https://github.com/eclipse-theia/theia-blueprint/issues/96

Warning: while the extension installs with this change it fails to activate because YAML extensions requires a newer vscode version.  This needs further investigation before merging.

Closing as this will not make hte extension compatible with Theia. YAML extensions requires 1.52,


[cocoon] Port go dev server to dart

The Go AppEngine backend had a nice development server that made it easy to develop locally. We should consider adding similar functionality to the Dart code.
[X] Document how to run bin/server.dart locally (https://github.com/flutter/cocoon/pull/621)
[ ] Use FakeDatastore and in memory cache when passed flag --development
[ ] Add proxy capability to interact with production data

Triage: /cc @keyonghan