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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func ecoTestClient(result chan bool, vehicleNo string) { | |
fmt.Println("Checking eco test status for :" + vehicleNo) |
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
@Simon P. (simpre) thank you... | |
64bit 14.04 is working fine after adding following lines | |
vm.dirty_background_ratio = 5 | |
vm.dirty_ratio = 10 | |
vm.dirty_bytes = 200000000 | |
in /etc/sysctl.conf | |
and running sysctl -p |
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
package com.kani.test | |
import scala.util.{Failure, Success, Try} | |
object ScalaTryExample extends App { | |
val result = getResource("https://1httpbin.org/uuid") | |
result match { | |
case Success(response) => println(s"Result > $response") | |
case Failure(e) => println(s"Error! ${e.getMessage}") |
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
package com.kani.test | |
import java.util.Date | |
object ImplicitFunctionTest extends App{ | |
val date = new Date() | |
f1(date) | |
def f1(timeStamp : Long): Unit ={ | |
println(s"Timestamp : $timeStamp") |
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
package com.kani.test | |
object ImplicitTest extends App{ | |
import PrinterPool._ | |
val book = Book("Harry potter","1SSS2-243FDB") | |
book.print() | |
} | |
case class Book(name : String, isbn : String) |
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
package com.kani.test | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.Future | |
import scala.util.{Failure, Success} | |
object FutureTest extends App{ | |
run() | |
while(true){} |
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
package com.kani.examlpe | |
object Main2 extends App{ | |
val appl = new Apple(120,"RED") | |
val ban1 = new Banana(10,"GREEN") | |
appl.printColour() | |
println(appl.isApplicableWeight) | |
ban1.printColour() | |
println(ban1.isApplicableLength) |
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
package main | |
import ( | |
"github.com/pkg/sftp" | |
"golang.org/x/crypto/ssh" | |
) | |
func main() { | |
addr := “my_ftp_server:22" | |
config := &ssh.ClientConfig{ |
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
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
IPAddressReport report = virusTotalRef.getIPAddresReport("69.195.124.58"); | |
System.out.println("___IP Rport__"); | |
Sample[] communicatingSamples = report.getDetectedCommunicatingSamples(); | |
if (communicatingSamples != null) { |
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
try { | |
VirusTotalConfig.getConfigInstance().setVirusTotalAPIKey(ApiDetails.API_KEY); | |
VirustotalPublicV2 virusTotalRef = new VirustotalPublicV2Impl(); | |
String urls[] = {"www.cslworld.com", "www.pagero.com"}; | |
FileScanReport[] reports = virusTotalRef.getUrlScanReport(urls, false); | |
for (FileScanReport report : reports) { | |
if(report.getResponseCode()==0){ | |
System.out.println("Verbose Msg :\t" + report.getVerboseMessage()); |