Provide a way to fluently convert an response with WebClient and add BlockingWebClient

Motivation:

Improved usability

REST API uses a unary call(non-streaming request and response) to send
and respond to a message.
As WebClient supports streaming requests and responses by default,
users need to manually aggregate the returned HttpResponse.
Testing code needs to wait for the result with .join() or .get()
to assert the result.
If we provide BlockingWebClient, users and dev can remove a lot of
boilerplate code.

Possibility of performance optimization

If a request and response type are known before sending a call, we
can optimize the performance for non-streaming calls.
ExchangeType introduced in #3956 will be also used at the client side.

Modifications:

Add ResponseAs<T, U> that defines a way to convert a response into another.

Decoders for byte[], String, JSON, File are provided by default.

Add TransformingRequestPreparation<T, R> that fluently transforms a returns response.
Add FutureTransformingRequestPreparation that is a specialized converter for CompletableFuture.

Scala's Future will be supported via ScalaResponseAs.

Add BlockingWebClient that returns AggregatedHttpResponse by default.
Add InvalidHttpResponseException for notifying a failure of JSON decoding.
Introduce {Request,Response}Entity<T> for express a decoded type of an HTTP content.
Migrate some tests code for proof of concept.

Result:

You can now fluently convert a response using WebClient.WebClient client = WebClient.of("api.example.com");
CompletableFuture<ResponseEntity<MyObject>> response =
   client.prepare()
        .get("/v1/items/1")
        .asJson(MyObject.class)
        .execute();

You can now use BlockingWebClient to wait for a response to be completed.BlockingWebClient client = BlockingWebClient.of("https://api.example.com");
ResponseEntity<MyObject> response =
    client.prepare()
          .get("/v1/items/1")
          .asJson(MyObject.class)
          .execute();

LGTM once the build passes.

Oops... 😅

Can you check the scala test compilation failure? 😅

Can you check the scala test compilation failure? 😅

😱😱😱


AppleTV3,1 'POST Photo' protocol Not Working anymore

It seems that on AppleTV3,1 devices:
{
deviceid = "xxxxx";
features = "0x5A7FFFF7,0xE";
flags = 0x44;
model = "AppleTV3,1";
pi = "43f884bc-eb56-459d-a307-9cce844f86bf";
pk = 8b197524a8f78819b8e64b8d8cd4a70faec1b49317e517fb81f624628a313a39;
srcvers = "220.68";
vv = 2;
}

The 'Photo' protocol is not working anymore.
Media Control for "Video" and "Audio" works.
I's easy to test it. Just use the "Connect SDK Sampler" app against a AppleTV3,1 device and send a photo then.
The app will log an error:
2015-05-22 17:10:38.286 ConnectSDKSampler[8926:824787] display photo failure: A generic error occured
I get the same error using the old AirPlayKit ( https://github.com/rothacr/AirplayKit/issues/4 ), so it seems to be a Async Socket error from the AppleTV side to me.
The 'photo' protocol works fine with AirPlay compatible devices like "AirServer" ( http://www.airserver.com/ ).
Also, the "photo" protocol, works fine on AppleTV3,1 with Erica Sadun's AirFlick utility ( rica Sadun's AirFlick ). This seems very weird, since I assume this app is not updated from a while.
I add here that sending a photo image on Apple TV is sending a socket message like
NSData *imageData = haRetinaDisplay ? UIImageJPEGRepresentation(image, _imageQuality) : UIImagePNGRepresentation(image);
        NSUInteger length = [imageData length];
		NSString *message = [[NSString alloc] initWithFormat:@"PUT /photo HTTP/1.1\r\n"
							 "Content-Length: %@\r\n"
                             "Host: musiXmatch\r\n"
							 "User-Agent: MediaControl/1.0\r\n\r\n", @(length)];
		NSMutableData *messageData = [[NSMutableData alloc] initWithData:[message dataUsingEncoding:NSUTF8StringEncoding]];
		[messageData appendData:imageData];

with the image is of mime type jpeg or png.
Regarding ConnectSDK, the classes involved are AirPlayServiceHTTP.m and AirPlayServer.m
The image is sent by class method:
- (void) displayImageWithMediaInfo:(MediaInfo *)mediaInfo success:(MediaPlayerSuccessBlock)success failure:(FailureBlock)failure
The error that is trapped is a ConnectError and it has a status code of type ConnectStatusCode
that is not in the enum, so then you get here
default:
            if (details)
                errorMessage = [NSString stringWithFormat:@"A generic error occured: %@", details];
            else
                errorMessage = [NSString stringWithFormat:@"A generic error occured"];

in class method
+ (NSError *) generateErrorWithCode:(ConnectStatusCode)code andDetails:(id)details
This error is raised by  AirPlayServiceHTTP.m in method:
- (int) sendCommand:(ServiceCommand *)command withPayload:(id)payload toURL:(NSURL *)URL
due to a HTTP response code not 200:
CTASIHTTPRequest *strongRequest = weakRequest;

        if (strongRequest.responseStatusCode == 200)
        {
//....OK
} else
        {
            if (command.callbackError)
                dispatch_on_main(^{ command.callbackError([ConnectError generateErrorWithCode:strongRequest.responseStatusCode andDetails:nil]); });
        }

where the HTTP Response status was  404 / Not Found.
Here are more debugging info about this request to AirServer
(lldb) po strongRequest.responseStatusCode
404
(lldb) po strongRequest.responseHeaders
{
    "Content-Length" = 0;
    Server = "AirTunes/220.68";
}
(lldb) po strongRequest.responseStatusMessage
HTTP/1.1 404 Not Found

Adding more info about AppleTV3,1 here:
macbookproloreto:TherePlay-master admin$ curl --verbose "http://<IP_ADDRESS>:7000/server-info"
* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 7000 (#0)
> GET /server-info HTTP/1.1
> User-Agent: curl/7.37.1
> Host: <IP_ADDRESS>:7000
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 22 May 2015 15:50:58 GMT
< Content-Length: 581
< Content-Type: text/x-apple-plist+xml
<
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>deviceid</key>
	<string>9C:20:7B:E6:70:18</string>
	<key>features</key>
	<integer>61647880183</integer>
	<key>macAddress</key>
	<string>xxxxxx</string>
	<key>model</key>
	<string>AppleTV3,1</string>
	<key>osBuildVersion</key>
	<string>12F69</string>
	<key>protovers</key>
	<string>1.0</string>
	<key>srcvers</key>
	<string>220.68</string>
	<key>vv</key>
	<integer>2</integer>
</dict>
</plist>
* Connection #0 to host <IP_ADDRESS> left intact

If I try to send the image using cURL, that is what I get from AppleTV3,1
* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 7000 (#0)
> PUT /photo HTTP/1.1
> Host: <IP_ADDRESS>:7000
> Accept: */*
> User-Agent: MediaControl/1.0
> X-Apple-Session-ID: 1bd6ceeb-fffd-456c-a09c-996053a7a08c
> X-Apple-AssetKey: F92F9B91-954E-4D63-BB9A-EEC771ADE6E8
> Content-Type: image/jpeg
> Content-Length: 61079
> Expect: 100-continue
>
* Done waiting for 100-continue
< HTTP/1.1 200 OK
< Date: Fri, 22 May 2015 16:17:47 GMT
< Content-Length: 0
<
* Connection #0 to host <IP_ADDRESS> left intact```

I found out that Open Airplay PHP library works fine: https://github.com/jamesdlow/open-airplay
php airplay.php -h <IP_ADDRESS>:7000 -p /Users/admin/Desktop/SPACE.JPG

@loretoparisi, thanks for investigation and comments! We'll try to reproduce and fix it.

Any news on this issue?

I'm testing this on AppleTV3,2 (A1469), OS 6.0.2 (6646.81.1). Works fine. I'll try to upgrade the OS if possible.

I can reproduce it now on OS 7.2 (7512). @loretoparisi, do you have any ideas of what could be broken?

OK, the problem is that ConnectSDK uses the POST method and open-airplay uses PUT, which is correct. I'll need to check it on Apple TV 2 too.

Fixed in https://github.com/ConnectSDK/Connect-SDK-iOS/commit/e05bfb5b3385863eafc10791f51535a2c0a52acc and https://github.com/ConnectSDK/Connect-SDK-iOS-Lite/commit/5916ff397dec250a6c5c878f2db36a325686065c. Merged into dev.
@loretoparisi, thanks for the bug report.

@loretoparisi, please confirm the fix.

thank you @eunikolsky going to check it out!

So I have tried the Sampler App with the dev branch.
I get this error:
2015-06-07 19:47:26.297 ConnectSDKSampler[8680:874431] display photo failure: A generic error occured: STATUS CODE 404 MESSAGE:HTTP/1.1 404 Not Found
HEADERS:{
"Content-Length" = 0;
Server = "AirTunes/220.68";
}
The 404 error was not related to the image url that it works: http://ec2-54-201-108-205.us-west-2.compute.amazonaws.com/samples/media/photo.jpg, so I assume it is the protocol again. Did you merged the PUT method instead of POST as well in the fix?

@loretoparisi, have you updated the core submodule? The current dev branch points to commit https://github.com/ConnectSDK/Connect-SDK-iOS-Core/commit/3385d165e537d66c45001ebc503d5892bffc241a, where this is fixed.

Yes, that was. I think we can close this issue.
Even if I'm not sure of the related issues, but those ones are related to other projects.
Keep going the good work!


$(...).select2('val') returns inconsistant results

I ran these commands one after the other, no code is modifying these objects.

// package.json
  "name": "select2-bootstrap-css",
  "version": "1.4.6",

It seems to work fine if I used .val() from the beginning. Seems to be plenty of workaround here.

Select2 provides a .select2('val') method which in 3.x mapped to a custom method for retrieivng the value, but in 4.0 just maps to jQuery's .val() method. Any inconsistencies that come from it are either a jQuery problem or a result of Select2 not being initialized in the first place.
Usually you want to use jQuery's .val() instead.

The first three calls looks like you are calling Select2 on an element which hasn't actually been initialized. While this should trigger a warning, stranger things have happened.
The fourth call initializes Select2 and calls .val() as provided by jQuery. The fifth call again calls .val(). The sixth call routes to Select2's val, which really just calls .val().


270,000 epochs/ ERROR still 1/ OUT is blank/ Arabic language

Peace Be Upon you,
I am training an Arabic model from scratch, reaching about 270,000 epochs in 32 hours, the ERROR is still 1, and the OUT is empty.
The data I used for training is artificial and 100% Arabic, contains no diacritics, is 300 dpi, Times New Roman regular size 18, and I,am sure that the transcription is 100% correct.
How is it that I cannot get anything recognized?
Attached (click-on):
The transcribed html file
The extracted png/gt.txt files
The training script train.sh
The produced clstm models

The complete terminal log
My training script:
#!/bin/bash
set -x
set -a
sort -R manifest.txt > /tmp/manifest2.txt
sed 1,100d /tmp/manifest2.txt > train.txt
sed 100q /tmp/manifest2.txt > test.txt

report_every=1000
save_every=1000
maxtrain=2000000
target_height=48
dewarp=center
display_every=1000
test_every=1000
hidden=100
lrate=1e-4
save_name=arabic
'/home/bmwmy/Desktop/kra/clstm/clstmocrtrain' train.txt test.txt

*** charsep
got 1998 files, 100 tests
got 38 classes
.stacked: 0.0001 0.9 in 0 48 out 0 38
.stacked.parallel: 0.0001 0.9 in 0 48 out 0 200
.stacked.parallel.lstm: 0.0001 0.9 in 0 48 out 0 100
.stacked.parallel.reversed: 0.0001 0.9 in 0 48 out 0 100
.stacked.parallel.reversed.lstm: 0.0001 0.9 in 0 48 out 0 100
.stacked.softmax: 0.0001 0.9 in 0 200 out 0 38
.
.
.
ERROR 8000 1     6321 6321
8000
TRU نونمٔوي
ALN
OUT
ERROR 9000 1     6321 6321
.
.
.

I removed these lines from the training script, and the problem was solved:
sort -R manifest.txt > /tmp/manifest2.txt
sed 1,100d /tmp/manifest2.txt > train.txt
sed 100q /tmp/manifest2.txt > test.txt

Therefore, you can run these commands in the terminal, and after they finish executing close the current terminal, then you must open a new terminal and run the training script.
After removing these lines from the training script, and running then running the training script again the ERROR was changing and the ALN and OUT contained data.
Somehow sed and sort were causing the model not to train, what a weird problem.


Deploy to Maven central

Would make it much easier to use if it was on Maven Central.   Thanks for your contributions!

Related to #1.
The artifacts produced would likely be:

protocol - the base Roughtime protocol implementation
client - the client API
server - stand-alone server implementation


enemy reward previews & element emojis

I have a question and a "bug" to report:
Question: Why is the count in rewardpreview in floating numbers? and how much do I need to round it to? to the 10 or to the 100? and why doesn't mora have a count property?
Sample enemy data object:
  {
    "name": "Anemo Samachurl",
    "specialname": "Movo Buka",
    "enemytype": "COMMON",
    "category": "Hilichurls",
    "description": "A wizened, mumbling hilichurl, one that spreads the message of Anemo.\nHilichurls especially gifted in commanding the elements who often reach the zenith of their skill in their twilight years. Their ability to command the flowing winds stems from dark, forgotten memories.",
    "investigation": {
      "name": "Samachurl",
      "category": "Easy",
      "description": "Shamans of the hilichurl tribes. They display a limited ability to harness elemental energy.\\n\"While their masks are made with the intent of instilling fear in their enemies, their designs come across as more charming than frightening.\" — Jacob Musk"
    },
    "rewardpreview": [
      {
        "name": "Mora"
      },
      {
        "name": "Divining Scroll",
        "count": 2.5212
      },
      {
        "name": "Sealed Scroll",
        "count": 0.6723
      },
      {
        "name": "Forbidden Curse Scroll",
        "count": 0.168
      },
      {
        "name": "Damaged Mask",
        "count": 0.1681
      },
      {
        "name": "Stained Mask",
        "count": 0.0448
      },
      {
        "name": "Ominous Mask",
        "count": 0.0112
      }
    ],
    "images": {
      "nameicon": "UI_MonsterIcon_Shaman_Wind_01"
    }
  },

"Bug" report: I dont know if this counts as a bug but in the elements function, it returns a object about the element's data. and there is a property called emoji in it. I dont know if you know this but to use a Discord emoji, the user needs to be in the server that the emoji is in. I dont know if you have a discord server linked somewhere but I cant use it for my bot because I doubt u would invite a stranger's unkown bot into your server, here is a sample of the data object:
  {
    "id": "Elements_1",
    "name": "Cryo",
    "type": "Frost",
    "color": "#99FFFF",
    "emoji": "<:Element_Cryo:763984819688308768>",
    "region": "Snezhnaya",
    "archon": "The Tsaritsa",
    "theme": "Russia",
    "images": {
      "base64": "data:image/png;base64,[encoded data, 4884 characters]",
      "wikia": "https://static.wikia.nocookie.net/gensin-impact/images/8/88/Element_Cryo.png"
    }
  },

The "count" data is straight from the datamine. The speculation is that it is the average drops. Mora doesn't have "count" because it wasn't there in the datamine. The wiki says elite enemies drop a varied amount of mora. "All of them can drop 5 Mora per level, although the values vary based on difficulty - weak Elite Enemies, like Mitachurls, cap at 200, moderates like adult Rifthounds cap at 400, while particularly strong and/or rares like Lawachurls cap at 600 Mora."
You can ignore the "count" if it isn't important to you.
element.emoji comes from back when genshin-db first started. I took over the project from someone else and they had it there. I don't actually know which server that emoji belongs too. I actually plan to eventually remove a bunch of properties from element. type, emoji, region, archon, theme. But I'm just keeping them for now.
You can make your own emoji and replace it in genshin-db to use later.
genshindb.elements('Cryo').emoji = "myemojistringhere"


Ray-cast based Lidar - Deviations on elevation angle of lidar channel

I am getting a strange behavior when I acquire data using a "Ray-cast based Lidar" sensor.
In the next image you can see the azimut angle (Vertical axis) and the elevation angle (Horizontal axis) of a 360 lidar sensor with 32 channels.

As you can see, the elevation angle is not constant for the points of the same channel, which I think it is not a coherent behavior.
Have this artifact any explanation?

I saw that it is related with the scan frequency and the movement of the ego-vehicle. the deviation is higher as high is the speed of the vehicle and low is the scan frequency.
The behavior is correct.


feat( services.html)

Related Issue
There was nothing on service page

Description

The services page didn't mentioned any  services the website is willing to provide to the users.
Changes
Added  the following  Programming services

Code Review Services
Blogging Consultation
3)Web Development Workshops
Mobile App Development
5)Tech Stack Consulting
Database Optimization

Screenshots

??


426 Upgrade Required

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
When I try to reach my aspire dashboard on Azure I get 426 Upgrade Required. Previously (after some bugfixes on the side of the Aspire development team) it was working ok. Now "426 Upgrade Required" all the time. And I don't understand what kind of upgrade is required.
Expected Behavior
Dashboard opens
Steps To Reproduce

Have your code deployed to azure
Enable aspire dashboard
Try to reach it

Exceptions (if any)
426 Upgrade Required in the response of the dashboard request
.NET Version info
8.0
Anything else?
Aspire hosting libs version is 8.1.0

cc @snehapar9

now it works, thank you


Re-implement GodotPayment Android plugin using the Google Play Billing library

What does this PR do?
Re-implement the GodotPayment Android plugin to migrate away from AIDL ("Accessing Google Play Billing using AIDL is deprecated, and all integrations must use the Google Play Billing Library in the future" source) and to using signals. This also enables the usage of in-app subscriptions.
This breaks compatibility but we already broke compatibility by renaming GodotPayments to GodotPayment for 3.2.2 and the changes should be fairly trivial to implement in existing games (I'll write docs once this PR is done).
Example code using the new API
Some methods are missing from this example, I'll add them later... (purchasing items, consuming items, querying SKU details)
func _ready():
	if Engine.has_singleton("GodotPayment"):
		payment = Engine.get_singleton("GodotPayment")
		payment.connect('connected', self, '_on_connected') # No params
		payment.connect('disconnected', self, '_on_disconnected') # No params
		payment.connect('connect_error', self, '_on_connect_error') # Response ID (int), Debug message (string)
		payment.connect('purchases_updated', self, '_on_purchases_updated') # Purchases (Dictionary[])
		payment.connect('purchase_error', self, '_on_purchase_error') # Response ID (int), Debug message (string)
		payment.connect('sku_details_query_completed', self, '_on_sku_details_query_completed') # SKUs (Dictionary[])
		payment.connect('sku_details_query_error', self, '_on_sku_details_query_error') # Response ID (int), Debug message (string), Queried SKUs (string[])
		payment.connect('purchase_acknowledged', self, '_on_purchase_acknowledged') # Purchase token (string)
		payment.connect('purchase_acknowledgement_error', self, '_on_purchase_acknowledgement_error') # Response ID (int), Debug message (string), Purchase token (string)
		payment.connect('purchase_consumed', self, '_on_purchase_consumed') # Purchase token (string)
		payment.connect('purchase_consumption_error', self, '_on_purchase_consumption_error') # Response ID (int), Debug message (string), Purchase token (string)
		payment.startConnection()
	else:
		print("GodotPayment singleton is only available on Android devices.")

func _on_connected():
	var query = payment.queryPurchases('subs')
	if query.status == OK:
		for purchase in query.purchases:
			print('The player has purchased: ' + str(purchase.sku))
			if !purchase.is_acknowledged:
				print('Purchase ' + str(purchase.sku) + ' has not been acknowledged...')
				payment.acknowledgePurchase(purchase.purchase_token)

# ...all the other callbacks...

Current problems
~I found no way to conditionally add a Gradle dependency to the custom Android build. com.android.billingclient:billing:2.2.1 should only be added if the module is enabled in the project export dialog because of 1. size overhead and 2. it automatically adding the BILLING permission to the app.
My current workaround is to create a file <project dir>/android/billing-client/gradle.conf with the following content to include the library in the final build:~
[dependencies]
    implementation 'com.android.billingclient:billing:2.2.1'

Dependencies
If you want to test this, make sure that https://github.com/godotengine/godot/pull/39029 is merged or merge it yourself before as this PR depends on it.
To-Do

[x] Find a solution to the Google Play Billing library inclusion problem
[ ] Fix code style to match project code style
[ ] Write migration guide to make it clear to users that it's now required to acknowledge purchases and subscriptions
[ ] Update example IAP project
[ ] Update docs

Maybe there is already a solution to the library inclusion problem in the new Android plugin system that I didn't find... (CC: @m4gr3d)

Maybe there is already a solution to the library inclusion problem in the new Android plugin system that I didn't find... (CC: @m4gr3d)

@timoschwarzer With the new plugin system, you can define a configuration file that can specify the dependencies needed by the plugin.
Since GodotPayment is a built-in plugin, its configuration is defined here, so you just need to update it with the needed dependency.

With the new plugin system, you can define a configuration file that can specify the dependencies needed by the plugin.

Thank you for the hint @m4gr3d, that works :)! Although I didn't find a better way to create an inline Vector<String> than this:
/*
 * Set of prebuilt plugins.
 */
static const PluginConfig GODOT_PAYMENT = {
	/*.valid_config =*/true,
	/*.name =*/"GodotPayment",
	/*.binary_type =*/"local",
	/*.binary =*/"res://android/build/libs/plugins/GodotPayment.release.aar",
	/*.local_dependencies =*/{},
	/*.remote_dependencies =*/String("com.android.billingclient:billing:2.2.1").split("|"),
	/*.custom_maven_repos =*/{}
};

There has to be a better way...

I'm guessing this is not opened against the master branch so that you can test and validate?

This is opened against 3.2 for now because @akien-mga said that we can break compatibility now with 3.2.2 if necessary as we already kind of broke it by renaming GodotPayments to GodotPayment. I can also imagine Google rejecting apps using the old AIDL API in the near future because their warnings are quite bold. (1, 2)
When everything works in 3.2, I'll start testing with master :)

@m4gr3d Thanks a lot for the review! All valid points and done :)

There are some code styling issues: https://travis-ci.org/github/godotengine/godot/jobs/691014967
You can set up clang-format locally to apply changes automatically: https://docs.godotengine.org/en/latest/community/contributing/code_style_guidelines.html

@akien-mga fixed :+1:
@m4gr3d are there significant differences between the Android build systems in 3.2 and master? I'd start the PR for 4.0 now :)

@m4gr3d are there significant differences between the Android build systems in 3.2 and master? I'd start the PR for 4.0 now :)

@timoschwarzer  No the changes should be identical.
The previous v0 system is completely deprecated and removed in 4.0, but the v1 system introduced in this upcoming release and the one you're using, is made forward-compatible with 4.0.

Thanks!

Engine.has_singleton("GodotPayment") now returns false even running on Android device.
I compiled editor and android template with this PR merged.

I got error log from adb logcat.
05-27 13:07:34.469: I/GodotPluginRegistry(22888): Initializing Godot plugin GodotPayment
05-27 13:07:34.470: I/zygote64(22888): Rejecting re-init on previously-failed class java.lang.Class<org.godotengine.godot.plugin.payment.GodotPayment>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/billingclient/api/PurchasesUpdatedListener;
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.forName(java.lang.String) (Class.java:378)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.plugin.GodotPluginRegistry.loadPlugins(org.godotengine.godot.Godot) (GodotPluginRegistry.java:173)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.plugin.GodotPluginRegistry.<init>(org.godotengine.godot.Godot) (GodotPluginRegistry.java:71)
05-27 13:07:34.470: I/zygote64(22888):   at org.godotengine.godot.plugin.GodotPluginRegistry org.godotengine.godot.plugin.GodotPluginRegistry.initializePluginRegistry(org.godotengine.godot.Godot) (GodotPluginRegistry.java:103)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.Godot.onCreate(android.os.Bundle) (Godot.java:574)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7009)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7000)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1214)
05-27 13:07:34.470: I/zygote64(22888):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2731)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2856)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1589)
05-27 13:07:34.470: I/zygote64(22888):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
05-27 13:07:34.470: I/zygote64(22888):   at void android.os.Looper.loop() (Looper.java:164)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6494)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
05-27 13:07:34.470: I/zygote64(22888):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:438)
05-27 13:07:34.470: I/zygote64(22888):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807)
05-27 13:07:34.470: I/zygote64(22888): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.billingclient.api.PurchasesUpdatedListener" on path: DexPathList[[zip file "/data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/lib/arm64, /data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Class java.lang.Class.forName(java.lang.String) (Class.java:378)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.plugin.GodotPluginRegistry.loadPlugins(org.godotengine.godot.Godot) (GodotPluginRegistry.java:173)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.plugin.GodotPluginRegistry.<init>(org.godotengine.godot.Godot) (GodotPluginRegistry.java:71)
05-27 13:07:34.470: I/zygote64(22888):   at org.godotengine.godot.plugin.GodotPluginRegistry org.godotengine.godot.plugin.GodotPluginRegistry.initializePluginRegistry(org.godotengine.godot.Godot) (GodotPluginRegistry.java:103)
05-27 13:07:34.470: I/zygote64(22888):   at void org.godotengine.godot.Godot.onCreate(android.os.Bundle) (Godot.java:574)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7009)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7000)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1214)
05-27 13:07:34.470: I/zygote64(22888):   at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2731)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:2856)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1589)
05-27 13:07:34.470: I/zygote64(22888):   at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
05-27 13:07:34.470: I/zygote64(22888):   at void android.os.Looper.loop() (Looper.java:164)
05-27 13:07:34.470: I/zygote64(22888):   at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6494)
05-27 13:07:34.470: I/zygote64(22888):   at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
05-27 13:07:34.470: I/zygote64(22888):   at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:438)
05-27 13:07:34.470: I/zygote64(22888):   at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:807)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): Unable to load Godot plugin GodotPayment
05-27 13:07:34.475: W/GodotPluginRegistry(22888): java.lang.ClassNotFoundException: org.godotengine.godot.plugin.payment.GodotPayment
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.Class.classForName(Native Method)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.Class.forName(Class.java:453)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.Class.forName(Class.java:378)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at org.godotengine.godot.plugin.GodotPluginRegistry.loadPlugins(GodotPluginRegistry.java:173)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at org.godotengine.godot.plugin.GodotPluginRegistry.<init>(GodotPluginRegistry.java:71)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at org.godotengine.godot.plugin.GodotPluginRegistry.initializePluginRegistry(GodotPluginRegistry.java:103)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at org.godotengine.godot.Godot.onCreate(Godot.java:574)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.Activity.performCreate(Activity.java:7009)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.Activity.performCreate(Activity.java:7000)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.os.Handler.dispatchMessage(Handler.java:106)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.os.Looper.loop(Looper.java:164)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at android.app.ActivityThread.main(ActivityThread.java:6494)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.reflect.Method.invoke(Native Method)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): Caused by: java.lang.ClassNotFoundException: org.godotengine.godot.plugin.payment.GodotPayment
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.VMClassLoader.findLoadedClass(Native Method)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	... 20 more
05-27 13:07:34.475: W/GodotPluginRegistry(22888): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/billingclient/api/PurchasesUpdatedListener;
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	... 20 more
05-27 13:07:34.475: W/GodotPluginRegistry(22888): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.billingclient.api.PurchasesUpdatedListener" on path: DexPathList[[zip file "/data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/lib/arm64, /data/app/com.test-s1tfq_9jXDaeuohJv90BvQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-27 13:07:34.475: W/GodotPluginRegistry(22888): 	... 20 more

@volzhs have you recompiled your editor? You need to do this because the dependencies for the included Android plugins changed.

@timoschwarzer yes. I've always compiled both editor and template.

@volzhs just to be sure: have you re-installed your Android build template?

@timoschwarzer yeap. replaced new templates every time on custom directory path.

I just cloned the repository into a new directory (godot3). These are the steps I did and it worked just fine.
git clone https://github.com/godotengine/godot godot3
cd godot3
git checkout 757d8b56721f856e4bd5ec7f27b8bc619ddc2bca
scons platform=x11 bits=64 tools=yes target=release_debug -j 16
scons platform=android bits=64 target=release_debug android_arch=arm64v8 -j 16
scons platform=android bits=64 target=release android_arch=arm64v8 -j 16
scons platform=android bits=64 target=release_debug android_arch=armv7 -j 16
scons platform=android bits=64 target=release android_arch=armv7 -j 16
cd platform/android/java
./gradlew generateGodotTemplates
cd ../../../

# Copy all ZIP, APK and AAR files from ./bin to ~/.local/share/godot/templates/3.2.2.beta

./bin/godot.x11.opt.tools.64

Then I created a new project, clicked Project → Install Android Build Template and added a new main scene with the following script:
extends Node

func _ready():
	print(Engine.has_singleton('GodotPayment'))

After that I added an Android export template and checked 'Use custom build' and 'Plugins / Godot Payment'.

Finally I checked 'Debug → Deploy with Remote Debug' clicked the Android run button in the top right corner of the editor.
Result:

For some reason, your Gradle build does not include the Google Play Billing library, which leads to the error you're getting.

@timoschwarzer should I check Use custom build to use Godot payment plugin?

@volzhs You have to because Gradle won't fire up and install the dependencies. But yeah, this should be noted in the docs. I didn't have time to update the docs yet but I'll do that the next days. Thank you for reminding me to add a bold notice for that requirement!

I missed that initially, do we want to force uses to use a custom build to use GodotPayment? If so, it should not be exposed as a togglable plugin when "Use Custom Build" is off.
The alternative is to add the billing library in the base APK I guess? But that would force the BILLING permission on?

@akien-mga @timoschwarzer Unfortunately yes. It's either making the default Android templates include the BILLING permission in addition of the billing library, or requiring the use of custom build.
It's hard trade off because Use custom build is harder than the alternative, but we could argue that is the user is setting up billing, which does require configuration, than configuration the Android build tools should be a small ask.
If we end up requiring Use Custom Build for GodotPayment, we can decouple it completely (as now the code is still included in the default template) as a standalone plugin.
Do we have a hard date for the deprecation of the previous API, as it would simplify the decision?

I assume that users who use IAP will often want to use other Android plugins like ad providers or Google Play Services, so it's probably OK to make it conditional to doing a custom build.
But indeed, if this is the new requirement, then decoupling it completely from the one-click deploy APK would be good.

If so, it should not be exposed as a togglable plugin when "Use Custom Build" is off.

It's hard trade off because Use custom build is harder than the alternative, but we could argue that is the user is setting up billing, which does require configuration, than configuring the Android build tools should be a small ask.

If we end up requiring Use Custom Build for GodotPayment, we can decouple it completely

I agree to both of you. My proposal would be adding a field like requires_custom_build to PluginConfig in https://github.com/godotengine/godot/blob/3.2/platform/android/plugin/godot_plugin_config.h and disabling/hiding the checkbox in the project export dialog accordingly.

If we end up requiring Use Custom Build for GodotPayment, we can decouple it completely (as now the code is still included in the default template) as a standalone plugin.

If we decouple the plugin completely, maybe it's worth setting up a first-party Android plugins repository under the godotengine namespace with the same branching scheme as this repo. (master, 3.2 etc.)

I can connect store with GodotPayment by following all @timoschwarzer steps. thanks.
now I need to test rest of functions. like payment.querySkuDetails :)

I agree to both of you. My proposal would be adding a field like requires_custom_build to PluginConfig in https://github.com/godotengine/godot/blob/3.2/platform/android/plugin/godot_plugin_config.h, disabling/hiding the checkbox in the project export dialog accordingly.

@timoschwarzer All plugins asides from the built-ins (GodotPayment being the only one) require  that Use custom build be enabled, so that's already implicit.
Disabling/hiding the checkbox in the project export is not possible with the current implementation. I mulled adding the implementation for it, but decided to delay it since we were already in the beta phase, and that's kind of semi-large change if done right.
What we can do instead for now, especially if we go ahead with decoupling the GodotPayment plugin, is to add a warning at export time if a plugin is enabled but Use Custom Build is disabled.
See here for an example by @akien-mga

I've exported with use custom builds and godotpayment plugin.  Engine.has_singleton("GodotPayment") returns true,
but it gets stuck if I add setpurchasecallbackid.
This was working fine with GodoyPaymentsV3
Is there a guide somewhere on how to get this working with the new system?
if Engine.has_singleton("GodotPayment"):
    payment = Engine.get_singleton("GodotPayment")
    payment.setPurchaseCallbackId(get_instance_id())

@HEAVYPOLY not yet. I'll begin updating the example project today. Please take a look at "Example code using the new API" above or ping me on Discord/IRC if you need help :)

@akien-mga Where would be the best place for a migration guide for existing GodotPayments users?

Probably on the official docs. I think there's a page covering IAP, not sure how much details it has regarding the GodotPayments API but I guess it needs both an update + a section with a migration guide.

@timoschwarzer Since 3.2.2.stable is fast approaching, is this update to the GodotPayment plugin feature complete and stable enough for release with 3.2.2.stable?

@timoschwarzer cool!
I've pinged @akien-mga to discuss if we should move the plugin into its own repo prior to releasing 3.2.2.stable.
That would allow us to quickly address any issues encountered by users, as well as to quickly perform updates (e.g: Google Play Billing v3).

@m4gr3d makes sense IMO since it requires Custom Build anyways.

@m4gr3d @timoschwarzer Moving it to a separate repo makes sense, since we're breaking compatibility anyway we might as well go all the way. We should do this in coming days, I don't want to delay the 3.2.2-stable release too long. But we can take the time needed to do it right of course.

@akien-mga I expect the code migration process to be quick. I can perform the migration, we just need to agree on the new repo name and structure. @timoschwarzer Your input would also be appreciated :)
@timoschwarzer Once the code is migrated, you'll need to update the documentation accordingly (both godot docs, and the new repo's README).

Naming wise, I don't have a strong opinion, beyond using kebab-case, so maybe something like godotpayment-android-plugin?
Note that given the scope of the changes, if you think a different name would be better than GodotPayment, that's also an option.

@akien-mga @m4gr3d what about godot-google-billing as repo name and renaming the singleton to GoogleBilling? In my opinion GodotPayment doesn't make clear that it is Android only at first sight. And the new GodotPayment (this PR) it's more or less a plain wrapper around the Google Billing library.

@timoschwarzer sounds fine by me. It would have to be godot-google-play-billing and GooglePlayBilling though since this is how it's referred to in the documentation.

@m4gr3d yeah, Google Play Billing of course. (it's late here :sweat_smile:)

@timoschwarzer I've created the repo and sent you an invite. Feel free to start updating the repo description and README.
For the repo files updates, use pull requests so changes can be reviewed and we can ensure we're not stepping over each other.

Sounds good to me.
@m4gr3d Feel free to start the migration then. I think you should be able to create a new repo under the @godotengine org, if not, you can make it in your namespace and we'll see how to move it when I'm back online tomorrow :)

@m4gr3d @akien-mga Thank you! I'll work on that tomorrow. I'll create an additional PR in the main repository that removes the plugin from the tree.


migrate resolve: The migration could not be found

Bug description
Manually creating the folder "migrations" and a sub folder "whatever" and putting a "migration.sql" in it wont allow prisma migrate to resolve it.
How to reproduce

have a database with whatever data in it already on your enviroment and call npx prisma db pull to create a schema.
call npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > migration.sql
manually create a folder inside prisma's folder called "migrations" and another child folder called "initial"
drag the migration.sql file into "initial"
run npx prisma migrate status to see, prisma knows that folder exists "1 migration found"
run npx prisma migrate resolve --applied "initial"
get error "The migration initial could not be found"

Expected behavior
especting the "_prisma_migrations" table to be created on the db and populated with the first migration marked as applied.
Prisma information
schema was generated calling npx prisma db pull from the existing database
Environment & setup

OS: Windows-->
Database: Apache/2.4.38 (Debian) | 8.0.26 - MySQL Community Server - GPL
Node.js version: v14.18.3

Prisma Version
Environment variables loaded from .env
prisma                  : 4.2.0
@prisma/client          : 4.2.0
Current platform        : windows
Query Engine (Node-API) : libquery-engine 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Introspection Engine    : introspection-core 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Format Binary           : prisma-fmt 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Default Engines Hash    : 2920a97877e12e055c1333079b8d19cee7f33826
Studio                  : 0.469.0

I am having the same problem doing the squashing migration from the guide: How to create a clean history in a production environment.
I have done steps 1 to 3 successfully. However the guide fails at step 4 with an error:
Error: P3017

The migration<PHONE_NUMBER>00_squashed_migrations could not be found. Please make sure that the migration exists, and that you included the whole name of the directory. (example: "20201207184859_initial_migration")

error Command failed with exit code 1.

I made sure I did everything as in the official guide. I hope to find a solution to this problem here!

I cannot reproduce this. I started with two clean databases: database_a and database_b. Created a new Prisma project explicitly with version 4.2.0 used in this issue.
root@51a758d136a2:~/test/test-project# npx prisma --version
Environment variables loaded from .env
prisma                  : 4.2.0
@prisma/client          : Not found
Current platform        : debian-openssl-3.0.x
Query Engine (Node-API) : libquery-engine 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Migration Engine        : migration-engine-cli 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Introspection Engine    : introspection-core 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Format Binary           : prisma-fmt 2920a97877e12e055c1333079b8d19cee7f33826 (at<EMAIL_ADDRESS>Default Engines Hash    : 2920a97877e12e055c1333079b8d19cee7f33826
Studio                  : 0.469.0

Created manually a table in database_a:
create table test (id serial primary key, val int);

Pointed my new test project to database_a and ran npx prisma db pull, which created the following PSL:
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model test {
  id  Int  @id @default(autoincrement())
  val Int?
}

Next, I point my test project to database_b that is still empty, creating a new migration file:
root@51a758d136a2:~/test/test-project# npx prisma migrate diff --from-empty --to-schema-datamodel prisma/schema.prisma --script > migration.sql

root@51a758d136a2:~/test/test-project# cat migration.sql
-- CreateTable
CREATE TABLE "test" (
    "id" SERIAL NOT NULL,
    "val" INTEGER,

    CONSTRAINT "test_pkey" PRIMARY KEY ("id")
);

root@51a758d136a2:~/test/test-project# mkdir -p prisma/migrations/initial

root@51a758d136a2:~/test/test-project# mv migration.sql prisma/migrations/initial/

Following the reproduction:
root@51a758d136a2:~/test/test-project# npx prisma migrate status
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "new_db", schema "public" at "<IP_ADDRESS>:5432"

1 migration found in prisma/migrations

Following migration have not yet been applied:
initial

To apply migrations in development run prisma migrate dev.
To apply migrations in production run prisma migrate deploy.
The current database is not managed by Prisma Migrate.

If you want to keep the current database structure and data and create new migrations, baseline this database with the migration "initial":
prisma migrate resolve --applied "initial"

Read more about how to baseline an existing production database:
https://pris.ly/d/migrate-baseline

We have one migration, we can see that. Trying to resolve it:
root@51a758d136a2:~/test/test-project# npx prisma migrate resolve --applied "initial"
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "new_db", schema "public" at "<IP_ADDRESS>:5432"
Migration initial marked as applied.

The database has _prisma_migrations table and the migration called initial is marked as applied. What did I do differently here? Tests were run in a clean docker image, based on Ubuntu 22.04. Database is Postgres 15.

I am having the same issue. Followed the instructions in the docs for migration of a mysql database, but it returns "The migration init could not be found. Please make sure that the migration exists, and that you included the whole name of the directory.".

That is buggy and is being fixed right now @leonambeez . Use 0_init instead as the name for the baseline migration and it will work. Sorry for the confusion caused.

I tried again and it still returns the same error. To be sure, I created a new project and follow the tutorial step by step, creating a new database with the SQL schema provided in the tutorial.

It is happening with 0_init for me
The migration 0_init could not be found. Please make sure that the migration exists, and that you included the whole name of the directory. (example: "20201207184859_initial_migration")
as you can see in the screenshot - it is there

I am following this guide: https://www.prisma.io/docs/getting-started/setup-prisma/add-to-existing-project/relational-databases/baseline-your-database-typescript-postgres - with mysql and js thought

I have the same issue following guide exactly. My team is inheriting a database from a client and building a new front-end with prisma. Everything has worked well until this point. i tried changing name from 0_init to other names and it returns the same error of it not being able to find the migration directory specified.

if anyone find it useful, i did a pull request a few months ago "fixing" this issue: https://github.com/prisma/prisma/pull/14819

Hey everyone here, we have a related issue that could be relevant for some of you:
Are you on Windows and using PowerShell (e.g. via VS Code or IntelliJ) to create the migration file via migrate diff, and then it fails on migrate resolve --applied? Then this could be another case of this problem here: https://github.com/prisma/prisma/issues/17558#issuecomment-1410856229

I just had the exact same problem as the original author of the issue and I also tried all the suggestions above but nothing worked. I can however confirm that the last suggestion from @janpio worked for me. Likewise, I just opened the migration.sql file in Notepad++ and changed the Encoding to UTF-8. After that, running npx prisma migrate resolve --applied initial worked just fine.

@ruanswanepoel This resolve to me! I really appreciate! Thanks!!!!!

If you're using VsCode and your 0_init/migration.sql is in the wrong encoding you can:

Open the file 0_init/migration.sql
Press Ctrl+Shift+p
Type "Change File Encoding"
Select "Save With Encoding"
Select "UTF-8"

It works !

I tried had the same error tried the rebase the migration but still getting this error although the schema complete synced with the database:
Drift detected: Your database schema is not in sync with your migration history.
The following is a summary of the differences between the expected database schema given your migrations files, and the actual schema of the database.
It should be understood as the set of changes to get from the expected schema to the actual schema.

On Windows, using Powershell (which is the default in VS Code) using > foo.sql to pipe the output of a command (like for example migrate diff) creates a UTF-16 LE file instead of the expected UTF-8. In the latest release of Prisma CLI we added an option --output that can take a file name so you migrate diff ... --output foo.sql instead of using migrate diff ... > foo.sql. That should avoid the problem.

Just adding to this... I saw nowhere in the documentation that the migrations folder must be within the path of the schema file (I saw it in prisma's code here)
So if as in my case you are trying for example to keep an structure of multiple schemas in one "schemas" folder and then have the "migrations" folder at the same level of "schemas"... that's not currently possible as even with UTF-8 or using WSL to create the diff you'll always get the "The migration 0_init could not be found. Please make sure that the migration exists, and that you included the whole name of the directory." error.
So going from this:

schemas

whatever.prisma

migrations

0_init/migration.sql

To this:

schemas

whatever.prisma
migrations

0_init/migration.sql

Worked for me.

If you're using VsCode and your 0_init/migration.sql is in the wrong encoding you can:

Open the file 0_init/migration.sql
Press Ctrl+Shift+p
Type "Change File Encoding"
Select "Save With Encoding"
Select "UTF-8"

it's worked for me. thanks!

I ran into this issue on a failed migration.

prisma migrate resolve --applied <name>: fail
prisma migrate resolve --rolled-back <name>: success
prisma migrate resolve --applied <name>: still fail

Maybe I'm confused as to when migrate resolve --applied is supposed to be used, but this is really strange imo that --rolled-back worked but --applied doesn't.

Oh gosh , Ran into same problem but for my case it was my own antivirus which was preventing to access the migration  file from the terminal . finally resolved it


MTU changes done in pull #431 seems to cause breakage in other scripts(bgp_prefix_limit, route_installation)

Hi ,
The changes related to the MTU calculation that was done as part of the https://github.com/openconfig/featureprofiles/pull/431/files   seems to be causing other scripts (like bgp_prefix_limit, RT-1.2_route_installation) to fail at the mtu configuration .
Error log  from script :
nil>   0xc00142d5c0  0xc0001c8f50     []     0xc0013edbb0 0xc00142d5b0 out-of-range E_Interface_OperStatus enum value: 0 [] []  map[0:0xc001430a00] out-of-range E_VlanTypes_TPID_TYPES enum value: 0  ethernetCsmacd}) at path origin:"openconfig"  elem:{name:"interfaces"}  elem:{name:"interface"  key:{key:"name"  value:"et-0/0/5"}}  target:"dut": SetRequest unsuccessful: rpc error: code = Unknown desc = Value 14 is not within range (288..16000);
==================
#431
Diff that’s causing the breakage. MTU if not explicitly set in the caller, gets initialized to 0 and then the diff below causes it to be set to 14.
internal/attrs/attrs.go
if !*deviations.OmitL2MTU {
intf.Mtu = ygot.Uint16(a.MTU + 14)
}

#451 should fix this. Apologies for the bad change.


imie domains no longer active

imie domains are no longer active, with some warnings :

imie.fr and imie-nantes.fr shall not be used by anyone because these mailboxes are going deleted
imie-paris.fr is not the same entity and its management shall be done on separate requests

@sultan Thank you for the update! Pull request merged.


Feature/update fedora support

Replaces the fedora 35 build configuration/dependencies with that required for fedora 36

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/

Thanks for the comments @apolukhin. (And good point regarding grpc; I didnt like the broad 'absl_found' since it wasn't explicitly coupled with a grpc build (obviously; wasn't sure if it was a version related change or build option; thanks) I'll get on this soon

Looks good. I'll run some additional internal test on Monday and will merge the PR. Thanks for the great work!

Many thanks for the good PR!


Is there any option to read response in application Interceptor?

public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
Response response= chain.proceed(request);
/// read response and also it should available for developer to read again
return response;
}
I know calling .string(), as mentioned by @Greg Ennis consumes and closes the stream.

Easiest way to do this is to write the response to an okio.Buffer, and then re-create a new response from that buffer. If you want to read a buffer 2x, clone it.

Future questions like this should go on Stack Overflow. We want to reserve GitHub issues for bug reports and feature requests.


ci: use Actions for CI

This Pull Request adds GitHub Actions CI for running unit and integration tests.

Also, rm .travis.yml?


Create prototype

The first task here is to create a prototype of the "add-prefix" command. The stub of this command and its test is already there. The implementation should look for all

namespace declarations
use statements
fully qualified usages of class/interface/trait names

in a directory/file and add the passed prefix. Read the README to learn more. Probably we can use https://github.com/nikic/PHP-Parser to do the parsing, although I don't know whether it's possible to access the position of the parsed token in the file from the parser to do the actual string replacement (cc @nikic).
This should be fun :) This is available for grabs if anyone wants to give it a try.

Alternatively, nikic/php-ast could be used as the backend instead of nikic/PHP-Parser. That would require PHP 7 to work but would be future-proof.

Accessing the file position is possible, see https://github.com/nikic/PHP-Parser/blob/master/doc/component/Lexer.markdown#lexer-options. Assuming version 2 of the library, you need to create the parser using
$parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7, new Lexer([
    'usedAttributes' => [
         'docComment', 'startLine', 'endLine', 'startFilePos', 'endFilePos'
    ],
]));

and then access the position using $node->getAttribute('startFilePos') etc.
I combine this with a class that queues up modifications based on original offsets and then applies them all at once. (Doing it on the fly is a PITA because you need to track offset changes through the file).

@sebastianbergmann Can those tools be used for PHP 5 source code?

@nikic Perfect, thanks!

@webmozart Sure.

Hi,
@webmozart I'd love to give it try, currently working on a first implementation. Can we agree to use the version 2 of nikic/PHP-Parser, even if it's still in alpha ?
Thanks

@matthieuauger sure, whatever you think is best :)


Exclude SpannerChangeStream IT from Dataflow V1 postcommit

Please add a meaningful description for your change here

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @pabloem

LGTM

this is still included in V2 postcommit right?

this is still included in V2 postcommit right?

yes

thanks LGTM


Endianness in addresses and UUIDs

Since I am basing some functionalities on peer addresses and beacon UUIDs, I am struggling with incompatibilities of NimBLE against the older stack (and other vendors).
It seems all the addresses are reversed, which is not a huge issue per se since they are internally stored as 6-byte arrays, but perhaps this could be mentioned in the Breaking API changes document.
A larger problem, however, is connected with the UUIDs (so far I only noticed a problem with beacon uuids, service and characteristic ones work correctly).  Example output from the BLE_Beacon_Scanner.ino:
Scan done!
Found an iBeacon!
iBeacon Frame
             ID: 004C Major: 1 Minor: 1 UUID: f31a5871-9179-2a97-d84d-f63cc5dc5fc7 Power: -56

However, the broadcast was configured with the UUID in reverse order:
#define BEACON_UUID "c75fdcc5-3cf6-4dd8-972a-799171581af3"
Other tools such as nRF Connect report the correct UUID:

And the scanner based on Bluedroid also discovers it as c75fdcc5-3cf6-4dd8-972a-799171581af3, not the other way round.
The question is where it should be solved - the obvious location would be  void NimBLEBeacon::setData(const std::string &data) where the data is set directly with memcpy whereas other methods do perform ENDIAN_CHANGE_U16 on other fields. Although proximityUUID is never reversed, and it most probably should be.
However, I am wondering whether this could not be solved globally, any migration from bluedroid will need conversion of addresses, and even if that is relatively simple, keeping the data in little endian arrays is cumbersome in any debug display or string conversion.
As a side note, it seems strange to me that I have found only a single mention of the endianness issue in NimBLE docs.

It seems that reversing is supported in the getter for the proximityUUID, created #87 to use it.

Hi @lknop, thanks for pointing this out. Admittedly I have not tested the beacon code enough so this has gone unchecked for quite a while.
If I am understanding the issue correctly, when you log the beacon uuid it's showing it in little endian format, which is obviously not what we want to see on the console, but when you apply the proposed fix the uuid comparison fails?
My question then is, does the comparison of  NimBLEUUID("c75fdcc5-3cf6-4dd8-972a-799171581af3") == discoveredBeacon.getProximityUUID() work without #87 fix? I think it would since the created uuid is also reversed.
However that means the uuid is still reversed in the log, which could be dealt with separately.
You also mentioned the addresses, are you seeing them reversed as well? If so can you provide more detail?

I was just able to test this and I am unable to reproduce the issue, could you provide some example code for the beacon and scanner?

I advertise the beacon from hcitool:
sudo hcitool cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 C7 5F DC C5 3C F6 4D D8 97 2A 79 91 71 58 1A F3 00 01 00 01 C8
sudo hcitool cmd 0x08 0x000A 01

The console output I pasted in the original description is from the stock BLE_Beacon_Scanner.ino
I also test it via Beacon simulator android app which is configured like this:

And outputs the following in the console:
iBeacon Frame
ID: 004C Major: 0 Minor: 0 UUID: 4e93fb73-b9f3-949a-1548-62081e5d5b7f Power: -65

My question then is, does the comparison of NimBLEUUID("c75fdcc5-3cf6-4dd8-972a-799171581af3") == discoveredBeacon.getProximityUUID() work without #87 fix? I think it would since the created uuid is also reversed.

Yes in fact it does. I have first concentrated on the invalid logging and only then did I discover the comparison failing.

Regarding the addresses, when doing the rewrite of the onConnect callback, to get the same address representation I had to reverse the byte order. It seems that esp_bd_addr_t is big-endian and ble_addr_t.val is little-endian.
Compare the two snippets from the onConnect callback:

bluedroid version

void onConnect(BLEServer *pServer, esp_ble_gatts_cb_param_t *param)
{
    sprintf(
      remoteAddress,
      "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
      param->connect.remote_bda[0],
      param->connect.remote_bda[1],
      param->connect.remote_bda[2],
      param->connect.remote_bda[3],
      param->connect.remote_bda[4],
      param->connect.remote_bda[5]
    );
}

nimble version:

void onConnect(NimBLEServer *pServer, ble_gap_conn_desc *param)
{
  sprintf(
      remoteAddress,
      "%.2x%.2x%.2x%.2x%.2x%.2x",
      param->peer_ota_addr.val[5],
      param->peer_ota_addr.val[4],
      param->peer_ota_addr.val[3],
      param->peer_ota_addr.val[2],
      param->peer_ota_addr.val[1],
      param->peer_ota_addr.val[0]
    );
}

Thanks, I was able to reproduce the issue using the phone app as the beacon. I also used the BLE_Beacon_Scanner.ino with NimBLE and Bluedroid and the results are the same, both produce the uuid reversed.

My question then is, does the comparison of NimBLEUUID("c75fdcc5-3cf6-4dd8-972a-799171581af3") == discoveredBeacon.getProximityUUID() work without #87 fix? I think it would since the created uuid is also reversed.

Yes in fact it does. I have first concentrated on the invalid logging and only after forcing the reversal did I discover the comparison failing.

In this case we need to solve this in a way that satisfies comparisons and logging. I think the place to look is in the beacon code, since the issue happens with both NimBLE and Bluedroid and only with beacons, global changes elsewhere may cause more problems.
As for the address in the callback, yes it is reversed there as that is what NimBLE gives us, however you could use the NimBLEAddress constructor to make things easier depending on your use for it:
NimBLEAddress peerAddr(param->peer_ota_addr);

Thanks, I was able to reproduce the issue using the phone app as the beacon. I also used the BLE_Beacon_Scanner.ino with NimBLE and Bluedroid and the results are the same, both produce the uuid reversed.

I have also been testing this independently and you are right - this is a bug but it is present in bluedroid as well. I don't know why I thought I had tested it previously since I only got to uuid filtering after migration to nimble.

In this case we need to solve this in a way that satisfies comparisons and logging. I think the place to look is in the beacon code, since the issue happens with both NimBLE and Bluedroid and only with beacons, global changes elsewhere may cause more problems.
I concur.

As for the address in the callback, yes it is reversed there as that is what NimBLE gives us, however you could use the NimBLEAddress constructor to make things easier depending on your use for it:
`NimBLEAddress peerAddr(param->peer_ota_addr);

That's a very handy convenience class, didn't see it before, thanks.`

@lknop I just pushed a branch bugfix/beacon-uuid that i think solves the issue for both beacon and scanner as well as phone apps. If you could give it a try and let me know it would be appreciated.

I dont see changes, but only change you have to do is receiver/scanner side, not the sender.
Its due to endianess.

@h2zero it sort of does, but the effect is similar to my change, the comparison with manually contructed NimBLEUUID is false, one has to use the same workaround I did before - create another NimBLEBeacon and compare their proximityuuids:
if (discoveredBeacon.getProximityUUID() == compareBeacon.getProximityUUID()) {
    // the UUIDs match
}

The reason for this is that the following code:
Serial.println(NimBLEUUID("c75fdcc5-3cf6-4dd8-972a-799171581af3").toString().c_str());

results in
f31a5871-9179-2a97-d84d-f63cc5dc5fc7

I have also figured out why I did not notice the issue before, when using bluedroid I was not using BLEBeacon but printing the whole payload from the advertisement which is not reversed: "payload":"02011a1aff4c000215c75fdcc53cf64dd8972a799171581af300010001c8"

I dont see changes, but only change you have to do is receiver/scanner side, not the sender.
Its due to endianess.

@chegewara The reason I changed the sender is that for some reason when we get the uuid from the esp32 the endianess of the uuid is opposite of the phone apps. Not sure which is correct so this is just testing for now. For what it's worth bluedroid does the same thing, any thoughts on why it's different from phone apps?

the comparison with manually contructed NimBLEUUID is false
The reason for this is that the following code:
Serial.println(NimBLEUUID("c75fdcc5-3cf6-4dd8-972a-799171581af3").toString().c_str());
results in
f31a5871-9179-2a97-d84d-f63cc5dc5fc7

@lknop I do not see this in my testing, I wonder what you're doing different than me?

I just confirmed with a different app that the beacon/sender needs to be reversed as well as the scanner receiver.
The phone would not find the esp32 beacon until I reversed the uuid. So the scanner needs to reverse it as well to correct the data for our purposes.
With #87 applied and changing NimBLEBeacon::setProximityUUID to:
void NimBLEBeacon::setProximityUUID(const NimBLEUUID &uuid) {
    NimBLEUUID temp_uuid = uuid;
    temp_uuid.to128();
    std::reverse_copy(temp_uuid.getNative()->u128.value,
                      temp_uuid.getNative()->u128.value + 16,
                      m_beaconData.proximityUUID);
} // setProximityUUID

Everything seems to work as expected in my testing. However I'm confused why @lknop is getting reversed UUIDs from construction...

However I'm confused why @lknop is getting reversed UUIDs from construction...

I had an uncommited change from my previous experiments :facepalm:
I cleaned up my working copy, added the commit you described above to my PR and I will be testing it in a few hours.

Lol that would explain it, thought that might have been the case.
Hopefully everything works now.


Fix generate.sh

POSIX shells do not support brace expansion, so {,.} requires bash or so.

Hi @palmskog @Zimmi48
During the preparation of the README.md of the coqoban repo, I wanted to use your mustache-based generator; I had first proposed that PR to do a small improvement of the generate.sh script, then noticed that the shellcheck linter was still not happy with the current version of the script, so I cloned the repo, do a second commit and pushed... without noticing that I had pushed this commit directly in master, not in the fix-generate :-/
I'm sorry for that branch mistake… hopefully it did not cause too much harm.

So I propose to do a git revert of my commit and re-open another PR so that we can discuss that change?
sorry again :-/

Hi @palmskog, on second thought the commit I inadvertently pushed directly to master is very fine (except that I had replaced mustache with pystache, which won't work as is, due to the input format difference I mentioned here: https://github.com/coq-community/templates/issues/14#issuecomment-597227543 ), so maybe you could push yourself another commit directly to master that revert this program name to mustache?

@erikmd OK done

I've changed /bin/bash into /usr/bin/env bash which is more portable (/bin/bash doesn't exist on NixOS for instance).

OK thanks @Zimmi48


[Feature] Adding a scroll to the top button

Description
Provides a smooth scroll animation to the top
Button is fixed at the bottom right corner of the viewport
Screenshots
No response
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[X] I am a GSSoC'24 contributor.
[X] I want to work on this issue.

Code of Conduct

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

Hey @Durgesh-Vaigandla!
Can you please assign me this issue under GSSOC'24
Thank you

@Durgesh-Vaigandla please assign me this issue under gssoc'24


BUG: .loc with duplicated label may have incorrect index dtype

.loc result with duplicated keys may have incorred Index dtype.
import pandas as pd

ser = pd.Series([0.1, 0.2], index=pd.Index([1, 2], name='idx'))

# OK
ser.loc[[2, 2, 1]].index
# Int64Index([2, 2, 1], dtype='int64', name=u'idx')

# NG, Int64Index(dtype=object)
ser.loc[[3, 2, 3]].index
# Int64Index([3, 2, 3], dtype='object', name=u'idx')
ser.loc[[3, 2, 3, 'x']].index
# Int64Index([3, 2, 3, u'x'], dtype='object', name=u'idx')

idx = pd.date_range('2011-01-01', '2011-01-02', freq='D', name='idx')
ser = pd.Series([0.1, 0.2], index=idx, name='s')

# OK
ser.loc[[pd.Timestamp('2011-01-02'), pd.Timestamp('2011-01-02'), pd.Timestamp('2011-01-01')]].index
# DatetimeIndex(['2011-01-02', '2011-01-02', '2011-01-01'], dtype='datetime64[ns]', name=u'idx', freq=None)

# NG, ValueError
ser.loc[[pd.Timestamp('2011-01-03'), pd.Timestamp('2011-01-02'), pd.Timestamp('2011-01-03')]].index
# ValueError: Inferred frequency None from passed dates does not conform to passed frequency D

After the PR:
Above OK results are unchanged.
import pandas as pd
ser = pd.Series([0.1, 0.2], index=pd.Index([1, 2], name='idx'))

ser.loc[[3, 2, 3]].index
# Int64Index([3, 2, 3], dtype='int64', name=u'idx')
ser.loc[[3, 2, 3, 'x']].index
# Index([3, 2, 3, u'x'], dtype='object', name=u'idx')

idx = pd.date_range('2011-01-01', '2011-01-02', freq='D', name='idx')
ser = pd.Series([0.1, 0.2], index=idx, name='s')

ser.loc[[pd.Timestamp('2011-01-03'), pd.Timestamp('2011-01-02'), pd.Timestamp('2011-01-03')]].index
# DatetimeIndex(['2011-01-03', '2011-01-02', '2011-01-03'], dtype='datetime64[ns]', name=u'idx', freq=None)

Updated and now green.

@sinhrks can you update

@sinhrks yeh, prob requires some playing around to get this to work nicely. Like your separation of concerns though. We should document this prob at top of core/index.py

How about adding _infer_new as below?

_infer_new: The same as current _shallow_copy(infer=True). Always tries to infer correct type.
_shallow_copy: Remove infer kw. Always use the same type as the caller.

We can replace _shallow_copy by _get_attribute_dict + _simple_new completely, but I didn't do because using adding _get_attribute_dict is redundant / easy to be missed.

@sinhrks seems reasonable call it _shallow_copy_with_infer? to make the connection with _shallow_copy

@jreback OK, renamed. Also added general explanation about simple_new, shallow_copy and shallow_copy_with_infer. Could you check?

thanks @sinhrks and nice docs!


adding api_key command line argument for llama_ccp

this allows you to use instructlab command line arguments just like this
ilab model serve --api-key seantoken

specifically this is just for llama.ccp and just does a pass through to their native --api-key to force authentication.  This allows people to use instructlab with some level of security and showcase demos with an api key rather than leaving it wide open.  I have tested this with a G6 AWS service running instructlab and got it working
Here is an example:
➜  ~ curl -X 'POST' \
  'http://<IP_ADDRESS>:8000/v1/completions' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer seantoken' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "\n\n### Instructions:\nWhat is the capital of France?\n\n### Response:\n",
  "stop": [
    "\n",
    "###"
  ]
}'

{"id":"cmpl-26ac8114-947f-4e4a-969f-c2329c384f65","object":"text_completion","created":1731016999,"model":"/home/ec2-user/.cache/instructlab/models/merlinite-7b-lab-Q4_K_M.gguf","choices":[{"text":"Paris. The capital of France is Paris, which is known for its rich","index":0,"logprobs":null,"finish_reason":"length"}],"usage":{"prompt_tokens":21,"completion_tokens":16,"total_tokens":37}}%

now the token works, but if I pass a bad token I will get Invalid API key
➜  ~ curl -X 'POST' \
  'http://<IP_ADDRESS>:8000/v1/completions' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer seasdfantoken' \
  -H 'Content-Type: application/json' \
  -d '{
  "prompt": "\n\n### Instructions:\nWhat is the capital of France?\n\n### Response:\n",
  "stop": [
    "\n",
    "###"
  ]
}'

{"detail":"Invalid API key"}%

Checklist:

[ ] Commit Message Formatting: Commit titles and messages follow guidelines in the
conventional commits.
[ ] Changelog updated with breaking and/or notable changes for the next minor release.
[ ] Documentation has been updated, if necessary.
[ ] Unit tests have been added, if necessary.
[ ] Functional tests have been added, if necessary.
[ ] E2E Workflow tests have been added, if necessary.

recheck

DCO signoff needs to be fixed before CI can run


smaller section style

this PR provides an optional smaller style for sections

Instead of adding an entirely different view, please add a compact() method and isCompact() getter to our existing Section and just merge classes conditionally.


Event Calendar

Adding a editable Calendar for SL/TL to set dates for training and FTX/OPS with the option for troopers to notify if they will be able to attend

Whats taking so long? Do what I did back in college. Drink coffee, play a round of csgo, do code/work, then repeat!

@LaocheXe you can bug people about taking a long time once you have done more work than them.

@Soysauce your right..... and wrong? I think I've done more work in the 501st with all the batch files, custom php scripts, websites, forms, etc, etc, Also was Company Adjutant, while doing my Master's Degree in IT security and assurance.
Now when it comes to this, I've hardly scratch the surface on the Data Core - Yeeeeeeee ok im off my soap box, any one want some body wash?


Dragging a form bar locks up the app

I tried dragging a form bar when in config mode and the app locks up. Only remedy is to leave the app.
Message in the console: Error: Invalid Arity: 0

Thanks for pointing this out. The site was running on an outdated version from before that bug was fixed. Should be fixed now!


GH: confusing behaviour of expand speckle object

I suspect we can improve current logic so that when just renaming a key, we don't need to create a new one when expanding. The case can be handled if input port count == output port count.

So... I'm not sure about this one. The reason it works this way is precisely to prevent the connections from shuffling, but at the same time preventing connections from disappearing without control. Since the Expand node has no knowledge of this rename process, it has to figure out if an input has been renamed by itself.
We used to rename the outputs, but this lead to cables being re-wired by grasshopper to incorrect outputs and random exceptions when cables where disconnected.
As far as I can tell, this renaming behaviour can only happen one input at a time, so the actual case would be closer to handling input port count == output port countand only one input name has changed.
I'll do some tests to see if this is viable.


AR Time Complexity?

Great results! :) I have a question though about complexity
In section 3.1, you provide three issues with autoregressive transformer models. The third says that an autoregressive transformer generating n^2 tokens will take n^6 time. In your Appendix you show this by assuming that for each token i the attentions with the previous (i-1)^2 tokens need to be computed, which takes O(i^2), so the total time is the sum of i=1 to n^2 of i^2 which is O(n^6).
However, in practice we cache the intermediate representations for each token during autoregressive sampling. See here for an explanation. This means for each i we reuse the attentions that were computed for the preceding (i-1) tokens, and so only have to compute attentions with the ith token and each of the previous tokens, which takes O(i) time. Therefore the sum is i=1 to n^2 of i which is O(i^4), the same as the result that you report for your method.
Please let me know if for some reason the caching trick doesn't apply to the AR methods you're comparing against, or if your method can also benefit from caching in that way to speed up generation!

Thanks @isaacrob. AR's inference optimization like the caching you mentioned or speculate decoding will improve both AR and VAR models. In 3.1 we focus on the plain decoding processes, just for giving a more intuitive sense of the speedup by VAR's parallel decoding and small number of iterations.

Thanks for the response!
Does caching reduce the complexity of VAR? It seems like your largest scale has O(n^2) tokens so any attention would take at minimum O(n^4).

@isaacrob yeah, i find it's true that the complexity order hasn't been reduced. However it is important to note that the complexity only reflects the total amount of computation, ignoring whether the computations can be parallelized or have to be sequential.
In our tests with caching, the wall-clock cost of VAR was at least an order of magnitude lower than AR's. In other words, even although both have a total complexity of O(n^4), AR's computations are highly sequential, resulting in lower practical efficiency.

I understand that complexity doesn't necessarily map to clock time, I just was surprised that you claimed a complexity improvement in the paper when it looked like both should be O(n^4) for real-world implementations of transformers.
So just to make sure I'm understanding, it sounds like both are O(n^4) but you still argue for a speedup due to parallel decoding vs sequential decoding. Is this because each resolution is embedded via a transformer encoder as opposed to a transformer decoder? And the autoregressive statement is because, even though each individual scale is not autoregressive, the model as a whole is autoregressive because the transformer encoder for each resolution is conditioned on the embedding from the previous?

Basically yes, but I prefer to say it's more like a transformer decoder, just like those non-autoregressive or n-tokens-one-pass language models.


[KO] Translation of Function lesson

related to #201.
just pruned branches :)

Since there were some branch-related troubles with PR #361.


(feat) Support for NoProxy ApiGateway

:tada: This PR is included in version 1.11.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


The Gradle Artifactory plugin looks for the Artifactory connection details only in the root project

Describe the bug
The artifactoryPublish task doesn't publish the Build Info.
According to @yahavi:
"The Gradle Artifactory plugin looks for the Artifactory connection details only in the root project. I managed to make it works when moving some of the configuration to the root build.gradle file"
To Reproduce
Build this sample project:
https://github.com/rwinch/artifactory-deploy-sample
Expected behavior
The build should publish Build Info.
Versions
Latest client and Artifactory.

Spring Security is having this problem. Is there a workaround for this?
Our root project is not a Java project and is not published, so as far as I understand it we cannot really move the configurations to the root project short of restructuring our Gradle build to have something that is published in our Gradle root project (which is not a viable option).
If you can help find a workaround with the simple project that I've provided (without changing the root project to be a published Java project), then we could apply the same workaround to Spring Security.


[Discussion] Problems with ffmpeg (Windows 10)

Hi, I'm having trouble working with the spleeter. I am currently using Windows 10 and pip.
I have already followed the steps suggested in the following questions:
https://github.com/deezer/spleeter/issues/666
https://github.com/deezer/spleeter/issues/546
https://github.com/deezer/spleeter/issues/456
I've installed and uninstalled all possible files, all libraries and still get error messages.
I've already followed this tutorial: https://www.wikihow.com/Install-FFmpeg-on-Windows
And these:
https://www.youtube.com/watch?v=qjtmgCb8NcE&t=359s
https://www.youtube.com/watch?v=qjtmgCb8NcE
Here are my attempts:
On Jupyter Notebook:

In cmd:

Checking if ffmpeg is installed:

Checking the ffmpeg in the environment variables:

I really don't know what I'm doing wrong. It should probably be something basic, but it's my first time working with this library.
I apologize for asking, but if anyone has any ideas that might help me, I appreciate it!

I put ffmpeg to C:\ffmpeg\bin and added it to PATH and Spleeter won't still work.

I come back. It seems not spleeter mistake. Instead, it may be Python's.
我回来了，这似乎不是spleeter的错误，相反，这可能是Python的。
The step of checking whether it exists or not uses this expression:
检查它是否存在的那一步使用的是下面的这个表达式：

My python's version is 3.7.5, this mistake may be fixed in later version.
我的Python版本是3.7.5，这个错误可能在后面的版本已经被修复了。

def which(cmd, mode=os.F_OK | os.X_OK, path=None):
    # Skip some line
    def _access_check(fn, mode):
        return (os.path.exists(fn) and os.access(fn, mode) # Important ! It just check if it exists on your PC,
                and not os.path.isdir(fn)) # you have the access to it and it isn't a dir.

它只检查它 存在你的电脑上、你有使用权并且那不是一个文件夹

Anyhow, the way, which I mentioned above this, is useful when the "which" function don't work well.
不管怎么说，我在上一条评论里提到的解决方案在which函数有问题时是有用的。
This is the output after I put the models in the right place:
这是我把模型放在正确位置后的输出：

Yes, it works well.
没错，它能正常运行了。

I executed it on power shell command prompt. and then it worked. wow


Where is? Statsample::Regression::Binomial::Logit

Hi guys,
On readme you mention Statsample::Regression::Binomial::Logit. Where is it?
Just installed the gem and seems that the source code doesnt exist anymore.

use gem statsample-glm


[Snyk] Security upgrade requests from 2.31.0 to 2.32.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

requirements.txt

⚠ Warning
robotframework-seleniumlibrary 6.3.0 requires selenium, which is not installed.
robotframework-requests 0.9.7 requires requests, which is not installed.

Vulnerabilities that will be fixed
By pinning:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

566/1000  Why? Recently disclosed, Has a fix available, CVSS 5.6
Always-Incorrect Control Flow Implementation SNYK-PYTHON-REQUESTS-6928867
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Note: This is a default PR template raised by Snyk. Find out more about how you can customise Snyk PRs in our documentation.
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

coverage: 100.0%. remained the same
when pulling 28283d4fe6581a85baf254aa56378038abcc4afe on snyk-fix-12447f52ed86c2de82c3115143849aa3
into 2ca613acabb2ff8406a38047c071a1ab48602a2d on master.


bad materialboxed image size when in a card

I wanted to use something like that:

It doesn't work. When I click on the image, the image box is "inside" the card and I see only the part of the image that is inside the limit of the card like here:

Please search closed issues


rename_labels: confusion between target and source

Process ID: rename_labels
Describe the issue:
The definition states:

If the dimension labels are not enumerated and the target parameter is not specified, the LabelsNotEnumerated exception is thrown.

Similarly later, by the information about the target parameter:

The dimension labels in the data cube are expected to be enumerated if the parameter target is not specified.

I fail to understand this. Firstly, target is a required parameter. Secondly, one would expect that  source is necessary if the labels are not enumerated and if not, the error would make sense.
Proposed solution:
Perhaps source was meant in both cases.

Thanks for bringing this up. Indeed, source was meant in both cases.

Fixed in https://github.com/Open-EO/openeo-processes/commit/f12ffb2a0a14f1aa45f452d615af2aa39ce4eef2


SimulatedBroker Issue

I have noted that the ABC class Broker contains an abstract method named 'get_portfolio_total_non_cash_equity' that is not contemplated in the subclass SimulatedBroker(Broker), however, the Exception NotImplementedError is not raised. Does anybody know the reason?

Thanks,
These methods were found to be superfluous and have been removed in QSTrader 0.2.6


Fixed width support.

Adds Relation, LineReader and BulkReader traits to avoid duplicated code. Largely derived from https://github.com/quartethealth/spark-csv and https://github.com/quartethealth/spark-fixedwidth.
This is in response to the following PR (created by @blrnw3) being closed without a merge:
https://github.com/databricks/spark-csv/pull/259
A fixed-width parser is a very common use case that I think several users would enjoy using. We plan to use this in our current production environment.

Nice job

If I understood correctly, this library now avoids to add new features but only accepts a critical bug fixes. How about proposing this into Spark?

I hadn't realized that. This is disappointing.
I'll see if I can get this proposed to the spark readers though.

Hi, Is fixed width csv still not supported in spark / databricks for csv parsing?  thanks

@kurtmaile this repository is on maintenance mode and does not accept new features. All new feature development should be directed to Apache Spark CSV data source implementation.

Sure thanks.
So with regards to my general question on csv parsing in spark, do you know
of a spark fixed width csv parser feature in the spark data soruce
implementation?
Cheers
On 14 June 2018 at 02:27, Hossein Falaki<EMAIL_ADDRESS>wrote:

@kurtmaile https://github.com/kurtmaile this repository is on
maintenance mode and does not accept new features. All new feature
development should be directed to Apache Spark CSV data source
implementation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/databricks/spark-csv/pull/391#issuecomment-397137855,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATIvhXJPPFY-BqfoNiqezUBMmzB9sZWdks5t8bv-gaJpZM4Ki7M4
.


[main_0.22] Bumping FluentUI Apple version to 0.22.1

Platforms Impacted

[x] iOS
[ ] macOS

Description of changes
iOS:

Fixing view cut off in Popup Menu Controller (#1893)

Pull request checklist
This PR has considered:

[ ] Light and Dark appearances
[ ] iOS supported versions (all major versions greater than or equal current target deployment version)
[ ] VoiceOver and Keyboard Accessibility
[ ] Internationalization and Right to Left layouts
[ ] Different resolutions (1x, 2x, 3x)
[ ] Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
[ ] iPad Pointer interaction
[ ] SwiftUI consumption (validation or new demo scenarios needed)
[ ] Objective-C exposure (provide it only if needed)

Microsoft Reviewers: Open in CodeFlow

Closing because I pushed from the wrong branch


Added nickel.rs example

I believe the build issues are caused by a bug in the latest Cargo nightly. They have nothing to do with these changes and they pass on other platforms.
Otherwise, this looks fine. Thanks for your contribution!


Unable to connect to frontend 0.42.0/0.42.1/0.42.2 with ssl enabled

Home Assistant release (hass --version):
0.42.0
0.42.1
0.42.2
Python release (python3 --version):
Python 3.5.3
Description of problem:
Unable to login frontend when SSL is enabled (both Self-signed and Letsencrypt)
INFO:homeassistant.components.http:Serving /states to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
INFO:homeassistant.components.http:Serving /api/websocket to <IP_ADDRESS> (auth: False)
And it gives message: Unable to connect
Additional info:
MacOS 10.11.6
0.41.0 - works fine with both certificates.
0.42.2 - works with ssl disabled

Same issue here...

Same for me with v42.2 and LetsEncrypt certs
Python 3.5.1
MacOS 10.12.4
Please let me know if you need more details.
Thanks

Same here, can't connect, same exact setup.

Looks like 0.42.3 still has this issue as well.  I can confirm disabling ssl works.
Python 2.7.13
hass 0.42.3

For my it work with LetsEncrypt certs and python34

Still the same problem with 0.42.4 can't login with browser (OS X Safari, OS X Chrome, iOS Safari, iOS Chrome) and also with the new iOS app.
"Unable to connect"
Back to ver. 0.41 👎

Same issue here, 0.43.0

@XtracT & others -- check https://community.home-assistant.io/t/homeassistant-nginx-ssl-proxy-setup/53/35 as your answer is likely in this thread.

I'm not going through Nginx, so that thread doesn't help me. Now running 0.43.1 with the same problem. This is the blog post I used to setup the secure connection to HASS: https://home-assistant.io/blog/2015/12/13/setup-encryption-using-lets-encrypt/ - worked fine in 0.41.0

Same issue here, running 0.43.2 - I used the raspberry pi all in one installer, can anyone tell me how to downgrade to an earlier version?

Hi all,
I can confirm that it's working with v0.48.1 (haven't updated to v0.49 yet).
Thanks for fixing it :-)

I have this problem and i have version v0.52.1

Same issue v0.62.1

@addisonlynch your issue seems to be unrelated, Can you let us know what certs you areusing and what you have in your base_url config (anonymized of course)


All cancel buttons in the app are now black instead of Blue before.
To Reproduce
Steps to reproduce the behavior:

Open Picker
Click on not visible "cancel"

Expected behavior
dont change color of cancel button
Environment (please complete the following information):

Device: [e.g. alle iPhones]
OS: [ iOS 13.1.2]
Xcode Version [11.1]
Swift Version [ 5]

Installation Type

Cocoapods

OK found this in you code:
//If user has not customized the Nav Bar tintColor, then use black.
```
if UINavigationBar.appearance().tintColor == nil {
UINavigationBar.appearance().tintColor  = .black
}

i think this is the "Problem".
Why do you change it global?

Fixed https://github.com/Yummypets/YPImagePicker/commit/6839864da946f9baa73fc1de5d4cdd9035ab5ab4


Since the last update skip_glob seems broken

.isort.cfg
[settings]
skip_glob=.local,**/migrations/**,**/node_modules/**,**/node-forge/**

isort --recursive ./.isort.cfg .'
Fixing /opt/books/migrations/0012_book_color.py
Fixing /opt/books/migrations/0005_auto_20180710_1351.py
Fixing /opt/books/migrations/0004_auto_20180709_1604.py
Fixing /opt/books/migrations/0007_auto_20180917_0921.py
Fixing /opt/books/migrations/0006_auto_20180716_1239.py
Fixing /opt/books/migrations/0010_auto_20181129_1058.py
Fixing /opt/books/migrations/0009_auto_20181122_1055.py
Fixing /opt/books/migrations/0011_auto_20181206_1459.py
Fixing /opt/qrcode/migrations/0002_plainqrcode.py
Fixing /opt/qrcode/migrations/0004_auto_20181130_1721.py
Fixing /opt/qrcode/migrations/0001_initial.py
Fixing /opt/qrcode/migrations/0003_auto_20181130_0958.py
Fixing /opt/recipes/migrations/0030_auto_20181031_1323.py
Fixing /opt/recipes/migrations/0036_auto_20181122_1055.py
Fixing /opt/recipes/migrations/0045_pack_dominant_color.py
Fixing /opt/recipes/migrations/0043_auto_20190208_1029.py
Fixing /opt/recipes/migrations/0029_pack.py
Fixing /opt/recipes/migrations/0031_auto_20181102_1342.py
Fixing /opt/recipes/migrations/0001_initial.py
Fixing /opt/recipes/migrations/0044_auto_20190218_1533.py
Fixing /opt/recipes/migrations/0037_auto_20181205_1647.py
Fixing /opt/recipes/migrations/0018_auto_20180716_1239.py
Fixing /opt/recipes/migrations/0026_auto_20181005_1152.py
Fixing /opt/recipes/migrations/0027_auto_20181008_1251.py
Fixing /opt/stories/migrations/0009_auto_20181122_1055.py
Fixing /opt/users/migrations/0014_auto_20180830_0835.py
Fixing /opt/users/migrations/0016_auto_20181102_1342.py
Fixing /opt/users/migrations/0017_auto_20181122_1055.py
Fixing /opt/users/migrations/0017_notificationbatchlog.py
Fixing /opt/users/migrations/0012_user_profile_picture.py
Fixing /opt/videos/migrations/0003_auto_20181122_1055.py
Fixing /opt/videos/migrations/0001_initial.py

Seems fixed.