How to make obstacles in Dreamview simulation environment (SimControl)?

Hi,
How can I add some obstacles in Dreamview simulation environment (SimControl)?
I tried to modify modules/planning/testdata/common/sample_prediction.pd.txt and frame.cc, but it seemed to have no effect.
I noticed there is a similar question (#4626), and I followed this step:
python replay_perception.py garage_*.json
but it reported an error:
ModuleNotFoundError: No module named 'cyber'.
I do not know why there is such an error because I have started Dreamview by following these steps:
bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
bash apollo.sh
bash scripts/bootstrap.sh
So I want to know if I made a mistake in above operations, or there are other ways to make obstacles in SimControl.
THANKS!
System information

OS Platform and Distribution (e.g., Linux Ubuntu 18.04): Linux Ubuntu 18.04
Apollo installed from (source or binary): source
Apollo version (3.5, 5.0, 5.5, 6.0): 6.0

step
You follow below step:

build python bin

bazel build modules/tools/perception:replay_perception

run bash to play

bash modules/tools/perception/garage_perception.bash

python
Running the program with python will cause some dependency problems. I am still thinking about how to solve it.

step
You follow below step:

build python bin

bazel build modules/tools/perception:replay_perception

run bash to play

bash modules/tools/perception/garage_perception.bash

python
Running the program with python will cause some dependency problems. I am still thinking about how to solve it.

I followed these steps, and it works well. Thanks ;-)

How to display the added obstacles in the Dreamview? I can only use cyber_record play record file.

@lecoos I reworked the basic .py module and my obstacles begin to move. The main Idea of any  situation:
'''
car_distance = 30  # required distance between cars
num_of_obstacles = 3 # amount of obstacles from each side
cyber.init()
node = cyber.Node("perception")
writer = node.create_writer('/apollo/perception/obstacles', PerceptionObstacles)
perception_description = obstacle_crossroad_gen(start_points, num_of_obstacles, car_distance,
speed=3) # here you might create a list of dictionaries with each obstacle description.
perception = None
while not cyber.is_shutdown():
perception = generate_perception(perception_description, perception)
# print(str(perception))
writer.write(perception)
time.sleep(T)
'''
generate_perception(perception_description, perception) and other basic functions you can find in replay_perception.py

@shusukui Hi，
You can start SimControl mode after entering Dreamview page, then select Route Editing on the left side of the page. Setting the route you want on the map and click send routing request, so that you can do your simulation.

@glebkiselev
Wow, it is very helpful for my current work, thanks a lot!

@lecoos  Hi,
Thanks to your advice, I can do my own dreamview simulation. But still I can't see obstacles eventhough I followed your advice. My steps are here.

bazel build modules/tools/perception:replay_perception
bootstrap.sh start
bash modules/tools/perception/garage_perception.bash
entering Dreamview page and select Route Editing

I want to see Perception obstacle module delay, but I can see all module delays except perception in Dreamview. Thanks to your help!

@opus23 Hi,
Maybe your command order is wrong. I followed the below steps and can see obstacles.

apollo.sh start
bootstrap.sh start
bazel build modules/tools/perception:replay_perception
bash modules/tools/perception/garage_perception.bash
entering Dreamview page and select Route Editing
These obstacles have fixed coordinates, so you may need to work hard to find them. You can also modify the corresponding files according to your needs.
Good luck.

@lecoos Thanks I found it! :)

hI @opus23 , @lecoos , @daohu527
I followed the steps above. And they "worked". I mean I did not any ERROR output while executing the files (after build them properly as you suggested). This is an advance, once I had the same error ouput in the beggining as @lecoos had (no cyber module import).
However I could not visualize the obstacles after execute the scripts. The Module Delay (on TASKS panel) returned me a Delay on PerceptionObstacle Parameter:

https://youtu.be/UmmTbNZg884
As consequence I was not able to switch on the Routing,Planning and Perception Tabs on Module Controller panel. They were automatically disabled, as you can check in video below:
I used the most simple scenario (SingleLaneRoad) to save computer resources...
My machine is P6000x2 (rent machine with powerful GPU). Before running these scripts to add obstacle the machine was able to execute the Routing, Planning modules (Also was able to run the Perception Module even with SVL simulator!!!). Therefore I do not understand why it was not able to run a simple addition of virtual obstacles?
Is related to some machine resource (clock frequency speed?)
Have I done something wrong? Could you please provide me a video of how to add these obstacles and visualize them? I would like to check what step is wrong or if my machine is not good enough..
Thanks in advance!

@marcusvinicius178 I m having the same issue, did you success in resolving obstacle problem?


[Question]Wayland support?

have any plans to support Wayland?

I get asked this question often enough that I should probably put it in the FAQ on the website... :-)
There are currently no concrete plans on supporting Wayland/Mir/Other graphical systems, mainly because these systems are still not available (even in a semi-functional state) on FreeBSD.
I have setup the Lumina source tree to be extremely easy to port to other graphical systems eventually (especially Wayland - since Qt already has support for it). All it takes is re-implementing the functions within the LuminaX11.cpp file to support the new system, and everything else should automatically start working.


feat(fiatconnect): a return user flow that has them skip selecting a provider and filling in fiat account details

Description

After a user successfully links a fiatAccount, save it as recently used. It is saved with its cryptoType, fiatType, and flow because thats the only combination that we can be reasonably sure it supports
When a user goes through the flow again with the same cryptoType, fiatType, and flow combo, we attempt to fetch a quote and fiatAccount from the saved provider and direct them straight to the FiatConnectReview screen

TODO: Both of these are marked in comments and will be done in a separate PR

Allow the user to select a different provider from the FiatConnectReview screen
On the SelectProviderScreen, if the user presses a provider that already has a saved FiatAccount that matches the quote, navigate the user to the FiatConnectReview Page

Example where user already connected a FiatAccount
https://user-images.githubusercontent.com/8432644/180626774-ee2f4ad4-c2ca-40e2-ab2c-01a6d6418a95.mp4
Tested
Unit tests. It is difficult to fully test this flow without a fully working provider.
How others should test
Does not need to be tested by QA at this time
Related issues
https://linear.app/valora/issue/ACT-349/fc-return-user-flow

relatedly, seems like this is just part of a returning user flow, since we'll also need to consider the case where a user reaches the SelectProviders screen and chooses a provider that the user already has an account with, or has completed KYC with in the past.

this todo seems lower pri:

Allow the user to select a different provider from the FiatConnectReview screen

@cajubelt That TODO is required for a user to be able to change change which provider they want to use for a given fiatType/cryptoType/flow combo once they've added a FiatAccount.

@cajubelt To clarify, the TODO might be better written as
"Allow the user to navigate to the SelectProvider screen from the FiatConnectReview screen so they may switch providers if they desire"

Hey @MuckT since NA is mentioned in how others should test section ,we are skipping this PR
CC: @jh2oman
Thanks.!


WIP: Debug CI problems

What this PR does / why we need it:
The PR is going to:

Update Ellis Email.
Debug  and fix CI two problems below.

Error While building image

Activating service-account
Activated service account credentials for<EMAIL_ADDRESS>Copy source to GOPATH
Creating temporary tarball archive of 168 file(s) totalling 1.4 MiB before compression.
Uploading tarball of [.] to [gs://kubeflow-ci_cloudbuild/source/1598927047.71441-106d5e9c40ff43119fbc7f1c8507080a.tgz]
Created [https://cloudbuild.googleapis.com/v1/projects/kubeflow-ci/builds/b375ed94-487c-4515-bf70-33cf579cc38d].
Logs are available at [https://console.cloud.google.com/cloud-build/builds/b375ed94-487c-4515-bf70-33cf579cc38d?project=593963025935].
ERROR: (gcloud.builds.submit) [Errno 104] Connection reset by peer
This may be due to network connectivity issues. Please check your network settings, and the status of the service you are trying to reach

Error while running E2E:

ImportError while importing test module '/root/go/src/github.com/kubeflow/kfserving/test/e2e/batcher/test_batcher.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.6/importlib/__init__.py:126: in import_module
   return _bootstrap._gcd_import(name[level:], package, level)
batcher/test_batcher.py:17: in <module>
   from kfserving import KFServingClient
E   ModuleNotFoundError: No module named 'kfserving'

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1066
Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

I guess the root cause for CI failure is that the lack of bandwidth. Yeah, that's hard to convince... but we have 11 images building at same time, that's challenge for network. Double confirming by retesting...

All images are built succeed again. Let me try one more time.

Seems the problem already work around in https://github.com/kubeflow/kfserving/pull/1013
That's great! I think the network issue may be fixed in the GCP.
Closing the ticket.


issue: Multiple cameras live streaming over p2p not working

in my local tests;

if i active p2p stream for both of my cameras
last one fails to start stream
first one, fails to start to turn off

https://github.com/bropat/eufy-security-ws/issues/15

I believe this is not an issue, this is a limitation of using ffmpeg with pipe input, i need to figure out a different way for this.

instead of using pipe as an input to FFMPEG, i need to use socket/tcp based input to differentiate cameras. Parking aside this.


set enclosing environment of RCfunctions based on getNimbleFunctionEnvironment()

@danielturek is developing a package and when he tries to use one RCfunction within another RCfunction, R CMD check complains like this:
* checking R code for possible problems ... NOTE
calculateU_ns: no visible global function definition for ‘nsCrosscorr’
calculateU_ns: no visible global function definition for ‘nsCorr’

Apparently R CMD check evaluates the code in the package R files. This evaluation creates a set of functions. For each of these given functions, for each function call in the body of  the function, it looks through the enclosing environments of the given function to try to find the functions that are called.
When an RCfunction is created, nimbleFunction() calls RCfunction() and ultimately the RCfunction is created in a new environment by nfMethodRC$generateFunctionObject(). Because the RCfunction is defined within nimble package code, one of the RCfunction's enclosing environments is the nimble namespace. (There are a couple intervening enclosing environments - those of generateFunctionObject and of nfMethodRCclass.)
E.g., just for RCfunction created in a plain R session:
parent.env(parent.env(parent.env(environment(myRCfunction))))
<environment: namespace:nimble>

The upshot is that the RCfunction that is created in a package (that is not 'nimble' itself) does not have the package namespace in its enclosing environments. So R CMD check cannot find functions that are from that package namespace.
I believe the solution is to pass "where" into RCfunction and on into nfMethodRC$generateFunctionObject. There we should do this:
environment(ans) <- new.env(parent = where)

I think this would be fine to do for RCfunctions created within the nimble package itself as well. But we should check carefully the series of enclosing environments that are currently being set for RCfunctions in the nimble namespace. Currently I see:
 parent.env(parent.env(parent.env(environment(nimble:::CAR_calcCmatrix))))
<environment: namespace:nimble>

and the proposal would eliminate a couple of these intervening enclosing environments.
Also we might as well have the name of the RCfunction make use of where as we do for nimbleFunctions. So we may want to pass in where into rcFunLabelMaker.
Notes:

because nimbleFunctions with setup code produce generators and there is no run code in the body of the generator function, this issue hasn't arisen for nimbleFunctions. Namely R CMD check never even looks at the $run code.
if one wants to see the nimbleFunction reference class definitions in a package namespace, you won't see them with ls('package:foo'). Instead type "foo:::.__" and hit tab and auto-completion should reveal things like nimble:::.__C__CAR_scalar_RW

@perrydv @danielturek let's discuss at our next meeting, but we can also iterate here if you like.

I followed most of that, and thanks for the detailed investigation and report @paciorek.
To be clear about exactly where this is at:

Is it correct that you see passing the where argument deeper into the creation of RCfunctions, and ultimately assigning that as the enclosing environment of the ans object which is created and returned, as fixing this scoping issue (for nimbleFunctions created in other packages)?
Furthermore, since this is a noteworthy change in the hierarchy of the enclosing environments of our functions, I also understand that we'd have to do some extensive testing / thinking about whether this change would "break" other things.

And frankly, regarding (2) above, I'd say it's almost likely that somewhere, somewhere in the entire code base, we rely somehow (in an ad-hoc way) on the current structure of the enclosing environments, for example to locate a particular object, or to test the type of a function or object.  Anyway, I'm just saying I think (2) above is a very legitimate concern, and if I had to guess, making this change would cause some sort of problem, elsewhere.
Likewise, I'm happy to discuss further here, or next week.

Yes, I think this proposal would fix the scoping issue.
Point taken, though all the proposal would do is eliminate the two intervening enclosing environments for RCfunctions defined in the nimble package. I believe the remainder of the set of enclosing environments is the same.

Ok, so on branch rc-scoping, I am fixing this. @danielturek I think you can start to proceed again with BayesNSGP, but note what I say next.
So far it seems to fix the issues with the BayesNSGP package checks with the exception that we still get
 * checking R code for possible problems ... NOTE
nimble_sparse_chol: no visible global function definition for
  ‘R_sparse_chol’
nimble_sparse_crossprod: no visible global function definition for
  ‘R_sparse_crossprod’
nimble_sparse_solve: no visible global function definition for
  ‘R_sparse_solve’
nimble_sparse_tcrossprod: no visible global function definition for
  ‘R_sparse_tcrossprod’
Undefined global functions or variables:
  R_sparse_chol R_sparse_crossprod R_sparse_solve R_sparse_tcrossprod

Note that the functions being flagged are all the output of nimbleRcall. So I think for both nimbleRcall and nimbleExternalCall, I need to look into scoping behavior there.
@perrydv I see an envir arg to nimbleRcall (but not to nimbleExternalCall) but that arg is not used. So I think I have free reign to monkey with scoping here but let me know of any concerns/thoughts.
On first pass, it looks like I need to have a where arg (instead of envir for consistency) to nimbleRcall and pass that into ans <- quote(RCfunction(fun, check = FALSE)) and similarly for ans <- RCfunction(fun, check = FALSE) in nimbleExternalCall.

And a note just for potential future reference:
nimbleFunctions (i.e., generators) created in a package that depends on nimble will have namespace:nimble as their enclosing environment.
parent.env(environment(BayesNSGP::calculateAD_ns1))
<environment: namespace:nimble>

nimbleFunction instances created in a package that depends on nimble will have namespace:other_package as their enclosing environment.
rfun = calculateAD_ns1()
parent.env(rfun)
<environment: namespace:BayesNSGP>

Fantastic @paciorek .  I took a look at the changes, and it seems as we had discussed.
I also tried building / checking / installing the BayesNSGP package, using the updates you made on nimble branch rc-scoping, and just as you said, everything worked fine, except still for the warnings about "no visible global function definition" for the functions created using nimbleRcall.
So if I understood you, assuming @perrydv doesn't mind you also modifying the scoping for functions produced using nimbleRcall, then we can also resolve this through appropriate use of where.  Is that right?
Thanks for these fixes, @paciorek .

Fixed by PR #889
Side note: it's not clear how one would have nimbleExternalCall in another package as the developer would have to figure out where to put the Cpp/.h code and how to compile it as part of the install process.


Nested includes not receiving params

Currently, if a conditional block is used in a nested included relationship, the nested relationship won't receive the params. Using the RSpec contexts as an example, if actors.awards is included, awards would have an empty params hash if executing a conditional attribute, relationship, etc.

Merged to dev

Released in Version 1.4


Artifact is not searchable

What are you trying to do?
Trying to find the artifact with group ID app.ubie and artifact ID app.ubie:brave-kt:
https://search.maven.org/search?q=a:app.ubie:brave-kt returns empty list,
https://search.maven.org/artifact/app.ubie/app.ubie:brave-kt returns empty list,
https://search.maven.org/artifact/app.ubie/app.ubie:brave-kt/0.0.1/jar has empty drop-down list.

How could we solve this issue? (Not knowing is okay!)
By fixing /solrsearch/select

@isk-sonatype FWIW I see a couple issues in your queries, i.e. the first one is using the groupId in an artifactId search, something like this should do better https://search.maven.org/search?q=g:app.ubie%20AND%20a:brave-kt
Your 2nd url should be like https://search.maven.org/artifact/app.ubie/brave-kt
Your 3rd link should be like so to work as desired https://search.maven.org/artifact/app.ubie/brave-kt/0.0.1/jar

For the :
https://search.maven.org/search?q=a:app.ubie:brave-kt we now support a new url
I.e. :
https://search.maven.org/search?tq=app.ubie:brave-kt

@dbradicich, I posted correct URLs for artifact https://repo1.maven.org/maven2/app/ubie/app.ubie:brave-kt/0.0.1/
@SirMaster, tq parameter assumes that there is no column in groupId and artifactId which doesn't work for https://repo1.maven.org/maven2/app/ubie/app.ubie:brave-kt/0.0.1/

@isk-sonatype

@SirMaster, tq parameter assumes that there is no column in groupId and artifactId which doesn't work for https://repo1.maven.org/maven2/app/ubie/app.ubie:brave-kt/0.0.1/

I am not sure what you mean but there a colon (:) in that url for https://search.maven.org/search?tq=app.ubie:brave-kt
but for that version you need this url https://search.maven.org/search?tq=app.ubie:brave-kt:0.0.1

@SirMaster, this issue is not about
https://repo1.maven.org/maven2/app/ubie/brave-kt/0.0.1/brave-kt-0.0.1.pom
but about
https://repo1.maven.org/maven2/app/ubie/app.ubie:brave-kt/0.0.1/app.ubie:brave-kt-0.0.1.pom


Remove key from panel render props

Equivalent to https://github.com/storybookjs/storybook/commit/9f79059:

addon render function are now called like React elements, thus keys are no longer needed

Fixes this warning in dev console:
Warning: render: `key` is not a prop. Trying to access it will result in `undefined` being returned.
If you need to access the same value within the child component, you should pass it as a different prop.

Would this break compatibility with versions of storybook before 7.5.0?

I made this change when adding storybook 8 support


Getting error when creating snowpipe using Terraform

Terraform CLI Version
1.8.2
Terraform Provider Version
0.89
Terraform Configuration
I still have issues creating snowpipe using Terraform
Snowflake provider version is 0.89
If I specified a fully qualified name with db.schema.table --> Getting this error "This session does not have a current database"

If I specify just the table name --> i get table not found

Please advise

Category
category:resource
Object type(s)
No response
Expected Behavior
Create snowpipe
Actual Behavior
Getting error table not found
Steps to Reproduce

Create snowpipe resource with valid db, schema and table name
run terraform command

How much impact is this issue causing?
High
Logs
No response
Additional Information
I still have issues creating snowpipe using Terraform
Snowflake provider version is 0.89
If I specified a fully qualified name with db.schema.table --> Getting this error "This session does not have a current database"
If I specify just the table name --> i get table not found
Please advise
Would you like to implement a fix?

[ ] Yeah, I'll take it 😎

Hey @asad3gh. Thanks for reaching out to us.
Please share the configurations causing the described errors, so we can reproduce it. Also, please run the terraform with the debug logs enabled (environment variable TF_LOG=DEBUG) and share them too.

Hey @asad3gh. Did you have a chance to run terraform with the debug enabled?

Closing due to inactivity. If the problem persists please create a new issue with the newest provider version.


pci: add pci endpoint test driver

Summary
Impact
Testing

[Experimental Bot, please feedback here]
I need the content of the PR to assess if it meets the NuttX requirements. Please provide the following:

The actual changes made in the PR. This could be a link to the PR on GitHub or a description of the code modifications.
The PR description. This usually contains information about the purpose of the changes, how they were implemented, and any relevant context.

Once I have this information, I can determine if the PR meets the NuttX requirements for clarity, completeness, and potential impact.


Psdict working jjs

Merge my primarily editorial edits (comments and docstrings) of some of the parsing code.

Codecov Report

Merging #147 into master will decrease coverage by 0.29%.
The diff coverage is 80%.

@@           Coverage Diff            @@
##           master    #147     +/-   ##
========================================
- Coverage    47.4%   47.1%   -0.3%
========================================
  Files          42      42
  Lines        3778    3753     -25
========================================
- Hits         1791    1768     -23
+ Misses       1987    1985      -2

Impacted Files
Coverage Δ

src/parsers/cdm_parser.jl
89.37% <ø> (+0.27%)
:arrow_up:

src/parsers/standardfiles_parser.jl
50% <ø> (ø)
:arrow_up:

src/parsers/forecast_parser.jl
79.12% <100%> (-1.3%)
:arrow_down:

src/parsers/dict_to_struct.jl
87.81% <100%> (-0.25%)
:arrow_down:

src/parsers/pm2ps_parser.jl
88.26% <100%> (-0.2%)
:arrow_down:

src/parsers/pm_io/data.jl
39.66% <50%> (ø)
:arrow_up:

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 a4c3c86...dafa94b. Read the comment docs.


Sqlite3 to Realm convert.

Hello sir,
I am converting sqlite3 into Realm.
I am new to Realm, i would like to get count from  Realm model like below as sqlite3 code but i am not get success please help me.
My sqlite3 code are as follow:-
DatabaseManager *dbManager = [DatabaseManager sharedManager];
__block  NSUInteger counts;

     [dbManager.databaseQueue inDatabase:^(FMDatabase *db)
     {
        counts = [db intForQuery:[NSString stringWithFormat:@"SELECT COUNT(*) FROM  ContactCardTbl where
                                                  contactCardId='%@'", contactCardId]];
      }];

             [dbManager.databaseQueue inDatabase:^(FMDatabase *db)
             {
                 if (counts == 0)
                 {
                      [db executeUpdate:@"INSERT INTO ContactCardTbl (contactCardId,userId,full_Name,changeId,json) values (?,?,?,?,?)",contactCardId,userId,full_Name,changeId,json];
                }
                else
                 {
                    [db executeUpdate:@"UPDATE ContactCardTbl SET userId = ?, full_Name = ?, changeId = ?, json = ? WHERE contactCardId = ?", userId, full_Name, changeId, json, contactCardId];
                 }
            }];

}

I am converting this code in Realm as follows:
 RLMRealm *realm = [RLMRealm defaultRealm];

            //Begin a write transaction to save to the default Realm
            [realm beginWriteTransaction];

              contactModel *contactModelInformation = [[contactModel alloc]init];

             [contactModel objectsWhere:@"contactModelInformation.@count"];

              NSLog(@"contactModel counts -----%@", [contactModel objectsWhere:@"contactModelInformation.@count"]);

             contactModelInformation.contactCardId = [dictionary objectForKey:@"contactCardId"];
             contactModelInformation.userId = [dictionary objectForKey:@"userId"];
             contactModelInformation.full_Name = [dictionary objectForKey:@"full_Name"];
             contactModelInformation.changeId = [NSString stringWithFormat:@"%@",[dictionary objectForKey:@"changeId"]];

             NSData* jsonDataDic;
             if ([dictionary isKindOfClass:[NSDictionary class]]) {
               jsonDataDic = [NSJSONSerialization dataWithJSONObject:dictionary options:0 error:nil];
                 contactModelInformation.json = [[NSString alloc] initWithBytes:[jsonDataDic bytes] length:[jsonDataDic length] encoding:NSUTF8StringEncoding];
            }

            //Add the loginInformation object to default Realm.
             [realm addObject:contactModelInformation];

            //Persist all the loginInformation that were persisted.
             [realm commitWriteTransaction];

       // });
    }

but i am not get success please help me how this realm code will be work as same as sqlite3 code of above.
Thanks,

Can you also share with us what is the error you're getting and causing you troubles?
You can count all objects of a given model by using: contactModel.allObjects.count.
Beside that I'd recommend to name your Objective-C classes beginning with an uppercase char. That's a common convention and helps others reading your code differentiating between compile time types and variables.

Thank you so much for your help and suggestions,
contactModel.allObjects.count give me total count of all objects, I would like total count of a single column value , then how it is possible in Realm.
Actually i want the single column count, if this count returns me zero then i will go to insert value into Realm model , otherwise i will update the ContactModel in Realm.
Please help.

Are you sure, what I proposed is really not what you're looking for?
It's unclear to me what you mean by the "total count of a single column value".
What I could imagine alternatively would be the count of objects:

where each has for a given column distinct values
where each has for a given column a value which differs from nil
If both shouldn't be what you're looking for please clarify what you mean.

yes, i want,

where each has for a given column distinct values.

For example in sqlite3:-
counts = [db intForQuery:[NSString stringWithFormat:@"SELECT COUNT(*) FROM  ContactCardTbl     where  contactCardId='%@'", contactCardId]];
here i am calculating counts from ContactCardtbl of contactCardId column,
where contactCardId is a primary key  in a  ContactCardtbl table which uniquely identifies each row/record in a database table.
I want same count in Realm, how it is possible, please help.
Thanks

Okay, I see what you want to achieve. You want to check for each object, whether it exists and insert it only if it doesn't exist, right? Realm has built-in support for that.
If your object creation is computationally inexpensive, you can do [realm addOrUpdateObject:…];.
Otherwise you can just query for the object by using [ContactModel objectForPrimaryKey:…] and check that against nil.


Error reporting for intersection types seems to not find near miss

In the following example:
var z: { a: number; b: string } | { c: number } = { a: 3 };

...we currently give a very confusing error message.
Type '{ a: number; }' is not assignable to type '{ a: number; b: string; } | { c: number; }'.
Type '{ a: number; }' is not assignable to type '{ c: number; }'.
Property 'c' is missing in type '{ a: number; }'.
I can see why we might have gotten to this point (failing until we're at the last type, and giving the message based on that), but we've actually gone down arguably the "wrong path" of the intersection.  Ideally, we would error on the "closest" match.  This would at least give the user a chance of understanding where to address the issue.
The problem with the way we currently report errors will compound as types get larger.

I'm not sure whether we could meaningfully generate the 'closest' match in the general case. Perhaps you'd have been satisfied by the more specific error being reported from both sides of the union:
Type '{ a: number; }' is not assignable to type '{ a: number; b: string; } | { c: number; }':
    1. Type '{ a: number; }' is not assignable to type '{ a: number; b: string }'
        Property 'b' is missing in type '{ a: number; }'
    2. Type '{ a: number; }' is not assignable to type '{ c: number; }'.
        Property 'c' is missing in type '{ a: number; }'.

This could get unwieldy for larger target types (or source types) but at least in the editor you could imagine a more interactive error reporting control that would allow you to control the verbosity (ex imagine the 2nd line of each numbered bullet was collapsed by default but could be expanded)

We currently report errors based on the last constituent type of a union type. As Dan suggests, we could possibly report errors from all of the constituents, but in my opinion that would just add to the noise. We could explore finding a "closest" matching constituent to report errors from, but I'm not sure we'd ever be able to devise a meaningful algorithm for finding such a thing.

As @danquirk and @ahejlsberg mentioned, i do not see what can be done here to make the situation better. closing. please reopen if you have a proposal for fixing this.


Use HTTP Origin header for password reset link domain

This commit changes domain URL source in password reset e-mail, so that it points to domain received in HTTP Origin header.
It attempts to solve the problem of sending e-mail with frontend domain name, not the backend domain that djoser runs under, much like #158 but with simpler settings and no merge conflicts. We rely on client sending a correct HTTP Origin header, which exists exactly for this purpose. The header is documented and supported by all major browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
I also added a PASSWORD_RESET_DOMAINS setting to djoser config that is a list containing allowed domains, to avoid opening a hole that would allow abusing this feature for phishing attacks. If domain isn't in the list, it's ignored and previous method of determining domain is used.

Hi @hbielenia.
Thanks for picking it up. It's a great solution and I'd love to have it in djoser. I just wonder if we couldn't make it a bit more generic, since activation email also makes use of frontend domain.


A couple UI suggestions -categories

Some of these categories are getting crowded, namely "Integrations".  And I always struggle with what is "Control" vs "Convenience" or "Utility". I almost always have to dig through all of them to find what I want.
I am not sure how to clean this up, but one suggestion that would be a fairly straightforward fix would be to divide the integrations into cloud based vs drivers. I.E. Bryan Copeland's Zwave drivers aren't the same as an API based integration.
I think the names of categories need some changes to more clearly define them, but I am sure that would really mess things up at this point. Maybe the following would help that though.
I would suggest, that if you are going to keep the existing category names, that maybe a description of each one be added to the "Install a Package from a Repository", "Choose a category "  selection menu items. (Control, Integrations, Utility etc).  So instead of Control, it would say Control - Thermostats, Blinds, Switches  or something like that. It seems like that would help the developers choose a category as well as a user finding the correct category easier.

In hindsight I HATE the categories. If I had a way to do the searching from the get-go I'd have done that only. I don't know how old you are, but back in the day sites like yahoo used to try to have all websites on the internet in categories. It quickly became a mess and you never knew where to go to find anything. And that's why we all just search now a days...
The reality is developers can use whatever categories they want. It was kind of an "honor system" to use the ones I put out there, so changing it is actually super easy. It just requires the developers to specify a different word. I agree though, I'm going to propose more be added and I like your suggestions in general

I am probably older than you think, I remember pre-search days on the net, usenet and all that. Also I remember Netscape Navigator (pre-Mozilla!) I think I even have a copy of it somewhere on a 3.5" floppy. LOL

Based on the community feedback I've added a bunch of new categories (discussed on the forum) and also the ability to define a secondary category for a package. This will be included in 1.5.0


BFCL Proposed Patch to Cohere's PR #350

Hi Cohere team,
Thanks for your interest in contributing to BFCL, and sorry for the delay in response.
As mentioned in the presentation, in this PR, we incorporated the patches that the Cohere team has supplied in PR #350 to be a collection of "cohere optimization". We give the user the freedom to choose to use the "cohere optimization" or not by setting the USE_COHERE_OPTIMIZATION flag in constant.py. The README instruction has been updated accordingly.
This PR also fixed an issue that was introduced in the Cohere team's PR. The changes that Cohere team proposed in _cast_to_openai_type function in utils.py will cause the GPT and Claude series models to error, as they are strict on typing. For example, in our current BFCL implementation, a tuple of float should be converted to a list of number to feed into the GPT model. But Cohere's implementation will convert the tuple of float to a list of float, which the GPT doesn't accept and will error. So we reverted those as they did not introduce any functionality-wise change; it's more of a clean-code change.
Best regards,
BFCL Team

Thanks a lot for the detailed explanation, and apologies it took so long to review!


[Discussion] Speccing a namespace for user tags

This is a RFC/Discussion regarding tags that users can set to rooms.
This RFC does not imply any change of the APIs nor any adaptation is required from the homeserver implementation, but simply asks for some convention be integrated into the spec, as guidelines for the matrix clients.
Background
Matrix client can currently associate tags with matrix rooms. The specification currently specifies m.favourite and m.lowpriority as tag names that are specially recognized by clients (notably Riot), but it is possible for any tag to be set to a room, the interpretation of them being currently unspecified.
It is apparently generally accepted that every application should use tag namespaces according to their domain name (for example im.riot.* for riot-specific tags) for storing tags related to internal functionality of this client.
Proposition
Specify how tag namespaces should be interpreted by the clients like so:

The m.* namespace only contains tags specified by the matrix spec
The u.* namespace is reserved for user tags. These tags can be set by the user to order their rooms as they please. As such, the clients should only interpret them as "a label the user has set to this room". The exact way this is reflected on the UI is up to the client to decide. (Possible examples could be: displaying categories regrouping rooms with the same tags, or using tags to offer a filtering mechanism to the user...)
The tld.domainname.* namespace associated to the client name is free for the client to use as they please
Any tag not matching these namespaces should be ignored (so that client won't try to interpret tags internals to other clients/apps)

These are guidelines for matrix client, to ensure a good cohabitation in the room tag namespace, but they cannot (and should not) be enforced by the protocol.
Motivation
The initial motivation is for the reservation of the u. namespace. Allowing users to tag their room in order to organize them is a useful feature clients can provide to their users. (I personally use it to order my  ~100 rooms, using the undocumented-but-kinda-existing support for these tags in riot-web.)
Thankfully, the matrix protocol already supports this via the room tags mechanism. Reserving now this namespace and advertising it as such now, before clients actually try to implement these functionality ensures a good interoperability with clients in the future, while requiring a very low effort from the matrix specification.
Unresolved questions
What should be done if a user wants to put special UTF8 characters in their tag names? I see two options:

Treat the u. as a special prefix to the tag name, but the rest is just an UTF8 string and should only be treated as such, with no attempt of parsing it further
Encode the UTF8 room name using the same encoding as used for usernames, or base64, or any other to be decided, and store u.<encoded room name> as the tag name.

@vberger are you happy for this to be closed?

Absolutely 👍


Create/Edit(udpate) Glossary field Description*  allow input only spacebar ?

Affected module
Create new glossary/ Edit glossary

Describe the bug
Create new and edit glossary field Description allow input only spacebar
To Reproduce

Click button add glossary
Fill data in field
Input field Description only spacebar
Save

Expected behavior
Trim description field .

Not allow input only spacebar

Version:

OpenMetadata version: 1.4.3

Additional context
i want custom openmetada in localhost . please support build code and test in local ( clip , guide ..... )
thank alot.

same issue with field description when i edit glossary and glossary term

Is the editing section already included the edit glossary term? @karanh37

Hey, this is fixed for both glossary and glossary term.
It will be available in 1.5 release.

@karanh37  Is it possible for me to see which task is assigned to fix this bug?


Copying of file not working as expected

https://github.com/AvaloniaUI/Avalonia/discussions/15557#discussioncomment-9550040

Can you please be more specific here?

Which OS?
Which Ava version?
Please also file a minimal sample if possible


local subnet with prefix 172.x macvlan DHCP issue

Hello,
We have local subnet 172.16.x.x 172.18.x.x 172.18.x.x. Follow the guide to use macvlan got error.
error "You can only enable DHCP while the container is on a macvlan network!" && exit 26
Check the code find that network.sh check subnet prefix 172.x to determine macvlan enable status.
https://github.com/vdsm/virtual-dsm/blob/53cc6998f0e51a3f37bad1861e21e451f738b6d6/src/network.sh#L254
Can just use the "DHCP" env swtich to determine that?

"DEBUG=Y" works.
How about add an env enable macvlan?


Compatibility renderer: lights seem brighter when their shadows are enabled

Tested versions

Reproducible in: 4.2.0, 4.3.dev5

System information
Godot v4.3.dev5 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce GTX 1060 6GB (NVIDIA; <IP_ADDRESS>13) - Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 Threads)
Issue description
When using the compatibility renderer, enabling shadows on a light will make lit surfaces brighter. This happens for directional (over the whole scene), omni and spotlights.
If the ambient light is made black, the problem goes away. If shadows are disabled for all lights, the problem also goes away. If multiple lights have shadows turned on, the problem is more pronounced than if a single light has shadows turned on. It looks like the ambient light might be applied one extra time for each light with shadows enabled.
This seems to have been introduced when compatibility renderer shadows were first added. Forward plus and mobile renderers are not affected.
Comparison of a scene with a default world environment lit by a single directional light with shadows disabled and enabled:

Steps to reproduce
Run the project with F5. Press 'S' to toggle shadows on the directional light on and off. Observe how surfaces get brighter when shadows are on.
Minimal reproduction project (MRP)
CompatShadowRepro.zip

I think issue come from the way convert linear_to_srgb, in scene.glsl with 1 light which have shadow, for now:
frag_color.rgb = linear_to_srgb(emission + ambient_light) +  linear_to_srgb(additive_light_color);
while i think it should be
frag_color.rgb = linear_to_srgb(emission + ambient_light + additive_light_color);
So if i apply this path which remove 2 time convert linear_to_srgb and only convert for once after all calculate, color will look like vulkan in case we use 1 shadow.

But in case we have more than 1 shadow, engine will run into multiple light pass and blend function still have problem when we try to use srgb.

Running the editor itself as --rendering-method gl_compatibility --rendering-driver opengl3 doesn't seem to actually render accordingly the scene anyway, it's ok not to have compatibility or behaviour fix, but there must be a way to actually see in editor the same as the exported scene (current release and 4.3 dev5 show brighter in editor and duller in run)

Can confirm this is still an issue in Godot v4.3.beta1.  It is visible in the editor window, with the default directional light and world environment.  When turning off the world environment it looks very similar to the other renderers, however I tested deleting my environment in a larger project and running it and the issue is still present, so its not solely related to the environment.  Don't know much about this stuff but I'm wondering if some of the default shaders were ported from the Vulcan renderers and the values are coming out differently?

This makes me wonder if we should add a light energy multiplier that is only used when using the Compatibility rendering method. This would make setting up fallbacks a lot easier, without needing to attach a script to each light that reads node metadata (or something along those lines).
This could also be worth considering for lights that have a projector texture, as you generally want those to have lower energy when the project texture can't be used (otherwise, the light ends up too bright). I believe UE5 has a similar property for projector fallbacks in its lighting system.

This issue wasn't present in 4.2.2.stable.  I know that the compatibility renderer wasn't feature complete in that version, but I feel that this is a regression that is (potentially) a simple mistake along the way, as lights and shadows and world environment all worked, despite certain features like fog not working.

The 0.25 trick looks pretty good to me. I'm content with having a script on every DirectionalLight3D.


Add contributing documentation

Description
We need to add the developer documentation for new contributors.
Describe:

cloning
vendoring
building
testing (add info that the test-integration is failing on PRs, can be executed locally)

Let me help with this one! :)


Bytes

Here are the EncodeBytes and DecodeBytes functions I was talking about. These are proposals. More specifically, I'm not sure the meaning of the funcs should not be changed, take a look at the "failing" tests -> a given input won't give the same if passed in Encode then Decode, when there are "leading zeroes". Thinking of it, the same is true of your initial funcs, but it feels natural that "0010" -> some_hash -> "10" whereas on bytes buffers, it's... sort of strange. Meanwhile, the first 2 commits are still general optimizations, you might want to merge those anyway (c7484f6 and dffbeba).

Thinking of it, an alternative would be to make public the encodeInt & decodeInt funcs (EncodeInt and DecodeInt), it happens I have some personnal usage for those funcs and the wrapping done by EncodeBytes and DecodeBytes might be sort of confusing. And besides, it's very easy to implement through big.Int Bytes and SetBytes methods. What do you think ?

@ufoot - Sorry for responding late. I was in vacation.  I didn't have time to go through this. I will go through the change and update by tomorrow.

@ufoot  - Back from vacation. Thanks for the pull request. I do feel the same about EncodeBytes and DecodeBytes functions. We can easily convert to bytes.  It would be really great if you could elaborate your use case for EncodeInt and DecodeInt. That will be helpful for me too. We can confirm the functions and reorganize the code for EncodeInt and DecodeInt.

OK. will look through it, I keep you informed.

https://github.com/dineshappavoo/basex/pull/8 meanwhile I try to "elaborate" my use case. But AFAIK it amounts to : I need to do exactly what you do with your module, but I do not have inputs as "1000343445435668" but as "a big.Int the value of which is<PHONE_NUMBER>435668".

I merged the other pull request for EncodeInt and DecodeInt.  As we discussed earlier, It is better to have EncodeInt instead EncodeBytes. The consumer can easily convert int to bytes. I think we can close this pull request. Please confirm.

Yes, this one should be closed, no doubt.


Unable to convert to WSGI web application

This is a great tool for descriptive analysis, and I am planning to use it on AWS.
However, due to the limitation of the AWS Elastic Beanstalk Python platform,
we need convert to the WSGI web application to be able to use it on AWS,
at least that is my understanding.
Are there any straightforward functionalities for that converting ?

Were you able to solve this problem?

no.
due to time limitation, I switched to webpy instead.
however, if you could provide this functionality,
that would be great so we could use it.
Thanks,
Bing
On Tue, Jan 17, 2017 at 9:21 AM, Santiago Larrain<EMAIL_ADDRESS>wrote:

Were you able to solve this problem?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/adamhajari/spyre/issues/57#issuecomment-273199086,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATm1MpbUz7tadxT8_WPnhvPIa0OxGyWTks5rTNyFgaJpZM4JQzco
.

--
Bing Bu
Data Scientist
skype: bingbu66
www.strikesocial.com


notify-host-mail Doesn't Work (Complains about missing arguments)

This issue respects the following points:

[X] This is a bug, not a question or a setup/configuration issue.
[X] This issue is not already reported on Github (I've searched it).
[X] I use the latest release of the Monitoring Plugins (https://github.com/Linuxfabrik/monitoring-plugins/releases).
[X] I agree to follow Monitoring Plugins's Code of Conduct.

Which variant of the Monitoring Plugins do you use?

[X] .rpm/.deb package from repo.linuxfabrik.ch
[ ] Compiled for Linux (.tar/.zip from download.linuxfabrik.ch)
[ ] Compiled for Windows (from download.linuxfabrik.ch)
[ ] Source Code from GitHub

Bug description
I'm trying to get the notifications working in Icinga2 (2.14) with Director (1.11) on Ubuntu 22.04 Jammy and plugin is reporting that I'm not sending all of the required arguments.  This is when using the Linuxfabrik notification templates and the latest packages from the repos.  Note that you can't currently install the linuxfabrik-notification-plugins package with apt because it contains some files that overlap with ones in the monitoring-plugins package, so I had to manually unpack it and move the files into the plugins folder.
Steps to reproduce - Plugin call
'/usr/lib64/nagios/plugins/notify-host-mail' '--hostaddress' '<IP_ADDRESS>' '--hostaddress6' '' '--hostdisplayname' 'My Box' '--hostname' 'MYBOX01' '--hostoutput' 'PING <IP_ADDRESS>: 5 packets transmitted, 5 received, 0% packet loss, time 806ms. rtt min/avg/max/mdev = 4.344/4.625/4.953/0.229 ms' '--hoststate' 'UP' '--longdatetime' '2023-11-29 23:23:38 -0400' '--mail-port' '25' '--mail-sender'<EMAIL_ADDRESS>'--mail-server' 'localhost' '--notificationauthorname' 'ctassell' '--notificationcomment' '5th' '--notificationtype' 'CUSTOM' '--perfdata' 'transmitted=5;;;0; received=5;;;0; duplicates=0;;;0; checksum_corrupted=0;;;0; errors=0;;;0; packet_loss=0%;;;0;100 time=806ms;;;0; rtt_min=4.344ms;;;0; rtt_avg=4.625ms;;;0; rtt_max=4.953ms;;;0; rtt_mdev=0.229ms;;;0;' '--shortdatetime' '2023-11-29 23:23:38'
Steps to reproduce - Data
You can run this command from the /usr/lib64/nagios/plugins folder and it will give you the error "notify-host-mail: error: the following arguments are required: --datetime, --host-displayname, --host-state, --mail-recipient"  The command is what's coming out of the icinga2.log file when using the LinuxFabrik notification templates.
'/usr/lib64/nagios/plugins/notify-host-mail' '--hostaddress' '<IP_ADDRESS>' '--hostaddress6' '' '--hostdisplayname' 'My Box' '--hostname' 'MYBOX01' '--hostoutput' 'PING <IP_ADDRESS>: 5 packets transmitted, 5 received, 0% packet loss, time 806ms. rtt min/avg/max/mdev = 4.344/4.625/4.953/0.229 ms' '--hoststate' 'UP' '--longdatetime' '2023-11-29 23:23:38 -0400' '--mail-port' '25' '--mail-sender'<EMAIL_ADDRESS>'--mail-server' 'localhost' '--notificationauthorname' 'ctassell' '--notificationcomment' '5th' '--notificationtype' 'CUSTOM' '--perfdata' 'transmitted=5;;;0; received=5;;;0; duplicates=0;;;0; checksum_corrupted=0;;;0; errors=0;;;0; packet_loss=0%;;;0;100 time=806ms;;;0; rtt_min=4.344ms;;;0; rtt_avg=4.625ms;;;0; rtt_max=4.953ms;;;0; rtt_mdev=0.229ms;;;0;' '--shortdatetime' '2023-11-29 23:23:38'
Environment
Ubuntu 22.04 Jammy with the Linuxfabrik PPA deb https://repo.linuxfabrik.ch/monitoring-plugins/ubuntu/ jammy-release main
Plugin Version
v2023051201
Python version
Python 3.10.12
List of Python modules
Modules are fine, command runs, it's just not getting the right args from Icinga
Additional Information
No response

Hi @ctassell thanks for the issue :) We are aware of the problem when trying to install both the notification and monitoring plugins package, I just opened an issue to track our progress: https://github.com/Linuxfabrik/monitoring-plugins/issues/726
As for the missing arguments, can you make sure that you are using this version of the template in the director? https://github.com/Linuxfabrik/monitoring-plugins/blob/2023051201/notification-plugins/notify-host-mail/icingaweb2-module-director/notify-host-mail.json
Also, did you set a mail recipient in the notification apply rule?


allowed disable admintools

guard admintools

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


Bug fix with using application default credentials

Love this project! I was not able to use application default credentials, it would return with this error:
2023/09/29 12:41:52 ERROR: failed to obtain token for<EMAIL_ADDRESS>impersonate: status code 403: {
  "error": {
    "code": 403,
    "message": "Request had insufficient authentication scopes.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
        "domain": "googleapis.com",
        "metadata": {
          "service": "iamcredentials.googleapis.com",
          "method": "google.iam.credentials.v1.IAMCredentials.GenerateIdToken"
        }
      }
    ]
  }
}

The fix was to remove .read-only from the cloud-platform scope.

@jmesterh thank you! It was merged and released in 0.5.7.


Controllers support mapping for 2 in 1 joypad

When I attach the joypad 2in1 the mapping looks messed up. Godot says the the button at the bottom is actually the button up, and when I actually press the button down, it says  that is the button right.
I guess it is something to do with the mapping in Godot ?
Godot version:
Godot3.1-beta1

This still doesn't work.

https://github.com/godotengine/godot/blob/89ca15693ee81fa497d1bab24bd772a98bf56279/main/gamecontrollerdb.txt#L249
This is still messed up in different OS. And in macOSx have a different mapping.
I will do another iteration to see what's wrong

This still doesn't work.

In what version?
The mapping we have for Mac OSX is the one you contributed to the SDL2 repo.

In what version?
Godot3.1-beta4
The mapping we have for Mac OSX is the one you contributed to the SDL2 repo.
yeah, I know and it is weird. I tried also on Windows and Linux and the only one that works well is on LINUX.
Plus, Vibration works only on the Linux platform.

I'd reopen this, I will investigate further in the next few days

Okay, I tried a few things and, at this point, I think is a mac_OSX bug and ... I need help:
The controller in question is: 2In1 USB Joystick with GUID 030000008f0e00000300000009010000
I tried the mapping with a gamepad-tool, I extract the mapping and compared with the current version of Godot's controller database (and the current version in SDL database .
But when I attach the controller and used it in Godot it actually gives me different input (this happens for the buttons on the right - canonically A,B,X,Y if we use the XBOX Controller "standard").
I put up a scenes with the following code:
func _process(delta):
	# This is an example debug for controllers
	if Input.get_connected_joypads().size() > 0:
		 for i in range(16):
	      if Input.is_joy_button_pressed(0,i):
	        print("Button at " + str(i) + " pressed, should be button: " + Input.get_joy_button_string(i))

And.. this is the debug, for each button I pressed, this was the output:

for button down
Button at 2 pressed, should be button: Face Button Left
for button left
Button at 3 pressed, should be button: Face Button Top
for button up
Button at 0 pressed, should be button: Face Button Bottom
for button right
Button at 1 pressed, should be button: Face Button Right

And if we match up with the mapping, it actually is right ... in particular:

a:b2,b:b1,x:b3,y:b0

Following the mapping guide
So, my conclusion is that the mapping for buttons (b0,b1,b2,b3) is somehow wrong for mac_osx. Could it be?

To clarify, here is a GIF in which I show the mapping from SDL (and its gamepad-tool) and the output from the above mentioned scene:

I have a similar issue with the same controller on Ubuntu Linux. Godot sees L1 as L2 and R1 as R2. The SDL gamepad tool gets them right instead.

so, just to be sure. Is this a bug ? or something wrong with this specific controller/mapping ?

so, just to be sure. Is this a bug ? or something wrong with this specific controller/mapping ?

Can you check if it works fine in 3.2 beta 6 or later?
I might have fixed this with #34910.

I'll assume it fixed by #34910 for now, and if it isn't, it should be fixable by contributing the missing mappings to https://github.com/gabomdq/SDL_GameControllerDB.
Please comment if you can still reproduce the issue / need help to contribute mappings upstream if they're missing.


Replace isinstance usages with op.gate

First attempt at fixing #3556

Hi @dwillmer
Do you have time to address issues raised in this code review?  It looks like this PR has been open for a year and it would be good to get it in.

Closing for now as this appears to be stale.  Please reopen if you want to revisit.


rename for uuid to UUID not working

Version
1.14.0
What happened?
I have a column name uuid in my tables with UUID type. By default sqlc generates the struct field name as Uuid.
I have added a rename as follows:
        rename:
          # Override the field name for column "uuid". By default, sqlc is generating it as "Uuid".
          uuid: "UUID"

Expected:
The struct field name should be UUID.
Actual:
The struct field name should is Uuid.
Relevant log output
No response
Database schema
CREATE TABLE authors (
  id   BIGSERIAL PRIMARY KEY,
  uuid UUID NOT NULL,
  name text      NOT NULL,
  bio  text
);

SQL queries
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;

-- name: ListAuthors :many
SELECT * FROM authors
ORDER BY name;

-- name: CreateAuthor :one
INSERT INTO authors (
  name, bio
) VALUES (
  $1, $2
)
RETURNING *;

-- name: DeleteAuthor :exec
DELETE FROM authors
WHERE id = $1;

Configuration
{
  "version": 2,
  "sql": [
    {
      "schema": "query.sql",
      "queries": "query.sql",
      "engine": "postgresql",
      "gen": {
        "go": {
          "package": "models",
          "out": "./models",
          "output_db_file_name": "db_gen.go",
          "output_files_suffix": "_gen",
          "sql_package": "pgx/v4",
          "emit_db_tags": true,
          "emit_prepared_queries": true,
          "emit_interface": true,
          "emit_empty_slices": false,
          "emit_json_tags": true,
          "json_tags_case_style": "snake",
          "emit_result_struct_pointers": true,
          "emit_enum_valid_method": true,
          "emit_all_enum_values": true,
          "rename": {
            "uuid": "UUID"
          },
          "overrides": [
            {
              "db_type": "uuid",
              "go_type": "string"
            }
          ]
        }
      }
    }
  ]
}

Playground URL
https://play.sqlc.dev/p/f61aa5a0842d25dbb45cac7aea3926561172dc282c8d61fc487d3d7611b924cd
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go

I see this behavior, too, with v1.14.0.

It seems that config files of version 1 and version 2 put the the rename configuration in different spots of the config.
The following test fails when added to config_test.go:
const v2WithRename = `
{
    "version": "2",
    "sql": [
      {
	"engine": "postgresql",
	"gen": {
	    "go": {
		"out": "./models",
		"rename": {
		      "uuid": "UUID"
		}
	    }
	}
      }
    ]
}
`

const v1WithRename = `
{
	"version": "1",
	"packages": [
	{
		"engine": "postgresql",
		"path": "./models",
	}
	],
	"rename": {
		"uuid": "UUID"
	}
}
`

func TestConfigVersion1And2(t *testing.T) {
	config1, err := ParseConfig(strings.NewReader(v1WithRename))
	if err != nil {
		t.Log(err)
		t.FailNow()
	}
	config2, err := ParseConfig(strings.NewReader(v2WithRename))
	if err != nil {
		t.Log(err)
		t.FailNow()
	}
	if diff := cmp.Diff(config1, config2, cmpopts.IgnoreFields(Config{}, "Version")); diff != "" {
		t.Errorf("differed (-want +got):\n%s", diff)
	}
}

I would expect the two test configs to refer to the same configuration, but you can see that the rename config is in a different place.  I just don't know what to fix:

should the config struct be the same for version 1 and version 2 (i.e. should the test above be green?)
if so, what is the expected location for the rename mapping?
should I keep the config as is and just get the mapping from the current location when putting together a CombinedSetting?

The configuration options don't need to be changed. Version 2 of the configuration files supports per-package renames and global renames.
The bug is that we aren't pulling in the rename settings from per-package setting.

This appears to be resolved now. Running the original playground example with v1.20.0 produces the correct UUID struct field name: https://play.sqlc.dev/p/b20feb6dd6693d01bc0955496c5591679ad6f08c89aaf1d66aea8423a562afab


I can't access repository server

Hello,
I want to build OpenCPX into the my VPS.
However,I can not access following URL.
http://cpx-repo.vwh.net/pub/opencpx.repo
How can I get this?

Just check it out from github.. I'm not sure what state the code Is in at this point.  But feel free to check it out.
On December 14, 2016 11:11:21 PM MST, kiyoji<EMAIL_ADDRESS>wrote:

Hello,
I want to build OpenCPX into the my VPS.
However,I can not access following URL.
http://cpx-repo.vwh.net/pub/opencpx.repo
How can I get this?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/opencpx/opencpx/issues/3

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.


License updates for dependabot/github_actions/actions/upload-artifact-3

This PR was auto generated by the licensed-ci GitHub Action.
It contains updates to cached github/licensed dependency metadata to be merged into dependabot/github_actions/actions/upload-artifact-3: (branch, PR).
The licensed-ci action will add comments to this PR with the status of license checks.  Please make any changes needed to fix any status failures on this branch, then merge license updates into your branch.
If updates are unexpected, please check the github/licensed changelog for recent updates.

The licensed-ci GitHub Action updated cached license metadata based on changes to dependabot/github_actions/actions/upload-artifact-3: (branch, PR).
licensed status result: SUCCEEDED
All status checks succeeded, please merge when ready.
Checking cached dependency records for licensed
.............................
29 dependencies checked, 0 errors found.

/cc @dependabot[bot]


Prevent crashing if no parameters defined in the schema

In the OpenAPISchema interface the parameters attribute is optional / can be undefined. However there's an Object.entries(params) that fails in that case.
With this PR, params is always defined and Object.entries always succeeds.
Another option would've been to add an if statement. But this was the smallest change to make it work.

Now I see that this will be fixed here https://github.com/cloudflare/itty-router-openapi/compare/main...add-body-validation#diff-634333527025d8043fae2cc51a501b3e6cc4a200276c061bcaa0a947b0e9c3f1R105 probably

Yeah, I fixed that bug in the #5 branch, but I think your proposed fix is more clean

I will bundle this fix with the next release when the request body validations are merged


Fix typos and formatting in Clear-Content.Tests.ps1

PR Summary
Clear-Content.Tests.ps1: Fix typos and formatting.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

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

If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.

User-facing changes

[x] Not Applicable
OR
[ ] User-facing Documentation needed

[ ] Issue filed - Issue link:

Testing - New and feature

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

[ ] Add [feature] if the change is significant or affects feature tests

@sethvs Thanks for your contributions!


Create a teaching kit for Phyloref

It'd be nice to create a teaching kit showing how something like the Authoring Tool can be used in undergrad classes to explain clade definitions, combining the resources we've already developed for posters and presentations and the like. This will happen after version 1.0 of the Authoring Tool has been published online.

Excellent idea!!
Nico

On Jun 24, 2019, at 1:12 PM, Gaurav Vaidya<EMAIL_ADDRESS>wrote:
It'd be nice to create a teaching kit showing how something like the Authoring Tool can be used in undergrad classes to explain clade definitions, combining the resources we've already developed for posters and presentations and the like. This will happen after version 1.0 of the Authoring Tool has been published online.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/phyloref/curation-tool/issues/152?email_source=notifications&email_token=AATJPQMYRC27KXRIC7Z4EMDP4D6BPA5CNFSM4H3AT6G2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3LC2HA, or mute the thread https://github.com/notifications/unsubscribe-auth/AATJPQPGWUCACJ2X7BOA6A3P4D6BPANCNFSM4H3AT6GQ.

That teaching resource might be shared with the community through QUBES https://qubeshub.org/


More love to the Java Client

The Jolokia Java client works, but needs some extensions (peole really use it :stuck_out_tongue:)

Improve the reference manual with examples for every kind of request
Add a scheduler like the one for Javascript
Support notifications (when they are here)

Enhance SSL handling:

Client certs
Ignoring unknown / self signed server certs
Adding a keystore with CAs for server cert verification


sky130A.tech leads to Magic segfault on load

Magic ver. 8.3 r 57
Message produced before segfault is:
/openlane/pdk/sky130A/libs.tech/magic/current/sky130A.tech: line 567: section compose:
	Unrecognized layer (type) name "obsli,obsm1"

Commenting line 567 cures the problem:
#  paint	 obslicobsm1	 obsli,obsm1

Is there a danger in making cells using the modified tech file?

Update your version of magic to the most recent.

Got it; I thought I was still on the recent release.... Working fine now, thank you.


update stable dep

Coverage remained the same at 100.0% when pulling 2d12e65aadca3f6ca5308fddf2e984ee11d51386 on update-dep-2 into 2a41ccd13308da9ea2d1ba573ce875931114b7a1 on master.

Coverage remained the same at 100.0% when pulling<PHONE_NUMBER>54483c1140281d12a2b28e8a7d5f17 on update-dep-2 into 2a41ccd13308da9ea2d1ba573ce875931114b7a1 on master.

Coverage remained the same at 100.0% when pulling fb713bfa4ce4876c7cbf0d732938078b0abb5560 on update-dep-2 into 2a41ccd13308da9ea2d1ba573ce875931114b7a1 on master.

Coverage remained the same at 100.0% when pulling 4886868e0cd0c5c3285b75e277b229af35114921 on update-dep-2 into 2a41ccd13308da9ea2d1ba573ce875931114b7a1 on master.


license?

I'd love to use your UI in another app. Would you mind open sourcing the project?

😋 License added


NullPointerException in BTreeKeySerializer.STRING on 1.0.8

I'm seeing NullPointerExceptions in BTreeKeySerializer.STRING on MapDB 1.0.8, and I've written a trivial test case to reproduce:
Matthews-MacBook-Pro:mapdb-issue matthewc$ javac -cp ~/.m2/repository/org/mapdb/mapdb/1.0.8/mapdb-1.0.8.jar StringNPE.java
Note: StringNPE.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Matthews-MacBook-Pro:mapdb-issue matthewc$ java -cp ~/.m2/repository/org/mapdb/mapdb/1.0.8/mapdb-1.0.8.jar:. StringNPE
Exception in thread "main" java.lang.NullPointerException
	at org.mapdb.BTreeKeySerializer$3.serialize(BTreeKeySerializer.java:183)
	at org.mapdb.BTreeMap$NodeSerializer.serialize(BTreeMap.java:385)
	at org.mapdb.BTreeMap$NodeSerializer.serialize(BTreeMap.java:288)
	at org.mapdb.Store.serialize(Store.java:154)
	at org.mapdb.StoreWAL.put(StoreWAL.java:200)
	at org.mapdb.Caches$HashTable.put(Caches.java:216)
	at org.mapdb.Pump.buildTreeMap(Pump.java:470)
	at org.mapdb.DB.createTreeMap(DB.java:875)
	at org.mapdb.DB$BTreeMapMaker.make(DB.java:661)
	at StringNPE.main(StringNPE.java:29)

At first bluster, it looks like keys[start] in the serialize function is null. Some of the serializers iterate starting at start + 1 and some (including the string serializer) start at start.
This does appear to be an issue with the string serializer as removing the line that uses the string serializer makes the problem go away.

For what it's worth, I'm using Oracle Java 1.8.0_60 on OS X Yosemite.

Interesting fact that issue is stable and always fail when
start = 1; end = 12; keys = [null, null, job_geomerror.1485, job_geomerror.1982,...

Right, this doesn't happen with all sets of IDs. Should have mentioned that before.

I adapted your test case to Java 6 style and added it as a unit test to this branch. Sorry, I tried to see if I could fix the issue and I'm not familiar enough with the code to understand the intricacies.
It does look like (pure guess) that the class Pump around line 452 is adding an additional null value.
https://github.com/atoulme/mapdb/tree/issue582-1.0

I have also experienced the similar issue and it appears to be related to number of records pumped. In following modified test case from original test case, if i use counter value
< 6048 Works fine
< 6049 Doesn't work
< 6070 Doesn't work
< 6072 Doesn't work
< 6073 Works fine
Hope that will help troubleshoot a bit further.
public class Issue582Test {
@Test
public void test(){
DB db = DBMaker.newTempFileDB().make();
Iterator source = new Iterator() {
int counter;
@Override
public boolean hasNext() {
return counter < 6072;
}
@Override
public String next() {
counter++;
return "" + counter;
}
@Override
public void remove() {
// TODO Auto-generated method stub
}
};
db.createTreeSet("test").pumpPresort(1000000).pumpSource(source)
.serializer(BTreeKeySerializer.STRING)
.make();
}
}

I was very busy with bugfixing until recently, will have a look soon.

Thanks!
	--        Matthew Wigginton Conway       Transportation Analytics/Open SourceWashington, DCindicatrix.org
	 ---- On Sun, 01 Nov 2015 05:21:14 -0500<EMAIL_ADDRESS>wrote ----I was very busy with bugfixing until recently, will have a look soon.

—Reply to this email directly or view it on GitHub.

Not going to fix, its too complex and I could break something else. Sorry.

I was able to fix the issue locally with the following patch. It modifies the treemap pump code to not split a full node if there are no more source items, because that would leave a new, empty node behind.
--- a/src/main/java/org/mapdb/Pump.java
+++ b/src/main/java/org/mapdb/Pump.java
@@ -412,7 +412,7 @@

             //check node sizes and split them if needed
             for(int i=0;i<dirKeys.size();i++){
-                if(dirKeys.get(i).size()<nload) break;
+                if(dirKeys.get(i).size()<nload || !source.hasNext()) break;
                 //tree node too big so write it down and start new one
                 Collections.reverse(dirKeys.get(i));
                 Collections.reverse(dirRecids.get(i));

After patching, the posted tests will work.
I am however not submitting a pull request because I'm unsure if this is correct or causes other things to break. Tbh I don't fully understand the code.


Getting error while on build command

i am getting the following error while trying make build command
build
go clean
build .: cannot find module for path .
make: *** [Makefile:20: build] Error 1
is there anything i missed?

Did you run make build on master branch or an older version? It works on master for me.
This kind of error message appears when go build cannot find .go files in the current directory. The makefile specifies ./cmd/... as source which means all programs in sub-directories are built at once.

yes . tried on master branch.

Does go build ./cmd/... throw the same error? If yes, maybe your Go version is too old or you made an unintentional change to go.mod?

Its probably not in your $PATH. The makefile build puts the executable into the current directory, so try run it with ./tzindex.

ok.
i think it is giving correct response . don't know why tzstats is not working .
https://github.com/blockwatch-cc/tzstats-legacy

Its due to the following issues:

run tzindex with -enable-cors to include the required CORS headers for the browser
run tzindex with -full to index all data

The open-source version of TzStats is quite old and there are likely several breaking changes in API responses so that not all explorer pages are working anymore.

i have tried with both still getting same error

I fixed an issue with default CORS headers. This should make it work. Please pull from master branch again and rebuild.

I fixed an issue with default CORS headers. This should make it work. Please pull from master branch again and rebuild.

Thank you . with the help of this cors issue is resolved.
i am seeing tezos indexer stalled in explorer . is this an issue?

Is this a sandbox network? Try and bake a few blocks.

yes this is a sandbox network.
i tried to bake few more blocks but most of the time it says tezos indexer stalled or offline

This is both expected behavior.

to get around the stalled state you could use Flextesa which would bake sandbox blocks automatically, see https://github.com/blockwatch-cc/tzindex/blob/master/etl/crawler.go#L248-L274
by default tzindex indexes head~1 to prevent issues with reorgs, you can set -crawler.delay=0 to always index at head block

what is actually happening at tzindexer stalled time?

The indexer waits for the next block (using RPC /monitor/heads/main) and then processes the next block which is at head - crawler.delay. If no new block arrives for one minute, the status will flip to stalled meaning the node is likely cut off from the network, too slow to validate blocks or the network did not produce a new block yet.

what tzindexer offline is showing most of the time. also there is nothing showing in cycle.

Need more detail. Send responses from /explorer/status, /explorer/tip, /explorer/config/head.

Looks like different issues. The chain the indexer crawls had its last block on Dec 26, 2023. For this reason /explorer/status reports stalled state. The offline message in the browser is displayed by the frontend when the browser's Internet connection is offline. It has nothing to with the indexer.

The time stamp showing is also incorrect. i just baked two blocks today but it is showing the node created date.

I am not getting live blocks in explorer . need to restart indexer each time when i baked a block to get it on explorer.

This is both expected behavior.

to get around the stalled state you could use Flextesa which would bake sandbox blocks automatically, see https://github.com/blockwatch-cc/tzindex/blob/master/etl/crawler.go#L248-L274
by default tzindex indexes head~1 to prevent issues with reorgs, you can set -crawler.delay=0 to always index at head block

i din't get how i can use flextesa from the link is there any other document that can help me with this?
thanks in advance : )

Hi, Flextesa https://gitlab.com/tezos/flextesa is a Docker-based system that helps manage Tezos sandboxes. We have been using it for a while to test in development, but unfortunately it is no longer actively maintained. The most recent Docker image only has Oxford 1 support, their Oxford 2 support is in the dev branch (you probably need to build it on your own).
Here is a small script to run a Flextesa sandbox:
#!/bin/sh
set -eo pipefail

TEZOS_IMAGE=oxheadalpha/flextesa:latest
TEZOS_PROTO=oxford

CMD=${1}
case "$CMD" in
    start )
      # daemon mode
      echo "Starting sandbox..."

      docker stop tezos_sandbox
      echo "Done"
      ;;
    logs )
      docker logs -f tezos_sandbox
      ;;
    * )
      echo "Unknown command $CMD"
      exit 1
      ;;
esac

Then point tzindex to -rpc.url localhost:8732.

I am running my tezos sandbox node using scripts i created. is there anyway i can use the flextesa making update in my script?or do i need to use the docker version. also will it support other protocols like nairobi?

Yes, you have to use Docker. Flextesa has its own system to manage sandbox parameters and for starting up the node etc. All runs inside a Docker container. There are lots of config options, but I haven't had the need to use them. It supports Nairobi too, use nairobibox start as docker command.

Here is a small script to run a Flextesa sandbox:
#!/bin/sh
set -eo pipefail

TEZOS_IMAGE=oxheadalpha/flextesa:latest
TEZOS_PROTO=oxford

CMD=${1}
case "$CMD" in
    start )
      # daemon mode
      echo "Starting sandbox..."

      docker stop tezos_sandbox
      echo "Done"
      ;;
    logs )
      docker logs -f tezos_sandbox
      ;;
    * )
      echo "Unknown command $CMD"
      exit 1
      ;;
esac

this script is giving unknown command error

The timestand showing in tzexplorer is wrong . do you know why it is happending?

This error here is due to the Tezos sandbox configuration and the way Tezos assigns snapshot indexes. The cycle is too short (8 blocks) but the protocol still assigns snapshot index 15 to the last snapshot in the cycle.
Will be fixed in the upcoming Oxford release which is in preparation.
Also, I'm closing this issue because it has gone way out of topic. Please open new issues if needed or join our Discord chat.


memmetrics: simplify locking and solve data race

This package was updating counters concurrently because of incorrect
locking. There's not really a reason to have two separate locks or try
to optimize with RW locks.
This change replaces the two RW locks with one exclusive lock. The
RTMetrics struct methods always acquire this exclusive lock. This is
simple and will be easier to keep correct as the code evolves.

Here is the performance before/after with the benchmark I added.
We went from 280ns -> 255ns on my intel 3ghz CPU. We got a little faster by switching from RWMutex to Mutex. The benchmark I added isn't concurrent. But this is sufficient evidence that we're not introducing any performance issue with this change. 255ns means we can lock around 11.7 million times per second which is much higher than any HTTP request rates.
Before this change.
seth.bunce@GQBS9Z2-DT:~/go/src/github.com/vulcand/oxy$ go test -count=1 -bench=. ./memmetrics
goos: linux
goarch: amd64
pkg: github.com/vulcand/oxy/memmetrics
BenchmarkRecord-20    	 4032144	       280 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/vulcand/oxy/memmetrics	1.463s

After this change.
seth.bunce@GQBS9Z2-DT:~/go/src/github.com/vulcand/oxy$ go test -count=1 -bench=. ./memmetrics
goos: linux
goarch: amd64
pkg: github.com/vulcand/oxy/memmetrics
BenchmarkRecord-20    	 4430594	       253 ns/op	       0 B/op	       0 allocs/op
PASS
ok  	github.com/vulcand/oxy/memmetrics	1.431s

Maybe add a concurrent benchmark ?
func BenchmarkRecordConcurrently(b *testing.B) {
	b.ReportAllocs()

	rr, err := NewRTMetrics(RTClock(testutils.GetClock()))
	require.NoError(b, err)

	// warm up metrics. Adding a new code can do allocations, but in the steady
	// state recording a code is cheap. We want to measure the steady state.
	const codes = 100
	for code := 0; code < codes; code++ {
		rr.Record(code, time.Second)
	}

	concurrency := runtime.NumCPU() * 2
	wg := sync.WaitGroup{}
	wg.Add(concurrency)

	b.ResetTimer()
	for i := 0; i < concurrency; i++ {
		go func() {
			for j := 0; j < b.N; j++ {
				rr.Record(j%codes, time.Second)
			}
			wg.Done()
		}()
	}

	wg.Wait()
}

Our IT guys upgraded my CPU and I didn't even know it. I have 10 cores 20 threads at 3.3Ghz now. (the previous benchmarks were also on this CPU)
Intel(R) Core(TM) i9-9820X CPU @ 3.30GHz
Good idea to add a concurrent benchmark because the context in which this package will be used should be highly concurrent.
I switched the benchmark so that b.N is divided among goroutines so we can do more of an apples to apples comparison. This makes it so the same number of results are recorded in the concurrent and non-concurrent test. I also set concurrency (number of goroutines in the benchmark) equal to the number of CPUs (hardware threads). The goroutines will end up having affinity to a hardware thread, so having extra concurrency would add more scheduler overhead. I tried setting concurrency double to number of CPUs and it only made like 40ns/op difference.
The poor scaling with CPU count of RWMutex is explained here.
https://github.com/golang/go/issues/17973
Here is before the locking change. We observe a 6.8x slowdown with concurrency.
seth.bunce@GQBS9Z2-DT:~/go/src/github.com/vulcand/oxy$ go test -bench=. ./memmetrics
goos: linux
goarch: amd64
pkg: github.com/vulcand/oxy/memmetrics
BenchmarkRecord-20                	 4036707	       281 ns/op	       0 B/op	       0 allocs/op
BenchmarkRecordConcurrently-20    	  919545	      1929 ns/op	       0 B/op	       0 allocs/op
--- BENCH: BenchmarkRecordConcurrently-20
    roundtrip_test.go:48: NumCPU: 20, Concurrency: 20, GOMAXPROCS: 20
PASS
ok  	github.com/vulcand/oxy/memmetrics	3.260s

Here is after the locking change. We observe a 4x slowdown with concurrency. We're roughly twice as efficient as the old code with RWMutex.
seth.bunce@GQBS9Z2-DT:~/go/src/github.com/vulcand/oxy$ go test -bench=. ./memmetrics
goos: linux
goarch: amd64
pkg: github.com/vulcand/oxy/memmetrics
BenchmarkRecord-20                	 4408964	       255 ns/op	       0 B/op	       0 allocs/op
BenchmarkRecordConcurrently-20    	 1221457	      1009 ns/op	       0 B/op	       0 allocs/op
--- BENCH: BenchmarkRecordConcurrently-20
    roundtrip_test.go:48: NumCPU: 20, Concurrency: 20, GOMAXPROCS: 20
PASS
ok  	github.com/vulcand/oxy/memmetrics	3.669s

So this issue has not been resolved yet？


Set column defaults with explicit DEFAULT keyword

Fixes https://github.com/dolthub/dolt/issues/6430
There were a few things at play here:

As far as I can see, scopeColumn is 1-indexed, rather than 0-indexed (with 0 denoting an empty column), so to make sure our index references are valid for the FieldIndex of a GetField, we need to subtract 1
There are some cases where we've previously correctly resolved the GetField's FieldIndex, but we end up with a null scope in getIdx, and hence no columns to compare to - in this case, if we've already set a FieldIndex so far, use that rather than the 'not found' -1 index and erroring out. I think there was some logic akin to this in the old implementation of fixing field indexes
In buildValues, we need a second pass to ensure defaults are set before we try to use them

The index change does cause the plans' indexes all to change - would this be something to avoid (e.g. by moving the -1 further down the pipeline?)

Thanks for taking the time to contribute to GMS @adjeiv! The two-phase default execution for values nodes makes sense. The changes to expression ids breaks most of the rest of our tests, so we probably want to leave those alone. We are in the process of making it more clear that expression ids and indexes are two different things and have separate life cycles, even though they look similar and I've combined them on the same object right now.
As a heads up, resolving INSERTs still has a lot of rough edges that aren't particularly beginner friendly. There are some ordering problems with source/destination node resolving. Resolving source nodes is different depending on whether it is VALUES or a SELECT statement. When we index the source node, we are currently unaware of the broader context which makes it hard to do correctly.
One way to maybe do this without refactoring the rest of INSERT resolving is probably either 1) inline the index assignment at execution time, where you've made changes to execute column defaults in a second pass; or 2) resolveInsertRows should mark the plan.Scope when recursively resolving the source node. Either the scope could have an InsertDestinationSchema field, or you could use NewScopeFromSubqueryExpression to make the destination schema available to the VALUES expression (only when the source node is *plan.Values) so that we index VALUE default expressions correctly.

Hi @adjeiv,
I have a fix for this in the works at the moment. I'll update with the fix PR when it's out.
Thanks for the contribution!
Zach

This PR fixes the same bug: https://github.com/dolthub/go-mysql-server/pull/2073
Closing this in favor of that one.


feat(backend): introduce bot authentication with custom tokens

Description
Allow for the creation of bot accounts by introducing an endpoint
that uses pre-shared-tokens to allow bots to create firebase
tokens for themselves, and add a firestore rule allowing the
chatbot to store config.
Motivation
The initial use case is for our new chatbot (https://github.com/reach4help/chatbot) to store configuration in firestore, namely the token / credentials used to authenticate with the google calendar API. A message is sent over slack to #bot-admin when authentication is required, with a link to google to facilitate the request.

For now, I've deployed this on reach4help-dev (and the chatbot is currently using that environment to store its tokens). I plan to move this over to prod when done.

How is this API exposed? I don't see changes the config changes to make this available.

Not sure exactly what you mean? The bot can write whatever it wants to the firestore document /config/chatbot. As long as there is a token in the function config bot_auth_tokens (take a look at the config in reach4help-dev).

I meant the firebase.json changes to expose the API route to hosting so that it's accessible.


HCP not working

"[autoupdate] download failure: failed at verifyResponse: Cannot read property 'match' of undefined"
Any pointers?

Seems to come from: const matches = eTag.match(this.eTagWithSha1HashPattern);

Hey,
do you have your server exposed over some kind of proxy like i.e. nginx?

Yes, we use meteor up with Nginx and Docker.
Op 10 jun. 2017 10:26 a.m. schreef "Bartosz Wojtkowiak" <
<EMAIL_ADDRESS>
Hey,
do you have your server exposed over some kind of proxy like i.e. nginx?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wojtkowiak/meteor-desktop/issues/107#issuecomment-307551250,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AL3qWKuF3WR0rRANvRuDNtiKqFg2jxKpks5sClNKgaJpZM4NzFQe
.

Just to clarify further: we're also proxying traffic through Cloudflare.
User -> Cloudflare -> Nginx -> Meteor (Docker container)
Trying out your fix right now.

I commented on the commit; should be === instead of !==.
When changed it's working fine again!

I commented on the commit; should be === instead of !==.

Yep, been thinking about one thing and wrote the other ;)
v0.7.2 with this fix is released, let me know if this can be closed.
And thanks for you time investigating this!

Working just fine now!


Run through our internal hub cost estimates

Right now, we have very conservative estimates of how much labor it will take to run hub infrastructure. We should look at these estimates, and try to refine the numbers so that we can give reasonable prices.
What goes into labor?

Initial conversations about what is needed for a hub
Initial deployment of the hub
Customization of the hub beyond default environments
Ongoing maintenance of hubs, that may or may not be tied directly to a single hub
Dedicated maintenance for a given hub (e.g., being asked to change the environment)
User support for a given hub (e.g., being asked a question about the hub, or a perceived outage)

What hub types to consider
Below I'll list a few types of hubs, a brief description, and a totally arbitrary estimation of "days per month" for development and operations. We should discuss these days/month and get to a number that is more realistic!

Hub Type
User
Description
Dev Days / Month
Ops Days / Month

Education Light
This is the most basic hub we have. Simple data science environment with minimal resources for students.
small or basic class
0.1
0.25

Education Full
This is a more complex educational environment (e.g., with more packages, autograding, etc)
complex or large class
4
4

Research Light
"basic data science environment". Think "The PyData Stack" but nothing extremely complex.
Lab/Team with modest funds or that needs a minimal envt.
0.5
1

Research Pangeo
research light + some more complex and scalable infrastructure like Dask Kubernetes
Lab/Team with larger datasets and more complex needs
4
4

@choldgraf I've updated the numbers! I think the list of things you stated make sense. I'm not entirely sure having hours like this is the best way to go, but let's try it out and see where it takes us?

@yuvipanda just a note that this is days per month, not hours. So 1 day ~= 5-6 hours. Does that change your opinion?
I agree this probably isn't the best way of thinking about our own internal costs, but we need some way to estimate "how many hubs can we take on, given our engineering team, before we start to hit capacity". I'm not sure how else to go about estimating this :-/

closing this as it no longer reflects how we're currently thinking about costs and pricing, and it's unclear if this is a good way to break down our costs


Maximizing Window Fails on Rare Occasions

What steps will reproduce this issue?
You just need to keep maximizing and unmaximizing the window until the bug occurs. Eventually, the maximized window will not fill the whole screen -- at least visually. If you unfocus the window and then come back to it, the window will display correctly.
Screenshot:

Note: You can ignore the code snippet there in MainWindow_Loaded. That was me trying to replicate another bug that's happening in my work project but not in the demo.
Demo (basically just a stock MahApps project):
MaximizeWindowTest.zip
Expected outcome
The window should always maximize (visually) for the user.
Notes
Might be related to #1823?
--
Environment

MahApps.Metro 1.4.0-alpha26
Windows 10.0.14393.0 (Anniversary Update)
Visual Studio 2015 Community
.NET Framework 4.5

Edit:
My zoom level (set in Display properties) is 200%. Not sure if that is going to mess with anything.

Believe it or not, I think this bug happens because I have Windows animations turned off. When I turn animations back on, I cannot replicate the issue.

@punker76 I am closing this as I am unable to replicate it with the latest MahApps -- the problem probably went away with the ControlzEx refactor I am guessing (although I cannot prove).


1019 | Next Greater Node In Linked List | Java

Title - 1019 Next greater node in Linked List
What will change - Java solution for 1019. Next greater node in linked list will be added
Type of Issue -

[x] Adding New Code

Programming Language

[x] Java

Self Check

Ask for issue assignment and wait to get assigned to it before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server ✉ - https://discord.gg/CXksGdn
Happy Coding,

@Yashica7 @SSKale1 , I would like to contribute, please assign this issue to me.

Issue #505 Already exists for the same problem.


use SVG logo

Use SVG like on Official Site.
The SVG's logo grabbed from codeigniter.com and optimized on https://jakearchibald.github.io/svgomg/
before:

after:

Checklist:

[x] Securely signed commits
[ ] Component(s) with PHPDoc blocks, only if necessary or adds value
[ ] Unit testing, with >80% coverage
[ ] User guide updated
[ ] Conforms to style guide

I think the title to the <a> is to serve as tooltip when hovered.

Instead of the alt of the unused image, I move it as a title.
The reference of a title,  https://html.com/attributes/a-title/

Instead of the alt of the unused image,

What do you mean by unused? It seems the image (logo) is used.
alt and title are different things. Why do you remove alt?

when using the img tag there is an alt attribute, while svg not.
so, the alt of the img tag is not used, then I move it as title in a href.

Oh, thanks. I got it.
I recommend you use aria-label:
<svg role="img" aria-label="Visit CodeIgniter.com official website!" ...>

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/img_role#svg_and_roleimg

I recommend you use aria-label

Updated


[Feature-3934] Add registy module for streampark

What changes were proposed in this pull request
Issue Number: close https://github.com/apache/incubator-streampark/issues/3934

Brief change log
Add streampark-registy module

Verifying this change

This change added tests and can be verified as follows:

NetworkUtilsTestCase
UUIDUtilsTestCase
RegistryTestCase
JdbcRegistryTestCase
JdbcRegistryThreadFactoryTest
LockUtilsTest
MysqlJdbcRegistryTestCase
PostgresqlJdbcRegistryTestCase

Does this pull request potentially affect one of the following parts

Dependencies (does it add or upgrade a dependency): yes

@wolfboys @HxpSerein Hi, I find most of the code under streampark-console-registry is copy from DS, you should announce this.

@ruanwenjun Thank you for reporting this issue. After review, we confirmed that the issue does exist. This code is only in the dev branch. We will list the code in the LICENSE. This is only a temporary solution and we will rewrite this part of the code later. Thank you again for your feedback.

hi @ruanwenjun @HxpSerein @SbloodyS:
This pull request is a fork of another PR linked here. Upon review, we found that the code for the streampark-console-registry module was copied from Apache DolphinScheduler without citation. This violates the Apache specification. As a result, we have submitted a new PR to revert the changes made in the previous PR. We will implement a new solution based on ZooKeeper later.


Malformed calls after opening after modal is closed and reopened

Bug
I'm getting a yellow error: Exception in HostFunction: Malformed calls from JS: field sizes are different. This happens when I open a modal that contains a datetimepicker component in it, open the datetimepicker, close datetimepicker, close modal, reopen modal, and try to open datetimepicker again (but fails and results in yellow screen with no datetimepicker being shown)

Environment info
"@react-native-community/datetimepicker": "^2.3.2",
react-native info output:
System:
    OS: macOS 10.15.3
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 4.14 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8<IP_ADDRESS>10548
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.0 => 0.62.0
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 2.3.2
Steps To Reproduce

Open datetimepicker in Modal (via <Button onPress{...} /> and close it at least once.
Close modal
Reopen modal
Try to open datetimepicker
...

Describe what you expected to happen:

Expecting datetimepicker to open like it did before I closed the modal the first time

Reproducible sample code
This is tested on android so far only.
import React, { Component, } from 'react'
import {View, Button, Modal} from 'react-native'
import DateTimePicker from '@react-native-community/datetimepicker'

<Button onPress={()=>{this.setState({show:!show})}}>
  {"Show Datetimepicker"}
</Button>
{show &&
<DateTimePicker
  value={date}
  mode='time'
  display="spinner"
  onChange={(event, newDate)=>{
    this.setState({date:newDate,show:false})
  }}/>
}

Hello and thank you for reporting. You're mentioning modal, but modal is not even used in the sample. Please update your code sample to be a runnable reproduction.  Even better put it in a expo snack. Thank you.

Same issue here

Hi there! Sorry you're having an issue. As the issue template explains, we require that you provide a runnable example that reproduces your issue (see the issue template). The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug.
Please create a new issue with this and we'll be happy to review it!


Fix weed fix

What problem are we solving?
https://github.com/seaweedfs/seaweedfs/issues/4991
How are we solving the problem?
Sorting needles by offset when mapdb wants to save idx to file
How is the PR tested?
I tested using reprod.py in issue. Also tested vacuum manually because vacuum use SaveToIdx
Checks

[ ] I have added unit tests if possible.
[ ] I will add related wiki document changes and link to this PR after merging.

reverting. let's discuss in @kmlebedev 's thread.