Skip to content

Instantly share code, notes, and snippets.

@freekrai
Last active August 11, 2017 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freekrai/7f0584b353456c12b544550662272ef1 to your computer and use it in GitHub Desktop.
Save freekrai/7f0584b353456c12b544550662272ef1 to your computer and use it in GitHub Desktop.
questions
var string = "Alphabet";
function firstNonRepeatedCharacter(string) {
var string = string.toLowerCase();
for (var i = 0; i < string.length; i++) {
var c = string.charAt(i);
if (string.indexOf(c) == i && string.indexOf(c, i + 1) == -1) {
return c;
}
}
return null;
}
var result = firstNonRepeatedCharacter(string);
console.log( result );
SELECT c.name, c.email FROM Customer as c, CustomerCreditCards as cc WHERE c.id = cc.customer_id AND cc.expirationdate BETWEEN DATE_SUB(NOW(), INTERVAL 14 DAY)
$("div a[target!='_blank"]").hide(); 

would fail, but:

$("div a[target!='_blank']").hide(); 

would work.

It would also hide option B:

<div>
	<a href="https:/www.google.com" target="_top">Clickme</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment