LiveAPI() to control loop - ableton-live

I am trying to disable looping via LiveAPI() calls in Ableton Live 10 and Max 4 Live...
How do I trigger the Loop button pictured here?
I have tried various combinations of the path, via the nodeJS library max4node
https://github.com/alpacaaa/max4node
max.set({
path: 'live_set tracks 1 clip_slots 0 clip looping',
property: 'bool',
value: false
});

This works for me:
max.set({
path: 'live_set tracks 1 clip_slots 0 clip',
property: 'looping',
value: false
});

Related

Chunked upload validation: "The file could not be uploaded."

I am currently trying to let Symfonys Validator Component handle the validation of uploaded files, which works perfectly fine for normal files. However, if files are above a certain size they are uploaded as chunks, which are then merged and then validated. Both ways to upload are validated by the same function, which basically just looks like this:
public function validateFile(UploadedFile $uploadedFile): ConstraintViolationList {
return $this->validator->validate(
$uploadedFile,
[
new FileConstraints([
'maxSize' => '1000M',
]),
]
);
}
But somehow, the merged uploads trigger a violation, which, unfortunately, is quite uninformative to me:
Symfony\Component\Validator\ConstraintViolation {#658 ▼
-message: "The file could not be uploaded."
-messageTemplate: "The file could not be uploaded."
-parameters: []
-plural: null
-root: Symfony\Component\HttpFoundation\File\UploadedFile {#647 ▶}
-propertyPath: ""
-invalidValue: Symfony\Component\HttpFoundation\File\UploadedFile {#647 ▶}
-constraint: Symfony\Component\Validator\Constraints\File {#649 ▶}
-code: "0"
-cause: null
}
The logs are clean, no errors, only INFO regarding matched routes and deprecated stuff aswell as DEBUG regarding authentificastion tokens and such.
If I dump'n'die the UploadedObjects the only difference is that the chunked & merged one has executable: true and that its not stored in tmp.
Can someone here explain to me what causes this violation and what has to be done to prevent it or point me to some documentation regarding that?
EDIT: The upload of chunks and the merging seems to work perfectly fine - uploaded images can be viewed, text docs/pdfs can be read etc. Also used all the other code for quite a while now with different validation, just wanted to make everything a bit more pro and sorted by using the existing Validator infrastructure. To provide additional info regarding the uploaded objects, here the dd output, starting with regular file upload:
Symfony\Component\HttpFoundation\File\UploadedFile {#20 ▼
-test: false
-originalName: "foo.jpg"
-mimeType: "image/jpeg"
-error: 0
path: "/tmp"
filename: "phpEu7Xmw"
basename: "phpEu7Xmw"
pathname: "/tmp/phpEu7Xmw"
extension: ""
realPath: "/tmp/phpEu7Xmw"
aTime: 2021-05-27 10:47:56
mTime: 2021-05-27 10:47:54
cTime: 2021-05-27 10:47:54
inode: 1048589
size: 539474
perms: 0100600
owner: 1000
group: 1000
type: "file"
writable: true
readable: true
executable: false
file: true
dir: false
link: false
}
For chunked upload:
Symfony\Component\HttpFoundation\File\UploadedFile {#647 ▼
-test: false
-originalName: "foo.jpg"
-mimeType: "image/jpeg"
-error: 0
path: "/home/vagrant/MyProject/var/uploads"
filename: "foo.jpg"
basename: "foo.jpg"
pathname: "/home/vagrant/MyProject/var/uploads/foo.jpg"
extension: "jpg"
realPath: "/home/vagrant/MyProject/var/uploads/foo.jpg"
aTime: 2021-05-27 10:43:58
mTime: 2021-05-27 10:43:58
cTime: 2021-05-27 10:43:58
inode: 8154
size: 539474
perms: 0100777
owner: 1000
group: 1000
type: "file"
writable: true
readable: true
executable: true
file: true
dir: false
link: false
}
When the File constraint receives an UploadedFile instance, it triggers a call to isValid, which in turn calls is_uploaded_file:
Returns true if the file named by filename was uploaded via HTTP POST.
This is useful to help ensure that a malicious user hasn't tried to
trick the script into working on files upon which it should not be
working
After reassembling the chunks into a new file this check no longer passes and the constraint fails.
You could use your last file fragment to reassemble the original file or you could return a File from your function. File is not subject to that check, and the constraint will accept it along with UploadedFile.
When creating your UploadedFile object programatically use the 'test mode'. I use this with the VichUploaderBundle and the use of test mode is documented here.
new Count([
'min' => 1,
'minMessage' => 'Please select a file to upload'
]),
I think the NotBlank constraint is the problem here, I don't think it should be used on UploadedFile.
Try using only the File and Count constraints (to make sure there is a minimum of 1 file attached).

Binding QML widgets to a list model, but having some widget only bind to a specific index?

I'm writing a QML GUI that talks to a monitoring server. In one case, there's 3 grouped remote systems, one is is a master, the other two are slaves. I have the full statuses of each one, but need to show more details for the master system.
So for example I'm receiving an update message containing:
{
systems: {
1: {
type: Debian,
name: system1,
status: OK,
detailedStatus1: 123,
detailedStatus2: xyz
},
2: {
type: Ubuntu,
name: system2,
status: OK,
detailedStatus1: 456,
detailedStatus2: abc
},
3: {
type: Windows,
name: system3,
status: OK,
detailedStatus1: 789,
detailedStatus2: def
}
},
currentMaster: (1 or 2 or 3)
}
...and I want to show type, name, and status for all 3 systems, but only show detailedStatus1 and detailedStatus2 for the currentMaster system.
What should my QML model be like? Should I have a "masterModel ListModel" that my detailedStatus widgets bind to, and an "allsystems ListModel" for type/name/status, and update masterModel everytime currentMaster changes? Or is there a way to do this from a single "allsystems ListModel" , using currentMaster to know what to bind to? Should I be doing something else altogether?

Meteor Package: Add Custom Options

I've created a Meteor smart package, and would like to add user generated custom options to the API.
However, I'm having issues due to Meteor's automatic load ordering.
SocialButtons.config({
facebook: false
});
This runs a config block that adds defaults.
SocialButtons.config = function (options) {
... add to options if valid ...
};
Which in turn grabs a set of defaults:
var defaults = {
facebook: true,
twitter: true
}
Which are mixed into the settings.
var settings = _.extend(defaults, options);
...(program starts, uses settings)...
The problem is that everything must run in the proper order.
Create SocialButtons object
Run the optional SocialButtons.config()
Create settings & run the program
How can I control the load order in Meteor without knowing where a user might place the optional configuration?
Step 2 will be in a different folder/file, but must run sandwiched between steps 1 & 3.
You can't really control load order right now so it's not guaranteed but placing files at /libs are loaded first but in your case it's doesn't really matter it might be something else here is a very simple package you can view the source on how I setup default options and allow to replace those easily https://github.com/voidale/meteor-bootstrap-alerts
Figured this out.
Put your package into a /lib directory.
Include a setup function that sets the settings when called, and loads the data
Return the data from the startup function
In this case:
SocialButtons.get = function () {
return initButtons();
}
function initButtons() { ... settings, startup, return final value ... }

extjs 4.2 grid store with ajax & paging

I'm having the next problem, I have a grid with paging that is loaded via Ajax,
My problem is that i recieve about 8 millions of records,
When I use paging I get from 1 to 25...etc
but when i load the pagingbar store it only gives me that i have only 25 records because my ajax only calls from 1 to 25... why is this? any ideas?
Regards
My code:
Store
Ext.define('IE.store.reenvios.Reenvio', {
extend: 'Ext.data.Store',
alias: 'store.Reenvios',
storeId: 'ReenviosStore',
model: 'IE.model.reenvios.Reenvio',
proxy: {
type: 'ajax',
api: {
//
read: 'resendTransaction/fetchResend'
},
reader: {
type: 'json',
root: '',
totalProperty: 'rowCount'
}
},
autoLoad: false,
autoSync: false
});
Controller
store.getProxy().extraParams = {
'folioType':folioT.value,
'folio':folioN.value,
'status':estatus.value,
'date':date.value,
'start':0,
'limit':26,
'pageSize':25,
'tamanoPagina':''};
store.load({...
Seeing the JSON response would be helpful, so I could see the name of the property that contains the total number of records.
I have a feeling the issue is because you set totalProperty: 'rowCount'. The property rowCount is likely the number of rows returned (ie, 25 or less), but you want the totalProperty set to the property that contains the total number of records. See the docs for more info. http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.data.reader.Reader-cfg-totalProperty

Symfony 1.4: how to NOT display any filter through generator.yml

I created an admin module in Symfony. I would like to show the table list but without filters.
By default I get all filters. I managed to unset all the filters by hand -using unset, in the filterForm file of the module. Even more, I enabled just one filter and unset it. Used the unset($this->widgetSchema['filter'], ...) for that. I don't like this solution.
I would like to do it using the generator.yml:
I tried:
I) filter: false
II) filter:
display: false
III) filter:
display: [] <-- empty!
None worked. I read that using credentials could be possible but I would like to do it in a more simple a concrete way.
Thank you.
EDIT:
My actual generator. Is the default really:
generator:
class: sfPropelGenerator
param:
model_class: halt
theme: admin15
non_verbose_templates: true
with_show: false
singular: Halt
plural: Halts
route_prefix: halt
with_propel_route: 1
actions_base_class: sfActions
config:
actions: ~
fields: ~
list:
object_actions: {}
batch_actions: {}
filter: ~
form: ~
edit: ~
new: ~
You are almost done but you don't test everything :)
filter:
class: false
http://www.symfony-project.org/reference/1_4/en/06-Admin-Generator#chapter_06_filter
To completely remove the filtering feature, set the class to false.

Resources