This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
isUniqueChars(String str) { | |
if (str.length() > 256) return false; | |
int checker = 0; | |
for (int i = 0; i < str.length(); i++) { | |
int val = str.charAt(i) - 'a'; | |
if ((checker & (i << val)) > 0) { | |
return false; | |
} | |
checker |= (1 << val); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- this is the directive --> | |
<div ng-include ng-animate="enter: enter" style="-webkit-transition: 1s linear all"> | |
<div class="ng-animate-enter-setup ng-animate-enter-start"> | |
<!-- this is the template HTML --> | |
<div>….</div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ngdoc function | |
* @name ng.animator#hide | |
* @methodOf ng.$animator | |
* | |
* @description | |
* Starts the hide animation first and sets the CSS `display` property to `none` upon completion. | |
* | |
* @param {jQuery/jqLite element} element the element that will be rendered visible or hidden | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('appLoading', function($rootScope) { | |
var timer; | |
return { | |
loading : function() { // this is the line that gets called when you appLoading.loading(), right? | |
Yes. This gets called whenever I want the page to indicate a loading operation. loading() starts sets the animatio flag | |
which starts the animation icon loading at the top of the app. | |
clearTimeout(timer); | |
$rootScope.status = 'loading'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Damyan | |
def self.come_out | |
@come_out_response ||= "No sorry not this time" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Damyan | |
def self.come_out | |
if @come_out_response.nil? | |
if(false) | |
@come_out_response = "Sure! Lets do it!" | |
else | |
@come_out_response = "No sorry not this time" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-animate="{misko:'animation-name'}" ng-class="{misko:$index == 0}"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
animator.animate('ng-hide-add', element).then(function() { | |
addClass('ng-hide'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
//CSS | |
.show-hide.ng-hide-add, | |
.show-hide.ng-hide-remove { | |
transition:0.5s linear all; | |
-webkit-transition:0.5s linear all; | |
-moz-transition:0.5s linear all; | |
-o-transition:0.5s linear all; | |
display:block!important; | |
} |
OlderNewer