• Breaking News

    Thursday, March 25, 2021

    Heroku vs EC2 Ask Programming

    Heroku vs EC2 Ask Programming


    Heroku vs EC2

    Posted: 25 Mar 2021 01:52 PM PDT

    Hi, I am going from cloud functions to a dedicated server to do things like sockets etc.. I am hearing about EC2 but I did a little bit more research and EC2 involves a good amount of work, especially having custom domain as api root, integrating SSL, etc and stuff like that and you have to pay. EC2 feels like its more for established companies or people that are serious. On heroku you click a button and it does the ssl cert for you. Seamless sql integration. And much more. It seems so hobby developer friendly ? Thoughts?

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

    Programming language to build a workflow application?

    Posted: 25 Mar 2021 07:38 AM PDT

    Hi all,

    Apologies ahead of time for the potentially dumb question - I am not a programmer and I work at a VERY small company who's IT department consists of two people.

    There's a business process here at work that boils down to a long series of reviews, feedback, and approvals of documents. Currently, this is all done via email and excel trackers m, which I think is totally stupid. I think it would be better to have an internal website or something that could kee track of all of this stuff and alert people at step completion.

    Like I said, we're small. I know we could hire someone to build us something like this, or we could look for some off the shelf software to do this, but we don't have that kind of money - yet.

    I don't know how to code, but I was a math major many moons ago. I was hoping to learn to build some rudimentary proof of concept with my free time to show the owner to help convince him that we need something like this - I just don't know where to start.

    If I wanted to build a rudimentary workflow tracking web application on my local pc, what are my options as far as programming languages is concerned?

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

    "Single State" Architecture

    Posted: 25 Mar 2021 09:53 AM PDT

    Serious question: Is the trend in software development/design now to put everything into one big object and make that object available globally to the entire application? To me, this sounds like something a first year CS student might do, but I'm being told this is a legitimate software architecture.

    I'm working on a project where we're using "Single State", everything and I do mean everything all lives in one large object that's a global variable available to the entire application. Everything uses it. Need to edit an address for a single merchant? That all goes into the global object, and the address screens all access that global object. Don't worry about encapsulating anything and passing just the object you need, all the things have access to all the things.

    I'm being told this is what Apple is pushing everyone towards, and that this "Single State" design has been reviewed by lots of people in my organization and everybody agrees it's the best thing since free beer. Yes, this is SwiftUI, where apparently best practice is to pass everything as environment variables.

    Any other developers seen and/or heard of this?

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

    Need help implementing BFS in Python to follow links on webpage.

    Posted: 25 Mar 2021 04:47 PM PDT

    So I am trying to scan a random Wikipedia webpage, pick all of the links and go into those links to scan the links inside of that link up to 6 deep; until it finds the "Star Wars" Wikipedia webpage. My thought is to use a BFS to accomplish this goal.

    Here is the code and more information on what I'm trying to accomplish and what is going wrong.

    It seems like I'm pretty close to actually having it working.

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

    New to video.js

    Posted: 25 Mar 2021 08:23 PM PDT

    I found this code example in the documentation:

    <video class="video-js"> <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"> <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm"> </video> 

    But is there a way to say change the src to a url and not declare the type variable?

    For example, there is this publicly available video hosted via peertube:

    https://peertube.designersethiques.org/videos/embed/0e3b464a-3885-4ee4-af76-8b2e8952d548?start=2m19s&autoplay=1&warningTitle=0

    If I change the src url to this peertube url it doesn't work. Does anyone know how to change src url's in video.js?

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

    Decompiling various types of game data files.

    Posted: 25 Mar 2021 04:02 PM PDT

    Heya, this is a sort of part 2 to the previous post which I made here: https://www.reddit.com/r/AskProgramming/comments/ls06u8/extracting_a_dat_file_from_a_game/

    I incorrectly titled it "extracting" As I already had the .DAT file, the word I was looking for was decompiling.

    But anyways, in recent times I've gone through and looked at the other ports of the games, and they all use a different method of storing the cutscenes, Keep in mind I don't know a single thing about programming and I'm just using programs I find online to try and decompile these.

    PC/MS-DOS: .DAT

    Macintosh: .MAC

    3DO: (Haven't had the chance to open it)

    CDi: .RTF

    PSX: .OUT

    Saturn: Doesn't compile, Uses simple .CPK files and is the only version I've been able to rip so far.

    https://imgur.com/lT78WFR

    I would like to know a bit about the filetypes, and some ways I can go about getting them open/decompiling them?

    Looking at the definitions of the filetypes it's rather confusing how one is a rich text file, unless there's something i'm missing..

    Game is Brain-Dead 13, essentially, a trial and error gameplay pile of crap that doesn't tell you what to do nor where to go.

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

    Flask code design question: where to put wrapper functions?

    Posted: 25 Mar 2021 04:48 PM PDT

    Hi Flask newbie here.

    I have some decorators that I want to apply to my endpoints, but I am not sure where to put those decorators code.

    For example, I have this customized error handler wrapper function called @ERROR, which checks errors for input parameter param. This function resides in a helper file called Error.py:

    Python,tabs=4 def ERROR (function): @functools.wraps(function) def wrapper(*args, **kwargs): param=request.args.get('param') #checks param return function(param, *args, **kwargs) return wrapper

    And then param gets passed to a flask app file where all the endpoints are.

    It bothers me that I am requesting parameters outside of the app file. Any good ideas (or standard practices) on where I can put my wrapper functions? I thought about moving them to the app file as well but it's gonna make the file "uglier"...

    Any suggestions help! Thank you :)

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

    How do I write a short program in python that calculates a user's age in a year?

    Posted: 25 Mar 2021 04:36 PM PDT

    Write a program that asks the user their name, says 'Hello' to them, using their name, and then asks how old they are. The program should then calculate their age at their next birthday and respond "So your next birthday you are (age)?'

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

    Question: Windows 10 (can't use "node ." command.)

    Posted: 25 Mar 2021 08:58 AM PDT

    Hi all,
    Is anyone able to help? Trying to setup a bot for discord and I am unable to use the "node 'space' ." command in command prompt to show that the bot is online. Unless if it's just because I don't have the right libraries installed on Windows 10. An example @ 13:10 is what I am talking about in the YT video below. I'm fairly new to programming so any help is appreciated thank-you.

    https://youtu.be/j_sD9udZnCk?t=793

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

    How to avoid argument drilling?

    Posted: 25 Mar 2021 03:47 AM PDT

    In my rust app I'm connecting to DB, and passing reference to connection variable through lots of other functions from main entry to function where I'm using it.

    So, how I can avoid that? What should I use? I guess, I can create a singleton, but, is there more "functional way"?

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

    Yarn problem

    Posted: 25 Mar 2021 10:31 AM PDT

    Hi.

    Im trying to install this: https://github.com/lichess-org/api/tree/master/example/board-api

    By the way building the front-end i get this error.

    rc/main.ts → ../back/public/dist/app.dev.js... (!) Plugin typescript: @rollup/plugin-typescript TS1110: Type expected. 6 export declare type SquareName = `${FileName}${RankName}`; ~~~ created ../back/public/dist/app.dev.js in 3s Done in 3.44s. 

    That sign "`" is the error??? i dont know where find that to try to change it.

    This is not exactly "programming" but i think it's related (so "other" tag), and my idea of installing this is to create a program ...

    Thanks.

    Thanks.

    submitted by /u/9acca9
    [link] [comments]

    How to create a chrome extension that will change the url

    Posted: 25 Mar 2021 02:16 PM PDT

    How to create a chrome extension that will change the url

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

    Writing and Reading to a text file in x86 arm assembly using fopen from c library

    Posted: 25 Mar 2021 07:14 AM PDT

    Hi! I was wondering how I would use the function fopen from the c library in a program i'm writing in assembly. Right now, I'm trying to write a string to a text file but when I run my code, i get this error:

    qemu: uncaught target signal 4 (Illegal instruction) - core dumped

    Illegal instruction (core dumped)

    Here's a link to a screenshot of the code I have so far. https://ibb.co/RhKpQw4

    EDIT ** Sorry about the confusion. The code's in arm not x86

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

    Concurrent, corresponding indices

    Posted: 25 Mar 2021 04:22 AM PDT

    I'm picturing an extremely simple data structure or conceptual structure for an ebook reading app which displays paragraphs or sentences at a time. That is, you can proceed through the book by seeing one paragraph at a time, or toggle a mode where it switches to one sentence at a time.

    I'm thinking a really simple way to achieve this structure could be:

    1. Through whatever effective method, parse the text into paragraphs and store them in a list.
    2. Parse either those paragraphs or the original text into sentences and store it in another list.

    The only last requirement is the most elegant, simple way for one list to know where in the text the reader is, in the other list. I.e., if the reader switches from sentences to paragraphs, an index is already in place in the corresponding paragraph to the sentence the reader is currently on.

    I see it as complicated and convoluted to have some kind of function constantly updating with some numerical index to use when the user switches modes.

    I would rather have a very elegant means for the program to simply know, "Surely, this sentence here is within that paragraph there."

    I am brainstorming a bit about programming elements that could provide this simply.

    For example, maybe the program could easily just find the right paragraph just by searching for that sentence. It just re-jumps to the right place every time. It might be feasible, but perhaps slow - I'm not sure. (In case of identical sentences, it could also search the surrounding text a bit for matches.)

    Or maybe there is some way of pre-aligning, pre-corresponding the two lists with one another, somehow? Perhaps there is some underlying index system which simply invariably knows: if user is in sentence 12, sentence 12 is in paragraph 3. In other words, rather than writing a function to calculate an index every time it's needed, the way the lists are constructed from the beginning is inherently indexed. You could call the "sentence" class, perhaps, and just say "get paragraph index", and it would point you right where you'd like to go.

    I'm not 100% sure how that would work - should I perhaps inherit the list class from Python and add my own method, call it BookList or BookStruct. It's a list which contains an attribute called "type", such as "paragraph" or "sentence". Every element has a book-index - an ordered tuple (1, 7) which means "Paragraph 1, Sentence 7". A paragraph BookList would know to refer to the first element in the tuple for its index; etc.

    But, perhaps there is some even more clever way I haven't thought of, to get an element to intelligently directly point to its correspondence in a different list? I mean, I could just make a third list called the "index" quite simply. When the book was originally parsed and structure, the function could deliberately populate the index, while it's working. It could separate paragraphs, and while separating sentences, refer to the paragraph list: have we arrived at the next paragraph yet? And when it does, just add the index accordingly in the list: (1, 1) (1, 2) (2, 3) (3, 4), and so on. Or, it doesn't have to refer to the previous list. It just runs from head to toe through the text checking for any delimiters manually signifying any structuring element - ah, here's a line break, so add an end of sentence and end of paragraph to the index, for example. Somehow, this strikes me as possibly being the most computationally efficient.

    So: would anyone have any thoughts or advice on this situation? Any insights into different ways to do this? Is this a well-known programming scenario with a favorite solution?

    Thanks very much.

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

    Advice on SQL or Python for a BA beginner!

    Posted: 25 Mar 2021 04:18 AM PDT

    Hi. I am completing my MBA (specialising in Finance) this summer and have managed to grab an offer via campus placements. I got an offer for the role of Business Systems Analyst in the BFSI vertical in a leading software company and I happily took it. Expecting to join in another 3 months time. I am a commerce student with no exposure to coding. But the recruitment team said that, they are hiring my for my finance knowledge. When I talked to some of the industry people they said that I should start learn SQL/ Python. Every single person's only recommendation is to learn SQL/ Python to be a great BA. Since I have no exposure to this field, I have some queries to be addressed... 1. Can I start SQL/ Python right away without learning coding basics? 2. Will it be sufficient to learn SQL/ Python via online tutorials and other courses offered? 3. How long will it take for me to master SQL/ Python? 4. Suggest some really good free sources to learn SQL/ Python... 5. Which one should I learn first? SQL/ Python

    Thanks in advance!

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

    How to make '\0' for the CPP library string so that the size of the string can be changed at any time?

    Posted: 25 Mar 2021 02:02 AM PDT

    and how to declare/define a library string var with only length but not a "text" or another string var?

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

    Programming Laptop: Lenovo ThinkBook 14 G2 vs Acer Swift 3? which one?

    Posted: 25 Mar 2021 12:33 AM PDT

    Hey,

    I have been looking for a laptop for up to £800 mainly for programming only, no games just C# .NET development as well as some Android studio (running sim).

    I have found and narrowed it down to two laptops but can't decide which one to choose. Laptops are as follow:

    Lenovo ThinkBook 14 G2

    Acer Swift 3

    I have attached links to them as well. I will be doing some travelling as well so it would be useful if the laptop lasted me 4-5 hours battery wise. It will also be used for University work. However, I have heard that the reliability of the Acer brand is not the most appealing I would say. Does anyone have it and could give their opinion?

    Thank you

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

    No comments:

    Post a Comment