Is it possible to retrieve FS.Files from a Meteor method rather than pub/sub

I tested retrieval of uploaded files from a meteor method. The data arrives at the client as Fs.File array but methods such as isUploaded, isImage etc aren't working. Is pub/sub the only option to push uploaded Fs.File's to the client?

Can you share the code?

Sorry I forgot to include sample code. Below is a Meteor method that returns FS.Files to the client for display.

if(Meteor.isClient){
var imageStore = new FS.Store.FileSystem("images");
Images = new FS.Collection("images", {
  stores: [imageStore]
});
}

if(Meteor.isServer){
var imageStore = new FS.Store.FileSystem('images', {
    path: '~/dev/test/collectionFS/thumbnails'
});
Images = new FS.Collection("images", {
  stores: [imageStore],
  filter: {
    allow: {
      contentTypes: ['image/*']
    }
  }
});

  Metoer.methods({
    fetchImageFiles: function (fileIds) {
        this.unblock()
        check(fileIds, [String]);

        if (fileIds.length > 0) {
            return Images.find({
                _id: {
                    $in: fileIds
                }
            },{uploadedAt: -1}).fetch();
        }
        return [];
    }
});

}

//Use Meteor method fetchImageFiles in template like
var fsfiles = new ReactiveVar()
 Template.files.helpers({
    fetchimages: function(imagefileIds){
      Meteor.call("fetchPostFiles", imagefileIds,function(error, files){
          fsfiles.set(files);
      });
      return fsfiles.get();
     },
}

Off the top of my head I can't think why the methods are not available as the pub/sub is just managing the synchronisation of the cursor, which the documents get transformed into FS.Files. Maybe setup a sample repo with this code to isolate the problem and provide less barriers for someone else to run it for more help. I notice you have a mismatched method call fetchPostFiles, although since you said you have the FS.Files on the client, I'm assuming this is just an error with your example.

… but the more important issue is why not just use a cursor? What's the use case?
Based on your original post, I was expecting the file to be returned based on an event, and since your helper has a declarative name (instead of images), it confused me.

We'll need a full reproduction app to investigate this. I think it probably should work, but I can't remember how the EJSON/transform stuff interacts.

Also of course make sure you do have the cfs:ejson-file package added, but it sounds like you do if you say they are coming across as FS.File instances.

Sorry guys. I had to do a copy/paste/edit for the sample code which didn't work as well. I will put together a repo.

@aldeed  Yeah. I do have cfs:ejson-file package added. @rhyslbw Use-case wise, this is helpful if you don't need files reactively (less work for meteor's data mergebox). The idea is to retrieve files adhoc on the client when they are needed without meteor reactively tracking the file.

@emmanuelbuah Sure makes sense. I'm a little confused over the use of a helper to do the fetching rather than using an event though. Will wait for the repo

@rhyslbw can you elaborate on what you mean by "use of event".

Let's see a full working example before continuing the conversation, as it will be easier to understand for us both.

I'll close this issue @emmanuelbuah, but feel free to reopen if you need to


Gateway.exe giving odd errors

I am running the gateway.exe from my windows 8.1 machine and implementing the example given for the Sound Meter, replacing the actual data with dummy data to be sent over the socket. I am getting the following errors:
2015-06-03 10:55:16.8137 ERROR Error on lock: {"ClassName":"System.AggregateException","Message":"One or more errors occurred.","Data":null,"InnerException":{"NativeErrorCode":11001,"ClassName":"System.Net.Sockets.SocketException","Message":"No such host is known","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.Net.Dns.GetAddrInfo(String name)\r\n   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)\r\n   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)\r\n   at Amqp.TcpTransport.d__5.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetAddrInfo\nSystem, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Dns\nSystem.Net.IPHostEntry GetAddrInfo(System.String)","HResult":-2147467259,"Source":"System","WatsonBuckets":null},"HelpURL":null,"StackTraceString":"   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait()\r\n   at Amqp.TcpTransport.Connect(Connection connection, Address address, Boolean noVerification)\r\n   at Amqp.Connection.Connect(SaslProfile saslProfile, Open open)\r\n   at Amqp.Connection..ctor(Address address, SaslProfile saslProfile, Open open, OnOpened onOpened)\r\n   at Amqp.Connection..ctor(Address address)\r\n   at Microsoft.ConnectTheDots.Gateway.AMQPSender1.ReliableSender.EstablishSender() in c:\\Users\\Cameron\\Desktop\\connectthedots-master\\Devices\\Gateways\\GatewayService\\Gateway\\Utils\\MessageSender\\AMQPSender.cs:line 129","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nThrowIfExceptional\nmscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Threading.Tasks.Task\nVoid ThrowIfExceptional(Boolean)","HResult":-2146233088,"Source":"mscorlib","WatsonBuckets":null,"InnerExceptions":[{"NativeErrorCode":11001,"ClassName":"System.Net.Sockets.SocketException","Message":"No such host is known","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.Net.Dns.GetAddrInfo(String name)\r\n   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)\r\n   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)\r\n   at Amqp.TcpTransport.<ConnectAsync>d__5.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetAddrInfo\nSystem, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Dns\nSystem.Net.IPHostEntry GetAddrInfo(System.String)","HResult":-2147467259,"Source":"System","WatsonBuckets":null}]} 2015-06-03 10:55:16.8414 ERROR Exception on sendObject reference not set to an instance of an object. 2015-06-03 10:55:16.8999 ERROR Error on lock: {"ClassName":"System.AggregateException","Message":"One or more errors occurred.","Data":null,"InnerException":{"NativeErrorCode":11001,"ClassName":"System.Net.Sockets.SocketException","Message":"No such host is known","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.Net.Dns.GetAddrInfo(String name)\r\n   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)\r\n   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)\r\n   at Amqp.TcpTransport.<ConnectAsync>d__5.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetAddrInfo\nSystem, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Dns\nSystem.Net.IPHostEntry GetAddrInfo(System.String)","HResult":-2147467259,"Source":"System","WatsonBuckets":null},"HelpURL":null,"StackTraceString":"   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait()\r\n   at Amqp.TcpTransport.Connect(Connection connection, Address address, Boolean noVerification)\r\n   at Amqp.Connection.Connect(SaslProfile saslProfile, Open open)\r\n   at Amqp.Connection..ctor(Address address, SaslProfile saslProfile, Open open, OnOpened onOpened)\r\n   at Amqp.Connection..ctor(Address address)\r\n   at Microsoft.ConnectTheDots.Gateway.AMQPSender1.ReliableSender.EstablishSender() in c:\Users\Cameron\Desktop\connectthedots-master\Devices\Gateways\GatewayService\Gateway\Utils\MessageSender\AMQPSender.cs:line 129","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nThrowIfExceptional\nmscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Threading.Tasks.Task\nVoid ThrowIfExceptional(Boolean)","HResult":-2146233088,"Source":"mscorlib","WatsonBuckets":null,"InnerExceptions":[{"NativeErrorCode":11001,"ClassName":"System.Net.Sockets.SocketException","Message":"No such host is known","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":"   at System.Net.Dns.GetAddrInfo(String name)\r\n   at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)\r\n   at System.Net.Dns.GetHostEntry(String hostNameOrAddress)\r\n   at Amqp.TcpTransport.d__5.MoveNext()","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetAddrInfo\nSystem, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Dns\nSystem.Net.IPHostEntry GetAddrInfo(System.String)","HResult":-2147467259,"Source":"System","WatsonBuckets":null}]}
2015-06-03 10:55:16.9280 ERROR Exception on sendObject reference not set to an instance of an object.
2015-06-03 10:55:16.9553 ERROR Exception in task:    at Microsoft.ConnectTheDots.Gateway.AMQPSender1.SendAmqpMessage(Message m) in c:\Users\Cameron\Desktop\connectthedots-master\Devices\Gateways\GatewayService\Gateway\Utils\MessageSender\AMQPSender.cs:line 355    at Microsoft.ConnectTheDots.Gateway.AMQPSender1.b__0(Message m) in c:\Users\Cameron\Desktop\connectthedots-master\Devices\Gateways\GatewayService\Gateway\Utils\MessageSender\AMQPSender.cs:line 324
at Microsoft.ConnectTheDots.Common.SafeAction`1.SafeInvoke(TParam obj) in c:\Users\Cameron\Desktop\connectthedots-master\Devices\Gateways\GatewayService\Common\SafeAction.cs:line 48
2015-06-03 10:55:16.9553 ERROR Message in task: Object reference not set to an instance of an object.
On my dummy code, it is showing that the socket successfully connects and is sending the JSON data to the socket. What gives? Why is this not properly running on Windows?

' "Message":"No such host is known" ' - it looks like the amqp connection string is wrong, could you please check?

Closed due to lack of activity. Please re-open if necessary.


May be NERDTree need natural sort for files, or sub-folders

Description
Seem like NERDTree doesn't support natural sort for files in a folder, or sub folders...
Is there a way i can change it. Or can we make it a feature for NERDTree ?

Thank you you all for such a great plugin :heart:

I'm going to call this one a bug, and I'll look into it soon.

I may have been premature in labeling this a bug. I tried confirming it as such this morning, and all seems to be working well. I was prepared to make changes, thinking perhaps the period was causing issues, but that doesn't appear to be the case either. The only thing I can think of is your settings. Do you have
let NERDTreeNaturalSort = 1

in your vimrc? That will turn on natural sorting, and it works with both files and folders.

Yep, thanks @PhilRunninger. It work perfectly. Btw i think it should be in the doc too.

See :h NERDTreeNaturalSort. It's already there.


Load plugin From MemoryStream

Is it possible to load plugin directly from memory stream and not DLL Assembly file ?
Example when using Roslyn to emit compiled code to MemoryStream, then use the MemoryStream to load the plugin directly instead of creating Assembly and save it to a file and then load it using PluginLoader.
Use Cases  useful in unit testing, I have source code which can be compiled to MemoryStream using Roslyn, load the plugin then change the source code and compile again, after that reload the plugin and test the changes without creating any files.

This is not possible with the current API. New API would need to be added to the internal calss ManagedLoadContext support this scenario. It should be possible using https://docs.microsoft.com/en-us/dotnet/api/system.runtime.loader.assemblyloadcontext.loadfromstream?view=netcore-3.0.
Marking as 'help wanted'. This is something I'm okay adding if you want to write a pull request, but it doesn't seem like a very common scenario so I'll leave it up to you.

Currently I will not have the time to write a pull request, thanks anyway.


fix: show master marksman proc overlay

overlay config table was using the wrong number of aura stacks - the proc aura doesn't have stacks
after reaching 5 stacks of "Ready, Set, Aim..." the aura is removed and replaced with a single stack of "Fire!"

Quick tip: because the final buff (Fire!) has no stacks, there is no need to set stacks = 1 to the effect. Not setting any stacks will default to stacks = 0 which means "any number of stacks". I took the liberty of changing it in 82952d439df2befc5b8090c7c87210ec07740f2d.


⚠ Samsung has degraded performance

In 8ffa4bb, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2453 ms

Resolved: Samsung performance has improved in 6b30d0c.


FR: Deep Linking

I was wondering if you had plans to add deep linking / history.js support to the tool? Thought I'd ask before I started hacking away, as it's a pretty useful feature for sending people to a particular image, especially if the thumbnail gallery in question contains a large number of images.

Personally, I find deeplinking pretty irritating, so I don't have it on my TODO list. But if you'd like, you could create an add-on for this behavior.

I think Deep Linking is pretty essential if the plugin is to have use in galleries. For example, if you visit here:
http://stuff.denyerec.co.uk/venice2011/
And then decide you want to tell your friend about the picture of the bridge... There is no way to do this. Even if the files are numbered, masonry layouts make counting awkward, and in a large square-set gallery it would be impractical.
However:
http://stuff.denyerec.co.uk/venice2011/#!DSCF0764_p.jpg
Simple :)
If you have an existing add-on you can point me to so I can inspect the code to figure out how to do this I could try, though I am unlikely to be able to make an add-on that will meet your code quality requirements. Much as I would like to publicly contribute - the current deep linking on my site is a quick hack that no doubt would attract a lot of negative attention.

You could simply use History.js yourself and by using .bind("opening.tos") updating the url with the image url (or any other identifier) for instance.
Only thing you need to do then is check for the presence of the url fragment (or identifier) on page load and trigger a click/opem on the link that matches it.

JvanderHeide, that's pretty much the solution I arrived at, it's just surprising that deeplinks are less common 'out of the box'. Nobody wants to email a link to a gallery to a colleague and tell them to "Checkout the 47th image in the gallery, it's really cool" - it's preferable to send links to the intended image itself, but retain the context of the page / gallery.  Obviously you could just send the URI to the single image file, but this then causes confusion for the average user should they wish to browse more from the gallery.

@Denyerec I agree :+1:

@FrDH Will you accept pull request if we implement this feature as optional?

Any word on this?

I've hit this issue again... any word on an update?

I finally used http://photoswipe.com/ - it can link to images by hashed URL and is perfectly usable on touch devices.

Unfortunately this repo is no longer actively maintained due to the large amount of alternative slider- and lightbox plugins.


Update cutting tutorials to send ISA circuits to Qiskit Runtime

[x] fix indentation of commented out code in tutorials
[x] Remove explicit session.close(), following https://github.com/Qiskit/qiskit-ibm-runtime/pull/1139
[x] Update cutting tutorials 1 and 3 to use a hardware backend and transpile for it before sending to Runtime
[ ] Update cutting tutorial 2
[ ] Anything else to do on cutqc tutorials or how-tos?

I'm saving the SamplerV2 update (488) for a subsequent PR.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

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 93.541%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2346

Relevant Lines:
2508

💛  - Coveralls


Use src/twig.js as package's main script instead of the compiled twig.js

Fixes #825

While this make debugging application code easier, I guess I was thinking in #825 that it would make debugging the tests easier as well. Can you update the tests use the source code instead of the compiled twig.js file too?

Good call :+1:

Looks great, thanks @RobLoach!


Updated SVHN dataset(Allowing to use the full training set)

I was recently trying to replicate a papers result on Pytorch, but noticed the current implementation only allows for using either train or extra splits for training, however nearly all papers that have experimented with SVHN, use the full dataset, i.e both the train and extra splits together.
So I added a few changes to the original implementation that allows one to easily train using the full dataset. and thought it would be a good idea to share it with everyone. So here it is.
The API is backward compatible (everything is the same tbh) so now one can easily do :
import torchvision.datasets as dtset
...
if args.dataset == 'svhn':
     train_dir,val_dir = dtset.SVHN(args.data_path, split='download-all', download=True).create_dataset(args.outputdir)
     num_classes = 10
...
    train_dataset = dset.ImageFolder( train_dir, transforms.Compose([transforms.ToTensor() ]))
    train_loader = torch.utils.data.DataLoader(train_dataset,
        batch_size=args.batch_size, shuffle=True,
        num_workers=args.workers, pin_memory=True, sampler=None)

    test_dataset = dset.ImageFolder(val_dir, transforms.Compose([transforms.ToTensor() ]))
    test_loader = torch.utils.data.DataLoader(test_dataset,
        batch_size=args.batch_size, shuffle=False,
        num_workers=args.workers, pin_memory=True)

and utilize the whole training set and easily replicate any papers result on SVHN in Pytorch.
For those who have a huge amount of memory and prefer the in-memory method, they can do :
import torchvision.datasets as dtset
if args.dataset == 'svhn':
    train_data = dtset.SVHN(args.data_path, split='train-extra', transform=train_transform, download=True)
    test_data = dtset.SVHN(args.data_path, split='test', transform=test_transform, download=True)
    num_classes = 10
...
    train_loader = torch.utils.data.DataLoader(train_data, batch_size=args.batch_size, shuffle=True,
                           num_workers=args.workers, pin_memory=True)
    test_loader = torch.utils.data.DataLoader(test_data, batch_size=args.batch_size, shuffle=False,
                          num_workers=args.workers, pin_memory=True)

Hope its useful.
Best Regards,
Hossein

Hi,
Thanks for the PR!
Quick question: is there an advantage of this PR over using torch.utils.data.dataset.ConcatDataset with the current SVHN datasets?

Hi,
No. The reason this is implemented is that I'm simply new to Pytorch and I didn't know about torch.utils.data.dataset.ConcatDataset at all!
Actually torch.utils.data.dataset.ConcatDataset is a much better idea, however since SVHN is one of the major datasets which many papers present their results based on the full dataset, it would make much more sense to have it readily available.

Ok, thanks for your reply!
One more question: is train+extra an official split of the dataset, or was it done afterwards?
I'm a bit ambivalent on integrating this change given that it's fairly easy to combine datasets with ConcatDataset, and is also more robust (one can combine MNIST, SVHN, EMNIST, etc into a single dataset).
What do you think?

Yes train+extra is an official split of the dataset.
Yes, on the second thought it seems a simple example demonstrating the use of torch.utils.data.dataset.ConcatDataset  in the documentation can easily make up for this change and the issue is really solved!


Standardize source linting: spaces vs tabs; common copyright header

(this issue is motivated 50% by code quality, 50% by me familiarizing myself with the code base)
I couldn't help but notice a few files with spaces intermixed with the tabs :smile:. There are also...

A few different copyright header variations
At least one file (Babel.cs) with nonstandard line endings.
Trailing whitespace occasionally

It's supposed to use tabs in most places, and spaces in .json files. See the editorconfig: https://github.com/reactjs/React.NET/blob/master/.editorconfig
The copyright header is supposed to be 2014-Present, someone updated it via a pull request a while back. Maybe they missed some of the files

Line endings should be fixed now


export deps from gtk

Fixes #143

Looks good to me but the same should also be done for the other crates or not? E.g. gio should re-export glib, pango should re-export glib, etc.

Looks good to me but the same should also be done for the other crates or not? E.g. gio should re-export glib, pango should re-export glib, etc.

I'm not sure how useful that would be? otherwise I can do that as well

I'm not sure how useful that would be? otherwise I can do that as well

The same way how it's useful from gtk :) Why is gtk different?
Also it would be inconsistent otherwise.

@bilelmoussaoui How should we proceed here?

I will update the PR today 😊

@bilelmoussaoui This conflicts now and also needs to be rebased

@sdroege should be ready

Looks good to me otherwise


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-k8s-26-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 3431

Questions ?
Please refer to the Backport tool documentation


Translate docs to English version

The project creator team focused on creating docs in Portuguese, but to expand the number of people contributing with the project it's necessary to translate the documentations to a English version.

@mechamobau Hey! I'm interested on tackling this one 😄
To get a clearer view though, the docs would be the monorepo's and its package's READMEs, right?
Should we create a README.en.md maybe?

Hey @jliocsar, thanks for the interest in contributing to the project!

the docs would be the monorepo's and its package's READMEs, right?

Yes, right! :D

Should we create a README.en.md maybe?

My idea is to make english the default language to the repo, so all READMEs can be translated to an english version and the current READMEs filenames renamed to README.pt-br.md. Does make sense?
If you have any other questions that I can respond to, please ask! I'm here if you need help ;)

@mechamobau Right! That sounds better indeed! Awesome, I'll open a PR when I have it done. Thanks! 😄


Collection2 usage with meteor-kitchen

I am using collection2 with meteor-kitchen and it works great but while showing error messages i am having difficulties. To make collection2 (and simple-schema) work with kitchen-generated code there needs to make a small change. I'll try to explain what i did and i'll propose a solution :)

i have added schema.js which includes schema for my collections and custom error messages
i have cloned bootstrap template (it's not necessary but i dont want to loose my changes upon new version installs)
i have modified form.html so that all span's having the id error-text to have id FIELD_NAME-error. this way when the code is generated i'll have uniq error fields for each field
i have modified errorAction function in form.js file. The problem is that the parameter passed to this function is not the whole error object but just the error string. With collection2 the error object has all the fields with errors and the error message. With the error object i can identify field name, find the element with the name FIELD_NAME-error and print the error message to there.

What needs to be done  is a modification in the generated insert method. It's originally as below.
newId = Invoice.insert(values, function(e) { if(e) errorAction(e.message); else submitAction(); });

It would be great if it was like below
newId = Invoice.insert(values, function(e) { if(e) errorAction(e); else submitAction(); });

Btw with this change there needs a small change in the original errorAction in form.js function to show the message insted of the object .

@kadirerdogan makes sense. Form component is to be completely refactored anyway. I'l change these two things in next version (v0.9.35) to help you out.
BTW, can schema.js be automatically generated from data passed via collection & fields? Did you find some missing property useful to auto-generate schema for collections2? Asking this because I'l add collections2 in the near future, so your thoughts are useful.
Thanks.

Kitchen collection & fields are similar to the collection2 schema definition and a basic schema can be auto generated from it but collection2 has a few more feature. For instance you can define a regex for each field (i like this very much :).
Let me paste my schema.js and collection and fields from the json file for the Payments collection so that you can compare :)
Btw, I didn't use every feature of collection2 schema.
//my manually written schema.js file
var Schemas = {};
Schemas.Payments = new SimpleSchema({
    amount: { type: String, label: "Miktar", allowedValues:["70.00"] },
    tckno: { type: String,regEx: /^[0-9]{11}$/, label: "TCK no", min: 11, max: 11 },
    cc_no: { type: String, regEx: /^[0-9]{16}$/,label: "Kart no", min: 16, max: 16 },
    cc_name: { type: String, label: "Kart sahibi" },
    cc_cvv2: { type: String, regEx: /^[0-9]{3}$/,label: "cvv2", min: 3, max: 3 },
    size: { type: String, max:4, allowedValues:["XXL","XL","L","M","S","XS"], label: "Beden" },
    check: { type: Boolean, allowedValues:[true] , label: "Kullanım ve gizlilik koşulları" },
    cc_expiry: { type: String, max:7, label: "Son kullanma tarihi" },
    department: { type: String, label: "Bolum", optional: true, max: 15 }
});
SimpleSchema.messages({
  required: "[label] zorunlu bilgidir",
  minString: "[label] en az [min] karakter olmalıdır.",
  maxString: "[label] en çok [max] karakter olmalıdır",
  minNumber: "[label] en az [min] olabilir",
  maxNumber: "[label] en çok [max] olabilir",
  minDate: "[label] [min] tarihinden daha erken olamaz",
  maxDate: "[label] [max] tarihinden daha gec olamaz",
  badDate: "[label] geçerli bir tarih değil",
  minCount: "You must specify at least [minCount] values",
  maxCount: "You cannot specify more than [maxCount] values",
  noDecimal: "[label] geçerli bir rakam olmalıdır",
  notAllowed: "[label] seçili değil",
  expectedString: "[label] bir karakter kümesi olmalı",
  expectedNumber: "[label] bir rakam olmalı",
  expectedBoolean: "[label] evet yada hayır değeri olmalı",
  expectedArray: "[label] must be an array",
  expectedObject: "[label] bir obje değeri taşımalı",
  expectedConstructor: "[label] must be a [type]",
  "regEx cc_cvv2":"[label] 3 basamaklı bir rakam olmalıdır",
  "regEx cc_no":"[label] 16 basamaklı bir rakam olmalıdır",
  "regEx tckno":"[label] 11 basamaklı bir rakam olmalıdır",
keyNotInSchema: "[key] veriyapısında bulunmuyor"
});
Payments.attachSchema(Schemas.Payments);

"collections": [{
  "name": "payments",
  "fields": [{
    "name": "amount",
    "input": "tl",
    "show_in_update_form": false,
    "default": "70.00",
    "title": "Miktar",
    "exportable": true
  }, {
    "name": "tckno",
    "show_in_update_form": false,
    "title": "Tck No",
    "required": true,
    "exportable": true
  }, {
    "name": "cc_name",
    "show_in_update_form": false,
    "title": "Kart Sahibi",
    "required": true,
    "exportable": true
  }, {
    "name": "cc_no",
    "show_in_update_form": false,
    "title": "Kart No",
    "required": true,
    "exportable": true
  }, {
    "name": "cc_cvv2",
    "show_in_update_form": false,
    "title": "CVV",
    "required": true,
    "exportable": true
  }, {
    "name": "cc_expiry",
    "show_in_update_form": false,
    "input": "ccexpiry",
    "format": "MM/YY",
    "show_in_dataview": false,
    "title": "Gecerlilik Tarihi",
    "required": true,
    "exportable": true
  }, {
    "name": "department",
    "title": "Bölüm",
    "required": true,
    "exportable": true,
    "input": "select",
    "lookup_query": {
      "name": "department",
      "collection": "department",
      "options": {
        "sort": {
          "name": 1
        }
      }
    },
    "lookup_key": "name",
    "lookup_field": "name"
  }, {
    "name": "size",
    "title": "Beden",
    "input": "select",
    "input_items": ["XXL", "XL", "L", "M", "S", "XS"],
    "required": false,
    "exportable": true
  }, {
    "name": "check",
    "title": "",
    "required": true,
    "show_in_read_only_form": false,
    "show_in_update_form": false,
    "show_in_dataview": false,
    "input": "checkbox",
    "input_items": ["Kullanım ve gizlilik koşullarını kabul ediyorum"],
    "exportable": true
  }, {
    "name": "type",
    "title": "Kayıt türü",
    "show_in_update_form": false,
    "show_in_insert_form": false,
    "exportable": true
  }, {
    "name": "status",
    "title": "Durum",
    "show_in_update_form": false,
    "show_in_insert_form": false,
    "exportable": true
  }, ],

  "owner_field": "ownerId",
  "roles_allowed_to_read": ["admin", "owner"],
  "roles_allowed_to_update": ["admin"],
  "roles_allowed_to_delete": ["nobody"],
  "before_insert_source_file": "js/vpos.js",
}]

Thanks for that. Did you tried autoform too? I gave a look at both and collection2 would certainly be a nice addition. Concerning autoform, I'm not sure if it would be the best choice since it would outsource the form fields type choices.
My (very personnal) concern is that I need a proper upload control and a file api (see https://github.com/perak/kitchen-site/issues/68) and I would love to see it available in meteor-kitchen.

No i didnt try autoform since i like the existing form generation method. It's very flexible and easy to customize via template modification. But i would like to have reactive way of showing errors feature too :)

hi kadirerdogan
i have been going through this issue and its very clear but i just want to know how do show the form in the html side. like in autoform they show it the following way...
{{> quickForm collection="collectoinName" id="insertForm" type="insert"}}
so how do i do this in kitchen?

Hi @Maqhosha ,
You can find the generated templates at "client/views/" folder.
Form generation of kitchen is not like quickForm. Generation does not happen on the fly. The forms are generated when you run the meteor-kitchen to generate the code. Then the forms are there statically to be used until you generate them again with meteor-kitchen.
Let's say you have a page named invoices, then you will find that "client/views/invoices/insert/insert.html" is the insert form template to be used to insert new invoice. You can use that template as you wish. But don't modify it directly since you'll loose all modification when you run meteor-kitchen again to generate the code.
I hope i understood your question correct :)

@kadirerdogan
yes u did thank you, I finally managed to modify the code manually and use autoform :)

@Maqhosha maybe you still can use meteor-kitchen instead manually editing generated code: use "custom_component" instead "form".
{
  "name": "my_form",
  "type": "custom",
  "html": "<div>{{> quickForm collection=\"COLLECTION_VARIABLE\" id=\"COMPONENT_ID\" type=\"insert\"}}</div>"
  "js": "",
  "query_name": "YOUR_QUERY_NAME_HERE",
  "query_params": []
}

?

its working fine thank you


fix: add decoding for blockchain.response base64 tx data

Also slight refactor make it easier to track the TM-rs bug.

Codecov Report

Merging #345 (8738fa4) into main (accdd64) will increase coverage by 0.00%.
The diff coverage is 0.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main     #345   +/-   ##
=======================================
  Coverage   82.96%   82.97%
=======================================
  Files         130      130
  Lines       15130    15133    +3
=======================================
+ Hits        12552    12556    +4
+ Misses       2578     2577    -1

Impacted Files
Coverage Δ

src/many-modules/src/_8_async.rs
89.44% <0.00%> (-1.52%)
:arrow_down:

... and 2 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Problem installing node-sass with Ionic framework

Hey guys
I have a problem using sass with ionic-framwork (ionic setup sass), I get the following:
/Users/tom/Projekte/Roomies/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22
    throw new Error('`libsass` bindings not found. Try reinstalling `node-sass`?');
    ^

Error: `libsass` bindings not found. Try reinstalling `node-sass`?
    at getBinding (/Users/tom/Projekte/Roomies/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:22:11)
    at Object.<anonymous> (/Users/tom/Projekte/Roomies/node_modules/gulp-sass/node_modules/node-sass/lib/index.js:188:23)
    at Module._compile (module.js:434:26)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/tom/Projekte/Roomies/node_modules/gulp-sass/index.js:3:17)
    at Module._compile (module.js:434:26)

Error running gulp sass

Exception with  (CLI v1.6.4)

Your system information:

Cordova CLI: 5.3.1
Gulp version:  CLI version 3.9.0
Gulp local:   Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.4
Ionic App Lib Version: 0.3.8
ios-deploy version: Not installed
ios-sim version: 3.0.0
OS: Mac OS X Yosemite
Node Version: v4.0.0
Xcode version: Xcode 6.4 Build version 6E35b

Re-Installing node-sass ended up like this:
MB:motzne$ npm rebuild node-sass

><EMAIL_ADDRESS>install /Users/motzne/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js

><EMAIL_ADDRESS>postinstall /Users/motzne/node_modules/gulp-sass/node_modules/node-sass
> node scripts/build.js

  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/binding.cpp:1:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                ^
../node_modules/nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                          ^
../node_modules/nan/nan.h:334:27: note: previous definition is here
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../node_modules/nan/nan.h:768:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/src/node_buffer.h:31:40: note: candidate function not viable: no known conversion from 'uint32_t' (aka 'unsigned int') to 'enum encoding' for 3rd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/tom/.node-gyp/4.0.0/src/node_buffer.h:43:40: note: candidate function not viable: 2nd argument ('const char *') would lose const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
/Users/tom/.node-gyp/4.0.0/src/node_buffer.h:28:40: note: candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
                                       ^
/Users/tom/.node-gyp/4.0.0/src/node_buffer.h:36:40: note: candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
                                       ^
In file included from ../src/binding.cpp:1:
../node_modules/nan/nan.h:772:12: error: no viable conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object>'
    return node::Buffer::New(v8::Isolate::GetCurrent(), size);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:210:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to
      'const v8::Local<v8::Object> &' for 1st argument
class Local {
      ^
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:210:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::MaybeLocal<v8::Object>' to
      'v8::Local<v8::Object> &&' for 1st argument
class Local {
      ^
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:214:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:326:13: note: candidate template ignored: could not match 'S *' against 'v8::MaybeLocal<v8::Object>'
  V8_INLINE Local(S* that)
            ^
In file included from ../src/binding.cpp:1:
../node_modules/nan/nan.h:779:26: error: no member named 'Use' in namespace 'node::Buffer'
    return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
           ~~~~~~~~~~~~~~^
../src/binding.cpp:70:11: warning: 'FatalException' is deprecated: Use FatalException(isolate, ...) [-Wdeprecated-declarations]
    node::FatalException(try_catch);
          ^
/Users/tom/.node-gyp/4.0.0/src/node.h:283:29: note: 'FatalException' has been explicitly marked deprecated here
                inline void FatalException(const v8::TryCatch& try_catch) {
                            ^
/Users/tom/.node-gyp/4.0.0/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                                         ^
../src/binding.cpp:245:11: warning: 'FatalException' is deprecated: Use FatalException(isolate, ...) [-Wdeprecated-declarations]
    node::FatalException(try_catch);
          ^
/Users/tom/.node-gyp/4.0.0/src/node.h:283:29: note: 'FatalException' has been explicitly marked deprecated here
                inline void FatalException(const v8::TryCatch& try_catch) {
                            ^
/Users/tom/.node-gyp/4.0.0/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                                         ^
../src/binding.cpp:365:11: warning: 'FatalException' is deprecated: Use FatalException(isolate, ...) [-Wdeprecated-declarations]
    node::FatalException(try_catch);
          ^
/Users/tom/.node-gyp/4.0.0/src/node.h:283:29: note: 'FatalException' has been explicitly marked deprecated here
                inline void FatalException(const v8::TryCatch& try_catch) {
                            ^
/Users/tom/.node-gyp/4.0.0/src/node.h:66:42: note: expanded from macro 'NODE_DEPRECATED'
    __attribute__((deprecated(message))) declarator
                                         ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/tom/.node-gyp/4.0.0/src/node.h:42:
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:221:5: error: assigning to 'v8::Primitive *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:501:12: note: in instantiation of function template specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/tom/.node-gyp/4.0.0/src/node.h:42:
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:221:5: error: assigning to 'v8::Boolean *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:511:12: note: in instantiation of function template specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/tom/.node-gyp/4.0.0/src/node.h:42:
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:221:5: error: assigning to 'v8::Function *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1645:12: note: in instantiation of function template specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
    return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
In file included from ../src/binding.cpp:1:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/tom/.node-gyp/4.0.0/src/node.h:42:
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:221:5: error: assigning to 'v8::Object *volatile' from incompatible type 'v8::Value *'
    TYPE_CHECK(T, S);
    ^~~~~~~~~~~~~~~~
/Users/tom/.node-gyp/4.0.0/deps/v8/include/v8.h:180:37: note: expanded from macro 'TYPE_CHECK'
    *(static_cast<T* volatile*>(0)) = static_cast<S*>(0);      \
                                    ^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1776:12: note: in instantiation of function template specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
    return NanEscapeScope(
           ^
../node_modules/nan/nan.h:483:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(Nan::imp::NanEnsureLocal(val))
                             ^
3 warnings and 10 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/motzne/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/lib/build.js:272:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/motzne/node_modules/gulp-sass/node_modules/node-sass/node_modules/pangyp/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/motzne/node_modules/gulp-sass/node_modules/node-sass
gyp ERR! node -v v4.0.0
gyp ERR! pangyp -v v2.3.2
gyp ERR! not ok
Build failed

Any help?

I'm having the same problem

Same problem here, going back to Node v0.12.7 "fixed" the problem for now, so it probably has to do something with the Node v4 update?

See #1141. It's trying to force<EMAIL_ADDRESS>which is old and supports only node up to version 0.12. Try using npm install node-sass to get the latest version.

It worked.. thanks guys, this took me a while.. :(

updated to latest everything, works ok now

I've PR'd ionic to fix their broken dependency https://github.com/driftyco/ionic/pull/4449

Hi everyone!
I've just fixed problems with libsass or node-sass with this command:
$ sudo rm -rf node_modules/ && cat package.json | sed -i.bak 's/"gulp-sass": "^X.X.X"/"gulp-sass": "^2.0.4"/g' package.json && npm install && ionic lib update

Where X is the version of gulp-sass in your package.json
Explanation:
Remove the old files in node_modules. I'm not sure is necessary to use 'sudo' (in my case, yes).
$ sudo rm -rf node_modules/

Search and replace inside package.json updating gulp-sass version to ^2.0.4. It also creates a backup (package.json.bak),
$ cat package.json | sed -i.bak 's/"gulp-sass": "^X.X.X"/"gulp-sass": "^2.0.4"/g' package.json

Reinstall dependencies
$ npm install

Update the ionic lib in the project
ionic lib update

If you have any further problems be sure I try can help you...
Bye

@gabfiocchi . Thanks man! it worked for me.

@gabfiocchi  YOU ROCK! Thanks!!

Here is some advice for anyone else who encounters this issue and tried the above without result. (although I do appreciate the effort! of course! ;-) ) It seems that there are different causes that lead to this problem and I found out the hard way that google really was not my friend on this one as it took me more time reading and searching than to pinpoint the issue myself and fix it.
So before you start installing a bunch of packages you may not need, downgrade node or follow any other time consuming advice you can find. Here is the not so magic solution you may have been waiting for. Upgrade ionic, create a blank project, run the ionic setup sass command. Does it work?  Great,  If not than your search is not over yet, but you can at least narrow it down to your environment. But if it does work, (I expect it will  for most) than just compare your packages and stuff to the ones in your own project.  My problem was that some third party starter kit I purchases was using an older version of gulp-sass. I just used my blank project as an example to updated the config files and voila. Works like a charm. :-)
Perhaps it is best to assume that third party packages on the marketplace are poorly maintained to prevent surpises.

Here is some advice for anyone else who encounters this issue and tried the above without result. (although I do appreciate the effort! ;-) ) It seems like there are different causes that lead to this problem and I found out the hard way that google really was not my friend on this one as it took me more time reading and searching than to pinpoint the issue myself and fix it.
So before you start installing a bunch of packages you may not need, downgrade node or follow any other time consuming advice you can find. Here is the not so magic solution you may have been waiting for. Upgrade ionic, create a blank project, run the ionic setup sass command. Does it work?  Great,  If not than your search is not over yet, but you can at least narrow it down to your environment. But if it does work, (I expect it will  for most) than just compare your packages and stuff to the ones in your own project.  My problem was that some third party starter kit I purchased was using an older version of gulp-sass. I just used my blank project as an example to update my configs and voila. Works like a charm. :-)
Perhaps it is best to assume that third party packages on the marketplace are poorly maintained to prevent surprises.

[ERROR] Unable to find command: setup sass
I got this error message while run ionic setup sass. How can I setup ionic setup sass ...

Please open an issue with ionic.
On 8 Nov. 2017 6:03 pm, "Anbarasan"<EMAIL_ADDRESS>wrote:
[ERROR] Unable to find command: setup sass
I got this error message while run ionic setup sass. How can I setup ionic
setup sass ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/sass/node-sass/issues/1142#issuecomment-342728766, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAjZWB4wx_mEQLukiYpLv1VLriyCN45kks5s0VJJgaJpZM4F8sU9
.


Bug: Scope with function is not added correctly

If you have a scope with a function like so:
@Scopes({
  something: function (id) {
    return {
      where: {id: id}
    }
  }
})

It doesn't get added properly to the Sequelize model. I was ready to open a PR to fix this, but I think it's beyond my knowledge of this module. The problem is in resolveScope in the lib/services/model file, it should check if the options is a function and if so, just add the scope. I'm not sure if there is something else that needs to be done to the function.

@kingjerod Thanks for contributing. I've investigated this one and... yes, you're right, this is a bug.


Type with optional properties don't intersect with a type with required properties

Type with optional properties don't intersect with a type with required properties by default. I'm not sure if that's the expected behavior, but it seems unexpected to me.
type X = {
  a?: string
};

type Y = {
  a: string
};

const testY : Y = {
  a: 'arst'
};

// Errors out here
const testX : X = testY;

I get an error [Flow Try Link]:
15: const testX : X = testY;
                      ^ Cannot assign `testY` to `testX` because string [1] is incompatible with undefined [2] in property `a`.
References:
8:   a: string        ^ [1]
4:   a?: string         ^ [2]

I would've expected no errors.
On the other hand, if I do [Flow Try Link]:
// No errors
const testY : (Y & X) = {
  a: 'arst'
};

const testX : X = testY;

interface seems to work fine.

To my understanding, this is expected behavior. An object with a required type can't flow into an object with an optional field for fear that it might be set to undefined.
For your use case, it may be that you never plan on editing the testX but flow doesn't know that. You can get around this by using $ReadOnly<X> instead.
const testX : $ReadOnly<X> = testY;
Hope that helps!

Yes that's helpful!


Issue with the stroke showing in rgb not HEX

I have an issue that the stroke in showing in RGB not HEX so it doesn't show in IE

How do I get it in HEX?
all the variables are in HEX
my code:
var element = document.getElementById('timeC');
var circle = new ProgressBar.Circle(element, {
	trailColor: '#D8D8D8',
	trailWidth: 10,
	strokeWidth: 10,

	// Set default step function for all animate calls
	step: function(state, circle) {
		circle.path.setAttribute('stroke', state.color);
	}
});

to start the circle:
circle.set(0);
circle.animate(0.5, {
	from: {color: '#00FF00'},
	to: {color: '#FFAE00'},
	duration: 7500
}, function(){
	circle.animate(0.99, {
		from: {color: '#FFAE00'},
		to: {color: '#FF0004'},
		duration: 10000
	});
});

The conversion from hex to rgb color is done by shifty, tweening library: https://github.com/jeremyckahn/shifty
Are you sure it is IE problem? Which version?

IE 11 on win7

but how do I stop it from converting?

I don't think that is your real problem. IE should support rgb color definition just as it supports hex. I just tested this with a jsfiddle using IE and it draws the SVG correctly. http://jsfiddle.net/b6fp1sy7/

That is probably related to CSS layouting. Try to:
#container > svg {
  display: block;
  width: 100%;
}

I can see it because I can see the trail that is colored in HEX but not the stroke...

I could not confirm this behavior.


Fix FC_SETTINGS in usage example

The example command was not reflecting with the given hypothetical folder structure

Thank you @WaDelma !


Token classifier & refactor filters

Q
A

Is bugfix?
❌

New feature?
✔

Breaks BC?
✔

Fixed issues
#39

ℹ  The classifier now also finds interfaces, traits and enums.

@rustamwin https://github.com/yiisoft/classifier/pull/41#issuecomment-1772970208?

@rustamwin https://github.com/yiisoft/classifier/pull/41#issuecomment-1772970208?

I will do it within 1-2 days.

Benchmark results here: https://github.com/yiisoft/classifier/pull/38#issuecomment-1782268810


Use Bitmex for price feed

I recommend using Bitmex API feed. Our "usual" source (kraken) does not offer CFDs.

I played around with this library which works nicely: https://github.com/dovahcrow/bitmex-rs/
unfortunately it hasn't been released for a while but the latest master works great.
It comes with ws subscription. This gives you the latest rates
let mut client = BitMEXWebsocket::new().await?;

client
    .send(Command::Subscribe(vec![
        Topic::QuoteBin1m(Some("XBTUSD".to_string())),
    ]))
    .await?;

while let Some(msg) = client.next().await {
println!("{:?}", msg);
    }

How complicated would it be to use the API ourselves using just a websocket lib like tungstenite? Unless the library offers us functionality like auto-reconnect, I'd hesitate to pull in more dependencies for this. Will likely just make it harder to implement the reconnect functionality we had to build for the kraken websocket.

How complicated would it be to use the API ourselves using just a websocket lib like tungstenite?

I don't know - didn't try to implement it myself :) Bitmex says The BitMEX API conforms to the Swagger spec for REST endpoints. Any Swagger-compatible client can connect to the BitMEX API and execute commands. So I guess it wouldn't be too hard to implement ourselves.
bitmex-rs uses tokio_tungstenite under the hood for ws (not sure about reconnection functionality). I guess we can just orientate ourselves on it.
Own opinion: After working with it for a day I'm quite happy with it. It offers authenticated and non-authenticated connection for rest and ws api and has all the return types.
What's annoying is that it uses fehler and failure for error handling which I didn't warm up to yet. Besides that, no issues (so far) :)

What's annoying is that it uses fehler and failure for error handling which I didn't warm up to yet. Besides that, no issues (so far) :)

Oh god. That makes me think it is not very well-maintained :/
failure was an early iteration of what is now the std-lib Error trait but they are incompatible with each other. Most crates have moved on and just utilize the std-lib Error trait.

bitmex-rs uses tokio_tungstenite under the hood for ws (not sure about reconnection functionality). I guess we can just orientate ourselves on it.

Sounds good! Scanning through their Cargo.toml, I can see a few things that I'd like to avoid:

fehler and failure being two of them
chrono is a rather heavy and outdated time library. I'd much rather use time 0.3 instead if we need more advanced date-time functionality.
derive_builder will trade compile-time for convenience. Not an amazing choice for a library.
Not sure if we need serde_urlencoded and serde_qs for the parts of the API that we want to talk to.

For the price feed, the websocket API should be good enough yeah? Copying / re-implementing the parts that we need sounds better to me. Gives us flexibility to easily implement re-connecting in case Bitmex's API turns out to disconnect at times, similar to the Kraken one and it keeps our dependency graph reasonably lean.


[BRANCH - "convert-react"] add a bottom to top scroll button

Navigate to the folder
Check 2nd Branch, name- convert-react
Clone this, and navigate to main-website folder, this is the main website we are converting into react website after you have done, PR to the convert-react branch, not in the "main" branch. Add your details to contributors.json file.
Feature?
Add a Bottom to Top scroll button
it's hard to scroll when you are on mobile device, so please add a Bottom to Top button  with an arrow icon
Bug?
NO
Task:
add button here
Desktop version position:

Mobile version position:

please make sure, it only shows if you scroll down. otherwise, it won't show.
You can join our discord server - let's build together Join

Assign this to me @devvsakib

Assign this to me @devvsakib

assigned

Should I have to Implement It on all the pages or only on contributors page @devvsakib

Should I have to Implement It on all the pages or only on contributors page @devvsakib

all page, or try to use in app.js file

@devvsakib  Check PR: #137

Solved by #134

Solved by #137


CLR Windows Form Problem

Required Info

Camera Model
D400

Operating System & Version
Windows 10 x64  (Visual Studio 2017)

Windows SDK version
10.0.16299.0

Platform toolset
Visual Studio 2017 (v141)

SDK Version
2.10.4

I am trying to build a GUI using CLR Windows Form to get data from D415.
But as I include librealsense2/rs.hpp I get this error:
Error	C1189	#error:   is not supported when compiling with /clr or /clr:pure.
How can I fix this problem?

[Realsense Customer Engineering Team Comment]
@tarekmuallim
I've tried to create Visual C++ Windows Desktop application and include the librealsense2/rs.hpp as attachment, I didn't see the effor you mentioned. Can you attach your project for me to check? thank you.

Attachment for above comment.

@carypai
@RealSense-Customer-Engineering
Thank you for the replay.
Actually, I am developing a C++/CLI application
https://msdn.microsoft.com/en-us/library/hh875053.aspx
Project1.zip
so I am using a CLR windows form.
Attached you find a copy of the project.
Thanks again.

Project1.zip

Hi @tarekmuallim
I can confirm that what you are trying to do is correct and should work. rs_types.hpp seem to have couple of includes that has no place there. I'll create a pull-request and it will be published in 2.12 release.
You have couple of options until then:

Use the .NET wrapper assembly. You can consume our .NET wrapper from both C# and C++ CLI (and any other CLR language) If your end-goal is WinForms / WPF type GUI, using C# would probably make more sense.
Use the C API (#include <librealsense2\rs.h>
Manually remove #include <mutex>, #include <condition_variable> and #include <atomic> from rs_types.hpp.

Hi @dorodnic
Thank you for the reply.
Right now I have to use C API.
I didn't find  #include <mutex> in rs_types.hpp .
I find #include <condition_variable> and  #include <atomic>
I also try to remove this two includes but still have error.
If the problem is in rs_types.hpp could you please send me a copy of the modified one?
Thanks again.

ok I see.
Thank you for your help.

Ok
Thank you.


Set root export directory to lib/js-yaml/

This allows to import specific files only. Use case could be:
const yaml = require('js-yaml/loader')
const FAILSAFE_SCHEMA = require('js-yaml/schema/failsafe')

yaml.safeLoad('hello-world: 1234.5678', { schema: FAILSAFE_SCHEMA })

No root hacks


Fix typo in add-expression_test.bal

Purpose
Fixed typo.
fucntion -> function

Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

@MaryamZi THX!


Custom error message for registries

https://github.com/rancher/rancher/issues/6321
The error message in the UI wasn't clear in case of default and whitelist registries so that has been changed in this PR
@alena1108

The TFs test_indirect_ref_sidekick_destroy_instance , test_link_remove_restore, test_docker_volumes and test_docker_newfields from build number 3 and 4 seem unrelated. Build 1 and 2 pass. This PR also makes changes in core/test_docker.py file to fix some pre-existing flake8 errors.

@alena1108 can you please review this?


Unable to connect to the url : https://cti-taxii.mitre.org/taxii/ for server discovery

Hi,
I using the cti-taxii-client for the first time inorder to subscribe to a taxii 2.x version of feed . I have the cti-taxii-client installed on my linux and used the following python script to connect to the https://cti-taxii.mitre.org/taxii/ feed - as described in  one of the blogs.. https://www.mitre.org/capabilities/cybersecurity/overview/cybersecurity-blog/attck™-content-available-in-stix™-20-via
Instantiate server and get API Root
server = Server("https://cti-taxii.mitre.org/taxii/")
api_root = server.api_roots[0]
But while trying to connect i am getting :
File "/usr/lib/python2.7/site-packages/requests/models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 406 Client Error: Not Acceptable for url: https://cti-taxii.mitre.org/taxii/
But this URL seems to be working fine.. Would like to get some help with the taxii client onhow to connect tothe taxii2 feeds
Appreciate your time

i saw this wasalready replied in closed issues page.. thanks

Related #66


Tournament of the Ten Bloods - She Who Erases - Mountains hiding passage entrance near Kagrenzel, and burring statue.

Without Cathedral - Improved Mountain LOD and Z Fight Patch (WIP) -->

With Cathedral - Improved Mountain LOD and Z Fight Patch (WIP) -->

If I try to remove Cathedral - Improved Mountain LOD and Z Fight Patch (WIP), it completely breaks the game map
Can we get a patch please? :)
Thank you in advance.

Not the place to post bug reports; please read the readme on how


Updated PortFolio, User Guide and Developer Guide, removed Viewall Command and added test cases for menu

Coverage increased (+0.3%) to 58.926% when pulling 2f980e4502ea7d20fd2c3f2e0bc3deaa5c265777 on SalsabilTasnia:version3 into 34416c7957a7606dccdfe6443e1e6fb924272168 on CS2113-AY1819S1-F09-2:master.


Y24-461 - Tube Rack Banking Work Completion

User story
Part of the epic https://github.com/sanger/limber/issues/1713. Check the 'work completion' code works properly, to automatically pass the cell extraction requests.
Who are the primary contacts for this story
Katy, Andrew, Abdullah
Who is the nominated tester for UAT
Once https://github.com/sanger/limber/issues/1713 and its dependencies are complete, we can ask Abby if she will UAT it. Could send some screenshots for earlier feedback.
Acceptance criteria
To be considered successful the solution must allow:

[ ] When the transfer into an LRC Bank Seq or Spare tube is made, either by bed verification or 'manual transfer', the corresponding 'scRNA Core Cell Extraction' request is passed.
[ ] Update the integration suite tests if necessary.

It is not possible to release the implementation of this story in isolation. There are epic branches in use for SS, Limber and Int Suite to branch from and to.
Dependencies
Story relationships are shown in the Lucidchart diagram TubeRack Stories .
Additional context
The versioned tube rack model is researched in https://github.com/sanger/limber/issues/1482 and the model is summarised in the Google Document DPL-1011 Re-use of tube racks
This story is part of re-implementation of https://github.com/sanger/limber/issues/1314 (Banking) using the versioned tube rack model.

Link to details about state changer from Andrew - https://github.com/sanger/limber/issues/1700#issuecomment-2479124999

A state change of the tubes (ie. to Passed) after the transfers should also be reflected in a state change of the Tube Rack, so viewing the Tube Rack in Limber should reflect that (i.e. the rack should appear Passed too).


Offspring calculations

Finalize the calculation of offspring per day per location / location type.

Offspring is calculated in the file offspringLocations.csv. The file now includes those who were in a location with, e.g., the Exposed or Infected disease status, but did not infect anyone.
Here are a number of lines that show the infections (and non-infections) in offspringLocations.csv:
86.49495022580578,282306,"SecondarySchoolStudent",16,"M","Infected-Symptomatic",140858,22,"SecondarySchool",1
86.53545455895717,210928,"UniversityStudent",57,"M","Infected-Symptomatic",140054,44,"University",0
86.53789244768244,307201,"Worker",23,"M","Infected-Symptomatic",106695,0,"Workplace",0
86.62414765230412,118774,"SecondarySchoolStudent",12,"M","Infected-Asymptomatic",139625,29,"SecondarySchool",3
86.684671389405,194396,"Worker",55,"M","Infected-Symptomatic",139678,0,"Recreation",0
86.68638466742267,527906,"PrimarySchoolStudent",6,"F","Infected-Symptomatic",142226,0,"PrimarySchool",4
86.73496338219118,373804,"Worker",32,"M","Infected-Asymptomatic",120839,0,"Workplace",0
86.75011846536088,218450,"Worker",35,"M","Infected-Asymptomatic",124674,0,"Workplace",1
86.7748969137938,228212,"Worker",53,"F","Exposed",42064,1,"Accommodation",0

Reporting as intended.


Replace "03", "11", etc. icons with "C++03", "C++11", etc.

We received feedback on Reddit that these green icons are not self explanatory

Replace them throughout the site with "C++03", "C++11", etc.

That's gonna repeat the text "C++" quite a lot. Well, lets see how it looks.

How about something like this?

Oh my god... that is offensive, lol.
First of all, let's consider the source of the feedback. Reddit. I rather like how it looks now with just the number in the lozenge. It is tasteful and doesn't draw too much attention, yet still gets the job done. If it were up to me I would leave it as-is.
However there is an argument to be made that it should say "C++03", "C++11", "C++14" and so forth. We can try this, but following these guidelines:

Elongate the current lozenge to accommodate the additional text
Use a lower contrast color for the characters "C++". For example we use the dark color for the "11" text and white for the "C++" text. This helps de-emphasize the new problem of repetition of "C++".
We need to consider how dark mode will look with this change. Perhaps different colors for dark mode are needed.

I like the idea of extending the chip, perhaps the C++ could be de-emphasized with a similar shade so it's visible but not striking. Where did that green come from? I haven't seen it used anywhere else.
Something like this could work with dark mode as well by swapping the colors to whatever the primary color we are using for dark mode

I like this because "C++" is there to help users understand what the thing's about, while on the other had is light colored enough that it doesn't clutter the page when duplicated many times over.

Yes these samples are a great start! The number font and style needs to exactly match what we already have though. And can we condense and thin out the "C++" part so the lozenge is as narrow as possible? Also please use the same colors as on the site now. We reserve the Boost Mustard color for Very Important and Rare Things (like library names).

Will do, I was just throwing together something quick as an example. I agree that the "C++" is a bit long. I checked Font Awesome to see if they had an Icon that would work better, but they don't have one, but they do for a lot of other modern languages..... I may just reduce the font size of the "++" so it's not as long.
I did manage to find where the green came from, it's in the boost assets on the twitter banner. #00de97
The website is a bit different, using #5ad599
Should that be considered and 'official' secondary color?

may as well assign this to myself, I've gotten this far with it...

Try an image, rendering with ultra narrow sans-serif font. Alternatively if there is a way to apply a matrix transform to text via CSS try scaling it 0.5 horizontally?

I may build an svg. It would scale better, and we could color it however we want.

SVG is a good idea yes, but any preview (such as the one above) needs to show it as a rendered image at the equivalent size, in the lozenge, because once you shrink it then it will not bear much resemblance to the larger preview. For example, I personally like the first one above, but those plus signs are going to get lost in the sauce.
Note that users expect version labels like "C++17" to be similar to a particular styling. Check out cppreference.com :
https://en.cppreference.com/w/cpp/container/span

Close up:

Small, unobtrusive sans-serif text. In this case the plus signs are kind of obnoxiously large, we can probably do something about that.

What about a hover effect? So the"C++" slides out when you mouse over it? The space already resembles a button so it may be intuitive to check
here's a scaled down version of the first one. The plusses are ok at this size.

The hover is an interesting idea but we should probably not get too fancy. I was thinking along these lines:

lol, I just noticed there is a tooltip on it as well. so I guess people don't actually think to hover over it.

One question: are these icons generated sort of on the fly based on the source text ("03", "11", etc.) or do we have a preset image stock set from which we select? If the latter, we need to have C++03, C++14, C++17, C++20, C++23 (and it won't hurt to already have C++26 and C++29 for the future).

They should be implemented using CSS and HTML, not images. It is just text on top of a rounded rect. You can see that it is selectable:

@vinniefalco are you good with this?

no way to know until we see it

ON yes that loos good. Can we use tabular figures?

I'm using the same font and squishing it with CSS, which is why the tabular spacing is off.  I'll see if I can adjust the kerning a bit to make it more consistent.

@vinniefalco any preference? I'm leaning toward the middle option.

They all look the same to me. Add "11" so we can see it side by side, because without tabular figures the number "1" is very thin.
Also, can we tighten up the horizontal spacing? The lozenge is too long

here is the spacing with all 11's, I'll adjust the lozenge spacing separately once we decide on this. I'm liking the second and third options.

What I am looking to see is "C++03" and "C++11" next to each other vertically.

Notice how "11" is more narrow than "03." This is because the digits are proportional not tabular.

ok, so you are wanting to change to a monospaced font for the lozenges?

LOL... NO!!! I want to use the tabular figures in the default sans-serif font, not change to a new font!
https://stackoverflow.com/questions/17626159/can-you-specify-tabular-lining-figures-for-webfonts

OH! ok, TIL, haven't seen that one before, I'll put something together with that.

Ah... well, this might help explain it:
https://www.monotype.com/resources/expertise/how-use-figure-styles-illustrator
https://www.reddit.com/r/typography/comments/zhu7ck/today_i_learned_about_tabular_figures/

here you go. I'll see about getting the lozenges narrower

is this narrow enough?

The last one is looking better, can we kill some of that space between the "++" and the "03"?

All good?

Yes! How does this look at 100%?

Minor UX thing, but in the libraries, in the card view, perhaps make the whole card clickable, and in the list view make the row clickable. As well as having some type of card or row level hover effect on each.

make the whole card clickable

Please open an issue
Yes those lozenges look great now!

Reopening as there's one page where the lozenges still look bad on Firefox

I don't understand why this happens. Can I please see the HTML?

completed Jul 23rd


[Bug Report][Android] x86_64 crash

Hello,

Crash when start App on the Mi PAD 2.
There are some errors on console:

F/flutter (12326): [FATAL:flutter/fml/platform/android/message_loop_android.cc(54)] Check failed: add_result == 1.
F/flutter (12383): [FATAL:flutter/fml/platform/android/message_loop_android.cc(54)] Check failed: add_result == 1.
F/flutter (12443): [FATAL:flutter/fml/platform/android/message_loop_android.cc(54)] Check failed: add_result == 1.

There are some information about Mi PAD 2:

Android 5.1
CPU: Intel Atom x5-Z8500 ( x86_64 )
RAM: 2G

I had try:

Flutter 3.7 (crach)
Flutter 3.10 (crash)
remove media_kit package and run on Mi PAD 2 ( ok )
use media_kit and run (Debug) on Virtual x86 Android 6.0 (crash, if run Release will get an error: Exception: Release mode is not supported for Android SDK built for x86.)
remove media_kit package and run (Debug) on Virtual x86 Android 6.0 (ok)
use media_kit and run on Android 11 arm64 ( ok )
use media_kit and run on Android 4.4 arm ( ok, no crash when start app )

Sorry, my English is so poor.
Thanks to anybody who replies.

Flutter doesn't even support x86 you genius.

Flutter doesn't even support x86 you genius.

But I can run release on Mi PAD 2 if remove media_kit package.
I know the release mode not support for x86.
But it can run debug on Virtual x86 Android if remove media_kit package, I think it maybe have some similarities and help for solve this issue.

Which APK are you running x86_64 or arm64 or armeabi?

Which APK are you running x86_64 or arm64 or armeabi?

I find the libflutter.so only in release APK/lib/x86_64.
I find the information about inter Atom x5-Z8500 is x86.
I don't know the inter Atom x5-Z8500 how to run as x86_64 .....

Flutter doesn't support x86 on any platform; including Android. However, Flutter does run on x86 in Debug (because Dart has support for x86 JIT) i.e. generally emulators that run on AMD based CPUs. We support them; like Flutter does.
In release builds however, you can't target x86 market with Flutter. It's very nominal regardless.

oh sorry, Bing tell me intel Atom x5-Z8500 is support 64bit, so it is x64.

I can't confirm for your device, it should be x86_64 then. Where, x86_64 APK should work fine.

yea, Looking forward to resolving this issue.

This crash can also appear in Android 5 to 6 emulators (both arm64 and x86_64).

Hey guys! I've found the cause & I'm on it. Give me some time.

It also crashed when I running an app (bili_you) which use media_kit on a Android 5.0.2 arm(MT6580) device.
I'm not sure why, because this device has only 512MB RAM.
But a user of bili_you run it on a mi phone (SnapDragon 625, Android 6.0, MIUI10, 2GB RAM) crashed too, so I don't think it's a OOM problem.
Sorry, my English is poor. I'm not sure if my expression is clear

Hey guys,
@coolight7 @mcLYX @lucinhu
May y'all confirm the fix:
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Do these APK crash?

Hey guys,
@coolight7 @mcLYX @lucinhu
May y'all confirm the fix:
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Do these APK crash?

Hello, have you fixed this issue?

Hey guys,
@coolight7 @mcLYX @lucinhu
May y'all confirm the fix:
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Do these APK crash?

Hello, my phone system is Android 6.0. After reading your reply, I tried Biliyou and it still shows that the software has stopped running. I'm not sure if you have fixed it or if the author wants to update it

Does my APK crash?
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Scroll down for links.
I will publish an update; and then BiliYou will be updated afterwards.

Hey guys,
@coolight7 @mcLYX @lucinhu
May y'all confirm the fix:
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Do these APK crash?

It seem works fine on my emulators(Android 5.0.2 x86_64 and Android 5.1 x86_64), but no video or audio output.

Does my APK crash?
https://github.com/alexmercerind/media_kit/actions/runs/5104934568
Scroll down for links.
I will publish an update; and then BiliYou will be updated afterwards.

On Android 6.0 x86_64 emulator: works fine!
On Android 5.0.2 and 5.1 x86_64 emulator: no video or audio output.

Hi @lucinhu, I'm more curious about physical devices.
I also tested upon both Android 5.0 & 6.0 emulators.
The audio output has been explicitly disabled on emulators with Android 7.0 or lower. Some of these emulators have broken OpenSL ES. Same can be said for video playback; we enforce software rendering in emulators.
https://github.com/alexmercerind/media_kit/blob/ece12b3e8721ace02a4c50d5f76f0e287dd9408b/media_kit/lib/src/player/libmpv/player/real.dart#L1630-L1633

cc @coolight7

Hi,
I had test on Mi PAD 2 (Android 5.1), it is well without crash !
But there are some errors on console :
I/flutter ( 6991): FormatException: Invalid UTF-8 byte (at offset 58)
I/flutter ( 6991): #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
I/flutter ( 6991): #1      Utf8Decoder.convert (dart:convert/utf.dart:351)
I/flutter ( 6991): #2      Utf8Codec.decode (dart:convert/utf.dart:63)
I/flutter ( 6991): #3      Utf8Pointer.toDartString (package:ffi/src/utf8.dart:49)
I/flutter ( 6991): #4      AndroidAssetLoader.loadSync (package:media_kit/src/utils/android_asset_loader.dart:57)
I/flutter ( 6991): #5      _IsolateConfiguration.applyAndTime.<anonymous closure> (package:dio/src/compute/compute_io.dart:129)
I/flutter ( 6991): #6      Timeline.timeSync (dart:developer/timeline.dart:166)
I/flutter ( 6991): #7      _IsolateConfiguration.applyAndTime (package:media_kit/src/utils/isolates.dart:129)
I/flutter ( 6991): #8      _spawn (package:media_kit/src/utils/isolates.dart:151)
I/flutter ( 6991): #9      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299)
I/flutter ( 6991): #10     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)
I/flutter ( 6991): {wid: 2098734, id: 0}

On Android 11 (arm64), it sometime will output some errors on console when start app :
I/flutter (16815): FormatException: Unexpected extension byte (at offset 58)
I/flutter (16815): #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
I/flutter (16815): #1      Utf8Decoder.convert (dart:convert/utf.dart:351)
I/flutter (16815): #2      Utf8Codec.decode (dart:convert/utf.dart:63)
I/flutter (16815): #3      Utf8Pointer.toDartString (package:ffi/src/utf8.dart:49)
I/flutter (16815): #4      AndroidAssetLoader.loadSync (package:media_kit/src/utils/android_asset_loader.dart:57)
I/flutter (16815): #5      _IsolateConfiguration.applyAndTime.<anonymous closure> (package:dio/src/compute/compute_io.dart:129)
I/flutter (16815): #6      Timeline.timeSync (dart:developer/timeline.dart:166)
I/flutter (16815): #7      _IsolateConfiguration.applyAndTime (package:media_kit/src/utils/isolates.dart:129)
I/flutter (16815): #8      _spawn (package:media_kit/src/utils/isolates.dart:151)
I/flutter (16815): #9      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299)
I/flutter (16815): #10     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

That's odd. Does video play on your Mi Pad 5?

That's odd. Does video play on your Mi Pad 2?

yea, it works well.
But it seem has a bug :

play video. ( ok )
play audio. ( ok )
play video and use setProperty("audio-files", audioPath) to  set another file to be audio. ( video works well, but no audio output )

On Mi Pad 2 and my another physical device (Android 11) both no audio output if use setProperty("audio-files", audioPath) now.
On windows both video and audio work well.
Use media_kit 0.0.8 from pub.dev, both video and audio work well on Android 11 and windows.

@coolight7, my goal is limited to offering stable & performant video & audio playback in regard to Player class.
And it seems it works great now.
I offer no support for internal libmpv usage (setProperty API is merely exposed for extreme usage or for the "sake of completion").  It's similar to forking the package & adding your own code. I can't guarantee support for any other internal property e.g. audio-files you decide to modify. You must read mpv's docs & proceed on your own. However, you must escape : character it seems. Learn more at https://github.com/alexmercerind/media_kit/pull/141.

thanks.

@coolight7

This error should not show. If this shows up, then subtitles won't work correctly.
I'm not seeing this on any of my emulators or devices. I can't reproduce it.

On Android 11 (arm64), it sometime will output some errors on console when start app :
I/flutter (16815): FormatException: Unexpected extension byte (at offset 58)
I/flutter (16815): #0      _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747)
I/flutter (16815): #1      Utf8Decoder.convert (dart:convert/utf.dart:351)
I/flutter (16815): #2      Utf8Codec.decode (dart:convert/utf.dart:63)
I/flutter (16815): #3      Utf8Pointer.toDartString (package:ffi/src/utf8.dart:49)
I/flutter (16815): #4      AndroidAssetLoader.loadSync (package:media_kit/src/utils/android_asset_loader.dart:57)
I/flutter (16815): #5      _IsolateConfiguration.applyAndTime.<anonymous closure> (package:dio/src/compute/compute_io.dart:129)
I/flutter (16815): #6      Timeline.timeSync (dart:developer/timeline.dart:166)
I/flutter (16815): #7      _IsolateConfiguration.applyAndTime (package:media_kit/src/utils/isolates.dart:129)
I/flutter (16815): #8      _spawn (package:media_kit/src/utils/isolates.dart:151)
I/flutter (16815): #9      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299)
I/flutter (16815): #10     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

I've published the updates:
There won't be any crashes on Android 5.0 or 6.0 etc. anymore. Thanks for report. Please don't hesitate in future.
dependencies:
  media_kit: ^0.0.9                              # Primary package.

  media_kit_video: ^0.0.11                       # For video rendering.

  media_kit_native_event_loop: ^1.0.4            # Support for higher number of concurrent instances & better performance.

  media_kit_libs_android_video: ^1.0.5           # Android package for video native libraries.
  media_kit_libs_ios_video: ^1.0.4               # iOS package for video native libraries.
  media_kit_libs_macos_video: ^1.0.5             # macOS package for video native libraries.
  media_kit_libs_windows_video: ^1.0.2           # Windows package for video native libraries.
  media_kit_libs_linux: ^1.0.2                   # GNU/Linux dependency package.

Hi @coolight7,
May you replace media_kit_libs_android_video as follows in your pubspec.yaml & re-build:
dependencies:
  ...
  media_kit_libs_android_audio:
    git:
      url: https://github.com/alexmercerind/media_kit.git
      ref: 360057d52e64251f037e67fbb47aeab2ad3d4923
      path: media_kit_libs_android_audio

If it works; I will update the package & roll things out. This will fix the FormatException bug you shared above.
A confirmation will be great. Hopefully no more issues on Android.
Thanks!

Hi @coolight7,
May you replace media_kit_libs_android_video as follows in your pubspec.yaml & re-build:
dependencies:
  ...
  media_kit_libs_android_video:
    git:
      url: https://github.com/alexmercerind/media_kit.git
      ref: 360057d52e64251f037e67fbb47aeab2ad3d4923
      path: media_kit_libs_android_audio

If it works; I will update the package & roll things out. This will fix the FormatException bug you shared above.
A confirmation will be great. Hopefully no more issues on Android.
Thanks!

Hi,
I have try it on Mi PAD 2 (Android 5.1) and Android 11, and without FormatException, the video and audio output work well.
But:
There are some new errors on console:
I/flutter ( 1770): Invalid argument(s): Failed to lookup symbol 'MediaKitAndroidHelperCopyAssetToExternalFilesDir': undefined symbol: MediaKitAndroidHelperCopyAssetToExternalFilesDir
I/flutter ( 1770): #0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33)
I/flutter ( 1770): #1      new DynamicLibrary.open (dart:ffi-patch/ffi_dynamic_library_patch.dart)
I/flutter ( 1770): #2      AndroidAssetLoader.loadSync (package:media_kit/src/utils/android_asset_loader.dart:44)
I/flutter ( 1770): #3      _IsolateConfiguration.applyAndTime.<anonymous closure> (package:dio/src/compute/compute_io.dart:129)
I/flutter ( 1770): #4      Timeline.timeSync (dart:developer/timeline.dart:166)
I/flutter ( 1770): #5      _IsolateConfiguration.applyAndTime (package:media_kit/src/utils/isolates.dart:129)
I/flutter ( 1770): #6      _spawn (package:media_kit/src/utils/isolates.dart:151)
I/flutter ( 1770): #7      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299)
I/flutter ( 1770): #8      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:189)

My apologies @coolight7,
It seems media_kit must also be updated in similar way, since name of symbol was changed. Something like this:
dependencies:
  ...
  media_kit_libs_android_video:
    git:
      url: https://github.com/alexmercerind/media_kit.git
      ref: 360057d52e64251f037e67fbb47aeab2ad3d4923
      path: media_kit_libs_android_audio

# Force updated media_kit with dependency_overrides.
dependency_overrides:
  media_kit:
    git:
      url: https://github.com/alexmercerind/media_kit.git
      ref: 360057d52e64251f037e67fbb47aeab2ad3d4923
      path: media_kit

My apologies @coolight7,
It seems media_kit must also be updated in similar way, since name of symbol was changed.

It works well and there are no error outputs !

Update package(s) to receive the updates:
dependencies:
  media_kit: ^0.0.10                             # Primary package.

  media_kit_video: ^0.0.12                       # For video rendering.

  media_kit_native_event_loop: ^1.0.4            # Support for higher number of concurrent instances & better performance.

  media_kit_libs_android_video: ^1.0.6           # Android package for video native libraries.
  media_kit_libs_ios_video: ^1.0.4               # iOS package for video native libraries.
  media_kit_libs_macos_video: ^1.0.5             # macOS package for video native libraries.
  media_kit_libs_windows_video: ^1.0.2           # Windows package for video native libraries.
  media_kit_libs_linux: ^1.0.2                   # GNU/Linux dependency package.


Making long table scrollable

Hello,
The tables are becoming vertically longer with the time. I just added the scrolling option to the tables so that one can observe any state easily.
Thanks.

For html changes, you need to update battleground-state-changes.html.tmpl, which generates battleground-state-changes.html.

I'm going to close this, we are going to default to collapsed tables, and want to retain page-level scrolling when expanded.


Move strip comments into own module and write tests

Move the strip comments functionality into its own module and provides tests.
It also avoids catastrophic back trace behavior with the string matching (single and double quote) patterns by making the handling of the escape characters \ and the capturing of the following characters more explicit.
To test this you can do the following:

open https://regex101.com/
switch to JS mode
use the old pattern ("(?:[^\\"]*(?:\\.)?)*")|('(?:[^\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$)) (the problematic part is actually ("(?:[^\\"]*(?:\\.)?)*")|('(?:[^\\']*(?:\\.)?)*'))
As a test string use "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This will result in a time out
You can switch also to PCRE2 mode which will tell you about the backtracking  problem.

Use the new pattern ("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))
Everything should be fine. I also improved performance to find multi line comments using a similar technique as I used for the escape character \ in strings.

@alexdima @jrieken can you please have a look. It is a long time that I wrote code for VS Code :-)

@bpasero @alexdima thanks for the review. Will merge the PR.


Challenge Basic JavaScript :: Manipulate Arrays with unshift() description not matching needed solution

The challenge in Basic JavaScript
"id": "bg9997c9c69feddfaeb9bdef",
"title": "Manipulate Arrays With unshift()"
asks us to unshift() the Array. However you have to first shift() the solution and then unshift() it in order to proceed.

@skusku You do not have to shift() the array, that is done for you.
@FreeCodeCamp/issue-moderators Thoughts?

Hmm, I had to shift() before it worked for me. I still feel strange that there's a shift when the description is clearly only about unshift(). The returned answer is in my eyes not what one would expect from the question.

@skusku Could you paste your code here?

// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy");
// ourArray now equals ["Happy", "J", "cat"]

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
myArray.unshift(["Paul",35]);

// Only change code below this line.

and this did not work:

// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy");
// ourArray now equals ["Happy", "J", "cat"]

// Setup
var myArray = [["John", 23], ["dog", 3]];

// Only change code below this line.
myArray.unshift(["Paul",35]);

@skusku It seems you removed the shift() from the default code
This is what I have with a reset to ensure I'm looking at default code:
// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy");
// ourArray now equals ["Happy", "J", "cat"]

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();

// Only change code below this line.

Oh okay oops! My bad then.


Add examples for the chat control

Related to doc#971.

Examples for the chat control
Example for the table control
Remove fallback hover text in Chat component
Hide JsonAdapter class
Minor fixes in reference and elements docs

Nice Avatar

This are Dall-E generated


HDMI_CEC Component Crashes Home Assistant During Start Up

Symptom: When I add the HDMI_CEC configuration as shown below into Home Assistant, HA fails to start up correctly. It gets several components into the startup sequence before stalling and becoming unreponsive. The UI fails to load and returns an "unexpected API" error message. If I remove the code below from my configuration, HA starts normally.
hdmi_cec:
  devices:
    1: Pi
    2:
      1: Chromecast
      2: OSMC

The libcec requirements are downloaded and I am able to control devices using the cec-cilent as well. The symlink is correct. The output of the cec-client scan function is shown below.
pi@RP3:~ $ echo scan | cec-client -s -d 1
opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address:       <IP_ADDRESS>
active source: no
vendor:        Vizio
osd string:    TV
CEC version:   1.4
power status:  on
language:      eng

device #1: Recorder 1
address:       <IP_ADDRESS>
active source: no
vendor:        Pulse Eight
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng

device #4: Playback 1
address:       <IP_ADDRESS>
active source: no
vendor:        Google
osd string:    Chromecast
CEC version:   1.4
power status:  on
language:      ???

device #5: Audio
address:       <IP_ADDRESS>
active source: no
vendor:        Yamaha
osd string:    RX-V373
CEC version:   1.4
power status:  on
language:      ???

Is anybody having similar experiences? I am running my HA config in a venv setup from the AiO script. Thanks much for the help in advanced! Cheers!

@brusc trying to set this up on my OSMC Pi, but not much luck with libcec & Python so far...
Are you sure 2.2 (OSMC) is a valid device on the cec bus? It does not seem to be in your cec-client output

Yeah,I'm still getting the same effect with this config.
hdmi_cec:
  devices:
    1: Pi
    2:
      1: Chromecast
      2: OSMC

Even with all my devices on and reporting
device #0: TV
address:       <IP_ADDRESS>
active source: no
vendor:        Vizio
osd string:    TV
CEC version:   1.4
power status:  on
language:      eng

device #1: Recorder 1
address:       <IP_ADDRESS>
active source: no
vendor:        Pulse Eight
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng

device #2: Recorder 2
address:       <IP_ADDRESS>
active source: no
vendor:        Pulse Eight
osd string:    Kodi
CEC version:   1.4
power status:  on
language:      eng

device #4: Playback 1
address:       <IP_ADDRESS>
active source: no
vendor:        Google
osd string:    Chromecast
CEC version:   1.4
power status:  on
language:      ???

device #5: Audio
address:       <IP_ADDRESS>
active source: no
vendor:        Yamaha
osd string:    RX-V373
CEC version:   1.4
power status:  on
language:      ???

Confirming identical behavior in 0.24. Can't get this one working. :( Tried every combination of HDMI ports and configuration options.
No errors in the log. Just HA will crash in the middle of the boot sequence. @happyleavesaoc any ideas?

Running the command usermod -a -G video <hass_user_account> fixed the issues! Thanks for the updated component documentation. Cheers!


Add Clojure topic

[x] I followed the contributing guidelines: https://github.com/github/explore/blob/master/CONTRIBUTING.md

I am:

[x] Curating a new Topic page

CURATING A NEW TOPIC PAGE

[x] I've formatted my changes as a new folder directory, named for the topic as it appears in the URL on GitHub (e.g. https://github.com/topics/[NAME])
[x] My folder contains a *.png image (if applicable) and index.md
[x] All required fields in my index.md conform to the Style Guide and API docs: https://github.com/github/explore/tree/master/docs

Please explain why you think this Topic page should be curated:
Clojure is a popular programming language

Thanks! I like the topic, but there's a test failing currently because the image is a bit small. Could you make the image 288x288? Even if you just add transparent space around it, that'd be fine.
Would clj make sense as a related topic?

@cheshire137 done! 🙂

Thanks for the fix! What do you think about adding more detail to the description? Maybe a mention of Clojure being compiled or a functional language, reading from https://clojure.org/. For comparison, here are some of the other language descriptions we have:
https://github.com/github/explore/blob/d336a4b685f26a73b53068a72fd739a7b4391ea4/topics/rust/index.md#L13
https://github.com/github/explore/blob/d336a4b685f26a73b53068a72fd739a7b4391ea4/topics/csharp/index.md#L12
https://github.com/github/explore/blob/d336a4b685f26a73b53068a72fd739a7b4391ea4/topics/go/index.md#L14

@cheshire137 done!


Adding web2 to web3 page

Updates:

adding new page web2-to-web3
adding page to side bar on general category
adding page link on main page under build with Celo category

Related to #663


AssertionError: We detect you are probably using the pretrained model (rather than chat model) for chatting, since the chat_format in generation_config is not "chatml". If you are directly using the model downloaded from Huggingface, please make sure you are using our "Qwen/Qwen-7B-Chat" Huggingface model (rather than "Qwen/Qwen-7B") when you call model.chat().

是否已有关于该错误的issue或讨论？ | Is there an existing issue / discussion for this?

[X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答？ | Is there an existing answer for this in FAQ?

[X] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior
openai_api.py script cannot realise chat function from sft model of qwen-7b
期望行为 | Expected Behavior
fix it
复现方法 | Steps To Reproduce
None
运行环境 | Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?
No response

Hi, which model were you using?

qwen-7b after sft fine-tuning
发自我的iPhone
------------------ Original ------------------
From: Ren Xuancheng @.>
Date: Tue,Dec 12,2023 5:52 PM
To: QwenLM/Qwen @.>
Cc: Modas Li @.>, Author @.>
Subject: Re: [QwenLM/Qwen] AssertionError: We detect you are probably usingthe pretrained model (rather than chat model) for chatting, since thechat_format in generation_config is not "chatml". If you are directly usingthe model downloaded from Huggingface, please make sure you are using our"Qwen/Qwen-7B-Chat" Huggingface model (rather than "Qwen/Qwen-7B") when youcall model.chat(). (Issue #788)
Hi, which model were you using?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

If you used the finetune.py from this repo, you can simply modfiy the generation_config.json as other Qwen-Chat models.


Enable Alias Autocompletion for Outbound NAT Rules

Follow-up to #197 to handle the second issue:
Alias Autocompletion is not working for Outbound NAT Rules, while it actually is working in Port Forward NAT Rules.

@AdSchellevis is this already done? :)

@fichtner Alias handling is different in the new pages, also for the outbound NAT rule, I think we should close this. Functionally it's doing the right thing now.

Great thanks. :)


Don't redefine updateOptions to ignore ThisBuild

Fixes #2671

Maybe we need a guideline on what goes into what scope.


many changes

 Issue by bung87
Sun Apr 29 10:56:01 2018
Originally opened as https://github.com/codelucas/newspaper/pull/558

langid as dependence,please review codes and commits messages

bung87 included the following code: https://github.com/codelucas/newspaper/pull/558/commits

PR is obsolete now..


Expand the list of acceptance tests

Add more acceptance tests to the list we run in jenkins - change to run all the test suites.
@chef/client-core @sersut @patrick-wright

+1

Sweet! Does all four of the suites work with EC2?

@sersut yep!

less is more? :+1:


[REQ]  Add wiki about forecast in PyETO

Yes, will add. Loads more to add before we release.

done


Unvisible scrollbar in the select component on IOS

Bug:
In iPhone and iPad, the Material2 Select component periodically does not display a vertical scrollbar when dropping down or even user scrolling this drop-down list, so the user would not know there are more options through a snapshot.
What is the expected behavior?
The scroll controll is always visible when the content in select component is scrolling.
What is the current behavior?
When there more than one select component on page and its opening you can't see the scroll even when scrolling opened select list. The list is scrolling but scroll control is unvisible. Its reproducing very offen, maybe in 50% of the times.
What are the steps to reproduce?
In https://material.angular.io/components/select/overview, open some examples in a row and try to scroll it. List in select is scrolling but time to time the scroll controll is unvisible.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5, Material 5.2.5. All latest browsers. iPhone X / iOS 11.3 iPad mini 3 / iOS 11.2

Closing, the presence of a scroll indicator is controlled by the browser, it is unfortunately not possible for us to force an indication of the scroll position in the select list drop down.