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
package resizeparallel | |
import ( | |
"Exercise/ResizeImage/lib/resizer" | |
"Exercise/ResizeImage/lib/types" | |
"flag" | |
"fmt" | |
"os" | |
"runtime" | |
"time" |
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
package printTask | |
import ( | |
"fmt" | |
"sync" | |
) | |
// PrintM - Just print M a hundre times | |
func PrintM(waitgroup *sync.WaitGroup) { | |
defer waitgroup.Done() |
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
package main | |
import ( | |
c "Exercise/ConcurrencyAndParallel/concurrency" | |
p "Exercise/ConcurrencyAndParallel/parallel" | |
"fmt" | |
) | |
// This is a demo for showing concurrency and parallelism works in Golang. | |
// the RunConcurrently() shows how to print a series of numbers and alphabet using single physical processors, |
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
package concurrency | |
import ( | |
"Exercise/ConcurrencyAndParallel/printTask" | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
) |
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
package parallel | |
import ( | |
"Exercise/ConcurrencyAndParallel/printTask" | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
) |
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
[self.TableView reloadData]; | |
[self.TableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:someRow inSection:someSection] atScrollPosition:UITableViewScrollPositionTop animated:NO]; |
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
/^http:\/\/|(www\.)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/ |
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 assert = require('assert'); | |
var async = require('asyncawait/async'); | |
var await = require('asyncawait/await'); | |
describe('hooks', function() { | |
before(function() { | |
// runs before all tests in this block | |
}); |
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
// make sure one cell has one subscriber | |
[[thumbnailCell.checkMarkSignals | |
takeUntil:cell.rac_prepareForReuseSignal] | |
subscribeNext:^(id x) {}]; |
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
// source: | |
// http://stackoverflow.com/a/12664093/1328982 | |
// credits to: Gervasio Marchand | |
- (void)moveBannerOffScreen { | |
[self.view layoutIfNeeded]; | |
[self.childView mas_remakeConstraints:(MASConstraint* make){ | |
make.top.mas_equal(0); | |
make.left.mas_equal(0); |