Multiple user inputs and autocomplete in Plotly Dash - input

I'm searching for a way to have suggestions "persisting" in a input widget so that user can use suggestions to create more complex strings.
E.g. if I were to create this list of possible input values:
html.Datalist(id='browser', children=[
html.Option(value="apple"),
html.Option(value="pear"),
html.Option(value="banana")
]),
(and say parameter multiple is set to True (see Dash input widget documentation))
user wouldn't be able to use the suggestions/autocomplete to create more complex strings, for instance:
apple pear and tomatoe
where the fruits names would be suggested.
I spent a great deal of time searching online but couldn't find out anythin hint on this. Any suggestion/direction much welcome.

Related

Lucene part:123 vs part 123 vs part123

I'm not too familiar with Lucene so my apologies if this isn't clear or I'm getting my terms/nomenclature mixed up.
So I have a requirement where a field containing text (example part:123) should be able to be found via the following:
part:123
part 123
part123
Now my understanding of StandardAnalyzer is that it will break the word "part:123" into terms "part" and "123".
So with that, I'm able to search with part:123 or part 123, but because they're two different terms "part123" won't work.
It seems to me like I'd also need to get the indexer to add another term where both are combined, so it'd be "part", "123", "part123".
Is this the right way to accomplish this -- and does anyone know how I'd go about implementing this?
Thanks!

Fuzzing tool: Mutate integer within predefined range?

I am newbie to fuzzing tools, and basically, I would like to use fuzzing tool to test a specific function.
Essentially, this function has three input parameter, and each parameter is a number, with range 0 to 0xffff.
I would like to use a fuzzing tool to generate random input combinations, and test the target function. However, I tried zzuf, but find that it does not have a specific setting on mutating integer value..
So I am looking for a fuzzer, that supports to only mutate integer value, within a predefined range? Could anyone give me some help on this issue? Am I clear enough? Thank you.
This can be done with many tools, among them Kitty (developed by my team).
Assuming you want to generate the number with decimal representation, the following template will generate them for you (values will be comma-separated):
from kitty.model import *
t = Template(name='function inputs', fields=[
S32(name='p1', value=1, min_value=-500, max_value=1000, encoder=ENC_INT_DEC),
Static(','),
ForEach(name='p2', mutated_field='p1',
fields=S32(value=2, min_value=-3200, max_value=5098, encoder=ENC_INT_DEC)),
Static(','),
ForEach(name='p3', mutated_field='p2',
fields=S32(value=3, min_value=0, max_value=999, encoder=ENC_INT_DEC))
])
while t.mutate():
print t.render().tobytes()
Some example results:
-1,2,3
129,1026,3
129,130,3
129,18,3
129,-3200,3
129,5098,3
129,-3199,3
129,5097,3
129,-3198,3
129,5096,3
129,3,3
129,1,3
129,4,3
129,0,3
17,1026,3
17,130,3
17,18,3
17,-3200,3
17,5098,3
17,-3199,3

Objective C - Attribute values into Variables

I'm new to objective-C, having a programming background mainly in C++, and believe this to be an easy question although I can't find the answer to what I'm looking for. I'm using Xcode 6 as of now.
I have an entity "Song" in which I have various attributes, "Description", "Tempo", etc. My tempo attribute, for example, is limited to integers, and I want to be able to manipulate any/all of those tempo values for each Song at a given time. Upon a dedicated button click, I want to either edit the values or put all of the values in an array (array[0] = Song 1 Tempo, array[1] = Song 2 Tempo, etc), so mainly I need to get those individual values into variables, or so I think.
I feel as though my limited knowledge of attributes and entities is preventing me from being able to connect the bridge between them and variables, the latter of which I'm used to working with in C++, of course. Any suggestions or tips would be much appreciated, thanks in advance!
Pat
Your attribute will return collection type object like dictionary or array. So you can iterate your attributes values and just add in NSMutableArray.

How can I let user input a value not listed in a pull-down list?

This is really a "best practices" question: Assume I have a dynamically generated pull-down list populated with suggested values (e.g. [Vanilla, Strawberry, Chocolate]). How do I give the user the option of selecting one of the suggested values OR inputting a new value (e.g. "Rocky Road")?
One approach would be to populate the list with a None of the Above entry ([Vanilla, Strawberry, Chocolate, None of the Above]) and write my controller so that if None of the Above is selected, it will then render a form with a text field instead of the pull-down. But that feels horribly clunky.
Is there some elegant GUI technique for this sort of thing, perhaps using JQuery?
I suggest you to use simple text input with jquery autocomplate plugin don't use pull-down list. Autocomplate can work with datas you populated. If user inputs a new value, in controller use find_or_create_by dynamic activerecord method.

.NET:How to implement "Hashes"

In some programming languages, hashes are a simple concept:
You give a "keyword" and the hash will return a "value". This is very helpful for linking two values etc...
I want to do something similar for my application:
Basically depending on what items from a checkList are checked, another list is populated by text lines.
So, is it possible to create some kind of table where if I send a keyword it will return to me with a text line?
A good example is a shopping catalog. You check an item, and a list has to show the item's description, right?
I think you are looking for Dictionary(Of TKey, TValue).
There are some examples of how to use it in the documentation on MDSN. There are also some more examples on dotnetperls.