Is Having Several Files Named the Same Bad? Ask Programming |
- Is Having Several Files Named the Same Bad?
- Is the Harvard CS50 course worth it for someone who has no programming knowledge, or should I look into another course for introduction?
- Distributing n items as evenly as possible into k boxes, where each item has a range of boxes it could go into
- Why modern programming is hard to start with?
- Automatically editing a text file based on display?
- Been trying for 2 hours to use a .lib file (c++, sdl, how to make it work; my code, file structure, and error message below)
- Time complexity of printing a list? The entire list object itself, not its individual elements (Python)
- Comparing data
- How would you go about parsing out data from a web page using XPath?
- Looking for coding language where you can see other teammates' cursor?
- How to check whether item exists, in Bash and using a samba path?
- Should i switch from php to c#?
- I need suggestions for building a web application which show data in real time it also includes TCP socket programming. Please read and Help
- Controlling a browser from an external script? (No, not with Selenium)
- Would you make this line a helper function or not?
- Help me set up something that my (Java) students can query for a simulation?
- Extension that sorts out followers of a somewhat big Instagram page?
- How to Understand Large Projects
- How to estimate minimum hardware requirements for a particular program?
- doubt in PROLOG exercise (exam tomorrow pls help ;_;)
- How to access a cloud database from a windows forms application?
- what skills do I have to develop in order to easily get hired as a entry level programmer( in python)?
- .XSL to .JSX conversion help
Is Having Several Files Named the Same Bad? Posted: 07 Sep 2021 03:56 PM PDT I'm currently making my first website and noticed that I have several files similarly named. It's going to possibly be my portfolio so I have access to the programs I want to share all being routed (using express.js) through a file called I personally don't have any trouble when working with this and it's intuitive enough for me, but I'm not sure about a team environment, I'm still in school so I haven't really had that experience yet. I'm wondering if this is perfectly fine or if I should be naming them all different things. Note: This is ignoring naming conventions that workplaces set. I'm aware that every workplace has their own naming conventions, but I'm just curious on in general what the convention is, or if there's none a all. [link] [comments] |
Posted: 07 Sep 2021 06:59 PM PDT I was looking at the harvard cs50 extension course as a great introduction to programming concepts. I want to teach myself c++/Java, but I have not seen anything that introduces the basic concepts? What would you suggest? [link] [comments] |
Posted: 07 Sep 2021 10:43 PM PDT For example, suppose I have 10 boxes and 20 items. If each item can go into any box 1-10, then obviously each box gets 2 items. However, my situation is much more irregular. Each item has a specific range, there is no pattern. For example, the first item might have the range 3-10, the second might have the range 1-5, etc. Some boxes may be left empty, I'm just trying to distribute the items as evenly as possible. I've just started thinking about this problem, but would like to hear from anyone who has solved a similar problem in the past, or is willing to solve mine. Please also let me know if anything I've written is unclear. [link] [comments] |
Why modern programming is hard to start with? Posted: 07 Sep 2021 06:42 AM PDT Hi! This is a vent post. [link] [comments] |
Automatically editing a text file based on display? Posted: 07 Sep 2021 10:21 PM PDT Sort of a hard question to even ask so I'm sure the answer is even harder. But really I just need someone to tell me where to start and I can figure out the specifics. So basically what I'm wanting to do is update a text file that contains my MMR(Match Making Rating) for my Twitch Overlay. Basically if I gain MMR e.g. +25 at the end of a game; I want to automatically update the text file and add 25 to the number that is currently there. Here's an image where the +75 is what I would want added to the number in the current text file. What is the best way to go about this, or, is there even any way to go about this? Thanks for taking the time to read [link] [comments] |
Posted: 07 Sep 2021 08:54 PM PDT My Code (test.cpp): My files (the ----- is my name): I don't know why it doesn't work. Error: Computer info:
I don't understand. I have used c++ for a couple months, finally needed a .lib so I found sdl for what I want (2 d graphic stuffs). Been googling and typing things in for ~2+ hrs now, I don't get it. (Already tried yesterday, so fresh mind didn't help, new pair of eyes didn't help either. [link] [comments] |
Posted: 07 Sep 2021 07:35 AM PDT I've been trying to Google this for hours, but only found one that answers it. However the explanation was short, and because there was only one, I couldn't make sure if it was correct at all. Let's say a function asks for an input n, and then it creates a list x with n elements. What would then be the time complexity of print(x) with respect to n? Would its run time scale with whatever the size n of the list x is and therefore it would be O(n)? Or is its runtime going to be constant regardless of the size n? The reason I'm having a hard time finding an answer to this in Google is because the results I get is always talking about iterating through the list and printing each element individually, instead of printing the list object itself. According to the one result I found, it is also O(n), because the print function in this case apparently also iterates over the list visiting each element once. It would be nice if anyone else could confirm if this is correct. [link] [comments] |
Posted: 07 Sep 2021 05:32 PM PDT This is going to be a complicated question I think. So what is the best way to go about doing this type of comparison. So say I have three basketball players and they all have stats of: Points, assists, and steals. I want to compare their stats and see who wins the most categories, so say player 1 has more points and assists but less steals than player 2, it still wins. I then want this to continue on the list so say player 1 beats player 2, I want to compare players 1 and 3. But I want the program to print the best player of the list. This is all in Python btw. [link] [comments] |
How would you go about parsing out data from a web page using XPath? Posted: 07 Sep 2021 01:35 PM PDT There's some price data I want to scrape on a regular basis from a web page. I can pull down the HTML with wget or curl, but I have no idea how to parse out a particular item with XPath once I have the file on my PC. What's the best way to provide a file name and an XPath to parse, and receive just the information from inside that block? EDIT: This appears solved! Thanks to /u/knoam! Thanks! [link] [comments] |
Looking for coding language where you can see other teammates' cursor? Posted: 07 Sep 2021 04:34 PM PDT Similar to Roll20 from DnDBeyond (which is HTML5 based I believe) -- looking for a coding language where there's a websocket connection and you can bring folks into a lobby where each players mouse has a colour, and you can see their mouse moving around and clicking. Any ideas? Thank you!! [link] [comments] |
How to check whether item exists, in Bash and using a samba path? Posted: 07 Sep 2021 12:09 PM PDT Dear all I need to be able to check, using a Samba path ( Things I've tried to no avail. Thanks. EDIT: The reason I wish to test for an item's existence is to to get the user to choose whether to overwrite it via PS: If this is not the best subreddit for the question, I'd appreciate being pointed to a more appropriate sub. [link] [comments] |
Should i switch from php to c#? Posted: 07 Sep 2021 03:39 PM PDT Hello everyone I was thinking about switching from php to c#, my question is how hard would it be? If anyone done that or something similar please share your experience, i want to hear it. Almost 2 years of experience with php, mostly laravel and some codeigniter. Tbh i like better the non-object oriented way but i see nobody does that anymore, maybe you can recommend another language suitable? Thanks [link] [comments] |
Posted: 07 Sep 2021 08:05 AM PDT I want to build a Web Application in which data (JSON) is sent from multiple/single TCP Client Socket to the TCP Server Socket and then stored in Database by Tcp Server. The Web Application server then accesses the same database to show data on client/browser. If possible, I want to show the data on browser as soon as it is successfully stored on the database by tcp server (you can say in Real-Time) although suggestions for achieving same without real time visualization on client side is also good. For example: Just like stock or share market apps or websites where we see the stock or share rate going up and down in real time. Full Discerption starts from here Let's divide this in 2 parts and elaborate: 1) TCP Client-Server and Database: Multiple/single TCP Client send JSON data to TCP Server using sockets. TCP Server make connection to the Database and store the received data in Database. 2) Web Application: Now as soon as the data is stored successfully, I like to show the same data on client side/browser. For this I guess I need to send a command or trigger an event (sorry I don't know the technical terms) on client side. This command should be sent from Web Application server to the client/browser or web application. Now there are 2 options to do this. a) Either I send the new data (received from the TCP Clint) from Database as JSON with command and command calls a function on client side/browser to show received data. b) I send the command and it trigger an event on client side or call a function on client side (maybe use JavaScript). The function on client side then asks for data from same database (just as it ask when the page is loaded for the first time) and then update the page if there is any new data added in database. (I guess this can be achieved using Ajax calls, but to show data in real time making a lot of ajax call to fetch data from server is not good option as far as I think) The Problem: Let's come my problem. I am fresher/newbie and as far as I know, the Part 1 of this project (sending the data using tcp sockets and storing it in database) is a completely different thing than Part 2 (web application). I want to know how I can connect these two so that as soon as TCP Client sends JSON data to TCP server and it successfully store the data in database. The web application server will get to know that new data has been received and stored in database and then web application server will immediately send new data to the client/browser and client shows it on the user interface. I think as soon as the data is successfully stored in database TCP Server have to call a function that will tell web application server that new data has been received and web application server then do the rest of the part like retrieving the new data and sending the data to the client. Here is the image of data flow according to "me" - https://i.imgur.com/ujDd9Dk.png What I want to know: I want to know how I can achieve this? What are the different ways? or what is the best way? Plus, I want to know what I should study to achieve this? I mean what topics or technology (?). Suggestions for achieving the same without real-time data visualization on client site is also acceptable. I know many of you may ask – why am I using sockets for storing data in database? This is the only option I have for now. Please suggest other option if in case I need to remove sockets later I have to make the same project using python and C Sharp technologies, like I can use flask, Django when I build this using python and Asp.net mvc when building the same using c sharp. So it would be good if you can suggest things from these two technologies. I have knowledge about: Basic of all the following - HTML, CSS, JavaScript, Asp.net MVC, Flask, Django, Python, C Sharp. Request: Please use easy language, I don't know a lot of jargon. TL;DR : I want to build a Web Application in which data (JSON) is sent from multiple/single TCP Client Socket to the TCP Server Socket and then stored in Database by Tcp Server. The Web Application server then accesses the same database to show data on client/browser. If possible, I want to show the data on browser as soon as it is successfully stored on the database by tcp server (you can say in Real-Time) although suggestions for achieving same without real time visualization on client side is also good. For example: Just like stock or share market apps or websites where we see the stock or share rate going up and down in real time. [link] [comments] |
Controlling a browser from an external script? (No, not with Selenium) Posted: 07 Sep 2021 07:58 AM PDT Use-case
ProblemHow do I close the browser tab when a blocked website is visited? Is there a Chrome API/SDK I can use to connect the external script? I haven't been able to find one. Explored remote-debugging, but no user launches their browser via the CLI, and that too with the debug flag set. Extras
Thank you! [link] [comments] |
Would you make this line a helper function or not? Posted: 07 Sep 2021 03:40 AM PDT I use this line in a couple of places around the codebase:
Would you keep it as is or make it a helper function? The reason I ask this is primarily readability as I could see how it wouldn't necessarily be immediately obvious what the code does (especially if you haven't used it before). [link] [comments] |
Help me set up something that my (Java) students can query for a simulation? Posted: 07 Sep 2021 06:27 AM PDT Hi! I'm a secondary school computer science / (Java) programming teacher who's comfortable with data structures and algorithms but I have NO networking experience. I have an idea for a fun project that I don't know how to do, but I feel like it's possible, and I'd like to try to figure it out if I can get an idea of what I'd need to learn. I want students to be able to write an agent in a stock market simulation. I want them to interact with something I make that feeds them stock data, and I want their program to read that data, process it with conditionals and basic line-fitting, and have them manage an amount of fake money with a few fake stocks to choose from. How do I make something central that feeds consistent, but unpredictable (to them) data when their programs are ready for a test run? I could do a rudimentary version by just giving them a .csv and file-reading code, but I think doing this as a networked interaction would be more exciting and could raise a lot of interesting questions. So what I'd love help with from someone who can do this: - How much time do you think this would take me to set up? Assume I'm a generally good problem-solver and decent data/algorithms programmer with no networking experience. - Could you phrase what I'm trying to do with precise technical language (e.g. "You want to set up a zigzog server (that can be hosted for free on Heroku as long as you limit the requests) that uses TFLC protocols to return data whenever another computer makes a flimflam request.") This will help me to search for tutorials! - Maybe a sub-question of the above: What services and/or libraries will I need to use and fit together? - If you have or know of any examples of similar projects or tutorials, that'd be much appreciated! Thank you! [link] [comments] |
Extension that sorts out followers of a somewhat big Instagram page? Posted: 07 Sep 2021 06:10 AM PDT I have been trying to find a person on instagram whose name i dont know, but i know for sure that they follow this one page which has like 17k followers, and although ive been scrolling through them its a bit tough to search them all and not be scared of missing anyone that could be said person. So i was wondering if there's an extension out there that sorts out instagram followers to different characteristics, such as the time when they've followed the page, like from latest to oldest, or their gender and wether they have an actual profile picture or not. Any help would be greatly appreciated! Thanks in advance :) [link] [comments] |
How to Understand Large Projects Posted: 06 Sep 2021 11:59 PM PDT Right now I am looking at the react github page there are so many files and there is so much code, I find it to be extremely overwhelming. Even though I am familiar with vanilla javascript, I still have no idea how to begin fixing even a 'good first issue'. Any help or tips will be appreciated. [link] [comments] |
How to estimate minimum hardware requirements for a particular program? Posted: 07 Sep 2021 05:55 AM PDT So, basically, I was given a project in ML/SE to extract text from a set of 46 scanned PDFs, and then compare them with original .docx files. Though I have a mediocre laptop for work, the program runs quite OK on it, but I don't know what is the minimum requirement for the hardware the client can possibly use. How do you estimate it? [link] [comments] |
doubt in PROLOG exercise (exam tomorrow pls help ;_;) Posted: 07 Sep 2021 05:49 AM PDT I was doing this prolog exercise with constraints where each of the subfunctions that i did seems to work correctly but when i run the whole program it doesn't accept any solution for some reason. We are given a predicate The I did the following code: Where I tested each of the functions sepparately and they all worked correctly, but when i run the program with the predicate (2,Sequence,Cost) it simply returns no. I tracked it and it stops on the first iteration of count, on the last line ( I would really appreciate if anyone could help me here, ty in advance :) [link] [comments] |
How to access a cloud database from a windows forms application? Posted: 07 Sep 2021 12:27 AM PDT Hi everyone! I'm developing a preventive maintenance tool for my internship. Basically, I need to collect machine data, store this data in a DB and then visualize this data. Based on this data the program must send a notification when maintenance is necessary. I would like to host my own cloud server on OwnCloud on a Raspberry Pi on which the database can run. A desktop application (windows form) must then have access to this database, and use this data to create plots, graphs and predictions. Does any one of you have experience in this? Or any advice/ideas? I want to keep costs low, so that's why I want to try hosting my own cloud server first before going to AWS or something similar. Any advice is much appreciated! [link] [comments] |
Posted: 07 Sep 2021 12:09 AM PDT I've recently started to learn python by taking udemy courses. I'm currently in my third year of college (not a CS degree) and would like to get a job that pays decently. so, I'm wondering what skills should I focus on getting better( job focused) at and are there any certificates that you would recommend I take to get easily hired. [link] [comments] |
Posted: 06 Sep 2021 11:30 PM PDT I have a software that accept only .jsx file but i have .xsl file to give input. Is there some way I can convert xsl to jsx file, or can i call xsl file from jsx file, or can i embed the xsl file in jsx file, I don't know both of these language so this thing is really getting in between my work . Help is really appreciated. [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment