• Breaking News

    Thursday, February 18, 2021

    Codecademy premium, worth it? learn programming

    Codecademy premium, worth it? learn programming


    Codecademy premium, worth it?

    Posted: 17 Feb 2021 11:28 AM PST

    So, I am new to programming and been doing JavaScript. I am tempted to buy codecademy pro. Is it worth it in your opinion?

    EDIT: Thanks for all the attention to the post. All of the responses have been amazing help.

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

    How would one go about making a visualizable physics engine?

    Posted: 17 Feb 2021 11:04 PM PST

    I've been interested lately in making my own physics engine,
    I know the necessary physics, I know programming, but I just can't get my head around how I would combine the two things, since every parameter is affected by the other, and I would still need to keep track of the initial stats of an object before it started moving, or otherwise the calculations wouldn't work correctly? (from the way I look at how it would be programmed).
    But this doesn't seem to me like the right way of coding it.

    Just wondered if someone has coded one before or has an idea in mind that could lead me in the right direction.

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

    How deep should I go into learning certain topics?

    Posted: 17 Feb 2021 10:02 AM PST

    I know this question gets asked a lot but but I feel like I haven't seen a good answer that fits with where I am at right now. Im basically wondering how deep do I dive into certain topics Im learning about. Do I just want to understand them for now and learn how to use them or master them later?

    One example is I am taking a course with codecademy and am learning CSS and I am on the position property along with z-index and I understand what they do and I played around with them, but its still pretty confusing to me. If I was asked to do a project using those properties I probably wouldn't be able to do it or if I can, I would spent a lot of time thinking, googling and playing around with it. I feel like it might take up my time when I could be learning the next lesson. Im just wondering when is it a good time to move on, like should I just understand it for now and go back later to master it or focus on it until I fully understand? Thanks

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

    I've learned the basics of Python, now what?

    Posted: 17 Feb 2021 08:48 AM PST

    Having already a bit of coding basics coming from a IT high school, but not coding for 3 years, I've wanted to start learning coding from zero. I've relearned the theory of programming and the basics of Python (arrays, methods, loops ecc...) because I found it fun, flexible and easy to learn. Anyway, what should I do now that I got the basics? I already made some tiny projects as tests (Sudoku solver, guess a number, Tetris, RPG battle, calculator ecc...) but I really don't know what I should do to learn even more about this language.

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

    Any native/fluent English speaker want to learn basics of programming?

    Posted: 18 Feb 2021 12:48 AM PST

    I am a Fullstack software developer with almost 3 years of experience. I mostly working with backend technologies.

    Though I am fluent in communication via text messages, as an introvert I rarely speak lol!
    I thought this is a problem I need to solve. As a developer I will solve it by my own way!

    So I decided to help someone with zero knowledge in programming but a native/fluent English speaker by teaching him/her basic programming via zoom.

    There's no fees at all, consider it as a trade for communication with learning. I can take a session every weekend for 2 hrs long. I am on UTC+6 timezone.

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

    How to handle Patient health information and not get sued for violating HIPPA?

    Posted: 17 Feb 2021 07:48 PM PST

    I am going to be dealing with a lot of Patient health information and I know how delicate dealing with people's information can be. How do I structure my database so that the data is fully encrypted even before it reaches my servers and there's no leak anywhere?

    I have looked into Field Level Encryption on Mongo and feel like it could be the right approach.

    Edit - HIPAA

    Edit 2 - I am working for a team that is developing a telehealth-type web app where people can consult medical professionals for non-life-threatening issues.

    We don't plan on holding the data forever, it's only going to be available for the doctor to see and after the patient disconnects from our platform. we plan to discard it completely.

    Edit 3 - To give more context We aren't getting any PHI from anywhere, Not through another business, not through patients. The patients are just telling us how they are feeling at the moment. We don't ask for health insurance info nor care about their medical records

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

    Questions About Matchmaking on a Web Application

    Posted: 17 Feb 2021 07:47 PM PST

    I have been looking into starting a project sometime soon, but there isn't a ton of resources on it and I figured I would reach out to see if anyone knew anything. I want to make a video game matchmaking system in a web app. This would match two users on the website for example: You would log into your account and hit "Find Match" It would then prompt you with another user in the same queue. What is the best way to implement this? I have looked into matchmaking platforms but they all seem to tie in with gameservers, and teams, etc. I would want this to just present the user's with eachothers usernames.

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

    From a Beginner to Beginners: From print('Hello World!') to Tutorial Hell to Getting my First Job!

    Posted: 18 Feb 2021 12:37 AM PST

    Hello all,

    It finally happened! I became employed as a Data Engineer after self studying Python for around 8 months and SQL for around a month or two. For reference, I'm based in the UK.

    I lost my job as a traditional scientist around August last year and had been at the mercy of a company doing data science/engineering incorrectly (overfitted models, zero subject matter expertise, dog shit data). So, I took it upon myself to teach myself and prove they were doing it wrong. Little did I know, I ended up discovering something I really enjoyed - making sure everybody is getting the right data.

    After around 2 months of applying for jobs, I was contacted out of the blue by a company's HR department which was local who were looking for somebody to join their team as a Data Engineer. This was pretty much nothing to do with my skill level and was 99% luck and being in the right place at the right time as the technical questions weren't as hard as other roles and the role itself is very new in the company. I say nothing to do with my skill level because I really don't think I'm qualified for this job yet. I also happened to be interested in a field which is popping off at the moment, so entering a market into a huge demand definitely contributes to success.

    I had a total of 5 interviews:

    • Data Engineer (webscraping)

    • Python Developer/Consultant (I still don't really know what this job is, I took the interview because it was an interview)

    • Test Automation Engineer

    • Data Engineer (business intelligence)

    • Data Engineer (financial services)

    All of that aside, I think it's worth going over some stuff which might useful. A lot of the skills in the learn programming subreddits are often a technical discussion and help. Even from a science background there's a lot of similarities in the job search - the assumption good skills alone are enough to land the job. Unfortunately, due to an influx of anybody being able to call themselves a recruiter, job hunting is definitely another skill that all programmers looking to get their job should learn in order to navigate getting strong armed into less than desirable positions for less than desirable conditions.

    I was unemployed back in the tail end of the 2008 financial crash as well and, over time, I realised having the experience of job hunting and dealing with job specs, interviews, offers, recruiters was extremely helpful. I completely understand that a lot of people in here may have never been in full time employment before so I thought it'd be useful to highlight what's still relevant:

    Culture, Prospects, Location, Money

    I would say these are pretty much the things that should drive your decision to get a job.

    • You want to work with fun, decent people in a place which don't think you're a robot.

    • You want a job which can either take you places at that company or kick start your career.

    • It has to be somewhere you don't hate living.

    • You want to get paid fairly.

    Of course, not everything is set in stone and it's very much recommended to decide what you skimp on. I'll echo something I learnt in science - offering to be paid less than the market value might help you now, but really hurts the industry as a whole. Know your worth and stick to it.

    For reference, here's the lowdown on a job I turned down vs the job I accepted:

    Turned down:

    • Recruiter constantly asked me the same questions over and over again (is the location okay because you live far away and are you sure you have experience using Python to which I answered yes)

    • I did 3 interviews for them. First stage was a classic verbal interview where the director literally left on the minute of the time we had allocated for the interview, cutting me off mid sentence. Second stage was a technical task which I received feedback of "not being great" (this was because it was below the level of a developer. At no point did I say, or suggest, I was at a developer level. I was also applying for a junior level role) although invited me back for a third interview. Third interview was a series of quick fire technical questions with right/wrong answers. This whole process took 5 weeks.

    • Spent another 2 weeks telling me they were still looking at other candidates. So we are at 7 weeks for an interview process.

    • Threw me an offer mid week and wanted me to start Monday.

    At the beginning, I was so excited for this job although over time began to despair that this is the only job I might get. Took all of this shite on the chin anyway and began planning my exit strategy. Fortunately, a different job came through:

    • Interview was carried out as a HR staff member found my CV directly on LinkedIn, emailed, and called me to schedule an interview.

    • Manager was extremely personable and interested in hearing my motivations, giving me plenty of time to express myself. Also over ran the interview by ten minutes as we were getting along. They called me back on the within two hours to arrange a second stage interview.

    • Second stage interview was with said manager and the analytics director. Same format of being relaxed and asking a mix of scenario and experience based questions in order to see my approach to solving problems rather than how well I knew the documentation. They also took the time at the end of the interview to get to know me more which was a really positive sign.

    • I was offered the job about 3 hours after the second stage with an explicit instruction I'll be mostly working from home for the forseeable future and my start date will be at the very earliest in two weeks.

    • This whole interview process took one week.

    The relief and joy I experienced when I got this job was immense and made me realise that being desperate is a dangerous thing.

    Know What You're Looking For

    Googling is a highly underrated skill and it can be pretty crazy seeing people who are amazing at Googling for solutions to programming problems although completely forget all of that whilst job hunting.

    What not to search for:

    • Software developer jobs london

    • Software engineer jobs wales

    These are honestly the worst things you can search for because they will give you every result for every language and you'll spend a lot of time sifting through shite you don't want to apply for.

    How you should search:

    • Language + developer/engineer/general job title + location + jobs

    • e.g. javascript front end developer new york city jobs

    Sometimes, It's Better to be Lucky Than Be Good

    I mentioned earlier getting the position I did was not about skill and more about being in the right place and that's something I want to touch on here.

    In the end, as self taught programmers, university graduates, and people looking to change careers, all we want is a chance to prove ourselves. In order to get that chance, you might have to face a few rejections and apply for stuff you might not necessarily be qualified for right now. Although, if you honestly believe it's a job you can do given some time and training and you want to prove that, then every time you see a job application, just send your CV/resume in. It doesn't cost anything and the worst thing that happens is they say no and you aren't ready yet.

    Mindset whilst jobhunting is just as important as technical ability because with a weak mindset, you'll never get the opportunity to show what you're really good at.

    I hope this was useful to somebody and good luck with everybody also looking to get their first job.

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

    What front end should I use?

    Posted: 17 Feb 2021 10:14 PM PST

    I understand there's no one answer to this, however I'm a sys admin and I'd like to create a site for my users where they can go as a self service tool for a few tasks. I'd like to be able to display status of active DNS entries and potentially click a button to call powershell scripts that make dns updates to change those records to a preset A, B, or C value. I'd like to be able to use the front end as a form to provide values to existing bash scripts to accomplish certain tasks and I'd like the front end to have an up to date sdk to make aws cli calls to perform other tasks. I'd like to have some authentication with a federated AD to grant rights for some of these tasks. I saw some Blade templates for laravel that might be a good starting point, but then I saw other comments that the AWS cli integration for PHP isn't current, so it didn't seem like a great place to start. Open to all suggestions.

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

    I'm new to canvas in html need helpif possible

    Posted: 17 Feb 2021 10:02 AM PST

    So I'm doing little exercise of making an image bounce inside a canvas.I found how to do it with a drawing but with and image I'm lost. Could anyone help me? Thank you in advance. and could be possible to rotate the image when its coming back?

    Javascript

    var canvas, context, x, y, velocity; function empezar() { canvas = document.getElementById("myCanvas"); context = canvas.getContext("2d"); x = 5; y = 5; velocity = 10; } function move() { canvas.width = 500; canvas.height = 500; x = x + velocity; if (x + 50 > canvas.width - 50 || x < 10) { velocity *= -1; } draw(); } function draw() { /* context.fillStyle = "#FFFFFF"; context.strokeStyle = "#000000"; context.lineWidth = '3';*/ const img = new Image(); img.src = "../imagenes/yasd.gif"; img.onload = () => { context.drawImage(img, 0, 0); }; context.fillRect(x, y, 50, 100); context.strokeRect(x, y, 50, 100); } setInterval(move, 100); 

    And this is the html part

    <canvas id="myCanvas" width="500" height="500"></canvas> <button onclick="empezar()">asdf</button> 
    submitted by /u/Gullible_Macaroon153
    [link] [comments]

    What would you learn to become a “front end engineer”

    Posted: 17 Feb 2021 09:19 PM PST

    A front end engineer for a video game needs C++. For web, react and JavaScript.

    What should I learn to apparently have the happiest job on Glassdoor? www.cnbc.com/amp/2020/01/15/the-20-best-jobs-in-america-in-2020-according-to-glassdoor-ranking.html

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

    How to become a programmer, move to the US, and get a dream job. Step by step guide.

    Posted: 18 Feb 2021 12:50 AM PST

    Are you curious about what you need to do to earn more than $15.000 a month, drive a Tesla, live in sunny California, and work at Google, Apple, Facebook, or Amazon?

    Hi everybody! Like many others, I am a programmer from a developing country. Now I live in Silicon Valley and work for Google. I didn't have rich parents, I didn't have any special talents, and I didn't win a green card. In this article, I want to share the most useful tips on how to become a programmer, move to the United States, and get a dream job.

    Step 1: How to Become a Programmer There is a very widely held opinion that to be a programmer, you need some special skills, or better yet, a deep knowledge of Mathematics. It is complete nonsense, everyone can learn to program. Another common misconception is that everyone must have a passion for programming. It is better to set aside personal excitement, because programming is, in the first place, a way to make money.

    Choosing a programming language The main criteria for choosing a programming language: relevance and ease of learning. It is also important to consider personal preferences.

    Programming languages and areas of application:

    • Swift, Kotlin - Mobile development for iOS / Android
    • JavaScript - Websites and Web applications
    • Java - Backend and server applications
    • Python - Machine Learning, Data Analytics, Backend and Web applications

    Learning The best option is video tutorials on YouTube. Of course, it is not enough just to watch videos, you will also need to do practical exercises. Online and offline programming schools are alternatives to video courses.

    Do not entertain the fantasy that you can easily learn how to program in 3 months, most likely you will need about a year and a lot of patience.

    Create your own project Once you have the basic programming skills, it's time to put them into practice. Think of a simple project that you would like to use yourself and build it. Later you can mention this project in your resume.

    Finding your first job as a programmer It is important to start working as a developer as soon as possible, as this will accelerate your professional growth. The first thing you need to do is to prepare a resume based on the programming language you have learned and a personal project.

    Next, you need to start sending out your resume massively on job board sites. You should be prepared to receive dozens of rejections. It is worth paying attention to internships - this is a great way to get your first real development experience.

    You can't pass an interview without preparation. If you want to get an idea of what questions to expect. I suggest you check out Devinterview.io It is a curated list of 3800+ full-stack, data structures, algorithms, and software architecture interview questions and answers for developers.

    Career and work experience You'll need to learn a lot of new things and write a lot of code over the course of your career. Don't be afraid to change jobs if you feel you are not growing at your current company. If you're not already in one of your local largest cities, it's worth considering moving to one of those locations.

    Step 2: Getting a job at an American tech company In general, American companies are not super interested in your work experience outside of the United States. For example, I sent hundreds of resumes and ended up with only three interview opportunities.

    What you will need

    1. English language. You need to understand what you are being told and be able to speak yourself, without these skills you cannot pass the interview. Grammar is not particularly important.
    2. A university degree, preferably in Information Technology. Lack of a university degree greatly reduces the number of options. A part-time degree is okay, for example, my part-time degree was equated to a master's degree in the U.S.

    Preparing for a job interview In order to get an interview at a US tech company, you need to be good at solving problems on algorithms and data structures. To learn how to do this, you need to master the basic theory and practice a lot. This will greatly increase your chances of getting a job offer. Additionally, it is worth preparing for questions on agile skills and an interview on information systems design.

    Job Hunt The strategy for finding a job in the U.S. is quite simple: check for new job openings at glassdoor.com every day and send dozens of applications. It does not matter which company you are going to move with, the main thing is to move because after you move you will start to be as actively invited for interviews as you would be in your country.

    Additionally, you should pay attention to positions at European offices of American IT companies. After working in a European office for a year you can move to an American office.

    Interview Usually, in order to get an offer, you have to go through several rounds of interviews.

    First, you talk to a recruiter on the phone. He will clarify the information from your resume and check your adequacy. If you are a good fit for the job, you will be scheduled for a technical interview via video call, during which you will need to solve an algorithmic problem. Then a technical interview at the company's office. You will have 4-6 rounds of algorithmic problem solving, information systems design, and agile skills.

    Step 3: Life in the United States If you have successfully passed your interview and if you have no problems with getting a work visa, you can pack your bags and fly to the USA.

    Salary To check out current salaries in US tech companies, visit the website levels.fyi. Senior developer salary at Google, Apple, Amazon, Facebook starts at $300,000 per year before taxes (salary + stock + bonus) or around $15,000 per month after taxes. Your salary will increase further with a baseline raise and new equity stakes.

    Health insurance US tech companies provide good health insurance for their employees, which covers most medical services.

    Rent Rental prices in Silicon Valley are around the following levels: a good one-bedroom ~70 m2 apartment will cost $2,000 - $3,000, a two-bedroom ~100 m2 will cost $3,000 - $4,000.

    Loans The US has very low-interest rates on loans. For example, you have $50,000, for that amount you want to buy a Tesla Model Y, but instead of buying the car with cash, you take a loan at 2.25% and invest the $50,000 in an S&P 500 ETF or Bitcoin. It's a pretty similar situation with mortgages.

    Vacations and Holidays. Typically, companies provide 3 weeks of paid vacation. The longer you work for the company, the more vacation time you get. It is worth mentioning that in the USA an 8-hour working day includes lunchtime, i.e. you must formally spend 8 hours at work, not 9.

    The advantages of living in the United States (California)

    • High income, even with rent and taxes.
    • Virtually unlimited career growth opportunities.
    • Great climate, sunshine up to 12 months a year.
    • Almost no gloomy, bitter, or angry people.
    • Beautiful nature, lots of national parks, variety of leisure activities.
    • No sexism.

    Thanks 🙌 for reading and good luck on your next tech interview! Explore 3800+ dev interview question here 👉 Devinterview.io

    submitted by /u/Natural-Tiger-7201
    [link] [comments]

    Question on adding Unit Testing to a simple front end web site?

    Posted: 18 Feb 2021 12:38 AM PST

    I am currently teaching myself JS unit testing. I feel one of the best ways for me to practice would be to add unit testing to some of my existing projects. A while back, when I was starting out, I wrote a simple salary calculator (here it is on GitHub).

    I feel this would be a perfect project for me to add unit testing to. However, this project has a very no-frills and traditional structure - a core directory, which has a html file, a css file and js file. It does not use anything like Node, React or NPM. From my research I am getting the sense that unit testing is not compatible with such a no-frills structure. For example, I can see that React projects built using create-react-app comes with Jest out of the box, while Mocha uses Node.

    So what do you think is the best course of action in order for me to be able to add Unit Testing to my salary calculator? Should I refactor the project so it is built in react, and then use Jest? Or should I refactor the project so it is built with Node and npm, and then use Mocha? Or does there exist a way I can introduce Unit Testing to my project as it currently exists in its old-school simple html-css-js file structure? What would be best practice?

    Thanks for your help.

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

    Why use http over https in node.js?

    Posted: 18 Feb 2021 12:35 AM PST

    My understanding of it is that https is generally more secure than http. If that's the case, why do a lot of examples use require('http') instead of require('https')? When would I use which?

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

    def get_upper_case_before_and_after_letter(letter)

    Posted: 17 Feb 2021 08:46 PM PST

    def get_upper_case_before_and_after_letter(letter) result = []

    letter = letter.lower() for capital in capitals #capital is a list of capitals lst = list(capital.lower()) if letter in lst for i in range(len(lst)): if lst[i] == letter: lst[i-1] = lst[i-1].upper() if i+1 < len(lst) and lst[i+1] != letter: lst[i+1] = lst[i+1].upper() result.append(" ".join(lst)) return result 

    In this code when i run it gaves me all capital except letter I gave in parameter. When i run this code i get the write answer:

    result = []

    letter = letter.lower()

    for capital in capitals #capital is a list of capitals

    lst = list(capital.lower()) if letter in lst for i in range(len(lst)): if lst[i] == letter: if lst[i-1] != letter: #by adding this line lst[i-1] = lst[i-1].upper() if i+1 < len(lst) and lst[i+1] != letter: lst[i+1] = lst[i+1].upper() result.append(" ".join(lst)) return result 

    By adding that one line code (if lst[i-1] != letter) I get the write answer im surprised how? It is just to check not to make upper case it its same as letter. But when i add that it gives me only upper case the letters which is before or after (letter) which is given.

    If i do not add that line it returns all letters upper except the letter is given in parameter

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

    If I had to Bite-The-Bullet & Learn Just One, VIM, or Emacs? Resources are Welcome!

    Posted: 18 Feb 2021 12:27 AM PST

    Sorry, if I inadvertently start a Turf War!

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

    Would you say a certain personality or inherent talent is necessary to become a good programmer?

    Posted: 17 Feb 2021 10:56 AM PST

    Hi!

    I have a bachelor's degree within humanities (rhetoric) and consider doing my masters degree in it and cognition.

    To make a long story short, I really miss quantitative methodology and science and basically dread text analysis focusing on close reading one specific artifact/speech for several weeks. The master's degree I'm considering is focused on cognitive computing and while it does contain courses in programming the main focus is on cognitive science and knowledge about programming rather than actual programming.

    However everyone seems to try to talk me out of it. I would argue, that the primary belief they have in common is that anything sciency is to difficult for me, apparently because science is only for people who are somehow inherently good at it.

    I think I'm fairly normal when it comes to intelligence and learning capacity, maybe with a slight strenght in language abilities (English is not my mother tongue)

    Would you say I should be worried about my ability to learn programming?

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

    How do I select all the input buttons in a form

    Posted: 18 Feb 2021 12:23 AM PST

    I cant figure out to CSS select a group of buttons, any help would be appreciated. Hopefully I am not doing anything stupid.

    <body> <div class="container"> <div class="content"></div> <form class="check-form"> <input id="zero" type="button" value="0"> <input id="one" type="button" value="1"> <input id="two" type="button" value="2"> <input id="three" type="button" value="3"> <input id="four" type="button" value="4"> <input id="five" type="button" value="5"> <input id="six" type="button" value="6"> <input id="seven" type="button" value="7"> <input id="eight" type="button" value="8"> <input id="nine" type="button" value="9"> <input id="add" type="button" value="+"> <input id="subtract" type="button" value="-"> <input id="multiply" type="button" value="x"> <input id="divide" type="button" value="÷"> <input id="decimal" type="button" value="."> <input id="equal" type="button" value="="> </form> </div> </body> Css .form-submit-button { position: absolute; top: 20%; left: 20%; border: none; user-select: none; outline: none; background-image: none; cursor: pointer; background-color: Green; } // I tried using the id name for the form but that obviously didn't work. The Css selector I have now ".form-submit-button" is also not working. 

    Thank You.

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

    Naming the resulting dataframes for multiple Excel files.

    Posted: 17 Feb 2021 06:24 PM PST

    Hello. I have a list of Excel files, such as

    • October, 2020 _ A.xlsx
    • October, 2020 _ B.xlsx
    • November, 2020_A.xlsx
    • November, 2020_B.xlsx
    • December 2020_A.xlsx
    • December 2020_B.xlsx
    • January 2021_A.xlsx
    • January 2021_B.xlsx

    Ideally, when everything works the way I want to, I am expecting to see one Excel sheet that combines the data from above Excel files. Perhaps, that will be called "October, 2020 ~ January, 2021".

    I already have the program that processes the raw data from individual Excel files.

    I am trying to write a for loop so that processing can be done for individual Excel files.

    At the moment,when the said program is executed, the output dataframe is titled "A".

    ( It's named more descriptively than that but simply calling it "A" will do for the purpose of this post).

    My question is... how do I name these resulting dataframes?

    I will show you the specific lines of codes I have so far.

    os.chdir('file directory where the files are located') file_names = os.listdir() for file_name in file_names: A_substring = "A" B_substring = "B" date = file_name[{appropriate indexing to catch the date info}] if A_substring in file_name: start program A output is dataframe titled A elif B_substring in file_name: start program B output is dataframe titled B 

    Essentially, I believe what I am asking is how do I rename the dataframe's name?

    I tried Googling some time and it seems like I can only change the name of either column or index.

    If then, am I suppose to export these resulting dataframes into Excel files first and then write some more lines of code for compiling the Excel spreadsheets?

    Please tell me how to solve this part in a clever way.

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

    what does node*next do in linked list? C++

    Posted: 17 Feb 2021 07:42 PM PST

    Hello everyone I've been trying to wrap my head around with linked list so far I dont undestand the node* next in the struct node.

    #include <iostream> using namespace std; struct node { float val; node *next; }; void print(node* head) { node* a = head; while(a != NULL){ cout << a -> val<< endl; a= a -> next; } cout << a->val<< endl; } node *p = NULL; int main() { p = new node; (*p).val = 2.0; (*p).next = NULL; (*p).next = new node; (*(*p).next).val = 3.0; (*(*p).next).next = NULL; (*(*p).next).next = new node; (*(*(*p).next).next).val = 4.0; (*(*(*p).next).next).next = NULL; print(p); return 0; } 

    The part i dont get node itself is the name of the struct, which in the struct we are calling the struct again? or is node its own data type?, i suppose node is not its own data type since if i change the struct name to something like "hello" the code wouldnt work, that would mean "node" is a struct. If it's a struct then how can we insert it with a value inside of it ?

     (*p).next = NULL; (*p).next = new node; Should I just accept this as it is what it is or is there an explanation inside of it? 
    submitted by /u/S0ULBoY
    [link] [comments]

    ASP.NET MVC 5, trying to find user by id using DbSet<User>.Find(id) and it is expecting a string

    Posted: 17 Feb 2021 10:20 AM PST

    So I was using a repository pattern for my database, and it all worked. I was told that this was not the correct way so I got all of my controllers to directly go to ApplicationDbContext.

    I get this error when I navigate to the Details() page:

    System.ArgumentException: 'The key value at position 0 of the call to 'DbSet<User>.Find' was of type 'int', which does not match the property type of 'string'.'

    code here:

    https://gist.github.com/Alexander-Mages/0cc60da2209b9bc4ac6699612403544a

    Any help would be appreciated, I've been trying to figure this out for a few hours to no avail

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

    Which language should i use?

    Posted: 17 Feb 2021 11:14 PM PST

    I want to code an executable program that can do something about copying file from one place to another in Windows. Like, when i click this program i can transfer my file from desktop to another folder. Is that even possible? Thank you so much.

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

    Validations

    Posted: 17 Feb 2021 11:13 PM PST

    Hello,

    Personally i dont like excessive validations. I mean, i would put valodations only at the places where i really can expect something to not be right (null for example). But everywhere else i would assume the objects are valid.

    On the other hand, some people add validations everywhere, in every method, constructor and sometimes even double validation. For example method that calls a constructor - in the beginning of method it validates parameters not null and then the very same parameters are validated in the constructor for being not null. I understand that those are two different contexts, but still.

    My understanding is that all code that is written should be eventually called, so i would never do a double validations. Also it makes the code very cluttered with validations code. And also it hinders reasoning about the code possible states when you see some checks that never come out true.

    I know in effective java there is a recommendation to not add null checks, but i dont like it personally, unless you dont have control over where the code is called.

    Any ideas, advise?

    Edit: to make sure, i am not saying validations are bad, what i am saying is that say you have methodA with argument x. The method calls methodB, then it calls methodC and everywhere parameter used for argument x is passed. So what i would do is to only validate x in the first method and only if its reasonable to assume that x could be invalid. But not validate argument in all subsequent methods as well (because its unreasonable to think that parameter would be invalod at that point).

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

    TABLE DESIGN: Is there any generally accepted principle for keeping data in ONE table vs META tables?

    Posted: 17 Feb 2021 07:17 PM PST

    Hello!

    This has bugged me since I started programming.

    I am designing a software that tracks a list of business locations. We have a "locations" table. However each location only have maybe 5 mandatory fields such as address, zipcode, state, country - etc but then 50 various optional fields that are not critical so I don't think we need a column for all of them.

    How do you determine whether to keep optional fields in a separate meta table vs in the table itself? For example - I really like WORDPRESS' post table and then the separate meta table, super easy functions exist to add, update, or get meta. But I'd think in some cases it may not make sense! How do you decide?

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

    No comments:

    Post a Comment