I need to switch to numbers-only keypad input on mobile after 6 letters - forms

I need to create a field where customers, on mobile, enter their "codice fiscale" (tax code). The code has this structure: (L=letter N=number)
LLLLLLNNLNNLNNNL
So basically what i'm trying to achieve is to automatically switch the user's keypad to numbers only when the next character has to be a number (on positions 7,8,10,11,13,14 and 15). I've seen it in some apps, but i can't figure out any way to do it.
Thanks for your help!
Screenshot to explain better what i mean

Related

Actualisation of EPS and Sales before the US market opens - TradingView

I am using the EPS & Sales indicator of the user "Fred6724":
Link : https://fr.tradingview.com/script/WiaFmLGR/
and I would like to know if it is possible for the EPS to update before the US market opens.
Typically, before the open we can see the EPS and Sales on the little widget arrow built into TradingView but the 'request.earning' function seems to wait until the next candle opens to update numbers into the table.
(See attached document for illustration:Illustration of the lag)
(Ignore the sales lag, it has been corrected)
My question is, how could I rewrite the script so that the last row of the table has the same value as in the 'E' widget information built into TradingView?
What I tried:
I have already tried to use 'lookahead = barmerge.lookahead_on' but the result is the same.
I just have no idea how to proceed, it seems that TradingView doesn't have a built-in function to do that.
Thank you in advance.

How to use suggestion or pop up to suggest while entering text input in kivy?

Is it possible to use small pop up message or any suggestion to user that while entering please enter numbers between 40-70. I have designed a sample code in which I want user to enter only values between some range. So can someone please help me out so that I can know whether we can do it or not. Thank You.
You can use MDTextField widget from the material design inspired kivy library kivy-md. This widget has the attribute helper_text, which you can set to “Please enter numbers between 0 and 70”. You can additionally set an input_filter: “int” to only allow integer values for this widget. Remember that you still haveto validate the values to be in the desired interval. Below is an example of it.
MDTextField:
hint_text: "Helper text on focus"
helper_text: "This will disappear when you click off"
helper_text_mode: "on_focus"
input_filter: “int”

How to change what I've set a key to do in ahk

I'm trying to make a script for a game called Hearthstone. The script will be used to press a certain button and play a certain card. The only problem I have is that the cards change position based on how many you have. So I want to know how I could make buttons to choose the amount of cards in my hand.
I've come across the Hotkeys command but it seems to be more of a toggle thing. All the cards are bound from 1-10 and was thinking that I could make it so ^1-^10 represents how many cards I have but I don't know how I could do that.
Oleg's comment was more of my answer than I thought.
setting ^1 to ^1::numCards=1 and so on, I was able to set an if statement to do what I wanted something to do when the variable numCards equated to different things. Such as:
1:
if numCards = 1
{
do thing
}
return
and so on...

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

UISearchbar results showing inconsistently in table view

I am using a real-time search against an external API (XML) based on what the user is entering in the search bar..
I am using a case-insensitive search. The thing was working fine, until I moved the code or rather added a thread. Suddenly the results that I get are a bit consistent. They are not incorrect, but they are sometimes lesser in number.
e.g. if a user enters "a", it will show around 7 results, say AAR, Aaron, Staar,Mtaar ...
Then if enters "aa" , it will show 1 result (AAR), then if he enters "aar", it will show 3 results AAR, Star, Mtaar
Again if backspace is pressed and if the current term in the search bar is aa, it will now show 3 results...
Another example, if I type "goog", it displays nothing in the table cell results (even though i see that it has parsed Google), while if i add an "l", i.e. if the term is now "googl", it now shows Google in the cell below.
I am updating my table view immediately after the parsing is complete.
So basically after I added thread, the search results have got a bit inconsistent. I am not sure why.
Note that in all cases the results shown are all correct, but just the no. of them is varying.
Could someone please help me with the issue.
Thanks a lot.
can you provide some sample code how you access your filtered table content array? You can NSLog() the result you get from the API and compare with the ones are displayed in your tableView.