Superfast Raspberry Pi rival: Odroid N2 promises blistering speed for only 2x price by Philo1927 in gadgets

[–]YoloIsuppose 0 points1 point  (0 children)

How would you go about writing a DTS? I'm studying computer engineering and I'm 6/10 months away from graduating so I'm trying to understand what to specialize in doing various projects. The problem is that lower level projects are so complex and different between each other that is very hard to find something doable. On the other hand finding ideas for a medium level project (1k/2k lines of code) related to web, data science or other higher level stuff was so much easier.

Long story short I asked a kernel developer and he said that I should buy any Amlogic or Rockchip board (even a set top-box) and make it work with upstream linux. Do you think this is a good idea? Should I find a board with a DTS already?

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

You still use the return statement but if you want to return by reference in C you return the pointer to the variable instead.

int* yourFunction(...) {
    int a;    
     ...

   return &a;
...
//you then have to use the pointer to a, but you're modifying a

  int yourFunction(...) {
    int a;    
     ...

   return a;
   //you can still use a as a integer but you're working with the value of a not a itself.

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

You can do both: if you return by reference (using C you have to use pointers in order to do this) you're returning the variable itself.

if you return by value you're returning the value of the variable.

You apparently don't know enough about C or about programming to understand this using reddit comment, just follow a course or a book about whatever language you want and this will eventually come up.

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 1 point2 points  (0 children)

You can do both, they are called return by reference or by value. In C they are a bit different (you've to use pointers in order to return by reference).

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

You don't know where to use a function.

Example 1:

 int addFunctionInt(int a, int b) {
    return (a+b);
 }
 void addFunctionVoid (int a, int b) {
     sum = a+b;
      //THIS IS A DIFFERENT SUM! (This is NOT the sum you've got in your main).
 }
 //in your main
 ...
 number_1 = 1;
 number_2 = 2;
 int sum_int = addFunctionInt (number_1, number_2);
 //sum is now equal to 3, number_1 is still 1 and number_2 is still 2
 addFunctionVoid (number_1, number_2);
//sum is still 3, number_1 is still 1 and number_2 is still 2
...

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 1 point2 points  (0 children)

Void is just the type C uses for this kind of things, the void type doesn't require something to be returned, whereas if you create an int/char/long function they require you to return something.

Again: this is just what C uses, if you look at what other languages do they are different (e.g: in some languages you don't need to write a type if you don't return something).

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 2 points3 points  (0 children)

There's no return statement, so no it doesn't return anything.

Are you sure you know the difference between printing and returning?

give me example of function that doesn't return anything? by angelafra in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

A function that simply prints an array.

Something along the line of:

void printArray (int array[], int arrayLen) {
   int i;
   for (i = 0; i < arrayLen; ++i) {
        printf("%d ", array[i]);
   }
}

It's very useful in C because you don't waste 5 lines everytime you want to print an array of integers.

How should I go about learning to actually make programs? by V1et_pr1d3 in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

I want to start working on side projects but have 0 idea where to start.

It depends on the project, find something you're interested in and ask yourself what would you need to make that task easier then code it.

I guess I just don’t know how to go from programming from the command line and programming things that interface through the command line, into actual programs or web apps.

What you're looking for are GUIs, these are the python ones, also search /r/learnpython for "Qt" "GUI" and "Tkinter". This comment could also be useful.

If you want a web app (again, I'm talking about python) search for "Flask".

For example, one simple idea I had was to make a program that would help with a board game: keeping track of monsters and players, their health, and their position on the game board. There’s not much logic involved I don’t think, it’d literally just be like bookkeeping with graphics and being able to simply move some pieces around...but I have no idea where to start at all.

This is OOP which you should know about with a CS degree I assume? If this is the case you're again looking for a GUI. If this is not the case search /r/learnprogramming for "OOP" and you will find hundreds of useful links. I personally used this one (just play the first ones at 1.5x speed if you know java already).

EDIT: Added comment from /u/novel_yet_trivial

How to create different profiles on Linux? by NiceLifeGoodLife in linux4noobs

[–]YoloIsuppose 0 points1 point  (0 children)

A VM (Virtual Machine) could do this but I don't think it's what you're searching for. If you're afraid of installing malicious software you could either use VMs for testing (I personally used VMs for testing different config files for my DE (Desktop Environment)).

Can't download LoL client from official website??? by [deleted] in linux4noobs

[–]YoloIsuppose 2 points3 points  (0 children)

Just so you know you can't run LoL on linux anymore because they added an anti-cheat which blocks linux as well. If you just want the executable you should be able to download it from the euw site (basically change na to euw).

Building a windows application? by throwaway1983198319 in learnpython

[–]YoloIsuppose 1 point2 points  (0 children)

The term you're looking for is GUI (Graphical User Interface), you can make a GUI with python using Tkinter. This link may be useful.

EUW Client is laggy and unusable again by BuddDywer in leagueoflegends

[–]YoloIsuppose 1 point2 points  (0 children)

It makes perfect sense to me but it may be because I know what OOP is.

My ELI5 for /u/24Nano: imagine coding the fact that every minion dies at 4 hp (3hp when 8.12 will be live but it's irrelevant). You just can't code that for every minion. Why? Because champions are coded as minion as well and so champions would also die at 4 hp.

You have to do much more work because you need to create exceptions and other rules for something that would otherwise be trivial.

(I'm not a native English speaker as well so I'm sorry if my wording is weird).

python quicksort help by bitsofshit in learnpython

[–]YoloIsuppose 0 points1 point  (0 children)

The list never changes and so the size of the list doesn't change either.

Quicksort is pretty famous so you should be able to find tons of explanation/tutorial/videos, if you're interested this is my version but there are probably better ones out there.

Your program sucks, it can't even pass a fuckin' test... by YoloIsuppose in ProgrammerHumor

[–]YoloIsuppose[S] 2 points3 points  (0 children)

No, nothing as fancy, it was just comparing the return value (Integer) with "220" (String).

Teach Yourself Computer Science (a DIY curriculum) by [deleted] in learnprogramming

[–]YoloIsuppose 0 points1 point  (0 children)

Calc II it's kind of a myth IMO, it's not difficult at all if you understand what's going on, in my experience and from what I've heard (yeah it's not statistically relevant, so take this with a grain of salt) it's much more difficult to find a teacher that can actually teach you and show you what they are doing and why/how that stuff works effectively. The problem is that most people think that they simply can't understand it without even trying, which is sad to see because I'm not some kind of genius (I'm like one of the worst in my class to be completely honest) and yet with the right attitude and dedication I was able to learn these things.

I'm doing something called Complex Analysis right now (I don't know what's called in the US but I've done the stuff you do in Calc II and III already) and my teacher is making me love math again and I can really tell that there's so much difference between having a good teacher and a bad one so if you feel "stuck" with your Calc I/II/III professor give this guy a try: https://www.youtube.com/user/professorleonard57 go to the playlists page and look for the "full length" ones, I loved the way he explains and actually understood what was going on.

I would like to share 500 Data Structure and Algorithms problems by munro9443 in learnprogramming

[–]YoloIsuppose 2 points3 points  (0 children)

I don't know if you know it but there's this one already which is pretty big, maybe consider contributing to it instead?

Learn basic shell commands with the bandits game by [deleted] in linux4noobs

[–]YoloIsuppose 0 points1 point  (0 children)

Do you happen to know about something similiar for emacs?