trying to use split to get the data prior to the split position
hey people, i have the following text “|7575|your|name|here|38383|assigned|” and i wanted to assign everything prior to the last pipe character to a new variable.

the catch is that the string i have will be different every time and may include multiple lines, for example “|7575|your|name|here|38383…
[@cssc](/u/cssc), another option would be to take the regex way.

first, it finds the index of the 5th pipe.

then, it takes the substring until that index.

give this a try:

inputstr.substring(0, regex.matches(inputstr, "\|")(4).index + 1)
tiler\_src\_pad\_buffer\_probe is before the nvmultistreamtiler in the pipeline, so the ntp\_timestamp for each stream is meaningful. your appsink is after nvmultistreamtiler in the pipeline, nvmultistreamtiler will combine multiple streams into one new stream, so ntp\_timestamp in each separated stream m… [image] dueck456:

is there an easy way to detect when new code is flashed to the device so i can reinitialize the retained variables?

below is a link to a post by [@rickkas7](/u/rickkas7) about storing retained data in a struct.

[image] dueck456:

saving a know value to eeprom jumps to mind

there is … ```
#!/usr/bin/perl
use strict; 
use warnings; 

my $gia = '12tai';

#Capture sequence of digits into one variable,
#capture sequence of non-digits into another variable
my ($number, $name) = $gia =~ m/(\d+)(\D+)/;

print "$number $name\n";#Two values separated by one space
``` Your explanation is not consistent. You state that the user is to enter a range as in "find me all numbers between x and y that are divisible by both 3 and 4." Later you state that you "input value 120 10 times". That is inconsistent with the problem so either the problem is stated incorrectly or you are not inputting the expected data. Decide what is the correct problem then write it up in pseudo-code before you write the actual code.


If a range is expected, make sure you test that it is a valid range (x <= y). actually, ftl does not care about #. instead, everything ftl cannot parse as valid config setting is ignored. so using ; everywhere is fine as well. prepending with ä would equally work, too, etc.

additional hint: pi-hole v6.0 will change the config file format to [toml](https://toml.io). the existing pihole-ftl.conf … What problem are you facing? Post the error that you get.  

Also please edit your first post by aligning the code properly and wrap [code] tag so that it is easily understandable for us to analyze. hi there,

i am making some assumptions about the requirements of your experiment here but lets see if this helps.

short break

would you like the short break to be at the start of each trial ? i.e. the inter-trial-interval? if so try the following:

add a code component to your “trial” routine (c… Have you tried putting all of your connection items and actions before you do the parameters? Thanks for your reply, I feared it would not be trivail, as I coudnt find any scripts. Idealy the text from the databse is place in a table witht the last column beeing the barcodes path, the images are to replace the text path and be place inside the cell, fitting within the cells width and/or height. i don't understand why you're not putting the componenttrait-specific behavior inside the componenttrait impl. i interpreted [@ixrec](/u/ixrec)'s suggestion to mean something like (signatures slightly tweaked to compile):

struct position {}

struct velocity {}

struct whatever {

component\_pool\_position: ve…