Can I use autocompletion for kubectl in zsh?

Both bash and zsh supports scripts that completes printed command when you press <TAB>. The feature is called Programmable completion, and you can find more details about that here: zsh completion. Fortunately, you don’t need to write your own script – kubectl provides it for zsh > 5.2. Try running this command: source <(kubectl completion … Read more

jQuery UI autocomplete with JSON

You need to transform the object you are getting back into an array in the format that jQueryUI expects. You can use $.map to transform the dealers object into that array. $(‘#dealerName’).autocomplete({ source: function (request, response) { $.getJSON(“/example/location/example.json?term=” + request.term, function (data) { response($.map(data.dealers, function (value, key) { return { label: value, value: key }; … Read more

AutoComplete search on even one character android

Set your completionThreshold to 1. <AutoCompleteTextView android:id=”@+id/your_id” android:layout_width=”200dp” android:layout_height=”wrap_content” android:completionThreshold=”1″ /> Or to do it dynamically use mAutoCompleteTextView.setThreshold(1). http://developer.android.com/reference/android/widget/AutoCompleteTextView.html

Eclipse JavaScript Editor: content assist for js files, autocompletion

I just figured out how to obtain js content assist in Eclipse JavaScript editor (without Aptana plugins): If the project type doesn’t natively contain JavaScript Support: open Web (or JavaScript) perspective, right-click on the project and select Web Development Support > Add JavaScript Support (this won’t hurt if JavaScript support is already present) then right-click … Read more

Chrome warning “[DOM] Password forms should have (optionally hidden) username fields for accessibility” in console even with hidden username field

I had the same problem. After some digging, I found that it needs to be an input element with the type text. By “optionally hidden” they mean that you may hide it with CSS. If you just add an input with the name email or username chrome gives you another warning saying that input elements … Read more

Dynamically updating an AutoCompleteTextView adapter

I didn’t have any luck using adapter.notifyDataSetChanged() when dynamically adding and changing the data in the adapter. In my situation, I was hitting an external api asynchronously and getting a list of completion data periodically. This code clears the adapter, and adds the new data as you’d expect. However, I had to call the getFilter().Filter … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)