TypeError: fn.apply is not a function

I know ipfs-api is replaced with ipfs-http-client, its just one of my project is using that and it was working so didnt change it much.
However, now i am getting this weird error when tryiing to put data in the database object.
I am using IPFS v 0.18.4
code.
const IPFS = require('ipfs-api');
const nconf = require('nconf');
const events = require('events');
const orbitDB = require('orbit-db');
const Identities = require('orbit-db-identity-provider');

async function test() {
    const ipfsOptions = {
        EXPERIMENTAL: {
            pubsub: true
        },
        relay: {
            enabled: true, hop: {
                enabled: true, active: true
            }
        },
        host: 'localhost',
        port: '5001'
    };

    const ipfs = new IPFS(ipfsOptions);
    const IdOptions = { id: 'local-id'};
    const identity = await Identities.createIdentity(IdOptions);
    const orbitdb = new orbitDB(ipfs, identity);
    let handler = await orbitdb.open("/orbitdb/zdpuAzZ6KuqgyTe8LP2rE2bC45cAkst9hM6HfyWmRYZF5Bnyd/maze.mutable.db");
    handler.events.on('ready',async () => {
        console.log("ready");
        let data = await handler.put({_id: 123, name: 'Shahid'});
        let fetchdata = handler.get(123);
        console.log(fetchdata);
    });
    handler.load();
}

test();

And the error is the following
ready
[ { _id: 123, name: 'Shahid' } ]
/Users/unixroot/Projects/Office/maze-framework/node_modules/once/once.js:25
    return f.value = fn.apply(this, arguments)
                        ^

TypeError: fn.apply is not a function
    at f (/Users/unixroot/Projects/Office/maze-framework/node_modules/once/once.js:25:25)
    at ClientRequest.<anonymous> (/Users/unixroot/Projects/Office/maze-framework/node_modules/ipfs-api/src/utils/send-request.js:71:14)
    at Object.onceWrapper (events.js:422:26)
    at ClientRequest.emit (events.js:315:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:639:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:117:17)
    at Socket.socketOnData (_http_client.js:507:22)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:302:12)

Surprisingly its happeing after adding the data. Any help pleasEe?

Surprisingly its happeing after adding the data. Any help pleasEe?

Unfortunately I'm not sure how to handle this and it seems to be a problem, like you mention, with the 'ipfs-api' package so try opening an issue over there? Or try upgrading to ipfs-http-client which is tested with go-ipfs for orbitdb.

Closing due to inactivity.


feat: add test metadata binding

Explanation
Add test metadata binding.
Related issue
Fixes #1471

/cherry-pick release-0.2


Search for string within the pin array

Hi, I am trying to perform a string search within the pin info array but it doesn't work for me. I am using the below function to perform a recursive array search. It works if I create my own array but doesn't work with pin info array.
function in_array_r($needle, $haystack, $strict = false) {
    foreach ($haystack as $item) {
        // cast $item to string if numeric when doing weak comparison
        if( ! $strict && is_string( $needle ) && ( is_float( $item ) || is_int( $item ) ) ) {
            $item = (string)$item;
        }
        // ----------------------------------------------------------
`        // Substring search` `        if( is_string( $needle ) && is_string( $item ) && strpos( $item, $needle ) !== false ) {` `            return true;` `        }`
        // ----------------

        if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
            return true;
        }
    }
``
    return false;
}

Hi @ltiwana , I don't know how does your function relate to the library. Try to debug it yourself. Pin info is a simple array and doesn't change from any other PHP array.

I am looking for this functionally in my PHP script so that when I am searching for 100 pin for cybersecurity, I want to make sure the pin contains the word in it before I repin it to my board. Maybe there is another way to achieve this?

Any pointer will be awesome. I am very new to PHP.


HAWQ-62. Incorrect calculation of locus describing of hash table intr…

…oduce core dump in OLAP query

Below two changes look good. +1

In range relations, converting all hash relations instead of only the first hash relation to random distributed relation
Correct the calculation of locus description of hash table when there is no resource allocated for it

+1. The modifications look good to me.


Basis for slash commands and /issue command

Still a WIP but figured this was the easiest way to get the base line in for slash commands as well as fast tracking a /issue command.

Looks good so far, couple questions for you. :+1:


[BUG] Poll conflicts with 2 mods, not catching /p commands

Module Version: v0.1.2
Describe the bug
While the following 2 mods are active, Forien's easy polls is not able to catch /p commands
• Meme - Moerills Expandable Markdown Editor (https://github.com/Moerill/fvtt-markdown-editor)
Specifically while the chat markdown support is active
and
• The Furnace (https://github.com/kakaroto/fvtt-module-furnace)
are active.
To Reproduce
Steps to reproduce the behavior:

Enter a game with mods "The Furnace" and "Meme - Moerills Expandable Markdown Editor" are on with the latter setting of chat markdown support being active
Try to create a poll:

/p This is a poll
Yes
No

Text comes out as:
/p This is a pollYesNo

Expected behavior
Polls to catch /p command and create a poll
Browser:
Chrome
Foundry Version:
0.7.9
Game System:
D&D 5e

There is also a /poll command.
And since v1.0.1 there is also a Dialog UI to make Polls


Apothecary Pouch/Component Pouch issues

Herb alert only displays the first stack + the NBT contents. It should display the combined total amount.
Apothecary pouch and component pouch inventories are empty when used from a Bauble slot with the new keybind.
The "You don't have enough of  in your component pouch!" message triggers even when you do, and it then proceeds to consume it.

I believe these are all resolved.


Live branch not syning back to Master branch

The directions said for typo type items to target the live branch.  The link fixes were pointed at live and merged, but appear not to have made it back to the master branch.  Is the sync broken or did I miss a step?
/cc @michael-hawker @Kyaa-dost

@DCtheGeek we don't have an automated process here for anything. It's manual.
Is there an easy thing we could use to help with this?
Thanks!

I believe you can request scheduled publishing (master to live), but not sure about the other way around.  I'd probably merge live to master once to catch it up and resolve any conflicts, and then not allow PRs other than actual publishes to target live anymore.  That's not a practice I see often.

@DCtheGeek currently, we really only update our docs with each release (which can be many months). So we figured it'd be good to get any minor updates/typos fixed in live as we use the main branch to stage any documents we have for new features in the upcoming release.

Thanks, @DCtheGeek for showing interest in this area. As Michael mentioned above that the current circumstances is due to the limitation of automation but certainly will be working on improving things as we progress.

Let me know when live is sync'ed back to master so I can run LinkRepair this month. :)

Closing this as moving forward all the new features will be submitted to the updated dev branch for example 'dev/7.1.0'.  All other updates and typo corrections will be submitted to the master branch which will be synced with live branch periodically. We will merge updates from the current dev branch to 'master' to keep master in-sync with the live branch.


NIO generation support

It's very important that we have richer testing for the atomicity of certain storage operations, like creating an object only if doesn't exist. We should also implement NIO OpenOption and CopyOption implementations for generations, which map to the functionality provided by StorageRpc.Option. FakeStorageRpc should have generational awareness for supporting this.
@jean-philippe-martin

Actually this issue was fixed with commit #2232, so closing it was the right thing to do.


Bookmarked items only appear if they are on your local ballot

We would like to have support for users to bookmark races that do not appear on their local ballot: this can be a way for users to express their views to friends who might live in the appropriate district, be better connected with organizations that share their views, and generally increase the WebApp's functionality.
Currently, the only bookmarked items that show up are ones that appear on the local ballot for the address you have put in.
Example:

after opening WebApp in browser, navigate to /settings/location and set a location (I used "oakland, ca")
once local ballot appears, bookmark a measure or candidate (I bookmarked "Kamala Harris")
click the drop down that currently says "All Ballot Items" and select "What I Have Bookmarked"
(you can also simply navigate to url /bookmarks) and note that the item DOES appear
return to /settings/location and enter a new location (I used "ny, ny")
once ballot loads, return to "What I Have Bookmarked"
note that the item you bookmarked before (in my case, Harris) DOES NOT appear

We won't be working on this for now.


Please provide estimated cost for operation

How much does it cost to run this engine? I need a ballpark estimation

Hi,
Thanks for the question.
One component of the cost for using Terraform Open-Source products is Service Catalog pricing.

https://aws.amazon.com/servicecatalog/pricing/

Another component depends on the volume. You can estimate the cost from the engine's resources based on your forecasted volume using the AWS pricing calculator or other cost-estimation tools.

Thank you for the prompt response. I talked with Danilo about it. I'm looking more into the hidden operational cost, I saw that you are running EC2, you have NATs and so on, how much these components costs?
Let's say deploying a template takes 10 min, and I'm doing that 5 times a week? Putting aside the service catalog cost, how much am I expected to pay for running this engine?

You ate right, I meant fixed costs. Thank you. I think it's worth adding costs details to the README as well


Jetson TK1 Lepton 2.5

I was following http://me.knnect.com/blog/how-to-connect-flir-lepton-module-to-nvidia-jetson-tk1/ to work on getting my Lepton working with my Jetson. Whenever I run the pylepton_capture, the program seems to get get caught somewhere. Whenever I stop the program with a keyboard interupt I get the following traceback
File "pylepton_capture", line 37, in
image = capture(flip_v = options.flip_v, device = options.device)
File "pylepton_capture", line 10, in capture
a, _ = l.capture()
File "pylepton/Lepton.py", line 158, in capture
time.sleep(0.185)
Any help would be appreciated.

This usually means the sensor is wired incorrectly or the sensor is broken. I recommend wiring it up to a oscilloscope or digital-analyzer to make sure the Lepton is still communicating over the SPI bus.

Can this issue be closed?

I have the same issue and just tried checking the sensor's output with An Analog Discovery 2. When plugged into the Lepton's MOSI pin, I do get data streaming so it doesn't seem to be broken. Are there other possible explanations?

Closed.


no_superfluous_phpdoc_tags rule is not removing tags of classes in the same namespace

Pint Version: 1.5.0
PHP Version: 8.2.2

Description:
It seems that the new no_superfluous_phpdoc_tags rule is not removing fully qualified tags of classes that are in the same namespace.
Steps To Reproduce:
app/Models/User.php

<?php

namespace App\Models;

class User extends Model
{
    //
}

app/Models/Group.php

<?php

namespace App\Models;

class Group extends Model
{
    /**
     * @param \App\Models\User $user
     */
    public function addUser(User $user) {
        //
    }
}

In this case I expect that @param \App\Models\User will be removed, but it isn't.

Hi there, we only implement the rule of PHP CS Fixer. Please open an issue with them if you think there's an issue. Thanks


[Discussion] Deployment of ASP.NET 2.0.8 and .NET Core 2.1.0-rc1 to Azure App Service

Discussion issue for the Deployment of ASP.NET 2.0.8 and .NET Core 2.1.0-rc1 to Azure App Service
https://github.com/Azure/app-service-announcements/issues/107

Any news about RC1 rollout ?

The deployment is now complete.

Where can I find information about deployment to Azure Germany?

Does this include both x86 and x64 runtimes?

it currently only has x86, but we are working on x64

Also, I've removed all extensions from the site slot. Is this now the approach, or do some still need to be installed?

Right, you don't need extensions for RC1. There is no exact ETA for 64 bit. In the meantime, you can just do a self-contained deployment.

@davidebbo, that doesn't seem to work either, and at this point I don't know what is wrong / misconfigured.
My csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
    <GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
    <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Local|AnyCPU'" />

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='QA|AnyCPU'" />

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <DocumentationFile>bin\Debug\netcoreapp2.1\TestDelivery.API.xml</DocumentationFile>
    <NoWarn>1701;1702;1705;1591</NoWarn>
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
    <DocumentationFile>bin\Release\netcoreapp2.1\TestDelivery.API.xml</DocumentationFile>
    <NoWarn>1701;1702;1705;1591</NoWarn>
    <PlatformTarget>AnyCPU</PlatformTarget>
  </PropertyGroup>

  <ItemGroup>
    <Folder Include="wwwroot\" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.6.0" />
    <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.3.0-beta2" />
    <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
    <PackageReference Include="Microsoft.AspNetCore.AzureAppServicesIntegration" Version="2.1.0-rc1-final" />
    <PackageReference Include="Swashbuckle.AspNetCore" Version="2.4.0" />
  </ItemGroup>
  <ItemGroup>
    <WCFMetadata Include="Connected Services" />
  </ItemGroup>
  <Target Name="PreBuild" BeforeTargets="PreBuildEvent">
    <Exec Command="..\..\GitVersion.Portable\GitVersion.exe /updateassemblyinfo .gitversion.cs /ensureassemblyinfo" />
  </Target>
</Project>

My app settings for this slot:

The output of dotnet --info:
D:\home>dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.300-rc1-008673
 Commit:    f5e3ddbe73

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x86
 Base Path:   D:\Program Files (x86)\dotnet\sdk\2.1.300-rc1-008673\

Host (useful for support):
  Version: 2.1.0-rc1
  Commit:  eb9bc92051

.NET Core SDKs installed:
  1.1.7 [D:\Program Files (x86)\dotnet\sdk]
  1.1.8 [D:\Program Files (x86)\dotnet\sdk]
  2.1.4 [D:\Program Files (x86)\dotnet\sdk]
  2.1.101 [D:\Program Files (x86)\dotnet\sdk]
  2.1.300-rc1-008673 [D:\Program Files (x86)\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.0-rc1-final [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0-rc1-final [D:\Program Files (x86)\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.9 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.0.10 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.7 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.5 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.6 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0-rc1 [D:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

D:\home>

The web.config at wwwroot (there are two, as root is set up to serve static files:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Redirect-to-http" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
          <match url="*" negate="false" />
          <conditions logicalGrouping="MatchAny">
            <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
        </rule>
        <rule name="wwwroot-static" enabled="true">
          <match url="^(?!/api/api-docs)([\S]+[.](html|htm|svg|js|css|png|gif|jpg|jpeg|json))" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_URI}" pattern="swagger.json" negate="true" />
          </conditions>
          <action type="Rewrite" url="/{R:1}" />
        </rule>
        <rule name="Test-Delivery-Html5-Routes" enabled="true" stopProcessing="true">
          <match url="(?!api/).*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="api" negate="true" />
          </conditions>
          <action type="Rewrite" url="/index.html" />
        </rule>
        <rule name="empty-root-index" enabled="true" stopProcessing="true">
          <match url="^$" />
          <action type="Rewrite" url="/index.html" />
        </rule>
      </rules>
    </rewrite>
    <handlers>
      <!--
      These may need to be revisited if we begin serving assets from Kestrel, but for now, all we return is JSON.
          IIS is already handling the Swagger static files, as well as app.js

      <add name="StaticFileModuleHtml" path="*.htm*" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleSvg" path="*.svg" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleJs" path="*.js" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleCss" path="*.css" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleJpeg" path="*.jpeg" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleJpg" path="*.jpg" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleGif" path="*.gif" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      -->
      <add name="SwaggerFileModulePng" path="api/api-docs/images/logo_small.png" verb ="*" modules="AspNetCoreModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModulePng" path="*.png" verb ="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleHtml" path="index.html" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleJS" path="app.js" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleSilentHtml" path="silent-renew.html" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
      <add name="StaticFileModuleSilentJS" path="silent-renew.js" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
    </handlers>
    <urlCompression doStaticCompression="true" doDynamicCompression="true" />
    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
      <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
      <dynamicTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </dynamicTypes>
      <staticTypes>
        <add mimeType="text/*" enabled="true" />
        <add mimeType="message/*" enabled="true" />
        <add mimeType="application/javascript" enabled="true" />
        <add mimeType="application/x-javascript" enabled="true" />
        <add mimeType="*/*" enabled="false" />
      </staticTypes>
    </httpCompression>
  </system.webServer>
</configuration>

global.json:
{
  "sdk": {
    "version": "2.1.300-rc1-008673"
  }
}

the web.config where the dotnet project is being hosted (under wwwroot/api):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\TestDelivery.API.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
  </system.webServer>
</configuration>
<!--ProjectGuid: 68AE44A6-B349-457D-811D-8DF5FF6787BD-->

And at this point, The error I'm seeing fairly consistently is The specified CGI application encountered an error and the server terminated the process.. However, my app actually runs every now and then. If you hit https://qa-test-delivery-scratch.oasys.one/api/info/version, sometimes this will produce the correct json response.
In between pushing the release I've also tried the advice to delete the wwwroot folder via kudu, but that has no affect.

@chrisgbaker Simplest way to convey your issue is to share a minimal repo. Also, first try whether everything works for you with a vanilla new app. If that doesn't, then the specifics of your ap become irrelevant.

Kind of difficult when the issue isn't the repo; everything runs fine locally regardless of any of this. The issue is deploying to azure. Any advice in being able to more clearly convey issues when the App Service is part of the problem?

@chrisgbaker Please see the link I pointed to above. The whole idea is to share a repo such that if we deploy it to Azure, we observe the same thing that you observe. This makes it far easier than trying to make sense of snippets, and it makes sure that we are trying exactly the same thing.

https://github.com/chrisgbaker/azure_app_service_failure
@davidebbo Here is another project that is almost bare-bones that will not start in the App Service but will run locally.

Also, in that project I am targeting preview2 still, but changing to rc1 and modifying two lines of code to use Groups.AddToGroupAsync still refuse to start.

Thanks, we'll try to set up a repro. Are you trying to use the RC1 x86 that's on the box, or are you doing self-contained deployment (or have you tried both)?

@davidebbo any update on this? having the same issues (self contained or otherwise)

@npasqua I was waiting to hear back on the specific scenario. What do you mean by self contained or otherwise? Can you precisely describe what you are doing?
/cc @watashiSHUN

I've tried using the following when publishing directly to a new app service (created a new app service / resource group last thursday/friday) from Visual Studio
Target Framework: netcoreapp2.1
Deployment Mode: Framework-Dependent
Target Runtime: win-x86
and
Target Framework: netcoreapp2.1
Deployment Mode: Self-Contained
Target Runtime: win-x86

Can you deploy using 'Framework-Dependent' to a dummy test app and share its name for investigation?
See also this page for general investigation tips for Core on App Service.

https://test-2-1.azurewebsites.net/
https://test-2-1.azurewebsites.net/api-docs/ is a simple swagger page with the single endpoint that returns some git information
(I can confirm this same behavior working as expected with this code running in VS locally)
It was published with
Target Framework: netcoreapp2.1
Deployment Mode: Framework-Dependent
Target Runtime: win-x86

https://test-2-1.azurewebsites.net/api-docs/ seems to work fine for me. Can you clarify what problem you are having? You only describe what you did to deploy, but I don't see anything in any of your comments that actually describes a problem. Please be as precise as you can be to help us understand your issue.

If you try to actually test the single endpoint on that swagger page, it should return a 404. You can also try calling it directly here https://test-2-1.azurewebsites.net/info/version

I see. And when that happens, is that reaching your code at all (e.g. check via tracing)? What debugging steps have you taken to try to further isolate? Make sure to enable all logging per this article above. Also, is there any evidence of a crash? i.e. if you look via Kudu process explorer, do you see the dotnet.exe process changing, or is it always the same one up and running?


Fill _owners administrative field

The following administrative fields are part of our schema:
    _access = Nested(AccessSchemaV1, required=True)
    _owners = fields.List(fields.Integer, validate=validate.Length(min=1),
                          required=True)
    _created_by = fields.Integer(required=True)
    _default_preview = SanitizedUnicode()
    _files = fields.List(Nested(FilesSchemaV1, dump_only=True))
    _internal_notes = fields.List(Nested(InternalNoteSchemaV1))
    _embargo_date = DateString(data_key="embargo_date",
                               attribute="embargo_date")
    _communities = GenMethod('dump_communities')
    _contact = SanitizedUnicode(data_key="contact", attribute="contact")

We should discuss how to fill _owners:

owners are not necessarily the creator
from the REST API (external) point of view, the user id is probably not something the client knows. Mapping from emails or user names is probably the way to go.

Owners is probably filled on the backend by the id of the user making the deposit.
At Northwestern University, we have the use-case of proxy deposits where the depositor is not necessarily the owner. I was seeing the potential solutions as:

exposing the owners field in the API, but having the front-end provide the converted id(s) matching the human readable owner(s) the depositor could select.
allowing emails to be passed for owner and doing that conversion on the backend.


option to output array instead of dictionary

Hello there,
I can't see any option to output an array for each row instead of the dictionary.
So for instance if I have a CSV like this:
a,b,c
1,2,3
4,5,6

I would like to produce:
[
[1,2,3],
[4,5,6]
]

I can of course post process the output:
[{'a':1,...},{},{} ]
but it feels sub-optimal.
I need a list of arrays because of some stock charting libraries only accept that format.
Cheers.

try this:
const csv = require('csvtojson');
console.log('[');
csv()
.fromFile(csvFile)
.on('csv',(csvRow)=>{
console.log(csvRow);
})
.on('end',()=>{
console.log(']');
})

I think it will be a good feature for cli tool too. what would you think?
~Keyang

That works very well indeed.
Are you suggesting I concatenate then the output as a workaround?
Yes it will be awesome to have it as a feature.


Make a simple user-accessible executable to find hits in a few files

For a non-API/programmer mode it's useful to have just an executable that can run and find hits. Seticore and turboseti both have an executable and any cli should adopt their good patterns that people will already be used to (but don't just copy since there's probably some legacy cruft)
The idea would be to move justrun in to something better named with a good cli so changing things doesn't require a rebuild and you don't need to open up a python env or write custom c++ to tinker with some hit finding parameters

This was (preliminarily) done in #50


Edit metadata/tags for new version upload

Description
Adds the metadata/tag modal to the version upload workflow. Metadata and tags are automatically copied from the most recent version as defaults.

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

[ ] I have read the CONTRIBUTING doc
[ ] I have checked that unit tests pass locally with my changes
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added necessary documentation (if appropriate)

Further comments

Resolves #94


The name .. was already registered by another type. ...

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
Using Mongo Data Provider and am getting an exception when Query type includes two top-level object types (different types), when each has an object type by the same name but but of different type.
Steps to reproduce
Create two similar types as follows;  note that they both contain a property named BCs but of different types...
namespace Service1Test1SM
{
    [DataContract]
    [ProtoContract]
    [Serializable]
    [BsonIgnoreExtraElements]
    [Node(
    IdField = nameof(Id),
    NodeResolverType = typeof(Test1NodeResolver),
    NodeResolver = nameof(Test1NodeResolver.ResolveAsync))]
    public class Test1
    {

        [ProtoMember(1)]
        [Field(Settable = false)]
        [DataMember]
        public string Comments { get; set; }

        [ProtoMember(2)]
        [Field(Settable = false)]
        [DataMember]
        public string SomeProp { get; set; }

        [ProtoMember(3)]
        [Field(Settable = false)]
        [DataMember]
        public ObservableCollection<Service1Test1SM.BC> BCs { get; set; }

        [ProtoMember(4)]
        [Field(Settable = false)]
        [DataMember]
        public Service1Test1SM.NumberTypes NumberTypes { get; set; }

        [ProtoMember(5)]
        [Field(Settable = false)]
        [DataMember]
        [BsonId(IdGenerator = typeof(GuidGenerator)), BsonRepresentation(BsonType.String)]
        public System.Guid Id { get; set; }
    }
}

namespace Service1Test2SM
{
    [DataContract]
    [ProtoContract]
    [Serializable]
    [BsonIgnoreExtraElements]
    [Node(
    IdField = nameof(Id),
    NodeResolverType = typeof(Test2NodeResolver),
    NodeResolver = nameof(Test2NodeResolver.ResolveAsync))]
    public class Test2
    {

        [ProtoMember(1)]
        [Field(Settable = false)]
        [DataMember]
        public string Property1 { get; set; }

        [ProtoMember(2)]
        [Field(Settable = false)]
        [DataMember]
        public ObservableCollection<Service1Test2SM.BC> BCs { get; set; }

        [ProtoMember(3)]
        [Field(Settable = false)]
        [DataMember]
        [BsonId(IdGenerator = typeof(GuidGenerator)), BsonRepresentation(BsonType.String)]
        public System.Guid Id { get; set; }
    }
}

Create Query Type as follows;
namespace GarthWare.TestModel1.Service1.API.AggregateRoots.Test1Aggregate.GraphQL
{

    public class Query
    {

        private readonly IService1CommandDispatcher _commandDispatcher;
        private readonly IMapper _mapper;
        private readonly IExecutionContextAccessor _executionContextAccessor;
        private readonly ILogger _logger;

        public Query(IService1CommandDispatcher commandDispatcher, IMapper mapper, IExecutionContextAccessor executionContextAccessor, ILogger logger)
        {
            _commandDispatcher = commandDispatcher;
            _mapper = mapper;
            _executionContextAccessor = executionContextAccessor;
            _logger = logger;
        }

        //[UsePaging]
        [UseProjection]
        [UseSorting(typeof(Service1Test1SM.Test1))]
        [UseFiltering(typeof(Service1Test1SM.Test1))]
        public IExecutable<Service1Test1SM.Test1> GetTest1s([Service] IMongoCollection<Service1Test1SM.Test1> collection)
        {
            return collection.AsExecutable();
        }

        [UseFirstOrDefault]
        public IExecutable<Service1Test1SM.Test1> GetTest1ById(
            [Service] IMongoCollection<Service1Test1SM.Test1> collection,
            Guid id)
        {
            return collection.Find(x => x.Id == id).AsExecutable();
        }

        //[UsePaging]
        [UseProjection]
        [UseSorting(typeof(Service1Test2SM.Test2))]
        [UseFiltering(typeof(Service1Test2SM.Test2))]
        public IExecutable<Service1Test2SM.Test2> GetTest2s([Service] IMongoCollection<Service1Test2SM.Test2> collection)
        {
            return collection.AsExecutable();
        }

        [UseFirstOrDefault]
        public IExecutable<Service1Test2SM.Test2> GetTest2ById(
            [Service] IMongoCollection<Service1Test2SM.Test2> collection,
            Guid id)
        {
            return collection.Find(x => x.Id == id).AsExecutable();
        }

    }
}

Relevant log output
[garthware-testmodel1-service1-api_d8f6316c-1]: Unhandled exception. HotChocolate.SchemaException: For more details look at the `Errors` property.
[garthware-testmodel1-service1-api_d8f6316c-1]:
[garthware-testmodel1-service1-api_d8f6316c-1]: 1. The name `ListFilterInputTypeOfBCFilterInput` was already registered by another type. (HotChocolate.Data.Filters.ListFilterInputType<HotChocolate.Data.Filters.FilterInputType<Service1Test2SM.BC>>)

Additional Context?
This is the domain model schema, I've highlighted the offending types, however they are not of the same type.

It would be quite common to have top level aggregates that have properties of the same name with different types.
Product
Hot Chocolate
Version
12.3.0

This is the intended behaviour.
To solve your problem:
The object type gets the name from the runtime type and there the type names must be unique. Thats why you run into a collision.
I guess as you intend to generate most of you code, you can either [GraphQLTypeName("TheTypeName")] onto your class or you can just override the INamingConvention. In the INamingConvention you can controll how you classes are named. You could for example include parts of the namepspace.
Though,

This is the intended behaviour.
To solve your problem:
The object type gets the name from the runtime type and there the type names must be unique. Thats why you run into a collision.
I guess as you intend to generate most of you code, you can either [GraphQLTypeName("TheTypeName")] onto your class or you can just override the INamingConvention. In the INamingConvention you can controll how you classes are named. You could for example include parts of the namepspace.
Regarding duplicated type name
You should also investigate why you have duplicated type names. A clean graphql schema should have good names for types and fields. If you have an issue with collidning type names and intend to use the same type name, then you probably have a flaw in the schema design. i can recommend the book of Marc andre www.productionreadygraphql.com as a reference for good schema design :)

@PascalSenn, thank you for your prompt reply.  I suppose I need to start testing with real domain models and not at 2am in the morning having worked 18 hours prior.   I am cool with everything that you said.  We would likely never have two different types with the same name in the same domain service and in a good way, it was good that HC bailed on this scenario.
So far the code changes we will be required to make to our Roslyn code generator are quite minimal.  We currently code-generate to REST and gRPC integrations and the Query and Mutation type requirements are nearly identical, except we call an mutation input a request, and we will need to generate the exception attributes to on our mutations, but beyond all of that this will plug in nicely.
We are also able to fully automate the creation of the stitching files on relating types as we capture all of that detail within the domain model.
We are currently working on a UI Designer for Blazor which will code generate the Blazor apps, and we will use GraphQL to support that tool.   One of the things that really pleased me was the Reactive type support you have on the client side, as we code generate Reactive.UI ViewModels which those reactive types will integrate well with.   We will likely include Subscriptions as an option to include within our generated ViewModels as a first-class integration.
As for your recommendation of  book of Marc Andre's book, it seems like it won't be published until March sometime, but I am enjoying his blog postings and I thank you for that valuable reference.
We will soon be creating many core and sub domains through our tooling and I look forward to seeing how this all bolts together with HC and Strawberry Shake on Blazor.  I will reach out to you once we have real models to show you what we have created.
Once again thank-you so much for your timely support!

@PascalSenn rightly pointed out that the issue was on my test model.


Move cursor with Alt+Click in Terminal has issues with wrapped lines

VSCode Version: 1.40.2
OS Version: Windows_NT x64 10.0.17763
PowerShell Version: 5.1.17763.771

Ref: https://github.com/microsoft/vscode/issues/44448#issue-300421788
Steps to Reproduce:

Open integrated PowerShell Terminal
Type some text that will wrap multiple lines
Alt+Click somewhere on the last line (works as expected)
Alt+Click somewhere on the other lines (not working)

Does this issue occur when all extensions are disabled?: Yes

Upstream: https://github.com/xtermjs/xterm.js/issues/2658

Oh, it's actually fixed as of a few days ago since the upstream PR got merged (https://github.com/xtermjs/xterm.js/pull/2670) 😃


Use Custom HTTP Client for AWS and  GCP Clients to allow debug logging

Pull Request Test Coverage Report for Build<PHONE_NUMBER>7
Details

18 of 18 (100.0%)  changed or added relevant lines in 3 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.009%) to 80.877%

Files with Coverage Reduction
New Missed Lines
%

pkg/listener/metrics/cache.go
2
93.18%

Totals

Change from base Build<PHONE_NUMBER>5:
0.009%

Covered Lines:
6420

Relevant Lines:
7938

💛  - Coveralls


associated_against in combination with scope order() fails

Hi!
I get an error if I use pg_search_scope with scope order() on associated resource (e.g. Region.search('TestRegion').order('zones.name ASC')). But see the following documentation:
Ruby: 2.1.4
Rails: 4.1.7
pg_search: 0.7.8
Postgresql: 9.3.5
# app/models/zone.rb
#
#  id  :integer
#  region_id  :integer
#  name  :string(255)
class Zone < ActiveRecord::Base
  belongs_to :region
end

# app/models/region.rb
#
#  id  :integer
#  name  :string(255)
class Region < ActiveRecord::Base

  include PgSearch
  pg_search_scope :search,
    against: :name, associated_against: {
      zones: :name
    }

  has_many :zones
...

All wors fine if I remove associated_against from pg_search_scope:
...
  pg_search_scope :search,
    against: :name, #associated_against: {
   #  zones: :name
   # }
...

The following examples are base with associated_against configuration in pg_search_scope:
Example
2.1.4 :001 > Region.all.search('TestRegion').order('zones.name ASC')

Scope search works without problems if I remove the order scope from the association chain. Also order scope without  search scope works.
 But I need to search also on associated resources using configuration associated_against in pg_search_scope.
Info

The bug must be in the associated_against. See https://github.com/Casecommons/pg_search/blob/master/lib/pg_search/configuration/association.rb
Found related issue https://github.com/rails/rails/issues/12982
Reducing the sql string to a minimal (removing search parameters) I get the same error:

SELECT "regions".*
FROM "regions"
LEFT OUTER JOIN
  (SELECT "regions"."id" AS id
   FROM "regions"
   INNER JOIN "zones" ON "zones"."region_id" = "regions"."id"
   GROUP BY "regions"."id")
   pg_search_a07c808afe29b34454fc0d ON pg_search_a07c808afe29b34454fc0d.id = "regions"."id"
ORDER BY "regions"."id" ASC,
         "zones"."name" ASC

Resume
Searching with pg_search_scope :search ... using Region.all.search('Text').

order()
with associated_against
without associated_against

on resource
OK (but order needed on assoc. res.)
OK

on assoc. res.
FAILS
OK (using joins(:zones))

Any idea how to solve this error?

Same issue here. Any update?

Same here.

Bravo! This is a really well documented issue report. I am running into the same issue using this gem.
The order clause won't work because some aliasing done by pg_search.
I tried using references as suggested in https://github.com/Casecommons/pg_search/issues/109, but that does not seem to work either.
The name of the table is not being aliased, it is the string_agg aliasing that seems to be the problem.

Brilliant report, facing the same issues, and temporarily solve such problem using something like @ashwinputhige suggests in https://github.com/Casecommons/pg_search/issues/206#issuecomment-183816152

Btw, it is looks like exact this bug causes this https://github.com/globalize/globalize/issues/470 problem with Globalize gem

Still having the same issue. Note that another scenario that causes this error is appending the built-in with_pg_search_highlight scope (e.g. @events = Event.search_events(params[:search]).with_pg_search_highlight). Because this introduces ORDER BY to the SQL query, I get the same error message as everyone else here.

I'm having the same issue. Is there a fix for this yet or writing the SQL by hand is the only solution?


Server doesn't properly handle broken pipe?

So in trying to implement #566 to check if actondb crashed during testing or not, I found, when submitting the PR #563 that we got a failure and the test script reports actondb server 1 to have died with return code -13:
Got exception during check membership on shutdown: ActonDB 1 is dead, returncode: -13, see db1.log file

I think signal 13 is SIGPIPE on MacOS (https://krypted.com/mac-security/unix-signals/), so could it be that the server is trying to write to a connection that has been closed by the client already?
In this particular test, we start the rts_ddb_server app twice. So maybe it's DB client connections to the DB servers from the first iteration is still there on the server and the server wants to send something (dunno what!?) but our acton test application has exited and so we get broken pipe? Sort of guesstimating here... @aagapi is this enough to get you started with reproduction? Try to kill / reconnect the DB client a lot?
test run is https://github.com/actonlang/acton/runs/5571748973?check_suite_focus=true and there are artifacts with db1.log in there...

Aha! This is definitely a possibility, if timing is such that the server is in the midst of handling a client's RPC when that client is crashed, then the server attempts to use the existing socket descriptor to send back the response, which would cause it to receive a SIGPIPE. I will attempt to setsockopt(SO_NOSIGPIPE) on the socket to see if that fixes the issue.

I merged in PR https://github.com/actonlang/acton/pull/568 , which masks SIGPIPE via sigaction on the process level, which is the more portable option as opposed to setsockopt(SO_NOSIGPIPE), which is MacOS specific. It passes the CI on MacOS 10 and 11 (and Ubuntu), although I read that on some MacOS's ignoring SIGPIPE doesn't work well. Please also test the change on your MacOSs, and if you still notice the issue, I will enable setsockopt(SO_NOSIGPIPE) for Mac OS only (I added that code in under #ifdef MACOS, but it is currently disabled).

Yeah, seems like it might not have helped entirely. Got a failure yesterday https://github.com/actonlang/acton/runs/5738441187?check_suite_focus=true
the Acton app says:
  File "/Users/runner/work/acton/acton/test/./test_db.py", line 80, in tcp_cmd
    raise TcpCmdError(f"Process is dead, returncode: {p.returncode}  stdout: {p.stdout and p.stdout.read()}  stderr: {p.stderr and p.stderr.read()}")
TcpCmdError: Process is dead, returncode: 0  stdout: b'#RTS# Detected 3 CPUs: Using 4 worker threads, due to low CPU count. No CPU affinity used.\n#RTS# Using distributed database backend replication factor of 3\n#RTS# Using distributed database backend (DDB): <IP_ADDRESS>:15600\n#RTS# Using distributed database backend (DDB): <IP_ADDRESS>:15601\n#RTS# Using distributed database backend (DDB): <IP_ADDRESS>:15602\nERROR: Failed joining server <IP_ADDRESS>:15602 (it looks down)!\n#RTS# Checking for existing actor state in DDB.\n'  stderr: b'get_remote_server: ERROR connecting to <IP_ADDRESS>:15602\nERROR writing to socket: Bad file descriptor\n'

so we get a failure when trying to connect to the third DB server. Port 15602 means db server 2 and we start on 0, so third DB server...
and checking the db2.log we see:
SERVER: Using args: portno=15602, gportno=15702, verbosity=1, seeds:
SERVER: <IP_ADDRESS>:15700
Test create ACTORS_TABLE - OK (0)
Test create MSGS_TABLE - OK (0)
Test create_state_schema - OK
BACKEND: Queue table 2 created
Test create MSG_QUEUE table - OK (0)
Test create_queue_schema - OK
SERVER: Started [<IP_ADDRESS>:15602, <IP_ADDRESS>:15702], my_lc = VC(81238:0)
SERVER: Connecting to <IP_ADDRESS>:15700..
SERVER: accepted connection from peer: localhost (<IP_ADDRESS>:49461), sockfd=8
SERVER: Installed new agreed view Membership_agreement_msg(type=2, ack_status=2, nonce=57067230474341, Membership(Node(status=0, node_id=81236, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=15700), Node(status=0, node_id=81237, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=15701), Node(status=0, node_id=81238, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=15702), , VC(81236:4, 81237:3, 81238:1)), local_view_disagrees=0
SERVER: accepted connection from client: localhost (<IP_ADDRESS>:49467)
BACKEND: Queue 2/0 created
ERROR writing to socket: Broken pipe
Assertion failed: (0), function error, file actondb.c, line 79.

@aagapi so should we uncomment the setsockopt stuff?
I still find it a little strange though, like both the server and client reports broken pipe. Why does it break?

got more errors in another CI run: https://github.com/actonlang/acton/runs/5752630068?check_suite_focus=true
same error, from db1.log:
kll@ThinkYoga:~/Downloads$ cat db1.log
SERVER: Using args: portno=11401, gportno=11501, verbosity=1, seeds:
SERVER: <IP_ADDRESS>:11500
Test create ACTORS_TABLE - OK (0)
Test create MSGS_TABLE - OK (0)
Test create_state_schema - OK
BACKEND: Queue table 2 created
Test create MSG_QUEUE table - OK (0)
Test create_queue_schema - OK
SERVER: Started [<IP_ADDRESS>:11401, <IP_ADDRESS>:11501], my_lc = VC(77037:0)
SERVER: Connecting to <IP_ADDRESS>:11500..
SERVER: Installed new agreed view Membership_agreement_msg(type=2, ack_status=2, nonce=74023761347867, Membership(Node(status=0, node_id=77036, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=11500), Node(status=0, node_id=77037, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=11501), , VC(77036:1, 77037:1)), local_view_disagrees=0
SERVER: accepted connection from peer: localhost (<IP_ADDRESS>:49473), sockfd=8
SERVER: Installed new agreed view Membership_agreement_msg(type=2, ack_status=2, nonce=114044266619424, Membership(Node(status=0, node_id=77036, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=11500), Node(status=0, node_id=77037, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=11501), Node(status=0, node_id=77038, rack_id=0, dc_id=0, hostname=<IP_ADDRESS>, port=11502), , VC(77036:4, 77037:3, 77038:1)), local_view_disagrees=0
SERVER: accepted connection from client: localhost (<IP_ADDRESS>:49477)
BACKEND: Queue 2/0 created
BACKEND: Subscriber 0/0/0 subscribed queue 2/0 with callback 0x0
BACKEND: Queue 2/-11 created
ERROR writing to socket: Broken pipe
Assertion failed: (0), function error, file actondb.c, line 79.
kll@ThinkYoga:~/Downloads$

@aagapi Oh, maybe SIGPIPE ignoring stuff does work, since now we are dying  on an assert? I guess we now have to handle the error when trying to write to the child connection. Just log a message that we couldn't write and do some cleanup on the fd?

Yes, exactly, I'm about to push this fix.

Merged in https://github.com/actonlang/acton/pull/574

Closing this as I think we've addressed this issue. Will use #577 to track the last piece of ensuring that we clean up properly after an error.


Implement prose tests checking that neither mongocryptd nor its client are created when they are not supposed to be

Note that while JAVA-4794 adds one test, the other tests in the same section 8. Bypass Spawning mongocryptd appear to be missing in our codebase, so I also implemented them.
The "Commits" WUI view does something weird to the commit messages. The actual commit messages are something like the following, and point to the ID of the group in the spec:

Add tests #8 JAVA-4794
Add test #20 JAVA-4741

There are small deviations in some tests comparing to their prose description, made to make our life better in a situation when the tests fail. I created DRIVERS-2624 with a PR suggesting to include the changes in the spec.
JAVA-4741
JAVA-4794

@jyemin Are you OK with me merging this tests-only PR based on the approval of one reviewer, or do you want to review it?

I'd like to take a look so please hold off on merging


on-click event called twice

Description:
Clicking an element once causes the click event to be called twice. Seems to be related to rendering another on-click element as a result of the first event.
Versions affected:
0.9.1, edge
Platforms affected:
Tested on Firefox and Chrome on Linux
Reproduction:
See this jsfiddle: https://jsfiddle.net/yb3erzda/1/
Click the "add item (buggy)" button twice, the second click will add 2 items (should just add 1 item)
Code:

There was a bug with delegation and elements that happen to be children of a delegation target but not subject to delegation themselves. This should be fixed on edge and will go out with 0.9.2 when it is cut.
Thanks for the report!


fastmath approximate functions?

First of all, thanks for your work on this package.  Cupy has been amazing in opening up gpu coding to relative dunces like me!
Out of curiosity, is there any plans to support the fastmath  single precision functions in cuda? I have an application that spends most of its time calculating complex exponentials, and I think it could really benefit from a sincosf.
Apologies if this is already in cupy and I missed it!
Thanks!

You can use user-defined kernels (ElementwiseKernel/ReductionKernel/RawKernel) for fastmath:
>>> import cupy as cp
>>> my_sincosf = cp.ElementwiseKernel(
>>>     'float32 x',
>>>     'float32 y0, float32 y1',
>>>     'sincosf(x, &y0, &y1)',
>>>     'my_sincosf')
>>> x = cp.array([0, cp.pi/2, cp.pi], dtype='f')
>>> my_sincosf(x)
(array([ 0.000000e+00,  1.000000e+00, -8.742278e-08], dtype=float32),
 array([ 1.000000e+00, -4.371139e-08, -1.000000e+00], dtype=float32))

See User-Defined Kernels for the details.

Fair enough!  It seems like directly exposing it as cupy functions would be nice, but I can handle the above.
Thanks for the help!


Perception: use customized leakyReLU TensorRT layer

 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.KaWaiTsoiBaidu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Google pubsub implementation

I have added an implementation based on google pub sub, it doesn't have many of the features of SQS so i had to return NaN for many things, and the qurl format is a bit funny.
/project_id//topics/<topic_id>/subscriptions/<sub_id>
because it requires both a topic and a subscription, but i have tested it and it works for a dummy print case.

Thank you Forrest! It looks like this is the issue in the failing tests (not your fault):
https://stackoverflow.com/questions/77903321/importerror-cannot-import-name-mock-s3-from-moto

I think we should mention in the document the user need to call renew_lease periodically otherwise the task will be visible again. I think the maximal deadline is 600s
https://cloud.google.com/pubsub/docs/lease-management


Create line chart

create a line chart without a goal line.
Need to decide how to choose the number of months.
Need to decide how to include comparators dynamically.
https://docs.google.com/spreadsheets/d/1h81ZmTqMWvWDcpLIr5IFW-AAmEiqQAPB4ZtyQtY87HQ/edit#gid=1418181108

Functionality is included with latest pictoralist, still need some architecture decisions about how we want to implement the ability for a user to change these on the fly, and if not, how we have them changed at an organizational level.
But, again, code is now here for:

adding/removing goal line (smoke tested)
changing number of months in display (tested (ten cases, edges))
dynamic comparators are the core of the new pictoralist, thoroughly tested

Todo: Decide how we want end users to influence the control keys for display_timeframe, generate_goal_line, and potentially influence selected_measure/comparator_type


Call Status is always 'Establishing' but never turned to established - Calling bot for Microsoft Team- Application Hosted Media

I am really new to bot framework, I am currently working on a bot that is supposed to receive incoming (peer-to-peer) calls from Microsoft Teams using [Graph Calling SDK] and [Real time media library] and play an audio file (stored in a folder in my application) and get details of incoming audio media stream. My application is basically a .net framework 4.7.2 console application and i am trying to follow 'AVPFrontend' and 'HueBot Samples. Now the problem is when i don't involve any media configuration, bot answers the call and call is never disconnected. But when i include media platform settings, call status is never turned to 'Established' but it's always 'Establishing'

Following are my media platform settings:
builder.SetNotificationUrl(new Uri(ConfigurationManager.AppSettings["BotBaseURI"] + "api/calling"));
            builder.SetMediaPlatformSettings(new MediaPlatformSettings()
            {
                MediaPlatformInstanceSettings = new MediaPlatformInstanceSettings()
                {
                    CertificateThumbprint = "1c9bfea46besdfjsdk234234230e217b821666cf3f6",
                    InstanceInternalPort = 8500,
                    InstancePublicPort = 10119,
                    InstancePublicIPAddress = new IPAddress(0x0),
                    ServiceFqdn = "0.bot.conntoso.com",

                },

                ApplicationId = AppID,
            }
            );
            builder.SetServiceBaseUrl(PlaceCallEndpointUrl);

I am using ngrok to test and debug ngrok locally, following are my settings:

Expected behavior
The Call Status  should turn to 'Established'
Additional context
From AVPFrontEnd sample, I have implemented PlatformCallController.cs (which addresses incoming call) and DemoController.cs (this should handle webhooks once call is accepted, according to my understanding). but code in DemoController.cs is never executed.
What am i missing, please help me to address this issue. Thanks!

It seems we cannot connect to your bot at the "0.bot.conntoso.com:10119" endpoint. Are you sure that "0.bot.conntoso.com" resolves to "0.tcp.ngrok.io"? After your bot service starts up and is ready to receive incoming calls, verify that TCP connectivity to "0.bot.conntoso.com:10119" is working; e.g., using Test-NetConnection -ComputerName 0.bot.conntoso.com -Port 10119 (substituting "0.bot.conntoso.com" with the value for MediaPlatformInstanceSettings.ServiceFqdn and 10119 with the value for InstancePublicPort.

Thanks for your response. TCP test is succeeded:

But Call's state is never established

Can you share a call-id or scenario-id of a test call please.

just found that, I was using a self signed certificate which was causing the issue, once i used the certificate issued by the CA (let's encrypt), issue was resolved.

just an off-topic question btw, Can bot access the audio stream of a Caller in peer-to-peer incoming call?

Do you mean in a 1:1 call where there is just the Caller and the bot? Yes, the bot will receive the audio from the peer/caller.
Or do you mean in a case where person A has called person B in a 1:1 call? In that case, adding the bot to the conversation automatically turns it into a multiparty group call. In a multiparty conversation, by default the bot will hear a mix of the other active speakers. If the bot wishes to hear the active speakers separately, or 'unmixed', it should set ReceiveUnmixedMeetingAudio = true in its AudioSocketSettings.
https://microsoftgraph.github.io/microsoft-graph-comms-samples/docs/bot_media/Microsoft.Skype.Bots.Media.AudioSocketSettings.html#properties
AudioMediaBuffer.UnmixedAudioBuffers property:
https://microsoftgraph.github.io/microsoft-graph-comms-samples/docs/bot_media/Microsoft.Skype.Bots.Media.AudioMediaBuffer.html#Microsoft_Skype_Bots_Media_AudioMediaBuffer_UnmixedAudioBuffers

Yes, I mean 1:1 Call with just caller and bot, can you please give a hint about accessing the incoming media stream from caller?
Thanks!

And for my info, incoming call audio media buffers be accessed in AudioSocket.AudioMediaReceived event? Is there any way that i can receive only caller's media buffers not the bot's?  (in the context of 1:1 call between a Caller and bot, where caller makes the call).

Yes, use the AudioSocket.AudioMediaReceived event to receive the audio media from the peer.
The event will be raised 50 times per second (every 20 milliseconds). The event handler must consume each buffer and return quickly. Typically the bot app should just copy the audio frame content of each AudioMediaBuffer, enqueue the audio frame copy for asynchronous processing (from some other worker thread), dispose the AudioMediaBuffer object, and return.
The bot will hear only the peer (caller) and not itself. The AudioMediaReceived event never includes any audio sent by the bot (so there's no echo).

ok thanks, but one thing is confusing me, AudioSocket.AudioMediaReceived event is getting fired even if my microphone is muted, and its continuously returning the audio buffer.

If the peer is muted and not sending any audio content, the media SDK will generate buffers containing silence (aka "comfort noise") so the AudioSocket.AudioMediaReceived event continuously delivers a steady stream of audio frames to the bot app.
Such generated silence buffers are indicated with the AudioMediaBuffer.IsSilence property. Thanks.

@muradhaider5 Can you please help me, to run the ComplianceRecordingBot sample locally using ngrok to test and debug ngrok locally? or Can you please provide the steps to do it locally?
Thanks in advance, Jeetendra

@JSGund you may check this:
https://docs.microsoft.com/en-us/microsoftteams/platform/bots/calls-and-meetings/debugging-local-testing-calling-meeting-bots

Riding in here to say if you've found this issue, your call may remain in "establishing" state if you've forgotten to update the settings around the URLs that have been configured. For example the bot base url.
Check the logs, and double-check your config.
(This might be a message for future me).

@yundatsai
Please try upgrading to the latest bot media SDK:
https://www.nuget.org/packages/Microsoft.Skype.Bots.Media/<IP_ADDRESS>-alpha
I see you are using .NET6 and the latest SDK contains some .NET6-related fixes.
If that does not help, please let me know. Thanks.


terraform: Dynamic aws-vault wrapper

The following wrapper makes it more convenient to call terraform without the need of specifying the AWS_PROFILE environment variable or prefixing commands with aws-vault exec.

I think this would be better built if it was a separate module that would override languages.terraform.package when certain option.enable = true; is set.

@domenkozar thank you for the code review, the code associated with the Terraform wrapper was extracted to a separate standalone module. Please let me know your thoughts


How to do List elections?

Maybe I missed how to do this, but when I have an election, set maybe 4 people to be elected and have 10 candidates, I get a form where I can type in yes/no/abstention for every candidate and then get results with "crazy" percent numbers, instead of a list of candidates ordered by votes they got. I want to do a list election (Listenwahl) and right now I don't see how to do that...
P.S.: Sorry for spamming you here, but I just came home from a party congress where I presented and used OpenSlides and I hope to introduce this in a lot of other parts of our party. But I'm pretty tech savy and when I'm struggling with this, I doubt I will be able to get people to adopt this.

Did you check the config vars for the election (e. g. percent base and election mode)?

I think I went through that, but it wasn't obvious to me what to do. I will check this out again.

I think the most easiest way to achieve this would be to just start 4 ballots (Wahlgänge). On each ballot you ballot you simply assign all volunteers. When you go into the second ballot, you just unassign the person that was elected before.
afaik OpenSlides currently doesn't support list-ballots out of the box and the feature is currently not planned. If you wish to see it in coming OpenSlides releases, you can shoot us a mail at https://openslides.com/ and we will prepare you an offer.
PS: @emanuelschuetze was my assumption about the election module correct?

To be honest, right now I'm not using the elections really, just using it to display the results and that basically failed on list elections.


Task 11 namespaces

I'll merge this into master because this is required for the other PRs to be tested.


Scroll wheel speed should be set to 15 on linux

Two independent reports have found 15 to be OK on Ubuntu:

Alistair
https://spectrum.chat/gtoolkit/general/scrolling-on-linux-is-slow~9cbf6f31-b8e8-49ac-ae75-844dadcfa541

Should this happen in code or during the build?

I've assumed in code - images are normally considered platform agnostic.  It's also possible that we may find differences within platforms, e.g. Ubuntu recently switched it's trackpad handling from synaptics to libevent (or something like that), which could also require tweaks.

Also, having different images on different platforms will make find issues and debugging more tricky.


Enable immutability by default

Description
Document immutability enabled by default
Related Issue
https://github.com/rubrikinc/terraform-aws-rubrik-cloud-cluster-elastic-storage/issues/11
Motivation and Context
Enabled immutability is required to initiate cluster recoverability on lost or deleted cloud clusters.
Since immutability by default was enabled previously for cloud clusters deployed through Terraform, this diff just updates the documentation to reflect that.
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

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

Checklist:
Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTION document.
[ ] I have updated the CHANGELOG file accordingly for the version that this merge modifies.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

LGTM, Thanks!


Document the meaning of bool return values

The C signature of vkGetFenceStatus is the following (from the spec):
// Provided by VK_VERSION_1_0
VkResult vkGetFenceStatus(
    VkDevice                                    device,
    VkFence                                     fence);

The Rust signature of ash::Device::get_fence_status is the following:
pub unsafe fn get_fence_status(&self, fence: Fence) -> VkResult<bool>

It's not obvious how the VkResult return value is converted into a bool, especially because the spec also defines the following for VkResult:
// Provided by VK_VERSION_1_0
typedef enum VkResult {
    VK_SUCCESS = 0,
    VK_NOT_READY = 1,
...

Someone might expect that the VkResult is just casted into a bool, with non-zero values converted to true, and zero values converted to false. However, this is contrary to the behavior of the function, which makes VK_SUCCESS map to true and VK_NOT_READY map to false.
This behavior should be documented on Vulkan functions that return bools in Rust but not in C to avoid confusion.

This function has very clearly defined return values:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkGetFenceStatus.html

I think the point is that ash's wrapper diverges from that documentation enough to be unclear.

Sure, we could always describe that since we have more control over the return type, we map NOT_READY to not be part of Err(x) but Ok(false) instead. Perhaps make this a PR instead?

@dthusian I've opened https://github.com/ash-rs/ash/pull/929, please review and see whether that is to your liking.

Just in case @dthusian I'd like to know how you got to this:

Someone might expect that the VkResult is just casted into a bool, with non-zero values converted to true, and zero values converted to false.

The returned bool is wrapped inside a VkResult<>. If the underlying vk::Result value is casted to a bool, what would we use to fill VkResult<> with then? Never return Err(err_code) but always Ok(err_code as bool)?
Understanding your thoughts and expectations here is critical for us to improve the function signatures and documentation.

The returned bool is wrapped inside a VkResult<>. If the underlying vk::Result value is casted to a bool, what would we use to fill VkResult<> with then? Never return Err(err_code) but always Ok(err_code as bool)?

I thought it might be that any non-SUCCESS non-NOT_READY value maps to Err, otherwise, it is casted. In any case, the PR looks to me, thank you.


Successfully on creating image, but nothing happen when plugged in RPI 2

I had successfully on creating image Fedora-Minimal-armhfp-22-3, under Fedora 21 x64 bit running on VMWare Player.
Then, create image on Micro SD using Win32DiskImager.
After plugging in on RPI 2, when turn on, nothing boot happen.
The light red and green in RPI 2 lights continuously.
But, when using Raspbian, on booting, green light will be blinking.
Any clue to get this image works ?

Hmm... I just retested and it seems to work fine for me.  Are you sure you are copying the .img file to the SD card and not the .raw file? The .raw file is just the decompressed version of the .xz that was downloaded from the repo and does not have the partition layout the RPi2 expects.
The format of the image should be something like this:
# parted Fedora-Minimal-armhfp-22-3-sda.raw.img print
Model:  (file)
Disk /root/rpi2-fedora-image-builder/Fedora-Minimal-armhfp-22-3-sda.raw.img: 1993MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  106MB   105MB   primary  fat16        lba
 2      106MB   1993MB  1887MB  primary  ext4

If that looks right, you might try mounting the partitions on another machine to make sure the contents of the boot partition (the first FAT partition) look correct.  Should have these files:
https://github.com/raspberrypi/firmware/tree/master/boot

Thanks for your respond.
Here is attached, what I was doing, when creating image and validating after creating image.
I change settings.conf with BOOTSIZE = 200 and ROOTSIZE=3000.
Is there any way to validate my image ?

It looks like you either don't have the latest version or have deleted some files.  The "scripts" directory is not present.  In contains the code for populating the boot partition.  Please:
git pull
./clean.sh

Then try again.

I think I had the same issue at first when I downloaded just the mkimage.sh file instead of the whole thing.

Yes, I have made mistakes, eq : not creating scripts directory and copying all its contents.
After doing your recommendation, Fedora Minimal can be ran smoothly.
For your information, I have tried the same procedures, for Fedora Server and Fedora Workstation, but I could not get the same result.
For this issue, I think I will closed this issue.
Thanks for your thread, because it can make me starting to learn Linux with this tiny Raspbery Pi 2 B, from scratch.


feat: Database incremental upgrade

Warning
This is a large and breaking changes pull request. Please read full description to fully understand.

Goal

Transform database upgrade proccess into an incremental process, based on a list of incremental changes on every new database version.
Simplify plugin upgrade logic, allowing developers to define upgrade logic.

Proposal
I would like to propose an incremental database upgrade process, based on a list of statements per version, which is executed on the result of the previous version. This approach is similar to Laravel and Doctrine migrations.
This list of statements, designed by the developer, can make modifications, insertions, deletions or updates on the current database, without the plugin having to know the common fields between updates, this responsibility lies with the developer.
For example, we can define the following versions:
const version1 = {
  toVersion: 1,
  statements: [
    `CREATE TABLE IF NOT EXISTS users (
        id INTEGER PRIMARY KEY NOT NULL,
        email TEXT UNIQUE NOT NULL,
        name TEXT
    );`,
    `CREATE TABLE messages (
        id INTEGER PRIMARY KEY NOT NULL,
        userid INTEGER,
        title TEXT NOT NULL,
        body TEXT NOT NULL,
        FOREIGN KEY (userid) REFERENCES users(id) ON DELETE SET DEFAULT
    );`,
  ],
};

// This statements are execute over last version database (1), only needs to specify new changes
const version2 = {
  toVersion: 2,
  statements: [`ALTER TABLE users ADD COLUMN age INTEGER;`],
};

// This statements are execute over last version database (2), only needs to specify new changes
const version3 = {
  toVersion: 3,
  statements: [`UPDATE users SET name = 'Guest' WHERE name IS NULL;`],
};

In this sample:

Version 1 will create database schema.
Version 2 will add a new field over version 1 database.
Version 3 will update data over version 2.

Why
Currently, the database upgrade process is very complex. The plugin must make copies of the existing tables, create the new tables and try to understand the fields that are common between versions to copy the data.
This logic means that adding a single field to a table involves making a copy of the rest of the tables, finding the common fields, creating all the tables again, and copying the existing data. So much overhead.
On the other hand, suppose we want to modify a field as double the current value. With the current logic, you would have to redo the entire database and update the desired field with a query in the SET option.
With the proposed approach, the overhead of data transfer is drastically reduced.
How (code changes)
Summary of code changes

Remove fromVersion and set options.
Refactor statement:string to statements:string[].
Move database file backup outside onUpgrade().
Add execute statements inside transaction logic.
Remove backup tables, find common columns, copy data and execute sets logic.

Plugin new openDB process flow (only if currentVersion and targetVersion differs)

Backup the current version file backup-YOUR_DB_NAME
For each version between currentVersion and targetVersion

Starts transaction
Execute version statements
Commit transaction
Update database version

If process failed, restore the backup file
Delete the backup file

Upgrade guide (to be included on documentation)
Since this PR introduces breaking changes, it is necessary to update the application code as follows:

For each version of the database

Remove fromVersion field
Rename statement field to statements and convert the string to an array of strings (string[]), each of which is a single statement ending in ;.
Convert set array (capSQLiteSet[]) to string array (string[]) and add every item to field statements.
Remove set field.

Sample
Original upgrade statements array:
const upgradeStatements = [
  {
    fromVersion: 1,
    toVersion: 2,
    statement:
      `CREATE TABLE IF NOT EXISTS users (
        id INTEGER PRIMARY KEY NOT NULL,
        email TEXT UNIQUE NOT NULL,
        name TEXT,
        age INTEGER,
        last_modified INTEGER DEFAULT (strftime('%s', 'now'))
      );
      CREATE INDEX IF NOT EXISTS users_index_name ON users (name);
      CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified);
      CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified
        AFTER UPDATE ON users
        FOR EACH ROW WHEN NEW.last_modified <= OLD.last_modified
        BEGIN
            UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id;
        END;`,
    set: [
      {
        statement: 'INSERT INTO users (name,email,age) VALUES (?,?,?);',
        values: [
          ['Whiteley'<EMAIL_ADDRESS>30],
          ['Jones'<EMAIL_ADDRESS>44],
        ],
      },
    ],
  },
];

New upgrade statements array:
const upgradeStatements = [
  {
    toVersion: 2,
    statements: [
      `CREATE TABLE IF NOT EXISTS users (
        id INTEGER PRIMARY KEY NOT NULL,
        email TEXT UNIQUE NOT NULL,
        name TEXT,
        age INTEGER,
        last_modified INTEGER DEFAULT (strftime('%s', 'now'))
      );`,
      `CREATE INDEX IF NOT EXISTS users_index_name ON users (name);`,
      `CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified);`,
      `CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified
        AFTER UPDATE ON users
        FOR EACH ROW WHEN NEW.last_modified <= OLD.last_modified
        BEGIN
            UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id;
        END;`,

      // Sets as individual statements with data
      `INSERT INTO users (name,email,age) VALUES ('Whiteley'<EMAIL_ADDRESS>30);`,
      `INSERT INTO users (name,email,age) VALUES ('Jones'<EMAIL_ADDRESS>44);`,
    ],
  },
];

Diff changes
 const upgradeStatements = [
   {
-    fromVersion: 1,
     toVersion: 2,
-    statement:
+    statements: [
       `CREATE TABLE IF NOT EXISTS users (
         id INTEGER PRIMARY KEY NOT NULL,
         email TEXT UNIQUE NOT NULL,
         name TEXT,
         age INTEGER,
         last_modified INTEGER DEFAULT (strftime('%s', 'now'))
-      );
-      CREATE INDEX IF NOT EXISTS users_index_name ON users (name);
-      CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified);
-      CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified
+      );`,
+      `CREATE INDEX IF NOT EXISTS users_index_name ON users (name);`,
+      `CREATE INDEX IF NOT EXISTS users_index_last_modified ON users (last_modified);`,
+      `CREATE TRIGGER IF NOT EXISTS users_trigger_last_modified
         AFTER UPDATE ON users
         FOR EACH ROW WHEN NEW.last_modified <= OLD.last_modified
         BEGIN
             UPDATE users SET last_modified= (strftime('%s', 'now')) WHERE id=OLD.id;
         END;`,
-    set: [
-      {
-        statement: 'INSERT INTO users (name,email,age) VALUES (?,?,?);',
-        values: [
-          ['Whiteley'<EMAIL_ADDRESS>30],
-          ['Jones'<EMAIL_ADDRESS>44],
-        ],
-      },
+
+      // Sets as individual statements with data
+      `INSERT INTO users (name,email,age) VALUES ('Whiteley'<EMAIL_ADDRESS>30);`,
+      `INSERT INTO users (name,email,age) VALUES ('Jones'<EMAIL_ADDRESS>44);`,
     ],
   },
 ];

@dragermrb seems to be a great contribution is this mile the migrations in typeOrm ? Do you store in a migration database all the command lines for each version allowing for decreasing/increasing version. I have no time to look at it right now. I am currently refurbishing a house which takes all my time. May be mid of July i will have a look can you also provide examples where it is used so itwill be easy for me to het in.

@dragermrb to get in

Hi @jepiqueau
I was not aware of the use of TypeORM. The idea of this PR is similar to TypeORM migrations, but using only the addUpgradeStatement(...) method of the API (does not include reverting migrations).

If a user is already using TypeORM migrations, they should not use addUpgradeStatement() and therefore this PR is useless to them.
If a user is using addUpgradeStatement(), this PR would change how updates are applied to the database.

In my apps, I have an array with all the migrations defined and I apply it with addUpgradeStatement().
let upgrades = [
    {
      toVersion: 1,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
    {
      toVersion: 2,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
];

let result:any = await this._SQLiteService.addUpgradeStatement(
  "test-sqlite",
  upgrades
);
result = await this._SQLiteService.openDB("my-database", false, "no-encryption", 2);

@dragermrb i am starting looking at this It would be nice if you provide a simple app to demonstrate this that i could use to replace the testupgradeversion in angular-sqlite-app-starter

Hi @jepiqueau
Sorry for not replying sooner, it's been a busy summer.
I'm going to try to prepare an app-demo for next week.

@dragermrb i am going to merge it and will look at the modifications in angular-sqlite-app-starter if i have an issue i will ask you to look at it avoiding you to loose your time to create an app

@dragermrb
When you said this
let upgrades = [
    {
      toVersion: 1,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
    {
      toVersion: 2,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
];

let result:any = await this._SQLiteService.addUpgradeStatement(
  "test-sqlite",
  upgrades
);
result = await this._SQLiteService.openDB("my-database", false, "no-encryption", 2);

can you provide the service for addUpgradeStatement
i thought for version 1 it would have been
let result:any = await this._SQLiteService.addUpgradeStatement(
"test-sqlite",
upgrades[0].toVersion, upgrades[0].statements
);
and for version 2
let result:any = await this._SQLiteService.addUpgradeStatement(
"test-sqlite",
upgrades[1].toVersion, upgrades[1].statements
);
if i do this with the old service it works for Android and iOS but not for Electron
Are you recreating the whole database each time you want to upgrade a version ?
In that case what happens to the data created in the session?
Can you answer quickly

i thought for version 1 it would have been let result:any = await this._SQLiteService.addUpgradeStatement( "test-sqlite", upgrades[0].toVersion, upgrades[0].statements ); and for version 2 let result:any = await this._SQLiteService.addUpgradeStatement( "test-sqlite", upgrades[1].toVersion, upgrades[1].statements );

Correct!

Are you recreating the whole database each time you want to upgrade a version ? In that case what happens to the data created in the session? Can you answer quickly

You have to add the upgrade statements every time you starts the app, before open database.
Later, when you open the database, the plugin first read database version (with CapacitorSQLite.getVersion(string) for android or with Database.getVersion() for ios) and only applies upgrades above currentDatabaseVersion.
So, the first time you open the database all upgrade statements are applied, but the second and subsequent times none are applied (they are already applied).
Maybe later you will release a new version of the app that has a new upgrade statement. In this case, when you start the app, only the latest upgrade statement is applied, since the previous ones have already been applied.

@dragermrb  your implementation it is not really working like this if you look SQLiteConnection in definition.ts
  async addUpgradeStatement(
    database: string,
    toVersion: number,
    statements: string[],
  ): Promise<void> {
    const upgrade: capSQLiteVersionUpgrade = {
      toVersion,
      statements,
    };
    try {
      if (database.endsWith('.db')) database = database.slice(0, -3);
      await this.sqlite.addUpgradeStatement({
        database,
        upgrade: [upgrade],
      });
      return Promise.resolve();
    } catch (err) {
      return Promise.reject(err);
    }
  }

upgrade is not an array and contains only one value of toVersion and statements

Hi @jepiqueau
This code will call SQLiteConnection.addUpgradeStatement() method from definitions.ts
let result:any = await this._SQLiteService.addUpgradeStatement(
    "test-sqlite",
    upgrades[0].toVersion, // number
    upgrades[0].statements // array
);

File src/definitions.ts, line 1076
async addUpgradeStatement(
    database: string,
    toVersion: number,
    statements: string[],
): {
    const upgrade: capSQLiteVersionUpgrade = {
      toVersion,
      statements,
    };
    //...
    await this.sqlite.addUpgradeStatement({
        database,
        upgrade: [upgrade],
      }); // ================> this call is implemented on Android, IOS or Electron
    //...
  }

Implementation of addUpgradeStatement() on native platforms (Android, Ios, Electron) expects to receive database (string) and upgrade (object {toVersion,statements}) params.
File android/src/main/java/com/getcapacitor/community/database/sqlite/CapacitorSQLitePlugin.java, line 1182
public void addUpgradeStatement(PluginCall call) {
    if (!call.getData().has("database")) {
        String msg = "AddUpgradeStatement: Must provide a database name";
        rHandler.retResult(call, null, msg);
        return;
    }
    String dbName = call.getString("database");
    if (!call.getData().has("upgrade")) {
        String msg = "AddUpgradeStatement: Must provide an array with upgrade statement";
        rHandler.retResult(call, null, msg);
        return;
    }
    JSArray upgrade = call.getArray("upgrade");

    // ...
}

File ios/Plugin/CapacitorSQLite.swift, line 1142
@objc func addUpgradeStatement(_ dbName: String, upgrade: [[String: Any]]) throws -> [Int: [String: Any]] {
    // ...

    if !(keys.contains("toVersion")) || !(keys.contains("statements")) {
        var msg: String = "upgrade must have keys in "
        msg.append("{toVersion,statements}")
        throw CapacitorSQLiteError.failed(message: msg)
    }

    // ...
}

File electron/src/index.ts, line 477
async addUpgradeStatement(options: capSQLiteUpgradeOptions): Promise<void> {
    const dbName: string = this.getOptionValue(options, 'database');
    const upgrades: capSQLiteVersionUpgrade[] = this.getOptionValue(
      options,
      'upgrade',
    );

    // ...

    if (
      !versionUpgradeKeys.includes('toVersion') ||
      !versionUpgradeKeys.includes('statements')
    ) {
      throw new Error('Must provide an upgrade capSQLiteVersionUpgrade Object');
    }

    // ...
}

Isn't that correct??

@dragermrb
let result:any = await this._SQLiteService.addUpgradeStatement(
    "test-sqlite",
    upgrades[0].toVersion, // number
    upgrades[0].statements // array
);

will always take the first element of the upgrades
this is why it is working well when you do
...
      await this._sqlite.addUpgradeStatement("test-updversion",
      upgrades[0.toVersion,upgrades[0].statements);
...
      await this._sqlite.addUpgradeStatement("test-updversion",
      upgrades[1].toVersion,upgrades[1].statements);
...

but does not work when you do
      await this._sqlite.addUpgradeStatement("test-updversion",
      upgrades);

Maybe later you will release a new version of the app that has a new upgrade statement. In this case, when you start the app, only the latest upgrade statement is applied, since the previous ones have already been applied.
this i cannot see it as you always took upgrade[0].
i am just trying to understand what you have done  as i have to implement it in jeep-sqlite stencil component to have the web part of the plugin working.
So the question is why upgrades is now an array of json objects as the command takes a json object as input? is this just to keep them somewhere in the app?

@dragermrb i just got the thing publish in 4.1.0-6  you can have a look at the implementation in angular-sqlite-app-starter. Thanks for your contribution it is a lot smarter process.

i am just trying to understand what you have done as i have to implement it in jeep-sqlite stencil component to have the web part of the plugin working. So the question is why upgrades is now an array of json objects as the command takes a json object as input? is this just to keep them somewhere in the app?

Ok, now I understand you!
The different calls to the addUpgradeStatement() method must be made by the user, at the app level, as many times as there are different versions.
This would be an example of code at the app level (I have omitted the error check)
// Define upgrades
let upgrades = [
    {
      toVersion: 1,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
    {
      toVersion: 2,
      statements: [
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        "CREATE TABLE ... ;",
        // ...
      ]
    },
];

// Create connection
const sqlitePlugin: any = CapacitorSQLite;
let sqlite: SQLiteConnection = new SQLiteConnection(sqlitePlugin);

// Add upgrades statments. This is where the user adds the various upgrades
for (const upgrade of upgrades) {
    // One call per database version
    await sqlite.addUpgradeStatement(
        dbName,
        upgrade.toVersion,
        upgrade.statements
    );
}

// initialize the connection
let db: SQLiteDBConnection = await sqlite.createConnection(
    "my-db-name",
    false,
    "no-encryption",
    CURRENT_SCHEMA_VERSION
);

// open user db
await db.open();


feat(Stories): support single page story

Added single page stories support
Added possibility to provide custom controls
Added possibility to add custom styles for stories modal contents

Seems like the button should be on the left

Seems like the button should be on the left

Why?

Because in case of multiple slides on the first slide the close button is on the left


Release

@rultor release, tag is 1.0.1

@rultor release, tag is 1.0.1

@jloisel OK, I will release it now. Please check the progress here

@rultor release, tag is 1.0.1

@jloisel Done! FYI, the full log is here (took me 4min)


[Search Box]: Search box to make calculator finding easy

Description
I have added a fully functional search box to make it easier to find desired calculator
Screenshots

Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a IWOC'24 contributor.
[ ] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

Assign me I made this search box feature fully functional

https://deploy-preview-283--calcdiverse.netlify.app/

Issue is already open. Pls work on new issues @bhos1242


Empty line at the end of the file

Hello,
For some reason it saves an empty line at the end of the document (for example if I write 5 records, there are 6 lines), how to fix it?

Hi @loter,
A blank line at the end of the file is recommended. Have a look at http://stackoverflow.com/questions/2287967/why-is-it-recommended-to-have-empty-line-in-the-end-of-file. By default fputcsv() adds that line.
If you need to remove the blank line you'll have to write code outside of easy-csv to modify the file.


How do I add additional player operation events to cell.js?

I'm trying to add functionality for players to place blocks and shoot bullets to iogrid. I thought I could just add more code to the game engine in cell.js, but apparently cell.js doesn't use sockets at all. I tried adding socket and socketCluster functionality to cell.js but I get this error Error: This socket has been ended by the other party.
If I'm understanding your code right, putting game engine stuff in worker.js will lead to massive slowdown. How should I go about adding these additional player operations if I can't do it in cell.js?

You shouldn't need to connect any sockets to cell.js.
The client already has an open socket behind the scenes - The job of cell.js is just to add new states/JSON objects to the game grid, move them around (or update them) and also remove them from the game grid when necessary. The user/front end will receive all the JSON objects that are in their cell(s) in real-time (including updates if you change the x/y position of objects in the cell).
You can add additional code to cell.js but you don't need to worry about sockets. In your case you could just create a new 'block' and 'bullet' type to cell.js and create them whenever a payer presses a specific key.
Read this https://github.com/SocketCluster/iogrid/blob/master/cell.js#L1-L45 to see how cell.js works.
In order to interact with players, you need to read data from player.ops - See how it's currently being used here: https://github.com/SocketCluster/iogrid/blob/master/cell.js#L266-L285 - Every change to the player's state needs to be passed in as player.ops and processed somewhere in cell.js.
You can add new player.ops properties on the front-end in the main update loop here: https://github.com/SocketCluster/iogrid/blob/master/public/index.html#L360-L376

If IOGrid doesn't suit your needs because you have advanced requirements and really need to control sockets individually, then you probably shouldn't use it and use SocketCluster directly (but that will be a lot of work ;p).
The point of IOGrid lets you make scalable games quickly so it deals with all the complicated networking/socket details for you. Some users have built entire multiplayer games with it in a single weekend.

Thank you so much for making this and helping me! I think I'm really close to adding the ability to place linkblocks. The reason why these are "linkblocks" is I want each block to have link metadata tied to it, but I'm mainly just trying to get block placement functionality working. I understand how player operations work now and I can make an action happen when the the place block button is pressed. I've been using your coin-manager.js as a template for creating a linkblock-manager.js and generally just copying your code for adding coins and changing it to blocks in cell.js and index.html.
This has worked up til I get to the addCoin function part. In the addCoin function, new coins are automatically added if the generated random position is valid. However, because I want the user to be able to add blocks on command, in my addLinkblock function I don't know what the "if condition" ought to be. I tried removing the if conditional entirely and making it always true, but in both cases this causes blocks to automatically be added as fast as the cell updates.
In cell.js I'm calling linkblockManager.addLinkblock(player.x, player.y) upon the place block action in the applyPlayerOps function, sort of like how you call coinManager.addCoin() in the dropCoins function. I tried setting playerOp.pb = 0 to prevent it from constantly adding more blocks, but it didn't work. Here's some (possibly) relevant code from linkblock-manager.js:
LinkblockManager.prototype.addLinkblock = function (x, y, link) {
  var linkblockId = uuid.v4();
  if (true) {
    var linkblock = {
      id: linkblockId,
      type: "linkblock",
      link: link,
      x: x,
      y: y
    };
    this.linkblocks[linkblockId] = linkblock;
    this.linkblockCount++;
    return linkblock;
  }
  return null;
};

...and from cell.js:
      if (playerOp.pb) {
        var linkblock = self.linkblockManager.addLinkblock(player.x, player.y, player.linkequipped);
        if (linkblock) {
          linkblocks[linkblock.id] = linkblock;
        }
        console.log(JSON.stringify(linkblocks));
        playerOp.pb = 0;
        placedBlock = true;
      }

I'm trying to make a prototype world that is capable of having at least dozens of users and at least hundreds of linkblocks simultaneously, so I think IOgrid is perfect for my requirements. I'm ultimately going to want to store the linkblock data in a rethinkdb database. Will this be a problem? Thanks again!

@austincap You cannot modify the player.op property from the server-side - This is because the op property is a special reserved property which is used by the client to pass actions to the server (one direction only).
If you want to add a custom property to the player, you can add a custom property directly to the player using: player.pb = true.

Okay, that makes sense, thanks


Chunks being loaded before world being loaded

*Low priority
Been getting this error hundreds of times on startup forever.
I think it relates to multiverse. Can we get something added to ensure a world is loaded before its chunks are called?
snippetlog.txt

bump

This looks like an error because of the default minecraft spawn region, have you tried tweaking that?
Otherwise, can you provide more context as to what your server setup is (I don't know what multiverse is)

I don't know what multiverse is

It's a plugin for managing worlds (link), it's pretty good.

Noticed weird citadel behavior in spawn chunks earlier (not saving----- not flushing?) reinforcements. Definitely seems related. Tweaking spawn regions - possibly could work as a hotfix.


Cypress test failed

Cypress tests are unstable, but when executing manually, there is no problem...
To investigate
https://github.com/freddycoder/ErabliereApi/actions/runs/2557652834

Work now on my machine and seems to work in the workflow:
https://github.com/freddycoder/ErabliereApi/actions/runs/2558751792
That doesn't explain the other's failures...
I'll leave this issue open for now

Seems stable enough now


fix: Allow trailing whitespace on front matter + thread delimiters

As promised in https://github.com/twitter-together/action/pull/177#issuecomment-1246610255, fixes an edge case where trailing whitespace is included with a delimiter for front matter or threading.

:tada: This PR is included in version 2.1.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


re-Captcha : Failed Match.OneOf or Match.Optional validation

When i configure recaptch to work with googles version 2.
I get the following:
Error: Match error: Failed Match.OneOf or Match.Optional validation
any ideas?

This problem occured due to incorrect configuration.


How to extract iris depth?

I tried to follow the approach of extracting landmark to extract the iris depth.
The android app runs but the callback is never triggered.
Am I doing anything wrong? Thanks in advance.
        processor.addPacketCallback(
                "left_iris_depth_mm",
                packet -> {
                    float depth = PacketGetter.getFloat32(packet);
                }
        );

@cwlee200 Can you share your code repo?

I solved my problem now.
I created my own subgraph and when my main graph connected to it, I missed the below line:
input_side_packet: "FOCAL_LENGTH:focal_length_pixel"
I added back the line and the callback works now, thanks.

@cwlee200 Could you help in what subgraph did you write to get the iris depth?


Fix cast between differently-aligned pointers

Fixes the following error, reported by clippy:
error: casting from `*const u8` to a more-strictly-aligned pointer (`*const usize`) (1 < 8 bytes)
  --> src/kbindings.rs:59:16
   |
59 |         &mut *((u as *const usize).offset(1) as *mut T)
   |                ^^^^^^^^^^^^^^^^^^^
   |

Thanks a lot for this batch of PRs, really good stuff!

@rsdy No worries! Are you actively using this crate in production?

We are, but not every part of the library. It's been lacking some love recently as it is generally quite stable on the code paths that we're using.


Do we need a strategy for pruning old release branches across all submodules?

Probably, but we need to only remove those which do not get used, so we need some way to tag those which are used so we can differentiate from those which aren't.
I'll have a think on this as I would like to double it up with release documentation


[ACR] Create BinaryData with length specification

The binary data content length is required by downstream restproxy and cannot be null. This will require the users to initialize binary data content using:
BinayrData content = BinaryData.fromStream(inputStream, length) .

fixed in #33804 - there are no more usages of BinaryData in the SDK that needs length.


fix the grammer in aws.md

Proposed changes
There are some  errors in aws.md.

change "in same region" to "in the same region"
change "to Choose a replica..." to "to choose a replica..."
change "Full documentations is available" to "Full documentations are available"

Thanks, @SRaddict :)