Da, mama mă iubește! Nu poate adormi de lumina zâmbetului meu Gătește întotdeauna o porție în plus, chiar dacă trec rar pe-acasă Plânge, dar nu spune, că necazuri oricum se găsesc peste tot Suspină, întreabă cu o bucurie pe care eu încă nu o știu: „A! ți-ai dat demisia?” Pentru ea sunt un rege, nicidecum un cal Scrutinează draconic o fată pe care eu am judecat-o doar cu vederea.
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
| #!/bin/bash | |
| set -e | |
| # 1. Parse pubspec.yaml version | |
| VERSION=$(grep '^version: ' pubspec.yaml | head -n1 | awk '{print $2}') | |
| if [ -z "$VERSION" ]; then | |
| echo "Error: Version not found in pubspec.yaml" | |
| exit 1 | |
| fi |
- fork the repo https://github.com/tudorilisoi/blitz-e4
git cloneyour fork on to your machinegit add remote origin https://github.com/tudorilisoi/blitz-e4- install node v18.18.0, then run
npm i -g yarn - run
yarn install - run
npx blitz prisma migrate devto create the database
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
| // schema | |
| import { z } from 'zod' | |
| // structure for a blog post | |
| export const postCreateSchema = z.object({ | |
| title: z | |
| .string({ required_error: 'Title is required' }) | |
| .min(10, 'Title is too short'), | |
| body: z | |
| .string({ required_error: 'Body is required' }) |
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 { faker } from '@faker-js/faker'; | |
| const MAX = 100 | |
| const users = [] | |
| const departaments = 'bridge engine'.split(' ') | |
| for (let i = 0; i < MAX; i++) { | |
| let firstName = faker.name.firstName(); | |
| let lastName = faker.name.lastName(); | |
| const user = { | |
| name: firstName + ' ' + lastName, |
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
| let num = 0 //declare a variable whose initial value is zero | |
| //function declaration | |
| function increaseNum(){ | |
| num++ //increase the value of num by 1 using the increment operator | |
| //get the reference to the body element | |
| let bodyElement = document.getElementsByTagName('body')[0] | |
| //... and set its text value to the value of num |
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
| //*** Object creation | |
| // 1) class syntax , usage: p = new Person('Rex') | |
| class Person { | |
| constructor(name) { | |
| this.name = name | |
| } | |
| sayHello() { |
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
| let i = 1 //step | |
| //this implementation computes the sequence as an array | |
| function fib(n) { | |
| if (n === 1) { | |
| return [1, 1] | |
| } | |
| const prev = fib(n - 1) | |
| const rl = prev.length |
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
| /* | |
| Write a recursive function that splits a string based on a separator (similar to String.prototype.split). | |
| Don't use JS array's split function to solve this problem. | |
| Input: 02/20/2020 | |
| Output: ["02", "20", "2020"] | |
| https://courses.thinkful.com/dsa-v1/checkpoint/2 |
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
| try { | |
| // queries sequence | |
| const topicIDs = await knex('topics_users').select('topic_id').where('user_id', userID) | |
| const topics = await knex('topics').select('*').where('id', topicIDs) | |
| //single query | |
| const topicsInOneGo = await knex('topics').select('*') | |
| .innerJoin('topics_users', 'topics_users.id', 'topics.id') | |
| .where('topics_users.user_id', topicIDs) |
NewerOlder