This file contains hidden or 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
| def csv_to_js_array(csv_path): | |
| import csv | |
| import os | |
| attributes = [] | |
| values = [] | |
| with open(csv_path, "rb") as csvfile: | |
| print csvfile |
This file contains hidden or 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
| extension String { | |
| /// Truncates the string to length number of characters and | |
| /// appends optional trailing string if longer | |
| func truncate(length: Int, trailing: String? = nil) -> String { | |
| if countElements(self) > length { | |
| return self.substringToIndex(advance(self.startIndex, length)) + (trailing ?? "") | |
| } else { | |
| return self | |
| } | |
| } |
This file contains hidden or 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
| if ( $(window).width() <= 720 ) { | |
| var _card = $('.product-grid-item'); | |
| var cardLen = _card.length; | |
| var cardHeight = _card.height(); | |
| var totalCardHeight = cardLen * cardHeight; | |
| $('#results-container').css('min-height', (totalCardHeight+cardHeight) +'px'); | |
| } |
OlderNewer