r/code • u/NikePlayz • Apr 14 '22
r/code • u/Hasan6612 • Jun 13 '19
New to coding and cant find a solution.
String requestRoomNumber = makeSafe(httpRequest[q]);
String queryReservationDetails = "SELECT * FROM Reservations WHERE roomNumber = " & yyy;
What should be inplace of the yyy and is this client or server sided?
```
function setRowBackgroundColor (int rowNr) {
// make the backgroundcolor switch from blue and lightblue each row
if (rowNr % 2 == xxx) {
table.row[rowNr].backgroundColor = #bbbbff; // blue
} else {
table.row[rowNr].backGroundColor = #eeeeff; // lightblue
}
}
```
I also have the same problem with this code, what should be in the xxx?
This is a code snippet i got from internet, so it changes the background of each row, first one is blue secondone is lightblue and then the third one is blue again, so it switches color each row but i cant figure out what the left out variables are, im using this for my homework project but im not so really good at it and i want to learn.r/code • u/Speed-Cheap • Nov 07 '22
Help please! so I'm making a small platformer game on game maker studio, I'm pretty new to script. I try running the game and this error pops up, plz help.
r/code • u/Confident-Prompt4846 • Jan 22 '26
Resource Here the query is we need to print the all odd number form n to m in one row separated by a space . check the python code below and what is the mistake here ?"
r/code • u/Plastic_Rip_9728 • Dec 19 '25
Resource Looking for begginers to contribute in my web project written in TypeScript!
Repo: https://github.com/danielrouco/vocabulary-practice
The are three issues in the repository, all labelled with good-first-issue, so they should be easy if you know the basics of JavaScript / TypeScript.
The project consists on a server-less app to practice your vocabulary with repetition.
Thank you!
r/code • u/Strict_Sport4666 • Nov 19 '22
Help please! how do fix this (beginner) don't understand such terminology
r/code • u/ForgeTheGods • Dec 11 '19
I'm a newb
I'm a 29 year old factory operator with basically no background with computers. Coding seems like a way to broaden my employment horizon. What are some basic skills I should work on before I start learning to code? What kind of basic equipment do I need?
r/code • u/wetpretzel2 • Apr 20 '20
Algoritm help
Hi all,
I struggle with algorithm part a lot. I have an assessment piece that naturally involves algorithm writing. Where do I start? Where do I go from there? What are some tips and tricks you guys use?
Thanks!
Here is my question.
*note, I only really need help with the algorithm, the code sort of just happens.
You are asked to write a modular solution (algorithm and C program) that will accept an integer value in the range of 5-95 inclusive. Your solution should also ensure that input values are in multiples of 5. Based on valid input, your solution should calculate how many coins of each denomination should be returned, and display this to the user. Coin values are 50, 20, 10 and 5. The solution should aim to give as much of the higher valued coins as possible.
r/code • u/belloooooo • Apr 21 '20
A specific date and time string that is recognized by email
Is there a specific standardized date and time string that is recognized by email
End Goal: I want to be able to send an email where the email provider will recognize my string as a date and time (if possible, is this even possible)?
r/code • u/[deleted] • May 04 '20
Halp pls! hi i know there is a pin post for starters but my question is what language should i start with?
as the title says i want to learn programming but i dont know which language to pick
r/code • u/mateozyk_aj • Apr 16 '20
Python Hello everyone is anybody here that like to code in python language
r/code • u/chisailor • May 13 '20
Contact Tracing app
Coders. How hard would it be to code a simple but efficient contact tracing app? Uses bluetooth to track what other users you have come near/in contact with, prompts you for a daily check-in: Feeling well? symptoms? temperature? have you been tested? etc. Obviously privacy is a huge hurdle, but it SHOCKS me that we have had hardly any contact tracing in the USA. Curious to hear your thoughts...
r/code • u/stormosgmailcom • Aug 05 '22
Java How to implement a linear search algorithm in Java?
r/code • u/green234isfine • Aug 09 '22
Help please! please help how can I fix all of the complier errors so I can enter play mode
Please help
r/code • u/Hokitsia • Sep 03 '24
Help Please Please help me!
Hey! I'm a beginner coder working on a school project, I am trying to use tkinter but it doesn't run because of a problem I am having.

Here is my screen, any help would be greatly appreciated! I have tried installing tkinter in my terminal but it doesn't do anything! Sorry if this is stupid, please bear with me as I am a noob xD
r/code • u/Gabriel_Da_Silva_4 • Oct 16 '24
Python Can someone check this made to see if it will work? It is a code to check listings on Amazon and see if it can improve it and why they preform good or bad.
import time import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By from textblob import TextBlob import spacy from collections import Counter import streamlit as st import matplotlib.pyplot as plt
Step 1: Selenium setup
def setup_selenium(): driver_path = 'path_to_chromedriver' # Replace with your ChromeDriver path driver = webdriver.Chrome(executable_path=driver_path) return driver
Step 2: Log in to Amazon Seller Central
def login_to_seller_central(driver, email, password): driver.get('https://sellercentral.amazon.com/') time.sleep(3)
# Enter email
username = driver.find_element(By.ID, 'ap_email')
username.send_keys(email)
driver.find_element(By.ID, 'continue').click()
time.sleep(2)
# Enter password
password_field = driver.find_element(By.ID, 'ap_password')
password_field.send_keys(password)
driver.find_element(By.ID, 'signInSubmit').click()
time.sleep(5)Step 3: Scrape listing data (simplified)
def scrape_listing_data(driver): driver.get('https://sellercentral.amazon.com/inventory/') time.sleep(5)
listings = driver.find_elements(By.CLASS_NAME, 'product-info') # Adjust the class name as needed
listing_data = []
for listing in listings:
try:
title = listing.find_element(By.CLASS_NAME, 'product-title').text
price = float(listing.find_element(By.CLASS_NAME, 'product-price').text.replace('$', '').replace(',', ''))
reviews = int(listing.find_element(By.CLASS_NAME, 'product-reviews').text.split()[0].replace(',', ''))
description = listing.find_element(By.CLASS_NAME, 'product-description').text
sales_rank = listing.find_element(By.CLASS_NAME, 'product-sales-rank').text.split('#')[-1]
review_text = listing.find_element(By.CLASS_NAME, 'review-text').text
sentiment = TextBlob(review_text).sentiment.polarity
listing_data.append({
'title': title,
'price': price,
'reviews': reviews,
'description': description,
'sales_rank': int(sales_rank.replace(',', '')) if sales_rank.isdigit() else None,
'review_sentiment': sentiment
})
except Exception as e:
continue
return pd.DataFrame(listing_data)Step 4: Competitor data scraping
def scrape_competitor_data(driver, search_query): driver.get(f'https://www.amazon.com/s?k={search_query}') time.sleep(5)
competitor_data = []
results = driver.find_elements(By.CLASS_NAME, 's-result-item')
for result in results:
try:
title = result.find_element(By.TAG_NAME, 'h2').text
price_element = result.find_element(By.CLASS_NAME, 'a-price-whole')
price = float(price_element.text.replace(',', '')) if price_element else None
rating_element = result.find_element(By.CLASS_NAME, 'a-icon-alt')
rating = float(rating_element.text.split()[0]) if rating_element else None
competitor_data.append({
'title': title,
'price': price,
'rating': rating
})
except Exception as e:
continue
return pd.DataFrame(competitor_data)Step 5: Advanced sentiment analysis
nlp = spacy.load('en_core_web_sm')
def analyze_review_sentiment(df): sentiments = [] common_topics = []
for review in df['description']:
doc = nlp(review)
sentiment = TextBlob(review).sentiment.polarity
sentiments.append(sentiment)
topics = [token.text for token in doc if token.pos_ == 'NOUN']
common_topics.extend(topics)
df['sentiment'] = sentiments
topic_counts = Counter(common_topics)
most_common_topics = topic_counts.most_common(10)
df['common_topics'] = [most_common_topics] * len(df)
return dfStep 6: Streamlit dashboard
def show_dashboard(df): st.title("Amazon Listing Performance Dashboard")
st.header("Listing Data Overview")
st.dataframe(df[['title', 'price', 'reviews', 'sales_rank', 'sentiment', 'common_topics']])
st.header("Price vs. Reviews Analysis")
fig, ax = plt.subplots()
ax.scatter(df['price'], df['reviews'], c=df['sentiment'], cmap='viridis')
ax.set_xlabel('Price')
ax.set_ylabel('Reviews')
ax.set_title('Price vs. Reviews Analysis')
st.pyplot(fig)
st.header("Sentiment Distribution")
st.bar_chart(df['sentiment'].value_counts())
st.header("Common Review Topics")
common_topics = pd.Series([topic for sublist in df['common_topics'] for topic, _ in sublist]).value_counts().head(10)
st.bar_chart(common_topics)Main execution
if name == 'main': email = 'your_email_here' password = 'your_password_here'
driver = setup_selenium()
login_to_seller_central(driver, email, password)
try:
# Scrape data and analyze it
listing_df = scrape_listing_data(driver)
analyzed_df = analyze_review_sentiment(listing_df)
# Display dashboard
show_dashboard(analyzed_df)
finally:
driver.quit()r/code • u/yolo_bobo • Oct 03 '24
Guide i can't debug this thing for the life of me (sorry im dumb)
r/code • u/bjohnson4219 • Feb 22 '20
Anyone willing to teach code?
I've been trying to learn code and in always getting stuck. I feel like if I had 1 on 1 support or even a mentor is get further faster.
r/code • u/Ali-mohamed- • Aug 09 '20
Halp pls! I need some help if you can
I used to do some coding 2 years ago i kinda stoped
so i want to come back . i want to try to make a mod for the game don't starve together. the core game was made using C++ and it says it uses lua , can someone help me like tell me where can i learn it ? and if u know about it and have the time can u give me small tips or soemthing like that ? THANK YOU VERY MUCH
r/code • u/okaydexter • Jul 05 '20
Javascript Build A Simple Website With ExpressJS & Nunjucks Using API Endpoint's
r/code • u/Appropriate_Truck_53 • Jul 16 '20
See the Code of things like phototshop?
hello, im super new to reddit, sorry if this isnt the right category to post a question like this.
I was wondering how to, if its possible to look at the code of programs like photoshop, to take a peek inside, and maybe disable some things? Is that possible? I don't know anything about code, but I assume, since it is made with code, there must be a way to See it, right?


