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
| fetchJson(path, function(jsonData) { | |
| var images = jsonData.images; | |
| fetchMesh(jsonData.meshPaths, function(meshes){ | |
| for(var i = 0 ; i < meshes.length - 1 ; i++){ | |
| meshes[i].applyMesh(function(mesh){ | |
| obj.mesh = mesh; | |
| }); | |
| } | |
| }); |
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
| Page = model | |
| name: 'Page' | |
| fields: | |
| name: String | |
| layout: String | |
| content: String | |
| references: [ { | |
| type: mongoose.Types.ObjectId | |
| ref: 'Reference' |
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
| Bird = new Class(function(){ | |
| property('name', String) | |
| .get(function(){ | |
| this._name; | |
| }) | |
| .set(function(name){ | |
| this._name = name; | |
| }); | |
| public('name', function(){ |
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
| var MyPersonClass = (function(){ | |
| // This function is always fired when you use the 'new' key word. | |
| // | |
| // Example: | |
| // var myPersonInstance = new MyPersonClass('jesse', 24); | |
| // | |
| // The 'this' pointer points to the INSTANCE of MyPersonClass, NOT | |
| // to MyPersonClass when you use the 'new' keyword. | |
| // | |
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
| module.exports = { | |
| name: 'shopbeamAttributesDropdown', | |
| directive: ['$filter', '$compile', function($filter, $compile){ | |
| return { | |
| restrict: 'A', | |
| scope: { | |
| name: '@', | |
| model: '=', | |
| modelDisplayNameProperty: '@', |
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
| module.exports = { | |
| name: 'shopbeamAttributesBar', | |
| directive: ['$filter', '$compile', function($filter, $compile){ | |
| return { | |
| restrict: 'A', | |
| scope: { | |
| dropdownModelSelected: '=' | |
| }, | |
| templateUrl: '/partials/attributes-bar', |
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
| .row-fluid | |
| .span12 | |
| ul(shopbeam-attributes-bar, dropdown-model-selected="addTag") | |
| li(shopbeam-attributes-dropdown, | |
| name="Categories", | |
| model="categories", | |
| model-display-name-property="name", | |
| tag-type="categories") | |
| li(shopbeam-attributes-dropdown, |
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
| module.exports = { | |
| name: 'shopbeamColorSelector', | |
| directive: ['Cloudinary', function(Cloudinary){ | |
| return { | |
| restrict: 'A', | |
| scope: { | |
| product: '=' | |
| }, | |
| templateUrl: '/partials/dashboard/color-selector', |
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
| import re | |
| status = "empty" | |
| tries = 2 | |
| while status == "fail" or "empty": | |
| print "Enter your passwrd:" | |
| password = raw_input() | |
| print "You entered " + password + "." | |
| matchobj1 = re.search('[a-z]', password) | |
| matchobj2 = re.search('[A-Z]', password) |
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
| import re | |
| class NewPassword(object): | |
| current_try_count = 0 | |
| max_try_count = 3 | |
| fail_status = True | |
| exit_text = '\n\tYou are out of tries!' | |
| valid_password_text = '\n\t {} is a valid password.' |
OlderNewer