This file contains 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
Hello! congratulations you can read me :D |
This file contains 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
func (repo QuoteRepo) FindUserFavorites(userID int) ([]domain.Quote, error) { | |
query := `SELECT q.id, q.body, q.author, q.quote_source FROM quotes q | |
JOIN userfavoritesquotes on (q.id = userfavoritesquotes.quote_id) | |
JOIN users ON (users.id = userfavoritesquotes.user_id) | |
WHERE users.id = @userID` | |
rows, err := repo.DB.Debug().Raw(query, sql.Named("userID", userID)).Rows() | |
if err != nil { | |
return nil, err | |
} |
This file contains 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
package model | |
import "gorm.io/gorm" | |
type User struct { | |
gorm.Model | |
Username string | |
Password string | |
Role string | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/python3 | |
import re | |
import operator | |
import pprint | |
import operator | |
import collections | |
import csv | |
# 1.The rankking of errors generated by the system |
This file contains 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
#!/usr/bin/python3 | |
import os | |
from PIL import Image | |
OUTPUT_FILE_PATH = "./opt/icons/" | |
ORIGINAL_FILE_PATH = "./images/" | |
FILL_COLOR = (120, 8, 220) | |