Docker configuration

Hi,
I am having a hard time working out how to use it in conjunction with docker. I have a Java application that logs everything in JSON to a file inside the docker container. I have created a ln -sf /dev/stdout /opt/application.json symlink, so everything will be output to stdout. Of course, looking into the -json.log file created by Docker in the /var/lib/docker/container/containerid/*-json.log it looks something like this:
{"log":"{\"@timestamp\":\"2019-11-03T12:33:45.658Z\", \"log.level\": \"INFO\", \"message\":\"Login pkahr (philipp.kahr)\", \"service.name\":\"myservice\",\"process.thread.name\":\"http-bio-8080-exec-8\",\"log.logger\":\"com.myservice.server.core.utils.user.ThisDirectoryServiceImpl\",\"log.origin\":{\"file.name\":\"ThisDirectoryServiceImpl.java\",\"function\":\"loadUserByUsername\",\"file.line\":622}}\n","stream":"stdout","time":"2019-11-03T12:33:45.658546603Z"}

My filebeat config looks like this:
filebeat.inputs:
- type: container
  paths:
    - '/var/lib/docker/containers/*/*.log'
  json.keys_under_root: true
  json.overwrite_keys: true
  json.message_key: log
  multiline.pattern: '^{'
  multiline.negate: true
  multiline.match: after

I am using the message decoder like suggested in the README
  - decode_json_fields:
      fields: message
      target: ""
      overwrite_keys: true
  # flattens the array to a single string
  - script:
      when:
        has_fields: ['error.stack_trace']
      lang: javascript
      id: my_filter
      source: >
        function process(event) {
            event.Put("error.stack_trace", event.Get("error.stack_trace").join("\n"));
        }

however, I can see a couple of errors in journalctl -u filebeat -f
filebeat[29865]: 2019-11-03T13:56:09.252+0100        ERROR        readjson/json.go:52        Error decoding JSON: json: cannot unmarshal number into Go value of type map[string]interface {}
filebeat[29865]: 2019-11-03T13:56:21.269+0100        ERROR        readjson/json.go:52        Error decoding JSON: invalid character '-' in numeric literal
filebeat[29865]: 2019-11-03T13:56:21.269+0100        ERROR        readjson/json.go:52        Error decoding JSON: invalid character 'E' looking for beginning of value
filebeat[29865]: 2019-11-03T13:56:21.268+0100        ERROR        readjson/json.go:52        Error decoding JSON: unexpected EOF

filebeat[29865]: 2019-11-03T13:56:17.267+0100        WARN        elasticsearch/client.go:535        Cannot index event publisher.Event{Content:beat.Event{Timestamp:time.Time{wall:0x120f69c0, ext:63708382571, loc:(*time.Location)(nil)}, Meta:common.MapStr(nil), Fields:common.MapStr{"agent":common.MapStr{"ephemeral_id":"f3bb8324-dda5-4dbe-9f1a-6fc86820c37d", "hostname":"CentOS-76-64-minimal", "id":"d8cb4370-3918-40a8-88c5-80a992868234", "type":"filebeat", "version":"7.4.2"}, "ecs":common.MapStr{"version":"1.1.0"}, "host":common.MapStr{"architecture":"x86_64", "containerized":false, "hostname":"CentOS-76-64-minimal", "id":"7d91e31c18374a518bb44ad58646dfeb", "name":"CentOS-76-64-minimal", "os":common.MapStr{"codename":"Core", "family":"redhat", "kernel":"3.10.0-1062.4.1.el7.x86_64", "name":"CentOS Linux", "platform":"centos", "version":"7 (Core)"}}, "input":common.MapStr{"type":"container"}, "log":"", "log.level":"INFO", "log.logger":"com.myservice.server.core.utils.user.ServiceDirectoryServiceImpl", "log.origin":common.MapStr{"file.line":622, "file.name":"ServiceDirectoryServiceImpl.java", "function":"loadUserByUsername"}, "message":"Login pkahr (philipp.kahr)", "process.thread.name":"http-bio-8080-exec-2", "service.name":"myservice", "stream":"stdout", "tags":[]string{"testing"}}, Private:file.State{Id:"", Finished:false, Fileinfo:(*os.fileStat)(0xc00022cc30), Source:"/var/lib/docker/containers/b35f79cc3aa44c98709c3a05dfee5fcc13c92d18b0cff35d821af9820e52c398/b35f79cc3aa44c98709c3a05dfee5fcc13c92d18b0cff35d821af9820e52c398-json.log", Offset:656232, Timestamp:time.Time{wall:0xbf67d03f87d679e9, ext:12500845494, loc:(*time.Location)(0x4de6580)}, TTL:-1, Type:"container", Meta:map[string]string(nil), FileStateOS:file.StateOS{Inode:0x18802e6, Device:0x902}}, TimeSeries:false}, Flags:0x1} (status=400): {"type":"mapper_parsing_exception","reason":"object mapping for [log] tried to parse field [log] as object, but found a concrete value"}

Any idea on how to use the ECS logging in combination with docker? I would love to have it, so I can jump from the APM to the container logs.

@philippkahr Did you ever make progress on this?  I think this is my issue at the moment as well.

@clarkritchie sadly, no I never did any good progress on this. I think I solved it by doing some Docker filesystem mapping and picking it up with filebeat.
I talked to @xeraa  about that a while ago, that's what he has told me.
You can mount files around for Docker logging, but it's probably not the most elegant solution. System.Out is nicer, since you can then just pick up the default docker logs and also enrich them with metadata. https://github.com/xeraa/java-logging shows the different approaches in detail more detail and you can use those. And you will want to pick up the ECS output with https://www.elastic.co/guide/en/beats/filebeat/current/decode-json-fields.html. But I'll try to get a complete example out in the next couple of days anyway.

@philippkahr sorry, this got burried under too much other stuff. I just worked with something similar today and also ran into Error decoding JSON: json: cannot unmarshal number into Go value of type map[string]interface {}.
You are collecting the log files from all the containers ('/var/lib/docker/containers/*/*.log') and try to convert them into JSON (json.message_key: log). Are you running Filebeat in a container as well? Because Filebeat itself doesn't log JSON by default, so trying to convert those logs into JSON will fail. The two workaround could be:

Write the Filebeat logs to a file (logging.to_files: true), so Filebeat won't try to collect its own (non-JSON) logs. Also you would avoid a logging loop when an error in Filebeat triggers a log statement that it then tries to collect itself,...
Annotate on the logged container how it's data should be processed with hints on autodiscovery. The more containers you have running, the more different log formats you will have. Building rules around them will get complicated and unpredictable, so annotating the container itself with its rules should be more straight forward.

Hi, this issue hasn't had any update in a long time !
Regarding integration of ECS logs and APM integration we now have a few "ready to use" examples in our contrib repo: https://github.com/elastic/apm-contrib/tree/main/apm-agent-java/log-ingest.
In particular here, the example 02 uses ECS logging library (the one in this repo) with a filebeat integration.
Those examples remain file-based and do not use auto-discovery, but it should provide you a good start.

You are running into this issue https://github.com/elastic/beats/issues/20053#issuecomment-1899155624
To trigger this you need to have \n at the end of a string field in the current or the previous log, which you do have in the example you posted.
Unfortunately I cannot easily find where to fix the parser or where to add the tests for this.


Request for SFT Training scripts and implementation details

Thank you for sharing your research work. I have a question related to the supervised fine-tuning step, which, according to the paper, is used to initialize the base model before running SimPO. While the SFT configuration file is provided at training_configs/llama-3-8b-base-sft.yaml, may I ask for the SFT training script itself?
In issue #27, there is 1 comment asking about how HuggingFaceH4/ultrachat_200k is processed for SFT. I would like to know this too. HuggingFaceH4/ultrachat_200k samples are multi-turn dialogues. Therefore, I am curious about what labels are used for SFT.

Hi @HCY123902
We used the same SFT training script as the original alignment-handbook repo: https://github.com/huggingface/alignment-handbook/blob/main/scripts/run_sft.py
And the command for SFT training is as follows:
ACCELERATE_LOG_LEVEL=info accelerate launch --config_file accelerate_configs/deepspeed_zero3.yaml scripts/run_simpo.py training_configs/llama-3-8b-base-sft.yaml

As for HuggingFaceH4/ultrachat_200k, we didn't do any specific processing of that. This means we train on all turns if the dialogue is multi-turn.
I hope this helps!
Best,
Yu

Thank you for clarifying this

Hi, following up on this, may I kindly ask if it's possible to provide a separate file for SFT training? The run_simpo script seems to have hardcoded some preference optimization stage, making the command
ACCELERATE_LOG_LEVEL=info accelerate launch --config_file accelerate_configs/deepspeed_zero3.yaml scripts/run_simpo.py training_configs/llama-3-8b-base-sft.yaml

as provided above not runnable.

Hi @OscarXZQ
Sorry there was a typo in my previous comment: run_simpo.py should be replaced with run_sft.py (which is the script in the original alignment-handbook repo). I have fixed the typo.
Best,
Yu


FreeOSMemory  FcntlFlock question

go version 1.12 linux 64bit
i need The program is allowed to run only once. but i found code used “FreeOSMemory”  syscall.FcntlFlock Always return ok.
`package main
import "fmt"
import "os"
import "runtime/debug"
import "time"
import "syscall"
func checkLock() (bool, error) {
f, err := os.OpenFile("test.lock", os.O_WRONLY|os.O_CREATE, 0666)
spec := syscall.Flock_t{
Type:   syscall.F_WRLCK,
Whence: int16(os.SEEK_SET),
Start:  0,
Len:    0,
Pid:    int32(os.Getpid()),
}
if err := syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &spec); err != nil {
return true, err
}
return false, nil
}
func main() {
isLock, err := checkLock()
if err != nil && isLock {
fmt.Println("the program is runing exit.:", err)
return
}
for {
fmt.Println("time.......")
time.Sleep(20000 * time.Millisecond)
debug.FreeOSMemory()
}
}
`
run a test  pid 35758:
[root@node85 ~]# ./test
time ......
time ......
run other test:
[root@node85 ~]# ./test
the program is runing : resource temporarily unavailable
[root@node85 ~]# ./test
the program is runing : resource temporarily unavailable
[root@node85 ~]# ./test
the program is runing : resource temporarily unavailable
[root@node85 ~]# ./test
the program is runing : resource temporarily unavailable
[root@node85 ~]# ./test
time ......
[root@node85 ~]# ll /proc/35758/fd
总用量 0
lrwx------ 1 root root 64 4月   9 12:29 0 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 1 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 2 -> /dev/pts/7
l-wx------ 1 root root 64 4月   9 12:29 3 -> /root/test.lock
lrwx------ 1 root root 64 4月   9 12:29 4 -> anon_inode:[eventpoll]
[root@node85 ~]# ll /proc/35758/fd
总用量 0
lrwx------ 1 root root 64 4月   9 12:29 0 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 1 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 2 -> /dev/pts/7
l-wx------ 1 root root 64 4月   9 12:29 3 -> /root/test.lock
lrwx------ 1 root root 64 4月   9 12:29 4 -> anon_inode:[eventpoll]
[root@node85 ~]# ll /proc/35758/fd
总用量 0
lrwx------ 1 root root 64 4月   9 12:29 0 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 1 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 2 -> /dev/pts/7
lrwx------ 1 root root 64 4月   9 12:29 4 -> anon_inode:[eventpoll]
[root@node85 ~]#

"l-wx------ 1 root root 64 4月 9 12:29 3 -> /root/test.lock" Why did it disappear,I not f.close.

Files open with os.OpenFile have a finalizer attached to them. When the garbage collector notices that they are dead, it runs the finalizer which closes the file.
If you want to keep the file open, you will need to place a runtime.KeepAlive call after all the code that requires that lock file to remain open.

i try add runtime.KeepAlive(f),
code:
func checkLock() (bool, error){
......
if err := syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &spec); err != nil {
return true, err
}
runtime.KeepAlive(f)
......
}
or
func checkLock() (bool, error,*os.File){
}
func main() {
......
for {
fmt.Println("time.......")
time.Sleep(20000 * time.Millisecond)
debug.FreeOSMemory()
}
runtime.KeepAlive(f)
......
}
it's not ok.

The runtime.KeepAlive needs to be after the debug.FreeOSMemory, and it has to be reachable (so not after the infinite for loop).  I would put in as the last statement of your for loop.

ok, it work fine. thanks！


Remove separate NO_CUBLASLT build.

This PR removes the build option NO_CUBLASLT. It additionally removes the runtime check to load the separate nocublaslt variants of the library.
Reasoning:

Having separate library builds adds complexity and extra build time
Since CUDA 11, libcublas actually takes a dependency on libcublasLt already
We have runtime checks against compute capability to avoid calling library functions that would be unsupported

So far I've only tested this on RTX 3060. I do have access to a machine with a GTX 1660, so I'll try to test on that too.

If you want, I have a GTX 1070 (under WSL2, works surprisingly well) I can test on:
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.36                 Driver Version: 546.33       CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1070        On  | 00000000:2D:00.0  On |                  N/A |
|  0%   62C    P0              37W / 185W |   1204MiB /  8192MiB |      1%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

Hey @matthewdouglas @akx,
Tim mentioned that it's probably not safe to remove this.
What's your opinion on this? How can be certain what's what? Currently, I'm not sure how to best proceed.

Did Tim say why it's "probably not safe"? Do we know of an actual situation where cublaslt isn't available? Is such a situation something we want to support?

Did Tim say why it's "probably not safe"? Do we know of an actual situation where cublaslt isn't available? Is such a situation something we want to support?

I'm curious too, but I think there might also be just a naming issue here since the cublasLt has shipped with the CUDA Toolkit since v10.1. It could have been placed in some unusual spots but by the time toolkit 11.0 comes around it's not an issue and we should always be able to link to it. PyTorch binaries ship with it. And if I'm not mistaken, libcublas.so itself depends on libcublaslt.so these days.
The main differentiator here is support for int8 tensor cores (e.g. the check for compute capability >= 7.5). So we would have to make sure to not call F.igemmlt() for such devices. But linking in the libcublaslt code IMO shouldn't be a problem if we're not trying to run the unsupported matmul ops. And there's already a path in MatMul8bitLt for that. We can guard some device code with __CUDA_ARCH__ too.
Some places where cublasLt is used:

int igemmlt<int, int, int>(cublasLtHandle_t ltHandle, int m, int n, int k, ...)
cublasLtOrder_t get_order<int>()
`void transform<T, SRC, TARGET, transpose, DTYPE>(cublasLtHandle_t, T *A, T *out, int dim1, int dim2)

Separately, I believe I remember reading somewhere that there would be intent to actually deprecate the int8 matmul path that does not use tensor cores too (F.igemm, MatMul8bit, and also F.vectorwise_quant, F.vectorwise_mm_dequant).

I'll try to get in touch with Tim to get more info from him and relay the new info you provided. Unfortunately, he didn't give any reasoning at the time.
He's quite unavailable atm, so it might take a few days.
Thanks @matthewdouglas for this thorough and knowledgable analysis, this was once again very helpful!

Superseded by #1401.


Failure when attaching a container to a port

Rancher Versions:
Server: 1.5.3
healthcheck: rancher/healthcheck:v0.2.3
ipsec: rancher/net:v0.9.4   rancher/net:holder
network-services: rancher/metadata:v0.8.11  rancher/network-manager:v0.5.3
scheduler:  rancher/scheduler:v0.7.5
kubernetes (if applicable): No
Docker Version: Docker version 17.03.0-ce, build 60ccb22
OS and where are the hosts located? (cloud, bare metal, etc): Bare Metal
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB) Single Node Rancher with External DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos) Cattle
Steps to Reproduce:
Issue a LB, sometimes works fine, sometimes don't. Once the port is marked as "in use", nothing can be attached to it, even though the port is not actually used.
Results:
(Failed to allocate instance [container:1i3085]: Bad instance [container:1i3085] in state [stopping]: Allocation failed: No healthy hosts meet the resource constraints: [ports: [8090:8090/tcp], ResourceType: instanceReservation, Amount: 1])
Extra information: No application is running in TCP port 8090
netstat -ltpn | grep 8090
root@mini:~#
docker ps -a | grep 8090
root@mini:~#
telnet localhost 8090
Trying ::1...
Trying <IP_ADDRESS>...
telnet: Unable to connect to remote host: Connection refused
Workaround
Restarting the host "fix" the issue and allow to attach a container to the port again.

not able to reproduce this with 1.5.9.... @aimartin are you still experiencing this?

Please let us know in a comment if you can still reproduce the issue, and we'll reopen it


Laravel Dependency Injection of Request issue with Inheritance [bug]

There seems to be some kind of bugs when using Method Injection and Basic PHP Inheritance in the parameters.
Below I have a BaseController that defines a function with a parameter of type Request.
I then create my new controller MyController with MyRequest (which extends from Request) and should work but it's throwing an error:
The exception I get
ErrorException in MyController.php line 11:
Declaration of app\Http\Controllers\MyController::index() should be compatible with app\Http\Controllers\BaseController::index(app\Http\Requests\Request $request)

app\routes.php
Route::get('/', 'MyController@index');
app\Requests\MyRequest.php
class MyRequest extends Request {

}

app\Http\Controllers\BaseController.php
class BaseController extends Controller {

  public function index(Request $request)
  {

  }
}

app\Http\Controllers\MyController.php
class MyController extends BaseController {

  public function index(MyRequest $request)
  {

  }
}

app\Http\Requests\Request is wrong.

Hi @GrahamCampbell we've been trying many things, this error was the last try where we fiddled with the Request we used but we also tried using the Request from Illuminate, the problem is still there.
Declaration of App\Http\Controllers\MyController::index() should be compatible with App\Http\Controllers\BaseController::index(Illuminate\Http\Request $request)

Also, we tried the same example outside of the Laravel framework and it works, it's just when Laravel tries to do dependency injection on the parameters, this concept fails.
MyParameterClassType extends BaseParameterClassType {}

    class BaseClass {

      public function index(BaseParameterClassType $input)
      {

      }
    }

app\Http\Controllers\MyController.php
    class MyClass extends BaseClass {

      public function index(MyParameterClassType $input)
      {

      }
    }

You cannot overwrite a method with a conflicting signature. Why does your
BaseController even have that index method when it is just a (abstract?)
base controller?
Am 20.05.2015 18:36 schrieb "newtonianb"<EMAIL_ADDRESS>
Hi @GrahamCampbell https://github.com/GrahamCampbell we've been trying
many things, this error was the last try where we fiddled with the Request
we used but we also tried using the Request from Illuminate, the problem is
still there.
Declaration of App\Http\Controllers\MyController::index() should be compatible with App\Http\Controllers\BaseController::index(Illuminate\Http\Request $request)
—
Reply to this email directly or view it on GitHub
https://github.com/laravel/framework/issues/8821#issuecomment-103952215.

Please ask on the forums.

k thanks just did
http://stackoverflow.com/questions/30355435/laravel-dependency-injection-of-request-issue-with-inheritance

"the forums" -> http://laravel.io/forum :)

ay was not aware of it, thanks just did too
http://laravel.io/forum/05-20-2015-laravel-dependency-injection-of-request-issue-with-inheritance

USER ERROR :( sorry all it actually does not even work in raw php after all, we just did a sanity check outside of php and confirmed we get the same error. We were so convinced it should work, we either confused with another language or actually remember it working in previous versions of PHP, in any case it doesn't work in php 5.6, whether it should or not is for a different chat.

For reference: this is a feature, not a bug, and due to proper OO.
Your BaseController promises to the outside world a certain interface, and that includes that it will accept any Request instance as parameter to the index() method. Since MyRequest is a subclass of Request, it violates that contract: the MyController will not accept any Request object.
I hope that makes sense. =)

@franzliedke thank you @franzliedke! Makes sense but the confusion sinks in when you define an interface you can actually be lax about this and it does allow the interface definition to be a parent class.

That still makes sense, because by accepting a parent interface, a subclass can still accept anything its parent class accepts, but also more - that is okay from an OO standpoint.

Thanks!


Make grunt build only for current platform

No point building windows binaries on a mac or vice versa

Thanks!

This is wrong. "darwin" is the result of os.platform() on OSX. I created a pull request to fix this.

This is wrong. darwin is the result of os.platform() on OSX. I created a pull request to fix this.

Ha, good catch, who would have thought..


Inconsistent used of localization

With regards to Portuguese, there doesn't seem to be a neutral Portuguese, only Brazilian (pt_BR) and Portugal Portuguese (pt_PT). This is inconsistent with the methods Portuguese which is neutral.
It is also inconsistent with other languages that do have a neutral an a locale such as Zhōngwén (zh) and what I assume is Taiwan Zhōngwén (zh_TW).
I would recommend either renaming pt_PT to only pt or create a copy of pt_PT to pt)

I'm sorry for the lack of activity on this issue. Instead of leaving it open any longer, I decided to close old issues without trying to address them, to longer give the false impression that it will get addressed eventually.
To the reporter (or anyone else interested in this issue): If you're affected by the same issue, consider opening a new issue, with a testpage that shows the issue. Even better, try to fix the issue yourself, and improve the project by sending a pull request. This may seem daunting at first, but you'll likely learn some useful skills that you can apply elsewhere as well. And you can help keep this project alive. We've documented how to do these things, too. A patch is worth a thousand issues!


ODHack: Add Stellar Wallets Kit

Please add PRs to the update-P21 branch
Description:
Integrate the Stellar Wallet Kit into the Soroban Example Dapp to enable more wallet choices.
Repository:
Stellar Wallets Kit
Tasks:

Integrate the wallet functionality into the Soroban Example DApp.
Test the wallet integration to ensure it works seamlessly.
Document the integration process and any modifications made.

Expected Outcome:

A fully integrated Stellar Wallet Kit within the Soroban Example DApp.
Comprehensive documentation on the integration process.
A demo showcasing the wallet functionality.

Why This Is Important:

Integrating the Stellar Wallet Kit will enhance the Soroban Example DApp's capabilities, providing a robust and secure solution for choosing various wallets within the Stellar ecosystem.

Hello @Julian-dev28 ,
I'm interested in picking up this issue. I'm Pedro, a full stack developer looking to join the web3 community. I have some experience with Soroban, having managed wallets using soroban-react. Taking a general overview, I think that Stellar-Wallets-Kit seems more maintainable to implement.
By the way, I was looking for a project that already implements the Stellar Wallets Kit. Do you have one to recommend?
Thank you!

Hey @PedroCo3lho
Thanks for picking this up!
There are a few commits you can reference that might help you out:
https://github.com/stellar/soroban-dapps-challenge/commit/d53690ec4578a6b0995a5adad3d04e150c6aefdb#diff-8074f794edfcd0a89e53130be3621f6bf4841b14de5bfc20e8e828ee84c4b4cc
https://github.com/stellar/soroban-dapps-challenge/commit/140e212affc673eacaa908d523c974ab4fd3fd24#diff-8234c742ce101536cedd4673e7c856a171b2422e16b315ed07771ff42fc380a6
https://github.com/stellar/soroban-dapps-challenge/commit/b397b177016cec879fc7b8108f00c320d781ee66#diff-f9ca05a175cb7eefe7980619b444695ba3a501d5ee133925e4ac32f3f9291ad5
Looking forward to the results!

Hello @Julian-dev28, I probably won't finish this issue by the end of the LambdaHack, because I'm having trouble setting up the repo locally. Specifically, I'm having problems with the deployment of the abundance token contract. Take a look:
#Deploy on Futurenet
npm run setup

><EMAIL_ADDRESS>setup
> ./initialize.sh ${NETWORK:-futurenet} && npm install

Using soroban binary from ./target/bin
Using futurenet network
  RPC URL: https://rpc-futurenet.stellar.org:443
  Friendbot URL: https://friendbot-futurenet.stellar.org/
Add the futurenet network to cli client
Add futurenet to .soroban-example-dapp for use with npm scripts
Fund token-admin account from friendbot
Build contracts
cargo fmt --all
cargo build --target wasm32-unknown-unknown --no-default-features --release
    Finished `release` profile [optimized] target(s) in 1m 07s
cd target/wasm32-unknown-unknown/release/ && \
        for i in *.wasm ; do \
                ls -l "$i"; \
        done
-rwxr-xr-x 2 pedro pedro 7570 Jul  9 05:00 abundance_token.wasm
-rwxr-xr-x 2 pedro pedro 10798 Jul  9 05:00 soroban_crowdfund_contract.wasm
Deploy the abundance token contract
error: jsonrpc error: ErrorObject { code: InvalidParams, message: "invalid parameters", data: Some(RawValue("json: cannot unmarshal array into Go value of type methods.GetLedgerEntriesRequest")) }

#own Futurenet node
Deploy the abundance token contract
error: jsonrpc error: Networking or low-level protocol error: Server returned an error status code: 405

#Localnet/Standalone
NETWORK=standalone npm run setup

><EMAIL_ADDRESS>setup
> ./initialize.sh ${NETWORK:-futurenet} && npm install

Using soroban binary from ./target/bin
Using standalone network
  RPC URL: http://localhost:8000/soroban/rpc
  Friendbot URL: http://localhost:8000/friendbot
Add the standalone network to cli client
Add standalone to .soroban-example-dapp for use with npm scripts
Fund token-admin account from friendbot
Build contracts
cargo fmt --all
cargo build --target wasm32-unknown-unknown --no-default-features --release
    Finished `release` profile [optimized] target(s) in 0.88s
cd target/wasm32-unknown-unknown/release/ && \
        for i in *.wasm ; do \
                ls -l "$i"; \
        done
-rwxr-xr-x 2 pedro pedro 7570 Jul  9 05:00 abundance_token.wasm
-rwxr-xr-x 2 pedro pedro 10798 Jul  9 05:00 soroban_crowdfund_contract.wasm
Deploy the abundance token contract
error: jsonrpc error: Parse error: invalid type: integer `5276`, expected a string at line 1 column 227

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hi! I'm Lau Chaves, and I am excited to contribute to this issue!
I bring over five years of experience working with JavaScript, React, TypeScript, and Ruby. Additionally, I am well-versed with Stellar wallet kits, having previously installed the kit in a local repository and thoroughly read all relevant documentation. Here are some of the resources I've consulted:

Stellar Wallets Kit Documentation
Stellar SDKs Documentation

How I plan on tackling this issue
To address this issue, my approach would be as follows:

Install the Stellar Wallet Kit in the repository.
Integrate the wallet functionality into the Soroban Example DApp.
Test the wallet integration to ensure seamless operation.
Document the integration process and any modifications made.
Create a demo showcasing the wallet functionality.

I'll have a pull request ready within 3-5 days!
Thank you for considering my application. I look forward to the opportunity to contribute!

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, I'm a Rust developer, smart contract researcher, and frontend developer. I will leverage my skills on the frontend part of the project and ensure I deliver the best work possible.
How I plan on tackling this issue
The initial step in addressing the problem is to analyze the Dapp's UI and UX to identify any weaknesses. Next, I will outline improvements to make the design more intuitive. Following this, I'll focus on enhancing the Dapp's responsiveness to ensure it operates smoothly and is user-friendly. Testing is crucial, so I will evaluate the Dapp across various browsers and devices.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, my name is Bernal. I am a software developer from Costa Rica. Currently, I work as a back-end developer. In my previous job, I worked as a full-stack developer. Personally, I enjoy developing both the back end and the front end. I have 4 years of experience in the software development industry. Some technologies I have worked with include: Typescript, React, C#, and Node.
How I plan on tackling this issue
To reach the solution, the first step is to understand how the project works. This involves familiarizing yourself with the project's documentation, structure, and codebase. Next, thoroughly review the issue description to grasp the problem fully. Based on this understanding, brainstorm and propose a viable solution. Once you have a clear plan, implement the solution in the code. After coding, conduct comprehensive tests to ensure the fix resolves the issue without introducing new problems. Finally, review your changes and prepare them for submission, ensuring all aspects of the issue have been addressed effectively.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I've been working in a project with stellar wallets kit
How I plan on tackling this issue
Implementation of the kit and testing transaction

GM GM!!... Hey @Julian-dev28 . I have previously worked with the stellar https://github.com/vmmuthu31/StellarHunt wish to work on this pr please assign me!.. will take over the issue

Hey 👋  is this still open for contribution? If so I'd love to work on it!
I already posted the approach I'd follow some comments above https://github.com/stellar/soroban-example-dapp/issues/155#issuecomment-2254885080


CyberTruck-Viv

This was an amazing experience allowing me to learn an entire new programming language while doing something cool which I will be able to code into a robot. Really enjoyed this project.

The snapshots folder needs to be lowercase and you should only reference one image.


Use sqla-raw instead of custom db script

Remove db.py
Add sqla-raw to requirements in setup.py
Change query.py to use raw.db instead of nerium.db

Tests passing

Codecov Report

Merging #58 into trunk will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             trunk       #58   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            9         8    -1
  Lines          213       186   -27
=========================================
- Hits           213       186   -27

Impacted Files
Coverage Δ

nerium/query.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Reimplement computation of non-Gaussianity

Non-Gaussianity amplitude is no longer computed in v0.3 (i.e., in multi-field version). It needs to be reimplemented.
This would require optimizations for InflationValue as right now using expressions large enough as is required for non-Gaussianity would be very slow (because intermediate expressions are recomputed many times and not cached).
Also, non-Gaussianity amplitude should be renamed to be more specific as to which non-Gaussianity it is.

Main issue here is that we need equations for speed of sound and non-Guassianity for a multiple-field general Lagrangian. Otherwise, s-correction to scalar spectral index cannot be computed.


PegaMKTSMS and PegaMKTEmail are Valid NodeTypes for CDH Deployments

Describe the bug
PegaMKTSMS and PegaMKTEmail are Valid NodeTypes for CDH Deployments and there is no configurational way to pass in those NodeTypes
To Reproduce
Set the -DNode=PegaMKTSMS or PegaMKTEmail , we get an error from the platform its invalid nodetype the valid applicable NodeTypes are [Search, WebUser, BIX, BackgroundProcessing, Custom1, Custom2, Custom3, Custom4, Custom5, DDS, ADM, Batch, RealTime, RTDG, Stream]
Expected behavior
For CDH Deployments we should include- PegaMKTSMS and PegaMKTEmail as a valid NodeTypes
Additional context
As of today there is no way to pass the ApplicableNodeTypes environment value to tomcat.
Currently in existing cloud cuttyhunk deployment tomcat images have an option to pass the applicable NodeTypes and we need  similar param in tomcat for CDH deployments in this repo to pass applicableNodeTypes

Hello, any updates on this? CDH installation requires to have PegaMKTSMS and PegaMKTEmail node types.

You can set applicable node types by adding -DapplicableNodeTypes= to the JAVA_OPTS environment variable.


Join two nodes when one has no data

For example I have 2 metrics (temp1, temp2). But only one has incoming data. Maybe temp2 sensor is turned off, does not matter. For my condition  "t1.value" > 0 OR "t2.value" > 0  temp2 is not relevant. But I didn't see in the log any point with prefix P1 after join, join does not happen. So the question is how to make full outer join in my case?
PS. if temp2 has incoming data it works fine
var temp1 = batch
    |query('SELECT mean(value) AS value FROM "my_db"."autogen".temp1')
        .period(10s)
        .every(5s)
        .groupBy(time(2s), *)
        .fill(0)
    |log()
        .prefix('P0-1')
        .level('DEBUG')

var temp2 = batch
    |query('SELECT mean(value) AS value FROM "my_db"."autogen".temp2')
        .period(10s)
        .every(5s)
        .groupBy(time(2s), *)
        .fill(0)
    |log()
        .prefix('P0-2')
        .level('DEBUG')

temp1
    |join(temp2)
        .tolerance(5s)
        .fill('null')
        .as('t1', 't2')
    |default()
        .field('t1.value', -1)
        .field('t2.value', -1)
    |log()
        .prefix('P1')
        .level('DEBUG')
     |where(lambda: "t1.value" > 0 OR "t2.value" > 0)
     |alert()

I'm seeing the same behavior that fill('null') or fill(value) does not work on the JoinNode.

Looking at the join code I have a hunch that I'm hitting this condition.
For example one has measurement A and B and measurement A has series A,x A,y and A,z and B has series B,x and B,y outer join will only join A,B,x and A,B,y because of that condition. If B would have B,z but some points were missing then the outer join would work as defined.
Could this be fixed or at least the documentation be updated to avoid confusion?

Kapacitor: 1.5.3
InfluxDB: 1.7.8
Hi guys,
I have a TICKscript like this:
var req_all = stream
|from()
.measurement('request_log')
|window()
.period(1m)
.every(1m)
|count('step')
.as('cnt')
var req_err = stream
|from()
.measurement('request_log')
.where(lambda: "status" =~ /^5\d\d$/)
|window()
.period(1m)
.every(1m)
|count('step')
.as('cnt')
req_err
|join(req_all)
.as('err', 'all')
.fill(0)
|eval(lambda: "all.cnt", lambda: (float("all.cnt") - float("err.cnt")) / float("all.cnt") * 100.0)
.as('qpm', 'succ_rate')
|influxDBOut()
.database('data')
.measurement('request_stats')
It doesn't work properly. The symptom is like that mentioned above. I cannot see the result data in my InfluxDB when the task is running. However, the result data will be written into InfluxDB when I disable the task.
from4 [avg_exec_time_ns="18.189µs" errors="0" working_cardinality="0" ];
from4 -> window5 [processed="0"];
window5 [avg_exec_time_ns="0s" errors="0" working_cardinality="0" ];
window5 -> count6 [processed="0"];
count6 [avg_exec_time_ns="0s" errors="0" working_cardinality="0" ];
count6 -> join8 [processed="0"];
from1 [avg_exec_time_ns="22.796µs" errors="0" working_cardinality="0" ];
from1 -> window2 [processed="713133"];
window2 [avg_exec_time_ns="28.023µs" errors="0" working_cardinality="1" ];
window2 -> count3 [processed="2825"];
count3 [avg_exec_time_ns="6.653µs" errors="0" working_cardinality="1" ];
count3 -> join8 [processed="2825"];
join8 [avg_exec_time_ns="140.31µs" errors="0" working_cardinality="1" ];
join8 -> eval9 [processed="0"];
eval9 [avg_exec_time_ns="0s" errors="0" working_cardinality="0" ];
eval9 -> influxdb_out10 [processed="0"];
influxdb_out10 [avg_exec_time_ns="0s" errors="0" points_written="0" working_cardinality="0" write_errors="0" ];

The workaround for me was to union two streams first. And then to join the completed stream with the United stream.  Pretty ugly but it do the job if you have one full and one partial stream and want to outer join them

The workaround for me was to union two streams first. And then to join the completed stream with the United stream. Pretty ugly but it do the job if you have one full and one partial stream and want to outer join them

Thank you, man. Now I'm using a method similar to yours.
It seems that each stream in a join must has data coming in in every window, or else the join will not output any data. In my scenario, I use the tail plugin of Fluent Bit to fetch some data from our application logs. To make at least one error ocrrurs in every window, I use another plugin named exec to echo a dummy entry every minute and add a type field to distinguish them from the genuine entries.
Then in Kapacitor, I divide the original stream into three, all entries with dummy ones (for count only), error entries with dummy ones (for count only) and all entries without dummy ones (for count and other aggregations), by WhereNode. Each stream has at least one point in every minute. After some other nodes like GroupByNode etc, multiple streams generated by the the three streams will be joined. Then I use an EvalNode and in one of its lambda expression I substract the ERROR count from the ALL count. Because the two counts both contain the number of dummy entries, the result will filter them out, then it will be divided by the count of the third stream. You may have guessed that I want to work out the success rate.
PS: I don't use the where property method of the FromNode, because it comes before the WindowNode. There seems to be a deviation in the window range if streams each with an individual WindowNode joined together even if the parameters of their every and period methods are totally the same and the align methods are also used.

The workaround for me was to union two streams first. And then to join the completed stream with the United stream. Pretty ugly but it do the job if you have one full and one partial stream and want to outer join them

Could you share a sample on how you got this working?
I tried this approach, but not seeing the results expected for outer join -- it's still giving the results of an inner join.
var s1 = batch | query(..).period(1h).every(10s).groupBy('f1', 'f2')
var s2 = batch | query(..).period(1h).every(10s).groupBy('f1', 'f2')

var u1 = s1 | union(s2)

s1 | join(u1) | log()

Another problem I observed was with the results of union itself --
Sometimes it's getting split across different run of the batch:
15:10:12 -> s1r1, s1r2
15:10:22 -> s2r1, s1r1, s1r2, s2r1

where s1r1 & s1r2 are results of s1 and s2r1 is that of s2


compile error

Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io
Description
I did the following:
git clone --recursive https://github.com/apache/incubator-mxnet.git
cd incubator-mxnet
make -j4
Error Message:

Can someone  tell me how to solve this issue.

Could you please provide the error message?

Please install cmake

Thank you
I instaledl cmake,and got the following error:

Seems BLAS is missing. You need install either openblas or mkl and set USE_BLAS=openblas or mkl respectively in the make line.

BTW, you can follow this document to build MXNet from source: https://mxnet.incubator.apache.org/versions/master/install/ubuntu_setup.html#build-mxnet-from-source

@yongfang1995  It looks like you have finished the compilation successfully. I will close the issue now. Feel free to reopen if you still have problem on it.


5.0.0 has a different file structure

zip contains inside a tar file and it contains TShock.Server binary and not the .exe
https://github.com/beardedio/terraria/blob/0e3c13e8db78898868122c562dfe0a30a4fa030a/containers/tshock/5.0.0/Dockerfile#L23

This is fixed with my latest updates.


[CT-717] Add Grants to BigQuery Materializations

blocked by: https://github.com/dbt-labs/dbt-core/issues/5263
Once the above work is merged into core, there are some tweaks that need to be made in the BigQuery adapter to fully expose the feature:

[ ] add a call to apply_grants(..., revoke=True) to all custom materializations
[ ] override apply_grants so that it directly makes the API call to revoke grants (BigQuery Docs) instead of getting sql from get_revoke_all_sql.

Following up on latest thinking in https://github.com/dbt-labs/dbt-core/issues/5263#issuecomment-1145773353, there may actually be a way to do this that's SQL-only, without any API calls. That may be slightly slower, but it's much more visible, and easier to debug.
Docs:

https://cloud.google.com/bigquery/docs/table-access-controls
https://cloud.google.com/bigquery/docs/information-schema-object-privileges

Defaults should work for:

get_grant_sql
get_revoke_sql, IFF we take the "more sophisticated" approach of calculating diffs, since BQ only supports revoke [specific_privilege], not revoke all

We'd need a custom version of get_show_grants_sql, which should look like (pseudo code):
select * from {{ relation.project }}.`{{ target.location }}`.INFORMATION_SCHEMA.OBJECT_PRIVILEGES
where object_schema = '{{ relation.dataset }}' and object_name = '{{ relation.identifier }}'

Example flow
grant `roles/bigquery.dataViewer` on dbt_jcohen.my_table to<EMAIL_ADDRESS>
select * from `region-us`.INFORMATION_SCHEMA.OBJECT_PRIVILEGES
where object_schema = 'dbt_jcohen' and object_name = 'my_table';

{  "object_catalog": "dbt-test-env",  "object_schema": "dbt_jcohen",  "object_name": "my_table",  "object_type": "TABLE",  "privilege_type": "roles/bigquery.dataViewer",  "grantee"<EMAIL_ADDRESS>
revoke `roles/bigquery.dataViewer` on dbt_jcohen.my_table from<EMAIL_ADDRESS>
The cool thing about BigQuery is that we could actually perform the show + revoke + grant statements all in one dynamic "script," using "procedural SQL", if we so chose. That's fairly different from the general implementation we'd need on other databases, though.

Will this also work for Authorized Views? @jtcohen6
I can't find any SQL example of revoking just that view from the dataset without having to

call the dataset,
get the whole list of views and
remove just that view
update the dataset.

I can see that done via API calls in Python from https://cloud.google.com/bigquery/docs/samples/bigquery-revoke-dataset-access

@avipaul6 This will not work for authorized views, for the reasons you've indicated.
dbt already supports authorized views on BigQuery today, but the syntax is pretty wonky, and differs from the standard we're looking to implement in this feature: https://docs.getdbt.com/reference/resource-configs/bigquery-configs#authorized-views
Our main constraint here by what BigQuery StandardSQL makes available. I'm definitely interested in future work that reconciles / rationalizes dbt's approach to standard grants with the dataset operations required by authorized views.


Resolved #1. Removed node_modules from repo

Moreover, I think node_modules in .gitignore needs to be replaced with node_modules/

@acedened Yes, you're right, I do not pay attention to it.

Guys Thank you for helping)


Add aliases to a literal argument

Adds a way to add aliases to a literal argument

This should be done either by adding another Literal with your alias, or add a Word with the possible values.

bruh


The path is different for M1 Macs; also issues with openssl at v3 when you need v1.1 for the driver to work

These paths don't work on M1
sudo ln -s /usr/local/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /usr/local/etc/odbc.ini /etc/odbc.ini

Also need openssl v1.1 to work instead of v3 but there is no instruction for setting up v1.1

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1c0de6fb-19ae-ff6f-8e73-ce66fa94bd64
Version Independent ID: 34edd099-f4fe-4ac3-cdd4-abc87b35270b
Content: Install the Microsoft ODBC driver for SQL Server (macOS) - ODBC Driver for SQL Server
Content Source: docs/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos.md
Product: sql
Technology: connectivity
GitHub Login: @David-Engel
Microsoft Alias: v-davidengel

@xiaodaigh -- thank you for your feedback.  Please consider these resources:

SQL Server on Microsoft Q&A
DBA Stack Exchange
Stack Overflow

@David-Engel -- please look into this issue.

@xiaodaigh
I suggest asking for help over at https://github.com/microsoft/homebrew-mssql-release/issues
You didn't include much detail on the problem you are encountering, but this issue related to OpenSSL 3.0 may be related: https://github.com/microsoft/homebrew-mssql-release/issues/59
Regards,
David

Closing this as the author has already provided feedback and there were no updates.


Simplified prescription

Arv drugs for prescription are filtered by regimens
Dropdown for Arv selection and typeahead for non-Arv

Missing:

Validate to avoid downgrade of therapeutic line
Stop/cancel active prescriptions

Requires

Regimen concepts in: ARV_Regimens-1.zip
Last changes of Pharmacy Module - @Guimino still to commit
Drug regimen mapping - @Guimino to publish
Rest Ws module v2.19

Is this the PR for the last changes?

Yes @ynurmahomed this is according with the last requirements and specs


Add Mark and Unmark implementation and make some formatting adjustment

Added Mark and Unmark Implementation in DG.
Made some changes to the formatting of the uses cases as well as fix some of the links.
Added more user stories.

LGTM

LGTM


build: allow building with Foundation from the toolchain

This is meant to be used to build the Windows toolchain which uses a
staged build where Foundation is not built and used from the build root.

@swift-ci please test


[Bug] Scale Transform Breaks Flex Containers

General

[X] I have updated to the latest version of MySpeed.
[X] My bug has not been reported yet.

The Bug
When hovering flex containers, there is a scale transform to resize. This breaks flex containers on my 21x9 monitor. I've attached a video... ignore the audio, I was listening to a podcast at the time.
MySpeed.webm
What device are you using to access the page?
In the browser
Which operating system is your MySpeed instance running on?
Windows

Thanks for reporting that. I'm gonna have a look into that.


Use dmenufm instead of nautilus

I think dmenufm (https://github.com/huijunchen9260/dmenufm) would fit my setup nicely.

Don't really need a file manager for now.


feat: Add new volume type "SecretReferenceVolume"

The new volume can be used to mount existing secrets to a container. It's required for mounting the pure::variants license file, which was part of the k8s.py before. In this commit, it's moved to the p::v session hook.
Resolves https://github.com/DSD-DBS/capella-collab-manager/issues/938

Tested in the staging environment with production feature model content 👍


[BUG] image shortcode throwing error on about page

Describe the bug 描述你遇到的错误
The about.md page isn't able to recognise the image shortcode.
Expected behavior 期待的行为
All shorcodes should be accessible in the about.md page.
Screenshots 屏幕截图

The same shortcode works in a posts/ page.
Build Environment 构建环境

OS: Ubuntu 22.04
theme: 0.4.0
Hugo: 0.112.3

Preview Environment 预览环境

OS: Ubuntu 22.04
theme: 0.4.0
Hugo: 0.112.3

Additional Information 补充信息
No frontmatter in case of about.md page.

Ok, it seems that a frontmatter is needed. I added a draft key and it works.


Feat:design changes done

I just made the design changes we approved in the Discord server, made changes for the navbar, project cards in projects page, active members styles and alignmet in main page.

All the updates you made look awesome!!I'd like if you left the nav as it was though. I think it works better with the site for now.

Alright I'll make the changes

Great job @Yudai-creator!!


Unity 2018.2 IL2CPP support

Hello,
I have been working recently on trying to get this working on 2018.2 using IL2CPP since .NET is being deprecated. To make things easier for myself untangled the dlls and wrapped it in compiler directives. But for some reason I can not, for the life of me get, past this "No capture devices available" when initializing the MediaCapture. I tried dumbing it down as much as possible into:

var allFrameSourceGroups = await MediaFrameSourceGroup.FindAllAsync();

        var candidateFrameSourceGroups = allFrameSourceGroups.Where(group => group.SourceInfos.Any((a) => a.SourceKind == MediaFrameSourceKind.Color && a.MediaStreamType == MediaStreamType.VideoPreview));
        var selectedGroup = candidateFrameSourceGroups.First();

        _mediaCapture = new MediaCapture();

        var mediaCaptureInitSettings = new MediaCaptureInitializationSettings()
        {
            SourceGroup = selectedGroup,
            SharingMode = MediaCaptureSharingMode.ExclusiveControl,
            MemoryPreference = MediaCaptureMemoryPreference.Cpu,
            StreamingCaptureMode = StreamingCaptureMode.Video
        };

        try
        {
            await _mediaCapture.InitializeAsync(mediaCaptureInitSettings);
        }
        catch (Exception e)
        {
            Debug.Log("Camera initialization failed: " + e.Message);
        }

But using il2cpp just really brakes the ability to run InitializeAsync(). Starting to suspect that there is a Unity bug going on here. Any tips?

Hello, we noticed that the retrieve of Matrix4x4 using the C# command "as" return null when converted by IL2CPP.
To correct this we made our own translation using Marshalling and unmanaged/managed call.
But apparently Unity has fixed the translation of arrays with IL2CPP on the Unity Editor 2018.2.16.
You should update your editor version, it fixes a lot of issues regarding IL2CPP.
Regards.

Yup, upgrading to .16 fixed the issue.


"Accept Part" should be called "Accept Word"

Testing #172029
"Part" is a term we use for UI elements.
"Word" is a better term here.
Or is there a reason I am missing for this case?

It also accepts non-word parts, e.g. in if (true) it would accept if,  (, true, )

We also call "navigate word" our word navigation commands, even though they stop at non words.
I think it is expected that "word" in this context means "word separator", and that users will not be surprised by this minor imprecision.

I didn't know what "Accept Part" means at all until I pressed the keyboard shortcut. "Accept Word" with how it behaves in most cases, and for the corner cases like separators, I agree with @isidorn that it's the same as other existing commands.


Add new guide to database keys

Did you read the instructions in the README?

Y

Have you read the instructions in CONTRIBUTING?

Y

Have you written this article by yourself? Have you taken inspiration from anywhere and then written it in your words?

I have written this article by myself in my own words, using my knowledge from daily database use and factual corrections from Database System Concepts chapter 2 by A. Silberschatz et al.

@kaprijela sorry for not reviewing this! Great article. Merging it right away!


Variable creation for Data types

So far, we did not have a functionality for adding variables for Data types except through dispatching on the model type. That may lead to issues with respect to method ambiguities. Hence, a new method is sought after.
Introducing variables for Data types should follow the following three standards:

they should be only introduced for the required nodes that require them,
they should be indexed over the node and not the data, and
they should not require changes to the core code.

Point 2 is the reason we cannot use the same approach as applied for Node types as we would in this case index over the data, and not the node.
A potential solution for this problem, still utilizing the core structure developed for Node types, is outlined below. It requires the introduction of a function variables_data(m, 𝒩, 𝒯, 𝒫, modeltype) to the function create_model given by:
function variables_data(m, 𝒩::Vector{<:Node}, 𝒯, 𝒫, modeltype::EnergyModel)

    # Extract all Data types within all Nodes
    𝒟 = reduce(vcat, [node_data(n) for n ∈ 𝒩])
    if isempty(𝒟) return end
    # Vector of the unique data types in 𝒟.
    data_composite_types = unique(typeof.(𝒟))
    # Get all `Data`-types in the type-hierarchy that the nodes 𝒟 represents.
    data_types = collect_types(data_composite_types)
    # Sort the `Data`-types such that a supertype will always come before its subtypes.
    data_types = sort_types(data_types)

    for data_type ∈ data_types
        # All nodes of the given sub type.
        𝒟ˢᵘᵇ = filter(data -> isa(data, data_type), 𝒟)
        # Convert to a Vector of common-type instad of Any.
        𝒟ˢᵘᵇ = convert(Vector{data_type}, 𝒟ˢᵘᵇ)
        try
            variables_data(m, 𝒟ˢᵘᵇ, 𝒩, 𝒯, 𝒫, modeltype)
        catch e
            # Parts of the exception message we are looking for.
            pre1 = "An object of name"
            pre2 = "is already attached to this model."
            if isa(e, ErrorException)
                if occursin(pre1, e.msg) && occursin(pre2, e.msg)
                    # 𝒟ˢᵘᵇ was already registered by a call to a supertype, so just continue.
                    continue
                end
            end
            # If we make it to this point, this means some other error occured. This should
            # not be ignored.
            throw(e)
        end
    end

    # Add the variables for the required nodes.
    for n ∈ 𝒩, data ∈ node_data(n)
        variables_data(m, data, n, 𝒯, 𝒫, modeltype)
    end
end

In addition, we have to create two additional functions:
function variables_data(m, 𝒟ˢᵘᵇ::Vector{<:Data}, 𝒩::Vector{<:Node}, 𝒯, 𝒫, modeltype::EnergyModel)
end

function variables_data(m, data::Data, n::Node, 𝒯, 𝒫, modeltype::EnergyModel)
end

The first function is used to create empty variable containers through the application of SparseVariables, while the second would only inserts the variables for the nodes that have the corresponding data.
Another required change is to define the following function.
node_data(n::Availability) = Data[]

This function may be in general dangerous as it requires that if one wants to define a new composite subtype of Availability, one has to define as well the function for this type. However, the throught process is that Availability nodes should not include the data field.
The code runs with these functions added, but I have not tested it for additional variable creation. The function for looping through the types is however working. I have not added SparseVariables either, as it is not yet registered.

I think this is a promising approach.

Data is a very general term, would it be easier to understand if we call it something that explains that it is for extension packages? I.e. something like ExtensionData perhaps
I was hoping we could avoid the manual type checking and just dispatch on the nodes/links directly. I don't quite understand why we need to sort the types, I guess a subtype may add more or fewer variables/constrains depending on the use case.

Could dispatching on the type itself for generating the (empty) containers using SparseVariables be a solution? That would allow someone writing an extension package to only exploit knowledge about which subtypes use the same variables/constraints.
We would still need to check that the variable has not already been added, as multiple subtypes may define the same variables. I can't think of a way to avoid it completely, but at least we only need to do it once for each type.
See stylized example below:
	# Simplified node structure for illustration
	abstract type GenericNode end
	struct ANode <: GenericNode
		id
	end
	struct BNode <: GenericNode
		id
		val
	end

	# Methods to create (empty) containers based on the node (or link) types
	function variables_extension(m, nt::Type{<:GenericNode}, N, T, P, modeltype)
		return "add variable containers with SparseVariables"
	end
	function variables_extension(m, nt::Type{BNode}, N, T, P, modeltype)
		return "add variable containers for `BNode` with SparseVariables"
	end

	# Methods to create variables for actual nodes
	function variables_extension(m, n::GenericNode, N, T, P, modeltype)
		return "create variables for generic nodes"
	end
	function variables_extension(m, n::BNode, N, T, P, modeltype)
		return "create variables for `BNode`s"
	end

	# Simplified test with two node types
	N = [ANode(1), ANode(2), BNode(3,9), BNode(4,3)]
	m = nothing
	T = 1:2; P = 1:2; modeltype = nothing

	# First create containers
	for nt ∈ unique(typeof.(N))
		variables_extension(m, nt, N, T, P, modeltype)
	end

	# Then create actual variables where needed
	for n ∈ N
		variables_extension(m, n, N, T, P, modeltype)
	end

If instead of adding the variables (containers) directly, we had methods reporting what variables they would need for each type and then only generating unique ones could be a way, or would that be too complicated? E.g. report the name it wants to add for the type as a symbol along with the desired indices and then create them together at a later point?

Regarding your two points:

I am fine with recalling it. If we change the name, it is however a breaking change, as far as I see it, as we change the abstract type for all extension packages. So far, it is only the case for EnergyModelsInvestments, but we also have internal packages where we utilize the abstract supertype Data. In addition, constructors in all packages have to be changed.
The outline you mention is the reason for the loop for Nodes, but I do not see a reason why it should be necessary for the extension data, without thinking through all potential implications. In this case, we use SparseVariables, so we do not need to have the type structure deduced as long as all supertypes are called. Sorting is not necessary, the try catch will be necessary, except if we add the logic for checking if a variable is created within variables_extension. I am not the biggest fan of this approach, mostly as

However, your comment brings up a problem in my initial code I did not consider too much. Consider the following case in which we have an intermediate supertype:
# Intermediate supertype
abstract type ExampleData <: Data end

# First composite type
struct ExampleDataA <: ExampleData
end

# Second composite type
struct ExampleDataB <: ExampleData
end

If we want to define variables for all ExampleData, and additional variables for ExampleDataA, but not for ExampleDataB, then we have two possibilities:

Add additional data to both ExampleDataA and ExampleDataB through the direct function. In this case, we would also need to check whether a variable is already declared and have to repeat the variable addition to the sparse containers.
Go through all supertypes of the declared ExampleDataA to add the variable.

Personally, I would prefer the second approach. This way, we reduce one point of error for users using the functionality as they do not have to consider the logic whether a variable name is already registered.


Failed to decode registry token from auth request

I'm receiving this error from Krustlet trying to pull images from a public (!) GCR registry.
As shown below, wasm-to-oci can push|pull images to this registry and I've configured it to support public (non-authenticated) access. I'm able to run regular containers from it on the cluster without problem.
kubectl describe pod/hello-world-wasi-golang
Name:         hello-world-wasi-golang
Namespace:    default
Priority:     0
Node:         krustlet/
Labels:       <none>
Annotations:  Status:  Failed
Message:      Failed to decode registry token from auth request
IP:
IPs:          <none>
Containers:
  hello-world-wasi-golang:
    Image:      gcr.io/${PROJECT}/hello-world-wasi-golang:v1
    Port:       <none>
    Host Port:  <none>
    Environment:
      FOO:             bar
      POD_NAME:        hello-world-wasi-golang (v1:metadata.name)
      CONFIG_MAP_VAL:  <set to the key 'myval' of config map 'hello-world-wasi-golang'>  Optional: false
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-x75t7 (ro)
Conditions:
  Type           Status
  PodScheduled   True
Volumes:
  default-token-x75t7:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-x75t7
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     krustlet/arch=wasm32-wasi:NoExecute
                 node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason     Age        From               Message
  ----    ------     ----       ----               -------
  Normal  Scheduled  <unknown>  default-scheduler  Successfully assigned default/hello-world-wasi-golang to krustlet

I'm able to pull regular containers from the same registry to the same cluster.
PROJECT=....

docker pull hello-world
docker tag hello-world gcr.io/${PROJECT}/hello-world
docker push gcr.io/${PROJECT}/hello-world

kubectl run hello-world --image=gcr.io/${PROJECT}/hello-world

kubectl logs pod/hello-world

Hello from Docker!
...

I tried retrieving a copy of hello-world-wasi-rust:v0.1.0 from webassembly.azurecr.io, adding it to gcr.io/${PROJECT}/hello-world-wasi-rust:v1 and then reconfiguring the Pod YAML to reference it, but I get the same error.
go run ./cmd pull webassembly.azurecr.io/hello-world-wasi-rust:v0.1.0
INFO[0001] Pulled: webassembly.azurecr.io/hello-world-wasi-rust:v0.1.0
INFO[0001] Size: 1964621
INFO[0001] Digest: sha256:670adc71...

go run ./cmd push module.wasm gcr.io/${PROJECT}/hello-world-wasi-rust:v1
INFO[0003] Pushed: gcr.io/${PROJECT}/hello-world-wasi-rust:v1
INFO[0003] Size: 1964621
INFO[0003] Digest: sha256:54b09224...

This should be fixed by #255, but I haven't yet looked into the test failures there.

If the GCR registry is configured to be public, @peterhuene proposed changes work for me:
go run ./cmd push \
./hello-world-wasi-rust \
gcr.io/${PROJECT}/hello-world-wasi-rust:v4
INFO[0001] Pushed: gcr.io/.../hello-world-wasi-rust:v4
INFO[0001] Size: 1964621
INFO[0001] Digest: sha256:356ef906...

Then:
sed --in-place 's|hello-world-wasi-rust:v1|hello-world-wasi-rust:v4|g' rust.yaml
kubectl apply --filename=rust.yaml
kubectl describe pod/hello-world-wasi-rust
Name:         hello-world-wasi-rust
Namespace:    default
Priority:     0
Node:         krustlet/
Labels:       <none>
Annotations:  Status:  Succeeded
IP:
IPs:          <none>
Containers:
  hello-world-wasi-rust:
    Container ID:
    Image:         gcr.io/.../hello-world-wasi-rust:v4

and:
ls -l ${HOME}/.krustlet/.oci/modules/gcr.io/.../hello-world-wasi-rust
v1
v3
v4

If the GCR registry is configured to be private even if the cluster is configured to access the registry, I get a different error:
kubectl describe pod/hello-world-wasi-rust
Name:         hello-world-wasi-rust
Namespace:    default
Priority:     0
Node:         krustlet/
Labels:       <none>
Annotations:  Status:  Failed
Message:      error decoding response body: missing field `detail` at line 1 column 273

Pulling from a private registry requires supporting imagePullSecrets afaik.
My guess is that the response coming back is a 401/403 that's not JSON, perhaps needed accept headers aren't being set with the auth request?

I believe imagePullSecrets isn't supported yet for fetching images.

Nope ^

updated the title to reflect the current status.

The issue with authing against GCR was fixed in #255.

I've got a proof of concept that works with ACR (though I'm not sure if I'm doing the right thing for the general case!).  Will pick this up and refine my solution into something more product-like unless anybody else wants to claim it.


Components code updation

Do you have any plans to update the lib or not?
Some components has been update inside flutterflow, so in the current lib they stops to work.
For exmple:
FlutterFlowDropDown (        // isOverButton: true,
// isSearchable: false,
// isMultiSelect: false,)
AnimationInfo (old variant "effects")

Or, may be you can to publish distributive  of flutterflow, that corresponding current version of flutterflow-ui ?

AnimationInfo works ok with https://github.com/FlutterFlow/flutterflow-ui/releases/tag/v0.3.1
FlutterFlowDropDown not tested, but I hope is works too, so close the issue


support set sync resources with wildcard

issue: https://github.com/clusterpedia-io/clusterpedia/issues/168
all-resource wildcards
- group: "*"
   resources:
   - "*"

group resource wildcards
- group: "apps"
   resources:
   - "*"

Note:
The all-resource wildcard will generate many long connections, so if the user does not need to synchronize all resources, it is recommended to specify the type of resources or only synchronize custom resources https://github.com/clusterpedia-io/clusterpedia/pull/112.
And if you want to use full resource wildcard, you need to enable feature gate --feature-gates=AllowSyncAllResources=true.

@Iceber the values.yaml of chart pkg  need update yet.

@calvin0327 Thanks, Updated


Added a Package.swift file with Targets

Summary
Provide a general description of the code changes in your pull
request... were there any bugs you had fixed? If so, mention them. If
these bugs have open GitHub issues, be sure to tag them here as well,
to keep the conversation linked together.
Other Information
If there's anything else that's important and relevant to your pull
request, mention that information here.
Thanks for contributing to the Watson Developer Cloud!
Resolves #120

This change is

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

Thanks, @rfdickerson! Appreciate the fix. :)


Add more elements to Metadata for DAC

New metadata variables:
active_recruitment: cohort is actively recruiting participants
ehr_data: includes participant Electronic Health Record data
irb_approved_data_sharing: IRB-approved data sharing
includes_50_to_60: includes participants in the 50-60 year old age range
longitidinal_data: collects longitudinal health data
recontact_in_place: if re-contact is in place (ability to re-contact participants)
This is a cohort-level item, same as biospecimens and environmental_data. See below for JSON example.
@rosibaj is this something you would want to/be able to add to the browser?
Corresponding PR is here: https://github.com/IHCC-cohorts/data-harmonization/pull/134

@beckyjackson if this is provided in the JSON, then we can add the field to the browser; boolean fields like this show as a Any/Yes/No selector.
What does re_contact mean?  this may not be clear on the frontend for users.

This is from the DAC document, they just have it listed as "Re-contact in place". I believe this means that they re-contact study participants, but maybe @mcourtot could provide more insight?

Hi @rosibaj - I made a mock cohort-data.json entry based on the 6 new metadata variables I listed above (I updated the top comment). I added a few based on the IHCC DAC survey and the data management recommendations.
The new cohort data would look like this (I excluded the GECKO mappings to keep it shorter). These are the actual values for GCS:
{
  "active_recruitment": false,
  "available_data_types": {
    "biospecimens": true,
    "ehr_data": false,
    "environmental_data": true,
    "genomic_data": false,
    "longitudinal_data": true,
    "phenotypic_clinical_data": true
  },
  "cohort_name": "Golestan Cohort Study",
  "countries": [
    "Iran"
  ],
  "current_enrollment": 50000,
  "enrollment_period": "2004:2008",
  "includes_50_to_60": true,
  "irb_approved_data_sharing": true,
  "pi_lead": "Reza Malekzadeh, Christian Abnet, Paolo Boffetta, Paul Brennan, Farin Kamangar, Arash Etemadi",
  "recontact_in_place": true,
  "target_enrollment": null,
  "website": "https://dceg2.cancer.gov/gemshare/",
},

Does this format look good to you? I put longitudinal_data and ehr_data under available_data_types, but let me know if you think that should be moved out.

@beckyjackson this looks fine. - placement of ehr and longitudinal lgtm
@mcourtot can you confirm what the recontact_in_place means?  I want to confirm as this may need a different header on ui to make it understandable to users.

@beckyjackson this list contains all of the cohorts - what is the list of cohorts that should just be available on the DAC portal?

@beckyjackson this list contains all of the cohorts - what is the list of cohorts that should just be available on the DAC portal?

@beckyjackson a could questions about the data as well:

can we make all values consistent?  i can see Blood and blood
For the demo, we would like to add 2 temporary fields: GWS Polygenic Risk Score collection (true/false) and Collected Imaging (values of MRI , PET, and CAT).  Would you be able to add those to this draft?

@beckyjackson a could questions about the data as well:

can we make all values consistent?  i can see Blood and blood
For the demo, we would like to add 2 temporary fields: GWS Polygenic Risk Score collection (true/false) and Collected Imaging (values of MRI , PET, and CAT).  Would you be able to add those to this draft?

what is the list of cohorts that should just be available on the DAC portal?

I wasn't aware that there should be a different set of cohorts. @mcourtot could you let us know if the DAC portal should only show a subset of all cohorts?

can we make all values consistent?

Looking at the JSON, I only see upper-case "Blood"

For the demo, we would like to add 2 temporary fields

Yep, I can add these in. We are planning to add the imaging terms to GECKO, but I don't think they will be ready in time for the demo.

what is the list of cohorts that should just be available on the DAC portal?

I wasn't aware that there should be a different set of cohorts. @mcourtot could you let us know if the DAC portal should only show a subset of all cohorts?

can we make all values consistent?

Looking at the JSON, I only see upper-case "Blood"

For the demo, we would like to add 2 temporary fields

Yep, I can add these in. We are planning to add the imaging terms to GECKO, but I don't think they will be ready in time for the demo.

Just following up, I do not have "GWS Polygenic Risk Score collection" data for any of the cohorts.

Just following up, I do not have "GWS Polygenic Risk Score collection" data for any of the cohorts.


Add support for applying an alpha value to resolved colors.

Overview
This branch updates the resolveColor helper function to accept an optional alpha value to be applied to resolved colors.
I have updated the CalendarDay streak highlighting stories to demostrate how this can be utilized.
Security
REMINDER: All file contents are public.

[x] I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.

[x] Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
[x] There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.

[x] These changes do not introduce any security risks, or any such risks have been properly mitigated.

Describe briefly what security risks you considered, why they don't apply, or how they've been mitigated.

No new security risks.  This change just allows for applying optional alpha transparency to resolved colors.

Checklist
Testing

[ ] MyDataHelps iOS app
[ ] MyDataHelps Android app
[ ] MyDataHelps website

Documentation

[x] I have added relevant Storybook updates to this PR as well.

@greinard not sure I get this.  ColorDefinition is just 2 strings that get applied to CSS so you should be able to just supply an RGBA value?   It shouldn't need to be separate?

The reason I had for this functionality is to be able to highlight things or apply backgrounds to things based on a specified color without needing to have additional specific color properties for each of those things.
In this example, "Symptoms", "Impacts", and "Triggers" each have a color (purple, orange, black).  The edit button uses the primary color (blue).  Using this updated resolveColor function, I am able to apply the text color using the specified colors, but highlight them with partially transparent backgrounds (based on the same color), without needing to directly specify those background colors.  If the color of one of these things changes, such as the primary color, the background of the button automatically adjusts.

Looking at it a bit more.  I can probably accomplish what I am trying to do with some adjusted CSS rules.  Let me take a stab at that real quick, and if that works, I'll close out this PR.

I was able to get this working with some adjusted CSS rules.  I do have a feeling that this functionality may come up as a useful thing to have in the future, but for the time being, I'm going to close this PR.


ResourcePackState unwind error

I am currently running

SpongeForge version: spongeforge-1.12.2-2555-7.1.0-BETA-2842.jar
SpongeVanilla version:
Java version: 1.8.0_152
Operating System: Windows 10

Plugins/Mods:

[09:29:18] [Server thread/INFO]: Mods (7): Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, SpongeForge, mercurius_updater
> sponge plugins
[09:29:26] [Server thread/INFO]: Plugins (6): Minecraft, Minecraft Coder Pack, SpongeAPI, SpongeForge, HuskyUI, WinterFellRP

Issue Description
Seem to have a 50/50 chance of triggering this when logging into the server
https://pastebin.ubuntu.com/26429042/

Test Plugin: https://pastebin.ubuntu.com/26429076/

I've prepared a fix for this, just waiting for a review of my new keep-alive hack.


Kode Studio update schedule?

what is update schedule for the Kode Studio?
I have some bugs in existing version, may be problem with Kore that already fixed.
Or is there way to upgrade Kore and Kha in existing Kode Studio?

There's no schedule but you can either set the khaPath option in Kode Studio (file->settings->user settings) or put a Kha subdir in your project.


⚠ ClamAV has degraded performance

In 80aed23, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 70 ms

Resolved: ClamAV performance has improved in e26140c after 5 minutes.


Fix: printing empty string does nothing in editor output pannel

Fix: #38490

Thanks!

Cherry-picked for 3.2.2.


Design: Track provenance of TaskRuns and PipelineRuns

Expected Behavior
It should be possible to look at the data contained in a TaskRun or a PipelineRun and determine what led to the creation of this Run, for example:

If the Run was created manually
If the TaskRun was created to fulfill a PipelineRun
If the PipelineRun was created in response to some event (not functionality that we have yet, see #315)

Actual Behavior
We have a field called trigger which is being used for this purpose:
https://github.com/tektoncd/pipeline/blob/19bf18abe2f7e71c5eb3ee6ff10351643db5510b/pkg/apis/pipeline/v1alpha1/taskrun_types.go#L95-L115
But as seen in #816:

this confuses people
it might make sense to use annotations instead

Additional Info
See also the pipeline listener proposal

For TaskRun, we can tell if it was created via a PipelineRun by looking at the labels currently.

I agree that the field here is confusing. I think in general annotations/labels would make more sense for this type of data.

This also looks like something that could be accomplished in the dashboard UI.

@bobcatfish I feel this issue should be either closed or rewritten. The trigger field is gone, now the way to know what started a taskrun or pipelinerun would be "achieved" using some standard annotation/labels, that could be set by the cli, triggers or any other tool.
I think we should document those, and define some best practice

I think closing this makes sense until we have a clear need for it and we can come up with some options - probably annotations is the way to go!


No clipping fill_text() outside the canvas

This is easily seen in the example game_of_life.
If add some number to frame.height() at code below, the text will be displayed on button "Clear"
let text = Text {
    color: Color::WHITE,
    size: 14.0,
    position: Point::new(frame.width(), frame.height() **+ 30.0**),

Screenshot

Related to #41.


Update to account for recent events

😉

Thank you for your contribution. I'm afraid we can't accept this change.


chore: user-permission type change

Earlier user permission type was UserManagementTypes.permissionType after this change it will be of type option<UserManagementTypes.permissionType>.

This will also solve the issue where after refresh the old user-permission was getting persisted


function accepting a union type ends up unsoundly casting to any

Consider the following code:
type MaybeWithDefault<T> = $ReadOnly<{default: T}> | T; // same result in the other order, or w/o $ReadOnly

function maybeWithDefault<C>(obj: MaybeWithDefault<C>): C {
  return (obj && obj.default) || obj;
}

(maybeWithDefault({default: 1}): empty); // returns 1
(maybeWithDefault(1): empty);            // also returns 1

(As motivation, this is a function you might want to call on the result of import() when you don't know if you have an ES6 or CJS module.)
It's not totally clear to me what the result of this should be: perhaps flow should complain about the definition maybeWithDefault, since maybeWithDefault<{default: number}>({default: number}) does not have type {default: number} but rather number.  (For this reason it's not totally clear to me what the correct type of this function is.)  But it should definitely complain somewhere: we have a perfectly valid function which Flow now claims returns empty.
Note that if you give explicit structural types (e.g. {default: number}) to the arguments, it still fails.  But if you write them both as MaybeWithDefault<number>, it correctly complains about the cast to any.
It's possible this is related to #7300 -- certainly it's related to my last addendum there -- but since the example is pretty different I figured I'd make a separate issue.

Here's an interesting variant: if I try to type MaybeWithDefault as
type MaybeWithDefault<T> = $ReadOnly<{default: T}> | $Diff<T, {default: mixed}>;

now passing {default: 1} gives the right output type, but 1 does not.  (I now realize this is not the correct type: $Diff wants an object, and doesn't do what I want anyway.  But it's interesting in the context of the bug)  This appears to be because Flow is unable to coerce 1 to MaybeWithDefault<number> -- but instead of erroring as such it just coerces to empty.  If I add an explicit type of MaybeWithDefault<number> to the 1, flow now errors on both sides, as it should: once because it cannot cast 1 to MaybeWithDefault<number>, and once because it cannot cast the result to empty.

Aha!  I've found the correct way to type this function, and once I do, Flow is happy with it:
type Undefault = <T>($ReadOnly<{default: T}> | T) => T;

function maybeWithDefault<C>(obj: C): $Call<Undefault, C> {
  return (obj && obj.default) || obj;
}

So the bug is probably in the fact that the type I originally gave maybeWithDefault is not correct -- and rather than reporting a type error in the definition, flow deduces that the type is uninhabited, and proceeds from that contradiction to the original issue.
As a side node, I tried to simplify the type like so:
type Undefault = <T>($ReadOnly<{default: T}> | T) => T;

const maybeWithDefault: Undefault = (obj) => {
  return (obj && obj.default) || obj;
}

This definition errors all over the place.  The errors are kind of meaningless: they say things like
`T` [1] is incompatible with `T` [2]

(where those two Ts do refer to the same type variable, I believe) but I think they do point to the fact that neither of these types are quite right.  Somehow the $Call seems to cause Flow to do what I want, but anything that makes <U>(U) => $Call<T, U> a different type from T seems quite suspicious to me.  (I guess in lambda-calculus land this is called an η-conversion.)

As you probably realize, the type Undefault is empty. Its type
requires it to discriminate in ways that the runtime elision cannot
(α-renaming default to x for readability):
// @flow
type Undefault = <T>($ReadOnly<{x: T}> | T) => T;
declare var f: Undefault;
const a: {x: 1} = f<{x: 1}>({x: {x: 1}});
const b: {x: {x: 1}} = f<{x: {x: 1}}>({x: {x: 1}});
// Both of the above expressions elide to `f({x: {x: 1}})`, so they must
// evaluate to the same value, but no value has type `{x: 1}` and also
// type `{x: {x: 1}}`.

(Flow Try link.)
Accordingly, the type expression $Call<Undefault, C> doesn’t make
sense to me. What type should $Call<Undefault, {x: {x: 1}}> evaluate
to? It has to evaluate to two incompatible types!
Aside: as long as you’re using && and || with parameters of generic
type, you should probably be aware of #6671. I can’t tell that it’s
directly related to this issue.
(And, :wave: !)

:wave: and thanks for the response!

As you probably realize, the type Undefault is empty.

You make a good point!  I had convinced myself that something weird and universally-quantified was going on as long as the <T> is on the right side (<T>(...) rather than Undefault<T>) but now I don't think that makes any sense -- you end up filling in the quantifier sooner or later.
That all said: I wonder if what's going on here has something to do with how flow interprets unions as having some sort of left-first precedence.  (Which I think I've seen mentioned on other issues, although now I can't find them and it doesn't appear to be documented.)  That is, Flow is interpreting $ReadOnly<{x: T}> | T as something to the effect of $ReadOnly<{x: T}> | (T \ $ReadOnly<{x: T}>) (where \ is set-difference).  If we interpret union as such, then the type is correct (f<{x: {x: 1}}> can accept an {x: {x: {x: 1}}}, but not an {x: {x: 1}}).
Given that definition of union, unless I'm missing something the "correct" type signature with Undefault is in fact correct, and Flow understands it.  In that case the bug is somehow triggered by specifying the type argument, or by writing it the first way I tried (which perhaps similarly counts as specifying the type argument).  Or perhaps it's better to say Flow is inconsistent as to which meaning of union it uses.
As an aside, $await has a similar type:
https://github.com/facebook/flow/blob/2ac56861e3ceff9ca406ae586fbafb3480c6c0b7/lib/core.js#L643
I wonder how that works -- I suppose in practice it's somewhat difficult to create a Promise<Promise<T>> since the Promise spec does its best to collapse those whenever possible, but it's surely a concern in theory!

Aside: as long as you’re using && and || with parameters of generic
type, you should probably be aware of #6671. I can’t tell that it’s
directly related to this issue.

Huh, good to know!  I agree it doesn't seem to matter here -- and anyway I'm not super worried about type-checking of this function itself, rather of its callers, so problems with && only matter to me insofar as they allow me to write an incorrect type and have Flow accept it.

Here is another strange observation about your original code—Flow will
in fact raise the proper errors at the call site if you inline the
parameter type alias, MaybeWithDefault<C>:
// @flow

type MaybeWithDefault<T> = $ReadOnly<{default: T}> | T;
function f<T>(obj: MaybeWithDefault<T>): T {
  return (obj && obj.default) || obj;
}
// No errors on either of the following!
(f({default: 1}): empty);
(f(1): empty);

function g<T>(obj: $ReadOnly<{default: T}> | T): T {
  return (obj && obj.default) || obj;
}
// Appropriate errors on both of the following!
(g({default: 1}): empty);
(g(1): empty);

So clearly at least part of this is a bug and not just some convoluted
formulation of unions and universals.

with how flow interprets unions as having some sort of left-first
precedence

Ugh… thanks for the pointer to #2212 (a fitting issue number); I’ve been
trying to find a reference to this for a while. Yes, Flow’s algebra of
types leaves something to be desired:

intersections are not commutative;
intersections are not associative;
unions do not absorb (x: T should imply x: T | U);
and, as you now point out, unions are not commutative.

That is, Flow is interpreting $ReadOnly<{x: T}> | T as something to
the effect of $ReadOnly<{x: T}> | (T \ $ReadOnly<{x: T}>)

I’m not exactly sure what you mean by this. Extensionally, those sets
are of course identical, so it’s not just a question of what the union
operator does, but something about how it interacts with instantiation
of universal quantifiers. Right?

I wonder how that works -- I suppose in practice it's somewhat
difficult to create a Promise<Promise<T>> since the Promise spec
does its best to collapse those whenever possible, but it's surely a
concern in theory!

Right. I’ve asked a friend who knows way more about this than I do and
will post back if he has any insights.

I’m not exactly sure what you mean by this. Extensionally, those sets
are of course identical, so it’s not just a question of what the union
operator does, but something about how it interacts with instantiation
of universal quantifiers. Right?

Yeah, I'm not exactly sure how to rigorously describe what I mean, but it's the fact that that quantifier may be a part of some other type as well that is important.  (Also, I now realize it should really be $ReadOnly<{x: T}> | (T \ $ReadOnly<{x: mixed}>) or something -- well I think that mixed should be whatever the bound on T is.)  So in particular (dropping the $ReadOnlys just to make this less verbose) {x: T} | (T \ {x: mixed}) is equivalent to T, but ({x: T} | (T \ {x: mixed})) => T is not equivalent to T => T -- if T is an {x: mixed} we have to take the left option.  We can fill in say T = {x: number} to get {x: {x: number}} => {x: number}, but not to get {x: number} => {x: number} -- if we want the left side to be {x: number} we need T = number.  Again, I'm not sure about the rigorous construction but it feels like there exists a consistent definition that should be possible here.

This is now erroring under inference_mode=lti


How to transpile particular dependency in node modules?

Question
Description
How do I add an exception for a webpack loader? I need to transpile one dependency, and I know that node_modules folder gets excluded from transpiling. I have a dependency that I install from GitHub. I don't know how to set this up correctly with docz, and wondered in which direction should I look.
my doczrc.js file looks like this:
export default {
  modifyBundlerConfig: config => {
    const newConfig = config;
    newConfig.module
      .rule('js')
      .test(/\.(js|jsx|mjs)$/)
      .include.add(/node_modules\/circuit-ui/)
      .end();

    return newConfig;
  },
};

but obviously it does not work. Do you have any suggestions ?
P.S. thank you for such a great project!

I have resolved the issue, will share my solution later.

@ilyanoskov , I'm having a similar issue, could you share what you came up with?

@good-idea , this is how I ended up doing it. I manually found the particular jsRule through console.logs and added an exclusion. Let me know if this helps :)
import { babel } from 'docz-plugin-babel6';

export default {
  plugins: [babel()],
  modifyBundlerConfig: config => {
    const jsRule = config.module.rules.find(rule => rule.test.test('*.js'));
    jsRule.exclude = [/node_modules(?!\/circuit-ui)/];

    return config;
  },
};


No error message from the current line

When the error occurs, in the current line, the red strip appears but not the error message.
The message with the error is just found on the bottom of the page.

Duplicate of https://github.com/sindresorhus/atom-jshint/issues/121.


supermarket management system

supermarket management system and #3802

Close #3802

Checklist:

[x] I have mentioned the issue number in my Pull Request.
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have created a helpful and easy to understand README.md

@MohitGupta121 please merge it

@TusharKesarwani @MohitGupta121 @pranjay-poddar merge please

@TusharKesarwani @MohitGupta121 @pranjay-poddar merge this PR


Software Libraries required to work with this repo or a pip list

It would be very helpful to list all the packages needed for this specific repository. It makes it easy to install with a pip list for beginners.

To install all the dependencies: pip install matplotlib numpy scikit-learn tensorflow keras umap-learn
Please note that tensorflow is not mandatory but you need a backend for keras. Tensorflow is the recommended backend by the Keras website.


Johannes/107/updatemodel

Update model and routes
Issue Number(s): #107.
Added attempted and skipped to categories and updated mongodb model
Testing
use<EMAIL_ADDRESS>as the new updated user to test routes.

samrat help


deno: 1.9.1 -> 1.9.2

Motivation for this change
Bump deno to 1.9.2
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[X] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 120436 run on x86_64-linux 1

1 package built:

deno

Running a Catalina build


Header tags opening and closing tags are not matching

Closing header tags are sometimes h5

Thanks @CarpenterJoseph for checking out SpectaQL! One of these was recently fixed (but not published), but the other one is new to me, so thanks! Will fix.


Possible to license the same as rustlang where we can choose MIT or Apache 2?

Description
Is it possible to license godot-orchestrator the same as rustlang where we can choose MIT or Apache 2?
Implementation ideas
Was curious so that if we do want to merge into core it's possible.

Was curious so that if we do want to merge into core it's possible.

Hi @fire, when you say "core", are you explicitly referring to merging this work under Godot's main repository?

Well I'm not sure if it's something this year, but maybe something in the far far future.
https://github.com/godotengine/godot/blob/master/LICENSE.txt

Hi Fire. At this time we are not looking to duel licensed Orchestrator.


Create a Code of Conduct in GitHub

Acceptance Criteria:

We have an official Code of Conduct, agreed upon by the majority of todays Active RV Maintainers

E.g. see https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project

We could definitely consider the Contributor Covenant "Code of Conduct" v2.1. It even has a sweet "OTHER FORMATS: TEXT/MARKDOWN" link!


“nlog” NLog(4.7.4) Is Logger and LogManager thread safe?

“nlog” NLog(4.7.4) Is Logger and LogManager thread safe?

To quote my answer on Stackoverflow:

Creating a logger is thread-safe
Writing log messages is thread-safe
Usage of the context classes and renderers are (GDC, MDC etc) thread-safe
Adding new targets + rules at runtime is thread-safe (When using LoggingConfiguration.AddRule + ReconfigExistingLoggers)
Performing Reload of LoggingConfiguration will cause LogEvents from active loggers to be dropped until reload has completed.
Changing values of existing rules and targets at run-time isn't thread-safe!

You should avoid changing the values of existing items at runtime. Instead one should use the context renderers (${event-properties}, ${GDC}, ${MDLC}, etc.)

I assume your question has been answered, if not, please let us know!

Thank you !

I assume your question has been answered, if not, please let us know!

Thank you!


Move diagnostics to separate top level library

The diagnostics functionality as mentioned in issues such as #9568 is too useful to be bundled inside Flutter and tied up with other items that pull in UI-dependencies. The use case and benefit would be developing similar plugins for Dart apps running in non-UI VMs to inspect data structures.

Seems reasonable at a glance. @jacob314, how would you feel if someone wanted to extract the foundation/diagnostics.dart logic into a separate package that we would import?
@kriswuollett One difficulty to be aware of: Since Flutter would end up using the same package, it would force people using this package and Flutter to use the same version as Flutter, even if that brought in breaking changes. If this is something that interests you, though, we would certainly consider a PR that moved this to the flutter/packages github repo.

I think moving it to a separate package is a great idea.


Better layout for code

http://splatoperator.com/2011/11/run-sinatra-app-in-a-subdirectory-with-rackbuilder-map/

Layout is currently good.


HSEARCH-3878 Maximize utilization of database connections during mass indexing

https://hibernate.atlassian.net/browse/HSEARCH-3878
I didn't have time to run full performance tests, but I did examine how it improves the behavior of backend executors.
Below are Gantt charts of the indexing batches handled by the backend during mass indexing. Each swimlane is an executor, and each "task" is a batch, with the color of each task ranging from dark red (few documents) to light green (many documents).
I generated this data by mass indexing in the Hibernate Search Wikipedia demo. The application indexed approximately 35000 entites, a lot of which are quite text-heavy (Wikipedia pages).
(for future reference, here was the command I executed: logs2gantt --regex "(?P<datetime>[^,]+) TRACE.*((?P<start>Processing)|Processed) (?P<scalar>[0-9]+).*executor '(?P<swimlane>.+)'" --output-format=png --output=lucene-after.png lucene-after.log)
Elasticsearch

Lucene

Analysis
It's pretty clear with Lucene; a bit less so with Elasticsearch. The batch sizes are much more consistent, a sign that we're keeping the backend busy enough that it always has leftover work in the queue. All that while using the exact same amount of database connections.
Regarding throughput: before the change, we indexed about 850 doc/s; after the change, we indexed about 900 doc/s (1000 for Lucene). The throughput change is not significant enough to say there was an improvement, especially considering the setup was far from real-world setups (one laptop with postgres + 2 ES nodes running on the same machine). Nevertheless, I think it's a good sign that the throughput did not decrease.
Conclusion: we got exactly what we wanted, but further testing is required to see if we got a throughput improvement as a bonus.

Looks good, merged thanks!