• Breaking News

    Friday, June 11, 2021

    When was the first time you learnt about git? How did it change your work and what were your first impressions? What's your story of Git (& GitHub) ? :) Ask Programming

    When was the first time you learnt about git? How did it change your work and what were your first impressions? What's your story of Git (& GitHub) ? :) Ask Programming


    When was the first time you learnt about git? How did it change your work and what were your first impressions? What's your story of Git (& GitHub) ? :)

    Posted: 10 Jun 2021 11:59 PM PDT

    I'm im a really tough spot right now.

    Posted: 10 Jun 2021 11:46 AM PDT

    I just finished my freshmen year at university. I love programming and know some of the basics. I know its what I want to do in the future.

    However, I really dispise university. I feel like I'm just wasting time and money. Its pretty well known now-a-days that college is a scam, but im getting really sick of it; Paying thousands of dollars for 'required' classes for a professor to sloppily explain a topic I will never use again and can find explained much simpler and easier online or in a textbook. School has never really been for me. I want to learn what is needed for life/my career and what im interested in without having to drive myself into debt to get stressed out to hell and back being force fed information im completely disinterest in and examined on.

    I dont think I can do this for another 3 years.

    Are there alternatives to becoming a certified programmer that doesn't require (normal) university that can still end up in a decent job?

    Or online programs that help you get your degree much more straightforward?

    Edit:

    I'm choosing to stick through it for now. Might transfer to local community College and start with a 2 year degree since it will be extremely affordable and go from there. Gonna look more into it over summer and see what my options are

    submitted by /u/RF1901
    [link] [comments]

    Is there anything that can add all Spotify URLs on a site into one playlist?

    Posted: 11 Jun 2021 03:36 AM PDT

    addons or websites…

    submitted by /u/hwpcspr112
    [link] [comments]

    Need resources for a competitive programming competition

    Posted: 10 Jun 2021 11:08 PM PDT

    I'm participating in a competitive programming competition and I have only a month to prepare, can someone send resources from where I can prepare for it? It's in Python.

    submitted by /u/TheAsexualPup
    [link] [comments]

    Spotify web player can't detect scroll events? [javascript]

    Posted: 10 Jun 2021 09:40 PM PDT

    https://imgur.com/a/bpH701P

    also met this weird error

    already make sure all other chrome extensions are disabled

    this is the code inserted on the page

    https://open.spotify.com/playlist/3AjdxFhKpClajQFMRIqOB6

    function escapeForRegExp(str) { return str.replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'); // (A) } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } let elements; let element_text; function copyToClipboard(text) { var dummy = document.createElement("textarea"); // to avoid breaking orgain page when copying more words // cant copy when adding below this code // dummy.style.display = 'none' document.body.appendChild(dummy); //Be careful if you use texarea. setAttribute('value', value), which works with "input" does not work with "textarea". – Eduard dummy.value = text; dummy.select(); document.execCommand("copy"); document.body.removeChild(dummy); } //testing //let text = "rtr"; //copyToClipboard(text); let raf = null; function execute_init() { if (raf) window.cancelAnimationFrame(raf); raf = window.requestAnimationFrame(() => { init(); raf = null; }); } //That radlf code will only execute the init function when the browser renders the page. When you are scrolling you will get tens or even hundreds of scroll events, but browser will not rerender for every scroll event. document.addEventListener('scroll', throttle(execute_init, 2000), false); function init() { elements = document.querySelectorAll('.e8ea6a219247d88aa936a012f6227b0d-scss.bddcb131e9b40fa874148a30368d83f8-scss:not(.good-one)'); alert("scroll"); } //500ms is actually ok function throttle(fn, wait) { var time = Date.now(); return function () { if ((time + wait - Date.now()) < 0) { fn(); time = Date.now(); } } } 
    submitted by /u/hwpcspr112
    [link] [comments]

    Some advice on building school bell app

    Posted: 11 Jun 2021 12:46 AM PDT

    Hi, maybe someone can guide to suitable track here. I'm seasoned programmer, but maybe there are frameworks that can do most the job to begin with. I need to build a school bell app for a local small community primary school. It should run on a sepparate laptop and be connected to building's sound system. Need to build scheduler, probably would need to have monthly and daily view, and small script that runs the selected mp3.

    Was thinking to build scheduler on Vue and maybe "backend" on python or even javascript. Would not need DB probably, could gather data from CSV and that should do.

    What do you guys think?

    submitted by /u/kaja404
    [link] [comments]

    How to use libcurl on CLion on Windows?

    Posted: 10 Jun 2021 08:13 PM PDT

    On Mac, I'm able to use libcurl on CLion by adding these lines on my CMakeLists.txt:

    find_package(CURL REQUIRED) include_directories(${CURL_INCLUDE_DIR}) target_link_libraries(maptile ${CURL_LIBRARIES}) 

    The same lines don't produce the same effect on Windows, however, as I get this error:

    Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) 

    I already have curl installed that I can use it on the command line. I know there is something else I need to do but I'm not sure. I downloaded the source files from https://curl.se/download.html and compiled from the root directory as given in the documentation using

    mingw32-make mingw32 

    It seemed like it work, but I still get the same error on CLion that the CURL library isn't found.

    submitted by /u/NetFormer1697
    [link] [comments]

    Need help with deploying project with NPM, missing icons/functionality after building (HTML, CSS, Node, NPM)

    Posted: 10 Jun 2021 07:10 PM PDT

    Hi Guys,

    I have been learning programming on and off for a few years now and finally decided to take a bootcamp and have been loving it. However, one drawback is we haven't really gotten into the meat of NPM and building/deploying our project using NPM, they only skimmed the surface.

    I was able to easily build the project we worked on together, but after building my own site and using different packages/functionality, when I try to use my build script to send everything to my dist folder for deployment on my server I am missing some assets somewhere.

    I am missing the following assets after building: Font awesome icons Slick carousel buttons and functionality

    Here is a link to a codepen that has my HTML, CSS and JS:

    And here is my package.json code: { "name": "hamsite", "version": "1.0.0", "description": "This is a website for hair and makeup servies by Kaylee Derrick", "main": "index.html", "scripts": { "build": "npm run clean && npm run imagemin && npm run copyfiles && npm run usemin", "clean": "rimraf dist", "copyfiles": "copyfiles -f slick/fonts/* dist/fonts && copyfiles -f node_modules/@fortawesome/fontawesome-free/webfonts/* dist/fonts", "imagemin": "imagemin images/* -o dist/images && imagemin images/logos/* -o dist/images/logos && imagemin images/works/* -o dist/images/works && imagemin images/works/formals/* -o dist/images/works/formals && imagemin images/works/seniors/* -o dist/images/works/seniors && imagemin images/works/weddings/* -o dist/images/works/weddings && imagemin images/icons/* -o dist/images/icons", "lite": "lite-server", "scss": "node-sass -o css/ css/",

    "start": "npm run watch:all", "test": "echo \"Error: no test specified\" && exit 1", "usemin": "usemin index.html -d dist -o dist/index.html", "watch:scss": "onchange \"css/*.scss\" -- npm run scss", "watch:all": "parallelshell \"npm run watch:scss\" \"npm run lite\"" 

    }, "author": "Logan Derrick", "license": "ISC", "devDependencies": { "copyfiles": "2.2.0", "imagemin-cli": "6.0.0", "lite-server": "2.5.4", "node-sass": "4.14.1", "onchange": "7.0.0", "parallelshell": "3.0.1", "rimraf": "3.0.2", "usemin-cli": "0.6.0" }, "dependencies": { "@fortawesome/fontawesome-free": "5.15.3", "bootstrap": "4.5.2", "jquery": "3.6.0", "popper.js": "1.16.1" } }

    Could someone help me better understand what I need to add to my package file and/or edit in my code to make this work?

    submitted by /u/lifeisruf
    [link] [comments]

    Mail Merge from XML to Word doc

    Posted: 10 Jun 2021 02:44 PM PDT

    If I'm breaking rules posting this type of question here, my apologies -

    Hello,

    I'm trying to find a better solution for mail merging from an online student enrollment form.
    Currently, I input test data into all fields and then generate an XML from that to find all xpaths for fields.
    I view the XML in Notepad++ and use the XML Tools plugin to quickly find the xpath I hope is the correct field.
    Then I start building a word doc with a School Districts currently used registration form and use the mail merge wizard for an initial few fields and copy and paste paths as much as possible, changing the @ token.

    It's horrendously tedious and difficult, especially with custom User Defined fields that might be used for the specific student enrollment form.

    Is there anything available for drag and drop functionality of xpaths to a place holder in the word doc or something to along those lines?
    Or is there a better workflow process I might not be aware of?

    I'm still fresh to mail merging and Database management has been a new career path this last 18 months.

    Any help is oh so appreciated

    submitted by /u/AwayPlum455
    [link] [comments]

    Programmers who were weebs but aren't, what are your current hobbies?

    Posted: 10 Jun 2021 08:40 PM PDT

    Asking because we already have two things in common, except you are past one. Maybe there are some interesting things to do that I will like that you have already found out about?

    submitted by /u/notsuhan
    [link] [comments]

    What's your favorite programming keyboard?

    Posted: 10 Jun 2021 02:41 PM PDT

    After having to switch recently to a new keyboard, I realized how used I was to the previous one. It's bothering me so much and now I'm on a quest to find the best keyboard for programming.

    these keyboards I'm finding (even full size ones) seem just too small. the key switches not right. no place on the keyboard to rest your fingers without accidently pressing a key, etc...

    What's your favorite keyboard for coding? thank you

    submitted by /u/KingPic
    [link] [comments]

    How to complete the blank area with appropriate css so that the message "Hello everyone" is displayed in blue color?

    Posted: 10 Jun 2021 11:49 PM PDT

    <!DOCTYPE html> <html> <head> <style> 

    Blank

    </style> </head> <body> <h1 class="center">Hello everyone</h1> </body> </html> 
    submitted by /u/Ok_Economics_5839
    [link] [comments]

    Unit tests or integration tests first?

    Posted: 10 Jun 2021 04:05 PM PDT

    Hey everyone, I'm conflicted on which tests I should write first: unit or integration tests.

    I'm currently working on a new product, so the API is very unstable, and it's causing a lot of unit test rewrites since my interfaces are changing so often.

    So I was thinking: (since I'm using Node/Express) start with testing my routes to ensure that the client is at least getting back what it expects. Then from there, I will fill in the gaps with unit tests for important edge cases - and since I have good functional composition via clean code architecture - unit test the main base functions which extend all across the application.

    My only concern with this approach is I won't have good regression due to the lack of unit test coverage, which might come back and bite me in the ass down the road, when I make a breaking change that goes undetected and slips into production.

    Any advice on this dilemma?

    submitted by /u/rantow
    [link] [comments]

    What programming language is more suitable to make a fourier transform bass booster?

    Posted: 10 Jun 2021 06:30 PM PDT

    make bass boosted audio

    submitted by /u/hwpcspr112
    [link] [comments]

    Uncaught Exception: TypeError: 'type' object is not subscriptable

    Posted: 10 Jun 2021 06:19 PM PDT

    I'm attempting to use an indicator from a package that uses Pandas into a strategy which uses NumPy to get candle data and so I must convert from one to another however I recieve the above error. I believe the error comes from line 9 however the docs of the platform I am using state to use this function.

    import numpy as np import pandas as pd from stock_pandas import StockDataFrame import jesse.indicators as ta from jesse.strategies import Strategy from jesse import utils class KDJstrategy(Strategy): ############################################################################### @property def kdj_k_value(self): utils.numpy_candles_to_dataframe(candles= np.ndarray, name_date="date", name_open="open", name_high="high", name_low="low", name_close="close", name_volume="volume") stock = StockDataFrame(self.candles).dropna() np_k = stock['kdj.k'].to_numpy() return np_k 

    Any help greatly appreciated!

    submitted by /u/matty5690
    [link] [comments]

    How to learn UI/UX Design for free?

    Posted: 10 Jun 2021 05:48 PM PDT

    I'm a front end developer and want to learn UI and UX design to work better in my applications. I searched about get start on it but I only see books and courses indications, and I don't have money to spend right now, so how can I learn design without courses and books?

    submitted by /u/Devinicius
    [link] [comments]

    Can I get what will be displayed as a result of running the following program and what the output of this program??

    Posted: 10 Jun 2021 11:32 PM PDT

    <?php $mystr = "John"; $mystr .=" "; $mystr .= "is"; $mystr .=" "; $mystr .= "an"; $education = "MBA"; $profession = "business man"; echo $mystr, " ", $education . "<br/>"; echo "He is a " . $profession; ?> 
    submitted by /u/Ok_Economics_5839
    [link] [comments]

    Need help creating these two forms in HTML+CSS

    Posted: 10 Jun 2021 04:51 PM PDT

    Hello guys,

    I've recently started learning HTML and CSS.
    I need to write two forms in HTML+CSS for my ASP .NET web application.
    They need to look something like this: Form 1 and Form 2.

    As I've never worked with HTML and CSS before, are there any templates similar to this that I can reuse, or some useful links that could help me?

    Any help is appreciated.
    Thank you in advance.

    submitted by /u/temp000321
    [link] [comments]

    Can i know the PHP program named welcom.php which displays a welcome message based on the user's name in bold blue color in the blank??

    Posted: 10 Jun 2021 11:41 PM PDT

    ---------------- p1.html -------------------- <!DOCTYPE html> <html> <body> <form action="convert.php" method="post"> What is your name?:<br> <input type='text' name='name'> <input type="submit" value="Submit"> </form> </body> </html> ----------------- welcome.php ------------------- <?php 

    Blank space

    ?> 

    Example Output for p1.html

    What is your name?

    John

    Example Output for welcome.php

    Welcome John <-- Assuming "John" was entered for the name, John will be displayed in bold blue color.

    submitted by /u/Ok_Economics_5839
    [link] [comments]

    Easiest way to get values and run C++ code through a webpage

    Posted: 10 Jun 2021 03:58 PM PDT

    Let's say I have a program, written in C++, that needs some inputs and gives out some outputs, and I wanted to have a webpage that asks the user for these inputs and simply shows the output. Do I really need to create and host a website from scratch or is there any website where I can host the script and create a simple interface for it?

    submitted by /u/KleberPF
    [link] [comments]

    Django/Docker: Docker-Compose Fails with unexplainable Permission Error.

    Posted: 10 Jun 2021 12:08 PM PDT

    I am new to deployment using docker so I believe that I am missing something vital here. I am trying to launch my app using docker/nginx and I have gotten to a stage where I am able to run the dev-environment as a container, but when I go to run the yml that I would use for deployment I get a

    PermissionError: [Errno 13] Permission denied: 'app/vol' 

    Error. That is to say I can run

    docker-compose -f docker-compose.yml up --build 

    and that provides me access to my app in the dev environment, but running

    docker-compose -f docker-compose-deploy.yml up --build 

    causes the shown error message.

    This is from following along a tutorial online but adding extra dependencies and content to the Django project. I have made a version identical to the tutorial and that works, and when I check what I have against that version, nothing seems to differ.

    Any help would be massively appreciated.

    File-Structure:

    app ├───proxy | ├───default.conf | ├───Dockerfile | └───uwsgi_params ├───scripts | └───entrypoint.sh └───app | └───docker-compose-deploy.yml | └───docker-compose.yml | └───Dockerfile | └───requirements.txt 

    proxy/default.conf:

    server { listen 8080; location /static { alias /vol/static; } location / { uwsgi_pass app:8000/; include /etc/nginx/uwsgi_params; } } 

    proxy/Dockerfile:

    FROM nginxinc/nginx-unprivileged:1-alpine COPY ./default.conf /etc/nginx/conf.d/default.conf COPY ./uwsgi_params /etc/nginx/uwsgi_params USER root RUN mkdir -p /vol/static RUN chmod 755 /vol/static USER nginx 

    docker-compose-deploy.yml:

    version: '3.7' services: app: build: context: . volumes: - /static_data:/vol/web environment: - SECRET_KEY=samplesecret123 - ALLOWED_HOSTS=127.0.0.1,localhost proxy: build: context: ./proxy volumes: - /static_data:/vol/static ports: - "8080:8080" depends_on: - app volumes: static_data: 

    docker-compose.yml:

    version: '3.7' services: app: build: context: . ports: - "8000:8000" volumes: - ./app:/app command: sh -c "python manage.py runserver 0.0.0.0:8000" environment: - DEBUG=1 

    Dockerfile (in root):

    FROM python:3.8-alpine ENV PATH="/scripts:${PATH}" COPY ./requierments.txt /requierments.txt RUN apk add --update --no-cache --virtual .tmp libc-dev jpeg-dev zlib-dev gcc linux-headers RUN pip install -r /requierments.txt RUN apk del .tmp RUN mkdir /syntiant_filesystem_companion COPY ./syntiant_filesystem_companion /syntiant_filesystem_companion WORKDIR /syntiant_filesystem_companion COPY ./scripts /scripts RUN chmod +x /scripts/* RUN mkdir -p /vol/web/media RUN mkdir -p /vol/web/static RUN adduser -D user RUN chown -R user:user /vol RUN chmod -R 755 /vol/web USER user CMD ["entrypoint.sh"] 

    Django settings.py:

    from pathlib import Path import os, sys # Build paths inside the project like this: BASE_DIR / 'subdir'. #BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) #STATICFILES_DIRS = ( # os.path.join(BASE_DIR, 'static/'), #) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ.get('SECRET_KEY', 'changeme') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = bool(int(os.environ.get('DEBUG',0))) ALLOWED_HOSTS = [] ALLOWED_HOSTS_ENV = os.environ.get('ALLOWED_HOSTS') if ALLOWED_HOSTS_ENV: ALLOWED_HOSTS.extend(ALLOWED_HOSTS_ENV.split(',')) AUTH_USER_MODEL = "register.Account" # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'crispy_forms', 'main.apps.MainConfig', 'register.apps.RegisterConfig', ] 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 = 'app.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 = 'app.wsgi.application' # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Password validation # https://docs.djangoproject.com/en/3.2/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.2/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.2/howto/static-files/ STATIC_URL = '/static/static/' MEDIA_URL='/static/media/' STATIC_ROOT='vol/web/static' MEDIA_ROOT='vol/web/media' # Default primary key field type # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' CRISPY_TEMPLATE_PACK="bootstrap4" LOGIN_REDIRECT_URL='/' PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(PROJECT_ROOT, 'django_project_name')) 

    I know that this is a lot to read through and I don't expect anyone to read all of it, but I am really hurting right now and I need to know how to continue for a project.

    To whomever points out the glaring flaw in my code, I really appreciate the help.

    submitted by /u/mrg327
    [link] [comments]

    Detailed weather API service ?

    Posted: 10 Jun 2021 12:56 PM PDT

    Hello,

    I was planning on using DarkSky for my weather app (will be coded in Swift), but it seems like Apple is going to shutdown this API.

    Any other recommendations for detailed weather API ?

    Thanks in advance!

    submitted by /u/DeepSpaceHunter
    [link] [comments]

    No comments:

    Post a Comment