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
## in models.py | |
class Season(models.Model): | |
title = models.CharField(max_length=255) | |
season = models.IntegerField(choices=SEASONS, blank=True, null=True) | |
year = models.IntegerField(blank=True, null=True) | |
description = HTMLField(blank=True, null=True) | |
description_placeholder = PlaceholderField('base_content', related_name='season_description', blank=True, null=True) | |
calendar_file = FilerFileField(blank=True, null=True) | |
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
/** | |
Ember Data: Dependent Relationships | |
This package extends Ember Data to support creating relationships | |
where a model's dirty state depends not only on its own attributes | |
but on the dirty state of models in dependent relationships as well. | |
```javascript | |
App.Thing = DS.Model.extend({ | |
name : DS.attr('string'), |
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
export default Ember.Mixin.create({ | |
// Register all the query parameters that the controller needs to know about. | |
queryParams: ['_start', '_limit'], | |
// Store our values. | |
_start: 0, | |
_limit: 10, | |
nextStart: 0, | |
previousStart: null, |
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
define([ | |
'underscore', | |
'backbone' | |
], | |
// Event Manager | |
function(_, Backbone) { | |
var vent = _.extend({}, Backbone.Events); | |
return { |
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
__int64 number = 317584931803; | |
int divisor = 2; | |
while (number > 1) { | |
if (0 == (number % divisor)) { | |
number /= divisor; | |
divisor--; | |
} | |
divisor++; | |
} | |
// [i]divisor[/i] is the answer |
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
<?php | |
function isPalindrome($number) { | |
$numberLength = strlen($number); | |
$isEven = $numberLength %2 == 0; | |
$isPalindrome = false; | |
while(true) { | |
$first = substr($number, 0, 1); | |
$last = substr($number, -1, 1); |
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
<T3DataStructure> | |
<meta> | |
<langDisable>1</langDisable> | |
</meta> | |
<sheets> | |
<sDEF> | |
<ROOT> | |
<TCEforms> | |
<sheetTitle>General</sheetTitle> | |
</TCEforms> |
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
<T3DataStructure> | |
<meta> | |
<langDisable>1</langDisable> | |
</meta> | |
<sheets> | |
<sDEF> | |
<ROOT> | |
<TCEforms> | |
<sheetTitle>General</sheetTitle> | |
</TCEforms> |
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
/******************************************************************************************** | |
* PLUGIN IDENTITY AND DEFAULTS | |
*******************************************************************************************/ | |
t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Plazm'); | |
$extensionName = t3lib_div::underscoredToUpperCamelCase($_EXTKEY); | |
$pluginSignature = strtolower($extensionName) . '_archives'; | |
/******************************************************************************************** | |
* FLEXFORMS |
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
ajax = PAGE | |
ajax { | |
# You don't need to change this typeNum | |
typeNum = 1249058000 | |
config { | |
disableAllHeaderCode = 1 | |
additionalHeaders = Content-type:application/json | |
xhtml_cleaning = 0 | |
admPanel = 0 | |
} |
NewerOlder