Create a new state waiting_for_motion or operator_pending_mode in ViState.

See: https://github.com/jonathanslenders/python-prompt-toolkit/pull/253
Probably, we can make give a CommandLineInterface object a vi_state instance and remove all references to get_vi_state. In the end, the get_vi_state function doesn't make much sense. It was introduced because we wanted to avoid having stateful key bindings, and vi_state used to be a variable in the load_vi_bindings function. We also didn't want to have it in CLI first, because having a state for one specific set of key bindings felt weird, but actually only Vi bindings need to have a state. (In pymux, where we started using that, we ended up having a separate CLI instance for each client, so having the vi_state attached to the CLI is flexible enough.)
ViState should have an operator_handler callback. One that takes a CursorRegion and is executed when a motion is given.
We need a @vi_motion decorator that registers a function as being a motion. This means that it decorates a function that creates a CursorRegion. The decorator will simply pass the result to event.cli.vi_state.operator_handler, and clear the operator_handler. When no operator_handler was set, the "operation" is simply to move and do nothing else.
g?, gu, gU, g~, y, c, d, <, >, gq: These key bindings should only set an operator_handler and do nothing else. (The last three are not implemented yet.)
This should significantly clean up the current Vi bindings code, and make adding new motions or operators easier. When this works, we can also support motions to be mouse clicks.
cc: @yyt16384

Implemented a while ago.


Mac unit tests crash after updating to core v2.3.3 when run in the Release configuration

After updating to core v2.3.3 in #4723, the Release configuration of the Mac unit tests is now crashing. The backtrace looks like so:
* thread #1: tid = 0x85e70f, 0x0000000104a3c7f3 Realm`realm::util::InterprocessCondVar::set_shared_part(realm::util::InterprocessCondVar::SharedPart&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 355, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000104a3c7f3 Realm`realm::util::InterprocessCondVar::set_shared_part(realm::util::InterprocessCondVar::SharedPart&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) + 355
    frame #1: 0x0000000104b27c45 Realm`realm::SharedGroup::do_open(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, bool, realm::SharedGroupOptions) + 2901
    frame #2: 0x00000001049e1582 Realm`realm::SharedGroup::open(realm::Replication&, realm::SharedGroupOptions) + 226
    frame #3: 0x00000001049e1187 Realm`realm::SharedGroup::SharedGroup(realm::Replication&, realm::SharedGroupOptions) + 1527
  * frame #4: 0x000000010499e1fe Realm`realm::Realm::open_with_config(realm::Realm::Config const&, std::__1::unique_ptr<realm::Replication, std::__1::default_delete<realm::Replication> >&, std::__1::unique_ptr<realm::SharedGroup, std::__1::default_delete<realm::SharedGroup> >&, std::__1::unique_ptr<realm::Group, std::__1::default_delete<realm::Group> >&, realm::Realm*) [inlined] realm::SharedGroup::SharedGroup(repl=0x0000600000120b40) + 898 at group_shared.hpp:800 [opt]

There is no debug information for the core symbols due to the release version of the core library being stripped.
The disassembly around the crashing instruction looks like so:
    0x104a3c7a1 <+273>:  leaq   0x23d3e3(%rip), %rsi      ; ".cv"
    0x104a3c7a8 <+280>:  leaq   -0x78(%rbp), %rdi
    0x104a3c7ac <+284>:  callq  0x104c135bc               ; symbol stub for: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::append(char const*)
    0x104a3c7b1 <+289>:  leaq   0x8(%r14), %rbx
    0x104a3c7b5 <+293>:  movq   0x10(%rax), %rcx
    0x104a3c7b9 <+297>:  movq   %rcx, -0x50(%rbp)
    0x104a3c7bd <+301>:  movq   (%rax), %rcx
    0x104a3c7c0 <+304>:  movq   0x8(%rax), %rdx
    0x104a3c7c4 <+308>:  movq   %rdx, -0x58(%rbp)
    0x104a3c7c8 <+312>:  movq   %rcx, -0x60(%rbp)
    0x104a3c7cc <+316>:  movq   $0x0, 0x10(%rax)
    0x104a3c7d4 <+324>:  movq   $0x0, 0x8(%rax)
    0x104a3c7dc <+332>:  movq   $0x0, (%rax)
    0x104a3c7e3 <+339>:  testb  $0x1, (%rbx)
    0x104a3c7e6 <+342>:  jne    0x104a3c7ef               ; <+351>
    0x104a3c7e8 <+344>:  movw   $0x0, (%rbx)
    0x104a3c7ed <+349>:  jmp    0x104a3c7fe               ; <+366>
    0x104a3c7ef <+351>:  movq   0x18(%r14), %rax
->  0x104a3c7f3 <+355>:  movb   $0x0, (%rax)
    0x104a3c7f6 <+358>:  movq   $0x0, 0x10(%r14)
    0x104a3c7fe <+366>:  xorl   %esi, %esi

The crashing instruction appears to be code inlined from std::string, corresponding to the expression m_resource_path = base_path + "." + condvar_name + ".cv";.
I'm not able to reproduce the crash when building against a local version of core v2.3.3 and sync v1.3.1. I've compared the disassembly of InterprocessCondVar::set_shared_part in a version of the framework that experiences the crash vs one that doesn't (built with local core and sync), and they're identical other than the addresses within the code. The code in SharedGroup::do_open that sets up the call to set_shared_part likewise appears to be identical.
I checked on CI and verified that the released bits of core v2.3.3 appear to have been built with Xcode 8.2 as expected, that the headers match those from my local build of core v2.3.3, and that the released bits contain all of the changes that went in to v2.3.3. That is to say, nothing looks obviously bogus about the released version of core that's being pulled down.
Steps to reproduce

Update realm-cocoa to latest master.
Open Realm.xcodeproj in Xcode.
Ensure that the active scheme is set to Realm, and the run destination is set to My Mac.
Product -> Scheme -> Edit Scheme…, select Test in the sidebar, and change the Build Configuration to Release.
Product -> Test.

Seems like a call to SharedGroup::open with options in which temp_dir isn't set correctly

Seems related to: https://github.com/realm/realm-core/commit/b58c097157402d7e13bd2260f2f75661926df0df

@finnschiermer and (mostly) I failed at building a local sync, but can confirm that a clean checkout of realm-cocoa indeed triggers this crash.

I did a fresh clone of the sync repo, checked out the tag corresponding to the latest release (v1.3.1), build the cocoa package, that was unzipped correctly into the realm-cocoa work area. Verified that sh build.sh download-sync did not modify the folder, but nonetheless ran into compilation issues.

Okay, after a bit of trail and error I managed to build core, sync correctly and can also confirm that I cannot repro with a local build.

What I've managed to determine so far is that the this pointer in InterprocessCondVar::set_shared_part doesn't point to a valid instance. The representation of the SharedGroup on the heap appears to have 8 bytes of padding between each InterprocessCondVar, while the code that populates the this pointer to m_new_commit_available doesn't account for this padding.
When we see the crash:
// The first condition variable, m_room_to_write, is 0x1c58 bytes into the SharedGroup.

// The code retrieves m_new_writes_available from 0x1cd0 bytes into the SharedGroup.
// That's not right.
(lldb) memory read -c 40 `$rdi + 0x1cd0`
0x10281aed0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff  ........????????
0x10281aee0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0x10281aef0: 00 00 00 00 00 00 00 00                          ........

The code for the SharedGroup constructor that's generated into shared_realm.o has the correct offsets. There's another (weak) copy of the constructor in client_file_access_cache-macosx.o within librealm-macosx.a that has the bogus member offsets. My suspicion is that the version of sync in question, v1.3.1, was not correctly built against the headers from core v2.3.3, but instead used core v2.3.2's headers in which InterprocessCondVar was a different size (prior to  89dbb1a3422fddeeaffc15358f66fd58d3ad5dc7).

When downloading realm-sync-cocoa-1.3.1.tar.xz , I can see that the headers contain the changes from the commit you mentioned ( https://github.com/realm/realm-core/commit/89dbb1a3422fddeeaffc15358f66fd58d3ad5dc7#diff-ea199165135792c1c963cd4d0de0e07eR113 )

But it is possible that sync was not built correctly, I'm looking into it.

I have been able to repro locally. Here's what I did:

Checkout and build core (build-cocoa) at v2.3.2.
Checkout core at v2.3.3 (do not build)
Checkout and build sync (build-cocoa) at v1.3.1
Checkout and build cocoa at master as described above.

This matches our observations that the assembly code looks like core v2.3.2, while the headers are from v2.3.3.
If this is indeed what has happened for that release, the question then becomes how. Perhaps @radu-tutueanu is able to offer some insights here?

I was suspecting ccache, but I rebuilt it without ccache and got the same result. Here is what I have until now:

The realm-core binaries in the 2.3.3 core archive are good, I managed to build sync locally using them and then run the tests.
The behaviour is reproducible on CI. The job always runs on the slave in CPH, I'm currently trying another one.

It build fine on lv_host2_2. So the issue is when building sync macos-cph-01.cph.realm, and it is not ccache. Maybe some job installed the core libs? I cannot ssh into the machine to figure out more, as my hotel's Wi-Fi blocks port 22. I can take a look on Monday.

@alebsack confirmed that there were (older) core headers installed on the machine. We need to figure out which job installed them.

@radu-tutueanu has rebuilt the sync v1.3.1 release on a different machine, and the tests now pass. Thanks, @radu-tutueanu!


Feature/fix swagger positions

This forces order for properties of a swagger doc, at least for the main classes like tool, workflow, etc.
Unfortunately if we add a property to entry for example, we have to update all positions in the Tool and Workflow classes. Still better than the constant failing though.
I suppressed checkstyle warnings for magic number, as I don't see the need for creating a constant for each position.

Coverage remained the same at 70.552% when pulling 19f57fbdbbb20a3e01d4cd08cd7068b46cea189d on feature/fix-swagger-positions into 79e8e103d9993a15570ef38420b139d670f49b4b on develop.


Add gem configuration options

Every time user needs a client instance, then they need to provide an app_id, secret_key, and api_host. But it can be simplified by providing a configuration option where they can set up their keys once, and the API client will handle the rest.
This commit changes the gem to be configurable and user can configure their keys as follow:
Bitbond.configure do |config|
  config.api_host = "https://www.bitbond.com/api/v1"
  config.app_id = "APP_ID"
  config.secret_key = "SECRET_KEY"
end

@kozak: Any thoughts?

Sorry for the late reply @abunashir.
Will need to redirect to @jareknowotka who is now maintaining this project.

Thanks for the update @kozak, Looking forward to hearing from @jareknowotka

@abunashir Thanks for that. It think it will be helpful.


implement the steepest descent method and the fire method

I implement the steepest descent method and the fire method.

Can one of the admins verify this patch?


Other high precision map download methods

Dreamview provides a default high-precision map. I want to know how to get other high-precision maps. Does Baidu provide this service.
System information

OS Platform and Distribution (e.g., Linux Ubuntu 18.04): 18
Apollo installed from (source or binary): source
Apollo version (3.5, 5.0, 5.5, 6.0):  5.5
Output of apollo.sh config if on master branch: master

Steps to reproduce the issue:

Please use bullet points and include as much details as possible:

Supporting materials (screenshots, command lines, code/script snippets):

There are also other maps in "modules/map/data", there is also a service in cloud

thank you 👍

@shusukui hope the answer resolved your question. We will close the issue for now. If you have any additional question, please feel free to open a new issue. Our engineer team are more than happy to help that.
Thank you for supporting Apollo!


Receive  message in SystemAccessPoint.parseEncryptedUpdates

My first try to install homebridge for my new free@home installation. But freeathome-api failes.
For a message of type headline I receive an item with an log element:
<item id="item6894353"><log xmlns="http://abb.com/protocol/log_encrypted"><message>kLrR...YNKg==</message></log></item>
The api doesn't like this. The filter function item.getChild('update').attrs.xmlns dies.
29.12.2019, 20:33:47 - ERR: Unexpected error while processing stanza event
29.12.2019, 20:33:47 - ERR: TypeError: Cannot read property 'attrs' of undefined

I've made a small patch for the function to skip the log messages (never done anything in JS before :) )
        let logitems = stanza.getChild('event').getChild('items').getChildren('item').filter((item) => item.getChild('log'));
        if (logitems.length == 0) {
            let items = stanza.getChild('event').getChild('items').getChildren('item').filter((item) => item.getChild('update').attrs.xmlns == 'http://abb.com/protocol/update_encrypted');
            for (let item of items) {
                let data = item.getChild('update').getChildText('data');
                let update = this.parseDecryptedData(new MessageReader_1.MessageReader(this.crypto.decryptPubSub(data)));
                this.applyIncrementalUpdate(XmlParser_1.XmlParser.parseUpdate(update));
            }
        }

Then the API is up and running. But I'm not sure if I'm missing now some important information.
If I start homebridge now I can connect it with my iOS home app, but absolutely nothing happens. No devices appear on the screen. But http://<IP_ADDRESS>:8080/info shows a lot of devices/data.
I've tried to handle the log messages like the update messages (parseDecryptedData). But than the first update(!) message failes with
29.12.2019, 20:48:30 - ERR: Error: Unexpected sequence in received symmetric nonce 653963(653968)

I have SysAP 2.0 with 97 devices and version 2.4.0 rev 7586.

Hi,
thank you for reporting this. I have never seen log messages before. Not sure what exactly they do but I think we can ignore them.
I have pushed a commit to the master branch which should correctly filter the update messages. Please switch to the master version and check if the error is gone.
If you still have issues, please post the data you receive from the info endpoint. Please mask all sensitive data like serial numbers if you post it here. You can also send it to my email address (see my GitHub profile) if you don't want to post it online.

Hi!
I've tested the current version at ea37191 and it works good. I got new warnings, but the api itself works fine.
I get now some new log information:
30.12.2019, 20:37:38 - WARN: Received Log Data which is currently not supported: 1.W3sgIlRJTUU...iLCAiUFJJT1JJVFkiOiAiNiIgfV0=
30.12.2019, 20:37:38 - WARN: Received Log Data which is currently not supported: 0.toTPUart   fc000....1001
toTPUart   30
fromTPUart fb000...100100
fromTPUart<PHONE_NUMBER>0801000007cd000005e50033000000a500000000000000000000000000000000
fromBus 7a 00 bce0  0109 94a8  01  0080 -
fromBus 7a 00 bce0  0109 8275  02  0080 - 00

Feel free to contcat me if you need more log examples.
Now I also configured homebridge better and I see many new icons on my home app. ;-)
Thanks for the quick reaction!

👍 It seems that the log data is for debug purposes. Do you have the free@home monitor enabled in the web interface? If so please try to disable it. Otherwise just ignore the messages. The API should just work fine.

Yes. After disabling monitoring in the web interface, the LOG messages disappear.

Alright. So I can close this issue now, right?

yes - thx


Add initial amp-jwplayer sample

#252

PTAL

LGTM, could you squash the commits?

Total aside since @kul3r4 asked for squashing: I switched this GH project from allowing both to "squash merging only", so this happens automatically when you press the big green button and you don't need to ask people. Let me know if anyone doesn't like that :)

@cramforce thanks!


WMS: Problems generating bbox using the OSMDroid library

I have a problem when consulting a WMS using the OSMDroid library, the problem lies in an erroneous generation of the bbox. For example, this is a good url with a correct bbox:
https://www.ign.es/wms-inspire/pnoa-ma?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fjpeg&TRANSPARENT=true&LAYERS=OI.OrthoimageCoverage&srsname=EPSG%3A25829&TILED=true&WIDTH=256&HEIGHT=256&SRS=EPSG%3A25829&BBOX=580836.6437384554%2C4745328.435582805%2C581278.1741512696%2C4745769.96599562
However, using the OSMDroid library, It shows me a white square for the badly generated bboxes:
https://www.ign.es/wms-inspire/pnoa-ma?SERVICE=WMS&request=GetMap&width=256&height=256&version=1.1.1&layers=OI.OrthoimageCoverage&bbox=580836.6437384554%2C4745328.435582805%2C581278.1741512696%2C4745769.96599562&srs=EPSG:3857&format=image/png&transparent=true
What I tried is this code that generate a WMSTileSource, which is set on the map:
val tileSource = WMSTileSource("OI.OrthoimageCoverage", arrayOf("https://www.ign.es/wms-inspire/pnoa-ma?SERVICE=WMS&"), "OI.OrthoimageCoverage","1.1.1", "EPSG:3857", null, 256)

binding.map.setTileSource(tileSource)

This error is due to the bbox, is there any configuration that should be done in the bbox or some way to handle it in a more customized way?
This should give me a map painted like this:

However, when I compile, it just shows me a blank map:

Need to whitellist the domain name.
For example, the manifest entry android:networkSecurityConfig="@xml/network_security_config" as in the https://github.com/osmdroid/osmdroid/blob/a9cfce7b7659c2f2443cf739ac5311b3768f82d7/OpenStreetMapViewer/src/main/AndroidManifest.xml
https://osmdroid.github.io/osmdroid/FAQ.html

what makes you think it's the bounding box that's the issue?


Implementation on TI C2000 MCU with 16-bit bytes

Hello,
I want to use your CANopen stack on Texas Instrument F28062 microcontroller, which directly supports only 16-bit memory access. As a result, the smallest variable I can use is uint16_t and sizeof(uint32_t) returns 2, not 4. It creates some problems with casting variables in libraries developed in 8-bit access in mind. For example, casting uint8_t array[4] to single uint32_t is not possible, but uint16_t array[2] to uint32_t is. If i need to cast array of 4 bytes, for example received from SPI, to uint32_t I need to do it using bit shifting and OR-ing.
Obvious solution to implement your stack is just to replace all uint8_t with uint16_t. It seems in most cases it would work fine. However, I am a bit concerned about buffers casted to void in functions reading buffers in co_obj.c file and maybe other places I didn't notice.
If you can give me any directions about implementation on this weird C2000 architecture I will be very grateful. Your stack is well written and documented, I really appreciate effort that you put into it.

Ok, so it finally works. I first implemented it on STM32 to get familiar with stack and have a 100% working example. Then I prodeeded with porting it to C2000.
Here are the steps that I had to take:

Implement all hardware driver functions for CAN and timer
Replace all uint8_t with uint16_t
Replace all calls to sizeof() in a stack with static values compatible with 8-bit architecture, i.e. sizeof(uint32_t) with 4, sizeof(uint16_t) with 2 and sizeof(uint8_t) with 1

For now, the "clock" example works fine. I haven`t perform any other test though, co more issues may show up in a future. Currently, I have PDO, SDO, NMT and heartbeat working properly.

Hi, great to hear that it is working for you now.
Regarding your steps, you have to take:

well, ok - that is needed for all targets. I just in thinking of adding a common driver repository with multiple targets in the future (no decision yet).
Hmm, can you explain, why this is neccessary. This change is hard to integrate in the stack, because the users with 8bit microcontrollers will not be happy...
Ok, this change we can take over in the common stack sources. Should not be a problem.

I remember in a former project, that I need to mask values in a DSP to get ANSI-C compliant values. Maybe, this can help us to get a canopen stack which suits the needs for DSPs, too?
voif foo(uint8_t *ptr)
{
  uint8_t val = *ptr & 0xFFu;
   :
}

Hi, as I mentioned in the original question, Texas Instruments C2000 microcontrollers do not support 8 bit memory access. Like you can't declare uint4_t variable in ARM, you can't declare uint8_t on C2000. Of course it is possible to get access to 8 bit aligned memory using unions or bit shifting, but this workaround brakes when pointers are used. And of course, sizeof still returns values expressed in 16 bit bytes.
I don't expect that you will introduce any of these changes to the stack, I just described my solution to help other programmers working on C2000. After all, 16 bit microcontrollers are a minority today and I don't think it is worth it to decrease stack performance to support them out of the box.

Ok, I just want to get a feeling if it could be possible to result in a version which is working on both: 16bit addressing machines & 8bit addressing machines (and even on 32bit addressing machines like the big TI DSPs)
Thanks for your effort!

Hi @sicrisembay
Sorry but I can't share the source code because it is part of a bigger project. But if you follow my hints from the previous post, you will easily make your own implementation. One additional thing that I discovered later is necessity to handle special case of string data types if string is shorter than 4 characters. You have to modify  COTStringRead function in co_string.c file to pack string data to the buffer like it was 8bit aligned in case the string is shorter than 4 chars.
Hardware initialization is a whole different story but it goes outside the scope of this issue. I implemented eCAN library on registers and used circular buffers with interrupts to handle data transmission and reception. As a timer I used CPUTIMER2 with frequency of 1MHz, as suggested in examples.


adapt configuration style of Git plugin version 2.x

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.


Clarify (or clean up) the Windows makefile

While taking a look around I saw in win.mk:
SRCS32=src/win/fsatracedll.c src/win/inject.c src/win/patch.c src/win/hooks.c src/emit.c src/win/shm.c src/win/handle.c src/win/utf8.c src/win/dbg.c src/win/inject.c
SRCS64=$(SRCS32) src/win/inject.c

So SRCS64 = SRCS32 + inject.c. But inject.c is already is SRCS32? Unlikely to be harmful, but I guess it's a mistake?

Worse than that, it's also replicated in SRCS32 :)
I left SRCS32=SRCS64.
Thanks!


Unsure if the QOKit MaxCut examples are working -- brute_force method.

I have been trying to use the QOKit simulator for larger instances but before that I wanted to verify it works for some trivial small ones.
I'd love some insight into if I'm doing something wrong -- thank you in advance 😁
I have created a basic 2-regular or ring graph

The solution for the two subsets are trivial:

Subset 0: Node 0, Node 2, Node 4
Subset 1: Node 1, Node 3, Node 5

However; when I run the code (see below) -- brute-force output is incorrect.
Pls let me know if I'm implementing this wrong?
from qokit.utils import brute_force
from qokit.qaoa_objective_maxcut import get_qaoa_maxcut_objective
from qokit.qaoa_circuit_maxcut import get_parameterized_qaoa_circuit

import gurobipy as gp
from gurobipy import GRB

# Define # of Layers
N_LAYERS = 20
# Generate a random 2-regular graph
N = 6
d = 2
seed = 1
G = nx.random_regular_graph(d,N,seed=seed)

# Build QC Circuit
qc = get_parameterized_qaoa_circuit(G, N_LAYERS)
qaoa_obj = get_qaoa_maxcut_objective(N, N_LAYERS, G)

brute_force_sol = brute_force(qaoa_obj, N, minimize=True)
print(brute_force_sol)

>>> (-1.091045519270739, array([1, 1, 0, 1, 1, 0]))

Here is a plot:

I also validated with Gurobi and it can produce the correct solution:
import gurobipy as gp
from gurobipy import GRB

for (u, v) in G.edges():
    G.edges[u, v]['weight'] = 1   # Set to 1 or some other weight if needed

# Create a new model
m = gp.Model("max_cut")
x = m.addVars(G.nodes(), vtype=GRB.BINARY, name="x")
m.setObjective(gp.quicksum(G[u][v]['weight'] * (x[u] + x[v] - 2 * x[u] * x[v]) for u, v in G.edges()), GRB.MAXIMIZE)

m.optimize()

if m.status == GRB.OPTIMAL:
    solution = m.getAttr('x', x)
    print("Solution:")
    for v in solution:
        print(f"Vertex {v}: {int(solution[v])}")
else:
    print("No optimal solution found.")

Vivek,
Apologies for the confusion! brute_force function is not meant to optimize the QAOA objective. Instead, it is meant to optimize the underlying cost function. In your example:
import networkx as nx
from functools import partial

from qokit.utils import brute_force
from qokit.maxcut import maxcut_obj, get_adjacency_matrix

# Generate a cycle graph
N = 6
G = nx.Graph()
G.add_edges_from([(i,(i+1)%N) for i in range(N)])

w = get_adjacency_matrix(G)

obj = partial(maxcut_obj, w=w)

optimal_cut, bitstring_encoding_cut = brute_force(obj, N, minimize=False, function_takes='bits')
print(f"Optimal cut: {optimal_cut}, encoded by bitstring {''.join(str(x) for x in bitstring_encoding_cut)}")

outputs
Optimal cut: 6.0, encoded by bitstring 101010

As your plot shows, this is indeed the optimal solution.


Can not read sampleSize of undefined

The reason was the scales object contained a property not related to a scale but a number.
Pen
Possible resolution
Could it make sense to get from the scales object all properties related to a Object instance and skip the others?
Originally posted by @stockiNail in https://github.com/chartjs/Chart.js/issues/7496#issuecomment-643144864

Is this a duplicate of https://github.com/chartjs/Chart.js/issues/7496?

Is this a duplicate of #7496?

I'd say no, #7496 is about scale ending up with no type. This case is when scale config is not an object (= invalid config).
The fix (if we want to fix this) is different.

I think skipping over the scale properties that are not objects would work. I quickly tried to prototype it out, but couldn't find the right spot yet to add that code. It's likely something in mergeScaleConfig

Maybe we could do a dev/debug mode with verbose errors that would get shaken out in normal build. Might be much work for little gain though.

This doesn't seem to crash anymore. Do we still want to try and fix this for v3.0.0?

This doesn't seem to crash anymore. Do we still want to try and fix this for v3.0.0?

Looks like it got fixed already.


Add main ui muti-language template

Add REFramework_language.h

Remove the changes that were leftover from #806 please.

@praydog please merge and update the 'pd-upscaler' branch


Validating Unique Values on Update

For example, on updating user account information. In the docs it looks like you can add a id to a unique column to ignore validation like so:
'email' => 'unique:users,email_address,10'
Does this package support this functionality? If so how would one implement this?
Thanks!

my extends


feat:no fullscreen in settings anymore

PR description
No fullscreen for the settings dialog which pops up.
Definition Of Done (DoD)
This PR can be squashed / merged if

[x] a developer is assigned
[x] the PR is NOT estimated
[x] the PR is labeled
[x] the PR is NOT assigned to the current sprint
[x] a meaningful title has been set according to https://www.conventionalcommits.org/
[x] the PR is described in detail
[x] the PR links to an issue
[x] the PR has been reviewed

Add additional conditions here if necessary for this PR
Fix: #123

Very nice work!


Prod build with strictNullChecks=true fails because of dependency despite skipLibCheck=true

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.
Angular CLI: 1.5.0
Node: 6.9.5
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.0
@angular-devkit/build-optimizer: 0.0.32
@angular-devkit/core: 0.0.20
@angular-devkit/schematics: 0.0.35
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.0
@schematics/angular: 0.1.0
typescript: 2.4.2
webpack: 3.8.1

Repro steps.

Create a new project.
Add a dependency that does not compile with strictNullChecks=true.
Enable strictNullChecks and skipLibCheck in tsconfig.

tsconfig.json:
    ...
    "strictNullChecks": true,
    "skipLibCheck": true,
    ...

The log given by the failure.

$ ng build --prod
Date: 2017-11-06T17:27:15.764Z
Hash: 8e4cd6cc4d070e8a0de8
Time: 22346ms
chunk {0} styles.fabe2b98feb13974353f.bundle.css (styles) 229 kB [initial] [rendered]
chunk {1} polyfills.3bc34265385d52184eab.bundle.js (polyfills) 86 bytes [initial] [rendered]
chunk {2} main.e402deade8b026b7d50e.bundle.js (main) 84 bytes [initial] [rendered]
chunk {3} inline.bb2ddc972beb199ae1a7.bundle.js (inline) 1.45 kB [entry] [rendered]

ERROR in Error at C:/[......]/ui/node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): Object is possibly 'undefined'.
Error at C:/[......]/ui/node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): Object is possibly 'undefined'.
Error at C:/[......]/ui/node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): Object is possibly 'undefined'.
Error at C:/[......]/ui/node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): Object is possibly 'undefined'.

Desired functionality.
The build should succeed.
Mention any other details that might be useful.
In my case I added ng-snotify: npm install --save ng-snotify.
I have not tried this with a version <1.5.0.

This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.

You can see the repository here: https://github.com/imba3r/angular-cli-issue-8373
$ ng build --prod

Date: 2017-12-07T19:38:41.852Z
Hash: 130d78083df4a2c035d6
Time: 1586ms
chunk {0} styles.d41d8cd98f00b204e980.bundle.css (styles) 0 bytes [initial] [rendered]
chunk {1} polyfills.3bc34265385d52184eab.bundle.js (polyfills) 86 bytes [initial] [rendered]
chunk {2} main.e402deade8b026b7d50e.bundle.js (main) 84 bytes [initial] [rendered]
chunk {3} inline.22b7623ed7c5ac6f9a35.bundle.js (inline) 1.45 kB [entry] [rendered]

ERROR in node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): : Object is possibly 'undefined'.
node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): : Object is possibly 'undefined'.
node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): : Object is possibly 'undefined'.
node_modules/ng-snotify/ng-snotify.d.ts.ToastComponent.html(1,193): : Object is possibly 'undefined'.

As soon as i remove strictNullChecks from tsconfig the prod build works.


⚠ Orpheus has degraded performance

In 249fc4d, Orpheus ($OPS) experienced degraded performance:

HTTP code: 200
Response time: 5322 ms

Resolved: Orpheus performance has improved in 4a07871.


Not possible to install mp4v2

Download location has changed https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mp4v2/mp4v2-2.0.0.tar.bz2

@berdot Thanks for the information, but this really isn't an issue for the Video Transcoding project. If you're trying to install mp4v2 via Homebrew then do a brew update first and you'll find the download location is correct in the formula. And it should install fine.


Initiate EasyCLA - Jorge Garcia

Please edit the title of the Pull Request to: "Initiate EasyCLA - "
This is a trivial test PR to initiate an EasyCLA check/signing process.
It is not intended to get merged.

Good to see that the CCLA of Telefonica works.


More features: longerThan, norm, copyTo and slice on a Slice

This adds a few utility functions to make some common operations easier.

 vector.longerThan(float) and slice.longerThan(float). This is useful for checks, to hide the more efficient comparison of squared values while not making the code ugly.
norm() and norm_squared() added to Slice. For things like vector3.xy().norm() or matrix3f.row(0).norm()
copyTo(float[]) for a Slice. Don't need a matrix temporary to do matrix3f.row(3).copyTo(buf)
Take a slice of a slice. Some things are easier to think about as sub-blocks, rather than absolute coordinates. Eg Vector3f z_accel_variances = matrix<float,25,25>.slice<3,3>(6,6).slice<3,1>(1,0). This is mostly to make it easier to understand.

Coverage remained the same at 100.0% when pulling 06467ebae4964243dc77bc9477d07957c028267b on more-features into 973999a4d3c6d4d85bf0153230974fd9571f7846 on master.


Carousel inner div is not identified by the carousel-inner class

Hello.
I have been using Bootstrap for a while now. Recently I designed a multiple item carousel, with each carousel-item containing two images. And it works just fine.
It worked quite well in my xl viewport (>=1200px). I realized, however, that the carousel would require some work to be fully responsive. As my goal is displaying the images clearly, I need to show only one image per item once the user is in a viewport smaller than the lg breakpoint (<992px).
I'll admit my idea to solve this was not necessarily the most "render-effective", but I expected it to work.
My approach was rendering the carousel-inner two times: one for the viewports greater than lg and another for the rest.
So the code looks a bit like this:

The problem I'm facing is that the controls fail to move the carousel items once we get to the other viewport. The controls seem to be associated with the first .carousel-inner div. Which would be totally fine and reasonable, if it stopped there.
So I made a test: I tried removing the carousel-inner class from the first div, leaving it only with the d-none d-lg-block classes.
It is not shown to the user (which is what I want), but the controls are still moving its items instead of the div that actually has the carousel-inner class.
So, even if I do this:

If you use the <  > controls, Bootstrap will move the items inside of the not-a-carousel-inner, even though it is not identified as a carousel inner.
This doesn't seem like a problem if you want to do a normal carousel, but in my case I see no alternative other than running a JS script to manually remove the first div once we get to another viewport. Just changing its class is not enough.
You can check this out in this CodePen I made. The div identified as .carousel-inner is styled correctly, but the one that Bootstrap controls and moves is the first div.
The issue is: if the carousel-inner class does not have the priority when the carousel-controls are used, then why even bother having a class, other than for styling. I'm still having a hard time understanding how Bootstrap manages to move the right carousel-items when they aren't even wrapped by a identifiable div. Unless it is just doing something like
$('.carousel').find('div').get(0).find('.carousel-item')...

Thank you very much!!!

Maybe you can experiment, on a branch and with a MR, tweaking carousel.js.
I suspect, that your problem is hiding somewhere there
https://github.com/twbs/bootstrap/blob/b991a6b8510216ba25cff02e0cc6c338f9f76113/js/src/carousel.js#L278-L282
Where the selectorEngine searches .carousel-item inside .carousel 😉

Closing this as stale and a won't fix since we haven't heard anything back.


Downscale not working

I understand that the encapp supports change in resolution on the fly. I have not been able to get it working. How to configure the encapp to downscale in encode or transcode path? Which java file performs this operation?

Hello @JohanBlome Could you please take a look at it and guide me how to enable downscale?

There is no scaling available unless using an encoded input and decodes it to a surface.
The reason for this is that

for scaling buffer the number of ways to do it (and opinions on the right way) are so many. For the purpose of Encapp doing the scaling outside of Encapp and let the encoder do what it does is more productive.
The scaling of surfaces on the other hand is something that fewer ways to do it and most often the default way is used and therefore of more interest to look at.

To test scaling you will need an encoded source, decode it into a surface and then encode at a different resolution.
If this does not work there is a bug and I'll happily take a look at it.

Saurabh, are you concerned about surface-based scaling, or about something like vendor.qti-ext-enc-caps-preprocess or vendor.qti-ext-down-scalar?

That also works if you have a Qcom chipset.

That also works if you have a Qcom chipset. Even with buffers (I think).

Yeah. The extensions I suggested (vendor.qti-ext-enc-caps-preprocess and vendor.qti-ext-down-scalar) are QC-only (the "qti" part should give it).

I verified that the following works:
test {
input {
filepath: "x_1920x1080.mp4"
}
common {
id: "bitrate_surface"
description: "Verify encoding bitrate - surface"
}
configure {
codec: "c2.qti.hevc.encoder"
bitrate: "500 kbps"
surface: true
resolution: "320x200"
}
}
And this works as well:
test {
input {
filepath: "walk1.y4m"
}
common {
id: "bitrate_surface"
description: "Verify encoding bitrate - buffer"
}
configure {
codec: "c2.qti.hevc.encoder"
bitrate: "500 kbps"
resolution: "320x200"
bitrate: "90 Mbps"
parameter {
key: "vendor.qti-ext-down-scalar.output-width"
type: intType
value: "320"
}
parameter {
key: "vendor.qti-ext-down-scalar.output-height"
type: intType
value: "200"
}
parameter {
key: "quality"
type: intType
value: "100"
}
}
}
With one proble. You will have to set the pix format on the command line --pix_fmt nv12 (I'll fix this error).

Saurabh, are you concerned about surface-based scaling, or about something like vendor.qti-ext-enc-caps-preprocess or vendor.qti-ext-down-scalar?

Thanks. But I am looking for generic scalar (default Android).

I verified that the following works: test { input { filepath: "x_1920x1080.mp4" } common { id: "bitrate_surface" description: "Verify encoding bitrate - surface" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" surface: true resolution: "320x200" } }
And this works as well: test { input { filepath: "walk1.y4m" } common { id: "bitrate_surface" description: "Verify encoding bitrate - buffer" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" resolution: "320x200" bitrate: "90 Mbps" parameter { key: "vendor.qti-ext-down-scalar.output-width" type: intType value: "320" } parameter { key: "vendor.qti-ext-down-scalar.output-height" type: intType value: "200" } parameter { key: "quality" type: intType value: "100" } } }
With one problem. You will have to set the pix format on the command line --pix_fmt nv12 (I'll fix this error).

Thanks for the tests you performed at your end. I will use these as reference and check. This is good to know.

I verified that the following works: test { input { filepath: "x_1920x1080.mp4" } common { id: "bitrate_surface" description: "Verify encoding bitrate - surface" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" surface: true resolution: "320x200" } }
And this works as well: test { input { filepath: "walk1.y4m" } common { id: "bitrate_surface" description: "Verify encoding bitrate - buffer" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" resolution: "320x200" bitrate: "90 Mbps" parameter { key: "vendor.qti-ext-down-scalar.output-width" type: intType value: "320" } parameter { key: "vendor.qti-ext-down-scalar.output-height" type: intType value: "200" } parameter { key: "quality" type: intType value: "100" } } }
With one problem. You will have to set the pix format on the command line --pix_fmt nv12 (I'll fix this error).

The latter example is flawed. Encapp will scale it before running:
I tried:
"
test {
input {
filepath: "X.y4m"
pix_fmt: nv12
}
common {
id: "bitrate_surface"
description: "Verify encoding bitrate - buffer"
}
configure {
codec: "c2.qti.hevc.encoder"
bitrate: "500 kbps"
parameter {
key: "vendor.qti-ext-down-scalar.output-width"
type: intType
value: "320"
}
parameter {
key: "vendor.qti-ext-down-scalar.output-height"
type: intType
value: "200"
}
parameter {
key: "quality"
type: intType
value: "100"
}
}
}
"
It does encode but fails writing the container.
I'll add this to my backlog.

I verified that the following works: test { input { filepath: "x_1920x1080.mp4" } common { id: "bitrate_surface" description: "Verify encoding bitrate - surface" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" surface: true resolution: "320x200" } }
And this works as well: test { input { filepath: "walk1.y4m" } common { id: "bitrate_surface" description: "Verify encoding bitrate - buffer" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" resolution: "320x200" bitrate: "90 Mbps" parameter { key: "vendor.qti-ext-down-scalar.output-width" type: intType value: "320" } parameter { key: "vendor.qti-ext-down-scalar.output-height" type: intType value: "200" } parameter { key: "quality" type: intType value: "100" } } }
With one problem. You will have to set the pix format on the command line --pix_fmt nv12 (I'll fix this error).

The latter example is flawed. Encapp will scale it before running: I tried: " test { input { filepath: "X.y4m" pix_fmt: nv12 } common { id: "bitrate_surface" description: "Verify encoding bitrate - buffer" } configure { codec: "c2.qti.hevc.encoder" bitrate: "500 kbps" parameter { key: "vendor.qti-ext-down-scalar.output-width" type: intType value: "320" } parameter { key: "vendor.qti-ext-down-scalar.output-height" type: intType value: "200" } parameter { key: "quality" type: intType value: "100" } } } " It does encode but fails writing the container. I'll add this to my backlog.

This works now, the following was sent:
"
test {
common {
id: "bitrate_surface"
description: "Verify encoding bitrate - buffer"
}
input {
filepath: "/sdcard/walk1.y4m.1920x1080.29.97.nv12.yuv"
resolution: "1920x1080"
pix_fmt: nv12
framerate: 29.97
}
configure {
parameter {
key: "vendor.qti-ext-down-scalar.output-width"
type: intType
value: "320"
}
parameter {
key: "vendor.qti-ext-down-scalar.output-height"
type: intType
value: "200"
}
parameter {
key: "quality"
type: intType
value: "100"
}
codec: "c2.qti.hevc.encoder"
bitrate: "500 kbps"
}
}
"
Result was a downscaled playable video.
Fix 21d7069596dc47b578990681e904ca6a76dcd88d .


[SPARK-41389][CORE][SQL] Reuse WRONG_NUM_ARGS instead of _LEGACY_ERROR_TEMP_1044

What changes were proposed in this pull request?
This pr aims to reuse error class WRONG_NUM_ARGS instead of _LEGACY_ERROR_TEMP_1044.
Why are the changes needed?
Proper names of error classes to improve user experience with Spark SQL.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass Github Actions.

+1, LGTM. Merging to master.
Thank you, @LuciferYang.

Thanks @MaxGekk


Add stub for datapath connectivity tests

This PR:

Extends cilium install to accept --nodes-without-cilium to denote nodes on which Cilium should not be installed.
Adds FeatureNodeWithoutCilium to test for such nodes.
Adds outside-to-nodeport as an example test case of the DP conformance suite.

See individual commit msgs for more details.
Ref: https://github.com/cilium/cilium/issues/20606

@brb this needs a rebase now that #1022 is merged. Also, it seems the Go workflow is failing because connectivity/check/deployment.go is not gofmted properly.

@tklauser Which Go vsn is used with the linter? I formated the code with the 1.18.4?

@tklauser Which Go vsn is used with the linter? I formated the code with the 1.18.4?

It's 1.18.5, but that shouldn't make a difference. Did you use the -s option? There is the following diff when I run gofmt -s -w on this PR:
diff --git a/connectivity/check/deployment.go b/connectivity/check/deployment.go
index d6110069a7a6..79121c247ff2 100644
--- a/connectivity/check/deployment.go
+++ b/connectivity/check/deployment.go
@@ -705,7 +705,7 @@ func (ct *ConnectivityTest) deploy(ctx context.Context) error {
                                        Command:     []string{"/bin/ash", "-c", "sleep 10000000"},
                                        HostNetwork: true,
                                        Tolerations: []corev1.Toleration{
-                                               corev1.Toleration{Operator: corev1.TolerationOpExists},
+                                               {Operator: corev1.TolerationOpExists},
                                        },
                                })
                                _, err = ct.clients.src.CreateDaemonSet(ctx, ct.params.TestNamespace, ds, metav1.CreateOptions{})


deleting a specific poller instance?

Hi,
Have the scenario where I have a "parent" poller running, then when a user clicks an expand link it starts a child poller, inside a controller. When they close the child view, I want it to remove the child poller totally.
Why you ask?
I've had to add "pause" functionality (to stop Chrome issues and save us bandwidth/processing power if people leave the page/tab open by mistake in the background). And I can't use the reset method as it'd clear the parent poller.
I currently use stop() but obviously if they open + close, then tab away (it pauses pollers), then tab back the child poller still exists and starts polling again.
Is it possible to get some kind of "delete" or "delete this instance of a poller" method?
Thanks,
Phil

Thanks for the detailed explanation!:)
It seems that you only want to start the child poller the very first time user clicks on the expand link. I'm not sure if delete method will help you in that case. Because if you initiate the child poller inside the child controller, then everytime user clicks on the expand link, the child poller will get initiatied again.


hare3: simplify code by removing active boolean

even passive node will generate message but will not send it.
this is also better for debug, as anyone can see what is going on without setting up smesher.
and i will use it in a follow up to extend that message with additional stats, such as voting tallies

bors merge

bors merge


Replace jPopulator with Random Beans

Hi,
I'm the author of jPopulator (and its successor Easy Random). This PR replaces the outdated jPopulator with Easy Random.
Please let me know if you need any support in using the library, I would love to help!
Best regards,
Mahmoud

Hi,
Indeed, the mapRandomAwsObjects test is failing. I somehow missed the AwsMixinGenerator plugin.. Sorry for that.
Nevertheless, while working on this PR, I noticed a change in behaviour between jPopulator and Random Beans (which I detailed here). After fixing the issue, Random Beans is able to randomize all classes from the AWS model generated in this project. However, out of the 12575 types, Jackson is not able to deserialize the following 13 types:
com.amazonaws.services.dynamodbv2.model.AttributeValue
com.amazonaws.services.ec2.model.AuthorizeSecurityGroupEgressRequest
com.amazonaws.services.ec2.model.AuthorizeSecurityGroupIngressRequest
com.amazonaws.services.ec2.model.DescribeSecurityGroupsResult
com.amazonaws.services.ec2.model.IpPermission
com.amazonaws.services.elasticmapreduce.model.AddInstanceFleetRequest
com.amazonaws.services.elasticmapreduce.model.AddInstanceGroupsRequest
com.amazonaws.services.elasticmapreduce.model.Cluster
com.amazonaws.services.elasticmapreduce.model.Configuration
com.amazonaws.services.organizations.model.AcceptHandshakeResult
com.amazonaws.services.organizations.model.CancelHandshakeResult
com.amazonaws.services.organizations.model.DeclineHandshakeResult
com.amazonaws.services.organizations.model.DescribeHandshakeResult
com.amazonaws.services.organizations.model.EnableAllFeaturesResult
com.amazonaws.services.organizations.model.Handshake
com.amazonaws.services.organizations.model.HandshakeResource
com.amazonaws.services.simplesystemsmanagement.model.GetInventoryRequest
com.amazonaws.services.simplesystemsmanagement.model.InventoryAggregator

Those types are either recursive in structure, or having fields of a particular type that does not provide a default constructor, etc. Each of them makes it impossible to deserialize from Json using jackson. I tested those types one by one and here are some errors I encountered:
com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError)

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.amazonaws.ResponseMetadata` (no Creators, like default construct, exist)

Unrecognized field "readLimit" (class com.amazonaws.services.ec2.model.AuthorizeSecurityGroupEgressRequest), not marked as ignorable

If you are ok with excluding these types from the test, I will update the PR accordingly (in addition to upgrading RB to the latest version). Otherwise, I will close this PR and let you continue with jPopulator. WDYT?
Best regards,
Mahmoud

Most of those aren't a big concern, the only ones that I would be a bit worried about are the EC2 objects. For the ones I looked at the problem was missing fields due to having deprecated getter/setter that would have a subset of information. I put in a patch to ignore the deprecated getter methods (#55) and tested with the current master of random beans. The EC2 objects worked fine at that point. Some of the others still fail, but that should be fine.
It does look like we would need a 3.9 release with some of the recent changes to make it work though.

Thank you for your feedback! I will cut a release soon and update the PR accordingly. FYI, I recently decided that v3.9 will be the last version in the 3.x line (which will be EOL), so I will update the PR with v4 (also to be released soon, probably the same day as v3.9). It would be wiser to update you with a maintained version rather than an EOLed one. I'll keep you posted.
Thank you!

Hi @brharrington ,
I released v4 and updated the PR accordingly. With your patch in #55 , the deserialization error for the IpPermission type does not happen anymore 👍
You will see that I excluded a couple of fields/types that do not provide a default constructor, which makes the deserialization with jackson to fail, but as you mentioned, that should be fine.
Please let me know if the changes are ok now or if the PR needs to be updated.
Best regards,
Mahmoud


only use splitHistory internally: return un-split tempHistory

Due to the way temp basal splitting works, the temp basal verification safety checks sometimes erroneously determine that a running temp basal doesn't match what's in pumphistory.  This PR continues to make use of the splitHistory internally, but returns the un-split tempHistory records for use in verification checks.

This looks good to me, so ready to merge it if no objections.


Doc - Describe list_test_entrypoints using Rustdoc comments (three slashes: ///)

In an effort of having fully documented code, we need the way we list entry points in a Cairo repository to be documented.
In src/cli/commands/test, please proceed to comment above the fn list_test_entrypoints declaration in an equivalent way as pub fn compile is documented.

I'd like to contribute on this issue


I can't get iframe and click element in iframe

I found a tested website(https://codepen.io/bi11johnston/pen/bsGDf), the "select file" element is in iframe. I try to use below two ways to get iframe, but I can't get the iframe. could you please help to find the reason?
first way to get the iframe
await page.goto("https://codepen.io/bi11johnston/pen/bsGDf");
await baseTest.sleep(10000);
const iframe = await page.frames().find(f => f.name() === 'CodePen');
await iframe.waitForSelector('.fileupload.fileupload-new');
await iframe.click('div.fileupload.fileupload-new');
it will display error "Cannot read property 'waitForSelector' of undefined"
I also try to get the iframe with below way, it also return error.
const elementHandle = await page.$('iframe[name="CodePen"]');
await console.log("this is log1"+elementHandle);
const iframe = await elementHandle.contentFrame();
Thanks in advance.

I'm getting a similar error and I think both are due to the same reason
code:
const myframe = page.frames().find(frame => frame.name() === 'tool_content');
await myframe.click('//span[contains(.,"Access now")]');
error:
TypeError: Cannot read property 'click' of undefined
any idea on this ?

adding below tag into launch options fixed the issue for me:
args: ['--disable-features=site-per-process']
@tlqiao please try this.

thanks, it works for me.


Users from the "userNamesToIgnore" list removed from their groups

Hello and thanks for the helpful tool.
I'm not sure, but it seems to be a bug. When I add a user to the userNamesToIgnore list, he is removed from all groups. A little debugging shows that ignored users are not skipped in the deployGitlabUsersAndGroups method.
Particularly ignored users are not skipped in this snippet.
https://github.com/Adambean/gitlab-ce-ldap-sync/blob/fab2ace0071f12b95735baaa30bf141ce0226ff3/src/LdapSyncCommand.php#L1913-L1928

@Adambean I tried to fix the bug. Can you take a look at the PR #41?

Thanks for submitting a PR :) I'll look into this shortly.


Add MiaoBi

It's a SD1.5 chinese text2image model, but  tokenizer_class is incompitable with official ComfyUI.
Some code changed in MiaoBi/sd1_clip.py(line-74, line-360) for loading custom tokenizer.
I'm not a coder, made this node just for interesting, there must be some bugs.

https://github.com/ShineChen1024/MiaoBi
https://huggingface.co/ShineChen1024/MiaoBi
diffusers_load.py、sd.py and sd1_clip.py were copied from ComfyUI/comfy.
Preserve diffusers node in case anyone want to use original MiaoBi model.

I will turn my repo ComfyUI-MiaoBi into private if this pr adopted.

Hi!
There is a much easier way to replace the tokenizer than copying both sd files from comfy. You simply have to replace the tokenizer after you've initialized it like a normal CLIP model. A similar trick works on the diffusers loader.
I've changed the names a bit as well. Not sure what the easiest way is for me to add changes so I'll just paste them here:

Nodes.py
import os
import folder_paths

import comfy.sd
import comfy.diffusers_load
from .tokenizer import MiaoBiTokenizer

class MiaoBiCLIPLoader:
    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {
                "clip_name": (folder_paths.get_filename_list("clip"),),
            }
        }

    RETURN_TYPES = ("CLIP",)
    FUNCTION = "load_mbclip"
    CATEGORY = "ExtraModels/MiaoBi"
    TITLE = "MiaoBi CLIP Loader"

    def load_mbclip(self, clip_name):
        clip_type = comfy.sd.CLIPType.STABLE_DIFFUSION
        clip_path = folder_paths.get_full_path("clip", clip_name)
        clip = comfy.sd.load_clip(
            ckpt_paths=[clip_path],
            embedding_directory=folder_paths.get_folder_paths("embeddings"),
            clip_type=clip_type
        )
        # override tokenizer
        clip.tokenizer.clip_l = MiaoBiTokenizer()
        return (clip,)

class MiaoBiDiffusersLoader:
    @classmethod
    def INPUT_TYPES(cls):
        paths = []
        for search_path in folder_paths.get_folder_paths("diffusers"):
            if os.path.exists(search_path):
                for root, subdir, files in os.walk(search_path, followlinks=True):
                    if "model_index.json" in files:
                        paths.append(os.path.relpath(root, start=search_path))

        return {
            "required": {
                "model_path": (paths,),
                }
            }

    RETURN_TYPES = ("MODEL", "CLIP", "VAE")
    FUNCTION = "load_mbcheckpoint"
    CATEGORY = "ExtraModels/MiaoBi"
    TITLE = "MiaoBi Checkpoint Loader (Diffusers)"

    def load_mbcheckpoint(self, model_path, output_vae=True, output_clip=True):
        for search_path in folder_paths.get_folder_paths("diffusers"):
            if os.path.exists(search_path):
                path = os.path.join(search_path, model_path)
                # 拼接os.walk索引的前置路径和选择的文件夹名字，适用于本地。
                if os.path.exists(path):
                    model_path = path
                    break
        unet, clip, vae = comfy.diffusers_load.load_diffusers(
            model_path,
            output_vae = output_vae,
            output_clip = output_clip,
            embedding_directory = folder_paths.get_folder_paths("embeddings")
        )
        # override tokenizer
        clip.tokenizer.clip_l = MiaoBiTokenizer()
        return (unet, clip, vae)

NODE_CLASS_MAPPINGS = {
    "MiaoBiCLIPLoader": MiaoBiCLIPLoader,
    "MiaoBiDiffusersLoader": MiaoBiDiffusersLoader,
}

tokenizer.py
import os
import folder_paths

import comfy.sd
import comfy.diffusers_load
from .tokenizer import MiaoBiTokenizer

class MiaoBiCLIPLoader:
    @classmethod
    def INPUT_TYPES(s):
        return {
            "required": {
                "clip_name": (folder_paths.get_filename_list("clip"),),
            }
        }

    RETURN_TYPES = ("CLIP",)
    FUNCTION = "load_mbclip"
    CATEGORY = "ExtraModels/MiaoBi"
    TITLE = "MiaoBi CLIP Loader"

    def load_mbclip(self, clip_name):
        clip_type = comfy.sd.CLIPType.STABLE_DIFFUSION
        clip_path = folder_paths.get_full_path("clip", clip_name)
        clip = comfy.sd.load_clip(
            ckpt_paths=[clip_path],
            embedding_directory=folder_paths.get_folder_paths("embeddings"),
            clip_type=clip_type
        )
        # override tokenizer
        clip.tokenizer.clip_l = MiaoBiTokenizer()
        return (clip,)

class MiaoBiDiffusersLoader:
    @classmethod
    def INPUT_TYPES(cls):
        paths = []
        for search_path in folder_paths.get_folder_paths("diffusers"):
            if os.path.exists(search_path):
                for root, subdir, files in os.walk(search_path, followlinks=True):
                    if "model_index.json" in files:
                        paths.append(os.path.relpath(root, start=search_path))

        return {
            "required": {
                "model_path": (paths,),
                }
            }

    RETURN_TYPES = ("MODEL", "CLIP", "VAE")
    FUNCTION = "load_mbcheckpoint"
    CATEGORY = "ExtraModels/MiaoBi"
    TITLE = "MiaoBi Checkpoint Loader (Diffusers)"

    def load_mbcheckpoint(self, model_path, output_vae=True, output_clip=True):
        for search_path in folder_paths.get_folder_paths("diffusers"):
            if os.path.exists(search_path):
                path = os.path.join(search_path, model_path)
                # 拼接os.walk索引的前置路径和选择的文件夹名字，适用于本地。
                if os.path.exists(path):
                    model_path = path
                    break
        unet, clip, vae = comfy.diffusers_load.load_diffusers(
            model_path,
            output_vae = output_vae,
            output_clip = output_clip,
            embedding_directory = folder_paths.get_folder_paths("embeddings")
        )
        # override tokenizer
        clip.tokenizer.clip_l = MiaoBiTokenizer()
        return (unet, clip, vae)

NODE_CLASS_MAPPINGS = {
    "MiaoBiCLIPLoader": MiaoBiCLIPLoader,
    "MiaoBiDiffusersLoader": MiaoBiDiffusersLoader,
}

And you can delete diffusers_load.py, sd.py and sd1_clip.py as they're not used anymore with the changes above.

Also, some small nitpicks:

I don't think emojis at the top of the readme are needed, just the links are enough.
The comment above the import in __init__.py uses spaces instead of tabs.
The workflow looks a bit too different from the other ones IMO. I try to keep the examples simple and only use the minimal amount of nodes.

I've made a simple workflow + showcase image. I think including the workflow in the showcase image isn't a good idea, because then the entire image will have to be changed if the workflow changes, which increases the size of the git repository when cloning it. That is also the reason why most images were included as links, but I see you've compressed them to jpeg files, which is a good idea.
I recommend adding these to the readme as just simple examples, since the note already explains that LoRAs/etc work.
Example Workflow
Example Workflow (diffusers)
markdown:
[Example Workflow](https://github.com/city96/ComfyUI_ExtraModels/files/15389380/MiaoBiV1.json)
[Example Workflow (diffusers)](https://github.com/city96/ComfyUI_ExtraModels/files/15389381/MiaoBiV1D.json)


Program Execution in JavaScript

Will document the execution context, its phases and call stack
Can I work on this issue?

/assign

Hey Aakansha! I think your issue was missed due to improper formatting. Sorry about that, please try to use the format specified in the contribution guide here: https://github.com/girlscript/winter-of-contributing/blob/Javascript/JavaScript/CONTRIBUTING.md
Please look for another issue or create your own! Thank you so much for the contribution!
P. S. Are you joining our weekly acknowledgement sessions on Discord?


[Bug] Server crashes with a large Area target.

Describe the bug
I tried to deal damage to every player in the world, so if they get killed... the chat says the player that casted the skill killed them.
I set an Area of 800 blocks with some Damage.
But when I cast the skill, the server freezes/crashes. I tried the Nearest target one aswell.
To Reproduce

Expected behavior
Deal damage to every player inside a very large area, and if the skill killed someone, I should the kill messages on the chat saying that the {caster} killed {target}.
latest.log
https://pastebin.com/bBrQjhi5
Versions (please complete the following information):

Spigot Version: git-Tuinity-"3eda860"
Server Version: (MC: 1.16.5)
Plugin Version: PROSKILLAPI-Alpha-1.1.6

Additional info
Maybe adding a new "World" Target could we get this to work?

Targeting a radius of 800 blocks is sure to cause some issues regardless of the context involved. That being said, adding a world target would be a good alternative to this as it is much easier to get entities/players in the world as opposed to mathematically calculating if entities are within range as this uses a lot of computational resources.

Yeah, that would be amazing and really useful.


codelldb prebuilt version too new for RHEL 7

OS: Red Hat Enterprise Linux 7.8
VSCode version:  1.42.1
Extension version: 1.5.0 or in native mode in older versions
Toolchain version: Clang 7.0.1
Build target: x86_64-redhat-linux
Python version: 3.6.8
With the removal of the "classic" mode, the debugger fails to start. It appears that the codelldb executable was built with glibc-2.18, but RHEL 7 uses 2.17. I'm stuck on RHEL 7 for the time being.  I'll have to stay on an older version unless the code is built with an older glibc. I'll be happy to put some effort into building the library if this isn't something you can solve easily.
Debug log
liblldb: /opt/rh/llvm-toolset-7.0/root/lib64/liblldb.so.7
libpython: null
environment: {}
params: {}
/home/dguthrie/.vscode/extensions/vadimcn.vscode-lldb-1.4.5/adapter2/codelldb: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /home/dguthrie/.vscode/extensions/vadimcn.vscode-lldb-1.4.5/adapter2/codelldb)
Error: The debugger exited without completing startup handshake.

Hi,
I'm seeing a similar issue on MacOS:
Error: "\"dlopen(/Users/xxx/.vscode/extensions/vadimcn.vscode-lldb-1.5.0/lldb/lib/liblldb.dylib, 9): Library not loaded: /usr/local/opt/xz/lib/liblzma.5.dylib\\n  Referenced from:  Users/xxx/.vscode/extensions/vadimcn.vscode-lldb-1.5.0/lldb/lib/liblldb.dylib\\n  Reason: Incompatible library version: liblldb.dylib requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0\""
Error: The debugger exited without completing startup handshake.

This is not on my machine, but two students in our C++ course reported such errors yesterday. Is it related, or perhaps a different issue?

@LEgregius: Yeah, the only option right now is to upgrade glibc to v2.18.
@SindreSB: This is a somewhat similar issue, but let's keep them separate.  I've created #270 to track this.   Can you please provide OS version?

@LEgregius: The other option is of course to downgrade codelldb to 1.4.5 and keep using classic adapter.

I am running 1.45, but I don't want to remain on an old version forever. Upgrading glibc isn't really an option. It would affect the entire system to do that, and would end up causing the binaries I compile to not be compatible with a deployed system. It would be possible to ship a version of glibc with codelldb, but it would have to be built to look for glibc in a nonstandard place.  It also might be possible to build it with one of libc replacement libraries and statically link it.  I was trying to build a replacement copy of codelldb myself.  Maybe I could just replace the path to it.  Is there anything special about your version that I can't just it with another one?

If you don't want to upgrade globally, you can have only CodeLLDB load the the new version, via LD_LIBRARY_PATH.  See the lldb.adapterEnv setting.

patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 --set-rpath $HOME/.vscode/extensions/vadimcn.vscode-lldb-1.5.3/lldb/lib:/opt/glibc-2.18/lib:/usr/lib64 vadimcn.vscode-lldb-1.5.3/lldb/lib/liblldb.so

Can you post the set of commands you used for this? I'm not familiar enough with patchelf but I am getting a "patchelf: cannot find section '.interp'. The input file is most likely statically linked" and I'm sure there are more commands than just that I would need.
Thanks in advanced! Will continue to tinker.

patchelf --set-interpreter /opt/glibc-2.18/lib/ld-linux-x86-64.so.2 --set-rpath $HOME/.vscode/extensions/vadimcn.vscode-lldb-1.5.3/lldb/lib:/opt/glibc-2.18/lib:/usr/lib64 vadimcn.vscode-lldb-1.5.3/lldb/lib/liblldb.so

Can you post the set of commands you used for this? I'm not familiar enough with patchelf but I am getting a "patchelf: cannot find section '.interp'. The input file is most likely statically linked" and I'm sure there are more commands than just that I would need.
Thanks in advanced! Will continue to tinker.


Download doesn't work on iOS

Hello,
I am using your app with ionic 2.2.1 and everything works just fine on Android, but fileTransfer.download() doesn't do anything on iOS, it just fails silently.
This issue is happening in my app where I'm using a similar method and I also tried it on yours and it neither works.

Hi @schwdim,
Are you testing on a real device? You should be hitting the error callback so I'm wondering if this issue is being caused by something else. May need to see some code

Right now I can only test it on an iOS emulator but I'll try as soon as I get a device. Your example app has the exact same issue, no callback at all.

@schwdim It only works on a real device due to data storage etc. Will try make it clearer in the README. Let me know how it goes!

Okay, so I tried on a real device, same bug... Images are not beeing downloaded and no error callback.

Okay so FileTransfer seems to download the file but the image isn't displayed actually

@schwdim It must be some other issue with your setup I guess? Let me know if you were able to get things to work


Filtering not working while relationTo is array of collections

Link to reproduction
na
Describe the Bug
i have a simple comment collection in basic payload create app which is having a relation with posts and blurbs collection, blurb collection is same as post
comment collection fields are
fields: [
    {
      name: 'title',
      type: 'text',
    },

    {
      name: "contentItem",
      type: "relationship",
      relationTo: ["posts", "blurbs"],

    },

    {
      name: 'status',
      type: 'select',
      options: [
        {
          value: 'moderation',
          label: 'In Moderation',
        },
        {
          value: 'published',
          label: 'Published',
        },
      ],
      defaultValue: 'moderation',
      admin: {
        position: 'sidebar',
      }
    }
  ],

i am trying to filter records  where comment status is moderation, for a post item , while the selection can be made in ui the results are not according to filter in ui the query string as captured in chrome devtool is
depth: 0
draft: true
limit: 10
page: 1
where[or][0][and][0][contentItem][equals][relationTo]: posts
where[or][0][and][0][contentItem][equals][value]: 654215843bb61a5bc9bb3593
where[or][0][and][1][status][equals]: moderation
invoke: 09b9bb2a-1781-4a6e-9216-a932dbf0aa65

here is an image of ui

To Reproduce
create basic blog payload project , copy post collection rename to blurbs, add comment collection ,
import { CollectionConfig } from 'payload/types';

const Comments: CollectionConfig = {
  slug: 'comments',
  admin: {
    defaultColumns: ['title', 'author', 'category', 'tags', 'status'],
    useAsTitle: 'title',
  },
  access: {
    read: () => true,
  },
  fields: [
    {
      name: 'title',
      type: 'text',
    },

    {
      name: "contentItem",
      type: "relationship",
      relationTo: ["posts", "blurbs"],

    },

    {
      name: 'status',
      type: 'select',
      options: [
        {
          value: 'moderation',
          label: 'In Moderation',
        },
        {
          value: 'published',
          label: 'Published',
        },
      ],
      defaultValue: 'moderation',
      admin: {
        position: 'sidebar',
      }
    }
  ],
}

export default Comments;

create a post
create a blurb
create a comment on post
create a comment on blurb
try to filter comment for post or blurb its not working
Payload Version
2.0.14
Adapters and Plugins
db-mongodb,bundler-webpack

Hi @geminigeek - please see my reply on this similar issue.
TLDR; this is expected behavior. Polymorphic relationships return a different data shape which is not supported by the collection filters.
I've added some clarification to our Relationship Field documentation, which will be live when this PR is merged.
It may be possible to add support for this in the future when a better solution is available.
Let me know if you have any questions about this or need further help. Thanks!

hi jess,
i can pull the intended data from the local api , why cant we run same query , if we have field.relationTo and field.value,
depth: 0
draft: true
limit: 10
page: 1
where[or][0][and][0][contentItem][equals][relationTo]: posts
where[or][0][and][0][contentItem][equals][value]: 654215843bb61a5bc9bb3593
where[or][0][and][1][status][equals]: moderation
invoke: 09b9bb2a-1781-4a6e-9216-a932dbf0aa65

i can see we have an upcoming  flag/header in a pr https://github.com/payloadcms/payload/pull/3324 that identify if the request is coming from admin ui, the same flag can be used to change querying for these kind of filters.
pulling data from local api
const result= await req.payload.find({
          collection: "comments",
          where: {
            and: [{
              "contentItem.relationTo": { equals: "posts"},
              "contentItem.value": { equals: "654215843bb61a5bc9bb3593"},
              "status": { equals: "moderation"},

            }]
          },
          depth: 0

        })


Temporary Database

Can we use sqlite temporary database with this driver? I know that the driver supports in-memory, but it is not the same:

Even though a disk file is allocated for each temporary database, in practice the temporary database usually resides in the in-memory pager cache and hence there is very little difference between a pure in-memory database created by ":memory:" and a temporary database created by an empty filename. The sole difference is that a ":memory:" database must remain in memory at all times whereas parts of a temporary database might be flushed to disk if the database becomes large or if SQLite comes under memory pressure.

If you don't pass a file name it should be a temporary database. Seems documented here: https://github.com/xerial/sqlite-jdbc/blob/master/USAGE.md#how-to-use-memory-databases

I hadn't noticed because the documentation says "memory database" instead of "temporary database". In short, it was my fault. Thanks.

I hadn't noticed because the documentation says "memory database" instead of "temporary database". In short, it was my fault. Thanks.

i was not aware of the difference to be honest, the documentation could use some updated wording i guess

I hadn't noticed because the documentation says "memory database" instead of "temporary database". In short, it was my fault. Thanks.

i was not aware of the difference to be honest, i have updated the wording in the documentation

Thank you for that, it's easier to understand.
The "memory database" is always on the memory and doesn't have any file. On the other hand, the "temporary database" creates a file in the temp path of the system, and the file is automatically deleted after the connection closes. This temporary file will be used if the database becomes large or if SQLite comes under memory pressure to flush to the disk parts of the database.
Source: https://www.sqlite.org/inmemorydb.html


Add spaces between groups of digits

in order to read the numbers more easily we should add some space between group of digits. keep track of bitcoin's attempt to implement it: https://github.com/bitcoin/bitcoin/pull/4167

will be included once we update to litecoin v0.10.x


Adding unit tests for the add delegate code

Looking into making some enhancements to the current add/removal of delegates and votes. Started writing some unit tests to broaden coverage as I was going through the code. Also cleaned out the unused sponsor code.

Thank you.
This kind of PR are very useful: you deserve your +5


new default project icon

to go with the new theme in pull request #704

Time to merge this too!

Yeah hope this get merged too


fix options menu messed up shits

The issue with downScroll got fixed, the other thing you "fixed" actually made the layering of Boyfriend wrong on the options menus.

ik lol
i reverted that in this pr xd


Add gg and G

Please add gg and G to move to top and bottom of list

Oops, this is apparently possible through config file.
[Keys]
g = first-item
G = last-item

Closing this as resolved. Thank you


iframe.contentDocument is null in firefox 66

Describe the bug
Crashes in Firefox 66 on this line:
https://github.com/storybooks/storybook/blob/e14b5c5f6dd50a5875f822627e23e356807a97a6/lib/components/src/tooltip/WithTooltip.js#L110
iframe.contentDocument == null here
iframe is from  an extension https://github.com/wolfmanstout/vimium

To Reproduce
Steps to reproduce the behavior:

start storybook
Wait for it to open
Blank screen with error TypeError: iframe.contentDocument is null

Expected behavior
Storybook UI opened
System:

OS: Arch Linux
Device: Desktop x64
Browser: Firefox 66.0
Framework: React
Addons:
"@storybook/addon-actions": "^5.0.3",
"@storybook/addon-info": "^5.0.3",
"@storybook/addon-links": "^5.0.3",
"@storybook/addon-viewport": "^5.0.3",
Version: 5.0.3

Additional context
Add any other context about the problem here.

Give me 15 minutes!

Son of a gun!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.13 containing PR #6238 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.

Yay!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.4 containing PR #6238 that references this issue. Upgrade today to try it out!

There's something strange happened with releases. yarn upgrade-interactive --latest wants to install 3.4.12 instead of 5.0.4.
on  https://www.npmjs.com/package/@storybook/react it says that
Current Tags

    4.0.0-alpha.25    alpha
    3.4.12    latest
    4.0.0-rc.6    rc
    5.1.0-alpha.13    next
    5.0.0-debug.3    debug

Thanks @Dema for letting me know. I did new releases for 3.4.x and 4.1.x to workaround a bug in one of Storybook's dependencies, but I didn't realize that would mess up the latest NPM tag. I just released 5.0.5 to fix it. https://github.com/storybooks/storybook/releases/tag/v5.0.5


Add documentation for the probably unknown feature of function multiplication

Who knew this stuff existed 🤔

Me, only because I know way too much about Vyxal and its quirks.


Yeta Wrench menu gone

What it says on the tin. Was messing with graphic options in game, touched mipmap(I think) and now the menu no longer appears. I have restarted my game and tried each mipmap option, restarting in between, and the menu will not reappear.

Tried removing texturepack?

...I should be insulted but I supoe you just have to expect that level of intellect on the internet at this point.
Yes. I have removed the texture pack and nothing changed.(even restarted.)
Proof that it works with this texture pack.

Proof that it doesn't work with default texture pack either

.

What version?

most recent forge(.1428) version and most recent ender io(.381) version for minecraft 1.7.10

In the latest EIO the yeta wrench overlay was moved to the bottom right. So your minimap is covering it

In fact I can see it in the screenshots

I move my minimap to stop covering up things in the top right to the lower right...only to cover up things. How...painful.


Question: opaque types and capabilities

I've been learning a lot reading through the specification and tutorial for Austral. It's a great project!
Specifically i've been looking at the tutorial page for capability-based security and i'm having a little trouble wrapping my head around something and was hoping somebody may be able to help clarify (what I assume) is a misconception of mine.
Regarding:
module Env is
    type EnvCap: Linear;

    generic [R: Region]
    function acquire(root: &[RootCapability, R]): EnvCap;

    function release(cap: EnvCap): Unit;

    ...

The tutorial explains that creating an EnvCap capability as a Linear Type is a way of ensuring a consumer of a module has access to the Root Capability. It mentions that:

EnvCap is a linear value that represents the ability to access the environment. Since it is an opaque type, it cannot be created by clients. The only way to construct an instance of the EnvCap type is via the acquire function. Dually, the release function consumes the capability.

This concept of the opaque type is where i'm getting stuck, as it's not obvious to me how the EnvCap type is marked as opaque. Copying this .aui file from the tutorial and creating a basic module body for it still allows me to import EnvCap and, more importantly, create an instance of the record type using let env_cap: EnvCap := EnvCap();, bypassing the requirement for the acquire function at all, letting me forge an EnvCap capability which as I understand should not be possible.
I thought that maybe i'd done something silly in my implementation of the module body, so I found a similar capability pattern in standard IO.aum and IO.aui for the TerminalCapability and copied it to my test project and found the same issue.
The following program is accepted by the compiler - creating a TerminalCapability without needing to call the acquireTerminal function, nor pass it a RootCapability
import Standard.IO (acquireTerminal, releaseTerminal, TerminalCapability);

module body Hello is

	function foo(): Unit is
		let x: TerminalCapability := TerminalCapability();
		releaseTerminal(x);

		return nil;
	end;

	function main(): ExitCode is
		foo();
		return ExitSuccess();
	end;
end module body.

The most obvious explanation here is that my interpretation of opaque types is incorrect. Any help in figuring out where my understanding has gone wrong would be appreciated.
Thanks!

This may be a bug in the compiler. A type is opaque if its signature appears in the .aui file as type Foo; rather than explicitly as a record or union. It shouldn't be possible to call the constructor for such types outside the module that defines them.


How to get permission to use snowboy???

Hi guys. I success to detect my voice to use snowboy. But when I ask something, always snowboy say please give me permission. I think snowboy doen't have permission to use Assistant.
Also I can't see GA Response.
[VOX] GA Transcription:  What time is it?
[VOX] GA RQC:  2
[VOX] GA Response:
Please help me!!

I have solved this issue. On the Activity Controls page, make sure to enable:
Web & App Activity and also check: "Include Chrome browsing history and activity...".
Device Information
Voice & Audio Activity


Streamline Project Structure and Enhance User Interface with Menu Button Implementation on About and Contact Pages

Title: Streamline Project Structure and Enhance User Interface with Menu Button Implementation on About and Contact Pages
Description:
This pull request aims to improve both the functionality and organization of our project by addressing key issues related to the user interface and code management.
Key Changes:

Menu Button Implementation:

Introduced a fully functional menu button to the About and Contact pages, enhancing navigation for users.
Developed and applied tailored CSS styles to ensure the button aligns with our design aesthetics and provides a consistent user experience.

Duplicate File Removal:

Conducted a thorough audit of the codebase and identified several duplicate files containing incomplete or redundant code.
Removed these unnecessary files, streamlining the codebase and ensuring we leverage only the complete and correct versions of our code.

Impact:

This update not only enhances the overall user experience by improving navigation but also contributes to better project maintainability by reducing clutter and potential confusion in the codebase.

I appreciate your review of this pull request and look forward to your feedback.

@mansiruhil13 @4F24L hey there please review this PR once and add appropriate level under GSSOC and Hacktoberfest.
It would be great if you would give this PR a level 2 as i improved the code in this website as well and removed unnecessary duplicate file

Resolve conflicts. @Sachinkun

there are some conflicts, resolve. and screenshot??


add security group id output

Not sure how this solves the problem I was describing in the original deployment-automation PR.
As currently designed, the intra-cluster communication within the security group depends on the egress rule always allowing outbound access to <IP_ADDRESS> in the cidr rule. Anyone wanting to lock the SG down will trip over breaking the cluster when they modify this rule.
We should be explicit in this regard and allow instance-to-instance communication within the SG.
As well, the current design for the var.ingress_rules and var.egress_rules seems weird. If someone overrides the default, they immediately have to re-establish all the rules as they're overridden. Seems like we should default to having rules added to the map unless explicitly looking to override all.

Not sure how this solves the problem I was describing in the original deployment-automation PR.
As currently designed, the intra-cluster communication within the security group depends on the egress rule always allowing outbound access to <IP_ADDRESS> in the cidr rule. Anyone wanting to lock the SG down will trip over breaking the cluster when they modify this rule.
We should be explicit in this regard and allow instance-to-instance communication within the SG.
As well, the current design for the var.ingress_rules and var.egress_rules seems weird. If someone overrides the default, they immediately have to re-establish all the rules as they're overridden. Seems like we should default to having rules added to the map unless explicitly looking to override all.

Fair points, I'll work on a redesign.


No IPv4 Address

Describe the bug
When using OpenVPN 2.6.0, our Windows clients can't assign the IPv4 address given by the server, which results in a later failure when the client tries to set routes dependent on that IPv4 address. The issue does not appear when using the old tap-windows6 driver by setting disable-dco in the client config.
Redacted Log (I hope it is still readable enough):
2023-01-27 13:56:46 Note: --cipher is not set. OpenVPN versions before 2.5 defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
2023-01-27 13:56:46 OpenVPN 2.6.0 [git:v2.6.0/b999466418dddb89] Windows-MSVC [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] [DCO] built on Jan 25 2023
2023-01-27 13:56:46 Windows version 10.0 (Windows 10 or greater), amd64 executable
2023-01-27 13:56:46 library versions: OpenSSL 3.0.7 1 Nov 2022, LZO 2.10
2023-01-27 13:56:46 MANAGEMENT: TCP Socket listening on [AF_INET]<IP_ADDRESS>:25341
2023-01-27 13:56:46 Need hold release from management interface, waiting...
2023-01-27 13:56:47 MANAGEMENT: Client connected from [AF_INET]<IP_ADDRESS>:62515
2023-01-27 13:56:47 MANAGEMENT: CMD 'state on'
2023-01-27 13:56:47 MANAGEMENT: CMD 'log on all'
2023-01-27 13:56:47 MANAGEMENT: CMD 'echo on all'
2023-01-27 13:56:47 MANAGEMENT: CMD 'bytecount 5'
2023-01-27 13:56:47 MANAGEMENT: CMD 'state'
2023-01-27 13:56:47 MANAGEMENT: CMD 'hold off'
2023-01-27 13:56:47 MANAGEMENT: CMD 'hold release'
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,RESOLVE,,,,,,
2023-01-27 13:56:47 TCP/UDP: Preserving recently used remote address: [AF_INET]REMOTE_IP:1194
2023-01-27 13:56:47 ovpn-dco device [OpenVPN Data Channel Offload] opened
2023-01-27 13:56:47 UDP link local: (not bound)
2023-01-27 13:56:47 UDP link remote: [AF_INET]REMOTE_IP:1194
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,WAIT,,,,,,
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,AUTH,,,,,,
2023-01-27 13:56:47 TLS: Initial packet from [AF_INET]REMOTE_IP:1194, sid=xxxxxxxx xxxxxxxx
2023-01-27 13:56:47 VERIFY OK: depth=3, REDACTED
2023-01-27 13:56:47 VERIFY OK: depth=2, REDACTED
2023-01-27 13:56:47 VERIFY OK: depth=1, REDACTED
2023-01-27 13:56:47 VERIFY KU OK
2023-01-27 13:56:47 Validating certificate extended key usage
2023-01-27 13:56:47 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-01-27 13:56:47 VERIFY EKU OK
2023-01-27 13:56:47 VERIFY X509NAME OK: REDACTED
2023-01-27 13:56:47 VERIFY OK: depth=0, REDACTED
2023-01-27 13:56:47 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-01-27 13:56:47 [REMOTE_DOMAIN] Peer Connection Initiated with [AF_INET]REMOTE_IP:1194
2023-01-27 13:56:47 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-01-27 13:56:47 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-01-27 13:56:47 PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS DNS_v4_IP,dhcp-option DNS6 DNS_v6_IP,dhcp-option NTP NTP_v4_IP_1,dhcp-option NTP NTP_v4_IP_2,dhcp-option DOMAIN COMPANY_DOMAIN,ip-win32 dynamic 0 86400,route COMPANY_IP_NET <IP_ADDRESS>,route-ipv6 COMPANY_IP_NET_v6/48,route remote_host <IP_ADDRESS> net_gateway,tun-ipv6,route-gateway VPN_CLIENT_IPv4_GATEWAY,topology subnet,ping 15,ping-restart 120,ifconfig-ipv6 VPN_CLIENT_IPv6/64 VPN_CLIENT_IPv6_GATEWAY,ifconfig VPN_CLIENT_IPv4 <IP_ADDRESS>,peer-id 3,cipher AES-256-GCM'
2023-01-27 13:56:47 OPTIONS IMPORT: timers and/or timeouts modified
2023-01-27 13:56:47 OPTIONS IMPORT: --ifconfig/up options modified
2023-01-27 13:56:47 OPTIONS IMPORT: route options modified
2023-01-27 13:56:47 OPTIONS IMPORT: route-related options modified
2023-01-27 13:56:47 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-01-27 13:56:47 OPTIONS IMPORT: peer-id set
2023-01-27 13:56:47 OPTIONS IMPORT: data channel crypto options modified
2023-01-27 13:56:47 interactive service msg_channel=572
2023-01-27 13:56:47 GDG6: remote_host_ipv6=n/a
2023-01-27 13:56:47 NOTE: GetBestInterfaceEx returned error: Element nicht gefunden.   (code=1168)
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,ASSIGN_IP,,VPN_CLIENT_IPv4,,,,,VPN_CLIENT_IPv6
2023-01-27 13:56:47 IPv4 MTU set to 1300 on interface 9 using service
2023-01-27 13:56:47 INET6 address service: add VPN_CLIENT_IPv6/128
2023-01-27 13:56:47 add_route_ipv6(VPN_CLIENT_IPv6_NETWORK/64 -> VPN_CLIENT_IPv6 metric 0) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 IPv6 dns servers set using service
2023-01-27 13:56:47 IPv6 MTU set to 1300 on interface 9 using service
2023-01-27 13:56:47 C:\WINDOWS\system32\route.exe ADD REMOTE_IP MASK <IP_ADDRESS> DEFAULT_IPv4_GATEWAY
2023-01-27 13:56:47 Route addition via service succeeded
2023-01-27 13:56:47 C:\WINDOWS\system32\route.exe ADD <IP_ADDRESS> MASK <IP_ADDRESS> VPN_CLIENT_IPv4_GATEWAY
2023-01-27 13:56:47 Warning: route gateway is not reachable on any active network adapters: VPN_CLIENT_IPv4_GATEWAY
2023-01-27 13:56:47 C:\WINDOWS\system32\route.exe ADD <IP_ADDRESS> MASK <IP_ADDRESS> VPN_CLIENT_IPv4_GATEWAY
2023-01-27 13:56:47 Warning: route gateway is not reachable on any active network adapters: VPN_CLIENT_IPv4_GATEWAY
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,ADD_ROUTES,,,,,,
2023-01-27 13:56:47 C:\WINDOWS\system32\route.exe ADD COMPANY_IP_NET MASK <IP_ADDRESS> VPN_CLIENT_IPv4_GATEWAY METRIC 200
2023-01-27 13:56:47 Warning: route gateway is not reachable on any active network adapters: VPN_CLIENT_IPv4_GATEWAY
2023-01-27 13:56:47 C:\WINDOWS\system32\route.exe ADD REMOTE_IP MASK <IP_ADDRESS> DEFAULT_IPv4_GATEWAY METRIC 200
2023-01-27 13:56:47 Route addition via service failed because route exists
2023-01-27 13:56:47 add_route_ipv6(COMPANY_IP_NET_v6/48 -> VPN_CLIENT_IPv6_GATEWAY metric 200) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 add_route_ipv6(::/3 -> VPN_CLIENT_IPv6_GATEWAY metric 200) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 add_route_ipv6(2000::/4 -> VPN_CLIENT_IPv6_GATEWAY metric 200) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 add_route_ipv6(3000::/4 -> VPN_CLIENT_IPv6_GATEWAY metric 200) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 add_route_ipv6(fc00::/7 -> VPN_CLIENT_IPv6_GATEWAY metric 200) IF 9
2023-01-27 13:56:47 IPv6 route addition via service succeeded
2023-01-27 13:56:47 Data Channel: using negotiated cipher 'AES-256-GCM'
2023-01-27 13:56:47 Initialization Sequence Completed
2023-01-27 13:56:47 MANAGEMENT: >STATE:1674824207,CONNECTED,ROUTE_ERROR,VPN_CLIENT_IPv4,REMOTE_IP,1194,,,VPN_CLIENT_IPv6

Tested on Windows 10 2004, which should correspond to 20H1. I have also tested the same config on 21H2 with the same results.
Is this an issue in our config or a problem in the new dco driver?
Expected behavior
A working IPv4 address and correctly configured routes
Version information (please complete the following information):

OS: Windows 10
OpenVPN version: 2.6.0

2023-01-27 13:56:47 NOTE: GetBestInterfaceEx returned error: Element nicht gefunden.   (code=1168)

That says that OpenVPN cannot determine a route to the IP that was queried. To diagnose this is a log without masked IPs and a route table before OpenVPN was started is probably needed (ie route print and I think openvpn has also a commadn to show its view of the routes)

I debugged a bit more into my problem as the line you described also pops up when using disable-dco on 2.6.0 and on our working systems with 2.5.8. I've also checked a Debian Unstable system with the ovpn-dco kernel driver installed and enabled and did not encounter any issues, therefore I checked the difference between our windows and linux client configs.
Which led me to the ip-win32 (push "ip-win32 dynamic 0 86400") Option, which we push from our server to our clients and subsequently ignore in our Linux OpenVPN Client configs. When I ignore this option on a Windows 10 system running 2.6.0 using dco, I don't encounter any issues around IPv4 addresses nor routes.
In our use case, it is supposed to set the lease time on windows machines to a day, though I'm not entirely sure if this option is even still needed or some setting we accumulated and never removed (have to check for that one internally). After reading the documentation, it seems to revolve around the TAP-Win32 Interface. Is the issue in regards to ovpn-dco the lack of support for TAP Mode and therefore a problem in our config or an actual issue in ovpn-dco?

Thanks for the explanation. Removing the old ip-win32 push option solves our problem.
Do you want to keep this issue open as you consider the current behavior a bug in OpenVPN?

Hi,
On Tue, Jan 31, 2023 at 10:53:59PM -0800, Philipp Fromme wrote:

Thanks for the explanation. Removing the old ip-win32 push option solves our problem.

Good :-)

Do you want to keep this issue open as you consider the current behavior a bug in OpenVPN?

Yes, please keep it open.  The whole "virtual DHCP" machinery is not
used with DCO, so any configuration related to it must not affect DCO
operations.
Did not have time to look into what really happens yet.
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany                             @.***


test: Add soundcloud unit tests - it closes #113

Soundcloud unit tests account for color and visual artwork cases.

All the unit tests pass on local but it seems to not like the typescript config. Here's the warning:
ts-jest[config] (WARN) There is a mismatch between your NodeJs version v12.16.2 and your TypeScript target esnext. This might lead to some unexpected errors when running tests with `ts-jest`. To fix this, you can check https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
 PASS  src/components/mdx-embed-provider/components.test.ts
 PASS  src/components/twitch/twitch.test.tsx
 PASS  src/components/wikipedia/wikipedia.test.tsx
 PASS  src/components/soundcloud/soundcloud.test.tsx
 PASS  src/components/codepen/codepen.test.tsx
 PASS  src/components/general-observer/general-observer.test.tsx
 PASS  src/components/mdx-embed-provider/mdx-embed-provider.test.tsx
 PASS  src/components/buzzsprout/buzzsprout.test.tsx
 PASS  src/components/codesandbox/codesandbox.test.tsx
 PASS  src/components/airtable/airtable-form.test.tsx
 PASS  src/components/airtable/airtable-base.test.tsx
 PASS  src/components/cinnamon/cinnamon.test.tsx
 PASS  src/components/lbry/lbry.test.tsx
 PASS  src/components/instagram/instagram.test.tsx
 PASS  src/components/flickr/flickr.test.tsx
 PASS  src/components/spotify/spotify.test.tsx

Test Suites: 16 passed, 16 total
Tests:       24 passed, 24 total
Snapshots:   0 total
Time:        5.372 s, estimated 6 s
Ran all test suites.

@yenly Hey, I kicked started the Pipeline and all tests passed. I think it was something strange going in with CodeCov or Circle CI.
Excellent job on these tests by the way! It's given me some things to think about for the next wave of tests. I like the approach of asserting against the the src attribute.


add mock plugin

#3464
add mock plugin

pls modify title

frist，pls check ci

Codecov Report

Merging #3571 (f4b25ef) into master (8c097ea) will decrease coverage by 0.50%.
The diff coverage is 6.25%.

@@             Coverage Diff              @@
##             master    #3571      +/-   ##
============================================
- Coverage     62.58%   62.08%   -0.51%
+ Complexity     5569     5539      -30
============================================
  Files           848      849       +1
  Lines         23491    23507      +16
  Branches       2139     2139
============================================
- Hits          14703    14594     -109
- Misses         7433     7553     +120
- Partials       1355     1360       +5

Impacted Files
Coverage Δ

...che/shenyu/common/dto/convert/rule/MockHandle.java
0.00% <0.00%> (ø)

...ava/org/apache/shenyu/common/enums/PluginEnum.java
100.00% <100.00%> (ø)

...plugin/logging/rocketmq/LoggingRocketMQPlugin.java
22.72% <0.00%> (-72.73%)
:arrow_down:

...controller/ShenyuClientHttpRegistryController.java
77.77% <0.00%> (-22.23%)
:arrow_down:

...henyu/admin/service/impl/UpstreamCheckService.java
46.52% <0.00%> (-20.14%)
:arrow_down:

...ogging/rocketmq/body/LoggingServerHttpRequest.java
0.00% <0.00%> (-20.00%)
:arrow_down:

...he/shenyu/common/timer/HierarchicalWheelTimer.java
68.00% <0.00%> (-18.00%)
:arrow_down:

...va/org/apache/shenyu/common/timer/TimingWheel.java
73.80% <0.00%> (-16.67%)
:arrow_down:

...henyu/plugin/grpc/resolver/ShenyuNameResolver.java
51.06% <0.00%> (-12.77%)
:arrow_down:

...ruptor/RegisterClientServerDisruptorPublisher.java
52.94% <0.00%> (-11.77%)
:arrow_down:

... and 10 more

Continue to review full report at Codecov.

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

@LiuTianyou hi, you can add my wechat, i will invite you to contributor groups~


Support CMA-ES algorithm at scipy.optimize.minimize().

Is your feature request related to a problem? Please describe.
This is a feature request for CMA-ES support at scipy.optimize.minimize().
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html
I will implement and open a pull request if approved.
Describe the solution you'd like
Method CMA-ES uses the multivariate normal distribution to perform optimization [1]. Similarly to Nelder-Mead method, if numerical computation of derivative can be trusted, other algorithms using the first and/or second derivatives information might be preferred. Compared to Nelder-Mead, CMA-ES can optimize the difficult problems such as non-separable, ill-conditioned, and rugged problems [2].
[1] Hansen, N. 2016. The CMA Evolution Strategy: A Tutorial. arXiv preprint arXiv:1604.00772.
[2] Rios, L. M., and Sahinidis, N. V. 2013. Derivative-free optimization: A review of algorithms and comparison of software implementations. Journal of Global Optimization 56(3):1247–1293.
Describe alternatives you've considered
Additional context (e.g. screenshots)
I've ever implemented CMA-ES in Python and Go.

CyberAgent/cmaes is pure python CMA-ES implementation which only depends numpy.
c-bata/goptuna provides pure Go CMA-ES implementation built on gonum/mat.

IMO this would be great! Maybe raising this in the mailing list would be a good idea.