REPL hides function return value

Hi Andrea
I'm seeing inconsistent behaviour in the REPL compared to app code. The REPL does not expose the function result - though it does print it. This makes it tricky to test code from the REPL that relies on returned values.
It's not a priority for me, rather it just caused some confusion, so I thought I'd mention it here in case others stumble upon it. Perhaps an item for the backlog? or the docs?
app code
const CDP = require('chrome-remote-interface');
(async function () {
  try {
    var client = await CDP();
    const { Network, Page } = client;
    await Promise.all([Network.enable(), Page.enable()]);
    var result = await Page.navigate({ url: 'https://google.com' });
    console.log('my result', result);
    await Page.loadEventFired();

  } catch (err) {
    console.error(err);

  } finally {
    if (client) {
      await client.close();
    }
  }
})();

Result
node app.js
my result { frameId: '11776.1' }

chrome-remote-interface inspect
(async function () {
  await Promise.all([Network.enable(), Page.enable()]);
  var result = await Page.navigate({ url: 'https://google.com' });
  console.log('my result', result);
})();

Result
Promise { <pending> }
>>> my result undefined
{ result: {} }
{ result: {} }
{ result: { frameId: '11776.1' } }

Hi, yes, thanks for pointing it out, the REPL is a strange beast, I'm still not sure what I want it to be. Anyway the README says:

But unlike the regular API the callbacks are overridden to conveniently display the result of the commands and the message of the events.

The original idea was to be a way to quickly try commands and events without having to care about the connection, the callbacks, the promises, etc.
In doing so commands and events have been wrapped into additional code that easily allows the user to inspect the result by printing it to the console. I don't really know how to implement this while keeping the proper semantics, i.e., returning a value.
Feel free to share your thoughts about this.

The REPL is a very handy testing tool. I'd like to use it in the same way as I use the dev tools in chrome - i.e. to fiddle about with some code until I have it working and then cut n paste it into a .js file to "turn it into an app" :)  Right now this doesn't work 100% because the REPL doesn't expose the value. I haven't looked at the source. Is it difficult to expose values to the shell? I'll have some time next week to look into this if you like - any pointers welcome.

Is it difficult to expose values to the shell?

No it's even easier than what I'm doing right now (with wrappers). The problem arise when I just want to see the output of a command, say, Domain.method(params), since the interaction is asynchronous I basically have three choices:

provide a callback:
Domain.method(params, console.log);

use then/catch:
Domain.method(params).then(console.log).catch(console.error);

use async/await:
(async () => {
    try {
        console.log(await client.Page.navigate({url: 'http://example.com'}));
    } catch (err) {
        console.error(err);
    }
})();

These are increasingly verbose, the only viable choice is the first one, but it has some problems:

the result will be in the form <boolean> <object> which may be confusing;
being the interaction asynchronous this doesn't play nice with the REPL prompt (for this reason I'm using this hack).

It may be the case that some of these problems can be solved by implementing the REPL using async/await, even though I'm not sure. In any case such rewrite is planned but it will not be happening anytime soon.

I hacked the following into bin/client.js:
// line 103:
            const override = function (params) {
                return new Promise((resolve, reject) => {
                    command(params, function (error, response) {
                        const repr = {};
                        repr[error ? 'error' : 'result'] = response;
                        overridePrompt(display(repr));
                        //overridePrompt('ichack');
                        if (error) reject(error);
                        resolve(response);
                    });
                });
            };

This let's me await the result if i want it. It also prints the result when it arrives as before (whether I await the result or not). Would that work for your use cases?
>>> (async function () {
...   await Promise.all([Network.enable(), Page.enable()]);
...   var result = await Page.navigate({ url: 'https://google.com' });
...   console.log('my result', result);
... })();
Promise { <pending> }
{ result: {} }
{ result: {} }
{ result: { frameId: '4164.1' } }
>>> my result { frameId: '4164.1' }

>>> Page.navigate({url: "https://github.com/"})
{ result: { frameId: '8776.1' } }

The my result bit is the part that I want.
BTW where this started was me trying to do the following in the REPL:

issue a Page.navigate
wait for a requestId
then Network.getResponseBody({ requestId })
which would be possible with the above hack to client.js I believe.

What do you think?

BTW that should be if (error) return reject(error); - to avoid the resolve being executed on error

The problem with this approach is that it creates noise in the console:
>>> Page.navigate({url: "https://github.com/"})
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }
{ result: { frameId: '22307.1' } }

In this case I'd just want { result: { frameId: '22307.1' } }; conversely in your example I would not want it (but I guess one can live with this latter case).

I'm experimenting with the following:
function overrideCommand(command) {
    const override = function (params) {
        const promise = command(params);
        // use a custom inspect to display the outcome
        promise.inspect = function () {
            this.then((result) => {
                overridePrompt(display(result));
            }).catch((err) => {
                overridePrompt(display(err));
            });
            // temporary placeholder
            return '...';
        };
        return promise;
    };
    // inherit the doc decorations
    inheritProperties(command, override);
    return override;
}

The resulting interaction is:
>>> Page.navigate({url: "https://github.com/"})
...
{ frameId: '12433.1' }
>>> Page.navigate({nope: "https://github.com/"})
...
{ Error: Invalid parameters (url: string value expected)
    at /home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/lib/chrome.js:90:30
    at Chrome.handleMessage (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/lib/chrome.js:289:13)
    at WebSocket.<anonymous> (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/lib/chrome.js:266:27)
    at emitTwo (events.js:125:13)
    at WebSocket.emit (events.js:213:7)
    at Receiver._receiver.onmessage (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/node_modules/ws/lib/WebSocket.js:143:54)
    at Receiver.dataMessage (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/node_modules/ws/lib/Receiver.js:385:14)
    at extension.decompress (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/node_modules/ws/lib/Receiver.js:354:40)
    at _inflate.flush (/home/cyrus/Dropbox/Backup/dev/chrome-remote-interface/node_modules/ws/lib/PerMessageDeflate.js:279:12)
    at afterWrite (_stream_writable.js:438:3)
    at onwrite (_stream_writable.js:429:7)
  response:
   { code: -32602,
     message: 'Invalid parameters',
     data: 'url: string value expected' } }
>>> (async function () {
...   await Promise.all([Network.enable(), Page.enable()]);
...   var result = await Page.navigate({ url: 'https://google.com' });
...   console.log('my result', result);
... })();
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events: { error: [Function: debugDomainError] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [] } }
>>> my result { frameId: '12605.1' }

Basically I used a custom inspect function only for the promises generated by commands, this function immediately prints the placeholder (...) then when the promise resolves it also prints the outcome.

Looks great! I'll try it when I'm back at the grindstone. I take it that the Promise output in the last example is coming from the await Promise.all

I take it that the Promise output in the last example is coming from the await Promise.all

Exactly, promises created by the user are left intact.

I think your solution above is best. One other thing I tried:
It's possible to filter the output as well (e.g. to remove all Promises from REPL output) using a variant of the following. I suspect that this will probably just create confusion elsewhere - and it's not complete anyway (colors missing, and prints a blank line for Promises).
const repl = require('repl');
const util = require('util');
const r = repl.start({ prompt: '> ', writer: myWriter });

function myWriter(output) {
  if (output instanceof Promise)
    return '';
  return util.inspect(output);
}

Sample output
node repl.js
> 1+1
2
> new Promise(() => {})

>

Yes but those promises are created by the user, it may likewise be confusing to not show them since it's what happens in a common Node.js console IMHO.

Yup I agree. I'm happy with your new overrideCommand. Feel free to close this issue.

Just noticed that the proposed solution doesn't work when a callback is explicitly used. This should fix it:
function overrideCommand(command) {
    const override = function (params, callback) {
        if (typeof callback === 'function') {
            // if a callback is provided the use it as is
            command(params, callback);
            return undefined;
        } else {
            const promise = command(params);
            // use a custom inspect to display the outcome
            promise.inspect = function () {
                this.then((result) => {
                    overridePrompt(display(result));
                }).catch((err) => {
                    overridePrompt(display(err));
                });
                // temporary placeholder
                return '...';
            };
            return promise;
        }
    };
    // inherit the doc decorations
    inheritProperties(command, override);
    return override;
}


Enable status to see partial apps and set updating status change to top-level

Purpose

Resolve https://github.com/siddhi-io/siddhi-operator/issues/101
Change updating status change in top-level

Goals

Set up a way to see which deployment that the partial apps being deployed
Previously, the status changing to updating happens long after kubectl apply. Here we move updating status to reconcile loop and then the status change happens right after the kubectl apply.

Approach

Add another status spec called partialApps.
Move updating status change to top-level.

User stories
Now users can view partial apps as below.
$ kubectl describe sp power-surge-app
...
Status:
  Current Version:  1
  Event Type:       Timer
  Partial Apps:
    Apps:
      @App:name("PowerConsumptionSurgeDetection-passthrough-65079-1")
@source(
  type='http',
  receiver.url='http://<IP_ADDRESS>:8080/checkPower',
  basic.auth.enabled='false',
  @map(type='json')
)
define stream passthroughDevicePowerStream(deviceType string, power int);
@sink(type='nats',cluster.id='siddhi-stan',destination = 'PowerConsumptionSurgeDetection_DevicePowerStream', bootstrap.servers='nats://siddhi-nats:4222',@map(type='text'))
define stream DevicePowerStream(deviceType string, power int);
from passthroughDevicePowerStream select * insert into DevicePowerStream;

    Deployment Name:  power-surge-app-0
    Apps:
      @App:name("PowerConsumptionSurgeDetection-750047d9-2df3-452a-819e-25aea099ff55-1")
@source(type='nats',cluster.id='siddhi-stan',destination = 'PowerConsumptionSurgeDetection_DevicePowerStream', bootstrap.servers='nats://siddhi-nats:4222',@map(type='text'))
define stream DevicePowerStream(deviceType string, power int);
@sink(type='log', prefix='LOGGER')
define stream PowerSurgeAlertStream(deviceType string, powerConsumed long);
@info(name='surge-detector')
from DevicePowerStream#window.time(1 min)
select deviceType, sum(power) as powerConsumed
group by deviceType
having powerConsumed > 10000
output every 30 sec
insert into PowerSurgeAlertStream;

    Deployment Name:  power-surge-app-1
  Previous Version:   1
  Ready:              2/2
  Status:             Running
Events:
  Type    Reason             Age   From                      Message
  ----    ------             ----  ----                      -------
  Normal  DeploymentCreated  21m   siddhiprocess-controller  power-surge-app-0 deployment created successfully
  Normal  ServiceCreated     21m   siddhiprocess-controller  power-surge-app-0 service created successfully
  Normal  DeploymentUpdated  19m   siddhiprocess-controller  power-surge-app-0 deployment updated successfully
  Normal  ServiceUpdated     19m   siddhiprocess-controller  power-surge-app-0 service updated successfully

$ kubectl get sp power-surge-app -o yaml
...
status:
  currentVersion: 1
  eventType: Timer
  partialApps:
  - apps:
    - "@App:name(\"PowerConsumptionSurgeDetection-passthrough-65079-1\") \n@source(\n
      \ type='http',\n  receiver.url='http://<IP_ADDRESS>:8080/checkPower',\n  basic.auth.enabled='false',\n
      \ @map(type='json')\n)\ndefine stream passthroughDevicePowerStream(deviceType
      string, power int);\n@sink(type='nats',cluster.id='siddhi-stan',destination
      = 'PowerConsumptionSurgeDetection_DevicePowerStream', bootstrap.servers='nats://siddhi-nats:4222',@map(type='text'))
      \ndefine stream DevicePowerStream(deviceType string, power int);\nfrom passthroughDevicePowerStream
      select * insert into DevicePowerStream;\n"
    deploymentName: power-surge-app-0
  - apps:
    - "@App:name(\"PowerConsumptionSurgeDetection-750047d9-2df3-452a-819e-25aea099ff55-1\")
      \n@source(type='nats',cluster.id='siddhi-stan',destination = 'PowerConsumptionSurgeDetection_DevicePowerStream',
      bootstrap.servers='nats://siddhi-nats:4222',@map(type='text')) \ndefine stream
      DevicePowerStream(deviceType string, power int);\n@sink(type='log', prefix='LOGGER')
      \ndefine stream PowerSurgeAlertStream(deviceType string, powerConsumed long);\n@info(name='surge-detector')
      \ \nfrom DevicePowerStream#window.time(1 min) \nselect deviceType, sum(power)
      as powerConsumed\ngroup by deviceType\nhaving powerConsumed > 10000\noutput
      every 30 sec\ninsert into PowerSurgeAlertStream;\n"
    deploymentName: power-surge-app-1
  previousVersion: 1
  ready: 2/2
  status: Running

Here deploymentName indicates the name of the K8s deployment and apps shows the deployed apps.
Release note
Enable users to view deployed partial Siddhi apps directly using SiddhiProcess.
Test environment
minikube version: v1.4.0
commit: 7969c25a98a018b94ea87d949350f3271e9d64b6

@BuddhiWathsala whey its called "Apps" inside "Partial Apps". Shouldn't it be called as App?

Yes, It changed as app in this PR https://github.com/siddhi-io/siddhi-operator/pull/113.


Deploy your Docker image to Kubernetes

Given code is ready to be merged
When a pull request is created
Then GitHub Actions should run linting and unit tests
And the badge should show that the build is passing

completed

inadvertently closed


(postgresql) remote db & user creation

Adding the option to create DB & DB user in a remote postgresql DB (tested with RDS)
only active when grafana_database['type'] == postgresql && grafana_db_creation['enabled'] == true
In order to create the new database you will need to change the next vars:
grafana_db_creation:
enabled: True # Create DB & User
master_user: # DB User with permissions to create new database & user
master_password: # Password
host: # Remote DB host
port: 5432 # Remote DB port
I changed the default grafana_database['host'] to use the above host & port to prevent duplications.
host: "{{ grafana_db_creation['host'] }}:{{ grafana_db_creation['port'] }}"

Postgres or any other database should be created by other role specialized in creating and managing this database not in grafana role.


Compose replies as plaintext

When i choose plaintext as default for new mails, rainloop still chooses html for replies (to html mails). This can be toggled, but i think it would be useful to default to the setting for new mails.

Try to use Plaintext (forced):

Okay, this works.


fix: expose Commit and NormalisedActionHandler types

Hullo @danielroe,
first of all thanks for putting this library together, it's a total life saver. 🙌
I've set up typed-vuex in a medium-sized project and it's doing fine as long as I don't configure TS to export type definitions (with declaration TSconfig option).
Here TS seems to hit one of its own limits returning a TS4023 error with the following description:
Error: ./src/store/cart/actions.ts(25,7): semantic error TS4023: Exported variable 'actions' has or is using name 'Commit' from external module "[my-machine-path]/node_modules/typed-vuex/lib/index" but cannot be named.

Even though I haven't fully understood the technical origin of the error I found out that it seems to get fixed if I expose Commit and NormalisedActionHandler types from typed-vuex.
This PR does nothing more than that.
I'd like to hear whether you might consider exposing these types or whether you suggest a different approach.
Thanks so much, I'm fully available to support this pr and you further :)

Thanks for the kind words 😊  More than happy to export the types, though they do come with a bit of a health warning and probably wouldn't be that useful if anyone wanted to use them on their own..

Hi @danielroe, thanks for the quick feedback.
I'd like to give a bit more context about the TS error I got.
The project I'm working on is heavily relying on vue-cli default custom import paths @/ (which I ended up considering a very bad practice). Typescript is able to accept custom import paths (via paths option), but the very same option doesn't have any effect on the exported type definition files.
Since the exported definitions were littered with broken @/xxx imports, typescript wasn't then able to find the relevant types. Once I configured my build configuration to transform declarations' custom import paths, the error seems to have disappeared.
Hope it helps some other stray developer lost in the way between Vue and TS :)

BTW, exposing Commit and NormalisedActionHandler seems to be still necessary in order to build my project with type definition files. 👍


Update timeline page and fix animation #34

Hey @vansh-codes I have updated timeline page. Just take a look and let me know is there anything you want to improve.
Here is the video of the changes.
https://github.com/user-attachments/assets/75a9e816-787c-49f1-9e92-82057f351d1f
If you like it, please increase level1 to at least level2 or level3.
Thanks!

@vansh-codes  check it now.

Share the updated code video

Uploading Recording 2024-10-08 161131.mp4…


Seems like get_incoming_var_for_parameter_var() returns an incorrectly typed variable

>>> current_mlil.ssa_form[0].vars_read
[<ssa <var int64_t* arg1> version 0>]
>>> ssa_var = current_mlil.ssa_form[0].vars_read[0]
>>> main_func = bv.get_function_at(bv.symbols['main'].address)
>>> cc = current_function.calling_convention
>>> in_var = cc.get_incoming_var_for_parameter_var(ssa_var.var, main_func)
>>> in_var
<var int32_t rdi>

Callee function:

This prevents me from doing something like the following while doing an inter-procedural backward slice:
in_var = cc.get_incoming_var_for_parameter_var(ssa_var.var, caller)
in_var_ssa_ver = mlil_inst.get_ssa_var_version(in_var)
in_var_ssa = bn.mediumlevelil.SSAVariable(in_var, in_var_ssa_ver)

and have to resort to something like:
in_var_ssa = mlil_inst.params[tracking_idx].src
where tracking_idx was retrieved by:
    def _get_func_arg_idx(self, ssa_var):
        """Determines if the SSA variable is a function argument"""
        params = ssa_var.var.function.parameter_vars
        for idx in range(len(params)):
            if params[idx] == ssa_var.var:
                return idx
        return None

Just a follow up to let you know we're sorry this one didn't get responded to earlier. Can you confirm if this is still an issue and we can look into it more closely?

Just a follow up to let you know we're sorry this one didn't get responded to earlier. Can you confirm if this is still an issue and we can look into it more closely?

Closing seems to work in BinaryNinja 1.1.1470.
>>> cc = current_function.calling_convention
>>> caller = bv.get_functions_containing(0x4004be)[0]
>>> cc = caller.calling_convention

>>> ssa_var = current_mlil.ssa_form[0].vars_read[0]
>>> ssa_var
<ssa <var int64_t* arg1> version 0>

>>> in_var = cc.get_incoming_var_for_parameter_var(ssa_var.var, caller)
>>> in_var
<var int32_t rdi>
>>> caller.get_low_level_il_at(0x4004be).medium_level_il
<il: 0x4005e0(rdi)>
>>> mlil_inst = caller.get_low_level_il_at(0x4004be).medium_level_il
>>> in_var_ssa_ver = mlil_inst.get_ssa_var_version(in_var)
>>> in_var_ssa = binaryninja.mediumlevelil.SSAVariable(in_var, in_var_ssa_ver)
>>> in_var_ssa
<ssa <var int32_t rdi> version 1>


Sumitbisht/cursor bugfix

Fixed issue: #8
mouse cursor to hand pointer at INFO section in footer.

@KiranAminPanjwani before merging this branch could you please add Hacktoberfest label onto it?

Happy Contributing! 😊🎉


updated quip (4.5.13)

Thank you for the contribution. It was merged directly as 3a99e6de73a5c47171a69229fae0503d3d63db43 to keep commit history cleaner. Your contribution is still credited to you.


bugfix:  手动安装 Agent 报错认证类型错误 (closed #1676)

Codecov Report

Merging #1693 (8270cd3) into v2.3.3-dev.1 (8ecaef4) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@               Coverage Diff                @@
##           v2.3.3-dev.1    #1693      +/-   ##
================================================
- Coverage         73.18%   73.16%   -0.03%
================================================
  Files               390      390
  Lines             26456    26466      +10
================================================
  Hits              19363    19363
- Misses             7093     7103      +10

Impacted Files
Coverage Δ

...nents/collections/agent_new/install_other_agent.py
22.22% <0.00%> (-1.44%)
:arrow_down:

apps/backend/subscription/views.py
51.25% <0.00%> (-0.53%)
:arrow_down:

... and 4 files with indirect coverage changes


When developing on the flutter tool, no apparent way to ask gradle "don't rebuild the snapshot", to avoid the multi-second snapshot rebuild

When running the flutter tool, it calls to gradle, which then takes a snapshot of the flutter tool (a multi-second operation).
When developing on the flutter tool, that snapshot generation is unnecessary.
It would be really cool if there was a way to say/configure "don't generate a snapshot, just run the source", to speed up development of the flutter tool.
Meanwhile, the workaround is: rm $FLUTTER_HOME/bin/cache/flutter_tools.stamp before you re-run your flutter tool during development of the flutter tool itself.

I don't understand what you mean about gradle. We build the tool once, when you run the tool. Then if gradle shells out to us again it should just be using the prebuilt version, unless you're starting it in a weird way.

The rest of what you describe is working as intended. If you are developing on the tool, you must either delete the pre-built version, delete the stamp for the prebuilt version -- that's what you describe above -- or change the hash of the latest commit, by committing your code (or amending your existing commit).

No worries, I suspect that most people aren't hacking on the flutter tools at a furious pace. :) With the workaround listed in this issue, I can close this. Thanks for taking a look.


Dates prototype development

Build three prototypes for testing that allow a user to filter results by date.

[x] 2 input fields (completed in #4628)
Provide an input for a from date and a to date, without any placeholder text so as not to influence what the user wants to enter.

[x] compound date slider (completed in #4628)
Enhance the above input fields to be controlled by two range sliders, allowing the user to drag a range of dates to be searched.

[x] aggregate date information
Indicate the number of results within bucketed date ranges and allow a user to get to those results via links.

@davidpmccormick Is this ok to close now?

Yep.


wrong response and wrong prompt

The product form is excellent, providing concise input and output.
The program seems to process my prompts, but not accurate enough. Some prompts have no response at all and some will return the result of the previous prompt.
Given that this is just a mock api, maybe you guys are aware of this issue already, hope there will be a follow-up real api to do better.

Thanks


Parallelization bug / unsupported functionality

parallelization bug.pdf

Brandt do you have the actual source code, and perhaps the PNG of the screen output, from this email?  That might help jump start the debugging process.

The pdf attached with the email chain is all I have. All I can take from it is that the in-memory classes may have a bug when run in parallel. I suspect that the problem is that each vector is loaded by every process/core. I think our assumption was that the vector handle system would be used for parallel, even if the vectors were in-memory. So the solution might be to just add that to the docs. What do you think?


Dev kmr

We may need a further review as without trex-config returned below exception.
trex-config in param file.
# cat run/iterations/iteration-1-fail/sample-1-fail-1/client/1/trex-server-stderrout.txt
Starting  TRex v2.87 please wait  ...
Using configuration file /tmp/tmp.V32VOyrUfl/iteration-1/sample-1/trex_cfg.yaml
 port limit     :  not configured
 port_bandwidth_gb    :  10
 if_mask        : None
 is low-end : 0
 stack type :
 thread_per_dual_if      : 1
 if        :
 m_zmq_rpc_port    :  4501
 memory per 2x10G ports
 MBUF_64                                   : 16380
 MBUF_128                                  : 8190
 MBUF_256                                  : 8190
 MBUF_512                                  : 8190
 MBUF_1024                                 : 8190
 MBUF_2048                                 : 4095
 MBUF_4096                                 : 128
 MBUF_9K                                   : 512
 TRAFFIC_MBUF_64                           : 65520
 TRAFFIC_MBUF_128                          : 32760
 TRAFFIC_MBUF_256                          : 8190
 TRAFFIC_MBUF_512                          : 8190
 TRAFFIC_MBUF_1024                         : 8190
 TRAFFIC_MBUF_2048                         : 32760
 TRAFFIC_MBUF_4096                         : 128
 TRAFFIC_MBUF_9K                           : 512
 MBUF_DP_FLOWS                             : 524288
 MBUF_GLOBAL_FLOWS                         : 5120
 no platform info
CTimerWheelYamlInfo does not exist
ERROR need at least 2 ports

That issue should be resolved in the latest version.  However, I'm working on a more elegant solution so for the time being I've marked this PR as a draft.


Add NollySenti Bitext Mining (MINERS)

NollySenti is Nollywood movie reviews for five languages widely spoken in Nigeria (English, Hausa, Igbo, Nigerian-Pidgin, and Yoruba.
Checklist

[x] Run tests locally to make sure nothing is broken using make test.
[x] Run the formatter to format the code using make lint.

Adding datasets checklist

Reason for dataset addition: ...

[x] I have run the following models on the task (adding the results to the pr). These can be run using the mteb -m {model_name} -t {task_name} command.

[x] sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
[x] sentence-transformers/LaBSE

[x] I have checked that the performance is neither trivial (both models gain close to perfect scores) nor random (both models gain close to random scores).
[x] If the dataset is too big (e.g. >2048 examples), considering using self.stratified_subsampling() under dataset_transform()
[x] I have filled out the metadata object in the dataset file (find documentation on it here).
[x] Run tests locally to make sure nothing is broken using make test.
[x] Run the formatter to format the code using make lint.

@KennethEnevoldsen I created a new PR for NollySenti.

I have completed the checklist @KennethEnevoldsen.

Thank you for the review. I addressed them. I updated the avg number of character per sample, added the results, and points. The new languages are hau-Latn, ibo-Latn, pcm-Latn, yor-Latn, so the points are 2 + 4 x 4 = 18. Plus, I added the point for the reviewer. @KennethEnevoldsen


Android support

Hi guys,
Any plans to support this awesome package on android?
Thanks,

Hi @AlaaAttya. There has been discussion about adding Android support and it's something I hope to look into shortly.

Hi
Great module!
Any progress on Android support?
I use it successfuly for iOS and would like to keep the same logic for Android, I am sorry I can not help for Android also.

I send PR.
If you want this right now, you can use my repository
https://github.com/g6ling/react-native-uploader

@aroth is this getting merged?

Unfortunately no, not in it's current state. I had a short list of changes I wanted to see before approving and merging. I don't have time to take care of this myself, but I'm very open to community involvement as long as the quality remains high.
https://github.com/aroth/react-native-uploader/pull/13

Where's the list?

https://github.com/aroth/react-native-uploader/pull/13
Comment on July 9th

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1

+1 add support for android

+1

+1添加对android的支持

+1 add support for android

+1 :)

+100000000000

@MedinaGitHub if you want to just upload photos, you can use xhr.
Read my post.
https://github.com/g6ling/React-Native-Tips/tree/master/How_to_upload_photo%2Cfile_in react-native

+10000000000000000000000

+1

Found a quick workaround that works for me if anyone is interested:
<EMAIL_ADDRESS>

So now its May 2019 - does this now work for Android?


how to merge two mds?

I has two mds dataset，how to merge them？thanks！

Two ways:

Merge their indexes

Streaming datasets are conceptually just a list of shards. The index file (index.json) contains the metadata for each shard, in order. You can modify a dataset to add or remove shards by modifying its index file. The index file is formatted like this:
{
    "version": 2,
    "shards": [
        (shard 0 metadata dict),
        (shard 1 metadata dict),
        (shard 2 metadata dict),
        ...
    ]
}

And if you have a directory structure like this:
dataset/
    dataset0/
        index.json
        shard.00000.mds
        shard.00001.mds
     dataset1/
         index.json
         shard.00000.mds

You can merge them into a combined dataset at "dataset/" by creating a new combined index file like this at "dataset/index.json":
import json
import os

root = 'dataset'
infos = []
for subdir in sorted(os.listdir(root)):
   filename = os.path.join(root, subdir, 'index.json')
   obj = json.load(open(filename))
   for shard in range(len(obj['shards'])):
       for which in ['raw_data', 'zip_data', 'raw_meta', 'zip_meta']:
           if obj['shards'][shard].get(which):
               basename = obj['shards'][shard][which]['basename']
               obj['shards'][shard][which]['basename'] = os.path.join(subdir, basename)
   infos += obj['shards']
obj = {
   'version': 2,
   'shards': infos,
}
filename = os.path.join(root, 'index.json')
with open(filename, 'w') as out:
   json.dump(obj, out)

If you don't want to keep the subdirs, you can merge streaming datasets in-place like this: https://github.com/mosaicml/streaming/blob/cf03851207a2c7bcb8d3fb79cb5865dfcfd4f6c9/streaming/text/convert/pile.py#L130-L184

Use Streams

dataset0 = Stream(remote=..., local=...)
dataset1 = Stream(remote=..., local=...)
dataset = StreamingDataset(streams=[dataset0, dataset1], ...)

If this is actually the same data, go with 1. If you are actually creating a dataset mix, go with 2.


Add CI & CD

Is your feature request related to a problem? Please describe.
CI & CD tools are great addition to almost all projects. They have a lot of advantages and we should install them to our repository.
Describe the solution you'd like
Travis CI is a one of the best choices for this type of work. For windows part you can consider AppVeyor.
Describe alternatives you've considered
None.
Additional context
At least, CI should support Windows but it would be great if we can build on all actual platforms (Windows, Linux, macOS).

Need to add deploy phase for successful builds.


Disable 'self' parameter for #gradient and #valueAndGradient.

Disable differentiation with respect to 'self' for #gradient and #valueAndGradient.
'self' in the parameter list is ad-hoc and out of place.
The same "diff w.r.t. self" functionality can be generalized and represented
more naturally as dataflow AD, using a differential operator on an output
variable w.r.t input variables.

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow


Percentage doesn't work In tablet mode.

It just wont appear when im in tablet mode.

Hi, I know you write this post a lot of time ago, but if you want to see the battery in tablet mode you have to flag the option "show all notification icons" :)

I'm not familiar with tablet mode, if you have a fix that doesn't affect regular mode then we can look at adding it
Do other tray icons show in tablet mode?


⚠ Cioos National CKAN has degraded performance

In 0e00c9b, Cioos National CKAN (https://catalogue.cioos.ca/) experienced degraded performance:

HTTP code: 200
Response time: 6043 ms

Resolved: Cioos National CKAN performance has improved in cde26a9 after 11 minutes.


SOLR-17006: Persist user-defined core properties

https://issues.apache.org/jira/browse/SOLR-17006

Description
CREATE collection and ADDREPLICA commands both accept core properties (as property.* parameters) that are then added to the core.properties file. However, those additional properties are not persisted anywhere in the cluster state.
Consequently, cores that are added later to a collection (e.g., by adding a new replica) do not contain those properties, which seems inconsistent. I would like to be able to specify a core property when creating a collection, and not repeat myself when adding a new replica later on.
Solution
This PR stores core properties in the cluster state for collections and replicas (which also allows them to be queried by plugins, if required). It also apply collection-level core properties to cores created when adding a new replica.
It might be a breaking change if people do not expect this behaviour.
Tests
New tests were added for CREATE collection and ADDREPLICA with core properties.
Checklist
Please review the following and check all that apply:

[x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
[x] I have created a Jira issue and added the issue ID to my pull request title.
[x] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
[x] I have developed this patch against the main branch.
[x] I have run ./gradlew check.
[x] I have added tests for my changes.
[x] I have added documentation for the Reference Guide

Why did you force push?  Please don't do that (like ever, if you can help it); it resets the review state.

Sorry, I force pushed because I rebased against master (I had weird failures and hoped rebasing would help).
Properties passed as property.* parameters in the CREATE collection command were never saved in state.json. They were just forwarded to the CREATE core command. Same for the ADDREPLICA command, property.* parameters were only forwarded to the CREATE core command. Hence possible inconsistencies, if one passes a custom property when creating a collection, but not later on when adding a replica.
This PR really adds two things:

Persist property.* parameters in state.json for collections and replicas (I did not tackle shards).
Propagate those custom properties in ADDREPLICA calls to make sure that cores are created in a consistent way with the same properties. New cores inherit from properties from both the collection and replica, the latter overwriting properties from the former if they are found in both. This is of course only possible because they are stored in state.json.

Please note that adding custom properties to collections and replicas is already supported via MODIFYCOLLECTION (not COLLECTIONPROP) and ADDREPLICAPROP commands, but this has no effect other than persisting them. Now, if those existing commands are used after creating a collection or replica, they would have the effect of affecting properties passed to new cores (but that would never change existing cores, their properties are immutable I guess).
I hope this proposal brings one piece of answer to similar concerns raised about this situation raise in SOLR-16305.


Enable change_direction attribute

I also want to control my roller shutters / blinds using alexa.
To do this it is necessary that up/down/stop commands are transfered by this node to other nodes.
This "change direction" option seems to be not implemented for this node.
It is implemented and working for me in other nodes like "node-red-contrib-alexa-home" (but I prefer this node :-))
They did this to implement:

https://github.com/mabunixda/node-red-contrib-alexa-home/blob/master/alexa/alexa-home.js
// Detect increase/decrease command
msg.change_direction = 0;
if (msg.payload.bri) {
  if (msg.payload.bri < node.bri) {
    msg.change_direction = -1;
  }
  if (msg.payload.bri > node.bri) {
    msg.change_direction = 1;
  }
}

Is it possible to add something similar to your code?
Thanks

I would like to be optimistic too.. but this module is a clone of the Philips bulb, and as long Alexa will recognize it as a light she will just receive the commands suppose to be told to a light (not a shutter).
Fortunately in italian the words are similar, so it works as well

something similar was discussed here:
https://github.com/datech/node-red-contrib-amazon-echo/issues/34
and datech marked it as an enhancement.. so maybe he has something in mind that could make it possible. Maybe is possibile to clone other devices too..
PS: @datech there are news about 1.10? Will it support the disable discover of devices? Thank you a lot!

Could solve the issue using node red (Maybe not the most elegant way but it is working :-)).
It now looks like this:

Only issue I still have is, that I need to "turn on" my blinds once initially when Alexa discovered them. After this one time activity everything works even when I turn them "off" - which will result in Stopping the blinds from moving (turning them on result in the same).
I can now say "Alexa blinds up; Alexa blinds down; As well as Alexa blinds on/off which results in stopping them. Telling Alexa to "stop" the blinds she is telling me that there is no device with name blinds.
I cannot say Alexa put the blinds 50% Percent, But I dont need this.
Before I found the solution above I tried something like this (It also worked but looks much more complicated).

@PaulNBerlin May we consider this as resolved and close it?

Having the meta.changes in the output has to be enough to find the direction:
if (msg.meta.changes.bri) {
  if (msg.meta.changes.bri < msg.bri) {
    msg.change_direction = -1;
  }
  if (msg.meta.changes.bri > msg.bri) {
    msg.change_direction = 1;
  }
}

Exactly!

Is this a question?

I'm trying to say that we have so many different cases where this module can be used, and it will be impossible to cover the specifics for each device. That's why I've added meta.input and meta.changes arrays. So, each of us can use the metadata arrays to create JS functions that can meet their specific requirements.
That's why I don't think that we have to include change_direction in the output.

Understand.


[HUDI-359] Add hudi-env for hudi-cli module

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contributing.html before opening a pull request.

What is the purpose of the pull request
Add hudi-env.sh for hudi-cli module to set running environments.
Brief change log

Add hudi-env.sh in hudi-cli module

Verify this pull request
This pull request is a trivial rework / code cleanup without any test coverage.
Committer checklist

[x] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@vinothchandar , checks always have failed, could you have any help.


drizzle-zod mysql

#216

@AlexBlokh ??

@JonathonRP will send review notes soon

@dankochetov ??

Should we just copy a logic from zod+postgres? A lot of types seems to be similar. I guess you could create a generic set of functions for all dialects

That's what I was thinking. a lot of the abstract structs between dialects are the same and can be reuse with zod implementation at least

Hey @JonathonRP, I've updated drizzle-zod to support select schemas and SQLite lately, so you can take a look at current implementation to get an idea of how the MySQL support could be added properly. Also, please let me know if you're still interested in adding MySQL support, because I also had plans to add it, so that we don't do the same task twice. Keep in mind, that if you plan to do it, you'll also need to add some tests for your implementation, similar to what we already have for Postgres and SQLite.

Hey @JonathonRP, I've updated drizzle-zod to support select schemas and SQLite lately, so you can take a look at current implementation to get an idea of how the MySQL support could be added properly. Also, please let me know if you're still interested in adding MySQL support, because I also had plans to add it, so that we don't do the same task twice. Keep in mind, that if you plan to do it, you'll also need to add some tests for your implementation, similar to what we already have for Postgres and SQLite.

Hey @dankochetov, please feel free to take this on. I feel you could get to it quicker than I can right. Thanks!


How to load Dynamic data into js grid using java servlets

Hello,
When we are retrieving data(dynamically) using java servlets the resultset holds query result.
ResultSet rs = st.executeQuery(query);
Can any one explain How to put ResulSet data into jsgrid

Please provide a description or no one will be able to help you.

jsgrid works on array of items.
Probably you should create your array of object (typically an ArrayList of javabeans), populate it looping your ResultSet, convert it into a json string (using a lib like Gson) and send back the string in your front-end.

@maurorulli maurorulli
Thank you for your replay,
This is my servlet page, Here i converted Resultset data into json array format and i sended it to Jsp page
Servlet code:
public class Reportgen extends HttpServlet{
public void service(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
	response.setContentType("text/html");
	PrintWriter out = response.getWriter();

	String s1 = request.getParameter("t1");

	String s2 = request.getParameter("t2");
	try {
		JsonObject jsonResponse = new JsonObject();
        JsonArray data = new JsonArray();

        PrintWriter out1 = response.getWriter();

		Class.forName("com.informix.jdbc.IfxDriver");
		Connection con = DriverManager
				.getConnection(
						"DB_URL", "Username", Password");
		Statement st = con.createStatement();

		String query = "select * from xyz_tbl where xyz_generated_date between '"+s1+"' and '"+s2+"'";
		System.out.println("MY QUERY=" + query);
		ResultSet rs = st.executeQuery(query);

		while (rs.next()) {

			 JsonArray row = new JsonArray();
			 row.add(new JsonPrimitive(rs.getString("xyz_patient_id")));
                row.add(new JsonPrimitive(rs.getString("xyz_patient_name")));
                row.add(new JsonPrimitive(rs.getString("xyz_gender_id")));
                row.add(new JsonPrimitive(rs.getString("temp_mobile")));
                data.add(row);
		}
		jsonResponse.add("ResponseData", data);
		response.setContentType("application/json");
		response.setCharacterEncoding("UTF-8");

		 request.setAttribute("Json", jsonResponse);
		    request.getRequestDispatcher("/Repdisplay.jsp").forward(request, response);

		 response.getWriter().print(jsonResponse.toString());

		} catch (Exception e2) {
		e2.printStackTrace();
	              }

	     finally {
		out.close();
	          }
}

}
Jsp code:
<% out.println(request.getAttribute("Json")); %>
in jsp page the data is printing like this
["P1600003","abc","100","1111111111"],["TP16000002","xyz","1001","222222222"],["P6000003","pqr","101","4444444444"],["TP16000004","stu","1001","3333333333"]
please help me how to print this data into js grid, what are the steps i have to approach.

Two points you have to focus to:

You got an array of array of primitives. You should get an array of objects. Try to define the var row as JsonObject instead of JsonArray.

In JSP assign your output to a JavaScrit var that you'll use in JSgrid:

<script>
var db = <% out.println(request.getAttribute("Json")); %>;
</script>


Enchance the scroll-down logic when executing cells

For my experiments, when shift+enter to run a cell, the window moves in the following logic:

the window scrolls down until the next cell is fully visible or the header of the next cell reaches the top of the screen
during execution, the position of the topmost cell whose header is within the screen remain fixed, others may move as the output increases.

I believe users usually want to focus on the end of the output cell as it contains the most recent information, but such logic would make it invisible in two scenarios:

if the next cell is long enough to occupy the whole screen, all outputs would be out of the screen.
if the head of the current cell is still in the screen, its position would be fixed and the output may run out of the end of the current screen.

I would suggest scrolling in the following manner:

the window scrolls down until the first line of the next cell is visible
during execution, the position of the next cell remain fixed

Here are some examples, the left is the status before execution, the middle is the actual behaviour and the right is what I expect

more discussion happening in https://github.com/microsoft/vscode/issues/169038 to polish the behavior


Fix IPC race condition in startup

This should eliminate startup bugs caused by ipcReady being sent too eagerly from the renderer. I originally moved ipcReady to as early as possible in order to make the app launch faster.
But if we make the window show by default, instead of being hidden and waiting for ipcReady, then startup doesn't actually feel any slower.

Self-merging to get v0.7.0 out the door. Post-review welcome! @dcposch @ungoldman @grunjol

LGTM


Regenerate with New Autorest Features

Client SDKs that are using Autorest to generate code should add two new feature flags to the Autorest configuration:
custom-strongly-typed-header-deserialization: true
generic-response-type: true

Custom Strongly Typed Header Deserialization
Custom strongly typed header deserialization indicates to Autorest to generate strongly-typed header objects, classes that have properties that map to headers returned by a response with non-string types such as boolean, byte[], int, etc instead of being a String, without using Jackson for deserialization. This provides two improvements where Jackson is no longer being used, and due to that there is less usage of reflection in the SDK, and a non-negligible performance improvement as the Jackson code path has to serialize HttpHeaders into a JSON object and then deserialize the JSON object to the strongly-typed headers type, this PR comment contains more information about the performance improvement.
When this feature is enabled strongly-typed header types will have a new public constructor added to the class that takes HttpHeaders as the only parameter. Within the constructor each property will be retrieved and converted to the type it represents, doing this will ensure that if any exceptions occur during creation of the type they will occur at the same point in code as when Jackson was being used to create the type. Additionally, with the HttpHeaders constructor mocking strongly-typed header objects will be easier as it won't require using reflection anymore. No other API or behavioral changes will happen.
Generic Response Type
Generic response type indicates to Autorest to generate ResponseBase types using ResponseBase with generics instead of a named subtype that extends ResponseBase. This provides two improvements where azure-core no longer needs to use reflection to create the named ResponseBase subtype as azure-core is capable of creating a ResponseBase with generics directly and reduces the size of SDKs by allowing for the ResponseBase subtype to be deleted (as long as it wasn't used in public API). This change also alleviates issues with SecurityManager where azure-core may not be given reflective access to client SDKs, forcing AccessController.doPriviledged to be used which is deprecated for removal as of Java 17 (https://github.com/Azure/azure-sdk-for-java/issues/24373, https://github.com/Azure/azure-sdk-for-java/issues/27181).
When this feature is enabled the generated interface and service client, that are generally in implementation, will have their return types changed from the named ResponseBase subtype to ResponseBase with generics. The named ResponseBase subtype won't be deleted automatically. So, for ResponseBase subtypes in implementation they can be deleted to reduce package size and ResponseBase subtypes in the public API will be retained. For the subtypes in public API, additional logic will need to be added to convert the ResponseBase with generics to the named type to retain functionality.
Example
The Form Recognizer library has already been updated to use these new directives and can be used as a guide on the changes needed.
https://github.com/Azure/azure-sdk-for-java/pull/27915

custom-strongly-typed-header-deserialization would need the new azure-core (1.27.0?)?

custom-strongly-typed-header-deserialization would need the new azure-core (1.27.0?)?

Yes, this requires functionality from the upcoming azure-core release that should be happening soon

Adding additional information that was missed in the initial issue description.
Applying the two new Autorest features may not result in code generation changes if the target Swagger doesn't contain model definitions that are affected by the features, it's still the best practice to enable these.

What is the suggestion for service-interface-as-public flag?
Thing whether we should set it as true by default, for DPG.


Alternative install method for PHP_CodeSniffer

Hello!
I maintain a fork of this image that adds yarn.
Yesterday I noticed the image builds where failing and the problem was installing PHP_CodeSniffer, so I made this changes to install it using Composer instead of PEAR.
I guess this might be related to the site being down
http://pear.php.net/
Here's a screenshot of the error I was getting:

EDIT: libzip is required or the build fails while installing PHP_CodeSniffer

Amazing, fixing that failed build was on To-Do list. Thank you very much for that! Btw, feel free to make a PR for adding yarn. 👍

I'm glad it helps! yarn PR in a few minutes


Updated the repository with a fresh copy from amazon

Thank you for providing the library in a composer-accessible way!
I noted that they did some updates on their library, so here is a pull request with their changes as they are.

Closing as I completed this in a separate PR but thanks for the work, I appreciate it: https://github.com/thewirecutter/paapi5-php-sdk/pull/10


⚠ Bofrost.at has degraded performance

In bfef1d7, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2195 ms

Resolved: Bofrost.at performance has improved in fa36b00 after 19 minutes.


Please add a license file

Hi @johnsoncodehk,
Thanks for creating the awesome package. Would you mind create a license file to claim the right to use the package?

Thanks for your suggestion, it has been added!


Resolve -WindowStyle Hidden console flashing

PR Summary
Fix #3028
PR Context
#10962 is direct implementation of pwshw idea. pwshw is only one option from many in the complex topic dicussed in #3028. The PR seems add more flexibility and allow to experiment with console, non-console, pseudo-console and GUI modes, allow to implement pwshw in the same way as we did for preview-pwsh, and also fix -WindowStyle Hidden scenario.
Update: I think follow work should be:

create xUnit tests for command line parser
refactor command line parser

make it static
move out execution code from parser (parser should only parse)
merge EarlyParser and parser

PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and enumerated concerns in the summary. This may include:

Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode (which runs in a different PS Host).
Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).
Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

@iSazonov Please add description/context for this PR. Also, #10962 is also for fixing #3028, so what is the difference between your fix and that one?

@daxian-dbw #10962 is direct implementation of pwshw idea. pwshw is only one option from many in the complex topic dicussed in #3028. The PR seems add more flexibility and allow to experiment with console, non-console, pseudo-console and GUI modes, allow to implement pwshw in the same way as we did for preview-pwsh, and also fix -WindowStyle Hidden scenario.

You'd better add the PR description about what you are doing in this PR, so a reviewer would know.

@daxian-dbw Already done.
Update: I think follow work should be:

create xUnit tests for command line parser
refactor command line parser

make it static
move out execution code from parser (parser should only parse)
merge EarlyParser and parser

Just so you’re aware, attaching to the parent process’s console as a Windows subsystem application (WinExe) will cause handle fighting where half your input will go to the parent and half to the child, and all output will be intermixed. This is because the parent, usually cmd or another instance of powershell will not wait for a spawned Windows subsystem application to exit.
You’ll probably see this:
C:\> pwsh
PowerShell 7.0.0
C:\> PS C:\>

(One prompt from CMD, one from powershell, both running and reading input simultaneously.)
This is impossible to work around without...

A generic solution in the operating system
A hack where powershell knows that it’s spawning another version of powershell, and waits for it to finish (working around the problem only for the PS->PS case.)

Attaching back to the parent’s console handle can also make the console fail to exit because a Windows subsystem application is still attached to it. This happens when you run code from cmd and then type in exit. CMD exits and the window remains because VSCode reattaches to its parent’s console handle.

@DHowett-MSFT Thanks! The scenario you describe is "Start-Process -NoNewWindow". We have an issue for it. I agree that we can not resolve it in simple way.
Original issue for the PR asks to address a scenario like scheduled task in user session so that user does not see PowerShell window. In the PR I try to demo how simple we can manually allocate a console to resolve the ask if no user IO is implied.


Create a project folder structure(monerepo)

Stack

NestJs
NextJs
MongoDB
Typeorm
TailwindCSS

@Musigwa and @Nziranziza
What about this:
Stack

NestJs
NextJs
MongoDB
Mongoose
TailwindCSS
Swagger UI
TanstackQuery (Replaicng tRPC approach)

@pierratono your suggestion’s great. Only that we may have struggles with trpc as we discussed in our last physical meeting. The rest is cool.

Okay gonna keep rest then, just wanted to confirm 🫠

@Musigwa and @Nziranziza What about this:
Stack

NestJs
NextJs
MongoDB
Mongoose
TailwindCSS
Swagger UI
tRPC ( with React TanstackQuery)

I think we avoided tRPC because we are thinking about having a mobile app and decided to go with traditional RestAPI architecture. I am also not a big fun of swagger UI, I think we could use POSTMAN to generate the api documentation and if we want to do something more we could look for other alternatives but swagger UI is just ugly 😂

If you want to use postman you can simply import swagger ui generated json/yaml file man
So let's then use rest with tanstackquery insteadof trpc


Create the first template

The first template should be very similar to the HelloWorld sample but just display a button and a label that gets updated when the button is tapped. Project hierarchy should be like Maven/Gradle (e.g. src/main/java). Set up a resources/ folder with the default RoboVM icons and launch images. The package name and class name of the main class has to be changed to match the values entered by the user.

Our first template (default) is now ready. It's a maven archetype but also has an assembly to package the template in a tar.gz without maven specific files to be used in the templater project.


Storage cross range-erase can break when using built-in iterators

This is mostly the same issue as #913 but at storage level. We reproduce it the same way. CC @xissburg

Fixed in release (v3.10.3).


pytube.exceptions.CipherError: Couldn't cipher the signature. Maybe YouTube has changed the cipher algorithm. Notify this issue on GitHub: Could not find JS function 'cr'

$ time pytube -e mp4 -r 720p https://www.youtube.com/watch?v=CevxZvSJLk8
Traceback (most recent call last):
File "/usr/local/bin/pytube", line 90, in
main()
File "/usr/local/bin/pytube", line 30, in main
yt = YouTube(args.url)
File "/usr/local/lib/python2.7/dist-packages/pytube/api.py", line 66, in init
self.from_url(url)
File "/usr/local/lib/python2.7/dist-packages/pytube/api.py", line 189, in from_url
signature = self._get_cipher(stream_map["s"][idx], js_url)
File "/usr/local/lib/python2.7/dist-packages/pytube/api.py", line 379, in _get_cipher
"issue on GitHub: {0}".format(e))
pytube.exceptions.CipherError: Couldn't cipher the signature. Maybe YouTube has changed the cipher algorithm. Notify this issue on GitHub: Could not find JS function 'cr'
real    0m6.093s
user    0m1.040s
sys     0m0.150s

Possibly a duplicate of Issue#79 - Cipher Algorithm

yeah, this is a duplicate issue, looks like all similar projects are having this issue. Still digging for a solution.


Refresh token is not working as expected

Describe the bug?
We are using OktaWebAuthenticationUI for Okta login into our iOS Swift app. When user signedIn on the app, we store the unique id of the token to fetch token based on unique id for later use
Store token and id
try Credential.store(token)
UserSettingsHelper.setObject(object: token.id, forKey: Constants.k_OktaTokenId)

Fetch:
        if let tokenId = UserSettingsHelper.object(for: Constants.k_OktaTokenId) as? String {
            do {
                let credential = try Credential.with(id: tokenId)
                self.refreshIfNeeded(credential: credential)

                // this is used as an access_token for all our api calls
                let token = credential.token.accessToken
            } catch let error as NSError {
                print("Error: ", error.localizedDescription)
            }
        }
    }

func refreshIfNeeded(credential: Credential) {
        Task {
            do {
                try await credential.refreshIfNeeded()
            } catch {
               print("Error: \(error.localizedDescription) while calling refreshIfNeeded")
            }
        }
    }

Above code works well and good until it expires. token is not getting refresh after 6-7days(expired).
Question:

What is the best way to retrieve the token for later use?
How to refresh the token?
does okta generates new token with new id after refresh? if yes should we use new token id to fetch the token for later use.
Could you please share us sample project?

What is expected to happen?

We should be able to fetch token for later use
Refresh token should work with logout and login if expired

What is the actual behavior?
Refreshed token is not working even after calling refreshIfNeeded() func
Reproduction Steps?
Steps

Login into okta
Wait for 6 to 7days till it expires
Use the availble token to call an api.
Api should work

Additional Information?
No response
SDK Version(s)
pod 'OktaWebAuthenticationUI', '1.6.1'
Build Information
No response

Can someone please respond on the issue?

@mikenachbaur-okta ^^^^

Hello @apoorv-trikha-ev, my apologies for the late response.
The token should still remain in storage, and should be able to be loaded properly.  After 6-7 days it's almost certain that the access token will have expired, so a refresh does seem necessary.  It very well might be that the refresh token may have expired in the interim.  If this happens, the user won't have any choice but to reauthenticate, unless the expiration time of the refresh token is extended.
Additionally though, I wonder if you've seen the Credential.default API, which seems like it might be a much simpler way to track the current user's credential.  It is built with the idea of quickly fetching a credential when only one is used, without you having to manually track the ID in your own storage.
For example:
let credential = try Credential.store(try await WebAuthentication.shared?.signIn(from: view.window))
Credential.default = credential

You can refer to the Managing User Credentials documentation for more information on the options available to you.

@VasantHugar @apoorv-trikha-ev Have you managed to resolve this issue, or are you still experiencing problems with using the refresh token?
Alternatively, do you have any feedback on the SDK and its credential storage capabilities?  Your application may be needing to use the SDK in ways we hadn't anticipated, so I'd like to see if there's anything we can do to simplify your development.


Not working

Seems to not work on Linux (Ubuntu 14.04), there is no option to change text size in configuration panel.

Please reopen with more information. Such as a debug log and screenshots.


Overwriting translations does not work

Description
I want to include my own translation and overwrite a default translation, like checkout.addressHeader. But that does not work, because the default translation is loaded last.
Or in more words:
Shopware loads first all translations which have a PHP file laying nearby (not sure of the order here) and then it loads all Generic translations files (not sure of the order here as well). The important point is the loading order is not defined.
Possible Solution
Every translation gets a priority which is 0 by default and one can overwrite it in their own implementation of SnippetFileInterface. And then it is ordered before the snippets are loaded

Hello,
Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.
If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.


Remove Ubuntu 18.04 support

As a consequence:

Bump minimum supported Python version to 3.7.
Move Vagrant environment to Debian 10, which has Python 3.7.
Move CI frontend tests to Debian 10.
Move production build test to Debian 10.
Move production PostgreSQL upgrade test to Ubuntu 20.04.

Gitlint is temporarily removed because it’s missing in Debian 10. Fixed in #20384, included here.

Merged, thanks @andersk!


Use "void" for empty argument list in declarations

In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".
C++ treats void and empty list as "no arguments".

+1


Leonard951 patch 1

Fixed the code for aarch64

duplicated https://github.com/tensorflow/tensorflow/pull/16175 and  https://github.com/tensorflow/tensorflow/pull/22856

@leonard951 gentle ping to resolve conflicts

It says "Some checks were not successful. 11 failing, 3 pending, and 1 successful checks". What can be done to pass these checks?

I noticed that most of my proposed changes have already shown at the tip of the master branch except for the new one at https://github.com/tensorflow/tensorflow/pull/28911. So, I am closing this pull request. Please review #28911 and upstream it if it gets an approval after code review.


Master Branch Version Unpause Constant Error

Describe the problem
I usally building and using master branch version. But in this weekend, i used 040a5efc9dbc662d4a3857e3d8be52df968fec4a version and loaded my savegame. It had a Error. And created a new savegame, also had this Error. I turn off this version. no this Error.
Steps to reproduce

Building 040a5efc9dbc662d4a3857e3d8be52df968fec4a version
Open the game and load OR create a new savegame
=====IN GAME=====
Unpause this game
=====ERROR=====

Log files
output_log.txt
TMPE.log
Savegame?
Also Had New Savegame
Screenshots?

Ok, might be More Vehicles compatibility regression. Need to check. Thanks!

compiled build available in #1093 should work 😉


Remove ConfigListener and replaced its only use by a callback

Goal

Testing

Release Notes

WHAT:
WHY:
WHO:

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#810  👈
#809
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @priettt and the rest of your teammates on  Graphite


remove useless dependency

What do these changes do?

Related issue number

Fixes

Codecov Report

Merging #83 (4c976d4) into main (9e9d37e) will decrease coverage by 12.28%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main      #83       +/-   ##
===========================================
- Coverage   78.05%   65.76%   -12.29%
===========================================
  Files          50       49        -1
  Lines        4483     4306      -177
===========================================
- Hits         3499     2832      -667
- Misses        984     1474      +490

Impacted Files
Coverage Δ

python/graphscope/interactive/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

python/graphscope/interactive/query.py
0.00% <0.00%> (-94.65%)
:arrow_down:

python/graphscope/deploy/kubernetes/utils.py
12.50% <0.00%> (-61.46%)
:arrow_down:

python/graphscope/deploy/kubernetes/cluster.py
22.96% <0.00%> (-50.75%)
:arrow_down:

...n/graphscope/deploy/kubernetes/resource_builder.py
29.03% <0.00%> (-32.56%)
:arrow_down:

python/graphscope/analytical/app/triangles.py
80.00% <0.00%> (-20.00%)
:arrow_down:

python/graphscope/client/utils.py
79.16% <0.00%> (-16.92%)
:arrow_down:

python/graphscope/client/rpc.py
66.93% <0.00%> (-16.89%)
:arrow_down:

python/graphscope/client/session.py
63.44% <0.00%> (-9.62%)
:arrow_down:

python/graphscope/framework/vineyard_object.py
83.33% <0.00%> (-4.17%)
:arrow_down:

... and 13 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #83 (4c976d4) into main (9e9d37e) will decrease coverage by 12.28%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main      #83       +/-   ##
===========================================
- Coverage   78.05%   65.76%   -12.29%
===========================================
  Files          50       49        -1
  Lines        4483     4306      -177
===========================================
- Hits         3499     2832      -667
- Misses        984     1474      +490

Impacted Files
Coverage Δ

python/graphscope/interactive/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

python/graphscope/interactive/query.py
0.00% <0.00%> (-94.65%)
:arrow_down:

python/graphscope/deploy/kubernetes/utils.py
12.50% <0.00%> (-61.46%)
:arrow_down:

python/graphscope/deploy/kubernetes/cluster.py
22.96% <0.00%> (-50.75%)
:arrow_down:

...n/graphscope/deploy/kubernetes/resource_builder.py
29.03% <0.00%> (-32.56%)
:arrow_down:

python/graphscope/analytical/app/triangles.py
80.00% <0.00%> (-20.00%)
:arrow_down:

python/graphscope/client/utils.py
79.16% <0.00%> (-16.92%)
:arrow_down:

python/graphscope/client/rpc.py
66.93% <0.00%> (-16.89%)
:arrow_down:

python/graphscope/client/session.py
63.44% <0.00%> (-9.62%)
:arrow_down:

python/graphscope/framework/vineyard_object.py
83.33% <0.00%> (-4.17%)
:arrow_down:

... and 13 more

Continue to review full report at Codecov.

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


Updated bazelrc naming scheme

Description
This PR updates the naming convention of .bazelrc files to follow Bazel's best practices. Specifically, it renames .bazelrc.user to user.bazelrc and .bazelrc.lre to lre.bazelrc, and updates all references to these files throughout the project.
Fixes #1179
Type of change

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Renamed the .bazelrc files and updated all references in the codebase.
Ran bazel build //... to ensure all targets build successfully.
Ran bazel test //... to verify all tests pass with the new configuration.
Manually checked that the new file names are correctly recognized and loaded by Bazel.

Test Configuration:

OS: macOS Sonoma 14.1
Bazel version: 7.1.2

Checklist

[x] Updated documentation if needed
[ ] Tests added/amended
[x] bazel test //...  passes locally
[ ] PR is contained in a single commit, using git amend see some docs

This change is

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@Apoorva100 you need to sign the CLA which is listed below your description.

also, thanks for the contribution! 🥇

Closing this one as it's superceded by #1183.
Thanks for the contribution!


Increase length of the government response field

Government response summary now 200 characters
Government response details now 5000 characters

:+1:


Compatibility issue with Numismatic Overhaul

Minecraft Version
1.20.x
Mod Loader Version
0.15.6
Mod Version
villagerquests-1.1.1+1.20.1
Describe the Issue
When opening a store from the Numismatic Overhaul mod, a crash occurs from the server
latest.log
crash-2024-03-26_22.03.15-client.txt
Do you use any other mods except the required ones?
Numismatic Overhaul

Fixed with https://github.com/Globox1997/VillagerQuests/commit/3f436b89faf41fa49fcb0f82f8f5f97953fec9ff


ReplaceText incorrect text changing.

This code
foreach (var p in doc.Paragraphs)
{
    if (p.Text == null)
        continue;
    foreach (var pair in replacers)
        if (p.Text.Contains(pair.Key))
            p.ReplaceText(pair.Key, pair.Value);
}`

When I using two text surrounded by dollars make incorrect replacement.
Examples on screenshot:

As you see p.Text after one step changing requested part and also removing "$" around last word (what shouldn't happen).
Minimal example of project and docx file which I used as template you can find here: https://github.com/Kazbek/NpoiTextReplaceDemo
If you need any additional details tell me.

To work around this, I suggest you change the placeholder as below
$FINALQUALIFYINGWORK_QUESTION_1_ASKING_SHORT$: #FINALQUALIFYINGWORK_QUESTION_1_QUESTION#
$FINALQUALIFYINGWORK_QUESTION_2_ASKING_SHORT$: #FINALQUALIFYINGWORK_QUESTION_2_QUESTION#

I've tested on my box and it works perfectly.

I cant change placeholder syntax. I workaround by using another lib. But want to use npoi, will it be fixed at some point or not?

Do you still wanna use NPOI or you have switched to another library?

Still want.


add TS_FEED tile style to show message feed

standard :
only 1 feed available - not tile related, can be called from 1 ore more tiles
chevron-right  >  chosen as top-right indicator for tile type feed
new posts are pushed to front (shown as top post on feed)
holds up to 5 posts, if > 5 -> oldest post removed
elements :
id : optional, can be any number, needed if id-related deletion is wanted
head : optional head of post
body : optional body of post
at least one of body || head is required, otherwise ignored
proposed payloads :  ( I assume you have better ideas for the payloads )
add post to the top of the list
{
"messageFeed":
	{
	"addPost":{"id":<number>, "head":<text>, "body":<text>}
	}
}

remove post by id, id == 0 || missing -> remove all
{
"messageFeed":
	{
	"removePost":{"id":<number>}
	}
}

closes #25

I didn't expect that multi feeds would be required. Looking at crippled feeds on the TP32 doesn't seem to be desirable nowadays where evrybody carries a smartphone all day. So I tried to implement a fairly simple resource saving solution.
Do you have something special in mind?

I just know that once you add this feature, people will find ways to use it. Could be a 5 day weather forecast with a tile for each day, and clicking thru shows the detailed forecast. Could be a set of tiles for a group of computers, and clicking thru shows monitoring/status details for each. Could be calendar feeds for each member of the family.
I am sure others will think of better use-cases.

Good point. I've underestimated the creativty of users which we want to challenge. I would have solved your examples with sub screens but a feed may be a good solution as well, unfortunately with limited formatting features.
I'll check for a tile based implementation.

feeds are tile dependent now.
I can't decide for an icon ...


Added Emoji feature. First operational code :smile:

Adds Emoji icons support.

IIRC, Jekyll supports emoji natively now. Will make sure that's not the case before attempting to incorporate this PR.

Emoji are natively supported now. Sorry for the delay in reviewing this PR. Thanks for the contribution!
https://help.github.com/articles/emoji-on-github-pages/


Add support for mkcert (development certificates automation)

See https://github.com/FiloSottile/mkcert
When generating project, it could ask between using a cfssl server, mkcert or no SSL at all. If cfssl is choosen, it should also ask for the URL of the cfssl server and generate the cfssl configuration file accordingly.

It doesn't ask anything, and can be changed with DOCKER_DEVBOX_SSL environment variable in bash_enter.env


Potential missing package.json files: dist/index.cjs

Environment
<EMAIL_ADDRESS>React 18.2.0
unbuild 1.2.0
Reproduction
just run build
Describe the bug
When I run build， then give me this warnings
WARN  Build is done with some warnings:

Potential missing package.json files: dist/index.cjs
ERROR  Exiting with code (1). You can change this behavior by setting failOnWarn: false .

Additional context
No response
Logs
No response

How did you solve this?

I would like to know as well, since I am running into the same thing

Hey @BayBreezy  and @gaogaoinvincible !
The issue is solved by setting the rollup.emitCJS option as true
import { defineBuildConfig } from "unbuild";

export default defineBuildConfig({
    entries: ["./src/index"],
    outDir: "dist",
    declaration: true,
    rollup: {
        emitCJS: true
    }
});

Oh, thanks @henryhale
I just ended up ditching the package lol

I also encountered this issue and only found out after checking that there is a non-existent file path in package. json.😀😀

(reopeniung, since altohugh this is not a bug with unbuild, we might make error tracing better)


Reference the underlying Layer from AnnotationManager classes

I’m enjoying the ease of adding annotations to the map with the combination of the various AnnotationManager and Options classes, however I've run into a few problems that require the use of the Layer API. Seeing as the annotation plugin is a simpler, striped down version of this API, running into these types of issues is no surprise. I see a real benefit in the annotation plugin  coexisting with the classic Layer API in a project, but this is made more difficult without being able to reference an AnnotationManger’s underlying Layer.
Example Problems:

SymbolOptions:  .withIconSize() only accepts a static size as a float.
SymbolLayer: .setProperties() allows size to be defined as an Expression that scales the symbol based on the zoom level
(A different solution to this particular case is being tracked in #736)

Dynamically inserting and removing layers with AnnotationManger is tricky to handle. AnnotationMangers support a constructor with a belowLayerId parameter which is difficult to use with automatically generated layer ids.

Adding extra properties to or rearranging the underlying layers would be trivial, but when using multiple AnnotationMangers (as per PR  #941) it becomes cumbersome to keep track of which layers corresponds to which AnnotationManager.
Would it be possible to add a way to either:
a. Publicly reference the underlying Layer from an AnnotationManger
b. Set a custom Layer id from an AnnotationManger
c. Publicly reference the underlying layer’s automatically generated id from an AnnotationManger

Hey @keinix, thanks for reaching out.

a. Publicly reference the underlying Layer from an AnnotationManger

I don't think we can expose the Layer object or recommend setting custom properties on those underlying Layers because it's going to compete with the plugin's implementation and overwrite each other. We'll need to wait for https://github.com/mapbox/mapbox-plugins-android/issues/736 as a clean solution, otherwise, the raw API should be used, not the plugin wrapper.

b. Set a custom Layer id from an AnnotationManger
c. Publicly reference the underlying layer’s automatically generated id from an AnnotationManger

I think we can expose those to make relative positioning easier to manage.

c. Publicly reference the underlying layer’s automatically generated id from an AnnotationManger

That's exactly what I would need as well.
I can share my use case:
In my implementation I require the symbol layer ID at some point. In version 0.6.0 I could access it via SymbolManager.ID_GEOJSON_LAYER.
Since https://github.com/mapbox/mapbox-plugins-android/pull/941 this is not possible anymore.
I thought about accessing the SymbolManger's layer field via reflection but since I'm only using one symbol layer at a time I went with  style?.layers?.find { it.id.contains("symbol") }.
Both approaches can easily break with future implemenation changes without me noticing at compile time.
That being said I really enjoy the simplification this plugin provides. Keep up the good work!


Parsing primitive type undefined as true date

I'm getting the current date for undefined primitive type...
var date = undefined;
console.log(Moment(date).isValid()); // true

date = null;
console.log(Moment(date).isValid()); // false

date = "";
console.log(Moment(date).isValid()); // false

Which is the same as Moment().isValid() - pointless but ok...
A use case is DyanmoDb not able to accept null entries...
Checking the existence of  date is required to get a good result...
if ( object.date != undefined && Moment(object.date).isValid() ){
    // do something
}

In JavaScript, moment(undefined) is the same as moment(), which parses to right now: http://momentjs.com/docs/#/parsing/now/
There's not a ton we can do about this, at least in this version of moment.


Use C# Array Pool buffer when calling BebopWriter.Create() to Encode

Is your feature request related to a problem? Please describe.
I was benchmarking Bebop recently and noticed it allocated considerably more memory than the other binary serialization protocols I was comparing it to (Protobuf and MessagePack). The results of the benchmarks are at: https://github.com/ProgrammerAl/SerializationBenchmarks#benchmark-results
Looks like this is happening because new instances of BebopWriter are created with an empty byte array and then it's grown/re-allocated as values are written to it. I propose a new overload is added to BebopWriter.Create() that accepts an array so it doesn't start at empty. By default this array would come from ArrayPool<byte>.Shared.
Describe the solution you'd like
There are 2 alternatives I tried locally.
The first one, temporarily named EncodeImmutablyWithArrayPool(), gets the buffer from the pool using the final size needed to encode to aka ArrayPool<byte>.Shared.Rent(record.ByteCount). The benefit here is we know another array won't be allocated. In my benchmarks this was consistently 20-30 ns slower than the current code. My assumption is it was slower because of the call to GetByteCount(). The benefit is it allocates much less memory.
[global::System.Runtime.CompilerServices.MethodImpl(global::Bebop.Runtime.BebopConstants.HotPath)]
public static global::System.Collections.Immutable.ImmutableArray<byte> EncodeImmutablyWithArrayPool(global::Bebop.Codegen.Library record)
{
    var arrayPool = ArrayPool<byte>.Shared.Rent(record.ByteCount);
    try
    {
        var writer = global::Bebop.Runtime.BebopWriter.Create(arrayPool);
        __EncodeInto(record, ref writer);
        return writer.ToImmutableArray();
    }
    finally
    {
        ArrayPool<byte>.Shared.Return(arrayPool, clearArray: false);
    }
}

The second example, temporarily named EncodeImmutablyWithArrayPoolFixed(), gets an array from the pool using a constant value aka ArrayPool<byte>.Shared.Rent(1000). In my benchmarks this was consistently 20-30 ns faster to run than the current code. We can play around with what constant value to use, but if we rent a buffer too small, we'll be back to our problem of allocating another array. Either way, this will still allocate much less memory than the current code and will run faster.
[global::System.Runtime.CompilerServices.MethodImpl(global::Bebop.Runtime.BebopConstants.HotPath)]
public static global::System.Collections.Immutable.ImmutableArray<byte> EncodeImmutablyWithArrayPoolFixed(global::Bebop.Codegen.Library record)
{
    var arrayPool = ArrayPool<byte>.Shared.Rent(1000);
    try
    {
        var writer = global::Bebop.Runtime.BebopWriter.Create(arrayPool);
        __EncodeInto(record, ref writer);
        return writer.ToImmutableArray();
    }
    finally
    {
        ArrayPool<byte>.Shared.Return(arrayPool, clearArray: false);
    }
}

Additional context
Below are the benchmarks for the above mentioned methods:

Method
Runtime
Mean
Error
StdDev
Min
Max
Gen 0
Gen 1
Gen 2
Allocated

EncodeOriginal
.NET 4.7.2
468.3 ns
1.39 ns
1.30 ns
466.3 ns
469.9 ns
0.0811
-
-
514 B

EncodeWithArrayPool
.NET 4.7.2
518.0 ns
3.60 ns
3.19 ns
513.2 ns
524.3 ns
0.0172
-
-
112 B

EncodeWithArrayPoolFixed
.NET 4.7.2
427.3 ns
1.27 ns
1.19 ns
425.1 ns
428.9 ns
0.0176
-
-
112 B

EncodeOriginal
.NET Core 5.0
206.6 ns
0.50 ns
0.47 ns
205.8 ns
207.3 ns
0.0610
-
-
512 B

EncodeWithArrayPool
.NET Core 5.0
236.2 ns
0.51 ns
0.47 ns
235.2 ns
236.9 ns
0.0134
-
-
112 B

EncodeWithArrayPoolFixed
.NET Core 5.0
183.3 ns
0.42 ns
0.40 ns
182.4 ns
183.7 ns
0.0134
-
-
112 B

Here's the benchmark code:
    [MinColumn]
    [MaxColumn]
    [MemoryDiagnoser]
    [SimpleJob(RuntimeMoniker.Net472)]
    [SimpleJob(RuntimeMoniker.NetCoreApp50)]
    public class ObjectReadWrite
    {
        private readonly Library _library;

        public ObjectReadWrite()
        {
            var testGuid = Guid.Parse("81c6987b-48b7-495f-ad01-ec20cc5f5be1");
            var song = new Song
            {
                Title = "Donna Lee",
                Year = 1974,
                Performers = new Musician[]
                {
                    new Musician {Name = "Charlie Parker", Plays = Instrument.Sax},
                    new Musician {Name = "Miles Davis", Plays = Instrument.Trumpet}
                }
            };

            _library = new Library { Songs = new Dictionary<Guid, Song> { { testGuid, song } } };
        }

        [Benchmark]
        public ImmutableArray<byte> EncodeOriginal()
            => Library.EncodeImmutably(_library);

        [Benchmark]
        public ImmutableArray<byte> EncodeWithArrayPool()
            => Library.EncodeImmutablyWithArrayPool(_library);

        [Benchmark]
        public ImmutableArray<byte> EncodeWithArrayPoolFixed()
            => Library.EncodeImmutablyWithArrayPoolFixed(_library);
    }

If this is a feature you want added, I can volunteer to take it on.
Another alternative I did not try is to get a buffer from the Array pool of size MaxByteCount for that entity. Currently the property re-calculates the value each time it's called. But it's essentially a constant value. We could change it to a constant that gets output by the compiler and use that constant when pulling a buffer from the array pool. This would take more effort, and could be done at a later date.

I spent some time over the weekend thinking about this. I agree that the Bebop library shouldn't be the thing managing pooling for something as simple as encoding an object. My concern is that everyone who wants to use this new encode method would have to write the same wrapping code calling this new method. I think eventually this can be included in the SDK/Generated Code, but I don't have a good idea for what that looks like. I'll think about it some more and if I have any good ideas, I'll make a separate issue to talk about them.
In the mean time, for this issue, I'll go with what you said and create an encoding method that can receive a byte[] buffer.  Here's what I'm envisioning:

New method public EncodeResult EncodeInto(byte[] outBuffer)

EncodeResult is a new struct with 2 properties

int Length is the amout of bytes written AKA BebopWriter.Length
Result is an enum stating the reuslt of the encode process

0 - UnknownError - A default value for some error (probably won't be used in initial PR)
1 - Success - If everything was good when encoding to the buffer
2 - BufferTooSmall - Used if the given buffer was not big enough to hold the encoded bytes

Add new overload for BebopWriter.Create() that accepts a given byte[]

I went back and forth with the EncodeResult struct. Considered just throwing an exception if the input buffer was too small, but figure this would be better overall for performance.

Closing this issue because the PR has been created in issue #155


AM-67: removed set primary from email factor

Removed set primary option for email factor.

fixes gravitee-io/issues#8544


Add BlackMarblePy

Insert URLs to the project here: https://github.com/worldbank/blackmarblepy

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues labeled as Good First Issue of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.
All projects listed will be posted on our Mastodon channel
Nighttime Lights are widely used to measure poverty, population but also human activity in protected areas.

A Python package that provides a simple way to use nighttime lights data from NASA's Black Marble project that provides a product suite of daily, monthly and yearly global nighttime lights. https://github.com/worldbank/blackmarblepy

@ramarty @g4brielvs


gofmt check is not handling diffs quite correctly

currently if it gets multiple diffs for the same file it will only write the first

headsup @doujiang24 i noticed this when reviewing code - ill try and tackle asap


[Cosmos] mark populate_query_metrics flag to be deleted when used and remove docs

Draft PR to address one of the points in the list of things to take care of while async is in preview
Removed the docs around the usage of the populate_query_metrics flag in methods that don't need it, and added a user warning in case it is being passed in.

API change check for azure-cosmos
API changes have been detected in azure-cosmos. You can review API changes here


Improve BrainPop finish message, add replay button

Also

Test, refactor reset endpoint
Add useBrainPop for client feature mode

Coverage increased (+0.02%) to 56.215% when pulling fe7e1bc6cc4821a006e5a5be411bd766527c97e0 on brainpop-tweak into d631081945097aad46e39d295e66d8cc09cc372f on master.

Coverage increased (+0.02%) to 56.215% when pulling 953c75b7a372e096720c28dbe152ca3e1b56fd01 on brainpop-tweak into d631081945097aad46e39d295e66d8cc09cc372f on master.

Coverage increased (+0.009%) to 56.215% when pulling c447d91d44268cd340db3c00b5663d8a14878b75 on brainpop-tweak into dd618fff6c2090d86275f153a67b816cb76e20ef on master.

Coverage increased (+0.02%) to 56.221% when pulling c447d91d44268cd340db3c00b5663d8a14878b75 on brainpop-tweak into dd618fff6c2090d86275f153a67b816cb76e20ef on master.


error not handled, leads to index-out-of-range panic

See here:
https://github.com/cloudfoundry/bosh-init/blob/7ac660daf034bd293ed37e44c5a3a97e99624c06/installation/installer.go#L77-L78
When there's an error, the returned value is nil/empty, and accessing its 0th element panics.

Seems like (obviously) there should have been a check for error right after this:
renderedJobRefs, err := i.jobRenderer.RenderAndUploadFrom(manifest, jobs, stage)
if err != nil {
  //RECOVER if you can or return it
}

Fixed by https://github.com/cloudfoundry/bosh-init/commit/9e51b8934ff8390ad1ed6803189a93c44aebb930


TypeBox resolver does not work with valid TypeBox schema

Describe the bug
I'm getting this error:
Argument of type 'TObject<{ name: TString; score: TString; externalId: any; }>' is not assignable to parameter of type 'TObject<TProperties> | TypeCheck<TObject<TProperties>>'.ts(2345)
Argument of type 'TObject<{ name: TString; score: TString; externalId: any; }>' is not assignable to parameter of type 'TObject<TProperties> | TypeCheck<TObject<TProperties>>'.
  Type 'TObject<{ name: TString; score: TString; externalId: any; }>' is missing the following properties from type 'TypeCheck<TObject<TProperties>>': schema, references, checkFunc, code, and 3 more.ts(2345)

Here is the TypeBox schema:
export const UPDATE_APPLICATION_INPUT_SCHEMA = Type.Object({
  name: Type.String({ minLength: 1 }),
  score: Type.String(),
  externalId: Type.String().Nullable(),
})

  const form = useForm<UpdateApplicationInput>({
    resolver: typeboxResolver(UPDATE_APPLICATION_INPUT_SCHEMA),
    defaultValues: {
      name: application.name,
      externalId: application.externalId ?? null,
    },
  })

Why is this happening?
Expected behavior
No error occurs.
Additional context
TypeBox version: 0.32.35
@hookform/resolvers: 3.9.0

Also does not work with the new TypeCompiler.Compile. Could it be because of our TypeScript version? We're on 5.4.5.

@jorisre apologies for pinging you here. I see that you worked on this for 3.8.0. https://github.com/react-hook-form/resolvers/pull/699
Did you run into this during development? I'm thinking about switching my codebase over to TypeBox to overcome the Zod performance issues, but I'm running into this problem with @hookform/resolvers which is blocking the switch.

@divmgl can you first try to use it with @hookform/resolvers 3.7.0? and maybe with a newer typescript version too. Im using typescript 5.5.3 and it works just fine.

Hm, I wonder if this is a TypeBox problem.
Argument of type 'TObject<{ name: TString; groupId: TString; }>' is not assignable to parameter of type 'TObject<TProperties>'.
  Property '[Kind]' is missing in type 'TObject<{ name: TString; groupId: TString; }>' but required in type 'TObject<TProperties>'.ts(2345)
typebox.d.ts(240, 5): '[Kind]' is declared here.

This is happening in 3.7.0. Really strange.

I did not face any similar problems. Can you reproduce the error in a fresh source code?

I cleaned the repo and removed incremental build info files and things are working as expected now. Cheers.


Adding JssProvider breaks app

Hi, I just integrated react-jss and I'm trying to use a custom plugin list. With the following code everything works fine:
ReactDOM.render(React.createElement(App, {user: _20songs.user}),
                document.getElementById('container'));

As soon as I add JssProvider:
ReactDOM.render(React.createElement(JssProvider, null, React.createElement(App, {user: _20songs.user})),
                document.getElementById('container'));

I get the following error:
injectSheet.js:48 Uncaught TypeError: Cannot add property index, object is not extensible
    at injectSheet (injectSheet.js:48)
    at mountIndeterminateComponent (react-dom.development.js:10400)
    at beginWork (react-dom.development.js:10601)
    at performUnitOfWork (react-dom.development.js:12573)
    at workLoop (react-dom.development.js:12682)
    at HTMLUnknownElement.callCallback (react-dom.development.js:1299)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:1338)
    at invokeGuardedCallback (react-dom.development.js:1195)
    at performWork (react-dom.development.js:12800)
    at scheduleUpdateImpl (react-dom.development.js:13185)

Never mind; I was importing it wrong.


PHOENIX-7026 : Validate LAST_DDL_TIMESTAMP for write requests

On the write path, if phoenix.ddl.timestamp.validation.enabled is set:

Pick a random live region server and call the validateLastDDLTimestamp RPC for all the tables/views in the mutationsMap

Include all indexes on the table/view in case their state had changed
Include all ancestors of views

If StaleMetadataCacheException is encountered, force update client side cache for all the tables/views.

Replace the PTable object in all the TableRefs with the latest PTable for every table/view.

MutationState#validateAndGetServerTimestamp should take care of this.

@palashc  There are 15 test failures, all in 2 classes:
org.apache.phoenix.end2end.index.MutableIndexFailureIT and org.apache.phoenix.end2end.index.MutableIndexFailureWithNamespaceIT
Looks like these are related to your changes.
Also there are 15 new checkstyle warnings. Can you please fix that too? Thank you !

@shahrs87 Those tests pass locally. Maybe some issue with the test environment caused them to fail. We have not turned on the feature flag for other tests yet so ideally they should not fail here. Most of the checkstyle warnings for non-test code introduced in this PR are for line length being more than the limit only by a couple of characters.

Most of the checkstyle warnings for non-test code introduced in this PR are for line length being more than the limit only by a couple of characters.

Lets fix them.

Those tests pass locally. Maybe some issue with the test environment caused them to fail.

Let me trigger the build again. Lets monitor this build: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1726/7/
@palashc

@palashc  There are 10 checkstyle warnings. Are they all irrelevant?

In the latest build, looks like most of the checkstyle warnings are due to this patch. @palashc Can you please fix them and I will merge then

@shahrs87 I have fixed the checkstyle warnings coming from code. I am not sure how to fix the remaining two.