Hello!
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
| string val; | |
| int comp = Comparer<int>.Default.Compare (0, 1); | |
| if (comp > 0) | |
| val = "greater than"; | |
| else if (comp < 0) | |
| val = "less than"; | |
| else | |
| val = "equal"; |
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
| require 'json' | |
| require 'sinatra' | |
| chief_complaints = [ | |
| { name: "Dizziness" }, | |
| { name: "Chest Pain" }, | |
| ] | |
| before /.*/ do | |
| content_type :json |
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
| require 'teststrap' | |
| context 'an array'do | |
| topic { Array.new } | |
| # Works as expected | |
| context 'when adding an object using manual memoize' do | |
| helper(my_object) { @my_object ||= Object.new } | |
| hookup { topic << my_object } |
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
| new[] { | |
| new DateTime (2012, 01, 01, 13, 0, 0), | |
| new DateTime (2012, 01, 01, 9, 0, 0), | |
| new DateTime (2012, 01, 02, 1, 0, 0), | |
| new DateTime (2012, 01, 02, 23, 10, 0), | |
| }.GroupBy (dt => dt.Date) | |
| .OrderBy (grp => grp.Key) | |
| .SelectMany (g => g.OrderByDescending (d => d)) |
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
| private BlockingQueue<Connection> pool = new LinkedBlockingQueue<Connection>(10); | |
| private AtomicInteger connCount = new AtomicInteger(); | |
| public Connection getConnection() { | |
| Connection conn = pool.poll(10, TimeUnit.MILLISECONDS); | |
| if (conn == null) { | |
| synchronized (connCount) { | |
| if (connCount.get() < 10) { | |
| conn = getNewConnection(); | |
| pool.offer(conn); |
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
| @Embeddable | |
| public class Name { | |
| public String getFirstName(); | |
| void setFirstName(String firstName); | |
| public String getLastName(); | |
| void setLastName(String lastName); | |
| @Override | |
| public String toString() { | |
| return firstName + " " + lastName; |
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
| [peter@suspect ~]$ http --print=hH get https://cryptottdemowebapi.xbtce.net:8443/api/v1/public/tick Accept:*/* | |
| GET /api/v1/public/tick HTTP/1.1 | |
| Accept: */* | |
| Accept-Encoding: gzip, deflate | |
| Connection: keep-alive | |
| Host: cryptottdemowebapi.xbtce.net:8443 | |
| User-Agent: HTTPie/0.9.4 | |
| HTTP/1.1 200 OK | |
| Content-Encoding: gzip |
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
| peter@suspect:~/Videos/EggHead/HTTP Fundamentals/Use HTTP POST Method $ cat ~/.local/share/gstreamer-1.0/presets/GstX264Enc.prs | |
| [_presets_] | |
| version=0.10 | |
| element-name=GstX264Enc | |
| [egghead] | |
| profile=main |
I hereby claim:
- I am petejohanson on github.
- I am petejohanson (https://keybase.io/petejohanson) on keybase.
- I have a public key ASDOOX_E-5oRTT2YLKOoBOFNVr9kcv_a2yjxj2hy-SGd7Ao
To claim this, I am signing this object:
OlderNewer