Can the PickAndStore method recognize {multiple:false}? - filepicker.io

Can the PickAndStore method recognize {multiple:false}? Currently is just looks for multiple which means it is harder to dynamically set it.

Related

How to access Method Names from source object in Rule Definition

In our implementation of the Rules Engine we have a test form similar to Rule Test Form on the online demo on "Business Rules Engine Demo". What we would like to do is conditionally show only the Test Fields for the items in use in the rule. We are doing this by grabbing the rule.definition JSON from the ruleeditor then look for the items which we can conditionally create using AngularJS's ng-if directive. This works great with Fields. If the user selects a method, our method of parsing the string is failing. What it appears is the Field Names are stored in the JSON as plain text however the Method Names are not. Is there a way we can configure the control to either A not encrypt the method names or is there a way that we can tap into the encryption to identify if a method is in use in our rule? Thanks in advance.
Methods and actions can have overloads which the Code Effects rule editor supports. Therefore, we can't have multiple menu entries with the same name. Instead, we use a signature hash on all in-rule methods and rule actions regardless of whether it has an overload or not to make them unique on the client.
You need to have either the Full Source or the Editor Source license in order to change the code to either stop that hashing, or tap into the process, or implement it your own way. You don't have that option with any other Code Effects perpetual license.

Sorting methods (by number of arguments) using JetBrains Rider File Layout

I'm using Unity/C# and I try to setup Rider File Layout XML to format code in specific way.
What I want - is to put methods with certain names (e.g. Awake(), Start(), Update() etc.) in front of other methods.
The important part is that I want to move only methods without arguments.
Sorting by name partially works, but it also changes order of methods with parameters (e.g. Update(float dt)).
Is there any way to filter methods with and without parameters using File Layout?
I'm afraid that's not possible, probably you have to write your own R# plugin for this

Do I have to put get/set methods in the class definition in matlab ?

Is one forced to place all get and set functions in the class definition file in Matlab ?
I'm asking since this really makes the file a bit messy and defeats the purpose of having a class definition folder.
Yes, if you use property set and get access methods (in fact any method with a dot in the name), you must include them within the classdef file, not in separate files. See the documentation.
However, if you have have a special reason to want to put as much as possible in separate files, you can define methods getMyProp and setMyProp in separate files, and then within the classdef file have the get.myProp and set.myProp functions call them.
If you use them then you need to define them. but you can also define your variables as public.

i18n in Symfony Forms

Is there any way I can use the format_number_choice function inside of a actions file. In fact I need to use it for a Form error message.
'max_size' => 'File is too large (maximum is %max_size% bytes).',
In English it's simply "bytes", but in other languages the syntax changes after a certain value (for example if the number is greater than 20 it's: "20 of bytes").
I can use parenthesis, of course, but if the framework offers support for doing this specific thing, why not to use it?!
The way it's currently implemented in the 1.4 branch, you can define only one translation per message using il18n XML files.
What you could do is create a custom validator which inherits the current validator (sfValidatorFile in your example) and does the size checking in the doClean method before calling its parent's method.
I suggest you take a look at the source to see how it works : sfValidatorFile
The correct way to handle number ranges for translation is explained here in the Definitive Guide. I won't reproduce it here as the documentation itself is clear and concise. Note however that the string is not extracted automatically by the i18n-extract task, so you need to add it manually - again, the documentation explains this.
So yes, you can use the format_number_choice() function inside an action - you just need to load the helper inside the action like this:
sfContext::getInstance()->getConfiguration()->loadHelpers('I18N');

Does Core Data automatically validate new values when they are set?

In this question, someone asked how to write a validation method for Core Data. I did that, and it looks cool. But one thing doesn't happen: The validation. I can easily set any "bad" value and this method doesn't get called automatically. What's the concept behind this? Must I always first call the validation method before setting any value? So would I write setter methods which call the appropriate validation method first?
And if yes, what's the point of following a strict convention in how to write the validation method signature? I guess there's also some automatic way of validation, then. How to activate this?
Validation is not "automatic" especially on iOS. On the desktop you will have the UI elements handling the call to validation. On iOS you should be calling validateValue:forKey:error: with the appropriate key and dealing with the error should there be one. The reason for this is the lack of a standard error display on iOS and the overhead of validating all values.
Note this comment in the documentation:
If you do implement custom validation methods, you should typically not invoke them directly. Instead you should call validateValue:forKey:error: with the appropriate key. This ensures that any constraints defined in the managed object model are also applied.