Improviments done:
- When manually inputing a date, the datepicker should follow to show the same date;
- When insert an invalid date, the datepicker is cleaned;
| using System; | |
| using System.Collections; | |
| namespace Flatten | |
| { | |
| public class CollectionValidator<T> | |
| { | |
| public static bool IsNotValidThis(T integerCollection) | |
| { | |
| return IsNotAnIEnumerable(integerCollection) || IsAString(integerCollection); |
| defmodule FlatAnything do | |
| def flatten([]), do: [] | |
| def flatten(this_collection) when is_list(this_collection) do | |
| [head | tail] = this_collection | |
| flatten(head) ++ flatten(tail) | |
| end | |
| def flatten(element), do: [element] | |
| end |
| class FlatAnything { | |
| flattenThis(collection){ | |
| if(itIsNotAnArrayAt(collection)) throw new Error('Only collections are allowed'); | |
| if(isAnEmpty(collection)) return []; | |
| const headOfCollection = headOf(collection); | |
| const tailOfCollection = tailOf(collection); | |
| if(itIsNotAnArrayAt(headOfCollection)) return theConcatenationOf([headOfCollection], this.flattenThis(tailOfCollection)); |
| " It has to be put inside the https://github.com/danielfoxp2/vim-openalternatefile-phx1.2 | |
| " in order to work. It is not placed in the plugin because it is very opinionated about where | |
| " the js files will be. So while I can decide if it is good or not to put it in there, I will | |
| " keep it here. | |
| " This let is_javascript_specs = match(current_file, '\.js$') != -1 and | |
| " this | |
| " elseif is_javascript_specs | |
| " let new_file = BuildJavascriptUnitPath() | |
| " is needed in the function AlternateForCurrentFile() then this will do the magic: | |
| function! BuildJavascriptUnitPath() |