using MySQL LPAD and RPAD in SQLite

https://stackoverflow.com/questions/6576343/how-to-simulate-lpad-rpad-with-sqlite

 

look at the simple guy’s answer

Advertisements
using MySQL LPAD and RPAD in SQLite

so. you need an autocomplete that will show you one object in a set of objects.

what you need, my friend, is the jQuery UI’s autocomplete.

https://jqueryui.com/autocomplete/#custom-data

 

by the way, this is the class to get rid of that ugly blue hover state for the dropdown:

.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
background: none;
background-color: #6F257F;
border: none;}
so. you need an autocomplete that will show you one object in a set of objects.

i actually used CSS calc() in a real thing

so the input box has padding so the text inside of it isn’t right up against the box. in order to get the width of the dropdown menu to match the width of the input bar exactly, you have to add padding.

but when you add padding to the dropdown menu, the highlight doesn’t go all the way across.

SO you use calc(100% + 30px) to account for the 15px on either side of the input. BOOM.

i actually used CSS calc() in a real thing