Sharding Shpere setActualDataNodes {0000..1023} - groovy

I am new to Shardingjdbc. My actual tables are user_0000, user_0001..user_1024. So I use the following pattern.
result.setActualDataNodes("ds0.user_${0000..1023}");
but I always get user_0, user_1, user_2 ..user_1024
Could anyone help to solve this? I also try to use
result.setActualDataNodes("ds0.user_${\"0000\"..\"1023\"}");
It doesn't work.

I solved this problem.
maybe you can try this:
result.setActualDataNodes("ds0.user_000${0..9},ds0.user_00${10..99},ds0.user_0${100..999},ds0.user_${1000..1023}"};

Related

Pressing a key down using the function node

I have set up a simple line of code, and I would like to try to press a key, for example "w", down whenever a integer between 1 and 10 is detected. I am relatively new to node-red and dont have much knowledge. i've searched around a bit but cannot find any answers to my question, any help would be greatly apreciated!
There looks to be 2 nodes in the library (on https://flows.nodered.org) that might be able to do what you want.
https://flows.nodered.org/node/node-red-contrib-autokey
https://flows.nodered.org/node/node-red-contrib-sendkeys
Unfortunately there doesn't seem to be any documentation for either.
After quick look at code the first (node-red-contrib-autokey) it looks to use robotjs and if you include /key in the msg.topic it will then "press" the key found in msg.payload.key
Details of key names can be found here https://robotjs.io/docs/syntax#keys

Where can I find message for Update-Location-Request?

I hope you all doing well! I need message format for the Update Location request
Please check this screenshot this may be helped you
You should also take a look at the following specification: "ETSI TS 129 272" and check the ULR ABNF:

check column for entry and then check what is next to each of those - Make a count of those

--Edit - Solved by use of COUNTIFs --
So I am trying to see if something is possible with the below section.
I want to count how many rows are "Used&Finance" and how many are "New&Finance" etc. I cannot work out how I would do so... I hope you can help.
--edit added example data--
Does the below work for you?
I9: =COUNTIFS($H$2:$H$7,LEFT(H9,SEARCH(" ",H9)-1),$I$2:$I$7,MID(H9,SEARCH(" ",H9)+1,LEN(H9)))
I10: =COUNTIFS($H$2:$H$7,LEFT(H10,SEARCH(" ",H10)-1),$I$2:$I$7,MID(H10,SEARCH(" ",H10)+1,LEN(H10)))

MODX Revo tvFilter with getResources and/or pdoResources

I have a checkbox-TV:
City 1||City 2||City 3||City 4
With getResources and pdpResources tvFilter wont't work. Only if I check
only on of the "Citys". If I check 2 or more nothing worked.
&tvFilters=`art.start-city==yes%,art.city==%City 2%`
Any Ideas?
I think, that your problem is in &tvFilters value. I had similar problem and solved it by adding % to the value.
Try this:
&tvFilters=`art.start-city==%yes%,art.city==%City 2%`

export data from gams to excel

I have a mathematical model and I want to run it 10 times automatically with different data sets which are generated randomly(when the first model stops, start another model automatically). for this purpose I have written the solve statement in a loop . I want to see the result of these 10 models in different sheets of an excel file. how can I do it? is it possible to correct my code?
set k/sheet1*sheet10/;
loop(k,
data generation....
solve statement....
execute_unload 'RESULT.gdx'
execute 'gdxxrw.exe RESULT.gdx o=RESULT.xlsx var=x.l rng='k.t1:0'!a1'
);
I really appreciate your kind helps
Actually, you are pretty close already, you just need to use 'put_utility' instead of 'execute' to make use of the 'k.tl' syntax (note: it is .tl, not .t1):
*dummy put file
file fx; put fx;
set k/sheet1*sheet10/;
loop(k,
solve statement....
execute_unload 'RESULT.gdx'
put_utility 'exec' / 'gdxxrw.exe RESULT.gdx o=RESULT.xlsx var=x.l rng='k.tl:0'!a1';
);
I hope that helps!
Best regards,
Lutz

Resources