I hereby claim:
- I am aglassman on github.
- I am andrewglassmangm (https://keybase.io/andrewglassmangm) on keybase.
- I have a public key ASAp2o1zEefLyBpJutIhdt8EnrT45ozYaHDqwLM4G0_irAo
To claim this, I am signing this object:
package com.example; | |
import org.h2.server.web.WebServlet; | |
import org.springframework.boot.context.embedded.ServletRegistrationBean; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class ServiceConfiguration { | |
@Bean |
package com.example; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; | |
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |
import org.springframework.context.annotation.Import; | |
@EnableCircuitBreaker |
Attaching to process ID 419, please wait... | |
Debugger attached successfully. | |
Server compiler detected. | |
JVM version is 25.121-b13 | |
Deadlock Detection: | |
No deadlocks found. | |
Thread 2387: (state = BLOCKED) | |
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) |
defmodule ElvisTest do | |
use ExUnit.Case | |
def a ~> b, do: elvis(a, b) | |
def elvis(nil, fun), do: nil | |
def elvis({nil, default_val}, fun), do: elvis(default_val, fun) | |
def elvis(val, fun), do: fun.(val) |
I hereby claim:
To claim this, I am signing this object:
weed = { | |
position={0,0}, | |
new=function(self, position) | |
local new_weed = {position=position} | |
setmetatable(new_weed, self) | |
return new_weed | |
end, | |
draw=function(self) |
defmodule AsyncAssigns do | |
import Phoenix.LiveView, only: [connected?: 1, assign: 2, assign: 3] | |
@doc """ | |
Provides ability to assign default values to the socket, and kick off a | |
process that will send a message to the LiveView. The message payload will | |
be assigned as specified. | |
## Usage | |
Add the following lines to a specific LiveView, or to the web module |
defmodule Todo do | |
import String, only: [split: 3, trim: 1]; | |
@t :todos | |
@d :dets | |
def prompt() do IO.write("todo> "); split(trim(IO.binread(:line)), " ", parts: 2) end | |
def run(:start) do @d.open_file(@t, type: :set); run(">") end | |
def run(:goodbye), do: @d.close(@t) | |
def run(_) do | |
case prompt() do | |
[c] when c in ["", "ls"] -> @d.match_object(@t, {:"$1", false}) |
Enum.reduce(Stream.cycle(0..1), [], &(IO.inspect(case String.trim(IO.binread(:line)) do | |
"l" <> _ -> &1; &2 | |
"a " <> i -> [{i, nil} | &2] | |
"c " <> i -> Enum.map(&2, fn {^i, _} -> {i, true }; x -> x end) | |
"x " <> i -> Enum.reject(&2, fn {^i, _} -> true; _ -> false end) | |
_ -> raise "e" | |
end))) |