Skip to content

Instantly share code, notes, and snippets.

View vlad-mihet's full-sized avatar
🏠
Working from home

Vlad Mihet vlad-mihet

🏠
Working from home
View GitHub Profile
use Illuminate\Http\Request;
public function createPost(Request $request, $author_id)
{
$validatedData = $request->validate([
'title' => 'required|max:255',
'category_id' => 'required|exists:categories,id',
]);
// Check if a post with the same title and author_id exists
const { Temporal } = require("@js-temporal/polyfill");
const today = Temporal.Now.instant();
console.log(today.toString());
// 2022-03-28T20:04:38.489878489Z
const date = Temporal.Instant.from("2022-01-01-06:00");
console.log(date.toString());
// 2022-01-01T06:00:00Z
const { Temporal } = require("@js-temporal/polyfill");
const time = Temporal.Now.zonedDateTimeISO();
console.log(time.toString());
// 2022-03-28T22:50:53.705053703+03:00[Europe/Bucharest]
const ukTime = Temporal.Now.zonedDateTimeISO("Asia/Katmandu");
console.log(ukTime.toString());
// 2022-03-29T01:38:04.452648497+05:45[Asia/Katmandu]
const { Temporal } = require("@js-temporal/polyfill");
const timeOfNow = Temporal.Now.plainTimeISO();
console.log(timeOfNow.toString());
// 22:34:17.306057305
const { Temporal } = require("@js-temporal/polyfill");
const today = Temporal.Now.plainDateISO();
console.log(today.toString());
// 2022-03-28
const { Temporal } = require("@js-temporal/polyfill");
const today = Temporal.Now.plainDateTimeISO()
console.log(today.toString())
// 2022-03-28T21:51:05.244465243
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
<form>
<label for="radio">
<input id="radio" name="test" value="value_1" type="radio" />
Value 1
</label>
<label for="radio">
<input id="radio" name="test" value="value_2" type="radio" />
Value 2
</label>
<label for="radio">
label {
display: block;
}
input[type="radio"] {
position: relative;
}
input[type="radio"]::before {
content: "";
button {
background-color: #fff;
color: #333;
transition: 0.25s ease-in-out;
border-radius: 6px;
&::after {
content: "Hey!";
}