Invalid prototype (PHP 7.2)

From Fedora QA, with PHP 7.2.0RC5
https://apps.fedoraproject.org/koschei/package/php-zendframework-zend-cache?collection=f28
PHP Fatal error:  Declaration of Zend\Cache\PatternPluginManager::get($plugin, array $options = Array, $usePeeringServiceManagers = true) must be compatible with Zend\ServiceManager\AbstractPluginManager::get($name, ?array $options = NULL) in /builddir/build/BUILDROOT/php-zendframework-zend-cache-2.7.2-3.fc28.noarch/usr/share/php/Zend/Cache/PatternPluginManager.php on line 23

@remicollet I've found it when working on #141 and fixed it in https://github.com/zendframework/zend-cache/pull/141/commits/d967c0d39c48a79c3c37ff84d8658240038f4d78

@webimpress great thanks for the pointer. Indeed, now works as expected
Fedora QA is now ALL green for all zend-* package :)

This issue is still active, and prevents one from using zend-cache on PHP 7.2.

This issue is still active [2018-03-22], and prevents from using zend-cache with with "PatternFactory::factory" on PHP 7.2.
For now my (patch) solution is:
Zend Framework 3 [zendframework/zend-cache   2.7.2]
Date: 2018-03-22 (10:10)
File: /vendor/zendframework/zend-cache/src/PatternPluginManager.php
Row: 77
search:
public function get($plugin, array $options = [], $usePeeringServiceManagers = true)
{

replace
public function get($plugin, array $options = null)
{
    $usePeeringServiceManagers = true;
    if (3 === func_num_args()) {
        $usePeeringServiceManagers = (bool) func_get_arg(3);
    }

This works for me and do not break the functionallity. Although there are better solutions.  ;-)
@zfbot Please fix this issue.
@remicollet Please fix this issue.
THX

Fixed in #141, see: https://github.com/zendframework/zend-cache/pull/141/commits/d19e3ac77f2e6f0124b4d72bc51afb903cdaffef

@webimpress I'm, sorry, but how do I get this fixed version?
composer update
does not update "zendframework/zend-cache" component.
Even if I set in composer.json (of my app):
"zendframework/zend-cache": "dev-master",
I do not get the new version.

@C0DE8 sorry, it's not yet merged yet... I just wanted to say thet the fix is prepared in my PR, but unfortunately it's not released :| You can use my PR if you want, just to test, but I wouldn't recommend on live.

@webimpress  ah ok :)
I'm on development, so I tried to use your "update" branch:
composer.json
repositories
   {         "type": "vcs",         "url": "https://github.com/webimpress/zend-cache.git"       },
require
"webimpress/zend-cache": "dev-update",
Unfortunately I got an error:

@C0DE8 use "zendframework/zend-cache": "dev-update" in require section, and in repositories section put:
{
    "type": "git",
    "url": "https://github.com/webimpress/zend-cache.git"
},

All should work. Let me know if you have any issue.

Fixed with #148; will release with 2.8.0 by end of week.


Trailing Take-Profit and Stop-Loss

It would be awesome if you could make the TP and SL to be trailing instead of fixed percentages.

What do you mean by trailing here?

What do you mean by trailing here?

By trailing I mean that they maintain certain "distance" in percentage with the real-time price but can only move in one direction (upwards in this case). That way if the price goes up by 10% the TP and SL follow the price, but then if the price goes down they won't move and the TP or the SL will get triggered higher so bigger profit/smaller loss

Okay I get what you mean here. So for example, if the price rises 50% then the stop loss value would change from 90% to a value like 110%.
Yeah I can see how that can be useful although if the price of the coin goes up, then down below the stop loss value (so it triggers the adjusted sell order), then up more than the original peak then you won't make the maximum profit.

Okay I get what you mean here. So for example, if the price rises 50% then the stop loss value would change from 90% to a value like 110%.
Yeah I can see how that can be useful although if the price of the coin goes up, then down below the stop loss value (so it triggers the adjusted sell order), then up more than the original peak then you won't make the maximum profit.

So the proper way to do it is to have 2 more options in the config file where you can set:
TP Trailing True or False
TP Trailing Percentage
Let's give an example:
Buy price was 1000.
Target price is set to 150%, with Trailing set to True and 10%.
SL is set to 50%, with Trailing set to True.
If price increases to 1100 (10% increase) then:
Trailing TP does not exist still because Target Price hasn't been achieved.
If then price increases to 1500 then:
Bot will not sell but will place a trailing TP at 10% below price at 1350 (10% less than 1500) that will follow the price only up because Target price of 1500 is achieved.
If then price increases to 2000:
Trailing TP will go to 10% below 2000 which is 1800.
If then price goes down to 1900:
Trailing TP will not move and will stay at 1800 because it can only follow up.
Price goes to 1800 or below: Trailing TP is triggered and market sell is placed.

I don't think this will work as the price usually jumps around a lot during pump & dump events. It might work but again, it's a lot of effort for a feature that most people won't use and will create a lot more bugs for us to deal with.
In the future we may revisit and add the feature but for now, it's nonessential.


Streaming Data

Is there a way to gather streaming data? If I check a song id does the API return any data related to how popular the song is?

Did you mean this?
https://developer.spotify.com/documentation/web-api/reference/tracks/get-track/

Yes and no, I don't Spotify gives away what I'm looking for. Thanks anyway!


WIP: New version 1.0.0

(I'm preparing the new version notes)

It's ready for review. I will just update the date when we merge the last two missing PRS (presumably tomorrow):

https://github.com/scrapinghub/dateparser/pull/823 (waiting for CI to finish)
https://github.com/scrapinghub/dateparser/pull/778 (waiting for a second review from @Gallaecio


Make a websocket server to expose the APIs

Right now the API is using gRPC with some streams and streams cannot be used in a client side directly. gRPC is planning to support that but in few months only https://github.com/grpc/grpc-web.
The idea is to have a websocket API that acts as a proxy on the gRPC API and that let users to access the gRPC api even from a client side application.
With that we could easily create a website that let you deploy your service, test it, even create directly apps based on a website only (and the core running in background)

some ideas for implementation
https://github.com/tmc/grpc-websocket-proxy
https://github.com/improbable-eng/grpc-web

I watched a video earlier about Envoy. They call it a special proxy gateway in between gRPC server and grpc-web. Video gives a general technical view about Envoy. Gotto check out.

Moved to https://forum.mesg.com/t/make-a-websocket-server-to-expose-the-apis/150


Environment.QueryOffset hang/deadlock

Describe the bug
Hello!
I met the scenario when call to the Environment.QueryOffset may hang:
package main

import (
	"fmt"
	"os"

	"github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream"
)

func CheckErr(err error) {
	if err != nil {
		fmt.Printf("%s ", err)
		os.Exit(1)
	}
}

func main() {
	env, err := stream.NewEnvironment(
		stream.NewEnvironmentOptions().
			SetHost("localhost").
			SetPort(5552).
			SetUser("guest").
			SetPassword("guest"))
	CheckErr(err)

	off, err := env.QueryOffset("consumer", "stream")
	fmt.Println(off, err)
}

Here is a description:
Environment.QueryOffset calls Client.queryOffset which internally:

calls Client.handleWriteWithResponse with removeResponse argument passed as false (so RemoveResponseById won't be called and closing of response.data channel wouldn't be performed). The last function calls waitCodeWithDefaultTimeOut
right after returning from the handleWriteWithResponse queryOffset starts accepting the offset value on the channel here is a code on the next line.

Thus there may occur a deadlock, when the response was finished by timeout (for example rabbit service unavailable), but the Client.queryOffset method still waiting the data on channel which wouldn't be closed. Seems that error check should be added before reading from channel, like it's done at Client.open.
I suppose that next methods also may have a deadlock: Client.StreamStats and Client.queryPublisherSequence
Reproduction steps

start rabbitmq server
setup breakpoint on this line
run the code from the description and wait on the breakpoint
stop the rabbitmq server
continue code execution

Expected behavior
No hang
Additional context
No response

@HustonMmmavr  Thank you for the detailed report.
Feel free to propose a PR with the fix.


Question: Is there any method where I can pass a bundle directly?

Like extra() where one can pass key and value, is there any method where I can pass a bundle directly to add in the extras? If yes, it's better to update the documentations.

Yes there is.
https://github.com/robertoestivill/intentbuilder/blob/master/intentbuilder%2Fsrc%2Fmain%2Fjava%2Fintentbuilder%2FIntentBuilder.java#L134-L138
    public IntentBuilder extras(Bundle extras) {
        validateNotNull(extras, "Extras bundle");
        mIntent.putExtras(extras);
        return this;
    }

The IntentBuilder class has methods for all the Intent original methods ( except the ones listed on https://github.com/robertoestivill/intentbuilder/issues/2 )
Putting examples of all the different methods on the README will clutter it.
Do you have any ideas? Maybe a wiki page? Pull requests are always welcome :)

Closing as the functionality is already implemented.


CVAT on GCP

Hi I am trying to access the CVAT using CVAT_HOST via GCP SSH
I have followed all the steps in The installation guide
https://opencv.github.io/cvat/docs/administration/basics/installation/
First I have installed Docker
Then I have cloned GitHub repo
Then cd cvat
Then exported my CVAT_HOST
Then I have done docker compose up -d
But then when I am trying to access the CVAT_HOST:8080 port
I am unable to access the CVAT UI
I am getting 404

If anybody knows what can be done here, please help me.

Hi, what did you do in this case to solve the issue?

While creating an instance we have to attach an external IP address to the instance and we have to export that Cvat_host address. And all the steps remain same.


Benchmarks

[ ] Client's Bundle Size
[ ] API Download Speed (IPFS)
[ ] Query Execution Time (User -> Module)
[ ] Sub-Query Execution Time (Module -> Module)

I am writing out my thoughts to help me think this through and to get feedback. Right now I am thinking of two main ways of doing this.
1) Create a test suite with a custom web3api test case that contains two query functions, A and B. The two functions should be identical, with the exception that B calls a copy of function A located in another instance of the custom web3api. This approach can use a simple stopwatch class (or an existing library) to measure execution times and aggregate data from many repetitions of the test suite.

Bundle size -> measure memory allocation for Client object and measure size of node_modules folder
API Download Speed -> Instantiate a client and then do one query. Measure the time it takes to complete the query. Then do another query, measuring the time it takes to complete the query. Because the API is downloaded on the first query, the difference between the two query times is API download time.
Query execution time -> The time it takes to complete the second query above is query execution time.
Sub-Query Execution Time -> Add a third and fourth query that calls another web3api using function B (described above). The execution time of the fourth query is the sub-query execution time, while the difference between queries 3 and 4 is the download time of the sub-query API module.

The benefit of this approach is that it doesn't add new code to the Client. The cost is that it is limited to these specific tests and custom web3apis.
2) Create a Benchmark class (or use an existing library) that operates like the client's tracing module, with benchmarking code added within the Client itself. As with tracing, the client would have an option like benchmarkEnabled: boolean. The client could expose a Benchmark instance like client.getBenchmark(): Benchmark | undefined that can be used in any test suite that uses the client like so:
afterAll(() => {
 client.getBenchmark().print();

 or

 const results: BenchmarkResult = client.getBenchmark().results(); // returns an object with averages etc.

 or

 const data: benchmarkCall[] = client.getBenchmark().data(); // returns an array of objects with benchmarks of individual calls
})

It would also be possible to write a BenchmarkReporter interface and give users the option of providing their own Benchmark class that conforms to the interface if they would like to.
The benefit of this approach is that it is very general, in that it can be used by anyone to benchmark any web3api. The downside is that it adds additional code to the Client, increasing the Client's size.
After writing this out, I think the second approach seems better since it provides a tool to api developers. But maybe developers don't need another benchmarking tool.


Epochs filtering error likely due to save/load data typing

raw = mne.io.read_raw_fif(mne.datasets.sample.data_path() + '/MEG/sample/sample_audvis_raw.fif')
events = mne.find_events(raw)
epochs = mne.Epochs(raw,events)
epochs.save('test-epo.fif')
epochs = mne.read_epochs('test-epo.fif')
epochs = epochs.filter(l_freq=None,h_freq=40)
Gives the following error:
Traceback (most recent call last):
File "", line 1, in
File "", line 2, in filter
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/utils.py", line 803, in verbose
return function(*args, **kwargs)
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/filter.py", line 2045, in filter
fir_window=fir_window, fir_design=fir_design, pad=pad)
File "", line 2, in filter_data
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/utils.py", line 803, in verbose
return function(*args, **kwargs)
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/filter.py", line 859, in filter_data
copy, pad)
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/filter.py", line 164, in _overlap_add_filter
x, orig_shape, picks = _prep_for_filtering(x, copy, picks)
File "/autofs/space/karima_001/users/alex/software/anaconda3/lib/python3.6/site-packages/mne-0.17.dev0-py3.6.egg/mne/filter.py", line 269, in _prep_for_filtering
raise TypeError("Arrays passed for filtering must have a dtype of "
TypeError: Arrays passed for filtering must have a dtype of np.float64
When I look at the dtype of the epochs before being saved it's float64 and after it's dtype('>f8') so I would hazard to guess that this is the issue.

I confirm the pb with current master :(
@larsoner can you have a look? it's related to our recent support for
complex numbers in epochs fif files. We should force conversion to
double precision when putting in memory.

That is double precision it's just a different endianness. Should be an easy fix, yes I can look


bosh-nats-sync failing as long no uaa is available

Describe the bug
With the new nats version in bosh 274 we have an issue to deploy bosh. Sometimes the deploy fails with:
Task 12439 | 13:26:49 | L starting jobs: bosh/ad445f92-5fab-4070-bdd4-1071258ba02d (0) (canary)Updating deployment:   Expected task '12439' to succeed but state is 'error'  (00:08:12)L Error: 'bosh/ad445f92-5fab-4070-bdd4-1071258ba02d (0)' is not running after update. Review logs for failed jobs: health_monitor Task 12439 | 13:32:51 | Error: 'bosh/ad445f92-5fab-4070-bdd4-1071258ba02d (0)' is not running after update. Review logs for failed jobs: health_monitor
We found that the bosh-nats-sync job can not authenticate as long as the codeployed uaa is not running:
[2022-10-13T14:12:56.206749 #647762]  INFO : Nats Sync starting... [2022-10-13T14:13:06.290402 #647762]  INFO : Executing NATS Users Synchronization [2022-10-13T14:13:06.522845 #647762] ERROR : Failed to obtain token from UAA: #<CF::UAA::BadTarget: error: Failed to open TCP connection to <IP_ADDRESS>:8443 (Connection refused - connect(2) for <IP_ADDRESS>:8443)> [2022-10-13T14:13:06.602752 #647762] FATAL : 401 Unauthorized
So the health-monitor can not use the nats. After the uaa started 5min later everything works fine.
Expected behavior
The bosh-nats-sync jobs wait until uaa is started. All jobs that depends on nats like the health_monitor wait until bosh-nats-sync is started.
Versions:

Infrastructure:  AWS
BOSH version 274.4
Stemcell version [e.g. ubuntu-jammy/1.18]

Closing this is fixed in v275.1.0


Implementing D3 as client-side only package

I am trying to implement D3 in an app I am building with Nuxt. I have successfully imported it into a view in the <script> section with import * as d3 from 'd3' however because the app is being rendered server-side D3's functionality doesn't work (i.e. d3.select(...)).  I referred to the Nuxt documentation regarding of client-side only plugins and I attempted to implement the pattern in my nuxt.config.js file:
module.exports = {
  head: {
    title: 'My Demo App',
    meta: [...],
    link: [...]
  },

  loading: {...},

  plugins: [
     { src: '~node_modules/d3/build/d3.js', ssr: false}
  ]
}

However D3 throws a ReferenceError while looking for document and Nuxt throws a SyntaxError in the console pointing to something in the plugins field of nuxt.config.js.  Would someone be able to point to what I'm doing wrong?

Have you tried to wrap a if condition around it?

if (process.BROWSER_BUILD && process.env.NODE_ENV === 'production') {
..
}

Hey @j-low , were you able to find the solution to above problem. I resolved it by defining a d3.js file in plugins directory (https://github.com/piyushchauhan2011/nuxt-component/blob/master/plugins/d3.js)
Also, I think we need to also include it as a vendor in nuxt.config.js ( https://github.com/piyushchauhan2011/nuxt-component/blob/master/nuxt.config.js#L55 )
Then I used it in about.vue page ( https://github.com/piyushchauhan2011/nuxt-component/blob/master/pages/about.vue ) which appends an svg, refreshing the page also don't throw any error @j-low ?

I followed @piyushchauhan2011 suggestions and it worked. It seems we don't really need to register d3 as a plugin or add anything to nuxt.config.js. As long as we do any dom manipulation from within mounted(), everything seems to work.


Option to ignore "Lock Request Time out" (error 1222) during IndexOptimize

Hi Ola,
it would be great if we could have an option to ignore error 1222 during IndexOptimize.
My customers try to work around this issue.
Some customers create exceptions for specific agent jobs.
Some customers create one additional job step, to ignore this error.
It would be useful to have an option to ignore error 1222.
Best regards,
Oliver

I did some testing with this long time ago, but I never got to releasing it. I added a parameter to change the severity for error 1205 (deadlocks) and lock timeouts (1222) from error to informational. Would that work for you?

If I understand it right, the problem may be the returncode of the procedure. If the procedure returns something different than 0, the job will show up as failed:
`  ----------------------------------------------------------------------------------------------------
--// Log completing information                                                                 //--
Logging:
SET @EndMessage = 'Date and time: ' + CONVERT(nvarchar,GETDATE(),120)
SET @EndMessage = REPLACE(@EndMessage,'%','%%')
RAISERROR(@EndMessage,10,1) WITH NOWAIT
IF @ReturnCode <> 0
BEGIN
RETURN @ReturnCode    ---<------ This might be the problem ---
END

`
Best regards,
Oliver

In the test version I was working on, I was adding some logic to CommandExecute. Here is the catch block as it looks today. As you see I am raising an error with severity 16. I could so something that if the error number is 1205 or 1222, then I raise the error with severity 10 instead.
    BEGIN CATCH
      SET @Error = ERROR_NUMBER()
      SET @ReturnCode = @Error
      SET @ErrorMessageOriginal = ERROR_MESSAGE()
      SET @ErrorMessage = 'Msg ' + CAST(@Error AS nvarchar) + ', ' + ISNULL(@ErrorMessageOriginal,'')
      RAISERROR(@ErrorMessage,16,1) WITH NOWAIT
    END CATCH

You are right. I would also need to do a RETURN 0 in CommandExecute, in this case.
Another thing is that there can also be lock timeouts in IndexOptimize (e.g. when checking sys.dm_db_index_physical_stats). (You will get the lock timeout in different places in the code, depending on what type of lock it is.)
So there are some work to get this working correctly.
If we think about the parameter. In the test version that I was working on, I had a parameter called @LockMessageSeverity, that default was set to 16, but that could be changed to 10. Do you have any thoughts on that?

Yes. That would be great. If I use IndexOptimize from T-SQL context, it would be useful if I already know that the error is not critical from the supplied severity level.
Then I would have the choice to stop further activity when an error was raised with high severity, or to continue with the next steps when the severity level is "informational". I would definitely use it. :-)
Best regards,
Oliver

I have added this feature now.
https://ola.hallengren.com/versions.html
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html#LockMessageSeverity
By default, the LockMessageSeverity is set to 16 (error), but you can set it to 10 (informational).

Hi Ola,
this is great news.
I just tested the new version.
This is a perfect solution.
I still see the error in the CommandLog table, but the job completes successfully.
This is exactly how I need this. 👍
Thank you!!!! :-)
Best regards,
Oliver


22w14a tasks

[x] Fix https://bugs.mojang.com/browse/MC-249980 (The Birthday Song advancement description is incorrectly capitalized)
[x] Remove fix for https://bugs.mojang.com/browse/MC-249422, as it's been fixed in vanilla

Capitalisation Fixes v2.2 is coming your way!


Start of a FAQ for TA

We need an FAQ to help with questions rolling in from customers - here is a rough draft that you can take and expand on. It needs a lot of love - but feel free to make it you own.

Convo about this in Basecamp here: https://3.basecamp.com/3453178/buckets/1713315/chats/269048534@4999498889
tl;dr I'd like to avoid an FAQ section in favor of in-context improvement to other areas of docs and the product (ie, this could be better solved with an improved error message). However, the customer support team want to be able to action things quickly. Open question: what's the best way to do this?

Folks, the history for this is lost in the chat - @jayco let's chat about this next week if there is anything still outstanding.


Replace Windows style type names with types names that match the coding guidelines

Description
Replace Windows style type names with types names that match the coding guidelines.
PVOID -> void*
LPVOID -> void*
LPCVOID --> const void*

DWORD -> unsigned long
LPDWORD--> unsigned long*
PDWORD-->unsigned long*

LPCWSTR -> _Null_terminated_ const wchar_t*
PTSTR --> _Null_terminated_ wchar_t*
LPWSTR --> _Null_terminated_ wchar_t*
PWSTR--> wchar_t* done

PULONG --> unsigned long*
ULONG --> unsigned long

HRESULT--> long

WCHAR--> wchar_t

closes issue #1750

Might be worthwhile to also update the 'testing' section in PR description with steps performed (local dev testing) to ensure that there were no unexpected and/or unforeseen regressions, both in the user-mode and kernel mode tests.  Same goes for the 'doc updates' sub-section.

Might be worthwhile to also update the 'testing' section in PR description with steps performed (local dev testing) to ensure that there were no unexpected and/or unforeseen regressions, both in the user-mode and kernel mode tests. Same goes for the 'doc updates' sub-section.

Updated the description with tests and steps taken to validate locally.


Squash new cupti commits

@blue42u I'll work on this squashed branch then.

@blue42u Let me draft several additional prs to minimize files changes in this one. It is a pain to directly work on this large PR.

Stack pointer for any arch can be (roughly) gotten via __builtin_frame_address(1) (or so): https://gcc.gnu.org/onlinedocs/gcc/Return-Address.html

This repository has moved to GitLab, please continue this PR there.

The previous link was incorrect, apologies. The corrected link is here.


Closing the connection fails when consumer was destroyed

Bug description
When attempting to close the connection after a consumer was destroyed, the following exception is thrown:
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

memphis: 409 consumer deleted
    at checkJsErrorCode (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/jsutil.js:93:20)
    at checkJsError (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/jsutil.js:76:12)
    at SubscriptionImpl.callback (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/jsclient.js:168:53)
    at ProtocolHandler.processMsg (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/protocol.js:330:17)
    at ProtocolHandler.push (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/protocol.js:420:22)
    at Parser.parse (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/parser.js:197:41)
    at ProtocolHandler.<anonymous> (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/protocol.js:189:45)
    at Generator.next (<anonymous>)
    at fulfilled (/home/gbo/Workspaces/@escaux/message-broker/node_modules/nats/lib/nats-base-client/protocol.js:5:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event at:
    at fetchAndHandleMessages (/home/gbo/Workspaces/@escaux/message-broker/node_modules/memphis-dev/lib/consumer.js:63:39)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  name: 'MemphisError',
  code: '409',
  chainedError: undefined

To Reproduce
Use the following script to reproduce the issue:
import { memphis } from 'memphis-dev'

const test = async () => {
  const memphisConnection = await memphis.connect({
    host: 'localhost',
    port: 6666,
    username: 'root',
    password: 'memphis'
  })

  const consumer = await memphisConnection.consumer({
    consumerName: 'DefaultConsumer',
    consumerGroup: 'DefaultConsumerGroup',
    stationName: 'test.topic'
  })

  consumer.on('message', () => {
    console.log('got a message')
  })

  await consumer.destroy()

  await memphisConnection.close()
}

test()

Expected behavior
I expected to be able to close my connection without any exceptions.
Additional context
The issue does not seem to occur if we omit the await consumer.on('message', () => {}) function call.
I am using image: memphisos/memphis:1.2.0 and SDK v1.1.2

Hey @adaxi ,
Thanks for raising it up.
Adding @shay23b and @shohamroditimemphis

Hi @adaxi , I will take a look and notify ASAP

Will be fixed on version 1.2.0

@yanivbh1, @idanasulinmemphis,
I can still reproduce this with: memphisos/memphis:1.4.0 and SDK v1.2.4, I have exactly the same output has described in my initial description.
Should I open a new ticket?

Hi @adaxi we will check it out.
In the meantime if you want to solve it faster, would you like to try fix this on your own and open a PR?

@idanasulinmemphis Had a bit a look at the nats server to understand why the SDK gets the 409.
If I understood correctly this "409 Consumer Deleted" was introduced because previously the only way for the client to know that a consumer / producer was removed was by relying on the heartbeat which introduce some delay (see this issue).
I suppose that it is up to the client to delete the consumer/producer locally in case such an error occurs instead of throwing it to the application (client being the memphis SDK and application being the application using the memphis SDK).
Is this something you agree with, or any other suggestions on how this should be handled?

@idanasulinmemphis I think this one should be re-opened


Use config package from Lantern proper

We're using a custom config implementation because of previous difficulties writing the config to disk on Android. This is becoming harder to maintain, and it would be vastly preferable to consolidate both approaches.

Using a single config implementation now

Sweet!
On Nov 28, 2015 6:01 PM, "atavism"<EMAIL_ADDRESS>wrote:

Using a single config implementation now
—
Reply to this email directly or view it on GitHub
https://github.com/getlantern/lantern-mobile/issues/31#issuecomment-160360277
.


Memory address level traces

Can I generate a simulation trace that includes the memory addresses of the instructions executed, along with the information if it was a cache hit or miss?

Can I generate a simulation trace that includes the memory addresses of the instructions executed

You can by using the spike logs as reference. Add the argument : --trace-ref
This will generate a log file
You may have more info if you also add --spike-debug

along with the information if it was a cache hit or miss?

Not implemented yet.


Refactors the deploy directory to make config directory single source of CRD truth

Feature #1820: Moves the CRDs to reside in the config directory in line with operator-sdk and kustomize configurations so removing those resource from the deploy directory. With move to using operator-sdk 1.0.0+ for CRD, CSV and bundle generation, minor changes and fixes have had to be implemented to keep artifacts in line with existing requirements but also to update them where necessary.

Release Note
NONE

Wow, that's a piece of work! I like it also bring thing like automated createdAt field 😉.
It looks good overall, the main point is that it seems a different version of controller-gen is used, and produces Any types in the CRD schemas, which is not allowed in apiextensions.k8s.io/v1, and also drops some descriptions. I wonder what version of controller-gen is actually used?

It looks good overall, the main point is that it seems a different version of controller-gen is used, and produces Any types in the CRD schemas, which is not allowed in apiextensions.k8s.io/v1, and also drops some descriptions. I wonder what version of controller-gen is actually used? It seems to miss some of the Kubebuilder markers on the Flow and JSON types. If that's a newer version, it may be a matter of moving these annotations along the types hierarchy.

It was using controller-gen 0.4.0 which I had previously compiled locally. The binary uses runtime/debug/BuildInfo to determine the version number and for local compilations this is generated as 'devel'. Wrapping the module in an outer module allows the preferred version to be printed (see [here|https://github.com/golang/go/issues/29228#issuecomment-457390055].
So controller-gen version fixed, version upgraded to 0.4.1 and no more surprises in the CRDs :-)

Thanks @phantomjinx, that fixes it 👍🏼.
I've checked downstream, and the build calls the embed_resources.sh script directly, so it'll have to be updated to use go generate instead. The product Camel catalog generation should be alright, as the deploy directory has been kept with the community catalog.
Once CI passes, it should be good to go, and we'll update downstream build.

@astefanutti
Added an extra commit that fixes some incorrect logic, identifying Darwn and the use of sed. It looks like the wrong way around & am guessing your running mac? In which case, could you test to see if you agree?

@phantomjinx thanks. Yes that inverted logic is a mistake of mine 🤦🏼! That looks much better now 👍🏼.

retest this please

Thanks!


KItem not acting as least sort

I'm using K 4.0 trying to kompile the LLVM semantics, and I came across this bug that I believe is a bug in K, caused by KItem not acting as a least sort. Below is a minimal version of the code that caused the bug. The error message was "Unexpected sort KItem for term, ..., expected Loc"
module TEST-SYNTAX
  syntax Loc ::= loc(Int, Int)
  syntax KItem ::= "nextSym" Loc
endmodule

module TEST
  imports TEST-SYNTAX

  configuration <T color="yellow">
  		          <k color="green"> $PGM:Loc </k>
		          <nextLoc> loc(1, 0) </nextLoc>
  		        </T>

  /* since KItem is supposed to be a least sort, the following rule should be
     ok, as it should be the case that KItem is a subsort of Loc */
  rule <k> loc(1, 0) => L </k>
       <nextLoc> L:Loc => nextSym L </nextLoc>
endmodule

It is best to avoid playing with the KItem as a bottom sort. In my view, we would be better of if we simply didn't even expose it to end users. Why not express this somehow else, e.g., syntax Loc ::= "nextSym" Loc?

Yes, I had tried that, and it works, and I'll change it to that, but should it not also work as is?

Maybe I am wrong, but I guess that the problem is not that KItem is not a bottom sort. Note that the configuration specifies that the sort of the cell <nextLoc> is Loc (= the sort of loc(1,0)) and it expected that the content of the cell to be always of sort Loc.

The KItem sort is split into a top and bottom sort. There is a mechanism for shoving something below the bottom sort, which is useful in certain circumstances, e.g., allowing the rewrite arrow to appear anywhere. I think the mechanism is still exposed to the end users, and I think that's what @lucaspena was trying to use. So, in this case, "nextSym" Loc would have become a bottom sort and be allowed to appear anywhere.

That sort is KBott. It's not finalized, and it's better if it's not used by users since it may get abused and lead to other issues in the future.

So, there are cases where users want to use such a bottom sort explicitly. Think about a polymorphic function, e.g., a function replacing all sub-terms that match some patterns. In that case, a return value of the function should be able to be used for arbitrary sorts, and we need a kind of least sort for that.
The thing is that this is a situation that we have in LLVM semantics. It heavily uses such a least sort that was available at K 3.6, and now we have a problem to port it to K 4.0.
@cos @radumereuta What do you think is the best to resolve this issue? Re-organizing/changing the existing semantics not to use such a feature? Or, waiting until the least sort feature is finalized? When do you think it will be finalized?

did you try to use K instead of KItem?  and you can alway use casting to make a term of sort K be parsed as any sort you want, can't you?

I cannot use K because it cannot be extended. I can try the casting, which will be ugly and cumbersome though.

You can define your own Bottom sort if you wish to do subsort polymorphism manually.

It used to be that in K3, the sort K would be used as a Top and a Bott at the same time.
But I think that made it less clear of what was happening because it was based on a trick that SDF was able to do.
With K4, we migrated to a slightly different system, where every user sort is contained between a top (K) and a bottom (KBott): K ::= Exp and Exp ::= KBott
For example, the rewrite production is defined as follows: KBott ::= K "=>" K, which means you can use it in almost any context to rewrite terms, and can rewrite any user defined terms.
To answer the original issue: go ahead and use KBott, but avoid at all costs using it in subsorts. The automatic subsort mechanism is very sensible to modifications. If you run into problems, please let me know, so I can define the safe ways in which KBott can be used.

Another possible workaround is to use the sort casting :>, like:
<nextLoc> L:Loc => `nextSym L`:>Loc </nextLoc>

It could be a simpler solution if there are not many places to annotate the sort casting.

@lucaspena can we close this?

Yes, sorry. I just closed it.


duo style require?

New player duo.js support require directly from github raw files, I think it's a brilliant idea, will this feature port to webpack? Maybe a new loader?

Closing as this appears to be a resolved issue. Please reopen if it has not. Thanks!


Urgently need Blue Pill support

I'm presenting "How Program STM32F103C8/Blue Pill Using Arduino IDE" next Saturday (Sept 16)  to the Dallas Personal Robotics Group (dprg.org) where I had planned to demonstrate installing the STM32F1 cores package that supports the Blue Pill.
My problem is that the STM32F1 cores package is no longer available and the STM32 cores package doesn't yet support the Blue Pill.

Hi, @dackley1935,
You can use the previous commit of the json file  which includes the old STM32F1 core

https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/d1c46284dec37305d563a87eecfb545e3c66a166/STM32/package_stm_index.json

Or download it on your local machine then in  Preference set:
file:\<path on yourlocal machine\>\package_stm_index.json

Thanks you very much for the help. I really appreciate the quick response.

You're welcome ;)


SSL Certificate Problem

Thanks for pointing this out.  I'm aware that the SSL version of the site uses GitHub's certificate.  Unfortunately, GitHub doesn't seem to support SSL for sites that use their own custom domain names.  I'll keep an eye on this, though, and if they do start to offer this option, I'll see about enabling it.  In the meantime, I recommend simply using the plaintext HTTP version of the site.


Fixed window level and third-party conflict.

Changing the the window level for the app was interfering with third party libraries that were creating their own windows and would be hidden because main window level was being manipulated by passcode lock lib.

Looks good! Thank you very much.


[1.18] Break particles from chopped log are from the old texture

As stated in the title, the block break particles are from the old texture, when they should have the same break particles as their respective logs' stripped wood type.

Thank you! Fixed in the new version (0.15.7).


nesting

So below is how I expected the nesting API to work on first glance.
In fact, I'm really not sure how it works now haha, can you elaborate on the design?
import wayfarer from 'wayfarer'

const userRouter = wayfarer()
const repoRouter = wayfarer()

userRouter.on('/user/:user', repoRouter)
repoRouter.on('/:repo', params => {
  console.log(params.user, params.repo)
})

userRouter('/user/yoshuawuyts/wayfarer')
// expected:
// => yoshuawuyts wayfarer
// actual:
// => undefined ''

const commitRouter = wayfarer()
commitRouter.on('/commit/:hash', params => {
  console.log(params.user, params.repo, params.hash)
})

repoRouter.on('/:repo', commitRouter)
userRouter('/user/yoshuawuyts/wayfarer/commit/cda1eaa8')
// expected:
// => yoshuawuyts wayfarer cda1eaa8
// actual:
// AssertionError: path wayfarer/commit/cda1eaa8 did not match

Your assumptions are valid, this is how nesting is intended to work. The fact that it doesn't means that there's a bug in there. Will update the test scenarios, and try to fix it. Thanks for reporting!

Right, found out what's failing. Apparently '/user/:user' isn't handled properly. /:user is. Adding new test cases && fixing.

Released as<EMAIL_ADDRESS>

Oh, and new test case added here to prevent regressions - https://github.com/yoshuawuyts/wayfarer/blob/master/test.js#L75-L84

Nice one. Great.
FWIW I was originally writing this up as a more realistic example you could use in the readme, your call, but seems best to give at least mildly realistic examples that hint at the domain of problems you intend to solve. Good sources for examples IMO, are things that most devs are intimate with and or use frequently like login/user flows or in this case, github.
Also worth implementing some examples/, most good libs have examples and I find this can help flush out API design for different usecases.

Oh yeah, I'm +1 for /examples, think your example would fit in there just fine.

@timoxley ps, I'm adding you as a contrib to reduce my bus factor as I'm flying to AUS in a few weeks ^__^. Also I think you've had solid contributions, but that's secondary :stuck_out_tongue:.


[AVM Module Issue]: Unable to provision PYTHON|3.11 web app

Check for previous/existing GitHub issues

[x] I have checked for previous/existing GitHub issues

Issue Type?
Bug
Module Name
avm/res/web/site
(Optional) Module Version
0.9.0
Description
While I believe that the way to provision a PYTHON|3.11 web app is to specify the linuxFxVersion, when I try to apply the bicep, I get the error The parameter LinuxFxVersion has an invalid value.
Code
module webAppModule 'br/public:avm/res/web/site:0.9.0' = {
  name: 'webAppModule'
  params: {
    kind: 'app,linux'
    name: webAppName
    serverFarmResourceId: appServicePlanModule.outputs.resourceId
    location: location
    siteConfig: {
      linuxFxVersion: 'PYTHON|3.11'
    }
  }
}

Error Message
ERROR: deployment failed: error deploying infrastructure: deploying to resource group:

Deployment Error Details:
BadRequest: The parameter LinuxFxVersion has an invalid value.
- The parameter LinuxFxVersion has an invalid value.

How to reproduce error
I created a public repository with sample code that can be used to reproduce the error.
git clone https://github.com/rukasakurai/python-hello-world-azure-web-apps
cd python-hello-world-azure-web-apps
git checkout d0d65ce72c4f8e2be17e844681d440a736a08f81
azd provision

(Optional) Correlation Id
TraceID: e0bd2c0a5049ae6fc72847dfa55102f4

The issue was that I hadn't set the kind of the App Service Plan to Linux:
https://github.com/rukasakurai/python-hello-world-azure-web-apps/commit/643480c8d675ce7e1da56c2e31b8e71eb8982f28#diff-7ef659fc9cf6968e718894d300490b14ea7a52091e7d4bcffae3a5029ac721d4R19
Closing the issue because it was an issue in my code, not the code in this repository.

All good @rukasakurai  - thanks for using our module.


simulator: Do not kill every process with string 'px4' in the name

This is a follow-up PR from https://github.com/PX4/Firmware/pull/6319

Thanks. Is there anything I can/should do to merge it into upstream?

Works on Mac OS, merging.

Thanks so much for getting this in!


Delivery via Inbox

Before this PR the signals such as Events and Commands were being delivered to the entities directly via the message endpoints. Such a way caused the issues in a multi-threaded (single node) or multi-node environment. The same entity could have been updated simultaneously from several execution threads, which in turn caused the loss of data.
In this PR an entity Inbox along with the application-wide Delivery sub-system were introduced.
Inbox
Each entity repository now operates via the Inbox. Every message dispatched to one of the entities gets to the inbox of the respective entity. In it, the messages are split into shards and are processed on an "one-processor => one-shard" basis. A server-wide Delivery mechanism is responsible for serving the messages from shards to the entities and for preventing the simultaneous access the same entity from the multiple threads and-or application server nodes.
Inbox is a part of an internal framework API and no specific configuration is required in order to operate with it.
Delivery
Highlights

splits the incoming messages into shards and allows to deliver messages to their destinations on a per-shard basis;
guarantees that one and only one application server node serves the messages from the given shard at a time, thus preventing any concurrent modifications of entity state.
de-duplicates the messages per-target;

Usage
The delivery mechanism is single per-JVM and resides in the ServerEnvironment singleton.
The framework users may obtain the current delivery via
Delivery delivery = ServerEnvironment.instance()
                                     .delivery();

By default, the delivery is set to "local", based upon in-memory structures and suitable for running the unit tests. See Delivery.local() for the implementation details.
The framework users may update the current delivery by using
ServerEnvironment.instance()
                 .configureDelivery(myDelivery);

This should be done in real-world environments upon the application start. It is NOT recommended to swap the delivery implementation at runtime.
Configuration
Shard Assignment
Once a message arrives at the inbox, a target shard is assigned to it. The shard index is built on top of the identifier of the target entity. Therefore the messages heading to a particular entity always reside in the same shard.
The framework users may customize this behaviour via
Delivery.newBuilder()
        .setStrategy(myStrategy)
        // the rest of the configuration.

The default strategy uses the hash code of an entity ID as a basis of determining the shard index. The index is determined as id.hashCode() % <total number of shards>.
Idempotence Window
During the delivery the messages delivered to their targets are de-duplicated. As it is hardly possible to maintain the whole history of previously delivered messages, the framework keeps track only of the messages delivered recently. This time window is configurable:
Delivery.newBuilder()
        .setIdempotenceWindow(Durations.fromMillis(500))
        // the rest of the configuration.

By default, the "local" delivery strategy uses a wide window of 30 seconds. Such a value allows to run any tests and be sure there will be no duplicates delivered.
Scaling
In the real multi-node environment the framework users would want to scale their instances upon the arrival of new messages to each of the shards. In order to do so they should register an observer, which will be notified of the messages written to their shards:
ServerEnvironment.instance()
                 .delivery()
                 .subscribe(myObserver);

Depending on the environment, the framework users might want to use a messaging queue to broadcast the index of the shard which requires processing.
public class MyObserver implements ShardObserver {

    // ...

    @Override
    public void onMessage(InboxMessage update) {
        queue.push(update.getShardIndex());
    }
}

The node which receives such a message will then pick up the shard and starts to deliver the messages to their targets.

// called when the queue dispatches the message
void callback(ShardIndex index) {
    Delivery delivery = ServerEnvironment.instance()
                                         .delivery();
    delivery.deliverMessagesFrom(index);
}

The local version of the delivery uses synchronous dispatching mechanism which is triggered for each observed message.
Storage
To operate the delivery mechanism relies on an application-wide InboxStorage. It should be supplied via the builder:
Delivery.newBuilder()
        .setInboxStorage(myStorage)
        // the rest of the configuration.

Each of the per-repository inboxes will share this instance of the InboxStorage — as each of Inbox instances registers itself in the current Delivery instance automatically.
It is important that InboxStorage is not like other types of storages produced by StorageFactory. StorageFactory allows creating BoundedContext-specific storages, while InboxStorage is wider and covers multiple bounded contexts. It is recommended (but not required) to always have it multi-tenant, in case more bounded contexts are added to the application, and some of them turn out to be multi-tenant.
Units of Work
To maintain "one-processor => one-shard" policy a special work registry should be configured for the Delivery:
Delivery.newBuilder()
        .setWorkRegistry(myRegistry)
        // the rest of the configuration.

The registry is responsible for keeping track of which shards are served by which nodes. In case the shard is already taken by some node, the work registry does not allow to pick the shard again. The simplest way to implement such a registry in the real-world environments is to base it upon strongly-consistent storage.
What's next
In the scope of this feature a few issues were created to be addressed later:

#1094 — emit events instead of exceptions.
#1095 — allow to configure the node ID.

Also, the implementation of command scheduling and projection catch-up will become possible on top of this PR. The features will be implemented in future PRs.

@dmdashenkov most of the comments addressed. The rest is up for the vocal discussion.


π-cross tentative fill

With some help from Bryce, I've added tentative fill marks per issue #294.
The implementation I chose for this may seem a bit less intuitive (I'm using a separate bool tentativeMarks[][] which is saved to NVS with a new key), but this allows for straightforward backward compatibility with 1.0 saves.
Other notable design choices that are probably worth thinking about:

I intentionally prevent you from placing a tentative mark over a non-empty space. However, you can place other marks over a tentative mark
Hold-and-move is similar to the other space types, but with a caveat:

If you press and hold the tentative mark button (any touch input) while hovering a filled or X'd square and then move the cursor, it will tentative mark any other empty spaces you come over without overwriting any other filled spaces. This seemed the most intuitive to me, but I'm open to feedback

The mark is always a 3-pixel stroke circle, unaffected by resizing. I figure this is best for visibility reasons (Although I'm not super confident about the color I picked)

I'm on the road with a mac laptop and no environment to test but:

I like the feature, I like that it's with the touch inputs, which is nice and simple to teach or ignore. it's a nice-to-have for players who use it, and helps with accessibility - like helping those who struggle with vision or counting.
Unable to test myself, can we confirm how pressing touch+other buttons at the same time, during first frame, and during DAS (hold + move) and so on work? I think its at the end of the input, and so the toggle/setMarks code should concede priority to other input (probably the right way to work) if they happen on the same frame. Because the input code isn't as clean as I would like, we can't simply escape out of it when valid input happens (because of error flashing and DAS timer stuff).

Can't approve until colors get worked out:

Does changing the "X or Fill" preference setting affect the design? Looks like it uses emptySpaceCol, so it's always going to be orange. The mark-empty will be either red or full orange depending on the setting, when both are orange that will be pretty bad.
Pick a color that's tonally grey. I think we haven't touched purples or greens, I'd go color over just grey, so long as some white dot inside the circle is always visible. Slap a colorblind simulator on the emulator and test?
On a similar note, I don't know about it not respecting the scaling. Looks good in the screenshots, and it should always be nice and visible, and notably circular-ish. Have we tested on 15x15 levels that have really long clues? I know i cut the worst one of those from the build, but I think there's at least one 15x15 that's irksome in scale, one of the latest ones, so lets make sure to test that.

Other code stuff and saving i'll concede to @AEFeinstein expertise, as I'm just glancing over it all on the road (thanks for screenshots!)
I would be happy to approve this for now, with colors sorted, but keeping in mind that on a possible future refactor, I would want to fold this property in with the space enum, and simplify everything.  A current solution that respects users existing save data if upgrading the swadge is worth it.

Unable to test myself, can we confirm how pressing touch+other buttons at the same time, during first frame, and during DAS (hold + move) and so on work? I think its at the end of the input, and so the toggle/setMarks code should concede priority to other input (probably the right way to work) if they happen on the same frame. Because the input code isn't as clean as I would like, we can't simply escape out of it when valid input happens (because of error flashing and DAS timer stuff).

The touch control works similarly to other buttons when pressing multiple buttons at once. Sometimes, one will take priority and get dragged along with DAS. Sometimes, the tentative mark will take priority in the current cell and DAS will clear any fill/empty marks it goes over after the first cell. Dragging a deletion of fill/empty marks will never delete a tentative mark. Dragging actual fill/empty marks or placing individual marks will always overwrite a tentative mark. A tentative mark will never overwrite a fill/empty mark.

Does changing the "X or Fill" preference setting affect the design? Looks like it uses emptySpaceCol, so it's always going to be orange. The mark-empty will be either red or full orange depending on the setting, when both are orange that will be pretty bad.

No, the design is always a circle. I find it more difficult to tell the difference between Xs and circles, to be honest, since it's easier to tell a big square from a smaller circle than it is to tell a smaller reddish shape from a smaller orange shape.

On a similar note, I don't know about it not respecting the scaling. Looks good in the screenshots, and it should always be nice and visible, and notably circular-ish. Have we tested on 15x15 levels that have really long clues? I know i cut the worst one of those from the build, but I think there's at least one 15x15 that's irksome in scale, one of the latest ones, so lets make sure to test that.

I tested on the last puzzle, where the Xs turn into small red squares, and the tentative marks seem to be the same size as in other 15x15 puzzles, but are off-center to the top left.

I've just pushed some tweaks based on your suggestions.

I've changed the circles to squares. This is because I saw no preexisting function to draw circles with even number diameters, which is necessary to fix the offset bug Bryce mentioned. The plotCircleFilled function can only do odd and the plotEllipse functions introduce a weird graphical artifact (Will be opening a separate bug issue). I figured this was for the best anyways, especially given the feedback that the X's and O's look similar on the big puzzles.
The width is now relative to the box size - I arbitrarily chose 1/5th the box size since it looked good to me.
Picked a shade of purple that seemed good. I ran it through this colorblind simulator and it seemed like it would be usable. The only issue I saw was that it is similar to the cursor outline when viewing with protanopia, but the whitespace in the middle should (hopefully) make it a non-issue. Let me know what you think.

A note on input priority - as Bryce mentioned, tentative marks never overwrite other marks. It also concedes priority during DAS, such that If you press touch input and another button at the same time, the other input always wins.
Let me know what you think!

Example of protanopia. I'm not too worried about this, but tell me if I should be.

Changes looks good to me. Thanks for including screenshots in comments. Nice work!


Game starts windowed every time

If I open the game using fps-unlock the game starts windowed and I need to change it every time, this does not happen with the regular launcher

This might sound stupid but can you delete the two issues i made please?
On Mon, Aug 7, 2023 at 2:10 PM 22621.2070 @.***> wrote:

You need to change it in settings
[image: image]
https://user-images.githubusercontent.com/98635189/258810841-3dff8606-de8a-42e0-972f-92779f3df3a1.png
—
Reply to this email directly, view it on GitHub
https://github.com/34736384/genshin-fps-unlock/issues/203#issuecomment-1667831184,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APQIDZRYTBU6E4MJGAPO2NLXUDSMDANCNFSM6AAAAAA3G65G6A
.
You are receiving this because you authored the thread.Message ID:
@.***>


How effective was this at compressing the data?

Prefacing this by saying that I've never looked into how this was implemented in Club Penguin's client, so any explanation of how and/or why it works would be appreciated. I was going down readme.md and had a moment of confusion. If you compare the first example with a JSON representation of the data, you'll get a reduction of about 300 bytes. I then came up with a fake XML schema representing the save data, and that ended up being about half the size of the compressed string. JSON and XML aren't compression algorithms, but if the purpose was to make the data lighter, either of those formats would have done better on their own. Especially if you factor in a more standard compression algorithm like gzip. What am I missing? Was this an attempt at obfuscation, or was there some other reason Club Penguin chose this over an alternative?

Sorry for the VERY late response (almost 5 years!), but the reason Club Penguin used this algorithm was that because in ActionScript 2.0 it is very limited on what algorithm they can use, so this is the next best thing they can use.


Send two actions instead of two requests for motion updating

https://github.com/OpenSlides/openslides-client/pull/115/files#diff-7918d09a1859b3759249bb689e63a80889c46e45a3b02a4792b3a5718a188310R469
Add a combined method in the repo which sends two actions in one request.

Closed in favor of #119


ths => this

Hi @serkanpektas, I'm your friendly neighborhood Microsoft Open Technologies, Inc. Pull Request Bot (You can call me MSOTBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
We will now validate the agreement and then real humans will evaluate your PR.
TTYL, MSOTBOT;

Thanks!


Django file object that had seek or read applied fails to be stored

It throws exception that it fails to read enough data not reaching right file size.

Callstack example.
Traceback (most recent call last):
File "/opt/web/django-apps/ZZZ_app/tests/test_ZZZ_downloads.py", line 28, in setUp
release2.save()
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
force_update=force_update, update_fields=update_fields)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/db/models/base.py", line 762, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/db/models/base.py", line 824, in _save_table
for f in non_pks]
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 314, in pre_save
file.save(file.name, file, save=False)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/db/models/fields/files.py", line 93, in save
self.name = self.storage.save(name, content, max_length=self.field.max_length)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/django/core/files/storage.py", line 63, in save
name = self._save(name, content)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/minio_storage/storage.py", line 93, in _save
content_type)
File "/home/vagrant/.virtualenvs/web/local/lib/python2.7/site-packages/minio/api.py", line 894, in put_object
'Could not read {} bytes from data to upload'.format(length)
InvalidArgumentError: InvalidArgumentError: message: Could not read 24 bytes from data to upload


AWS SDK crashed in Aws::Client::AWSClient::AttemptExhaustively

Describe the bug
In our application, when it makes the repeated calls to LambdaClient::Invoke. After some time it crashes and following is the backtrace.
#0  0x0000fffff63e1f14 in Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const ()
from /opt/ros/jellyfish/tools/lib/libaws-cpp-sdk-core.so
(gdb) bt
#0  0x0000fffff63e1f14 in Aws::Client::AWSClient::AttemptExhaustively(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const ()
from /opt/ros/jellyfish/tools/lib/libaws-cpp-sdk-core.so
#1  0x0000fffff63e2518 in Aws::Client::AWSClient::MakeRequestWithUnparsedResponse(Aws::Http::URI const&, Aws::AmazonWebServiceRequest const&, Aws::Http::HttpMethod, char const*, char const*, char const*) const ()
from /opt/ros/jellyfish/tools/lib/libaws-cpp-sdk-core.so
#2  0x0000fffff6fd44e8 in Aws::Lambda::LambdaClient::Invoke(Aws::Lambda::Model::InvokeRequest const&) const () from /opt/ros/jellyfish/tools/lib/libaws-cpp-sdk-lambda.so
#3  0x0000aaaaaac90c18 in LambdaInterface::invokeSensorBatteryLambda(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int, Json::Value&) ()
Previously we were using 1.8.130 and now we have updated to 1.11.367 assuming that SDK update would solve this issue.
But still the issue persists.
Expected Behavior
No crash
Current Behavior
Segmentation fault.
Reproduction Steps
Multiple repeated calls to LambdaClient::Invoke.
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.367
Compiler and Version used
G++ 14
Operating System and version
Linux 5.10.4

Can you provide minimal reproduction code for this crash?

Reproduction Steps
Multiple repeated calls to LambdaClient::Invoke.

I tried reproducing for you, and I cannot
project structure
~/sdk-usage-workspace ❯❯❯ tree
.
├── CMakeLists.txt
├── Dockerfile
├── main.cpp
└── replicate.sh

replicate.sh
#!/bin/zsh

set -u

# build image
docker build -t test-image .

# run example
docker run \
    -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
    -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
    -e AWS_SESSION_TOKEN=${AWS_SESSION_TOKEN} \
    --name test-image test-image /sdk-example/build/sdk_usage_workspace

Dockerfile
# Using offical Amazon Linux 2023 image from public ECR
FROM public.ecr.aws/amazonlinux/amazonlinux:2023

# Install compiler et al.
RUN yum groupinstall "Development Tools" -y

# Install required dependencies
RUN yum install -y curl-devel openssl-devel ninja-build cmake3

# install sdk
RUN git clone --depth 1 --recurse-submodules https://github.com/aws/aws-sdk-cpp && \
    cd aws-sdk-cpp && \
    mkdir build && \
    cd build && \
    cmake -G Ninja -DBUILD_ONLY="lambda" -DAUTORUN_UNIT_TESTS=OFF .. && \
    cmake --build . && \
    cmake --install .

# Copy over and build
RUN mkdir sdk-example
COPY CMakeLists.txt /sdk-example/CMakeLists.txt
COPY main.cpp /sdk-example/main.cpp
RUN cd sdk-example &&\
    mkdir build &&\
    cd build &&\
    cmake -G Ninja .. &&\
    cmake --build .

CMakeLists.txt
cmake_minimum_required(VERSION 3.13)
project(sdk_usage_workspace)
set(CMAKE_CXX_STANDARD 20)
find_package(AWSSDK REQUIRED COMPONENTS lambda)
add_executable(${PROJECT_NAME} "main.cpp")
target_link_libraries(${PROJECT_NAME} PRIVATE ${AWSSDK_LINK_LIBRARIES})

main.cpp
#include <aws/core/Aws.h>
#include <aws/lambda/LambdaClient.h>
#include <aws/lambda/model/InvokeRequest.h>

using namespace Aws::Lambda;
using namespace Aws::Lambda::Model;

const char* FUNCTION_NAME = "TestInvokeFunction";
const int FUNCTION_ITERATIONS = 100;

class AwsSDKState
{
public:
    explicit AwsSDKState(Aws::SDKOptions options)
        : options_(std::move(options))
    {
        Aws::InitAPI(options_);
    }

    AwsSDKState(const AwsSDKState& other) = delete;
    AwsSDKState(AwsSDKState&& other) noexcept = delete;
    AwsSDKState& operator=(const AwsSDKState& other) = delete;
    AwsSDKState& operator=(AwsSDKState&& other) noexcept = delete;

    ~AwsSDKState()
    {
        Aws::ShutdownAPI(options_);
    };

private:
    Aws::SDKOptions options_;
};

int main()
{
    AwsSDKState object{{}};
    LambdaClient client;
    for (size_t iterations = 0; iterations < FUNCTION_ITERATIONS; ++iterations)
    {
        const auto result = client.Invoke(InvokeRequest().WithFunctionName(FUNCTION_NAME));
        assert(result.IsSuccess());
        if (result.IsSuccess())
        {
            std::cout << "Ran function: " << FUNCTION_NAME << "\n";
        }
        else
        {
            std::cout << "Failed to invoke function: " << FUNCTION_NAME << "\n";
        }
    }
    return 0;
}

If you can update this example to replicate your issue would be happy to look at it, but as far as we can tell this is working as expected.


Inventory file not used during Quay image deployment

After deploying with the Quay image, changes to the Inventory file were not taken into consideration:
Changed the HDD size for master and compute nodes to 120GB and 25GB memory for the compute nodes with:
#
# Common variables for the inventory
#

[all:vars]

#
# Internal variables
#

ansible_python_interpreter=/usr/bin/python3
ansible_ssh_pipelining=True
ansible_ssh_common_args='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=accept-new'

#
# Inventory variables
#

#
# The default for the cluster name is {{ kubeinit_cluster_distro + 'cluster' }}
# You can override this by setting a specific value in kubeinit_inventory_cluster_name

# kubeinit_inventory_cluster_name=mycluster

kubeinit_inventory_network_name=kimgtnet0

#
# Cluster definitions
#

# The networks you will use for your kubeinit clusters. The network name will be used
# to create a libvirt network for the cluster guest vms. The network cidr will set
# the range of addresses reserved for the cluster nodes. The gateway offset will be
# used to select the gateway address within the range, a negative offset starts at the
# end of the range, so for network=<IP_ADDRESS>/24, gateway_offset=-2 will select <IP_ADDRESS>
# and gateway_offset=1 will select <IP_ADDRESS> as the address. Other offset attributes
# follow the same convention.

[kubeinit_networks]
# kimgtnet0 network=<IP_ADDRESS>/24 gateway_offset=-2 nameserver_offset=-3 dhcp_start_offset=1 dhcp_end_offset=-4
# kimgtnet1 network=<IP_ADDRESS>/24 gateway_offset=-2 nameserver_offset=-3 dhcp_start_offset=1 dhcp_end_offset=-4

# The clusters you are deploying using kubeinit. If there are no clusters defined here
# then kubeinit will assume you are only using one cluster at a time and will use the
# network defined by kubeinit_inventory_network.

[kubeinit_clusters]
# cluster0 network_name=kimgtnet0
# cluster1 network_name=kimgtnet1
#
# If variables  are defined in this section, they will have precedence when setting
# kubeinit_inventory_post_deployment_services and kubeinit_inventory_network_name
#
# clusterXXX network_name=kimgtnetXXX post_deployment_services="none"
# clusterYYY network_name=kimgtnetYYY post_deployment_services="none"

#
# Hosts definitions
#

# The cluster's guest machines can be distributed across mutiple hosts. By default they
# will be deployed in the first Hypervisor. These hypervisors are activated and used
# depending on how they are referenced in the kubeinit spec string.
#
# When we are running the setup-playbook, if a hypervisor host has an ssh_hostname attribute
# then a .ssh/config file will be created and an entry mapping the ansible_host to that
# ssh hostname will be created. In the first commented out example we would associate
# the ansible_host of the first hypervisor host "nyctea" with the hostname provided, it
# can be a short or fully qualified name, but it needs to be resolvable on the host we
# are running the kubeinit setup from. The second example uses a host ip address, which
# can be useful in those cases where the host you are using doesn't have a dns name.

[hypervisor_hosts]
hypervisor-01 ansible_host=nyctea
hypervisor-02 ansible_host=tyto
# hypervisor-01 ansible_host=nyctea ssh_hostname=server1.example.com
# hypervisor-02 ansible_host=tyto ssh_hostname=<IP_ADDRESS>

# The inventory will have one host identified as the bastion host. By default, this role will
# be assumed by the first hypervisor, which is the same behavior as the first commented out
# line. The second commented out line would set the second hypervisor to be the bastion host.
# The final commented out line would set the bastion host to be a different host that is not
# being used as a hypervisor for the guests VMs for the clusters using this inventory.

[bastion_host]
# bastion target=hypervisor-01
# bastion target=hypervisor-02
# bastion ansible_host=bastion

# The inventory will have one host identified as the ovn-central host. By default, this role
# will be assumed by the first hypervisor, which is the same behavior as the first commented
# out line. The second commented out line would set the second hypervisor to be the ovn-central
# host.

[ovn_central_host]
# ovn-central target=hypervisor-01
# ovn-central target=hypervisor-02

#
# Setup host definition (used only with the setup-playbook.yml)
#

# This inventory will have one host identified as the setup host. By default, this will be
# localhost, which is the same behavior as the first commented out line. The second commented
# out line would set the first hypervisor host to be the setup host. The final commented out
# line would set the setup host to be a different host that is not being used as a hypervisor
# in this inventory.

[setup_host]
# kubeinit-setup ansible_host=localhost
# kubeinit-setup ansible_host=nyctea
# kubeinit-setup ansible_host=<IP_ADDRESS>

[kubeinit_cluster:vars]
cluster_domain=kubeinit.local
hypervisor_name_pattern=hypervisor-%02d
controller_name_pattern=controller-%02d
compute_name_pattern=compute-%02d
post_deployment_services=none

[kubeinit_cluster]

[kubeinit_network:vars]
network=<IP_ADDRESS>/24
gateway_offset=-2
nameserver_offset=-3
dhcp_start_offset=1
dhcp_end_offset=-4

[kubeinit_network]

#
# Cluster node definitions
#

# Controller, compute, and extra nodes can be configured as virtual machines or using the
# manually provisioned baremetal machines for the deployment.

# Only use an odd number configuration, this means enabling only 1, 3, or 5 controller nodes
# at a time.

[controller_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'coreos', 'rke': 'ubuntu'}
disk=120G
ram=25165824
vcpus=8
maxvcpus=16
type=virtual
target_order=hypervisor-01

[controller_nodes]

[compute_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'coreos', 'rke': 'ubuntu'}
disk=120G
ram=25165824
vcpus=8
maxvcpus=16
type=virtual
target_order="hypervisor-02,hypervisor-01"

[compute_nodes]

[extra_nodes:vars]
os={'cdk': 'ubuntu', 'okd': 'coreos'}
disk=20G
ram={'cdk': '8388608', 'okd': '16777216'}
vcpus=8
maxvcpus=16
type=virtual
target_order="hypervisor-02,hypervisor-01"

[extra_nodes]
juju-controller when_distro=cdk
bootstrap when_distro=okd

# Service nodes are a set of service containers sharing the same pod network.
# There is an implicit 'provision' service container which will use a base os
# container image based upon the service_nodes:vars os attribute.

[service_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'centos', 'rke': 'ubuntu'}
target_order=hypervisor-01

[service_nodes]
service services="bind,dnsmasq,haproxy,apache,registry" # nexus

Here the command line used to deploy the cluster:
podman run --rm -it     -v ~/.ssh/id_rsa:/root/.ssh/id_rsa:z     -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:z     -v ~/.ssh/config:/root/.ssh/cong:z     quay.io/kubeinit/kubeinit:$TAG         -vvv --user root         -e kubeinit_spec=okd-libvirt-1-3-1         -i ./kubeinit/inventory         ./kubeinit/playbook.yml
Trying to pull quay.io/kubeinit/kubeinit:2.0.1...
Getting image source signatures
Copying blob 16b78ed2e822 done
Copying blob 131f1a26eef0 done
Copying blob a6cf203719b0 done
Copying blob 605b7063f5cc done
Copying blob 5c75918c2841 done
Copying blob 2a9efe8e1c66 done
Copying config be8851a661 done
Writing manifest to image destination
Storing signatures
ansible-playbook [core 2.12.1]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.6 (default, Aug 11 2021, 06:39:25) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 3.0.3
  libyaml = True
No config file found; using defaults
host_list declined parsing /kubeinit/kubeinit/inventory as it did not pass its verify_file() method
script declined parsing /kubeinit/kubeinit/inventory as it did not pass its verify_file() method
auto declined parsing /kubeinit/kubeinit/inventory as it did not pass its verify_file() method
Parsed /kubeinit/kubeinit/inventory inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: playbook.yml ************************************************************************************************************
3 plays in ./kubeinit/playbook.yml

PLAY [Initial setup] **************************************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************
task path: /kubeinit/kubeinit/playbook.yml:17
Using module file /usr/lib/python3.9/site-packages/ansible/modules/setup.py
Pipelining is enabled.
<<IP_ADDRESS>> ESTABLISH LOCAL CONNECTION FOR USER: root
<<IP_ADDRESS>> EXEC /bin/sh -c '/usr/bin/python3 && sleep 0'
ok: [localhost]

After completing the deployment, the controller node has 25GB HDD and the worker nodes have 8GB RAM and 30GB HDD.

Fixed the problem by modifying the inventory file to:
#
# Common variables for the inventory
#

[all:vars]

#
# Internal variables
#

ansible_python_interpreter=/usr/bin/python3
ansible_ssh_pipelining=True
ansible_ssh_common_args='-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=accept-new'

#
# Inventory variables
#

#
# The default for the cluster name is {{ kubeinit_cluster_distro + 'cluster' }}
# You can override this by setting a specific value in kubeinit_inventory_cluster_name

# kubeinit_inventory_cluster_name=mycluster
kubeinit_inventory_cluster_domain=kubeinit.local

kubeinit_inventory_network_name=kimgtnet0

kubeinit_inventory_network=<IP_ADDRESS>/24
kubeinit_inventory_gateway_offset=-2
kubeinit_inventory_nameserver_offset=-3
kubeinit_inventory_dhcp_start_offset=1
kubeinit_inventory_dhcp_end_offset=-4

kubeinit_inventory_controller_name_pattern=controller-%02d
kubeinit_inventory_compute_name_pattern=compute-%02d

kubeinit_inventory_post_deployment_services="none"

#
# Cluster definitions
#

# The networks you will use for your kubeinit clusters.  The network name will be used
# to create a libvirt network for the cluster guest vms.  The network cidr will set
# the range of addresses reserved for the cluster nodes.  The gateway offset will be
# used to select the gateway address within the range, a negative offset starts at the
# end of the range, so for network=<IP_ADDRESS>/24, gateway_offset=-2 will select <IP_ADDRESS>
# and gateway_offset=1 will select <IP_ADDRESS> as the address.  Other offset attributes
# follow the same convention.

[kubeinit_networks]
# kimgtnet0 network=<IP_ADDRESS>/24 gateway_offset=-2 nameserver_offset=-3 dhcp_start_offset=1 dhcp_end_offset=-4
# kimgtnet1 network=<IP_ADDRESS>/24 gateway_offset=-2 nameserver_offset=-3 dhcp_start_offset=1 dhcp_end_offset=-4

# The clusters you are deploying using kubeinit.  If there are no clusters defined here
# then kubeinit will assume you are only using one cluster at a time and will use the
# network defined by kubeinit_inventory_network.

[kubeinit_clusters]
# cluster0 network_name=kimgtnet0
# cluster1 network_name=kimgtnet1
#
# If variables  are defined in this section, they will have precedence when setting
# kubeinit_inventory_post_deployment_services and kubeinit_inventory_network_name
#
# clusterXXX network_name=kimgtnetXXX post_deployment_services="none"
# clusterYYY network_name=kimgtnetYYY post_deployment_services="none"

#
# Hosts definitions
#

# The cluster's guest machines can be distributed across mutiple hosts. By default they
# will be deployed in the first Hypervisor. These hypervisors are activated and used
# depending on how they are referenced in the kubeinit spec string.

[hypervisor_hosts]
hypervisor-01 ansible_host=nyctea
hypervisor-02 ansible_host=tyto

# The inventory will have one host identified as the bastion host. By default, this role will
# be assumed by the first hypervisor, which is the same behavior as the first commented out
# line. The second commented out line would set the second hypervisor to be the bastion host.
# The final commented out line would set the bastion host to be a different host that is not
# being used as a hypervisor for the guests VMs for the clusters using this inventory.

[bastion_host]
# bastion target=hypervisor-01
# bastion target=hypervisor-02
# bastion ansible_host=bastion

# The inventory will have one host identified as the ovn-central host.  By default, this role
# will be assumed by the first hypervisor, which is the same behavior as the first commented
# out line.  The second commented out line would set the second hypervisor to be the ovn-central
# host.

[ovn_central_host]
# ovn-central target=hypervisor-01
# ovn-central target=hypervisor-02

#
# Cluster node definitions
#

# Controller, compute, and extra nodes can be configured as virtual machines or using the
# manually provisioned baremetal machines for the deployment.

# Only use an odd number configuration, this means enabling only 1, 3, or 5 controller nodes
# at a time.

[controller_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'coreos', 'rke': 'ubuntu'}
disk=120G
ram=25165824
vcpus=8
maxvcpus=16
type=virtual
target_order=hypervisor-01

[controller_nodes]

[compute_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'coreos', 'rke': 'ubuntu'}
disk=120G
ram=25165824
vcpus=8
maxvcpus=16
type=virtual
target_order="hypervisor-02,hypervisor-01"

[compute_nodes]

[extra_nodes:vars]
os={'cdk': 'ubuntu', 'okd': 'coreos'}
disk=20G
ram={'cdk': '8388608', 'okd': '16777216'}
vcpus=8
maxvcpus=16
type=virtual
target_order="hypervisor-02,hypervisor-01"

[extra_nodes]
juju-controller distro=cdk
bootstrap distro=okd

# Service nodes are a set of service containers sharing the same pod network.
# There is an implicit 'provision' service container which will use a base os
# container image based upon the service_nodes:vars os attribute.

[service_nodes:vars]
os={'cdk': 'ubuntu', 'eks': 'centos', 'k8s': 'centos', 'kid': 'debian', 'okd': 'centos', 'rke': 'ubuntu'}
target_order=hypervisor-01

[service_nodes]
service services="bind,dnsmasq,haproxy,apache,registry" # nexus

And the deployment command to:
podman run --rm -it     -v ~/.ssh/id_rsa:/root/.ssh/id_rsa:z     -v ~/.ssh/id_rsa.pub:/root/.ssh/id_rsa.pub:z     -v ~/.ssh/config:/root/.ssh/cong:z     -v ./kubeinit/inventory:/kubeinit/kubeinit/inventory quay.io/kubeinit/kubeinit:$TAG         -vvv --user root         -e kubeinit_spec=okd-libvirt-1-3-1         -i ./kubeinit/inventory         ./kubeinit/playbook.yml


how to assign a  field to be an existing pointer instance

Hi @jmoiron :
if I have a Object which may have only a few instances .I will keep the instances in memory, but write to table with only a symbol. so the Table Object in Golang would have a field which is a pointer field ,so how can I assign to that field after the database query.
Example Case :
type Company struct {
    ID int64
    Name string
    ...
    PayMethod *PayMethod
}

type PayMethod struct {
    Code int
    Name string
    Symbol string
    URL string
}

var(
    Paypal = &PayMethod{...}
    AliPay = &PayMethod{...}
    WeChatPay = &PayMethod{...}
)

func (p *PayMethod) Value() (driver.Value, error){
    return p.Code
}
// How should I write Scan or any other way?

If  I want to query from DB to fetch a proper PayMethod to assign to the Company struct built. what should I do.  I want to use the **Type way, but then the receiver can be only *Type in Golang. What should I do to finish this.

You will have to implement Scanner as well.  Check out an old but relevant blogpost on implementing custom types for scanning.

@jmoiron ,The Scanner implementation can't work at this situation. Because the Scan method can only be bind to the receiver of *PayMehod like the example.But the existed instance in this situation can't be granted to the receiver.
func (p *PayMethod) Scan(src interface{}) error {
   *p = xxx // You can't assign value to p here ,like p = xxx,right?
}


Perfect legit recoil compensation

perfect smooth rcs

this

#2135

#2135

ah, i already added perfect legit rcs to my osiris build, i just wanted it to be added to the master branch because i thought it would be a good addition to osiris

#2135

and also, I had to add my own RCS because that one wasn't compensating for my mouse movements

#2135

and also, I had to add my own RCS because that one wasn't compensating for my mouse movements

wdym it does compensate even when the aimbot is not doing anything, it works only when aimbot is on tho


Feature Request: SEED: Bird Auto Hunting

Please add auto hunting feature

hello  , we have no planned for this feature .


Feature: Profile Screen

Add a profile screen for users, giving option to add profile pictures.
Giving them option to edit their details like address, contact details, organization details, etc.
Also adding logout functionality.

Assign Me!

@sourabhkumar47  Please Assign Me!

Already assigned, try another issue

I can resolve this issue! Please assign me

I can resolve this issue! Please assign me

You can try any other open issues.....like search bar on home screen


model value cannot be refreshed in formlyConfigProvider.setType controller

I tried to show the preview for the image using ormlyConfigProvider.setType, but it seems the model value sometimes will refer to the previous one. Is something wrong with my code?
formlyConfigProvider.setType({
        name: 'qiniu-single-img',
        templateUrl: 'scripts/components/common/formly-types/elements/qiniu-single-img.html',
        controller: function ($scope, $log, $qupload, AppConstant) {
            $scope.modelValue = $scope.model[$scope.options.key];

qiniu-single-img.html

Do you mind creating an example of what you're trying to accomplish? Please follow the instructions here: http://help.angular-formly.com
This will make it easier for you to get help. Because the github issues are reserved for bug reports and feature requests, I'm going to go ahead and close this issue. See you on chat! Thanks!


Why not use weight decay or other regularization methods

Thanks for your impressive projects! I notices that there are not any regularization methods in V3 (MobileNet V2 + YoloV3). Could you please tell me why you don't use them?

因为没有足够的GPU去调这些参数


Does go-micro v3 support etcd?

I use go-micro v3.2.0. Can't not find etcd package in registry package.

please check here : https://github.com/asim/go-plugins/tree/master/registry/etcd

Where are all the plugins?
The plugins now live in github.com/asim/go-plugins. This was to reduce the overall size and scope of Go Micro to purely a set of interfaces and standard library implementations. Go Plugins is Apache 2.0 licensed but relies on Go Micro interfaces and so again can only be used in noncommercial setting without a commercial license.

thx 👍


CupertinoTabBar should pop navigation stack when active tab tapped

Use case
To match native iOS behaviour, when tapping the active tab on a CupertinoTabBar, the associated CupertinoTabView should pop its navigator back to the root.
Here's an example from the App Store, where I tapped the "Apps" tab bar icon to navigate back:

This also shows scrolling to top behaviour when tapping tab, see #62327.
Proposal

User taps currently active CupertinoTabBar tab
Currently visible tab view navigation stack pops to root

If the currently visible page is the root page, it should scroll to the top, as per #62327.

Related to 62327


Generate New Version doesn't by default generate a new version

initialValues aren't being properly incorporated to set 'newVersion' to true within the onClick in GenerateVersionAdminDialog

initialValues to dialog are fine - the non-permissioned Generate New Versio button onClick newVersion flag was set to false


CAMEL-8567 New camel-raspberry component (1st version)

I've started a new component to interface with an RaspberryPI.
I think it could be very interesting component to include it.

@davsclaus : Pi4j has got an 1.0-RC, I will check with author when he can provide an 1.1 final version

output endpoint with dynamic PIN rbpi://pin/{header.id}/mode?[options]

Are you referring to the header with key on the Camel message? If so see this FAQ
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

smarter URI style like rbpi://pin/1/mode?[options] have you got a documentation to implement it correctly

Can you explain a bit more?
If you want /mode to be part of the context-path, then you need to map that in the component class. eg that is the remaining parameter in the create endpoint.  That requires a bit more coding, but some components do that.
For example some of the HTTP related
https://github.com/apache/camel/blob/master/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java#L57
And the JMS component uses the context-path to know what kind of jms queue/topic you are using
https://github.com/apache/camel/blob/master/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java#L485

Everything should work fine, I've included all comments
Just standby for pi4j 1.0 final version

Yay! This is great stuff. I'll take a look at it in the coming days.

Hi @gautric,
pi4j v1 is out. Can you include it in the project?
Also, can you create the documentation page for the component?
Cheers.

BTW I love your blog post [1]. It will be nice if you can update it as soon as Camel RPi is in master. I'd like to promote this link a little bit then. It is worth wider attention.
[1] http://gautric.github.io/blog/2015/04/03/apache-camel-raspberrypi-integration.html

One more question - do have to install pi4j on the target device? Can'y it just put the RPi into the fat jar? That would be easier from the deployment/demo point of view.

@gautric Hi Greg, any updates on this?

This component cannot be hosted at ASF. @gautric do you mind closing this ticket.

@gautric do you mind closing this PR?


Create Identity e2e tests for running in Azure Arc

Tracking item to create new /sdk/e2e Azure.Identity smoke tests for running in Azure Arc hosted environment.

Add new /sdk/e2e tests for Azure Arc
Update Parent issue https://github.com/Azure/azure-sdk/issues/1908 with instructions for Test team

Closing this since the instructions are complete in the related issue.


Fix Issue 17961 - std.uni does not compile with -unittest -dip1000

see also my comment #7 in issue 17961

The solution will be far more complicated than/different from simply adding scope to byInterval() (which seems to work for InversionList!GcPolicy only). The impure errors stem from InversionList!ReallocPolicy.
It's currently like "herding cats": When I (assume to) solve one specific error, others come up instead: there's so much interrelation in this large file. I'm trying to isolate as much as possible issues to easily reviewable PRs like https://github.com/dlang/phobos/pull/6104.
I'm -dip1000-testing targets std/uni.test, publictests and unittest (enabling -dip1000 for std/uni.d only) and they come up with diverging errors, and I'm still struggling with DIP1000.md to reside in my memory: It really deserves an overhauled representation and some more examples: We have for parameter(s): scope, return scope, scope ref and even return scope ref; for the this implicit parameter: scope; for the return value: scope and scope ref.
auto-generated functions don't infer scope correctly in all cases #18000 (especially auto-generated opAssign is not scope aware which causes an error in current intersect function), there are still other unsolved dip1000-implementation issues in bugzilla, and whether scope was inferred or not and where is invisible to me (pragma(msg...)) except referring to the this implicit parameter, as they are not type attributes (maybe -vcg-ast can help). Thus it's currently a maze to find a way (I hope there is one) around bugs and complexity, but currently my learning experience stilll outweighs the hassle.

@wilzbach @DmitryOlshansky @quickfur
The issue should be fixed by latest commit.
In order to test against released libphobos2.so etc. (which come with
pure nothrow @nogc @trusted void std.uni.GcPolicy.destroy!(uint[]).destroy(ref uint[])  )
temporarily change in Your local copy of std.uni.d : @safe private struct GcPolicy
back to @trusted private struct GcPolicy.
I tried hard not to change semantics and almost/virtually succeeded, except there are 2 replacements of ref return-type to auto return-type (functions 'tab' in template Utf8Matcher and 'ascii' in template Utf16Matcher). I didn't find any combination of attributes/storage class to keep them as ref and be compatible with -dip1000. But that's currently no problem, as the ref return of tab/ascii is nowhere used as such and I doubt it makes sense to be ref. As a reminder, I kept /ref/ in there.
As far as I can interpret the failing tests jenkins/codecov, there is no remaining issue ?!

I didn't find any combination of attributes/storage class to keep them as ref and be compatible with -dip1000. But that's currently no problem, as the ref return of tab/ascii is nowhere used as such and I doubt it makes sense to be ref. As a reminder, I kept /ref/ in there.

Ehm I would even go one step further and remove the ref. Otherwise people in the future looking at the code will be confused.

As far as I can interpret the failing tests jenkins/codecov, there is no remaining issue ?!

Yes those are unrelated. I will look into those. A start for the Jenkins failures: https://github.com/dlang/ci/pull/163

@wilzbach
A recapitulation of what changed, all limited to signatures of functions/structs, except the added lines of unittest:
Changes acc. to DIP25 and DIP1000 to be compilable with -dip1000 (roughly in the context of InversionList, it's alloc-policies, CowArray and Grapheme).
-Attributes/storage class removed where they get inferred (all removed @trusted are inferred @safe now etc.; checked for all removed with pragma(msg typeof...))
-@trusted was added in a single place, where no one was before: mixin template ForwardStrings, function fwdStr. If @trusted is not justified here, the whole fix won't work !
-@trusted was moved from some @trusted struct to some of their member functions where currently required for @safe struct (e.g. ReallocPolicy needs more work done on it where @trusted can't be guaranteed) !
-Changed return type from ref to auto for funtions ascii and tab
-Some D style changes like: Auto return type replaced in some locations (stated explicitly), alphabetical ordering of attibutes (in the end for functions, in the beginning for structs)
-added unittesting of InversionList.this(Range)(Range intervals) to calm codecov (required anyway but should ideally go in isolated PR)
There are still CI errors, but seem unrelated to this PR

There are still CI errors, but seem unrelated to this PR

Yes, restarted them.

-added unittesting of InversionList.this(Range)(Range intervals) to calm codecov (required anyway but should ideally go in isolated PR)

Nice! BTW since https://github.com/dlang/phobos/pull/6124 CodeCov will always be green / "calm".

incompatible with onlineapp

Out of interest: what do you mean by this?
If you are referring to a problem with run.dlang.io, see https://github.com/dlang-tour/core/issues/672

After commit 2f590da I checked the cyberShadow/DAutoTest generated
http://dtest.dlang.io/artifact/website-9f2164728b4bbb036aec0fc431428ba026513b42-a3ecbbd38ec1e34f7756deb6bdfa3123/web/phobos-prerelease/std_uni.html
and run the unitest touched (that one with the chessPieces: It failed with:
onlineapp.d(8): Error: undefined identifier CodepointSetRP, did you mean alias CodepointSet?

Ah don't worry about this, but the backend (run.dlang.io) can't build Docker containers for every PR. We simply use master (aka dmd-nightly) for the preview documentation.
There's a CI (CircleCI) in-place that guarantees that all examples are always runnable.
If you want to learn more: https://dlang.org/blog/2017/03/08/editable-and-runnable-doc-examples-on-dlang-org

I'm aware, that there's still a lot to be done for std/uni.d, e.g. looking at it's unittest-coverage, but I try to not get bogged down, focus on -dip1000 first and DIP1000.md is 'fresh' in my brain: Thus the reverted unittest will come back later again at another (non-public unittest) location.

This PR expired my "languishing acceptance", just closing it now

Please don't close PRs based on arbitrary time limits. I simply do not have time to work on it at the moment. That doesn't make it a bad PR.

This is on my TODO-List for a new PR, as proposed by @wilzbach :
std.uni: boost coverage

1. Required anyway
2. https://github.com/dlang/phobos/pull/6041 - according to D style - removes a lot of attributes/storage class from functions, where they get inferred (including @safe and pure).
Thus this PR ensures, that (ref. #6041) every function with @safe/@trusted removed has at least 1 usage in a @safe unittest, same as every function with pure removed has at least 1 usage in a pure unittest.
3. (re-)establish a unittest, that once was reverted from #6041

I don't know any guideline where to place unittest, except recommended directly after a function and not within template,
but current std.uni practice doesn't/can't obey this strictly, thus my decision is arbitrary to
place all new unittest together in the files end. May then later be reorganized and decided which shall serve as public example

#6104 line                                                                 | tested in New PR #? unittest line
----------------------------------------------------------------------------------------------------------
1581: removed nothrow pure @trusted (from private auto packedArrayView(T)) | slice, the (only) function calling packedArrayView, has attributes @nogc nothrow pure;
                                                                           | by-passing -dip1000 safety checks seems to be wrong here (also, no invocation from @safe code happens)

1794: added   pure (to static void destroy(T)(ref T)                       |
1804: added   pure (to static void destroy(T)(ref T)                       |
2067: removed @trusted (from public struct InversionList(SP=GcPolicy))     |
2385: removed @trusted (from byCodepoint(). static struct CodepointRange)  |
2666: added   @safe (to static string binaryScope(R)(R, string)            |
4714: removed pure                                                         | yes, see comment in #6104
4829/4835: removed pure (from public bool match(Range)(ref Range)          |
4853/4859: removed pure @trusted (from public bool skip(Range)(ref Range)) |
4874/4880: removed pure @trusted (from public bool test(Range)(ref Range)) |
4891/4897: removed pure @trusted (from bool match(C)(ref C[]))
4897/4903: removed pure @trusted (from bool skip(C)(ref C[]))
4903/4909: removed pure @trusted (from bool test(C)(ref C[]))
4925/4931: removed @trusted (from auto subMatcher(SizesToPick...)()
4930/4936: removed pure @trusted (from bool lookup(int, Mode, Range)(ref Range))

4995/5001: removed pure (from @property auto tab(int i)())
4996/5002: removed pure (from bool lookup(int, Mode, Range)(ref Range))

5008/5014: added @safe (to void badEncoding())

5058/5064: removed pure @trusted (from public bool match(Range)(ref Range)) |
5084/5090: removed pure @trusted (from public bool skip(Range)(ref Range)   |
5105/5111: removed pure @trusted (from public bool test(Range)(ref Range))  |

5117/5123: removed pure @trusted (from bool match(C)(ref C[] str))
5123/5129: removed pure @trusted (from bool skip(C)(ref C[] str))
5129/5135: removed pure @trusted (from bool test(C)(ref C[] str))

5161/5167: removed @trusted (from auto subMatcher(SizesToPick...)())
5166/5172: removed pure (from bool lookupUni(Mode, Range)(ref Range))

5237/5243: removed pure (from @property auto ascii()())

5240/5246: removed pure (from bool lookupUni(Mode, Range)(ref Range)

5250/5256: removed @trusted (from private auto utf8Matcher(Set)(Set set))
5255/5261: removed @trusted (from private auto utf16Matcher(Set)(Set set))
5267/5273: removed @trusted (from public auto utfMatcher(Char, Set)(Set set))

5283/5289: @nogc nothrow pure @safe (from auto decoder(C)(C[], size_t))

5935/5941: removed pure @trusted (from ptrdiff_t findUnicodeSet(alias table, C)(const scope C[]))
5948/5954: removed pure @trusted (from bool loadUnicodeSet(alias table, Set, C)(const scope C[], ref Set)

5959/5965: removed @trusted (from bool loadProperty(Set=CodepointSet, C)(const scope C[], ref Set))

6116/6122: removed @trusted (from package CodepointSet memoizeExpr(string expr)())

6234/6240: removed @safe (from struct UnicodeSetParser(Range))