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
(with-handlers | |
([cant-alloc -> NULL] | |
[cant-remap -> (devres-free the-box) NULL]) | |
(define the-box (devres-alloc devm-ioremap-release, GFP_KERNEL)) | |
(define remapped (ioremap-prot offset size flags)) | |
(set-box! the-box remapped) | |
(devres-add dev the-box) | |
addr) |
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
int numChars(char* word) | |
{ | |
int i, j, sum = 0; | |
for(i = 0; word[i][j] != '\0'; i++) | |
{ | |
for(j = 0; word[i][j] != '\0'; j++) | |
{ | |
sum++; | |
} |
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
int numChars(char * strings[], int len) { | |
int sum = 0, i; | |
for (i = 0; i < len; i++) { | |
sum += strlen(strings[i]); | |
} | |
return sum; | |
} |
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
int numChars(char * strings[], int len) { | |
sumOf(lengths(strings)); | |
} |
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
!================================================================================================================================ | |
! | |
!>Initialises the interpolated point metrics for an interpolated point. | |
SUBROUTINE FIELD_INTERPOLATED_POINT_METRICS_INITIALISE(INTERPOLATED_POINT,INTERPOLATED_POINT_METRICS,ERR,ERROR,*) | |
!Argument variables | |
TYPE(FIELD_INTERPOLATED_POINT_TYPE), POINTER :: INTERPOLATED_POINT !A pointer to the interpolated point to initliase the interpolated point metrics for | |
TYPE(FIELD_INTERPOLATED_POINT_METRICS_TYPE), POINTER :: INTERPOLATED_POINT_METRICS !<On exit, a pointer to the interpolated point metrics that have been initialised | |
INTEGER(INTG), INTENT(OUT) :: ERR !<The error code |
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
, slide: function (type, next) { | |
var $active = this.$element.find('.active') | |
, $next = next || $active[type]() | |
, isCycling = this.interval | |
, direction = type == 'next' ? 'left' : 'right' | |
, fallback = type == 'next' ? 'first' : 'last' | |
, that = this | |
this.sliding = true |
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
def link | |
if f.linked_keg.directory? and f.linked_keg.realpath == f.prefix | |
opoo "This keg was marked linked already, continuing anyway" | |
# otherwise Keg.link will bail | |
f.linked_keg.unlink | |
end | |
keg = Keg.new(f.prefix) | |
keg.link | |
rescue Exception => e |
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 SelectDateWidget(Widget): | |
""" | |
A Widget that splits date input into three <select> boxes. | |
This also serves as an example of a Widget that has more than one HTML | |
element and hence implements value_from_datadict. | |
""" | |
none_value = (0, '---') | |
month_field = '%s_month' | |
day_field = '%s_day' |
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
# Check for updates on initial load... | |
if [ "$DISABLE_AUTO_UPDATE" != "true" ] | |
then | |
/usr/bin/env ZSH=$ZSH zsh $ZSH/tools/check_for_upgrade.sh | |
fi | |
# Initializes Oh My Zsh | |
# add a function path | |
fpath=($ZSH/functions $ZSH/completions $fpath) |
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
window.addEvent('domready', function() { | |
VariableFinder.initialize(); | |
}); | |
var VariableFinder = { | |
initialize: function() { | |
var programInput = $('programInput'); | |
var output = $('output'); | |
$('submitButton').addEvent('click', function() { |
OlderNewer