instruction stringlengths 71 95.1k |
|---|
I made a simple django migration that adds two field to our Invoices model : first_payment and first_paying_month.
first_payment is obvious : is this the user's first payment, first_paying_month answers to the question: Was this payment made in the same month as the first payment, I'd love a more obvious name for this ... |
I faced the following problem.
I have a Server object server which exposes TriggerStateChangeAsync() which return an Task<bool> this task finished with true as soon the request for the state changed is send off to the server and with false if the request could not be send to the server. The object also exposses the eve... |
I developed a card game engine for a german three player card game called Skat. The operating code lives in a StateT SkatEnv (WriterT [Trick] IO) Monad.
data SkatEnv = SkatEnv { piles :: Piles
, turnColour :: Maybe TurnColour
, skatGame :: Game
, play... |
I wrote some code to create marketshare reports. However, I'm sure it can be improved. The tasks performed are:
Open the global data file, refresh the data, import its content as a DF.
Create a backup copy of the old report file.
Read the list of Distribution companies who should receive the report with their data (pl... |
I created a Custom view to select a value. I use horizontal Recyclerview to select an integer value and 2 buttons that decrease or increase the values. Could you consider the code and tell how it can be improved?
SliderValueSelectorView
public class SliderValueSelectorView extends ConstraintLayout implements View.OnCli... |
This code solves the problem of how to share user inputs throughout a large application when using dependency injection. To achieve this, I'm using a static (through DI) store and injecting it at those places, where the inputs are needed. In an application without dependency injection, arguments would be passed via con... |
Yesterday I hacked up a simple component selection program. An example is shown at the bottom for the application, though this can be used generally for a lot of different simple circuits I come across.
It requires Python 3; I've only tested it on 3.8.
About the code:
It is self-contained
The only really notable viola... |
I am quite new to the MVC concept. I already know how to program object-orientated from other languages like C++ or Java. I have implemented a little login system for test purpose.
I am not sure if my implementation is the best way to follow MVC. Any feedback is welcome.
The class ControllerUser is instantiated in a fi... |
I'm currently trying to process a corpus of a million patent text files, which contain about 10k non-unique words on average. My current data pipeline works as follows:
Load the patent texts as strings from a local sqlite database table
Tokenize¹ each document and save the results in a new table
Create a dictionary co... |
I have written a SQL server stored procedure to generate "log" tables which store the old values of rows when a table is updated, and also record when rows are deleted ( and by who ). It's quite straight-forward, the log table has identical rows to the table being logged, plus a "Changed" column which records the date ... |
I'm a beginner and i just started with automate the boring stuff with python course and reached his first os lesson, so i decided to make a recursive directory size finder since apparently os.path.getsize doesn't get the size of folders.
Need a way to improve my code or advice on coding tricks, to make it more efficien... |
Project Overview:
See how many times numbers would repeat x times on a digital clock output. This particular code only counts from 12:00 to 11:59, so it's technically only half of a day, I could take the (output x 2) for a full day.
Functions:
input_io():
Input the number of times you would like to see if a number repe... |
I have 2 variations of components that I wanted to create in React. They both use Radio buttons with the only difference is one adds an image to one side of it.
The first method will use just one component but use conditional logic to display the appropriate HTML:
getImgDiv(iconFile) {
return (<div><img s... |
I have a typeahead widget to get the state or city's population according to what the user types
Instead of issuing a GET request every time the user is done typing, the way this typeahead widget works is fetch data beforehand and store it in memory and every time user types, we are iterating through the data to retrie... |
I built some code to update dates from a Dump file.
I am commonly running into an "Exceeded maximum execution time" message. Otherwise the code works fine. It imports & updates statuses for 16.5 thousand rows from a sheet that has 29 thousand rows.
Can I make the code faster?
function update_main_master() {
var xngSs... |
Design
A template class that will create a concrete instance of an interface class when given the name (as a string) of the concrete class.
This design is often seen in code, so the purpose of this class is to reduce the boilerplate code needed to write a factory class.
The template class will be used like this:
using... |
I am implementing fundamental data structures in C# while trying to learn techniques in the language to make my code cleaner, more concise while using good programming practices.
I have implemented both algorithms, DFS and BFS, to find the bridges in a graph. The code is properly working (as far as I've tested).
Import... |
Firstly, take in account is my first question here in CodeReview. Any purpose misuderstanding will be highly appreciated if orientaded.
Scenario: I want to answer randomly a pojo (json with two fields) to Angular using a WebFlux restservice. I can succesfully answer an integer but I got stuck while trying retruning a ... |
Setup
The following code implements the algorithm described in this and this paper. The first paper describes how the evolution of a fish population can be simulated, while the second paper introdues the phenomenon of 'fishing' into the simulation. The end goal of both papers is to show that one can have a stable fish ... |
I'm trying to take advantage of NumPy broadcasting and backend array computations to significantly speed up this function. Unfortunately, it doesn't scale so well so I'm hoping to greatly improve the performance of this. Right now the code isn't properly utilizing broadcasting for the computations.
Is there a way wh... |
I quite like purrr::partial(), which allows us to easily create partial functions. However, the partial function loses its remaining arguments from its signature (replaced with ...):
f <- function(x, y) {
print(x)
print(y)
return(invisible())
}
ff <- purrr::partial(f, y = 1)
ff(2)
#> [1] 2
#> [1] 1
ff
#> <part... |
Description
I wanted to understand how integers can be written and stored inside variables without the use of Serial.parseInt(). I couldn't find any code examples about this. Perhaps this is the right way to do it, although it doesn't detect and block letters and special characters. Please leave some feedback on ways... |
A couple of days ago a user in chat asked us to spend more time in the queues. Kick starting my desire to get notifications for new items in the queues.
Reviewing the queues has been something I've wanted to do for a long time now. But I've never built a habit to check daily, and so I've wanted to use Simon Forsberg's ... |
I am writing a code that takes two numbers N and M and finds the greatest result of A mod M for all the numbers of A in the range 1,2,3,...,N-1,N.
1 ≤ N,M ≤ 10^9
My code is:
public static void main(String[] args) throws IOException {
long n=readLong(), m=readLong(), a=Integer.MIN_VALUE;
for(int i=1; i<=n; i++)... |
Python script that can downloads public and private profiles images and videos, like Gallery with photos or videos. It saves the data in the folder.
How it works:
Log in in instragram using selenium and navigate to the profile
Checking the availability of Instagram profile if it's private or existing
Creates a folder ... |
I've just finished one of my first projects with a GUI using PyQt5 and I recreated Mastermind, the board game.
The game is played by inputting 4 numbers and getting a return of how many of the numbers are in the code but in the wrong spot and how many numbers are correct (a random 4 digit combo between 0 and 9 inclusiv... |
I wondering if anyone could give me feedback on whether or not this is a secure way to implement AES/RSA hybrid encryption and signatures in python 3 with the PyCryptodome module.
All of the encoding and to/from hex format is just there because that's the format I intend to transfer it in.
"""Hybrid AES/RSA encryption,... |
Not really an issue I am stuck on (the code works) but I just really don't like some code I wrote, if you're bored in lockdown maybe you might like to help.
Context:
I am import some data from a spreadsheet, it contains data about retail stores (grocery stores). As the data comes in from the spreadsheet, each row is st... |
For my first solo React exercise project I decided to recreate a quote machine from the example that uses vanilla JS/jQuery. I also used a mix of Bootstrap/plain CSS. I got it to look how I wanted and do what I wanted, but I am not sure if my code follows best practices. All feedback is much appreciated, as I am still ... |
I have implemented binary exponentiation. Is this good?
def quad_pow(base, exponent, modul):
alpha = (bin(exponent).replace('0b', ''))[::-1]
a = 1
b = base
for i in range(0, len(alpha)):
if int(alpha[i]) == 1:
a = (a * b) % modul
b = (b*b) % modul
return a
|
I have programmed the extended euclidean algorithm. Is this a good approach?
def ext_ggT(a, b):
x,y, u,v = 0,1, 1,0
while a != 0:
q, r = b//a, b%a
m, n = x-u*q, y-v*q
b,a, x,y, u,v = a,r, u,v, m,n
gcd = b
return gcd, x, y
|
I am modelling a user preference system with the following requirements
a user can have attributes (foods they eat)
a user can have dynamic categories of preferences
users which have all their categories with at least one intersect can match
So far I have used Postgres's arrays to build a system to avoid joins. NB. ... |
I have implemented the Simpson's rule for numerical integration.
Check this video for the implemented function.
namespace Simpsons_method_of_integration
{
//https://www.youtube.com/watch?v=ns3k-Lz7qWU
using System;
public class Simpson
{
private double Function(double x)
{
... |
I am developing an application in which the user can use different measurement systems. Currently,
there is support for the metric and imperial measurement systems. To support these systems, I wrote a converter. Could you take a look at its code and tell how can it be improved.
public class SystemsMeasuresConverter {
... |
My controller is looking something like this.
Each of the methods called generate some HTML. The concatenated HTML variable gives the final render of the page
Is there a better way to generate my HTML to render coming from different functions:
$html = $renderer->render($clear_form);
$html .= $this->render_preview();... |
We have to reverse char[] using recursion.
Input: ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
package codeMonk;
public class RevereseString {
public char[] reverseStr(char[] reversedString, int startIndex , int lastIndex, int midIndex) {
// Base Condition
if(startIndex > midInd... |
attaching my try on implementing simple naive-bayes classifier for sentiment analysis as part of learning clojure and using functional programming on ML algorithms.
I tried to invest more time in code readability, functional-operations & mindset rather than efficiency (there are clearly parts in BoW creation which can ... |
In my application we have four inputs that are radio controls and the first radio control is checked by default. When the user selects another radio control and then saves the form I want to get the new value. I am using the find class but then I need to use checked[0]. Is there a better way to do this?
JS
$("#form").s... |
I am aiming to implement a calculator in an object-oriented way.
Here is the solution by using the strategy pattern.
Looking forward to some valuable comments.
package oopdesign.calculator;
public class AdditionStrategy implements CalculationStrategy {
@Override
public int calculate(int value1, int value2) {
... |
Problem: You are given a board containing lower-case letters and a word that you have to form. You can only take the letters from the front or the back, hence you have to rotate the board left or right. You have to use the greedy approach (choose which rotation lets you take the letter the fastest on each turn) and get... |
This is my first major web scraping program in python. My code works nonetheless, I'm just not sure if it's the best OOP design. My code is below:
from bs4 import BeautifulSoup
import requests
import argparse
import sys
class ComicScraper(): # Class ComicScraper for scraping comic books
def __init__(self, comic_... |
I've written a function that takes a sequence and check for every item in that sequence whether the current value a selection (obtained with a selection function) is different (or on the first iteration) from the previous computed value and if that's the case (we considered there is a change), then map the current item... |
The code reads in integer array from user input and builds a minimum heap via an iterative scheme.
Are there any edge cases in which this approach would fail?
For the following test case/command sequence:
1 4 3 10 12 6 -1
remove
remove
print
My output is 4 6 10 12 instead of 4 10 6 12, is this an invalid implementatio... |
I made a pagination algorithm but in my opinion it is too complicated and it is quite difficult to be understood. This algorithm should show 5 pages where in the middle is the current page. It should also show two pages before and two pages after the selected page (if these pages exist).
So, I just want to generate ... |
I've been using Python for around 3 months and decided to make a simple text adventure game for fun and to exercise a lot of ideas I've been learning about. I've just recently learned about classes and OOP, as well as modules so those are the two features I'm the least sure of. It's mostly a base and has two rooms set ... |
I was recently intrigued by the Hindley Milner algorithm (for type inference) and decided to implement it in python. After implementing it, I got the feeling that the implementation was incorrect. I also felt that it wasn't very pythonic, and was sort of inefficient. Here is my code (it isn't as long as it looks-- ther... |
I am hoping to make a quick decision tree using the if statement in excel vba. The point is to have a message with a prompt show up and then it will take the person through the prompts based on the answers. Can my current approach be improved upon in any way?
Sub Decision_tree()
a = MsgBox("Want To Play A Game?", ... |
Raw Data & Analysis Objective
There is a company called Nerdina Entertainment (Nerdina for short). It's been decided to optimize the operation costs of 4 departments (see below). These have 4 types of specialists on staff. Each of the 4 types is characterized by three base properties: pay rate per month, gallons of cof... |
https://leetcode.com/problems/increasing-order-search-tree/
Please review for performance
Given a binary search tree, rearrange the tree in in-order so that the
leftmost node in the tree is now the root of the tree, and every node
has no left child and only 1 right child.
Constraints:
The number of nodes in the... |
After poking around in some areas of python, I've decided to try Pygame. After about two hours of coding, this is what I came up with:
import pygame
import time
import random
pygame.init()
pygame.font.init()
WINDOW = pygame.display.set_mode((500, 500))
pygame.display.set_caption('snake')
FOOD_COORS = []
TICK = 15
... |
So the idea came from the fact that
connmanctl only completes filenames/directories when used non-interactively,
whereas when used interactively (executing connmanctl without arguments an interactive shell is started), it does support autocompletion, but when it comes to completing services (wifi networks, ethernet co... |
I manage the Python API for the Manganelo (and Mangakalot) sites and I am not fully convinced that the code structure I currently use is the best. (https://github.com/nixonjoshua98/manganelo)
The API has various objects (MangaInfo, SearchManga, DownloadChapter) and an example of the usage are as follows.
from manganelo... |
https://leetcode.com/problems/flood-fill/
An image is represented by a 2-D array of integers, each integer
representing the pixel value of the image (from 0 to 65535).
Given a coordinate (sr, sc) representing the starting pixel (row and
column) of the flood fill, and a pixel value newColor, "flood fill"
the imag... |
Write and test your own double abc (char * b) function in the program, taking in the form of a string the fractional binary number of the form "1101.101" and returning an equal decimal number (here 1 * 2 ^ 3 + 1 * 2 ^ 2 + 0 * 2 ^ 1 + 1 * 2 ^ 0 + 1 * 2 ^ -1 + 0 * 2 ^ -2 + 1 * 2 ^ -3 = 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 = 1... |
I took some time to try and solve a problem. I am building a basic Node + Express API. In the app I have created a models folder and will be adding new models as I continue development.
I attempted to write a small autoloader for a directory to automatically load and export my models. This code snippet should work for... |
I have the following snippet:
import datetime as dt
end_date = dt.datetime(2020,04,12,10,30,0,0)
current_date = dt.datetime(2020,04,10,0,0,0,0)
diff = end_date - current_date
days = diff.days + (1 if diff.seconds > 0 and diff.days > 0 else 0)
I need 0 when day is the same and 1 or more when day > 1.
Examples:
time di... |
I have written below code to create/get a dict with n number of key, value pairs. Main idea is to use the same instantiated class object across my code and play around with k/v pairs.
Current implementation:
class DataForm:
def __init__(self):
self.data_dict = dict()
def create_key_value_pair(self, ke... |
I want to define the XML schema for an XML representation of shopping
order data.
See following requirements
The XML representation of order should contain order id, description, request date,
and many line item
Each line item element should contain book, quantity, and price. Price (which is price
per book) should ... |
Im looking for some help on improving my code which visualizes path-finding algorithms. The code is working however I know it can be improved. Any suggestions would be appreciated.
Github code - https://github.com/James-Charles-Robinson/Path-Finding-Visualisation-with-Pygame
Code
import pygame
import random
# class fo... |
I'm currently trying to learn how to OOP in JavaScript by making use of ES6 classes. As an example I created this Slider using classes. I didn't find any class example where the DOM is highly involved
class Slider {
constructor(_options, _className) {
this.options = _options;
this.container = document.getEl... |
New to Python and recently turned in an assignment that, in the grading, was reviewed as 'very bad' and 'doesn't use sets' with no further elaboration. Wondering what I can do to improve this code.
The assignment instructions and restrictions were as follows:
Problem : Card Collections (cards.py):
In class we talked... |
I am student who is creating a big project trying to display data and information on maps using OpenLayers and React. At this point I have created a basic two page project where the map is the central piece of the application. For every page I have one main Component that contains its Sidebar, the Viewer Component that... |
Given a Tax type and city, access a REST API to get the total amount of taxes with the given type and at the given city. This information is to be grouped by users and ordered ascending by numerical id.
To access the log of taxes, I perform an HTTP GET request to https://api.doit.com/taxes/search?taxType={0}&page={1} w... |
I programmed the extended Euclidean algorithm together with the inverse modulo because I am making an RSA system from scratch. Any feedback regarding efficiency etc. is welcome :)
def ext_gcd(a, b):
a0, a1 = a, b
x0, x1 = 1, 0
y0, y1 = 0, 1
while a1 != 0:
q = a0//a1
... |
Given a binary tree, return the sum of values of its deepest leaves.
Constraints:
The number of nodes in the tree is between 1 and 10^4. The value of
nodes is between 1 and 100.
Please review for performance and style
using GraphsQuestions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TreeQuest... |
I've spent the past few days writing a python based client that allows you to locally encrypt your message and send it through Gmail. The encryption scheme is based off of hybrid RSA/AES encryption, where the message body is encrypted with AES and the one time session key is RSA PKCS1 OEAP. It also provides valdation o... |
> Exercise 1: Design a database connection
To access a database, we need to open a connection to it first and close it once our job is done.
Connecting to a database depends on the type of the target database and the database
management system (DBMS). For example, connecting to a SQL Server database is different
... |
I'm using ImageProcessor in C# and I can't come up with a way to make a generic method out of its methods as to avoid writing the same code more than once.
Say, I have two methods, crop and resize.
public Image Resize(Image image, int width, int height)
{
// Create a Image to be returned after being scaled, call i... |
My question concerns problem (b). This is my attempt:
def shift_left(D,k)
for j = 0 to k:
x_current = D.delete_first() //this remove and return first item
D.insert_last(x_current)
return D
The answer key was given the following for the solution. I am just trying to figure out if my solut... |
I wanted to get some feedback concerning the program. It's console based and in C#. If I should try to add constraints like making sure only the 4 questions shown are able to be typed in and nothing else or uses a number system to retrieve and set answers and if to add a randomization. If I am to add randomization how ... |
I’m a complete beginner. I was practicing from coding bat and the question was to create a function that will round 3 integers to the nearest 10 and then find their summation. I thought of a way to do it and it’s given in the picture below. Please help.
def round10(num):
return # This will return the ... |
for i in range(1,int(input())+1):
print(((10**i -1)//9)*((10**i -1)//9))
print('lol just need to fill one more line to post the question IGNORE IT')
What is the meaning of '*' in between ((10**i -1)//9) and ((10**i -1)//9) in the above print statement?
|
I'm trying to keep my sanity while working with a legacy winforms application that uses an web api, both maintained by my team.
In the past we have multiple cases of methods using wrong api endpoints, or even having different names in both client and server implementation, so we came with the idea of having an interfac... |
What I want to Build
I need to store structured data in a file column format. i.e. Each row of data is split across multiple files, each file representing one specific data item.
Example:
class Team {
int id;
int size;
};
class Person {
std::string name;
int age;
double salary;... |
This is my implementation of a graph and Kruskal's algorithm in Python. I wanted to design the graph module myself and I would like some feedback on the design. I tried to follow SOLID throughout. I am not sure if the separate Vertex object is wise, but I feel it could be useful as I expand this module.
I had a copy o... |
I have learnt python 3 for about 1 month. After I learnt the basics of oop in python, I try to create a blackjack game based on tutorial's framework. I spent 1 weeks to complete it. I want to see whether some further improvements can be done on my code. Thank you!
My blackjack game steps:
dealer(one exposed card, one ... |
This has been racking my brain for hours now. I will try to explain as much as I can. I'm aware this code is horrendously ungraceful, but I'm new to Fortran and making things more efficient is not easy for me.
I am trying to simulate the celestial motion I've specified in the title. I am going to have (before moving to... |
I am working on a react native android app that generates fancy text. Similar to this Fancy Text Generator
For every letter being typed fancy text will be generated.
I implemented everything and it works perfectly however the performance is very slow. Whenever I write text, the fancy text changes very slow and gets slo... |
I have recently completed the code challenge for exercise 48 in Learn Python3 the Hard Way. I was looking for any feedback on my solution and any ideas for improvement!
The full task can be found here:
The project involved taking the test code and creating a script that works from it. The test code can be found here (n... |
Purpose of this small module is to allow memoization of slow URL get requests. I intend to send many of these to download a bunch of files from internal (rather slow, old) website. Some requests may repeat many times - thus the memoization. Website is old so I'm limiting concurrent requests to 100.
I would love to hear... |
I am using Moya to make network calls in Swift.
In my ViewController I am calling the WebService and creating a model from response.
import UIKit
import Moya
class LoginViewController: UIViewController {
let provider = MoyaProvider<Api>()
override func viewDidLoad() {
super.viewDidLoad()
generateAccessTok... |
I have implemented the calculation of gamma value for RBF SVM as described in Liu et al (2012) [https://ieeexplore.ieee.org/abstract/document/6246300]. Here's a snapshot of the example from the paper:
Here is my implementation in MATLAB:
% Let data be a table type variable with 1st column having class label and
% var... |
https://leetcode.com/problems/minesweeper/
please review for performance. I really don't like the implementation I made for GetNumberOfMines() function, but within the time limits i did this. it is easy to understand but probably bad in performance.
Let's play the minesweeper game (Wikipedia, online game)!
You are gi... |
My data looks like this:
const sleepStages = [
{deep: Array(40)},
{light: Array(40)},
{rem: Array(40)},
{awake: Array(40)},
]
I'm using the key and values separately and am using TypeScript.
sleepStages.flatMap((sleepStage) => {
const stageName = Object.keys(sleepStage)[0];
const stageValues = Object.val... |
can anyone give me advice on how i can make my code more compact and efficient, and if you can, an implementation using OOP? Since, i just started learning Object Oriented Programming and it looks real hard.
def Hangman(): # for MENU
print("H A N G M A N")
while True:
choice = input('Type "play" to play... |
Any feedback on this code would be greatly appreciated! I am just trying to improve so I can move on to bigger projects. Thank you so much!
import java.util.*;
import java.util.Random;
public class RockPaperScissors {
public static void main(String [] args)
{
Random rd = new Random();
Sca... |
I have the following Connect 4 implementation. Is there a way to refactor it and maybe make it better. It's a fully working solution. However, I see that the correct result is not returned in certain cases like the following. In this case 1 should have won since there are four_in_a_row from the right hand side:
Team 0... |
This class is for calculating the shortest path in a 2D World (without minding obstacles).
I'm using the A* algorithm and 2D Vectors (from the SFML Framework).
It is working but takes (a lot of) time for higher amount of coordinates.
It takes 4 seconds to calculate the path from one edge of the map to the other.
Exampl... |
This code will read in double values from a file and store them in a 2-D array. I'm practicing using only arrays (not ArrayLists). The maximum number of lines that will be stored is 10, 10 values max per line. Values in the file are separated by a single white space character. Any feedback would be appreciated as well ... |
What I made
I used Tkinter to write a GUI to run some HPLC pumps for my work. The application sends some messages to the pumps via serial connections, reads a response, then logs data to a csv file.
I use Matplotlib to plot the data in real time, and to let the user plot several sets of data at once.
This is mostly ... |
I'm using react-window to virtualize a list. My list is supposed to fill in the container's completely and the container's width and height are 30vh and 100vh. Since the dimensions are dynamic and react-window requires me to provide constant dimensions, I'm hooking into the onresize event and updating the state of the ... |
I am generating View and setting constraints programmatically in UIViewController
import UIKit
import SnapKit
class LoginViewController: UIViewController {
lazy var topImageView = UIImageView()
lazy var centerStackView = UIStackView()
lazy var phoneTextField = UITextField()
lazy var sendOTPButton = UIB... |
The Problem
I wanted to create a program that is able to convert roman numbers to arabic numbers and vice versa.
Roman numerals consist of the following symbols:
| Symbol | I | V | X | L | C | D | M |
|--------|---|---|----|----|-----|-----|------|
| Value | 1 | 5 | 10 | 50 | 100 | 500 | 1000 |
One of the fu... |
I wrote an express API for a document management service (repo to be found here) and even though I understand the importance of unit-testing I never quite managed to wrap my head around how I would test an API like this. I have no idea if my test are actually testing something useful or are covering everything that cou... |
I have a massive set of latitude, longitude pairs. I also have a list of GeoJson formatted locations. I want to find out which location each pair of coordinates lies in.
I have some code to do this, but it's super slow and won't work against my dataset in it's current format:
# Load Dataset
CHICAGO_CRIME = '/content/dr... |
I am learning Python, and this is one of the program assignments I have to do.
I need to write code to prompt user to enter Fibonacci numbers continuously until it's greater than 50. If everything correct, screen show 'Well done', otherwise 'Try again'.
While my code is working correctly, I would like to know how I sho... |
I am building Twitter. People can follow each other, and hence I have 2 tables, users and followers.
My current problem is that I feel like I'm doing too many SELECTs before doing anything useful. Is it common to have a SELECT on users to find the current user each time?
I have:
models.py
class User(Base):
"""Tab... |
I wrote a simplified pig latin translator in APL and I would like some feedback on it, as I am not sure my implementation is neat enough.
The simplified pig latin translation follows the following rules, where only 'aeiouAEIOU' are considered vowels:
one-letter words have 'way' appended to them; e.g. 'I' becomes 'Iway... |
I am working on a basic blog application with Codeigniter 3.1.8 and Bootstrap 4.
The application has users (authors) and posts (articles). Every article:
has an author,
belongs to a category,
has a default (generic) main image that is displayed unless the author assigns a specific image to
it.
The structure of the po... |
Python script that can downloads public and private profiles images and videos, like Gallery with photos or videos. It saves the data in the folder.
How it works:
Log in in instragram using selenium and navigate to the profile
Checking the availability of Instagram profile if it's private or existing
Creates a folder ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.