Test kolorowania składni

Odpowiedz Nowy wątek
2019-02-07 07:22
3
def foo():
    print("hello world")
uu, fancy! - Marooned 2019-02-07 09:09

Pozostało 580 znaków

2019-02-07 09:15
2
fun test(int: Int): List<Pair<Int, String>> {
  val a = listOf(int to "5")
  var b = a + listOf(1 to "1")
  b = emptyList()
  val c = b.map { 5 }
  val d = c.map(Any::toString)
  println(a)
  TODO("All hail glory of Kotlin!")
}
edytowany 1x, ostatnio: Michał Sikora, 2019-02-07 09:17

Pozostało 580 znaków

2019-02-07 11:06
0
var_dump(!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!true !== false)

Pozostało 580 znaków

2019-02-07 11:11
2
while(!true) {
  return false;
}
else {
  return true || !false;
}

Szacuje się, że w Polsce brakuje 50 tys. programistów

Pozostało 580 znaków

2019-02-07 11:17
1
package main
import "fmt"

func main(){
    s := "ten.sremmargorp4"
    for _, r := range s {
        defer func(r rune) {
            fmt.Print(string(r))
        }(r)
    }
}
Wg mnie słabo wygląda inne tło pod przypisaniem (:=) - iksde 2019-02-07 15:15

Pozostało 580 znaków

2019-02-07 14:26
2
using System;

namespace ConsoleApplication1
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello, world!");
            "123"
                .Select(x => x.ToString() + x)
                .ToList()
                .ForEach(Console.WriteLine);
        }
    }
}
edytowany 1x, ostatnio: WeiXiao, 2019-02-07 14:30

Pozostało 580 znaków

2019-02-07 14:46
1
WITH"t"AS(SELECT($1)"w"),"r"AS(SELECT"regexp_matches"(w,E'i:(\\d+);.:(\\d+);','g')"r"FROM"t")SELECT(r::text[])[2]FROM"r" 
WITH 
t AS
(
SELECT   $1 As w
)
, r AS
(
SELECT regexp_matches(w,E'i:(\\d+);.:(\\d+);','g') r 
FROM t
)
SELECT
 (r::text[])[2]
FROM r
edytowany 1x, ostatnio: Marcin.Miga, 2019-02-07 14:48

Pozostało 580 znaków

2019-02-07 18:12
2
TITLE EXECUTING. ASM

EXECUTING PARTED
    ASSUME CS:EXECUTING
    ORG 100h
START: MOV AH, 9
    MOV AL, 40h
    MOV AH, 10d
    MOV CX, 11D
    INT 10h
    MOV AH, 4ch
    INT 21h
EXECUTING ENDS
END START ; / PLIK OTRZYMAŁ NAZWĘ EXECUTING.ASM /
++       Cell c0 = 2
> +++++  Cell c1 = 5

[        Start your loops with your cell pointer on the loop counter (c1 in our case)
< +      Add 1 to c0
> -      Subtract 1 from c1
]        End your loops with the cell pointer on the loop counter

At this point our program has added 5 to 2 leaving 7 in c0 and 0 in c1
but we cannot output this value to the terminal since it is not ASCII encoded!

To display the ASCII character "7" we must add 48 to the value 7
48 = 6 * 8 so let's use another loop to help us!

++++ ++++  c1 = 8 and this will be our loop counter again
[
< +++ +++  Add 6 to c0
> -        Subtract 1 from c1
]
< .        Print out c0 which has the value 55 which translates to "7"!

Pozostało 580 znaków

2019-02-07 21:07
0
> x <- 1:6  # Create vector.
> y <- x^2  # Create vector by formula.
> print(y)  # Print the vector’s contents.
[1]  1  4  9 16 25 36

> mean(y)  # Arithmetic mean of vector.
[1] 15.16667

> var(y)  # Sample variance of vector.
[1] 178.9667

> model <- lm(y ~ x)  # Linear regression model y = A + B * x.
> print(model)  # Print the model’s results.

Call:
lm(formula = y ~ x)

Coefficients:
(Intercept)            x  
     -9.333        7.000  

> summary(model)  # Display an in-depth summary of the model.

Call:
lm(formula = y ~ x)

Residuals:
      1       2       3       4       5       6 
 3.3333 -0.6667 -2.6667 -2.6667 -0.6667  3.3333 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  -9.3333     2.8441  -3.282 0.030453 *  
x             7.0000     0.7303   9.585 0.000662 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.055 on 4 degrees of freedom
Multiple R-squared:  0.9583,    Adjusted R-squared:  0.9478 
F-statistic: 91.88 on 1 and 4 DF,  p-value: 0.000662

> par(mfrow = c(2, 2))  # Create a 2 by 2 layout for figures.
> plot(model)  # Output diagnostic plots of the model.

Pozostało 580 znaków

Odpowiedz
Liczba odpowiedzi na stronę

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0