Yellow warning

I'm getting this yellow warning but the library is rendering html properly.
16:30:25
▼react-native-render-html

node_modules/expo/src/Expo.js:21:41 in warn
node_modules/react-native-render-html/src/HTML.js:129:25 in registerDOM$
node_modules/regenerator-runtime/runtime.js:62:44 in tryCatch
node_modules/regenerator-runtime/runtime.js:296:30 in invoke
node_modules/regenerator-runtime/runtime.js:62:44 in tryCatch
node_modules/regenerator-runtime/runtime.js:152:28 in invoke
node_modules/regenerator-runtime/runtime.js:195:17 in
node_modules/promise/setimmediate/core.js:45:7 in tryCallTwo
node_modules/promise/setimmediate/core.js:200:23 in doResolve
node_modules/promise/setimmediate/core.js:66:12 in Promise
node_modules/regenerator-runtime/runtime.js:194:27 in callInvokeWithMethodAndArg
node_modules/regenerator-runtime/runtime.js:217:12 in enqueue
node_modules/regenerator-runtime/runtime.js:241:8 in async

:null:null in registerDOM

node_modules/react-native-render-html/src/HTML.js:82:8 in componentDidMount
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:10627:12 in commitLifeCycles
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12512:10 in commitAllLifeCycles
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:39:15 in invokeGuardedCallback
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:221:34 in invokeGuardedCallback
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:12677:10 in commitRoot
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13685:46 in completeRoot
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13635:23 in performWorkOnRoot
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13545:26 in performWork
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13506:16 in performSyncWork
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:13728:8 in batchedUpdates
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:2565:27 in batchedUpdates
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:2701:17 in _receiveRootNodeIDEvent
node_modules/react-native/Libraries/Renderer/ReactNativeRenderer-dev.js:2721:26 in receiveEvent
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:351:47 in __callFunction
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:116:26 in
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:314:6 in __guardSafe
node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:115:17 in callFunctionReturnFlushedQueue

⚠ You did not follow the contributing guidelines!
As stated in these:

You need to fill out the issue template. This step is mandatory! Not doing so will result in your issue getting closed. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.
Although we might still help you without all these informations, it would be unfair to let some people post issues without filling everything.


Typescript support

Hello, is Typescript support planned?
For reference, currently in a Typescript file, when attempting:
    `map.setActiveArea(...)`

IDE shows TS warning:
Property 'setActiveArea' does not exist on type 'Map'.ts(2339)

Apologies; this has cleared up for me due to other reasons.


SpawnMultiCursorAll - feature request

Hi,
Multi-cursor editing is great! The more I use multiple cursors, the more I wish for a function to edit all occurrences of a selection.  I guess a pair of functions ScrollNextCursor/ScrollPrevCursor would also be needed so we can check all the selections before editing.
This would be much easier than ReplaceAll. ReplaceAll requires me to type/paste the target, then the replacement and feels long-winded, especially when there are spaces demanding quotes. If I make an error with ReplaceAll I may lose the unique target and cannot correct without undo.
Simply typing the replacement using multiple cursors feels much easier - like a superpower!
Sorry I don't have the skills to code this myself.
Kind Regards Gavin Holt
Version: 2.0.12-dev.75
Commit hash: 75b9a6ce
Compiled on September 02, 2023
OS: Windows
Terminal: Conhost.exe

@Gavin-Holt
Hi Gavin,
I am currently working on a plugin for this feature. However, as far as I know there is no way to spawn a multicursor through lua plugins. I've submitted a pull request to add this binding, though.

Can't this be already done from lua via bp:SpawnMultiCursor() (possibly with an additional help from bp:Buf:SetCurCursor() or similar functions, if needed)?


returning JSON 404

Since it is an API. When an endpoint does not exists (route is not found), shouldn't it return a 404 with response in JSON instead of error/404.phtml or some other HTTP code with a JSON response?

Apigility essentially maps routes to resources, which means that if routing does not match something, we don't know if that something should be an API resource, or a general web page; as such, returning JSON may be erroneous, if the page in question might map to an HTML response. We chose not to interfere with the normal MVC workflow and use the general tooling.
If you want to return a 404 with JSON, there are a couple of possibilities.
First, if the 404 might be due to an invalid identifier, you can either throw an exception with a 404 code, or return an ApiProblemResponse from your controller or REST resource.
Second, you can hook into the MvcEvent::EVENT_DISPATCH_ERROR, and check if the event error matches Application::ERROR_ROUTER_NO_MATCH; if it does, your listener could return an ApiProblemResponse with a 404 error code.
If this second functionality is something you feel would be a good general purpose addition to Apigility, we can consider adding a listener that users can optionally register with their Apigility applications for that purpose.

This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at https://github.com/laminas-api-tools/api-tools/issues/4.


support to skip include modules

Description

Added support to magic modules skip include declared modules.

Motivation and Context

Working in monorepo we can improve the project build skipping include some modules.

Types of changes

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

Implementation details

MagicModulesExtension have a list property called modulesToSkip. So, just put in the list the modules names that should be skiped to include in the gradle graph:

configure<MagicModulesExtension> {
    ...
    modulesToSkip = listOf(
        ":module1",
        ":folder2:module2"
        // more modules names
    )
}

In the future this list can be dynamic using project properties or environment variables.

Hi @ubiratansoares , I confess that I had thought about these questions:

Yes, there is risk using this solution but is the same as the origin solution where a developer needs comment Gradle include lines. I think that to this case repositories must have human or bot reviewers to avoid mistakes with this configurations;
I agree and I'll study how to improve it mainly to create a dynamic structure to avoid include manually.

As I said, I'll try a solution to avoid changing all time the settings.gradle. Maybe putting the modules list in the local.properties or environment variable so the configuration will be out of the project and any VCS.

Hi @ubiratansoares , I confess that I had thought about these questions:

Yes, there is risk using this solution but is the same as the origin solution where a developer needs comment Gradle include lines. I think that to this case repositories must have human or bot reviewers to avoid mistakes with this configurations;
I agree and I'll study how to improve it mainly to create a dynamic structure to avoid include manually.

As I said, I'll try a solution to avoid changing all time the settings.gradle. Maybe putting the modules list in the local.properties or environment variable so the configuration will be out of the project and any VCS.

Closing this PR as per project deprecation in favor of Gradle's type-safe project dependencies


fix(project): give a default project name

@gastaldi in the OSiO quickstart flow we set a default value for this field a web UI level. not having a default value for this filed causes the UI to return a canGoToNextStep false.
Could you review?

if we can pass in the named default value on the first step, when we hit Next in the UI to our derivation of ProjectInfoStep it'll hopefully be valid (or report nice validation errors if the name is not valid) then we won't need this PR?

oki closing it for now


match() assert won't match non-enumerable properties, but claims they are "found"

console.error('has', e.hasOwnProperty('id'));
tt.match(e, {id: 1}, 'executor should be found');

e.id isn't (edit: is) in the prototype, or somewhere, so the match() test won't find it for purposes of comparison. I don't know if that makes sense, I think these should be equivalent:
t.equal(e.id, 1);
t.match(e, {id: 1});

and ATM, they are not.
but if you don't agree, then on failure, properties that are not "own properties" should not be listed in the "found" section, that's not very helpful:
has false
        not ok 9 - executor should be found
          ---
          found:
            __cachedRelations: {}
              id: 1
            __dataSource: null
          pattern:
            id: 1

@isaacs I think when printing out the found block it should probably use Object.keys() instead of Object.getOwnPropertyNames(), since it leads to confusing output like the above. This is because Object.getOwnPropertyNames() returns non-enumerable properties which get printed in the diag, but match() skips those properties.

I agree that t.equal(e.id, 1) should be equivalent to t.match(e, {id:1}).  This is a bug.

Thanks, Issacs.


Issue with Rake db:migrate

Caused by:
Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in _query' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in block in query'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in handle_interrupt' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in query'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in block in execute' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:435:in block in log'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activesupport-4.0.3/lib/active_support/notifications/instrumenter.rb:20:in instrument' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_adapter.rb:430:in log'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:287:in execute' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/mysql2_adapter.rb:222:in execute'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:190:in create_table' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:471:in create_table'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:625:in block in method_missing' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:597:in block in say_with_time'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:597:in say_with_time' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:617:in method_missing'
/home/ec2-user/fluxday/db/migrate/20140313044626_create_projects.rb:3:in change' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:571:in exec_migration'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:555:in block (2 levels) in migrate' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:554:in block in migrate'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in with_connection' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:553:in migrate'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:709:in migrate' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:959:in block in execute_migration_in_transaction'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:1007:in ddl_transaction' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:958:in execute_migration_in_transaction'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:920:in block in migrate' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:916:in each'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:916:in migrate' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:764:in up'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/migration.rb:742:in migrate' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/activerecord-4.0.3/lib/active_record/railties/databases.rake:42:in block (2 levels) in <top (required)>'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/gems/rake-12.3.2/exe/rake:27:in <top (required)>' /home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/bin/ruby_executable_hooks:24:in eval'
/home/ec2-user/.rvm/gems/ruby-2.1.0@fluxday/bin/ruby_executable_hooks:24:in `'

I am connected to AWS RDS MySQL
Engine version
5.7.17

I was able to fix the Issue.
I created a file under /config/initializers called abstract_mysql_adapter.rb with the following code:
require 'active_record/connection_adapters/mysql2_adapter' class ActiveRecord::ConnectionAdapters::Mysql2Adapter   NATIVE_DATABASE_TYPES[:primary_key] = "int(11) auto_increment PRIMARY KEY" end


Logged out of my save and crashed

https://paste.dimdev.org/secayitofi.mccrash

I have added checks to prevent this.


[gh-2233] rename address view and update address view to include nostr.

Summary
According to discussion of #2209.

Closes #2233

Need a test case:

Use the nostr address in the CLI argument to ensure the ParsedAddress implemention.
Query RPC via the nostr address to ensure the UnitAddress implemention.

Need a test case:

Use the nostr address in the CLI argument to ensure the ParsedAddress implemention.
Query RPC via the nostr address to ensure the UnitAddress implemention.

I have added account nullify and rpc request for both 1 and 2 test cases.


Mark MessagePackTimestamp and MessagePackExtension as Sendable

MessagePackTimestamp and MessagePackExtension can be marked Sendable (a.k.a. thread-safe) because they are value types. Marking a type as Sendable will allow values of that type to be passed across concurrency domains.

@hirotakan Let me know if you have any questions. 😊


fix: CreateFile ERROR_FILE_NOT_FOUND from crashpad handler

Fixes https://github.com/microsoft/vscode/issues/115874
Fixes https://github.com/microsoft/vscode/issues/112216

I think we could always assign the value over, no?

Yup we can, was trying to avoid object.assign when not needed but there is no value here. Fixed.


Mocking HTTPServer

Why does this not work?
I have a simple application class and the run method does create
an instance of the HTTPServer passing the parameters as shown here
and calls serve_forever.
I can print the mocked_object and it's a fake for the HTTPServer but
when calling run the test does hang. The real HTTPServer has been
instantiated instead waiting on port 8081.
What did I wrong? A bug?
    cls = ["BaseHTTPServer.HTTPServer", "http.server.HTTPServer"][sys.version_info.major-2]
    with patch(cls) as mocked_object:
        mocked_object \
            .remember_order() \
            .expects("__init__").with_args(("<IP_ADDRESS>", 8081), request_handler) \
            .expects("serve_forever").with_args()

        app = application()
        app.run("<IP_ADDRESS>", 8081)

@Nachtfeuer, You probably need to use the path to the module which you are importing HTTPServer into.
with patch('mymodule.HTTPServer') as mocked_object:

When you import HTTPServer into your module (which happens before you mock it) Python creates a reference to the class in memory. The mocking then changes the reference in the source location to the mocked object, leaving your imported reference unmocked. Using you modules path changes the reference that the code under test is using.

Well but that's exactly what I did.
See my code ... I used: "BaseHTTPServer.HTTPServer" (for Python 2.x)
Here a simple example which does not work same way;
Two simple modules (all in same folder)
cat bar.py
class Bar(object):
    def __init__(self):
        print("Bar.__init__ called")

cat foo.py
from bar import Bar

class Foo(object):
    def __init__(self):
        print("Foo.__init__ called")
        self.bar = Bar()

Now the test code
cat test.py
from fudge import patch
from foo import Foo

class Bar2(object):
    def __init__(self):
        print("Bar2.__init__ called")

class Foo2(object):
    def __init__(self):
        print("Foo2.__init__ called")
        self.bar = Bar2()

print("foo and bar in the same file")
with patch("__main__.Bar2") as mocked_object:
    mocked_object.expects("__init__").with_args()
    foo = Foo2()

print("foo and bar in separate modules")
with patch("bar.Bar") as mocked_object:
    mocked_object.expects("__init__").with_args()
    foo = Foo()

Here the test result
The "all in one file" test works fine but the modules test fail.
You can see from the output that the assertion is wrong since
the relating "init" are really called.
It might be related to my question (issue) ....
python test.py
foo and bar in the same file
Foo2.__init__ called
foo and bar in separate modules
Foo.__init__ called
Bar.__init__ called
Traceback (most recent call last):
  File "test.py", line 21, in <module>
    foo = Foo()
  File "/tmp/test/local/lib/python2.7/site-packages/fudge/patcher.py", line 112, in __exit__
    fudge.verify()
  File "/tmp/test/local/lib/python2.7/site-packages/fudge/__init__.py", line 129, in verify
    registry.verify()
  File "/tmp/test/local/lib/python2.7/site-packages/fudge/__init__.py", line 95, in verify
    exp.assert_called()
  File "/tmp/test/local/lib/python2.7/site-packages/fudge/__init__.py", line 453, in assert_called
    raise AssertionError("%s was not called" % (self))
AssertionError: fake:bar.Bar.__init__() was not called

@Nachtfeuer, you're still patching the object at it's source, instead of in the module it's being used in.
Your test should look like this.
with patch("foo.Bar") as mocked_object:  # patch the imported foo.Bar, not the source bar.Bar
    mocked_object.expects("__init__").with_args()
    foo = Foo()


[notodiff] Fix shape ratio calculation

Before, this didn't account for negative areas.
Should fix https://github.com/googlei18n/nototools/issues/296

LGTM


Where did gen_html.py go?

https://github.com/googlefonts/googlefonts-project-template/blob/cf074e5dd4b8deb23ca2ba5a1af92bad156b4b63/Makefile#L35-L36 stopped working.

Apologies, it's been moved to diffenator2, https://github.com/googlefonts/diffenator2. I cut the new gftools too prematurely.

Once gftools ci is fixed on Mon, I'll update the project template as well. Existing users of the project-template are not affected by this.

hey @m4rc1e!
I installed the last version of gftools (0.9.23), but I can't generate any proofs or diff (with gftools qa -f .*ttf -a -gfb or gftools gen-html diff -fb -fa -imgs). do I have to install diffenator2 in addition?

Use Diffenator2 .
diffenator2 diff -fb fonts.ttf -fa fonts.ttf -imgs


Fixing check to handle scope.

Fixes issue #4

Thank you kind sir! Anything else strange/bad/broken you come across let me know, would be glad to accept PRs :)
Good luck!

Thank you!
Solved my problem and I was in the middle of debugging it when you gave me the answer. So happy to help you write it down. ;)

On 28 Mar 2018, at 15:33, Bryce Darling<EMAIL_ADDRESS>wrote:
Thank you kind sir! Anything else strange/bad/broken you come across let me know, would be glad to accept PRs :)
Good luck!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/brycedarling/redux-autobahn-js/pull/5#issuecomment-376888171, or mute the thread https://github.com/notifications/unsubscribe-auth/AALW4zdPysUg1aoWkr4mD5fdzpigtK3Kks5ti5EsgaJpZM4S-prE.


Is it me or is there something wrong ?

i have the following directory structure:
/dir
-- test.jpg
-- collection/
-- small_img1.png
-- small_img2.png
-- and so on...
i invoke pymos using: me@mylaptop: ~/dir$ pymos test.jpg output.png ./collection/
this is what i see :
0
INFO:PyMos:Building index...
INFO:PyMos:Color Index built
INFO:PyMos:Generating Mosaic...
Traceback (most recent call last):
File "/usr/local/bin/pymos", line 5, in
pkg_resources.run_script('PyMos==0.6', 'pymos')
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1200, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.7/dist-packages/PyMos-0.6-py2.7.egg/EGG-INFO/scripts/pymos", line 59, in
new_colormap=args.new_colormap)
File "/usr/local/lib/python2.7/dist-packages/PyMos-0.6-py2.7.egg/pymos/core.py", line 128, in build_mosaic
if (colormap[match[2]][2] == None):   # has not been resized yet
IndexError: list index out of range
my test.jpg is 256x256 and all collection images are 75x75

Hey I'll check it out, btw is test.jpg black & white or grayscale?


Can't change admin password.

Laravel Version: 5.6.*
Voyager Version: 1.1
PHP Version: 7.1.3
Database Driver & Version: mysql 5.7.21

Description: Changing admin password results in this error "Call to a member function relationLoaded() on null"
Steps To Reproduce:

setup new laravel project
composer require
create database
setup env to connect database
voyager install --with-dummy
login with admin@admin
click profile
change password, save.

Modifying any admin info seems to override the role_id column to NULL in the users table.
Trying to upload a user image has the same affect


Add CD with GitHub Actions

This would allow new releases to be automatically created.

This may have to be pushed to a later release and done manually until then. I looked into how to set this up, but it requires an npm user to generate an access token and enter it into the repository secrets. This would be fine if the access token could be restricted to just the twig.js package, but it actually would be able to publish an packages that the user who generated the token has access to, which I am not comfortable with.
Ability to restrict access tokens is being considered by GitHub/npm, so if it is ever added then this could move forward.
Relevant issues:
https://github.com/npm/roadmap/issues/10
https://github.com/github/roadmap/issues/557


Pin<>-based Allow and Subscribe API design

The problem with RAII
An obvious, but unsound, API for Read-Write Allow would look as follows:
struct AllowHandle<'b> {
    buffer: *mut [u8],
    _phantom: core::marker::PhantomData<&'b mut [u8]>,
    _pin: core::marker::PhantomPinned,
}

impl<'b> Drop for AllowHandle {
    fn drop(&mut self) {
        // Un-allow the buffer, and panic if it fails.
    }
}

fn allow_rw(buffer: &mut [u8]) -> Result<AllowHandle> {
    // Use Allow to share the buffer with the kernel, and create an AllowHandle to clean it up.
}

This API is unsound because the following use case allows the kernel to mutate memory after it has been reallocated for another purpose, causing undefined behavior:
fn main() {
    let mut buffer = [0; 4];
    let allow_handle = allow_rw(&mut buffer).unwrap();
    core::mem::forget(allow_handle);  // Prevent the un-allow from running.
    drop(buffer);  // Get rid of buffer, allow rustc to re-allocate it.
    // The kernel can still mutate the memory buffer was in here!
}

If you have not seen this issue before, I suggest reading through RFC 1066.
Pin<> to the rescue!
Fortunately, there is a case in which we can rely on destructors running! The core::pin::Pin type has a drop-execution guarantee. Creating a pinned type in safe code is tricky, but not impossible, and the pin_utils::pin_mut macro provides a way to pin data on the stack.
Although we will not need to create self-referential data structures, we can make use of Pin's Drop guarantee to make sure our destructor runs:
#[derive(Default)]
struct RwAllowBuffer<'b> {
    buffer: *mut [u8],
    _phantom: core::marker::PhantomData<&'b mut [u8]>,
    _pin: core::marker::PhantomPinned,
}

impl<'b> Drop for RwAllowBuffer<'b> {
    fn drop(&mut self) {
        if self.buffer.is_null() { return; }
        // Un-allow the buffer here, panicing on error.
    }
}

impl<'b> RwAllowBuffer<'b> {
    // Because we take self as a Pin, we know that Drop will be called before RwAllowBuffer's
    // memory is repurposed. This is guaranteed to happen before the 'b lifetime
    // expires, which is the safety property we need.
    pub allow(self: Pin<&mut Self>, buffer: &'b mut [u8]) -> Result<()> {
        // Do the allow here, setting buffer if it was successful.
    }
}

You would use this API as follows:
fn main() {
    let mut buffer = [0; 4];
    let allow_buffer = Default::default();
    pin_utils::pin_mut!(allow_buffer);
    allow_buffer.allow(&mut buffer);
    // Buffer is now shared. The buffer will be un-shared at the end of the
    // scope, when allow_buffer is dropped.
}

In later comments, I'll revise the design of this API, and expand it to Subscribe.

I have been playing around with this concept a little bit and I have some wire frame examples
An application main that wants to read the console with a timeout using "standard" libtock-rs drivers (which haven't been created yet):
pub fn main() -> TockResult<()> {
    let console = Console {};

    let mut buffer = [0u8; 64];

    let timeout = Timeout::new_ms(5_000);
    pin_mut!(timeout);
    timeout.as_ref().start()?;

    let canceled = console.read_while(&mut buffer, &mut move || !timeout.expired())?;
    if !canceled {
        console.write(&buffer)?;
    }

    Ok(())
}

Console write frame:
struct Console {}

impl Console {
    fn read_while(
        &self,
        buffer: &mut [u8],
        keep_going: &mut dyn FnMut() -> bool,
    ) -> TockResult<bool> {
        const DRIVER_NUM: usize = 0;
        const ALLOW_NUM: usize = 0;
        const SUB_NUM: usize = 0;
        const CMD_NUM: usize = 0;

        let buf_share = AllowRWContext::new(DRIVER_NUM, ALLOW_NUM, buffer);
        pin_mut!(buf_share);
        buf_share.as_ref().share()?;

        let callback = SubscribeContext::new(DRIVER_NUM, SUB_NUM);
        pin_mut!(callback);
        callback.as_ref().subscribe()?;

        syscalls::command_ignore_val(DRIVER_NUM, CMD_NUM, 0, 0)?;

        return loop {
            if callback.complete() {
                break Ok(true);
            } else if !keep_going() {
                break Ok(false);
            }
            unsafe { syscalls::raw::yieldk() };
        };
    }
}

Timeout wire frame
struct Timeout {
    timeout_ms: usize,
    subscribe_context: SubscribeContext,
}

impl Timeout {
    fn new_ms(timeout_ms: usize) -> Self {
        const DRIVER_NUM: usize = 0;
        const ALLOW_NUM: usize = 0;

        Self {
            timeout_ms,
            subscribe_context: SubscribeContext::new(DRIVER_NUM, ALLOW_NUM),
        }
    }

    fn start(self: Pin<&Self>) -> TockResult<()> {
        const DRIVER_NUM: usize = 0;
        const ALLOW_NUM: usize = 0;
        const SUB_NUM: usize = 0;
        const CMD_NUM: usize = 0;

        // Safe since subscribe_context field is pinned when self is pinned
        unsafe { self.map_unchecked(|s| &s.subscribe_context) }.subscribe()?;

        syscalls::command_ignore_val(DRIVER_NUM, CMD_NUM, self.timeout_ms, 0)?;
        Ok(())
    }

    fn expired(&self) -> bool {
        self.subscribe_context.complete()
    }
}

The SubscribeContext and AllowRWContext are basically the RAII the first comment mentions. They are very similar, and I have included one for brevity.
struct SubscribeContext {
    driver_num: usize,
    sub_num: usize,
    subscribed: Cell<bool>,
    called: UnsafeCell<bool>,
    _pin: PhantomPinned, // disallow unpin. Must use unsafe code to create pin (e.g. pin_mut!)
}

impl SubscribeContext {
    fn new(driver_num: usize, sub_num: usize) -> Self {
        Self {
            driver_num,
            sub_num,
            subscribed: Cell::new(false),
            called: UnsafeCell::new(false),
            _pin: PhantomPinned,
        }
    }

    fn subscribe(self: Pin<&Self>) -> TockResult<()> {
        extern "C" fn callback(_arg1: usize, _arg2: usize, _arg3: usize, called: usize) {
            unsafe { core::ptr::write_volatile(called as *mut _, true) };
        }

        syscalls::subscribe_fn(
            self.driver_num,
            self.sub_num,
            callback,
            self.called.get() as usize,
        )?;
        self.subscribed.set(true);

        Ok(())
    }

    fn complete(&self) -> bool {
        // Safe since pointer is well aligned and a bit-wise copiable
        unsafe { self.called.get().read() }
    }
}

The "standard" driver for Timeout did have to use unsafe to get a Pinned version of the SubscribeContext member field. Any driver that only exposes synchronous APIs (which Timeout is not), wouldn't have to use unsafe.
I have the rest of the code locally if anyone is interested, but I was trying to keep it brief :)

Instead of this design, I've implemented the design from https://github.com/tock/libtock-rs/issues/341 in libtock-rs. Closing, as I don't think we have a need to iterate on this design any further.


Create Sliding-Window-Algorithm.md

There are many interview questions that are asked, which involve subsections of an array. Luckily, many of these questions can be solved by using the sliding window algorithm

Sorry, I can't merge as it contains only 58 lines , please add more contents about it or add some more algos.
If I will merge hacktoberfest will exclude this repository.

How many lines should I make it to?
On Sat, 15 Oct, 2022, 11:21 Vikash Patel, @.***> wrote:

Sorry, I can't merge as it contains only 58 lines , please add more
contents about it or add some more algos.
If I will merge hacktoberfest will exclude this repository.
—
Reply to this email directly, view it on GitHub
https://github.com/its-red-eagle/Computer-Science-Engineering/pull/50#issuecomment-1279669048,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AW6JRUYJ3EIGUKYFWW6QGKTWDJA67ANCNFSM6AAAAAARFYI6KM
.
You are receiving this because you authored the thread.Message ID:
@.***
com>

100+

How many lines should I make it to?
…
On Sat, 15 Oct, 2022, 11:21 Vikash Patel, @.> wrote: Sorry, I can't merge as it contains only 58 lines , please add more contents about it or add some more algos. If I will merge hacktoberfest will exclude this repository. — Reply to this email directly, view it on GitHub <#50 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW6JRUYJ3EIGUKYFWW6QGKTWDJA67ANCNFSM6AAAAAARFYI6KM . You are receiving this because you authored the thread.Message ID: @. com>

100+


Upgrade to bloc 6.1.0

Describe the bug
Bloc 6.1.0 released recently and it has some breaking changes. For example, context.bloc is deprecated. This will throw out warnings in the project.

@anitab-org/mentorship-managers can I work on this?

Sure.

Small update we haven't used anything from the bloc package in the app yet. Everything is from flutter_bloc. Sending a normal deps update PR asap


Add support for Windows clipboard shortcuts

As a Windows, user I want to have standard Windows clipboard shortcuts to work in WSL GUI apps.

@speller, thanks for requesting a feature, but I don't think this is possible since clipboard functionality is implemented in Linux application itself and that's not where WSLg can control. Btw, isn't keyboard shortcut on many of Linux GUI application same as Windows? such as CTRL+C/V/X? Thanks!

@hideyukn88 The default shortcuts are not working. I launched programs under VcXsrv under the same WSL distribution and they work well. So I assume the issue is in WSLg on the Linux or Windows side.

@speller, would you please tell us what applications do you have this problem? thanks!

Clipboard (Copy/Paste) was working when I used VcXsrv Windows X Server.  But now with WSLg, it doesn't work anymore.
Copying text from a website in Chrome (Windows side), can't paste in a WSL Window like gedit.  It doesn't share the same clipboard.

Closing this as dup of https://github.com/microsoft/wslg/issues/15.


Stop specifying ENV['FIXTURES_PATH']

This doesn't seem to be necessary (anymore?).

Closing in favor of https://github.com/davidrunger/david_runger/pull/1804.


Stop creating mozilla cacerts bundle if it is overridden

When using --custom-cacerts false as a parameter to makejdk-any-platform.sh (e.g. with BUILD_ARGS in the pipeline set to --custom-cacerts false) the mk-cacerts.sh (added in this PR) still generates the new cacerts file even when it is not required. This can add over a minute to the builds unecessarily.
Also testing in VPC
Slack discussion before I created this PR
Signed-off-by: Stewart X Addison<EMAIL_ADDRESS>

I prefer [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" != "false" ] because it being on is the default. But I can live with both.

I prefer [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" != "false" ] because it being on is the default. But I can live with both.

It's a double negative aren't we better off saying [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" == "true" ]?

@karianna if [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" = "true" ] ; then is developer convenience, if [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" != "false" ] ; then is user convenience :grin:
Whatever is chosen, it should be consistent.

true

I prefer [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" != "false" ] because it being on is the default. But I can live with both.

It's a double negative aren't we better off saying [ "${BUILD_CONFIG[CUSTOM_CACERTS]}" == "true" ]?

That's a philosophical question of whether you consider "false" to be negative and whether there may be other options other than true in the future for sourcing the cacerts.
@aahlenst You said you can live with both but you've actively marked it as "changes requested" instead of a "comment" which blocks approval - was that intentional? Saying that I agree with your comment from a consisteny perspective - I suppose the other option would be to change https://github.com/AdoptOpenJDK/openjdk-build/blob/master/sbin/build.sh#L381 to be = "true" too.
This is getting a bit abstract, but if there was any chance of it being set to blank or something else then that would be a driving decision maker, although to me the absence of a value would generally be considered "false" so checking for true is a better option.

You said you can live with both but you've actively marked it as "changes requested"

Yes, because currently the gates are different. A typo brings us into "both are true" territory, something we don't want I guess, especially if we say "OpenJDK, include our custom trust store" while we don't generate one.

You said you can live with both but you've actively marked it as "changes requested"

Yes, because currently the gates are different. A typo brings us into "both are true" territory, something we don't want I guess, especially if we say "OpenJDK, include our custom trust store" while we don't generate one.

OK so you mean you'd be ok if https://github.com/AdoptOpenJDK/openjdk-build/blob/master/sbin/build.sh#L381 was modified to be the same - in that case I'm happy to make that change

@aahlenst @karianna Both happy with the last update?

--custom-cacerts false now seems to have the desired effect of not generating the bundle - verified on JDK11/xLinux and JDK11/Windows


1.99.2 relnotes STO-7735 v2

Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.
Description

Please describe your changes: __________________________________
Jira/GitHub Issue numbers (if any): ______________________________
Preview links/images (Internal contributors only): __________________

PR lifecycle
We aim to merge PRs within one week or less, but delays happen sometimes.
If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.
PRs must meet these requirements to be merged:

[ ] Successful preview build.
[ ] Code owner review.
[ ] No merge conflicts.
[ ] Release notes/new features docs: Feature/version released to at least one prod environment.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6679f3ed5981da41d62d05da--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://6679fa4233e46c5191f1fd40--harness-developer.netlify.app


Replace deprecated ::set-env workflow command for security reasons

replaced unsecure stdout based ::set-env workflow command with save file system based version
change allows this workflow to run after upcoming deprecation of stdout based command this month (November 2020)

Sources:

Google Project Zero vulnerability report
GitHub ::set-env deprecation notes
migration advice followed in this PR

@daniel-eder: GitHub decided to move up the removal of the deprecated workflow commands to November 16th: https://github.blog/changelog/2020-11-09-github-actions-removing-set-env-and-add-path-commands-on-november-16/
In 4 days - any workflow who is trying to use the deprecated commands will stop work.

@jonico Thanks again, we'll implement the PR before our next build!


Intensity normalization question

Hello,
I have noticed in your code you use ImageNet mean-std normalization, which is for images in the 0-1 range.
Therefore, do you use min-max normalization to put Hounsfield Unit input images (original CT values) into the 0-1 range? Did you do that per volume? I haven't found details about that in the paper.
I want to make sure I am reproducing your work correctly, since the network performance can be affected greatly by wrong normalization.
Thank you

In addition, can we run the multi class model without labels and pseudo labels, just run it in a unseen image?
I am interested specifically in the GGO/Consolidation result, but it appears your test script requires labels to run

Greetings, Nice code, thank you! I have got the same question


Completely override a step result

I want to make an extension that defines a step like expect the following step to fail with "xxxx". Is there a way for an extension to completely override a step's result: to make it pass if it fails?

Could you elaborate a bit on the use case?

Let's say your features uses custom and pre-defined steps (e.g. Mink) and you want a scenario where a certain user can do 4 things, and a scenario where they can't do those 4 things. It'd be nice to say the next 4 steps must all fail, instead of pass, to pass. The alternative is to create 4 new custom steps to assert the opposite, but that's confusing, because they're custom and pre-defined. In Behat 3 you can't reuse steps anymore =( so that's also not an easy option.
There are a few Step result-ish events, but I couldn't find one to actually change a FAIL to a PASS.

I don't think so - when we do skipping that's baked into the ScenarioTester and StepTester.
You'd need to decorate the StepTester and override the results of run in a stateful way - this probably can't be done via the events system.

Can I decorate the StepTester and still use the normal behat bin and its options etc? Can a plugin do that?

Yes it can. Check
https://github.com/Behat/Behat/blob/master/features/extensions.feature
https://github.com/ciaranmcnulty/behat-stepthroughextension
for reference


Clarify comparison when enabling or disabling canvas_item copy_back_buffer buffer.

As identified by lgtm, the condition for creating or deleting the canvas_item->copy_back_buffer is unclear. This PR makes it clear that when p_enable is true and a canvas_item->copy_back_buffer doesn't already exist, to create one. Similarly, when p_enable is false and a canvas_item->copy_back_buffer exists, to delete it.

Thanks!


rethink how we expose the fsm to extensions

I’ve been thinking about the FSM.Domain and how we pass it to extensions. When I did the internal refactor I felt like FSM package should be a private API.
Maybe the bot should have some REST APIs for the extension to work with FSM with some safeguards in place. Instead of directly sending the FSM.Domain to the extension. I do feel like this make it less complex for developing new extensions so the extension author does not need to learn how to work with the FSM directly.
Thoughts?

I agree that FSM or at least a part of it should be private.
I don't know if I agree with the REST API approach, because we would have extensions making requests to the bot, and the bot making requests to the extensions, which could get problematic. The purpose of sending the entire Domain to the extension is to have all the available data about the bot and the user, for example:
{
    "fsm": {
        "state": 2,
        "slots": {
            "answer_1": "3"
        }
    },
    "extension": "val_ans_1",
    "question": {
        "sender": "cli",
        "text": "2"
    },
    "domain": {
        "state_table": {
            "any": -1,
            "initial": 0,
            "question_1": 1,
            "question_2": 2,
            "question_3": 3
        },
        "command_list": [
            "start",
            "end"
        ],
        "default_messages": {
            "unknown": "Not sure I understood, try again please.",
            "unsure": "Not sure I understood, try again please.",
            "error": "I'm sorry, there was an error."
        }
    }
}

It may seem complex but this way you can for example, go back to a certain state:
	if !(ans == "1" || ans == "2" || ans == "3") {
		return &extension.Response{
			FSM: &fsm.FSM{
				State: req.Domain.StateTable["question_1"],
				Slots: req.FSM.Slots,
			},
			Answers: []query.Answer{{Text: "Select one of the options"}},
		}
	}

Or do nothing with the FSM:
	return &extension.Response{
		FSM:     req.FSM,
		Answers: []query.Answer{{Text: message}},
	}

Use default messages, etc.
Maybe we could change the extension.Response to simplify the way extensions send messages and/or modify the FSM. Could be using "options", something like:
	return extension.NewResponse(
		WithAnswers([]query.Answer{{Text: "hello world"}}),
		WithFSM(req.Domain.StateTable["question_3"]),
	)

That way you wouldn't be "forced" to use the FSM or the Domain if you don't have to, and only reply with Answers.
I don't know. What do you think?

Yeah I like the idea of the FSM part being optional. And maybe we make FSMRequest and FSMResponse models public and hide all the FSM logic in the internal package.

I submitted #28, which simplifies the responses from extensions. The method NewExecuteCommandFuncResponse takes any number of ExecuteCommandFuncResponseOption arguments, so that you can modify only the parts of the response that you need to. For instance:
return req.NewExecuteCommandFuncResponse(
	// This doesn't modify the FSM and only returns
	// the "Hello Universe" message and an image.
	extension.WithAnswer("Hello Universe", "https://i.imgur.com/8MU0IUT.jpeg"),
)

And:
return req.NewExecuteCommandFuncResponse(
	// This returns the text "Select one of the options"
	// and makes the FSM go back to "question_1"
	extension.WithTextAnswer("Select one of the options"),
	extension.WithState(fsmDomain.StateTable["question_1"]),
)

Thoughts on this approach?

Cool I’ll take a look tonight


First character not selected when active postition "left" of anchor position

This worked until the last patch.

Duplicate


feat(browser): add commands to communicate betweens server and the browser

Description
Fixes #4918
This PR adds a @vitest/browser/context module that you can import commands and other utilities from. By default, Vitest provides these commands based on Web Test Runner:
function readFile(path: string, options?: BufferEncoding | FsOptions): Promise<string>
function writeFile(path: string, content: string, options?: BufferEncoding | FsOptions & { mode?: number | string }): Promise<void>
function removeFile(path: string): Promise<void>
function sendKeys(payload: SendKeysPayload): Promise<void>

The @vitest/browser/context module also exposes other variables:
export const server: {
  /**
   * Platform the Vitest server is running on.
   * The same as calling `process.platform` on the server.
   */
  platform: Platform
  /**
   * The name of the current browser provide.
   */
  provider: string
  /**
   * Runtime version of the Vitest server.
   * The same as calling `process.version` on the server.
   */
  version: string
  /**
   * Available commands for the browser.
   * @see {@link https://vitest.dev/guide/browser#commands}
   */
  commands: BrowserCommands
}

/**
 * Available commands for the browser.
 * A shortcut to `server.commands`.
 * @see {@link https://vitest.dev/guide/browser#commands}
 */
export const commands: BrowserCommands

export const page: {
  /**
   * Serialized test config.
   */
  config: ResolvedConfig
}

Example of using a built-in command:
import { commands } from '@vitest/browser/context'
import { test } from 'vitest'

test('keys are sent', async () => {
  await commands.sendKeys({ press: 'Tab' })
})

[!note]
All fs related operations require the file to be inside the root. This option is controlled by server.fs

You can add your own commands by adding them to browser.commands option:
export default defineConfig({
  test: {
    browser: {
      commands: {
        myCustomCommand({ provider }, arg1, arg2) {
          console.log('myCustomCommand called', arg1, arg2)
          return { someValue: true } // serialized and returned
        }
      }
    }
  }
})

Using inside a test:
import { commands } from '@vitest/browser/context'
import { test, expect } from 'vitest'

test('keys are sent', async () => {
  const result = await commands.myCustomCommand('test1', 'test2')
  expect(result).toEqual({ someValue: true })
})

declare module '@vitest/browser/context' {
  interface BrowserCommands {
    myCustomCommand: (arg1: string, arg2: string) => Promise<{ someValue: true }>
  }
}

TODO:

[x] Tests
[x] Docs

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
[ ] Ideally, include a test that fails without this PR but passes with it.
[ ] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

[ ] Run the tests with pnpm test:ci.

Documentation

[ ] If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

[ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.


Immediate crash on start if there is issues with head refs for any repo

Describe the bug
Basically today one of my head refs for a branch broke somehow. Not sure exactly how that happened but I discovered that the issued caused soft-serve to immediately crash on start.
This wouldn't be the worst if it was the only repo on the server but I have several working repos that were also rendered inaccessible.
I'm aware this exception might not be handled intentionally to avoid commiting changes to a damaged repo. If so change this from a bug report to a feature request with the feature being that a degraded repo should be disabled but working repos and soft-serve should stay active.
To Reproduce
Steps to reproduce the behavior:

Mess up the head ref for any branch
Try to start soft-serve
Have a bad time

Expected behavior
Branch or repo goes down, unrelated repos stay accessible.
Environment (please complete the following information):

OS: Arch
Terminal: Kitty
Version: 0.4.5-1

Thank you for reporting this bug @Zaiju-code. The issue is now resolved in v0.4.7.


Added WordPress Hooks

Added WordPress Hooks definition, usage, example and refrences

I am closing this PR because about WordPress Hooks already added.


[classification_and_detection] Where can we find details on data pre-processing for inference for imagenet data with resnet50v1.5 model?

Where can we find code and details on data pre-processing for inference for imagenet data with resnet50v1.5 model?

Hi @ahsabali, the official script for ImageNet is here. The preprocessed dataset takes about 29 GB in floats.
However, I'd strongly recommend to use Collective Knowledge for preprocessing. Here's how it works on a small dataset:
$ python3 -m pip install ck --user
$ ck pull repo:ck-env
$ ck install package --tags=dataset,imagenet,val,min --no_tags=resized
$ ck install package --tags=dataset,imagenet,preprocessed,for-resnet
$ ck locate env --tags=dataset,imagenet,preprocessed,for-resnet
/home/anton/CK_TOOLS/dataset-imagenet-preprocessed-using-opencv-crop.875-first.20-for-resnet-side.224-unmutilated

Unfortunately, the link for downloading the full ImageNet validation data set is no longer available.
However, if you already have this dataset in some location, you can register it with CK by providing the full path to ILSVRC2012_val_00000001.JPEG e.g.:
$ ck detect soft --tags=dataset,imagenet,val --full_path=/datasets/dataset-imagenet-ilsvrc2012-val/ILSVRC2012_val_00000001.JPEG

and then repeating the same:
$ ck install package --tags=dataset,imagenet,preprocessed,for-resnet

You can read more about preproprocessing options using CK here (including a "universal" method which only requires 7 GB of disk space and can be reused for MobileNet too, and using TensorFlow which results in the highest accuracy for ResNet).
Shout if you need any help.

@psyhtest Thanks for the answers, this is helpful. Any ideas how much is the difference in accuracy if we skip pre-processing for validation?

 It can easily be a couple percent, if not a dozen.

Yes. Any ballpark number for the minimum accuracy on raw data without pre-processing?

Well, I'm debugging a case right now where the ResNet accuracy drops to
under 50%, and the lack of preprocessing is the main suspect...
On Mon, 2 Dec 2019, 21:38 ahsabali<EMAIL_ADDRESS>wrote:

Yes. Any ballpark number for the minimum accuracy on raw data without
pre-processing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mlperf/inference/issues/541?email_source=notifications&email_token=ABSKZOTBK5RLKHO2CYKF43TQWV533A5CNFSM4JR6B5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFVGALY#issuecomment-560619567,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABSKZOW7GYGBG4ULYIZVK6LQWV533ANCNFSM4JR6B5HQ
.

@psyhtest Thanks for sharing the info. Can it drop to zero? E.g., for the fake imagenet data set in the example workflow, with pre-processing the accuracy for this data is 85%.

Everything is possible. In once instance, a model required normalized data, and the accuracy dropped to under 30% when we forgot to normalize the inputs.

Hi @ahsabali, the official script for ImageNet is here. The preprocessed dataset takes about 29 GB in floats.
However, I'd strongly recommend to use Collective Knowledge for preprocessing. Here's how it works on a small dataset:
$ python3 -m pip install ck --user
$ ck pull repo:ck-env
$ ck install package --tags=dataset,imagenet,val,min --no_tags=resized
$ ck install package --tags=dataset,imagenet,preprocessed,for-resnet
$ ck locate env --tags=dataset,imagenet,preprocessed,for-resnet
/home/anton/CK_TOOLS/dataset-imagenet-preprocessed-using-opencv-crop.875-first.20-for-resnet-side.224-unmutilated

Unfortunately, the link for downloading the full ImageNet validation data set is no longer available.
However, if you already have this dataset in some location, you can register it with CK by providing the full path to ILSVRC2012_val_00000001.JPEG e.g.:
$ ck detect soft --tags=dataset,imagenet,val --full_path=/datasets/dataset-imagenet-ilsvrc2012-val/ILSVRC2012_val_00000001.JPEG

and then repeating the same:
$ ck install package --tags=dataset,imagenet,preprocessed,for-resnet

You can read more about preproprocessing options using CK here (including a "universal" method which only requires 7 GB of disk space and can be reused for MobileNet too, and using TensorFlow which results in the highest accuracy for ResNet).
Shout if you need any help.

Hi Anton, what are the instructions to download the complete  imagenet2012 validation dataset for all models that use it?

Hi Vilmara,
The instructions are still exactly the same as you and other submitters used for v0.5:
$ ck install package:imagenet-2012-val

Unfortunately, the underlying link is now broken, so this command does not work any more. It's not a CK issue. It's not even an MLPerf issue, if you ask me. But we are somewhat stuck. Resorting to torrents to download ImageNet would be akin to sourcing rare goods from a black market (similar to this "Looking for Transistors" scene from a popular Soviet movie).
However, if you still have a copy of this dataset  in some location, you can register it with CK by providing the full path to ILSVRC2012_val_00000001.JPEG e.g.:
$ ck detect soft --tags=dataset,imagenet,val \
--full_path=/datasets/dataset-imagenet-ilsvrc2012-val/ILSVRC2012_val_00000001.JPEG

The best preprocessing method for ResNet (with the Top1 accuracy of 76.522%) uses TensorFlow:
$ ck install package --tags=dataset,imagenet,preprocessed,using-tensorflow --ask

Other methods are documented here.


Remove unwrap memory_segment

Remove unwrap memory_segment
Description
Remove unwrap from memory_segment
See #130
Checklist

[x] Linked to Github Issue
[ ] Unit tests added
[ ] Integration tests added.
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

Codecov Report

Merging #160 (5f796d1) into main (d6deba4) will decrease coverage by 0.03%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
- Coverage   96.33%   96.30%   -0.04%
==========================================
  Files          24       24
  Lines        4507     4514       +7
==========================================
+ Hits         4342     4347       +5
- Misses        165      167       +2

Impacted Files
Coverage Δ

src/vm/errors/memory_errors.rs
0.00% <0.00%> (ø)

src/vm/vm_memory/memory_segments.rs
98.46% <92.30%> (-0.48%)
:arrow_down:

src/vm/runners/cairo_runner.rs
98.86% <100.00%> (ø)

Continue to review full report at Codecov.

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


Add DeletionPropagation field for pod cleanup: background, orphan, etc

When cleaning up a pod on the latest version of k8s I'm getting warnings for pod cleanup.
This PR adds a helper method to the job to allow us to set the policy so we can remove the pods or ignore them gracefully:
Warning log
warnings.go:70]
  child pods are preserved by default when jobs are deleted;
    set propagationPolicy=Background to remove them or
    set propagationPolicy=Orphan to suppress this warning

Awesome, ty so much!


ImportError: No module named compiler.ast

I'm getting this error trying to npm install node-opus
I have already done apt-get install build-essential
What gives?

Build essential includes the system headers and C/C++ compilers (plus stuff).
The ImportError: No module named compiler.ast is a Python error message. Ensure you've got Python installed. Try doing python --version - the installed version should be 2.x (probably 2.7).
I believe you can install it with apt-get install python2.7, if it isn't installed already.

python --version returns Python 2.7.14 But using apt-get install python2.7 made it work. Very strange that build-essential did not install the part of python that lets you build.

https://packages.ubuntu.com/xenial/build-essential
Build essential only includes the native development tools. It skips things like python, perl, etc. which are stilll required for various builds, such as node-gyp. Not sure how you ended up with python without python2.7 though.


(failed) net::ERR_CONNECTION_CLOSED

I followed the documentation provided, and it seems that the server isn't accepting the connection. I am using laravel horizon, and am able to boot it up successfully. If I manually use the redis-cli, and apply the 'ping' command, I get a 'pong' response back.
Server appears to be up and running after applying the laravel-echo-server start command:
version 1.3.6

⚠ Starting server in DEV mode...

✔  Running at localhost on port 6379
✔  Channels are ready.
✔  Listening for http events...

bootstrap.js:

import Echo from 'laravel-echo'

window.io = require('socket.io-client');

window.Echo = new Echo({
    broadcaster: 'socket.io',
    host: window.location.hostname + ':6001',
});

.env:
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=redis

REDIS_HOST=localhost
REDIS_PASSWORD=null
REDIS_PORT=6379

laravel-echo-server.json:
{
	"authHost": "http://dialfy.local",
	"authEndpoint": "/broadcasting/auth",
	"clients": [
		{
			"appId": "dd4d563e7e81f442",
			"key": "1627b6fd226c7f3c866ca209f78779b6"
		}
	],
	"database": "redis",
	"databaseConfig": {
		"redis": {},
		"sqlite": {
			"databasePath": "/database/laravel-echo-server.sqlite"
		}
	},
	"devMode": true,
	"host": null,
	"port": "6001",
	"protocol": "http",
	"socketio": {},
	"sslCertPath": "",
	"sslKeyPath": "",
	"sslCertChainPath": "",
	"sslPassphrase": "",
	"apiOriginAllow": {
		"allowCors": false,
		"allowOrigin": "",
		"allowMethods": "",
		"allowHeaders": ""
	}
}

Any idea on what the issue may be, or where I could start looking? I imagine it is a configuration issue, but I can't seem to put my finger on it.

Figured it out -- my app was set to run with https, but I did not enable the https protocol with laravel-echo-server.


Can't build under Linux

Having issues with building under Linux fore several reasons.
Some suggestions:

Consider creating DNX project structure and target dnx451 and dnxcore50
Move from Visual Studio test project to NUnit or preferably XUnit as it's even better supported under DNX.

I could create a pull request at some point, once we agree on the details :)

Yes, I agree this should be cross-platform. I should add that to a section of project goals in the Read Me.
I'd be glad to accept a pull request with DNX project structure. I should have made it that way to start with in hindsight.
With regard to unit testing frameworks I should share context of current development and you can decide whether you want to continue working on an NUnit -> xUnit migration for all the tests I'm currently writing.
The compiler project is experimental because I took interest in monadic parser combinators after reading a whitepaper. I took a chance on a lightweight implementation (Sprache) that builds the grammar definition all in C# rather than a more conventional lexer / parser generator from EBNF grammar file.
xUnit might make refactoring the unit tests in that project tricky due to the strong opinions they have on unit testing best practices, i.e. explicit assertion of exception location in test method bodies as opposed to ExpectedException attribute.
For instance, at the moment I'm buying speed with the technical debt of not clearly defining in the unit tests which function in the composition fails for edge cases.
Motivation for that debt is to get quickly to point where I can evaluate if Sprache was the right fit for the compiler. Then I can either go back and pay the debt or push the debt into the rubbish bin with the implementation.
So you can decide if you want to spend that time before I'm sure the parser is viable.
The Generator should be quite stable though so no problems on that end.
In any case your efforts are most welcome.

Ok, thanks for the info/heads up. Created a PR #2 where we could continue discussions.

Should now build under Linux. Tested today with Ubuntu 15.04. Let me know if you have any issues next time you build.


3 Cycle

💥 Proposal
Given a graph with N vertices (numbered from 0 to N-1) and M undirected edges, then count the distinct 3-cycles in the graph. A 3-cycle PQR is a cycle in which (P,Q), (Q,R) and (R,P) are connected by an edge.
Have you read the Contributing Guidelines on Pull Requests?
Yes

/assign


Wildcard domains (*.example.com)

Would like to have wildcard domain support, right now certificates are issued for every subdomain i.e
1234.example.com
43443.example.com
have separate certificates.
We should create 1 certificate with *.example.com, and use it instead for every subdomain.
This would be helpful for services which serve subdomains.
Can start working on this if i have your ok @mholt

You can already use wildcards, just give CertMagic a domain like *.example.com instead of giving it each subdomain. (You'll also have to configure the DNS challenge.)

@mholt this does not work for ondemand certificates

Can you be more specific about what you need then?

Also, what is your use case for on-demand TLS with wildcard certificates?

@mholt I think the use case can be summarized like this:

application wants on-demand TLS because the whitelist is large and generating them ahead of time would be wasteful (all the usual reasons for on-demand TLS apply)
application knows that if ONE certificate is to be requested, wildcard certificate makes sense because additional requests are likely to follow using subdomains of the same level

Practical examples:

SaaS app where end user brings in their own Registered Domain and servers traffic for unlimited subdomains
Mail servers that handles a large number of Registered Domains and acts as e.g. imap.<domain>, smtp.<domain>, webmail.<domain>, mx.<domain>, mta-sts.<domain>, autoconfig.<domain>, autodiscover.<domain>, .etc.

In both cases there are two major considerations:

requesting certificates may have to be delayed (customer "onboards" domain but the DNS propagation hasn't finished), hence on-demand TLS
Let's Encrypt's limit of Certificates per Registered Domain (50 per week) may become an issue.

Potentially, adding a function DecisionWildcardFunc to certmagic.OnDemandConfig (in addition to DecisionFunc) could be a nice way to let CertMagic know when to go this route.

@DSpeichert Thanks, let me bounce back some thoughts on that:

SaaS app where end user brings in their own Registered Domain and servers traffic for unlimited subdomains

Using Let's Encrypt at least, this is an impractical scenario for wildcard certificates, because getting a wildcard from Let's Encrypt requires the DNS challenge. So if customers are in charge of their own domains, you can't configure the DNS challenge.
It remains to be seen what requirements are from other ACME CAs regarding wildcard certs.

Mail servers that handles a large number of Registered Domains and acts as e.g. imap., smtp., webmail., mx., mta-sts., autoconfig., autodiscover., .etc.

Assuming in this scenario, you are in control of the domains? Or not?
I ask about whether you're in control of the domains or know about them, because if you are, it is very easy to tell CertMagic to manage wildcards: magic.ManageAsync([]string{"*.sub.example.com"}) for example.
Am willing to add a feature of some sort, but need to be convinced of the need for it first. Further clarity would be helpful.

Using Let's Encrypt at least, this is an impractical scenario for wildcard certificates, because getting a wildcard from Let's Encrypt requires the DNS challenge. So if customers are in charge of their own domains, you can't configure the DNS challenge.

Assuming in this scenario, you are in control of the domains? Or not?

Let me try to clarify the example. In this scenario, for the SaaS provider hosts (or controls) the DNS servers that the domain name should be parked on. However, it does not own the domain. Throughout the signup process, a customer is asked to point the NS records for the domain name to be the DNS servers of the SaaS provider.
Therefore, the SaaS provider can then complete the challenge for DNS-based wildcard certificate validation. However, the timing of that is uncertain for the SaaS provider. They need to be ready the moment the domain is actually "live" (pointed at their DNS) but that may never happen (customers change their mind).
That's where the on-demand functionality offered by certmagic fits very well - an incoming request asking for a certificate for a given domain name is a pretty good indication that the DNS change has propagated and the SaaS provider indeed (in this example) controls DNS.
Thanks for mentioning magic.ManageAsync([]string{"*.sub.example.com"}, as it is in fact what almost works for this case, with one caveat. It instantly attempts to get the certs (and yes - will retry) but unnecessarily burns through failed attempts by starting too early, and it some cases the DNS control may never work.
Having an on-demand option with a whitelist of allowed domain names is just like ManageAsync with delayed fuse to avoid hitting limits on open validations with e.g. Let's Encrypt.
Naturally, the problem of verifying whether the app actually can control DNS could be shifted to the app and only after positive verification would the app call magic.ManageAsync(). It just seems like a desirable feature to be able to utilize the on-demand functionality at the time of actual TLS connection instead of background polling on a timer ("is it ready yet?").

That would be equally bad as waiting an hour for a DNS challenge that will never actually succeed (as a result of magic.ManageAsync() called prematurely).
I guess the desired outcome, to answer your question, would be to simply behave as if magic.ManageAsync() was called at that point in time. In the on-demand flow, the TLS handshake should probably time out after a short while(I imagine clients would bail anyway). At least that hour or so would kick off.
I would understand if you deem this problem too specific to accommodate in the library by default.

That would be equally bad as waiting an hour for a DNS challenge that will never actually succeed (as a result of magic.ManageAsync() called prematurely).

No, because with on-demand that waiting happens in the foreground. (I think we actually terminate it after a couple of minutes because a client is waiting to finish the connection. That might even be too long as-is.) In the current setup, it all happens in the background, all the meanwhile falling back to a staging environment that doesn't count against your rate limits.

At least that hour or so would kick off.

Maybe a better solution is to poll DNS or something?

I would understand if you deem this problem too specific to accommodate in the library by default.

We just need to find a workable solution before implementing it.


tree: Add independentView API

Description
Add independentView API
Reviewer Guidance
The review process is outlined on this wiki page.

Better versions of these API (implemented and with some testing) are in https://github.com/microsoft/FluidFramework/pull/22566


Summary: Rate always reported as 0.00 calls/nanosecond.

Describe the bug
The rates reported in the summary are always reported as 0 calls/time, example:

{activity="rampup",container="default",instance="default",jobname="nosqlbench",name="execute",node="<IP_ADDRESS>",scenario="default",session="o6n8Ghs",workload="cql_keyvalue2"}
count = 10000000
mean rate = 0.00 calls/nanosecond
1-minute rate = 0.00 calls/nanosecond
5-minute rate = 0.00 calls/nanosecond
15-minute rate = 0.00 calls/nanosecond
min = 662016.00 nanoseconds
max = 413564927.00 nanoseconds
mean = 1479745.52 nanoseconds
stddev = 3063217.47 nanoseconds
median = 1239231.00 nanoseconds
75% <= 1466559.00 nanoseconds
95% <= 2360191.00 nanoseconds
98% <= 4189951.00 nanoseconds
99% <= 6354431.00 nanoseconds
99.9% <= 14575615.00 nanoseconds

summary.log
To Reproduce
Execute
./nb5-21 cql_keyvalue2 basic_check driver=cqld4 host=<yourIp> localdc="datacenter1" username="cassandra" password="YOUR-PW" ssl=jdk --report-summary-to s_s.summary
The basic_check argument can be left out, it reports the same rate of 0 - it just takes longer to execute.
What was Expected
A rate different from 0 (when the count is > 0).
Additional context

version: 5.21.2-release
Ubuntu 24.04 LTS (Azure VM

I suspect this is a corner case of --report-summary-to and not reaching minimum run time needed for substantial metrics to be gathered. Can you give some details on your basic_check named scenario?

That does sound reasonable :-)
I've used cql_keyvalue2 from here: https://github.com/nosqlbench/nosqlbench/blob/main/nb-adapters/adapter-cqld4/src/main/resources/activities/baselinesv2/cql_keyvalue2.yaml, so it's just 10 cycles.
I've also experienced the same with a custom scenario, but unfortunately I don't remember what cycle number I ran it there with. It was either a similarly low number, or maybe 70'000...
With 5.21 I've experienced intermittent exceptions in the long-running "main" part and thus never had a look at a summary of a "full" run. I've switched back to using 5.19 and in the meantime I'm done with my tests.
Feel free to close the issue.


Filter option

Not an issue with the plugin, but an idea for future versions. Would it be possible to filter by location of implings found? For instance, filtering out puro puro results so that only overworld implings are listed

sure yeah great idea i can get around to adding that


Updated validations.py python script

Updated validations.py python script.
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!

@googlebot I fixed it.


[Benchmark] Workers

Another approach developers can take to discover how powerful a device is is by client-side benchmarking. The idea is that you load up a simple benchmark in a Web Worker that stress-tests how powerful the CPU is and can provide a very "loose" approximate of how powerful the device is.
For now, I don't think we need to build a demo around this, but I would like us to be able to create a benchmark that runs after page load that we could deploy to Firebase and just test using a few devices on WebPageTest.
For now, this is a placeholder issue. I'll add more details shortly.

For now, let's skip this. I don't think we want to encourage this pattern.


Add badges

Changes

[x] Added dependency codecov for coverage report handling.
[x] Added npm script coverage:upload for coverage report uploading.
[x] Added code coverage badge (by CodeCov for the current branch).
[x] Added npm badge (static by Shields.io).
[x] Added license badge (static by Shields.io).

Notes

Check results here. CodeCov badge status is unknown due to there are no uploaded coverage reports for develop branch. This will be fixed when this PR will be merged.

Regards.

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

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@e88c238). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop       #3   +/-   ##
==========================================
  Coverage           ?   76.80%
==========================================
  Files              ?       64
  Lines              ?     3087
  Branches           ?      767
==========================================
  Hits               ?     2371
  Misses             ?      471
  Partials           ?      245

Continue to review full report at Codecov.

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


Fix typo.

affect -> effect

I believe it is correct as is. :) Affect is the verb, effect is the noun. More info: https://www.vocabulary.com/articles/chooseyourwords/affect-effect/


Set-DbaSpConfigure doesn't handle multiple SqlInstances correctly

This:
foreach ($instance in $SqlInstance) {
            $InputObject += Get-DbaSpConfigure -SqlInstance $SqlInstance -SqlCredential $SqlCredential -Name $Name
        }

Should be changed to that:
foreach ($instance in $SqlInstance) {
            $InputObject += Get-DbaSpConfigure -SqlInstance $instance -SqlCredential $SqlCredential -Name $Name
        }

To work correctly when $SqlInstance is an array of Instances.
Sample input:
$SqlInstances = 'SRV1', 'SRV2'
Set-DbaSpConfigure -SqlInstance $SqlInstances -Name CostThresholdForParallelism -Value 52

Sample output:
ComputerName  : {SRV1, SRV2, SRV1, SRV2}
InstanceName  : {MSSQLSERVER, MSSQLSERVER, MSSQLSERVER, MSSQLSERVER}
SqlInstance   : {SRV1, SRV2, SRV1, SRV2}
ConfigName    : CostThresholdForParallelism
PreviousValue : 51
NewValue      : 52

ComputerName  : {SRV1, SRV2, SRV1, SRV2}
InstanceName  : {MSSQLSERVER, MSSQLSERVER, MSSQLSERVER, MSSQLSERVER}
SqlInstance   : {SRV1, SRV2, SRV1, SRV2}
ConfigName    : CostThresholdForParallelism
PreviousValue : 50
NewValue      : 52

ComputerName  : {SRV1, SRV2, SRV1, SRV2}
InstanceName  : {MSSQLSERVER, MSSQLSERVER, MSSQLSERVER, MSSQLSERVER}
SqlInstance   : {SRV1, SRV2, SRV1, SRV2}
ConfigName    : CostThresholdForParallelism
PreviousValue : 51
NewValue      : 52

ComputerName  : {SRV1, SRV2, SRV1, SRV2}
InstanceName  : {MSSQLSERVER, MSSQLSERVER, MSSQLSERVER, MSSQLSERVER}
SqlInstance   : {SRV1, SRV2, SRV1, SRV2}
ConfigName    : CostThresholdForParallelism
PreviousValue : 50
NewValue      : 52

Notes for contributor that handles this issue:
The logic for this function should be adjusted to match the standard of our commands.
There for each loop is not required but could be used in a different manner.
Please look at other commands in the module to get an idea what logic we use.


option twoside should have switched margins for lang=en

I want to print my book so I use this: \documentclass[a4paper,twoside,fancy,blue,11pt]{elegantbook}
Unfortunatelly the margins are reversed. I guess they are for right-to-left books like Chinese but for left-to-right one they are incorrect. I propose to change the geometry for lang=en option and keep it like it is for lang=cn. I tried to correct it using geometry package but an error occured.
I also propose that when twoside option is used, blank pages are inserted after title page and after unpaired table-of-content page.
How can I fix this quickly?

please disregard this.


Added Attribute xmlns:media

Hi,
I was getting an error on multiple Gatsby Builds until I added this attribute to the existing list of attributes.
Error:
error on multiple lines: Namespace prefix media on content is not defined
Fixed error by adding:
xmlns:media="http://search.yahoo.com/mrss/"
Thanks for a great package.

Travis' error is not caused by my edit.


Allow creating mixed type page_rules and firewall_rules

what
Change the type of the page_rules variable from list(any) to any. See https://github.com/hashicorp/terraform/issues/26265 for more information on why this is happening
why
When creating a list of page rules where some rules contain any of cache_ttl_by_status, forwarding_url, minify or cache_key_fields but others do not you receive the following error:
╷
│ Error: Invalid value for input variable
│
│   on main.tf line 8, in module "zone":
│    8:   page_rules = [
│    9:     {
│   10:       priority = 2
│   11:       status   = "active"
│   12:       target   = "foo.example.com"
│   13:       actions = {
│   14:         minify = {
│   15:           css  = "off"
│   16:           html = "off"
│   17:           js   = "off"
│   18:         }
│   19:       }
│   20:     },
│   21:     {
│   22:       priority = 1
│   23:       status   = "active"
│   24:       target   = "bar.example.com"
│   25:       actions = {
│   26:         browser_check = "off"
│   27:         cache_level   = "bypass"
│   28:         waf           = "on"
│   29:       }
│   30:     },
│   31:   ]
│
│ The given value is not suitable for module.zone.var.page_rules declared at .terraform/modules/zone/variables.tf:125,1-22: all list elements must have the same type.

Steps to reproduce:
module "zone" {
  source = "cloudposse/zone/cloudflare"
  # Cloud Posse recommends pinning every module to a specific version
  # version = "x.x.x"

  account_id = "example-account-id"
  zone       = "cloudposse.co"
  page_rules = [
    {
      priority = 2
      status   = "active"
      target   = "foo.example.com"
      actions = {
        minify = {
          css  = "off"
          html = "off"
          js   = "off"
        }
      }
    },
    {
      priority = 1
      status   = "active"
      target   = "bar.example.com"
      actions = {
        browser_check = "off"
        cache_level   = "bypass"
        waf           = "on"
      }
    },
  ]
}

@bryanhorstmann can you instead turn it to type = list(object(blah blah)) and make a complex object type to represent what the provider expects? See here https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes

@bryanhorstmann can you instead turn it to type = list(object(blah blah)) and make a complex object type to represent what the provider expects? See here https://developer.hashicorp.com/terraform/language/expressions/type-constraints#optional-object-type-attributes

@kevcube, I did start down this path, but then ran into a minor stumbling block. The cloudflare provider is not always clear on type. See https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/page_rule#actions. I can make an educated guess for all of them. eg all *_ttl should be int.
I'd need to increase the required version of Terraform to > 1.3.0 in order to support the optional() fields.
I've also just run into this same issue with firewall_rules. Happy to extend this change to include them as well.

@kevcube, I did start down this path, but then ran into a minor stumbling block. The cloudflare provider is not always clear on type. See https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/page_rule#actions. I can make an educated guess for all of them. eg all *_ttl should be int.

Yeah I think educated guess is good. They look descriptive enough to guess most or all.

I'd need to increase the required version of Terraform to > 1.3.0 in order to support the optional() fields.

No problem

I've also just run into this same issue with firewall_rules. Happy to extend this change to include them as well.

👍

Hey @kevcube, PR has been updated as requested. I've done the following:

Defined the page_rules object
Defined the firewall_rules object
Bumped required terraform version to > 1.3.0 in order to use optional() in the object spec.

docs/terraform.md still needs to be updated. I can see they're generated with helm-docs but I'm not sure if this is meant to be done manually or the CI will handle this.

/terratest

@bryanhorstmann see failing tests


ValueError: Extra data

Hi!
When running the update script during todays games I keep getting this error. Tried to update all python packages with pip but that made no difference. Is there anyone else getting this?
$ sudo nfldb-update
Traceback (most recent call last):
File "/usr/local/bin/nfldb-update", line 5, in
import nfldb.update
File "/usr/local/lib/python2.7/dist-packages/nfldb/update.py", line 15, in
import nflgame
File "/usr/local/lib/python2.7/dist-packages/nflgame/init.py", line 114, in
players = nflgame.player._create_players()
File "/usr/local/lib/python2.7/dist-packages/nflgame/player.py", line 21, in _create_players
data = json.loads(open(jsonf).read())
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 369, in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 111228 column 8 - line 111238 column 2 (char 3415175 - 3415465)

Apparently I did not update nfldb properly. I am closing this issue.

@danielcroona What did you do to fix it?

I just upgraded nfldb, and then I had to remove my entry for the LA Rams from the team database that I had made previously.
The update command:
sudo pip install nfldb --upgrade


On iOS 18.2, the sampling rate parameter is invalid

I set the sampling rate to 16000, but the result of the stopRecording function prints a sampling rate of 48000

Sometime the system doesn't support some specific rate, especially in simulator context. Instead of failing, it fallbacks to the supported one.

But my business needs to process audio data with a sampling rate of 16,000. What should I do? Thank you for your answer.


Trouble Provisioning Template

Following is the error I am getting when the deploy script is at the Applying Provisioning Template stage:
Apply-PnPProvisioningTemplate : The remote server returned an error: (403) Forbidden.
At C:\users\robb\desktop\Request-A-Team\Scripts\deploy.ps1:340 char:9

    Apply-PnPProvisioningTemplate -Path (Join-Path $packageRootPa ...

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], WebException
FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Site.ApplyProv
isioningTemplate
Applied template
Error occured while configuring the SharePoint site: Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (403) Forbidden."

@RobertBondy quick one, can you confirm the script definitely created the SharePoint site first?

Same issue here. But can confirm that sharepoint site is created.
TEAMS REQUESTS SITE CREATION
Creating Teams Requests SharePoint site...
Account                          Environment TenantId                             TenantDomain   AccountType

<EMAIL_ADDRESS>AzureCloud  xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx smevagroup.com User
https://xxxxx.sharepoint.com/sites/Requestateamapp
Site created
TEAMS REQUESTS SITE CREATION COMPLETE
REQUESTS SPO SITE CONFIGURATION
Configuring SharePoint site...
Applying provisioning template...
Apply-PnPProvisioningTemplate : The remote server returned an error: (403) Forbidden.
At C:\microsoft-teams-apps-requestateam-master\Deployment\Scripts\deploy.ps1:340 char:9

    Apply-PnPProvisioningTemplate -Path (Join-Path $packageRootPa ...

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : WriteError: (:) [Apply-PnPProvisioningTemplate], WebException
FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.Site.ApplyProvisioningTemplate
Applied template
Error occured while configuring the SharePoint site: Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (403) Forbidden."

I can state that the site was NOT created
Robert Bondy
Phone:<PHONE_NUMBER>
E-Mail<EMAIL_ADDRESS>On Thu, Oct 8, 2020 at 4:45 AM Alex Clark<EMAIL_ADDRESS>wrote:

@RobertBondy https://github.com/RobertBondy quick one, can you confirm
the script definitely created the SharePoint site first?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OfficeDev/microsoft-teams-apps-requestateam/issues/165#issuecomment-705424575,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQG4NO2MEQVMYMVDQHYPOJTSJV3ZJANCNFSM4SETGTVQ
.

The script was unable to connect to the Sharepoint Admin site to add the new RequestATeam site, so I added this line t the deploy script
$pnpConnect = Connect-PnPOnline $tenantAdminUrl -UseWebLogin
CreateRequestsSharePointSite
Now I am getting this error:
New-PnPSite : App-Only is currently not supported, unless you provide a Microsoft Graph Access Token.
At C:\users\robb\desktop\Request-A-Team\Scripts\deploy.ps1:309 char:9

    New-PnPSite -Type TeamSite -Title $RequestsSiteName -Alias $r ...

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : WriteError: (:) [New-PnPSite], Exception
FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.NewSite

Closed due to inactivity - reopen if required


Add support to GetIntOrZero()

Is your feature request related to a problem? Please describe.
The following code will throw an 'Invalid Cast Exception' in runtime:
	balance := storage.Get(ctx, from).(int)
	balance += amount
	storage.Put(ctx, from, balance)

This is because it returns nil when the key is not present.
Describe the solution you'd like
I like how Neow3j solves this problem by exposing a GetIntOrZero method.  As the name suggests, it will return 0 if the key is not present.
Reference:
https://github.com/neow3j/neow3j/blob/f2b243a5a01f864a3ee9b98de52458ad534a2f88/devpack/src/main/java/io/neow3j/devpack/Storage.java#L165
Describe alternatives you've considered
I'm checking for nil before using it.
Additional context
Casting will no longer be necessary with this improvement. Another change that could help, would be to allow Get calls without the context parameter.
Don't forget to add labels!

component label: compiler
category: enhancement

Related to #3381, likely can even be replaced by it.


extra-files feature has no way to update the Generic regex parameters

This is a feature request to expose the regex parameters that the Generic text updater provides. As far as I can tell there's no way to add an extra-files entry that sets these.
My use case is that I want to author a github pipeline using https://github.com/marketplace/actions/release-please-action to manage a unity project. Since unity uses YAML on the ProjectSettings/ProjectSettings.asset file, I tried using the generic updater, but I think that's not going to be the right way to go because:

As I understand it the generic YAML updater could manipulate more than just the one field (e.g. re-order fields, remove comments, etc).
The assets file uses yaml tags which fail to load in the current generic loader:-------^
 at generateError (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:48992:10)
 at throwError (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:48996:9)
 at composeNode (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50330:7)
 at readDocument (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50434:3)
 at loadDocuments (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50497:5)
 at Object.loadAll (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:50510:19)
 at GenericYaml.updateContent (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:94499:25)
 at GitHub.buildChangeSet (/home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:87530:51)
 at processTicksAndRejections (node:internal/process/task_queues:96:5)
 at async /home/runner/work/_actions/google-github-actions/release-please-action/v3/dist/index.js:86634:29 {
reason: 'unknown tag !<tag:unity3d.com,2011:129>',
mark: {
  name: null,
  buffer: '%YAML 1.1\n' +
    '%TAG !u! tag:unity3d.com,2011:\n' +

I think the mechanism I'd be looking to have is something like:
extraFiles: [
   {
      type: text
      path: ProjectSettings/ProjectSettings.asset
      inlineUpdateRegex: 'bundleVersion:'
   }
]

I'm happy to try to put together a PR that implements this generic text configuration.

Sure, we would take a PR to add this option to the config.


apple-nvram library: important lifetime bug-fixes

The lifetime of variable key was incorrectly tied to the raw NVRAM data buffer.
Internally, the parsed representation of NVRAM can still contain references to the original bytes, however, in the API, we must be able to pass references to keys with entirely independent lifetimes (in which case the key is cloned into a Cow::Owned).
I don't want to do a breaking API change, so I always pass the key by reference except it no longer has the 'a lifetime which was too constraining for practical use.

On second thought I'm not sure whether it's a good idea to even expose value in insert_variable function as Cow. I mean, internally, it makes sense. The parse function already constructs Variables directly and uses the Borrowed variant to refer to bytes inside the raw nvram buffer.
Other than that I don't see the use case. Typically when calling insert_variable, you will not pass references to the nvram buffer but most likely just a literal string or user input. When I wrote my tests I used Cow::Borrowed to a 'static string literal and that works but it's only usable if the lifetime of your value reference isn't shorter than lifetime of the Nvram object.
In that case you'd have to explicitly pass Cow::Owned but I think it would be more natural to use reference parameter with independent lifetime (i.e. the value is always copied internally). It just seems like micro-optimisation to allow zero-copy for a couple of edge cases while it increases verbosity.


Change GrpcNumChannelOptions Type

https://github.com/googleapis/google-cloud-cpp/blob/6d32bdfde24ee3f7189fe85471fa82f089c49a78/google/cloud/grpc_options.h#L37-L46
We would rather this be a std::size_t and not have to think about handling negative values.

Closing this issue, because it is not worth the trouble of changing.
If anyone is curious what a breaking change would look like:
https://github.com/dbolduc/google-cloud-cpp/commit/c0897b451c1a256e0c919beb9cf2c1912e3d9d6f


Improve navigation for docs

Add logo on each page
Use same layout in readme
Use only three columns but add item lists

Please review @willmostly @vishalya @Chaho12

I guess no more bolding current page link?

No .. ultimately I think we need to get a little website that deploys to github pages via a different branch going. I know how to do all that .. just need to figure out how this relates to plans I have with the Trino docs themselves..

Thank you @ebyhr @willmostly and @Chaho12


Link to Github repositories for jcef/cef for issue reporting

It appears the issue tracker has moved to Github for both cef and jcef, hence it makes more sense to link there in the issue tracker paragraph.

You are right, thanks for the patch :)


ViewModel for card

Create a Card for #survival-guide app that looks like Figma screenshot:

Link to figma
Each card should have the following:

[ ]  centered title,

[ ]  and left-aligned photo of the Ensign College logo.

:)


RTS-348 Fix console/HTTP errors creating bucket types

Fixes a badarity error thrown when no bucket type properties are given via riak-admin.
Fixes list_to_existing_atom error thrown on the HTTP interface when a table_def is specified.
riak-admin and the HTTP bucket props interface share the table_def to ddl conversion code. Error messages should be prettier, no stack traces for anticipated problems i.e. write_once:false and BucketType =/= TableName.
There are commands on the JIRA for testing the HTTP interface.

@borshop merge


Conflict with filters

I am having problems with how drf, dynamic-rest and django_filters are playing together.
I have:
Python 3.6.4
Django==2.0.4
djangorestframework==3.7.7
dynamic-rest==1.8.1
django-filter==1.1.0

I have this defined:
    INSTALLED_APPS = (
        ...
        'rest_framework',            # utilities for rest apis
        'dynamic_rest',
        'django_filters',            # for filtering rest endpoints
        ...
    }

And this:
    REST_FRAMEWORK = {
        'DEFAULT_FILTER_BACKENDS': (
            'django_filters.rest_framework.DjangoFilterBackend',
        ),
    }

This does not work:
class PscViewSet(DynamicModelViewSet):
    queryset = PSC.objects.all()
    serializer_class = PscSerializer
    permission_classes = (AllowAny,)
    filter_fields = ('owner',)

No filtering is possible, and the Filters button is not shown in the browsable API.
Doing this:
class PscViewSet(DynamicModelViewSet):
    queryset = PSC.objects.all()
    serializer_class = PscSerializer
    permission_classes = (AllowAny,)
    filter_backends = (filters.DjangoFilterBackend,)   # This added
    filter_fields = ('owner',)

allows for filtering, but no Filters button is shown in the browsable API.
Doing this:
class PscViewSet(viewsets.ModelViewSet):
    queryset = PSC.objects.all()
    serializer_class = PscSerializer
    permission_classes = (AllowAny,)
    filter_fields = ('owner',)

allows for filtering and shows a Filters button in the browsable API.

@gonvaled Did you find a solution to this?

Add DynamicFilterBackend to the list of filter backends

It took me a while to track down, but it's caused by the pagination_class that's automatically set by the DynamicModelViewSet. If you override that, it shows the filters again.
For some reason the DynamicModelViewSet doesn't listen to any setting either, it always defaults your view's pagination_class to it's own.
But... after looking at the code I suspect the workings of dynamic-rest are really out of date from how django-rest-framework is handling sorting/pagination/etc. I noticed several differences between the overridden code and the DRF internals so for now I've stopped trying to integrate this library within my project. I find it a bit too invasive with the (seemingly) needless overriding of paginator classes, filter backends and more.
I believe it's in need of a pretty big update before the API browser is fully functional (again?).


Is translate function available in json?

Hi, I'd like to use this library with python through the json client you offer. But I couldn't find in json docs any reference to the language translating function. Is it accessible in json or any api, or something like that?
Doc: https://core.telegram.org/tdlib/docs/td__json__client_8h.html

TDLib has translateText method, but you need a working app to use it and even in this case it can return 404.

Hey @levlam thanks for the response, any known reasons on why it would return 404? I plan to use it in my client app, which doesn't exist yet.

TDLib has translateText method, but you need a working app to use it and even in this case it can return 404.

Inside https://github.com/zevlg/telega.el app it always returns 404 for now