• Breaking News

    Tuesday, February 9, 2021

    Why does html support color but not colour ? Do other languages have provisions for different spellings? Ask Programming

    Why does html support color but not colour ? Do other languages have provisions for different spellings? Ask Programming


    Why does html support color but not colour ? Do other languages have provisions for different spellings?

    Posted: 09 Feb 2021 02:20 PM PST

    I'm trying to create a tool that creates a searchable database using PDFs I receive Daily

    Posted: 09 Feb 2021 06:15 AM PST

    All,

    What I'm Using: Outlook 2016, Microsoft Access 2016, Excel 2016, ADOBE Acrobat.

    I'm going to do my best to formulate this question into something that makes sense. My sole programming experience was taking a Matlab class in college about 8 years ago.

    Background: I work in PR / communications, and routinely have to write speeches, briefs, presentations, and press releases. The individual I write for is one of many senior officials in our organization, and an important aspect is ensuring everyone's messaging priorities are in-line with each other, and we aren't contradicting someone else in the organization.

    The way we do things now, my boss says 'Hey we need to talk about X, can you pull some quotes from other people in our organization so we can align our messaging.' This inevitably leads to me manually searching multiple different trade news websites for some keyword to find an article that quotes someone else in our organization. You've no-doubt noticed I have absolutely zero experience in this field, and the workflow is basically archaic.

    Every morning I get a PDF in my email that covers every article published about my organization the previous day in a PDF with embedded hyperlinks to take you to specific text stories further down in the PDF.

    Programming Problem: I feel like there has to be a way that I can set up some sort of database using Access or Excel that will 1) Automatically pull the daily news PDF into said database and 2) create a search form that will allow me to type in a keyword or topic, and the search function lists every article in the database that either has the keyword in the title or body of the article.

    The email client we use is Microsoft Outlook 2016 if that matters.

    Is there a way to do what I'm looking for here? If so, can anyone translate this problem into something that I can google a tutorial for? This seems so basic that there HAS to be an easy way to set this up. I just have zero experience with Microsoft Access or really any other database tool so I'm not sure where to start.

    Thank you in advance! Feel free to shame me if this is a stupid question.

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

    can I draw over other apps in windows?

    Posted: 09 Feb 2021 10:14 PM PST

    draw over other apps is a permission on android, with it, we can draw on over apps and show something like remainders, that appears on some part of the screen - not overlay on all screen - means we can interact with the app we draw on it, can I achieve this in Windows 10?

    submitted by /u/00x13a
    [link] [comments]

    Bubble sort

    Posted: 09 Feb 2021 09:33 PM PST

    I need help, sorry

    Posted: 09 Feb 2021 09:25 PM PST

    I'm a tutorial monkey. I've hit a wall and don't know how to find the solutions I need. I hope maybe reddit can help me.

    I coded my own static site generator in python. I know how to use Github pages to host static content. My hope is to use webhooks to know when a Youtube video is uploaded so my script can scrape the video, and then publish the newly generated .html file to Github pages. I think Github actions can help me but because I've relied so heavily on video tutorials, I feel like an idiot because I can't understand the documentation.

    Is there a way for me to:

    2) Use Github webhooks to recieve data from a service like Zapier of IFTT.

    3) Make that webhook trigger a Github action that runs the python script.

    4) Update and commit the files with the newly scraped content to a Github repository.

    5) And then finally build/deploy/publish those newly generated .html files to Github pages.

    I know my problem overall is very specific but I just want to know if there are good tutorials or any resources that can explain each step individually. Sorry for the noobness, I'm not a comp sci student, just really passionate about coding.

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

    Help with a question

    Posted: 09 Feb 2021 09:14 PM PST

    How would I find the multiples of 2 numbers in between a range of x to y?

    Say x is 3 and y is 12, and the integers given must be multiples of 4 and 6.

    Using matlab or c++

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

    What should someone aspiring to create a game learn to do?

    Posted: 09 Feb 2021 08:32 PM PST

    Any help is welcome thank you all , I dont want to reveal much about my game but it will be a mmo with character selections and items along with the ability to customize characters before match start etc .. any pointers

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

    Is now a good time to learn Rust? What are the benefits (if any) of being an early adopter to a language/tech stack?

    Posted: 09 Feb 2021 04:20 PM PST

    Rust Foundation just launched, with support by Google, Microsoft and Mozilla. So despite the lack of Rust jobs, it seems to have a bright future at the top companies. Is it ever good to be an early adopter? I'm very curious about this language but I don't want to end up feeling like I wasted my time learning Rust instead of polishing my C++ and Java skills, or even getting into Go

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

    Best game object detection method without reading directly from memory?

    Posted: 09 Feb 2021 03:58 AM PST

    I'm wondering if it's possible to efficiently detect objects in game screenshots with 'simple graphics'. An example of a game I am trying this on is Diablo II. Take for example this screenshot:

    https://i.imgur.com/Xaru5h6.png

    Given a spritesheet of the barbarian (the centre character), is there a method for a program to accurately determine where it is on the screen at all times?

    I have attempted using Python OpenCV's feature-recognition but the problem I'm finding is it is incredibly sensitive to even slight changes in pixels caused by idle animations, meaning it only finds a match only once every few frames. Each run of the feature detector takes about 200ms so I can't possibly feed it in every single sprite variant without it taking years to process.

    My source code for this attempt is here:

    https://pastebin.com/ftEZVhEG

    An ML solution would probably solve it, but I'm not interested in having to capture thousands of images for training data for every single character in the game. I also don't want to have to read from game memory as I'm hoping to be able to apply a similar method to all sorts of games like the 2D Zeldas, Among Us, etc.

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

    Oauth 2 connection behind an nginx reverse proxy

    Posted: 09 Feb 2021 03:06 PM PST

    Hey all, I am trying to make a simple website in python/flask running in docker that integrates with quickbooks online api. I am having a lot of trouble getting it working correctly though. I can run my server locally using http://localhost:5000/callback as my redirect uri and everything works great, I authorize through quickbooks and it redirects me back so I can make api calls.

    The trouble comes when I try to push it out to a docker server. I have get the server running in a docker container behind a linuxserver/swag reverse proxy with my redirect uri set as https://quickbooks.domain.com/callback. It seems to authorize fine if I am not already logged into intuit in my browser and I get redirected back to my callback. Then if I try to do an api call it complains about a malformed bearer token. If I'm already logged into intuit in the browser it will go out and authorize with quickbooks but then quickbooks will display an error saying

    "Uh oh, there's a connection problem.

    Sorry, but the app didn't connect. Please try again later, or contact customer support for help."

    No calls against my server. Is running oauth2 from behind a reverse proxy an issue? Anyone successfully done this?

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

    How to correctly implement a REST service on C#

    Posted: 09 Feb 2021 05:09 PM PST

    Hi!

    So I am tasked with creating a simple calculator service for a client to consume, but I am having trouble understanding how to implement the method of each arithmetic operation on the Controller and obviously accessing it from the Client.

    My logic (which could be wrong) is: Create a class called Sum (or whatever the operation is), implement the class on the Controller within an HTTP Post method and return the expected value to the client. Is this correct? Is there any better way of doing it?

    Following is the implementation of my Sum class in the Controller as a Post.

    public class CalculatorController : ApiController { public double Post(double val1, double val2) { Suma sum = new Suma(); sum.valor1 = val1; sum.valor2 = val2; double result = sum.Procesar(val1, val2); return result; } 

    Attempting to post 2 values from Postman only gives me an error.

    I would definitely appreciate any help.

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

    [ASP.NET/VB] Trying to change the theme with a click of a button

    Posted: 09 Feb 2021 04:01 PM PST

    The default theme for the aspx page is "BlueTheme"

    I want it so that when Button1 is clicked, the theme changes to "RedTheme"

    So it will only allow me to change a theme (using Page.Theme = RedTheme) programmatically in the PreInit() section. So how am I supposed to program Button1 if that is the case?

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

    How is a Machine Learning carreer ? And how to pursue it ?

    Posted: 09 Feb 2021 02:38 PM PST

    So, I'm a student in Computer Engineering looking to know more about a Machine Learning Engineer career, I have some books in my list to read about (Peter Norvig, Some from O'reilly and others) but i really want to know how is the career, what do you do daily ? How much of time you spend really developing machine learning models and how much you spend as a Software Engineer developing systems. What to study ?

    Beside that questions, i want to know how i pursue a career like that. From my point of view, making projects and studying is really important, but i want to know how to scalate that to a job and improve myself in the field.

    OBS: If i mispelled anything wrong, feel free to correct me, english is not my native language so it may contains some errors.

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

    Bat.exe using clipboard win10

    Posted: 09 Feb 2021 10:20 AM PST

    Hello I have zero experience whit stuff like this so I hope anyone can help me

    I use Stremlink to stream crunchyroll videos in to MPV so I can use Anime4K to upscale the stream but streamlink is not exactly user friendly when you know nothing about python or CMD commands in general

    To lunch a stream I currently need to start CMD and run this command

    "streamlink --crunchyroll-username=<user> --crunchyroll-password=<pass> <link to stream> best"

    So I was wondering if it's possible to make a bat.exe to start CMD and automatically run the command and take the streams link from clipboard and paste it on the correct location or if perhaps someone knows a even better solution to my issue

    Thanks in advance if you take your time to read this

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

    How to check for equality without using if statements.

    Posted: 09 Feb 2021 01:56 PM PST

    I am being asked to wrtie a function in C that checks to see if the value passed is equal to -1. I am allowed to use the following ops: ! ~ & ^ | +

    Here is my invalid solution since it uses the operators == and if

    int isNegOne(x) { if(x == (~1 + 1)) { return 1; } else { return 0; } } 

    I am really struggling to figure out how I am supposed to output more than one answer without using an if statement. Any suggestions as to how i should rethink this would be great

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

    I'm currently learning C# and I feel down in a rut.

    Posted: 09 Feb 2021 01:41 PM PST

    I've been learning C# for about 4 months now , I'm confident enough to make my own little programs, however I feel that for a while I've just been going in circles, not progressing (just for scope I recently tried to make a Tic tac toe game. After struggling my way through a bug-ridden programme, I went online to find everyone's programmes far superior to mine in every way).

    I feel like I know enough to get by to make a simple program, but I often get confused and look on the web and realise how much I don't know about even the basics.

    I won't give up on this, I wont let myself, there's nothing better than making a shitty little program do what I set out for it to do.

    Any pointers in the right direction? or Any words from those with experience who have been in the same position? Thanks for reading.

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

    Your opinion on learning Python and Flask or learning PHP and the advantages and disadvantages!

    Posted: 09 Feb 2021 01:37 PM PST

    Your opinion on learning Python and Flask or learning PHP and the advantages and disadvantages!

    Hey guys, what is your opinion on the two? My line of thinking on the two comparatively is that in Python, one could probably perform some data analysis/ basic Machine Learning and other things and make a web app with Flask thus increasing the scope of what you could do while PHP is natural to the Web, simple to set-up and could probably be easier to get going although am not too sure.

    submitted by /u/The-motto
    [link] [comments]

    Unity 2D - Problem with my ladder/climbing code!

    Posted: 09 Feb 2021 01:36 PM PST

    Hello! Here's what I can do so far: I am able to move up and down the ladder, and stop and have the character stay in place on the ladder, like how you normally would in a game using a ladder.

    The problem I'm having is this: No matter where inside the collision box for the ladder I am, if I stay still for one whole second and then try to move again, all of a sudden I cannot move up or down and am stuck in place. The only way to start moving again (to my knowledge of what I've discovered) is by either moving left or right. Only then am I able to move up or down again.

    This is a strange problem and I've spent a good while searching on Google how to solve this problem, but I haven't found anything that worked. I've tried using Debug.Log to test if setting the gravityScale in the script is what affects it, but it seems that doesn't affect it, and neither does my "canClimb" boolean (I will leave my code below).

    I just want to know if this is something small that I should change, or if I have to rewrite my ladder code completely. If anyone can help I'd be so thankful.

    Please let me know if you need more information!

    Here's my Ladder Script:

    using System.Collections;

    using System.Collections.Generic;

    using UnityEngine;

    public class LadderScript : MonoBehaviour

    {

    public GameObject playerObject;

    public bool canClimb;

    public Rigidbody2D playerRB;

    private Vector2 velocity;

    void Start()

    {

    playerRB = playerObject.GetComponent<Rigidbody2D>();

    velocity = new Vector2(0f, 7f);

    }

    void OnTriggerStay2D (Collider2D other)

    {

    if (other.gameObject == playerObject)

    {

    canClimb = true;

    }

    if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.UpArrow) && canClimb)

    {

    playerRB.MovePosition(playerRB.position + velocity * Time.fixedDeltaTime);

    playerRB.gravityScale = 3f;

    }

    if (Input.GetKey(KeyCode.S) || Input.GetKey(KeyCode.DownArrow) && canClimb)

    {

    playerRB.MovePosition(playerRB.position - velocity * Time.fixedDeltaTime);

    playerRB.gravityScale = 3f;

    }

    else

    {

    playerRB.gravityScale = 0f;

    }

    }

    void OnTriggerExit2D (Collider2D other)

    {

    if (other.gameObject == playerObject)

    {

    canClimb = false;

    playerRB.gravityScale = 3f;

    }

    }

    }

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

    Adding Base Module and base address giving 0

    Posted: 09 Feb 2021 01:17 PM PST

    I'm trying to retrieve a value from another program. I have got the base module address and the base address and when I add them in cheat engine I get the expected value however, when I try and use ReadProcessMemory I get 0, which doesn't make sense to me. Here is what I'm doing:

    ReadProcessMemory(hProc, (LPCVOID)(modBase + 0xBE2B0), &valueOne, sizeof(valueOne), 0); 

    Where modbase is my module and "0xBE2B0" is my base address and like I said when I add "modbase" and "0xBE2B0" in cheat engine it gives me the correct result.

    Am I using ReadProcessMemory wrong? any help is greatly appreciated.

    Thank you.

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

    How Do Programmers/Coders Decide Which Coding Language to Learn?

    Posted: 09 Feb 2021 01:00 PM PST

    How do programmers decide which languages to learn when there's so many? (Ruby, R, Python, Java, HTML, C, C++, ArduPilot, etc..)

    I'd assume there's some basic common languages such as R or Python.. If that's the case, how do people decide which languages to learn after that?

    Do you ever run into the issue wherein you learn a coding language but you need a different or esoteric one for a job you want?

    Please forgive me if these are novice questions.

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

    Python3 dependency management tools

    Posted: 09 Feb 2021 12:53 PM PST

    Hello,

    Looking for some insight on today's "best" tools for managing dependencies for production application development in Python3. In the past I've used virtualenv, pipfile, Poetry, and some other ones. It seems pretty subjective based on what the original developer(s) wanted to use. Is there some "industry standard"? Pipenv seems like the industry standard. Poetry looks cool, but i dont want to go with the "newest" tech, i want to go with what i know works.

    Just looking for some opinions/experiences with past dependency management tools; I've always been a node guy and npm makes it easy, kind of sucks that Python hasn't caught up to the fun yet.

    Thanks

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

    Understanding the buzzwords "design pattern"

    Posted: 09 Feb 2021 12:37 PM PST

    I'm preparing for a job interview. I was a computer science major not a software engineering major but the job is a software engineering role.

    Both majors learned like 70% of the same stuff, but the computer scientists at my school learned more about Instruction set architecture, how databasis work, algorithms etc, while the software engineering majors learned more about documentation, design, and the lifecycle of making a program.

    So I'm trying to read up on potential questions a software engineering hiring manager might ask, and something that keeps being recommended is "design patterns". If someone asks me about design patterns, i'm going to look like a deer in the headlights. and I for the life of me can not get a consistent answer on what the fuck it is.

    Sometimes its described as things like "model view controller vs model view view model" etc etc. Which is something i kind of understand.

    Other times its described as "creational design, structural design, and behavioral design".

    Then other times its described as things like "singleton pattern, factory pattern" etc.

    All of these concepts being described with the same phrase.

    it seems very not technical and just a wish-washy buzzword used in big tech. What the fuck is a design pattern

    and how do those aforementioned things fit in with it: (mvc,mvvm,etc), (singleton, factory, etc), and (behavior, creational, structural) etc. Please help

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

    Is it normal to dynamically generate your API endpoints?

    Posted: 09 Feb 2021 06:37 AM PST

    I've mainly done data engineering and dev ops work and am planning on building a full stack application, which includes a RESTful API. It sounds like it would be ideal to create the database schema and then generate code for the API based on the schema or a metadata table. This way the overarching features are the same for every endpoint. Seems like a good way to create consistent and best practice APIs but every guide online is on hand writing every API action.

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

    C++ reading input file help

    Posted: 09 Feb 2021 12:26 PM PST

    Hi I'm new to C++.

    I am trying to read from a file, lets say test.txt and has only one line, name and age: "Robert,20".

    I created a structure Node with attributes: name and age. How do I gather the data from the file and store it in a node? I know how to open the file and read the line but I'm not sure where to go from here.

    Thanks!

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

    A multidimensional array problem

    Posted: 09 Feb 2021 03:52 AM PST

    Hello,

    So I have a question, I wouldn't say it's about programming but more about an algorithm kind of thing.

    Anyways, so lets say we have a multi dimensional array of 10x10, each element of that array has a random number (between 1 and 1000), now we want to go from the element [0,0] (top-left element) to [9,9] (bottom-right) while taking the most optimal route; the route that would yield us the largest number. We can only move down in the array (ex: from [0,0] to [0, 1]) or right (ex: from [0,0] to [1, 0]).

    So the output should be an array of numbers in order (the route we took), the sum of those numbers should be the highest compared to other possible routes.

    I thought about comparing each element with the adjacent right and bottom element and taking the highest one, but it just doesn't seem like it would give us the best route. Can anyone help me with how I should solve this problem ?

    I'm very sorry for my English, I know I didn't explain this good enough, if you have any question, I'll be happy to clarify more.

    Thank you.

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

    No comments:

    Post a Comment