LabVIEW - adding text to a string control instead of rewriting it - string

I managed to place text in my string indicator but what i wish to know is how to add text to it without deleting the previous text. I tried searching the web and i couldn't find anything useful.

You can reuse its value by using a local variable, and input in concatenate strings.

You can use Concatenate Strings to add two different strings to a single one. Then you still can use the first string without any change.
Sample from NI help

For an indicator or control, you can also use the Append String function as follows:
... and then wire the string you want to append to the input of that function:
The net result is the same as using the Concatenate Strings that others have mentioned, but is perhaps more elegant on account of not needing to wire in the original value on the block diagram.

Concatenate strings lets you concatenate multiple strings, and arrays of strings.
The Append String method appears to only let you concatenate a single string to a string control. I'm guessing it is more efficient, and better to use inside a loop.

Related

What does FormulaVersion do in Range.Replace

What does the FormulaVersion-parameter in Range.Replace do? I tried looking it up in Microsoft's documentation, but the page for Replace doesn't include this parameter.
Based on my limited testing, if you use xlReplaceFormulas then any dynamic array formulas that have a replacement made are converted to use the # operator and no longer spill. Using xlReplaceFormulas2 leaves them as spilling formulas. If you are trying to remove the # operator, you have to use xlReplaceFormulas2 or it just gets put back.

LabVIEW: Removing all numbers in a string

I would like to remove all numbers in a string.
For example,
I would like to convert String into String2.
Can anyone give me a small code for this?
What have you tried so far? Below are 3 methods how to achieve it (could be even more ways of solution).
UPD: updated based on comment from sweber.

mongoDB search only last 6 digits

Is there away to use find() to search for barcode that ends with the last digits 365478 I dont care what is in front
I thought something like this.
$db.find(array('barcode'=>*365478))
but that does not seem to work. am I missing something?
A regular expression of /365478$/ would provide the right filter.
Regex will work but you won't be able to use an index for the query. I'd suggest storing the last 6 digits in a separate field, put an index on it and use that.
This Works Well /$365478/ of course you can use regex but keeping it simple pays off.
You can use a regex for this but you have to store the barcode reversed if you want to be able to use an index (only rooted regex can use an index, see http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-RegularExpressions)
If that is unpractical for you you will have to save the last X digits seperately and do exact matching. If your database is going to be relatively small you might be able to get away without indexing.
the regex should be like this: 365478$
using PHP for eg.
$regex = new MongoDB\BSON\Regex ( '365478$');

Calculate length of string using yahoo pipes

I am using yahoo pipes to fetch articles from various sources including google, however articles from google include the title and source of title in the description, is there a way in yahoo pipes to remove the title & source and leave the rest of article intact. I tried to use sub-string however it requires length of the string which is variable for each article. I guess if there is way to calculate the length of title and source and pass it to sub-string module this may work.
Any help would be great.
Regards
Take a look at http://pipes.yahoo.com/pipes/pipe.info?_id=8KZMRx473hGtVMYsP27D0g, which can be used as a subpipe (i.e. within a loop) to calculate the length of a string. It should be relatively straightforward to add a second text input module and modify the Pipe to cater for your second text string.

When to use explicit string or from a constant string

In terms of strings I understand the need to have strings am going to reuse overname wrapped away somewhere in an XML file or configuration section for strings such as Company Name.
The problem am having with this is where to draw the line on using configuratioh or locally expressed strings?
What decides whether to have the string content wrapped away in a configuration file or to just have the string assigned there and then in a method?
Where am corporate branding a site then yes any corporate aspect strings I will put in a configuration file. Other aspects such as file locations etc will also go in a configuration file.
However, I have found myself discussing with others when I do this as oppose to having an explicit string defined within a method.
Do you have certain criteria that define when to use strings from a configuration section as opposed to being explicitly defined in a method?
Use configuration when you need to be able to change functionality without redeploying/recompiling.
If your string is reused within your application but the functionality involved is not something you want to be configurable, use a constant.

Resources