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
| /* | |
| * | |
| * | |
| * 0-1-2-5 | |
| * | | | |
| * --3 | |
| * | | |
| * 4 | |
| */ | |
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 div1 = document.getElementById('pad_playlist') | |
| var audioDivs = div1.getElementsByClassName('audio') | |
| for(var i in audioDivs){ | |
| var tmpDiv = audioDivs[i]; | |
| if(!tmpDiv.getElementsByTagName) | |
| continue; | |
| var inputs = tmpDiv.getElementsByTagName('input'); | |
| if(!inputs) | |
| continue; | |
| var url = inputs[0].value; |
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 com.graphhopper.util; | |
| import com.graphhopper.routing.util.EdgeFilter; | |
| import com.graphhopper.routing.util.FlagEncoder; | |
| import com.graphhopper.storage.NodeAccess; | |
| public class EdgeFilterDirection implements EdgeFilter{ | |
| private final double azimuth; | |
| private AngleCalc2D angleCalc = new AngleCalc2D(); |
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
| grep -v '#' ~/.config/user-dirs.dirs | awk '{split($0,a,"="); split(a[1],b,"_");line="$HOME/"substr(b[2],1,1) tolower(substr(b[2],2));print a[1]"=\042"line"\042"}' | tee ~/.config/user-dirs.dirs |
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 ( | |
| "github.com/pkg/sftp" | |
| "golang.org/x/crypto/ssh" | |
| "log" | |
| "io" | |
| ) | |
| func main() { |
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
| import java.io.File | |
| import com.typesafe.config.{ ConfigFactory, ConfigRenderOptions } | |
| /** | |
| * discovery { | |
| * host = "discovery.global.livetex" | |
| * port = 80 | |
| * circuit = "msgtest" | |
| * } |
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
| case class Message() | |
| class PActor extends PersistentActor with ActorLogging { | |
| override def persistenceId: String = "test" | |
| override def receiveRecover: Receive = recovery(0) | |
| def recovery(count: Int): Receive = { | |
| case RecoveryCompleted => |
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
| import sbt._ | |
| import sbt.Keys._ | |
| import complete.DefaultParsers._ | |
| import ComponentVersionsKeys._ | |
| object ComponentVersionsKeys { | |
| lazy val versionFile = settingKey[File]("Version file") | |
| lazy val projectTagName = settingKey[String]("Project name for tag naming") |
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
| scala> def showInt(i: Int): String = s"Int: $i" | |
| showInt: (i: Int)String | |
| // Это вообще легально?? replace это метод строки, а не функции | |
| scala> val haha = showInt(_: Int).replace("Int: ", "") | |
| haha: Int => String = <function1> | |
| scala> haha(2) | |
| res20: String = 2 |
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
| scala> val f = if (_:Boolean) (_:Int) else (_:Int) | |
| f: (Boolean, Int, Int) => Int = <function3> | |
| scala> f(false, 2, 3) | |
| res27: Int = 3 | |
| // почему в этом случае 2 аргумента и 2ой функция? | |
| scala> val f2 = if (_:Boolean) (_:Int) + 1 else (_:Int) + 2 | |
| f2: Boolean => (Int => Int) = <function1> |
OlderNewer