text:
代码块折叠、复制功能

如题，对于程序员来说，这两个功能挺有用的。老哥可以实现吗？

可是尝试在控制台输入以下代码段临时实现这个功能
document.getElementsByClassName("md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded").forEach((el)=>{el.outerHTML="<details open>"+el.outerHTML+"</details>"})

感谢作者开源了这个项目，让我开了眼界，学习到了不少
目标：从我使用Typora以来便发现代码块没有一键复制功能，上网搜索发现2021年有给Typora开发者提过这方面issue，但之后杳无音信
问题：看到了作者的成品，我便想尝试一番，看看能不能实现，如果单纯在网页实现，问题不大，但在typora内我发现学习作者注入js代码不运行，控制台可运行
以下三张图辅助说明

请问有法子解决嘛

感谢作者开源了这个项目，让我开了眼界，学习到了不少
目标：从我使用 Typora 以来便发现 ** 代码块没有一键复制功能 **，上网搜索发现 2021 年有给 Typora 开发者提过这方面 issue，但之后杳无音信
问题：看到了作者的成品，我便想尝试一番，看看能不能实现，如果单纯在网页实现，问题不大，但在 typora 内我发现学习作者注入 js 代码不运行，控制台可运行
以下三张图辅助说明

请问有法子解决嘛

你掉坑里了。
Typora 是延迟加载页面的，文件内容都是通过延迟执行的 js 写入 document 的。
md-fences 在 frame.js 中是很晚生成的，并且有清空 innerHTML 操作。所以你必须等到 frame.js 执行完毕后才能执行脚本。
这里给出清空 md-fences innerHTML 的函数链条，打个断点就知道了：
restoreEditStateFromData -> refresh -> refreshUnder -> refreshEditor -> addCodeBlock -> b.addClass("ty-contain-cm").html("");
我花了点时间，整了一个我的版本的 copy_code.js。代码文件已经上传，里面有更加详细的注释。你可以看看。有什么问题可以继续在这说。
代码本身很简单，主要还是花在了逆向上。

@jinghu-moon @lion-no-back 折叠和复制功能已经做了，你们可以用用看。
不过折叠功能做到了标题上，我感觉标题折叠可能更有用一些 : )

下午闲着没事做把代码完善了下。效果如下：

修改后的 js 代码：
(() => {
  const config = {
    // 启用脚本,若为false,以下配置全部失效
    ENABLE: true,
    LOOP_DETECT_INTERVAL: 20,
    CLICK_CHECK_INTERVAL: 300,
    DEBUG: false
  }

  if (!config.ENABLE) {
    return;
  }

  const addCopyElement = (target) => {
    let a = target.querySelector(".typora-copy-code");
    if (!a) {
      a = document.createElement("a");
      a.setAttribute("class", "typora-copy-code");
      a.innerText = "Copy";
      target.appendChild(a);
    }
  };

  const decorator = (original, after) => {
    return function () {
      const result = original.apply(this, arguments);
      after.call(this, result, ...arguments);
      return result;
    };
  };

  const after = (result, ...args) => {
    const cid = args[0];
    if (cid) {
      const ele = document.querySelector(`#write .md-fences[cid=${cid}]`);
      addCopyElement(ele);
    }
  };

  const _timer = setInterval(() => {
    if (File?.editor?.fences?.addCodeBlock) {
      clearInterval(_timer);
      File.editor.fences.addCodeBlock = decorator(
        File.editor.fences.addCodeBlock,
        after
      );
    }
  }, config.LOOP_DETECT_INTERVAL);

  const badChars = [
    "%E2%80%8B", // ZERO WIDTH SPACE \u200b
    "%C2%A0", // NO-BREAK SPACE \u00A0
    "%0A" // NO-BREAK SPACE \u0A
  ];
  const replaceChars = ["", "%20", ""];

  let lastClickTime = 0;
  document.getElementById("write").addEventListener("click", (ev) => {
    const button = ev.target.closest(".typora-copy-code");
    if (!button) {
      return;
    }

    ev.preventDefault();
    ev.stopPropagation();

    if (ev.timeStamp - lastClickTime < config.CLICK_CHECK_INTERVAL) {
      return;
    }

    lastClickTime = ev.timeStamp;
    const lines = button
      .closest(".md-fences")
      .querySelectorAll(".CodeMirror-code .CodeMirror-line");
    if (!lines) {
      return;
    }
    const contentList = [];
    lines.forEach((line) => {
      let encodeText = encodeURI(line.textContent);
      for (let i = 0; i < badChars.length; i++) {
        if (encodeText.indexOf(badChars[i]) !== -1) {
          encodeText = encodeText.replace(
            new RegExp(badChars[i], "g"),
            replaceChars[i]
          );
        }
      }
      encodeText = decodeURI(encodeText);
      contentList.push(encodeText);
    });

    const result = contentList.join("\n");
    navigator.clipboard.writeText(result);

    button.classList.toggle("copied");
    setTimeout(() => {
      button.classList.toggle("copied");
    }, 2000);
  });

  if (config.DEBUG) {
    JSBridge.invoke("window.toggleDevTools");
  }
  console.log("copy_code.js has been injected");
})();

使用的 css 代码：
@font-face {
  font-family : "iconfont";
  src         : url("./icon/iconfont.woff2");
  font-display: swap;
}

#write .md-fences .typora-copy-code {
  position: absolute;
  top     : .1em;
  right   : .5em;
  z-index : 10;
  opacity : 0.6;
  cursor  : pointer;
  color   : transparent;
}

#write .md-fences .typora-copy-code::before,
#write .md-fences .typora-copy-code.copied::before {
  font-family: "iconfont";
  color      : #999;
  position   : absolute;
  font-size  : 13px;
  right      : 25px;
  top        : -1px;
}

#write .md-fences .typora-copy-code::before {
  content: "\e62b";
}

#write .md-fences .typora-copy-code.copied::before {
  content: "\e666";
  font-weight: bold;
}

css 也是在 window.html 里引入，或者直接添加到用户当前使用的主题代码里。
打算直接把 css 写入 js 里面，但是 css 代码里的转义字符，js 识别不出来，就只能分开了。老哥看看可以合在一起不。

此外，我想把这个功能加到我写的 Typora 主题，可以吗？会注明出处。

此外，我想把这个功能加到我写的 Typora 主题，可以吗？会注明出处。

没问题的，如果能贴出 github 链接就更好了。

@jinghu-moon @lion-no-back 折叠和复制功能已经做了，你们可以用用看。
不过折叠功能做到了标题上，我感觉标题折叠可能更有用一些 : )

真厉害啊，感觉标题折叠和代码块复制这两个功能可解决很多燃眉之急
我也想提供代码块复制交互效果，奈何俺太菜了，在typora上尝试了一天，哪怕对照你写的源码和注释（俺菜了，大部分看不懂），依旧无计可施，于是在热心网友@jinghu-moon提供的代码基础上做了点改进，自己用了感觉可以接受，所以先到此吧

(() => {
    const config = {
        // 启用脚本,若为false,以下配置全部失效
        ENABLE: true,
        LOOP_DETECT_INTERVAL: 20,
        CLICK_CHECK_INTERVAL: 300,

        DEBUG: false
    }

    if (!config.ENABLE) {
        return
    }

    (() => {
        const css = `
			#write .md-fences .typora-copy-code {
			  position: absolute;
			  top     : .1em;
			  right   : .5em;
			  z-index : 10;
			  opacity : 0.6;
			  cursor  : pointer;
			  color   : transparent;
			}

			#write .md-fences .typora-copy-code::before,
			#write .md-fences .typora-copy-code.copied::before {
			  font-family: "OPPOSans";
			  color      : #999;
			  position   : absolute;
			  font-size  : 15px;
			  right      : 3px;
			  top        : -1px;
			}

			#write .md-fences .typora-copy-code::before {
			  content: "Copy";
			}

			#write .md-fences .typora-copy-code.copied::before {
			  content: "Copied";
			  color: #32cd32;
			  font-weight: bold;
			}
            `
        const style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = css;
        document.getElementsByTagName("head")[0].appendChild(style);
    })()

    const addCopyElement = (target) => {
        let a = target.querySelector(".typora-copy-code");
        if (!a) {
            a = document.createElement("a");
            a.setAttribute("class", "typora-copy-code");
            target.appendChild(a);
        }
    }

    const decorator = (original, after) => {
        return function () {
            const result = original.apply(this, arguments);
            after.call(this, result, ...arguments);
            return result;
        };
    }

    const after = (result, ...args) => {
        const cid = args[0];
        if (cid) {
            const ele = document.querySelector(`#write .md-fences[cid=${cid}]`);
            addCopyElement(ele);
        }
    }

    const _timer = setInterval(() => {
        if (File?.editor?.fences?.addCodeBlock) {
            clearInterval(_timer);
            File.editor.fences.addCodeBlock = decorator(File.editor.fences.addCodeBlock, after);
        }
    }, config.LOOP_DETECT_INTERVAL);

    const badChars = [
        "%E2%80%8B", // ZERO WIDTH SPACE \u200b
        "%C2%A0", // NO-BREAK SPACE \u00A0
        "%0A" // NO-BREAK SPACE \u0A
    ];
    const replaceChars = ["", "%20", ""];

    let lastClickTime = 0;
    document.getElementById("write").addEventListener("click", ev => {
        const button = ev.target.closest(".typora-copy-code");
        if (!button) {
            return
        }

        ev.preventDefault();
        ev.stopPropagation();

        if (ev.timeStamp - lastClickTime < config.CLICK_CHECK_INTERVAL) {
            return
        }
        lastClickTime = ev.timeStamp;

        const lines = button.closest(".md-fences").querySelectorAll(".CodeMirror-code .CodeMirror-line")
        if (!lines) {
            return
        }

        document.activeElement.blur();

        const contentList = [];
        lines.forEach(line => {
            let encodeText = encodeURI(line.textContent);
            for (let i = 0; i < badChars.length; i++) {
                if (encodeText.indexOf(badChars[i]) !== -1) {
                    encodeText = encodeText.replace(new RegExp(badChars[i], "g"), replaceChars[i]);
                }
            }
            const decodeText = decodeURI(encodeText);
            contentList.push(decodeText)
        })

        const result = contentList.join("\n");
        navigator.clipboard.writeText(result);

        button.classList.toggle("copied");
		setTimeout(() => {
			button.classList.toggle("copied");
		}, 1000);
    })

    if (config.DEBUG) {
        JSBridge.invoke("window.toggleDevTools");
    }
    console.log("copy_code.js had been injected");
})()

谢谢分享

又做了些改动。可实现代码块复制与显示代码块编程语言的功能。使用效果与前面发的图一致。前面那张图显示代码块编程语言是通过 CSS 实现的。
js 代码如下：
(() => {
  const config = {
    // 启用脚本，若为 false，以下配置全部失效
    ENABLE: true,
    LOOP_DETECT_INTERVAL: 20,
    CLICK_CHECK_INTERVAL: 300,
    DEBUG: false
  };

  // 添加常用编程语言字母和对应的全名
  const codeLang = {
    ABAP: "ABAP",
    APL: "APL",
    ASCIIARMOR: "ASCII Armor",
    ASN1: "ASN.1",
    ASP: "ASP",
    ASSEMBLY: "Assembly",
    BASH: "Bash",
    BASIC: "BASIC",
    C: "C",
    CSHARP: "C#",
    CPP: "C++",
    CASSANDRA: "Cassandra",
    CEYLON: "Ceylon",
    CLIKE: "C-like",
    CLOJURE: "Clojure",
    CMAKE: "CMake",
    COBOL: "COBOL",
    COFFEESCRIPT: "CoffeeScript",
    COMMONLISP: "Common Lisp",
    CQL: "CQL",
    CRYSTAL: "Crystal",
    CSS: "CSS",
    CYPHER: "Cypher",
    CYTHON: "Cython",
    D: "D",
    DART: "Dart",
    DIFF: "Diff",
    DJANGO: "Django",
    DOCKERFILE: "Dockerfile",
    DTD: "DTD",
    DYLAN: "Dylan",
    EJS: "EJS",
    ELIXIR: "Elixir",
    ELM: "Elm",
    EMBEDDEDJS: "EmbeddedJS",
    ERB: "ERB",
    ERLANG: "Erlang",
    FSHARP: "F#",
    FLOW: "Flow",
    FORTH: "Forth",
    FORTRAN: "Fortran",
    GAS: "Gas",
    GFM: "GFM",
    GHERKIN: "Gherkin",
    GLSL: "GLSL",
    GO: "Go",
    GROOVY: "Groovy",
    HANDLEBARS: "Handlebars",
    HASKELL: "Haskell",
    HAXE: "Haxe",
    HIVE: "Hive",
    HTACCESS: "htaccess",
    HTML: "HTML",
    HTTP: "HTTP",
    HXML: "HXML",
    IDL: "IDL",
    INI: "INI",
    JADE: "Jade",
    JAVA: "Java",
    JAVASCRIPT: "JavaScript",
    JINJA2: "Jinja2",
    JS: "JavaScript",
    JSON: "JSON",
    JSP: "JSP",
    JSX: "JSX",
    JULIA: "Julia",
    KOTLIN: "Kotlin",
    LATEX: "LaTeX",
    LESS: "Less",
    LISP: "Lisp",
    LIVESCRIPT: "LiveScript",
    LUA: "Lua",
    MAKEFILE: "Makefile",
    MARIADB: "MariaDB",
    MARKDOWN: "Markdown",
    MATHEMATICA: "Mathematica",
    MATLAB: "MATLAB",
    MBOX: "Mbox",
    MERMAID: "Mermaid",
    MSSQL: "MSSQL",
    MYSQL: "MySQL",
    NGINX: "Nginx",
    NIM: "Nim",
    NSIS: "NSIS",
    OBJC: "Objective-C",
    OCAML: "OCaml",
    OCTAVE: "Octave",
    OZ: "Oz",
    PASCAL: "Pascal",
    PEGJS: "PEG.js",
    PERL: "Perl",
    PERL6: "Perl6",
    PGP: "PGP",
    PHP: "PHP",
    PHPHTML: "PHP+HTML",
    PLSQL: "PL/SQL",
    POSTGRESQL: "PostgreSQL",
    POWERSHELL: "PowerShell",
    PROPERTIES: "Properties",
    PROTOBUF: "Protocol Buffers",
    PSEUDOCODE: "Pseudocode",
    PUG: "Pug",
    PYTHON: "Python",
    Q: "Q",
    R: "R",
    REACT: "React",
    RESTRUCTUREDTEXT: "reStructuredText",
    RST: "RST",
    RUBY: "Ruby",
    RUST: "Rust",
    SAS: "SAS",
    SCALA: "Scala",
    SCHEME: "Scheme",
    SCSS: "SCSS",
    SEQUENCE: "Sequence",
    SH: "Shell",
    SHELL: "Shell",
    SMALLTALK: "Smalltalk",
    SOLIDITY: "Solidity",
    SPARQL: "SPARQL",
    SPREADSHEET: "Spreadsheet",
    SQL: "SQL",
    SQLITE: "SQLite",
    SQUIRREL: "Squirrel",
    STATA: "Stata",
    STYLUS: "Stylus",
    SVELTE: "Svelte",
    SWIFT: "Swift",
    SYSTEMVERILOG: "SystemVerilog",
    TCL: "Tcl",
    TEX: "TeX",
    TIDDLYWIKI: "TiddlyWiki",
    TIKIWIKI: "Tiki Wiki",
    TOML: "TOML",
    TS: "TypeScript",
    TSX: "TSX",
    TURTLE: "Turtle",
    TWIG: "Twig",
    TYPESCRIPT: "TypeScript",
    V: "V",
    VB: "VB",
    VBSCRIPT: "VBScript",
    VELOCITY: "Velocity",
    VERILOG: "Verilog",
    VHDL: "VHDL",
    VISUALBASIC: "Visual Basic",
    VUE: "Vue",
    WEBIDL: "Web IDL",
    WIKI: "Wiki",
    XAML: "XAML",
    XML: "XML",
    XMLDTD: "XML DTD",
    XQUERY: "XQuery",
    YACAS: "Yacas",
    YAML: "YAML",
    YARA: "YARA",
  };

  if (!config.ENABLE) {
    return;
  }

  const addCopyElement = (target, language) => {
    const codeEnhanced = document.createElement("div");
    codeEnhanced.classList.add("code-enhanced");

    // 复制按钮
    const copyButton = document.createElement("div");
    copyButton.classList.add("typora-copy-code");
    copyButton.innerHTML = "Copy";
    codeEnhanced.appendChild(copyButton);

    // 代码块编程语言
    const codeLangTag = document.createElement("div");
    codeLangTag.classList.add("code-lang-tag");
    codeLangTag.innerHTML = getCodeLangFullName(language);
    codeEnhanced.appendChild(codeLangTag);

    target.appendChild(codeEnhanced);
  };

  const getCodeLangFullName = (language) => {
    const lang = language.toUpperCase();
    return codeLang[lang] || language;
  };

  const decorator = (original, after) => {
    return function () {
      const result = original.apply(this, arguments);
      after.call(this, result, ...arguments);
      return result;
    };
  };

  const after = (result, ...args) => {
    const cid = args[0];
    if (cid) {
      const ele = document.querySelector(`pre.md-fences[cid=${cid}]`);
      const language = ele.getAttribute("lang");
      const codeEnhanced = ele.querySelector(".code-enhanced");
      if (!codeEnhanced) {
        addCopyElement(ele, language);
      }
    }
  };

  const _timer = setInterval(() => {
    if (File?.editor?.fences?.addCodeBlock) {
      clearInterval(_timer);
      File.editor.fences.addCodeBlock = decorator(
        File.editor.fences.addCodeBlock,
        after
      );
    }
  }, config.LOOP_DETECT_INTERVAL);

  const badChars = [
    "%E2%80%8B", // ZERO WIDTH SPACE \u200b
    "%C2%A0", // NO-BREAK SPACE \u00A0
    "%0A" // NO-BREAK SPACE \u0A
  ];
  const replaceChars = ["", "%20", ""];

  let lastClickTime = 0;
  document.getElementById("write").addEventListener("click", (ev) => {
    const button = ev.target.closest(".typora-copy-code");
    if (!button) {
      return;
    }

    ev.preventDefault();
    ev.stopPropagation();

    if (ev.timeStamp - lastClickTime < config.CLICK_CHECK_INTERVAL) {
      return;
    }

    lastClickTime = ev.timeStamp;
    const lines = button
      .closest("pre.md-fences")
      .querySelectorAll(".CodeMirror-code .CodeMirror-line");
    if (!lines) {
      return;
    }
    const contentList = [];
    lines.forEach((line) => {
      let encodeText = encodeURI(line.textContent);
      for (let i = 0; i < badChars.length; i++) {
        if (encodeText.indexOf(badChars[i]) !== -1) {
          encodeText = encodeText.replace(
            new RegExp(badChars[i], "g"),
            replaceChars[i]
          );
        }
      }
      encodeText = decodeURI(encodeText);
      contentList.push(encodeText);
    });

    const result = contentList.join("\n");
    navigator.clipboard.writeText(result);

    button.classList.toggle("copied");
    setTimeout(() => {
      button.classList.toggle("copied");
    }, 2000);
  });

  if (config.DEBUG) {
    JSBridge.invoke("window.toggleDevTools");
  }
  console.log("copy_code.js has been injected");
})();

直接覆盖原有的 copy_code.js。
CSS 代码如下：
/* 代码块增强 ———— 复制、编程语言 */
#write .md-fences .code-enhanced {
  position: absolute;
  top     : .1em;
  right   : .5em;
  z-index : 10 !important;
  cursor  : pointer;
  color   : transparent;
  display : flex;
}

#write .md-fences .code-enhanced .typora-copy-code {
  position: relative;
}

#write .md-fences .code-enhanced .typora-copy-code::after,
#write .md-fences .code-enhanced .typora-copy-code.copied::after {
  font-family: "iconfont";
  color      : var(--code-block-right-program-lang-text-color);
  position   : absolute;
  font-size  : 13px;
  right      : 0;
  top        : 0;
  opacity    : 0.6;
}

#write .md-fences .code-enhanced .typora-copy-code::after {
  content: "\e62b";
}

#write .md-fences .code-enhanced .typora-copy-code.copied::after {
  content    : "\e666";
  font-weight: bold;
}

.code-lang-tag {
  color      : #aaa;
  margin-left: 5px;
  font-size  : 15px;
}

CSS 代码放在当前使用主题的 CSS 文件里。
注意：CSS 代码使用了 iconfont 的图标字，。需要自行调整。直接复制无法显示复制按钮。
目前存在一个问题：在代码块语言输入框更改编程语言，右上角无法及时显示当前代码块编程语言，必须关闭窗口，再次打开，才行。

authors: QHQIII jinghu-moon lion-no-back obgnail


text:
implement notion of 'public_api' for importable paths

Related to https://github.com/obi1kenobi/cargo-semver-checks/issues/120
Adds new properties to ImportablePath to probe whether an API is "public", which is currently implemented as:

Has an importable path
Which may be deprecated
If not deprecated, it must not be hidden

This was done together in collaboration with @obi1kenobi (thanks, was fun pairing!); one or both of us may pick this up again in the future time permitting. Mostly complete barring the TODOs in edges.rs and indexed_crate.rs, plus test output will change once those are corrected.

Summary of changes:

Rebased to point to rustdoc-v27 since that's currently the main branch of trustfall-rustdoc-adapter. My automation always backports from the latest version's branch to older versions.
Propagated #[doc(hidden)] and deprecation info through the visibility tracking and indexing code. This resolves a few of the previously-outstanding TODOs marked in the code.
Made the ImportablePath vertex variant hold an Rc for cheaper vertex cloning. This parallels the existing vertex variants' implementations.
Added doc_hidden, deprecated, and public_api_eligible properties to the Item type. The first two have obvious implementations, the last one is similar to the one for ImportablePath but includes a visibility check (pub or default visibility, like enum variants) as well. This is necessary to properly handle cases like:

pub struct Example {
    #[doc(hidden)]
    pub not_actually_public_api: i64,
}

That case requires this new public_api_eligible field because struct fields are not importable themselves (one can't use Example::not_actually_public_api) which means they don't have access to a public_api property via ImportablePath. The way I intend to implement the check here is by saying "the contained field is eligible to be public API, and since its parent struct is public API, the field itself is public API as well."

source: gharchive/pull-request

license_type: permissive

license_source: github-api


text:
Open source?

Is this project available under an open-source license? In particular, I would be interested if I am allowed to use (and modify) parts of the code in my own project.
(More information about licensing on GitHub is available here: https://help.github.com/articles/licensing-a-repository/)

@andreas-abel Yes, and yes you may. Frankly I'm not a big lover of licenses, but now that people ask I'll license it MIT.
My only real red line is that I don't like it when anyone "blames" themselves for something they've not done (like claiming they've written code they've not written), or "blame" someone for their own actions (like the code being buggy when it explicitly comes without warranty, only a hope it might be useful).

source: gharchive/issue

authors: andreas-abel obilaniu

repo: obilaniu/libpfc

license: MIT


text:
text.is-alpha

Let's add a method that returns TRUE if all chars are letters.

@MikhailLipanin Please, help us here

@yegor256, you mean this one? Or need something else

@MikhailLipanin just is-alpha (only letters) would be great to have, in addition to is-alphabetic (letters and numbers)

authors: Graur MikhailLipanin yegor256

repo: objectionary/eo-strings


text:
test: unit xmir test for extension transformation

Add unit test for 1-3-extension.xsl transformation. Closes #51

Codecov Report

Merging #58 (338d266) into master (d3260f6) will decrease coverage by 0.55%.
The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@             Coverage Diff              @@
##             master      #58      +/-   ##
============================================
- Coverage     88.63%   88.09%   -0.55%
+ Complexity        9        8       -1
============================================
  Files             2        2
  Lines            44       42       -2
  Branches          3        3
============================================
- Hits             39       37       -2
  Misses            5        5

Impacted Files
Coverage Δ

src/main/java/org/eolang/speco/Speco.java
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@yegor256 I rewrote this test to xax, PR is ready for review

@volodya-lombrozo pls help us review this one

@yegor256 Looks good to me, can you merge that changes, please?

@rultor merge

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 10min)

@yegor256 @volodya-lombrozo Thanks!

authors: advasileva codecov-commenter rultor volodya-lombrozo yegor256

repo: objectionary/speco


text:
ntr: Add Axl+ DC (human)

Insert term for  Axl+ DC (human) with 3 refs.
I wasn`t sure how to add a taxon constraint, so that was not added yet.
Closes #764 .
I understand that there are other immune system projects going on, so if it does not fit the big picture it is totally ok.

@lubianat will recreate on correct file and make another pull request

@lubianat will recreate on correct file and make another pull request

authors: dosumis lubianat

repo: obophenotype/cell-ontology


text:
dentinoenamel junction

abnormal dentinoenamel junction morphology
DEF: any structural anomaly of the interface that joins two distinct calcified tissues, enamel and dentin; it presents a scalloped contour, with its concave side toward the enamel and the convex side toward the dentin, thought to increase adherence of the enamel to the dentin, especially in areas of occlusal stress; DEJ plays a key role in resisting crack propagation from enamel to dentin
SYN: abnormal dentino-enamel junction morphology
SYN: abnormal DEJ morphology
SYN: abnormal dentin-enamel junction morphology
SYN: abnormal amelodentinal junction morphology
SYN: abnormal amelo-dentinal junction morphology
SOURCES:
https://books.google.com/books?isbn=1118938313
https://en.wikipedia.org/wiki/Dentinoenamel_junction

Added abnormal dentinoenamel junction morphology MP:0030511


text:
python alternative to recess

needed python tooling for compiling less to css

https://github.com/lesscpy/lesscpy

repo: obriencj/pelican-inelegant


text:
Safari broken?

Apologies if this is the wrong place for this, but it looks like beta.observablehq.com doesn't work in Safari. The inspector is giving me:
	(anonymous function) (bundle.d0adf45c7b07756dac2a22ca525cb39bcbe69b2c9a70ea0d4bcb089f960e4a79.js:2)```

The right place for this is https://talk.observablehq.com/
That said, what version of Safari are you using? It works fine for me on macOS, Safari Version 11.1.2 (13605.3.8), as well as iOS.

Oh great, thanks-- didn't notice that site before. I tested on an outdated version of Safari, so I guess that's my bad: Version 9.1 (11601.5.17.1).  ;)

authors: mbostock rtxanson

repo: observablehq/notebook-runtime

license: ISC


text:
[minor] Use cross-spawn instead of spawn to resolve windows issues. F…

…ixes #36

LGTM

repo: observing/pre-commit

license: mit

license_source: bigquery


text:
The sample plugin doesn't tree shake this library.

If one compiles their Plugin with this Library, using the esbuild (or old rollup config) from the sample Plugin, all provided methods are included, even the ones that aren't used.
I am not sure if this is an Issue of this Library or the sample Plugin configuration, and while the Library is pretty small it's also not that big of a deal, but it might become one in the Future.

Huh, I guess I assumed that exporting each function individually would solve this.
Does it work if you import only the necessary functions import { func } from 'lib' instead of import * as ocl from 'lib'

The issue is that there's no ESM files in the distribution.  Switching the build from CommonJS to ESM should resolve it.
(Long version: dist/index.js uses everything it imports to set up an export object, so tree shaking isn't practical.  An ESM build of the module would have exports that would be understandable by rollup as being modular and tree-shakeable.)

authors: SkepticMystic phibr0 pjeby


text:
"No tasks found" option for when your filter matches nothing

⚠ Please check that this feature request hasn't been suggested before.

[X] I searched previous Ideas in Discussions didn't find any similar feature requests.
[X] I searched previous Issues didn't find any similar feature requests.
[X] I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them.
[X] I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow.

🔖 Feature description
Essentially allow a flag to return a custom string if no tasks were found per the filters provided
✔ Solution
Maybe a new keyword like "not found message"
❓ Alternatives
No response
📝 Additional Context
No response

Hi, thanks for using Tasks.
What real-world problem is this solving?
Currently if there are no found tasks, the display is:
0 tasks

Which seems pretty clear to me.

I actually disable that because its not the prettiest.
This is my dataview filter
not done
due before today
hide postpone button
hide edit button
hide due date
hide backlink
hide task count

I'd like it to read "No tasks due" instead of "0 tasks"
I know its pretty nitpicky, but I imagine others are as particular as me about this too.

Difficulty

It could read "No tasks due later this week"

It could, but Tasks searches are very flexible, and there are often multiple filters in one query - not to mention filter by function.
So it's not feasible for Tasks to come up with a general interpretation of all queries.

I know its pretty nitpicky, but I imagine others are as particular as me about this too.

It is nitpicky, and it's asking volunteers to spend time writing, testing and documenting something which is purely cosmetic.
Alterative option
There is this existing request, which would allow you write a custom description for your task count.

https://github.com/obsidian-tasks-group/obsidian-tasks/issues/2380

Hi @acrylicus, just to follow up on this.
The fact that two different people have suggested different wording for the 0 tasks is useful info - and confirms that value of making it customisable. And we only need one ticket to track that.
So I'm closing this in favour of #2380. I suggest you subscribe to that and up-vote it - with 👍 .
In the meantime, if you want a count of the number of tasks, you can always use the existing show task count.
And you can search for Styling in the docs to use CSS to change the  appearance of the current task count, if you wish.

authors: acrylicus claremacrae

repo: obsidian-tasks-group/obsidian-tasks


text:
Format time as YYYY-MM-DD HH:MM:SS UTC

This puts time in a human readable format. It just converts unix
timestamp to years / months / days / hours / minutes / seconds.

This is almost exactly what I had in mind.  Looks very good to me.

authors: lpsmith matthewbauer

repo: obsidiansystems/ledger-app-avalanche


text:
Use a better work-around for the dune-site dependency problem for tests

The current work-around breaks opam install --with-test ... as the tests of each plugin depends on all plugins, from other packages (and but we really don't want to add an OPAM dependency on all plugins). So this PR introduces another work-around, inspired by a comment in ocaml/dune#8283: if $ORTAC_ONLY_PLUGIN is set up, load only the plugin of that name. This is using an environment variable rather than a command-line argument because the plugins provide the command-line parsers...

This will break if somebody decides to give a plugin a name which has not ortac as prefix.

Good point! I had assumed that that name was the name of the package, but it is really the name of the plugin. So I rather propose to drop the ortac- prefix in the plugin names. I updated the PR accordingly.

CI failure is unrelated. I'm merging. Thanks!

authors: n-osborne shym

repo: ocaml-gospel/ortac


text:
feat: Add CLI option learn-ocaml build --build-dir=[./learn-ocaml-build]

(…where exercises are precompiled).
Cc @AltGr FYI:

I successfully tested the new CLI option on my machine;
I am currently building the Docker image to test the new entrypoint as well;
Given the patch is relatively straightforward (in particular, rsync did not seem required),
if you don't object now, I plan to merge it as soon as the CI is green and my local Docker tests pass as well,
then prepare the release notes (just reordering the CHANGES items in #572),
and then pass the baton to you! for merging the release-please PR and taking care of the release announcement.

Kind regards.
Description

Kind: enhancement

Motivation:

in current master, the exercises were always precompiled in-place;
this conflicted with the documented workflow (option "ro"):

https://ocaml-sf.org/learn-ocaml/howto-deploy-a-learn-ocaml-instance.html
https://ocaml-sf.org/learn-ocaml/howto-setup-exercise-development-environment.html

this new option makes it possible to copy and precompile exercises apart by default
(using the learn-ocaml binary, or the official Docker image).

Examples:

learn-ocaml build --repo=demo-repository
learn-ocaml build --repo=demo-repository serve
learn-ocaml build --repo=demo-repository serve --replace # or
learn-ocaml build --repo=demo-repository --build-dir=demo-repository # to retrieve the previous behavior.

Checklist

[x] Read the CONTRIBUTING.md guide and:

[x] Use Atomic Commits so each commit gathers a single logical change
[x] Use Conventional Commits regarding commit messages (needed by our release toolchain)

[ ] Add/update tests

[ ] Add/update documentation

[ ] …

Note to maintainers

Read this wiki page.
Make sure the PR has a milestone.
Assign yourself before merging.
[ ] Either do a regular merge:

for PRs containing several commits following conventional-commits,
or for PRs containing 1 commit shared with a later PR (to preserve the SHA1)

[x] Or do a squash-merge:

for PRs containing only 1 commit (not shared with a later PR),
or for PRs containing several commits that need not be kept in the history;
→ Update the commit message header with a conventional-commit type,
→ Add a footer Close #… if a related issue exists.

Hi @AltGr ! Good news, the feature is OK.
However after extensive testing, I noted the following:

externalizing the build-dir in a volume looks unneeded
indeed, if the build-dir is shared, but the container is deleted, the www is deleted as well, and the exercices are rebuilt anyway
ù moreover, adding another volume adds more noise - more work needed regarding docker run -v args

I need to be awak from keyboard for ~2h but I'll push another commit to fix this afternoon (and squash the PR in the end).
Meanwhile, to be on the safe sad, I'll tweak another detail in this PR (if the build-dir is "learn-ocaml-build" or "./learn-ocaml-build", then the learn-ocaml-build/exercises subfolder is "rm -fr" to be sure that there is no obsolete leftover (I know this is a bit aggressive, but let's see this as a poor man's "rsync --delete-delay")

Finally, I notice that the "--replace" feature could be improved regarding Docker side, but this will deserve another PR (after 1.0.0)

repo: ocaml-sf/learn-ocaml


text:
[Bug]: Mysql mode editing function intelligent completion lacks return

ODC version
4.2.0
OB version
mysql 4.1.0
What happened?
Lack of return, only reurns

What did you expect to happen?
Show return, returns
How can we reproduce it (as minimally and precisely as possible)?
New/Edit Function
Anything else we need to know?
No response
Cloud
No response

Fixed In Commit 880e6dea4074dd2a29cb8c9d410bf120001e6bcf
------
xiaokang
Mon Jul 8 14:10:47 2024 +0800

pass

authors: HSunboy runzi389205 tonghan-gsh

repo: oceanbase/odc


text:
Interacting with "Your pool transactions" inside the publish preview triggers some transactions

Describe the bug
During step 4 of data set publishing, in the pool tab, if the user clicks on show in the "Your pool transactions" section two transactions get triggered and after that, most of the times, step 5 fails.
To Reproduce
Steps to reproduce the behavior:

Start publishing a data set
On step 3 set a pool price
On step 4 select the "pool" tab
Click on "show" in the "Your pool transactions" section
After a few seconds 2 transactions get triggered

Screenshots

That section should not be rendered at all in the preview

the Pool tab and the Trade are supposed to be disabled in publish preview but the logic fails somewhere. Disabling those tabs solves the reported issue too as there is no value to look at an empty pool tab.

authors: LucaMilanese90 kremalicious mihaisc

repo: oceanprotocol/market


text:
Investigate elasticsearch library and types

With the incoming version of aquarius we will get full access to es requests/responses. We should investigate if it makes sense to use the es library https://www.npmjs.com/package/@elastic/elasticsearch.
If not we need to check if we can use the types https://www.npmjs.com/package/@types/elasticsearch, or if not we should create some minimal types to use in the market

deprecated by https://github.com/oceanprotocol/market/issues/879


text:
GQLDataFactory - Add GQL retry/resume/save/loading. Queries fail over time.

Motivation

When trying to get sufficient data from subgraph, errors happen.
There are no retries/resuming, so you need to start over. Workflow to generate plots is poor.
File deletion happens easily, improve this (especially important as we have multiple gql queries to make)
Assume there are gql sources with different start dates and that choosing jan-01-2023 as st_ut doesn't break stuff

Continue improving

[x] Right now, do not delete file. Simply append-to-end only.

DoD

[x] Extend from cli-yaml2
[x] Implement schema/validation so the data model is properly handled
[x] Update timestamp logic such that ss/pp (in ms) are resolved against gql and data logic (i.e. timestamp filtering) whose timestamp may be in seconds, or even minutes.
[x] Improve _update() such that file isn't deleted, and for now, will only be appended-to-end.
[x] Implement logic + tests such that all subgraph-predictions data is managed by GQLDataFactory
[x] Point existing stats/plot logic to use GQLDataFactory

Do Next:
Please read the following comments to organize next steps, and tackle the following items:

I think the last point Is "fairly done", without me doing more re-structuring....

[ ]  Point existing stats/plot logic to use GQLDataFactory, remove code from utils, eliminate DRY for subgraph-predictions

Scripts we need to move to data_eng / analytics:
/util/get_predictions_info.py
/util/get_predictoors_info.py
/util/get_traction_info.py
/util/predictoor_stats.py
/util/subgraph_slot.py
/util/subgraph_predictions.py

As an outcome of this we should:

Move all aggregate/summary logic to a /data_eng/data_pipeline/ folder
Move all plot logic to a /analytics/plots/ folder
Move majority of gql_queries, over to data_factory
Update some of these queries such that the results could be cached/lookedup locally... such as with get_all_contract_ids_by_owner where 99% of cases we care about the latest OPF contracts
Rewrite all statistics and analytics to use the data lake and dataframes

I think the last point Is "fairly done", without me doing more re-structuring....

I just created a new epic #447 and moved most of the checklist points into it.
And in the top of the epic, I added another issue I recently created: "Rename/move files & dirs for proper separation among lake, AI models, analytics" #446
What I explicitly did not add: creating sub-directories of lake/ or analytics/. This is premature optimization and adds unnecessary complexity. Shallow with more files in one directory is much easier to work with.

All tasks have been addressed, continuing w/ epic and closing this issue.

authors: idiom-bytes trentmc

repo: oceanprotocol/pdr-backend


text:
OpenZeppelin 2.1.1 imported but not installed in readme

Describe the bug
OpenZeppelin 2.1.1 is imported in Simpletoken.sol
https://github.com/oceanprotocol/vw-cli/blob/d7a723a1476ef3d47f0c5d8da12b362847b8286f/contracts/Simpletoken.sol#L4
This is never installed.
SafeMath.sol 5.0.0^ is also in the contracts folder, so either we use SafeMath.sol in the contracts or we download the entire OpenZeppelin 2.1.1
To Reproduce
Steps to reproduce the behaviour:

Download using the steps in readme
install python prerequisites
brownie install OpenZeppelin 4.0.0
brownie compile
See error

Error

Expected behavior

Thanks for the catch @officialnico ! Fixed. LMK if issues persist.

authors: officialnico trentmc

repo: oceanprotocol/vw-cli


text:
Link to the "rekor transparency log" is broken

README have this link: https://docs.sigstore.dev/rekor/overview/ but this page is "Not found".

Perhaps it was a temporary error.  It seems to work for me.  Can you please
try again?
On Sat, Aug 12, 2023 at 12:59 PM Alexander Artemenko <
@.***> wrote:

README have this link: https://docs.sigstore.dev/rekor/overview/ but this
page is "Not found".
—
Reply to this email directly, view it on GitHub
https://github.com/ocicl/ocicl/issues/17, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAV7CM2XZ6BJTJNOOTRIG3XU6Y6DANCNFSM6AAAAAA3OBPQ2Y
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

I just tried it again, and it is fine.  I'm closing this, but please reopen if you experience this again.

I still see the problem. I click URL https://docs.sigstore.dev/rekor/overview/
Site opens, but says "Page not found":

Probably this link should be changed to https://docs.sigstore.dev/logging/overview/?

Very weird.  That link still works for me... except when I try it in an
incognito window.  So, you are right -- the link is wrong.  I'll fix this!
On Sun, Aug 13, 2023 at 12:34 PM Alexander Artemenko <
@.***> wrote:

I still see the problem. I click URL
https://docs.sigstore.dev/rekor/overview/
Site opens, but says "Page not found":
[image: Screenshot 2023-08-13 at 19 32 52]
https://user-images.githubusercontent.com/24827/260315613-40b42dc7-b3da-44c0-8a93-e2ef71911d5c.png
—
Reply to this email directly, view it on GitHub
https://github.com/ocicl/ocicl/issues/17#issuecomment-1676406708, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAV7CIF7V6O2OD3IA7UIY3XVD6YZANCNFSM6AAAAAA3OBPQ2Y
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

repo: ocicl/ocicl


text:
X11/extensions/XTest.h header not found when building on travis

Expected Behavior
Current Behavior
robotjs does not compile on travis, it fail with this error:
prebuild-install http request GET https://github.com/octalmage/robotjs/releases/download/v0.4.7/robotjs-v0.4.7-node-v59-linux-x64.tar.gz
prebuild-install http 404 https://github.com/octalmage/robotjs/releases/download/v0.4.7/robotjs-v0.4.7-node-v59-linux-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.7.1 runtime=node arch=x64 platform=linux)
make: Entering directory `/home/travis/build/parro-it/electron-localshortcut/node_modules/robotjs/build'
  CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++ [enabled by default]
../src/robotjs.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE keyToggle(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/robotjs.cc:563:34: warning: ‘down’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    toggleKeyCode(key, down, flags);
                                  ^
  CC(target) Release/obj.target/robotjs/src/deadbeef_rand.o
  CC(target) Release/obj.target/robotjs/src/mouse.o
../src/mouse.c:12:35: fatal error: X11/extensions/XTest.h: No such file or directory
  #include <X11/extensions/XTest.h>

Steps to Reproduce (for bugs)
The failing build is https://travis-ci.org/parro-it/electron-localshortcut/builds/348183108
Your Environment

RobotJS version: 0.4.7
Node.js version: v9.7.1
npm version: 5.6.0
Operating System: Ubuntu 14.04.5

Hi there, we build on Travis using this config:
https://github.com/octalmage/robotjs/blob/master/.travis.yml
It seems like you might be missing some packages. There's more on what is required here:
https://github.com/octalmage/robotjs#building
Let me know if that helps!

Thank you, I'll check my deps

Thank you for the suggestion @octalmage, I fixes installed deps and not it compile again!

authors: octalmage parro-it

repo: octalmage/robotjs


text:
How to make screen of visible window on macos?

How to make screen of visible window on macos?
i open ide and run code
but robotjs does not make an ide screen, it makes another screen, the one that is orange not grey with webstorm
How to fix it?
I think it has something to do with work macos

@evoytenkoapps Same root cause as with https://github.com/nut-tree/nut.js/issues/469
You’ll have to give your process screen recording permissions

yea. you a right.
i give permisions for screen recording to webstorm, and now its ok.


text:
Transfer a repository: "team_id" parameter type should be "integer[]"

endpoint scope: Repositories
endpoint name: Transfer a repository
route: POST /repos/:owner/:repo/transfer
documentation URL: https://developer.github.com/v3/repos/#transfer-a-repository

Current specification
https://github.com/octokit/routes/blob/fe0a25467e167c54628c2072884911a50c93269a/routes/repos/transfer-a-repository.json#L1-L34
I expected

"array of integers" should be "integer[]"
{
  "name": "Transfer a repository",
  "enabledForApps": false,
  "method": "POST",
  "path": "/repos/:owner/:repo/transfer",
  "params": [
    {
      "name": "owner",
      "type": "string",
      "required": true,
      "description": ""
    },
    {
      "name": "repo",
      "type": "string",
      "required": true,
      "description": ""
    },
    {
      "name": "new_owner",
      "type": "string",
      "description": "**Required:** The username or organization name the repository will be transferred to.",
      "required": false
    },
    {
      "name": "team_id",
      "type": "integer[]",
      "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.",
      "required": false
    }
  ],
  "description": "A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/).",
  "documentationUrl": "https://developer.github.com/v3/repos/#transfer-a-repository"
}

has failing test at #70

@gr2m Please check my PR.

repo: octokit/routes


text:
The min() function return value in scientific format

For the model
[
{
"request_amount": 1000,
"request_currency": "INR",
"value_date": "2023-09-04"
},
{
"request_amount": 1001,
"request_currency": "INR",
"value_date": "2023-09-04"
}
]
when finding max(),min() and sum() for request_amount field the min() function return minimum value in scientific format.The max() and sum() returning in the correct format.
output log
total amount calculated 2001.0
maximum amount 1001
minimum amount 1E+3
code
new BigDecimal(josson.getNode("request_amount.sum()").asText());
log.debug("maximum amount {}", josson.getString("request_amount.max()"));
log.debug("minimum amount {}", josson.getString("request_amount.min()"));

it is strange that my testing output is 1000 instead of 1E+3.  I've tested with different version of JDK, all output 1000.
How about function getInteger()?
josson.getInteger("request_amount.min()")

I am using jdk17 .The getIntger() will not helpfull because it's an amount field which can hold a large amount value

It may be Jackson ObjectMapper issue.  Please try this statement to setup first:
Mapper.mapper()
        .enable(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)
        .enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN);

BTW, it is bad idea to convert number to String and then back to BigDecimal. Maybe you can use:
BigDecimal result = BigDecimal.valueOf(josson.getDouble("request_amount.sum()"));
BigDecimal max = BigDecimal.valueOf(josson.getDouble("request_amount.max()"));
BigDecimal min = BigDecimal.valueOf(josson.getDouble("request_amount.min()"));

In addition, I think function distinct() is not necessary before you get the first array element. i.e.:
String date = josson.getString("[0].value_date");
String currency = josson.getString("[0].request_currency");

repo: octomix/josson


text:
🛑 ISSA (issa.edificarseguros.com.ar) is down

In 0c37c68, ISSA (issa.edificarseguros.com.ar) (https://issa.edificarseguros.com.ar/api/health) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ISSA (issa.edificarseguros.com.ar) is back up in c2db56a.

repo: octubre-softlab/octubre-upptime


text:
🛑 OSRA (octubre.osperyhra.org.ar) is down

In e8d647a, OSRA (octubre.osperyhra.org.ar) (https://octubre.osperyhra.org.ar/api/health) was down:

HTTP code: 0
Response time: 0 ms

Resolved: OSRA (octubre.osperyhra.org.ar) is back up in f703df1.


text:
Ignore dependencies on sub-packages

opam-dune-lint offers to add a dependency for opam-core to itself:
opam-core.opam: changes needed:
  "opam-core" {>= 2.1.0~beta4}             [from src/core]

This is due to the select stanzas at https://github.com/ocaml/opam/blob/074df6b6d87d4114116ea41311892b342cfad3de/src/core/dune#L6-L11. Dune is correct, just not being strictly helpful!
I've fixed it here by pruning out attempts in Dune_project.merge_dep to depend on the package being analysed (it seemed more appropriate to do that at the source, rather than later in Main.to_opam

Thanks!

repo: ocurrent/opam-dune-lint


text:
Impossible progress bar display during push

When performing a small push, I have noticed an impossible progress bar display.  The full output is included hereunder.
js@karta:~/gdrive/Documents/tech > drive push
Resolving...
- /Documents/tech/conf/dot-emacs~
M /Documents/tech/conf/idea-settings.jar
M /Documents/tech/conf/dot-bashrc
M /Documents/tech/conf/eclipse/workspace-preferences.epf
M /Documents/tech/conf/eclipse/code-formatter-java.xml
M /Documents/tech/conf/eclipse/code-clean-up-java.xml
M /Documents/tech/conf/dot-zshrc
M /Documents/tech/conf/dot-vimrc
M /Documents/tech/conf/dot-python_startup
M /Documents/tech/bin/synclient.sh
Deletion count 1 dest: 6.25KB
Modification count 9 src: 95.93KB dest: 95.93KB
Proceed with the changes? [Y/n]:y
104629 / 98229 [==================================================] 106.52 % 18s

This is a duplicate of issue https://github.com/odeke-em/drive/issues/177.

Thanks for reporting that am gonna take a look at it.

You are correct about #177.  You are also correct in your observation that deletion is what is responsible; I have verified several scenarios to confirm that.
I shall close this, since #177 is still open.

Thank you @js-ojus I'll actually use your example as a test case.

authors: js-ojus odeke-em

repo: odeke-em/drive


text:
Add weak references among related cache items

This PR adds weak refs to related cache items. Currently just parents, which could be merged as is, or we could add to children & app too.
However, with more functionality, we can't really have an apples-to-apples performance comparison. I think no matter what, we'll see a dive in benchmarks, because we are going to be doing more work to add references throughout the cache. Might need people to just try it out and see if there's any noticeable differences?

[x] Add parent refs
[x] Try removing complicated concurrency prioritization and just shoot off naive blocking tasks.
[ ] Add children refs
[ ] Replace traverse benchmark (that just goes up from each child to the root, which is also probably more than we should be doing in one bench!) with a complete in-order traversal. This is possible as of an earlier PR that added children to cache items.
[ ] Make other benchmarks more realistic? Maybe reads_while_writing shouldn't be random access, but should instead be a standard traversal?

There is a troubling initial result with this entire premise, however. While I'd expect most measurements to go downhill, since we are now doing more work up front, the one measurement that should improve is the traverse cache, which just goes up the tree, using the new weak ref if it can. However,
git fetch
cd cache
git checkout origin/samtay/apples-to-apples
cargo bench traverse_cache
git checkout origin/samtay/cache-parent-refs
cargo bench traverse_cache

shows that there is no such improvement, and there is a consistent increase of ~ 30% time to complete the operation. Note that in that bench, all of the extra work to populate references happens outside of the operation being benchmarked. Should we scrap this idea @TTWNO ?

Could you try returning a MutexGuard<_> instead of a CacheItem. Any time a CacheItem is returned, we are doing a full clone. It would be much easier if we could lend out references instead. The standard library's MutexGuard is !Send, so it will not be allowed to be held across an await point. If you need that, clone it then.

Could you try returning a MutexGuard<_> instead of a CacheItem. Any time a CacheItem is returned, we are doing a full clone. It would be much easier if we could lend out references instead. The standard library's MutexGuard is !Send, so it will not be allowed to be held across an await point. If you need that, clone it then.

Well, the trait method has signature Accessible::parent(&self) -> Result<Self, _>, so for a traversal that uses the Accessible methods, we'll need a clone. And on main and in the apples to apples comparison, we are already cloneing to give back a full CacheItem.
So, while we can offer a method that does what you suggest, it doesn't help in the general case.

I'm happy to re-write the traits. These are in atspi, but I know they were half-baked, so they're behind a feature flag, let me see if I can set up a generic return type that can be set by the implementer. This will take some time, so see if you can just bypass this with a custom implementation of ref_parent() in impl Cacheitem { ... } directly.

63489d0 proves that we are missing tons of references that should be there.
I had a hunch that I had figured out the problem: I was thinking there might be duplicate items in the list of cache_items to add, which would make it so that previously inserted items (that might be weak referenced by others) would get overwritten with a new Arc<Mutex<CacheItem>>, thus downgrading any existing weak refs. However, it appears the wcag_items list has no duplicates :thinking: back to the drawing board.

Oh man. I just realized the problem :facepalm:. We're doing the traversal with items from Vec<CacheItem> that are from outside the cache. They never had their references populated! Fix incoming.

Nice catch! The compiler did try telling me this: "CacheItem is not of type Arc<Mutex>".... I Should have known that something was up...
Again, good find. Hopefully the fix makes these benchmarks rip.

Ok now the only cache misses are

item id
parent id

18698
108

18699
16295

This is simply because the cache data that I logged out to wcag_items.json actually has these inconsistencies. That is, each of the items above specified the listed parent IDs, but those parents do not specify 18698 and 18699 in their list of children. In that situation there's not much we can do, and are at the whim of the order of items inserted. But, it was 2 out of 14738 so hopefully this is a rare occurrence not worth worrying about.

Ok so comparing to the samtay/apples-to-apples without refs, we do see an increase in performance in the existing traverse_cache (this is the one dealing with full cloned items): time spent goes from 36ms down to 22ms. Using references over clones drops it down to 5ms. However, every other statistic deals with some writes, and they all go down in performance. Details below.
cache/add_all/zbus-docs time:   [3.6898 ms 3.6970 ms 3.7052 ms]
                        change: [+26.009% +26.367% +26.737%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 9 outliers among 200 measurements (4.50%)
  5 (2.50%) high mild
  4 (2.00%) high severe
cache/add/zbus-docs     time:   [6.2572 ms 6.2674 ms 6.2771 ms]
                        change: [+264.10% +265.62% +267.07%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 16 outliers among 200 measurements (8.00%)
  4 (2.00%) low severe
  12 (6.00%) low mild
cache/traverse_cache/wcag-items
                        time:   [22.410 ms 22.477 ms 22.540 ms]
                        change: [-38.321% -38.126% -37.945%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 38 outliers among 200 measurements (19.00%)
  35 (17.50%) low severe
  1 (0.50%) low mild
  1 (0.50%) high mild
  1 (0.50%) high severe
cache/traverse_cache_refs/wcag-items
                        time:   [5.4315 ms 5.4373 ms 5.4440 ms]
Found 17 outliers among 200 measurements (8.50%)
  10 (5.00%) high mild
  7 (3.50%) high severe
Benchmarking cache/reads_while_writing/10: Warming up for 3.0000 s
Warning: Unable to complete 200 samples in 20.0s. You may wish to increase target time to 32.3s, enable flat sampling, or reduce sample count to 110.
cache/reads_while_writing/10
                        time:   [84.163 µs 140.23 µs 198.75 µs]
                        thrpt:  [50.316 Kelem/s 71.313 Kelem/s 118.82 Kelem/s]
                 change:
                        time:   [+37.272% +89.026% +151.23%] (p = 0.00 < 0.05)
                        thrpt:  [-60.196% -47.097% -27.152%]
                        Performance has regressed.
Found 18 outliers among 200 measurements (9.00%)
  5 (2.50%) high mild
  13 (6.50%) high severe
Benchmarking cache/reads_while_writing/100: Warming up for 3.0000 s
Warning: Unable to complete 200 samples in 20.0s. You may wish to increase target time to 34.6s, enable flat sampling, or reduce sample count to 100.
cache/reads_while_writing/100
                        time:   [110.27 µs 169.00 µs 231.21 µs]
                        thrpt:  [432.51 Kelem/s 591.71 Kelem/s 906.84 Kelem/s]
                 change:
                        time:   [+62.183% +103.54% +155.38%] (p = 0.00 < 0.05)
                        thrpt:  [-60.843% -50.870% -38.341%]
                        Performance has regressed.
Found 17 outliers among 200 measurements (8.50%)
  6 (3.00%) high mild
  11 (5.50%) high severe
Benchmarking cache/reads_while_writing/1000: Warming up for 3.0000 s
Warning: Unable to complete 200 samples in 20.0s. You may wish to increase target time to 37.8s, enable flat sampling, or reduce sample count to 100.
cache/reads_while_writing/1000
                        time:   [412.88 µs 440.99 µs 470.35 µs]
                        thrpt:  [2.1261 Melem/s 2.2676 Melem/s 2.4220 Melem/s]
                 change:
                        time:   [+69.288% +74.938% +80.845%] (p = 0.00 < 0.05)
                        thrpt:  [-44.704% -42.837% -40.929%]
                        Performance has regressed.
Found 10 outliers among 200 measurements (5.00%)
  10 (5.00%) high severe

Is the measurement to traverse the entire cache once, or traversing every item in the cache up to the root object. If it's the latter, I may have been worried about nothing the entire time. It's interesting though, this method decreases performance at about a 30-60% for many benchmarks due to the overhead in adding, but it decreases a net 25% to read times on my Pi4. This will be a worthwhile trade-off since read times are extremely important (especially since we can read and write without a ridiculous penalty.)
If you agree with that, let me know if you'll work on the children/app references or if I should take the reins in this week. I have a few hours this afternoon to work on Odilia so maybe I can get this done this aft.
Thank you again for your dedication and hard work on this project! All your insights have been extremely valuable, and these benchmarks will be used for a long, long time!

   Compiling odilia-common v0.0.1 (/home/tait/odilia/common)
   Compiling odilia-cache v0.1.0 (/home/tait/odilia/cache)
    Finished bench [optimized] target(s) in 10m 05s
     Running unittests src/lib.rs (/home/tait/odilia/target/release/deps/odilia_cache-9e13af71e93335bc)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running benches/load_test.rs (/home/tait/odilia/target/release/deps/load_test-934acb3d4472a887)
Gnuplot not found, using plotters backend
Benchmarking cache/add_all/zbus-docs
Benchmarking cache/add_all/zbus-docs: Warming up for 3.0000 s
Benchmarking cache/add_all/zbus-docs: Collecting 200 samples in estimated 20.216 s (400 iterations)
Benchmarking cache/add_all/zbus-docs: Analyzing
cache/add_all/zbus-docs time:   [41.854 ms 41.963 ms 42.075 ms]
                        change: [+37.603% +37.969% +38.368%] (p = 0.00 < 0.05)
                        Performance has regressed.
Benchmarking cache/add/zbus-docs
Benchmarking cache/add/zbus-docs: Warming up for 3.0000 s
Benchmarking cache/add/zbus-docs: Collecting 200 samples in estimated 26.227 s (600 iterations)
Benchmarking cache/add/zbus-docs: Analyzing
cache/add/zbus-docs     time:   [35.165 ms 35.242 ms 35.319 ms]
                        change: [+18.301% +18.561% +18.819%] (p = 0.00 < 0.05)
                        Performance has regressed.
Benchmarking cache/traverse_cache_refs/wcag-items
Benchmarking cache/traverse_cache_refs/wcag-items: Warming up for 3.0000 s
Benchmarking cache/traverse_cache_refs/wcag-items: Collecting 200 samples in estimated 21.097 s (600 iterations)
Benchmarking cache/traverse_cache_refs/wcag-items: Analyzing
cache/traverse_cache_refs/wcag-items
                        time:   [32.415 ms 32.456 ms 32.498 ms]
Found 6 outliers among 200 measurements (3.00%)
  6 (3.00%) high mild
Benchmarking cache/traverse_cache/wcag-items
Benchmarking cache/traverse_cache/wcag-items: Warming up for 3.0000 s

Warning: Unable to complete 200 samples in 20.0s. You may wish to increase target time to 31.2s, or reduce sample count to 120.
Benchmarking cache/traverse_cache/wcag-items: Collecting 200 samples in estimated 31.208 s (200 iterations)
Benchmarking cache/traverse_cache/wcag-items: Analyzing
cache/traverse_cache/wcag-items
                        time:   [144.94 ms 145.17 ms 145.40 ms]
                        change: [+8.6342% +8.7957% +8.9742%] (p = 0.00 < 0.05)
                        Performance has regressed.
Benchmarking cache/reads_while_writing/10
Benchmarking cache/reads_while_writing/10: Warming up for 3.0000 s
Benchmarking cache/reads_while_writing/10: Collecting 200 samples in estimated 20.842 s (1000 iterations)
Benchmarking cache/reads_while_writing/10: Analyzing
cache/reads_while_writing/10
                        time:   [13.382 ms 13.703 ms 14.020 ms]
                        thrpt:  [713.25  elem/s 729.76  elem/s 747.28  elem/s]
                 change:
                        time:   [+32.322% +38.556% +45.266%] (p = 0.00 < 0.05)
                        thrpt:  [-31.161% -27.827% -24.427%]
                        Performance has regressed.
Benchmarking cache/reads_while_writing/100
Benchmarking cache/reads_while_writing/100: Warming up for 3.0000 s
Benchmarking cache/reads_while_writing/100: Collecting 200 samples in estimated 20.802 s (1000 iterations)
Benchmarking cache/reads_while_writing/100: Analyzing
cache/reads_while_writing/100
                        time:   [13.800 ms 14.113 ms 14.416 ms]
                        thrpt:  [6.9365 Kelem/s 7.0858 Kelem/s 7.2462 Kelem/s]
                 change:
                        time:   [+30.653% +36.558% +43.093%] (p = 0.00 < 0.05)
                        thrpt:  [-30.116% -26.771% -23.461%]
                        Performance has regressed.
Found 1 outliers among 200 measurements (0.50%)
  1 (0.50%) low mild
Benchmarking cache/reads_while_writing/1000
Benchmarking cache/reads_while_writing/1000: Warming up for 3.0000 s
Benchmarking cache/reads_while_writing/1000: Collecting 200 samples in estimated 21.371 s (1000 iterations)
Benchmarking cache/reads_while_writing/1000: Analyzing
cache/reads_while_writing/1000
                        time:   [14.179 ms 14.507 ms 14.828 ms]
                        thrpt:  [67.438 Kelem/s 68.934 Kelem/s 70.528 Kelem/s]
                 change:
                        time:   [+31.563% +37.372% +43.865%] (p = 0.00 < 0.05)
                        thrpt:  [-30.490% -27.205% -23.991%]
                        Performance has regressed.
Found 1 outliers among 200 measurements (0.50%)
  1 (0.50%) low mild

Not sure why the improvement is marginal instead of an order of magnitude or two faster, but that's an issue for future Tait, lol!

No need, I will push up children refs soon! I've just been revising some benchmarks so that we can see the difference it makes. I'm also going to update the current parent traversals to just start from leaves instead of starting at every node (I agree that that's too much for a single measurement).

Just so you know, the latest commit seems to hang on the benchmark `cache/reads_while_writing/10; can't figure out why that is. Perhaps we hand out an dropped reference earlier in the tests.

Just so you know, the latest commit seems to hang on the benchmark `cache/reads_while_writing/10; can't figure out why that is. Perhaps we hand out an dropped reference earlier in the tests.

Yup, pretty sure there's a deadlock, looking into it

Full disclosure, I'm not really getting much signal that we've materially improved things with children references. The measurements seem pretty noisy: git checkout 0a83a1c27076213aafcedb485634c04a7b2d8542 ; cargo bench ; git checkout samtay/cache-parent-refs ; cargo bench.
I'm gonna unmark the draft though and leave it up to you if you want to merge!

Adding children references won't materially improve our existinf benchmarks.
But, one test I'd like to get in eventually is a structural navigation test. Once there is an iteratoe/stream that can walk though the tree the way structural navigation would, we can test for that. This is a more realistic benchmark as to the delay a user will feel when navigating around a webpage, for example.
Anyways, I'll review all the changes and get this merged soon.

You'll see when you review, but I added a structural nav test - just a really basic recursive depth first traversal, not with custom iterators. The command above will show the difference between structural nav before & after children refs.
For sure the laziness of an iterator would be the way to go though, with much less memory usage (otherwise all the children get collected into vecs eagerly). I've gotta write up my project today but I may take a peek at that and see if I can squeeze it into this PR.

You can let me deal with CI if you'd like.

I am very happy with the performance seen with these changes. In particular, on desktop, I can see that cache/traverse_up_refs/wcag-items (1.3ms, 18.6ms) beats cache/traverse_up/wcag-items (17.1ms, 222ms) by just over an order of magnitude on the Pi and desktop respectively. Well done here!
I think the next step is creating a streaming async iterator. I might be able to do this.
Let's get this merged, and we'll add additional functionality from here. Thanks again for your great and mighty contributions! If I'm ever in your city, please allow me to buy you a nice beer (or other beverage of choice)! I truly couldn't do this work alone.
Also, you can ignore the *-gnu tests... they're running out of RAM to compile Odilia, lol!

authors: TTWNO samtay

repo: odilia-app/odilia


text:
Attribute missing from /heroStats

'pro_bans' attribute missing in Crystal Maiden's response object as of today.

That probably means it's 0

Shouldn't the response contain pro_ban with the value as 0? Or should I be checking this for all attributes returned?

I made a fix to the SQL to always return a value (even if 0) for the pro_picks/pro_bans field.
I haven't done the same for the public pick stats, but hopefully those will never be 0.

repo: odota/core


text:
Support for postgres databases

Support for postgres needs to come in 2 parts

Implementation of a JDBC style data connector for use by asset consumers.
Implementation of a polling metadata extractor connector to be hosted in the Data Platform governance server.

There is also some related work to create a generic JDBC connector that the postgres and gaian connector extend (similar pattern to the file-based connectors).

See also #2399 which proposes the idea of using postgres for virtualization

@wbittles - this one is for you ...

The postgres connector has been delivered thanks to @wbittles (see https://github.com/odpi/egeria-database-connectors)
and work has been done to incorporate the connector in container environments thanks to @planetf1.
THe next step is to incorporate it into the labs.

repo: odpi/egeria


text:
🛑 urbamonde.org is down

In bb3e4fb, urbamonde.org (https://www.urbamonde.org) was down:

HTTP code: 429
Response time: 908 ms

Resolved: urbamonde.org is back up in 44dc1fe.

repo: odqo/upptime


text:
History data survey 🙋♂📊

Hi everyone!
Let me know in the comments what kind of data/graphs would you like to see in the "History" section.
You can also send suggestions to ofex.create@gmail.com
If you find a suggestion you like, please give a 👍 to vote for it.

Hey! Here are my suggestions:

Average number of Pomodoros per day
Lifetime number of Pomodoros
Lifetime number of Pomodoros, grouped by day of the week
Lifetime number of Pomodoros, grouped by date (similar to GitHub’s contributions graphic on user profile pages)

In any case, thank you so much for working on this extension. I left a rather lengthy review for your extension on the Chrome Web Store a month ago with a number of feature suggestions, and I’ve been taken aback at the sheer speed at which you’ve been implementing them. I mean, I think the recent changes have pretty much covered the whole list. Just wow.
So, with that in mind, thanks again, and remember to take care of yourself. :) (I’ve also updated my review from four to five stars.)

Hey, I really like the new update.
Few suggestions.

Weekly stat which shows the number of pomodoros per day.

(Lifetime average stats might not work because I don't use pomodoro everyday)

Monthly stat showing pomodoros for each day.

Something like a calender view.

I really like @yshyonli2 's suggestion of

Lifetime number of Pomodoros, grouped by date (similar to GitHub’s contributions graphic on user profile pages)

Would be really cool to see something like github profile page.

I'm not sure if there are limitations on how back you can go back in history with the current api. If these stats are only being stored locally, it would be great if there is way to get a backup of them in csv or something.

Hi @yshyonli2 @RW21 , Thanks for the suggestions :)
The next update has a "GitHub" view for 1 year. Click on Full History to see it!

@ofekmiz
That was quick 😄 . Thanks for the features!
Just a small feedback: I think a bar graph instead of a pie chart is better at representing the total pomodors by week day. Its kind of awkward comparing each day in a circle.

@RW21 Lol, I actually like the pie chart, it shows the total Pomodoros by weekday for All Time, not just this week. It helps to recognize your most productive days even when you are not aware of that.  Above the pie chart, there is also a bar graph with the last 7 days stats, and you can move forward or backward on the timeline.

repo: ofekmiz/Habitica-Pomodoro-SiteKeeper


text:
Configuración de Idioma predeterminado

Objetivo: establecer del español como Idioma predeterminado y adicionar opción para cambiar al inglés.
Descripción: ajustar el sistema para que el español sea el idioma por defecto en todas las interfaces, independientemente del idioma del sistema operativo del ciudadano. También se debe proporcionar una opción para que los ciudadanos puedan seleccionar manualmente otro idioma, como el inglés, a través de un botón.

Fixed on 1.3

repo: ogticrd/cuenta-unica-registry


text:
BEST API to get most viewers?

When generating a API for the script on the twitch website which 'Application Category' should i use for the most viewers per API key?
Choices are:
Game Integration
Website Integration
Application Integration
Browser extension
Broadcast Suite
Chat Bot
Giveaway Tool
Analytics Tool
Other
Cast Your Votes?
OR
Are they all limited to 10 viewers per API Key and i have to run multiple scripts under different API keys?
Please and Thanks.

How can I change API?

@OldmateJoe Did you ever find an answer for this?

I'm closing this issue because the project is currently not maintained and it will unlikely to be resolved.
For more, please read this: https://github.com/ohyou/twitch-viewer/blob/master/README.md#project-state

repo: ohyou/twitch-viewer


text:
osc52.copy_visual is copying one more character than selected

I just tried nvim + osc52 plugin in patched konsole with OSC52 support (Linux, KDE Plasma) and there a problem with visual selection function.
Basically, when selecting some piece of text, the plugin copies that plus an additional character after that. And if that selection runs intil the end of the line for example, that will include \n.
It even reports N+1 characters copied when I selected only N (just checked).
Here is my configuration for it:
" OSC-52 clipboard handling
lua <<EOF
osc52 = require('osc52')

osc52 .setup {
  silent = false
}

vim.keymap.set('x', '<C-c>', osc52.copy_visual)
EOF

The way I'm using it - in visual mode select something, then press Ctrl+C. It copes things, but as above, there is that length problem.

Btw, I just tested vim-oscyank and it doesn't have that issue!
The way I mapped it there:
xnoremap <C-c> :OSCYank<CR>

On my side it works as expected with your settings. Can you try with set selection=inclusive and see if it works?

With inclusive it actually works correctly.
So I think what happens, with exclusives it ignores the selection length and copies from the beginning of the selection to the current position of the cursor including it, even though the latter isn't selected (becasue of exclusive setting).

I see the code doing this:
  -- Retrieve text
  vim.go.clipboard = ''
  vim.go.selection = 'inclusive'
  local command = fmt('keepjumps normal! %s', commands[mode][type])
  vim.cmd(fmt('silent execute "%s"', command))
  local text = vim.fn.getreg('"')

  -- Restore user settings
  vim.go.clipboard = clipboard
  vim.go.selection = selection

This looks like it ignores where it was selection setting was exclusive and treats everything as inclusive?

Yeah, just confirmed it. Commenting out vim.go.selection = 'inclusive' makes it work correctly for me!
So I think the code should make a distinction whether selection was exclusive or not with some check.

authors: ojroques shmerl


text:
Process empty value in cmus information output

lyvi craches when processing some cmus empty information output, this commit fix the error the same way as https://github.com/ok100/lyvi/pull/22
I think that shell-fm, pinobar and mplayer information output processing should be updated too but I'm not sure as I don't use them

Haven't tried the PR, but lyvi does crash often when using cmus.

authors: duarte-pompeu lejenome

license: WTFPL


text:
3D particles alpha issue

Using latest git HEAD.
When I fix Navmesh Demo (setting diffuse texture in the "antigravity" Particles node), the particles shows inside a black box. It seems to be an alpha problem.

The diffuse texture in question needs to have an alpha channel to work properly.

you can set the "Blend mode" to "add" instead of "'mixed", and you wont have to worry about alpha.

or else, you let to "mixed" and you enable the Fixed Flag "Use Alpha" at the top.

closed in head

authors: Ace-Dragon SuperUserNameMan reduz ricpelo

repo: okamstudio/godot


text:
Control/Anchor-Ratio not working from the inspector

The inspector doesn't allow float input, that way the ratio can only be an integer value. That way setting the ratio only works via script.

Changed in control.cpp the bing from INT to REAL and still only accepting int values.

ratio anchoring does not work very well, it's there mainly for compatibility, but you can put the control where you want in the editor, change to ratio and it will keep that ratio

I can confirm this is still valid in the current master (380fe0bd529990f06df9dd831055fec979246b9c)

Ratio anchoring will go away in 3.0, so it's not going to be changed at this point and left to work as-is.

there are better alternatives for behaviors like this such as containers

@reduz IMO we should either drop the ratio anchoring (or continue supporting it in the engine but hide it in the editor, for compatibility) or fix it. Apparently it just accept int values when ratios should obviously be floats, so maybe just changing that would be enough?

I've had a quick look and it's indeed not so trivial to fix, as the margin/* property is rightfully set to only accept integers (for "Begin", "End" and "Center" anchoring modes). It indeeds does not work so well when selecting "Ratio", but we don't want to hide it either if people do use ratio and worked around the inspector limitations.
So I guess it won't be fixed for 2.0, and for 2.1 we can have a look at a better usability improvement.

@reduz why is ratio going away? any discussion happened for the decision? How do you achieve the same/better behavior using containers?
I myself can't think of a simpler solution than changing a field in the editor. imo this is a very useful feature for positioning UI elements. I think pixel-only placement is not great for multi-resolution/dpi screens nowadays.

This was fixed by #4102.

authors: 29jm Meckie akien-mga azurvii reduz vnen


text:
🛑 Ekşi Sözlük is down

In 84e7dfa, Ekşi Sözlük (https://eksisozluk.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ekşi Sözlük is back up in f00c3dd.

repo: okankocyigit/upptime


text:
Java Support

The current implementation is only usable from Kotlin not Java

@jdappel
it's using higher-order functions in kotlin(FunctionN). After converting to java you can use below code in Java Classes.
    @Override
    public void onCreate() {
        AppStartUpTracer.INSTANCE.start();
        super.onCreate();

        AppStartUpTracer.INSTANCE.stop(this, s -> {
            Log.v("StartUp Logs", s.toString());
            return Unit.INSTANCE;
        });
    }

Note: Class Unit belongs to the standard library org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version. so you must have this library as a dependancy. But you don't need Kotlin Android plugin.

authors: anjalsaneen jdappel


text:
📖 Enclose generics type in markdown documentation with backticks

Self explanatory.
This will resolve , I hope, the issues with the CI for the PRs in the okp4/docs project.

size-limit report 📦

Path
Size

target/wasm32-unknown-unknown/release/cw_template.wasm
178.08 KB (0%)

target/wasm32-unknown-unknown/release/cw_logic_sample.wasm
203.97 KB (0%)

target/wasm32-unknown-unknown/release/cw_storage.wasm
203.31 KB (0%)

Ok. Thanks @bdeneux. Everything should ok now.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

authors: bot-anik ccamel


text:
SSL usage improvements: using RAII for ssl context resource

Added using RAII for working with SSL_CTX and cleaning resources automatically.
Minor code improvements.
It's a good time to think about using EVP_cleanup();. Is it required? (see my comment with https://www.openssl.org/news/changelog.txt link)

Codecov Report

Merging #740 into master will decrease coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #740      +/-   ##
==========================================
- Coverage   67.65%   67.55%   -0.10%
==========================================
  Files          52       53       +1
  Lines        7444     7444
==========================================
- Hits         5036     5029       -7
- Misses       2408     2415       +7

Impacted Files
Coverage Δ

include/pistache/endpoint.h
91.66% <ø> (ø)

include/pistache/listener.h
0.00% <ø> (ø)

include/pistache/ssl_wrappers.h
100.00% <100.00%> (ø)

src/server/endpoint.cc
73.58% <100.00%> (ø)

src/server/listener.cc
67.54% <100.00%> (+<0.01%)
:arrow_up:

src/client/client.cc
77.46% <0.00%> (-1.51%)
:arrow_down:

include/pistache/async.h
88.94% <0.00%> (-0.26%)
:arrow_down:

src/common/reactor.cc
78.57% <0.00%> (+0.79%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e623e35...505c51c. Read the comment docs.

authors: codecov-io hyperxor

repo: oktal/pistache


text:
Air Wales VA liveries

BB_AirWales_VA.zip
It would be great to have this added in the next update for airwalesv.org

Actually we need to make an update to the pack so don't add this one posted yet. Thanks


text:
[ton]bip39助记词sdk和okx浏览器存在差异

助记词：confirm viable multiply today canoe strike refuse job tomorrow orange opinion lunar
sdk生成结果:
addr: UQA9qC8nQwLWddF19n3L9lWt38_bJoYz-88ylcw7qctDjwaT
pk: e9a7d059b100fe5153a27ab6eaf44d057ae2e0ce6ad02da79898305b56deee67
okx钱包:
addr: UQCer0BojkAKWNBTWzD0jn7Ss1uH5TADgQEwxS7c-RiS9VjX

找到问题了，bip39实际用的是m/44'/607'/0', readme上的例子不准确

thanks, updated

repo: okx/js-wallet-sdk


text:
Explore plugin usage in browsers (PoC)

see https://github.com/FiloSottile/typage/issues/16#issuecomment-2242677635

all for it  🙌

authors: olastor tunnckoCore


text:
COX CM Capes

🐛 Bug Report
Could be wrong, but we didn’t see it in the code and testers didn’t know, but it doesn’t look like cm raids gives you the milestone capes

Magna confirmed that CM capes aren't obtainable right now.
Going to piggyback this thread and add that CM capes should be removed from the collection log until they are added. Its silly to have something thats not obtainable in the log!

Buyable in next update.

authors: gc mylife212 osrsolympus

repo: oldschoolgg/oldschoolbot


text:
Give Virtus robes (top/bottom) each a 4%(or less?) boost for Barrage tasks and Inferno

🚀 Feature Proposal
title. In game, Virtus robes increase the damage of Ancient spells by 4% per piece, so having it give this boost for Barrage tasks just makes sense. Virtus mask should not be included imo, as you use slayer helm when barraging.
An 8% boost might be too much in terms of balancing though, so maybe 2-3% works better.

Virtus now gives 2% boost for each item worn when barraging anything under /k. I don't believe inferno got a boost. If thats something you still want to suggest just open a new thread with that suggestion.


text:
Resize Columns Automatically in LazyTable

Hello,
I'm using LazyTable for displaying value + unit data. However, I've run into a problem of data not fully displayed:

Variable Unit Length: Depending on the language, the unit text can sometimes be longer, causing misalignment in the cells.
Dealing with Large Values: When the values are large, they don't fit well within the standard cell width, getting cut off.

Is there a way to make the column width adjust automatically based on the content? This would help ensure that both longer unit texts and larger values are presented correctly.
Thanks a lot for your work on this library!

That could be tricky, because items are lazy loaded, and when they are out-of-viewport they are not rendered and not measured.

I understand, that iIdeally when there is some value that would expand the column width you would like to have this layout:

However you will need to render every item in the layout to measure the largest one and adjust the cell size, which defeats the purpose of the lazy layout 🤷♂
What you can do, is to pre-measure the expected content and set cell size based on your measurements. I played around with this idea in one of the ProgramGuide examples.
Similarly you could try to pre-calculate the needed width / height and set to your lazy table to match your data.
https://github.com/oleksandrbalan/lazytable/assets/20944869/004db7c9-5355-4ee7-a46b-f0ece97a9b31

Thanks for the example, it is working as expected! thanks for your help!

authors: ikerfah oleksandrbalan

repo: oleksandrbalan/lazytable


text:
Group consumer question

Hi,
Im playing around with this lib but im not sure how the group consumers are supposed to work. Is it just to group a few partitions based on the selected  strategy?
How can I round robin one producer over multiple consumers? Must I increment the partition after every message on the producer side?
Thank you!
Regards,
Riaan

It depends on the application needs. One application may require that messages with specific criteria (such as message.key) always go to specific partition. Another application may just use random or round-robin partition assignment in producer.
Same applies to the consumers. All consumers in a single group will split topic partitions between them according to partition assignment strategy. Again, one application may require that a consumer running on serverXX always processes messages from specific partition(s) cooperating with the producer. Another application just wants to split the load (bandwidth of messages).
This is actually not the feature of the no-kafka library, it is a feature of the Kafka itself. You should probably look for use cases and documentation on Kafka website:  https://kafka.apache.org/documentation.html

thank you @oleksiyk its a bit clearer now. I will check out the docs.

For a simple round-robin you can increment the partition number.
Or use Math.rand() for random.
Or calculate the crc of message contents or message key and then return crc % partitions.length

repo: oleksiyk/kafka


text:
[Bug]: #viewport content is one line of

Your minimal.lua config

### Error messages

Log output

### Health check output

Describe the bug
vim.fn.line is 1-based while nvim_buf_get_lines is zero-based.
Reproduce the bug
No response
Final checks

[X] I have made sure this issue exists in the latest version of the plugin
[X] I have tested with the minimal.lua file from above and have shared this
[X] I have shared the contents of the log file

I can't reproduce this. It's working for me.

authors: GordianDziwis olimorris


text:
feat(extras): Add Ghostty theme

Adds support for Ghostty terminal.
Since Ghostty uses text-based configuration files with no extension, I also added support for this in lua/onedarkpro/extra/init.lua with usage denoted by ft="".

Wow this was fast!!! Awesome job and thanks for the PR

authors: Shraymonks olimorris


text:
Fisheye FOV | Motor torque mode | Hook design

Will there be an option to use the fisheye lens on the camera (1.8 mm)? If yes, what is the FOV of the fisheye lens camera setup? How reliable are the rectified images according to your previous testing?

What function does the ROS service '/setTorqueEnable' provide? Does it enable us to view the torque applied by the motor at that instant or does it give command to the motor to apply the specified torque?

If we design a custom hook for the KLT, can we fit those 3d printed hooks to all the 6 KLTs during our run?

Will there be an option to use the fisheye lens on the camera (1.8 mm)? If yes, what is the FOV of the fisheye lens camera setup? How reliable are the rectified images according to your previous testing?

Yes, you can use the fisheye. I will update the different lens specifications in the Rulebook asap.

What function does the ROS service '/setTorqueEnable' provide? Does it enable us to view the torque applied by the motor at that instant or does it give command to the motor to apply the specified torque?

It is only useful for position mode servo motor. It is only an enabler of the torque to the motor. You have to call it first then you can send goal position via the topic. Its like a emergency switch to cut the power.

If we design a custom hook for the KLT, can we fit those 3d printed hooks to all the 6 KLTs during our run?

The idea of the competition is to not touch the KLTs and you can't customize them by installing aditional parts. You can use this idea for the open challenge part only.

Thanks for the clarification! We have some additional questions -

There seems to be conflicting information regarding the AR tag on KLTs.
Section 3.2.8 states -

To facilitate identification and sorting, each KLT is equipped with an April Tag on both its front and back sides. These tags contain unique IDs, enabling the robot to accurately recognize and handle the KLTs according to the competition's requirements.

Section 3.2.8.1 states -
2x April Tags will be installed on each side and on each KLT. In this example for two KLT it will be 16 Tags. The id for all Tags will be same and you can identify the side or front from distance between each April Tag.

Will this L-shaped mount be also provided to us or do we need to arrange for it ourselves?

It is now more clear and is corrected. Thanks.
Yes, i have updated the component list too.

Hey @cxdcxd,

The Maker kit contains 6mm square headed MakerBeam bolts. Do we have more options for bolts for a custom camera mount? More length options would be highly appreciated since 3d printed parts might need some thickness to have enough strength.

You can bring any type of passive parts or screws and change things in a way you like. We will only give you the list we explained and the example base robot. Rest you can change in a way you like.

Are we provided with the supported lens mentioned here?
https://github.com/olive-robotics/bots_bento_icra24/blob/main/docs/rulebook.md#supported-camera-lenses

Yes, we will provide additional lenses so you can switch them out depending on the needs of your application.

authors: Rudresh172 cxdcxd flerovious


text:
connection to elastic was canceled

Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
[ ] elastic.v7 (for Elasticsearch 7.x)
[O] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
connection success to elastic
Please describe the actual behavior
dial tcp: lookup {elasitc lb} on x.x.x.x:port: dial udp x.x.x.x:port: operation was canceled
Actually, I don't know why above issue occur. But above error occur when we using elastic.v6
the result of netstat test (9200 port is elastic's port)
bash-4.4# netstat -n | grep -i 9200 | grep -i time_wait | wc -l
135
bash-4.4# netstat -n | grep -i 9200 | grep -i established | wc -l
2

This is a networking issue. Elastic is using a plain-old HTTP connection with a *http.Client under the hood. Please try to fix the underlying networking issue.

repo: olivere/elastic


text:
React as peer dependency

Thanks for the project, this is a great idea!
Should react be added as a peer dependency to the package.json?

Yeap, we could. We mostly depend on the React hooks.
I believe we support a wide range of React versions

Yeah, looks like the component itself should work on any version of React.
The react-addons-shallow-compare has a peer dependency on react being the same version or higher than the addon package itself.
So...maybe it doesn't make sense to add a specific React peer dependency because it is included by the addon?

So...maybe it doesn't make sense to add a specific React peer dependency because it is included by the addon?

I would rather be explicit with a devDependency. Do you want to submit a PR?

I looked into this a little more, and I think npm handles unresolved peerDependencies of dependencies pretty well. There should be no need to add react as a peerDependency here. Closing.

authors: danielstreit oliviertassinari

repo: oliviertassinari/react-event-listener


text:
How can I specify the context window size using OpenAI compatible API?

I wonder if there's a way to apply context size to https://github.com/ollama/ollama/blob/main/docs/openai.md

Did you find an answer?
I thought I might get luck with max_tokens parameter, but it doesn't seem to do anything according to log.
It doesn't set --num-predict for llama.cpp either.

Hey guys, sorry for the slow response. You should be able to use the max_tokens field to control the context size.

If max_tokens controls the context size, how can we control num_predict with OpenAI API?
Isn't max_tokens on OpenAI API supposed to control how many tokens to generate (num_predict on Ollama, --predict in llama.cpp), not the context size (num_ctx on Ollama, --ctx-size in llama.cpp)?
OpenAI API Docs: "The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length."

My question is the same to @chigkim 's, It seems like ollama openapi server will truncate input length to default n_ctx=2048, no matter request parameter was brought either by max_tokens or num_ctx.

authors: chigkim egoist hellopahe pdevine

repo: ollama/ollama


text:
Integrating Into Desktop App

I'd love to use Ollama for serving LLMs in my company's Mac/Linux/Windows desktop app, but I'm a little confused about some things.
I'd like to integrate it directly rather than requring the user to manually install Ollama because that UX isn't very good IMO. You mention in the Windows docs that this can be done by just utilizing the Windows release zip, but at 3.25 GB that's way too large to bundle with our app. It looks like it's so big because (1) different runners are included to allow Ollama to choose the optimal one, and (2) AMD and NVIDIA GPU libs are included.
I understand including different runners, but I don't understand why GPU libs like cudart, cublas, rocblas, etc. are included - shouldn't these be present on the system if the proper drivers are installed? If it's not possible to remove these, then it would be nice if you could generate separate releases for each runner / gpu libs to somewhat reduce build size.
That being said, thanks for making an awesome product!

The reason we include the client libraries is to ensure the exact same version is used at runtime which we compiled with.  The GPU compiler tools nvcc/hipcc compile optimized binaries that may bake in library version specific assumptions that change over time, so while some drift of library versions might work, it's risky and may lead to crashing.  They do have a forwards/backwards compatibility matrix, but we've opted to keep things simple and always bundle the exact version to ensure success.
If you're setting up your own packaging model and are OK taking on the burden of calculating the compatibility matrix for the GPU libraries, you could omit them but you'll still need some mechanism to ensure the client system has a compatible library somehow.

Ah okay makes sense. Thanks!

authors: brian-pieces dhiltgen