&'static str
String::leak
, e.g. (edited)env!
{"abc"}
{static VALUE: &str = "abc"; VALUE}
warning: the following packages contain code that will be rejected by a future version of Rust: buf_redux v0.8.4, multipart v0.18.0
abc
as its value (edited){"abc"}
also suffices that guaranteeabc
)h(k) + (i + i^2) / 2
#![deny(unsafe)]
thoughlinear probing 10 time: [255.08 ns 256.75 ns 258.66 ns]
quadratic probing 10 time: [252.66 ns 252.96 ns 253.25 ns]
linear probing 100 time: [3.7110 µs 3.7169 µs 3.7236 µs]
quadratic probing 100 time: [3.6763 µs 3.6783 µs 3.6803 µs]
linear probing 1000 time: [32.555 µs 32.703 µs 32.906 µs]
quadratic probing 1000 time: [32.002 µs 32.046 µs 32.126 µs]
linear probing 10000 time: [464.28 µs 464.39 µs 464.53 µs]
quadratic probing 10000 time: [453.38 µs 454.40 µs 455.71 µs]
linear probing 100000 time: [6.4169 ms 6.4213 ms 6.4267 ms]
quadratic probing 100000 time: [6.3506 ms 6.3548 ms 6.3601 ms]
(from what i have seen)
capitalize the Iresiduez
requires Signal Processing Toolbox.
(+ 1 2 3 4)
my favourite way to write 1 + 2 + 3 + 4, very intuitive-module(series).
-export([fib/1]).
fib(0) -> 0;
fib(N) when N < 0 -> err_neg_val;
fib(N) when N < 3 -> 1;
fib(N) -> fib_int(N, 0, 1).
fib_int(1, _, B) -> B;
fib_int(N, A, B) -> fib_int(N-1, B, A+B).
-module(series).
-export([fib/1]).
fib(0) -> 0;
fib(N) when N < 0 -> err_neg_val;
fib(N) when N < 3 -> 1;
fib(N) -> fib_int(N, 0, 1).
fib_int(1, _, B) -> B;
fib_int(N, A, B) -> fib_int(N-1, B, A+B).
-define(IP_VERSION, 4).
-define(IP_MIN_HDR_LEN, 5).
DgramSize = byte_size(Dgram),
case Dgram of
<<?IP_VERSION:4, HLen:4, SrvcType:8, TotLen:16,
ID:16, Flgs:3, FragOff:13,
TTL:8, Proto:8, HdrChkSum:16,
SrcIP:32,
DestIP:32, RestDgram/binary>> when HLen>=5, 4*HLen=<DgramSize ->
OptsLen = 4*(HLen - ?IP_MIN_HDR_LEN),
<<Opts:OptsLen/binary,Data/binary>> = RestDgram,
...
end.
CEditorMap::PerformSanityChecks
to perform additional sanity checks when loading a map in the editor.
In particular, the following is added: Check if there are any images with a width or height that is not divisible by 16 which are used in tile layers. Reset the image for these layers, to prevent crashes with some drivers.
Closes #6519.
Error message popup when loading the map linked in the issue (loading goes through, but this popup message is shown):
![screenshot_2023-07-1...