text:
Add Xcode reporter

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
This pull request introduces a Xcode reporter

What is the current behavior? (You can also link to an open issue here)
No Xcode reporter #219

What is the new behavior (if this is a feature change)?
The new Xcode reporter reports the duplications on the format full_path_to_file:line:character: warning: {content}. Where content is the warning message.
Xcode automatically recognizes warnings on this format and highlight the corresponding file.

Other information:
For Xcode to link to the correct file the full path needs to be provided. Running jscpd with the --absolute option works, but is there a better way to get the full path, or maybe enforce --absolute for this specific reporter?

P.S: I have never written TypeScript before. This is a small change, but if anyone spots something odd please point it out!

This change is

Thank you for the contribution, with great pleasure I will add the changes to the repo. I have just 1 question - should we always use absolute path for xcode reporter?

Yes. In order for Xcode to be able to link the warning with the correct file, the full path need to be provided.
Great! I'm going to update the code.

Ok. I think everything is ready to merge.

authors: juanj kucherenko

repo: kucherenko/jscpd

license: mit


text:
make Releases and CHANGELOG less-noisy and more readable

First of all, thank you for this awesome project and for keeping it up-to-date! ❤

I would like to raise an idea of how to improve Developer Experience of CHANGELOG.md and Releases overall.
I think that a new Release should be done only if the source code is changed or if a regular package dependency is updated (so feat, fix, revert, perf).
For all other changes, such as updating devDependencies, CI-related stuff, tests, docs, and code formatting (ci, chore, docs, style, test) there is no need to publish a new npm release.
This should allow both CHANGELOG.md and Releases to be less noisy (cause there will be fewer releases) and more readable for the consumers of the package, whose job is to understand what has changed in the code they really touch/install (cause instead of one-line release logs there will be batched ones with both code changes (primary stuff) and chores around it (secondary)).

Sounds reasonable, that is a lot of release always in one go which could be skipped.
@bbortt Do you have access to edit the releases?
We could setup release-drafter and collect all the changes. And then initiating a release manually.

I do understand, that it is very noisy. the reason I added it, is that it was very handy back then: it requires 0 manual interaction, and I didn't know about semantic-release at this time.
I think I can give it some effort to replace standard-version by semantic-release. didn't have much time lately, because I am writing my thesis currently 😅 but that much I can invest.
it does a much bedder job at filtering relevant commits (ignores types chore, ci and sorts), hovewer. it would then release just code changes. does that sound good to you? see my personal project for reference..

@bbortt Do you have access to edit the releases?

yes, I do. however I would leave it as is, I think. and look forward to be less noisy in the future 🚀

source: gharchive/issue

authors: Den-dp bbortt kuhnroyal

repo: kuhnroyal/mat-datetimepicker

license: MIT

license_type: permissive

license_source: github-api


text:
refactor: defines all font-weights using custom properties

Defines custom properties for all cuts of Inter we set-up and uses them everywhere we declare a font-weight property.
Signed-off-by: Philipp Rudloff philipp.rudloff@konghq.com

Oh its a draft! 😆 Sorry!

source: gharchive/pull-request

authors: johncowen kleinfreund

repo: kumahq/kuma-gui


text:
ci(installer): add tests for various modes of installer

continuing the work of @lobkovilya in https://github.com/kumahq/kuma-website/pull/1642
Did you sign your commit? Instructions
Have you read Contributing guidelines?

xref https://github.com/kumahq/kuma-website/issues/1647

repo: kumahq/kuma-website


text:
Some parameters of openvpn_server do not appear with /metrics openvpn_exporter

Hi, I have launch docker and in the parameters, I cannot see this:
openvpn_server_client_received_bytes_total
openvpn_server_client_sent_bytes_total
openvpn_server_route_last_reference_time_seconds
openvpn_status_update_time_seconds
My openvpn-status metrics are:
https://pastebin.com/hj9kbZzK
Why don't those parameters appear? I need them for grafana's dashboard

ok, the problem is solved. I need edit the systemd unit for openvpn and add:
--status-version 2
look like this:
ExecStart=/usr/sbin/openvpn --daemon ovpn-%i --status /run/openvpn/%i.status 10 --status-version 2 --cd /etc/openvpn --script-security 2 --config /etc/openvpn/%i.conf --writepid /run/openvpn/%i.pid
systemctl daemon-reload
systemctl restart openvpn
And now , the metrics are ok.
openvpn_openvpn_server_connected_clients{status_path="/etc/openvpn_exporter/server.status"} 2
HELP openvpn_server_client_received_bytes_total Amount of data received over a connection on the VPN server, in bytes.
TYPE openvpn_server_client_received_bytes_total counter
openvpn_server_client_received_bytes_total{common_name="maykel",connection_time="1584714006",real_address="1.1.1.1:41889",status_path="/etc/openvpn_exporter/server.status",username="maykel",virtual_address="10.8.0.6"} 2325
openvpn_server_client_received_bytes_total{common_name="maykel",connection_time="1584714032",real_address="1.1.1.1:42537",status_path="/etc/openvpn_exporter/server.status",username="maykel",virtual_address="10.8.0.10"} 10498
HELP openvpn_server_client_sent_bytes_total Amount of data sent over a connection on the VPN server, in bytes.
TYPE openvpn_server_client_sent_bytes_total counter
openvpn_server_client_sent_bytes_total{common_name="maykel",connection_time="1584714006",real_address="1.1.1.1:41889",status_path="/etc/openvpn_exporter/server.status",username="maykel",virtual_address="10.8.0.6"} 8666
openvpn_server_client_sent_bytes_total{common_name="maykel",connection_time="1584714032",real_address="1.1.1.1:42537",status_path="/etc/openvpn_exporter/server.status",username="maykel",virtual_address="10.8.0.10"} 15937
HELP openvpn_server_route_last_reference_time_seconds Time at which a route was last referenced, in seconds.
TYPE openvpn_server_route_last_reference_time_seconds gauge
openvpn_server_route_last_reference_time_seconds{common_name="maykel",real_address="1.1.1.1:41889",status_path="/etc/openvpn_exporter/server.status",virtual_address="10.8.0.6"} 1.584714014e+09
openvpn_server_route_last_reference_time_seconds{common_name="maykel",real_address="1.1.1.1:42537",status_path="/etc/openvpn_exporter/server.status",virtual_address="10.8.0.10"} 1.584714096e+09


text:
[New game]: A new Pong Game

🎮 Game Request
Game logic and basic description
A simple table tennis-like game where players control paddles to hit a ball back and forth across the screen.
It is a classic arcade game where two players control paddles on opposite sides of the screen, trying to hit a ball back and forth. The objective is to score points by making the ball pass the opponent's paddle.
The game starts with the ball positioned in the center of the canvas, and each player's paddle positioned on their respective sides. The players can control their paddles using keyboard inputs or mouse movements.
To control the paddles, the players can move them up or down within the boundaries of the canvas. When the ball collides with a paddle, it changes direction based on the angle of impact.
Point down the features
Game points
The game keeps track of the score for each player, incrementing it whenever the ball passes the opponent's paddle and goes off the screen. The players can see their scores displayed on the screen.
The game continues until one player reaches a predefined score limit, typically 10 or 15 points. When a player wins, a message is displayed on the screen, and the game can be reset to play again.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @akankshachanana1 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Hey @akankshachanana1!
We are already having a similar game request in #1608 👀
Make sure you come up with a cool unique idea 😀
Waiting for your new game idea 💗.

Hey @akankshachanana1 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇

okie

repo: kunjgit/GameZone


text:
Handle localStorage being unavailable

Discussion in #97. When localStorage is unavailable, triggers an event on the adapter and keeps records in memory instead.

Lovely.

authors: dfreeman kurko

repo: kurko/ember-localstorage-adapter

license_source: bigquery


text:
how to add xt file to analyse

hello
i had the trace file,but how to use this viewer to analyse?
mac did not find how to import file

mac can not load xt，but windows is ok

repo: kuun/xdebug-trace-viewer


text:
Fix attach kuzu in in-mem mode

Description
This PR fixes attaching kuzu database in in-memory mode, and add ci to run extension test in in-mem mode.

Can u also add extension test to codecov in mem run?

The extension tests need to recompile the gtest and test files so we can't run extension tests with main tests.
We should consider refactoring the testing framework so we don't have to recompile the testing framework when running extension tests.

repo: kuzudb/kuzu


text:
fix restart order

^^'

the function should be called restop :+1:

authors: kvaps vbauchart

repo: kvaps/fake-systemd


text:
Prevent from running on Master nodes

Great project!
I am deploying linstor for the first time and I think I've reached almost the finish line, but now the "satellite" workload is being deployed onto all of my node's - but I only want to use the storage on my worker nodes, so I only configured them with storage. Now the Satellite workload is failing on my "master" nodes.
Should it be running on the master nodes? and if not, how do I make it not run there?

Hi, sorry, I somehow did not notice about this issue.

the "satellite" workload is being deployed onto all of my node's

This is because tolerations. Default example yamls are containing tolerations to allow run satelites on master nodes,  you can configure any tolerations in your values.yaml
https://github.com/kvaps/kube-linstor/blob/c8d9f624df5d4525fe4d29d6851e944fc68d34dc/examples/linstor.yaml#L17-L22

authors: kvaps lsadehaan

repo: kvaps/kube-linstor


text:
Add YEED token to defaults

Hi, Our Token Add to MEW
Yggdrash project
https://etherscan.io/token/0x6f7a4bac3315b5082f793161a22e26666d22717f
https://yggdrash.io
Thank you so much

Thank you

repo: kvhnuke/etherwallet


text:
Remove workaround for linux build per RCD

It is no longer necessary with rake-compiler-dock-1.2.1. It is fixed in https://github.com/rake-compiler/rake-compiler-dock/issues/65

Hi @larskanis,
This looks great! Thank you so much for taking care of this, I really appreciate it.
I also think that @flavorjones would be happy to get the new release of rake-compiler-dock for Nokogiri. 😄
Krzysztof

Hi @stanhu,
Before we merge, I need to quickly make sure that the Gem would build correctly on a few systems when building locally -- Red Hat, CentOS, Debian, Ubuntu... with the Ruby they ship, and under rbenv and RVM.
Krzysztof

@kwilczynski I'm testing Debian bullseye here: https://gitlab.com/stanhu/ruby-magic/-/jobs/2219990176

I think the failure is unrelated:
/usr/local/rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/fileutils.rb:243:in `mkdir': File exists @ dir_s_mkdir - /builds/stanhu/ruby-magic/ext/magic/share (Errno::EEXIST)
	from /usr/local/rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/fileutils.rb:243:in `fu_mkdir'
	from /usr/local/rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/fileutils.rb:186:in `block in mkdir'
	from /usr/local/rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/fileutils.rb:185:in `each'
	from /usr/local/rvm/rubies/ruby-3.1.0/lib/ruby/3.1.0/fileutils.rb:185:in `mkdir'
	from ../../../../ext/magic/extconf.rb:323:in `<main>'

It seems we may be missing a rake clobber in between platforms? Trying again in https://gitlab.com/stanhu/ruby-magic/-/jobs/2220023361.

Hi @larskanis and @stanhu,
Sorry for late reply!
Everything works on multiple versions of Ubuntu, Debian and CentOS, etc. Tested with Ruby that ships with the distribution, plus installation under RVM and rbenv. No issues.
Thank you so much @larskanis! Much appreciated!
Krzysztof

Hi @larskanis,
Sorry to bother you, but would you mind signing your commit? Let me know if you don't have GPG set up, so that I can deal with this on our side.
Krzysztof

Sorry to bother you, but would you mind signing your commit? Let me know if you don't have GPG set up, so that I can deal with this on our side.

I updated the commit with a signature of my PGP key.

Hi @larskanis,

Sorry to bother you, but would you mind signing your commit? Let me know if you don't have GPG set up, so that I can deal with this on our side.

I updated the commit with a signature of my PGP key.

You rock! Thank you so much!
Krzysztof

authors: kwilczynski larskanis stanhu

repo: kwilczynski/ruby-magic


text:
feat: support proxy options

Add support for proxy options. e.g. HTTP_PROXY and a command line option.

Implemented in v4.3.0

repo: kxxt/aspeak


text:
Feature Request: enable an option to exclude predefined icons

Is there currently a way to disable the use of the predefined icons? I was thinking maybe it can be an option during the setup.
require('nvim-web-devicons').setup {
  override = {},     -- we define all our icons here
  predefined = false -- use none of the predefined icons
}

The reason for this is so that I can define a universal default icon for every single filetype. Can you suggest a better approach perhaps?

not sure why you'd want to do this though :)
but it could be done somehow like this:
local icons = require'nvim-web-devicons'.get_icons()
local new_icons = {}
for ft, i in pairs(icons) do
  new_icons[ft] = {
    icon = "X",
    color = "#ffffff",
    cterm_color = 255,
   name = i.name
  }
end
require'nvim-web-devicons'.set_icon(new_icons)

or something like that

Closing, feel free to reopen if provided solution is not adequate.


text:
Add support for Mikrotik as openvpn client

Add support for Mikrotik as openvpn client, Also fix #73
Mikrotik does not support compression, auth SHA256 (require auth sha1) and want mtu set.
Make this options configurable

@kyl191 Any info on when this will be merged?

authors: MVKozlov joekohlsdorf


text:
nest-next test suite

From #92:

@yakovlev-alexey
I would start by introducing a test suite testing the following:

static pages
getServerSideProps, getInitialProps, etc with context checking (values returned from controlled should end up in query)
paths with single and multiple route params, nested and at the root
static paths beside paths with routes params like in https://github.com/kyle-mccarthy/nest-next/issues/93
usage with baseUrl and other next.config.js options (asset url I believe also needs testing)
dev mode and production builds
It would also make sense to develop tests in such a way that would allow us to run them with specific Next versions (a new Nest version is unlikely in my opinion so no need to specify that). This will also open up the possibility to run CI in a matrix to effortlessly make sure all supported versions work.

Actually while there is no need to specify Nest version Nest adapter should be specified (fastify/express)

repo: kyle-mccarthy/nest-next


text:
Displaying serverless map tiles in TerriaMap

@kylebarron ,  I did a test trying to display the serverless map tiles in TerriaJS (see interactive demo if interested), using this "url-template" catalog that @kring supplied me:
{
  "catalog": [
    {
      "name": "USGS TopoMap Test",
      "type": "url-template",
            "url": "https://us-west-2-lambda.kylebarron.dev/usgs-topo/{z}/{x}/{y}@2x.jpg?url=dynamodb%3A%2F%2Fus-west-2%2Fusgs-topo_high_oldest.v2"
        }
    ]
}

Which one can visualize using:
https://gamone.whoi.edu/terriamap/#clean&proxy/_60s/https://raw.githubusercontent.com/USGS-CMG/terriajs-dive/master/examples/topo_template.json
And while this mostly works (hurrah!):

generating requests like:
https://gamone.whoi.edu/terriamap/proxy/https://us-west-2-lambda.kylebarron.dev/usgs-topo/12/1249/1524@2x.jpg?url=dynamodb%3A%2F%2Fus-west-2%2Fusgs-topo_high_oldest.v2
we find that after a bit of panning/zooming around we get errors like this:

I guess this could be a feature rather than a bug to prevent overuse or something, but I thought I should report out here with what I found in case others try something like this.

I think you're hitting my CORS settings 🙂
Since the example is hosted on my own AWS account, I define a set of allowed origins for my hosted version, basically so that someone doesn't launch a high-traffic website pointing to my server.
But this is designed to be really easy to deploy yourself; make sure you have Docker and serverless installed, then essentially just
make package && sls deploy --bucket your-bucket-in-us-west-2

Then you just replace
https://us-west-2-lambda.kylebarron.dev/usgs-topo/

with whatever endpoint url is printed at the end of the previous command.

Note also that the url query parameter used in my example points to a DynamoDB database on my account. To get started, you can just change that to a public mosaic in usgs-topo-tiler:
https://raw.githubusercontent.com/kylebarron/usgs-topo-tiler/master/data/mosaic_high_oldest_v1.json.gz

Thanks @kylebarron !   I'm heading out for a week of vacay, but will try setting this up on our account when I return!

authors: kylebarron rsignell-usgs

repo: kylebarron/usgs-topo-mosaic


text:
custom logging + APNSwiftClient

Adds support for passing a custom Logger to APNSwiftConnection's send and connect calls.
Adds a new APNSwiftClient that exposes all convenience overloads for the main APNS send method. This allows for types wrapping APNS connections (like a pool or other helper) to easily expose all of the same convenience APIs without having to duplicate everything.
APNSwiftClient also has an optional logger property that it attempts to pass by default. This allows for APNS helpers to provide the logger automatically without requiring the user to pass it.
For example, in Vapor's Request APNS helper:
req.apns.send(..., to: ...)

Request has its own Logger, and can expose it via APNSwiftClient so that the user doesn't need to do:
req.apns.send(..., to: ..., logger: req.logger)

The APNSwiftClient could go into vapor/apns although that would lead to a tiny amount of duplication since APNSwiftConnection has two send methods. But I understand if you wanna keep this library lightweight.
All that vapor/apns really needs is the ability to pass logger: Logger? to APNSwiftConnection's send and connect methods. LMK what you think. I'm happy to pare this back a bit.

One thing @tanner0101 this breaks a ton of API's so it would need to be a major bump.
/* Generic Signature Changes */
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has generic signature change from <Notification where Notification : APNSwift.APNSwiftNotification> to

/* RawRepresentable Changes */

/* Removed Decls */
Func APNSwiftConnection.send(_:bearerToken:to:with:expiration:priority:collapseIdentifier:topic:) has been removed (deprecated)
Func APNSwiftConnection.send(rawBytes:pushType:to:expiration:priority:collapseIdentifier:topic:) has been removed

/* Moved Decls */

/* Renamed Decls */
Func APNSwiftConnection.connect(configuration:on:) has been renamed to Func connect(configuration:on:logger:)
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has been renamed to Func send(rawBytes:pushType:to:expiration:priority:collapseIdentifier:topic:logger:)

/* Type Changes */
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 0 type change from Notification to NIO.ByteBuffer
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 3 type change from Foundation.JSONEncoder to Foundation.Date?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 4 type change from Foundation.Date? to Swift.Int?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 5 type change from Swift.Int? to Swift.String?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 7 type change from Swift.String? to Logging.Logger?

/* Decl Attribute changes */

/* Fixed-layout Type Changes */

/* Protocol Conformance Change */

/* Protocol Requirement Change */

/* Class Inheritance Change */

basically, they need to stay but be deprecated.

➜  APNSwift git:(tn-custom-logger) ✗ xcrun -toolchain org.swift.50201911261a swift package experimental-api-diff 1.5.0
[4/4] Linking APNSwiftExample

/* Generic Signature Changes */

/* RawRepresentable Changes */

/* Removed Decls */

/* Moved Decls */

/* Renamed Decls */

/* Type Changes */

/* Decl Attribute changes */

/* Fixed-layout Type Changes */

/* Protocol Conformance Change */

/* Protocol Requirement Change */

/* Class Inheritance Change */
➜  APNSwift git:(tn-custom-logger)

Ah I see you have to run the experimental-api-diff command locally. Ignore that push.

So I'm still getting this:
/* Generic Signature Changes */
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has generic signature change from <Notification where Notification : APNSwift.APNSwiftNotification> to

/* RawRepresentable Changes */

/* Removed Decls */
Func APNSwiftConnection.send(rawBytes:pushType:to:expiration:priority:collapseIdentifier:topic:) has been removed

/* Moved Decls */

/* Renamed Decls */
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has been renamed to Func send(rawBytes:pushType:to:expiration:priority:collapseIdentifier:topic:logger:)

/* Type Changes */
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 0 type change from Notification to NIO.ByteBuffer
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 3 type change from Foundation.JSONEncoder to Foundation.Date?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 4 type change from Foundation.Date? to Swift.Int?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 5 type change from Swift.Int? to Swift.String?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has parameter 7 type change from Swift.String? to Logging.Logger?
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has removed default argument from parameter 3
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has removed default argument from parameter 4
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has removed default argument from parameter 5
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has removed default argument from parameter 6
Func APNSwiftConnection.send(_:pushType:to:with:expiration:priority:collapseIdentifier:topic:) has removed default argument from parameter 7

/* Decl Attribute changes */

/* Fixed-layout Type Changes */

/* Protocol Conformance Change */

/* Protocol Requirement Change */

/* Class Inheritance Change */

But as far as I can tell, all of those methods still exist as overloads of the protocol extensions on APNSwiftClient. Anyone calling those methods on APNSwiftConnection today should still be able to do so. Maybe there are some edge cases where this becomes a breaking change such as referencing method names (like map(APNSwiftConnection.send(_:...)) ?) idk. Vapor at least has not followed semver that strictly and we've never gotten any complaints.

It is experimental. 😀

@tanner0101 can we reproduce this failure (if it is one?) of the api-digester on a small demo project? We should at least have a bug report if we really believe that this is not an actual breakage. I would advise however to write the code in a way that api-digester understands, it's just too easy to make a mistake.

OKay I think this is ready to go.

authors: kylebrowning tanner0101 weissi

repo: kylebrowning/APNSwift


text:
fix: namespace dropdown switch context

Description
Changes proposed in this pull request:

fix bug of switching namespace context
add tests for Namespace Dropdown

Related issue(s)
Closes #2295

/retest

/retest

repo: kyma-project/busola


text:
fixes docker build

Description
Changes proposed in this pull request:

Fixes dockerfile

Related issue(s)

test

repo: kyma-project/cloud-resources-manager


text:
Schema Migrator Revert

Description
Changes proposed in this pull request:

Type Correction

Related issue(s)

/hold

/unhold

authors: piotrmiskiewicz ralikio

repo: kyma-project/control-plane


text:
開始されていません->未着手

梶田先生のメールでは「開始していません」という文字列を「未着手」に変更するようにという指示でしたが、サイト上で見つけることができなかったので、練習がてら変更しました。
ここは別の文字列に変更すべきならば、以下にコメントお願いします。
ここの変更が不要ならば閉じてください。

次の手順で表示されますので，試してみて下さい:

サイトを作成．受講者を数名登録する．
課題を作成．その際，相互評価をONにする．
登録した数名の受講者で課題を提出する．
最終締切日時以降になると相互評価が可能になりますが，その前にいずれかの受講者で課題一覧にアクセスすると「開始されていません」が表示されると思います．

再現方法をコメントしておきました．梶田

On May 21, 2019, at 15:17, Kouki NAGATA <notifications@github.com mailto:notifications@github.com> wrote:
梶田先生のメールでは「開始していません」という文字列を「未着手」に変更するようにという指示でしたが、サイト上で見つけることができなかったので、練習がてら変更しました。
ここは別の文字列に変更すべきならば、以下にコメントお願いします。
ここの変更が不要ならば閉じてください。
You can view, comment on, or merge this pull request online at:
https://github.com/kyoto-u/openpanda/pull/82 https://github.com/kyoto-u/openpanda/pull/82
Commit Summary
開始されていません->未着手
File Changes
M assignment/bundles/resources/assignment_ja.properties https://github.com/kyoto-u/openpanda/pull/82/files#diff-0 (4)
Patch Links:
https://github.com/kyoto-u/openpanda/pull/82.patch https://github.com/kyoto-u/openpanda/pull/82.patch
https://github.com/kyoto-u/openpanda/pull/82.diff https://github.com/kyoto-u/openpanda/pull/82.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/kyoto-u/openpanda/pull/82?email_source=notifications&email_token=AAAZKBDT5TYCOGONM35UDODPWOHWHA5CNFSM4HOHWBFKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GU4BZEA, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAZKBD7ESM366SQDM76AMTPWOHWHANCNFSM4HOHWBFA.

openpanda上での修正終わりました

authors: KoukiNAGATA shojikajita

repo: kyoto-u/openpanda


text:
🛑 senoshaidodelasmanos.love is down

In 0b68f92, senoshaidodelasmanos.love (https://senoshaidodelasmanos.love) was down:

HTTP code: 0
Response time: 0 ms

Resolved: senoshaidodelasmanos.love is back up in 042578b after 29 minutes.

repo: kyryl-bogach/upptime


text:
refactor(typescript_indexer): use native ts.HasExpressionInitializer

Removing defining our own HasExpressionInitializer type. This may have
been added when we upgraded to TypeScript 3.5.3.

@evmar PTAL

repo: kythe/kythe


text:
chore: update release notes

Explanation
Update release notes.

/cherry-pick release-0.2

repo: kyverno/chainsaw


text:
[Enhancement] Add documentation for x509_decode JMESPath function

Description
Related PR: https://github.com/kyverno/kyverno/pull/4664
You can make use of the resources provided in the linked PR's description and test cases.
Slack discussion
No response

hello, can I get assigned to this?

Sorry i got busy with college, I am working on this.

repo: kyverno/website


text:
fix returning to latest release from main

Signed-off-by: Chip Zoller chipzoller@gmail.com
Related issue

Proposed Changes

(hopefully) fixes the redirect from main back to the latest release

Checklist

[x] I have read the contributing guidelines.
[x] I have inspected the website preview for accuracy.
[x] I have signed off my issue.

Sorry for this back-and-forth. I hope this is the last of it.


text:
refactor

big refactor

@l3r8yJ the puzzle #41 is still not solved.

@h1alexbel 1231231

@l3r8yJ the only puzzle #41 is solved here.


text:
V2

V2対応とその他諸々の仕様修正です。
v2のDockerイメージがdocker hubにまだ上がっていなかったようですので動作未確認です。
またv1からのマイグレーション手順に関しては今まとめています。

追加で個人的な要望なのですが、epgstation環境下でffmpegを利用しないという環境はあまり考えられないので、最小限のffmpegビルドをインストール済みのdockerイメージを別タグ等で上げてもいいかなと思うのですが、いかがでしょうか。

v2 対応有り難うございます。
v2 の docker image はもう少ししてから上げようかなと思っています。

最小限のffmpegビルドをインストール済みのdockerイメージを別タグ等で上げてもいいかなと思うのですが、いかがでしょうか。

GitHub Actions の無料枠を使い切りそうなので現状予定は無いです。
apt等のパッケージ管理システムで簡単に追加できるので、あまり問題ないかなあと考えています。

マイグレーション方法こちらの思う方法で記載しておきました。
今後のリリース方法的にここは合わないなどあればよろしくお願いします

まだv2が正式リリースでないのとdocker imageの準備ができていないのでv2ブランチにマージしました。

大変助かりました。ありがとうございました。


text:
Mervat: Workflows, Week 1

What went well?
getting started with Github, creating and cloning repos
What went less well?
generating SSH key
pushing and pulling requests
Lessons Learned
study plan and
what you have done for Sunday Prep Work

@Mervatabuamro don't forget to add always the Milestone to your issue (:

@Mervatabuamro The checked label is usually for the coach, you use the check-in label to communicate that you are ready for checking-in. (:

authors: Mervatabuamro bermarte


text:
Verbose benchmarks

More flexible handling of the "warmup phase" in pytorch tests, to also check for anomalous fluctuations in timings

This is such a boring and painless PR that I'll just merge it

repo: lab-cosmo/sphericart


text:
Feature Discussion: Support global controller-manager and user spec controller

Use case
When we create a terminal controller application, we need two crds to deploy, first is a global crd witch runs at spec namespace and watch for secend crd, withc will create user's real terminal pod.
Problems description
At one k8s cluster, we can just run one and only one deployment of terminal-controller-manager, using global namespace like terminal-system, with 0-N terminal-use-app on demand, using each user's namespace like user-ns-1234-acdf.
When run under hub+image+desktop environment, the typical terminal usage is like blow:

User login
User Install Terminal App at sealos hub page
2.1 Or run sealos apply terminal using cli
Apply terminal svc and get endpoint router
display window

Real problem
Here comes the real problem: Applications like terminal controller witch have more than one crd to run, when and how to install them such as terminal-controller-manager?
So the apply action has to check some statement, check the underlying k8s cluster has already installed and run the terminal-controller-manager or not.
If the answer is yes, everything work as claim, But when the answer is no, thing make diffcult.
The apply action is sent using user's token, and can only access user-owned namespace by default, but we want to install(apply) terminal-controller-manager to the different and unique namespace, and add cluster-admin role, where the user's token don't have permission.
Here also have some risks that even the ingress/nginx controller is not installed at the underlying k8s cluster, which seems to be the fact that any application controller like terminal can not get the ingress installation status.
Possible solutions

Apply all needed prerequirements at each application's crd files, for example, terminal controller says it's want to use ingress/nginx and terminal-controller-manager as underlying dependence, and in cluster files, add some tag to comfirm that these underlying dependences will run at given namespaces and have given admin access roles.
sealos will have some default underlying dependence such as calico/ingress-nginx/minio installed, and apps can direct use these svcs.

To be discussed:
how to apply ignress router with crd? like request ingress-nginx to update access to new sub domian by request route name+service name.

Very good proposal, I think we should add a proposal directory to record this content

Possible resolve method
The application on the hub system have some default action steps:

Install
Run
Update/Keep Running
Close
Uninstall

All life-circle actions are applied at user's control namespaces, and cannot escape to any other namespace, to keep safety and simplify.
Note: The 3rd life-circle Update/Keep Running still needs some discussion, maybe we can delete this, but this statement will be useful for some endpoints to keep run after user closed desktop windows.
Reusing cluster-file design

Install -> Must-Have.
Default is using cluster-files 's ENDPOINT or CMD, to run some actions already defined.
2 Run -> [Optional].
If an application has no GUI entry-point, run action is no action(witch is default value), when this application need to start some entry-point, crds can defined here.
Update/Keep Running ->  [Optional].
Some actions to keep pods(services) running at background after user refresh page or exit window, as also default value is no action.
Close ->  [Optional].
Do some cleaner work when user active close application's window, default value is no action.
Uninstall ->  [Optional].
Fully remove whole application crds, and cleanup user settings if needed.

Example
Terminal Controller Example:

Install: Install terminal-controller-manager
Run: Apply user's terminal pod and start http service at given port.
Update/Keep Running: Keep-alive the terminal pod, so user refresh webpage, can still reuse the http entry-point, or just do nothing is ok.
Close: Delete the user's terminal pod, or just do nothing to leave terminal pod keep running until reach keep-alive timeout.
Uninstall: Delete all running terminal pod, and delete the terminal-controller-manager.

Cloud Init Example

Install: Install infra controller
Run: Apply cloud init operator to provide a user interface.
Update/Keep Running: do nothing, as described blow.
Close: do nothing, when user close the cloud init operator window, either user has already applied the new infra, or just cancel action, so do nothing works fine.
Uninstall: Delete all running infras, and delete the infra controller.

确认一下controller上传模式（管理员上传），因为controller权限有一些需要cluster相关权限，可能上传的如果需要一些cluster权限需要管理员去上传。上传之后在hub上就可以看到对应的APP，租户可以创建对应的CR。
如果不同的controller上架需要确认依赖问题，因为controller安装之前并不知道我们集群有什么组件，它可能会默认安装依赖组件，如果我们已经存在组件的话会导致集群安装了两个相同的组件。

This document can be placed in the proposal

authors: cuisongliu fanux zzjin

repo: labring/sealos


text:
Add support for configuring database CONN_MAX_AGE

Fixes https://github.com/lae/ansible-role-netbox/issues/64
This updates the configuration template and adds documentation for the new netbox_database_extras parameter.

This should be ready now. I've altered it to only add the ability to pass a value for CONN_MAX_AGE

I think I've got it all resolved now

repo: lae/ansible-role-netbox


text:
Translate content to Portuguese (pt-BR)

We desire to translate all the content of this repository to Portuguese. On the future, we intend to translate to other languages too.
For a while, please, choose an idea, made the translation of the content and open a PR (Pull Request)!!!!
Thanks all for your time and contribution!!!

How we should create the new content? Where is the correct path for the translates? Is there a pattern?

Thanks for the contribution, @jvvoliveira  By the way, your PR has already been accepted.
I have chosen a new approach to the folder structure and I will complement the description of this task with this information!!

authors: jvvoliveira laisfrigerio

repo: laisfrigerio/app-ideas


text:
任何时候下拉超过距离都会触发onRefresh函数

比如我滚动了1000px的距离，此时向下滑动，也会触发onRefresh函数，应该还需要判断滚动页面是否在顶部。尝试了下，不知道是不是我页面布局有点乱的原因，获取的scrollTop都是0

有示例吗

https://lakb248.github.io/vue-pull-refresh/
你这个demo你把.content的height变成5000px，然后滚动到底部，在onfresh函数那打上断点，然后下滑，就可以复现(滑动的距离超过你设置的那个高度)

Can confirm this bug. Basically scrolling up a reasonably long page will keep triggering the refresh. Please add a condition to check if we are on the top of the page, otherwise, this useful component may render useless in this case. Thanks.

Sorry, I will fix it this weekend

@pingshunhuangalex @wangmh1990 bug fixed

Thanks mate, will test it out tomorrow, cheers

Hi @lakb248
I just tested things out, it works to some degree.
Yes, it will only be triggered when it's at the top of the page. However, if you scroll (run your fingers through the screen) quickly, it'll also get triggered by the scrolling momentum if the page reaches the top.
An expected behaviour would be when user's finger leaves the screen (touchend), the plugin shouldn't be triggered even at the top of the screen. At the moment, I checked if I'm on the top of the page in the onRefresh method which works well too, but it would still be nice to take this case into the consideration. Thanks.

@pingshunhuangalex  Thanks, I will try to fix it.


text:
Initial documentation

Q
A

Documentation
yes

Description
Closes #6

Thanks for the continued reviews, improvements and help @froschdesign - Just added docs for the view helper and I think that should be everything then?

@gsteel

Just added docs for the view helper and I think that should be everything then?

I'm sure there will be a few small additions, but I'll take them on when we add the pages to the documentation of laminas-i18n.

authors: froschdesign gsteel


text:
feat: enable tracing for object storage

We have this on by default for local fs and in-memory. We also want this for object storage.

Codecov Report
Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.49%. Comparing base (99ae761) to head (d1dbbb6).
Report is 1 commits behind head on main.

Files with missing lines
Patch %
Lines

rust/lance-io/src/object_store.rs
66.66%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3244      +/-   ##
==========================================
- Coverage   78.49%   78.49%   -0.01%
==========================================
  Files         245      245
  Lines       85065    85065
  Branches    85065    85065
==========================================
- Hits        66776    66774       -2
- Misses      15474    15478       +4
+ Partials     2815     2813       -2

Flag
Coverage Δ

unittests
78.49% <66.66%> (-0.01%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

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

repo: lancedb/lance


text:
🛑 Flyingtroll is down

In eb4c2d0, Flyingtroll (https://www.flyingtroll.com) was down:

HTTP code: 500
Response time: 3335 ms

Resolved: Flyingtroll is back up in 08227e5 after 10 minutes.


text:
🛑 vipgifts.net is down

In 80cf788, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: vipgifts.net is back up in ccd7508 after 6 minutes.

repo: lanen/bs-site


text:
🛑 vipgifts.net is down

In 16a1f41, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 583 ms

Resolved: vipgifts.net is back up in ae50e34 after 25 minutes.


text:
🛑 rexingsports.cn is down

In 38de26e, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 846 ms

Resolved: rexingsports.cn is back up in 9e8881e after 41 minutes.


text:
🛑 rexingsports.cn is down

In 4b9c1fb, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 788 ms

Resolved: rexingsports.cn is back up in 7c5a4c8.


text:
🛑 rexingsports.cn is down

In 2169a2b, rexingsports.cn (https://www.rexingsports.cn) was down:

HTTP code: 567
Response time: 548 ms

Resolved: rexingsports.cn is back up in 8231c8f.


text:
🛑 vipgifts.net is down

In 1f37d68, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 567
Response time: 662 ms

Resolved: vipgifts.net is back up in d995d8c after 20 minutes.


text:
🛑 vipgifts.net is down

In 2c4ce9e, vipgifts.net (https://vipgifts.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: vipgifts.net is back up in 6a37786 after 6 minutes.


text:
Bearer token support for self-deployed OpenLLM

Hello there,
I have deployed an OpenLLM on a managed service that is protected by the use of an auth Bearer token:
curl -X 'POST' \
  'https://themodel.url/v1/generate' \
  -H "Authorization: Bearer Sh6Kh4[ . . . super long bearer token ]W18UiWuzsz+0r+U"
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "What is the difference between a pigeon",
  "llm_config": {
    "use[ . . . and so on]
    }
  }'

Curl works like a charm.
In LangChain, I try to create my new llm as such:
llm = OpenLLM(server_url="https://themodel.url/v1/generate", temperature=0.2)

But I don't know how to include this Bearer token, I even suspect it is impossible...
Bot seems to confirm this is impossible as of 5 Oct 2023, as seen in https://github.com/langchain-ai/langchain/discussions/11437 ; this issue would then be a feature request.
Thanks!
Cheers,
Colin
Originally posted by @ColinLeverger in https://github.com/langchain-ai/langchain/discussions/11437

Continuing to debug: it appears that the openllm_client is also to be touched for introducing this feature, especially in this file: https://github.com/bentoml/OpenLLM/blob/main/openllm-client/src/openllm_client/benmin/_http.py#L20
Also, it appears that HTTPS is not supported at this time by openllm but only HTTP.

Hi,
We are a group of students from the University of Toronto and are interested in looking into this issue. We will submit a PR and a formatted feature request in the coming couple of weeks after debugging this a little more.

authors: ColinLeverger Farhan-Faisal

repo: langchain-ai/langchain


text:
[fix] error on invoke HuggingFaceEndpoint Bad request: following model_kwargs

[x] fix invoke error on HuggingFaceEndpoint: "fix invoke error HuggingFaceEndpoint Bad request"

Description: ability to set 'stop_sequences' parameter to None on models that doesn't uses it
Issue:  from 18321 When trying to use invoke on some models with HuggingFaceEndpoint, users may get the following error:
Bad request: The following model_kwargs are not used by the model: ['return_full_text', 'stop', 'watermark', 'stop_sequences']
this is due to the fact that the call function send those parameters to the huggingface  inferenceClient and huggingface raise an error if those parameters are not used, in this specific case, the user should set the unused parameters to None on the invoker.
however for the specific case of 'stop_sequences' and 'stop', if we set them up to None an error occured because the call was still trying to iterate through the stop_sequences parameter and concatenate it
Dependencies: No new dependency

[x] Add tests and docs: modified  integration_tests/llms/test_huggingface_endpoint.py  file to reflect the change, tests did not work properly previously.
also added a note on HuggingFaceEndpoint docstring to inform users.

hey there! this change is against the deprecated community version of the huggingface integration. Please try the langchain-huggingface package in libs/partners/huggingface, and if the error appears there, make the change against that package.

oh sorry i missed it, i think the error will still occure in the partner package, i'll dig into it later :)


text:
Support Google Vertex AI on Edge

Due to google-auth-library being pure Node.js only, add a secondary implementation replacing google-auth-library with kriasoft/web-auth-library

CC @afirstenberg

Well, we had discussed this possibility, so it makes sense.
I've only skimmed the code so far, will try to read it in more detail this weekend and test it.
@dqbd - Any particular reason to add it as a secondary auth method instead of just using web-auth-library instead of Google's?

Well, we had discussed this possibility, so it makes sense. I've only skimmed the code so far, will try to read it in more detail this weekend and test it.
@dqbd - Any particular reason to add it as a secondary auth method instead of just using web-auth-library instead of Google's?

Tree shaking :( bundlers will pick up Node imports even if they're unused and it'll mess things up, so we need different entrypoints and files.

I think we want to avoid breaking folks using the filesystem to import credentials, especially enterprise-focused devs who expect it to be that way

If so, I feel like adding the lines to check if we have fs at runtime and the credentials specified in the environment, and if so, to load it in would be simpler. On the other hand, I agree, I want to make sure that all the currently supported auth modes are available.
It isn't a strong opinion, I guess, I'm just thinking about what the documentation will look like trying to explain the various configuration routes, and I worry it will be too complicated.

I think we want to avoid breaking folks using the filesystem to import credentials, especially enterprise-focused devs who expect it to be that way

If so, I feel like adding the lines to check if we have fs at runtime and the credentials specified in the environment, and if so, to load it in would be simpler. On the other hand, I agree, I want to make sure that all the currently supported auth modes are available.
It isn't a strong opinion, I guess, I'm just thinking about what the documentation will look like trying to explain the various configuration routes, and I worry it will be too complicated.

Your approach would definitely be simpler - bundlers are not very bright though and can't generally do conditional imports :(

@dqbd did some refactoring and it should be good to go but couldn't set up corepack - are you able to shim/otherwise verify this works ok in an Edge function?

I think we want to avoid breaking folks using the filesystem to import credentials, especially enterprise-focused devs who expect it to be that way

If so, I feel like adding the lines to check if we have fs at runtime and the credentials specified in the environment, and if so, to load it in would be simpler. On the other hand, I agree, I want to make sure that all the currently supported auth modes are available.

Hey @afirstenberg!
Unfortunately from the bundlers' PoV it can't statically determine whether a check is valid for specific environments, thus it will bundle all dependencies regardless, which will fail if included in edge runtime.

With the notes above, these look good to me.
Is the intent to do this release and then do additional PRs for the other modules?

With the notes above, these look good to me.
Is the intent to do this release and then do additional PRs for the other modules?

Thank you very much!
The immediate motivation was to support Vertex chat models in the LangSmith playground and to do it in a way that wouldn't be disruptive to others using the Node flow, so I think we'll probably leave it for now until more community requests inevitably come in. I think it sets things up nicely for everything else though.

Looks good, thank you!

Thank you both!

authors: afirstenberg dqbd jacoblee93

repo: langchain-ai/langchainjs


text:
fix: Fix async cache

Replace the sync __contains__ by the async contains() in AsyncBaseCacheService
Refactor ChatService
Fix ChatService to call CacheService blocking methods in threads
Fix SocketService to await on result when the cache is async.

Note: as all the usages of the cache_service are done in coroutines, maybe we could have CacheServiceFactory return only AsyncBaseCacheService (making memory setting return AsyncInMemoryCache). ?

repo: langflow-ai/langflow


text:
Add br encoding support & support modify string content

很棒的库，解决了我的问题~

content-encoding 为 br 时的支持
用的时候有需要改 html 的场景，而且代码里也只是添加一个判断，故加上 string 类型

单元测试没空加，@langjt 希望能帮忙检查下，辛苦了~

@hwen 如果处理HTML建议用这个库：Harmon，本仓库只处理JSON格式

authors: hwen langjt

repo: langjt/node-http-proxy-json


text:
hyphenation in caption is terrible minimalism.tex

Cartographic\\
Otherwise, there is not much you can do. You could be a bit more wordy, like "The treatment" or "Treatment of the structures of ..."

Cartographic\\
Otherwise, there is not much you can do. You could be a bit more wordy, like "The treatment" or "Treatment of the structures of ..."

Ah, thanks. Yes, hardwired linebreaks is a good idea. But would it be possible to have a bit more space for a caption on a case by case baisis? So that it gets 2em more in the example at hand?


text:
🐛 : Edit profile picture button does not work as expected

Describe the bug
i wanted to change profile picture from default to something different. i tapped "edit", but nothing happened.
To Reproduce
Steps to reproduce the behavior:

Go to Profile section
Click on Edit button
Tap on "edit" button in the "Profile Picture" section

Expected behavior
A pop-up asking for permission to access pictures from devise should show up first. After granting permission, a pop-up with option to choose picture from a phone should open.
Smartphone (please complete the following information):

Device: Galaxy A22 5G
OS: Android
Version 13

If you want speed up process of this issue, please send 🚀 as a reaction.

Reported again with this model:
i am going to find the same device simulator and check the logs

@Aboud202 from #747
Describe the bug:
I wanted to change profile picture from default to another, I tapped / Edit/, but nothing happened.
To Reproduce
Steps to reproduce the behavior:
Go to Profile section
Click on Edit button
Tap on "edit" button in the (Profile Picture")
section
Or tapping on (Add) in
(Other pictures) Section
https://github.com/langx/langx/assets/170677858/2dd3dace-8988-4ada-96e9-6f2bd35f3701

authors: angr-pukhlya xuelink

repo: langx/langx


text:
如何在weixin_controller_decorator.rb文件以外使用reply方法

需要在weixin_controller_decorator.rb以外使用reply_news_message(articles)方法，是否只需要
include WeixinRailsMiddleware::ReplyWeixinMessageHelper 即可？
目前在 一个class中 include过，但还是找不到该方法

class Notify

  include WeixinRailsMiddleware::ReplyWeixinMessageHelper

  def self.send_shop_message(articles)
    reply_news_message(articles)
  end

end

没有这样子做过，如果要，需要实现@weixin_adapter，@weixin_public_account这两个属性。你可以试试。

OK， thanks！

authors: chenzhong lanrion


text:
Unable to install extension

Lapce Version
0.2.0
System information
windows 10
Describe the bug
I was unable to install extension i even reinstall lapce
Additional information

This is fixed on master

repo: lapce/lapce


text:
Drag & Drop file to open

On MAC when you draf and drop file on the application's icon, the application start and open those file.
This feature is very usefoul on MAC.
Almost any Application support it.

Duplicate of https://github.com/lapce/lapce/issues/1181

authors: domenicogioia panekj


text:
Autocomplete using tab key

If I use the tab key in a completion, a white space is inserted instead of the completion. Is it okay to make it to use the completion instead?

I discovered that you just need to configure a keyboard shortcut to make Tab launch the list.select command when there's a list focused.


text:
thread 'main' panicked at 'called Option::unwrap() on a None value', core\src\split.rs:818:72

this happened when i clicked the search icon then the terminal icon
logs
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', core\src\split.rs:818:72
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
palette update process stopped
buffer update process stopped
error: process didn't exit successfully: `target\release\lapce.exe` (exit code: 101)
[ERROR rust_analyzer] Unexpected error: client exited without proper shutdown sequence
client exited without proper shutdown sequence

Thanks for reporting! I think this issue has been fixed (though I don't know when), so I'm going to close this issue. If you are still experiencing this crash, please feel free reopen.

authors: bugadani minecrosters


text:
remove duplicate command 'GotoLocation'

[ ] Added an entry to CHANGELOG.md if this change could be valuable to users

Codecov Report

Merging #2240 (7bb7d90) into master (75b8d2e) will increase coverage by 0.05%.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff            @@
##           master   #2240      +/-   ##
=========================================
+ Coverage    8.89%   8.95%   +0.05%
=========================================
  Files         136     136
  Lines       59513   59130     -383
=========================================
  Hits         5295    5295
+ Misses      54218   53835     -383

Impacted Files
Coverage Δ

lapce-data/src/command.rs
0.00% <ø> (ø)

... and 14 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


text:
Standardizes command messages

Added #[strum(message = "MESSAGE")] to all shortcuts commands and changed all to start with capital letter following by lower case letters

[ ] Added an entry to CHANGELOG.md if this change could be valuable to users

We use capital letters everywhere, so I would like it to stay that way

We use capital letters everywhere, so I would like it to stay that way

Sorry, I found two styles in the file so I made a guess

There are conflicts to resolve in lapce-core/src/command.rs

That is due to the move of the editor into floem, with the file now located at: https://github.com/lapce/floem/blob/main/editor-core/src/command.rs

authors: MinusGix panekj thiagola92


text:
Cryptojacking attack via Redis container

Info:

Docker version ($ docker --version):
Laradock commit ($ git rev-parse HEAD):
System info (Mac, PC, Linux):
System info disto/version:

Issue:
Hello,
I've been using Laradock for a while. It was great!
But just realized that Redis Docker container had been attacked. All 16 CPU cores were up to 100%.
Use htop command, I see something like this:
xmrig-notls -o pinto.mamointernet.icu:4444 -u ver1 -p ver1 --max-cpu-usage 100 --donate-level 1 -B

Has anyone faced this issue? And how did you deal with it?
PS: The same issue has been reported here:
https://medium.com/threat-intel/cryptojacking-coin-mining-cybercrime-234895bec6e1
https://gitter.im/tiangolo/fastapi?at=5d89d0b78521b34d91803d83

Expected behavior:

Reproduce:

Relevant Code:
// place a code sample here

Hi,
I think you should secure your network more by configuring firewall / gateway / proxy more secure (allow 80, 443 ports out only, for ex).
In case you have more secure configuration for Redis, please help share with us.
Thanks.

Hi,
I'm facing the same issue on an ec2 instance. @sondoha any tip on how to remove trojan?

It is still happening to me. Even if I banned the Redis port from public.
So I use queue driver sync instead of redis. Sure it is for development only, I do not have any solution for production atm.

Yes, banning Redis port isn't enough @sondoha.
We manage to fix it by:

Launching a new instance with the most recent Redis version;
Clean weird crontab entires (immediately after previous step);
Delete networkservice if exists

This instance looks good, no weird process consuming CPU 🙂

authors: BernardoMG lanphan sondoha

repo: laradock/laradock


text:
Type declaration makes me can't overide it

https://github.com/laravel/framework/blob/master/src/Illuminate/Database/Eloquent/Model.php#L2955
i cant overide this function while trying to use timestamp.
<?php
use Illuminate\Database\Eloquent\Model as Eloquent;

abstract class Model extends Eloquent {

    // ...

    // using timestamp instead of Datetime Object
    protected function serializeDate($value)
    {
        return $value;
    }
}

someone get it back to old version plz...

The phpdoc always said that the method only accepted that though.

authors: GrahamCampbell MagiCarbon

repo: laravel/framework


text:
Route not found after adding 'auth:api' middleware Laravel 5.3

Laravel Version: 5.3.19
PHP Version: 7.0
Database Driver & Version:
mongodb  v3
Description:
I get a NotFoundHttpException after adding auth:api middleware to any route in routes/api.php
http://stackoverflow.com/questions/40040226/route-not-found-after-adding-authapi-middleware-laravel-5-3
Steps To Reproduce:
1- create a new api route
2- add auth:api middleware

The answer is in the Stackoverflow question you shared.

It would be awesome if this middleware for client credentials was mentioned in the docs.
That would save some of us to question our own sanity.

authors: omidahn themsaid tomasvanrijsse


text:
Allow createStringPayload to set default maxTries and timeout instead of setting both to null.

Laravel Version: 5.4
PHP Version: 7
Database Driver & Version: SQLServer2012

Description:
createStringPayload sets both maxTries and timeout to null without providing a way to let the user set both of them.
Is that possible to fix this?

How would you like to set them?

When using queue push method to push the job to the queue,
if the job is not an Object, then laravel creates the payload data using createStringPayload, which sets both maxTries and timeout to null.
If the job is an Object, then we can define tries and timeout properties in our Classes then laravel will use these values when using createObjectPayload method.
Is there any possibility to give the user additional parameters to set the maxTries and timeout when calling push method?

authors: larryu themsaid


text:
Very high latency when Eloquent toArray is invoked

Laravel Version: 5.6
PHP Version: 7.2.14
Database Driver & Version: PostgreSQL 10.6

Description:
So I have a medium-sized application serving as a JSON api, with many models and relationships between them. The magnitude of the data isn't that high (a few hundred posts here and there), but recently we started getting very very low response times from the framework (around ~8 up to ~16 seconds).
Steps To Reproduce:
I'll give a specific example: we have a Team model which has many TeamPosts, each one of them belonging to a User, the post can have an Embed and some Images and the post  also appends its user's roles (which are cached).
Now when hitting the /teams/uid/posts endpoint, the queries to get the needed data are minimal and are actually executed in a very brief time. At first I thought the latency was because of some excess of DB queries, but here they are logged.
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 15.49s: select * from "users" where "id" = ? limit 1 ["5c01551b3cbec"]
[2019-04-09 10:21:19] local.INFO: The current count is: 1
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.92s: select * from "teams" where "uid" = ? limit 1 ["5bf528c22cdeb"]
[2019-04-09 10:21:19] local.INFO: The current count is: 2
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.71s: select * from "team_types" where "team_types"."id" in (?) [2]
[2019-04-09 10:21:19] local.INFO: The current count is: 3
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.9s: select count(*) as aggregate from "team_posts" where "team_posts"."team_id" = ? and "team_posts"."team_id" is not null ["5bf528c22ced4"]
[2019-04-09 10:21:19] local.INFO: The current count is: 4
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.83s: select * from "team_posts" where "team_posts"."team_id" = ? and "team_posts"."team_id" is not null order by "pinned" desc, "created_at" desc limit 12 offset 0 ["5bf528c22ced4"]
[2019-04-09 10:21:19] local.INFO: The current count is: 5
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.79s: select "users"."id", "users"."name", "users"."photo", "users"."slug", "users"."about", "users"."email", "users"."gender_id" from "users" where "users"."id" in (?, ?, ?, ?, ?, ?, ?) ["5bf26c2e6ca6f","5c34ddc55b036","5c34e1300fe67","5c34f89adb6f3","5c35a82c7a8e9","5c36883f0acdb","5c382a6e77b19"]
[2019-04-09 10:21:19] local.INFO: The current count is: 6
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.81s: select * from "images" where "images"."team_post_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ["5c4624b1dc285","5c4cbee539fc6","5c4e025f26631","5c4e0e313df42","5c4e0e531d5e8","5c4e0ea021ae1","5c4f6b310d47a","5c4f9447c8c14","5c508b555e327","5c59cccb6bc5f","5c5c88d946fa6","5c60f40167390"]
[2019-04-09 10:21:19] local.INFO: The current count is: 7
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:19] local.INFO: Query In 0.97s: select * from "embeds" where "embeds"."embeddable_id" in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and "embeds"."embeddable_type" = ? ["5c4624b1dc285","5c4cbee539fc6","5c4e025f26631","5c4e0e313df42","5c4e0e531d5e8","5c4e0ea021ae1","5c4f6b310d47a","5c4f9447c8c14","5c508b555e327","5c59cccb6bc5f","5c5c88d946fa6","5c60f40167390","team_posts"]
[2019-04-09 10:21:19] local.INFO: The current count is: 8
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: ====================================================================================================================
[2019-04-09 10:21:19] local.INFO: Done running queries in 0.15248703956604s
[2019-04-09 10:21:19] local.INFO: Timestamp is 1554805279

The "done running queries" is logged right before I use Response::json() on the team posts, the part which actually calls toArray and seems slow to run, to get a sense of that, I overrode toArray in my TeamPost model to add a log, here's the result
[2019-04-09 10:21:19] local.INFO: Post toArray 1554805279
[2019-04-09 10:21:20] local.INFO: Post toArray 1554805280
[2019-04-09 10:21:20] local.INFO: Post toArray 1554805280
[2019-04-09 10:21:21] local.INFO: Post toArray 1554805281
[2019-04-09 10:21:22] local.INFO: Post toArray 1554805282
[2019-04-09 10:21:22] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:22] local.INFO: Query In 1.06s: select * from "users" where "users"."id" = ? limit 1 ["5c36883f0acdb"]
[2019-04-09 10:21:22] local.INFO: The current count is: 9
[2019-04-09 10:21:22] local.INFO: ====================================================================================================================
[2019-04-09 10:21:22] local.INFO: ====================================================================================================================
[2019-04-09 10:21:22] local.INFO: Post toArray 1554805282
[2019-04-09 10:21:23] local.INFO: Post toArray 1554805283
[2019-04-09 10:21:24] local.INFO: Post toArray 1554805284
[2019-04-09 10:21:24] local.INFO: Post toArray 1554805284
[2019-04-09 10:21:25] local.INFO: Post toArray 1554805285
[2019-04-09 10:21:25] local.INFO: The queries executed for request teams/5bf528c22cdeb/posts
[2019-04-09 10:21:25] local.INFO: Query In 0.68s: select * from "users" where "users"."id" = ? limit 1 ["5c36883f0acdb"]
[2019-04-09 10:21:25] local.INFO: The current count is: 10
[2019-04-09 10:21:25] local.INFO: ====================================================================================================================
[2019-04-09 10:21:25] local.INFO: ====================================================================================================================
[2019-04-09 10:21:26] local.INFO: Post toArray 1554805286
[2019-04-09 10:21:26] local.INFO: Post toArray 1554805286

As you can see, there's seconds of difference between these different calls to toArray for objects that aren't really that big. and the team posts table has only around 600 rows.
And in contrast, our notifications table has ~23k rows but still manages to fetch the user's notifications in 1s or less. Our tables have the proper indexes and everything, so I don't know what really could be causing such a huge slow.

Hey there,
Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so feel free to reply and we'll try to have a look.
Thanks!

authors: ImadSalimi driesvints


text:
laravel back() no redirect preview page, redirecting to /

laravel back() no redirect preview page, redirecting to page /

Can you help me replicate this error in my machine?

I have a route
Route::get('/test/{id}/edit', 'TestController@test');
TestController
`
function test($id, Request $request) {
$validator = Validator::make($request->all(), [
'fieldname' => 'required',
]);
  if ($validator->fails()) {
      return back();
  }
 TestModel::update($request->all());
  return redirect('/test');

}
`
No redirect

I have a route
Route::post('/test/{id}/edit', 'TestController@test');
TestController
function test($id, Request $request) {
    $validator = Validator::make($request->all(), [
        'fieldname' => 'required',
    ]);

   if ($validator->fails()) {
       return back();
   }
  TestModel::find($id)->update($request->all());
   return redirect('/test');
}

This works fine form me in my pc. Double-check your env as the documentation says Since this feature utilizes the session, make sure the route calling the back function is using the web middleware group or has all of the session middleware applied

its return redirect()->back();

I think both of return redirect()->back(); and return back(); do the same job. @yordadev
https://github.com/laravel/framework/blob/7ccf0cf63931a8d8391aed90e6fc011381ea6838/src/Illuminate/Foundation/helpers.php#L178

Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.

authors: driesvints gurrrung ldavidsp yordadev


text:
Route generation broken

Laravel Version: 9.17.0
PHP Version: 8.1.0
Database Driver & Version: MySQL 8.0

Description:
When updating to Laravel > 9.13 route generation breaks.
I tested with 9.14, 9.15, 9.16 and 9.17.
I think the bug got introduced by #42425
Steps To Reproduce:
Route in web.php:
Route::group([
    'prefix' => 'extranet',
    'as' => 'extranet.',
    'middleware' => 'auth',
], function () {
    Route::get('gallery/{folder:slug}/albums', [GalleryFolderAlbumsController::class, 'index'])->name('gallery-folders.albums.index');
});

Laravel v9.13 (correct behaviour):
dd(route('extranet.gallery-folders.albums.index', $folder)); // -> http://localhost/de/extranet/gallery/aut-neque-dicta-qui-possimus-porro-sit-vel-iusto-voluptatem-quia-ut-excepturi-quaerat-labore-nobis-nesciunt-id-alias-voluptas-voluptatem/albums

Laravel v9.17 (wrong behaviour):
dd(route('extranet.gallery-folders.albums.index', $folder)); // -> http://localhost/de/extranet/gallery/1/albums

@ksassnowski

Although it would seem odd that a model's route key suddenly isn't used here anymore. Please share your Folder model?

class GalleryFolder extends Model
{
    protected $fillable = [
        'title',
        'slug',
    ];

    public function albums(): HasMany
    {
        return $this->hasMany(GalleryAlbum::class);
    }

    public static function booted()
    {
        static::deleting(function (GalleryFolder $galleryFolder) {
            $galleryFolder->albums->each->delete();
        });
    }
}

@ksassnowski thinking it might be best to just revert everything to the original code as more problems keep popping up here.

@mrmonat you're sure you're on the latest Laravel version? Can you provide a repo with a fresh laravel install that reproduces this issue?

I found that it works in a fresh installation, but I found out that the problem only occurs when URL::defaults(...) is used:
    public function test_routing_without_defaults() // passes
    {
        $url = new UrlGenerator(
            $routes = new RouteCollection,
            Request::create('http://www.foo.com/')
        );

        $route = new Route(['GET'], 'posts/{post:slug}', ['as' => 'routable']);
        $routes->add($route);

        $post = Post::create(['title' => 'Test title', 'slug' => 'test-slug']);

        $this->assertSame('/posts/test-slug', $url->route('routable', $post, false));
        $this->assertSame('/posts/test-slug', $url->route('routable', ['post' => $post], false));
        $this->assertSame('/posts/test-slug', $url->route('routable', [$post], false));
    }

    public function test_routing_with_defaults() // does not pass
    {
        $url = new UrlGenerator(
            $routes = new RouteCollection,
            Request::create('http://www.foo.com/')
        );

        $url->defaults(['locale' => 'de']); // URL::defaults(['locale' => 'de']);

        $route = new Route(['GET'], '{locale}/posts/{post:slug}', ['as' => 'routable']);
        $routes->add($route);

        $post = Post::create(['title' => 'Test title', 'slug' => 'test-slug']);

        $this->assertSame('/de/posts/test-slug', $url->route('routable', $post, false));
        $this->assertSame('/de/posts/test-slug', $url->route('routable', ['post' => $post], false));
        $this->assertSame('/de/posts/test-slug', $url->route('routable', [$post], false));
    }

Output of the failing test:
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'/de/posts/test-slug'
+'/de/posts/1'

It's not meant to use the url generator like that. Is this reproducable with an example from the docs?
https://laravel.com/docs/9.x/urls#default-values

I think that that test case actually demonstrates the bug. The locale parameter gets correctly replaced with the default value, but the lookup for the binding field fails because it tries to look up the binding field for the post parameter by index. The parameters property now contains two parameters, however:  locale and post. So it erroneously looks up the locale instead and falls back to the getRouteKey method for the model.
I think we should revert the original changes for now since there seem to be a million different places that got affected by this change. Maybe we can keep the added tests around, so we don't lose that information?

The use of $url->defaults(...) is just needed for this test case, I took it from https://github.com/laravel/framework/blob/9.x/tests/Routing/RoutingUrlGeneratorTest.php#L240
In the real app URL::defaults()is called inside a middleware like described in the docs. But as soon as defaults are used, the route generation breaks.
Repo with tests:
https://github.com/mrmonat/route-test

Maybe we can keep the added tests around, so we don't lose that information?

Yes definitely. And if we can probably add a test for this case as well.

The only thing that needs to be reset in that case is the bindingFieldFor method of the Route class. I did already revert all the other changes in one of the follow-up PRs. Just as a heads up, the test case for the bug that I initially tried to solve in #42425 will start failing. The test case that reproduces this ticket would look like this
// tests/Routing/RoutingUrlGeneratorTest.php

public function testRoutableInterfaceRoutingWithUrlDefaults()
{
    $url = new UrlGenerator(
        $routes = new RouteCollection,
        Request::create('http://www.foo.com/')
    );

    $url->defaults(['locale' => 'foo']);
    $route = new Route(['GET'], '{locale}/bar/{baz:slug}', ['as' => 'routable']);
    $routes->add($route);

    $model = new RoutableInterfaceStub;
    $model->key = 'routable';

    $this->assertSame('/foo/bar/test-slug', $url->route('routable', $model, false));
    $this->assertSame('/foo/bar/test-slug', $url->route('routable', [$model], false));
    $this->assertSame('/foo/bar/test-slug', $url->route('routable', ['baz' => $model], false));
}

Am also encountering this bug. We will revert to 9.12 for now which seems to work

Can anyone provide me with a repo that produces this?
laravel new bug-report --github="--public"

Hey @driesvints I was able to reproduce the issue in this repo:
https://github.com/mateusjunges/laravel-bug-report-42707
Steps to run the project:

Clone the repo
Create a database and configure your .env
Run php artisan migrate --seed
Start the server with php artisan serve
Open your browser and go to http://localhost:8000

Hope it helps

I can confirm this bug. Will investigate.

Trying to find a solution before rolling back. But it's proving difficult...

Yeah, this one also had me stumped 😞

I finally found a potential fix. Dug deep into this one 😅
@mateusjunges @mrmonat can you both try it out? https://github.com/laravel/framework/pull/42942

@driesvints I've tried it locally and everything works fine now

We had to revert the fix for this.
@ksassnowski next week I'm going to look into reverting all code related to the original PR by you. There's been too many breakages unfortunately. I think for now, we're going to consider https://github.com/laravel/framework/pull/42425 as a no-fix.

authors: bretto36 driesvints ksassnowski mateusjunges mrmonat


text:
dispatch method does not respect ShouldBeUnique on jobs

Laravel Version: 9.48..0
PHP Version: 8.2
Database Driver & Version: MySql
Cache and Queue driver - Redis v7

Description:
Steps To Reproduce:
Create a test job:
<?php

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class TestJob implements ShouldQueue, ShouldBeUnique
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public function __construct()
    {
        //
    }

    public function handle()
    {
        info("Running the job");
        sleep(3);
    }
}

Then create a Controller and dispatch the job via dispatch() helper available in all Controllers
<?php

namespace App\Http\Controllers;

use App\Http\Controllers\Controller;
use App\Jobs\TestJob;

class TestController extends Controller
{
    public function index()
    {
        // TestJob::dispatch(); // works as expected
        // dispatch(new TestJob()); // works as expected

        $this->dispatch(new TestJob()); // causing the issue
    }
}

Start the worker
php artisan queue:work --sleep=3

Now hit the controller via a route twice, notice worker will process the job twice.
The problem lies here in this trait
https://github.com/laravel/framework/blob/247735e224d27898197699c73909ee5ee2f93e01/src/Illuminate/Foundation/Bus/DispatchesJobs.php#L17
This method is dispatching the jobs in a different way which does not respect the ShouldBeUnique contract

This is intentional I feel. The former methods you used are all actions on the jobs themselves while the Dispatcher just works differently. If you want to use the ShouldBeUnique you already have two ways of making that work.

Feel free to send in a pr 👍

I meant to say: send in a PR to the docs. We can't change the behavior here.

Just a note for someone who experienced the same issue (to save your time): \Illuminate\Support\Facades\Bus::dispatch also doesn't respect ShouldBeUnique (it proxies calls to the \Illuminate\Bus\Dispatcher that probably used by @ankurk91 at the original message/example: $this->dispatch())

authors: alies-dev ankurk91 driesvints


text:
TRANS function with parameters for escaping quotes

The following characters could interfere with an HTML or Javascript  parser and should be escaped in string literals: <, >, ", ', , and &. If translator write some of them in lang files, it would be a problem.
We have to ensure us against these chars. It would be great if we can use additional arguments (flags) like this:
trans('file.str1', EscApos) //EscApos - escape apostrophe
trans('file.str1', EscQuot) //EscQuot- escape double EscQuot
trans('file.str1', EscLtBt) // replace left than and bigger than with HTML entities <
Now you may say - just escape it in lang files. OK, but if I am using services of other translators (if I'm not translating my files), they may make fatal mistakes. I could tell them to escape double quotes or single quotes everytime and even to do outomatic checks, but it's more complicated - sometimes it has to escape double quote, sometimes single quote (apostrophe), it depends on context. So, I think the correct place to do escaping is when we output the string with trans() function, we will setup additional argument depending on context. Translators will not care about that.
We may use custom escaping function like this: EscQuot(trans('file.str1')) or
to override trans() function like this:
transEscQuot('file.str1')
It's not good decision if we replace quotes with html entities in lang file like this:
'str1'=>'What's up?'
because this will give use an error:

it will print

and parser will use ' literally, it's same as
I am not sure which one is the best approach.
The best will be if the framework escapes these chars automatically depending on context, I'm not sure is this possible.
You may consider my ideas for future versions of Laravel.

We're open to pull requests.

I didn't find the pull. So this is what I did to resolve my problem qith quotes and apostrophes. I wrote two new functions, which extends the regular trans():
trans1() - which escapes apostrophes '
trans2() - which escapes double quotes "
I added them in:
\non-public\vendor\laravel\framework\src\Illuminate\Support\helpers.php
I keep a few simple rules to localize my app:

we always use double quotes for our lang files, like this: "key"=>"value"
tranlators do not escape or replace nothing, they have to translate but not to think about escaping chars. They don't know how is working your app, and they are not programmers. They only have to preserve replacements, if any exist. They work with PO or XLIFF files, not with php arrays.
when we convert the translated PO or XLIFF files to php arrays we escape double quotes "invalideEmail" => "Please, check your "email"" and replace "less than", "great than", "ampersand" and "backslash" with html entities.
we use our custom functions trans1() and trans2() (which extend the regular trans()). trans1() escapes single quotes, and trans2() escapes double quotes. We can use the regular trans() function too.

My code (I am not guru, but still it's working :) ):
if ( ! function_exists('trans1'))
{
function trans1($id, $arg1=null, $arg2=null, $arg3=null, $arg4=false) //($id, $number, $replacements, $locale, isCalledFromTrans2())
{
if($arg1!==null) {
if(is_numeric($arg1)) {
$number=$arg1;
}
elseif(is_array($arg1)) {
$replacements=$arg1;
}
elseif(is_string ($arg1)) {
$locale=$arg1;
}
}
if($arg2!==null) {
if(is_numeric($arg2)) {
$number=$arg2;
}
elseif(is_array($arg2)) {
$replacements=$arg2;
}
elseif(is_string ($arg2)) {
$locale=$arg2;
}
}
if($arg3!==null) {
if(is_numeric($arg3)) {
$number=$arg3;
}
elseif(is_array($arg3)) {
$replacements=$arg3;
}
elseif(is_string ($arg3)) {
$locale=$arg3;
}
}
	$translation="";

	if(isset($number) && isset($replacements) && isset($locale)) {
		$translation = app('translator')->choice($id, $number, $replacements, $locale);
	}
	elseif(isset($number) && isset($replacements)) {
		$translation = app('translator')->choice($id, $number, $replacements);
	}
	elseif(isset($number) && isset($locale)) {
		$translation = app('translator')->choice($id, $number, [], $locale);
	}
	elseif(isset($replacements) && isset($locale)) {
		$translation = app('translator')->get($id, $replacements, $locale);
	}
	elseif(isset($number)) {
		$translation = app('translator')->choice($id, $number);
	}
	elseif(isset($replacements)) {
		$translation = app('translator')->get($id, $replacements);
	}
	elseif(isset($locale)) {
		$translation = app('translator')->get($id, [], $locale);
	}
	else {
		$translation = app('translator')->get($id);
	}

	if($arg4===false) { //ako trans1() ne se vika ot trans2()
		$translation = str_replace("\'","'",$translation);
		$translation = str_replace("'","\'",$translation);
	}
	return $translation;
}

}
if ( ! function_exists('trans2'))
{
function trans2($id, $arg1=null, $arg2=null, $arg3=null) //($id, $number, $replacements, $locale)
{
$translation =  trans1($id, $arg1, $arg2, $arg3, true);
$translation = str_replace('"','"',$translation);
$translation = str_replace('"','"',$translation);
return $translation;
}
}
The good thing is that you can use these functions with arguments in random order, like:
trans1('file.str', $number, $replacements)  or
trans1('file.str', $replacements, $number)

I didn't find the pull.

What I meant was you can send a pull. :)


text:
[5.2] Improve performance of validating arrays

Benchmark
Data:
$data = [
	"contacts" => [
		[
			"id" => 1,
			"name" => "Contact Name",
			"phones" => [
				[
					"number" => "(###) ###-####",
					"type" => "other"
				], // ...
			],
			"addresses" => [
				[
					"address" => "address ...",
					"type" => "home"
				], // ...
			],
		], // ...
	]
];

Rules:
$v = \Validator::make($data, [
	'contacts.*.id' => 'required|integer|min:1',
	'contacts.*.name' => 'required|string|between:3,50',
	'contacts.*.phones.*.number' => 'required|string|regex:/^\(\d{3}\) \d{3}-\d{4}$/',
	'contacts.*.phones.*.type' => 'required|string|in:home,work,other',
	'contacts.*.addresses.*.type' => 'required|string|in:home,work,other',
	'contacts.*.addresses.*.address' => 'required|string|between:10,300',
]);

Results:
Note: opcache is enabled (fpm + cli)

10 contacts, 5 phones and 5 addresses:

PHP 5.6 (Before)
PHP 5.6 (After)
PHP 7.0 (Before)
PHP 7.0 (After)

0.040791988372803
0.033037900924683
0.014898061752319
0.011796951293945

0.041944980621338
0.032547950744629
0.011984825134277
0.012818098068237

0.041891098022461
0.033796072006226
0.012062788009644
0.011888027191162

0.040940999984741
0.035719871520996
0.012029170989990
0.011542797088623

0.044970989227295
0.034888029098511
0.012119054794312
0.011468887329102

0.037815093994141
0.032665014266968
0.012550830841064
0.011487960815430

50 contacts, 5 phones and 5 addresses:

PHP 5.6 (Before)
PHP 5.6 (After)
PHP 7.0 (Before)
PHP 7.0 (After)

0.16860485076904
0.13122105598450
0.039514064788818
0.035233020782471

0.17176103591919
0.12970399856567
0.040139913558960
0.035001993179321

0.16790485382080
0.13179397583008
0.042943000793457
0.035140037536621

0.16598796844482
0.13261985778809
0.039919853210449
0.035305976867676

0.16733813285828
0.13014101982117
0.039392948150635
0.036513090133667

0.16732406616211
0.13396883010864
0.047128915786743
0.035287857055664

200 contacts, 10 phones and 10 addresses:

PHP 5.6 (Before)
PHP 5.6 (After)
PHP 7.0 (Before)
PHP 7.0 (After)

1.8555521965027
1.0786969661713
0.35779786109924
0.25464081764221

1.8819801807404
1.0602869987488
0.36769986152649
0.25297498703003

1.8798329830170
1.0668759346008
0.36662507057190
0.26263403892517

1.8572149276733
1.0674540996552
0.36115002632141
0.25368118286133

1.8599259853363
1.0681769847870
0.36576199531555
0.26442599296570

1.9706079959869
1.0951921939850
0.36076998710632
0.25122284889221

Conclusion:
PHP 7.0:

Data
Before (Average)
After (Average)
Improvement

10 contacts, 5 phones and 5 addresses:
0.012607455253601
0.011833786964416
6.5% faster

50 contacts, 5 phones and 5 addresses:
0.04150644938151
0.03541366259257
17.2% faster

200 contacts, 10 phones and 10 addresses:
0.36330080032348
0.25659664471944
41.5% faster

PHP 5.6:

Data
Before (Average)
After (Average)
Improvement

10 contacts, 5 phones and 5 addresses:
0.04139252503713
0.033775806427002
22.5% faster

50 contacts, 5 phones and 5 addresses:
0.16815348466237
0.13157478968303
27.8% faster

200 contacts, 10 phones and 10 addresses:
1.8841857115428
1.072780529658
75.6% faster

Also PHP 7.0 is almost 4x faster than PHP 5.6 in this case! WOW!

I assume all these results are in milliseconds?

How does the peak memory usage compare?

@taylorotwell No, they aren't. All of them are in seconds (microtime(true)).
@GrahamCampbell Some results seem weird specially for PHP 7.0!
Memory Usage:
PHP 7.0:

Data
Before - Usage/Total (kB)
After - Usage/Total (kB)
Increase

10 contacts, 5 phones and 5 addresses:
0/6144
0/6144
0% - 0kB

50 contacts, 5 phones and 5 addresses:
0/6144
0/6144
0% - 0kB

200 contacts, 10 phones and 10 addresses:
6144/14336
6144/14336
0% - 0kB

PHP 5.6:

Data
Before - Usage/Total (kB)
After - Usage/Total (kB)
Increase

10 contacts, 5 phones and 5 addresses:
256/8192
256/8192
0% - 0kB

50 contacts, 5 phones and 5 addresses:
1024/9216
1280/9472
25% - 256kB

200 contacts, 10 phones and 10 addresses:
9216/20224
10240/21248
11.1% - 1024kB

And this is the code:
$before = memory_get_peak_usage(true);

$v = \Validator::make($data, [/* rules */]);
$v->passes();

$after = memory_get_peak_usage(true);

$this->info('Total Memory Usage: ' . ($after / 1024) . ' KB') ;
$this->info('Validating Memory Usage: ' . (($after - $before) / 1024) . ' KB');

Microtime(true) isn't seconds?
On Mon, Dec 28, 2015 at 12:14 PM, Ali Borhani notifications@github.com
wrote:

@taylorotwell https://github.com/taylorotwell No, they aren't. All of
them are in seconds (microtime(true)).
@GrahamCampbell https://github.com/GrahamCampbell Some results seem
weird specially for PHP 7.0!
Memory Usage:
PHP 7.0:
Data Before - Usage/Total (kB) After - Usage/Total (kB) Increase 10
contacts, 5 phones and 5 addresses: 0/6144 0/6144 0% - 0kB 50 contacts,
5 phones and 5 addresses: 0/6144 0/6144 0% - 0kB 200 contacts, 10
phones and 10 addresses: 6144/14336 6144/14336 0% - 0kB
PHP 5.6:
Data Before - Usage/Total (kB) After - Usage/Total (kB) Increase 10
contacts, 5 phones and 5 addresses: 256/8192 256/8192 0% - 0kB 50
contacts, 5 phones and 5 addresses: 1024/9216 1280/9472 25% - 256kB 200
contacts, 10 phones and 10 addresses: 9216/20224 10240/21248 11.1% -
1024kB
And this is the code:
$before = memory_get_peak_usage(true);$v = \Validator::make($data, [/* rules */]);$v->passes();$after = memory_get_peak_usage(true);$this->info('Total Memory Usage: ' . ($after / 1024) . ' KB') ;$this->info('Validating Memory Usage: ' . (($after - $before) / 1024) . ' KB');
—
Reply to this email directly or view it on GitHub
https://github.com/laravel/framework/pull/11569#issuecomment-167618331.

@taylorotwell

If get_as_float is set to TRUE, then microtime() returns a float, which represents the current time in seconds since the Unix epoch accurate to the nearest microsecond.

http://php.net/manual/en/function.microtime.php

The micro part kind of gives it away @taylorotwell. :trollface:

From the docs:
If get_as_float is set to TRUE, then microtime() returns a float, which represents the current time in seconds since the Unix epoch accurate to the nearest microsecond.

@GrahamCampbell It should be added to phpsadness.com :D

Ha, the worst thing for me is the inconstancy between int and integer, and simelar things.

https://3v4l.org/QTLLB

@GrahamCampbell ha ha it's funny!! :D also this one:
https://3v4l.org/e4PIu#v700rc4

Return value of add() must be an instance of integer, integer returned

We're changing the topic :))

Return value of add() must be an instance of integer, integer returned

Haha. That's hilarious. That surely has to be a bug!

Going to hold off on this for now.

authors: GrahamCampbell Lagawrd alibo taylorotwell


text:
[5.2] Update assets + use SRI checking

Updated assets to latest version and also added SRI checks.

:-1: I think we should update all the links to use cdnjs.

Uuhm why?

Why pefer maxcdn?

Okay will update

authors: GrahamCampbell it-can


text:
[5.6] Fix docs in trait InteractsWithInput, method input

fix docs

What is this actually fixing? It's not obvious from the online diff that this is a fix at all. It looks like you're changing what the method can accept.

I'm not changing what method can accept, i'm changing docs only
you can allways ensure & check docs
of https://github.com/laravel/framework/blob/5.6/src/Illuminate/Support/helpers.php#L443-L451

@taylorotwell why did you close pull request ?

I'm not changing what method can accept, I'm changing docs only

If I change the docs to say "this parameter must be a boolean", doesn't that mean that you're changing what the function is documented to accept? Thus you're technically also changing the method signature and the behavior of all derived classes.
This documentation change also changes the method from accepting "string, array or null" into "mixed". Mixed means anything, including integers and classes, which was previously not accepted according to the previous documentation.

authors: rolandsusans sisve


text:
[5.6] Problem with Failing Job Dispatcher Object Instantiation

Change Event Dispatcher Contract namespace to Event Dispatcher Class namespace as static method events is trying to instantiate an object of Dispatcher interface instead of class which gives error when using queue outside laravel
Error
Target [Illuminate\Contracts\Events\Dispatcher] is not instantiable
Stack Trace
Exception Stack Trace: #0 /var/www/app/vendor/illuminate/container/Container.php(773): Illuminate\Container\Container->notInstantiable('Illuminate\Contracts\Events\Dispatcher') #1 /var/www/app/vendor/illuminate/container/Container.php(646): Illuminate\Container\Container->build('Illuminate\Contracts\Events\Dispatcher') #2 /var/www/app/vendor/illuminate/container/Container.php(601): Illuminate\Container\Container->resolve('Illuminate\Contracts\Events\Dispatcher', Array) #3 /var/www/app/vendor/illuminate/queue/FailingJob.php(48): Illuminate\Container\Container->make('Illuminate\Contracts\Events\Dispatcher') #4 /var/www/app/vendor/illuminate/queue/FailingJob.php(35): Illuminate\Queue\FailingJob::events() #5 /var/www/app/vendor/illuminate/queue/Worker.php(435): Illuminate\Queue\FailingJob::handle('job_worker', Illuminate\Queue\Jobs\RedisJob, Illuminate\Queue\MaxAttemptsExceededException) #6 /var/www/app/vendor/illuminate/queue/Worker.php(397): Illuminate\Queue\Worker->failJob('job_worker', Illuminate\Queue\Jobs\RedisJob, Illuminate\Queue\MaxAttemptsExceededException) #7 /var/www/app/vendor/illuminate/queue/Worker.php(316): Illuminate\Queue\Worker->markJobAsFailedIfAlreadyExceedsMaxAttempts('job_worker', Illuminate\Queue\Jobs\RedisJob, 3) #8 /var/www/app/vendor/illuminate/queue/Worker.php(272): Illuminate\Queue\Worker->process('job_worker', Illuminate\Queue\Jobs\RedisJob, Illuminate\Queue\WorkerOptions) #9 /var/www/app/vendor/illuminate/queue/Worker.php(118): Illuminate\Queue\Worker->runJob(Illuminate\Queue\Jobs\RedisJob, 'job_worker', Illuminate\Queue\WorkerOptions) #10 /var/www/app/crons/JobWorker.php(63): Illuminate\Queue\Worker->daemon('job_worker', 'job_worker', Illuminate\Queue\WorkerOptions)

I believe the proper solution for your problem is to register the implementation in your ioc container.
Your suggested changes removes the ability for a custom event dispatcher to be used here.

authors: haridarshan sisve


text:
[9.x] Add Fluent AssertableUri

I was working on a project and in order to test oauth2 redirection, I ended up with something like this:
Before
$response = $this->get('integrations/calendars?provider=GOOGLE')
            ->assertStatus(302);

        $location = $response->headers->get('location');
        $query = parse_url($location, PHP_URL_QUERY);
        parse_str($query, $params);

        $this->assertEquals(secure_url('integrations/calendars/callback'), $params['redirect_uri']);
        $this->assertStringContainsString('https://accounts.google.com/o/oauth2/auth', $location);
        $this->assertEquals('https://www.googleapis.com/auth/calendar', $params['scope']);
        $this->assertEquals(config('services.google.client_id'), $params['client_id']);
        $this->assertEquals('true', $params['include_granted_scopes']);
        $this->assertEquals('offline', $params['access_type']);
        $this->assertEquals('code', $params['response_type']);
        $this->assertTrue(strlen($params['state']) === 40);
        $this->assertEquals('consent', $params['prompt']);

I think it would be cleaner and much more readable if have something similar to AssertableJson class.
After
$response = $this->get('integrations/calendars?provider=GOOGLE')
    ->assertRedirect(function (AssertableUri $uri) {
        $uri
            ->whereQuery('redirect_uri', secure_url('integrations/calendars/callback'))
            ->whereQuery('scope', 'https://www.googleapis.com/auth/calendar')
            ->whereQuery('client_id', config('services.google.client_id'))
            ->whereQuery('include_granted_scopes', 'true')
            ->whereQuery('access_type', 'offline')
            ->whereQuery('response_type', 'code')
            ->whereQuery('prompt', 'consent')
            ->whereQuery('state', function($state) {
                return strlen($state) === 40;
            });

    });

We can assert other parts of URI using these methods:

whereFragment(string $value)
whereHost(string $value)
wherePass(string $value)
wherePath(string $value)
wherePort(string $value)
whereScheme(string $value)
whereUser(string $value)

IMO It's not practical but we can only check for existence of component using these methods:

hasFragment()
hasHost()
hasPass()
hasPath()
hasPort()
hasScheme()
hasUser()

etc()
Like AssertableJson it uses Interaction trait, this will automatically fail your test when you haven't interacted with at least one of the props in a URI query string. Hence  the sequence is fixed in other parts of URI; they don't need to be affected by interacted method and can be asserted using assertRedirectContains method.
$assert = new AssertableUri('https://foo.bar?name=Taylor&id=1');
        $assert->whereQuery('name', 'Taylor')
            ->etc() // If remove this line, this will fail
            ->interacted();

@AmirRezaM75 Could this be extended to be used on an arbitrary string assertion as well?
Imagine you are returning a url in an endpoint using plain json and you want to assert that this url matches what you expect?

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.

authors: AmirRezaM75 morloderex taylorotwell