Register
Login 




New Topic Post Reply  [ 25 posts ]  Go to page
 Previous << 
1, 2, 3
 >> Next 
  Print view
Previous topic | Next topic 
Author Message
Offline 
PostPosted: Tue Jan 10, 2017 12:25 pm 
User avatar
EgN Member
Elder
Steam ID: STEAM_0:1:22040504
Joined: Mon Jan 04, 2016 12:13 am
Posts: 1404
Location: Philadelphia, PA
Yiggles Moto wrote:
Image

All that whitespace will surely be fine, right?

I have to work with a DB that uses whitespaces instead of null..sometimes.... it's killing me inside.
Gonna revise your Levi's with physical harm
Put divets in the rivets with my physical arm
Gonna beat those jeans, gonna dip em in slime
Turn your 501s into 499s

The Senate: Did you ever hear the tragedy of Darth Plagueis The Wise?
Anakin: No
The Senate: I thought not. It’s not a story the Jedi would tell you. It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side, he could even keep the ones he cared about from dying.
Anakin: He could actually save people from death?
The Senate: The dark side of the Force is a pathway to many abilities some consider to be unnatural.
Anakin: What happened to him?
The Senate: He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.
Anakin: Is it possible to learn this power?
The Senate: Not from a Jedi.


Top
 Profile  
 Social 
Offline 
PostPosted: Tue Jan 10, 2017 12:28 pm 
EgN Member
Steam ID: STEAM_0:0:61594940
Joined: Tue Nov 12, 2013 5:35 pm
Posts: 3554
Yiggles Moto wrote:
CharlieKelly wrote:
YigglesMoto wrote:

I have never used
Code:
function()
{
    //code
}


It just kills me to even look at it

Yea I always like the first version... but looking at my codebase I've been using that way almost exclusively lmao, didn't even notice.
I think it just auto-formats like that in Visual Studio and I've been too lazy to change it.

Fuck it, as long as its consistent idgaf.


Like this?
Image


What program is that running in? in IDLE mines doesn't look like that
https://www.redditgifts.com/?inv=CMv5 Join reddit gifts and get free items but you do have to send back gifts or you'll get penalized
After reading every EgN Post
Image

Image

Image

Image

Image

Image


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 10, 2017 12:30 pm 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:43792252
Joined: Wed Nov 11, 2015 4:07 pm
Posts: 2713
The editor looks a lot like the default Sublime Text 2 or 3 theme to me. Which is just an editor and not a whole IDE but I believe you can install plugins/compilers with Sublime to make it closer to an IDE.
-No Pity For A Coward-
http://cdn.funnyisms.com/ecc914b3-1ce2-4aa7-8b36-992cf563121f.jpg
"im srry, i din mean it massta, lil simple is gone be a good boy massta" -Mr. Simplistic
"Your taste in music is A2+ and I like how you moto." -Needy

Image


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 10, 2017 1:38 pm 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:221617357
Joined: Thu May 19, 2016 9:30 am
Posts: 2168
Location: United Kingdom
Guys I'm a beginner calm down, will take your response though, thanks guys.

It was only some quick work, wasn't some hard graft.

I just copied and pasted it, didn't sort it all out, I'll come to you as my main man if you want me to @Yiggles, considering you're the brains of the clan, well Id rather prefer you thab anyone else.

Yeah yiggles I meant C++, been a while since I've used it.

Also thanks Charlie for your work time to steal it gg, jkjk.

I am thinking of going full on with this, I am really enjoying it and want to persue programming/coding in general.




Will do yiggles


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 10, 2017 2:15 pm 
EgN Member
Steam ID: STEAM_0:1:39709905
Joined: Thu Nov 05, 2015 3:18 am
Posts: 229
Location: 30 Min from Aleppo, Syria
Heres something I wrote last year while learning Java
plz r8 no h8


import java.util.*;
public class Main {
//Shows the Winning Matrix in order.
public static String[][] answer = {
{"Yellow","Blue","Red","Green","White"},
{"Norwegian", "Danish", "English", "German", "Swede"},
{"Water", "Tea", "Milk", "Coffee", "Beer"},
{"Dunhills", "Blends", "PallMalls", "Princes", "BlueMasters"},
{"Cats", "Horses", "Birds", "Fish", "Dogs"}
};
//Making a blank matrix for the player to fill
public static String[][] user = new String[5][5];

public static Scanner scanner = new Scanner(System.in);
//Another part of filling the blank matrix. null->empty
public static void main(String[] args) {
for(int i=0; i<5 ; i++){
for(int j=0; j<5; j++){
user[i][j] = null;
}
}
//Giving options for selection
System.out.println("ENTER SELECTION 1.WRITE CLUE 2,PRINT USER TABLE 3. PRINT ANSWERS 4.PRINT HINTS");
int select = scanner.nextInt();
looper(select);


}
//Runs the input selection
public static boolean input(){
int row,col;
String in="000";
System.out.println("Enter col number");
col = scanner.nextInt()-1;
System.out.println("Enter row number");
row = scanner.nextInt()-1;
System.out.println("Enter clue hint");
scanner.nextLine();
in = scanner.nextLine();
user[col][row] = in;
//System.out.println("Enter any key to continue...");
return true;
}
//Used either player or final matrix is wanted
public static void print(String[][] a){
String[][] print = a;
for (int i = 0; i <5; i++) {

System.out.println();
for (int j = 0; j < 5; j++) {
System.out.print(print[i][j]+" ");
}
}
}
//Checks if player wins the game. IS CASE SENSITIVE
public static boolean userCheck(){
boolean win = false;
if(Arrays.equals(answer, user)){
win = true;
}
return win;
}
//Used for after selection. Tells the program which selection to run.
public static void looper(int x){


switch(x){
case 1:
//Runs user input
boolean bs = input();
break;
case 2:
//Shows users current matrix
print(user);
break;
case 3:
//Shows game winning matrix
print(answer);
break;
case 4:
//Prints the hints
hintPrint();
break;
default:
//Cases program to crash if user enter invalid input
System.out.println(1/0);
}
System.out.println("ENTER NEXT SELECTION");
int loopTemp = scanner.nextInt();
//throws program into loop until matix is win game
looper(loopTemp);

}

//Prints the hints
public static void hintPrint(){
System.out.println("The Englishman lives in the red house. \n"
+"The Swede keeps dogs.\n"
+"The Dane drinks tea.\n"
+"The green house is just to the left of the white one.\n"
+"The owner of the green house drinks coffee.\n"
+"The Pall Mall smoker keeps birds.\n"
+"The owner of the yellow house smokes Dunhills.\n"
+"The man in the center house drinks milk.\n"
+"The Norwegian lives in the first house.\n"
+"The Blend smoker has a neighbor who keeps cats.\n"
+"The man who smokes Blue Masters drinks bier.\n"
+"The man who keeps horses lives next to the Dunhill smoker.\n"
+"The German smokes Prince.\n"
+"The Norwegian lives next to the blue house.\n"
+"The Blend smoker has a neighbor who drinks water.\n");
}


}
Drop Out of Highschool [x]
Get a GED [x]
Drop Out of Community College [x]
Get a full University Scholarship to a respectable University[x]
Graduate [ ]
Get a job that I am wayyy under qualified for [x]
Get that one girl [ ]
Marry that one girl [ ]
??? [x]
Make miniature Silvers [ ]


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 10, 2017 2:26 pm 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:43792252
Joined: Wed Nov 11, 2015 4:07 pm
Posts: 2713
Yeah no way am I going to read through that without formatting, sorry.
-No Pity For A Coward-
http://cdn.funnyisms.com/ecc914b3-1ce2-4aa7-8b36-992cf563121f.jpg
"im srry, i din mean it massta, lil simple is gone be a good boy massta" -Mr. Simplistic
"Your taste in music is A2+ and I like how you moto." -Needy

Image


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 17, 2017 7:39 am 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:221617357
Joined: Thu May 19, 2016 9:30 am
Posts: 2168
Location: United Kingdom
I used a bit of Charlie's code (well mainly all of it just to try it out lol) but I am stuck and do not understand this bit.

When he uses:

Code:
switch (randomNumber))


it brings up an error saying randomNumber is used as a method but is a variable, here is the screenshot.

Can yiggles help me with this or Charlie?

Edit: my programming teacher is off sick and yeah...


You do not have the required permissions to view the files attached to this post.
BRITNEY SPEARS killed <>< with knife.

Image

Spoiler: Show


Spoiler: Show

Spoiler: Show


1. Join EgN [ X ]
2. Become a Recruit [ X ]
3. Become an EgN Member [ X ]
4. Become a Admin [ X ]
5. Become an Elite [ X ]
6. Become a Veteran [ X ]
7. Become a part of Events Team [ X ]
8. Become a Manager [ ]
9. Become a Staff [ X ]
10. Become an Advisor [ ]
11. Become the next EgN Leader! [ ]

EgN| Mr Geeza™ : Why do I always get you and sinister mixed up lol sorry xD
EgN-S| Phillip: Cause you a racist

Jafari asks the wall: What is the meaning of life?
The wall responds with: Kill yourself. DUN DUN DUUUUUUUUUUN
EgN-S| Mr.GoldGames: I asked for a demotion, where's my demotion at?
1 month later....
The following people have been recognised for their service to the community:

Veteran to Staff
Mr.GoldGames

EgN-S| Mr.GoldGames: I ask for a demotion but I got a promotion instead? Life sucks sometimes.


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 17, 2017 8:14 am 
User avatar
EgN Member
Elder
Steam ID: STEAM_0:1:22040504
Joined: Mon Jan 04, 2016 12:13 am
Posts: 1404
Location: Philadelphia, PA
Mr.Geeza wrote:
I used a bit of Charlie's code (well mainly all of it just to try it out lol) but I am stuck and do not understand this bit.

When he uses:

Code:
switch (randomNumber))


it brings up an error saying randomNumber is used as a method but is a variable, here is the screenshot.

Can yiggles help me with this or Charlie?

Edit: my programming teacher is off sick and yeah...


Read the error message... it explains it very clearly.

"randomNumber" is declared as a variable, how do you use a variable?
How are you trying to use the variable "randomNumber" right now?

Right now the switch is trying to call the function "randomNumber", but there is not a function called that; besides, inside the scope of the function there is a variable with the same name.

If you haven't learned switches, they are like variable if-statements. They just make it easier to "switch" out different code portions.

switch = if () else if {} else if {} else if {} else if {} ...etc

Don't think too hard, the error isn't that huge (and I mighta edited it in thinking I fixed it :P, but this way you learn at least, instead of copy / paste)
Gonna revise your Levi's with physical harm
Put divets in the rivets with my physical arm
Gonna beat those jeans, gonna dip em in slime
Turn your 501s into 499s

The Senate: Did you ever hear the tragedy of Darth Plagueis The Wise?
Anakin: No
The Senate: I thought not. It’s not a story the Jedi would tell you. It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side, he could even keep the ones he cared about from dying.
Anakin: He could actually save people from death?
The Senate: The dark side of the Force is a pathway to many abilities some consider to be unnatural.
Anakin: What happened to him?
The Senate: He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself.
Anakin: Is it possible to learn this power?
The Senate: Not from a Jedi.


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 17, 2017 8:43 am 
User avatar
Staff
Legend
Steam ID: STEAM_0:1:221617357
Joined: Thu May 19, 2016 9:30 am
Posts: 2168
Location: United Kingdom
CharlieKelly wrote:
Mr.Geeza wrote:
I used a bit of Charlie's code (well mainly all of it just to try it out lol) but I am stuck and do not understand this bit.

When he uses:

Code:
switch (randomNumber))


it brings up an error saying randomNumber is used as a method but is a variable, here is the screenshot.

Can yiggles help me with this or Charlie?

Edit: my programming teacher is off sick and yeah...


Read the error message... it explains it very clearly.

"randomNumber" is declared as a variable, how do you use a variable?
How are you trying to use the variable "randomNumber" right now?

Right now the switch is trying to call the function "randomNumber", but there is not a function called that; besides, inside the scope of the function there is a variable with the same name.

If you haven't learned switches, they are like variable if-statements. They just make it easier to "switch" out different code portions.

switch = if () else if {} else if {} else if {} else if {} ...etc

Don't think too hard, the error isn't that huge (and I mighta edited it in thinking I fixed it :P, but this way you learn at least, instead of copy / paste)


Ah. Sweet thanks, just was a but stuck that's all. Cheers buddy
BRITNEY SPEARS killed <>< with knife.

Image

Spoiler: Show


Spoiler: Show

Spoiler: Show


1. Join EgN [ X ]
2. Become a Recruit [ X ]
3. Become an EgN Member [ X ]
4. Become a Admin [ X ]
5. Become an Elite [ X ]
6. Become a Veteran [ X ]
7. Become a part of Events Team [ X ]
8. Become a Manager [ ]
9. Become a Staff [ X ]
10. Become an Advisor [ ]
11. Become the next EgN Leader! [ ]

EgN| Mr Geeza™ : Why do I always get you and sinister mixed up lol sorry xD
EgN-S| Phillip: Cause you a racist

Jafari asks the wall: What is the meaning of life?
The wall responds with: Kill yourself. DUN DUN DUUUUUUUUUUN
EgN-S| Mr.GoldGames: I asked for a demotion, where's my demotion at?
1 month later....
The following people have been recognised for their service to the community:

Veteran to Staff
Mr.GoldGames

EgN-S| Mr.GoldGames: I ask for a demotion but I got a promotion instead? Life sucks sometimes.


Top
 Profile  
  
Offline 
PostPosted: Tue Jan 17, 2017 9:07 am 
User avatar
EgN Member
Elder
Steam ID: STEAM_0:1:34125752
Joined: Fri Aug 02, 2013 5:38 pm
Posts: 769
Location: Earth
Lol, add them to the IT team Yiggles, and give them access to the repo. Then teach them Python (assuming they haven't already learned it, like they probably should have).

Then BOOM, new IT team.

Also, I used to use this format:

\\"blah" function does this that and the other thing
\\"%cl" is for client; "%arg" is for the argument
function blah(%cl, %arg)
{
//code
}

It's not letting me do indents on this for some reason, but imagine there's an indent for the code.
Of course, this was on a shitty scripting language that I haven't used in years. (Torquescript. If you've heard of it, you probably know how shitty it is)

Python's fairly similar in the way I indent it and comment it, but generally I just group things together now-a-days, such as my imports, and then do smaller comments here and there.
Beep boop.


Top
 Profile  
  
Display posts from previous:  Sort by  
New Topic Post Reply  [ 25 posts ]  Go to page
 Previous << 
1, 2, 3
 >> Next 


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  

cron
Powered by phpBB3 ©
Website mods by Doldol, banner by 3n19ma, synthic, Mootiny.