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
| #include <iostream> | |
| #include <tgmath.h> | |
| using namespace std; | |
| #define PI 3.14159265 | |
| int main() | |
| { | |
| int N; | |
| cin >> N; |
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
| Any | |
| AnyVal | |
| ArrayEquals | |
| AsInstanceOf | |
| DefaultArguments | |
| EitherProjectionPartial | |
| Enumeration | |
| Equals | |
| ExplicitImplicitTypes | |
| FinalCaseClass |
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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int main() | |
| { | |
| char *args[] = {"/usr/bin/ls", NULL}; | |
| execvp(args[0], args); | |
| return 0; | |
| } |
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
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #define READ_END 0 | |
| #define WRITE_END 1 | |
| int tokenize(char *line, char *sep, char *argv[][2000],char **redirect_in, char **redirect_out) { |
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
| // Copyright(C) 2018 - John A. De Goes. All rights reserved. | |
| package net.degoes.effects | |
| import scalaz.zio._ | |
| import scalaz.zio.console._ | |
| import scala.annotation.tailrec | |
| import scala.concurrent.duration._ |
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
| // Copyright(C) 2018 - John A. De Goes. All rights reserved. | |
| package net.degoes.essentials | |
| import java.time.{Instant, ZonedDateTime} | |
| import scala.util.Try | |
| object types { | |
| type ??? = Nothing |
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
| // Copyright(C) 2018 - John A. De Goes. All rights reserved. | |
| package net.degoes.abstractions | |
| import scalaz._ | |
| import Scalaz._ | |
| import scala.language.higherKinds | |
| object algebra { |
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
| public ListNode reverseList(ListNode head) { | |
| if (head == null) return head; | |
| ListNode curr = head.next; | |
| head.next = null; | |
| while (curr != null) { | |
| ListNode next = curr.next; | |
| curr.next = head; | |
| head = curr; | |
| curr = next; |
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
| val doobieVersion = "0.6.0" | |
| import $ivy.`org.tpolecat:doobie-core_2.12:0.6.0` | |
| import $ivy.`org.tpolecat:doobie-postgres_2.12:0.6.0` | |
| import $ivy.`org.tpolecat:doobie-specs2_2.12:0.6.0` | |
| import doobie._ | |
| import doobie.implicits._ | |
| import cats._ | |
| import cats.data._ | |
| import cats.effect.IO | |
| import cats.implicits._ |
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 cats._ | |
| import cats.implicits._ | |
| import cats.effect._ | |
| import scala.concurrent.duration._ | |
| object ProcessIO { | |
| import scala.sys.process._ | |
| def exec[F[_]](commands: String)(implicit F: ConcurrentEffect[F], T: Timer[F]): F[Unit] = { | |
| def acquire: F[Process] = F.delay(commands.run()) |
OlderNewer