text:
Add new manuscript for testing and improve code to split paragraphs

This PR is part of a set of changes for the revision of the Manubot AI Editor manuscript. I added a new Manubot-based manuscript where our code fails to parse the text and extract paragraphs. To fix this, I changed and improved parts of editor.py that read line by line from a Markdown file to detect a paragraph that will be sent to the LLM for revision. It's a bit of a complicated piece of code that, at some point, will need refactoring.

@falquaddoomi, I'm adding you as a reviewer also to check if these changes conflict with your current PR. Hopefully not.

repo: manubot/manubot-ai-editor


text:
A potential memory leak?

> env RUSTFLAGS="-Z sanitizer=leak" cargo +nightly run --example simple --target x86_64-unknown-linux-gnu
    Finished dev [unoptimized + debuginfo] target(s) in 4.13s
     Running `target/x86_64-unknown-linux-gnu/debug/examples/simple`
gid09=00@ 634,0+0
gid32=01@ 478,0+0
gid39=02@ 230,0+0
gid39=03@ 230,0+0
gid42=04@ 532,0+0
gid01=05@ 200,0+0
gid24=06@ 764,0+0
gid42=07@ 532,0+0
gid45=08@ 306,0+0
gid39=09@ 230,0+0
gid31=10@ 540,0+0
gid1146=11@ 248,0+0

=================================================================
==11987==ERROR: LeakSanitizer: detected memory leaks

Indirect leak of 491041 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191bb5 in malloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:54:3
    #1 0x55b2fb1ad8e9 in alloc::alloc::alloc::hcabdcd04f1f2f35a /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/alloc.rs:84:4
    #2 0x55b2fb1ad8e9 in _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::alloc::h5501ecce6bea69c9 /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/alloc.rs:172:21
    #3 0x55b2fb1ad8e9 in alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::h961c00a94eda2949 /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/raw_vec.rs:98:20
    #4 0x55b2fb1ad8e9 in alloc::raw_vec::RawVec$LT$T$GT$::with_capacity::h85f3275d1f7918c3 /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/raw_vec.rs:142:8
    #5 0x55b2fb1ad8e9 in alloc::vec::Vec$LT$T$GT$::with_capacity::h4e1d13d0a6f3481b /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/vec.rs:356:17
    #6 0x55b2fb1ad8e9 in std::fs::read::inner::h6049cc4f28d13d12 /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/libstd/fs.rs:264:24

Indirect leak of 21440 byte(s) in 67 object(s) allocated from:
    #0 0x55b2fb191e0a in realloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:82:3
    #1 0x7f550743eb4b  (/usr/lib64/libharfbuzz.so.0+0x75b4b)

Indirect leak of 2240 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550743fa65  (/usr/lib64/libharfbuzz.so.0+0x76a65)

Indirect leak of 720 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191e0a in realloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:82:3
    #1 0x7f5507444573  (/usr/lib64/libharfbuzz.so.0+0x7b573)

Indirect leak of 440 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550743f3c0  (/usr/lib64/libharfbuzz.so.0+0x763c0)

Indirect leak of 432 byte(s) in 9 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f55073e78bf in hb_blob_create (/usr/lib64/libharfbuzz.so.0+0x1e8bf)

Indirect leak of 384 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f55073ef9a6 in hb_face_create_for_tables (/usr/lib64/libharfbuzz.so.0+0x269a6)

Indirect leak of 320 byte(s) in 2 object(s) allocated from:
    #0 0x55b2fb191e0a in realloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:82:3
    #1 0x7f5507443791  (/usr/lib64/libharfbuzz.so.0+0x7a791)

Indirect leak of 288 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550747bb15 in hb_shape_plan_create2 (/usr/lib64/libharfbuzz.so.0+0xb2b15)

Indirect leak of 256 byte(s) in 2 object(s) allocated from:
    #0 0x55b2fb191e0a in realloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:82:3
    #1 0x7f5507444533  (/usr/lib64/libharfbuzz.so.0+0x7b533)

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550741784c  (/usr/lib64/libharfbuzz.so.0+0x4e84c)

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f55074198f7  (/usr/lib64/libharfbuzz.so.0+0x508f7)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550743f77c  (/usr/lib64/libharfbuzz.so.0+0x7677c)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550743ffac  (/usr/lib64/libharfbuzz.so.0+0x76fac)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191bb5 in malloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:54:3
    #1 0x55b2fb18bffb in alloc::alloc::alloc::h8c7b6feff34e10bd /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/liballoc/alloc.rs:84:4

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f550747cbe8 in hb_shape_plan_create_cached2 (/usr/lib64/libharfbuzz.so.0+0xb3be8)

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f55073efc33 in hb_face_create (/usr/lib64/libharfbuzz.so.0+0x26c33)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x55b2fb191d20 in calloc /rustc/534b42394d743511db1335d5ed08d507ab7c6e73/src/llvm-project/compiler-rt/lib/lsan/lsan_interceptors.cc:76:3
    #1 0x7f55074400e8  (/usr/lib64/libharfbuzz.so.0+0x770e8)

SUMMARY: LeakSanitizer: 517809 byte(s) leaked in 94 allocation(s).

This might be false-positive, not sure.

I'm afraid this is a real leak. Adding the following before the last } in simple.rs makes valgrind & sanitizer happy here.
    use harfbuzz_rs::HarfbuzzObject;
    unsafe{font.face().face_data().dereference()};
    unsafe{font.face().dereference()};

@manuel-rhdt ?

Maybe this is fixed in ef01207d. I am using macOS and can't seem to find a way to run leak sanitiser myself. I would be very grateful if you could check whether the leak still exists.

No difference.
I can suggest using travis for this. Like this:
language: rust
rust:
  - stable
  - nightly
script:
  - cargo build --verbose --all
  - cargo test --verbose --all
  - if [ $TRAVIS_RUST_VERSION == "nightly" ]; then
        env RUSTFLAGS="-Z sanitizer=address" cargo +nightly test --test tests --target x86_64-unknown-linux-gnu;
        env RUSTFLAGS="-Z sanitizer=address" cargo +nightly run --example simple --target x86_64-unknown-linux-gnu;
    fi

maybe add this too
modified   src/font.rs
@@ -116,7 +116,7 @@ impl<'a> Font<'a> {
     pub fn new<T: Into<Shared<Face<'a>>>>(face: T) -> Owned<Self> {
         unsafe {
             let face = face.into();
-            let raw_font = hb::hb_font_create(Shared::into_raw(face));
+            let raw_font = hb::hb_font_create(face.as_raw());
             // set default font funcs for a completely new font
             hb::hb_ot_font_set_funcs(raw_font);
             Owned::from_raw(raw_font)

Looks like it was fixed. Do you plan on publishing a new version?

Bump.

source: gharchive/issue

authors: Lompik RazrFalcon manuel-rhdt

license: mit

license_type: permissive

license_source: bigquery


text:
Deploy to Heroku fails

When I try to deploy to Heroku, the Boostrap SCSS files in node_modules cannot be found:
Objekte aufzählen: 11, Fertig.
Zähle Objekte: 100% (11/11), Fertig.
Delta-Kompression verwendet bis zu 12 Threads.
Komprimiere Objekte: 100% (7/7), Fertig.
Schreibe Objekte: 100% (7/7), 36.71 KiB | 4.59 MiB/s, Fertig.
Gesamt 7 (Delta 5), Wiederverwendet 0 (Delta 0), Pack wiederverwendet 0
remote: Git submodules detected, installing:
remote: Submodule 'common-gems' (https://github.com/krautcomputing/common-gems.git) registered for path 'common-gems'
remote: Cloning into 'common-gems'...
remote: Submodule path 'common-gems': checked out '22094a8053b3510b3c2b6621ffd8fcff3e7880fc'
remote:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.0.2
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.5
remote: -----> Installing dependencies using bundler 2.0.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Fetching gem metadata from https://rubygems.org/............
remote:        Using rake 13.0.1
[snip]
remote:        Removing actionmailer (6.0.2.1)
remote:        Bundle completed (188.55s)
remote:        Cleaning up the bundler cache.
remote: -----> Installing node-v10.15.3-linux-x64
remote: -----> Installing yarn-v1.16.0
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        rake aborted!
remote:        SassC::SyntaxError: Error: File to import not found or unreadable: bootstrap/scss/functions.
remote:                on line 8:1 of app/assets/stylesheets/partials/_bootstrap.scss
remote:                from line 1:1 of app/assets/stylesheets/application.scss
remote:        >> @import "bootstrap/scss/functions";
remote:
remote:           ^
remote:        /tmp/build_66051c98a1162bc2f3c3f5392824ba71/app/assets/stylesheets/partials/_bootstrap.scss:8
remote:        /tmp/build_66051c98a1162bc2f3c3f5392824ba71/vendor/bundle/ruby/2.6.0/gems/sassc-2.3.0/lib/sassc/engine.rb:50:in `render'
[snip]
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !	Push rejected to railsbump.
remote:
To https://git.heroku.com/railsbump.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: Fehler beim Versenden einiger Referenzen nach 'https://git.heroku.com/railsbump.git'

When i run rake assets:precompile locally, everything works fine.
I suspect that Heroku doesn't run yarn install first, so the node_modules folder is not present when rake assets:precompile is called.
@etagwerker Do you maybe know what's going on?

Indeed yarn install wasn't run.
This was solved by adding the nodejs buildpack.

repo: manuelmeurer/railsbump

license: MIT

license_source: github-api


text:
Parser to gather stats

We would need parser that can generate contribution stats that we have currently based on the new contribution structure.

@joshuagaladima just hold on for a moment as we are discussing the new repository as in here:
https://github.com/manwar/theweeklychallenge/issues/127
Once we have the repository then you can create the suggested directory structure and start working on parser.
Does this make sense?

Noted sir. I have created a script to restructure to the new directory structure. May I start working on the parser?

authors: joshuagaladima manwar

repo: manwar/theweeklychallenge


text:
tippecanoe geojson extensions as regular properties

Some software which can write to GeoJSON has trouble outputting the tippecanoe GeoJSON extensions https://github.com/mapbox/tippecanoe#geojson-extension. Is it possible to optionally allow these to be read as regular properties?

I hesitate to do this, because the properties namespace belongs to the user data, not to the tool, but I have already made a special case for id, so maybe I should make more special cases for the others.

... and if you're working with newline delimited geojson I discovered you can transform it with a one-liner from ndjson-cli.
ndjson-map 'd.tippecanoe = { minzoom: d.properties.minzoom, maxzoom: d.properties.maxzoom, layer: d.properties.layer }, delete d.properties.minzoom, delete d.properties.maxzoom, delete d.properties.layer, d'

authors: andrewharvey ericfischer

repo: mapbox/tippecanoe


text:
(transition) occur transition when parent is updated

if immediate is false and parent is updated, the transition is enabled.

:tada: This issue has been resolved in version 1.0.0-beta.25 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

repo: mapcss/atomic-ui-react


text:
Visual Studio Code can't debug

I am trying to get call stack and variables' state inside OpenSfM (in particular in bundle_adjuster.cc / BundleAdjuster::Run) with VS Code debugger. So I added
def configure_c_extension():
"""Configure cmake project to C extension."""
...
if sys.platform == "win32":
cmake_command += [
"-DVCPKG_TARGET_TRIPLET=x64-windows",
"-DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake",
]
else:
cmake_command += ["-DCMAKE_BUILD_TYPE=RelWithDebInfo"]
subprocess.check_call(cmake_command, cwd=targetDirName)
into setup.py and rebuilt. Produced opensfm/py* are very big, e.g. pybundle.cpython-38-x86_64-linux-gnu.so is 120 MB now, while before it was 1.3 MB. I setted up debugging in VS Code with
   {
      "name": "Python C++ Debug",
      "type": "pythoncpp",
      "request": "launch",
      "pythonLaunchName": "Python: reconstruct",
      "cppAttachName": "(gdb) Attach",
      "stopAtEntry": false,
      "externalConsole": false,
      "logging": {
        "moduleLoad": true,
        "engineLogging": true,
        "trace": true
      },
    },
    {
      "name": "(gdb) Attach",
      "type": "cppdbg",
      "request": "attach",
      "args": [],
      "processId": "${command:pickProcess}",
      "externalConsole": false,
      "MIMode": "gdb",
      "miDebuggerPath": "/usr/bin/gdb",
      "symbolLoadInfo": {
        "loadAll": true,
        "exceptionList": ""
      },
      "setupCommands": [
          {
             "description": "Enable pretty-printing for gdb",
             "text": "-enable-pretty-printing",
             "ignoreFailures": true
          },
          {
             "text": "set print elements 0"
          }
      ],
      "logging": {
        "moduleLoad": true,
        "engineLogging": true,
        "trace": true
      },
    },
      {
        "name": "Python: reconstruct",
        "type": "python",
        "request": "launch",
        "program": "bin/opensfm_main.py",
        "cwd": "${workspaceFolder}/OpenSfM",
        "args": "reconstruct data/lund",
        "console": "integratedTerminal",
        "justMyCode": false
      },

configurations in launch.json, I can debug Python code and can stop C++ code. But when it should show OpenSfM's call stack, I only see one line, [Unknown/Just-In-Time compiled code].
Tried debugging inside Docker through SSH and directly inside miniconda, result is the same.
Ubuntu 20.04, fresh VS Code, fresh OpenSfM main branch (commit b760b21f).

@MikhailMashukov , do you have the same problem if you set the build type to Debug?

repo: mapillary/OpenSfM


text:
MLNMapViewDelegate on 6.8.0 doesn't work

Describe the bug
on 6.8.0 mapViewWillStartLoadingMap, mapViewDidFinishRenderingMap and mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) did not be fired even map appears (guess also mapViewDidFailLoadingMap and so on don't work)
To Reproduce
After loaded a style, map appears but app get stucked waiting for didfinishrenderingmap to continue
Expected behavior
delegate fired
Platform information (please complete the following information):

OS: ios 18.1
iOS
map libre 6.8.0

Please provide a minimal reproduction.

I tried to reproduce this, but I was unable.

we have 5 different maps and this issue happens with every maps.
only "func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {" is fired (tryed on simulator and phisical devices with ios 18+ or ios 15+)
currently using xcode 16.1, swift package manager -> maplibre 6.8.0
with 6.7.1 it works as expected after setting style (self.mapView.styleURL = URL(string:"our map url")), map is loaded and fired:

func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {
func mapViewDidFinishRenderingMap(_ mapView: MLNMapView, fullyRendered: Bool) {

Thanks.
I'm investigating the issue.

I added these delegate methods to the AnimatedLineExample.swift and used AWS Open Data Standard Light and they fired as expected.
Could you share your style (can be private on Slack) so I can give it a try?

here you are @louwers  https://tiler.3bmeteo.com/api/maps/bright_v2/style.json

on viewdidload:
self.mapView.styleURL = URL(string:"https://tiler.3bmeteo.com/api/maps/bright_v2/style.json")
self.mapView.clearsContextBeforeDrawing = true
self.mapView.maximumZoomLevel = maximumZoomLevel
self.mapView.minimumZoomLevel = minimumZoomLevel
        // se CurrentRadar == swiss_radar limita al nord!
        let sw = CLLocationCoordinate2D(latitude: 35.07638, longitude: 6.402696)
        let ne = CLLocationCoordinate2D(latitude: 47.10169, longitude: 18.5499)
        self.bounds = MLNCoordinateBounds(sw: sw, ne: ne)

        self.mapView.cameraThatFitsCoordinateBounds(self.bounds, edgePadding: UIEdgeInsets(top: 20.0, left: 20.0, bottom: 20.0, right: 20.0))

        self.mapView.delegate = self

// other stuff not related to maps
then I wait for
func mapView(_ mapView: MLNMapView, didFinishLoading style: MLNStyle) {
and
func mapViewDidFinishRenderingMap(_ mapView: MLNMapView, fullyRendered: Bool) {

Could you try passing the style to MLNMapView to see if that makes a difference?
        mapView = MLNMapView(frame: view.bounds, styleURL: URL(string: "https://tiler.3bmeteo.com/api/maps/bright_v2/style.json"))

I have a mapView object inside a xib, so self.mapView is a weak outlet to that, I can't set as you suggested

It's not an option even I change a lot of code because I need to change style at runtime

maybe it's something useful, I set style inside this:
MLNOfflineStorage.shared.setMaximumAmbientCacheSize(102400) { error in
// style set here
}

Please try if 6.8.1 fixes the problem.

Reported as fixed, please share if anyone still experiences problems.

6.8.1 it's ok, thanks for your support

repo: maplibre/maplibre-native


text:
[WIP] Add view module with view retained implementation

Now that the APIs are stable we can support retaining objects in views. Whether this is a good idea and fits as a valuable addition to the library is subject to discussion, but I still wanted to have this PR in place for learning and maybe documentation purposes.

Right now this is a WIP and doesn't represent how a final implementation would look like, and it's actually currently broken when the view is inside a fragment (works fine with activities). It crashes on orientation change with this stacktrace:
java.lang.IllegalStateException: Internal error: OnRecreation should be registered only on componentsthat implement ViewModelStoreOwner
        at androidx.lifecycle.SavedStateHandleController$OnRecreation.onRecreated(SavedStateHandleController.java:80)
        at androidx.savedstate.Recreator.reflectiveNew(Recreator.java:92)
        at androidx.savedstate.Recreator.onStateChanged(Recreator.java:64)
        at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
        at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:265)
        at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:307)
        at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148)
        at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134)
        at androidx.fragment.app.FragmentViewLifecycleOwner.handleLifecycleEvent(FragmentViewLifecycleOwner.java:62)
        at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:650)
        at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:2997)
        at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:2988)
        at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:577)
        at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:285)
        at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:112)
        at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1636)
        at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3112)
        at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3056)
        at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)
        at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:473)
        at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:225)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1432)
        at android.app.Activity.performStart(Activity.java:7848)
        at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3294)
        at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
        at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

No idea why this is happening yet, but if we move from this:
private val presenter: SimplePresenter by retain {
    SimplePresenter()
}

To this:
private val presenter: SimplePresenter by retain(getSavedStateRegistryOwner = { findFragment() }) {
    SimplePresenter()
}

It works just fine. From what I can see, findViewTreeSavedStateRegistryOwner() returns the same object as findViewTreeLifecycleOwner() which is a FragmentViewLifecycleOwner, while findViewTreeViewModelStoreOwner() returns the actual fragment (same as findFragment()). It's still pretty easy to get these things mixed up to me, so I'm writing them down just in case.

The crash has a pretty clear cause which is this:
if (!(owner instanceof ViewModelStoreOwner)) {
    throw new IllegalStateException(
            "Internal error: OnRecreation should be registered only on components"
                    + "that implement ViewModelStoreOwner");
}

That owner is the SavedStateRegistryOwner. So it seems there's this secret requirement of having the SavedStateRegistryOwner also be a ViewModelStoreOwner, and that's not the case for the view: its SavedStateRegistryOwner is a FragmentViewLifecycleOwner, which is only a SavedStateRegistryOwner and not a ViewModelStoreOwner.
My hunch is that findViewTreeSavedStateRegistryOwner() should return the fragment itself instead of the FragmentViewLifecycleOwner. Now that I have a better understand I think I'm in a good position to create a separate minimum reproducible example and file an issue.

Issue filed finally: https://issuetracker.google.com/issues/181577191

Just a few things pending here now:

We need Fragment 1.3.1 release which will fix the crash we found.
We need to decide whether it's ok to have the LifecycleOwner.defaultArgs repetition or if we should move it to be core or a new common module.
Update readme to have info on the new view module.

Issue has been fixed but the fix didn't make it to Fragment 1.3.1 😢

Closing this in favor of https://github.com/marcellogalhardo/retained/pull/23

source: gharchive/pull-request

repo: marcellogalhardo/retained


text:
Ambilight+Hue choppy transitions

I'm using zigbee2mqtt to control HA lights. When I enable Ambilight+Hue on my Philips TV with emulated Hue, I can see lot of not smooth color changes (instant changes). When I trace mqtt messages, I see that message is sended to lights 3-8 times per second with transition parameter from 0.03 to 0.08s as you can see on the screen from MQTT Explorer:

It looks that this is too small amount for transition time, and transition is instant... I think also that throttling doesn't work in Ambilight+Hue mode (8 messages per second is way too much for non Hue bulbs I think...)
diyHue is behaving differently - transition is longer and smooth, and there is less noticable color changes, so color is little laggy comparing to TV ambilight but it feels much smoother
EDIT:
Also I noticed unhandled message in Zigbee2Mqtt sended on toggling Ambilight+Hue off:
Publish 'set' 'effect' to 'Taśma LED RGBW - salon (prawa)' failed: 'Error: 'none' not allowed, choose between: blink,breathe,okay,channel_change,finish_effect,stop_effect'

I've tested with ZHA lights and ESPHome driven LED strips and that worked very smooth without throttling (so all packets are sent to the lights). In your case I think throttling is needed for smoother results.
Do you have access to the data directory ? There's a file in there called emulated_hue.json.
Each light has a config in that file and a setting called "entertainment_throttle".
The default is 0 (no throttling at all so send all packets to the light).
You can put a value in there in milliseconds. For example start with 500 and see what it brings and decrease until it is less attractive.
Remember to stop the emulator before you make changes to the file, otherwise they'll be overwritten.
Please let me know the results so we can set those as default for a zigbee2mqtt light

I've tested with ZHA lights and ESPHome driven LED strips and that worked very smooth without throttling (so all packets are sent to the lights). In your case I think throttling is needed for smoother results.
Do you have access to the data directory ? There's a file in there called emulated_hue.json.
Each light has a config in that file and a setting called "entertainment_throttle".
The default is 0 (no throttling at all so send all packets to the light).
You can put a value in there in milliseconds. For example start with 500 and see what it brings and decrease until it is less attractive.
Remember to stop the emulator before you make changes to the file, otherwise they'll be overwritten.
Please let me know the results so we can set those as default for a zigbee2mqtt light

I've set "entertainment_throttle": 500 to those 2 lights I'm using with Ambilight+Hue but that didn't make any difference... Offcourse I've resstarted addon and checked if my new values are still there ;)
Still I see mqtt messege each 0.07s to 0.2s with same transition values...
Oh - my non Android Philips TV doesn't use entertainment mode for Ambilight+Hue... It just keeping puting light set messages, for example I see lot of this in Emulated Hue log:
2021-01-01 23:58:52,214 DEBUG emulated_hue.api -- [192.168.1.125] PUT /api/550a2fa9c65448dca682/lights/17/state
2021-01-01 23:58:52,216 DEBUG emulated_hue.api -- {'xy': [0.26169338822364807, 0.20043809711933136], 'transitiontime': 10}

I've set "entertainment_throttle": 500 to those 2 lights I'm using with Ambilight+Hue but that didn't make any difference... Offcourse I've resstarted addon and checked if my new values are still there ;)
Still I see mqtt messege each 0.07s to 0.2s with same transition values...
Oh - my non Android Philips TV doesn't use entertainment mode for Ambilight+Hue... It just keeping puting light set messages, for example I see lot of this in Emulated Hue log:
2021-01-01 23:58:52,214 DEBUG emulated_hue.api -- [192.168.1.125] PUT /api/550a2fa9c65448dca682/lights/17/state
2021-01-01 23:58:52,216 DEBUG emulated_hue.api -- {'xy': [0.26169338822364807, 0.20043809711933136], 'transitiontime': 10}

Ah, that explains it. Your TV has the first version of Ambilight+Hue which doesn't utilize the entertainment mode.
It is really strange because your TV sends transitiontime of 10 (which is 10*100ms = 1 second) while you see a transitiontime 0f 0.3 in your zigbee2mqtt logs. So somewhere in the path that transitiontime got changed.
I'll have a quick look at zigbee2mqtt's internals if I can spot what's going on.

Ah, that explains it. Your TV has the first version of Ambilight+Hue which doesn't utilize the entertainment mode.
It is really strange because your TV sends transitiontime of 10 (which is 10*100ms = 1 second) while you see a transitiontime 0f 0.3 in your zigbee2mqtt logs. So somewhere in the path that transitiontime got changed.
I'll have a quick look at zigbee2mqtt's internals if I can spot what's going on.

That's independent examples, but I see correlation - if in emulated_hue is 'transitiontime': 10 then in mqtt message I see "transition": 0.1; if in emulated_hue is 'transitiontime': 7 then in mqtt message I see "transition": 0.07; and so on...

That's independent examples, but I see correlation - if in emulated_hue is 'transitiontime': 10 then in mqtt message I see "transition": 0.1; if in emulated_hue is 'transitiontime': 7 then in mqtt message I see "transition": 0.07; and so on...

OK, so that is correct. Maybe diyhue alters the messages and sends another transitiontime instead. We just forward the messages as-is to Home Assistant

OK, so that is correct. Maybe diyhue alters the messages and sends another transitiontime instead. We just forward the messages as-is to Home Assistant

diyHue divides transition values by 10:
            state['transition'] = value / 10
https://github.com/diyhue/diyHue/blob/dfc6c158e14a1789eb446f98e1186356103bff90/BridgeEmulator/protocols/mqtt.py#L69
So 'transitiontime': 10 will be "transition": 1 in mqtt message; 'transitiontime': 7 will be "transition": 0.7, and so on...

diyHue divides transition values by 10:
            state['transition'] = value / 10
https://github.com/diyhue/diyHue/blob/dfc6c158e14a1789eb446f98e1186356103bff90/BridgeEmulator/protocols/mqtt.py#L69
So 'transitiontime': 10 will be "transition": 1 in mqtt message; 'transitiontime': 7 will be "transition": 0.7, and so on...

we do too:
https://github.com/marcelveldt/hass_emulated_hue/blob/master/emulated_hue/api.py#L625

we do too:
https://github.com/marcelveldt/hass_emulated_hue/blob/master/emulated_hue/api.py#L625

Yes, but here is dividing by 100 not by 10:
transitiontime = request_data[const.HUE_ATTR_TRANSITION] / 100

Yes, but here is dividing by 100 not by 10:
transitiontime = request_data[const.HUE_ATTR_TRANSITION] / 100

Oops, your are correct. Can you adjust that on your dev setup to see if it solves the issue ?

Oops, your are correct. Can you adjust that on your dev setup to see if it solves the issue ?

I've checked in the change btw and will trigger a new docker build

I've checked in the change btw and will trigger a new docker build

Transition is now smooth after changing division to 10, so this fixes choppy color changes. But I have second request - can You please add throttling also for standard api? Not only for entertainment mode? I see that sometimes on dynamic scenes it can generate to 15-20 messages per second! That has negative impact on performance not only on emulated_hue but whole HA and other addons...

Transition is now smooth after changing division to 10, so this fixes choppy color changes. But I have second request - can You please add throttling also for standard api? Not only for entertainment mode? I see that sometimes on dynamic scenes it can generate to 15-20 messages per second! That has negative impact on performance not only on emulated_hue but whole HA and other addons...

Sure, I think that will be possible but it will require some tinkering. What hardware do you run HA on?

Sure, I think that will be possible but it will require some tinkering. What hardware do you run HA on?

Thanks in advice! I'm running on Raspberry Pi 3

Thanks in advice! I'm running on Raspberry Pi 3

Ah yes, that explains it I guess. I was testing with several ZHA and ESPHome lights in entertainment mode (20+ messages per second to each light) and I did not notice any delays or performance issues but HA is running on a NUC in my case.
I'll implement some basic throttling and let you know.

Ah yes, that explains it I guess. I was testing with several ZHA and ESPHome lights in entertainment mode (20+ messages per second to each light) and I did not notice any delays or performance issues but HA is running on a NUC in my case.
I'll implement some basic throttling and let you know.

As a side note, you may want to look into better hardware as the hue api is generally pretty resource intensive with large amounts of packets being sent. An old laptop or desktop may do wonders.

As a side note, you may want to look into better hardware as the hue api is generally pretty resource intensive with large amounts of packets being sent. An old laptop or desktop may do wonders.

I've changed topic to better describe to what this issue transformed currently :)

I've changed topic to better describe to what this issue transformed currently :)

authors: Mr-Groch alexyao2015 marcelveldt


text:
URLs not grouping together in 2.0

All of my urls are not being grouped like they were before 2.0 and like it shows in the Pastebin API example. How do you specify how endpoints are grouped? Namespaces don't seem to work so I'm not sure what to try and don't see any documentation on it.
I'd love to be able to group them under different categories.

Duplicate issue as: https://github.com/marcgibbons/django-rest-swagger/issues/515

repo: marcgibbons/django-rest-swagger


text:
Fix require in documentation README.md

The doc in the readme file was not up to date, just a quick fix to solve it.

Thanks!

authors: alxscms marcj

repo: marcj/css-element-queries


text:
🛑 Video Call is down

In 99747a2, Video Call (https://jitsi01.diversolatam.com/test) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Video Call is back up in 2376213.

repo: marcoadasilvaa/health


text:
🛑 Doctor is down

In 48efbe4, Doctor (https://doctoronline.doctormas.com.pe/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Doctor is back up in 5db3645 after 4 minutes.


text:
🛑 Doctor is down

In 2377de5, Doctor (https://doctoronline.doctormas.com.pe/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Doctor is back up in d59c303 after 3 minutes.


text:
🛑 Video Call is down

In 36fc34c, Video Call (https://jitsi01.diversolatam.com/test) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Video Call is back up in f878d43.


text:
Prototyping Rot3 class

With Fan, I created a prototype implementation of Rot3 and its coordinateStorage. For now, the classes are defined inside Rot3Test.swift.
We came very close, but we now get a compiler abort.
Marc, maybe you have enough experience with these to see what might be fishy?

Oh sorry, I didn't get notified about this when you made it. Maybe I don't have notifications set up on this repo. Now that we've moved all branches to the main repo, we shouldn't have this problem any more :)
I think this has since been resolved in other branches on the main repo.

No worries

authors: dellaert marcrasi

repo: marcrasi/SwiftFusion


text:
Save a family's search preferences

Explore potential to allow a logged-in family to save their child profile search criteria so they don't need to enter each time.

addressed in different story.

repetitive of 223.

repo: mareinc/mare


text:
🛑 Website i2phides.me is down

In 9d8ed8d, Website i2phides.me (https://i2phides.me/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Website i2phides.me is back up in 5ab07d9 after 20 minutes.


text:
光标定位问题，图片多次渲染问题

版本
braft-editor:1.9.7  react:15.3.2
光标问题
当出现滚动条时按下回车，光标理应自动显示在屏幕最底部，现在的情况是没有显示出来还是最后一行内容，但是当按下键盘打字时 新的一行就显示正常了
图片多次渲染问题
上传图片后，只要进行内容编辑或随便点几次鼠标，就会触发图片多次渲染，造成图片在那里一闪一闪
图中是我截取的多次图片请求

以上问题我在官网的demo中当无法重现
麻烦作者给予指导，提示：刚开始怀疑initialContent引起，我测试过去掉initialContent和onChange属性后还是一样的问题

贴一下你的使用代码看看，我这边把forceNewline设为true的时候会复现光标问题，去掉这个属性就行啦，（这个属性实际上其实是不需要设置的）。

@margox
  <BraftEditor
    contentId="patientNotesContent"
    height={400}
    forceNewLine={true}
    initialContent={item.patientNotesContent} //item来自于父组件props
    onChange={content => handleContent(content, "patientNotes")}
    {...EditorProps}
  />

EditorProps: {
      contentFormat: "html",
      media: {
        allowPasteImage: false, // 是否允许直接粘贴剪贴板图片（例如QQ截图等）到编辑器
        image: true, // 开启图片插入功能
        video: true, // 开启视频插入功能
        audio: true, // 开启音频插入功能
        validateFn: null, // 指定本地校验函数，说明见下文
        uploadFn: param => {
          const serverURL = "/uploadfile/upload";
          const xhr = new XMLHttpRequest();
          const fd = new FormData();

          // libraryId可用于通过mediaLibrary示例来操作对应的媒体内容
          console.log(param.libraryId);

          const successFn = response => {
            // 假设服务端直接返回文件上传后的地址
            // 上传成功后调用param.success并传入上传后的文件地址
            param.success(
              param.file.type.includes("video") ||
              param.file.type.includes("audio")
                ? {
                    url: `http://clouddn.com/${
                      xhr.response.data
                    }`,
                    width: "600px",
                    meta: {
                      id: param.libraryId,
                      title: param.file.name,
                      alt: param.file.name,
                      loop: true, // 指定音视频是否循环播放
                      autoPlay: false, // 指定音视频是否自动播放
                      controls: true, // 指定音视频是否显示控制栏
                      poster: null // 指定视频播放器的封面
                    }
                  }
                : {
                    url: `http://clouddn.com/${
                      xhr.response.data
                    }`,
                    meta: {
                      id: param.libraryId,
                      title: param.file.name,
                      alt: param.file.name
                    }
                  }
            );
          };

          const progressFn = event => {
            // 上传进度发生变化时调用param.progress
            param.progress(event.loaded / event.total * 100);
          };

          const errorFn = response => {
            // 上传发生错误时调用param.error
            param.error({
              msg: "unable to upload."
            });
          };
          xhr.responseType = "json";
          xhr.withCredentials = true;
          xhr.upload.addEventListener("progress", progressFn, false);
          xhr.addEventListener("load", successFn, false);
          xhr.addEventListener("error", errorFn, false);
          xhr.addEventListener("abort", errorFn, false);

          fd.append("multipartFiles", param.file);
          xhr.open("POST", serverURL, true);
          xhr.send(fd);
        }, // 指定上传函数，说明见下文
        removeConfirmFn: null, // 指定删除前的确认函数，说明见下文
        onRemove: null, // 指定媒体库文件被删除时的回调，参数为被删除的媒体文件列表(数组)
        onChange: null, // 指定媒体库文件列表发生变化时的回调，参数为媒体库文件列表(数组)
        onInsert: files => {
          return files.map(x => {
            x.url = `/uploadfile/findfilebyurl?fileUrl=${
              x.url
            }`;
            return x;
          });
        } // 指定从媒体库插入文件到编辑器时的回调，参数为被插入的媒体文件列表(数组)
      }
    }

光标问题你试试去掉forceNewLine这个属性，图片闪烁的，你那边是什么浏览器呢？ 我这边用chrome跑也是没问题的，看看有么有什么地方导致了整个编辑器组件重新渲染了？

@margox 光标问题去掉forceNewLine后解决，图像闪烁的问题我也怀疑是其他组件被重新渲染了，进而引起编辑器也重新渲染
谢谢！

光标问题你试试去掉forceNewLine这个属性，图片闪烁的，你那边是什么浏览器呢？ 我这边用chrome跑也是没问题的，看看有么有什么地方导致了整个编辑器组件重新渲染了？

官网的demo也是会有图像闪烁
不能发录屏
官网demo复现的大概的步骤就是
上传网络图片，一定要网络图片
然后重复回车换行就可以复现到了。
作者可以排查一下是什么问题吗？

authors: aofong gjqiang margox

repo: margox/braft-editor


text:
For some reason only one font style shows up

See screenshot, for some reason only one font style appear.

Hi, you can check if there are other external styles that affect the style of the FontFamily list by using the Browser Developer Tools, and check the content of the FontFamily DropDown is correct or not.

there was something wrong with my styles

authors: fameoflight margox


text:
Connect to running tern server

This is not really an issue, more a question. I'm having some issues with the completion (unable to reproduce) and would like tern_for_vim to connect to a running server (running with --verbose). How can I make tern_for_vim connect instead of starting a new server?

If you run the server in your project dir (the dir where .tern-project lives), it will create a .tern-port file there, and if you start using tern_for_vim on that project, it should automatically connect to the running server (might need to kill existing servers first, if you already had files in that project open).

I'm trying to accomplish this as well. I'm running a standalone tern server and then launching vim (nvim in my case, not sure if that matters?) from the same directory that contains the .tern-port file. I can see that tern works within a nvim session. But if I exit nvim and reopen it, it seems my tern cache has been cleared completely. But maybe I'm understanding how this is supposed to work.

Is the file that you're editing also in that same directory? Tern_for_vim will look for a .tern-port file in what it considers the "project directory" of the file you're editing -- the nearest enclosing directory with a .tern-project file, or failing that, the script file's directory itself.

authors: davidsteinberger marijnh mattsawyer77


text:
Make "top error" more visible

Description
Hello,
I think it's currently difficult with Marimo to notice when there are several errors in a notebook what is the "top error" ie the first error that should be fixed in the notebook.
Here are 2 screenshots showing how this behavior could be improved.
First with Marimo

Many red color boxes... inexperienced developpers don't really know where to first look at. (I know this... not because I consider myself in this category but because my work is teaching)
Second with Pluto.jl

"computer bad, yout GREAT!" message clearly points to the original/root/top error.
Suggested solution
I asked to Claude.ai for help about such a situation. It provides a nice visual display for this (using TypeScript)
See

or for code https://claude.site/artifacts/91997567-8fee-47a7-ba98-30d4bb9d548d
This color categorization of errors (top error = red vs non top error = orange) is interresting.
The use of the red message "Fix this first" can also help.
Any opinion ?
Alternative
No response
Additional context
No response

Thanks for the suggestion.
We could definitely improve our error reporting. For example in your screenshot, the second cell has a title of NameError, but that's the exception its ancestor raised -- the second cell hasn't even run. So the title and message of cells whose ancestors have errored could be improved, as well as the style of such cells themselves.

Top error vs dependant errors could also be displayed in the "Explore dependencies" feature using again the red / orange color scheme.

Here cell-2 could be red and cell-5 be orange.
Mermaid graph could also provide a nive visual display of the situation.

graph TD
    %% Style definitions
    classDef errorNode fill:#FEE2E2,stroke:#DC2626,color:#DC2626
    classDef warningNode fill:#FFF7ED,stroke:#FB923C,color:#FB923C
    classDef successNode fill:#F0FDF4,stroke:#22C55E,color:#22C55E

    %% Nodes
    cell1["Cell [1]\n#x = 1"]:::successNode
    cell2["Cell [2]\ny = 2"]:::successNode
    cell3["Cell [3]\nz = x + y"]:::errorNode
    cell4["Cell [4]\na = 1"]:::successNode
    cell5["Cell [5]\nb = 2"]:::successNode
    cell6["Cell [6]\nc = a + b + z"]:::warningNode

    %% Dependencies
    cell2 --> cell3
    cell3 --> cell6
    cell4 --> cell6
    cell5 --> cell6

    %% Add labels to show error propagation
    subgraph Error Propagation
        cell3 -. "Error propagates" .-> cell6
    end

    %% Add notes
    click cell3 "Root Error: name 'x' is not defined"
    click cell6 "Cascading Error: depends on undefined 'z'"

There is the error panel:

Which is my go-to for checking errors. the problem here is that "non-root" errors can swamp the panel. It'd be nice to toggle hide these, or nest them under the parent error (:
I do love the dependency panel idea as well. I think showing running, queued, and stopped would be great

authors: akshayka dmadisetti s-celles

repo: marimo-team/marimo


text:
Create 0000-01-02-marinhoOliv.md

Add marinhoOliv's file

Add new slide!

Add new slide!

repo: marinhoOliv/github-slideshow


text:
bug(commitlint): update lodash to 4.17.11 to fix vulenrabilities

Update lodash to fix vulnerabilities.
Description
Updated lodash to 4.17.11 to fix proto buffer vulnerabilities.
I had issues committing due to npx xo throwing errors for unrelated to the changes issues so I used --no-verify on commit.
Motivation and Context

lodash modularized (all versions) are vulnerable to https://nvd.nist.gov/vuln/detail/CVE-2018-3721 and are unmaintained (~2 years)
our BlackDuck checks fails on commitlint and fix is needed to continue using it.

Usage examples
How Has This Been Tested?
Ran tests. There were 4 tests failing when the branch was checked out and they continue to fail. All other tests pass after lodash import paths were refactored.
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

The build isn't passing. I will take a look in the morning

Hi George! Thanks for the security patch. I think your commit should start with fix( instead of bug(. After all, you are describing what happens when the commit is merged, and I don't think you are adding bugs 😉 I also think the scope should be either one of the sub-packages name or none. But those can be changed later!
Could you explain why you switched to a full lodash import everywhere, instead of partial (only what's actually used) imports?

Hey Cedric.
Lodash hasn't maintained the modularized versions of the library for 2 years. The single library is the direction the lodash maintainers have taken, in fact in v5 I understand they'll remove submodules entirely (everything will import from the root namespace) and depend on babel and webpack wizardry to treeshake.
If lodash has to be upgraded for some of the libraries we might as well upgrade the rest, I believe.

Ah I see, that's a really good explanation 😄 So this PR is only for updating Lodash across all packages right? (And with that, fix some security issues related to lodash too)
For @marionebl, this is what they say in their Roadmap.

Discontinue per method packages in favor of modular lodash

Correct, all I'm doing is bumping versions and changing import paths.
I'm having issues with npx xo resolving locally the package libraries. I don't have much experience with npx or xo so I'm not sure what is driving their validation. Tests seem to be passing though. Any advice?

I will take a look this evening (CEST) :smile: I'll get back at you about xo and npx!

I fond the issue. I had some stale lodash. packages and tests were running because of that. Paths are wrong so I will be updating the request later today.

Hi George! Great job in finding out about the issue 😄 Do you still need some help with this PR? I did a full audit for all other (sub)packages and created a PR to fix 2/3 issues. Thanks for helping keep Commitlint safe! 😄

Sorry didn't have time yesterday. I will be taking a look in a bit and committing the fixes on my side.

No worries, whenever you have time! If you are stuck or want someone to check, let me know 😄

Sorry, it took me a while! I'm not sure why it's not popping up in my PR. Maybe xo only checks edited packages. I think this is something for @marionebl, we either need to ignore the function with xo or fix it. But fixing it requires a lot of refactoring 😅 Let's leave it like this until he comes back from his holiday.
Meanwhile, I also double checked your changes and started a review. Found some old modules in some package files, if you can clean it up we only have to fix the xo issue then! 😄 It will be easier for Mario to check and take action then 😄
Again, thanks a lot!

I think the packages look good at the moment but the build is failing due to the commitlint check and the xo check.
I'm happy to close this request and create a new one if needed but I'm not sure if that is going to solve the xo checks.

Follow up at #497, thank you folks!

authors: byCedric kzmv marionebl

repo: marionebl/commitlint


text:
gtfs_rt implements device_state_attributes.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:583
First occurred: 3:46:35 PM (3 occurrences)
Last logged: 3:46:35 PM
Entity sensor.ferny_grove_train (<class 'custom_components.gtfs_rt.sensor.PublicTransportSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.uni_qld_ferry (<class 'custom_components.gtfs_rt.sensor.PublicTransportSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.1_0_7_bus (<class 'custom_components.gtfs_rt.sensor.PublicTransportSensor'>) implements device_state_attributes. Please report it to the custom component author.

Hi, this has been fixed in release 1.20220316.01 onwards


text:
fizz: foreign key?

Maybe I missed something but it seems fizz does not have support for declaring foreign keys. Is there a reason? I believe all supported databases support foreign key constraints, but I might be wrong.

You can definitely add indexes and you can also execute raw sql, but there isn't direct support for for foreign keys. The reason there isn't is no one has added it yet. It would be a great addition if one was inclined to write a PR. :)

Awesome, if there's no blocker I might try to make some time to implement this, although I probably won't have the time in the near future.. Thanks @markbates ! :)

Feel free and have a go at it when you have time. The work around is to use the 'raw' function in fizz to add it.

https://github.com/gobuffalo/buffalo/issues/670

The https://github.com/markbates/pop (v3.x) repo has been moved to https://github.com/gobuffalo/pop (v4.x). The markbates/pop repo has been put into READ-ONLY mode and will no longer be updated. You may continue to use this repository, but be aware no more updates will be made on it.
If this is issues is still relevant, please open a new issue on the repository.
For more information on this move see https://github.com/markbates/pop/issues/164
Thank you so much and I apologize in advance for any trouble this may cause you.

authors: markbates viktorbenei

repo: markbates/pop


text:
is their any option to convert HTML into MD format?

I have html

Blockquotes can also be nested. Hello World

and I want to convert these html code into markdown like below
> > Blockquotes can also be nested. Hello **World**

Dupe of #666. Please, don't create issues not related to this repo.

authors: puzrin sunilattosol

repo: markdown-it/markdown-it


text:
pass the root_url through to the actual host

Unless I am missing something I think this line of code needs be there in order for the host to actually respect the ROOT_URL setting.
In any case, correct me if I am wrong, but when I setup a Varnish cache in front of js-host this was necessary to make the Python process actually call the correct endpoint.

Cool, thanks for that, Peter!

authors: markfinger petermelias

repo: markfinger/python-js-host


text:
Timeout to skip a file and log it as skipped.

Especially for PST

should be dealt with in a different way

repo: markkerzner/FreeEed


text:
DocumentWriteSet addAs method throws No factory for class com.marklogic.client.io.DOMHandle

Executing the following snippet throws a java.lang.IllegalArgumentException.
The test is trying to verify the addAs() method with signature:
DocumentWriteSet com.marklogic.client.document.DocumentWriteSet.addAs(String docId, DocumentMetadataWriteHandle metadataHandle, Object content, String temporalDocumentURI)

Adds to this write set a document with the given docId (server uri), metadata, temporalDocumentURI and contents. The IO class must have been registered before creating the database client. By default, the provided handles that implement ContentHandle are registered. Learn more about shortcut methods

Parameters:
docId the version URI identifier for the document
metadataHandle a handle for writing the metadata of the document
content an IO representation of the document content
temporalDocumentURI the logical temporal document collection URI

	@Test
  	   	public void testBulkWritReadeWithAddAs() throws Exception {

  	   		boolean tstatus = false;
  	   		DocumentPage termQueryResults = null;

  	   		Transaction tx = writerClient.openTransaction();
  	   		try {
  	   			XMLDocumentManager docMgr = writerClient.newXMLDocumentManager();

  	   			DocumentWriteSet writeset = docMgr.newWriteSet();
  	   			String[] docId = new String[4];
  	   			docId[0] = "1.xml";
  	   			docId[1] = "2.xml";
  	   			docId[2] = "3.xml";
  	   			docId[3] = "4.xml";

  	   			DOMHandle handle1 = getXMLDocumentHandle("2001-01-01T00:00:00",
  	   					"2011-12-31T23:59:56", "999 Skyway Park - XML", docId[0]);
  	   			DOMHandle handle2 = getXMLDocumentHandle("2001-01-02T00:00:00",
  	   					"2011-12-31T23:59:57", "999 Skyway Park - XML", docId[1]);
  	   			DOMHandle handle3 = getXMLDocumentHandle("2001-01-03T00:00:00",
  	   					"2011-12-31T23:59:58", "999 Skyway Park - XML", docId[2]);
  	   			DOMHandle handle4 = getXMLDocumentHandle("2001-01-04T00:00:00",
  	   					"2011-12-31T23:59:59", "999 Skyway Park - XML", docId[3]);
  	   			DocumentMetadataHandle mh = setMetadata(false);

  	   			String[] versiondocId = new String[4];
	  			versiondocId[0] = "/version2/1.xml";
	  			versiondocId[1] = "/version2/2.xml";
	  			versiondocId[2] = "/version2/3.xml";
	  			versiondocId[3] = "/version2/4.xml";

  	   			writeset.addAs(docId[0], mh, handle1, versiondocId[0]);
  	   			writeset.addAs(docId[1], mh, handle2, versiondocId[1]);
  	   			writeset.addAs(docId[2], mh, handle3, versiondocId[2]);
  	   			writeset.addAs(docId[3], mh, handle4, versiondocId[3]);
  	   			Map<String, DOMHandle> map = new TreeMap<String, DOMHandle>();
  	   			map.put(docId[0], handle1);
  	   			map.put(docId[1], handle2);
  	   			map.put(docId[2], handle3);
  	   			map.put(docId[3], handle4);

  	   			docMgr.write(writeset, null, null, bulktemporalCollectionName);
}

Here is the exception:
java.lang.IllegalArgumentException: No factory for class com.marklogic.client.io.DOMHandle
	at com.marklogic.client.impl.HandleFactoryRegistryImpl.makeHandle(HandleFactoryRegistryImpl.java:98)
	at com.marklogic.client.impl.DocumentWriteSetImpl.addAs(DocumentWriteSetImpl.java:116)
	at com.marklogic.client.functionaltest.TestBiTemporal.testBulkWritReadeWithAddAs(TestBiTemporal.java:866)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

DOMHandle with add() method works fine.

DOMHandle is supposed to be used with add method.
The addAs method is a convenience for times when you don't want to think about DOMHandle and you'd like to work directly with objects of type org.w3c.dom.Document.
To learn more about the IO shortcut methods, please read www.marklogic.com/blog/io-shortcut-marklogic-java-client-api/

The method works with Document.class. Not an issue.

authors: georgeajit sammefford

repo: marklogic/java-client-api


text:
Write a DocumentWriteOperation using WriteHostBatcher

As a Java Client user
I want to (issue title)
So that I can write a library that abstracts whether WriteBatcher is used or just a DocumentManager so that either ML8 or ML9 can be used

I noticed that WriteBatcher, at least on master, does not have a method that takes a DocumentWriteOperation.
I think DocumentWriteOperation is one of the better features of the Java Client, since it encapsulates a write request in a single object. Could an add(DocumentWriteOperation) method be added to WriteBatcher?

QA and Docs:
Have added an overload in WriteBatcher for adding a DocumentWriteOperation
WriteBatcher add(DocumentWriteOperation writeOperation);

@georgeajit please assign to Srinath if he is the one responsible for DMSDK. I am not sure who is responsible. Hence I assigned it to you. Thanks.

Assigning to Kim for documentation.

I don't think this needs additional documentation, beyond what's in the javadoc.
Rob said it is "one of the better features of the Java Client API", but I do not find it referenced ANYWHERE in the javadoc before 4.0.4. That is, it is not passed or returned in any public interface, other than the new overload added by this bug.
It feels almost like an internal interface that  "leaked", which is fine, but it doesn't require extra emphasis in the dev guide, IMO.

authors: georgeajit kcoleman-marklogic rjrudin vivekmuniyandi


text:
系统环境变量

安装成功，根据提示，添加到环境变量里：

但是后面的 set PATH=%PATH%;C:\Users\Hunlongyu.deno\bin 是啥？没管它，结果无法正常运行。

但我进入脚本目录下，是可以正常运行的。

所以是我系统的环境变量没有加全嘛？还是缺少了什么步骤？

@Hunlongyu 靓仔你好，重启你的电脑试试

好像重启后可以。

authors: Hunlongyu markthree

repo: markthree/dnrm


text:
Missing activation for Wolf_DieBekherte

There's no activation lab file for Wolf_DieBekherte here:
https://github.com/marl/medleydb/tree/master/medleydb/data/Annotations/Activation_Confidence
There's a file here though:
https://github.com/marl/medleydb/blob/master/medleydb/data/Annotations/Activation_Confidence/original_annotations/Wolf_DieBekherte_ACTIVATION_CONF.lab
This is breaking some code of mine that iterates over every mdb mix and does stuff with the activations, since track.stem_activations for this track is empty.
Why is the file missing?

Same for Mozart_DiesBildnis

I think this can be closed, right?

repo: marl/medleydb


text:
See "Props" or data

I want to know how to debug, and get the information coming from my server. In a way, I want to be able to do this.props and see all my props.
The issue is that its all stored somewhere and gets called or "seen" with source="..."
Thank you

I think you'll want to checkout redux store. The data comming from your server will hang there, and the rect componentes of your project are tied to them via redux' connect function. So, when the store changes, the components get rendered reflecting the new data.
Take a look at the redux plugin for your browser.

repo: marmelab/admin-on-rest


text:
🛑 NHL Stenden roosters is down

In 94b0ca6, NHL Stenden roosters (https://nhlstendenroosters.nl) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NHL Stenden roosters is back up in 3a3f998 after 17 minutes.

repo: marnick-s/status


text:
Improve SetCondition constraints

'SetConditionFrom' and SetConditionProperty special constraints can now deal with non-string and null values.
SetConditionProperty can now also deal with the property being missing

Codecov Report

Merging #28 (f0a40d2) into master (615ccee) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #28   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           19        19
  Lines         4166      4181   +15
=========================================
+ Hits          4166      4181   +15

Impacted Files
Coverage Δ

constraints_special.go
100.00% <100.00%> (ø)

utils.go
100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


text:
Sample application in Java for the usage in Fragment.

Can you provide a sample application in Java for the usage inside of Fragment instead of Activity?

Hey.
Is this still relevant?


text:
Cloudflare Turnstile resource preloading warning with Nextjs 14

The resource https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/cmg/1/CJEbi4RwSjcdqgfNhtiGiFEnzHMCmQfIt6hQ%2F6mE96Y%3D was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.

This warning also appears by using a vanilla Turnstile Widget, so I guess it's unrelated to this library.

Feel free to suggest or contribute a fix to this problem.

authors: immdraselkhan marsidev

repo: marsidev/react-turnstile


text:
[BUG/ISSUE] WingetUI Crashes immediately upon startup

Before submitting the issue

[x] I have checked that the bug is not a duplicate or, if it is, it needs to be reopened
[x] I have checked that I am running the latest version of WingetUI
[x] I have tried resetting and reinstalling WingetUI and the issue persisted or happened again
Deleted it and reinstalled it
[x] I have checked the FAQ section for solutions
[x] I have read the contributing guidelines and I agree with the Code of Conduct

Describe the bug
Crahses immediately after loading. Here's a gif.

I can't access the log to see what is happening. Where is the log stored?

This issue has already been reported on #980.
When wingetui closes, can you try opening wingetui from the system tray?
Could you please provide details about your system?

Could you please run this build and send me the console output?
https://we.tl/t-phkAxfhwJe

WingetUI 1.7.1 has this issue fixed!

authors: brimwats marticliment

repo: marticliment/WingetUI


text:
OsmAnd becomes very sluggish when viewing missing tiles from gpx export

This problem is mentioned in the documentation already, but no other FOSS solution for offline tile hunting is mentioned
I suggest to add OrganicMaps which can display those missing tile exports (gpx) without issues on a offline map.
OrganicMaps can also record tracks, so it might be mentioned on other pages of the documentation too.

Track naming of exported gpx files is not good for Organic Maps tho. So i just use it to look up the missing tiles and record with OsmAnd.

I now mention Organic Maps in the documentation.

authors: beautiful-orca martin-ueding

repo: martin-ueding/geo-activity-playground


text:
http status 500 for activities

Current master.
Get this when trying to open any activity:
2024-01-18 20:32:58 geo_activity_playground.webui.app ERROR Exception on /activity/4587788469260011142 [GET]
Traceback (most recent call last):
  File "/home/me/.cache/pypoetry/virtualenvs/geo-activity-playground-SZxD7HkL-py3.11/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/.cache/pypoetry/virtualenvs/geo-activity-playground-SZxD7HkL-py3.11/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/.cache/pypoetry/virtualenvs/geo-activity-playground-SZxD7HkL-py3.11/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/.cache/pypoetry/virtualenvs/geo-activity-playground-SZxD7HkL-py3.11/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/my/src/github/geo-activity-playground/geo_activity_playground/webui/app.py", line 30, in activity
    "activity.html.j2", **activity_controller.render_activity(int(id))
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/my/src/github/geo-activity-playground/geo_activity_playground/webui/activity_controller.py", line 40, in render_activity
    "color_line_geojson": make_geojson_color_line(time_series),
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/my/src/github/geo-activity-playground/geo_activity_playground/core/activities.py", line 172, in make_geojson_color_line
    return geojson.dumps(
           ^^^^^^^^^^^^^^
  File "/home/me/.cache/pypoetry/virtualenvs/geo-activity-playground-SZxD7HkL-py3.11/lib/python3.11/site-packages/geojson/codec.py", line 31, in dumps
    return json.dumps(to_mapping(obj),
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
          ^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/encoder.py", line 258, in iterencode
    return _iterencode(o, 0)
           ^^^^^^^^^^^^^^^^^
ValueError: Out of range float values are not JSON compliant
2024-01-18 20:32:58 werkzeug INFO 127.0.0.1 - - [18/Jan/2024 20:32:58] "GET /activity/4587788469260011142 HTTP/1.1" 500 -

The problem was that some speed values come out as not-a-number. I am not sure why, but these values are just ignored now and then it works.

authors: Natenom martin-ueding


text:
Add cusom color names

Hi a suggestion for web developers is to add a translation of colors to framework color names.
Specifically here i mean tailwind css but, but it could be implemented for several frameworks.
i have something similar as a browser extension but it be great to implement in this tool i use all the time.

Hi, I get the same suggestion. I really like to use this Color Picker but it need to can put name as color to reference it.
An other cool think will be to can create folder to make multiple colors schemes / colors groupes.
Thanks for your work !

 [030609]() [https://visualstudio.microsoft.com/wp-content/uploads/2019/12/random-swim-lane-01.svg]()

Thanks a lot for input and suggestions, it took a little longer but now you can see the name of a color (from the version 1.3.0), just enable it in the settings!

authors: Thomas-Bagnolati kiwina martinchrzan nelsondani

repo: martinchrzan/ColorPicker


text:
Create vet_clinic database

:recycle: Changes made

[ ] Created vet_clinic database
[ ] Created animals table
[ ] Added the provided data
[ ] Queried the animals table following the provided queries.

Screenshots of the results
1. Find all animals whose name ends in "mon".

2. List the name of all animals born between 2016 and 2019.

3. List the name of all animals that are neutered and have less than 3 escape attempts.

4. List the date of birth of all animals named either "Agumon" or "Pikachu".

5. List name and escape attempts of animals that weigh more than 10.5kg

6. Find all animals that are neutered.

7. Find all animals not named Gabumon.

8.Find all animals with a weight between 10.4kg and 17.3kg (including the animals with the weights that equals precisely 10.4kg or 17.3kg)

Thanks @zeff96

repo: martinkarugaba/vet-clinic-database


text:
npm install not works - node-gyp rebuild error

I'm trying to follow all the instructions from the README and install module after cloning the repo. But there's an error on the npm install:
$ npm install

> x509@0.3.3 install /home/pavlovdog/esteid.js/node_modules/x509
> node-gyp rebuild

make: Entering directory '/home/pavlovdog/esteid.js/node_modules/x509/build'
  CXX(target) Release/obj.target/x509/src/addon.o
In file included from ../../nan/nan.h:194:0,
                 from ../include/x509.h:7,
                 from ../src/addon.cc:5:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^
../../nan/nan_maybe_43_inl.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array>, uint32_t)’:
../../nan/nan_maybe_43_inl.h:220:17: error: ‘class v8::Array’ has no member named ‘CloneElementAt’
   return array->CloneElementAt(GetCurrentContext(), index);
                 ^
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:200,
                 from ../include/x509.h:7,
                 from ../src/addon.cc:5:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::BooleanObject>::return_t Nan::imp::Factory<v8::BooleanObject>::New(bool)’:
../../nan/nan_implementation_12_inl.h:40:38: error: no matching function for call to ‘v8::BooleanObject::New(bool&)’
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                      ^
In file included from /home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:63:0,
                 from ../include/addon.h:4,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/v8.h:4948:23: note: candidate: static v8::Local<v8::Value> v8::BooleanObject::New(v8::Isolate*, bool)
   static Local<Value> New(Isolate* isolate, bool value);
                       ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/v8.h:4948:23: note:   candidate expects 2 arguments, 1 provided
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:200,
                 from ../include/x509.h:7,
                 from ../src/addon.cc:5:
../../nan/nan_implementation_12_inl.h:40:60: error: expected primary-expression before ‘>’ token
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                                            ^
../../nan/nan_implementation_12_inl.h:40:62: error: expected primary-expression before ‘)’ token
   return v8::BooleanObject::New(value).As<v8::BooleanObject>();
                                                              ^
In file included from ../include/x509.h:7:0,
                 from ../src/addon.cc:5:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:821:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
In file included from ../include/addon.h:4:0,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../include/x509.h:7:0,
                 from ../src/addon.cc:5:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:835:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
In file included from ../include/addon.h:4:0,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:165:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../include/x509.h:7:0,
                 from ../src/addon.cc:5:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:849:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
In file included from ../include/addon.h:4:0,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:158:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../include/x509.h:7:0,
                 from ../src/addon.cc:5:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../../nan/nan.h:1467:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
In file included from ../include/addon.h:4:0,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:172:50: note: declared here
                 NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                  ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
     __attribute__((deprecated(message))) declarator
                                          ^
In file included from ../include/x509.h:7:0,
                 from ../src/addon.cc:5:
../../nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, Nan::GetterCallback, Nan::SetterCallback, v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../../nan/nan.h:1969:16: error: no matching function for call to ‘v8::Object::SetAccessor(v8::Local<v8::String>&, void (*&)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&), void (*&)(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<void>&), v8::Local<v8::Object>&, v8::AccessControl&, v8::PropertyAttribute&)’
     , attribute);
                ^
In file included from /home/pavlovdog/.node-gyp/10.6.0/include/node/node.h:63:0,
                 from ../include/addon.h:4,
                 from ../src/addon.cc:4:
/home/pavlovdog/.node-gyp/10.6.0/include/node/v8.h:3266:37: note: candidate: v8::Maybe<bool> v8::Object::SetAccessor(v8::Local<v8::Context>, v8::Local<v8::Name>, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::MaybeLocal<v8::Value>, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType)
   V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(
                                     ^
/home/pavlovdog/.node-gyp/10.6.0/include/node/v8.h:3266:37: note:   no known conversion for argument 2 from ‘Nan::imp::NativeGetter {aka void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&)}’ to ‘v8::Local<v8::Name>’
x509.target.mk:102: recipe for target 'Release/obj.target/x509/src/addon.o' failed
make: *** [Release/obj.target/x509/src/addon.o] Error 1
make: Leaving directory '/home/pavlovdog/esteid.js/node_modules/x509/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.15.0-24-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pavlovdog/esteid.js/node_modules/x509
gyp ERR! node -v v10.6.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! x509@0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the x509@0.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pavlovdog/.npm/_logs/2018-07-12T13_05_42_226Z-debug.log

How can I fix it? I have already tried to remove ~/.node-gyp, node_modules and run npm update - didn't help, same error?
P.S. I'm using Ubuntu 16.04
$ uname -a
Linux local 4.15.0-24-generic #26~16.04.1-Ubuntu SMP Fri Jun 15 14:35:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ node -v
v10.6.0
$ npm -v
6.1.0

Moving to the node 8.x solved this problem.
curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs -y


text:
Moving elements out of a hash set

An 'erase(key)' method that returns the previously stored instance by means of move construction would be really handy.
Moving elements out of a container is tricky when all you get is a const ref.
Please consider the following two methods for your table<> template.
I am not 100% sure but I guess something like that should work just fine?
// Erase element referenced by 'i' and return a new object move constructed from the erased element.
auto eject(const const_iterator i) -> value_type {
    value_type tmp{std::move(const_cast<value_type&>(*i))};
    erase(i);
    return tmp;
}

// Lookup 'key' and if present return 'eject(find(key))', otherwise return an empty optional.
template <class K>
auto eject(K const& key) -> std::optional<value_type> {
    auto i = find(key);
    if(i == end()) return {};
    std::optional<value_type> result(std::in_place, std::move(const_cast<value_type&>(*i)));
    erase(i);
    return result;
}

can't you use something like this, maybe in a helper function? I'm a bit wary with adding new functionality that's possible with other means
if (auto it = map.find(key); it != map.end()) {
    val = std::move(it->second);
    map.erase(it);
}

Not possible by other means sadly. Sometimes you need to get not just the associated value (mapped type) but also the key. This is problematic for both a map and a set structure because moving the key changes the value that still resides in the container and leaves it (the value) in an unspecified (but usable) state. The std::unordered_map/set containers are then left in an invalid state. Thus the key type is neatly guarded by constness.
if (auto it = set.find(key); it != set.end()) {
val = std::move(const_cast<SomeType &>(*it)); // HACK
set.erase(it);
}
So you can copy the key, but that might involve dynamic allocation (e.g. strings/buffers), or worse: the key is not copy-able and so forever 'stuck' in that container. Your implementation would allow keys to be 'moved out' of map/set containers - there is just no API for that. In my view that is a useful feature worth considering.

Here is what I had in mind.
template <class Q = T, std::enable_if_t<!is_map_v<Q>, bool> = true>
[[nodiscard]] auto eject(const const_iterator i) -> value_type {
    value_type tmp{std::move(const_cast<value_type&>(*i))};
    erase(i);
    return tmp;
}

template <class K, class Q = T, std::enable_if_t<!is_map_v<Q>, bool> = true>
[[nodiscard]] auto eject(K const& key) -> std::optional<value_type> {
    auto i = find(key);
    if(i == end()) return {};
    std::optional<value_type> result(std::in_place, std::move(const_cast<value_type&>(*i)));
    erase(i);
    return result;
}

template <class Q = T, std::enable_if_t<is_map_v<Q>, bool> = true>
[[nodiscard]] auto eject(const const_iterator i) -> value_type {
    value_type tmp{
        std::move(const_cast<Key&>(i->first)),
        std::move(const_cast<T&>(i->second))};
    erase(i);
    return tmp;
}

template <class K, class Q = T, std::enable_if_t<is_map_v<Q>, bool> = true>
[[nodiscard]] auto eject(K const& key) -> std::optional<value_type> {
    auto i = find(key);
    if(i == end()) return {};
    std::optional<value_type> result(std::in_place,
        std::move(const_cast<Key&>(i->first)),
        std::move(i->second));
    erase(i);
    return result;
}

The problem case:
ankerl::unordered_dense::set<std::string> m;
m.emplace("this string is way too long for SSO!");
auto i = m.find("this string is way too long for SSO!");
// silently invokes copy constructor
// also allocs memory during clean up
auto cp_obj = std::move(*i);
assert(!i->empty());
// moves, but yikes
auto mv_obj = std::move(const_cast<std::string&>(*i));
assert(i->empty());
m.erase(i);

With new API:
ankerl::unordered_dense::set<std::string> m;
m.emplace("this string is way too long for SSO!");
auto i = m.find("this string is way too long for SSO!");
auto mv_obj = m.eject(i); // string is moved, no alloc -> reliable cleanup
assert(mv_obj == "this string is way too long for SSO!");

Hi again, I see your point. Currently I have an extract() method that extracts the whole underlying std::vector. I'd say the API should be the same as for erase(), except that it doesn't return an iterator:
auto extract(const_iterator i) -> value_type;

auto extract(Key const& key) -> std::optional<value_type>;

template <class K>
auto extract(Key&& key) -> std::optional<value_type>;

It might also be a good idea to add an API that can throw an exception if one doesn't like the optional (similar to at):
// throws std::out_of_range when key is not found
auto extract_at(Key const& key) -> value_type;

// throws std::out_of_range when key is not found
template <class K>
auto extract_at(Key&& key,) -> value_type;

Implementation is a bit trickier though, as it's not allowed to call erase(it) when the object has already been moved out.

"..not allowed to call erase(it) when the object has already been moved out." Ugh, even though I looked at the code I totally didn't catch that the hash value has to be re-computed. I thought about using your hash map/set as a replacement for something I had cooked up in the past and finally found some time to do so. The memory usage is about 20% down (massive) and speed almost doubled. Had to replace usage of std::pair with std::tuple and bolt those extract() methods on because that is what my library needs. All I did was copy do_erase(bucket_idx) as do_extract(bucket_idx) where I grab the value right before m_values.pop_back(). On top of that I added the extract methods as you suggested based on erase(it). Here are the relevant (and hopefully correct) changes I made.
auto do_extract(value_idx_type bucket_idx) {
    auto const value_idx_to_remove = at(m_buckets, bucket_idx).m_value_idx;

    // shift down until either empty or an element with correct spot is found
    auto next_bucket_idx = next(bucket_idx);
    while (at(m_buckets, next_bucket_idx).m_dist_and_fingerprint >= Bucket::dist_inc * 2) {
        at(m_buckets, bucket_idx) = {dist_dec(at(m_buckets, next_bucket_idx).m_dist_and_fingerprint),
                                     at(m_buckets, next_bucket_idx).m_value_idx};
        bucket_idx = std::exchange(next_bucket_idx, next(next_bucket_idx));
    }
    at(m_buckets, bucket_idx) = {};

    // update m_values
    if (value_idx_to_remove != m_values.size() - 1) {
        // no luck, we'll have to replace the value with the last one and update the index accordingly
        auto& val = m_values[value_idx_to_remove];
        val = std::move(m_values.back());

        // update the values_idx of the moved entry. No need to play the info game, just look until we find the values_idx
        auto mh = mixed_hash(get_key(val));
        bucket_idx = bucket_idx_from_hash(mh);

        auto const values_idx_back = static_cast<value_idx_type>(m_values.size() - 1);
        while (values_idx_back != at(m_buckets, bucket_idx).m_value_idx) {
            bucket_idx = next(bucket_idx);
        }
        at(m_buckets, bucket_idx).m_value_idx = value_idx_to_remove;
    }
    value_type tmp = std::move(m_values.back());
    m_values.pop_back();
    return tmp;
}

auto extract(iterator it) -> value_type {
    auto hash = mixed_hash(get_key(*it));
    auto bucket_idx = bucket_idx_from_hash(hash);

    auto const value_idx_to_remove = static_cast<value_idx_type>(it - cbegin());
    while (at(m_buckets, bucket_idx).m_value_idx != value_idx_to_remove) {
        bucket_idx = next(bucket_idx);
    }

    return do_extract(bucket_idx);
}

template <typename Q = T, std::enable_if_t<is_map_v<Q>, bool> = true>
auto extract(const_iterator it) -> value_type {
    return extract(begin() + (it - cbegin())); // maybe a `it.mut() -> iterator` function would be useful
}

template <class K>
auto extract(K const& key) -> std::optional<value_type> {
    auto i = find(key);
    if(i == end()) return {};
    return extract(i);
}

Thanks for the code, but you are moving out the wrong element :)
I have a version up in PR #105 that should work correctly, can you give it a try? https://raw.githubusercontent.com/martinus/unordered_dense/633023a0abf9ffa44092e4c2510fa8a7f6a3cb21/include/ankerl/unordered_dense.h

During xmas I always test hash maps with just single entry and it worked like a charm ;)
Today I break that rule. Merged the changes and actually did some testing regarding map<string,int>::extract() + 10 minutes fuzzing with random string keys. All good, thank you very much!
Happy Holidays!

Thanks for testing, happy Holidays!

authors: martinus sh-mochi


text:
Rename devices

Is it possible to rename my devices? Possible enhancement?

I am having trouble finding this feature. Where can I find it?

This has been implemented.

authors: KenDingel martynasS wees

repo: martynasS/magic-home-desktop


text:
WIP: lodash: refine implicit and explicit chaining

Add support for implicit and explicit chaining by defining a separate type for each that defines chained variants of the main API.
This is a continuation of what I started in #47 where I explored a different approach but ended up backing it out, leaving only a collection of unrelated lodash improvements.
/cc @STRML

@marudor you mentioned "refining the tests" in #49. If you want to give me some pointers as to what you're looking for I can make this PR a little closer to your ideal.

@rmg mainly matching the structure of flow-typed.
So negative tests with // $ExpectError.
I don't have support for that in flowInterfaces though.

Any activity here? Would it be merged or some commits added?

@darky there is still more work to do, but I haven't been spending any time on it lately. Is it something you want to work on?

authors: darky marudor rmg

repo: marudor/flowInterfaces


text:
Orientation listeners don't work in functional components

I was writing a functional component and I just don't know how to subscribe to the orientation changes. Since the method listenOrientationChange accepts a class instance and use the method useState from class components.
I guess that extending the listener to functional components would be great ;)

I would like to see that feature as well. I am using hooks and I really don't want to use class-based components.

im faceing this issue too and my whole app is build with funcational componants please add the support

same

See my pull request: PR https://github.com/marudy/react-native-responsive-screen/pull/83

the error for that.setState is stil here , im also using hooks

maybe we can change some code like :
const Orientation = () => {
const [dimensions, setDimensions] = useState({ window, screen });
useEffect(() => {
    const subscription = Dimensions.addEventListener(
        'change',
        ({ window, screen }) => {
            setDimensions({ window, screen });
        }
    );
    return () => subscription?.remove();
});
return dimensions.screen.height > dimensions.screen.width ? 'portrait' : 'landscape'

}

authors: AVATAR197 LucasMallmann ahmedjaafar6 gregfenton janpaulalmanoche mshafex tejfaster

repo: marudy/react-native-responsive-screen