Download bhop script for css

PHP: The latest news in the PHP world

2008.01.25 07:37 PHP: The latest news in the PHP world

Share and discover the latest news about the PHP ecosystem and its community. Please respect php's rules.
[link]


2008.01.25 07:32 πš“πšŠπšŸπšŠπšœπšŒπš›πš’πš™πš

Chat about javascript and javascript related projects. Yes, typescript counts. Please keep self promotion to a minimum/reasonable level.
[link]


2012.04.04 18:47 MattRay0295 Learn Javascript

This subreddit is for anyone who wants to learn JavaScript or help others do so. Questions and posts about frontend development in general are welcome, as are all posts pertaining to JavaScript on the backend.
[link]


2024.05.19 09:32 Botbapapa Ben isn't real.

See the title ^
If you want to help spread the word, please find the source code and easy to follow instructions below. And thank you in advance for your help in this effort.
5 easy steps:
  1. Download and install python: https://www.python.org/about/gettingstarted/
  2. Install praw (the library that lets you talk to the Reddit API), you could read the documentation but serious, just type "pip3 install praw" into your terminal and that's all you need.
  3. Download/copy the source code from here into a file called something like "super_important_reminder.py", modify it per the comments, and save.
  4. Go into the directory with the file, and run the bot with the command: "python3 super_important_reminder.py"
  5. If you want to really prove your worth, use crontab or something else to automate your computer to run that script every day, or every hour, or whatever floats your moat. Or if that's too hard, just run it manually every day, or every hour, or whatever floats your moat.
submitted by Botbapapa to FakeYellowben [link] [comments]


2024.05.19 08:49 Boring-Apple7836 Do you know the name of this theme?

Do you know the name of this theme? submitted by Boring-Apple7836 to vscode [link] [comments]


2024.05.19 08:48 NefariousnessIcy4842 Am I job ready? Seeking Feedback on My Latest Project

Good Day Devs!
I've dedicated the past 8-9 months to learning frontend development. After creating numerous websites and projects I've created during this learning journey, I finally reached to the point where I am actually feeling confident about my skills.
I'm reaching out to seek advice from seniors. I'm curious to know if I'm ready for a job in this field. Could you please take a look at my latest project and let me know what you think? Your opinion matters a lot to me, and I'd really appreciate your feedback.
The reason I am excited about this project because it's crafted entirely with Vanilla Technologiesβ€”using Vanilla JavaScript, CSS, and HTML.
While I've had created more complex projects with React, but achieving similar functionality with vanilla JavaScript and implementing the MVC (Model View Controller) Design Pattern was a big deal and great learning experience for me.
Development is still ongoing, will soon implement Babel and Polyfilling and finish it by implementing Backend once I learn some Backend technology.
URL to my project vanillaCRM .netlify .app (Please combine it and have a look)
In case someone take a quick look at my React Project as well and provide feedback, I would really appreciate it.
URL to my React project react jewels . netlify .app
submitted by NefariousnessIcy4842 to webdevelopment [link] [comments]


2024.05.19 08:42 DigitalSplendid Connecting an existing Python web application with another API

As part of CS50 Week 9 project, I have this finance project completed: https://cs50.harvard.edu/x/2024/psets/9/finance/
Now, I intend to connect this project with Zerodha API (https://kite.trade/) instead of current Yahoo Finance API.
Not sure though I understand it is unlikely that all the Python files Zerodha has as part of their API docs (https://github.com/zerodha/pykiteconnect) to be added to my Codespace. The reason I feel so is Yahoo Finance too might have their own set of Python files as part of their API docs which were never added. They rather perhaps need to be imported using import command.
The configuration was made in helpers.py for Yahoo Finance API:

 # Prepare API request symbol = symbol.upper() end = datetime.datetime.now(pytz.timezone("US/Eastern")) start = end - datetime.timedelta(days=7) # Yahoo Finance API url = ( f"https://query1.finance.yahoo.com/v7/finance/download/{urllib.parse.quote_plus(symbol)}" f"?period1={int(start.timestamp())}" f"&period2={int(end.timestamp())}" f"&interval=1d&events=history&includeAdjustedClose=true" ) # Query API try: response = requests.get( url, cookies={"session": str(uuid.uuid4())}, headers={"Accept": "*/*", "User-Agent": request.headers.get("User-Agent")}, ) response.raise_for_status() # CSV header: Date,Open,High,Low,Close,Adj Close,Volume quotes = list(csv.DictReader(response.content.decode("utf-8").splitlines())) price = round(float(quotes[-1]["Adj Close"]), 2) return {"price": price, "symbol": symbol} except (KeyError, IndexError, requests.RequestException, ValueError): return None def usd(value): """Format value as USD.""" return f"${value:,.2f}" 
Modified the same for Zerodha:
ef lookup(symbol): """Look up quote for symbol using Zerodha Kite Connect API.""" # Prepare API request symbol = symbol.upper() headers = {"X-Kite-version": "3"} # Specify API version # Endpoint URL with placeholder for access token and symbol url = f"https://api.kite.trade/data/v3/instruments/{symbol}" # Read access token from config file securely try: config = ConfigParser() config.read('config.py') # Assuming config.py is in the same directory access_token = config.get('DEFAULT', 'ZERodha_ACCESS_TOKEN') except (FileNotFoundError, KeyError): # Handle missing config file or key gracefully print("Error: Configuration file or access token not found.") return None ..................................................... 
Although the above for Zerodha is still not functional, is it correct that if the above portion of the code configured correctly, I can connect the proposed web application with Zerodha API?
UPDATE:
ChatGPT apparently solved this query:
Yes, you're on the right track. If you configure the portion of the code correctly to interact with the Zerodha API, you should be able to connect your web application to the Zerodha API.
Here are some key points to consider:
  1. API Endpoint: Ensure that you're using the correct endpoint for the Zerodha API. The endpoint you're accessing in the lookup function (https://api.kite.trade/data/v3/instruments/{symbol}) seems appropriate for retrieving instrument data.
  2. Authentication: Make sure you're handling authentication correctly. It appears that you're attempting to read the Zerodha access token from a config file. Ensure that the access token is valid and that your application has the necessary permissions to access the Zerodha API.
  3. Error Handling: Implement robust error handling to handle cases where the Zerodha API request fails or returns unexpected data. This includes handling exceptions such as FileNotFoundError, KeyError, and requests.RequestException as you've done in your code.
  4. Testing: Once you've configured the code to interact with the Zerodha API, thoroughly test your application to ensure that it retrieves data correctly and handles errors gracefully.
By addressing these points and making sure that your code interacts correctly with the Zerodha API, you should be able to connect your web application to the Zerodha API successfully.
DigitalSplendid ➜ /workspaces/fin (main) $ pip install pykiteconnect ERROR: Could not find a version that satisfies the requirement pykiteconnect (from versions: none) ERROR: No matching distribution found for pykiteconnect @DigitalSplendid ➜ /workspaces/fin (main) $ pip install pykiteconnect ERROR: Could not find a version that satisfies the requirement pykiteconnect (from versions: none) ERROR: No matching distribution found for pykiteconnect @DigitalSplendid ➜ /workspaces/fin (main) $ apt-get install libffi-dev python-dev python3-dev E: Could not open lock file /valib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/valib/dpkg/lock-frontend), are you root? @DigitalSplendid ➜ /workspaces/fin (main) $ @DigitalSplendid ➜ /workspaces/fin (main) $ apt-get install libffi-dev python-dev python3-dev bash: syntax error near unexpected token `(' ld not open lock file /valib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/valib/dpkg/lock-front@DigitalSplendid ➜ /workspaces/fin (main) $ E: Could not open lock file /valib/dpkg/lock-frontend - open (13: Permission denied) bash: syntax error near unexpected token `(' end), are you root? @DigitalSplendid ➜ /workspaces/fin (main) $ @DigitalSplendid ➜ /workspaces/fin (main) $ E: Unable to acquire the dpkg frontend lock (/valib/dpkg/lock-frontend), are you root? bash: syntax error near unexpected token `('ChatGPT
It seems like you're encountering some permission issues while trying to install packages and run commands using apt-get. Here are some steps you can take to resolve these issues:
  1. Permission Denied: Ensure that you have the necessary permissions to install packages and run commands as required. If you're working in a Linux environment, you may need to use sudo to elevate your privileges. For example:arduinoCopy code sudo apt-get install libffi-dev python-dev python3-dev
  2. Lock File Issue: The error message E: Could not open lock file /valib/dpkg/lock-frontend indicates that another process is currently using the package management system. Make sure that no other package manager or update process is running in the background. If you're certain there are no other processes, you can remove the lock file manually:After removing the lock file, try running the apt-get command again.bashCopy code sudo rm /valib/dpkg/lock-frontend
  3. Installation of pykiteconnect: Since you couldn't find a matching distribution for pykiteconnect, it's possible that it's not available via pip or apt-get in your current environment. You may need to check the installation instructions provided by Zerodha or consider alternative methods for installing pykiteconnect.
Try these steps and let me know if you encounter any further issues!
DigitalSplendid ➜ /workspaces/fin (main) $ pip install pykiteconnect ERROR: Could not find a version that satisfies the requirement pykiteconnect (from versions: none) ERROR: No matching distribution found for pykiteconnect @DigitalSplendid ➜ /workspaces/fin (main) $ ChatGPT
It seems that pykiteconnect is not available for installation via pip in your current environment. This could be due to various reasons, such as the package not being hosted on PyPI or not being compatible with your Python version.
You might want to double-check if pykiteconnect is available on PyPI by searching for it directly on the PyPI website or by consulting the official documentation or repository of Zerodha.
If pykiteconnect is not available on PyPI, you may need to install it using alternative methods, such as downloading the source code from the official repository and installing it manually, or using a package manager specific to your operating system.
Once you have successfully installed pykiteconnect, you should be able to import it into your Python scripts and use it to interact with the Zerodha API.
Could not find a version that satisfies the requirement pykiteconnect (from versions: none) DigitalSplendid DigitalSplendid 12:12PM in Kite Publisher Flag @DigitalSplendid ➜ /workspaces/fin (main) $ pip install pykiteconnect ERROR: Could not find a version that satisfies the requirement pykiteconnect (from versions: none) ERROR: No matching distribution found for pykiteconnect @DigitalSplendid ➜ /workspaces/fin (main) $
Is this the right way to install pykiteconnect? Just registered for Publisher program. I could see it is mentioned: No API access. HTML/Javascript buttons and basket.ChatGPT
It seems that pykiteconnect might not be available via PyPI for installation using pip. If you've registered for the Publisher program with Zerodha and it mentions that there's no API access and instead offers HTML/Javascript buttons and basket, then pykiteconnect might not be the right tool for your use case.
In this scenario, you might want to check the documentation or resources provided by Zerodha for the Publisher program to understand how you can integrate their features using HTML/Javascript buttons and baskets.
If you specifically need to interact with the Zerodha API programmatically and pykiteconnect is not suitable, you might need to explore other options provided by Zerodha or consider contacting their support for further assistance on how to integrate their services with your application.
submitted by DigitalSplendid to webdev [link] [comments]


2024.05.19 08:41 Comfortable-Touch304 looking for new job opportunities.

Hello Reddit!

I am a frontend developer with [0] years of experience looking for new job opportunities. Here are some key details about my skills and experience: **Skills**: HTML, CSS, JavaScript, React, Bootstrap,
- **Availability**: Full-time, part-time, or freelance
submitted by Comfortable-Touch304 to u/Comfortable-Touch304 [link] [comments]


2024.05.19 08:22 EchoJobs Hiring Front End Engineer for Generative AI Applications - AI for Business Department (AI4B) Tokyo, Japan Japan [Machine Learning HTML CSS JavaScript React API Vue.js Git Node.js TypeScript Angular Python Ruby]

Hiring Front End Engineer for Generative AI Applications - AI for Business Department (AI4B) Tokyo, Japan Japan [Machine Learning HTML CSS JavaScript React API Vue.js Git Node.js TypeScript Angular Python Ruby] submitted by EchoJobs to FrontendDevJobs [link] [comments]


2024.05.19 08:02 EchoJobs Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS]

Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS] submitted by EchoJobs to ReactJSJobs [link] [comments]


2024.05.19 07:53 EchoJobs Hiring Senior Mobile Developer (ReactJS) for Sora Union Remote [JavaScript HTML CSS API Git React]

Hiring Senior Mobile Developer (ReactJS) for Sora Union Remote [JavaScript HTML CSS API Git React] submitted by EchoJobs to FrontendDevJobs [link] [comments]


2024.05.19 07:52 EchoJobs Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS]

Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS] submitted by EchoJobs to golangjob [link] [comments]


2024.05.19 07:51 EchoJobs Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS]

Hiring Don't see what you're looking for among our Engineering opportunities? Singapore [Go Python React TypeScript Angular JavaScript HTML CSS Docker Android Ruby AWS] submitted by EchoJobs to JavaScriptJob [link] [comments]


2024.05.19 07:28 OkSugar121 Games on master tx 16s

I've got a radiomaster tx 16 s 4 in 1 with edge tx is there any way I can play games on it by loading lua scripts if yes then can u share me the download link for lua scripts
submitted by OkSugar121 to fpv [link] [comments]


2024.05.19 07:23 EchoJobs Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Bucharest, Romania Remote Berlin, Germany [Git HTML CSS JavaScript API React Vue.js GraphQL]

Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Bucharest, Romania Remote Berlin, Germany [Git HTML CSS JavaScript API React Vue.js GraphQL] submitted by EchoJobs to VueJSJobs [link] [comments]


2024.05.19 07:22 EchoJobs Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Remote Berlin, Germany Bucharest, Romania [HTML CSS JavaScript API React Vue.js GraphQL Git]

Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Remote Berlin, Germany Bucharest, Romania [HTML CSS JavaScript API React Vue.js GraphQL Git] submitted by EchoJobs to VueJSJobs [link] [comments]


2024.05.19 07:16 smellytrashyy My code works properly in Codepen, but not in a website host. Help.

I made this code with the help of AI, I read rule 10 but trust me this kept me up at night (bad at coding). Can somebody please explain why it only works properly in Codepen, but not when I place it in a website host? I saved it as styles.css, index.html, script.js., then to a folder, then zipped it.
When I put it in Codepen, the questions drop down when I choose the gender, this doesn't work in the website host. Any help/tip is appreciated. Thanks!
CSS: body { font-family: Arial, sans-serif; background-color: #7074A0; margin: 0; padding: 0; } .container { max-width: 800px; margin: 2rem auto; background: #D5D5D5; padding: 2rem; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 10px; } h1 { text-align: center; color: #333; } .form-group { margin-bottom: 1.5rem; } label { font-weight: bold; } select, input[type="checkbox"], button { width: 100%; padding: 0.5rem; margin-top: 0.5rem; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; } button { background-color: #2C3055; color: white; font-weight: bold; cursor: pointer; transition: background-color 0.3s; } button:hover { background-color: #008080; } #recommendationResult { margin-top: 1.5rem; font-weight: bold; } HTML:      Style Recommendations    

The Fashion Anatomist

JS: const bodyTypes = { male: ["Rectangle", "Triangle", "Upside Down Triangle", "Trapezoid", "Oval"], female: ["Rectangle", "Apple", "Pear", "Hourglass", "Upside Down Triangle"] }; const questions = { male: [ { question: "What is your go-to outfit for a casual day out?", options: ["Jeans and a T-shirt", "Casual shirt and pants", "Athleisure wear", "Vintage finds", "Tailored clothes", "Simple and clean", "Bohemian styles", "Chic and trendy", "Unique and artsy"] }, { question: "Which colors do you prefer to wear?", options: ["Bright and bold", "Neutral tones", "Pastels", "Earthy colors", "Classic black and white", "Monochrome", "Mixed prints", "Sleek and modern", "Vibrant and contrasting"] }, { question: "What kind of shoes do you usually wear?", options: ["Sneakers", "Casual shoes", "Formal shoes", "Boots", "Loafers", "Minimalist shoes", "Ethnic sandals", "Designer shoes", "Artsy shoes"] }, { question: "Which accessory do you never leave the house without?", options: ["Cap", "Scarf", "Statement watch", "Tie", "Belt", "Simple necklace", "Layered bracelets", "Stylish bag", "Artsy accessory"] } ], female: [ { question: "What is your go-to outfit for a casual day out?", options: ["Jeans and a T-shirt", "A dress", "Athleisure wear", "Vintage finds", "Tailored clothes", "Simple and clean", "Bohemian styles", "Chic and trendy", "Unique and artsy"] }, { question: "Which colors do you prefer to wear?", options: ["Bright and bold", "Neutral tones", "Pastels", "Earthy colors", "Classic black and white", "Monochrome", "Mixed prints", "Sleek and modern", "Vibrant and contrasting"] }, { question: "What kind of shoes do you usually wear?", options: ["Sneakers", "Flats", "Heels", "Boots", "Loafers", "Minimalist sandals", "Ethnic sandals", "Designer shoes", "Artsy shoes"] }, { question: "Which accessory do you never leave the house without?", options: ["Cap", "Scarf", "Statement jewelry", "Watch", "Belt", "Simple necklace", "Layered necklaces", "Stylish handbag", "Artsy bag"] } ] }; const styleMap = { "Jeans and a T-shirt": "casual", "Casual shirt and pants": "casual", "A dress": "chic", "Athleisure wear": "casual", "Vintage finds": "vintage", "Tailored clothes": "formal", "Simple and clean": "minimalist", "Bohemian styles": "bohemian", "Chic and trendy": "chic", "Unique and artsy": "artsy", "Bright and bold": "streetwear", "Neutral tones": "casual", "Pastels": "preppy", "Earthy colors": "bohemian", "Classic black and white": "formal", "Monochrome": "minimalist", "Mixed prints": "vintage", "Sleek and modern": "chic", "Vibrant and contrasting": "artsy", "Sneakers": "streetwear", "Casual shoes": "casual", "Formal shoes": "formal", "Boots": "bohemian", "Loafers": "formal", "Minimalist shoes": "minimalist", "Ethnic sandals": "bohemian", "Designer shoes": "chic", "Artsy shoes": "artsy", "Cap": "streetwear", "Scarf": "vintage", "Statement watch": "formal", "Tie": "formal", "Belt": "preppy", "Simple necklace": "minimalist", "Layered bracelets": "bohemian", "Stylish bag": "chic", "Artsy accessory": "artsy", "Statement jewelry": "chic", "Watch": "formal", "Layered necklaces": "bohemian", "Stylish handbag": "chic", "Artsy bag": "artsy" }; const recommendations = { male: { Rectangle: { casual: "Opt for well-fitted t-shirts and straight-cut jeans.", chic: "Tailored pieces with sharp lines and neutral colors.", minimalist: "Stick to monochromatic outfits with clean lines.", vintage: "Go for retro patterns and fitted blazers.", formal: "Choose structured suits with shoulder padding.", bohemian: "Flowy shirts with earthy tones and relaxed pants.", artsy: "Abstract prints and asymmetrical designs." }, Triangle: { casual: "Wear darker colors on top and lighter on the bottom.", chic: "Structured blazers and vertical stripes to elongate the torso.", minimalist: "Neutral tones with minimal layering.", vintage: "High-waisted pants and vintage tees.", formal: "Suits with padded shoulders and tapered pants.", bohemian: "Loose tops with fitted bottoms.", artsy: "Bold, artistic prints and unique cuts." }, "Upside Down Triangle": { casual: "Fitted shirts and loose trousers for balance.", chic: "Tailored jackets and darker colors on top.", minimalist: "Simple and clean lines with solid colors.", vintage: "Classic patterns like houndstooth or plaid.", formal: "Structured suits with well-defined shoulders.", bohemian: "Loose tops with wide-leg pants.", artsy: "Geometric patterns and unconventional designs." }, Trapezoid: { casual: "Fitted tops and straight-leg jeans.", chic: "Structured blazers and well-fitted trousers.", minimalist: "Clean lines and tailored silhouettes.", vintage: "Retro-inspired pieces with a modern twist.", formal: "Tailored suits with balanced proportions.", bohemian: "Relaxed fits with layered textures.", artsy: "Experimental designs and unique accessories." }, Oval: { casual: "Opt for fitted tops and straight-cut bottoms.", chic: "Structured blazers and tailored trousers.", minimalist: "Simple, streamlined outfits with solid colors.", vintage: "Classic pieces with flattering silhouettes.", formal: "Well-tailored suits with structured jackets.", bohemian: "Flowy tops with relaxed bottoms for balance.", artsy: "Statement pieces and bold accessories." } }, female: { Rectangle: { casual: "Tuck in your shirts and pair with skinny jeans.", chic: "Structured blazers and high-waisted pants.", minimalist: "Simple, straight-cut dresses and tops.", vintage: "High-waisted skirts and fitted blouses.", formal: "Peplum tops and pencil skirts.", bohemian: "Flowy dresses with cinched waists.", artsy: "Bold patterns and unique textures." }, Apple: { casual: "V-neck tops and A-line skirts.", chic: "Structured blouses with wide-leg trousers.", minimalist: "Monochrome outfits with clean lines.", vintage: "Empire-waist dresses and skirts.", formal: "Wrap dresses and tailored blazers.", bohemian: "Loose tops with flared pants.", artsy: "Unique cuts and statement accessories." }, Pear: { casual: "Fitted tops and wide-leg pants.", chic: "Blazers with shoulder pads and A-line skirts.", minimalist: "Simple tops with straight-leg pants.", vintage: "High-waisted pants and tucked-in blouses.", formal: "Structured dresses with defined waists.", bohemian: "Flowy tops with fitted bottoms.", artsy: "Layered textures and asymmetrical designs." }, Hourglass: { casual: "Wrap tops and high-waisted jeans.", chic: "Tailored dresses with cinched waists.", minimalist: "Fitted tops with straight-leg trousers.", vintage: "Retro-inspired dresses with belts.", formal: "Bodycon dresses and pencil skirts.", bohemian: "Cinched waists with flowy skirts.", artsy: "Form-fitting pieces with artistic prints." }, "Upside Down Triangle": { casual: "Fitted shirts and loose skirts.", chic: "Structured jackets with flared pants.", minimalist: "Simple tops with wide-leg trousers.", vintage: "A-line dresses with vintage patterns.", formal: "Blazers with shoulder pads and pencil skirts.", bohemian: "Loose tops with flowy bottoms.", artsy: "Bold prints and unique cuts." } } }; document.getElementById('bodyTypeForm').addEventListener('submit', function (e) { e.preventDefault(); const gender = document.getElementById('gender').value; const bodyType = document.getElementById('bodyType').value; const hideRecommendations = document.getElementById('hideRecommendations').checked; if (!gender) { alert("Please select gender."); return; } if (!hideRecommendations && !bodyType) { alert("Please select body type or choose to hide recommendations."); return; } const questionElements = document.querySelectorAll('.questionContainer'); const answers = []; questionElements.forEach(questionElement => { const answer = questionElement.querySelector('select').value; if (!answer) { alert("Please answer all questions."); return; } answers.push(answer); }); const styleCount = {}; answers.forEach(answer => { const style = styleMap[answer]; if (style) { if (!styleCount[style]) { styleCount[style] = 0; } styleCount[style]++; } }); const preferredStyle = Object.keys(styleCount).reduce((a, b) => styleCount[a] > styleCount[b] ? a : b, null); let recommendation = `Your preferred style is ${preferredStyle}.`; if (!hideRecommendations && bodyType) { const bodyTypeRecommendation = recommendations[gender]?.[bodyType]?.[preferredStyle]; if (bodyTypeRecommendation) { recommendation += ` For your ${bodyType} body type, we recommend: ${bodyTypeRecommendation}.`; } else { recommendation += " Please consult a stylist for personalized recommendations."; } } document.getElementById('recommendationResult').innerText = recommendation; }); document.getElementById('gender').addEventListener('change', function (e) { const gender = e.target.value; const bodyTypeSelect = document.getElementById('bodyType'); const hideRecommendationsCheckbox = document.getElementById('hideRecommendations'); if (gender) { bodyTypeSelect.removeAttribute('disabled'); hideRecommendationsCheckbox.removeAttribute('disabled'); } else { bodyTypeSelect.setAttribute('disabled', true); hideRecommendationsCheckbox.setAttribute('disabled', true); } bodyTypeSelect.innerHTML = ''; bodyTypes[gender].forEach(bodyType => { const option = document.createElement('option'); option.value = bodyType; option.innerText = bodyType; bodyTypeSelect.appendChild(option); }); const questionContainer = document.getElementById('questionContainer'); questionContainer.innerHTML = ''; questions[gender].forEach((question, index) => { const questionDiv = document.createElement('div'); questionDiv.className = 'questionContainer'; const questionLabel = document.createElement('label'); questionLabel.innerText = question.question; const questionSelect = document.createElement('select'); questionSelect.innerHTML = ''; question.options.forEach(option => { const optionElement = document.createElement('option'); optionElement.value = option; optionElement.innerText = option; questionSelect.appendChild(optionElement); }); questionDiv.appendChild(questionLabel); questionDiv.appendChild(questionSelect); questionContainer.appendChild(questionDiv); }); }); document.getElementById('hideRecommendations').addEventListener('change', function (e) { const bodyTypeSelect = document.getElementById('bodyType'); if (e.target.checked) { bodyTypeSelect.setAttribute('disabled', true); } else { bodyTypeSelect.removeAttribute('disabled'); } });
submitted by smellytrashyy to CodingHelp [link] [comments]


2024.05.19 07:03 EchoJobs Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Berlin, Germany Bucharest, Romania Remote [GraphQL Git HTML CSS JavaScript API React Vue.js]

Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Berlin, Germany Bucharest, Romania Remote [GraphQL Git HTML CSS JavaScript API React Vue.js] submitted by EchoJobs to VueJSJobs [link] [comments]


2024.05.19 07:02 EchoJobs Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Bucharest, Romania Berlin, Germany Remote [GraphQL Git HTML CSS JavaScript API React Vue.js]

Hiring Senior Frontend Software Engineer for sophisticated e commerce solutions (m/f/d) Remote Bucharest, Romania Berlin, Germany Remote [GraphQL Git HTML CSS JavaScript API React Vue.js] submitted by EchoJobs to VueJSJobs [link] [comments]


2024.05.19 06:58 tfosnip CS50W - Proj4 Network - Django doesnt recognize my JS code at all

I've double checked the following:
I've put down several triggers inside this JavaScript code yet none of them run.
Newlikes.js:
console.log("newlikes.js is loaded"); document.addEventListener('DOMContentLoaded', function() { console.log("DOM fully loaded and parsed"); document.querySelectorAll('button[id^="like_button_"]').forEach(button => { button.addEventListener('click', function() { console.log("clicked!") let postId = this.id.split('_')[2]; let userId = this.dataset.userId; let likeCountElement = document.querySelector("#like_count_" + postId); let likeButton = this; fetch('/like/' + postId + '/', { method: 'POST', body: JSON.stringify({ 'user_id': userId }), headers: { 'Content-Type': 'application/json', 'X-CSRFToken': document.querySelector('input[name=csrfmiddlewaretoken]').value } }) .then(response => response.json()) .then(data => { if (data.like_status) { likeButton.style.backgroundColor = 'grey'; likeCountElement.textContent = parseInt(likeCountElement.textContent) + 1; } else { likeButton.style.backgroundColor = 'red'; likeCountElement.textContent = parseInt(likeCountElement.textContent) - 1; } }); }); }); }); 
my index.html code:
{% extends "network/layout.html" %} {% load static %} {% block body %} 
{% if user.is_authenticated %}

Create New Post

{% csrf_token %}
Image Link Url:

{% endif %}
{% comment %} list of posts for people that users follow {% endcomment %}
{% if user.is_authenticated %} {% for post in page_obj %}
    {{post.user}}

    {{post.new_post_content}}
    Posted on: {{post.created_time}}
    {% csrf_token %} {{post.liked_by.count}}

{% endfor %} {% endif %}
{% endblock %} {% block script %} {% endblock %}
and my settings.py:
""" Django settings for project4 project. Generated by 'django-admin startproject' using Django 3.0.2. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '13kl@xtukpwe&xj2xoysxe9_6=tf@f8ewxer5n&ifnd46+6$%8' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'network', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'project4.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'project4.wsgi.application' # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } AUTH_USER_MODEL = "network.User" # Password validation # https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_URL = '/static/' STATICFILES_DIRS = [ os.path.join(BASE_DIR, "static"), '/network/project4/network/static', ] 
my folder structure looks like this:
https://preview.redd.it/00fdiiqidb1d1.png?width=256&format=png&auto=webp&s=48028d2103a8f7d3ec2a181da3193518a45aabf4
I've been stuck on this project for half a week now because I thought my JS code was bugged, and only until today I added more triggers and realized it wasn't run at all...... (I have 2 more earlier versions of js code in the same folder but none of them are quoted anywhere so I assume this isn't a problem)
I truly really appreciate anyone's help to get out of this brain prison!! I used 120% of my brain and I am still 100% clueless rn :P
submitted by tfosnip to cs50 [link] [comments]


2024.05.19 06:08 muzso User manual as a PDF

This is my first shot at this. My original goal was to just create a local copy that can be used in a browser even if your offline, but u/olegccc's comment in https://www.reddit.com/ex30/comments/1cv3v2t/pdf_user_manual/ gave me the idea to generate a PDF from it.
It's already pretty usable, but still more like a proof-of-concept, than a polished end result.
The PDF was created with the following steps:
  1. Download a copy (local mirror) of the online manual. I used wget for now, but it's far from perfect (the mirroring process is quite error prone).
  2. Process/modify the downloaded copy so it doesn't reference www.volvocars.com. I.e. make the copy self-contained, so it works even if offline.
  3. Remove all JavaScript. This was easier than to solve the issues with burned-in hostnames and/or absolute URLs. For a PDF the JS code is not needed anyway.
  4. Test in browsers via a local HTTP server (actually I just used Python's built-in HTTP server).
  5. Generate a new "index-single-page.html" by using the start (mostly the ) from index.html, then adding the contents of the tags from all pages (index.html, software-release-notes, article/*).
  6. Add CSS page breaks between all pages, this makes the PDF more readable.
  7. Close the HTML (i.e. add a "").
  8. Open the new "index-single-page.html" page in a browser and save as PDF.
I've created two versions of the PDF from the same HTML source. One with Firefox and one with Chrome.
Both are based on a snapshot of the UK user manual, saved on 2024-04-29.
Known issues:
  1. I've inserted page breaks before every manual page, but Firefox doesn't honor the first one (i.e. the one between the ToC and the "Software updates" pages). Chrome has no such issue.
  2. There're a number of mp4 movie files in the manual, which the PDF rendering simply left empty (blank space). Later I'll take snapshots of these mp4 files and replace the video elements with them.
  3. A couple of images are missing. I used wget to create a local mirror of the manual and there were some issues, it's not very robust, especially when volvocars.com starts to throttle the download (i.e. starts to send HTTP 4xx responses after a couple of hundred requests). Wget is not great at continuing an aborted mirroring session either. I'll try to look for a better tool for mirroring/saving the online manual.
Let me know what you think, what other issues/bugs you find, etc.
submitted by muzso to ex30 [link] [comments]


2024.05.19 05:53 N00B5L4YER Just refreshed a page and wtf?

Just refreshed a page and wtf? submitted by N00B5L4YER to rateyourmusic [link] [comments]


2024.05.19 05:41 courzeorg 100+ Free Courses with Certificates on Udemy & Coursera

Python And Django Framework And HTML 5 Stack Complete Course
https://courze.org/python-and-django-framework-and-html-5-complete-course-2022/
JavaScript And PHP And Python Programming Complete Course
https://courze.org/javascript-and-php-and-python-programming-complete-course/
CSS Crash Course For Beginners
https://courze.org/css-crash-course-for-beginners/
LightBurn Software For Beginner Laser Engravers 2024
https://courze.org/lightburn-software-for-beginner-laser-engravers-2024/
Professional Diploma of Marketing Manager Business Partner
https://courze.org/professional-diploma-of-marketing-manager-business-partne
horse colic what can we do
https://courze.org/horse-colic-what-can-we-do/
Ultimate Guide to Interview Skills
https://courze.org/ultimate-guide-to-interview-skills/
Easy WPF in C# Windows Presentation Foundation for Beginners
https://courze.org/easy-wpf-in-c-windows-presentation-foundation-for-beginners/
Customer Experience Management – Foundation Course
https://courze.org/customer-experience-management-foundation-course/
How to Dominate Amazon Kindle and Become Bestselling Author
https://courze.org/how-to-dominate-amazon-kindle-and-become-bestselling-autho
Building an Effective Brand Identity for Schools
https://courze.org/building-an-effective-brand-identity-for-schools/
Using AI to build a Scientific Temper in children
https://courze.org/using-ai-to-build-a-scientific-temper-in-children/
ISO/IEC 27005 Information Security Risk Management 2024
https://courze.org/iso-iec-27005-information-security-risk-management-2024/
L’IA: une arme au service de la digitalisation des processus
https://courze.org/lia-une-arme-au-service-de-la-digitalisation-des-processus/
Diploma of Microsoft Dynamics 365 CRM Business Architect
https://courze.org/diploma-of-microsoft-dynamics-365-crm-business-architect/
C Programming – Basics to Advanced Level
https://courze.org/c-programming-basics-to-advanced-level/
Professional Diploma of Virtual Executive Assistant
https://courze.org/professional-diploma-of-virtual-executive-assistant/
Mastering PostgreSQL: The Ultimate SQL Guide for Beginners
https://courze.org/unleash-the-data-dragon-awaken-the-power-of-postgres-sql/
Coding Basics: Gentle Intro to Computer Programming
https://courze.org/coding-basics-2023-gentle-intro-to-computer-programming/
Git, GitHub & Markdown Crash Course: Learn Git, GitHub & MD
https://courze.org/git-github-markdown-crash-course-learn-git-github-md/
Object-Oriented Programming (OOP) – Learn to Code Faster
https://courze.org/object-oriented-programming-oop-how-to-code-faster-2023/
Learn Coding with Java from Scratch: Essential Training
https://courze.org/learn-coding-with-java-from-scratch-essential-training-2023/
Learn to Program with C# from Scratch C# Immersive
https://courze.org/learn-coding-with-c-from-scratch-c-comprehensive-course/
Professional Diploma in M&A Business Mergers & Acquisitions
https://courze.org/professional-diploma-in-ma-business-mergers-acquisitions/
Professional Diploma in Procurement, Sourcing, Supply Chains
https://courze.org/professional-diploma-in-procurement-sourcing-supply-chains/
C++ And Java Training Crash Course 2022
https://courze.org/c-and-java-training-crash-course-2022/
Professional Diploma of Real Estate Business Expert
https://courze.org/professional-diploma-of-real-estate-business-expert/
CSS And Javascript Crash Course
https://courze.org/css-and-javascript-crash-course/
Professional Diploma of Product & Service Business Analyst
https://courze.org/professional-diploma-of-product-service-business-analyst/
Wealth Management, Private Banking & Compliance Introduction
https://courze.org/wealth-management-private-banking-compliance-introduction/
Professional Diploma in Digital Business Development
https://courze.org/professional-diploma-in-digital-business-development/
Business Development, Sales & Marketing Professional Diploma
https://courze.org/business-development-sales-marketing-professional-diploma/
Currency Management for Small Businesses & Corporates
https://courze.org/currency-management-for-small-businesses-corporates/
Authentic Leadership
https://courze.org/authentic-leadership/
Intentional Leadership
https://courze.org/intentional-leadership/
Strategic Partnerships and Collaborations
https://courze.org/strategic-partnerships-and-collaborations/
Fundamentals of Successful Leadership – Leading with Impact
https://courze.org/fundamentals-of-successful-leadership-leading-with-impact/
Visualization techniques for Decision Makers and Leaders
https://courze.org/visualization-techniques-for-decision-makers-and-leaders/
Learn Salesforce (Admin + Developer) with LWC Live Project
https://courze.org/learn-salesforce-admin-developer-with-lwc-live-project/
Setup Ubuntu Server
https://courze.org/setup-ubuntu-serve
submitted by courzeorg to Udemy [link] [comments]


2024.05.19 04:51 Cogoth Enchant "Create"/"Buy" button does not work

Whenever I try to enchant an item ( yes I have the correct soul gem with a filled soul and I'm not going over the enchant item limit) the create button doesn't work. I have tested with 100 enchant & self enchanting items. Then with using a merchant to enchant items and the "buy" button doesn't work. I disabled all my mods and I'm just running the Morrowind code patch along with the MWSE (Morrowind script extender) scripts: Crafting Framework, Skills Module, Perfect Placement & UI expansion
Has anyone else run into this problem? how do you fix it?
see video link for more details https://youtu.be/dPQamgAzngQ
EDIT: I found out it was Seph's npc soul trapping mod. It was a MWSE mod. Don't download that if you plan on enchanting
submitted by Cogoth to Morrowind [link] [comments]


2024.05.19 04:47 Pro-editor-1105 Excel VBA "response.txt not opening"

I am fairly new btw. Using chatgpt to help me out with my code. So basically I have this code which would bascially find a certain column in an excel file, and then take the company name, give that to a chatgpt api, and then that will give the name of the CEO of the company. I have bascially solved everything, but am getting stuck on one final error. I am on mac and basiclally using some VBA code, and also using some appletext. So basically VBA will talk to appletext, who will talk to the openai api, who will then give back an answer in another column. for the original answer made by the openai API before just the CEO's name is taken out of it using a VBA to JSON thing, goes into a file called response.txt. Issue is that it keeps on giving an error that it cannot acsess this file. I have tried a few things. I have verfied that the actual appletext to openai interation works with a bit of code that I put in the terminal. How can I solve it, here is my code
VBA code
Sub GetCEONames() Dim scriptPath As String Dim apiKey As String Dim prompt As String Dim company As String Dim ceoName As String Dim i As Integer Dim lastRow As Long Dim responseFile As String Dim fileNum As Integer Dim responseText As String Dim json As Object Dim choices As Object Dim message As Object ' Set your OpenAI API key here apiKey = "my_api_key" ' Path to the AppleScript file scriptPath = "/Users/rajshah/Downloads/GetCEONames.scpt" ' Determine the last row with data in column B (assuming company names are in column B) lastRow = Cells(Rows.Count, 2).End(xlUp).Row ' Loop through each company name in column B For i = 2 To lastRow company = Cells(i, 2).Value ' Adjust the column number if necessary ' Create the prompt for GPT-4o prompt = "Who is the current CEO of " & company & "?" ' Construct the AppleScript command to save the response in a temporary file responseFile = "/Users/rajshah/Downloads/response.txt" Dim appleScriptCommand As String appleScriptCommand = "osascript " & Chr(34) & scriptPath & Chr(34) & " " & Chr(34) & apiKey & Chr(34) & " " & Chr(34) & company & Chr(34) ' Debug message to check the AppleScript command Debug.Print appleScriptCommand ' Run the AppleScript command using the Shell function On Error Resume Next Shell "sh -c " & Chr(34) & appleScriptCommand & Chr(34), vbWait If Err.Number <> 0 Then MsgBox "Shell command execution failed: " & Err.Description, vbCritical Exit Sub End If On Error GoTo 0 ' Debug message to check if the response file exists If Dir(responseFile) = "" Then MsgBox "Response file was not created: " & responseFile, vbCritical Exit Sub End If Debug.Print "Response file path: " & responseFile ' Read the response from the temporary file fileNum = FreeFile On Error GoTo FileError Open responseFile For Input As fileNum responseText = Input$(LOF(fileNum), fileNum) Close fileNum ' Debug message to check the response Debug.Print responseText ' Parse the JSON response Set json = JsonConverter.ParseJson(responseText) Set choices = json("choices") Set message = choices(1)("message") ceoName = message("content") ' Update the Excel sheet with the CEO name in column C Cells(i, 3).Value = ceoName ' Adjust the column number if necessary Next i MsgBox "CEO names updated successfully!" Exit Sub 
FileError: MsgBox "Error accessing file: " & responseFile, vbCritical End Sub
sorry the VBA code formats terribly.

Appletext code
on run {apiKey, company} -- Prepare the API request set openaiURL to "https://api.openai.com/v1/chat/completions" set model to "gpt-4o" set prompt to "Who is the current CEO of " & company & "?" set messages to "[{\"role\": \"system\", \"content\": \"You are a helpful assistant.\"}, {\"role\": \"user\", \"content\": \"" & prompt & "\"}]" set requestData to "{\"model\": \"" & model & "\", \"messages\": " & messages & "}" -- Perform the API request set curlCommand to "curl -X POST " & openaiURL & " -H \"Authorization: Bearer " & apiKey & "\" -H \"Content-Type: application/json\" -d '" & requestData & "'" try set response to do shell script curlCommand on error errMsg number errNum display dialog "Error: " & errMsg return end try -- Write response to file set responseFile to POSIX file "/Users/rajshah/Downloads/response.txt" try open for access responseFile with write permission set eof of responseFile to 0 write response to responseFile starting at eof close access responseFile on error errMsg number errNum close access responseFile error "Error writing to file: " & errMsg number errNum end try 
end run
again nothing formats properly.
nvm lol it was not formatting properly in the text box but was fine when I posted it
submitted by Pro-editor-1105 to learnprogramming [link] [comments]


http://activeproperty.pl/