@clerk/express getAuth

Preliminary Checks

[X] I have reviewed the documentation: https://clerk.com/docs

[X] I have searched for existing issues: https://github.com/clerk/javascript/issues

[X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)

[X] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.

Reproduction

Publishable key
pk_test_ZXhvdGljLWNyYWItNzUuY2xlcmsuYWNjb3VudHMuZGV2JA
Description

Steps to reproduce:
Try calling 'getAuth' from the lib, in dev mode
Expected behavior:
will only return:
{ ... [1]   sessionId: 'example session id, [1]   userId: 'example user id', [1]
seems like everything is null, it was supposed to come with a userId and a sessionId.
Actual behavior:
will only return:
{ [1]   sessionClaims: null, [1]   sessionId: null, [1]   userId: null, [1]   actor: null, [1]   orgId: null, [1]   orgRole: null, [1]   orgSlug: null, [1]   orgPermissions: null, [1]   __experimental_factorVerificationAge: null, [1]   getToken: [Function: getToken], [1]   has: [Function: has], [1]   debug: [Function (anonymous)], [1]
seems like everything is null, it was supposed to come with a userId and a sessionId.
Environment
System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 AMD Ryzen 7 5700X 8-Core Processor
    Memory: 8.42 GB / 31.91 GB
  Binaries:
    Node: 20.17.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (129.0.2792.65)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    @clerk/clerk-sdk-node: ^5.0.50 => 5.0.58
    @clerk/express: ^1.2.3 => 1.3.7
    axios: ^1.7.7 => 1.7.7
    concurrently: ^9.0.1 => 9.0.1
    cors: ^2.8.5 => 2.8.5
    date-fns: ^4.1.0 => 4.1.0
    discord.js: ^14.0.0 => 14.16.3
    dotenv: ^10.0.0 => 10.0.0
    express: ^4.17.1 => 4.21.1
    express-rate-limit: ^7.4.1 => 7.4.1
    firebase-admin: ^12.6.0 => 12.7.0
    node-cache: ^5.1.2 => 5.1.2
    node-cron: ^3.0.3 => 3.0.3
    nodemon: ^3.1.7 => 3.1.7

Hello! I'm sorry you're experiencing this issue. I just tested it locally and was able to get the correct results.

How are you using it? Could you provide a basic reproduction?
Also, I notice you're using @clerk/clerk-sdk-node. We advise migrating to @clerk/backend for pure Node projects or @clerk/express for Express projects.

Hi @wyvern800! Just following up on your reported issue - were you able to replicate it again or has the problem been resolved on your end?

Still having the issue, it started outta nowhere

Thanks for the update @wyvern800! Would you be able to provide a minimal repro using our quickstart template?

I am using the same setup as in the quickstart template:
as you can see here:, but when I access the route, it stays blank:

`js
import express from "express";
import path from "path";
import cors from "cors";
import { commands } from "../../utils/commands.js";
import { parseRoutes, getRoutes } from "../middlewares/routeCapturer.js";
import { clerkMiddleware, getAuth } from "@clerk/express";
import "dotenv/config";
import Clerk from "../../utils/clerk.js";
import ResponseBase from "../../utils/responses.js";
import {
getGuildsByOwnerOrUser,
getAllGuilds,
} from "../../database/repository.js";
import { config } from "dotenv";
import rateLimit from "express-rate-limit";
import { protectedRouteMiddleware } from "../../src/middlewares/clerkAuth.js";
import { createClerkClient } from '@clerk/backend';
config();
export const createServer = (client) => {
const app = express();
const clerkClient = createClerkClient({ secretKey: process.env.CLERK_SECRET_KEY, publishableKey: process.env.CLERK_PUBLISHABLE_KEY });
console.log(clerkClient)
//const clerkClient = Clerk.getInstance();
const port = process.env.PORT || 3000;
const limiter = rateLimit({
windowMs: parseInt(process.env.MAX_REQ_TIME, 10),
max: parseInt(process.env.LIMIT_REQUESTS, 10),
});
// test
app.set("trust proxy", parseInt(process.env.TRUST_PROXY, 10));
/*app.get('/ip', (request, response) => {
const clientIp = request.headers['true-client-ip'] || request.headers['x-forwarded-for'] || request.ip;
console.log('Client IP:', clientIp);
response.send(clientIp);
})
app.get('/debug', (req, res) => {
const debugInfo = {
'Original IP': req.ip,
'X-Forwarded-For': req.headers['x-forwarded-for'],
'All Headers': req.headers,
'Trust Proxy Setting': app.get('trust proxy')
};
console.log(debugInfo);
res.json(debugInfo); // Send the debug info as JSON
});*/
app.use(
cors({
origin: process.env.ENV === "dev" ? "*" : "https://www.tldkp.online",
methods: ["GET", "POST", "OPTIONS"],
allowedHeaders: ["Content-Type", "Authorization"],
optionsSuccessStatus: 200,
})
);
// Serve static files from the React app build
const __dirname = path.resolve();
app.use(express.static(path.join(__dirname, "frontend", "build")));
// Create a router for your /api routes
const apiRouter = express.Router();
apiRouter.use(express.json());
apiRouter.use(
cors({
origin: process.env.ENV === "dev" ? "*" : "https://www.tldkp.online",
methods: ["GET", "POST"],
allowedHeaders: ["Content-Type", "Authorization"],
optionsSuccessStatus: 200,
})
);
// Middleware to parse the routes to display as default endpoint
parseRoutes(apiRouter);
apiRouter.get(
"/",
(req, res) => {
res.status(200).json(getRoutes());
},
"Endpoint that shows all the api endpoints"
);
apiRouter.get(
"/commands",
(req, res) => {
return new ResponseBase(res).success(
commands.map((command) => ({
name: command.name,
description: command.description,
options: command.options,
commandCategory: command.commandCategory,
new: command.new,
}))
);
},
"Endpoint that shows all the commands from the bot service"
);
apiRouter.get(
"/health",
(req, res) => {
if (client) {
const status = client.user.presence.status; // Get the bot's status
if (status === "online") {
return new ResponseBase(res).success("Bot is healthy");
} else {
return new ResponseBase(res).error("Bot is unhealthy!");
}
} else {
return new ResponseBase(res).successEmpty();
}
},
"Endpoint that shows bot status"
);
apiRouter.use(limiter);
// clerkMiddleware is required to be set in the middleware chain before req.auth is used
apiRouter.use(clerkMiddleware({ clerkClient, debug: true, enableHandshake: true }));
// Protected route middleware
//apiRouter.use(protectedRouteMiddleware);
apiRouter.get("/dashboard", async (req, res) => {
res.json(req.auth)
const { userDiscordId } = req;
// Gets the data
if (userDiscordId) {
  await getGuildsByOwnerOrUser(userDiscordId).then((guild) => {
    return new ResponseBase(res).success(guild);
  });
}

});
apiRouter.get("/admin", async (req, res) => {
const { userDiscordId } = req;
if (userDiscordId) {
  const adminDiscordIds = process.env.ADMINS?.split(",");
  const isAdmin = adminDiscordIds.includes(userDiscordId);

  const allGuilds = await getAllGuilds();

  if (isAdmin) {
    return new ResponseBase(res).success({ isAdmin, guilds: allGuilds });
  } else {
    return new ResponseBase(res).notAllowed("Unauthorized");
  }
}

});
apiRouter.use((err, req, res, next) => {
return new ResponseBase(res).notAllowed("Unauthenticated!");
});
app.use("/api", apiRouter);
app.get("*", (req, res) => {
res.sendFile(path.join(__dirname, "frontend", "build", "index.html"));
});
app.listen(port, () => {
console.log([Express] HTTP Server running on port ${port});
});
return app;
};
`

I've discovered the issue
My system for some reason didnt have the correct time set
that was causing the issue
but that wasnt supposed to  happen on dev environment, since the log told
Imagem
the issue is I use two systems
and in linux the time was correct, but not on windows
dualboot
thanks god, after some long reseaerches
but u see there is something said: Clerk will attempt to account for the clock skew in development.
that is not happening
maybe there is a way to tag clerk as dev mode on its initialization?

Yeah, everything is working fine now.

Awesome!


Exception when status() receives 28byte payload

I got a local key via the wizard, construct an OutletDevice, and invoke status(). Sometimes it works but often it crashes with an exception (below).
I believe there's a bug in the following line. The device is sending me a 28 byte response. This line should test "len(data) <= 28" to catch the 28-byte case, and try again. But it's not catching the 28 byte response, and so isn't retrying. Once I changed this line in the tinytuya library to be "<= 28" to "< 28" then my invocations of status() all started working reliably.
                # Some devices fail to send full payload in first response
                # Note - some devices respond with len = 28 for error response
                if self.retry and len(data) < 28:
                    time.sleep(0.1)
                    data = self.socket.recv(1024)  # try again

Here is the debug trace from when I invoked status(). (the line numbers are marginally off because I deleted a few python2-compatible lines from my copy of tinytuya.py so it would pass clean in MyPy).
DEBUG:tinytuya:status() entry (dev_type is default)
DEBUG:tinytuya:json_payload=b'{"gwId":"10871285d8bfc016260e","devId":"10871285d8bfc016260e","uid":"10871285d8bfc016260e","t":"1610307603"}'
DEBUG:tinytuya:status received data=b'\x00\x00U\xaa\x00\x00\x00\x00\x00\x00\x00\x07\x00\x00\x00\x0c\x00\x00\x00\x00x\x93p\x91\x00\x00\xaaU'
DEBUG:tinytuya:result=b''
[2021-01-10 11:40:03.156686] Table lamps: exception - TypeError('ord() expected a character, but string of length 0 found')
Traceback (most recent call last):
  File "./lights.py", line 92, in set_dimmer_loop
    status = device.status()
  File "/Users/ljw/code/bell/tinytuya.py", line 484, in status
    result = cipher.decrypt(result, False)
  File "/Users/ljw/code/bell/tinytuya.py", line 162, in decrypt
    return self._unpad(raw).decode('utf-8')
  File "/Users/ljw/code/bell/tinytuya.py", line 177, in _unpad
    return s[:-ord(s[len(s)-1:])]
TypeError: ord() expected a character, but string of length 0 found

Good find!  The minimum valid payload is 28, but as your example shows, that could be an empty payload.  I'll test to ensure there are no negative side effects and add this to the next release.

Good find!  The minimum valid payload is 28, but as your example shows, that could be an empty payload.  I'll test to ensure there are no negative side effects and add this to the next release.


Added alert component

Description
Added new alert component mentioned in issue #1. This component receives type and message props, with a close button to remove the alert from DOM.
PR Type

[x] Snippets, Tests & Tags (new snippets, updated snippets, re-tagging of snippets, added/updated tests)
[ ] Tools, Scripts & Automation (anything related to files in the scripts folder, Gatsby, website, Travis CI or Netlify)
[ ] General, Typos, Misc. & Meta (everything related to content, typos, general stuff and meta files in the repository - e.g. the issue template)
[ ] Other (please specifiy in the description above)

Guidelines

[x] I have read the guidelines in the CONTRIBUTING document.

@Chalarangelo @fejes713 sorry still can't find a way to tag reviewers

Hey, @theodorusyoga 👋 No problem at all, I think you aren't able to tag us since you don't have full project permission and therefore GitHub doesn't allow you to tag us (because of spam I guess).
I like the code snippet, and it looks good to me code wise. Just one more thing I would add would be aria-live property to make the component accessible to screen readers.
@Chalarangelo is there a way to just use useState and useEffect without the need of React. ? Maybe we could import it in the build process and make it available at all times on certain snippets. WDYT?
Thanks, @theodorusyoga, the snippet will be merged sooner or later after mentioned changes.

@fejes713 First off, thanks for reviewing, I will get to checking this when I have more time on my hands.
As far as useEffect vs React.useEffect is concerned, it's just a change in guidelines at the top of the README and an update to all snippets. The original reasoning was that hooks were not all that well-known at the time, so we made it clear to understand, but it's been 6 months and I think we can open an issue for this and work on this change over the weekend (change snippets, take a look at everything, make sure that our README is ok, make sure that descriptions clearly state React.useEffect to clrarify and we are good to go).

Hey, @theodorusyoga 👋 No problem at all, I think you aren't able to tag us since you don't have full project permission and therefore GitHub doesn't allow you to tag us (because of spam I guess).
I like the code snippet, and it looks good to me code wise. Just one more thing I would add would be aria-live property to make the component accessible to screen readers.
@Chalarangelo is there a way to just use useState and useEffect without the need of React. ? Maybe we could import it in the build process and make it available at all times on certain snippets. WDYT?
Thanks, @theodorusyoga, the snippet will be merged sooner or later after mentioned changes.

Thanks for reviewing @fejes713 :) Where do I need to add aria-live property, or do you want to add it by yourself?

@Chalarangelo please check the latest revision. Thanks

@Chalarangelo Yep, already added your suggestion role="alert".

aria-live with value polite could be added as well. I'd make that configurable somehow 👍 I'll update it this week hopefully.


S3 Bucket storage requires files to be public

I setup BookStack on an Ubuntu box on AWS using ngnix. Managed to configure S3 for storage using a user created in AWS IAM that has control of the bucket.
The files are successfully being upload to S3, however they aren't shown in the BookStack app correctly.

The URL used to show the image is the S3 object URL which of course returns an 'access denied'  error from S3.
Ideally it should proxy the connection to S3, using the credentials defined in the .env as part of the setup to retrieve the image and show it in the app.
Some googling later ... I am not a developer, but it looks like it should be possible to do it within the  server {} config in nginx - sample code that is designed for a full static site:
server {
    listen 80;
    server_name [MY_DNS];

location * {
    set $bucket           '[MY_BUCKET]';
    set $aws_access       '[MY_AWS_KEY]';
    set $aws_secret       '[MY_AWS_SECRET]';
    set $url_full         "$1";
    set_by_lua $now       "return ngx.cookie_time(ngx.time())";
    set $string_to_sign   "$request_method\n\n\n\nx-amz-date:${now}\n/$bucket/$url_full";
    set_hmac_sha1          $aws_signature $aws_secret $string_to_sign;
    set_encode_base64      $aws_signature $aws_signature;
    resolver               MYIP valid=300s;
    resolver_timeout       10s;
    proxy_http_version     1.1;
    proxy_set_header       Host $bucket.s3.amazonaws.com;
    proxy_set_header       x-amz-date $now;
    proxy_set_header       Authorization "AWS $aws_access:$aws_signature";
    proxy_buffering        off;
    proxy_intercept_errors on;
    rewrite .* /$url_full break;
    proxy_pass             http://s3.amazonaws.com;
}

Making the bucket public would also solve the issue, but that would make all content on their public.

Hi @homebrandcola,
Upon upload of files BookStack should automatically set the individual files to be publicly accessible in s3. I'm not very experienced in S3 but my assumption as to why your files are not being made public is maybe to do with the permissions for your IAM user?
Setting up NGINX to proxy S3 would still effectively make everything public so I don't think that achieves anything other than the ability to keep the same domain for images.  Originally I tried to put them behind the application authentication layer but  booting the whole application rapidly multiple times caused many issues. I'd still like to get around this at some point but It may take a more creative solution. In the settings is an option to add a random string to file names to make images harder to find via random access.

Any news with that @homebrandcola? I'm testing BookStack in local, but I need to use it in AWS, and S3 will be great (instead of use EBS in the local machine)

Closing due to lack of response. Feel free to still respond to my points above and I'll re-open this.


Playlist Support

Hello,
is it possible to add Playlist Support e.g.
https://www.youtube.com/playlist?list=.....?
For now an error message is displayed.

it seems it could be done by adding a view that once vlc is stopped then it opens next video.


Set VM dashboard annontation view off by default

Change the annotations for virtual machine checks in the virtual machine
dashboard view off by default. The Elasticsearch instance is not enabled
by default in our documentation or in a default ServiceTelemetry
manifest, so having this enabled by default can result in errors showing
up in the dashboard when you don't have the es_ceilometer data source.
Also changed the overlay colour from green to grey because the green
seemed a bit intense when looking at a 24 hour range (which is the
dashboard default).
Closes: rhbz#2173856

There is also a "recent events" panel that might cause issues, so I'll have to see how that works. I might have to fake a missing backend to really catch everything.


Problem sorting numerical columns

Summary of problem or feature request
When I try to sort numerical columns, Laravel DataTables seems to sort them alphabetically rather than numerically. For instance, "2" is considered larger than "12" because the first digit in "2" is larger than the first digit in "12".
Instead, 12 should be treated as larger than 2 because it is a larger number.
I've attempted to add the "html-num" type to DataTables on the client-side, but there seems to be no effect on the server-side sorting.
Code snippet of problem
https://github.com/cydrobolt/polr/blob/master/app/Http/Controllers/AdminPaginationController.php#L116
System details

Operating System: Fedora 25
PHP Version: 5.6
Laravel Version: 5.2
Laravel-Datatables Version: 6.0

cydrobolt/polr#294

Sorting is done via SQL side. Are you using integer type on clicks column?

You are using string on your clicks column which in turns sql treat it as string.
https://github.com/cydrobolt/polr/blob/master/database/migrations/2015_11_04_015813_create_link_table.php#L26

Oh, shoot. You're right. Thank you for pointing that out.


Litex SoC minitest

This test generates LiteX SoC design which utilizes VexRiscV CPU, DDR memory and Ethernet. The design is implemented using both Yosys+Vivado and Vivado only flow. Output bitstream(s) is then processed using bit2fasm utility which allows to identify missing degbits.

@mithro I agree. I decline this PR and will issue a new one.


upstream: implement Cluster's load_assignment field

Description:
This patch implements load_assigment field in CDS' Cluster.
This change specifically adds the implementation of the new load_assigment field
for clusters with discovery-type: STATIC, STRICT_DNS and LOGICAL_DNS.
While adding this load_assigment field implementation to Cluster,
this patch also allows specifying optional (active) health check config per specified upstream host.
Risk Level: medium
Testing: unit tests
Docs Changes:

This unhides docs for endpoint health check config

Release Notes: N/A
Fixes #439
Signed-off-by: Dhi Aurrahman<EMAIL_ADDRESS>

cc. @danielhochman

Thanks, @danielhochman. Updated in 18e98f4.

Since this is a re-submitted PR of #3261, probably this require @mattklein123 @alyssawilk @htuch and @zuercher to check too.


Suppress new pytest warnings spew.

See: https://docs.pytest.org/en/latest/warnings.html

Our tests actually trap for the warnings and assert they are raised.  This issue is suppressing new pytest behavior which injects the warnings into test run output even though we handle them.

Can you give an example of what you're referring to?

$ nox -e unit_tests
nox > Running session unit_tests(python_version='2.7')
nox > The virtualenv name was hashed to avoid being too long.
nox > virtualenv /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/.nox/695fcb8e -p python2.7
nox > chdir /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core
nox > pip install --upgrade mock pytest pytest-cov grpcio >= 1.0.2
nox > pip install --upgrade -e .
nox > py.test --quiet --cov=google.cloud --cov=tests.unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=97 tests/unit
....................................................................................................................................................................................................................................................................................................................................................................................................

Required test coverage of 97% reached. Total coverage: 100.00%
=============================== warnings summary ===============================
tests/unit/test_iam.py::TestPolicy::test_editors_setter
  /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/google/cloud/iam.py:110: DeprecationWarning: Assigning to 'editors' is deprecated.  Replace with 'policy[roles/editor] = members.
    DeprecationWarning)

tests/unit/test_iam.py::TestPolicy::test_owners_setter
  /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/google/cloud/iam.py:93: DeprecationWarning: Assigning to 'owners' is deprecated.  Replace with 'policy[roles/owner] = members.
    DeprecationWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
388 passed, 2 warnings in 1.68 seconds
nox > Session unit_tests(python_version='2.7') successful. :)
nox > Running session unit_tests(python_version='3.4')
nox > The virtualenv name was hashed to avoid being too long.
nox > virtualenv /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/.nox/3069abf7 -p python3.4
nox > chdir /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core
nox > pip install --upgrade mock pytest pytest-cov grpcio >= 1.0.2
nox > pip install --upgrade -e .
nox > py.test --quiet --cov=google.cloud --cov=tests.unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=97 tests/unit
....................................................................................................................................................................................................................................................................................................................................................................................................

Required test coverage of 97% reached. Total coverage: 100.00%
=============================== warnings summary ===============================
tests/unit/test_iam.py::TestPolicy::test_editors_setter
  /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/google/cloud/iam.py:110: DeprecationWarning: Assigning to 'editors' is deprecated.  Replace with 'policy[roles/editor] = members.
    DeprecationWarning)

tests/unit/test_iam.py::TestPolicy::test_owners_setter
  /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/google/cloud/iam.py:93: DeprecationWarning: Assigning to 'owners' is deprecated.  Replace with 'policy[roles/owner] = members.
    DeprecationWarning)

tests/unit/test_iam.py::TestPolicy::test_viewers_setter
  /home/tseaver/projects/agendaless/Google/src/google-cloud-python/core/google/cloud/iam.py:127: DeprecationWarning: Assigning to 'viewers' is deprecated.  Replace with 'policy[roles/viewer] = members.
    DeprecationWarning)

-- Docs: http://doc.pytest.org/en/latest/warnings.html

That is for these tests:

https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b0abcb295fde5bbab3b2f5793c8d5a8465113364/core/tests/unit/test_iam.py#L86
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b0abcb295fde5bbab3b2f5793c8d5a8465113364/core/tests/unit/test_iam.py#L105
https://github.com/GoogleCloudPlatform/google-cloud-python/blob/b0abcb295fde5bbab3b2f5793c8d5a8465113364/core/tests/unit/test_iam.py#L124

@tseaver Are you sure "always" is the filter we want? Isn't it "ignore"?

We want always so that the underlying "skip DeprecationWarnings and PendingDeprecationWarnings" default doesn't interfere with our ability to catch them in the test.

@tseaver We can just use mock.patch to verify the warning gets called in the test.

@dhermes warnings.catch_warnings is the clear-and-simple ways to verify that warnings are issued:  that is what that API is for.
In the wider scope:  the new py.test warning-nannyism is an opinion, and one which has caused grief elsewhere in the Python ecosystem (e.g., it broke the SQLAlchemy build).  Enabling it by default was a bad decision on their part.

I think you are both right.
It definitely strikes me as odd that py.test made such a major change (particularly in an incremental release). Additionally, there are warnings that you do not want to fail your build (e.g. PendingDeprecationWarning).
That said, I think @dhermes is right on the solution in this case. The warnings.catch_warnings API is for catching warnings, yes, but its purpose is for ignoring warnings in production, not in your test suite, and not if the thing you are trying to test is whether a warning happened. The catch_warnings context manager, for example, will not bomb out if it does not get a warning.
mock.patch.object(warnings, 'warn') seems to me to be the correct way to trap a warning in a test, in particular because not only do you not want to get the warning, but you also want to assert that the warning was called (e.g. warn.assert_called_once()). Your test should fail if the warning did not happen.


Create Extension Manager Class

Create a class for managing which extensions are supported, enabled and disabled in Atlas.
The class should be able to do the following:

Parse and validate an ISA string parameter to determine Atlas’s XLEN and supported extensions
Provide methods for enabling and disabling extensions with appropriate error checking (e.g. Atlas should fail is an unsupported extension is enabled)
Provide methods for handling reads and writes to the MISA CSR

@bdutro, Kathlene and I chatted about this effort for a bit and we agree this could live in Mavis (and probably should).  We also volunteered you to make the class.  :stuck_out_tongue_closed_eyes:

I'm thinking I would like the extensions (and whatever requirements they may have) to be defined in JSON. Right now I'm adding additional fields to the existing ISA JSONs, but we could also put that info in its own special JSON(s) if we don't want to mess with the current format. Thoughts?

@bdutro, that sounds good to me. I like the idea of special JSONs to communicate the supported extensions and their requirements. Are we still trying to keep Mavis generic?


L1 <> L2 Create2 Address Mismatch

Is your feature request related to a problem? Please describe.
@dmihal mentioned on twitter that due to how OVM bytecode is different from EVM bytecode, Create2 addresses on Optimism would be different from Create2 addresses in Ethereum. This can be problematic for UX e.g. when somebody sends ETH to a user on L2 and accidentally sends it on L1 to an address that does not exist. Normally, you could Create2 to claim that address, but here that's not possible due to this mismatch.
Describe the solution you'd like

Add a mapping(address => address) ovmToEVMBytecodeHash to the ExecutionManager
Allow passing the bytecode hash directly to the create2 address function
In the Create2 code, replace _bytecode with ovmToEVMBytecodeHash[keccak256(_bytecode)]. If the mapping at that key is empty, default to using keccak256(_bytecode).
Add a function for populating that mapping. It can be gated with a trusted admin key. The mapping could also be populated in the constructor of the execution manager.

The overhead from this is pretty small, just an extra lookup in the mapping, and I believe it fully addresses the issue. It'd also be nice if we had a list of "popular" bytecode hashes, to populate most of the needed keys in the mapping in the constructor.

I think that this is a very interesting mechanism and is worth strongly considering.  After mulling it over a bit, I think there could even be a further improvement: it seems very notable that the L1 code we are trying to make work with is unsafe code.  It feels like it might not violate much existing semantics to add a way to deploy something to the CREATE2 address which would correspond to that bytecode, but is technically impossible to deploy due to the code being unsafe.  In the extreme, you could do ovmCREATE3(_bytecode, _unsafeL1Bytecode) would never cause any potential collisions with ovmCREATE2, so long as we require ovmSafetyChecker.isBytecodeSafe(_unsafeL1Bytecode) == false.  At the very least, this would be sufficient to recreate all L1 addresses where the factory itself is deployed with an EOA.
Also, a short note on the possible implementation structure:
Due to the nature of how the fraud proofs and execution manager work together; storage is best done at authenticated predeploy addresses; so this would really entail an OVM_CREATE2Mapping contract which the EM talks to.  We do a similar thing and a more rudimentary version without a predeploy in the _putGasMetadata logic in the Execution Manager, but this ticket illustrates the need to generalize that in a more useful way.  I'll think about the best way to do it.)


Develop Defaults for Giving Forms Feature

https://giving.cu.edu/fund/cu-denver-alumni-scholarship-fund?amount=25&appeal_code=D1095
I just found out that you can add a suggested amount via query params. There are also some other form elements you can fill in as well from query params. This begs the question if all form fields should be included so this can be done on any form, or if this should only be piecemeal form to form.
Fund page form in function cu_fund_utilities_form_alter():

[ ] ?amount=50 with no suggested amount on the fund. Adds a $50 suggested amount radio in addition to the other donation radio options
[ ] ?amount=50with a default suggested amount on the fund overrides the default amount? I think that is the requirement.
[ ] ?recurring=monthly|quarterly|annually sets the recurring checkbox and corresponding frequency.

Not sure in function cu_fund_utilities_form_alter():

[ ] Comments are enabled or disabled by line items? Not sure what this means as I can't see any comments in the form on the fund page

I see other form fields' validation in the same module file and that will have to be addressed at some point, but at least this is a good start for having a pattern for query params logic on page load. react-hook-form allows for default form values, and hopefully, a simple solution like that can be used for requirements like the ones above.

This came up with porting the homepage and needs to be done.

@mattroush I'm putting this in review status. You mentioned a couple of query parameters I'm not aware of or what they specifically do. If you could look at the remaining checklist items in the description and comment on them, that would help. We don't have to get them all now, but at least all the basic "features" for "query param state modifications" should be addressed now.
So far we have:

alter default form values
do something with analytics/user tracking
...maybe redirect the user

Feel free to post links to docs or things elsewhere.


Feat/vmap seeds

What?
Add the option of vmapping over multiple seeds.
Why?
We believe this will help in speeding up running experiments compared to run the different seeds sequentially
How?
After pmap over the devices, inside each device we firstly vmap over the different seeds.
Extra
We need to double check that running different seeds simultaneously won't impact the step per second value (sps)
Merge #920 before reviewing this.

Seemed to be slower than just running sequentially, likely an issue where we were oversubscribing the cores on the accelerator. So closing it for now :shrug:


Added cards and links in About page

Issue #4

Added individual cards for members
Added available contact links (some links are still empty due to unavailability)

I just saw this PR. I must say really great work @devgoel186. You even got the social button working. Looking forward to more contributions from you.

@devgoel186
Has the contact name and title name intentionally moved up?

@varunbankar
Yes, few of the cards' contents were overflowing between a particular range of the browser window.  I reduced the top margin of the container from 200px to 150px.


fix: Fix svace issue Redundant null check

Pull Request
Description
PR contains a fix for the issue Redundant nullcheck of repoLicense.
Also, after modification of the main code, unit tests were updated as well.
Type of change
Please delete options that are not relevant.

[X] 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 not work as expected)
[X] Code cleanup/refactoring
[ ] Documentation update
[ ] This change requires a documentation update
[ ] CI system update
[X] Test Coverage update

Testing
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.
Test Configuration:

Java: v17
LPVS Release: v1.5.0

Checklist:

[X] My code follows the style guidelines of this project
[X] My code meets the required code coverage for lines (90% and above)
[X] My code meets the required code coverage for branches (80% and above)
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.33%. Comparing base (c1db058) to head (2b7e01d).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #518      +/-   ##
============================================
- Coverage     91.34%   91.33%   -0.01%
+ Complexity      517      516       -1
============================================
  Files            48       48
  Lines          1733     1731       -2
  Branches        209      208       -1
============================================
- Hits           1583     1581       -2
  Misses           83       83
  Partials         67       67

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


Android NDK w/ Boost

I've read Brief overview section and do understand basic concepts. Yes
I've read F.A.Q. section and there is no solution to my problem there. Yes
I've read Code of Conduct, I promise to be polite and will do my best at being constructive. Yes
I've read Reporting bugs section carefully. Yes
I've checked that all the hunter_add_package/find_package API used by me in example is the same as in documentation. Yes
I'm using latest Hunter URL/SHA1. No

I've noticed that Hunter is using the CMAKE_ANDROID_ARCH variable to set the address-model value used when compiling Boost:
https://github.com/ruslo/hunter/blob/78c5b2419487cd3bd7ad9ff93e0ece77a7966f05/cmake/projects/Boost/schemes/url_sha1_boost_library.cmake.in#L296-L300
This value isn't set by the Android NDK toolchain - it's instead ANDROID_SYSROOT_ABI (cf here).
Related to #618 and the discussion we've had previously regarding the NDK toolchain vs the Android toolchain (https://github.com/ruslo/hunter/issues/618#issuecomment-354015015)
I believe that #1630 is a similar issue.

I've noticed that Hunter is using the CMAKE_ANDROID_ARCH variable to set the address-model value used when compiling Boost

This value isn't set by the Android NDK toolchain - it's instead ANDROID_SYSROOT_ABI (cf here).

I've already expressed my opinion in https://github.com/ruslo/hunter/issues/618 - CMAKE_ANDROID_ARCH variable is part of official documentation:

https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARCH.html

I don't see the point of supporting two set of Android variables. @arcanis what is the question exactly?
And also as mentioned in the same https://github.com/ruslo/hunter/issues/618 discussion you can use this trick to load Android NDK toolchain and have CMake friendly variables.

At the very least it makes the issue more searchable for people with similar issues.
At the very best I think for the sake of a good developer experience it would make sense to do best effort to support both variables when possible - those issues are typically very frustrating and hard to debug.

I'll also open an issue on the NDK repository to get their insight

At the very least it makes the issue more searchable for people with similar issues.

Feel free to add a F.A.Q. section

At the very best I think for the sake of a good developer experience it would make sense to do best effort to support both variables when possible

You can make a fork, support both sets of variables, fix all issues in all related packages (e.g. OpenCV: https://github.com/hunter-packages/opencv/commit/6b1ca6faa66ea0c2a64c2c51781a6873de90e774), maintain this fork for some time, then see how much attention it will get. If it will be a good experiment I will think about merging it to master. Deal? :)

I already spend a lot of time supporting Yarn (the open-source JS package manager), I unfortunately can't commit to other ones :)
Still, package management in the C++ space is an interesting problem and I'd be curious to see whether something could be started with the C++20 Modules TS. Maybe something radical that wouldn't necessarily try to support existing build chains by default.

@arcanis Please close this discussion if you're not planning any actions.


Group meeting: Thursday at 8pm

review all functions and tests
finalize the milestone 2
address any issue arise

tested the function, fixed the input and output issues
updated the docstring in each function


iOS app build issue

Hello, thanks for the library.
I have created a KMM project (using 1.4.10 and the new android studio plugin) and getting on alright with the Android side.
Added new dependency to commonMain (implementation("dev.gitlive:firebase-auth:1.0.0")) and now when I try to build iOS app it shows the following error:
** BUILD FAILED **

The following build commands failed:
	PhaseScriptExecution Run\ Script /Users/user/StudioProjects/testKmmFirebase/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Script-7555FFB5242A651A00829871.sh
(1 failure)

Android app works as expected.
Android Studio version: 4.1.1

@Daeda88 @thoutbeckers do you guys have this issue?

This is just the gradle task (from the KMM project) failing when run from Xcode, not an actual issue. Could be a lot of things. Somewhere Xcode is dumping the actual output of the gradle task with the actual error.
But we use the auth artifact on iOS successfully, so it should be possible to make it work.

I tried to run it from Xcode and Android studio. The error message is the same for both cases. Which version of the library you are using?

I have the same problem with my gradle build on iOS after updating to 1.0.0. In my case, the gradle daemon consistently dies, and without any error messages:
[... some compiler warnings (no errors)...]
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=c8792bd7-5af3-4c02-bf85-cfcc33bfdd87, currentDir=/Users/raman/source/foo/iosApp/Pods}
Attempting to read last messages from the daemon log...
Daemon pid: 6471
  log file: /Users/raman/.gradle/daemon/6.7.1/daemon-6471.out.log
----- Last  20 lines from daemon log file - daemon-6471.out.log -----
[...same warnings as above, no other useful errors]
----- End of the daemon log -----

Using Gradle 6.7.1, JDK 11 for the build.

solution in #111


Better KUTTL Testing Context

Recent challenges by new KUTTLers, it was hard to know:

Was the connection with kubernetes cluster working and
Was kuttl pointing to the correct location for tests

This PR resolves that... KUTTL previously had connect failure messages with:
Bad local config
 harness.go:572: fatal error getting client: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

or bad connection with:
harness.go:572: fatal error getting client: Get "https://<IP_ADDRESS>:63473/api?timeout=32s": dial tcp <IP_ADDRESS>:63473: connect: connection refused

However... the absence of this doesn't reinforce comfort... this PR adds the following message after a good connection:
 harness.go:274: Successful connection to cluster: https://<IP_ADDRESS>:63473

Additionally, it is hard to know if users are pointing their testsuite dir to the right location... Adding in a message that will indicates that:
harness.go:354: testsuite: /Users/kensipe/projects/playground/e2e has 1 tests

Signed-off-by: Ken Sipe<EMAIL_ADDRESS>

WDYT about refusing to run a suite with 0 tests @kensipe ?


Add reserved keywords

Hello!
Gleam has some reserved keywords. Would it make sense to add these to the grammar? So they get highlighted appropriately if used.
https://github.com/gleam-lang/gleam/blob/0008b79d2eedfa2dd4d13efd67fa063e7ada285d/compiler-core/src/parse.rs#L2792-L2793
Thanks,
Louis

I changed the reference highlights a little so that these highlight as warnings: https://github.com/gleam-lang/tree-sitter-gleam/commit/78123c13e3328b52f989610d8c49f762ce8559db
I think we want to hold off on adding them to the parser for now - I think we want to wait until we know how they might be used in the future so we can parse them correctly

Nice, thank you


app always exit on backbutton if focus is on ad view, if ad banner overlay=false

Very strange that if my overlay=true for ad banner, my $ionicPlatform.registerBackButtonAction and onHardwareBack work perfectly, when user click on back button it will back to previous state or prompt toast message before user exit. But once I change the overlay=false (by default) for ad banner, it will cause problems. Whenever the app was at main page or other page, when i click onHardwareBack it will direct exit the apps without going back previous state or prompt toast message. And I found that if my overlay=false, before the ad banner was load, the onHardwareBack still able confirm to work correctly, after the ad banner was loaded and appear, whole screen like being refresh and onHardwareBack will become not working correct. But overlay=true don have this issue at all.
Remark: I already try many difference method like deviceready, addeventlistener onAdload only call that function of ionicPlatform.registerBackButtonAction also not working. My platform is android, with newest cordova.js 4.0.2. Node v0.12.4 and cordova CLI also newest v5.1.1.
Below is my code.
angular.module(XXXX)
.config(XXX) {
$stateProvider.
    state('menu', {
       XXXX
    }).
    state('menu.about', {
        XXX
    }).
    state('menu.setting', {
       XXX
    }).
    state('menu.main', {
        XXX
    });

$urlRouterProvider.otherwise('XXXX');

})
.run(function($ionicPlatform, $localStorage, $rootScope, $location, $timeout, $ionicHistory, $cordovaToast, $state,) {
$ionicPlatform.ready(function () {

    if(window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
    }

    if(window.StatusBar) {
      StatusBar.styleDefault();
    }

    //Admob
    var admobid = {};
    if( /(android)/i.test(navigator.userAgent) ) {
        admobid = { // for Android
            banner: 'XXXX',
            interstitial: 'XXX'
        };
    } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
        admobid = { // for iOS
             banner: 'XXXX',
             interstitial: 'XXX'
        };
    } else {
        admobid = { // for Windows Phone
             banner: 'XXXX',
             interstitial: 'XXX'
        };
    }

    AdMob.createBanner( {
        adId:  admobid.banner,
        isTesting: false,
        overlap: true,
        offsetTopBar: false,
        position: AdMob.AD_POSITION.BOTTOM_CENTER,
        autoShow: true
    } );

    AdMob.prepareInterstitial({
        adId:  admobid.interstitial,
        autoShow: false
    });
});

$ionicPlatform.registerBackButtonAction(function (e) {

    if ($location.path() == '/menu/main') {
        if ($rootScope.backButtonPressedOnceToExit) {
            if(AdMob) AdMob.showInterstitial();
            ionic.Platform.exitApp();
        } else {
            $rootScope.backButtonPressedOnceToExit = true;
            $cordovaToast.showShortTop('Press again to Exit :)');
            setTimeout(function () {
                $rootScope.backButtonPressedOnceToExit = false;
            }, 2000);
        }
    }else if ($ionicHistory.backView()) {
        $ionicHistory.goBack();
    } else {
        $state.go($rootScope.previousState);
    }
    e.preventDefault();
    return false;
}, 101);

});

Hi,
I encounter the exact same problems (screen refreshing and back button exiting the app after ads loaded).
Any news on this?

too sad no good news :(

Will look into this issue.

thank you, will wait you good news :+1:

I think it must be because the Adview (banner) takes the focus afer being shown, so the back button makes the app close. Fix should be to refocus the webview right after the ad is displayed.

Thanks for looking into this!
If it helps, I also experienced the same issue with the Mopub Plugin Pro plugin, leading me to believe the issue is possibly in the GenericAdPlugin class.

Yes it is probably in GenericAdPlugin class. But as it is contain in a .jar file, im affraid there is no way for us to look into it :(

Since cordova-android v4.x, the cordova core code has been changed a lot, especially in the layout, some heavy refactoring was done to support it, may introduce some unexpected defects. Will look into it, thanks for your detailed feedback.

Hi! Any news on this?
Thanks in advance!

No news yet. I am also waiting for this. The problem is we can not edit GenericAdPlugin's class code, only floatinghotpot can, so only him can help us. The best would be to share that code so anyone of us could fix the problems.

I've checked the code and don't find it's caused by generic code. Before the root cause is identified, I'd like to suggest you a workaround to avoid using split view of ad banner, use overlap:true, then set margin bottom of body element.

Yes. Using overlap:true works fine. I changed it on my project. Anyway it would be great not to loose the benefits of not overlapping the ads.

Indeed overlap:true is clearly the only solution. It can be pretty annoying if you have fixed elements, but as overlap:false is not usable at all an android, it is the only choice left ^^
Thanks for the tip ;)

This is my solution for this issue. Hope it helps you out guys.
From fe0cec5f2fee5035d6ec7835def728ebb4fbe238 Mon Sep 17 00:00:00 2001
From: Vu Le<EMAIL_ADDRESS>Date: Sat, 1 Aug 2015 00:10:28 +0700
Subject: [PATCH] * fix #29: back button is not handled after orientation
 changed

the reason is 'cordova-admob-pro' banner occupies the webview's focus, this makes back key events can not be handled by the webview, but CordovaActivity.
---
 .../src/org/apache/cordova/CordovaActivity.java    | 23 ++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java b/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java
index 3195fc0..ca6d851 100644
--- a/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java
+++ b/platforms/android/CordovaLib/src/org/apache/cordova/CordovaActivity.java
@@ -37,6 +37,7 @@ import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.View.OnFocusChangeListener;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager;
@@ -95,6 +96,8 @@ public class CordovaActivity extends Activity {
     protected ArrayList<PluginEntry> pluginEntries;
     protected CordovaInterfaceImpl cordovaInterface;

+    protected boolean foreground = true;
+
     /**
      * Called when the activity is first created.
      */
@@ -174,8 +177,16 @@ public class CordovaActivity extends Activity {
             // Background of activity:
             appView.getView().setBackgroundColor(backgroundColor);
         }

         appView.getView().requestFocusFromTouch();
+
+		 // this workaround fixes focus lost after 'cordova-admob-pro' banner showed
+        appView.getView().setOnFocusChangeListener(new OnFocusChangeListener() {
+            @Override
+            public void onFocusChange(View v, boolean hasFocus) {
+                if(!hasFocus && CordovaActivity.this.foreground) {
+                    CordovaActivity.this.appView.getView().requestFocusFromTouch();
+                }
+            }
+        });
     }

     /**
@@ -220,6 +231,8 @@ public class CordovaActivity extends Activity {
      */
     @Override
     protected void onPause() {
+        foreground = false;
+
         super.onPause();
         LOG.d(TAG, "Paused the activity.");

@@ -244,6 +257,8 @@ public class CordovaActivity extends Activity {
      */
     @Override
     protected void onResume() {
+        foreground = true;
+
         super.onResume();
         LOG.d(TAG, "Resumed the activity.");

@@ -457,7 +472,7 @@ public class CordovaActivity extends Activity {
         }
     }

@thenewvu It works well.. :+1:

@thenewvu Thank you, I finally got around to testing this in my project and it seems to be working.  Thank you for your solution and explanation!

Thanks to @thenewvu, the solution works pretty well.
I tried to get this handled by plugin itself, but unfortunately it cannot. So modifying the CordovaActivity.java seems the only working solution so far.

Can someone be clear as to where exactly the code is to be placed? Full file path and location of the code.


How to use Y-Sort?

Normally you have to enable Y-Sorting on a per-layer basis on the Tilemap - but since the Tilemap is created via import and can't be edited, is there a different way of accomplishing this?

You can write a Level Post-Import script that will set y_sort_enabled on each TileMap node. You can adapt this script to further specify which TileMaps/Layers you want to toggle.
@tool

## Level Post-Import: Add Y-Sort

func post_import(level: LDTKLevel) -> LDTKLevel:

	for child in level.get_children():
		if not child is TileMap:
			continue

		# Set Y-Sort on TileMap node
		child.y_sort_enabled = true

		# Set Y-Sort for all TileMap layers
		for index in range(child.get_layers_count()):
			child.set_layer_y_sort_enabled(index, true)

	return level


Response Header editing issues

Response headers dont get properly modified. Only Location seems to be working properly when used with 30X.
There is at least one unit test that shows it should work https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/web_tests/http/tests/inspector-protocol/fetch/fetch-binary-headers.js;l=50?q=binaryResponseHeaders&ss=chromium
fetch('/subresource').then(r =>
          [r.headers.get('X-Test-Header'), r.headers.get('X-Another-Header')])

with
  helper.onceRequest().fulfill({
    responseCode: 200,
    binaryResponseHeaders: btoa('X-Test-Header: hétérogénéité\0X-Another-Header: value'),
    body: ""
  });

however, since this works for location, it's possible there's something else broken here.

this needs a short reproducer that just does the exact same thing as the test, but from a chrome extension.

it's possible that responding with fulfillRequest too late (after headers are received) might not be possible. this means that to make this work, we would need to always redirect the user, to a same-origin URL, and intercept that request and return a response instead.

just tried to fulfillRequest at request time, and it didn't fix it

https://github.com/subwaymatch/cdp-modify-response-example implies this works

One theory, is that response header modifications only really apply to some logic. Such as that implemented here https://source.chromium.org/chromium/chromium/src/+/master:content/browser/devtools/devtools_url_loader_interceptor.cc;l=1009;drc=7228a109083df80bef55725fc4bc7b92896d355f
That would explain why some things work, but not others.

If it's ultimately not possible to fix this, it's still possible to hack around this by mixing debugger API with webRequestBlocking

this works https://bugs.chromium.org/p/chromium/issues/detail?id=1162738
i have no idea why it didnt work for me before

this works https://bugs.chromium.org/p/chromium/issues/detail?id=1162738
i have no idea why it didnt work for me before

Hi @sirdarckcat .  I am having this very issue.  I am trying to update the cache-control header on a response im working on and it doesnt want to update. I am on version 2.0.9 on Chrome Version 108.0.5359.94 (Official Build) (64-bit) on a Debian-base Linux distro. I cannot, in fact, seem to do ANYTHING to the headers, though i can change the response body.  Should I open a new ticket? The effect seems to be the same as described at the first message of the issue.


Download is not a .sketchplugin

FYI, when downloading plugin as zip, and unzipping, you get a folder full of files.  Not a .sketchplugin bundle.  Your readme says to double-click the sketchplugin to install but there is none.
I know from experience to add a ".sketchplugin" extension to the folder, click ok on the Finder warning, and then poof there's the sketchplugin.  Double-clicking THAT adds it to Sketch, and then it works fine.

You are totally right, @smlombardi. I will update the README file right away. Thank you very much for letting me know!

I think it's fixed now. I'll close the issue. Thank you again!


The site is down

The main site is not loading
https://flowbite.com/docs/plugins/datepicker/
ERR_NAME_NOT_RESOLVED

Hey @RadekHavelka,
We're looking into the problem - until then feel free to download the repo locally and use it.
Cheers,
Zoltan

Should work now - it was something out of our control. Can you please check again?


About L515 hand-eye calibration.

Required Info

Camera Model
L515

Firmware Version
<IP_ADDRESS>

Operating System & Version
Win 10

Platform
PC

SDK Version
2.50

Language
C++

Segment
Robot

I bought both D435i and L515 cameras a few weeks ago for my project which applies machine arm and camera in the "eye in hand" way. And I have done some hand-eye calibration experiments. When I use D435i(high accuracy preset) the results are pretty fine. But when I change the camera to L515(short-range preset) and do the experiment in the same way, the results seem to be worse. After that, I repeated the experiment in a room without a window but I got the same worse results. Does it mean that the L515 has bad positioning accuracy or just because I didn't use it in the right way? Thanks.

Hi @Jasonwyh  How close is the camera to the object that is being observed, please?
The D435i has a default minimum depth sensing distance of 0.1 meters / 10 cm, enabling it to get near to the surface of objects.  The L515 though has a larger minimum depth sensing distance of around 0.25 m / 25 cm, meaning that it cannot be positioned as close to a surface as the D435i.  When the camera gets closer to the observed surface than the minimum distance then the depth image will start breaking up, becoming progressively worse as the camera moves closer to the surface.

Hi @Jasonwyh How close is the camera to the object that is being observed, please?
The D435i has a default minimum depth sensing distance of 0.1 meters / 10 cm, enabling it to get near to the surface of objects. The L515 though has a larger minimum depth sensing distance of around 0.25 m / 25 cm, meaning that it cannot be positioned as close to a surface as the D435i. When the camera gets closer to the observed surface than the minimum distance then the depth image will start breaking up, becoming progressively worse as the camera moves closer to the surface.
The L515 lidar technology camera also has some behavioral differences to the 400 Series cameras that use stereo technology. For example, if it is faced straight towards a smooth surface then it may have difficulty reading it. Orienting the camera at an approximate 30 degree angle may improve depth sensing results, as shown in the image below.

The L515's depth sensing may also react differently to some materials compared to the 400 Series. For example, if a transparent plastic bottle is observed then the camera may look straight through the bottle and only register the depth detail of the non-transparent objects behind it.
The L515's official user guide document, if you have not seen it already, is an excellent reference for tuning the camera. It can be obtained at the link below.
https://support.intelrealsense.com/hc/en-us/articles/360051646094-Intel-RealSense-LiDAR-Camera-L515-User-Guide

Thank you very much for your replying. I have read the user guide before. The board is just paper with QR code on it. And I have noticed the distance factor already so when I did the experiments, the distance is about 30-40 cm. But as I described a few days ago, the results seem to be not fine.

There is another case at the link below where bad distance results were being obtained from hand eye calibration with an L515.
https://www.reddit.com/r/computervision/comments/n46l5b/hand_eye_calibration_with_opencv/
There is also a hand-eye calibration paper at the link below where D455 and L515 cameras were calibrated against a chessboard image at different distances.  The results of their error checks and their conclusions about them are on pages 71-73    (the digital PDF document page numbers, not the numbers on the bottom of the document pages).
https://thesis.unipd.it/bitstream/20.500.12608/29062/1/Allegro_Davide.pdf
They concluded that in their tests, the L515 had excellent accuracy.

Hi @Jasonwyh  Do you require further assistance with this case, please?  Thanks!

Hi @Jasonwyh Do you require further assistance with this case, please? Thanks!

I have read the reference link and actually, I thought maybe L515 is just more suitable for some long-distance(>1m) cases. I decided to use D435i eventually. But still, thank you very much.

Thanks very much @Jasonwyh for the update!  As you have resolved your issue by changing camera models, I will close this case.  Thanks again!


Improve the API landing page experience

Is your feature request related to a problem? Please describe.

Describe the solution you'd like
All the page offers is a link to the Swagger docs, maybe https://api.adoptium.net/ should just serve up the Swagger docs as per https://api.adoptium.net/q/swagger-ui/
Describe alternatives you've considered
Alternatively, if we want to keep the existing page, enhance the landing page to be a bit more informative.
Possibly including links into the GitHub repo ("Fork me" style) for contributions would be nice.

Hi @karianna I am an outreachy applicant & would like to work on this issue, can you assign this to me?

Hi @karianna I am an outreachy applicant, can I work on this issue?

@sakshi1215 Please go ahead!

hello @karianna can i also work on this ,am also an outreachy applicant

@acoj202 please check with @sakshi1215 on Slack to see if you can work on it together.

@sakshi1215 can we work on this project together

@acoj202 I think its addressed in PR #500 @karianna is there anyhting more?

@johnoliver I think we need a new release

@johnoliver I think we need a new release

Is there a CD pipeline which updates the website or we need to just create a release tag?

John has to push manually from staging to live (we always have a Human in the loop as the API is critical)


fix(get-started/index): resolve videos responsiveness issues

Proposed changes
I saw the following and thought it should be more responsive, so I made it fit the container's (😉) size.

@dockertopia @usha-mandya


Question about Test cases

Just one question.
If need to test UI. I need to set public/internal for the class members which are UI Control.
Because I need to compare dependency value(mock data) with the value in UI.
I used to set private/fileprivate to prevent UI member from changing by outside.
How to use dependency but still keep members safe.
Thanks

I'm sorry, but for now, it's difficult for me that understanding gist of your question. Is it relevant to this library?
If you can explain detail with code, It's possible to help me.

Sorry I havent explained it clearly.
Library is OK. Also it helped me understand DI more clearly. Thanks
Because I prefer to write UI by using codes. I think in one class it is unnecessary to set all class members be public/internal. Especially in the teamwork. it will make source codes safe.
For example
✅
Class OneViewController {
private let someView = UIView()
}
❌
Class OneViewController {
let someView = UIView()
}
I read the test case like this.
XCTAssertEqual(tableCells[0].label.text, "1")
If using code. cell should set ''label'' property -> public/internal.
How do you think about access modifiers or protection level?
I hope you can get my point. lol


First example in the docs broken on OSX

Using the example in this tutorial: https://toga.readthedocs.io/en/latest/tutorial/tutorial-0.html
I get the following error:
Traceback (most recent call last):
  File "toga_test.py", line 25, in <module>
    app.main_loop()
  File "/Users/santiagobasulto/.virtualenvs/toga/lib/python2.7/site-packages/toga_cocoa/app.py", line 103, in main_loop
    self._startup()
  File "/Users/santiagobasulto/.virtualenvs/toga/lib/python2.7/site-packages/toga_cocoa/app.py", line 92, in _startup
    self.startup()
  File "/Users/santiagobasulto/.virtualenvs/toga/lib/python2.7/site-packages/toga_cocoa/app.py", line 99, in startup
    self.main_window.content = self._startup_method(self)
  File "toga_test.py", line 15, in build
    button.style.set(margin=50)
AttributeError: 'Button' object has no attribute 'style'

It appears PyBee pushed a new CSS based layout system 7 days ago but the pip package hasn't been updated to reflect this yet. You can manually install the latest version directly from Github using pip install git+https://github.com/pybee/toga.git but I don't know if you'll also have to update other packages such as toga-cocoa to get it to work.

@santiagobasulto @elstob's comment is correct - the tutorial isn't updated for the new code. I apologise for the disconnect - I'm in the process of cleaning things up.

Trying to run the first example of toga. Ended up shaving yaks :D A little bit of irony :)
What to use instead of style? or is this abandoned now?

Actually i'm starting out developing in python, and really see that toga would be a great thing, is there anyway I could contribute, consider that i'm quite a newbie and never contributed to a project :) Let me know if I can help out somehow.

The problem still persist. I don't mean to push, but is there a way to fix it by now? :)

This has now been resolved by the 0.2.0 release.


blanket: 0.6.0 -> 0.7.0

Description of changes

Update to 0.7.0
Modernize package by

moving it to pkgs/by-name
using src.hash rather than src.sha256
avoiding with lib; in meta (see #208242 for details)
sorting meta attributes alphabetically

Closes #308146
ℹ Unfortunately I'm unable to test this PR mysql as I do not have access to a Linux machine. Any help testing this manually in addition the GitHub checks is much appreciated (friendly nudge to @NovaViper 🙂)

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Also this version update requires libadwaita 1.5.0 which is not yet available on nixpkgs. It is expected to be updated as part of GNOME-46 PR https://github.com/NixOS/nixpkgs/pull/291339
Please hold off until the PR is merged (or you can target the gnome-46 branch I think?)

Thanks for testing and providing the helpful feedback, @JohnRTitor. Happy to target the gnome-46 branch, if @amaxine approves.

@afh ran nixpkgs-review against NixOS/nixpkgs@c10b1bb0 (which is where the nixos-unstable-small branch is at currently on my flake), and this was the result of the build
blanket> [49/50] Generating data/resources/blueprints with a custom command
blanket> FAILED: data/resources
blanket> /nix/store/63sam12i6zzcv5z644xpyzrhyji01c7c-blueprint-compiler-0.12.0/bin/blueprint-compiler batch-compile data/resources/. ../data/resources ../data/resources/about.blp ../data/resources/preferences.blp ../data/resources/preset-chooser.blp ../data/resources/preset-dialog.blp ../data/resources/preset-row.blp ../data/resources/sound-context-menu.blp ../data/resources/shortcuts.blp ../data/resources/sound-item.blp ../data/resources/volume-row.blp ../data/resources/window.blp
blanket> error: Namespace Adw does not contain a type called AboutDialog
blanket> at ../data/resources/about.blp line 4 column 5:
blanket>    4 |Adw.AboutDialog about {
blanket>      |    ^
blanket> hint: Did you check your spelling?
blanket> hint: Are your dependencies up to date?
blanket>
blanket> ninja: build stopped: subcommand failed.
error: builder for '/nix/store/y2n2dwyv7ahj3q3wiilvbyhmm7x0z17s-blanket-0.7.0.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED: data/resources
       > /nix/store/63sam12i6zzcv5z644xpyzrhyji01c7c-blueprint-compiler-0.12.0/bin/blueprint-compiler batch-compile data/resources/. ../data/resources ../data/resources/about.blp ../data/resources/preferences.blp ../data/resources/preset-chooser.blp ../data/resources/preset-dialog.blp ../data/resources/preset-row.blp ../data/resources/sound-context-menu.blp ../data/resources/shortcuts.blp ../data/resources/sound-item.blp ../data/resources/volume-row.blp ../data/resources/window.blp
       > error: Namespace Adw does not contain a type called AboutDialog
       > at ../data/resources/about.blp line 4 column 5:
       >    4 |Adw.AboutDialog about {
       >      |    ^
       > hint: Did you check your spelling?
       > hint: Are your dependencies up to date?
       >
       > ninja: build stopped: subcommand failed.
       For full logs, run 'nix log /nix/store/y2n2dwyv7ahj3q3wiilvbyhmm7x0z17s-blanket-0.7.0.drv'.
error: 1 dependencies of derivation '/nix/store/n0l5h6yg3085mxf6lqfbfm6gchyc9mrl-review-shell.drv' failed to build
┏━ 1 Errors:
┃ error: builder for '/nix/store/y2n2dwyv7ahj3q3wiilvbyhmm7x0z17s-blanket-0.…
┣━ Dependency Graph:
┃ ┌─ ⚠ blanket-0.7.0 failed with exit code 1 after ⏱ 2s in buildPhase
┃ ⏸ review-shell
┣━━━ Builds
┗━ ∑ ⏵ 0 │ ✔ 0 │ ⏸ 1 │ ⚠ Exited after 1 build failures at 11:02:06 after 6s

Link to currently reviewing PR:
https://github.com/NixOS/nixpkgs/pull/308159

1 package failed to build:
blanket

Result of `nixpkgs-review pr 308159` run on x86_64-linux [1](https://github.com/Mic92/nixpkgs-review)

  1 package failed to build:

blanket

@amaxine Can this be targeted to gnome-46 branch?

The gnome-46 branch was manually merged into the latest staging-next https://github.com/NixOS/nixpkgs/pull/306080, which should be available in a few days.

I'm only responding because of the direct ping, however since my work on the Gnome 46 update I have left in protest. It's unclear to me whether the latest board statement will yet lead to meaningful changes, so I'd request you don't ask further assistance of me. Sorry for that not being clear in the Gnome 46 PR itself.
@JohnRTitor @afh please don't target this to gnome-46, that branch was merged into staging already (but not in a way that is marked the github PR as merged). You can probably retarget this to staging-next, or just wait until that lands in master.
@NovaViper this PR won't build on top of current master as it depends on newer versions of most likely libadwaita and gtk. Those are already in staging-next.

staging and staging-next are used to test changes that require many rebuilds and testing, and this PR by itself doesn't meet the criteria for targeting staging-next.
The most preferable branch wougnome-46 branch is not maintained anymore.
So, moving on,

Closing this as something went wrong while trying to retarget staging-next. Apologies to everyone getting an unnecessary ping on this ☹


Update cumulative provinicial data 29 May 2020

Has the following updates:

Deaths
Confirmed
Recoveries

For cumulative provincial data set.

@vukosim note the 32 unknown cases that have been highlighted. I suppose we just add them to the confirmed file only and not the deaths and recoveries files? Seems like it is only listed under the new cases section for the following alert https://www.nicd.ac.za/covid-19-update-71/


Suggestions not match current selected interpreter

Type: Bug

Behavior
Inconsistent suggestions

Steps to reproduce:

Create native Python REPL with python 3.7
type an
accept anext suggestion and press Enter

Diagnostic data

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

XXX

Behaviour
XXX
Steps to reproduce:

XXX

Diagnostic data

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

XXX

Extension version: 2024.16.0
VS Code version: Code 1.94.0 (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Windows_NT x64 10.0.22631
Modes:

Python version (& distribution if applicable, e.g. Anaconda): 3.7.9
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
Value of the python.languageServer setting: Default

User Settings

languageServer: "Pylance"

Installed Extensions

Extension Name
Extension Id
Version

Bracket Select
chunsen.bracket-select
2.0.2

CodeSnap
adpyke.codesnap
1.3.4

Convert To ASCII Art
BitBelt.converttoasciiart
1.0.3

Error Lens
usernamehw.errorlens
3.20.0

Fast Compare
DavidKol.fastcompare
1.2.1

Fluent Icons
miguelsolorio.fluent-icons
0.0.18

Git History
donjayamanne.githistory
0.6.20

Hex Editor
ms-vscode.hexeditor
1.10.0

Indent Nested Dictionary
mgesbert.indent-nested-dictionary
0.0.4

JavaScript Debugger
ms-vscode.js-debug
1.94.0

JavaScript Debugger Companion Extension
ms-vscode.js-debug-companion
1.1.3

Jupyter
ms-toolsai.jupyter
2024.9.1

Material Icon Theme
PKief.material-icon-theme
5.11.1

Modern Chromo
undefined_publisher.modern-chromo
0.0.1

Pylance
ms-python.vscode-pylance
2024.9.2

Python
ms-python.python
2024.16.0

Python Brackets
OrangeX4.python-brackets
1.4.2

Python Debugger
ms-python.debugpy
2024.6.0

Python Paste And Indent
hyesun.py-paste-indent
0.3.0

Ruff
charliermarsh.ruff
2024.50.0

Select Line Status Bar
tomoki1207.selectline-statusbar
0.0.2

Swap Selection with Clipboard
LukaszPolowczyk.swap-selection-with-clipboard
1.2.6

Table Visualizer for JavaScript Profiles
ms-vscode.vscode-js-profile-table
1.0.10

Trailing Spaces
shardulm94.trailing-spaces
0.4.1

WSL
ms-vscode-remote.remote-wsl
0.88.4

Those errors are not being reported by Pylance. We don't have the string 'Undefined name' anywhere in our code.
For me, that's what Ruff reports:

Can you do this in the REPL?
import sys
sys.version

For me, the interpreter is not the one I set in my python file, it's always the global python. That would explain why Pylance is getting the wrong completion output.

Oh the Python REPL lets me change it. If I force it to 3.9, I don't get anext in the completions:

Can you include the output of the Python Language Server. Although it would include all the other files and notebooks you have open. It would be best to include the output after closing all windows, then clear the Python Language Server output, and then create a Python REPL.
Pylance thinks the REPL is using a Python greater then 3.10, but the output should show which interpreter it's being told is in use.

Yeah, this seems like the problem:
"c:\Users\Tester\.vscode\extensions\ms-python.vscode-pylance-2024.9.2\dist"

That's not a valid pythonPath. Not sure where it's coming from. It looks like it's using the current working directory for some reason. Internally that would likely just call us to call 'python' by itself to compute the site-packages and version information.


Expose http response headers

I have a situation where we have information being returned from the server which is not part of the GQL response. Specifically, we add "upgrade_recommended" to the response header so our apps know to show the user a dialog to indicate "hey, you'll need to update your app version soon". We don't block the user from using the app, so it's not an error. It's just a way for us to make sure users have enough warning in advance before we stop supporting that version of the app.
I know that we can add an Interceptor to the OkHttpClient, which we do for logging, but this is a scenario where we would want a specific "screen" to handle the info and update UI for the user.
From what I can see, Response is passed from InterceptorResponse which also holds the http response. If the Response held and exposed it's http response, I'd be golden!
simple ex:
this.enqueue(object : ApolloCall.Callback<Data>() {
    override fun onResponse(response: Response<Data>) {
        val headers = response.rawResponse.headers()
        // do something on success
    }

    override fun onFailure(e: ApolloException) {
        // do something on error
    }
})

@sav007 Can you give me an idea of the timeline for this? I'm assuming that exposing the headers is something makes sense.


Azure Release stops Test Case execution

My Azure Release executes VS Test Runner project with XUnit.
Release runs on 2 Agents in parallel mode.
After about 2+ hours mode, Agent-1 completes all assigned test cases in the slice:
2020-02-15T03:51:53.6418672Z Passed    Rail360.E2E.Test.Car_Repair_Billing.Car_Repair_Billing_Verify_BO_Primary_PW_Default_To_Category_Column    Rail360.E2E.Test.Car_Repair_Billing.Car_Repair_Billing_Verify_BO_Primary_PW_Default_To_Category_Column
2020-02-15T03:51:53.6972970Z Adding trx file D:\a\_temp\TestResults\VssAdministrator_fv-az240_2020-02-15_03_22_09.trx to run attachments
2020-02-15T03:51:53.7109529Z **************** Completed test execution *********************
2020-02-15T03:51:54.1637733Z Result Attachments will be stored in LogStore
2020-02-15T03:51:54.2111648Z Publishing test results to test run '1018930'.
2020-02-15T03:51:54.2113187Z TestResults To Publish 17, Test run id:1018930
2020-02-15T03:51:54.2113599Z Test results publishing 17, remaining: 0. Test run id: 1018930
2020-02-15T03:51:54.3424048Z Published test case results: 17
2020-02-15T03:51:54.3982187Z Result Attachments will be stored in LogStore
2020-02-15T03:51:54.3983319Z Run Attachments will be stored in LogStore
2020-02-15T03:51:54.7970813Z [RunStatistics] Total anticipated execution time: unknown Total actual execution time: 3039775

But Agent-2 fails to execute all test cases in the slice and hangs for another 4 hours until 6 hours time limit is reached, which is by default job time limit.
2020-02-15T03:49:31.8745838Z Failed    Rail360.E2E.Test.PW_Details_Page.PW_Details_Page_VerifyEstimateUpdatedAmountViewSpend    Rail360.E2E.Test.PW_Details_Page.PW_Details_Page_VerifyEstimateUpdatedAmountViewSpend
2020-02-15T03:50:36.3741075Z Passed    Rail360.E2E.Test.PW_Details_Page.PW_Details_Page_PW_Verify_RemoveRailCar    Rail360.E2E.Test.PW_Details_Page.PW_Details_Page_PW_Verify_RemoveRailCar
2020-02-15T08:00:44.6956951Z ##[error]The operation was canceled.
2020-02-15T08:00:44.6964186Z ##[section]Finishing: VsTest Runner

@kestasjas you are probably running into test related hangs. You can leverage this feature (https://github.com/microsoft/vstest-docs/blob/master/RFCs/0028-BlameCollector-Hang-Detection.md )to detect and diagnose the hangs.
Let me know if you run into issues using this as it is still sort of a preview feature.

Yes, I did find out few test cases with infinite loop. Thank You very much for the help, Cheers kes


A little help on "Legal Crime"

Hi.
This old, obscure game (available as a handy packet RIP on oldgames.ru) works perfectly with DDrawCompat (and also with CnC-ddraw, by the way) but it is rendered with an awful color palette with DxWnd.
I was wondering if you could have a look and suggest me what DxWnd is doing wrong?
I believe the problem is in GDI handling, the executable links the GDI32 CreatePalette and GetNearestPaletteIndex, is this a possible clue?
P.s. it is mostly for my curiosity, because if you want to run the game in a windw the combination of DDrawCompat + DxWnd works.

I don't think it has anything to do with GDI handling of palettes because the colors work fine with dxwrapper and I don't hook any GDI palettes.
What might be happening is that the palette is changing in the IDirectDrawPalette::SetEntries() function and DxWnd is not drawing the screen with the new palettes after that.  I had that issue with dxwrapper and added code here to handle that case.
But keep in mind that both dxwrapper and CnC-ddraw convert the ddraw functions to d3d9, so we are not reliant to how ddraw/GDI handles things.

Thank you for the suggestion. Excluding the GDI32 as a possible culprit will help to shrink the research area. DxWnd handles the SetEntries palette updates, but it is possible that the handling is failing on some peculiar situation (maybe about reserved entries handling, or 256 bounds overflow, who knows ..). I'll revise the logs and my code in search of a possible flaw.

Looking at the game logs and a picture comparison, it seems there's some different problem behind all this.
First of all, there are no traces of IDirectDrawPalette::SetEntries() in the logs. Instead, the game makes a strange alternate of Ddraw palette and GDI palette operations, I think that in some case it calls GetDC to get a GDI handle of the surface and applies a GDI palette over it. But in any case the color switch happens, though looking at certain areas of the screenshots (fortunately the game also runs natively on Win11 by setting the 8bit reduced mode compatibility option) it seems rather that it tries to get some color by using a 4 bit (16 colors) mode and applying dithering.
In the logs there are also traces of GDI GetNearestPaletteIndex(), that is a quite rarely used system call.
All this makes it a quite interesting case.

Hi! I'm bumping on this thread again.
I got some more understanding about what's going on (see here https://sourceforge.net/p/dxwnd/discussion/general/thread/385af88904/?page=1#70b6 if you want). The scrambled screens are built transferring a bitmap to the backbuffer surface DC by getting the backbuffer DC with GetDC followed by a StretchDIBits call. My dumps show that the BMI bitmap is correct (8bit palettized with all the 256 color shades) while the transferred image is heavily dithered as if the palette was not available.
This doesnt happen if the backbuffer is built with the desktop native 32bit color mode, in that case GDI seems able to handle the situation, but that way I got other troubles in other game screens, so this doesn't seem a solution.
Have you any idea about why this happens?

GetDC uses D3DKMTCreateDCFromMemory (at least on WDDM, not sure about XPDM) to create the DC. It receives a pColorData parameter, which is a pointer to the palette (array of PALETTEENTRY structs) that the DC will use. The default color table that the runtime passes in is probably incorrect, because it has no idea what the system/hardware palette should be when 8-bit color more is only emulated. Check the hook for this function in DDrawCompat, which might give you some ideas how to fix it: https://github.com/narzoul/DDrawCompat/blob/7a59458d585fbf7eb1b243fc133c091bbdf561ce/DDrawCompat/D3dDdi/KernelModeThunks.cpp#L54

@ghotik, I had a similar issue with dxwrapper.  The issue is that the default stretch mode is linear.  This means when it is stretching the DC is adds colors in between two of the palette colors.  I had to set the stretch mode to HALFTONE to solve this issue.
See comments here:  https://www.herdsoft.com/ti/davincie/leon8vlg.htm

StretchDIBits uses the stretch mode of the target device context as set by SetStretchBltMode to determine how to stretch or scale down the bitmap. When rescaling DIBs of biBitCount <=8 to smaller sizes, the default often produces ugly stripes on the target image.

See dxwrapper code here:  https://github.com/elishacloud/dxwrapper/blob/aa2468272c7de861d57bed2b7d3f9aa85292d05a/ddraw/IDirectDrawSurfaceX.cpp#L4816
See here:  https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-setstretchbltmode

Thank you so much, I'm almost arrived to a final result, but still have some curious problem.
First of all, I tried both approaches, but the HALFTONE solution didn't work, then I tried the Narzoul's suggestion.
Translated to dxwnd simpler code, the idea was roughly implemented here:
`
long WINAPI DxCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *pData)
{
DWORD ret;
ApiName("DxCreateDCFromMemory");
extern long D3DKMTCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *);
PALETTEENTRY *origColorTable = pData->pColorTable;
DWORD origFormat = pData->Format;
if(pCreateDCFromMemory == 0){
HINSTANCE hinst=(*pLoadLibraryA)("gdi32.dll");
if(!hinst){
OutTrace("%s: LoadLibrary ddraw.dll ERROR err=%d @%d\n", ApiRef, GetLastError(), LINE);
return 0;
}
pCreateDCFromMemory = (CreateDCFromMemory_Type)(*pGetProcAddress)(hinst, "D3DKMTCreateDCFromMemory");
(*pFreeLibrary)(hinst);
}
if(!pCreateDCFromMemory) return 0;
if(D3DDDIFMT_P8 == pData->Format){
	OutTrace("D3DKMTCreateDCFromMemory 8bit DC\n");
	extern DWORD PaletteEntries[256];
	for(int i=0; i<256; i++){
		palette[i].peRed = (PaletteEntries[i] & 0x0000FF);
		palette[i].peGreen = (PaletteEntries[i] & 0xFF00) >> 8;
		palette[i].peBlue = (PaletteEntries[i] & 0xFF0000) >> 16;
		palette[i].peFlags = 0;
	}
	pData->pColorTable = palette;
}
ret = (*pCreateDCFromMemory)(pData);
pData->pColorTable = origColorTable;
pData->Format = origFormat;
return ret;

}
where DxCreateDCFromMemory is my hooked replacement for D3DKMTCreateDCFromMemory and PaletteEntries is a DWORD array with the emulated palette in RGB format. The code works as a charm, but there is a caveat: the red color seems gone! The culprit can't be my palette because this happen also when I force the red to full intensity replacing one line of code:palette[i].peRed = 0xFF;But, before bumping my head and trying every possible meaningless bit mask & shift combination, I noted that in Narzoul's code there is a sort of "special treatment" for the red color:
if (palette[i].peFlags & PC_EXPLICIT)
{
palette[i] = sysPal[palette[i].peRed];
}
`
Can you explain why with my simple palette transfer I get this sort of result (note: it's almost perfect, I should just get some red...) :

Update:
Forgive my silly mistake about a byte overflow:
palette[i].peRed = (byte)((PaletteEntries[i] & 0xFF0000) >> 16);
This will teach me to never ignore a compiler's warinig.
Now it's so good!!!

Thank you again!

I'm just curious, but if the issue is that the DC created with GetDC() is created with the wrong palette then wouldn't it be easier to just call SetDIBColorTable() on the DC after the application calls GetDC() but before the DC handle is returned to the application?

I think I tried that a long time ago and it didn't work, but I may be misremembering.
Another idea is using SetPalette on the surface before calling GetDC. It's possible that the palette is only incorrect when there is no explicit palette attached to the surface.

I hope to be able to satisfy your curiosity making more tests on alternative solutions: I'm curious too, because this DC palette problem happens in many other different situations. For instance, "Loony Labyrinth Pinball" has problems when trying to color the intro panels in a pure GDI situation, where hacking ddraw.dll would be no use.
The problem is that the DC is a compatible DC with the desktop, with 32bit colors and where the palette methods have no effect. When I operate on emulated ddraw surfaces I have 8bit surfaces that work with palette, but the game intro happens before the ddraw session creation.
But I think I'd better open another thread on this subject.


CUDA MEMORY ERROR!!!

Sir, I wanted to know how much GPU size is required minimal to run this model. I was trying to run the model but let alone training, I am getting memory errors for inferencing too using the model checkpoints. I am currently using a 16GB GPU, Is it even possible to run this model and train it further in this GPU size?

Hi @PreyumKr, you can easily run the model on a 16GB GPU. You just need to change the max_area variable in the infer.py script which has been currently set to 1000720. This essentially controls the resolution of the image that is sent to the model by specifying the number of pixels. It is set to this value to maximally utilize a 32GB GPU, due to which you are getting OOM. Please try to set the max_area variable to a lower value like 1000180 and let me know if it works.

Sorry for the late reply. Thanks for the help. It fixed the inference part. I was able to run inference in the size of 1000*360 as well.  Can you tell me if the same is possible to train the model with the dataset? During the training as well the code gives me CUDA OUT OF MEMORY ERROR!!!


Cant reach report MAP when training from scratch

Hello pierluigiferrari,
Thank you for this repository, I've used it for the last couple of months, documentation is also great.
I also went through all the issues (open and closed).
I have a problem of reaching published MAP value on VOC dataset.
I've made no changes to the training or evaluation code. I train on VOC07 & 12  and test on VOC07. I get MAP of 0.49 after training for 120 epochs with Adam optimizer. Tried SGD with similar results. Strangely my validation loss reaches 4.3 - very similar to the result that you published.
My versions:
ssd_keras - cloned 2d ago
tensorflow-gpu - ver 1.14
keras 2.3.1
keras-applications 1.0.8
keras-preprocessing 1.1.0

I encountered a similar problem with low mAP, using a training script based on ssd300_training.ipynb. I found that training with SGD results in a higher mAP than training with the Adam optimizer (ie. the same validation loss results in higher mAP when training with SGD compared to training with Adam, not sure why). Besides that, the only thing I had to change was, for the input arguments to the SSDInputEncoder, I changed the argument neg_iou_limit to 0.3 (in the ssd300_training.ipynb, it is 0.5, but the default argument is 0.3, and this default value resulted in faster training for me and higher mAP).


sendInput not working with ssh

Windows Terminal version
1.20.11781.0 and 1.21.240626002-preview
Windows build number
10.0.19045
Other Software
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
Steps to reproduce
Install SSH Server (optional)
For Testing: WSL2 with OpenSSH
sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
ip address show

JSON (Fragment)
Profile
{
    "name": "wsl",
    "commandline": "ssh <user>@<ip of wsl>"
}

Action (in Fragment if preview version)
        {
            "command": {
                "action": "multipleActions",
                "actions":
                [
                    {
                        "action": "newTab",
                        "profile": "wsl",
                        "tabTitle": "Test"
                    },
                    {
                        "action": "sendInput",
                        "input": "<password>"
                    }
                ]
            },
            "name": "wsl"
        },

Unfortunately I don't know how to send an ENTER but when I manually press ENTER there is no input from sendInput because nothing was inserted into the password field.
It's just an example for those questioning the sendInput with a password. If I want to send other inputs like sourcing an custom bashrc into an ssh session established via keys it also does not work.
Would be a nice addition to know whether its possible to press ENTER in an sendInput. I have not really found a source for reliable keypresses. I tried a few ASCII Escape Sequences from https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797, but not much luck except for the arrow keys.
Thank you very much!
Expected Behavior
It inserts the sendInput value into the terminal like it's typed by an keyboard.
Actual Behavior
Does nothing

Actions are executed one after another without waiting on anything.  As such the input gets lost. We could consider fixing this, because it's probably possible to set up the connection synchronously.
To answer your other question: The "enter key" is actually the key on your numblock (bottom right). The correct name for the one in the middle of the keyboard is technically the "return key". As the name indicates, the character that the return key sends is the carriage return \r. The solution is to use "input": "<password>\r".
But please do not put your SSH password in your settings file and especially not in a sendInput action. That's simply not safe. Instead, use SSH keys if you can (preferably Ed25519). If you need help setting up a ssh key pair, please let me know. (You should find plenty instructions on the internet already though.)

Thank you for the enter key!
That would make sense if the actions are not dependent on the outcome of the previous action. Do you know whether it is even possible to check the completion state or result of an executed action?
Definitely do not persist any password as clear text in any config files! I just used it as a relatively easy example to reproduce the behaviour. :)
Not quite sure how we should proceed. Should I create a feature request or should we keep it as bug?

We don't need to keep this open, we've already got: /dip #13444
Thanks!


*.nef files not found in the current workspace

Hello @devhawk @djnicholson
I have a Golang workspace, where I create a token.go file, which is a smart contract. I compiled this smart contract in the workspace, and a token.nef file was the output:

Then, after initializing the neo-express and stuff, I tried to deploy the contract like this:

Then, this message immediately appeared:

I believe this is a bug since I clearly have at least one .nef file in my vscode workspace.

ah... I don't know if that's a completely new feature or not, but it would be AWESOME to add the "Deploy contract" menu to the menu context of *.nef files.
Like, adding "Deploy contract" here:

ah... I don't know if that's a completely new feature or not, but it would be AWESOME to add the "Deploy contract" menu to the menu context of *.nef files.
Like, adding "Deploy contract" here:

I think the problem is that there is no metadata file (and the text of the error message is a bit misleading!)
Adding a right click option for .nef will be possible (I'll still have to make it emit an error if the metadata cannot be found, though)

I think the problem is that there is no metadata file (and the text of the error message is a bit misleading!)
Adding a right click option for .nef will be possible (I'll still have to make it emit an error if the metadata cannot be found, though)

I think the problem is that there is no metadata file (and the text of the error message is a bit misleading!)

hmmm... got it. So, what's the file extension the vscode extension is looking for?
And, most importantly: how does the vscode extensions associate that a metadata file belongs to a particular .nef file? (given the fact that a workspace could contain multiple compiled smart contracts (.nef's))

Adding a right click option for .nef will be possible (I'll still have to make it emit an error if the metadata cannot be found, though)

Looking forward to it! 💯  👍

I think the problem is that there is no metadata file (and the text of the error message is a bit misleading!)

hmmm... got it. So, what's the file extension the vscode extension is looking for?
And, most importantly: how does the vscode extensions associate that a metadata file belongs to a particular .nef file? (given the fact that a workspace could contain multiple compiled smart contracts (.nef's))

Adding a right click option for .nef will be possible (I'll still have to make it emit an error if the metadata cannot be found, though)

Looking forward to it! 💯  👍

NEON produces four files - .nef, .manifest.json, .abi.json and .nefdbgnfo. They are all generated in the same folder as the source DLL or project file resides. The NEF and manifest files are required for deployment. nefdbgnfo is used by the debugger. abi.json is redundant in NEO 3 - that information is duplicated in the manifest file.

NEON produces four files - .nef, .manifest.json, .abi.json and .nefdbgnfo. They are all generated in the same folder as the source DLL or project file resides. The NEF and manifest files are required for deployment. nefdbgnfo is used by the debugger. abi.json is redundant in NEO 3 - that information is duplicated in the manifest file.

@devhawk alright, neow3j outputs these files.
But it seems that some of the SDKs/compilers in the community does not follow this.
Do you think that we could write a small "standard" (NEP) for this? Or even, include this information to NEP-14 and NEP-15. I could try to propose this, since it gets clear to interoperability of tools at a higher level (e.g., vs code extensions, etc).

@devhawk alright, neow3j outputs these files.
But it seems that some of the SDKs/compilers in the community does not follow this.
Do you think that we could write a small "standard" (NEP) for this? Or even, include this information to NEP-14 and NEP-15. I could try to propose this, since it gets clear to interoperability of tools at a higher level (e.g., vs code extensions, etc).

There's already a neo proposal for the contract manifest: https://github.com/neo-project/proposals/pull/114

There's already a neo proposal for the contract manifest: https://github.com/neo-project/proposals/pull/114

NEON produces four files - .nef, .manifest.json, .abi.json and .nefdbgnfo. They are all generated in the same folder as the source DLL or project file resides and all have the same base file name. i.e. mycontract.dll generates mycontract.nef, mycontract.manifest.json, mycontract.nefdbgnfo and mycontract.abi.json.

@devhawk I don't see anywhere written that files should be named ".manifest.json" or ".nefdbgnfo.json", or "*.abi.json" in this proposal, though.
Again, just because NEON produces those files and that neo3-visual-tracker searches for those specific file name patterns doesn't mean that at the moment all compilers do the same. That's what I was referring to.
However, if neo3-visual-tracker get smart enough to detect those manifests based on file content, well, then it's a different story. Then compilers/developers could output any filename they want (by default). But, this is not an optimum solution IMHO (very time consuming, not scalable, etc etc).

NEON produces four files - .nef, .manifest.json, .abi.json and .nefdbgnfo. They are all generated in the same folder as the source DLL or project file resides and all have the same base file name. i.e. mycontract.dll generates mycontract.nef, mycontract.manifest.json, mycontract.nefdbgnfo and mycontract.abi.json.

@devhawk I don't see anywhere written that files should be named ".manifest.json" or ".nefdbgnfo.json", or "*.abi.json" in this proposal, though.
Again, just because NEON produces those files and that neo3-visual-tracker searches for those specific file name patterns doesn't mean that at the moment all compilers do the same. That's what I was referring to.
However, if neo3-visual-tracker get smart enough to detect those manifests based on file content, well, then it's a different story. Then compilers/developers could output any filename they want (by default). But, this is not an optimum solution IMHO (very time consuming, not scalable, etc etc).

@devhawk I don't see anywhere written that files should be named ".manifest.json" or ".nefdbgnfo.json", or "*.abi.json" in this proposal, though.

Good point @gsmachado regarding .manifest.json file extension. File extension for debug info however is specified in NDX-DN11. And the .abi.json file is not used at all in neo 3, so we can safely ignore that file.
Technically, from the platform perspective, only the file contents of the contract binary and manifest matter - the platform doesn't store them in the file system with an extension anyway. However, for the sake of tooling, it seems we should include some text in both the NEF and manfest NEPs that specify file extension naming conventions when this content is stored in a file system.
You want to open the issues or should I @gsmachado ?

@devhawk I don't see anywhere written that files should be named ".manifest.json" or ".nefdbgnfo.json", or "*.abi.json" in this proposal, though.

Good point @gsmachado regarding .manifest.json file extension. File extension for debug info however is specified in NDX-DN11. And the .abi.json file is not used at all in neo 3, so we can safely ignore that file.
Technically, from the platform perspective, only the file contents of the contract binary and manifest matter - the platform doesn't store them in the file system with an extension anyway. However, for the sake of tooling, it seems we should include some text in both the NEF and manfest NEPs that specify file extension naming conventions when this content is stored in a file system.
You want to open the issues or should I @gsmachado ?

@devhawk I initiated the discussion and Erik included in the NEP. 👍  😄

@devhawk I initiated the discussion and Erik included in the NEP. 👍  😄

aaaaaand, it was also included in this NEP. 🚀

aaaaaand, it was also included in this NEP. 🚀

@djnicholson you can assign this issue to me. I will test your last commits and I will come here to close the issue if that's the case, thanks.

I forgot to close this issue. My fault.
I tested and it's fine. Closing. 💪