• Breaking News

    Sunday, March 22, 2020

    What have you been working on recently? [March 21, 2020] learn programming

    What have you been working on recently? [March 21, 2020] learn programming


    What have you been working on recently? [March 21, 2020]

    Posted: 21 Mar 2020 09:04 AM PDT

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    I don’t know who needs to hear this, but take a break from coding when something isn’t working and come back to it later! A fresh perspective can help a lot!

    Posted: 21 Mar 2020 10:41 AM PDT

    I'm not a pro level programmer, I'm new and learning and find this to be very helpful. Just wanted to share.

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

    Learning without a clear goal in mind?

    Posted: 21 Mar 2020 01:45 AM PDT

    I'm learning programming as a hobby because I enjoy puzzles, math, and solving problems. Plus it gives me an excuse to be tucked away from people. Also, the prospect of getting a well paying programming job in the future sounds delightful.

    When I was in high school I wanted to learn how to program so I could make my own MMORPG. I don't really fantasize about that anymore given my lack of commitment to humongous projects. Actually, there isn't really any particular project in mind motivating me. I like learning just to learn.

    Did anyone else start out this way and stick to it? Do you feel goals are necessary?

    submitted by /u/Lil-Miss-Anthropy
    [link] [comments]

    Is there a way to automate things on an iPhone using Python?

    Posted: 21 Mar 2020 11:31 PM PDT

    I have some things to do on my iPhone which requires a lot of doing the same thing over and over again. Is there a way I can connect it with my laptop or something and automate these things?

    I am just beginning to learn Python from ATBS

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

    Game Server Programming- where to start?

    Posted: 21 Mar 2020 07:13 PM PDT

    Hello everyone, I'm looking to learn server programming. My end goal is creating a multiplayer RTS game for mobile (using client/authoritative server architecture), but before I even start on that I figured I should just try to create a multiplayer pong. There doesn't seem to be a whole lot of information out there, or at least holding-your-hand type tutorials. I've read the theory of it all, about different architectures and online games work. I was wondering what you gents think should be the most basic starting point for someone who wants to completely understand web/game server programming and architecture from the ground up.

    I've read that creating a simple chat client/server is a good starting point for the fundamentals, and then from there you can expand it to host more and more complicated tasks for your server. My only worry for this is scalibility, such as creating multiple 'rooms' for matches to be happening simultaenously.

    I've also read about Amazon GameLift, but my worry for that is whether is too advanced for someone like myself- looking at their webpages, I don't understand a lot of what they're saying. And using a service that does a lot of stuff for me could actually be contradictory for learning what I need to learn.

    So my question is: what starting point do you recommend, and do you know of any good tutorial series or books that I can work through to get the fundamentals down? Or at least some kind of 'path' that I can follow which ends in me having the knowledge I need to make my game. Thanks!

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

    New programmer in need of help calculating pi

    Posted: 21 Mar 2020 10:10 PM PDT

    Hi. I'm really new to coding/programming and recently I got asked this question: "Calculate pi using the given formula until the last term is 1!. Round your answer of pi to three decimal places" and I don't really know what to do. I know I should set some values to variables like the 2, the math.sqrt(2) and the fraction itself. Then I should use a while loop for until the last fraction is equal to 1 and then that answer must be rounded. The problem is that I just cannot do it no matter how many times I try. I am not sure what terms to set or how to get my loop to run properly. By the way, I am doing Python.

    I cannot add a picture with this post for some reason, but the formula I must use is:

    2 * 2/sqrt(2) * 2/sqrt(2 + sqrt(2)) * 2/sqrt(2+sqrt(2 +sqrt(2))) ...

    sqrt = square root

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

    Does anyone else find the toughest part about learning programming is keeping track of naming conventions?

    Posted: 21 Mar 2020 07:47 AM PDT

    For example, creating objects in Java:

    Vehicle vehicle = new Vehicle(); 

    Are there better standards for naming objects/variables that should be used?

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

    Internship question

    Posted: 22 Mar 2020 12:12 AM PDT

    I always feel like I'm not good enough yet to start an internship or I won't be able to provide enough value to the company I intern at. I have learnt the basics of C, C++ ,Java and Python. But I'm not confident that I can start an internship yet. I have these questions in my mind.

    1.) When do you know that you're ready to go for your first internship?

    2.) I am also confused about who would provide an internship to a inexperienced beginner?

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

    problem selecting from listview of multiple columns from sqlite database (android studio)

    Posted: 21 Mar 2020 10:46 PM PDT

    im having troubles selecting from my custom listview and getting the itemName from the sqlite database.

    The Log.d(TAG, "The name is" + itemName); is returning

    The name is mypackagename.ListItems@ece56a4. which is not the name

    so it always give me this Toast.makeText(ViewListContents.this, "No id associated with that name", Toast.LENGTH_SHORT).show();

     public class ViewListContents extends AppCompatActivity { private static final String TAG = "ViewListContents"; DBManager dbManager; ArrayList<ListItems> listItems; ListView listView; ListItems items; private int selectedID; private String selectedName; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.example); dbManager = new DBManager(this); Intent receiveIntent = getIntent(); selectedID = receiveIntent.getIntExtra("id",-1); selectedName = receiveIntent.getStringExtra("title"); Log.d(TAG, "TitleID = " + selectedID); listItems = new ArrayList<>(); Cursor data = dbManager.getItem(selectedID); int numRows = data.getCount(); if (numRows == 0) { Toast.makeText(this, "there is nothing in database", Toast.LENGTH_SHORT).show(); } else { while (data.moveToNext()) { items = new ListItems(data.getInt(2),data.getString(1), data.getInt(0)); Log.d(TAG, "" + new ListItems(data.getInt(0),data.getString(1), data.getInt(2))); listItems.add(items); } ThreeColumn_ListAdapter adapter = new ThreeColumn_ListAdapter(this, R.layout.custom_list, listItems); listView = (ListView) findViewById(R.id.item_name_listview); listView.setAdapter(adapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { String itemName = adapterView.getItemAtPosition(position).toString(); Log.d(TAG, "The name is" + itemName); Cursor data = dbManager.getItemID2(itemName); int ItemID = -1; while (data.moveToNext()) { ItemID = data.getInt(2); Log.d(TAG, "The ID is" + ItemID); } if (ItemID > -1) { Intent edit = new Intent(ViewListContents.this, ItemActivity.class); edit.putExtra("itemid", ItemID); edit.putExtra("item", itemName); startActivity(edit); } else { Toast.makeText(ViewListContents.this, "No id associated with that name", Toast.LENGTH_SHORT).show(); } } }); } } } 
    submitted by /u/wutisduhmeaninoflife
    [link] [comments]

    Move array item up or down array by one each time button(s) are pressed.

    Posted: 21 Mar 2020 10:17 PM PDT

    I have an array and two buttons. One button is called "Move up". The other one is called "Move Down". What I am trying to achieve is have a user select which item on the array they want to move and each time they click "Move Up" that item in the array moves its position up by one. The same but down when they click "Move Down". Moving the item up needs to stop once it hits the last item and it needs to stop when it hits the bottom too. I have been trying to find an example but all i find are ones that don't quite help to this point. Any help would be much appreciated. Thanks!

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

    Explanation for the Spotify Web API

    Posted: 21 Mar 2020 07:54 PM PDT

    I spent the last week by trying to figure out the meaning of the time_signature's value on the audio analysis API, but I still don't understand it, someone here have some experience with this API and can explain me what is the meaning of time_signature's value?

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

    Assembly programming pushing and popping

    Posted: 21 Mar 2020 07:47 PM PDT

    Do we have to push and pop every register we use? If not, when are we supposed to use these instructions?

    submitted by /u/2kfan
    [link] [comments]

    code that can classify data according to topic and copy data to categorised database files and compare data to reduce redundancy and basically used said data in a knowledge ml algorithm

    Posted: 21 Mar 2020 09:59 PM PDT

    The ml algo should be able to interpret natural problems and provide various solutions

    Also If you can point me to a book or a YouTube channel or a course I'd really appreciate it

    Also how do you create an algo that can distinguish commands with natural language input

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

    I know basic HTML but I feel like i'm not learning advanced HTML because I copy and paste a lot.

    Posted: 21 Mar 2020 09:57 PM PDT

    I have learned the basic of HTML, and I can create a pretty simple website with it. The only problem is that whenever I want to add something cool (e.g, blinking text), I find myself copy-pasting advanced code which I don't understand. I'm not learning this advanced HTML, I am just taking it from somewhere else without typing it out myself. Is this a bad thing? How can I actually understand the code that I am pasting into my own projects? Thanks.

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

    International Bioinformatics Org EC Opportunity

    Posted: 21 Mar 2020 07:27 PM PDT

    Hi reddit,

    I'm currently part of an international organization (currently applying for nonprofit) called Helyx that distributes free bioinformatics education, works in research relating to biology/data analysis, and creates events relating to these topics. We currently have over 90 members with chapters in over 8 countries all over the world. If you're interested, you can become a chapter president or regional director simply by finding 1 chapter VP and 5 members to join you (doesn't have to be school-affiliated). We also work with sponsors/partners such as the Apollo Foundation and Spark Teen to create international events such as hackathons and create education opportunities for less fortunate kids. Please check out our website and join the discord if interested. Contact my email if you have any questions. Thanks!

    Website: https://www.helyx.science/

    Discord: https://discord.gg/V3E56pR

    Email contact: william.helyx@gmail.com

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

    Is this legal in c++?

    Posted: 22 Mar 2020 01:05 AM PDT

    class who { private: std::string y = ""; public: std::string* thing = y;} 

    forgive my rudimentary understanding of classes, but I was wondering if in this example, it would be possible to create a local variable (y), modify this variable, and pass it to a mian function with a pointer.

    Honestly I'm pretty tired right now so this might not make sense but I tried to keep this example simple because I'm just curious about the concept, and not a specfic line of code.

    I also may be confusing public and private, with the use of default arguments, but any help is super welcome

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

    Error attempting to access database and pull from table.

    Posted: 22 Mar 2020 12:58 AM PDT

    Hi, so I have an sqlite database file which holds two tables: (Albums and Artists). Now, I have a method which is meant to return a list of Strings from after getting the data from the "Artists" table. But, when calling the method I am getting an error: "org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: Artists)". The table does exist so, I'm not sure the issue entirely.

    Could it be that the database file is not being connected to properly?

    The db file is contained within the projects folder so, would the dbUrl provided be appropriate?

    Before I was having an issue with a driver which said: no suitable driver found when attempting to have it automatically get the driver through the dbUrl so, I added the jdbc jar file to the libraries in my project and that seems to of fixed that issue.

    Code: https://www.codepile.net/pile/zMx3GXDB

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

    Chrome App Development looks extremely dead. Is there any purpose of learning dart/javascript just to build an app for it?

    Posted: 21 Mar 2020 08:42 PM PDT

    I have some ideas to make browsing the internet much better, and i assume Chrome is way more popular then edge or explorer or mozilla, but there are so few good apps on the the chrome app store.

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

    How can Improve my logical and algorithmic thinking?

    Posted: 21 Mar 2020 08:38 PM PDT

    I need to get better at creating efficient algorithms. Will I build this mindset if I keep doing problems on hackerrank? What else can I do? Is this something you can train or is it like a either you have it or you don't thing?

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

    Is there any free python courses and what is the best ones?

    Posted: 22 Mar 2020 12:21 AM PDT

    I'm gonna learn python and I'm wondering what's the best course to take. I'm not a beginner with coding as I have a good understanding of c#. Thanks

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

    First steps

    Posted: 21 Mar 2020 06:03 PM PDT

    Hello. Im tired of my life recently so i decided to learn some stuff. I made few tutorials and i thought im ok, time to get a job. That was a big mistake, when they gave me a task i just couldnt come up with a solution or even something.

    I wanna make some projects, something so i can learn how to think, solve problems, struggle with it etc.

    So i like SQL, coding a bit less but i dont hate it. I always used c++ in high school. 1.Do i need to use something else? 2.What software do i need?( free or paid ) 3.How do i fuse my code with database.

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

    Has anyone developed a hobby that lets you practice while you do it?

    Posted: 21 Mar 2020 04:21 PM PDT

    I just started learning. Is there any fun way to spend my free time doing something that would help me develop my skills? It's not necessary for it to be fun but it wouldn't hurt if it was.

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

    Just sharing. COVID-19: Take advantage of the hardtimes - turn water into some damn good wine

    Posted: 21 Mar 2020 08:03 PM PDT

    I am an international student in the U.S. and I have somewhat of the early access to the information of Coronavirus (even before it had the official name "COVID-19"), because my home country was right next to the virus' origin. I knew that it would be huge - I just did not know how huge it would be. I had never thought that one of the impacts of the virus would be closing down all of my school's activities.

    At first, I felt somewhat discouraged because closing all activities meant that there would no classes, gyms, or even normal daily human-to-human interactions. Since I am an international student, there is no going back because, you know, it means two things: 1) I will not be able to go back to the U.S. anymore, and 2) I will be considered a "possible virus carrier" in my home country. And so I stayed.

    But it was at that moment, I realized that there were plenty of things to do - things that I could not do while I was busy with others and have not had time to brainstorm. My pathway is that, I have a B.S. in Accounting, and moved up to M.S. in Computer Science because I believed that all knowledge in programming would help me tremendously when I applied and got into a Ph.D. program in Accounting. So this is the time that I could use to learn whatever I feel would be necessary for my pathway.

    One of the best things so far was Codecademy Pro became free for students until the end of this year - which was nuts for me. I spent the past week learning working on my projects, preparing for this semester and the new semester, and also learning how to code in the languages that I need (Java, Python, JavaScript, HTML and CSS, R, etc.). Link to my account is given here. I am just an intermediate Java programmer and a novice in other languages - but this is the golden time for me to learn and to prepare. If time and condition permits, I might be able to learn statistics and econometrics - or even piano, something that I dream of learning for the past 5 years (my piano is still at the corner of my rented apartment awaiting for me to learn and play).

    I just want to share my story to you so say that, stay healthy, positive, busy, and smart. There are plenty of things to do and to learn. You can turn this difficulty into a burden or an opportunity - it is your choice. I have read that many fellows here were affected by the incident - stay positive. There was a guy in Wuhan (the virus' origin) who got accepted into New York University just days before the outbreak begins. We are all affected by it somehow, more or less.

    However, we hold the keys of our own lives, so wash your hands more often, wear a mask, practice social distance, and think clearly. I doubt that I will ever meet anyone of you face to face, but I just want to say, good luck - make this your own opportunity.

    Ps: I will come back in a few days to show off my progress on Codecademy. =)

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

    [BASH] Trying to use RegEx [0-9] in a grep query, but getting blank result bricking my program.

    Posted: 21 Mar 2020 07:46 PM PDT

    I'm in the middle of a school project to learn unix, we just got past RegExp and are on loops. According to our RegEx portion: grep [0-9] file should return words such as open1, test9, or arp2. Yet when I run the program I get nothing. Here's my code for reference:

    echo "$word" | grep -q [0-9] if test $? -eq 0 ; then echo "$word does not include any numbers" else echo "$word contains numbers" fi 

    Now I have identical code below that also tests for capital [A-Z] & lowercase [a-z] letters as well, and they work fine, but the number one is holding me back.

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

    JavaFX setScene() is crashing my program. What am I doing wrong?

    Posted: 21 Mar 2020 07:37 PM PDT

    Hello all, I'm pretty new to java and am stuck trying using the setScene method to switch between scenes in javaFX. Every guide I've read says it should work but I must be missing something. I've been at it for five hours now but just cant see where I'm going wrong?

    This two scene app has a home and a form, I'm simply trying to navigate between the two scenes.

    I am trying to start with homeScene in the stage and then switch to formScene when button1 is clicked, however it just crashes whenever I click the button.

    I've tried declaring the button in different ways, I've tried starting with formScene and switching to homeScene, I've tried having them as separate methods and many other things but always it crashes when I try to set a new scene using .setScene()

    Woule anyone so kind to help me out and have a look as I'm at a dead end :/

    paste.ofcode.org/D7TuWpxkFRuTNXug7cbwpF

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

    No comments:

    Post a Comment