Tweetest Prep work for jenkins tests

👾 Description of the issue
We run external third-party application tests at this project.  They are contained within the external directory.  We would like to improve how we run these tests.  The first step to improving how we run them is to add some documentation and to pull out the individual test properties that we use so that they are stored in the same directory as the test.
This issue is to add a README.md and a test.properties file to the /external/jenkins test directory.  As part of this prep work, since we already generate the Dockerfile, please also remove the static https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/jenkins/dockerfile/Dockerfile.  Note that there is an environment variable defined at https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/jenkins/dockerfile/Dockerfile#L41.  This should be added to the test.properties file, something like environment_variable="-Dfile.encoding=UTF8"
The contents of the README file can be simply some instructions for how to run the test locally.  Use with the instructions from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/README.md#running-external-tests-locally and modify Steps 7 and 9 to reference jenkins and jenkins_test specifically.
The contents of the test.properties file will be a key=value format, copying the information from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/common_functions.sh#L254-L266 to populate it.
Adding these files will not change the current way we run these tests.  A separate change will be made to reference the test.properties file, at which point the contents must match those in the common_functions.sh script.
Please take the time to try and run the test locally (using the instructions you are adding in the README file).  Some of the external tests are failing.  When you run it locally, you may find that to be the case.  The reviewer can help to advise you if there are any further steps you can take to try and debug the pre-existing failure, if it exists.
📋 Step by Step
To solve this issue and contribute a fix you should check the following step-by-step list. A more detailed documentation of the workflow can be found here.  Note: that you do not need to add yourself to a Contributors.md file as outlined in the detailed instructions.

[ ] Claim this issue: Comment below.
[ ]  Fork the repository in github by simply clicking the 'fork' button.
[ ]  Check out the forked repository
[ ]  Create a feature branch for the issue. We do not have any naming definition for branches.
[ ]  Commit your changes.
[ ]  Start a Pull Request.
[ ]  Done 👍 Ask in comments for a review :)
[ ]  If the reviewer find some missing pieces or a problem they will start a discussion with you and describe the next steps how the problem can be solved.
[ ]  You did it 🎉 We will merge the fix in the master branch.
[ ]  Thanks, thanks, thanks for being part of this project as an open source contributor ❤

🤔❓ Questions
If you have any questions just ask us directly in this issue by adding a comment. You can join our community chat at Slack. Next to this you can find a general manual about open source contributions here.

Hi, I would like to work on this issue, please assign this one to me. Thanks!

Can I take this issue to work on please ? @smlambert

@smlambert Done


Cannot Create New Dockerfile using mediamtx as Base Image

Which version are you using?
v0.0.0
Which operating system are you using?

[ ] Linux amd64 standard
[ ] Linux amd64 Docker
[ ] Linux arm64 standard
[ ] Linux arm64 Docker
[ ] Linux arm7 standard
[ x] Linux arm7 Docker
[ ] Linux arm6 standard
[ ] Linux arm6 Docker
[ ] Windows amd64 standard
[ ] Windows amd64 Docker (WSL backend)
[ ] macOS amd64 standard
[ x] macOS amd64 Docker
[ ] Other (please describe)

Describe the issue
Description
I am trying to create a new Dockerfile using this image as base. When I do so and try to run the build, I get an error:
ERR: yaml: control characters are not allowed. This happens on both my mac m1 and a colleague's Linux machine.
Describe how to replicate the issue
Dockerfile:

COPY ./mediamtx.yml mediamtx.yml

EXPOSE 8554

CMD ["/mediamtx"]```

mediamt.yml:
```---
protocols: [tcp]
paths:
  all:
    source: publisher

Build the image:
docker build -t rtsp:local /path/to/dockerfile
Run the image:
docker run --rm -it -p 8554:8554  rtsp:local
It is at this step that I get the error and get no logs.

start the server
publish with ...
read with ...

Did you attach the server logs?

no
Did you attach a network dump?

no
Inspection of the image:
[
    {
        "Id": "sha256:582e842fd4c2dd8787d19873528cb4adfcc8352a2b64f35b3accdf60d2e554c7",
        "RepoTags": [
            "rtsp:local"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-08-05T16:35:12.200837723Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8554/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/mediamtx"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": [
                "/mediamtx"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "arm64",
        "Os": "linux",
        "Size": 57866717,
        "VirtualSize": 57866717,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/2slmarrd3nm1cfwnmubckg8gk/diff:/var/lib/docker/overlay2/r4qvgmgc95xxdy1r8wcup94vu/diff:/var/lib/docker/overlay2/b2acb90da66a36f29d35e5624a9b6d155a6f6ebd31abc836dbb45067d0226511/diff",
                "MergedDir": "/var/lib/docker/overlay2/n7yr1n8j7wub3e6zftrefptnx/merged",
                "UpperDir": "/var/lib/docker/overlay2/n7yr1n8j7wub3e6zftrefptnx/diff",
                "WorkDir": "/var/lib/docker/overlay2/n7yr1n8j7wub3e6zftrefptnx/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:03fdd8d34f8e2c28f71840308e122f9c6670c0881a6f57a06705525deec1fc07",
                "sha256:c3171d0f9ec1c653025443618c953cf7008752e0e8ea9333e6c1a8c7f528e871",
                "sha256:af8bb22e98125cd783651115848422c023ea3f80c611f03a6a64e774ab3955d6",
                "sha256:e85dc4b28e54f60d5976ecedcde11e50ec8f6ade2527d8d47a27e59a5350f390"
            ]
        },
        "Metadata": {
            "LastTagTime": "2024-08-05T16:35:12.265953363Z"
        }
    }
]```

Hello, error "yaml: control characters are not allowed" has nothing to do with Docker, but it's related to the content of the configuration file. The configuration file you posted:
---
protocols: [tcp]
paths:
  all:
    source: publisher

Is perfectly valid. Therefore, the one in use is surely different. Check the configuration file and make sure that there are no syntax error there.


SourceKit: fallback to just built clang-cl

SourceKit uses libdispatch for concurrency.  Unfortunately, libdispatch
requires clang due to extensions.  Switch to clang-cl or clang as
appropriate when building with a non-clang based host compiler.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please smoke test and merge

@swift-ci please smoke test and merge


Reports of drug search not working on mobile phones

I suspect it's the AJAX loading of possible search results, which starts from 3 characters; by typing some random sequences I've quickly found one that loads about 45Kb (res).
It wouldn't surprise me if our label-loading library and/or client-side JSON parsing might slow down some phones a lot.
Worth doing some tests and code-reading to check this hypothesis. If it it looks likely, some fixes might be:

Only stem on the starts of words (i.e. res* rather than *res*)
Start searching on 4 characters

Longer term I think we need to rethink the drug-name search interface, so quick fixes are most appropriate  now.

Right, 45Kb isn't large - my hypothesis is that sometimes it may be much larger, sorry not to be clearer!

Given you've tested this, I'm happy to close until we get a better report.


 The failures looked like flakes–– will investigate more if they fail again.

Fixing locally...

@paulb777 @andrewheard –– the remaining CI failure look unrelated to this change. WDYT?

Agreed, looks like a flake

Agreed, looks like a flake

thanks 👍
I just pushed a remaining commit for the changelog. This is ready for a final pass @paulb777 @andrewheard

These are passing locally for me on Xcode 13.4.1. GCDWebServer fails to link on Xcode 14.3 for what seems like a (pre-existing) known issue.


Support abort signal in iterator.all()

Currently there is no good way to abort a iterator.all() call. Would be nice if the api could support AbortController.

If your all() call is a long-running operation (getting many entries) it might not be the best method to use. For that same reason, all() currently uses nextv() under the hood, rather than a dedicated and optimized C++ method for all(). Because I assumed that the iterator typically just needs a few nextv() calls to get all entries. That does gives us a way to abort, in between nextv() calls, but I'm not sure that fits your use case.
Assuming that we did have such a dedicated method, let's say iterator_all() - how would we cancel the async work in C++?

https://github.com/Level/abstract-level/pull/55

Done in 2.0.0.


Extend Retrofit & Freezed Serialization with Custom fromJson for Generic Types

Is your feature request related to a problem? Please describe.
Yes, when using Retrofit along with Freezed in Flutter, I am facing a challenge with handling generic types in my API response model. Specifically, I am unable to provide a custom fromJson method for a generic type when deserializing the JSON response. This becomes a bottleneck when trying to automate the serialization/deserialization process for various data models.
// Example of the API response model
@Freezed(genericArgumentFactories: true)
class ApiResponseModel<T> with _$ApiResponseModel<T> {
  const factory ApiResponseModel({
    @JsonKey(name: 'data') T? data,
  }) = _ApiResponseModel<T>;

  factory ApiResponseModel.fromJson(Map<String, dynamic> json, T Function(Object? json) fromJsonT) =>
      _$ApiResponseModelFromJson(json, fromJsonT);
}

Describe the solution you'd like
I would appreciate an option in Retrofit to specify a custom fromJson method for generic types on a per-method basis. This could be done by introducing a new annotation that can be used alongside @GET, @POST, etc., to specify the fromJson function for the generic type.
// Desired usage with Retrofit
@RestApi()
abstract class MyApi {
  @POST('/endpoint')
  @JsonFunc(fromJsonFunc: myCustomFromJson)
  Future<ApiResponseModel<MyModel>> fetchData();
  ...
}

Describe alternatives you've considered
I have considered creating custom converters for each data type, but this approach is not scalable and leads to a lot of boilerplate code. Also, I tried using mixins and factory constructors, but these solutions do not integrate well with Retrofit and Freezed, and make the code more complex.
Additional context
Handling generic types efficiently is crucial for reducing boilerplate and making the code more maintainable, especially in larger projects with many data models and API endpoints. Providing a way to specify the fromJson method on a per-method basis would allow for greater flexibility and ease of use when working with Retrofit and Freezed in Flutter projects.

I do understand that you want to find a flexible way to do the serialization/deserialization.  What I am confusing is that each toJson method  is implemented by yourself.  Did it not meet your requirement if you just give a customized implementation for special cases.

Yes, I fully understand that each fromJson method is implemented by ourselves. However, the core issue here is that with the current approach, if we have a multitude of typed requests, we would need to create separate models and fromJson implementations for each. This will lead to a significant increase in boilerplate code, which violates the DRY (Don't Repeat Yourself) principle and makes code maintenance and extension more challenging in the future.
For instance, if we have dozens or even hundreds of different data types that could be returned through the API, we would have to create and maintain dozens or hundreds of different models and fromJson methods. This can quickly become impractical, especially in larger projects with numerous API endpoints and data types.
What I am proposing is a more flexible and scalable approach that would allow us to define a general fromJson method for handling generic types in our API response model, and then override this method on a per-method basis if specialized serialization/deserialization logic is required. This would reduce the amount of boilerplate code, simplify maintenance, and improve code reusability, which is a key aspect of effective programming.
My goal is to maximize code reuse and minimize duplication, creating a cleaner, more manageable, and extensible architecture. The utilization of Retrofit alongside Freezed in Flutter can be significantly enhanced by introducing the ability to specify a custom fromJson method for generic types on a per-method basis, as proposed in my feature request.

The code snippets provided below demonstrate the current setup and the associated challenges. We have a generic ApiWrapperModel class designed to handle various types of data models (ModelN1, ModelN2, ModelN3, etc.), and a TestRetrofitApi class with multiple methods, each returning a different data model.
// File: api_wrapper_model.dart
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';

part 'api_wrapper_model.freezed.dart';
part 'api_wrapper_model.g.dart';

@immutable
@Freezed(makeCollectionsUnmodifiable: false, genericArgumentFactories: true)
class ApiWrapperModel<T> with $ApiWrapperModel<T> {
const ApiWrapperModel.();

const factory ApiWrapperModel({
@JsonKey(name: 'success') @Default(false) bool success,
@JsonKey(name: 'message') @Default('') String message,
@JsonKey(name: 'data') T? data,
}) = _ApiWrapperModel<T>;

factory ApiWrapperModel.fromJson(
Map<String, dynamic> json,
T Function(Object?) fromJsonT,
) =>
_$ApiWrapperModelFromJson(json, fromJsonT);
}

// ... Other ModelN1, ModelN2, ... ModelN7 classes

// File: test_retrofit_api.dart
import 'package:dio/dio.dart';
import 'package:injectable/injectable.dart';
import 'package:retrofit/retrofit.dart';

import '../../../models/api/api_wrapper_model.dart';
import '../../constants/api_constants.dart';

part 'test_retrofit_api.g.dart';

@module
abstract class TestRetrofitApiModule {
@lazySingleton
TestRetrofitApi getInstance(Dio dio) {
return TestRetrofitApi(dio, baseUrl: ApiConstants.baseUrl);
}
}

@RestApi()
abstract class TestRetrofitApi {
factory TestRetrofitApi(Dio dio, {String baseUrl}) = _TestRetrofitApi;

@GET('/path1')
Future<ApiWrapperModel<ModelN1>> getMod1();

@GET('/path2')
Future<ApiWrapperModel<ModelN2>> getMod2();

@GET('/path3')
Future<ApiWrapperModel<ModelN3>> getMod3();

@GET('/path4')
Future<ApiWrapperModel<ModelN4>> getMod4();

@GET('/path5')
Future<ApiWrapperModel<ModelN5>> getMod5();

@GET('/path6')
Future<ApiWrapperModel<ModelN6>> getMod6();

@GET('/path7')
Future<ApiWrapperModel<ModelN7>> getMod7();
}

With the current setup, for every new data model, we need to create a new ModelN class and a corresponding fromJson method. However, the serialization logic for ApiWrapperModel remains the same. What we are looking for is a way to specify a custom fromJson method on a per-method basis within TestRetrofitApi to allow for more flexible serialization/deserialization, thus adhering to the DRY principle and reducing boilerplate.
The desired functionality would allow us to specify a custom fromJson method for each GET method in TestRetrofitApi, thereby reducing redundancy and improving code maintainability, especially in larger projects with many data models and API endpoints.

The main purpose of this project is to generate the boilerplate instead of manual.
Anyway, you can submit a PR and then we can discuss furture.

why is this "to be discussed"? and why in the hell is this not an included feature?
i opted to use IList from fast_immutable_collections, where it has json_serializable support.
this
    final value = IList<ApiKey>.fromJson(_result.data!);

should be this
final value = IList<ApiKey>.fromJson(_result.data!, (json) => ApiKey.fromJson(json as Map<String, Object?>));

so why isnt it? why not

check if a type has a fromJson first
if it has only one argument, pass it in as the argument's type
if it has two and the second argument is a T Function(Object?) then it should pass in the inner-inner type's fromJson

Waiting for your contributions. I would be appreciated if there was new PR here.

There would be some misunderstanding here. I thought it would be discussed when PR's submitted.

I tried to figure it out... But I couldn’t solve this problem.  I have never worked on builders... Please tell me where and in what direction I should spend my efforts to solve the problem.  However, I’m still not sure what will happen (

Had we been using json_serializable directly instead of freezed, it would have worked, but this was a bad way to do it.

Could we get an example how genericArgumentFactories works with the retrofit-generated endpoints?
The merged PR doesn't have any tests or examples.

Additionally it seems like the newly generated code can't handle generic types.
E.g. endpoint declared like this:
Future<Config<T>> config<T>(@Path('id') id);

gets the following generated code, which is obviously not going to work (also common types like List, Map or String instead of T probably also not going to work here:
Config<T>.fromJson(
      _result.data!,
      (json) => T.fromJson(json as Map<String, dynamic>),
    );

Generally it seems like the only way to address this is to declare the endpoint (optionally) with generic fromJson/toJson factories and have generator to wire them in the above call if they are specified.
For example the above endpoint could be declared like:
Future<Config<T>> config<T>(@Path('id') id,
  Object? Function(T value) toJson,
  T Function(Object? json) fromJson,
);

Additionally it seems like the newly generated code can't handle generic types.
E.g. endpoint declared like this:
Future<Config<T>> config<T>(@Path('id') id);

gets the following generated code, which is obviously not going to work (also common types like List, Map or String instead of T probably also not going to work here:
Config<T>.fromJson(
      _result.data!,
      (json) => T.fromJson(json as Map<String, dynamic>),
    );

Generally it seems like the only way to address this is to declare the endpoint (optionally) with generic fromJson/toJson factories and have generator to wire them in the above call if they are specified.
For example the above endpoint could be declared like:
Future<Config<T>> config<T>(@Path('id') id,
  Object? Function(T value) toJson,
  T Function(Object? json) fromJson,
);

That should be it's own issue. Supporting generic-generics is a completely different thing. related yes, but not the same.
The only thing my PR actually does is improve the already-there genericArgumentFactories detection. (by... actually looking at the signature)

Quote your own statement:

My guy, this is terrible.

Unlike before, your change now generates code that does NOT compile.
At very least you should have handled that and fall back to the old behavior.
Having tests and documentation would also help.

Additionally, it does compile. At least as far as I can tell.
If my changes don't compile for you, then the previous would not have either.

If my changes don't compile for you, then the previous would not have either.

You know that how? No tests. Making changes without adding tests you fixed something and broken something else.
One would expect more than that from someone making comments like this:

If my changes don't compile for you, then the previous would not have either.

You know that how? No tests. Making changes without adding tests you fixed something and broken something else.
One would expect more than that from someone making comments like this:

@ekuleshov I have same issue but even with version before @TekExplorer changes

Is there any work around for this

Is there any work around for this

For what? Use the latest version for the support I added.

Is there any work around for this

asking about the #646 issue

Is there any work around for this

asking for the #646 issue

Ask there then, not here. This issue is already complete.

Is there any work around for this

asking for the #646 issue

Ask there then, not here. This issue is already complete.

I added my comment there after some time, and that comment appeared here. Someone linked that issue here that caused my comment appeared here.


move build of k2-tools image from quay to jenkins

all images need to be built by a CI system we control so our system can be moved to an air-gapped deploy situation.
also to reduce vendor dependence, etc, etc.

Dupe of #18


asset: updated CONTRIBUTING.md

Updated CONTRIBUTING.md as per the requirement in the issue https://github.com/hackforla/ops/issues/114

@chelseybeck document is updated as required, give your feedback when you can thanks :)


LDAP support

I found kafkahq could outperform kafka-manager more, if LDAP support is enabled as kafka-manager does
https://github.com/yahoo/kafka-manager#authenticating-a-user-with-ldap
Is the LDAP support already available via configuration and without any code change? as the micronaut document written here
https://micronaut-projects.github.io/micronaut-security/latest/guide/#ldap

there is only one issue, ldap global identification is available with micronaut, but I need to develop a function to allow to map kafkahq role with ldap authentificaton (using this : https://micronaut-projects.github.io/micronaut-security/latest/guide/#extending).
But I need to do it for users & groups to be easily used within enterprise.
As a lot of people is waiting for this, I will put it on first next features

Hey @tchiotludo, are you working on this ? If not, I would like to give it a try.

Hey @zthulj, one people is working on it right now, bit since micronaut 1.2.0, there is ouath 2.0 support, if you search something. Can be cool for gsuite and others ?
What do you think ?

Yes, I think it's a good idea. I would love to see kafkahq work with my keycloak. A dedicated issue could be usefull though

done in #142 :D


optimizing register name search

[ ] This contribution adheres to CONTRIBUTING.md.

TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.
What does this Pull Request accomplish?
This PR is intended to replace the search of RegisterName from a 1D string array with an indexing-based approach.
https://github.com/ni/niveristand-fpga-addon-custom-device/issues/179
Why should this Pull Request be merged?
This PR reduces the overall search time for the Register channel in FPGA Addon CD.
What testing has been done?
WIth change

Without change

@mraj8370-NI Submitted files are in LV 24, convert it to base version LV 20/21.


[BugFix] Upgrade s3 sdk to v1.11.61 to avoid deadlock in aws InstanceProfile

In #24129, we upgrade aws SDK to 1.10.36, but it introduces InstanceProfile deadlock bug, which will occur BE query timeout when the user is using InstanceProfile.
AWS report this bug in: https://github.com/aws/aws-sdk-cpp/issues/2251
So in this pr, we upgrade aws SDK to v1.11.61, the same as ClickHouse.  https://github.com/ClickHouse/ClickHouse/pull/50037
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

@Mergifyio backport branch-3.1


Replace ApiCoinSelectionInput type with ApiWalletInput.

These types are identical, and their serialized forms are also identical.

bors r+


Modify publish pipeline and add a create release step

The pipeline is only pushing tags to the repo and publishing the image to docker hub but not creating a release.

#9 Fixes this issue


Appending time lapse and normal mode videos

Using this library Can we append two videos with different capture rates?

The frame rate is not the decisive factor.  Encoding settings,  SPS and PPS
must be the same.
bhuvneshvarma<EMAIL_ADDRESS>schrieb am So., 18. Okt. 2015 7:55
PM:

Using this library Can we append two videos with different capture rates?
—
Reply to this email directly or view it on GitHub
https://github.com/sannies/mp4parser/issues/118.

i see in document its written-
It is important to emphasize that you cannot append any two tracks with:
Different resolutions
Different frame-rates
Can i append time lapse and normal mode videos with this library?

What kind of timelapse do you have? Is the frame lower or is it a normal
video showing slow motion?
Make an example available and I'll be able to tell.
2015-10-19 6:41 GMT+02:00 bhuvneshvarma<EMAIL_ADDRESS>
i see in document its written-
It is important to emphasize that you cannot append any two tracks with:
Different resolutions
Different frame-rates
Can i append time lapse and normal mode videos with this library?
—
Reply to this email directly or view it on GitHub
https://github.com/sannies/mp4parser/issues/118#issuecomment-149096549.

yeah..video showing slow motion..Time lapse video u can its document here.. http://developer.android.com/intl/es/guide/topics/media/camera.html#time-lapse-video
I used ur library..it works fine for appending same mode videos..but i want to append different mode videos-time lapse and normal mode video..How should i proceed in tht?I tried below code for merging videos in Vid directory which works fine if all videos are in same mode but fails to append if videos are of different mode.
public class MergedVideo extends AsyncTask<Void, Integer, String> {
@Override
protected void onPreExecute() {
}
;
@Override
protected String doInBackground(Void... voids) {
try {
File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES), "Vid");
File f = new File(mediaStorageDir.getPath());
File file[] = f.listFiles();
String paths[] = new String[file.length];
Movie[] inMovies = new Movie[file.length];
for (int i = 0; i < file.length; i++) {
paths[i] = file[i].getPath();
inMovies[i] = MovieCreator.build(paths[i]);
}
List videoTracks = new LinkedList();
List audioTracks = new LinkedList();
for (Movie m : inMovies) {
for (Track t : m.getTracks()) {
if (t.getHandler().equals("soun")) {
audioTracks.add(t);
}
if (t.getHandler().equals("vide")) {
videoTracks.add(t);
}
}
}
Movie result = new Movie();
if (audioTracks.size() > 0) {
result.addTrack(new AppendTrack(audioTracks
.toArray(new Track[audioTracks.size()])));
}
if (videoTracks.size() > 0) {
result.addTrack(new AppendTrack(videoTracks
.toArray(new Track[videoTracks.size()])));
}
BasicContainer out = (BasicContainer) new DefaultMp4Builder()
.build(result);
@SuppressWarnings("resource")
FileChannel fc = new RandomAccessFile(String.format(Environment
.getExternalStorageDirectory() + "/mergedvideo.mp4"),
"rw").getChannel();
out.writeContainer(fc);
fc.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.e("Bhu", e.toString());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.e("Bhu", e.toString());
}
String mFileName = Environment.getExternalStorageDirectory()
.getAbsolutePath();
mFileName += "/mergedvideo.mp4";
return mFileName;
}

The mp4parser cannot encode videos. All mp4parser operations are on
'container-level' not on 'codec-level'. So: If the codec setting are
different then it won't work but I can't tell from looking at the
documentation.
As I said: Make an example available and I'll check.
2015-10-19 17:36 GMT+02:00 bhuvneshvarma<EMAIL_ADDRESS>
yeah..video showing slow motion..Time lapse video u can its document
here..
http://developer.android.com/intl/es/guide/topics/media/camera.html#time-lapse-video
I used ur library..it works fine for appending same mode videos..but i
want to append different mode videos-time lapse and normal mode video..How
should i proceed in tht?I tried below code for merging videos in Vid
directory which works fine if all videos are in same mode but fails to
append if videos are of different mode.
public class MergedVideo extends AsyncTask {
@Override https://github.com/Override
protected void onPreExecute() {
}
;
@Override https://github.com/Override
protected String doInBackground(Void... voids) {
try {
File mediaStorageDir = new
File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES), "Vid");
File f = new File(mediaStorageDir.getPath());
File file[] = f.listFiles();
String paths[] = new String[file.length];
Movie[] inMovies = new Movie[file.length];
for (int i = 0; i < file.length; i++) {
paths[i] = file[i].getPath();
inMovies[i] = MovieCreator.build(paths[i]);
}
List videoTracks = new LinkedList();
List audioTracks = new LinkedList();
for (Movie m : inMovies) {
for (Track t : m.getTracks()) {
if (t.getHandler().equals("soun")) {
audioTracks.add(t);
}
if (t.getHandler().equals("vide")) {
videoTracks.add(t);
}
}
}
Movie result = new Movie();
if (audioTracks.size() > 0) {
result.addTrack(new AppendTrack(audioTracks
.toArray(new Track[audioTracks.size()])));
}
if (videoTracks.size() > 0) {
result.addTrack(new AppendTrack(videoTracks
.toArray(new Track[videoTracks.size()])));
}
BasicContainer out = (BasicContainer) new DefaultMp4Builder()
.build(result);
@SuppressWarnings https://github.com/SuppressWarnings("resource")
FileChannel fc = new RandomAccessFile(String.format(Environment
.getExternalStorageDirectory() + "/mergedvideo.mp4"),
"rw").getChannel();
out.writeContainer(fc);
fc.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.e("Bhu", e.toString());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.e("Bhu", e.toString());
}
String mFileName = Environment.getExternalStorageDirectory()
.getAbsolutePath();
mFileName += "/mergedvideo.mp4";
return mFileName;
}
—
Reply to this email directly or view it on GitHub
https://github.com/sannies/mp4parser/issues/118#issuecomment-149251546.

I am recording video from camera and storing in device storage...All video I am storing in particular storage.Below is the code I am using for downloading time lapse and normal mode videos and below that is the code I am using for appending them..If you allow I can share with you two files of video out of which one is time lapse video and other is normal mode video to check if they can be appended with this library
For capturing time lapse video-
                    if (prepareFastVideoRecorder()) {

                        mMediaRecorder.start();

                    } else {

                        releaseMediaRecorder();
                    }

            private boolean prepareFastVideoRecorder() {

            mMediaRecorder = new MediaRecorder();

            mCamera.unlock();
            mMediaRecorder.setCamera(mCamera);
            mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);

            mMediaRecorder.setProfile(CamcorderProfile.get(0, CamcorderProfile.QUALITY_TIME_LAPSE_480P));

            mMediaRecorder.setCaptureRate(5);

            // Step 4: Set output file to the socket
            mVideoFile = new File(getOutputMediaFile().toString());
            mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath());
            if (cameratype == 1)
                mMediaRecorder.setOrientationHint(90);
            else if (cameratype == 2)
                mMediaRecorder.setOrientationHint(270);
            mMediaRecorder.setMaxDuration(60000);
            mMediaRecorder.setOnInfoListener(this);
            // Step 5: Set the preview output
            mMediaRecorder.setPreviewDisplay(mPreview.getHolder().getSurface());

            try {
                mMediaRecorder.prepare();

            } catch (IllegalStateException e) {

                releaseMediaRecorder();
                return false;
            } catch (IOException e) {

                releaseMediaRecorder();
                return false;
            }
            return true;
        }

For capturing normal video-
                    if (prepareFastVideoRecorder()) {

                        mMediaRecorder.start();

                    } else {

                        releaseMediaRecorder();
                    }

private boolean prepareVideoRecorder() {

        mMediaRecorder = new MediaRecorder();

        mCamera.unlock();
        mMediaRecorder.setCamera(mCamera);

        mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);

        mMediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));

        mVideoFile = new File(getOutputMediaFile().toString());
        mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath());

        mMediaRecorder.setPreviewDisplay(mPreview.getHolder().getSurface());
        if (cameratype == 1)
            mMediaRecorder.setOrientationHint(90);
        else if (cameratype == 2)
            mMediaRecorder.setOrientationHint(270);

        mMediaRecorder.setMaxDuration(10000);
        mMediaRecorder.setOnInfoListener(this);

        try {
            mMediaRecorder.prepare();
        } catch (IllegalStateException e) {
            Log.d("CAMERA", "IllegalStateException preparing MediaRecorder: " + e.getMessage());
            releaseMediaRecorder();
            return false;
        } catch (IOException e) {
            Log.d("CAMERA", "IOException preparing MediaRecorder: " + e.getMessage());
            releaseMediaRecorder();
            return false;
        }

        return true;
    }

Merging Video
public class MergedVideo extends AsyncTask<Void, Integer, String> {

        @Override
        protected void onPreExecute() {

        }

    @Override
    protected String doInBackground(Void... voids) {
        try{
                File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(
                        Environment.DIRECTORY_PICTURES), "Vid");

                File f = new File(mediaStorageDir.getPath());
                File file[] = f.listFiles();
                Log.e("FilesBhuv", "Size: " + file.length);
                String paths[] = new String[file.length];
                Movie[] inMovies = new Movie[file.length];
                for (int i = 0; i < file.length; i++) {
                    paths[i] = file[i].getPath();

                    inMovies[i] = MovieCreator.build(paths[i]);

                }

                List<Track> videoTracks = new LinkedList<Track>();
                List<Track> audioTracks = new LinkedList<Track>();
                for (Movie m : inMovies) {
                    for (Track t : m.getTracks()) {
                        if (t.getHandler().equals("soun")) {
                            audioTracks.add(t);
                        }
                        if (t.getHandler().equals("vide")) {
                            videoTracks.add(t);
                        }
                    }
                }

                Movie result = new Movie();

                if (audioTracks.size() > 0) {
                    result.addTrack(new AppendTrack(audioTracks
                            .toArray(new Track[audioTracks.size()])));
                }
                if (videoTracks.size() > 0) {
                    result.addTrack(new AppendTrack(videoTracks
                            .toArray(new Track[videoTracks.size()])));
                }

                BasicContainer out = (BasicContainer) new DefaultMp4Builder()
                        .build(result);

                @SuppressWarnings("resource")
                FileChannel fc = new RandomAccessFile(String.format(Environment
                        .getExternalStorageDirectory() + "/mergedvideo.mp4"),
                        "rw").getChannel();
                out.writeContainer(fc);
                fc.close();
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                Log.e("Bhuvnesh",e.toString());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                Log.e("Bhuvnesh", e.toString());
            }
            String mFileName = Environment.getExternalStorageDirectory()
                    .getAbsolutePath();
            mFileName += "/mergedvideo.mp4";

            return mFileName;
        }

Yes please share the files.  Upload them somewhere. Github issues cannot
have attachments
bhuvneshvarma<EMAIL_ADDRESS>schrieb am Mo., 19. Okt. 2015 8:21
PM:

I am recording video from camera and storing in device storage...All video
I am storing in particular storage.Below is the code I am using for
downloading time lapse and normal mode videos and below that is the code I
am using for appending them..If you allow I can share with you two files of
video out of which one is time lapse video and other is normal mode video
to check if they can be appended with this library
For capturing time lapse video-
                if (prepareFastVideoRecorder()) {

                    mMediaRecorder.start();

                } else {

                    releaseMediaRecorder();
                }

        private boolean prepareFastVideoRecorder() {

        mMediaRecorder = new MediaRecorder();

        mCamera.unlock();
        mMediaRecorder.setCamera(mCamera);
        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);

        mMediaRecorder.setProfile(CamcorderProfile.get(0, CamcorderProfile.QUALITY_TIME_LAPSE_480P));

        mMediaRecorder.setCaptureRate(5);

        // Step 4: Set output file to the socket
        mVideoFile = new File(getOutputMediaFile().toString());
        mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath());
        if (cameratype == 1)
            mMediaRecorder.setOrientationHint(90);
        else if (cameratype == 2)
            mMediaRecorder.setOrientationHint(270);
        mMediaRecorder.setMaxDuration(60000);
        mMediaRecorder.setOnInfoListener(this);
        // Step 5: Set the preview output
        mMediaRecorder.setPreviewDisplay(mPreview.getHolder().getSurface());

        try {
            mMediaRecorder.prepare();

        } catch (IllegalStateException e) {

            releaseMediaRecorder();
            return false;
        } catch (IOException e) {

            releaseMediaRecorder();
            return false;
        }
        return true;
    }

For capturing normal video-
                if (prepareFastVideoRecorder()) {

                    mMediaRecorder.start();

                } else {

                    releaseMediaRecorder();
                }

private boolean prepareVideoRecorder() {
    mMediaRecorder = new MediaRecorder();

    mCamera.unlock();
    mMediaRecorder.setCamera(mCamera);

    mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
    mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);

    mMediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));

    mVideoFile = new File(getOutputMediaFile().toString());
    mMediaRecorder.setOutputFile(mVideoFile.getAbsolutePath());

    mMediaRecorder.setPreviewDisplay(mPreview.getHolder().getSurface());
    if (cameratype == 1)
        mMediaRecorder.setOrientationHint(90);
    else if (cameratype == 2)
        mMediaRecorder.setOrientationHint(270);

    mMediaRecorder.setMaxDuration(10000);
    mMediaRecorder.setOnInfoListener(this);

    try {
        mMediaRecorder.prepare();
    } catch (IllegalStateException e) {
        Log.d("CAMERA", "IllegalStateException preparing MediaRecorder: " + e.getMessage());
        releaseMediaRecorder();
        return false;
    } catch (IOException e) {
        Log.d("CAMERA", "IOException preparing MediaRecorder: " + e.getMessage());
        releaseMediaRecorder();
        return false;
    }

    return true;
}

Merging Video
public class MergedVideo extends AsyncTask<Void, Integer, String> {
    @Override
    protected void onPreExecute() {

    }

@Override
protected String doInBackground(Void... voids) {
    try{
            File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(
                    Environment.DIRECTORY_PICTURES), "Vid");

            File f = new File(mediaStorageDir.getPath());
            File file[] = f.listFiles();
            Log.e("FilesBhuv", "Size: " + file.length);
            String paths[] = new String[file.length];
            Movie[] inMovies = new Movie[file.length];
            for (int i = 0; i < file.length; i++) {
                paths[i] = file[i].getPath();

                inMovies[i] = MovieCreator.build(paths[i]);

            }

            List<Track> videoTracks = new LinkedList<Track>();
            List<Track> audioTracks = new LinkedList<Track>();
            for (Movie m : inMovies) {
                for (Track t : m.getTracks()) {
                    if (t.getHandler().equals("soun")) {
                        audioTracks.add(t);
                    }
                    if (t.getHandler().equals("vide")) {
                        videoTracks.add(t);
                    }
                }
            }

            Movie result = new Movie();

            if (audioTracks.size() > 0) {
                result.addTrack(new AppendTrack(audioTracks
                        .toArray(new Track[audioTracks.size()])));
            }
            if (videoTracks.size() > 0) {
                result.addTrack(new AppendTrack(videoTracks
                        .toArray(new Track[videoTracks.size()])));
            }

            BasicContainer out = (BasicContainer) new DefaultMp4Builder()
                    .build(result);

            @SuppressWarnings("resource")
            FileChannel fc = new RandomAccessFile(String.format(Environment
                    .getExternalStorageDirectory() + "/mergedvideo.mp4"),
                    "rw").getChannel();
            out.writeContainer(fc);
            fc.close();
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            Log.e("Bhuvnesh",e.toString());
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            Log.e("Bhuvnesh", e.toString());
        }
        String mFileName = Environment.getExternalStorageDirectory()
                .getAbsolutePath();
        mFileName += "/mergedvideo.mp4";

        return mFileName;
    }

—
Reply to this email directly or view it on GitHub
https://github.com/sannies/mp4parser/issues/118#issuecomment-149303838.

I have sent you the files on email-<EMAIL_ADDRESS>..Thanks a lott!!!

it worked..thanks a lott!!

Hi Please what was the solution ? I also want to put my video in slow motion (android)

Hi,
I'm having the same problem here, I record mp4 videos (15 fps, h264 Baseline profile) and I'm trying to append it with a VOB video that I am converting manually to h264 Baseline profile, 15fps as well but they don't have the same bitrate.  I'm using ffmpeg to do so.
How do I record the timelapse video:
 @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    private boolean prepareVideoRecorder() {

        // BEGIN_INCLUDE (configure_preview)
        mCamera = CameraHelper.getDefaultCameraInstance();

        // We need to make sure that our preview and recording video size are supported by the
        // camera. Query camera to find all the sizes and choose the optimal size given the
        // dimensions of our preview surface.
        Camera.Parameters parameters = mCamera.getParameters();
        List<Camera.Size> mSupportedPreviewSizes = parameters.getSupportedPreviewSizes();
        List<Camera.Size> mSupportedVideoSizes = parameters.getSupportedVideoSizes();
        List<int[]> supportedPreviewFpsRange = parameters.getSupportedPreviewFpsRange();
        Camera.Size optimalSize = CameraHelper.getOptimalVideoSize(mSupportedVideoSizes,
                mSupportedPreviewSizes, mPreview.getWidth(), mPreview.getHeight());

        // Use the same size for recording profile.
        CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH);
        profile.videoFrameWidth = optimalSize.width;
        profile.videoFrameHeight = /*optimalSize.height*/720;

        // likewise for the camera object itself.
        parameters.setPreviewSize(profile.videoFrameWidth, profile.videoFrameHeight);
        mCamera.setParameters(parameters);

        try {
            // Requires API level 11+, For backward compatibility use {@link setPreviewDisplay}
            // with {@link SurfaceView}
            mCamera.setPreviewTexture(mPreview.getSurfaceTexture());
        } catch (IOException e) {
            Log.e(TAG, "Surface texture is unavailable or unsuitable" + e.getMessage());
            return false;
        }
        // END_INCLUDE (configure_preview)

        // BEGIN_INCLUDE (configure_media_recorder)
        mMediaRecorder = new MediaRecorder();

        // Step 1: Unlock and set camera to MediaRecorder
        mCamera.unlock();
        mMediaRecorder.setCamera(mCamera);
        //mMediaRecorder.setOrientationHint(90); //Quit if landsacpe wanted

        // Step 2: Set sources
        mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
        mMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);

        // Step 3: Set a CamcorderProfile (requires API Level 8 or higher)
        mMediaRecorder.setProfile(profile);

        // Step 4: Set output file
        mOutputFile = CameraHelper.getOutputMediaFile(CameraHelper.MEDIA_TYPE_VIDEO);
        if (mOutputFile == null) {
            return false;
        }
        Log.i(TAG, "mOutputFile path: " + mOutputFile.getAbsolutePath());
        mMediaRecorder.setOutputFile(mOutputFile.getPath());

        mMediaRecorder.setVideoFrameRate(profile.videoFrameRate / 2);
        mMediaRecorder.setVideoEncodingBitRate(profile.videoBitRate / 2);
        mMediaRecorder.setCaptureRate(profile.videoFrameRate);

        // END_INCLUDE (configure_media_recorder)

        // Step 5: Prepare configured MediaRecorder
        try {
            mMediaRecorder.prepare();
        } catch (IllegalStateException e) {
            Log.d(TAG, "IllegalStateException preparing MediaRecorder: " + e.getMessage());
            releaseMediaRecorder();
            return false;
        } catch (IOException e) {
            Log.d(TAG, "IOException preparing MediaRecorder: " + e.getMessage());
            releaseMediaRecorder();
            return false;
        }
        return true;
    }

How Do I append the two videos:
  public static void appendTwoVideos(File videoFile1, File videoFile2) throws IOException {
        readVideoMetaData(videoFile1);
        readVideoMetaData(videoFile2);

        Movie movie1 = MovieCreator.build(videoFile1.getAbsolutePath());
        Movie movie2 = MovieCreator.build(videoFile2.getAbsolutePath());

        List<Track> videoTracks = new LinkedList<>();
        List<Track> audioTracks = new LinkedList<>();

        for (Track track : movie1.getTracks()) {
            Log.i(TAG, "movie1: " + track.getHandler());
            if (track.getHandler().equals("soun")) {
                audioTracks.add(track);
            }
            if (track.getHandler().equals("vide")) {
                videoTracks.add(track);
            }
        }

        for (Track track : movie2.getTracks()) {
            Log.i(TAG, "movie2: " + track.getHandler());
            if (track.getHandler().equals("soun")) {
                audioTracks.add(track);
            }
            if (track.getHandler().equals("vide")) {
                videoTracks.add(track);
            }
        }

        Movie result = new Movie();

        if (!audioTracks.isEmpty()) {
            result.addTrack(new AppendTrack(audioTracks.toArray(new Track[audioTracks.size()])));
        }
        if (!videoTracks.isEmpty()) {
            result.addTrack(new AppendTrack(videoTracks.toArray(new Track[videoTracks.size()])));
        }

        try {
            Container out = new DefaultMp4Builder().build(result);

            FileChannel fc = new RandomAccessFile(String.format(Environment.getExternalStoragePublicDirectory(
                    Environment.DIRECTORY_PICTURES) + "/mergedvideo.mp4"),
                    "rw").getChannel();

            out.writeContainer(fc);
            fc.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

config video captured by the device:

config video of the one i'm trying to append:

Thanks for your help

Hey @bkjbkjbnkj687698698
5 year after I was reading your discussion with @sannies. At last you send him an email and he solved your problem. You left all of us in mystery.
So, could you please share the solution with us because I am also stuck in appending videos of different framerates
I have used ffmpeg but its too slow.
I know its 5 years but please acknowledge. It would be a great help.

While I don't have a solution beside the advise to reencode with ffmpeg or with the Android H264 encoder there are still many things one could try - depending on the capabilities of the playback device and your use-case.
1.) Try to create an AVC1 track with multiple SPS/PPS.
2.) Try to use AVC3 and signal the configuration change inband
3.) Convert everything into an MPEG-DASH stream with 2 periods.
I don't support this project any longer. I feel that it's valuable to many people but no one ever paid me to do it and I got to pay my rent.

Thank you @sannies for showing your concern.
Although I haven't heard about any of these but still I will try to find something from the internet.
@sannies Actually we all are same. We too have our expenses and we try to find some open source or free codes from the internet. So it is difficult for us to buy you a coffee.
Don't worry hard work always pays off. Your help is unconditional and at some point in your life you will be successful and you would definetly buy a home for yourself.


Installer: linux

UI installer for linux doesn't include qt deps. Need to support  AppImage or Flatpak and get rid of deb.

Done. Provides AppImage file. Need to add executable attribute to it after download (chmod a+x ./filename or using rightclick + properties in file explorer) Should work on most not old linux distros, not only on ubunty.
Ubuntu 16 is not supported oficially anymore. To run on ubuntu 16 need to execute:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update && sudo apt-get upgrade libstdc++6

checked


Is there a way to detect connections and disconnections?

Nice to meet you.
I was looking for a Bluetooth LE module that would work in a debian12 environment and came across this module.
This module is very stable and I am satisfied with its operation.
However, I could not figure out how to know when events occur when connecting and disconnecting.
Is it possible to detect them with this module?
Is it difficult to achieve this functionality?

Hello,
There isn't presently a way to do this. You can detect when a device is paired but not when one is connected or disconnected. It would be possible to do this- the org.bluez.Device api does expose this and I was planning on supporting this api to support some testing improvements though I haven't been able to make much progress on this recently.

Thank you.
I am relieved that it is a feasible feature.
I am sorry, but I can only try to encourage you.
But I wish you the best.
In debian12, using pip in a global environment is very severely restricted. So, in many cases, even well-known modules cannot work. Among them, this bluez_peripheral is very valuable.


flink: copy files in tests instead of db mount

This allows to run the Flink integration tests locally without needing to copy files to /tmp/warehouse first.

Since ./gradlew examples:stateful:build needs to be executed before integration tests, maybe we can include this step in the task or create new one just for testing on local machine?


Only display testnet faucet link on testnet.

The testnet faucet link should be conditionally shown based on the network that is being monitored.

Unless Dyrk wants to set up a mainnet faucet.

I will comment out the navigation link until i am able to detect if its actually running on testnet/mainnet via frontend TV (template variable)


[code2text]

Hello. Thank you for your excellent work.
Could you create a manual for using CodeXGLUE in google colab? The most interesting task is to get comments for code snippets.

Sorry. We are not very familiar with Google colab.


DLL load failed while importing cv2: The specified module could not be found.

Expected behaviour
When i install opencv-python using pip it installs succesfully after that
Actual behaviour
i open jupyter notebook and imported cv2 and it shows this error
IMPORT ERROR: DLL load failed while importing cv2: The specified module could not be found.
Steps to reproduce
opencv_python-<IP_ADDRESS>-PYTHON38-64 is the version of open cv in python 3.8 64 bit version

Please read the README: https://github.com/skvark/opencv-python#frequently-asked-questions

Thanks i found solution It highly appreciated that your article is 100% help full i am closind this issue thanks again


build with newer clang_bootstrap

{package} {version} {:snowflake:}
Destination channel: {Snowflake | defaults}
Links

{ticket_number}
Upstream repository
Upstream changelog/diff
Relevant dependency PRs:

...

Explanation of changes:

...

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_e601i_r_bv/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:23: host_section_needs_exact_pinnings: Linked libraries host should have exact version pinnings.
clone/recipe/meta.yaml:42: missing_description: The recipe is missing a description

===== ERRORS =====

clone/recipe/meta.yaml:34: invalid_url: https://opensource.apple.com/source/tapi : Not reachable: 404
===== Final Report: =====
1 Error and 2 Warnings were found

Linter check found the following problems:
ERROR conda.cli.main_run:execute(125): `conda run conda-lint /tmp/abs_d8oaw_tb0h/clone` failed. (See above for error)
The following problems have been found:
===== WARNINGS =====

clone/recipe/meta.yaml:23: host_section_needs_exact_pinnings: Linked libraries host should have exact version pinnings.
===== Final Report: =====
0 Errors and 1 Warning were found


GCC 9.3.0 is failing to compile roudi_app.cpp

Required information
Operating system:
Ubuntu 18.04 LTS
Compiler version:
GCC 9.3
Observed result or behaviour:
GCC 9.3 is failing to compile roudi_app.cpp:
/iceoryx/iceoryx_posh/source/roudi/application/roudi_app.cpp: In member function 'void iox::roudi::RouDiApp::parseCmdLineArguments(int, char**, iox::roudi::CmdLineParser::CmdLineArgumentParsingMode)':
/iceoryx/iceoryx_posh/source/roudi/application/roudi_app.cpp:180:19: error: use of deleted function 'constexpr iox::roudi::CmdLineParser::CmdLineParser()'
  180 |     CmdLineParser cmdLineParser;
      |                   ^~~~~~~~~~~~~

In file included from /iceoryx/iceoryx_posh/include/iceoryx_posh/roudi/roudi_app.hpp:19,
                 from /iceoryx/iceoryx_posh/source/roudi/application/roudi_app.cpp:15:
/iceoryx/iceoryx_posh/include/iceoryx_posh/roudi/roudi_cmd_line_parser.hpp:46:5: note: 'constexpr iox::roudi::CmdLineParser::CmdLineParser() noexcept' is implicitly deleted because its exception-specification does not match the implicit exception-specification 'noexcept (false)'
   46 |     CmdLineParser() noexcept = default;

Expected result or behaviour:
Can compile
Conditions where it occurred / Performed steps:
Compile with GCC 9.3

Weird. I can compile it with GCC 9.3 on Ubuntu 20.04 and @elfenpiff on gentoo. Can you verify that it fails on master?

I verified it just now and it compiles with the current master!
Verified compiler versions:

gcc-9.3.0 (Gentoo)
gcc-10.2.0 (@FerdinandSpitzschnueffler on ArchLinux)
clang-10.0.1 (Gentoo)

I would close the issue or @marthtz do you have any additional information on howto reproduce this bug?

@marthtz any news? Does the bug still persist?

Ok, that's good news. Basically, I just forwarded the issue as I don't have a working Ubuntu 20 setup right now. As @elBoberido and @elfenpiff confirm it's working on various systems I'll close the issue!
Thanks for checking guys!


Cannot read properties of undefined (reading '0')

when i use command for example:
truecallerjs -s 527607844 -n
or
truecallerjs -s 527607844
or even
truecallerpy -s 527607844
after 47 tries its return
Cannot read properties of undefined (reading '0'). or Expecting value: line 1 column 1 (char 0).
i think that the problem from truecaller server which had a limit for phone number lookup, can you help to exceed the limit i search for truecaller api every where but the have nothing for js or python im looking to pay per search ...

@ameeraz19  https://github.com/sumithemmadi/truecallerjs/issues/39#issuecomment-1666734931 reed this comment.


Added CAN Equation

@BlakeFreer . I've included the CAN bus equation. I'm unsure about how the input will look, so I have included the test case structure I used, but I imagine it will be different.

I created a cangen/tests/ folder and added instructions to the README. Add some more tests for your calculator. Try to break it. Maybe run a test that ensures ZeroDivisionError is returned if canspeed is zero. See the Pytest docs https://docs.pytest.org/en/7.1.x/how-to/assert.html#assertions-about-expected-exceptions

@ManushPatell Is this ready for re-review? You clicked resolve on all my comments but some of the changes weren't implemented


Set up a proxy for OpenAI.

Recently, I tried to use OpenAI's API in LMQL, but I couldn't find an option to set up a proxy in LMQL. I know that in OpenAI, you can use 'openai.proxy' to set it up, but how can I do it in LMQL?

There is an endpoint parameter, e.g.
lmql.model("openai/<model>", endpoint="<endpoint>")

This is meant to be used with mock implementations of the OpenAI API. Are you looking for this way of configuring it, or are you looking for a traditional network-level way of proxying requests?

I understand, thanks for clarifying. I looked up the proxy parameter and found this description in the official OpenAI client library https://github.com/openai/openai-python#command-line-interface.
Since we currently do not use this library, we unfortunately cannot directly pass the parameter through. So for now, I have to say that proxy is not supported. However, we want to adopt the official API library soon, which should enable this. I will keep this issue around to track progress on this.

Thanks for your work. This enhancement is crucial for my smooth use of LMQL.
I hope to see it soon. Best wishes.

Marking this as a good first issue.
Similar to decoding parameters like top_k (e.g. as tracked here https://github.com/eth-sri/lmql/blob/main/src/lmql/runtime/openai_integration.py#L135), proxy could also just be passed through from the lmql.model(...) call, or the decoder arguments.

I'm not completely sure I've got a handle on the issue. It looks like the proxy is functioning correctly with the endpoint parameter, especially after a minor fix related to setting the secret (see the latest commit for details).
import lmql

# uses 'chatgpt' by default
@lmql.query(model="chatgpt")
def tell_a_joke():
    '''lmql
    """A great good dad joke. A indicates the punchline
    Q:[JOKE]
    A:[PUNCHLINE]""" where STOPS_AT(JOKE, "?") and \
                           STOPS_AT(PUNCHLINE, "\n")
    '''

tell_a_joke() # uses chatgpt
 tell_a_joke(model=lmql.model("openai/gpt-4", endpoint="https://api.openai-proxy.com/v1/chat/completions")) #using a proxy  https://api.openai-proxy.com which provide the same API as openai

LMQLResult(prompt="A great good dad joke. A indicates the punchline\nQ: Why don't scientists trust atoms?\nA: Because they make up everything!", variables={'JOKE': " Why don't scientists trust atoms?", 'PUNCHLINE': ' Because they make up everything!'}, distribution_variable=None, distribution_values=None, sequence=<seq token_len=31 ids=[... b'\n', b'A', b':', b' Because', b' they', b' make', b' up', b' everything', b'!', b'<|endoftext|>']>)

If the request is to expose the proxy argument in the decoding function, yes this is definitely doable.
But directly initializing the model with the proxy seems more user-friendly since it avoids having to specify the proxy URL in every call.
What do you think ?  :thinking:


redirects to broken URL (v0.10.0)

When I try to run node-inspector v0.10.0, it gives me an HTTP 302: Moved Temporarily. It redirects to [object Object] , which of course isn't a real URL. v0.9.2 works fine.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/12380610-redirects-to-broken-url-v0-10-0?utm_campaign=plugin&utm_content=tracker%2F195817&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F195817&utm_medium=issues&utm_source=github).

@david-knipe-hp , thanks for bug report. I pushed a commit that fixes this small bug, so this will be completely fixed in 0.10.1.
As a workaround you can use link that printed in node-inspector terminal on startup.

Closed by 36c246acb36950aa08afa7599a1e21533cb94430


use 2.0.x branch for mender-convert git clone

The 2.0.0 tag is broken because the Docker base
image we used got removed, meaning that './docker-build'
fails with errors similar to this:
> Err:4 http://archive.ubuntu.com/ubuntu disco Release
>   404  Not Found [IP: <IP_ADDRESS> 80]

Signed-off-by: Mirza Krak<EMAIL_ADDRESS>

I was instead going to suggest releasing a quick 2.0.1. It's just one cherry-pick missing. I don't think we should refer to ".x" versions in our documentation.

I was instead going to suggest releasing a quick 2.0.1. It's just one cherry-pick missing

Sure, if we can make it happen this is definitely preferred.

I don't think we should refer to ".x" versions in our documentation.

I do not think so either, but a temporary solution referencing .x is better then not working :)

Huh? ubuntu:19 got removed?

Release has been initiated.

Huh? ubuntu:19 got removed?

@oleorhagen Yes, Ubuntu has modify their policy so that the non-TLS versions are supported for only one year. In the repos that we find, would be good to base our builds on Ubuntu 20.04 (TLS)


SEC-3.1: Authentication : Adding hostname and motd-banner configurati…

https://github.com/openconfig/featureprofiles/issues/754

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 69.376%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1656

Relevant Lines:
2387

💛  - Coveralls

Closing this pull request refer to https://github.com/openconfig/featureprofiles/pull/891


Support concurrent jobs

Once we have an async API (#26), we should provide a way to launch jobs in different underlying java threads, so that users can run multiple jobs concurrently.

completed in #28


Join Group Request Does Not Use Protocol Type?

Seeing some intermittent InconsistentGroupProtocol errors (defined here) and noticed that the protocol uses a field called ProtocolType

The ProtocolType field defines the embedded protocol that the group implements. The group coordinator ensures that all members in the group support the same protocol type.

also noticed this field might not be getting set (see here)

Kafka clients should use 'consumer' protocol type and corresponding data structures: https://github.com/oleksiyk/kafka/blob/master/lib/protocol/group_membership.js#L95
The JoinGroupRequest you mention is a generic message that is also used for Kafka internal protocols.

You may receive the mentioned error when you trying to join the same existing groupId with different assignment strategies.

Thanks for the reply. Can you see anything wrong with the code below?
const kafkaConsumer = new kafka.GroupConsumer({
    connectionString: config.kafka.connectionString,
    groupId: config.groupId,
    maxWaitTime: config.kafka.maxWaitTime
});

const dataHandler = function(messageSet, topic, partition) {
    console.log('Kafka consumer received messages');
};

const strategies = [{
    strategy: config.kafka.topicName + '_Consumer',
    subscriptions: [config.kafka.topicName],
    handler: dataHandler,
    fn: kafka.RoundRobinAssignment
}];

kafkaConsumer.init(strategies);

I don't see anything wrong here. However that error is mostly functional, meaning for example that it can occur when you killed the group members and then immediately started new members with different subscriptions or assignment strategies. There might be other reasons. Check with Kafka logs, there might be a hint that explains what happened.

Following is my consumer:
`const
/* npm modules */
appRootDir = require ('app-root-dir').get(),
Promise = require('bluebird'),
Kafka = require('no-kafka'),
/* npm modules */
config = require (appRootDir + '/config/config.js'),
log = require (appRootDir + '/log/bunyan.js'),

consumer = new Kafka.GroupConsumer({
    connectionString: config.zookeeperAddress,
    groupId : config.notificationConsumerGroup,
    minBytes: 1,
    maxBytes: 200,
    startingOffset: Kafka.EARLIEST_OFFSET,

});

function notificationConsumer (topicName) {
const dataHandler = function (messageSet, topic, partition) {
    return Promise.each(messageSet, function (m){
        log.info(topic, partition, m.offset, m.message.value.toString('utf8'));
        return ({topic: topic, partition: partition, offset: m.offset});
    });
};

const strategies = [{
    subscriptions : [topicName],
    // strategy : new Kafka.WeightedRoundRobinAssignmentStrategy(),
    handler : dataHandler,

}];

consumer.init(strategies)

}
module.exports = {
notificationConsumer    :   notificationConsumer,
dynamicConsumer         :   dynamicConsumer
};
`
That's how I'm calling it in server.js file:
var Consumer = require(appRootDir + '/no-kafka/consumergroup.js');             Consumer.notificationConsumer(config.consumerTopic);
But it keeps giving the error:
2017-01-26T13:28:54.039Z ERROR no-kafka-client Metadata request failed: NoKafkaConnectionError [localhost:2181]: Kafka server has closed connection 0|exp | { [NoKafkaConnectionError: Kafka server has closed connection] 0|exp |   name: 'NoKafkaConnectionError', 0|exp |   server: 'localhost:2181', 0|exp |   message: 'Kafka server has closed connection' }

Check Kafka server logs for the exact reason why Kafka server has closed connection.

It's this config making connection problem:
 connectionString: config.zookeeperAddress. If I comment out this line and start it connects with no error!

In production scenario, I have to provide connectionString. Also there's nothing in the kafka server log that states why connection is closed.
Any idea or suggestion how to fix it?

So probably your config.zookeeperAddress is wrong.
This line server: 'localhost:2181', means you are trying to connect to the port 2181 which is normally Zookeeper port, not Kafka. Kafka is using port 9092 usually.


make kconfig help is difficult to understand

Hi,
I found it difficult to understand what the targets in
make kconfig-help
were doing, and suspect others will find it so as well.
The documentation of this CLI, or maybe even the CLI itself, should be improved
so that it is easy for users to understand how they can interact with Kconfig.
This is the current help text:
sebo@mach:~/zephyr/samples/bluetooth/beacon$ make kconfig-help
make[1]: Entering directory '/home/sebo/zephyr'
make[2]: Entering directory '/home/sebo/zephyr/samples/bluetooth/beacon/outdir/nrf51_pca10028'
Configuration targets:

  config	  - Update current config utilising a line-oriented program
  nconfig         - Update current config utilising a ncurses menu based program
  menuconfig	  - Update current config utilising a menu based program
  xconfig	  - Update current config utilising a QT based front-end
  gconfig	  - Update current config utilising a GTK based front-end
  oldconfig	  - Update current config utilising a provided .config as base
  silentoldconfig - Same as oldconfig, but quietly, additionally update deps
  defconfig	  - New config with default from ARCH supplied defconfig
  savedefconfig   - Save current config as ./defconfig (minimal config)
  allnoconfig	  - New config where all options are answered with no
  allyesconfig	  - New config where all options are accepted with yes
  alldefconfig    - New config with all symbols set to default
  randconfig	  - New config with random answer to all options
  listnewconfig   - List new options
  olddefconfig	  - Same as silentoldconfig but sets new symbols to their default value

make[2]: Leaving directory '/home/sebo/zephyr/samples/bluetooth/beacon/outdir/nrf51_pca10028'
make[1]: Leaving directory '/home/sebo/zephyr'

To be specific. The answers to these questions should be obvious to most customers:
What is the difference between config and oldconfig?
What does "additionally update deps" mean?
An interface that looked something like this would be easier to understand I believe:
https://gist.github.com/SebastianBoe/23cca69b70a9a7f90000c50e37d1a888

most of those options are originally from Linux and not being used in Zephyr, we should only document those we use in Zephyr and those that are tested to work with how zephyr does configuration using kconfig.

I was not aware, yes, that should definitively be done.
Could you list here which options are supported by Zephyr? Maybe I could save some time
if I skip some targets while I am porting to CMake.

does not apply anymore


Update snapshot version 2.1.9 snapshot

Updated version to 2.1.9-SNAPSHOT

Codecov Report

:exclamation: No coverage uploaded for pull request base (v2.1.x@3e636d3). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             v2.1.x     #444   +/-   ##
=========================================
  Coverage          ?   75.34%
=========================================
  Files             ?       48
  Lines             ?     1456
  Branches          ?      163
=========================================
  Hits              ?     1097
  Misses            ?      270
  Partials          ?       89

Continue to review full report at Codecov.

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


Chat and profile are not displayed properly on very small screens

Now fixed with different styling on very narrow screen


Do not send email already in FAILED state.

Yes, there should be a cron job that should be controlling this - on it's select.

cronjob is correct:
   emailMessages = ((ArraySink)       emailMessageDAO         .where(EQ(EmailMessage.STATUS, Status.UNSENT))
Ok, would like this a a failsafe for the time being.


Can't connect using UDP

using the VPNGATE plugin some servers support UDP, and I can choose between SSL-VPN using TCP or UDP like the picture
sometimes I add a new connection selecting one of servers in VPNGATE, but when I connect I don't have the option to select between TCP or UDP, so how can I do that, I found no option to do that even in the vpncmd

Append '/tcp' to the server name to use TCP.
Append '/' to use UDP.

/tcp works with me
but using UDP by appending / to the server name didn't work
just to mention, that server I'm connecting to has UDP available!!, and connect successfully when I use the VPNGATE plugin

this is the same server when connected by the vpngate plugin

NAT-T uses DDNS name to UDP hole punching.
Please try DDNS name instead of numeric IP.

Thank you MtCedarNet
but it still doesn't work
appending "/" to the host name like "vpn684161662.opengw.net/" didn't work and give a connection error
I tried the server name without "/" it connects but the problem comes again and uses TCP
appending /tcp is the same without /tcp
and to mention, the server support UDP
and why Softether doesn't support UDP but only if I use their DDNS, if I have my own server with UDP port already available why I need to use DDNS!!!
I mean if Softether is ALL IN ON app, this is not good to support something like that in their client!

btw the references say, if I didn't append any thing, it will automatically search for UDP connection available, if it didn't find it, it will start using TCP
and if I out /tcp it will start using tcp even if UDP is available
but in all cases, however, I append /tcp or not, it doesn't use UDP even if it is available
only if I use the VPNGATE plugin

https://github.com/SoftEtherVPN/SoftEtherVPN/issues/341
New maintainer needed

I'm having the same issue. Cannot seem to connect with UDP. I'm successfully forwarding traffic of my mc server through TCP but another game server im trying to do required UDP and that doesnt work.
How do i solve it?


Performance drop when Camera gets close to mesh with OmniLight shadow contact bias > 0

Godot version:
Godot_v3.0.6-stable_win64
OS/device including version:
Window10
Issue description:
i import obj made by blender.
after that player character close to imported mesh,
frame drop
Steps to reproduce:
run project and walk to wall and look around
Minimal reproduction project:
FPSRPG.zip

i found reason.
off shadow contact option to zero solve problem

Confirmed on the master branch (f2cc96984) with the above project, I have 60 FPS until I get close to the wall where FPS drop to 20-30.
Setting the OmniLight's shadow_contact to 0 in Room1.tscn solves it, but any non-null value incurs the performance drop (whether 1 or 8).

Still a problem, almost submitted my own issue before I found this

Godot version:
Latest stable: v3.1.1.stable.mono.official
OS: Ubuntu 18.04 bionic
Kernel: x86_64 Linux 4.18.0-18-generic
GPU: GeForce GTX 960
Drivers: nvidia-driver-418
GodotTestProject.zip

Maybe we should just remove contact shadows? They're too slow/broken to be usable in my experience, even on high-end GPUs with modern drivers.

I'll close this, as contact shadows are no longer available in the master branch (they were replaced by shadow pancaking, which does a similar job better).


Upgrade MQTTNet to latest version, add support for .NET6.0, add support for Azure Functions v4.

@james-winstanley Thank you for submitting this. I recently received the notification recommending upgrading from Microsoft Azure, so this upgrade will be required

FYI
I've just used this branch to upgrade my project and ran into an issue when debugging locally.
An exception occurs when the function app attempts to load the function hosts  \SourceServer\75a3d8c751c8bdebbe7e950e8cd598a34e17cc48e6e17c89c9b975fae264571d\src\Microsoft.Azure.WebJobs.Host\Bindings\AttributeConverter.cs

The fix is to change the internal access modifier to public:

After that it works just fine.


[improve][broker] Backport Linux metrics changes from master branch to LS210

Backport https://github.com/apache/pulsar/pull/16832 which fixes https://github.com/apache/pulsar/issues/16601 .
This includes multiple other changes which are required dependencies for backporting the pull request.
This was achieved by cherry-picking https://github.com/apache/pulsar/pull/14648, https://github.com/apache/pulsar/pull/15365, copying over these specific files from master branch, cherry-picking https://github.com/apache/pulsar/pull/16832 and resolving merge conflicts on the way.
These are the files that were copied over from master branch (license header was modified to match JAVADOC_STYLE):
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/LinuxInfoUtils.java
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImpl.java
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/impl/LinuxBrokerHostUsageImplTest.java
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/BitRateUnit.java
pulsar-broker-common/src/test/java/org/apache/pulsar/broker/BitRateUnitTest.java
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadReportNetworkLimitTest.java
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java
pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadReportNetworkLimitTest.java

Java 11 has cgroup v2 support since 11.0.16 with https://bugs.openjdk.org/browse/JDK-8230305 changes.

PR submitted also to upstream apache/pulsar. More details in mailing list thread: https://lists.apache.org/thread/617pl5wgzoz1j1vldtjt8y8tg0qbrx4l


Fix go.mod for v3 release

Is your feature request related to a problem? Please describe.
Fix the go.mod for the v3 release similar to https://github.com/ossf/scorecard/pull/716

Thanks for creating this Naveen, I forgot we need to do this step. Do you want take this on?

Can someone please make a release 3.0.1 with this fix

Can someone please make a release 3.0.1 with this fix

Thanks, I can do that.


AttributeError: module 'numpy' has no attribute 'int'.

Initializing classes results in AttributeError
Code
from GPy.models.gp_coregionalized_regression import GPCoregionalizedRegression as CO
model = CO(X_list, Y_list,)

Error
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

#1017 is fixed but now the import still fails due to some numpy.testing import error. So again, "in progress" but now waiting for #1030

Hey @kyleosung
this has been fixed as off #1040
There is no new release yet but there aren't many issues remaining until we can release a hot fix.
In the meantime, you can install GPy from the git dependency at devel branch, if you need the fix urgently.

I will close your issue for the sake of a better overview on our issue board. If the issue persists, feel free to reopen.


serialise/deserialise transcript not working for folding/decider

The structure of the proof defined in Ultra/ GoblinUltra is different from what ProtoGalaxy is actually doing

Possibly, didnt  think about the best way to do it, just opened the issue as something that is missing


Part 1 (Homebrew): Relocate browser version warning

9.0.0 - 9.8.0: Follow this guide, but skip changing the date and time and initializing savedata in the beginning.

9.9.0 - 10.5.0: Follow this guide as written.

10.6.0 - 11.0.0, or have a browser version (the last number in the version, such as 11.0.0-33) of less than -20:

(Emphasis added). This pertains to all firmwares, because Browserhax won't work on firmwares less than -20.
I had an o3DS on firmware 8.x and then followed the guide to use a cart update to get to version 9.8.0U. Because the first sentence of this post indicated 9.8.0 users would be fine, I neglected the warning in the third line of this post.
As such, I think the warning should be relocated.

Huh? Those are both qualifiers for the section below it containing all alternate entrypoints...
I'm not going to copy and paste that entire section, and users should read everything before proceeding to do any instructions.

Could you please just bold "or"?

10.6.0 - 11.0.0, or have a browser version (the last number in the version, such as 11.0.0-33) of less than -20:


PR: Cache previous kernel attributes to speed kernel creation (IPython console)

Description of Changes
Cache a kernel to avoid waiting for a new kernel to launch.

[ ] Wrote at least one-line docstrings (for any new functions)
[ ] Added unit test(s) covering the changes (if testable)

[ ] Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved
Spyder is slow

Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

Perhaps we should use the improvements added to the latest jupyter-client for this?
https://github.com/jupyter/jupyter_client/pull/712
I mean, it seems to me that you're trying to achieve the same thing here.

I don't think MultiKernelManager is integrated into qtconsole, is it?

I don't think MultiKernelManager is integrated into qtconsole, is it?

No, it isn't. But I think we should integrate it in Spyder to simplify how we handle multiple kernels for our consoles. And, as a side effect, we could benefit from the improvements I mentioned in the PR above.

That is a good idea! What do you want to do with this PR? It is ready and works as expected, but the slow Win test fails because spyder.plugins.tours.widgets.FadingTipBoxgets the focus. I guess this PR trips this because of a race issue.

@ccordoba12 I have seen failures caused by spyder.plugins.tours.widgets.FadingTipBox in other PR so this is unrelated to this one

What do you want to do with this PR?

How substantial is the improvement with it? I mean, do you think it's worth to have it for Spyder 5, before doing the refactoring to use MultiKernelManager in 6?

It is ready and works as expected, but the slow Win test fails because spyder.plugins.tours.widgets.FadingTipBoxgets the focus

You can skip that test on Windows if you want. No big deal about it (the most important thing is trying to make all tests run in at least one platform).

It is a big quality of life improvement in my opinion. Opening a new console goes from ~5-10s to <1s on m’a window machine

What if we have a dictionary of cached kernels (keyed by the tuple that defines a cached kernel), so that we can rely on them for special consoles (Sympy, Pylab) and regular ones? That way we wouldn't have to discard the previous cached kernel and create a new one for different kinds of consoles.

I didn't want to have too many kernels cached without purpose. I guess 99% of the people will only use one kind.

I didn't want to have too many kernels cached without purpose. I guess 99% of the people will only use one kind.

Well, we could have five cached kernels or so. But this will be important when we add support to easily start kernels for any conda env detected in the system. The idea is to add a menu similar to Special consoles in Spyder 6 (or perhaps 5.3)

The problem is that creating a key is not trivial. The created kernel depends on:

is_cython
is_pylab
is_sympy
Plus on test specific values such as:
std_dir
self._test_no_stderr

But also on:

self.CONFIGURATION
Which might change at any point

Maybe the best approach is to merge this one and think about the best way to implement this, either with MultiKernelManager or with a dictionnary for different kernels

Sure, no problem with that. I thought it could be simpler to have a dict of cached kernels.
I'm leaving this for 5.3.0 to test it manually for some time after being merged (5.2.2 will be release really soon).

@impact27, please rebase on top of the latest 5.x to remove the changes present here that you also did in PR #17205.


Race condition when growing the buffer

There seems to be race condition when growing buffer and another go-routing reading from it
==================
WARNING: DATA RACE
Write at 0x00c4201e7730 by goroutine 59:
bytes.(*Buffer).grow()
/usr/local/go/src/bytes/buffer.go:146 +0x235
bytes.(*Buffer).Write()
/usr/local/go/src/bytes/buffer.go:174 +0x14f
../vendor/github.com/sirupsen/logrus.(*Entry).write()
/../vendor/github.com/sirupsen/logrus/entry.go:259 +0x26d
../vendor/github.com/sirupsen/logrus.Entry.log()
/../vendor/github.com/sirupsen/logrus/entry.go:231 +0x2fd
../vendor/github.com/sirupsen/logrus.(*Entry).Log()
/../vendor/github.com/sirupsen/logrus/entry.go:268 +0x137
../vendor/github.com/sirupsen/logrus.(*Entry).Info()
/../vendor/github.com/sirupsen/logrus/entry.go:285 +0x5e
../vendor/github.com/sirupsen/logrus.(*Entry).Print()
/../vendor/github.com/sirupsen/logrus/entry.go:281 +0x56
../vendor/github.com/sirupsen/logrus.(*Logger).Print()
/../vendor/github.com/sirupsen/logrus/logger.go:211 +0x6d
Previous read at 0x00c4201e7730 by goroutine 119:
../tasks.TestPayments()
/usr/local/go/src/bytes/buffer.go:66 +0xa616
testing.tRunner()
/usr/local/go/src/testing/testing.go:777 +0x16d
Goroutine 119 (running) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:824 +0x564
testing.runTests.func1()
/usr/local/go/src/testing/testing.go:1063 +0xa4
testing.tRunner()
/usr/local/go/src/testing/testing.go:777 +0x16d
testing.runTests()
/usr/local/go/src/testing/testing.go:1061 +0x4e1
testing.(*M).Run()
/usr/local/go/src/testing/testing.go:978 +0x2cd
main.main()
_testmain.go:106 +0x324

Can you provide a unit test which would exhibit this issue ?

Please help me get my phone secure and remove remotes tags patterns Bluetooth bootloader etc. I need 2 be debugged

I've seen this error and it was because I was creating by own byte buffer in a test, setting it as the output for logrus, and then trying to read the contents of the buffer in the test.
I fixed it by using the Logger.Hooks.Add(Hook) method  to create a callback to watch for the messages I cared about.

can we close this issue @johnrengelman ?

I would think so. The OP looks to be doing a test so using the Hooks would be the right way


How do I get tooltips to always show in V2?

I've managed to get this working in V1 and have found an example of it working in V2 alpha, but I can't seem to get it working in the latest beta.
I may eventually want to always show one particular tooltip, but hoping I can figure that out later.
animation: {

                    onComplete: function () {
                        var self = this;
                        var elementsArray = [];
                        Chart.helpers.each(self.data.datasets, function (dataset, datasetIndex) {
                            Chart.helpers.each(dataset.metaData, function (element, index) {
                                var tooltip = new Chart.Tooltip({
                                    _chart: self.chart,
                                    _data: self.data,
                                    _options: self.options,
                                    _active: element,
                                   _view: element._view
                                }, self);
                                tooltip.update();
                                tooltip.draw();
                            }, self);
                        }, self);
                    }
                }

Here's an example of it working in V2 alpha: https://jsfiddle.net/c8Lk2381/
Thanks in advanced.

I really REALLY need this to be answered. It was very easy pre-2.x

@andi-b  - as a temporary workaround, you can use the new pluginService to do this. Here's a fiddle doing that http://jsfiddle.net/q15ta78q/ (yaay pluginService!)
Chart.pluginService.register({
	beforeRender: function (chart) {
		if (chart.config.options.showAllTooltips) {
			// create an array of tooltips
			// we can't use the chart tooltip because there is only one tooltip per chart
			chart.pluginTooltips = [];
			chart.config.data.datasets.forEach(function (dataset, i) {
				chart.getDatasetMeta(i).data.forEach(function (sector, j) {
					chart.pluginTooltips.push(new Chart.Tooltip({
						_chart: chart.chart,
						_chartInstance: chart,
						_data: chart.data,
						_options: chart.options,
						_active: [sector]
					}, chart));
				});
			});

			// turn off normal tooltips
			chart.options.tooltips.enabled = false;
		}
	},
	afterDraw: function (chart, easing) {
		if (chart.config.options.showAllTooltips) {
			// we don't want the permanent tooltips to animate, so don't do anything till the animation runs atleast once
			if (!chart.allTooltipsOnce) {
				if (easing !== 1)
					return;
				chart.allTooltipsOnce = true;
			}

			// turn on tooltips
			chart.options.tooltips.enabled = true;
			Chart.helpers.each(chart.pluginTooltips, function (tooltip) {
				tooltip.initialize();
				tooltip.update();
				// we don't actually need this since we are not animating tooltips
				tooltip.pivot();
				tooltip.transition(easing).draw();
			});
			chart.options.tooltips.enabled = false;
		}
	}
})

and then
new Chart(ctx, {
    type: 'pie',
    data: data,
    options: {
        showAllTooltips: true
        ...

@potatopeelings that's a great use of the plugin service!

@potatopeelings This worked great for me! Thank you!!!

No longer works in version 2.1.6.
http://jsfiddle.net/syvpqfne
Error: TypeError: callbacks is undefined ::: Chart.js (Row 7755)

@biiwii updated here: http://jsfiddle.net/tk31rehf/
The options object passed to the tooltip changed

@etimberg ::: sorry, so easy. thank you!

I wonder why this isn't a default option..

What if I want to display tooltips based on an outside event other than hovering over the chart? I'd love to be able to pass an x,y into something and have it show the tooltip.

How do you make it so that the label is not shown when you click one of the labels on the legend which will hide that data from the pie chart? As in this example: http://jsfiddle.net/tk31rehf/
When you click the legend "Green", it removes the green from the pie chart, but still shows the tooltip. How do you get it to hide the green tooltip on green in that scenario?

Hi! How can I do this through Angular-chart-js?

I'm using chartjs 2.4.0. I copied the code above:
Chart.pluginService.register({
beforeRender: function (chart) {
if (chart.config.options.showAllTooltips) {
// create an array of tooltips
// we can't use the chart tooltip because there is only one tooltip per chart
chart.pluginTooltips = [];
chart.config.data.datasets.forEach(function (dataset, i) {
chart.getDatasetMeta(i).data.forEach(function (sector, j) {
chart.pluginTooltips.push(new Chart.Tooltip({
_chart: chart.chart,
_chartInstance: chart,
_data: chart.data,
_options: chart.options,
_active: [sector]
}, chart));
});
});
        // turn off normal tooltips
        chart.options.tooltips.enabled = false;
    }
},
afterDraw: function (chart, easing) {
    if (chart.config.options.showAllTooltips) {
        // we don't want the permanent tooltips to animate, so don't do anything till the animation runs atleast once
        if (!chart.allTooltipsOnce) {
            if (easing !== 1)
                return;
            chart.allTooltipsOnce = true;
        }

        // turn on tooltips
        chart.options.tooltips.enabled = true;
        Chart.helpers.each(chart.pluginTooltips, function (tooltip) {
            tooltip.initialize();
            tooltip.update();
            // we don't actually need this since we are not animating tooltips
            tooltip.pivot();
            tooltip.transition(easing).draw();
        });
        chart.options.tooltips.enabled = false;
    }
}

})
Then implemented it:
var ctx = document.getElementById("chrtWhoPays");
var myChart = new Chart(ctx, {
type: 'doughnut',
data: {
labels: ["Payer1", "Payer2", "Payer3", "Payer4", "Payer5", "Payer6"],
datasets: [{
data: [51.9, 22.3, 15.7, 7.9, 0.6, 1.6],
backgroundColor: [
'#333',
'#547b84',
'#2faea9',
'#a2d5ab',
'#433c3b',
'#e4efc1'
]
}]
},
options: {
responsive: true,
showAllTooltips: true
    }
});

But I get the error message "Chart.Tooltip.positioners[opts.position] is not a function".
What am I doing wrong?

@xantari , for your pointed problem add the check if the item is visible before forcing the tooltip to display (tooltip._active[0].hidden).
As can be seen from the change in line 60 of this example.

@lschneiderman. As @etimberg mentioned earlier, you have to change line 37 from _options: chart.options to _options: chart.options.tooltips to be compatible with version after 2.1.6.
The following example works in version 2.4.0.

Hello, thanks for the excellent plugin! Quick question... does anyone know how to prevent tooltips from overlapping if they're always showing? See example below. Thanks! 😄

Did ChartJS ever implement this as a default option? seems like very common use case. Anyone that has got this working using angular2-chartjs? Im trying to figure this out.

@lschneiderman, how to use this plugin in Angular?
I tried to put it strait in controller. no errors. but as only I added  showAllTooltips: true into chart options i got libs.1.2.201705291730.js:1 TypeError: Cannot read property 'xPadding' of undefined
I'm using Chartjs 2.1.4

@jack100501 - I haven't used angular yet - sorry.

I am looking for a solution to a similar problem.
I want to achieve following.
Click on a tooltip data point, it should stick there until I click any other tooltip, the previous tooltip should close upon opening a new one.
Clicking and sticking tooltip is working with events: ['click'] parameter in options, but it doesn't show any data point upon hover.
Any suggestions on how to achieve it?

I use react chart js 2
how can I use the Chart?
is undefined..


Error Deserialization

TDO spits out an integer "status" value for errors and jsonapi spits out a string. This change supports both for deserialization.

👍


cmd: extend tikv-ctl to support the Flashback command trigger

What is changed and how it works?

Issue Number: Close #14748 after https://github.com/pingcap/kvproto/pull/1118 merged
What's Changed:

- Support flashback the whole cluster.
`tikv-ctl --pd <IP_ADDRESS>:2379 flashback --version<PHONE_NUMBER>61082369`

- Support flashback cluster within the given region ids or key ranges.
`tikv-ctl --pd <IP_ADDRESS>:2379 flashback region 2,4,6 --version<PHONE_NUMBER>61082369`
`tikv-ctl --pd <IP_ADDRESS>:2379 flashback
--start<PHONE_NUMBER>000000FF4E5F728000000000FF1443770000000000FA
--end<PHONE_NUMBER>000000FF4E5F728000000000FF21C4420000000000FA
--version<PHONE_NUMBER>61082369`

Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)

Firstly need to use pd-ctl halt schedule
./pd-ctl config set halt-scheduling true

use test;
create table t (id int);
insert into t values (1), (2), (3);
begin; select @@tidb_current_ts; rollback;

+--------------------+
| @@tidb_current_ts  |
+--------------------+
|<PHONE_NUMBER>61082369 |
+--------------------+

insert into t values (4), (5), (6);

tikv-ctl --pd <IP_ADDRESS>:2379 flashback --version<PHONE_NUMBER>61082369

output:
flashback all stores success!

select * from t;

+------+
| id   |
+------+
|    1 |
|    2 |
|    3 |
+------+

Can check

schedule halt at pd metrics
peer in flashback state at tikv metrics

Release note
None

/review default

@JmPotato @nolouch  PTAL, thx!

Can we deprecate the ResetToVersion command?
I will do that in another pr, and update doc for reset-to-version as well.

Put main logic which controls flashback 2 phase at the client. PTAL again, thx! @JmPotato @Connor1996

@Connor1996 can u leave a merge label? thx!

@overvenus PTAL~ thx!

Could you implement flashback in debug2.rs too?

Okay, I will do it at another pr.

@overvenus can u leave a merge label? thx!

/merge

/retest

/test

/test

/test

/test

/test


problem is that no one even look at this appp and realize is has no names for anything idiots

Summary

Motivation

Describe alternatives you've considered

Additional context

Thanks for reaching out!
We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.
Thanks for understanding and meeting us halfway :grinning: