• Breaking News

    Wednesday, December 25, 2019

    Why would I ever want a single element tuple (python)? Ask Programming

    Why would I ever want a single element tuple (python)? Ask Programming


    Why would I ever want a single element tuple (python)?

    Posted: 25 Dec 2019 11:22 AM PST

    How to automatically close a .bat process after closing a different program.

    Posted: 25 Dec 2019 04:16 PM PST

    So I am a windows command line novice, I know enough to google what commands I need and assemble a basic .bat file, but I couldn't find an answer to this one.

    I want to add Forza Horizon 4 to my Steam Games. But being a Windows Store App, it doesn't have an executable to add via Steam. A workaround was provided here:

    https://www.reddit.com/r/forza/comments/4i3mb9/quick_guide_add_forza_apex_to_steam/d2vhkt9/

    This workaround involves a .bat file. Specifically this one. (Switched the shell to Horizon 4 instead of Apex)


    echo off cls cmd /r start "" "shell:appsFolder\Microsoft.SunriseBaseGame_8wekyb3d8bbwe!SunriseReleaseFinal" pause 

    Annoyingly, this leaves a command prompt window paused, which means when you exit the game, you must exit the command prompt as well, otherwise Steam will think you are still in game.

    Is there anything that can be added to this .bat file so that, when I exit Forza, the command prompt window exits as well?

    Any help would be greatly appreciated, thank you.


    EDIT: To clarify, I want the command prompt to be open while Forza is running, and to automatically close when Forza does. This way Steam registers the game as running. If we remove the pause the prompt will close immediately after launching the game.

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

    Laptop recommendations for programming

    Posted: 25 Dec 2019 07:42 AM PST

    What are your laptop recc. for the purposes of programming and personal use. Also what are you currently using. Budget - around $500.

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

    Dont know how to start the next part of my project

    Posted: 25 Dec 2019 09:06 PM PST

    I worte a lagnton ant cell automata in python right now is a command line project. I would like to make this a visualization app on the web,(maybe add some extra functionalities and then add some other cell automatas). Im a beginner and never used a Framework and Im trying to learn Django along the way. The problem is im just stuck and cant seem to make the first step cause I just dont know.

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

    Help needed with an Arduino error code.

    Posted: 25 Dec 2019 04:37 PM PST

    I was writing code for a melody, everything was going fine for quite some time and I even tested the code around 50 times as I was adding more notes in but then an error popped up.

    It says

    "exit status 1

    expected '}' before numeric constant"

    This error message popped up when I clicked upload on Arduino on the 'pitches.h' tab - previously everything was fine.

    It also highlights the bit where it says "#define NOTE_C5 523" for some reason when it displays the error.

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

    Why does this work? (A question about pointer to pointers...)

    Posted: 25 Dec 2019 09:33 PM PST

    CODE: int** WeightedQuickUnion(int n) { int* id = NULL; id = new int[n]; int* sz = NULL; sz = new int[n]; for (int i = 0; i < n; i++) { id[i] = i; sz[i] = 1; } int* arr[] = { id, sz }; return arr; } 

    When I tried to make arr of type int**, I got a return error. But when I changed it to int*, the code worked exactly as I intended. How is this so when the function is of type int**?

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

    Storing Data from Web scrape

    Posted: 25 Dec 2019 01:52 PM PST

    So I'm working on a side project (mobile app) where I am scrapping the web for menu items. However, I dont want to scrape the web every time I want access to the menu items as it unlikely the menu has changed within a day. I'd like to scrape once a day and then store it somewhere to be easily called.

    Should I learn how to use SQL or is there an easier way to go about this?

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

    Projects

    Posted: 25 Dec 2019 06:20 AM PST

    How do you guys go about finding projects you want to work on? Because I find myself having knowledge of all these concepts I learned in class but never knowing how to go about applying them outside of class on personal projects. People mostly tell me to look for something in my life I want to automate, but honestly there really isn't one. Like I don't know where to start from. Any advice?

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

    Need advice for a personal project

    Posted: 25 Dec 2019 02:17 PM PST

    Hello fellow programmers, I'd need some advice on where I should begin with a personal challenge I thought about.

    I want to create my own site-blocking software/script/whatever serves this purpose in the best way.

    I studied IT and programming, got all the basics for multiple languages such as C, C++, Powershell, C#, Java, JavaScript.

    I'd like to know if anybody knows what would be the best language and way to start this project, the goal being the software/script being silent and allowing monitoring.

    Note : this is NOT for malicious purposes. I do NOT want to try or condone spying or keylogging in any kind of way. This project is only for my own use, on my own computer, because I'd like to try to create my solution because I'd like to know how it works.

    I would understand if nobody wants to answer since it could potentially lead to other using the answers for malicious purposes. Just let me know if it doesn't really suit this sub, and I'll remove it without any questions.

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

    Web Java and Desktop Python

    Posted: 25 Dec 2019 05:19 AM PST

    Hey guys,

    over the last 4-5 months I have taken up programming and have played around with a lot of stuff and am starting to get pretty good at it, however, now that I know my way around python and Java, how do I translate that stuff into say web or desktop app development? particularly desktop for python and web for java? I am kind of at a freeze point wherre i dont know how to do what I want to do.

    Thanks, Jonah

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

    Using MySQL EF Core 3.1 Issues!

    Posted: 25 Dec 2019 08:59 AM PST

    Hi guys

    Im currently setting up a database connection to a side project and i have serious issues connecting to my database.

    My "DbContextOptionsbuilder" UseMySql connection string looks like this: optionsBuilder.UseMySQL("Server=localhost;Port=3306;Database=myDataBase;user=root;");

    however when i try to add my initial migration i get this issue:

    Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.

    What could cause this, anyone have experienced similar issue with version 8.0.18.0 MySQL for ef core?

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

    Am I being ambitious or is this feasible for a beginner.

    Posted: 25 Dec 2019 08:24 AM PST

    Merry Christmas you wonderful people!!

    I am currently undertaking a project as part of you final year at university.

    I intend to use C# to automate the analysis and design of a simple frame.

    The process is as follows:

    • output simple frame info (contained within Revit model) using Revit API

      • input this info into SAP2000 using SAP2000 OAPI
      • iterate this process with different materials / cross section size
      • select the best and input the info into Revit

    My questions are as follows:

    • Am I kidding myself that this is feasible in half a year with minimal coding experience with Python and 0 experience in C#?

    • will I need to start a database or will variables/ array's be enough for a project of this size? If so, how do I go about creating and using a database

    • within C# would you anticipate this to all be one "project" file, with a few classes and many methods? Or can you combine multiple methods?

    Sorry this is about of a long read, I appreciate any replies and feedback from anybody! Also, if anybody has a idea of how to write/ structure this code it would be appreciated.

    Have a lovely holiday season!!

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

    [HTML CSS JS] Is there any other way of scaling text with the window, besides SVG viewBox and @media?

    Posted: 25 Dec 2019 07:26 AM PST

    Merry Christmas guys!

    I've been at this for days.

    The problem I have with SVG is that I am not sure whether my code is legit and it looks sucky and wrong. And people say SVG takes a lot of processing power. I was gonna use it for 3 buttons, but then I remembered that I would also like to scale A LOT of data, like, a whole table, so SVG would be bad.

    On the other hand, just making a main font size in body, and have everything else "em", so they adjust to this main size at all times, and then have @media to resize the main font ... that would be A LOT of @ media if I wanted to make it really nice and have it scale pixel by pixel, and it would be hard to maintain the window to font ratio and I would have to look at how big fonts are at certain sizes.. etc...

    I solved the aspect ratio problem via this w3schools tutorial and I intend to make my body like that and everything else in it relative. I don't understand why I need position:relative in this example to be able to write text inside. That's weird.

    So anyway, my goal is to scale text and stuff with the window or main container which has an aspect ratio, and have it all work ok. Goal is so the 16k bros don't have to squint.

    Tnx!

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

    [HTML CSS] How to give an aspect ratio to <body>, and have it resize depending on which side of the browser window is touching it?

    Posted: 25 Dec 2019 04:08 AM PST

    Hello!

    I tried https://www.w3schools.com/howto/howto_css_aspect_ratio.asp , but there is a lot of css fiddling to just even put simple text into the container. I want my whole website to live in the conteiner, with everything being a percentage of h and w of the parent container, so I hope there is a better way.

    In the examples, the main thing is the window width, but at some point ,the width will be too big, and keeping the aspect ratio of the content, the content will overflow below the bottom of the browser, and a slider will appear. I want the aspect-rated <body> tag to always be inside the view of the browser, so if we stretch it horizontally, but the height is too low, the content will remain 100% of the height.

    I also want minimum window sizes, below which the content will remain at its minimum allowed dimensions, and the window will get sliders . This is some kind of safeguard so the user can still use the stuff even if he messes up.

    I know it's christmas, and no one is online, but I just can't chill when there are things bothering me

    Tnx!

    EDIT:

    Maybe I didn't describe it too well, so here is a picture of what I want

    Thank you!

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

    How can I learn the finer points of Git?

    Posted: 24 Dec 2019 11:20 PM PST

    I have a pretty good basic working knowledge of Git; I'm comfortable creating new branches, and merging them back into master when I've completed a feature. But every so often, I'll screw up a branch in weird ways. It usually happens because of slightly non-standard use cases, like a colleague has asked me to finish off a feature they've been working on, or somebody else has force-pushed, and I accidentally push the old version back over theirs.

    But every time I try to actively learn Git, the tutorials are either way to basic, like setting up a repo, or advanced in a conceptual sense, like what data structures it uses under the hood. What are some good resources that will help me practically learn to use Git without making stupid mistakes?

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

    Does Experience really matter? If so how much?

    Posted: 25 Dec 2019 01:18 AM PST

    I was in an interview and we were talking about experience. They wouldn't consider me for a position in the company because they didn't think I had enough experience. Now I've got to thinking. Does experience matter and if so how much does experience matter?

    I've had three programming jobs I consider myself a mid level software engineer. The first company I joined was writing in PL1 and I didn't even know the language existed nor did I know credit union software was a complex thing. Second job was in C# and the Microsoft technology stack. I had written personal projects in c# and using Microsoft technology stack and yes it helped, but not all that much. I think it just made certain things faster than others because I could pull my personal projects up and readily available examples of what I was suppose to do. Third job was writing in c++, perl and bash. I wrote in c++ when I was in college and high school. Played around in bash, but nothing significant and never wrote in perl. I was writing software to test microchips. Again I knew they did need to be tested some how, but I didn't know how and had no idea it was as complicated as I learned on the job. The experience working has helped me in my career, but I can't say how much. If I had to pick something it would probably be the first job really drove home the point of code review and that followed me along in my career. I can be a real sticker and a real asshole sometimes during code review.

    Experience in these positions didn't really start to help until I had joined the teams and learned how they write code. How they have the code bases laid out and what they actually do. As time went on and the more time I spent on the team and in the code base then experience really helped. But as an outsider looking in my experience really didn't help me.

    I started to think about open source projects. There's probably not an open source project that I couldn't join and contribute to in a meaningful way. I'd have to figure out the code base and I'd have to learn the code check in process and all that but I feel confident that I could work on any one of them and be successful.

    The funny thing about open source projects is that anyone can start working on them when ever they want. Open source projects don't care about a persons skill or ability. If someone wants to contribute to an open source project I'm sure the project owners would be thrilled to have them and they would let them work on whatever they wanted including their most hardest and most sought after features. They would have to go through the code check in process and make sure the code works but as long as it does then their code will be what goes into the project.

    What do open source projects value? Do they value skill or do they value how much you contribute to the project?

    If you work for a company its all about skill and politics. They aren't going to give you the job unless they think you have the skill and experience. You're not going to get the most sought after feature stuff unless you prove yourself that you are capable of doing it. And in some cases you won't get the sought after features because they know that those features can make a persons career and if you are not favored for it then you don't get it. It's all about preceived skill and experience and who you know.

    Another thing I've recognized is that when I go to code camps and developer meetups I will generally favor the talks that talk about things that are agnostic to languages and frameworks. I'm more interested talks about software development, career progression, user interfaces that make me a better software developer because I feel confident that I could learn a particular language, framework, or whatever. It also doesn't help to learn it now because I'm probably not using it now and I'm going to forget if I don't use it on a regular basis and by the time I get around to using it on a regular basis it will probably have changed. Every language, framework, library always updates over time.

    In software development there's a ton of ways to do the same thing. There's no right or wrong way of doing things. As long as you get the job done, team is happy with the code and your client is happy no one is going to care. Most developers do not write code the same way. A lot of developers have a certain style they like to do things with certain tools like text editors. I don't think that there's a whole lot of places that write the same code and have the same processes for doing it. If you're Microsoft and have millions of clients they probably have a lot more processes and procedures than a small shop with a couple clients.

    The people I like to work with is the people who really care about the programmer who comes after them. They put really good notes in cases and write good code so that I can understand it so it makes it easier for me when I have to modify it. The next quality I like is people who actually push code. I don't want to be the only person pushing usable code and doing all the work. The last important quality is people who like to talk about their code problems. Just talking about a problem with someone helps me figure out the problem. These skills would improve with experience, but they aren't really language specific programming experience skills.

    I would say that it really doesn't matter from a person joining a company. No matter where you came from you still have to learn the new company's product, the process in which the team does things, and how the code base is laid out. Your success will be based on how well you can work in that environment. The skill and experience come after you've spent time learning the code base, the team processes and the product.

    What do you think?

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

    No comments:

    Post a Comment