New Languages Highlighted
CoffeeScript (.coffee)LotteryDraw: { play: -> result: LotteryTicket.new_random() winners: {} this.tickets.each (buyer, ticket_list) -> ticket_list.each (ticket) -> score: ticket.score(result) return if score is 0 winners[buyer] ||= [] winners[buyer].push([ticket, score]) this.tickets: {}…
|
|
1 minutes
CoffeeScript (.coffee)
LotteryDraw: {
play: ->
result: LotteryTicket.new_random()
winners: {}
this.tickets.each (buyer, ticket_list) ->
ticket_list.each (ticket) ->
score: ticket.score(result)
return if score is 0
winners[buyer] ||= []
winners[buyer].push([ticket, score])
this.tickets: {}
winners
}
Objective-J (.j)
+ (id)boxEnclosingView:(CPView)aView
{
var box = [[self alloc] initWithFrame:CGRectMakeZero()],
enclosingView = [aView superview];
[box setFrameFromContentFrame:[aView frame]];
[enclosingView replaceSubview:aView with:box];
[box setContentView:aView];
return box;
}
Haml (.haml)
%div[@article]
%h1= @article.title
%div= @article.body
#id[@article] id
.class[@article] class
#id.class[@article] id class
%div{:class => "article full"}[@article]= "boo"
%div{'class' => "article full"}[@article]= "moo"
%div.articleFull[@article]= "foo"
%span[@not_a_real_variable_and_will_be_nil]
Boo
Sass (.sass)
#main
:width 15em
:color #0000ff
p
:border
:style dotted
/* Nested comment
More nested stuff */
:width 2px
.cool
:width 100px
#left
:font
:size 2em
:weight bold
:float left
Written by
Related posts

Apply now for GitHub Universe 2023 micro-mentoring
As part of our ongoing commitment to accelerate human progress through Social Impact initiatives, we’re offering students 30-minute, 1:1 micro-mentoring sessions with GitHub employees ahead of Universe.

The 2023 Open Source Program Office (OSPO) Survey is live!
Help quantify the state of enterprise open source by taking the 2023 OSPO survey.

Godot 4.0 Release Party 🎉
We are delighted to host the Godot 4.0 Release Party at GitHub HQ on Wednesday, March 22 from 6:30 pm to 9:30 pm. And you’re invited!