--- actions ---
$copy <c-c> <c-ins>
$cut <c-x> <s-del>
$delete <del>
$lru
$paste <c-v> <s-ins>
$redo <c-s-z> <a-s-bs>
$searchweb
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
let calc = (n, v) => { | |
if(n < 2 || n > 10) { | |
throw "Tamanho do array de números inválido." | |
} | |
if(v.length < n) { | |
throw "Array de números inválido." | |
} | |
var sum = min = max = v[0]; |
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
let calc v = | |
let rec loop min_ max_ sum = function | |
| head :: tail -> loop (min min_ head) (max max_ head) (head + sum) tail | |
| [] -> [sum - max_; sum - min_] |> List.map string |> String.concat " " | |
loop 0 0 0 v | |
printfn "%s" (calc [ 4; -3; 7; 8; 2 ]) |
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
import com.intellij.openapi.actionSystem.AnActionEvent | |
import static liveplugin.PluginUtil.* | |
import java.awt.* | |
import com.intellij.openapi.wm.ex.* | |
registerAction("FocusFindDialog", "alt shift F") { AnActionEvent event -> | |
def frame = WindowManagerEx.getInstanceEx().getFrame(event.project) | |
frame?.windows.each { Window window -> | |
def className = 'com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog' |
We need two libraries for plotting in Livebook:
- The
vega_lite
package allows us to define our graph specifications