• Breaking News

    Tuesday, January 9, 2018

    I'm teaching people with basic C++ skills how to make games in Unreal Engine 4 learn programming

    I'm teaching people with basic C++ skills how to make games in Unreal Engine 4 learn programming


    I'm teaching people with basic C++ skills how to make games in Unreal Engine 4

    Posted: 09 Jan 2018 06:19 PM PST

    You can find the series here: https://www.youtube.com/watch?v=K8iSi1oGaBI

    Keep in mind you'll need some C++ knowledge, but aside from that I assume you don't know any game programming stuff.

    Hope everyone gets some use from it! Let me know what you think :)

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

    Entry level certifications

    Posted: 09 Jan 2018 04:24 PM PST

    Hello all! I am looking to transfer into the tech world. Are there any entry level certifications that I can study for? I am in school for Cybersecurity.

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

    How to Practice Programming

    Posted: 09 Jan 2018 05:31 PM PST

    I've just started my degree in CS. I'm having trouble figuring out a routine way I can practice and learn programming. Right now my curriculum is focused on Java. I'm not doing so well because I can't really figure out how to go about it. Math class is a lot easier for me because all I need to do is read the chapter and practice the given numbered problems in a notebook. I'm used to learning sequentially. I'm trying to learn programming by pinning it down to a sequential, minimalist routine. Any suggestions on how to practice? Is my whole way of going about learning programming flawed in the first place?

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

    Tips & tricks of being a programmer

    Posted: 09 Jan 2018 02:34 AM PST

    I'm a 17 year old high school student living in Bosnia, and I would like to ask some questions to professional programmers. I'm an A student (or 5 in my country) and since I was 12 yo i was interested in programming. I like problem solving and math, but at the same time i'm not Einstein in it. I'm in 3rd year of high school (out of 4) and once I turn 19 I will have finished high school and from there on I have no idea what to do.. That's why I'm making this post. I'm currently in (i don't know how you say it in English) Electro-Technician school and my 4 year course is "Electro-Technician of Programming and Electronics", meaning that besides programming (which we learn little) we also learn everything about Electronics and thanks to this school I know a lot about electricity, but since that is "too easy" of a job for me, and programming pays much better, i've always seeked programming.

    Here are a couple of questions for professional programmers:

    1 - Where do you work? Do you work in a single place or in multiple places?

    2 - How is a "normal day" to you? Which are the 4/5 most frequent tasks that you do in a daily basis?

    3 - What is the degree of responsobility that you have in your work methods determination? If they are already determined, how are they already determinated and by who?

    4 - How many hours do you work per day on average?

    5 - Do you use your practical knowledge of programming to make, solve and debug programs , or do you use Google for most of the work ?

    6 - Do I need to "know" programming before I go to a university ? And for Europeans in this sub, what university did you go to and what university would you recommend me ? (keep in mind i don't have a lot of money to spend)

    7 - What activities do you do in your free-time? How frequently can you do those activities?

    8 - In which measure does your profession implies work with others?

    9 - Why did you choose this profession?

    10 - What type of formation did you take to reach this profession? (habilitations, learnings, degrees, etc.)

    11 - Did you had some other profession or hobby that helped you to enter your current profession? If so, in what way did that helped you?

    12 - Were there any helpful tools (going to courses or learning by yourself) in your profession that has contributed to your career evolution?

    13 - For what professions would you be able to switch yours today?

    14 - Do you like your profession? What do you like the most and the least in your profession

    15 - Which characteristics should an individual have to practice the profession and have success in that?

    16 - In which way does your profession influence the rest of your daily routine?

    17 - How much do you make?

    18 - In your opinion, what can we do to earn experience or to learn more about your profession?

    19 - How is nowadays the work market in your professional area? What are the evolution perspectives for the coming years?

    20 - Do you have any advice that you can give to a young student that is thinking about choosing this line of field?

    21 - How much does university knowledge reflect real life programming ? Is it possible to learn programming from university only ?

    22 - How much of programming did you learn in school and how much did you learn by yourself ? Is there any point in learning programming if you're not going to use it very often ?

    23 - Did you take any part-time jobs while you were finishing a degree ?

    24 - Since I'm in a weak financial situation , do you recommend studying a degree in my own country , or do degrees vary from country to country ?

    25 - What IT job would you recommend me ?

    26 - And (probably) last question which bugs me since I started high school... is programming hard ? I mean do I need to start hard learning C# , C++ and other languages, or is this a fiel that can be learned (and later perfected) in a couple of years ? Do I even need to know a programming language before signing to a university ( knowing that it's helpful to know one ).

    Thank you for all your answers in advance, I always sought answers from experiences of other programmers, learning programming through a web page isn't helping me one bit about the work itself.

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

    How to I go about making a game?

    Posted: 09 Jan 2018 06:13 AM PST

    So I know this sounds like and probably is a common question, I really do want to know...

    I have unreal engine and unity installed and I only know the basics of java from a class this year.

    I'm willing to put in the time, and mabey some money, I just was wondering where the heck do I get started? It just seems daunting with this huge thing infront of me and I want to know what are the best resources ( or languages that you can recommend for a noob like me who wants to get into video game making.

    Sorry if this is super nooby.

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

    What is best practice for multiple websites/applications and hosting?

    Posted: 09 Jan 2018 06:33 PM PST

    Hello!

    I am self-taught so please let me know if there are some terms that I should use in the future when trying to discuss this topic. My projects are both for a small business.

    I have a Wordpress site hosted on a cloud server. Here are the specs:

    CPU: 1 Core RAM: 1024 MB Storage: 25 GB SSD

    Month-to-month, I reach less than 1% bandwidth cap use and the CPU usage peaks at 8% during our busiest time. So far everything has been going very well. There will be about 6 users every weekday logging in once or twice to write records into a database for about 30 clients we have. I am not familiar with what I should be tracking on my application to be properly prepared, so any other advice is welcomed.

    The new application uses Laravel. It looks like it'll be close to being ready to deploy soon. I have the following questions:

    1. What is generally a best practice for two small projects such as this?

    2. I feel fairly comfortable deploying a new droplet and setting it up, but would it be good DevOps experience to learn how to handle the maintenance and process of hosting two projects from one server?

    3. I couldn't find a good list of pros and cons to consider when going one route or the other. What are some considerations I am ignorant of?

    Thank you!

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

    Is Coursera still worth using?

    Posted: 09 Jan 2018 06:48 PM PST

    I found a Coursera course on c#, and it seems like exactly what I am looking for, exactly for my experience level and all of that good stuff. But I have read a lot of reviews saying its a scam, people can't cancel the payment, the courses aren't worth the price, etc.

    So, is it worth it for me to take the course, or is it too good to be true?

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

    Bordering on despair here ... Beautiful Soup and python 3 requests

    Posted: 09 Jan 2018 04:58 PM PST

    I really need some feedback here. I have been at this for 3 hours now. I have been programming for almost two years and this is by far the most frustrating thing i've ever dealt with, mainly because it seems like I'm the only one that's ever had this problem.

    `url ='https://markets.ft.com/data/indices/tearsheet/summary?'s=TR0000:TOR' 

    response = requests.get(url) print (response.text)

    I get the following error code:

    UnicodeEncodeError: 'ascii' codec can't encode character '\u25bc' in position 38113: ordinal not in range(128)

    This is the response code: {'Content-Length': '17980', 'Cache-Control': 'private', 'P3P': 'CP="NON PHY ONL UNI PUR FIN COM NAV INT DEM STA HEA CUR ADM DEV OUR IND", policyref="/w3c/p3p.xml"', 'Set-Cookie': '1751%5F0=5A5DC1A2E2DB3098286B384051497F2B5EFEB6CC9A23733E6075471EC657A898; domain=ft.com; path=/; HttpOnly, GZIP=1; expires=Mon, 09-Jan-2023 00:42:58 GMT; path=/', 'Content-Type': 'text/html; charset=utf-8', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'X-Powered-By': 'ASP.NET', 'Date': 'Wed, 10 Jan 2018 00:42:57 GMT'}

    Moreover, I get the exact same error code for the dozens of totally unrelated URLs that I try. I see no discussion of such an error on the python requests docs or in any other stock tutorial that i see, such as this one:

    https://www.digitalocean.com/community/tutorials/how-to-work-with-web-data-using-requests-and-beautiful-soup-with-python-3

    Am i losing my mind? is this only my problem? someone please bail me out here b/c i need to get through this point to finish a project im working on.

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

    A question about the software in which you code.

    Posted: 09 Jan 2018 07:38 PM PST

    In my computer programming class, we have just started codeacademy and I chose python as my first language. When you write code in codeacademy it outputs into the right side of your screen. When you are actually coding do you just open a software and begin coding and then eventually run it or download your results etc. I'm just confused on how and where coding is done in a non learning enviroment. Thanks for any help.

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

    I have some questions about how to improve as a software craftsman/professional programmer.

    Posted: 09 Jan 2018 01:14 AM PST

    Hi everyone, I've a few questions for professional devs regarding how to improve as a professional programmer. I've been in the industry about 5 years, at 4 different jobs, but, aside from my first job, they've all been fairly menial. As a result, my software development process feels stunted - I can program, know a few languages and some CS fundamentals, but I don't feel effective. I'll get the job done eventually, no doubt about that, but I feel it takes me too long.

    So, without much further adieu, here are the questions:

    • What is your process in building a software module? I know most of this, in general, is answered in the FAQ involving problem decomposition and systematic problem solving but I wanted to know any specific ways YOU go about it, such as how your notes look, do you use a whiteboard or a notebook, etc.

    • How do I learn to estimate time better on specific tasks so as to avoid crunch mode? I've heard some advice is to plan catch up days, such as planning for 4 days of work to be done in 5 days. Do you do this or do you have another system in mind?

    • How does learning new things affect the prior skills in mind? I find it hard to decompose or estimate when I don't know about the tools at my disposal.

    EDIT**

    Wow, thanks for all the thorough responses! I'll try to add some background information for anyone interested.

    For those wondering how I can be junior after 5 years:

    TL;DR: My 5 year experience is spread out over 7 years due dealing with mental health issues and impostor syndrome, leading to lots of gaps in my work history, and I didn't do a good job of keeping up during said gaps.

    I'm somewhere between junior and mid-level. I went to a 4 year school for graphics and AI. I switched to web development when I got my first job. I sucked in school - I could do the majority of the projects and passed my classes well enough through grit, but you can look really good if you only take one programming course a quarter(10 week courses). Now I'm trying to make up for that. I know much of the programmatic aspects of web development - I know SQL and db design, C#, fairly aware of MVC to the point where I could probably do it in most languages if I wanted to (except WebSphere, get that shit away from me), and now moving onto how sites are done with the JAM and Node/React stacks. A lot of the 5 year experience is actually spread out over 7 years - I have a mental illness(which was diagnosed during my first job) and have had periodic breaks(one for 1.5 years, another for 6 months) where I struggled with getting better health-wise, trying to update my skills, and a lot of soul searching to deal with impostor syndrome. Over the years, even while working, my docs and I have been struggling to get the diagnosis/cocktail right. Right now, I'm unemployed and still going through that process of finding the right cocktail, so I'll probably be unemployed for a while until that's settled. Having said that, I still want to stay current. In addition, I also just want to be better at what I do, now that I've gotten over the hump of feeling like an impostor.

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

    MySQL returning count and chunking into subparts

    Posted: 09 Jan 2018 01:49 PM PST

    Hello!

    I am currently working on a GUI program that hooks into a mariaDB database in the backend. Currently I turn user queries into SQL queries using some basic logic and then return the data to the client with the option of exporting to a CSV file if they are satisfied with the data returned.

    However, the data is growing quickly and it is possible for the to construct a query that returns so much data I can't safely just dump it onto their machine in RAM, since that could crash their machine, or at least slow it down significantly. Is there any way to return just the NUMBER of entries returned for some given SQL query? So instead of returning 100 "Cusomters" instead return just the int "100"?

    Also, assuming that is possible, is there an easy (built-in) way to batch up the data output? Essentially, breaking the data up into 1GB maximum blocks and sending each chunk at a time, each to be exported to its own subfile?

    TL;DR --

    1. How to have a MySQL query return the count. (something like

    RETURN COUNT FROM (SELECT column1, column2 FROM table_name WHERE condition);

    1. How to batch the data up that is returned? Instead of returning 1,000,000 entries in a single multi-GB dump, return a bunch of chunked up smaller bits that can be handled by the client.

    Thanks!!!

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

    cs50edx and freecodecamp

    Posted: 09 Jan 2018 08:55 PM PST

    I am using these two to teach myself coding, but wondering if people think this is not enough. There are so many different online sources that I did not want to feel like I was jumping around too much, but any advice would be appreciated.

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

    Do we have programmers who have graduated Math at university?

    Posted: 09 Jan 2018 11:55 PM PST

    I wonder what I should study at University: Mathematics or programming. So let me ask you few questions:

    1. How did you become a programmer?

    2. Was it hard to become a programmer?

    3. Why did you choose to study Maths?

    4. Why did you choose to be a programmer?

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

    Learn Android Development For Free (With a Mentor)

    Posted: 09 Jan 2018 08:00 PM PST

    Hi guys,

    A while ago I was just a guy with ideas but couldn't make them come true because I didn't have the knowledge and didn't have the money to pay someone to develop. So I decided I would learn how to code and build things by myself.

    I did and recently got a full time job as mobile software engineer.

    It was amazing to get the job but now I won't have time to work on my personal projects as I had before and it would take a long time to finish them by myself on my spare time.

    So I realize it would be better to help people teaching them how to code and in exchange they would help me with my project than let my projects die.

    So here's the deal. I will teach you how to code and when you have enough knowledge you will work with me on my personal projects, acquiring more experience with real world problems and helping me, "repaying the favor" at the same time.

    Who is a good fit in this project:

    • You don't need any programming experience. If you have some is good but not required.

    • Someone that has at least 3 hours available daily to dedicate to our project

    • English as native language or someone that can understand and speak 100%.

    • Decent communication accessories. Headphones and independent mic is the minimum.

    • Someone that really want to learn and don't want to go to college or go through a hustle that is learn by yourself

    • Someone that don't give up easily.

    • The class is at 6 PM MST so you have to live in a place that is around that timezone as well to attempt the classes.

    What you will learn:

    • Java/Kotlin
    • Android Framework
    • Debugging
    • Mathematics
    • Logical thinking
    • Firebase
    • Algorithms
    • Data structure

    That's the surface and the main subjects I will teach. My focus here is to create good developers as fast as possible, going through only things that we will use often.

    I will teach you how to learn by yourself and the most important things to work on real world environment. That means I will focus more on practical things than theories. That's bad and good at same time. It will have plenty theoretical subjects that I won't go deep but is extremely important but I won't go over it because it would take too long and that won't be my focus.

    If you are interested just pm with your skype ID and telling me a little about you, what time zone you are in and why you want to start learning this. Make sure you meet the simple "requirement" I asked above.

    Thank you. Have a great day.

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

    Someone PM'ed me for how I got my first iOS job from another post, so here's a chronological order with resources of what I did.

    Posted: 09 Jan 2018 11:46 PM PST

    This was a good reply to the PM so I thought others could benefit from it.

    I didn't have any programming knowledge besides HTML in high school but that's not a programming language; it's a markup language.

    I started with Objective-C but I bullshitted through it and didn't learn much in the end. Made my first app with it but mostly copy and pasting from Stack Overflow. This was in 2013. So the start to my actual growth:

    First, I learned the Swift language from Apple's Documentation. I already had a Mac so I would create a new file for each section of Language Guide. This was in 2014.

    Second, I wanted to make games, so I used 2D Apple Games by Tutorial. I went through most of the book and made my first game from it. It also helped me learn Swift a lot better. Took me about 5 months to make but for anonymity sake, I won't post a link to the game. Released it in 2015.

    Third, I wanted to make apps, not games, so I bought iOS Apprentice. It shows you how to make 4 apps. From easy to hard. I went through it all. This was in 2015.

    Fourth, I didn't feel like I knew things on a professional level, so I bought this Udemy.com course that's over 50 hours long. I went through it all and felt a lot more confident about myself. This was in 2016.

    Fifth, I thought the watch was interesting so I bought watchOS by Tutorials. I made an app for the watch later. It was around the beginning of 2017.

    By this point, I had 2 games, 1 non-game app, and 1 apple watch app. I was at a Hackaton and met someone from a programming school in San Francisco called Make School. They told me they had open positions to teach for the summer so I applied.

    To prepare, I bought Core Data by Tutorials since Core Data knowledge was a requirement. While over there, I made my 5th app.

    After coming back, I made my 3rd game. It was also this time when I decided to actually look around for iOS jobs because I've always felt like I wasn't good enough. I got a call from a recruiter offering me a job and they emailed me. I didn't think I would get the job but I went along with it.

    To prepare for the interview, I bought this iOS Interview Guide. After 3 interviews, they finally called me later and said they gave me the job. I also bought iOS Animation by Tutorials since Core Animation was a job requirement and I learned it before I started my job.

    Now, I've been there since September. This is also my first programming job: I'm now an iOS software engineer and couldn't be happier!

    submitted by /u/50th_Mersenne_Prime
    [link] [comments]

    [HTML & CSS] Should I Plan My CSS Before Writing the HTML Structure?

    Posted: 09 Jan 2018 04:14 PM PST

    I can't for the life of me figure out how to ask this question and have failed at Googling it. I'm trying to write my first HTML pages. I can write up a basic structure pretty easily now. However, I have to go back and add ID's and Classes so that I can then style the structure with CSS. Can anyone point me to some best practices for adding good ID's and Classes to my HTML so I'm not constantly jumping back and forth with the CSS? To clarify, I am trying to really learn CSS and HTML and don't want to use frameworks yet. I want a good understanding of how to build my own stuff first.

    TL;DR: What are best practices for giving ID's and Classes to HTML structure without giving every single thing on the page an ID or Class when that isn't necessary.

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

    Sharing affiliate commission-thanks!

    Posted: 09 Jan 2018 11:42 PM PST

    Hi and thanks for reading. Sorry if this is the wrong sub, but I am really hopeful someone can help. I am not the programmer but the owner of the site. The site will share a percentage of affiliate commission earned with the poster of the project. www.hometalk does this.

    The programmer I am working with is new at this so I am asking for assistance here. Thanks so very much.

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

    What is the meaning of "hotlink protection"?

    Posted: 09 Jan 2018 10:54 PM PST

    I saw this so many times in online file sharing sites.

    Does it mean their direct download links are unsharable?

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

    Please help me answer 6 minute survey about online programming community leadership behavior for my final thesis requirment ( I will share the result of the surey if you are interested).

    Posted: 09 Jan 2018 10:45 PM PST

    Dear Ms./Mr. (Honored Admin & Respectful Members) ,

    I'm Abdul Razak, studying at Universiti Utara Malaysia. I really need your help by humbly requesting to fill in my estimated 6 minutes survey if you have ever participate in any online programming communities to learn, asking for help, sharing knowledge, developing software/programs and joining any other activities ( such as Java programming forum, codeguru.com, Python forum, PHP Community, Android/IOS community, Matlab, Codeacademy.com and others).

    I have collected 160 respondents for 2 months and 1 week now. I need 300 participants to accomplish data collection and analysis for my final thesis. Below is the survey link :

    https://www.surveymonkey.com/r/abdulrazak123

    [Lucky Draw of USD 10 Amazon gift card x 6 respondents ] will be delivered to random six respondents as an appreciation for participating.

    "Your willingness to answer this survey is highly appreciated"

    Thank You Very Much

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

    Is LAN network only server safe for learning?

    Posted: 09 Jan 2018 10:38 PM PST

    I'm learning node.js and using socket.io to create some test sites internally on my personal computers. I have it resolve by ip and port number but did not setup port forwarding through my router. Is it currently safe where no one can resolve to my internal IP address from outside my router?

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

    If I'm fluent in C#, and I think the easiest way to design a UI is through html/css, what tech should I pursue to build desktop apps?

    Posted: 09 Jan 2018 10:35 PM PST

    Maybe a poorly worded title, I've been looking around for frameworks that allow me to make use of my C# knowledge. Never built a desktop app before so I want to start learning. In addition to C#, I know a bit of C++, so Qt is an avenue worth looking into.

    WPF is not supported on linux systems so I'm crossing that out, the learning curve is what I want to avoid aswell, as it seems to be specific to that framework.

    What path do you think I should take? Is electron worth looking into? How does it work? Will I be able to use C# on the backend? If not electron, are there frameworks that allow me to use my html/css/javascript knowledge and apply it into desktop development?

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

    Windows Forms (ala .NET and Visual Studio) vs JavaFX

    Posted: 09 Jan 2018 06:48 PM PST

    So, as some of you may (or may not know), I am attempting to make an Inventory Management System for my ship at work.

    My only hesitation against using C#.NET and Winforms is potential licensing issues that may pop up.

    I can tell you for a fact that: 1: User Base will be limited 2: I highly doubt our company will try to sell this. This is a tool for us to use internally.

    I am no lawyer, or expert in the legal matter of using Visual Studio Community or a personally owned version of Visual Studio Professional (acquired through Microsoft Imagine).

    This is why Java is appealing, because the licensing seems easier in a situation like this.

    So I set out to try to translate my knowledge of java, and blend it with my knowledge of C#.NET Windows Forms....

    And I am lost. Is it JUST me, or is JavaFX a giant pain in the ass to deal with?

    1: Why is it that controls in JavaFX do not have a name? I cannot call a button on my form (actionButton) and reference it. It does not work that way

    2: I want the program to start with my main form. JavaFX by default in NetBeans creates a project with the "Hello World" form that if I get rid of an attempt to load in my form, goes to shit.

    3: Events... Firstly, ActionEvent is generic, it's the "click event". In .NET, there is a specific named event. The difference is minimal. Okay, so I create an event to handle actionEvent... And it throws a giant heap of errors... Program launches, but now I can't create events?

    I guess I am 110% lost. I need someone, someone who can either reassure me that using C#.NET for the scope of my project is fine, and if it's not, I need major help in JavaFX, but a course that will translate how I think in .NET Windows Forms to this mess. Like start from the basics "Here is how you create a form, here is how you make Java launch it. Here is how to create 2 Forms, and on a button click, launch the other form, ect... (formName.load(); (at least in C# it's that damn easy.))

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

    Django - ValueError: --enable-jpeg requested but jpeg not found, aborting

    Posted: 09 Jan 2018 10:33 PM PST

    I am a beginner in Django. I am trying to create an online shop. When I tried to install Pillow using "pip install Pillow==3.0.0" in Windows command prompt, the following error occurs: ValueError: --enable-jpeg requested but jpeg not found, aborting.


    Rolling back uninstall of pillow

    How can I fix this issue?

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

    [Java] Searching an ArrayList

    Posted: 09 Jan 2018 04:35 PM PST

    I'm making a hangman game for my java class using an arrayList to hold the word with one letter as a string in each index. Then I'm using another one to reveal hidden letters. How would I go about searching an array list to see if there is more than one of each letter? I was thinking maybe a for loop to iterate and compare it to the letter guessed and for each one it would take x at that point and set the letter at that index position in the blank arraylist.

    EDIT: I tried what I assumed would work after awhile I figured out how to get it to work by using the .get() method to check if it .equals() the guess string entered.

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

    Sending data to the main UI thread from a second spawned one in Android

    Posted: 09 Jan 2018 10:28 PM PST

    Say for example that I want to update my UI to show a string of count down numbers. I want to do this by writing an Updater class that implements something like Runnable, which communicates to the UI thread via a Handler, how can this be done?

    To put some incomplete code to this:

    public class MainActivity extends AppCompatActivity { private LinearLayout layout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); layout = new LinearLayout(this); setContentView(layout); Updater updater = new Updater(); Thread workerThread = new Thread(updater); //somehow update layout 

    Second class:

    public class Updater implements Runnable { private int count = 0; public Updater() {} @Override public void run() { for (int i = 0; i < 10; i ++){ try { count++; TimeUnit.SECONDS.sleep(3); // I want to put this count into a TextView, and add it to the linearlayout in the main acticvity } catch (InterruptedException e) { e.printStackTrace(); } } } } 

    I really want as general a case as possible without using anonymous classes, or AsyncTask.

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

    No comments:

    Post a Comment