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
<?xml version="1.0" encoding="utf-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:re="http://purl.org/atompub/rank/1.0"> | |
<title type="text">Active questions tagged rust - Stack Overflow</title> | |
<link rel="self" href="https://stackoverflow.com/feeds/tag/rust" type="application/atom+xml" /> | |
<link rel="alternate" href="https://stackoverflow.com/questions/tagged/?tagnames=rust&sort=active" type="text/html" /> | |
<subtitle>most recent 30 from stackoverflow.com</subtitle> | |
<updated>2025-05-09T11:56:01Z</updated> | |
<id>https://stackoverflow.com/feeds/tag/rust</id> | |
<creativeCommons:license>https://creativecommons.org/licenses/by-sa/4.0/rdf</creativeCommons:license> | |
<entry> |
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
require 'rubygems' | |
require 'faker' | |
def fake_using(hex_str) | |
prev_random = Faker::Config.random | |
Faker::Config.random = Random.new(hex_str.to_i(16)) | |
result = yield | |
Faker::Config.random = prev_random | |
result | |
end |
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
tables: | |
- path: users | |
fields: | |
- name: name | |
in_place: false | |
cast_type: utf8-str | |
mode: encrypted-duplicate | |
indexes: | |
- version: 1 | |
kind: match |
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 { HasID, QueryResult, Stash } from "@cipherstash/stashjs" | |
import { movieSchema, Movie } from "./example-schema"; | |
function displayResults(result: QueryResult<Movie & HasID>, name: string) { | |
result.documents.forEach((movie: Movie) => { | |
console.log(movie) | |
}) | |
// TODO: print count | |
console.log("--------------------------------------------------") | |
console.log(name) |
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
CREATE TYPE ore_block_64_8; | |
CREATE FUNCTION ore_block_in_64_8(cstring) | |
RETURNS ore_block_64_8 | |
AS '$libdir/pgsecret' | |
LANGUAGE C IMMUTABLE STRICT; | |
CREATE FUNCTION ore_block_out_64_8(ore_block_64_8) | |
RETURNS cstring | |
AS '$libdir/pgsecret' |
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
["Crocodile", "Giraffe", "Lion", "Tiger"] | |
|> Enum.map(&String.capitalize/1) | |
|> Enum.sort |
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
["Crocodile", "Giraffe", "Lion", "Tiger"].map { |word| | |
word.capitalize | |
}.sort |
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
def print_name(%User{firstname: fname, lastname: lname}) do | |
"#{fname} #{lname}" | |
end |
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
def print_name(%User{} = user) do | |
"#{user.firstname} #{user.lastname}" | |
end | |
def print_name(_) do | |
"Unknown" | |
end |
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
def print_name(user) | |
if user.present? and user.kind_of?(User) | |
"#{user.firstname} #{user.lastname}" | |
else | |
"Unknown" | |
end | |
end |
NewerOlder