Search broken due to markdown in news

Have you checked that your issue isn't already filed?

[X] I read through FAQ and searched through the past issues, none of which addressed my issue.
[X] Yes, I have checked that this issue isn't already filed.

Bug description
See my details in #2450
How to reproduce the bug
Add markdown link to an inline news article
Error messages and logs
No response
What operating system are you using?
Not applicable (e.g. you're using GitHub Pages or other hosting)
Where are you seeing the problem on?
Running locally with Docker
More info
I think my report in a closed PR was overlooked. Therefore I created this issue.

I believe I fixed this in #2450. Also there isn't a comment from you there.

The following changes introduced in #2450 breaks search on my setup. ctrl-k is completly empty:
https://github.com/alshedivat/al-folio/blob/d004837e607bf14e593f245211b91f13264c4ac1/_includes/scripts/search.liquid#L90-L94
I used a markdown link like Link to [site](https://example.com) in my inline news, which causes this issue.
Instead, if a use HTML  like Link to site the search is working, but the HTML is escaped, which uglifies the search entry.
My suggestion would be to simple stay with the previous code. People can manually add site.title if they want to have a nicer looking title.

I don't know if I get this. I tried the following changes:

And had this as a result:

Both in the search and in the page the text is fine. Are you sure you have the latest updates?

Okay, this error was a bit hard to reproduce. It was not the HTML Link, but a newline in my news.
I had an inline news using two lines.
The Browser's Error console quickly displayed the error.
Uncaught SyntaxError: '' string literal contains an unescaped line break localhost:8080:1171:238

When I removed the second line of my news, search worked again.
Additionally, I'm not very happy with the currenty mardown representation. For example, this news entry:
---
layout: post
date: 2024-06-01 10:00:00-0400
inline: true
related_posts: false
---

This news contains a [Link](https://example.com)

Produces:

I suggest to use strip_html | strip_newlines | escape for all three cases here (not only for the description).
https://github.com/alshedivat/al-folio/blob/afc56cc9877d08506e83c6568fe6ae8f2867d508/_includes/scripts/search.liquid#L90-L97
Also, I do not like the dependance of the inline attribute since this attribute is specific to the news collection.
My suggestion would be to check if page.title exists, and in this case, prefer to use page.title. Otherwise use {%- assign title = item.content | strip_html | strip_newlines | escape -%}. Since page.title is used at multiple places, this approach seems to be more general to me.
What do you think?

Update: On upstream/master, I get a rendered Link. I don't know why, but anyways, i think it should not be rendered. The link is not intended to be clicked, and it is also hard to read.

I agree that it is hard to read, but I am not sure if it should not be clicked. Think about this use case, what should happen if the user search for the news, and it is inline with a link? Should it only be read, or should be possible to click in it? But I don't think we should take the link and expand to the whole line either, because maybe the news has more than one link in it. I'd like to have more opinions on that matter. What do you think @pourmand1376?

Also, I do not like the dependence on the inline attribute since this attribute is specific to the news collection, so I'd remove the inline-check from this code.

Idk, because if for some reason someone forgets to set page.title it would render a possibly very big content inside the search, while if someone set both the page.title and inline the page.title would simply be ignored. I think the error that it generates with inline is "less extreme" than by using the title like you said.

Update: On upstream/master, I get a rendered Link. I don't know why, but anyways, i think it should not be rendered. The link is not intended to be clicked, and it is also hard to read.

I agree that it is hard to read, but I am not sure if it should not be clicked. Think about this use case, what should happen if the user search for the news, and it is inline with a link? Should it only be read, or should be possible to click in it? But I don't think we should take the link and expand to the whole line either, because maybe the news has more than one link in it. I'd like to have more opinions on that matter. What do you think @pourmand1376?

In my humble opinion, the ideal behavior would be to visit the news page. If it is an inline news, all other inline news should become invisible through the use of CSS or JavaScript. Similarly, I imagine searching for BibTeX and papers.

Also, I do not like the dependence on the inline attribute since this attribute is specific to the news collection, so I'd remove the inline-check from this code.

Idk, because if for some reason someone forgets to set page.title it would render a possibly very big content inside the search, while if someone set both the page.title and inline the page.title would simply be ignored. I think the error that it generates with inline is "less extreme" than by using the title like you said.

Well, if someone forgets it, would that be a user error? We could also apply something like truncatewords: 50.
If page.title and inline are both set, page.title should take precedence; or at least, this is what I would expect.

Ok I will take a closer look at this.

I suggest to use strip_html | strip_newlines | escape for all three cases here (not only for the description).

I use markdown links in inline news and also changed to these filters to not have HTML source being shown as search entries.

Just tested your suggestion @CheariX, and it won't work. If the title is not defined, it is generated automatically from the filename apparently. For example, for the 1st news it generated Announcement_1 even though the title is not defined in the front matter. So I will keep the inline solution.
I will add the strip_html | strip_newlines | escape to the title, it makes sense. Also I will add truncatewords: 10 for all the titles.


Use K8s-Specific Cluster Autoscaler Versions

Issue #, if available:
Epic: https://github.com/aws/eks-anywhere/issues/3186
Description of changes:
Ties autoscaler to specific helm chart versions for each version of kubernetes.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm
/approve


⚠ Minecraft has degraded performance

In 826c085, Minecraft (https://www.minecraft.net) experienced degraded performance:

HTTP code: 200
Response time: 1146 ms

Resolved: Minecraft performance has improved in b6749ef.


Add coverage monitoring

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@61ae016). Click here to learn what that means.
 Consider uploading reports for the commit cb27621 to get more accurate results

: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
Additional details and impacted files
@@           Coverage Diff           @@
##             main       #2   +/-   ##
=======================================
  Coverage        ?   98.67%
=======================================
  Files           ?        5
  Lines           ?      151
  Branches        ?       27
=======================================
  Hits            ?      149
  Misses          ?        2
  Partials        ?        0

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Support Nodejs v7.0.0

npm install better-sqlite3 fails with:
In file included from ../src/objects/statement/statement.cc:20:0:
../src/objects/statement/util.cc: In member function ‘virtual v8::Local<v8::Object> Statement::GetBindMap()’:
../src/objects/statement/util.cc:11:48: error: ‘class v8::Object’ has no member named ‘GetHiddenValue’
   return v8::Local<v8::Object>::Cast(handle()->GetHiddenValue(Nan::EmptyString()));
                                                ^
../src/objects/statement/util.cc:23:13: error: ‘class v8::Object’ has no member named ‘SetHiddenValue’
   handle()->SetHiddenValue(Nan::EmptyString(), namedParams);
             ^

OS: Debian 8.6 (jessie)
node: v7.0.0
npm: 3.10.8

This should be coming soon. We have to wait for nodejs/nan to merge their pull request https://github.com/nodejs/nan/pull/599.

Sorry,  I accidentally closed issue/

@JoshuaWise nodejs/nan#630 are merged!

@horpto there seems to be some problems with the Nan::Private implementations. I figured out a fix, and created a pull request: https://github.com/nodejs/nan/pull/634
So now we just have to wait for that to be merged :P

Nodejs v7.0.0 is now supported via better-sqlite3 v1.4.0 👍


some problems in the analysis of multi-component hydrogen bonds

Hello, I encountered some problems in the analysis of multi-component hydrogen bonds, which was done in full accordance with the official tutorial, but the calculation of each coformer failed, and the final output list was empty without output report. The specific error is as follows:
acetophenone_oxime
(FunctionalGroup(hydroxyimino_2), FunctionalGroup(ar_al_ether_1), FunctionalGroup(sulfinyl_1), FunctionalGroup(imidazole_1), FunctionalGroup(ar_N_2))
1689 structures
hydroxyimino_2:   501 (good number)
ar_al_ether_1:   501 (good number)
sulfinyl_1:   246 (maybe sufficient)
imidazole_1:   501 (good number)
ar_N_2:   501 (good number)
OH1(atom 0 of hydroxyimino_2) 830 859
NH1(atom 3 of imidazole_1) 642 584
N(atom 1 of hydroxyimino_2) 414 377
OH1(atom 0 of hydroxyimino_2) 177 542
O(atom 0 of ar_al_ether_1) 95 439
O(atom 0 of sulfinyl_1) 225 32
N(atom 0 of imidazole_1) 447 369
N(atom 1 of ar_N_2) 378 262
Propensity calculation failure for acetophenone_oxime!
Traceback (most recent call last):
File "multi_component_hydrogen_bond_propensity_report.py", line 406, in
main(args.input_structure, args.directory, args.coformer_library, refcode)
File "multi_component_hydrogen_bond_propensity_report.py", line 360, in main
chart_file = make_mc_chart(mc_hbp_screen, directory, api_molecule)
File "multi_component_hydrogen_bond_propensity_report.py", line 92, in make_mc_chart
ymin = min(results)
ValueError: min() arg is an empty sequence
┭┮﹏┭┮ please help me

[sad]   Pablo Martinez-Bulit reacted to your message:

From: Alex Moldovan @.>
Sent: Wednesday, October 18, 2023 10:29:50 AM
To: ccdc-opensource/csd-python-api-scripts @.>
Cc: Pablo Martinez-Bulit @.>; Assign @.>
Subject: Re: [ccdc-opensource/csd-python-api-scripts] some problems in the analysis of multi-component hydrogen bonds (Issue #47)
Caution: External email - take extra care before opening links or attachments.
Assigned #47https://github.com/ccdc-opensource/csd-python-api-scripts/issues/47 to @pmbulithttps://github.com/pmbulit.
—
Reply to this email directly, view it on GitHubhttps://github.com/ccdc-opensource/csd-python-api-scripts/issues/47#event-10690916332, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOGPP6HGKKHDJOBDK4UPRL3X76VR5AVCNFSM6AAAAAA6FE73SWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQGY4TAOJRGYZTGMQ.
You are receiving this because you were assigned.Message ID: @.***>
I appreciate that your working hours may be different to mine, please feel free to respond during your normal working hours.
[CCDC] https://www.ccdc.cam.ac.uk
[LinkedIn]https://www.linkedin.com/company/2683138?trk=cws-btn-overview-0-0   [Twitter] https://twitter.com/ccdc_cambridge          [Facebook] https://www.facebook.com/ccdc.cambridge    [YouTube] https://www.youtube.com/user/CCDCCambridge
Pablo Martinez-Bulit
Research and Applications Scientist
@.***
[Core Trust Seal] [Mindful Employer]
LEGAL NOTICE
Unless expressly stated otherwise, information contained in this message is confidential. If this message is not intended for you, please inform @.*** and delete the message. The Cambridge Crystallographic Data Centre is a company Limited by Guarantee and a Registered Charity. Registered in England No. 2155347 Registered Charity No. 800579

Hi @AHeLaterr,
Could you send the mol2 file of the API you are using to run MCHBP to<EMAIL_ADDRESS>so we can have a look at it?
Thanks!

Hi, I think we can try and solve this problem. I already reported to the CCDC team that the R installation in the new version is broken. I will probably try and modify the multi component hydrogen bond propensity to avoid a generic try-catch statement that difficult the solving of errors. What did I do to solve this problem: I downloaded R from my distro repository and copied the binaries to the API conda environment. ~/anaconda3/envs/ccdc/lib/python3.9/site-packages/ccdc/resources/rstatistics. Just delete everything and replace with your R directory. Obs.: Remember to fix broken symlinks and just use binaries instead of symlinks to binaries.

One suggestion that would help everyone very much was if the API got an GitHub for issues. I am not asking for it to be open sourced, just to have an issue page in GitHub like the Obsidian team has.

Hi @Luke2Sky. I think the issue you are describing with R was fixed for 2023.2, are you on the latest version?
And thank you for the suggestion, will pass it along and we'll see if it is feasible to implement

@pmbulit I realized I made a mistake. The problem is in the API. I used the condo channel to install the API in a new computer after 2023.2. Unless the API itself was updated the problem is still there in Linux. I will verify later if there is a new version of the API in the conda channel.

Hi @Luke2Sky. Thanks for the additional information. We've followed up on your support case by email. I am going to close the issue now but please keep using these for script-specific problems you encounter.


spec: add os/linux/apparmor-profile isolator

AppArmor is a very widely used isolator in the GNU/Linux community,
providing an "easier to configure" alternative to SELinux. From the
perspective of AppC this is a fairly simple addition (profile data is
not included in the spec and must already be loaded into the kernel).
This feature is required for feature parity for ACI containers with OCI
ones (as AppArmor is also supported as a first-class citizen in OCI).
/cc @flavio @vrothberg
Signed-off-by: Aleksa Sarai<EMAIL_ADDRESS>

Changeset looks fine - but curious on the motivation/appropriateness given appc is not really being developed any more. I guess this is for https://github.com/rkt/rkt/issues/865 ? Do you know of an extant use case?

The "higher level" plan is that I'd like to have (at least some) feature parity from the ACI side so that implementing an OCI stage1 can be done by just mapping the ACI bits to OCI. AppArmor support is one of the only things that are quite important that are missing (for us at least -- though the seccomp profile scheme in ACI isn't quite as full-featured as the support in OCI which makes parity not as nice as it could be). There already is a patchset that adds AppArmor support to rkt in rkt/rkt#3765, but it's done in a way that wouldn't help other stage1 implementations use it.

Thanks for the context. Given that this LGTM. Obviously projects will need to update to make any use of this.


Added value_counts method to Dataset API

added value_counts, changed dataset tests to allow for individual testing from cmd line

value_counts is basically an aggregation

Here is a link to the ticket https://linear.app/relevance/issue/PRO-930/value-counts

with bins = 4

with no args

with bins = 5`

not sure why mypy is failing?

Great PR. Just needs documentation


CI VMSS updates

Updates to un-break our CI

remove PYTHON_VERSION - it wasn't being transferred from $(python.version) and a hard coded /usr/bin/python was causing us to use the system Python 2 in CI sometimes.  Doing this does break our ability to test against multiple python versions but we haven't used that since az dropped support for Python 2, and we want to get rid of the Python testing in this repo anyway.
run make az in e2e - essential to ensure we use the doctored extension to call localhost, not PROD
move https://github.com/Azure/azure-cli/issues/1499 workaround to job, not in VM.  We possibly need to find a way for the agent to always rm -rf ~/.azure - need to think about this.
don't run agent and jobs as root
bump Go version as we're in here - only to 1.14 because 1.15 has some breaking changes around X.509 certs. Separate VSTS open to deal with that.

@mjudeikis please review this in retrospect - I'm going to merge this as both unit tests have run twice on the same VM successfully


ExtMessage exceeds from window

Long ExtMessage exceeds from the window and some characters are hidden so can't be read. Line breaking position seems wrong.
Seems Hi-DPI setting is not a factor(reproduced even if pixel-by-pixel scale).
goneovim Nightly gb131248 Windows
settings.toml:
[Editor]
ExtCmdline   = true
ExtPopupmenu = true
ExtTabline   = true
ExtMessages  = true
CachedDrawing = false
DisableLigatures = true
DrawWindowSeparator = true
DrawBorderForFloatWindow = true
[ScrollBar]
Visible = true
[MiniMap]
Disable = true

guifont:
set guifont=Source\ Code\ Pro\ Regular:h11

Thank you :bow:

Related to pum icons being cut off?


Implemented the delete functionality

Allows the users to delete streams

Nice one man. The api is almost complete now.

Nice one man. The api is almost complete now.

Ya, there is another branch which implements the add functionality. However, having problem with unit tests. Then its done.

Good work @yuvigrg.


UI issue | Graph overlapping with the count and title.

The graph is overlapping with the count, title and date when the base of the graph is negative, no issues when the base of the graph is zero.
For reproducing the issue, select 'DELHI'.
solution
It would be better for graphs with negative base, the title count can be shown at the bottom.

Duplicate #1650


Add a CI that makes the builds and delivers the binaries automatically

Is your feature request related to a problem? Please describe.
We need to build a pipeline that makes the executables and adds them to a just created release
Describe the solution you'd like
Adding a CI that makes use of a Github Action that does automatic builds (e.g. https://github.com/marketplace/actions/electron-builder-action).

Done.


Private albums no longer downloadable?

Describe the bug
Some albums show a full track listing for an album, but only particular songs have the 'play' button next to them, allowing you to listen to them. So, the songs that you cannot preview or listen to without purchase, are considered 'private'.
bandcamp-dl gives a Track list incomplete, some tracks may be private, download anyway? (yes/no):  prompt, to which you can reply 'yes', but it will still only download those songs which were 'previewable' on the bandcamp site.
To Reproduce
Command to reproduce the behavior:
bandcamp-dl https://goosetheband.bandcamp.com/album/ted-tapes-2021
https://goosetheband.bandcamp.com/album/ted-tapes-2021

Expected behavior
I would expect bandcamp-dl to still be able to download the entire album, but it seems the 'private' setting for songs may block this
Desktop (please complete the following information):

OS: Mac
Version Catalina 10.15.7
Python Version 3.6.4

"but it will still only download those songs which were 'previewable' on the bandcamp site."
Expected behavior, the prompt may just be misleading, it does not mean it will download the private tracks but that it will simply continue and download what tracks it can.


Error messages on access to exports/module/require

As per @sebmck's suggestion.

:+1: Would be a better idea to use a var commonVars = ["module", "exports", "require"]; and loop over it instead of duplicating it.

@sebmck Yup, was thinking the same, editing on the fly ;)

@thejameskyle @sebmck done.


Use PyPI Extras to reduce dependencies in server-based use

CodeCarbon version: 1.0
Python version: 3.8

Description
Another feature request 🙂.
When installing CodeCarbon from PyPI, it pulls in Dash, Flask, Plotly, and several other packages that - as far as I know - are only needed for visualizing results, not for tracking and recording them.
Putting these dependencies behind a PyPI 'extra' would reduce the installation load when only using CodeCarbon to output CSV files for later analysis.

I might submit a PR for this if no one else gets to it first. Filing it so the wish is written down, and also if some discussion is helpful on which packages are needed for tracking emissions vs. other features.

Hi
Any update on this issue ?
Mlflow has a very similar architecture and uses an env variable to control the dependencies (link)
We can do something like the following
_is_skinnny = bool(os.environ.get("CODECARBON_SKINNY"))

# Minimal requirements to support EmissionsTracker and OfflineEmissionsTracker
SKINNY_REQUIREMENTS = [
    "APScheduler", "pynvml", "py-cpuinfo"
]

if _is_skinnny:
    DEPENDENCIES = SKINNY_REQUIREMENTS
else:
    DEPENDENCIES = SKINNY_REQUIREMENTS + [
        "dash",
        "dash_bootstrap_components",
        "dataclasses;python_version<'3.7'",
        "fire",
        "pandas",
        "requests",
    ]

I can make a PR if you are OK with this solution ?

The usual way of using extras in Pypi packages is to use the extra_requires like here: https://github.com/mlflow/mlflow/blob/5508e6784afe0442705471bf4c10cd1ca13bafe3/setup.py#L89. It's much more easier to use when installing a package on command-line or in a requirements.txt file.
I think MLFlow used an environment variable to avoid most users having to install mlflow[not-skinny].
In addition, we have a Conda package that needs to be taken care of. It seems that mlflow on Conda has two variants https://github.com/conda-forge/mlflow-feedstock/blob/master/recipe/conda_build_config.yaml which is then used like this https://github.com/conda-forge/mlflow-feedstock/blob/master/recipe/meta.yaml. It seems doable to have both codecarbon and codecarbon-server conda packages.


Option to prevent user of inserting malicious text in the tag

This is possible now :
user.update(tag_list: "one, two, <script>alert('hello')</script>")
user.tag_list
# => ["one", "two", "<script>alert('hello')</script>"]

Is there any option in the parser to clean the HTML code in the tags?

Seems like a good idea to do by default, I'm hard pressed to think of any situation where it makes sense to store tags in the database with html tags.
If it's a concern, definitely use something to strip out the tags at the controller level or even the model level.


args for windows guest when mouse shifting at novnc web mode

My guest os is windows 10 (ltsc) , I observed the mouse shifting (error offset) at novnc web mode
solution (at compose)
environment:
  ARGUMENTS: "-machine usb=on -device usb-tablet"
  ...

with these settings, mouse not shifting, but some lag (at windows, not at ubuntu desktop ).
more info: Host mouse pointer not aligned with guest mouse pointer in Qemu VNC

FINE. I have tried the new version ( 3.14 amd64 & arm64 ) and it works very well.


Is CF_EXPORTER_CF_DEPLOYMENT_NAME still needed?

In PCF PAS v2.5, the ability to set the deployment name has been removed. All deployments are now named- by tile rather than cf (or preferred name.) This causes issues with applications deployed to windows diego cells and the grafana dashboard as the bosh_deployment in the firehose and deployment here will never be equal.
Should CF_EXPORTER_CF_DEPLOYMENT_NAME be made optional and by default just pass back the bosh_deployment value or should it just be removed?

Hi @jgeorge300 sorry for the late response, not sure if really get the problem. Can you might give an example which dashboards are not working and which values will not be equal.


Building a training set of tags for r

Hello lovely maintainers :wave:
We've recently added "tags" to student's solutions. These express the constructs, paradigms and techniques that a solution uses. We are going to be using these tags for lots of things including filtering, pointing a student to alternative approaches, and much more.
In order to do this, we've built out a full AST-based tagger in C#, which has allowed us to do things like detect recursion or bit shifting. We've set things up so other tracks can do the same for their languages, but its a lot of work, and we've determined that actually it may be unnecessary. Instead we think that we can use machine learning to achieve tagging with good enough results. We've fine-tuned a model that can determine the correct tags for C# from the examples with a high success rate. It's also doing reasonably well in an untrained state for other languages. We think that with only a few examples per language, we can potentially get some quite good results, and that we can then refine things further as we go.
I released a new video on the Insiders page that talks through this in more detail.
We're going to be adding a fully-fledged UI in the coming weeks that allow maintainers and mentors to tag solutions and create training sets for the neural networks, but to start with, we're hoping you would be willing to manually tag 20 solutions for this track. In this post we'll add 20 comments, each with a student's solution, and the tags our model has generated. Your mission (should you choose to accept it) is to edit the tags on each issue, removing any incorrect ones, and add any that are missing. In order to build one model that performs well across languages, it's best if you stick as closely as possible to the C# tags as you can. Those are listed here. If you want to add extra tags, that's totally fine, but please don't arbitrarily reword existing tags, even if you don't like what Erik's chosen, as it'll just make it less likely that your language gets the correct tags assigned by the neural network.

To summarise - there are two paths forward for this issue:

You're up for helping: Add a comment saying you're up for helping. Update the tags some time in the next few days. Add a comment when you're done. We'll then add them to our training set and move forward.
You not up for helping: No problem! Just please add a comment letting us know :)

If you tell us you're not able/wanting to help or there's no comment added, we'll automatically crowd-source this in a week or so.
Finally, if you have questions or want to discuss things, it would be best done on the forum, so the knowledge can be shared across all maintainers in all tracks.
Thanks for your help! :blue_heart:

Note: Meta discussion on the forum

Exercise: hello-world
Code
source("/Users/nflsxl/Exercism/r/hello-world/hello-world.R")
library(testthat)

context("hello world")

test_that("no name", {
  expect_equal(hello_world(), "Hello, World!")
})

message("All tests passed for exercise: hello-world")

Tags:
include
library
message
paradigm:imperative
paradigm:functional
paradigm:object-oriented
paradigm:reflective
technique:invoking-functions
uses:hello_world
uses:library(testthat)
uses:testthat

Exercise: hamming
Code
# This is a stub function to take two strings
# and calculate the hamming distance
hamming <- function(strand1, strand2) {

  if(nchar(strand1) == nchar(strand2)) {

    count <- 0
    s1 <- strsplit(strand1, "")[[1]]
    s2 <- strsplit(strand2, "")[[1]]
    for(i in seq(length(s1))){
      if(s1[i] != s2[i]){
        count <- count + 1
      }
    }
    return(count)

  } else {
      return(NULL)
    }
}

Tags:
construct:add
construct:assignment
construct:comment
construct:for-loop
construct:function
construct:if
construct:indexing
construct:int
construct:integral-number
construct:invocation
construct:logical-and
construct:null
construct:nullability
construct:number
construct:parameter
construct:return
construct:string
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:looping

Exercise: hamming
Code
# This is a stub function to take two strings
# and calculate the hamming distance
hamming <- function(strand1, strand2) {
  size <- length(strand1)
  hamm <- 0
  for (i in 0:size) {
    if (strand1[i] != strand2[i]) {
      hamm <- hamm + 1
    }
  }
  return(hamm)
}

Tags:
construct:assignment
construct:comment
construct:for-loop
construct:function
construct:if
construct:indexing
construct:int
construct:integral-number
construct:invocation
construct:length
construct:number
construct:parameter
construct:return
construct:string
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:functional
paradigm:reflective
technique:looping

Exercise: raindrops
Code
raindrops <- function(x = 0) {
  # Check if is integer
  if(is.integer(x)){
    # Extract factors
  x <- as.integer(x)
  div <- seq_len(abs(x))
  factors <- div[x %% div == 0L]
  }
  if (any(factors %in% c(3, 5, 7))) {
    # Substitute numbers for words
    raindrop <- ifelse(factors == 3, "Pling",
                       ifelse(factors == 5, "Plang",
                              ifelse(factors == 7, "Plong", NA)))
    raindrop <- raindrop[!is.na(raindrop)]
    raindrop <- paste(raindrop, collapse = "")

    return(raindrop)
    # if no keyword, return original value
  } else {return(x)}

}

Tags:
construct:assignment
construct:boolean
construct:comment
construct:double
construct:floating-point-number
construct:function
construct:if-else
construct:implicit-conversion
construct:indexing
construct:integer
construct:logical-operator
construct:number
construct:optional-parameter
construct:parameter
construct:return
construct:seq
construct:sequence
construct:vector
paradigm:imperative
paradigm:functional
technique:boolean-logic
technique:higher-order-functions

Exercise: grains
Code
square <- function(n) {
  sqr <- vector("numeric", length = n)
  sqr[1] <- 1
  for(i in seq(2, n)){
    sqr[i] <- sqr[i-1]*2
  }

  sqr[n]

}

total <- function() {
  sqr <- vector("numeric", length = 64)
  sqr[1] <- 1
  for(i in seq(2, 64)){
    sqr[i] <- sqr[i-1]*2
  }
  sum(sqr)

}

Tags:
construct:assignment
construct:for-loop
construct:function
construct:indexing
construct:invocation
construct:lambda
construct:number
construct:parameter
construct:return
construct:subtract
construct:variable
construct:vector
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:looping

Exercise: anagram
Code
anagram <- function(subject, candidates) {

}

Tags:
No tags generated

Exercise: space-age
Code
space_age <- function(seconds, planet) {
	earth_orbit <- 365.25

      orbital_data <- list(mercury = earth_orbit * 0.2408467,
        earth = earth_orbit,
      	venus = earth_orbit *  0.61519726 ,
      	mars = earth_orbit * 8808158 ,
      	jupiter= earth_orbit *  11.862615 ,
   		saturn = earth_orbit * 29.447498 ,
    	uranus = earth_orbit * 84.016846 ,
    	neptune = earth_orbit * 164.79132)

     ans <- seconds/(orbital_data[[planet]]*24*3600)
     return(round(ans,2))
}

Tags:
construct:assignment
construct:divide
construct:double
construct:floating-point-number
construct:function
construct:implicit-conversion
construct:indexing
construct:invocation
construct:list
construct:multiply
construct:named-argument
construct:number
construct:parameter
construct:return
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:functional
paradigm:object-oriented
technique:math

Exercise: sum-of-multiples
Code
sum_of_multiples <- function(factors, limit) {

}

Tags:
No tags generated

Exercise: word-count
Code
word_count <- function(words) {
	as.list(table(strsplit(words, " ")[[1]]))
}

Tags:
construct:function
construct:list
construct:string
construct:table
construct:variable-length-argument-list
construct:visibility-modifiers
paradigm:functional
paradigm:reflective
uses:table

Exercise: phone-number
Code
parse_phone_number <- function(number_string) {
  digits <- as.vector(str_match_all(number_string, "\\d")[[1]])
  n <- length(digits)
  if (n < 10 | n > 11) {
    NULL
  }
  else if (n == 11 && digits[[1]] != 1) { # area code != 1
    NULL
  }
  else {
    area_code <- digits[[n-9]]
    exchange_code <- digits[[n-6]]
    if (area_code < 2 | exchange_code < 2) {
      NULL
    }
    else {
      paste(digits[(n-10+1):n], sep="", collapse="")
    }
  }
}

Tags:
construct:add
construct:assignment
construct:bitwise-or
construct:boolean
construct:comment
construct:function
construct:if
construct:integer
construct:logical-and
construct:logical-or
construct:named-argument
construct:number
construct:parameter
construct:string
construct:subtract
construct:vector
construct:visibility-modifiers
paradigm:imperative
paradigm:functional
technique:bit-manipulation
technique:boolean-logic
technique:looping
uses:stringr

Exercise: isogram
Code
is_isogram <- function(word) {

}

Tags:
No tags generated

Exercise: beer-song
Code
lyrics <- function(first, last) {
  paste(sapply(seq(first, last, by = -1), verse), collapse = "\n")
}

verse <- function(number) {

  if (number > 2) {
    text <- c(paste0(number, " bottles of beer on the wall, ", number, " bottles of beer."),
              paste0("Take one down and pass it around, ", number - 1, " bottles of beer on the wall.\n"))
  } else if (number == 2) {
      text <- c(paste0(number, " bottles of beer on the wall, ", number, " bottles of beer."),
                paste0("Take one down and pass it around, ", number - 1, " bottle of beer on the wall.\n"))
  } else if (number == 1) {
    text <- c(paste0(number, " bottle of beer on the wall, ", number, " bottle of beer."),
              paste0("Take it down and pass it around, no more bottles of beer on the wall.\n"))
  } else {
    text <- c("No more bottles of beer on the wall, no more bottles of beer.",
              "Go to the store and buy some more, 99 bottles of beer on the wall.\n")
  }

  return(paste(text, collapse = "\n"))

}

Tags:
construct:string
construct:assignment
construct:by-convention
construct:c
construct:char
construct:comment
construct:else
construct:for-loop
construct:function
construct:if
construct:implicit-loop
construct:indexing
construct:integer
construct:invocation
construct:lambda
construct:named-argument
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:higher-order-functions
technique:looping

Exercise: perfect-numbers
Code
library(magrittr)

is_perfect <- function(n){

  # catch edge cases
  if (n <= 0)
    stop("Only natural number can be classified here!")
  if (n <= 2)
    return("deficient")

  # find n's factors, incl. 1 but not n (aliquots)
  factor <- function(i)
    if (n %% i == 0)
      i

  # calculate sum and classify n
  lapply(1:(n/2), factor) %>%
    unlist %>%
    sum ->
    sum

  dplyr::case_when(
    sum == n ~ "perfect",
    sum < n ~ "deficient",
    sum > n ~ "abundant"
  )
}

Tags:
construct:assignment
construct:back-tick
construct:comment
construct:divide
construct:double
construct:equals
construct:floating-point-number
construct:function
construct:if
construct:implicit-conversion
construct:integer
construct:integral-number
construct:invocation
construct:lambda
construct:library
construct:method
construct:number
construct:parameter
construct:return
construct:string
construct:subtract
construct:variable
construct:visibility-modifiers
paradigm:functional
paradigm:imperative
paradigm:object-oriented
technique:exceptions
technique:higher-order-functions

Exercise: prime-factors
Code
prime_factors <- function(number) {
  out <- c()
  if(number > 1) {
  for(n in c(2:number)){
    while((number / n) %% 1 == 0) {
      out <- c(out, n)
      number <- number /n}
    if(n == number) {break}
  }
  out
  } else {out}
}

Tags:
construct:assignment
construct:break
construct:divide
construct:double
construct:else
construct:for-loop
construct:function
construct:if
construct:implicit-conversion
construct:invocation
construct:logical-and
construct:number
construct:parameter
construct:return
construct:variable
construct:while-loop
paradigm:imperative
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:looping

Exercise: largest-series-product
Code
largest_series_product <- function(digits, span){

}

Tags:
No tags generated

Exercise: luhn
Code
source("./luhn.R")
library(testthat)

context("luhn")

test_that("single digit strings can not be valid", {
  input <- "1"
  expect_equal(is_valid(input), FALSE)
})

test_that("A single zero is invalid", {
  input <- "0"
  expect_equal(is_valid(input), FALSE)
})

test_that("a simple valid SIN that remains valid if reversed", {
  input <- "059"
  expect_equal(is_valid(input), TRUE)
})

test_that("a simple valid SIN that becomes invalid if reversed", {
  input <- "59"
  expect_equal(is_valid(input), TRUE)
})

test_that("valid Canadian SIN", {
  input <- "046 454 286"
  expect_equal(is_valid(input), TRUE)
})

test_that("invalid Canadian SIN", {
  input <- "046 454 287"
  expect_equal(is_valid(input), FALSE)
})

test_that("invalid credit card", {
  input <- "8273 1232 7352 0569"
  expect_equal(is_valid(input), FALSE)
})

test_that("valid strings with a non-digit added become invalid", {
  input <- "055a 444 285"
  expect_equal(is_valid(input), FALSE)
})

test_that("punctuation is not allowed", {
  input <- "055-444-285"
  expect_equal(is_valid(input), FALSE)
})

test_that("symbols are not allowed", {
  input <- "055£ 444$ 285"
  expect_equal(is_valid(input), FALSE)
})

test_that("single zero with space is invalid", {
  input <- " 0"
  expect_equal(is_valid(input), FALSE)
})

test_that("more than a single zero is valid", {
  input <- "0000 0"
  expect_equal(is_valid(input), TRUE)
})

test_that("another valid sin", {
  input <- "055 444 285"
  expect_equal(is_valid(input), TRUE)
})

test_that("nine doubled is nine", {
  input <- "091"
  expect_equal(is_valid(input), TRUE)
})

Tags:
construct:assignment
construct:function
construct:library
construct:load
construct:string
construct:source-file
construct:test
construct:testthat-block
construct:variable
construct:visibility-modifiers
paradigm:imperative
paradigm:functional

Exercise: pascals-triangle
Code
pascals_triangle <- function(n) {

}

Tags:
No tags generated

Exercise: pascals-triangle
Code
pascalsTriangle <- function(n) {

  if (n == 0) {
    return(list())
  }
  else if (n == 1) {
    return(list(1))
  }
  else if (n == 2) {
    return(list(1, c(1,1)))
  }
  else if (n >= 3) {
    triangle <- list(1, c(1,1))
    for (x in 3:n) {
      row <- rep(1, x)
      for (i in 2:(x - 1)) {
        row[i] = sum(triangle[[x - 1]][(i - 1):i])
      }
      triangle[[x]] = row
    }
    return(triangle)
  }
  else {
    stop("argument n needs to be an integer")
  }

}

Tags:
construct:assignment
construct:break
construct:double
construct:else
construct:for-loop
construct:function
construct:if
construct:implicit-conversion
construct:indexing
construct:integer
construct:list
construct:logical-and
construct:logical-or
construct:loop
construct:number
construct:parameter
construct:return
construct:subtract
construct:vector
construct:visibility-modifiers
paradigm:imperative
paradigm:functional
paradigm:object-oriented
technique:boolean-logic
technique:looping
uses:List{Double}

Exercise: nucleotide-count
Code
nucleotide_count <- function(input) {

}

Tags:
No tags generated

Exercise: pangram
Code
is_pangram <- function(input) {

}

Tags:
No tags generated

Tag editing underway...

This is an automated comment
Hello :wave: Next week we're going to start using the tagging work people are doing on these. If you've already completed the work, thank you! If you've not, but intend to this week, that's great! If you're not going to get round to doing it, and you've not yet posted a comment letting us know, could you please do so, so that we can find other people to do it. Thanks!

Thanks for the help! We've updated the tags.


Clarify Isolate.packageConfig API semantics

The VM will start to support .dart_tool/package_config.json for resolving package Uris in various scenarios.
We do have a Isolate.packageConfig API in dart:isolate which says atm:
  /**
   * The package root of the current isolate, if any.
   *
   * If the isolate is using a [packageRoot] (**) or the isolate has not been
   * setup for package resolution, this getter returns `null`, otherwise it
   * returns the package config URI.
   *
   * (**) the deprecated packages/ folder
   */
  external static Future<Uri> get packageConfig;

Now the question is: Should this getter return a Uri to .dart_tool/package_config.json if the VM is using it for package resolution? Or should we expose a new get packageJsonConfig getter?
Right now there are a few packages out there, e.g. package:package_resolver which invoke this getter and expect the file at that Uri to be of .packages format (and not the json format). This package is in fact used by e.g. flutter atm (see /src/flutter/lib/web_ui/dev/test_platform.dart)
Those packages will break once the VM favors .dart_tool/package_config.json over .packages.

Should this getter return a Uri to .dart_tool/package_config.json if the VM is using it for package resolution?

Yes.
There won't be any .packages file to refer to soon enough. Anyone needing to understand the file contents will need to understand the new file format.

Thanks for the confirmation, @lrhn
I have filed https://github.com/flutter/flutter/issues/56289 for the flutter team to take this on.
Will re-classify this issue as area-vm and mark it blocked until https://github.com/flutter/flutter/issues/56289 has been addressed.

Flutter has moved to Lasse's new package, so we should be unblocked on preferring to use the new .dart_tool/package_config.json over .packages.
Made CL: https://dart-review.googlesource.com/c/sdk/+/146840


Updates to prelude

For some reason I get the following test failure:
     Running target/debug/deps/main-9d09b68e5207c057

running 1 test
test main ... FAILED

failures:

---- main stdout ----
	test tests/pass/alternative.glu
test tests/pass/arithmetic.glu
test tests/pass/channel.glu
test tests/pass/deep_clone_userdata.glu
test tests/pass/lazy.glu
test tests/pass/lisp.glu
test tests/pass/list.glu
test tests/pass/map.glu
test tests/pass/parser.glu
test tests/pass/reference.glu
test tests/pass/state.glu
thread 'main' panicked at 'Op Split called on non data type', tests/main.rs:32:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.

failures:
    main

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--test main'

Seems to be the make_Applicative function that is causing it

Seems to be annotating the make_Applicative function that is causing it

It is something to do with overloading, will take a look.

Seem to be getting errors on nightly, but not related to this PR

@brendanzab  Compiletest 0.3 got released which should fix the error! Probably simplest you bump it in this PR and push to kick of another build, otherwise it will need a rebase anyway.

Still seems to fail 😖

Yeah :/ Maybe it is something in travis so it only works locally... Will try and take a look tonight.

As for the overloading issue, it is possible that #320 would fix it so I will try to get that done first.

Sooooo it works now ¯\(ツ)/¯ . Merge or fix the nit I found at your discretion!


vertical screen

Now
code is able to generate a clock render on vertical screen (width is lower than height)

Nice, thanks!


Questions about the initial predictor

Hello, what is the role of the initial predictor mentioned in the paper in the proposed method? How can we ensure that the resulting output by the initial predictor is the aggregate SR estimate?

Thank you for your reply. The loss function of the diffusion model constrains the difference between the predicted noise and the real noise through MSE, but the output of the predictor is not constrained by the loss function. So why can it be guaranteed that the image output by the predictor is an SR image?

It can not be guaranteed, the diffusion model just refines the residual which the initial predictor is unable to, which closely resembles a SR estimate. However without guarantee as it is not explicitly trained to do so. We recommend the work of Whang et al., which gave the inspiration for this in the context of deblurring: https://arxiv.org/abs/2112.02475


Added safari menu clarification

Myself and my colleagues spent 30 minutes scratching our head, before realizing the 'Export to PDF' command was in the Apple Menu Bar!
Cheers.

Oh didn't realize you were using this! Ideally, we want to move to a better way to of generating PDFs. There is this PR, if somebody wants to help it along — https://github.com/AnomalyInnovations/serverless-stack-com/pull/327


Improve code style, markov

Improve code style, markov:

Add space after commas

coverage: 94.694%. remained the same
when pulling b70c0edae4f3b6942a6dc694921e304fe3c888a3 on KybernetikJo:improve_style_markov
into 220ace34c8568cd14d71b9d2260336ba78235565 on python-control:main.

@murrayrm
I don't understand why a new hash was necessary. The docstring has not changed!
I have updated the hash for markov.

Because this function uses *args, we use a hash of the docstring and the function text to ensure that the developer confirms that arguments are still documented properly (by updating the hash).


expect(jest.mock()).toHaveBeenCalledTimes retains state of previous calls

Sorry if I've missed something but test fails when importing jest test into tsdx repo.
Current Behavior

I'm migrating a component into a project that uses tsdx.
The jest test above passes in the original repo.
git-actions
👇 (attached screenshot)

However, when I copy/paste the test into a repo, git cli (and locally) errors saying the test fails.

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 4

      38 |
      39 |     await screen.findByAltText('QR Code');
    > 40 |     expect(QrCode.toDataURL).toHaveBeenCalledTimes(1);
         |                              ^
      41 |   });
      42 |
      43 |   it('calls QrCode.toDataUrl with default properties', async () => {

Now if I move this test to the top (as the first expect, the test passes).
Expected behavior

The following should pass regardless of where this is included in a it closure.
expect(jest.mock()).toHaveBeenCalledTimes(1);

Suggested solution(s)

Not sure -
Additional context

Your environment

  System:
    OS: macOS 11.0.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 615.20 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.5 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Chrome: 89.0.4389.114
    Safari: 14.0.1
  npmPackages:
    tsdx: ^0.14.1 => 0.14.1
    typescript: ^4.1.3 => 4.1.3
  npmGlobalPackages:
    typescript: 3.9.5

Sorry if I've missed something but test fails when importing jest test into tsdx repo.

It looks like the repo you're moving it from is on a newer version of Jest than TSDX, and that's likely why there's some difference. TSDX also uses ts-jest by default.
TSDX has a tiny wrapper around Jest merely to set default config (and some arg processing due to inability to use import Jest and execute it); there are no modifications to Jest internals, hence no real reason why TSDX could be responsible for such an issue.


Download links for new version broken

I don't think this is intentional? The download links for v4.1 are broken in https://github.com/pixijs/pixi.js/releases, e.g.:
http://pixijs.download/v4.1.0/pixi.js
"bad request"
Status Code: 403 Forbidden

That link works for me?

Was a temporary issue (no more than a few minutes) due to the cnames being incorrect.
It's already fixed, thanks for the report.


fix(django): handle status_code=None in TemporalHttpResponse.repr

Ref: https://github.com/django/django/pull/15768
Ref: https://github.com/strawberry-graphql/strawberry/pull/773#issuecomment-1151217997

Hi, thanks for contributing to Strawberry 🍓!
We noticed that this PR is missing a RELEASE.md file. We use that to automatically do releases here on GitHub and, most importantly, to PyPI!
So as soon as this PR is merged, a release will be made 🚀.
Here's an example of RELEASE.md:
Release type: patch

Description of the changes, ideally with some examples, if adding a new feature.

Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :)
Here's the tweet text:
🆕 Release (next) is out! Thanks to @blueyed for the PR 👏

Get it here 👉 https://github.com/strawberry-graphql/strawberry/releases/tag/(next)

Thanks for contributing to Strawberry! 🎉 You've been invited to join
the Strawberry GraphQL organisation 😊
You can also request a free sticker by filling this form: https://forms.gle/dmnfQUPoY5gZbVT67
And don't forget to join our discord server: https://strawberry.rocks/discord 🔥


Update to 1.3

This PR has multiple mistakes. https://github.com/caskroom/homebrew-cask/pull/14683 is correct.

Duplicate of #14683


ENOENT: no such file or directory, open 'serverless-graphql-apollo/app-backend/.webpack/.serverless/warmUpPlugin.zip'

Hi,
Firstly, thanks for making these plugin. I running into the following error when trying to deploy with the serverless-plugin-warmup enabled.
This is the error message:
yarn run v1.1.0
warning You are using Node "7.10.0" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || ^8.0.0"
$ serverless --stage=production deploy
Serverless: WarmUP: setting 2 lambdas to be warm
Serverless: WarmUP: serverless-graphql-apollo-production-graphql
Serverless: WarmUP: serverless-graphql-apollo-production-graphiql
Serverless: Bundling with Webpack...
Time: 1578ms
           Asset     Size  Chunks             Chunk Names
      handler.js  7.32 kB       0  [emitted]  handler
_warmup/index.js  4.13 kB       1  [emitted]  _warmup/index
Serverless: Packing external modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...

  Error --------------------------------------------------

  ENOENT: no such file or directory, open '/Users/kristiankyvik/code/serverless-graphql-apollo/app-backend/.webpack/.serverless/warmUpPlugin.zip'

This is my serverless.yml:
service: serverless-graphql-apollo

frameworkVersion: ">=1.21.0 <2.0.0"

provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  region: us-east-1
  environment:
    MLAB_API_KEY: ${file(./serverless.env.yml):${opt:stage}.MLAB_API_KEY}
    HOME: /tmp
    SLS_DEBUG: true

plugins:
  - serverless-plugin-warmup
  - serverless-offline
  - serverless-webpack
  - serverless-delete-loggroups

custom:
  serverless-offline:
    port: 4000
    babelOptions:
      presets: ["es2015", "stage-2"]
  webpackIncludeModules: true

functions:
  graphql:
    handler: handler.graphqlHandler
    warmup: true
    events:
    - http:
        path: graphql
        method: post
        cors: true

  graphiql:
    handler: handler.graphiqlHandler
    warmup: true
    events:
    - http:
        path: graphiql
        method: get
        cors: true

And this is my webpack config:
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const nodeExternals = require('webpack-node-externals');
// eslint-disable-next-line import/no-extraneous-dependencies
const slsw = require('serverless-webpack');

module.exports = {
  entry: slsw.lib.entries,
  target: 'node',
  externals: [nodeExternals()],
  module: {
    rules: [{
      test: /\.js$/,
      use: [
        'imports-loader?graphql',
        {
          loader: 'babel-loader',
          options: {
            presets: ['es2015'],
          },
        },
      ],
    }],
  },
  output: {
    libraryTarget: 'commonjs',
    path: path.join(__dirname, '.webpack'),
    filename: '[name].js',
  },
};

Please let me know if you guys any ideas of how I can fix this.

@kristiankyvik did you have a look in the closed Webpack issues such as #6?
This issue keeps repeating itself IMO and is a Webpack config issue, not warmup. Let's keep it clean and take the conversation to #6.


Is the aimbot working for you guys?

Title

I think it does, have you tested it on Dust 2 ?
Maybe some workshop training maps can block it.
Also, try with a fresh config too.

I'm debugging right now...
haven't touched the aimbot at all lol
tested it on all maps/community/official

https://i.imgur.com/Lr8LoFv.png
the debugger says that it skips  everything after that highlighted return ;_;

I'll just start over.


[🐞] useTask$/useVisibleTask$ produce unexpected behavior

Which component is affected?
Qwik Runtime
Describe the bug
The behavior I'm seeing is that a server-side useTask$ is running, but the changes are not being applied to the rendered HTML that is sent to the client. The cleanup callback is also being called immediately which seems unintended.
More detail in the repro steps.
Reproduction
https://stackblitz.com/edit/qwik-starter-d4eggl?file=src/routes/index.tsx
Steps to reproduce

Open the StackBlitz
Start the server (npm run preview)
Open the site
See that the status is init rather than mounted.
See that using <Link> to navigate away does not switch to the unmounted status
See that using <Link> to navigate back does end up in the mounted state, then unmounted after that
Uncomment the useVisibleTask$ in src/routes/index.tsx
Restart the server
See that the server rendered page is still status: init (browser JS turned off), but if JS is enabled, ends up as unmounted (server) + visible, which is also surprising

System Info
System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 7.17.0 - /usr/local/bin/npm
  npmPackages:
    @builder.io/qwik: ^1.1.2 => 1.1.2
    @builder.io/qwik-city: ^1.1.2 => 1.1.2
    undici: 5.22.0 => 5.22.0
    vite: 4.3.3 => 4.3.3

this is a limitation of streaming rendering. in order to make this work it would require to rerender a parent. It could lead to infinite loops, causing DDoS (no framework support this). On top of that, it would require to disable streaming, since eventually any children can change the root node. we can't send anything to the DOM.
I wonder how we can educate developers on this:

Docs
Some warnings?

Any thoughts?

All cleanup are called when the application is paused. Imagine a server does setTimeout(), we need to cleanup timer etc. it's expected behaviour

Ok great, thanks for the extra context.
My understanding of useTask was missing the detail that a useTask's cleanup is only called on component unmount if the task ran a second time on the client. My mental model is still adjusting.
However - there is something potentially actionable.
The serialized state we send to the client is the state after the child component's task has been processed, rather than immediately after the parent component is "finalized", let's say. This explains why we're seeing init in the html, but then using a useVisibleTask$, instead of getting init + visible, we get unmounted (server) + visible. Maybe this could be changed.
Then yeah, in terms of education, definitely warnings, maybe even erroring out on dev?
"State updates cannot be triggered from a component's useTask$ if it received the state through context or props."

"State updates cannot be triggered from a component's useTask$ if it received the state through context or props."

this would be a huge limitation during normal browser execution.
how about something like this:
This state mutation would trigger a rerender a component that is already rendered, which is not possible during SSR.

SSR HTML might not be in sync with the serialized state.

My understanding of useTask was missing the detail that a useTask's cleanup is only called on component unmount if the task ran a second time on the client. My mental model is still adjusting.

The cleanup is called when:

the same task runs again
the component is unmounted
the container is paused

The reason is that it's usually necesary to cleanup things when moving between server and client, imagine, a setTimeout will not cross from the server to the client

I like your message. Yeah didn't mean for mine to imply anything about client-side behavior. I wonder if we could be sophisticated enough to know if an already-"finalized" component is subscribed to that state or not. Thinking of a case where a top-level parent defines a store, a subcomponent updates the store in useTask$, then another component renders that store.
There's definitely some weirdness here, see playground

And then adding a client-side state update we see that the actual store value is unmounted - playground

By the way, there isn't always a cleanup to run when a component is unmounted, which is the thing I learned. This playground shows that - the first time the component is toggled, since the task never ran on the client, there's no cleanup to do.

this is a limitation of streaming rendering. in order to make this work it would require to rerender a parent. It could lead to infinite loops, causing DDoS (no framework support this).

Could the server serialize updated state at the end of document (based on just initial render, without re-rendering components) and the Qwikloader resumes some components based on the updated state?
Worst case scenario the whole tree needs to be resumed client side when document is loaded, but at least things would work as expected.
We could show some warning when this behavior occurs and developer could optimize.

This issue is really old and it's stale, there are few suggestions though.
So I'm closing this issue for now, feel free to re-open it if it's still an issue for you.


Incorrect JSON loading

Hello. Does not work with RPC Transmission in KeeneticOS, incorrect JSON loading occurs, an error occurs:
*Unhandled Error SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at IncomingMessage.<anonymous> (C:/Users/butak/AppData/Local/Programs/transmissionic/resources/app.asar/build/src/index.js:234:40) at IncomingMessage.emit (node:events:527:28) at endReadableNT (node:internal/streams/readable:1345:12)* *at process.processTicksAndRejections (node:internal/process/task_queues:83:21)*

Hi, I think you have misconfigured the RPC path, because it trie to load an HTML page instead of the RPC. Have you tried to change it?


Forever Loading when starting both in standalone and protable ver.

Forever loading.

Are you sure it isn't just taking a very long time? You could try to install the Everything search engine to speed up application discovery.


docs:(quickstart): set Deploy a Test Application version to v1.0.3

Update kubectl deployment examples to Deploy a Test Application Mayastor v1.0.3
Signed-off-by: JiangYu<EMAIL_ADDRESS>

@lnsyyj I think this should be raised against the version/1.0 branch instead.
Develop is for the next version and deploy has actually been removed so we need to update that section and place the yaml file elsewhere @GlennBullingham

Hi @GlennBullingham ,
When I fork the mayastor-docs repository and clone my private mayastor-docs repository, I can't see the release/1.0 branch.
root@spdk-1:~/github/mayastor-docs# git remote -v
origin	git@github.com:lnsyyj/mayastor-docs.git (fetch)
origin	git@github.com:lnsyyj/mayastor-docs.git (push)

root@spdk-1:~/github/mayastor-docs# git branch -a
* develop
   remotes/origin/HEAD -> origin/develop
   remotes/origin/develop
   remotes/origin/local-develop

Document format I refer to this PR:
https://github.com/openebs/mayastor-docs/pull/68

origin	git@github.com:lnsyyj/mayastor-docs.git (fetch)

Seems your origin is your own fork so that's why it's not there.
If not already there you can try adding it. Something like this:
git remote add openebs git@github.com:openebs/mayastor-docs.git

OK @tiagolobocastro , I opened a new PR. This PR can be closed.


Change default argument in sink and derived

To be faster in mutating the state.
Currently, starting Sink and deriving value from the state are running never dispatching as default.
that means the commit operations have to wait for it until all of the updating value finished.
As an original strategy, I decided to use such as this current behavior to achieve an easier way to debug because we can see all of stack-trace with running synchronously.
However, in most cases in the real world, it is not necessary from my current view.
Basically new value from subscribing like sink except creating Derive object. (Derive object requires the first value synchronously in init.)
So, This PR offers us to use DispatchQueue with asynchronously to receive a new value.
There are differences in Sink and making Derived.
Sink uses .asyncMain : it always dispatches to main-queue to deliver new value to the closure.
Derived object uses .asyncSerialBackground : it always dispatches to the background serial queue to derive new value.
In according, commit operation becomes no needs to wait for finishing updating values for each subscriber.
If you need to receive a new value synchronously, you can specify .passthrough like our unit testing code.

7.9.0 would include this PR

TODO: consider sinkState sinkValue should emit the first value synchronously.


Slim3 withJSON adding 45+ decimal places to numeric floating point numbers

I realize this is an older version, but I just noticed this issue.
The route returns an array with 100's of records. If I "print_r($results)" the result array everything is fine and matches the decimal places in the db and a manual query.
But, when I "return $response->withJson($results)", all the numeric floats (2 or 3 decimal places) are extended to 48 - 51 decimal places in the json output. Since it doesnt apply to floats stored/outputted as strings, it's obviously some calculation being applied - for a reason I just dont understand.
ex. print_r shows:
[price] => 4.24
withJSON shows:
"price": 4.2400000000000002131628207280300557613372802734375,
Any idea why this is happening and how I can prevent it? Having 500 records with 20+ numbers each of that precision creates a lot of extra overhead when processing.
As for versions, it's the latest version of 3.x as installed via composer about 2 months ago.
Thanks!

Nevermind. This is a PHP issue - not Slim. My bad.


Feature: Modify directory /var/lib/containers/storage/overlay best practice

What is the problem this feature will solve?
change this directory /var/lib/containers/storage/overlay
using env or config to change
ref: https://github.com/labring/sealos/issues/3228
If you have solution，please describe it
No response
What alternatives have you considered?
No response

PR #3293 added a debug log that informs the default storage config file path. Modify or add the storage.graphroot property in that file should meet your needs.


libqrtr-glib: only enable gtk-doc when not cross-compiling

Description of changes
Otherwise this error is shown when cross-compiling:
configure: WARNING:
You will not be able to create source packages with 'make dist'
because gtk-doc >= 1.0 is not found.
checking for gtkdoc-check... gtkdoc-check.test
checking for gtkdoc-check... /nix/store/c54j3jcj3cijg9kf54lcr94lsc09xd4r-gtk-doc-1.33.2/bin/gtkdoc-check
checking for gtkdoc-rebase... /nix/store/c54j3jcj3cijg9kf54lcr94lsc09xd4r-gtk-doc-1.33.2/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /nix/store/c54j3jcj3cijg9kf54lcr94lsc09xd4r-gtk-doc-1.33.2/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... yes
configure: error:
You must have gtk-doc >= 1.0 installed to build documentation for
libqrtr-glib. Please install gtk-doc or disable building the
documentation by adding '--disable-gtk-doc' to ### './configure'.
(Note that gtk-doc has issues regardless when cross-compiling, so it's preferable to not have it enabled anyway when cross-compiling, even if it could be found.)
Things done

Built on platform(s)

[x] x86_64-linux (no change)
[x] aarch64-linux (cross-compiled)
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Usually when I make a cross fix, I also turn on strictDeps, I suggest you do the same.

I guess that'll bump up the rebuild count by a lot (from 0), but we'll see.

Verified with diffoscope that strictDeps doesn't change anything except the hash.


Update Excel.Range.Rows.md

Docs Build status updates of commit 3c92c21:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

api/Excel.Range.Rows.md
:bulb:Suggestion
View
Details

api/Excel.Range.Rows.md

Line 2, Column 1: [Suggestion-description-missing] Missing required attribute: 'description'.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


On Mac OS Mojave 10.14 cannot add library with Carthage

OS version:  MAC OS Mojave 10.14
Carthage version: 0.31.0
Xcode version: 10.0
While trying to install library with Carthage having issue:
*** Fetching SwiftyXMLParser
*** Checking out SwiftyXMLParser at "4.2.0"
*** xcodebuild output can be found in /var/folders/kw/c7dppsfx5l7cvy75jhftwllh0000gn/T/carthage-xcodebuild.AbPXKF.log
*** Skipped downloading SwiftyXMLParser.framework binary due to the error:
"API rate limit exceeded for ..*.. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"
*** Building scheme "SwiftyXMLParser" in SwiftyXMLParser.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/romansafin/Documents/GetThisBuild/GetThisBuild/Carthage/Checkouts/SwiftyXMLParser/SwiftyXMLParser.xcodeproj -scheme SwiftyXMLParser -configuration Release -derivedDataPath /Users/romansafin/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10A255/SwiftyXMLParser/4.2.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/kw/c7dppsfx5l7cvy75jhftwllh0000gn/T/SwiftyXMLParser SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/romansafin/Documents/GetThisBuild/GetThisBuild/Carthage/Checkouts/SwiftyXMLParser)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/kw/c7dppsfx5l7cvy75jhftwllh0000gn/T/carthage-xcodebuild.AbPXKF.log
Xcodebuild log attached
carthage-xcodebuild.AbPXKF.log

@kazuhiro4949
Hi. Thanks for advise.
I've checked it and i was using Xcode 10.

One more thing. I've found that when i'm trying to 'carthage update' trough terminal in generated log files from time to time appears randomized settings
SDKROOT = appletvos12.0
Wich is not expected due i'm trying to build it for iphoneos12.0
Cannot see where this randomization come from.
carthage-xcodebuild.Mpv1r0.log
Also done git clone of SwiftyXMLParser repo and tried to specify local repo in cart file. Still getting the same error:
The following build commands failed:
CompileC


EC-1021 Enable horizontal table scrolling

This was an experiment. Closing PR as nothing has been moved forward on this


RuneLite repetitive pattern screen (Linux)

My RuneLite on Linux looks like this https://imgur.com/En8xfZf
I really don't know what's happening there. I tried to install java 2 times but no difference.

Try launching the jar with --mode=OFF passed to it

@Kamielvf Wow, that was quick and it worked, thanks mate :) Should i delete this?

This is launcher issue, and I believe we closed the ddraw ones after we added the possibility to set the param, so I guess yea, or open issue in https://github.com/runelite/launcher


read and write excel error - excel step for excel app, not numbers app

[Monthly Report.xlsx]August!E10 = 12345
ERROR - expected token ']'
[Monthly Report.xlsx]August!E11 = "Alan"
ERROR - expected token ']'
echo why
why
data_array = [form_data.xlsx]Sheet1!A1
ERROR - expected an identifier but found 'Sheet1' instead
data_array = [form_data.csv]Sheet1!A1
ERROR - expected an identifier but found 'Sheet1' instead

Hi @xin911 yes you would need excel for this to work!

Hi @xin911 yes you would need excel for this to work!

I installed excel on mac,

still not work.

Excel is installed on my mac, but is not actived. Is it the reason..?

Hi @xin911 yes you would need excel for this to work!

I installed excel on mac,
still not work.   Excel is installed on my mac, but is not actived. Is it the reason..?

I update the tagui version (6.46->6.110) when changing Windows OS, now tagui work well.
I change the OS windows, still the same error. And then, I update the tagui version,

mac update (6.46->6.110), execute "[Monthly Report.xlsx]August!E10 = 12345", no response. no excel created. Properly the reason is excel which is not actived on my mac.


Ensure support for external nodes in unit tests

resolves #8944
Problem
We weren't sure if external nodes in unit tests would just work, and it turns out that they do!
Note: this wasn't originally working
Before the winter break this didn't just work. I started on this work early in December, and at that time it was failing to find the external node at ref resolution time. This was because under the hood the identifier for refs in unit tests are under a different name to spoof the node to be ref'd. At the time there was a disconnect between the ref in the unit test, and the unit test in the model.
Solution
Added a test which includes an external node
Note
There is no changelog for this PR because nothing in core itself was changed, just an added test.
Checklist

[X] I have read the contributing guide and understand what's expected of me
[X] I have run this code in development and it appears to resolve the stated issue
[X] This PR includes tests, or tests are not required/relevant for this PR
[X] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
[X] This PR includes type annotations for new and modified functions

I was wrong this doesn't just work. I just forgot that make test doesn't run the integration tests locally, I have to run make integration 🙃


Compilation with Clang

At the moment, compiling with clang fails at least for me. Errors start with this:
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1487:51: error: 'auto' not allowed in template argument
 1487 |                        int64_t i, std::pair<bool, auto> constValue) {
      |                                                   ^~~~
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1508:21: error: no matching function for call to object of type '(lambda at /daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1486:20)'
 1508 |                     fillRes(i,
      |                     ^~~~~~~
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1658:47: note: in instantiation of function template specialization 'DaphneDSLVisitor::buildColMatrixFromValues<long>' requested here
 1658 |                 colMatrix = DaphneDSLVisitor::buildColMatrixFromValues<int64_t>(
      |                                               ^
/daphne/src/parser/daphnedsl/DaphneDSLVisitor.cpp:1486:20: note: candidate function not viable: no known conversion from 'std::pair<bool, long>' to 'int' for 2nd argument
 1486 |     auto fillRes = [&constValues, &nonConstValsIdx](
      |                    ^
 1487 |                        int64_t i, std::pair<bool, auto> constValue) {
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This goes on until it stops with
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Clang version in the daphne-dev Docker container is the default of Ubuntu 24:
@daphne-container:/daphne$ clang -v
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /bin
Found candidate GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/13
Selected GCC installation: /bin/../lib/gcc/x86_64-linux-gnu/13
Candidate multilib: .;@m64
Selected multilib: .;@m64

From what I found out here, the issue described above is that the use of auto as a parameter of std::pair is only working in gcc and actually ill formed.

@philipportner I fixed this issue and it's compiling (with loads of warnings though).


AddRouting patch

A patch that can avoid the following exception when using the MapRoute extension and also adds an extra configuration option parameter.
The exception that occurs (also when running the sample):
An exception of type 'System.InvalidOperationException' occurred in Microsoft.Framework.DependencyInjection.dll but was not handled in user code
Additional information: Unable to resolve service for type 'Microsoft.Framework.OptionsModel.IOptions`1[Microsoft.AspNet.Routing.RouteOptions]' while attempting to activate 'Microsoft.AspNet.Routing.DefaultInlineConstraintResolver'.

@rynowak please take a look and review/merge/close. Not sure how this relates to the recent huge changes you made for options/configure/setup.

Yeah, I think this is goodness. We just haven't looked at AddRouting

87360d861f16fa43400d356748f03669270507d1


Maven build errors

Running SDK 4.1.0 i had some maven build errors when following the Webscript Tutorial
The "rating" scripts must be stored under  ...src/main/resources/alfresco/module/[Artifact.id]/scripts
Which, I think, is a good place for scripts that belong to a module.
But the Maven yuicompressor-maven-plugin tries to compress these files. And as they are not regular Javascript it complains about syntax errors.
Not finding a better solution I excluded the scripts directory from the processing by the plugin by adding
<exclude>**/scripts/**</exclude>
to the projects pom.xml  two times.
under
<id>compress-assembly</id> &
<id>compress-resources</id>
Hope this information helps others who fall into the same pit...

The webscripts tutorial builds without error and the scripts are not compressed. It is possible that you are putting scripts in the wrong directory location. If that is the case and if I can make the tutorial more clear, please open a new issue with specifics. Thanks for reading and for helping improve the tutorials!


Bookmarklet needs encoding in macOS Chrome 69

I loaded up https://t7.github.io/trashy.css/ in Safari and was able to get it to work. I then copied the URL from the Safari Bookmarklet to Chrome and noticed that the whitespaces need to be encoded for it to work in Chrome. Anyone else have this problem?
Dragging the bookmarklet link from the page into the bookmarks bar does not work for me.

Hmm. Dragging it from the page, to the bookmarks bar works for me.
It seems to work for both both Safari and Chrome.
Maybe there's some oddity about copying from Safari, to Chrome?
Regardless, I can make the link on the HTML page completely minified, without spaces.
That should fix the issue, whatever it may be. I'll get that change implemented soon.
Thanks for the heads-up!

@pronouncedJerry Okay, the link is now minified.
Let me know if this does/doesn't work for you.
https://github.com/t7/trashy.css/commit/60dbbe4221604e152a28a01c67fa1181a66e2b5a

that worked. thank you!


Upgrade cpp templates

Description
Adapt the C++ test templates to the latest SDK version.

 Snippets tests reports   SDK Version Tests overview      v6        v5                                   :heavy_minus_sign:                    v1        v1        v1


Lua/Torch to PyTorch

Could someone help convert Torch files with .lua extension like this into PyTorch?

@The-Gupta  Hi! Have you solved it ? I also want to know how to convert it?


openapi: Fix reference link in /register-queue documentation.

Fixes a reference link in realm_enable_spectator_access description in /register-queue endpoint documentation.
Current documentation (with error)

Updated documentation

Self-review checklist

[x] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[x] Each commit is a coherent idea.
[x] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[x] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Merged, thanks @laurynmm!


Custom LogBlock dateformat

By default LogBlock does not tell from which year a edit is (And most of the time you'll never need this) but I have a server that has maintained a log for over 2 years and on the rare ocasion it is possible that the date is slightly confusing. So I modified the date format in LogBlock to look like:
  dateFormat: MM-dd-yy HH:mm:ss

This works pretty well for pure LogBlock lookups but breaks watson's capability to detect the output.
I'm not sure if this is something worth the effort to enhance though but it would be neat to have the best from both worlds.

Do we see a fix for this problem soon? :)

Yeah, sorry.  I've had a very busy 6 months.  I am actually gearing up to work on Watson this week.

Fixed in https://github.com/totemo/watson/releases/tag/<IP_ADDRESS>-mc1.8.0
However, I've only implemented year-month-day order (three variations).  Things have been hectic.


[1.16.5] Incompatibility with Aquaculture 2 leeches

For some reason, the leeches from Aquaculture 2 are unable to be used in alchemy, the cause was tracked down to this mod: https://github.com/TeamMetallurgy/Aquaculture/issues/207

There is a small chance it might have to do with capability implementations.

Is aquaculture expecting itemstacks without capabilities attached to them?

The issue is that the leeches from AQ are not able to be used a potion ingredients in the brewing stand. I have seen a similar issue before with Tinkers' Construct, where a stencil could not be used, and the cause was a mod attaching capabilities to every item in the game. I don't know if that's the case here, but I thought I would mentions it because it's a similar issue.

I do attach a capability to every ItemStack in the game, but to my knowledge it's necessary for the Fuse Shot and Accelerate enchantments to function, as they require reading stored data on an ItemStack to work

it should be sufficient to cover everything that has IShootable, no? It's only used for those items anyway, and those usually have complex enough architecture that other mods silently ignore most tags on them.

This should be fixed by 0b3f1ad.


Added Browser-based Terminal like Feature.

The browser-based terminal in Google Colab is a valuable feature that allows users to access a command-line interface directly within the Colab environment. It provides seamless integration, convenient environment setup, file system access, and an enhanced workflow, making it easier to execute system commands, manage files, and perform various tasks within the Colab interface.

Thanks for making this collab link. I have added it to the FAQ.
https://github.com/paul-gauthier/aider/blob/main/docs/faq.md#can-i-run-aider-in-google-colab


Item Dupe

I can create unlimited blocks using the Crafter (RFTools 2.80) and Black Hole Talisman (Botania r1.6-184). I'm not sure which mod causes this.
To recreate:

Store any block in Black Hole Talisman (In my tests it seems that you need more that 1 stack for this to work)
Put crafting recipe in crafter
Insert Talisman in buffer
Crafter keeps pulling blocks

Thanks for creating such a great mod!

Related to #150

I have problems with this too. I have 2 Black Hole Talismans. I have stored soul sand to one, netherrack to other. When I put them to crafter and make recipe for both of them, one pulling netherrack out and another pull soulsand. It doesnt care which talisman is inside crafter, it will pull both from talisman, like putting talisman containing soul sand, it will give me stack of soul sand and netherrack.

I'll have to look at this soon. First need to be able to reproduce this. Will look at this later

Should be fixed in next version


[Auto-generated] Update requirements.txt

Update requirements.txt
Automatically created PR from the ci_update_requirements.yml workflow.

Codecov Report

:exclamation: No coverage uploaded for pull request base (ci/dependabot-updates@20f2f26). Click here to learn what that means.
The diff coverage is n/a.

@@                   Coverage Diff                    @@
##             ci/dependabot-updates     #171   +/-   ##
========================================================
  Coverage                         ?   68.62%
========================================================
  Files                            ?       18
  Lines                            ?      494
  Branches                         ?        0
========================================================
  Hits                             ?      339
  Misses                           ?      155
  Partials                         ?        0

Flag
Coverage Δ

pytest
68.62% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


copy in ffmpeg c++

dear,
i am currently stuck now for almost 1 month and still not get the solution ,
in the commandline tool the following command is what i want
ffmpeg -i "video.mp4" -i "audio.mp4" -codec copy -shortest output.mp4
i want to add a new generated video with no sound in it (greated with opencv). to the original video
what i need to do in c++ i really stuck now on this for 4 weeks (learn a lot of new things).
i hope you can help me with this , it seems to be very easy but my headache is on the -codec copy -shortest how i can get this succeeded in ffmpeg?
thank in advance if you want to help me with this,
Kind regards Niek Tuytel,

i hope you will open it if you want to help , thanks in advance

Hey @Niek-Okido
Greeping the FFmpeg source code (git grep shortest) I noticed that shortest is "translated" by this function and there seem to exist a filter for shortest as well:
static void close_output_stream(OutputStream *ost)
{
    OutputFile *of = output_files[ost->file_index];

    ost->finished |= ENCODER_FINISHED;
    if (of->shortest) {
        int64_t end = av_rescale_q(ost->sync_opts - ost->first_pts, ost->enc_ctx->time_base, AV_TIME_BASE_Q);
        of->recording_time = FFMIN(of->recording_time, end);
    }
}

but in reality you could check the duration of the shortest stream and stop to process packets/frames there.

thank you very much, really needed this help :) thank you very much get it working now ❤


NOT Compatible with OpenCV3+

At least, one issue can be found at  http://code.opencv.org/issues/2778
Cheers
Pei

https://github.com/andrewssobral/bgslibrary/tree/opencv3

Hi @jiapei100 sorry for my delayed response, yes there is a bgslibrary branch for opencv3. Maybe I'll put the current master branch to a new branch called opencv2.4, and next I'll put the opencv3 branch in the master branch. Thank you


skill calc: add support for level aware actions

I also added all the relevant level aware actions i could think of

Herbiboar
Book of Arcane Knowledge
Wintertodt firemaking
Wintertodt construction
Agility Pyramid

Closes #2905

Would the agility pyramid completion bonus fit into this system?

Not at the moment, but it's probably not too hard to do the required modifications for it to be able to. I will look into it.

It should now be support for the agility pyramid as well.

This is in some desperate need of unit testing. It looks like the code should cover cases where the goal XP is multiple levels beyond the current level, which would affect the number of iterations needed to reach intermediate levels, but having tests to know that's working as intended would be great.


Invalid value (nan) encountered in broadcast_in_dim with logsumexp and scan

Hello,
I am stuck with an error message, it seems to involve logsumexp and scan functions that lead to NaN values appearing. I have shortened the code to a minimal example to reproduce. Am I doing something wrong ?
import jax.numpy as jnp
import jax
from jax import grad as jgrad
from jax.config import config
from jax.scipy.special import logsumexp

T = 1000

config.update("jax_enable_x64", True)
config.update("jax_debug_nans", True)

A = jnp.zeros((2, 2))

def fun(A):

    a_init = jnp.array([jnp.log(0.5), jnp.log(0.5)])

    def scan_fn_a(a_t_1, t):
        a_t =  logsumexp(jnp.stack([a_t_1, a_t_1], axis=1) + A, axis=0)
        return a_t, a_t

    _, alpha = jax.lax.scan(scan_fn_a, a_init, jnp.arange(1, T, 1))

    return jnp.mean(alpha)

grad_fun = jgrad(fun)
grad_A_val = grad_fun(A)

Here is a shortened error message:
Traceback (most recent call last):
  File "jax_bug.py", line 27, in <module>
    grad_A_val = grad_fun(A)
  File "jax_bug.py", line 22, in fun
    _, alpha = jax.lax.scan(scan_fn_a, a_init, jnp.arange(1, T, 1))
FloatingPointError: invalid value (nan) encountered in broadcast_in_dim

Thanks

I'm sorry it took so long to look at this, but I tried running this repro at head on CPU and GPU and it works fine for me without giving any NaNs. So I'm going to guess that the original problem is fixed!


How can I block package when compiling for iOS

How do I block this package from compiling for iOS when using flutter. For now I have to comment out this package and then get and then comment out everywhere I used it.

i would suggest you to make platform checks while using the plugin to use it only if the platform is Platform.Android otherwise you can perform different operation.


Define cup product in degrees 0 and 1

@favonia I'm currently stuck on an Agda issue: There's a hole in theorems/cohomology/CupProduct11.agda, which already contains a term of the required type (which can be checked using C-c C-.) but when I try to fill the goal using C-c C-SPC, Agda seems to get stuck in an infinite loop. The same happens when I simply replace the hole by the term and try to reload the file with C-c C-l.
This is not the first time I have seen this behavior by Agda. Before, I somehow managed to solve it or find a workaround, but I have no idea what to do this time. Have you experienced this kind of behavior? Do you have any tips on how to deal with it?

@timjb I managed to survive with little or no interaction support (and that seems to surprise many people). Somehow I am able to make up the terms in my mind. Sorry I don't have much experience here.
If you have a smaller example, I strongly suggest reporting it to Agda developers. If the bug is stopping you from making progress, I will have time this Friday or weekend to look at it. Does that sound like a plan?

@favonia Thanks for your feedback. The behavior I am seeing is not a bug in the interactive mode: When I replace that hole by the term and load the file from the command line, Agda also gets stuck in an infinite loop.
I will try to make the example smaller and I will try it in an unreleased version of Agda to see whether the Agda developers have already fixed this bug.

This looks great! I am looking forward to your cup products!
The Agda in the experimental branch will not type-check the (whole) HoTT-Agda due to Agda/Agda#2979. But maybe your part is okay.

@favonia Unfortunately, the current Agda HEAD version doesn't work. It gets stuck on theorems/homotopy/HSpace.agda.

I run version 2.6.0-0e193b2 on the master branch of HoTT-Agda and it can check theorems/homotopy/HSpace.agda on my machine.
So I'm going to use this version of Agda for now. Hopefully, there will be a new release of Agda when this pull request is ready. Otherwise, one workaround that I think may work is to merge cohomology.CupProduct00 and cohomology.CupProduct01. I don't want to do this now to keep checking times low.

By the way, once you feel the definition is ready, please add the "top-level" files into one of the indexes (or create a new one) so that future PRs cannot break your cup products.

@favonia Doing so would not significantly simplify ↓-=-in-β and ↓-=-out-η. There would be one fewer step in the equation chains and the terms wouldn't involve q, but that's it.

@timjb Please correct me if I'm wrong, but I feel the 1-1-cup products are already defined in this PR, and I guess that part will stay in the final development. Your improvements to the PathSeq seem interested, and if everything looks fine, I would like to merge this huge PR and maybe you could start another PR to continue. What do you think?

@favonia Yes, the 1-1-cup product is done, but there is also some unfinished work on the commutativity of this product map. I think that I will be able to finish proving commutativity in the next week. I propose merging this PR after I have done that. In parallel to this, you could start reviewing and I could start cleaning things up.

@favonia Big progress today on the commutativity of the 1-1-cup-product! I've now got the missing commutative diagram for proving this on paper, the only work left is formalizing it in Agda. (Unfortunately, it is quite big.) And I've finally found the part that wouldn't commute if antipodal-map was defined any other way (e.g. if antipodal-map were the identity). I was already beginning to wonder whether my definition of the cup product was wrong, because you would certainly expect such a part to appear somewhere (since otherwise the cup product as defined by me would be commutative, not only skew-commutative). Now I'm almost 100% confident I've got the definition correct!
In the next days I will be working mostly on a report on another project for University. I expect to be finished with the commutativity proof by Monday 8 days.

@favonia The commutativity proof is complete now! \o/

@timjb Let me merge the master branch first...

@timjb To help me understand the change to path sequences, could you possibly point out the parts that really need PathSeq at the core kernel?

@timjb I could not really make travis work for now... I guess I will merge this PR without travis.
I suppose the subscript s stands for sequences, and t for truncation. Is that right?
Also I wonder if you could write a short comment on how to use _=↯=⟨_&_&_&_⟩_ and the company.

To help me understand the change to path sequences, could you possibly point out the parts that really need PathSeq at the core kernel?

What I'm really interested in is having =ₛ in the core kernel, because with this I can define
∙-λ= : λ= α ◃∙ λ= β ◃∎ =ₛ λ= (λ x → α x ∙ β x) ◃∎`

and similarly for other equalities between paths in core/lib/*.agda. Without =ₛ in core, I would have to define
∙-λ= : λ= α ∙ λ= β == λ= (λ x → α x ∙ β x)`

A value of the former type also contains a value of the latter type, but furthermore it also stores how the two paths can each be represented as the composition of (smaller) paths. This information comes in handy in the PathSeq rewriting machinery and is what makes the former type strictly more useful than the latter.

I suppose the subscript s stands for sequences, and t for truncation. Is that right?

Correct.

Also I wonder if you could write a short comment on how to use =↯=⟨&&&⟩ and the company.

I will do this.

@favonia I'm satisfied now with the state of the code. Is there anything you would like to see changed?
One idea regarding Travis: Maybe splitting index2stage2.agda into index2stage2.agda (containing cw.cohomology.AxiomaticIsoCellular) and index2stage3.agda (containing my cup product stuff) could help reduce memory consumption.

@timjb I will have to think about the directory names (especially the capitalization) and Travis a little bit more (maybe index4.agda for cup products?), but let's merge your amazing work now.


FONT STYLE, HEADER LOGO, FONT COLOUR FIXED

DEMO HERE:
https://akshat0047.github.io/Pyladies-delhi-website/
FONT STYLE:
The font of all descriptions is set to PT Sans Narrow, sans-serif, the same google font initialization is done
FONT COLOUR:
The font of about us and sponsor section is set to black colour
HEADER LOGO:
As per the requirement made the header logo is being set to 150px size which was initially 100px.

Please increase the font size of about section by at least 0.1em to ensure better readability.

@AniVerma17, approve ASAP if it looks good.
LGTM. The icons are yet to be removed though.

Font size is good now.

How do you feel about this? Any thoughts. I am not shouting, am I? Well, despite your best intentions, people would roast you on online forums if you use uppercase unnecessary. It is considered as shouting. Please take care, give your caps lock key some rest.
@AniVerma17  YOU APPROVED THIS, LIKE THIS?
@thisisayush @utkarsh2102 @JoyBhalla Take note.

@vipulgupta2048 I approved it for the code changes, chose to explain commenting practices for later because we all seem to be working against the clock.
Don't lose your cool on this.

Duly noted. Would be taken care of this is future.


If docker.CheckDockerImageVersion fails, send an event to analytics

From @tamalsaha on June 1, 2017 21:39
Copied from original issue: kubedb/operator#59

From @aerokite on June 2, 2017 3:36
When you are creating a database, controller validates its version. If it fails to validate, it will push an event.
  1m          1m         1         Postgres operator   Warning    Failed               Fail to be ready Postgres: "postgres-demo". Reason: Image kubedb/postgres:9.6-db not found
  1m          1m         1         Postgres operator   Warning    Invalid              Image kubedb/postgres:9.6-db not found

But at the very beginning, when controller is starting, It checks some Images whose versions are provided as flags. If operator fails to validate, It will not move forward. It gives error with log.Fatalf because operator will not actually work properly

But at the very beginning, when controller is starting, It checks some Images whose versions are provided as flags. If operator fails to validate, It will not move forward. It gives error with log.Fatalf because operator will not actually work properly

That sounds good. But we should still collect analytics for these events.

We do not validate docker vesion anymore


Nelson drops all peers: Unhandled Rejection at: Promise Promise {  undefined } reason: undefined

Expected behaviour
Nelson connected with peers continuously
Actual behaviour
Nelson drops all my peers after hours, doesn't reconnect with any of them
Steps to reproduce
Start nelson with screen -S nelson nelson --config ~/config.ini
Basic Info

Operating System: Ubuntu Server 16.04
Node (npm) Version:

$ node -v
v8.11.1
$ npm -v
5.6.0
atverm@iota:~$

IRI Version: <IP_ADDRESS>
Nelson version: 0.4.0

Nelson Info

Epoch: Unknown
Cycle: Unknown
Connected peers: 0

Nelson works fine, until after a few hours (around 6? hours) it drops all peers, displaying: Unhandled Rejection at: Promise Promise { <rejected> undefined } reason: undefined in the left top corner of the gui. All the gui shows while in this state is that it's dropping connections, and Nelson doesn't connect to any peers until restarted.
Nelson config:
[nelson]
name = *****
cycleInterval = 60
epochInterval = 300
apiPort = 18600
apiHostname = <IP_ADDRESS>
port = 16600
IRIHostname = localhost
IRIProtocol = any
IRIPort = 14265
TCPPort = 15600
UDPPort = 14600
dataPath = data/neighbors.db
; maximal incoming connections. Please do not set below this limit:
incomingMax = 10
; maximal outgoing connections. Only set below this limit, if you have trusted, manual neighbors:
outgoingMax = 10
isMaster = false
silent = false
gui = true
getNeighbors = https://raw.githubusercontent.com/SemkoDev/nelson.cli/master/ENTRYNODES
; add as many initial Nelson neighbors, as you like
neighbors[] = mainnet.deviota.com/16600
neighbors[] = mainnet2.deviota.com/16600
neighbors[] = mainnet3.deviota.com/16600
neighbors[] = iotairi.tt-tec.net/16600

; Protect API with basic auth
[nelson.apiAuth]
username=******
password=*******

I have the same problem. It's the only reason my full node setup is not stable at the moment.
I run nelson in Terminal (latest Java 10.0.1, nodejs 10.0) with Ubuntu Desktop 17.10.
I runs mostly fine for a few days, but then there's always a moment that it randomly crashes (it shows "Unhandled Rejection at: Promise Promise {  undefined } reason: undefined" on top). It result it the fact that it doesn't connect to neighbors anymore, resulting in 0 neighbors and an unsynced node.
I really hope this problem will be resolved. Regards.


add fjut.txt

Fujian University of Technology
https://www.fjut.edu.cn/

@chenchuanlong Pull request merged. Thank you!

but why I still cannot use it,  and the website says that 'Your email address does not belong to any university that we know. Contribute your university to our list.'
ps.our school email is like  xx @smail.fjut.edu.cn


Optional Initializer Overload should be empty, not null

Key not existing is expected behavior, currently creates .null

This is expected behavior w/ optional initializers, unfortunately.