WIP - updated preinstall and postinstall scripts for cross OS compatibility

Description

Currently, the preinstall and postinstall scripts execute with rm and cp commands that are not available on Windows OS.
This is causing npm install to fail on Windows.
This is tricky since the preinstall script runs before any modules are installed. I could not use modules like rimraf or fs-extra. I used Node to handle the removing and copying files. Node should be installed on machines that runs NPM so it should be reliable.
  "scripts": {
    // other scripts
    "preinstall": "(rm .git/hooks/* && cp ./.githooks/* .git/hooks) || true",
    "postinstall": "rm -f node_modules/web3/index.d.ts node_modules/web3/types.d.ts",
    // other scripts
  }

Note: rm and cp command is used in a dependency gulp-ts-spellcheck and this is causing npm install to fail in this repo.
Related Issue

Motivation and Context

So our community of Windows contributors can continue helping out on this project.
How Has This Been Tested?

Ran npm install
Note: rm and cp command is used in a dependency gulp-ts-spellcheck and this is causing npm install to fail in this repo.
Screenshots (if appropriate):
Types of changes

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

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

I like this.
@srfrnk - Can you test and merge? Also, I know you're against gulp-ts-spellcheck working in Windows, but how about doing the same there?

I would like to perform a proper design process for tasks issues that change design patterns being used in our code.
Please hold this issue until we can do that.

See https://github.com/DAVFoundation/dav-js/commit/ca2ea379b49b81e02fa1b4ac2556b115925827a6
Should make this PR obsolete

@mariolo1985 Can you verify if this works in Windows?

Hey @mariolo1985 Can you please try now?
I removed the postinstall entirely for now.

Hi @srfrnk the error above remains when I ran npm install. I re-forked this repo to ensure master and my fork are even.
It seems to be erroring out on gulp-ts-spellcheck's post install script (cp ./.githooks/* .git/hooks) || true

@mariolo1985 This was an issue with gulp-ts-spellcheck. Published a new version now. Should fix it. Can you please try again?

It looks like that fix did it @srfrnk :man_dancing: I was able to run npm install without erroring out and npm run jest for a sanity check.

That's great news 🎆
@mariolo1985 could you let the person who also got this error on the other issue know?


feat: autoRetry can now return a value

Useful for retrying e.g. until a certain value is found in the target DOM (as required e.g. by vikejs/vike#2005).

Released in 0.5.37.


request handler added

I took the recommandation from #17 and did a straight-forward implementation.
I implemented it a simpler manner, not passing the request and response objects. Looking forward to your comments!

The code needs a couple change to make the async hook work.
It looks like not all functions that return Task and are named *Async are in fact async in BricklinkClient. Is there a reason for this?
Here is an example:

Thanks for your contribution! I'll release a 1.6.0 version tomorrow 👍


fix(utils): adding new labels

Adding new labels to github_utils.

We should add a section for each new label here as well.


meow

Summary

Customer Impact

Added

Changed

Deprecated

Removed

Fixed

Security

Things worth calling out

Other things to consider:

[ ] Prefix your PR title with feat: , fix: , chore: , docs: , refactor:  or test: .
[ ] Sample blueprints are updated with new SDK changes
[ ] Updated public documentation with new SDK changes (Immutable X and Immutable zkEVM)
[ ] Replied to GitHub issues

/label release


Unable to Reach Target and others

There are instances when the bot cant proceed because no enemy is within the range of the Fleet. Will the bot automatically move my fleet? I waited for a while but my fleet is not moving.
Also, is there a guide to install this bot in a phone?

Hello!
No, the bot doesn't/can't detect the tiles it can move to. An event map must be on "clearing mode" for it to work.
Yes, the script works with a phone too. The device it interacts with is of no importance. Steps to run it on a phone:

Enable debugging on your phone, google it.
Close any other instances of android on your computer and plug your phone.
Type in the console "adb tcpip 5555" and unplug your phone from the PC. Note: You need Wi-Fi enable on the remote device, so your comptuter can find it.
See what internal IP was your device given by DHCP. Something along the lines of: <IP_ADDRESS>. Replace the IP on line№2 of config.ini.
Run the script.

If what you intented to say is: run the script itself from the phone, then I don't know how can I help you.

Thank you @UserFromSpace, great answer.

if you want use this bot in a phone.
make sure your phone have only screen 1920x1080

Closing this issue since the questions asked were answered.
If you are looking for a script that runs entirely on phone you might want to try your luck at AnkuLua forum.


VS Code freezes regularly on macOS 12.3 with Apple M1

I'm using the latest stable VS Code on my MacBook Pro 2021 with M1 chip for programming Python (and C++).
I have been having issues with VS Code randomly slowing down and freezing until macOS asks to stop it. Then I have to terminate VS Code and restart it. That happens multiple times within a couple of hours, so it's really annoying when coding & debugging.
The freeze happens out of nowhere. CPU load is very low, I'm not doing anything special or running expensive other programs in the background.
I can't really reproduce the freeze quickly, but it does happen regularly (roughly every 0,5-2h).
Seems like other users also have this issue: https://github.com/microsoft/vscode/issues/122111 and https://github.com/microsoft/vscode/issues/129076
Unfortunately, these issues were closed and locked without providing a solution.

VS Code Version: 1.65.2
OS Version: macOS 12.3
MacBook Pro 2021 with Apple M1 Pro chip

My extensions are:
code --install-extension alefragnani.Bookmarks
code --install-extension cschlosser.doxdocgen
code --install-extension eamodio.gitlens
code --install-extension jeff-hykin.better-cpp-syntax
code --install-extension mhutchie.git-graph
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension ms-toolsai.jupyter
code --install-extension ms-toolsai.jupyter-keymap
code --install-extension ms-toolsai.jupyter-renderers
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-vscode-remote.remote-ssh
code --install-extension ms-vscode-remote.remote-ssh-edit
code --install-extension ms-vscode-remote.remote-wsl
code --install-extension ms-vscode.cmake-tools
code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cpptools-extension-pack
code --install-extension ms-vscode.cpptools-themes
code --install-extension njpwerner.autodocstring
code --install-extension trond-snekvik.simple-rst
code --install-extension twxs.cmake

Since I need the extensions for development and I can't quickly reproduce the freeze, I couldn't test if the freeze eventually occurs with all extensions disabled.
Also, I tried recording a crash dump as described here, but no dump was created. Maybe because VS Code froze and didn't crash.
Any help is really appreciated. This really disturbs my coding workflow.

Any ideas? My guess is that this is connected to mypy somehow.

Can you reproduce the freeze with 1.66 which comes with a newer runtime ? If it still repros, can you take a process dump following the steps below,
* Once the freeze happens, note the process ID of the window/workbench that froze using `code --status`
* Open Activity monitor and find the process with the same ID
* Double click on the process and choose the sample option button in the new window
* Attach the generated sample in this issue

Also are you using the apple silicon build or the universal build ?

Please take process dump for the window process which has the high CPU consumption.

@deepak1556 I'd closed my ticket - I'm on an Intel Mac - and it is still doing the same thing. I cannot get you a sample because the process is not responding - the sample window just hangs. I can't even screen capture it because nothing responds now.

I'm also having this issue on a MacBook Air M1 Monterey (12.1) - VS Code version 1.66.0

Update: I've downloaded Visual Studio Code for Insiders and it seems to work fine.

Our team suspects our use of iTerm and NodeJS. I'm planning to work with these & another IDE, and see if my Mac still freezes today.

Happened with the other IDE, instant freeze, fan spunup & laptop crash/restart. 5 minutes after starting up local server, Node.js v14.15.4.

Same issue. Regularly getting. Except in my case it never happens when docker is not running. It seems to be related with docker. Will try getting a dump.

Problem still persists. It happens with 1.67.2 but not with 1.67.0 insiders version. This is an incredibly annoying problem and I would love to help for anyone interested in debugging this issue...

+1

facing same issue

Also having this issue on an Intel mac, macos 12.1. Occured after I updated from pylance v2021 to v2022.

I found that excluding vscode from the time machine seems to solve the
problem. At least for about a week now it has been way better.
On Sat, May 28, 2022, 4:03 PM William T Clarke @.***>
wrote:

Also having this issue on an Intel mac, macos 12.1. Occured after I
updated from pylance v2021 to v2022.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/145387#issuecomment-1140329360,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSI4PRWA4GELSHXQ5MVFLTVMKC3FANCNFSM5RBQBWJA
.
You are receiving this because you commented.Message ID:
@.***>

@trkee As in the workspace folder or the actual vscode app?

https://support.apple.com/en-il/guide/mac-help/mh15622/mac

The vscode app.

For me, either slow freezes or hard fast crashes with VSCode, both stable & Insiders edition, and Webstorm, when running latest version of Node w/Nginx. We suspect it's with the OS memory management.

I'm facing the same issue here, with my mac M1, my OS is Monterey 12.3.1, vscode version: 1.67.2. I use vscode to run flutter, and when I use Android Studio it works pretty well.

Facing the same issue. ☹

@sumerc thanks for the Code Helper (Renderer) process sample, can you also provide the sample of Code Helper and Code processes when the freeze happens. Also can you check the following,
(i) Does launching with code --disable-features="ParkableStringsToDisk" prevents the hang
(ii) Does the issue happen with latest insiders https://code.visualstudio.com/insiders that comes with a newer runtime.

Does the issue happen with latest insiders https://code.visualstudio.com/insiders that comes with a newer runtime.

I have been using Insiders 1.67.0 for a while now without any problem. I get this issue only when I use the normal version. Just to make sure: even I can reproduce the issue on 1.68.0.
I will try to get the information you requested.

I have reproduced the problem again. I ran the code with --disable-features="ParkableStringsToDisk" but get the warning above, so unsure if the flag has an effect or not.
I get samples from the following processes:

Code
Code Helper (There were several of them, I just selected one, no one seems to be using more CPU)
Code Helper GPU (not too much CPU)
Code Helper (Renderer) (There were several of them, I just selected the one that has %100 all the time)

Sample of Code Helper (GPU)2.txt
Sample of Code Helper2.txt
Sample of Code2.txt
Sample of Code Helper (Renderer)2.txt

Thanks for the logs, the warning is just to convey that the flag will be passed down to the runtime, you can ignore it.
From the Code Helper (Renderer) sample most of the cycle is spent on JIT code that cannot be symbolicated. As a next step, can you take a JS profile following the steps below,
* Launch vscode stable normally
* Open Command Palette and run `Toggle Developer Tools`
* Detach the devtools from the workbench into a separate window
* Choose Javascript Profiler tab from the devtools
* Start recording
* Once the workbench freezes
* Stop the profiler and attach the generated trace

I have been using Insiders 1.67.0 for a while now without any problem. I get this issue only when I use the normal version. Do you still want me to try the newest Insider version?

Is there a difference in extensions or settings used between stable and insiders ? Does the issue repro with insiders if you try with the same profile as stable.

Is there a difference in extensions or settings used between stable and insiders ? Does the issue repro with insiders if you try with the same profile as stable.

Yes, the extension were different and I do a quick check: I uninstalled the ones (5 in total) there were not installed in the Insiders and the issue did not reproduced. So, I will (in parallel) try to find the problematic extension.

sample most of the cycle is spent on JIT code that cannot be symbolicated. As a next step, can you take a JS profile following the steps below,

Nice to know where the unsymbolicated frames were coming from. I was curious. Anyway, I have done that and reproduced the problem. However, the issue is: the resulting file is 159Mb and as I am using a company laptop, I am really unsure about what the profile can contain, I might need to ask security team. Having said that, is there anything you would like to see in the CPU profile? Below is a small screenshot of the top functions:

BTW, I am not closing the stuck app. right now just in case you would need to request any information by attaching it somehow?

@deepak1556, another point: title is misleading that this issue only happens on macOS 12.3, however I can reproduce it in 12.4 as well.

I am writing for future reference. I have disabled CMake and CMake tools extensions and the problem is fixed for me. So, I believe there is some extension API that causes the renderer process to get stuck. @deepak1556 , is there any other way to debug this issue other than the javascript profile? Do you still think you need the JS profile to move further on this issue?

@sumerc sorry for the delay, tackling some milestone related issues. If you can share the JS profile that would be helpful to move the issue forward, also there shouldn't be any private data that should be of concern in sharing the profile. The call stacks should only be from VSCode core and it extensions. If there is concern, you can share the profile to my contact<EMAIL_ADDRESS>Since you have narrowed down the problematic extensions, can you list any specific steps to be followed when recreating this issue (ex: install said extension and open a particular type of file) ? If possible, I would like to repro the issue on my setup which can also help simplify the debugging part.

If there is concern, you can share the profile to my contact<EMAIL_ADDRESS>
Ok. I will reproduce it again(without involving any repos) and send you the profile.

Since you have narrowed down the problematic extensions, can you list any specific steps to be followed when recreating this issue (ex: install said extension and open a particular type of file) ? If possible, I would like to repro the issue on my setup which can also help simplify the debugging part.

For this, I will need to find out if the extensions are the root cause the problem or the extensions are conflicting with some other extension? In order to do that, I will try to reproduce the issue in a separate VS Code profile and see what happens.

Same issue. And I found something strange.
When VS Code is not responding, my Chrome costs CPU over 50%:

After a few secs:

Only VS Code is not responding. Other Apps works well. After 10-20 sec, everything turns to good.
This happens regularly when I switch apps bewteen chrome and vscode.
Run code -status seems good:
Version:          Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:52:13.188Z)
OS Version:       Darwin x64 21.5.0
CPUs:             Apple M1 (8 x 24)
Memory (System):  16.00GB (0.04GB free)
Load (avg):       2, 1, 2
VM:               0%
Screen Reader:    no
Process Argv:     --crash-reporter-id 76ce2e8d-304c-4701-abd6-0229d6cd3a3a
GPU Status:       2d_canvas:                              enabled
                  canvas_oop_rasterization:               disabled_off
                  direct_rendering_display_compositor:    disabled_off_ok
                  gpu_compositing:                        enabled
                  metal:                                  disabled_off
                  multiple_raster_threads:                enabled_on
                  oop_rasterization:                      enabled
                  opengl:                                 enabled_on
                  rasterization:                          enabled
                  raw_draw:                               disabled_off_ok
                  skia_renderer:                          enabled_on
                  video_decode:                           enabled
                  video_encode:                           enabled
                  webgl:                                  enabled
                  webgl2:                                 enabled

CPU %	Mem MB	   PID	Process
   10	    66	   994	code main
    0	    49	   997	   gpu-process
    0	    16	  1000	   utility-network-service
    0	    33	  1001	   window (xxxx.py — xxx9)
    0	   180	  1004	   window (Content.js — XXX)
    0	    33	  1534	   shared-process
    0	    16	  1547	     ptyHost
    0	     0	  2259	       /bin/zsh -l
    0	     0	  2430	       /bin/zsh -l
    0	     0	 75606	       /bin/zsh -l
    0	     0	 96607	       /bin/zsh -l
    0	    16	  2054	     fileWatcher
    0	    16	 60364	     fileWatcher
    0	     0	 96606	     fileWatcher
    0	    16	  1544	   extensionHost
    0	    16	  4718	     /Applications/APPs/Visual Studio Code.app/

Update chrome not help. (Current version 103.0.5060.53 )

I just had a complete macos crash on M1 when opening vscode.
Vscode opened and  It popped a recommendation for an angular extension,  after clicking on extension it first froze my mouse and keyboard and then the mac restarted. After it restarted I got a send report to apple popup,  by clicking on send report it then also froze the whole computer. Not sure if it's vscode or M1 related issue.  Vscode on my old intel mac has never crashed and is still working fine.

This is the crash report i had. Doesn't even seem related to vscode it's showing logs about xcode ios coresimulator. I use vscode for python and angular development no simulator required and xcode wasn't even running.

I have this issue on both intel and M1 macs. All of a sudden visual studio code freezes and slowly it freezes entire computer. +1 for the issue.

I get this issue (same behaviour but perhaps different reasons to OP) when I run a bash script for deployment which does a lot of cleaning and building of js packages in a monorepo/workspace that I currently have open in VS Code. I also get it sometimes when just doing a npx npkill to dump all node_module folders in the monorepo, sometimes followed by a yarn install. The commands don't error out, but often I'll have to restart VS Code.
Same behaviour; VS Code freezes and after a while it either recovers or gives me an unresponsive modal. Most of the time I have to force quite the app and restart.
I'm using macOS Monterey 12.4 on an M1 Pro.

Hello, I have been experiencing more or less the same issue as folks were experiencing here - except that my VS Code would freeze the moment I would click on the "Open" link in the "Get Started" tab upon starting up VS Code.  What I have done is I have installed Xcode Version 14.0 beta 3 (14A5270f) as well as the CLI tools for it.  What I have than done is install Visual Studio for Mac version 17.0 - I made sure to check the option during installation to download the libraries for MacOS development.  Once installation finished, I have opened up Visual Studio for Mac - it worked fine.  I than deleted Visual Studio for Mac and installed VS Code from this link:  https://code.visualstudio.com/?wt.mc_id=DX_841432 i.e. version 1.69.1 (universal).  And it now works like a charm - without freezing.
Unfortunately I have not tested whether this issue got resolved due to me installing Xcode, or installing Visual Studio for Mac - but I would suggest trying Xcode first, than VS Code - and if it doesn't kill the freezing, delete VS Code, install Visual Studio for Mac, than VSCode and see if that helps.
I am running this Mac:
macOS Monterey Version 12.4
MacBook Air (M1, 2020)
Chip:  Apple M1
Memory:  8Gb

I was having this issue. I fixed it by removing Sophos Home AV. It occured when compiling code through VSCode, not when compiling through another IDE or the command line.
My entire computer would also freeze when navigating to classes ( cpu/mem usage was be normal). I think the AV was either preventing the language server from properly reading the build files or blocking the connection between the text editor and the language server which uses rpc ( there were some connection errors in the logs)
I am using VSCode for scala development, so my setup is quite different from users here, however, this worked for me so I am putting this out there.
VScode 1.6.9
Extensions: Metals, scala-lang
macOS Monterey Version 12.4
MacBook Pro ( 14", M1, 2021)
CPU: 10 cores
Memory: 32Gb

For future reference and FYI @deepak1556:
I have removed CMake and CMake tool extensions and my freeze problem went away.

I think this is a hard issue to reproduce and debug, I suggest anyone facing this issue to disable some part of their extensions to see what is causing the problem and report it here. For me, it was CMake however I am still suspecting that there might be a problematic API that is called from the extension that causes the problem.

same issue here on M1 mac 12.5

Getting the same issue with 12.0.1 (21A559), especially when changes are made in the package.json file (React project)

Same here with M1 Pro, 12.5 and VS Code 1.69.2.
This looks like a correlation with the SSD, because when the VS code hangs, the whole system hangs.

same issue here on M1 mac 12.5

same issue here on M1 mac 12.5

Same issue with M1 Pro 14inch and VS code 1.70.2

any updates on this? Same here with 1.64.2 (Universal) and M1

Spinning ball all the time for me while editing a tiny txt file, what is happening?

+1 froze for me today, could not force quit. Had to force shutdown my Mac.

+1

+1

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!

I am still facing same issue with M2 chip

Potential solution:
Ensure that VsCode is running from an internal drive.
VsCode was running from an external drive. In my case I'd coppied it there, but this is easily possible if you are running it from a browser downloads folder that is on an external drive.
My Mac Mini's tb ports seem to be briefly disconnecting the external drive every so often. This is a known issue with the mac and other apps (such as Dropbox which, terifyingly, treats the disconnection as a mass delete event)
Electron, doesn't handle this disconnection well either and locks up to the point where even force quit isn't reliable.
HTH

I am also facing this issue, though I'm using an intel chip. It started about two weeks ago.

I'm facing same issue

I'm facing same issue

@Linchin @msayed-net @AlexKarpov98 please follow the steps mentioned in https://github.com/microsoft/vscode/issues/145387#issuecomment-1340707320 and open a new issue with the generated logs, thanks!

Reported at microsoft/vscode-cmake-tools/issues/2967


Support autoexec feature

This appears to be a duplicate of https://github.com/sassoftware/vscode-sas-extension/issues/340


Export TrackGraph to networkx

Implementation here (untested for hyperedges): https://github.com/funkelab/motile_toolbox/blob/b8b215f2c33c68a233b3cf1de85e50328a72ae4c/src/motile_toolbox/candidate_graph/graph_to_nx.py
But I think this should go into the TrackGraph class as a convenience to_networkx function, since we have from_networkx functionality.

Need to also add the hyper edges to the toolbox implementation


How to reduce GIF size but keep it look good?

If I do not clear each frame with a background color but try to use a global background color with gif.js, then image will look strange, black backgound everywhere and previous frame shines over, even if I tried turn off / on dispose effect. Though size will be reduced.
Look here: http://t44-post-cover.s3.eu-central-1.amazonaws.com/teszt45-axd0
https://github.com/jnordberg/gif.js
What is wrong with my settings?
const gif = new GIF({
	workers: 2,
	quality: 1,
	workerScript: '/gif.worker.js',
	debug: true,
	width: canvasSize.width,
	height: canvasSize.height,
	repeat: 0,
	background: '#fff',
	transparent: '0x00FF00',
})

gifjs?.addFrame(ctx, {
	copy: true,
	delay: 200,
	dispose: 2, // tried 0, 1, 2, 3
})

You can now use modern-gif to obtain the smallest GIF


v0.2.0 builds err due to private variable leak

Hi team,
Thanks for your hard work on this project, I'm excited to explore it.
I'm trying to run/build the button example in the README and I'm running into a build time error about a private  var being leaked via a public interface. I've added cushy via cargo add:
$ cargo add cushy
    Updating crates.io index
      Adding cushy v0.2.0 to dependencies.

$ cargo run
   Compiling cushy v0.2.0
error[E0446]: crate-private type `InvalidationStatus` in public interface
    --> /Users/ryan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cushy-0.2.0/src/window.rs:1418:9
     |
1418 |         pub redraw_status: InvalidationStatus,
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
     |
    ::: /Users/ryan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cushy-0.2.0/src/context.rs:1258:1
     |
1258 | pub(crate) struct InvalidationStatus {
     | ------------------------------------ `InvalidationStatus` declared as crate-private

For more information about this error, try `rustc --explain E0446`.
error: could not compile `cushy` (lib) due to previous error

Am I missing a dependency or is this error legitimate?
Thanks for your help

Sorry for the issues you're having! The issue is that Rust 1.73 and prior report this error, but it's not an error in 1.74 or later. This is already fixed on the main branch. There are two ways to solve this today:

Update Rust (if you're willing/able).
Try using the main branch on git instead of v0.2.0

I'll be releasing v0.3 soon, hopefully in a week or so.

Thanks! Upgraded my rust version and now I'm running the examples, no problem!


Update commands.py

minor correction in commands.py: "avaibles" -> "availables".

Coverage remained the same at 97.368% when pulling 7587820f1199d6cebedd1ea55da81016a6c8fb07 on mizielr:patch-1 into 3c50e43d3972b912a1874c0d53eeb9a5d1d917ad on TheGhouls:master.


List View Highlighter vs office hours

Esko SC Script issue
Affected script
Name: ServiceCloud List View Highlighter
Version: 16
OS
Name: Mac OS X
Version: 10.9.5
Language: English
Browser
Name: FireFox
version: 44.0.2
language (if different from OS): English
Short summary if your issue: List View Hghlighter does not take into account working hours?
Steps to reproduce the issue: Looking at a couple of issues that were created @ 6:24-6:47 AM, are at 8:33 AM listed grey as having passed the 1h limit, which is in se correct, but I think RT time is only calculated within office hours (8:00-18:00)? Opening the case does indeed still show xx minutes left. Don't know if that's an easy one to fix (keeping into account local time zones)?
Thanks!
Andy
Other details:
Screenshot:

@tuxfre

Hi @andsesko
By design it only account the time spent, not the office hours.
That's a known limitation, it will affect a small part of the logs.
The idea here is to help with the biggest part of the 'bunch' of logs.
Implementing office hours is far from being easy and will only change the situation for a limited set of cases.
If, this is really a showstopper amongst users, then we can discuss that with GN and I can try implementing something.
Kr,
Benjamin

Hi @tuxfre,
Was afraid so. Thanks for confirming.
I can live with it; won't let perfect get in the way of better (yes, it;s definitely an improvement and should indeed cover the vast majority of the cases correctly) ;o)
Kind Regards,
Andy


Auto plug middleware for simpler installation

Can be achieved for rails application by defining a rack-attack railtie.
https://api.rubyonrails.org/classes/Rails/Railtie.html

Need to be careful of not inserting the middleware a second time, when the user has already inserted middleware in config/application.rb or elsewhere.

@grzuy do you have any suggestions on how to ensure we don't include the middleware more than once?
We can make use of Rails's private API:
module Rack
  class Attack
    class Railtie < Rails::Railtie
      initializer "railtie.configure_rails_initialization" do |app|
        include_middleware = app.middleware.send(:operations).none? do |operation|
          middlewares = operation[1]
          middlewares.include?(Rack::Attack)
        end
        app.middleware.use Rack::Attack if include_middleware
      end
    end
  end
end

I'm not really a fan of using their private API, but I don't see any other way to achieve this.

Hi @lmansur,
I briefly looked into this when I first wrote the issue and didn't see any obvious easy way to know if a middleware was already inserted.

Also, given that those are "operations" to the middleware stack they could potentially be removals of Rack::Attack, right?

#operations will only return non-delete operations. The deletes are in #delete_operations.
https://github.com/rails/rails/blob/master/railties/lib/rails/configuration.rb#L61-L63

Can happen that Rack::Attack middleware is both in operations and delete_operations?

It can.
If the user sets app.middleware.delete Rack::Attack this operation will be added to delete_operations. If the user also sets app.middleware.use Rack::Attack (or app.middleware.insert_after/insert_before/swap) or we set it for him, there will be an inclusion operation in operations and a delete operation in delete_operations. In this case, the middleware won't be used.

Gotcha. Sounds good then. We are fine only checking the operations I guess.

I'm wondering, if this worth it? As i noticed, many (most?) applications use it only for production/staging.
For me, as a user, it's much easier and clear to explicitly enable it where i want than to disable otherwise.

Hi @fatkodima,
Fair concern.
If moving forward with this we will need a configurable enabled boolean.
I think that would help with cases like https://github.com/kickstarter/rack-attack/issues/220 and https://github.com/kickstarter/rack-attack/issues/384. Flipping an enabled boolean might be easier and more intuitive than plugging/unplugging middleware.

Need to be careful of not inserting the middleware a second time, when the user has already inserted middleware in config/application.rb or elsewhere.

Maybe we should also make Rack::Attack idempotent. I.e. Doesn't matter if the middleware gets accidentally added more than once.


Unable to run from within a container

By default, the task try to download the detect script to $(Agent.WorkFolder)/detect, but when running a pipeline task in a container $(Agent.WorkFolder) seems to be mounted as readonly, which prevent the task to create the detect folder.
Logs from within the container itself:
mkdir: cannot create directory '/__w/detect': Permission denied

Default docker create command used by ADO:
/usr/bin/docker create --name jre_container_mcrmicrosoftcomjavajre17zuluubuntu_f5c0ad --label ed5396 \
--network vsts_network_0dc13f81572c44a98167d17236bfcb8c  \
-v "/var/run/docker.sock":"/var/run/docker.sock" \
-v "/home/rd/Agents/agent0/_work/13":"/__w/13" \
-v "/home/rd/Agents/agent0/_work/_temp":"/__w/_temp" \
-v "/home/rd/Agents/agent0/_work/_tasks":"/__w/_tasks" \
-v "/home/rd/Agents/agent0/_work/_tool":"/__t" \
-v "/home/rd/Agents/agent0/externals":"/__a/externals":ro \
-v "/home/rd/Agents/agent0/_work/.taskkey":"/__w/.taskkey" \
mcr.microsoft.com/java/jre:17-zulu-ubuntu

As documented by Microsoft:

As only the detect folder can currently be configured - and not the entire path - my only workaround is to mount the expected path $(Agent.WorkFolder) manually to ensure read/write access when creating the container reference:
resources:
  containers:
    - container: detect_container
      image: my_container:latest
      volumes:
        - $(Agent.WorkFolder):/__w

I have the same issue and proposed #53


Bad Markdown rendering of lists in documentation on hover

VSCode Version: 1.12.2, latest 1.13.0-insiders
OS Version: macOS Sierra 10.12.4

Steps to Reproduce:

install the redhat java extension
open a java file
add import java.util.Map;
hover over Map, scroll to the bottom.

List is not displayed properly. 1st level bullets and content are on separate lines:

When Markdown Javadoc was introduced last september, this is how it looked:

I don't know when the regression was introduced.
This is the completion item sent to VS Code:
[Trace - 9:38:45 AM] Sending request 'textDocument/hover - (92)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/fbricon/Dev/souk/aloha/src/main/java/com/redhat/developers/msa/aloha/TracingConfiguration.java"
    },
    "position": {
        "line": 4,
        "character": 18
    }
}

[Trace - 9:38:45 AM] Received response 'textDocument/hover - (92)' in 30ms.
Result: {
    "contents": [
        "An object that maps keys to values. A map cannot contain duplicate keys; each key can map to at most one value.\n\nThis interface takes the place of the Dictionary class, which was a totally abstract class rather than an interface.\n\nThe Map interface provides three *collection views*, which allow a map's contents to be viewed as a set of keys, collection of values, or set of key-value mappings. The *order* of a map is defined as the order in which the iterators on the map's collection views return their elements. Some map implementations, like the TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.\n\nNote: great care must be exercised if mutable objects are used as map keys. The behavior of a map is not specified if the value of an object is changed in a manner that affects equals comparisons while the object is a key in the map. A special case of this prohibition is that it is not permissible for a map to contain itself as a key. While it is permissible for a map to contain itself as a value, extreme caution is advised: the equals and hashCode methods are no longer well defined on such a map.\n\nAll general-purpose map implementation classes should provide two \"standard\" constructors: a void (no arguments) constructor which creates an empty map, and a constructor with a single argument of type Map, which creates a new map with the same key-value mappings as its argument. In effect, the latter constructor allows the user to copy any map, producing an equivalent map of the desired class. There is no way to enforce this recommendation (as interfaces cannot contain constructors) but all of the general-purpose map implementations in the JDK comply.\n\nThe \"destructive\" methods contained in this interface, that is, the methods that modify the map on which they operate, are specified to throw UnsupportedOperationException if this map does not support the operation. If this is the case, these methods may, but are not required to, throw an UnsupportedOperationException if the invocation would have no effect on the map. For example, invoking the `putAll(Map)` method on an unmodifiable map may, but is not required to, throw the exception if the map whose mappings are to be \"superimposed\" is empty.\n\nSome map implementations have restrictions on the keys and values they may contain. For example, some implementations prohibit null keys and values, and some have restrictions on the types of their keys. Attempting to insert an ineligible key or value throws an unchecked exception, typically NullPointerException or ClassCastException. Attempting to query the presence of an ineligible key or value may throw an exception, or it may simply return false; some implementations will exhibit the former behavior and some will exhibit the latter. More generally, attempting an operation on an ineligible key or value whose completion would not result in the insertion of an ineligible element into the map may throw an exception or it may succeed, at the option of the implementation. Such exceptions are marked as \"optional\" in the specification for this interface.\n\nMany methods in Collections Framework interfaces are defined in terms of the `equals` method. For example, the specification for the `containsKey(Object key)` method says: \"returns true if and only if this map contains a mapping for a key k such that (key==null ? k==null : key.equals(k)).\" This specification should *not* be construed to imply that invoking Map.containsKey with a non-null argument key will cause key.equals(k) to be invoked for any key k. Implementations are free to implement optimizations whereby the equals invocation is avoided, for example, by first comparing the hash codes of the two keys. (The `Object.hashCode()` specification guarantees that two objects with unequal hash codes cannot be equal.) More generally, implementations of the various Collections Framework interfaces are free to take advantage of the specified behavior of underlying `Object` methods wherever the implementor deems it appropriate.\n\nSome map operations which perform recursive traversal of the map may fail with an exception for self-referential instances where the map directly or indirectly contains itself. This includes the clone(), equals(), hashCode() and toString() methods. Implementations may optionally handle the self-referential scenario, however most current implementations do not do so.\n\nThis interface is a member of the  Java Collections Framework.\n\n *  **See Also:**\n    \n     *  HashMap\n     *  TreeMap\n     *  Hashtable\n     *  SortedMap\n     *  Collection\n     *  Set\n *  **Parameters:**\n    \n     *  **<K>** the type of keys maintained by this map\n     *  **<V>** the type of mapped values\n *  **Author:**\n    \n     *  Josh Bloch\n *  **Since:**\n    \n     *  1.2"
    ]
}

Fixed!


Segmentation fault with Python stuff, in a method of a struct in second module

I have these files to reproduce the problem, mod2.pxd:
cdef public api:
    void myapi()

cdef public:
    cppclass myclass:
        void mymethod()

mod2.pyx
cdef void myapi():
    print("I am OK (from myapi)")

cdef cppclass myclass:
    void mymethod():
        # Using anything C is OK
        cdef int i = 0
        i += 1

        # Crash with Python var
        # Segmentation fault
        j = 0
        j += 1

        # Crash with Python function
        # Segmentation fault
        print("I am crashing!")

mod1.pxd
cdef public api:
    void myfunc()

mod1.pyx
from mod2 cimport myapi, myclass

cdef public cppclass foo:
    void bar():
        print("I am OK (from foo.bar)")

cdef void myfunc():
    print("I am OK")
    myapi()
    cdef foo f
    f.bar()

    # Stack var: Segmentation fault
    print("Calling myclass.mymethod...")
    cdef myclass t
    t.mymethod()

    # # Pointer: Segmentation fault
    # print("Calling myclass.mymethod...")
    # cdef myclass* t2 = new myclass()
    # t2.mymethod()

cpdef test():
    myfunc()

Main Python programme app.py
import mod1
mod1.test()

It's a segmentation fault which happens in a Cython struct myclass when using anything Python. Also in mod2, but the global function myapi is OK. From a struct method foo.bar but in the same file is also OK.
I'm using Python 3.8.2, and Cython 0.29.26
mod1 and mod2 are translated into C++ with cython -3 --cplus command, and compiled with gcc to .so files. It happened the same if using Python build tool.
This situation seems strange, why are Python stuff not touch-able from mod2 (fails in struct only)?

Probably not a Cython issue. Make sure you initialise the Python runtime for C++ threads before you use it, and make sure you initialise the cimported API before you use anything from it.

Probably not a Cython issue. Make sure you initialise the Python runtime for C++ threads before you use it, and make sure you initialise the cimported API before you use anything from it.

Might be interesting, but those files above are not using threads. Should it be related?

Could you remove the public and api modifiers from the functions (or everywhere), to see if that makes it work? You don't need them in your example. Even if you want to use the (public) Cython functions in your C++ code, you don't need the api modifiers.

Could you remove the public and api modifiers from the functions (or everywhere), to see if that makes it work? You don't need them in your example. Even if you want to use the (public) Cython functions in your C++ code, you don't need the api modifiers.

I tried to removed all those modifiers just now but the result is not different. All the __Pyx_* calls in mymethod fails, but work in myapi function although they are in the same file.

As suggested from https://stackoverflow.com/a/55669343/5581893 I tried to add -DCYTHON_PEP489_MULTI_PHASE_INIT=0 to all gcc commands

That's unrelated. IIUC, you're not embedding Python in a C++ application here (and even then, that would be the wrong thing to do).

I just get link errors when I try to import it:
undefined symbol: _ZTV21__pyx_t_4mod2_myclass

I'd be a little worried that you've done something odd to make it link and your errors are due to that.

Could you remove the public and api modifiers from the functions (or everywhere)

I tried to removed all those modifiers just now but the result is not different.

Thanks for verifying that. Seems like it's a Cython issue after all. Sharing the C++ class across modules seems to generate incorrect code that duplicates the C++ class definition on both sides, but only one side knows about the implementation. Meaning, the C++ class is not actually shared.

Yes - almost certainly that. The line that'll be segfaulting will be:
__Pyx_INCREF(__pyx_int_0);

(i.e. Cython has created a global constant for the Python int 0). Because you've linked it in an odd way, but never actually imported mod2 that variable isn't initialized.

you've linked it in an odd way

Maybe as well, but I think the issue really is that Cython doesn't know a way to share C++ classes via .pxd files that are only implemented in a .pyx file. The module that cimports that cppclass ends up with a C++ class in which all methods are virtual. That's unhelpful.
That duplication is not a problem for C structs, but C++ classes have methods that the other side needs to know about.

It isn't particularly obvious how to do it. For the myapi function it's handled via:
__Pyx_ImportFunction(__pyx_t_1, "myapi", (void (**)(void))&__pyx_f_4mod2_myapi, "void (void)") < 0)

but I don't think it's possible to do a similar thing for a C++ class (especially for things like destructors, which are invoked automatically so we can't just write a wrapper function to call them)

I just get link errors when I try to import it:
undefined symbol: _ZTV21__pyx_t_4mod2_myclass

I'd be a little worried that you've done something odd to make it link and your errors are due to that.

Uhm, after having 2 files .o, link them both to mod1.so, and also to mod2.so to avoid undefined symbol, I did so.

Sharing the C++ class across modules seems to generate incorrect code that duplicates the C++ class definition on both sides, but only one side knows about the implementation. Meaning, the C++ class is not actually shared.

This cross-module call may be necessary I guess. I'm migrating a Python project to Cython and there are multiple classes with cross-module calls everywhere.

Uhm, after having 2 files .o, link them both to mod1.so, and also to mod2.so to avoid undefined symbol, I did so.

That's not how Python extension modules work. The normal way to use them is one .so file per module. You can link them together, but then you have to tell Python that there is more than one module in it so that it can properly import them all.

Oh yeah, that inittab. What I guess now is that Cython's cimport does list global functions in inittab but not struct members. That's why myapi works smoothly with Python vars+funcs but not mymethod.

I have a rough plan for how this might work:

cppclass member functions (including constructors, destructors, operators, etc.) are actually implemented outside the class in a non-member cdef function that can be imported through the existing __Pyx_ImportFunction mechanism.
Simple inline wrapper functions are generated both in the original module and in the module that the cppclass class is cimported from. E.g.cdef cppclass C:
   C(int val)
   void f()

generates something likeclass C {
  C(int val) { C_init_impl(*this, val); }
  void f() { f_impl(*this, val); }
};

in every module that uses it. C_init_impl and f_impl are only generated in the module the class is defined in.


Source and sink classes, epoch config removal

Instead of using specially crafted closures or generators to represent
how to read / write the next item of input / output, subclass
{Stateful,Stateless}{Source,Sink} and follow the instructions on
which methods to override. This hopefully will be a little less
delicate as the steps you need to take of "next" and "snapshot" are
explicit and separated. Also I like the parallel construction between
input and output now.
Also refactors the Rust-side input module to match the output module:
a single file that unifies the Python ABCs, the Timely operators, and
the internal structures needed to run them. Each input type
(partitioned or dynamic) is represented by its own Timely operator
because they have inherently different shapes and behaviors.
This does mean, though, I ripped out the concept of EpochConfigs and
how they map to input operators, since that's at odds with the input
type determining the Timely operator shape. Instead adds a top level
epoch_interval argument to our entry points to control how often
epochs are emitted. The above input Timely operators all have
"periodic epoch" semantics. Inspired from a comment from Fede, an
interval of zero is effectively "a new epoch each item" so we use that
for the existing recovery tests.
I eventually want to re-think how we test the recovery system to be
less "emergent", which I think will involve having more precisely
targeted unit tests. One of the problems here is that to fully control
the epoch progression of some test input, we sort of have to not use
our normal input operators. That means you can't really test the full
stack which doesn't feel right. All of that is for another day,
though. I have added some unit tests that probe the exact recovery
state for the stateful inputs which makes me feel more confident about
them.

I fixed the issue with forgetting to pass worker_index and worker_count to DynamicInput.build.

Re:

Another question, which is related to the latest PRs but only came to mind now is, why don't we expose DynamicInput (and all the other base classes) from rust as a subclassable python class? Obviously you had reasons, but I'm curious about them. Can't add an @abstractmethod, or use ABC stuff with pyo3? Or you just wanted this to be on the python side for users to see?

I sorta forgot that there was the other option, so I tried prototyping out today what it would look like to define Input and Source and friends as pyclasses. And I'm not sure I like it because of the dynamism we want.
Pros:

Docstrings and definitions for the interfaces are right in the Rust code, so you can see them when you're working on the operators and the calling code.
You get the PyO3 "eager type checking" for free.

Wishy-wash:

You can't use ABC. You can do something sort of similar and raise NotImplementedError in every method. Although until we remove pickling, we aren't using ABC anyway.

Cons:

You don't actually get any type checking on the any of the interface methods themselves! We need dynamic dispatch to a runtime-defined subclass. This means we have to use the call_method("name", (args, ) ...) functions; you can't use something like py_cell.borrow().build_part(key, resume_state) with Rust-side type checking because the latter will statically dispatch to the parent class method compiled in Rust (which always returns NotImplementedError). So you're using extract and hoping the args and return value types match up with the Rust superclass definition anyway. This means you're repeating and can make mistakes matching the types.
And since you are exporting the abstract functions via PyO3, you need to figure out FromPyObject for all the return types on the classes (which is tricky for our "co-operative async iterator return value").
Although one day this might get fixed in PyO3, it also means today that type annotations and rich function signatures are missing for these classes.

To me, it kinda feels like you get a mixture of both the downsides of having to call dynamic methods on objects with the non-nativeness of having to define a complex Python parent class via PyO3. I think we should only use classes defined via PyO3 that we are either: never going to subclass, and have significant code we want to call in a method. Otherwise I don't think the overall feel of it is worth it.
I am going to fix up some of the type bugs that I found through this experiment.

To me, it kinda feels like you get a mixture of both the downsides of having to call dynamic methods on objects with the non-nativeness of having to define a complex Python parent class via PyO3. I think we should only use classes defined via PyO3 that we are either: never going to subclass, and have significant code we want to call in a method. Otherwise I don't think the overall feel of it is worth it.

Yep, given that cons you listed, I agree it's better as it is.
Looks good to me then :+1:

Two more thoughts on this:
If we do end up going this route more often with other "config" types, I think we should make a macro like FromPyABC which does the "check this is a subclass of the ABC" to reduce that boilerplate.
For posterity https://gist.github.com/davidselassie/a4d9749445318965ec6790a49dac8020 has the input.rs defining the "ABC" classes so you can see what it feels like. And if we need to go that route in the future: use PyCell<$PYCLASS>::borrow is basically the trick.


[FeatureReq] Restrict certain usernames to specific IP addresses

Is your feature request related to a problem? Please describe.
The problem is that there is currently no way to restrict players by their IP, which is important especially for private servers where only a few people will regularly join. Although bad actors still have to go through a password in order to do any damage to the server, there should be a way to prevent anyone other than a select few IPs from connecting to the server.
Describe the solution you'd like
A section in the config which allows you to make mappings between IP addresses and player usernames. For example:
{
  // ...
  restrictUsernames: {
    "localhost": "admin_username",
    "<IP_ADDRESS>": "user_1",
    "<IP_ADDRESS>": "OP_user"
  }
  // ...
}

This list functions like a "deny list", so IPs/usernames not listed can join no matter their IP/username.
Another potential config option for extra security is to allow a single IP address to join using multiple usernames, something like multiIpUsernames: (true | false).
For eg. if we take the restrictUsernames list defined above, there could be multiple scenarios:

multiIpUsernames is true - a user with the IP <IP_ADDRESS> can join as user_1, but they can also use other usernames (provided they aren't present in restrictUsernames). If someone with a different IP tries to join as user_1, they get kicked out of the server, but if they choose a username which isn't present in restrictUsernames, then they can join.
multiIpUsernames is false - a user with the IP <IP_ADDRESS> can ONLY join as user_1, and if said user tries to connect as some other username, they will get kicked out of the server. If someone with a different IP tries to join as user_1, they get kicked out of the server, but if they choose a username which isn't present in restrictUsernames, then they can join.

Describe alternatives you've considered
There are no alternative solutions to this problem, although another authentication plugin (AuthMe) has had this feature for a long time.

Thank you for such a well-written issue!
I think that feature is out of scope for EasyAuth.
But maybe I'll make a separate mod, like I did with EasyWhitelist.


Release 1.1.2 disallow PHP 7

Hi,
why with release 1.1.2 in composer.json php requirement was changed from >=5.5 to ^5.5?
Now is not possible to use it on PHP7.
https://github.com/zfcampus/zf-content-negotiation/commit/9d0bcea51cfcaffad059ed4fa92dae64f1283702#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780R29

@webimpress Because we hadn't tested with php 7 to ensure it worked correctly.
The upcoming v1.2 is tested correctly against it, and will contain the support.


Poll page

Hi,
there's a problem with date-picker in poll page:

Looks like either a JS or CSS issue. I'll have a look.

On 26 Jun 2016, at 22:26, chack1172<EMAIL_ADDRESS>wrote:
Hi,
there's a problem with date-picker in poll page:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.


HTML id and global variable

In normal browsers, if you have a DOM node containing an id, the value of that id will be used as a key on the window object and the value will be a reference to the DOM node. e.g:

Hello World!

in this example, the window object will have a property called testy.
Now, window['testy'] will return the reference to the
 we created earlier.
This is not the case in JSDOM.

Fixed by #1116!


Task14

Extract the data from the Vajrang.org and print the results in the excel

@gayathrigundaveni
Task – 14
Code verified.
Task – 15
Code verified.


New release

Are there plans to do a new release soon? There appears to be a pretty big gap between 2.124.3 and HEAD.

ping @jterry75

ping @swernli

ping @ahmetb perhaps?

Yeah, there is a gap. I'm working on bring the missing APIs for the current version first, then update to use the new API surface. Maybe after that we have a bunch of news all togheter to make a new release.

Sorry all. I was out for a while. I am working on investigating a few bug's then will get the release out to nuget

This has now been completed and published to nuget. Release notes.


Possible Unhandled Promise Rejection (id: 0)

Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'getUUID' of undefined
TypeError: Cannot read property 'getUUID' of undefined
    at blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:132798:20
    at tryCallTwo (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:13422:7)
    at doResolve (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:13586:15)
    at new Promise (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:13445:5)
    at Object.getUUID (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:132797:14)
    at Login.<anonymous> (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:91202:26)
    at commitCallbacks (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:6324:21)
    at commitLifeCycles (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:8517:19)
    at commitAllLifeCycles (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:9567:15)
    at Object._invokeGuardedCallback (blob:http://localhost:8081/15b07455-e83e-4936-b6ec-2953b21fdf89:2789:16)

Getting this error while trying to get the uuid and print it on console using console.log. I tried to add the library using the method given in documentation but it didn't help.

??? any answer to this ?


Allow any iteratable object to be passed as raw_points

Hi @odlp,
thank you for this library first of all, it's super useful and works like a charm. 🙇
I am using simplify in conjuction with a big ActiveRecord query and have to convert the relation to an array before passing it to simplify, which becomes tricky when the returned data set is large.
points = GPSCoordinates.where(user_id: 1).to_a
points.class #=> Array
SimplifyRb::Simplifier.new.process(points)

This PR loosens the requirement by checking wether the object is enumerable / iterable instead, thus allowing non-arrays to be passed (e.g. ActiveRecord relations!).
points = GPSCoordinates.where(user_id: 1)
points.class #=> ActiveRecord::Relation
SimplifyRb::Simplifier.new.process(points)

Thanks in advance for taking a look. ✌

Thanks for the PR @nTraum - this is a nice improvement. I've merged this & released 0.4.0 on RubyGems.

Awesome, thank you so much!


Add command to create empty file

OS?

Does 'touch foo.txt` work in Windows?

so now we have to write Powershell scripts for the most profoundly retarded
people in the development community?
On Sat, Dec 3, 2016 at 10:46 AM, John Papa<EMAIL_ADDRESS>wrote:

Does 'touch foo.txt` work in Windows?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/3373#issuecomment-264650372,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoqo_jf7kQYnB_YiA9DlZKw3fzdrrJcks5rEZzSgaJpZM4LDU7b
.

I feel the CLI should work the same (as close as we can) on either OSX or Windows. This way we can create scripts that work in either environment and generate projects. This feature would help that parity.
If the team choose this is not valuable, I'm fine with that. These are suggestions.
But please keep your comments respectful @digimax .

Pardon my ego. It doesn't belong here. I'm putting it away right now. FREE ADVICE for people doing ANY KIND OF SOFTWARE DEVELOPMENT WHAT SO EVER: cygwin!

thanks for all the negative karma you are creating by posting a picture of an inverted thumb. much appreciated. keep it coming.

GitHub comments are for technical commentary, @digimax. Please be respectful of everyone's time and efforts by not polluting an issue with non-technical commentary.
On Sat, Dec 3, 2016 at 2:09 PM, Jan Nielsen<EMAIL_ADDRESS>wrote:

GitHub comments are for technical commentary, @digimax
https://github.com/digimax. Please be respectful of everyone's time and
efforts by not polluting an issue with non-technical commentary. You can
delete your comments above...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angular-cli/issues/3373#issuecomment-264662438,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAoqo1NMqmb48N9jQtjmCAInp8KZcNlGks5rEcxzgaJpZM4LDU7b
.

I've deleted comments on this issue that were in violation of Angular's Code of Conduct and banned the user in question.

I see how it can be useful as a simple command for scripts, and as something of a conceptual proto generator. In the future it would be nice to extend the AST codegen to create all generators from a base one and this could be it.
What do you think @Brocco?

@naomiblack thank you :)

I struggle to see the usefulness of this feature. The power of blueprints IMO are to create boilerplate code to get you coding faster. All IDEs/editors provide this functionality, so I struggle to see the added benefit of adding it into the CLI. I'm not against it, just not convinced based upon the script example from @johnpapa above.
Using a script to create an application is something that very few people will actually use, especially when that script could do the same thing via touch bar.ts.

@johnpapa -- could you use echo $null >> somefile.ts to create your empty file? This should work on OSX and Windows as well as Linux, but I can only vouch for Linux... To me, folding this type of work into Angular CLI moves away from the tool's core mission, but I have the luxury of only needing Linux. :-D

The only use case I have for this is scripting for file creation. If that is not something in scope, I agree that this can be closed @Brocco .
I'm fine using OS commands to do it, if there are no other requests for it.
Feel free to close if you wish

Closing for now, but if there's more feedback about adding this feature we can re-evaluate.


"Oh no! This page is broken." when volume events are present

I believe this is related to the recent change to Event actions

What version of the Manager were you on? This was fixed in 14.2.

Should be fixed.


KeyboardTimePicker do not have midDate/maxDate properties

Is your feature request related to a problem? Please describe.
My problem is with KeyboardTimePicker. I can not set minDate/maxDate, but i have properties to set a message when date is more then maximal date or less then minimal (maxDateMessage and minDateMessage properties)
Describe the solution you'd like
It is simple I would like to have a properties minDate/maxDate as it is in KeyboardDatePicker.
Describe alternatives you've considered
I think this is redundant here.
Additional context
I think this is redundant here.

Any news ??

why this issue was closed? I'm hitting the same issue, need to display an error message for maxDate and looks like we cannot set maxDate or maxTime inside this component.

NVM, looks like here is the answer: https://github.com/mui-org/material-ui-pickers/issues/1369#issuecomment-590062822


Add License

Very cool project and I'd like to contribute but there's no license. Please consider one.

added as MIT license. Note that I've started splitting refactoring/splitting it out so that the base code is now in the monstr repository


Introducing Model Trained on Feature-Selected Cell-Injury Dataset Without JUMP Alignment

This PR introduces a model trained exclusively on the feature-selected cell-injury dataset. Unlike the previous model, this one does not include features aligned with the JUMP dataset, meaning the model learns only from the feature set unique to the cell-injury data.
In this PR, we have also applied different feature selection parameters  to generate the feature-selected cell-injury profiles. The reason behind this is that the feature space differs from the aligned feature space used previously.
The datasets now include the following prefixes:

"fs": Indicates profiles based only on feature-selected cell-injury data.
"aligned": Refers to datasets where features are aligned between the cell-injury and JUMP data.

Note that best software practices were not fully implemented in this PR, as my focus was on quickly generating the model. The order of my future PRs will be as follows:

Add a model trained on the feature-selected dataset.
Update figures to reflect the new results.
Clean up the repository by removing duplicate code.
Rerun the entire analysis pipeline to reproduce results and check for bugs.

@gwaybio I have attended all your comments and suggestions. Will be merging now.


Validation layer reports errors if memory object alias same memory

Memory objects are allowed to alias. See "11.8 Memory Aliasing" in the spec.
Triggered by CTS tests:
dEQP-VK.memory.pipeline_barrier.*

Please post the error you found.

The error messages are:
"ERROR: Buffer 33d7f30 is alised with image 33f2fc0 (code 0x00000003 at Buffer:0)"
"ERROR: Image 3426160 is alised with buffer 33d7f30 (code 0x00000003 at Image:0)"
The test case does make sure that they are never used at the same time and that correct pipeline barriers are used.

Aliasing memory objects will no longer result in validation errors. #1264 has taken care of this for the most part.


Issue with import of node.js based wikis with plugins loaded via tiddlywiki.info

My environment is: Win10 + Chrome 72 + BobExe 1.2.1.
I found a way to avoid the behaviour I am going to describe, therefore I'm ok, this is not blocking for my work. Anyway I'd like to report it, since you may have a better solution to suggest. If not, these notes may help to fix the issue and/or update the docs.
What did I do?
I had a wiki running under node.js, not Bob, (let's call it "mywiki"), which made use of a couple of plugins loaded via tiddlywiki.info.

I copied my plugins into Bob/Plugins folder, ...
verified that plugins are correctly listed in "Control Panel/Bob Settings/Manage Plugins" tab, ...
stopped old node.js instance, ...
updated Bob settings with the path of my existing wiki, ...
restarted Bob ...
and finally opened mywiki with the url provided by Bob (<IP_ADDRESS>:8080/mywiki)

While opening the wiki lot of alerts were displayed in quick succession. The following is the content of the alerts (all of them were titled "syncer-browser-tiddlyweb"):
XMLHttpRequest error code: 404
Sync error while processing '$:/StoryList': XMLHttpRequest error code: 404
Sync error while processing '$:/plugins/OokTech/Bob/Unsent': XMLHttpRequest error code: 404
Sync error while processing '$:/Bob/VisibleConfigurationTabs': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/excludePluginList': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/includePluginList': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/serverInfo': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/API': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/ws-server': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings/split/wikis': XMLHttpRequest error code: 404
Sync error while processing '$:/WikiSettings': XMLHttpRequest error code: 404
Sync error while processing '$:/ServerIP': XMLHttpRequest error code: 404
Sync error while processing '$:/EditionsList': XMLHttpRequest error code: 404
Sync error while processing '$:/Bob/ActiveLanguagesList': XMLHttpRequest error code: 404
Sync error while processing '$:/Bob/ActiveThemesList': XMLHttpRequest error code: 404
Sync error while processing '$:/Bob/ActivePluginList': XMLHttpRequest error code: 404

In the meantime these error messages were logged to the browser console:
status:1 Failed to load resource: the server responded with a status of 404 (Not Found)
EditionM:1 Failed to load resource: the server responded with a status of 404 (Not Found)
EditionM:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FStoryList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2Fplugins%2FOokTech%2FBob%2FUnsent:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2Fws-server:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2Fwikis:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FServerIP:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FEditionsList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FBob%2FVisibleConfigurationTabs:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FBob%2FActiveLanguagesList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FBob%2FActiveThemesList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FBob%2FActivePluginList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2FexcludePluginList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2FincludePluginList:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2FserverInfo:1 Failed to load resource: the server responded with a status of 404 (Not Found)
recipes/undefined/tiddlers/%24%3A%2FWikiSettings%2Fsplit%2FAPI:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Other alerts were continuosly raised up while browsing the wiki. The behaviour did not change moving the wiki into Bob/Wikis folder. The following workaround solves:

I copy my plugins into Bob/Plugins folder, ...
verify that plugins are correctly listed in "Control Panel/Bob Settings/Manage Plugins" tab, ...
stop old node.js instance, ...
edit mywiki's tiddlywiki.info and remove all of the plugins from the plugins section, ...
update Bob settings with the path of my existing wiki, ...
restart Bob, ...
open mywiki with the url provided by Bob (<IP_ADDRESS>:8080/mywiki), with no plugins, ...
navigate to "Control Panel/Bob Settings/Manage Plugins" in mywiki, ...
update plugin list, ...
select the needed plugins from the newly generated list, ...
save plugin selection and refresh page. Done.

Hope this can help. Regards,
)+(auloop
P.S.: recently I opened an issue in the BobExe repo, for a generic Bob related issue, despite all of your explanation posts. I noticed it just now. Thanks for having it answered as well ;^)))

I am running (check any that apply, put an x inside the [ ] to check a box, like this: [x]):

[x] Windows
[ ] OSX
[ ] Linux
[ ] Other

and using

[ ] The nodejs version
[x] The single file executable

Before posting I read issue guidelines and:

[x] I am using the newest version
[x] The answer to my question isn't listed in the documentation or this isn't
a question
[x] This is not a duplicate issue
[x] I have not done anything that required me to set acceptance to
I Will Not Get Tech Support For This

Thank you for the report, and I am glad that you found a work around.
One thing that may cause trouble is having two servers using the same wiki at the same time. Bob and the normal node server may interfere with each other so having both of them running with the same wiki can cause errors. I don't think that is the case here but it is possible.
The errors that you listed come from having the plugins that are used with the normal node server. Bob should be blocking them from being used so it is a bug that they are giving you trouble. The most likely reason is that there is a tiddler file for the plugins in your tiddlers folder.
I will check the code to see if I can find any errors that would allow those plugins to be active while using Bob.

One thing that may cause trouble is having two servers using the same wiki at the same time.

As from step 3, I shut the standard node.js server before starting Bob. I reported just the basic steps and omitted the boring details, but it took hours to run exhaustive tests. It also implied working on a copy of the original wiki. I cloned and destroyed it many timed and it was never served by two engines at the same time.

The most likely reason is that there is a tiddler file for the plugins in your tiddlers folder.

No, I had no plugins tiddler in my tiddler folder. As I said I checked it many times and tested with other wikis too.
On the other hand, I did not have to change the tiddler folder content to make it work, but the tiddlywiki.info. The key was to remove the plugins from tiddlywiki.info and subsequently re-add them by the Bob's Manage Plugin interface. I cannot explain why.
BTW, I also tried to not modify the tiddlywiki.info, but just to ignore the alerts and try to arrange with the Manage Plugin interface to make it match the content of tiddlywiki.info. It did not success. The only working flow I found was the one I described in my initial post.

I finally ran into this problem as well and was able to fix what was causing it for me at least, the fix will be in version 1.2.2 so let me know if the problem continues for you after I get that released.

Hi, Jed.
I played again the steps which made Bob to raise the XMLHttpRequest errors, as from my first post. This time everything looks to be working correctly. The plugins listed in tiddlywiki.info were automatically  recognized without the need of any workaround. I noticed some strange behaviours.

With Bob 1.2.1, the BobSettings gui in ControlPanel, showed up just two tabs in my imported wikis ("Wiki Listing" and "Manage Plugins"), while in the IndexWiki much more were available ("Manual Settings", "Server Action", ...). Now, with Bob 1.2.2, ControlPanel/BobSetting displays all of the tabs as in the IndexWiki and below that the "Wiki Listing" and "Manage Plugins" tabs are displayed again.

(this one happens with Bob 1.2.1 and 1.2.2 as well)

I use a custom $:/config/FileSystemPaths, with this content:
[removeprefix[$:/_mau/]addprefix[_mau/]]
[removeprefix[$:/]addprefix[system/]]
[!prefix[$:/]addprefix[user/]]

In my wiki I see that the following non shadow tiddlers have been crerated:
 $:/Bob/ActiveLanguagesList
 $:/Bob/ActivePluginList
 $:/Bob/ActiveThemesList
 $:/Bob/AvailablePluginList
 $:/Bob/VisibleConfigurationTabs

In the tiddler folder I cannot find these, but just $:/Bob/AvailablePluginList. This one has been saved as:
tiddlers\system\Bob\system\Bob\AvailablePluginList.tid

which is not what I expected, given the settings in FileSystemPaths (system\bob is repeated, nested in system\bob !!!)
These messages were displayed in the Bob's launch console, when I forced the plugin list update and $:/Bob/AvailablePluginList was first created.
NodeSettings - Parsed raw settings.
Added route /^\/EditionM\/?$/
TiddlyWiki version 5.1.19 with Bob version 1.2.2
Serving on <IP_ADDRESS>:8080
(press ctrl-C to exit)
 syncer-server-WebsocketAdaptor: Dispatching 'save' task: $:/StoryList
new connection
new connection
For $:/Bob/AvailablePluginList, type is application/x-tiddler hasMetaFile is false filepath is Z:\opt64\Bob122\Wikis\EditionM\tiddlers\system\Bob\AvailablePluginList.tid
saved file Z:\opt64\Bob122\Wikis\EditionM\tiddlers\system\Bob\AvailablePluginList.tid
saved file Z:\opt64\Bob122\Wikis\EditionM\tiddlers\system\Bob\system\Bob\AvailablePluginList.tid
saved file Z:\opt64\Bob122\Wikis\EditionM\tiddlers\system\Bob\system\Bob\AvailablePluginList.tid

I have no idea of where all of others $:/Bob/... tiddlers are.

I'm still observing Bob 1.2.2 behaviour and I will report it to you if I noticed something else strange or misbehaving. Generally speaking I think Bob moved forward. A little step for a man, a great step for the Tiddlywiki community ;^))). Thanks for your help.

First, I am dyslexic, please don't add text decoration (bond, italic, quote blocks, different text colors, etc.) unless absolutely necessary, otherwise it is hard for me to read.
Second, you should list new issues in a new issue, please don't add unrelated problems to an existing issue.
And here are responses to what you listed:

That bug was fixed, make sure you are using the newest version. Currently it is 1.2.2r4, if you are using the newest version the most likely problem is that you have edited shadow tiddlers, check to see if you have a tiddler called $:/plugins/OokTech/Bob/AvailableWikisTab or $:/plugins/OokTech/Bob/Wiki Listing and delete them if they are present. After this you will have to check the 'Show available wikis in sidebar' checkbox again if you want wikis listed in the sidebar.

Bob makes tiddlers that aren't saved to the file system, the tiddlers you listed are not supposed bo be saved to the file system and are behaving correctly.
The paths part where it adds \system\Bob\system\Bob sounds like another bug I thought I had fixed. Please make a new issue for it.

I will open a new issue as you suggested. I think this one is solved.


Fix huge mistake

Damn it, my heartbeat went up when I saw the PR title! 😄

Could you add a test to ensure this won't happen anymore?

@vadimdemedes Done in https://github.com/vadimdemedes/generator-micro-service/pull/1/commits/2368b0b8c98fa3ee95d88b808f4e4bede0072c91


Add otel trace support for tcp request

eventmesh's http request can be auto traced by otel java instrumentation, but tcp request need us to support ourselves

Currently, there is a partner is implementing trace plugin.

Completed.


Updating AMP to latest version (<IP_ADDRESS>) breaks instance manager gui and cli

Bug Report
System Information

Operating System (Including distribution name and version number)
Microsoft Windows Server 2016 Standard
10.0.14393 Build 14393
AMP version and build date (Always use the version number, 'latest' is not valid!)
<IP_ADDRESS>
unsure what build date, it was downloaded fresh today, 7th Sep, 2020
Which AMP release stream you're using (Mainline, Nightly or FastTrack)
Mainline

I confirm:

[x] that I have searched for an existing bug report for this issue.
[x] that I am using the latest available version of AMP.
[x] that my operating system is up-to-date.

Symptoms

AMP Instance Manager GUI does nothing when i try to open it, does not open a window or anything
AMP Instance Manager CLI errors out no matter what i do
C:\Program Files\CubeCoders Limited\AMP>ampinstmgr upgradeall

Unhandled Exception: System.MissingMethodException: Method not found: 'Void InstanceManagerPlugin.LocalInstanceManager..ctor(ModuleShared.ILogger, ModuleShared.IAuditLog, ModuleShared.IPlatformInfo, ModuleShared.IRunningTasksManager, ModuleShared.IFeatureManager, GSMyAdmin.Authentication.IAuthenticationProvider, ModuleShared.IAMPInstanceInfo)'.
   at InstanceManagerCLI.Core.Run()
   at InstanceManagerCLI.Program.Main()

Reproduction

Install version <IP_ADDRESS>
Setup instances as required, ones used in my case are McMyAdmin, 7Days2Die, Factorio and Counter-Strike: Global Offensive
(Should be noted, the McMyAdmin instance is using a license for McMyAdmin2, the rest are using a single license for AMP purchased a month or so ago)
Use the installer for AMP version <IP_ADDRESS> downloaded from the cube coders website following the upgrading instructions from the Wiki
At this point, both the gui and cli fail to function

Can you tell us what user you are using for AMP? Are you running it as an Administrator?

You need to run the setup in repair mode, then reboot the machine.


onChange prop

Does it make sense to suggest an additional prop onChange: (updatedPosition: { x, y, width, height }) => void? It will call the passed callback when any change did happen (resize or drag) with the updated coords and dimensions.

@agentcooper Thank you for proposal. it is simple and nice idea. Now, certainly call back is too much. But, even if add onChange callback, onResize and onDrag is required, and they are overlapping.I want to add if to reduce the callbacks.


Replace dead "stress" binary with new, maintained, "stress-ng" binary

What this PR does / why we need it:
The PR addresses this issue.
Release note:

replace dead "stress" binary with new, maintained, "stress-ng" binary

/cc @vladikr @acardace @EdDev @ormergi @fgimenez

Hey @iholder-redhat I suggest that to run migration test few more times to make sure they are not flaky

Hey @iholder-redhat I suggest that to run migration test few more times to make sure they are not flaky

Great idea! thanks!
Passed: 1
Failed: 0
/test pull-kubevirt-e2e-k8s-1.19-sig-compute pull-kubevirt-e2e-k8s-1.20-sig-compute pull-kubevirt-e2e-k8s-1.21-sig-compute

Passed: 0
Failed: 1
/test pull-kubevirt-check-tests-for-flakes

Passed: 2
Failed: 0
/test pull-kubevirt-e2e-k8s-1.19-sig-compute pull-kubevirt-e2e-k8s-1.20-sig-compute pull-kubevirt-e2e-k8s-1.21-sig-compute

sig compute:
Passed: 2
Failed: 0
/test pull-kubevirt-e2e-k8s-1.19-sig-compute pull-kubevirt-e2e-k8s-1.20-sig-compute pull-kubevirt-e2e-k8s-1.21-sig-compute
test-for-flakes:
It seems like nothing fails but the lane exceeds its timeout. Let's try again.
/pull-kubevirt-check-tests-for-flakes

/lgtm

I thing we're confident on sig-compute lanes (all 3 of them passed 4 times in a row), but pull-kubevirt-check-tests-for-flakes keeps failing.
It looks like no actual test is failing but that the timeout have exceeded:
{"component":"entrypoint","file":"prow/entrypoint/run.go:255","func":"k8s.io/test-infra/prow/entrypoint.gracefullyTerminate","level":"error","msg":"Process did not exit before 5m0s grace period","severity":"error","time":"2021-07-19T00:09:14Z"}

@fgimenez do you think it has something to do with my PR or it's maybe effected by something else?
could it be that since the old stress binary was crashing and now it actually runs we hit the timeout?

Trying one more time
/pull-kubevirt-check-tests-for-flakes

Trying one more time
/test pull-kubevirt-check-tests-for-flakes

/approve
/hold
feel free to unhold when confident that everything is fine.

@fgimenez do you think it has something to do with my PR or it's maybe effected by something else?

doesn't look related to your PR, we have seen before pull-kubevirt-check-tests-for-flakes timing out when there are a bunch of lengthy tests to be executed :+1:

@fgimenez do you think it has something to do with my PR or it's maybe effected by something else?

doesn't look related to your PR, we have seen before pull-kubevirt-check-tests-for-flakes timing out when there are a bunch of lengthy tests to be executed

Thanks!
If that's the case I guess we can merge it.
/unhold

/cherrypick release-0.41


[CIRCT] Add Godbolt example to Calyx IR website.

@mikeurbach added Godbolt support for CIRCT. I think it is a great way to demonstrate Calyx, and reproduce bugs. I've constructed a small example of an optimization available in the CIRCT dialect:
https://godbolt.org/z/Tv7dcb8s7
It seems that emit-calyx isn't available yet as a command line argument. Perhaps one day we can add support for that as well (unsure what exactly this entails). In any case, thanks Mike! This is super cool work.

I believe the version of CIRCT used in Compiler Explorer was built once from CIRCT main and hasn't been updated. I'm not sure how the Compiler Explorer folks support trunk based development like CIRCT and LLVM use, but perhaps we can trigger another build so a more recent CIRCT is available. I'm not sure what MLIR does in Compiler Explorer, but it must be the same story.


feat: New developer notifications emailed to businesses

This is a work-in-progress PR that aims to resolve #208. In order to deploy these changes, the Heroku scheduler add-on will eventually need to be added to the website.
Tracking feature progress:

[x] Add a new column to the Business model,new_developer_notifications, as an enum with values none, daily, and weekly; defaulted to none
[x] Add an option for this field on /businesses/:id/edit
[x] Add a job that gathers developer profiles added in the last 24 hours and last 7 days and sends a respective email to paying customers based on their preference
[ ] Run this job every day at 9am EST
[x] Add an unsubscribe link to the bottom of the email that links to editing their business profile
[x] Highlight the feature on the /pricing page

Pull request checklist

[x] Your code contains tests relevant for code you modified
[x] You have linted and tested the project with bin/check

Looked over things really briefly. I think most of what you're saying makes sense. Like you said, the model is the main thing, and the rest come primarily down to copy and code style.
Only thing I wanted to make sure that you were aware of is the fact that you can't hyperlink in plain text emails. Other than that I can implement all of the suggested changes. I particularly like the bit about extracting the rake task logic out into a model. Good thinking with that.
I want to stick to my personal commitment about another project, so I'll be spending time on that this weekend when I have time, so I actually won't get around to this until next week. Up to you if you want to push this across this finish line. I'm fine either way.

Only thing I wanted to make sure that you were aware of is the fact that you can't hyperlink in plain text emails.

That's correct, but you can add the URL for someone to copy/paste in their browser. I'm doing that in the AdminMailer text formats.

I want to stick to my personal commitment about another project, so I'll be spending time on that this weekend when I have time, so I actually won't get around to this until next week. Up to you if you want to push this across this finish line. I'm fine either way.

Sounds great, thanks for the heads up! I might try to pick up bits of this here and there and will make sure to push whenever I make changes.

@jacobdaddario, a heads up that I'm directly testing a rake task in PR #225 and it seems to be much less work than it used to. Check out this test for an example, which tests this task.
I'm happy to go with this approach or a custom object; your call!

I think I'm gonna go with a little command pattern/service object. Seems very suitable here. Any strong opinions on where that goes? I'm thinking about putting it under a Business namespace in the models folder.

Sounds great on both accounts! A PORO that gets called from the rake task sounds 👌

I applied all of the changes that I requested that were still unresolved. Most of the stuff was around copy/design in the emails, the enums, and naming. I think all that's left is is testing the rake tasks!
One thing that I overlooked is we need a paywall or CTA in the form for folks that don't have an active business subscription. I'm not sure what the best design is for that just yet, but wanted to call it out. We can merge this in with a feature flag if need be.

@joemasilotti Thank you! I really appreciate it. By the way, I did some searching about the timestamp precision thing again, and I found this: https://github.com/rails/rails/blob/2ea5268cd2994a8d4628fbdb02c64e4d25549c7f/activerecord/lib/active_record/migration/compatibility.rb#L220
This was the only compatibility change for timestamps. It changed in Rails 6 which is why we're seeing the backwards compatibility change for Rails 5.2. Is there a reason you think Rails 7 shouldn't add precision by default? From what I can see, it never changed back. At least as evidenced in this compatibility file.

Weird! Thanks for diving in. I'm using PostgreSQL 14.0, which is one minor release behind latest.
Are you saying that the latest versions remove the precision from db/schema or add them in? Because there are other spots in the schema where precisions are explicitly set. Ideally, I'd like to keep them all consistent.

I'm saying the latest version includes the precisions by default. You can see that the change kicked in in version 6.0. We can confirm that by seeing they added a backwards compatibility method for version 5.2 and below in that compatibility file.
The second file linked in the edit shows where the current definition for timestamps is. If you follow the conditional to see if it supports it, it shows that the postgres adapter supports it for all versions.

Ahhh gotcha! Then is it safe to remove all of the precision options in the schema?

My thought process was that they'd generate in the schema by default, since that's the behavior for all Postgres versions since Rail 6.0, as far as I can tell.

Interesting. And if you run rake db:migrate:reset does it add all the instances of precision: back in, remove them all, or some weird mix?

@joemasilotti It adds all of the datetime precision options back in.

Oh man, for real? And then if you re-run the most recent migration it... removes a few instances of precision:?

I just pulled from main and ran it. I don't see anything different. Most recent commit seems to affect timezone, not precision. What makes you think it'd be different?

What makes you think it'd be different?

Didn't this whole conversation spark from this PR removing a could instances of precision: in the schema? Or am I going crazy today.

What makes you think it'd be different?

Didn't this whole conversation spark from this PR removing a could instances of precision: in the schema? Or am I going crazy today.

Oh sorry for the confusion. I'm remarking about the problem in general.

Gotcha. What do you propose moving forward? I think you have more knowledge around this then I do at this point.

I'm in favor of going with the default. I just don't get why your machine isn't producing that result anyways.
Also, has less time to work on this today than I thought I would.  Got hung up on something and I'm too tired to debug it.
Considering reverting back to not having a command object and just testing the rake tasks directly.

@joemasilotti Alright, I think I've taken this as far as I can.

I've soft feature flagged email preferences for the time being. I imagine we'll need a separate PR to figure out how we want to gate premium content from companies that have not yet paid for a subscription. Obviously the field is still reachable, but it won't appear on the business form for now.
You'll need to set this up in Heroku's scheduler to run at the desired time whenever we complete this full feature.
I see you changed the query for developers into a date range as a matter of code quality. I'm not sure why you switched to Date.current though. This was breaking tests on my machine because Date.current is not timezone aware unlike Time.now. My PSQL database saves thing in UTC time, and without the timezone aware Time.now, developers were actually being created before the current time on my system. On a production environment this won't be a problem, but if there's no particular reason you used Date.current over Time.now, it might be best to keep the timezone aware methods.
Regarding the datetime precision thing. I'm fairly confident that default behavior should be having precision: 6, but it's up to you how you handle this. I'll say anecdotally, after resolving merge conflicts on this branch, whenever I tried to revert the precision values added to the schema, I'd get database integrity issues on my end. Rails would keep telling me I had pending migrations and wouldn't let me run tests. Consequently, I've committed he precision values in this PR.

After I get #220 merged, I'll probably take a break from committing for a while. I'll be honest that I struggled with this branch for some reason, and I don't want to take away from your development time by making do code reviews. Plus, it'll let me focus on my personal project that I've been neglecting.

Awesome, this is perfect for now. I'm going to change it to a "real" Feature.rb flag so we don't have the environment check in the view. From there, I'm hoping to add a Subscribe button to /developers.
👍
Hmm, I that's backwards. Both Date.current and Time.current take into account time zone. Time.now does not. Could they be failing because the created developers were "in between" UTC's midnight and your current time zone?
Gotcha, sounds good. I'll keep what you have and if I run into a different diff I'll address it later.

Outside of hearing your feedback on number 3. I can take this over the finish line. Thanks again for the contribution, this was a lot of work and I really appreciate it!

Oh shoot, you're totally right about Date.current. I was in a rush last night, and I must have skimmed TimeZone.now as Time.now.
I'd hate to quit on you, so I can investigate this and the feature flag. Whatever you feel is most time efficient. I want to be respectful to your codebase and to your time.

All good! Don't ever feel obligated to work on this, every line of code you write is one less for me :)
If you get around to making changes go for it. If not, I'm hoping to dive into some work later this week and can take this over the finish line.

Holy crap, dates and time zones suuuuuuuuuuck.
I ended up reworking the logic of the mailer around dates. Using 1.day.ago and friends uses the current time zone – that combined with #beginning_of_day and #end_of_day makes it a bit easier (IMHO) to reason about what days we are talking about. I also dropped the enum-ish param for two separate methods.
Thanks for the work you put in on this! I'm going to sleep on the PR, review it tomorrow, and hopefully merge this weekend if all still looks good.

And we're live! 🎉
Wow that was a big one. That definitely snuck up on me, I did not expect this to be such a huge commitment. Thanks again for doing the majority of the work on this, @jacobdaddario! I always appreciate it :)


Add (Abstract)StringAssert#as(Boolean|Byte|Short|Integer|Long|Float|Double)

Summary
This is a refined feature request derived from #2509.
Per @scordio's commented, it might be reasonable to add following signatures.
AbstractStringAssert#asBoolean() returns BooleanAssert

AbstractStringAssert#asByte() returns ByteAssert
AbstractStringAssert#asByte(int radix) returns ByteAssert

AbstractStringAssert#asShort() returns ShortAssert
AbstractStringAssert#asShort(int radix) returns ShortAssert

AbstractStringAssert#asInteger() returns IntegerAssert
AbstractStringAssert#asInteger(int radix) returns IntegerAssert

AbstractStringAssert#asLong() returns LongAssert
AbstractStringAssert#asLong(int radix) returns LongAssert

AbstractStringAssert#asFloat() returns FloatAssert

AbstractStringAssert#asDouble() returns DoubleAssert

NumberFormatException throwable from those parse...(String) methods, except the Boolean#parseBoolean, should be regarded as failing assertions.
Example
assertThat("yes")
//        .isNotNull() // implicit
        .asBoolean()
        .isTrue(); // fails
assertThat("32")
        .asInteger()
        .isEqualTo(32); // succeeds
assertThat(".0d")
        .asDouble()
        .isZero();

A side concern arose regarding the naming.
I just hit by parse methods defined in classes reside in java.time package.
TemporalAccessor expected;
assertThat("2022-03")
        .asYearMonth()
        .hasSameField(actual, ChornoField.YEAR);

the asYearMonth() method seems have no problem but parsesIntoYearMonth may look better.
TemporalAccessor actual;
assertThat("2022-03")
        .parsesIntoYearMonth(DateTimeFormatter.XXX)
        .hasSameYear(actual, ChornoField.YEAR);

Hi, I am interested in this. If these modifications are considered necessary, can you assign me?

We are agreeing to this as it is limited to string assertions

Addressed by https://github.com/assertj/assertj/pull/2580


I encounter a KeyError: '&-target'.

Hello,
In the example strategy, there are the following parameters:
buy_params = {
"threshold_buy": 0.59453,
"w0": 0.54347,
"w1": 0.82226,
"w2": 0.56675,
"w3": 0.77918,
"w4": 0.98488,
"w5": 0.31368,
"w6": 0.75916,
"w7": 0.09226,
"w8": 0.85667,
}
sell_params = {
"threshold_sell": 0.80573,
}
When I run Hyperopt to obtain these values, I encounter a KeyError: '&-target'.
Could you please help me review this?

I removed the models, and then it worked.


LT-20351: Fix LT-20351 and implement Novel Root Guesser

This adds a one line fix for LT-20351 proposed by Andy Black in its comments.
This adds a MaxUnapplications parameter to make debugging very slow words possible.
This implements the Novel Root Guesser requested in LT-21911 by adding lexical patterns using natural classes and some regular operators (e.g. [Seg], ([Seg]), [Seg]*).

Sorry for all of the formatting errors.  I don't have a Resharper license and I'm new to C#.

This change is

Codecov Report
Attention: Patch coverage is 78.26087% with 45 lines in your changes missing coverage. Please review.

Project coverage is 69.93%. Comparing base (a9ed995) to head (5522335).
Report is 5 commits behind head on master.

Files with missing lines
Patch %
Lines

....Morphology.HermitCrab/CharacterDefinitionTable.cs
65.07%
15 Missing and 7 partials :warning:

src/SIL.Machine.Morphology.HermitCrab/Morpher.cs
82.14%
14 Missing and 6 partials :warning:

...chine.Morphology.HermitCrab/AnalysisStratumRule.cs
0.00%
1 Missing and 1 partial :warning:

src/SIL.Machine/Annotations/Annotation.cs
93.75%
0 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #245      +/-   ##
==========================================
+ Coverage   69.80%   69.93%   +0.12%
==========================================
  Files         379      379
  Lines       31478    31674     +196
  Branches     4399     4437      +38
==========================================
+ Hits        21974    22150     +176
- Misses       8483     8491       +8
- Partials     1021     1033      +12

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

I didn't use a regular expression to find or match patterns because I wanted this to be backwards compatible with existing projects.  The characters '[', ']', '(', ')', and '*' all could be valid characters in the character table.  So, I can't tell if a lexeme with [...] in it is a pattern without analyzing the shape.  I only recognize the pattern if the lexeme would have an invalid shape otherwise.  If I have to analyze the shape anyway, it isn't hard to make the shape a pattern to match against other shapes.
I fixed the other issues.

One advantage of matching the shapes rather than using a regular expression is that I unify the feature structures while matching.  So, the pattern can add some details to the lexeme being matched (such as accent marks or tones).


CI: remove conda restriction

If this passes I will self merge and rebase my other branches.

[Current coverage][cc-pull] is 81.50%

Merging [#493][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.33%

@@             master       #493   diff @@
==========================================
  Files            19         19
  Lines          3844       3844
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           3146       3133    -13
- Misses          698        711    +13
  Partials          0          0

Powered by Codecov. Last updated by [82a54d2...2be4f98][cc-compare]
[cc-base-branch]: https://codecov.io/gh/NSLS-II/bluesky/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/NSLS-II/bluesky/compare/82a54d23f01f4b5adb4c982cf5348d5e7811009a...2be4f98b591351ace2c8765bd23a654339dc91d4
[cc-pull]: https://codecov.io/gh/NSLS-II/bluesky/pull/493?src=pr