• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 19:29
CEST 01:29
KST 08:29
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall10HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Firefly given lifetime ban by ESIC following match-fixing investigation12$25,000 Streamerzone StarCraft Pro Series announced6Weekly Cups (June 30 - July 6): Classic Doubles6[BSL20] Non-Korean Championship 4x BSL + 4x China9Flash Announces Hiatus From ASL66
StarCraft 2
General
Firefly given lifetime ban by ESIC following match-fixing investigation The SCII GOAT: A statistical Evaluation TL Team Map Contest #4: Winners Weekly Cups (June 30 - July 6): Classic Doubles The GOAT ranking of GOAT rankings
Tourneys
$25,000 Streamerzone StarCraft Pro Series announced FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series WardiTV Mondays
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ASL20 Preliminary Maps [G] Progamer Settings [ASL19] Finals Recap: Standing Tall SC uni coach streams logging into betting site
Tourneys
[Megathread] Daily Proleagues [BSL20] Non-Korean Championship 4x BSL + 4x China [BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Positive Thoughts on Setting Up a Dual-Caliber FX
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Summer Games Done Quick 2025! Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
momentary artworks from des…
tankgirl
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 630 users

The Big Programming Thread - Page 587

Forum Index > General Forum
Post a Reply
Prev 1 585 586 587 588 589 1031 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
February 15 2015 19:06 GMT
#11721
On February 16 2015 03:57 Blitzkrieg0 wrote:
If you're going to put them in an arraylist the smart way to do it would just be a for loop.

ArrayList myList = new ArrayList<MyObject>();
for (int i = 0; i < 100 ; i++) {
myList[i] = new MyObject();
if (i % 2 == 0)
myList[i].setX();
}


I don't need to name them all something since I'm going to be accessing them from the list structure and never use the name anyway.


Well, if I do this, sure I am storing a ton of new objects, but X will have the value of 5 in all of them. I want X to already be set to 10 in many of them.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2015-02-15 19:08:14
February 15 2015 19:07 GMT
#11722
On February 16 2015 04:06 travis wrote:
Show nested quote +
On February 16 2015 03:57 Blitzkrieg0 wrote:
If you're going to put them in an arraylist the smart way to do it would just be a for loop.

ArrayList myList = new ArrayList<MyObject>();
for (int i = 0; i < 100 ; i++) {
myList[i] = new MyObject();
if (i % 2 == 0)
myList[i].setX();
}


I don't need to name them all something since I'm going to be accessing them from the list structure and never use the name anyway.


Well, if I do this, sure I am storing a ton of new objects, but X will have the value of 5 in all of them. I want X to already be set to 10 in many of them.


That is what the if i%2 does. It'll change every other one to 10. You can change the logic of the IF statement to do something else.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Manit0u
Profile Blog Joined August 2004
Poland17245 Posts
Last Edited: 2015-02-15 19:28:45
February 15 2015 19:15 GMT
#11723
On February 16 2015 03:59 goody153 wrote:
Any linux guru/user here ?

What are the best linux server OS that i should use if i am going to utilize lamp lamp ?


It depends on what you need. Debian is usually the go-to distro for the servers due to its stability and security (you get slightly older packages but you get guaranteed stability and security for that, if you want bleeding edge you'd have to sacrifice that). Another alternative would be CentOS.

http://stackoverflow.com/questions/62222/centos-or-debian-as-a-server-os

Personally, I'd go with Debian + LEMP stack to get better performance, great stability, security and tons of easy-to-find help on the web. I find working with Nginx a lot easier than Apache and you get much better performance from that too. Unless you really, really need Apache to run some scripts in the back-end, then you can go with both Nginx and Apache - Nginx working as a reverse proxy for the Apache.
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-15 19:26:16
February 15 2015 19:20 GMT
#11724
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
February 15 2015 20:17 GMT
#11725
On February 16 2015 03:59 goody153 wrote:
Any linux guru/user here ?

What are the best linux server OS that i should use if i am going to utilize lamp lamp ?


That is like asking whether the protestant, catholic or muslim religion is better.
Most linux distributions work in server environment with often only tiny differences. I prefer CentOS, at work we use some Debian spin-off, ...

The main differences are yum vs apt and some differences in file system layout, e.g. Debian has the Apache HTTPD config in /etc/apache2, CentOS in /etc/httpd and other small stuff. Pick whichever you are more familiar with, because it doesn't actually really matter (but CentOS is better ).
Ropid
Profile Joined March 2009
Germany3557 Posts
February 15 2015 20:43 GMT
#11726
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?
"My goal is to replace my soul with coffee and become immortal."
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-15 21:10:27
February 15 2015 21:06 GMT
#11727
On February 16 2015 05:43 Ropid wrote:
Show nested quote +
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object
Ropid
Profile Joined March 2009
Germany3557 Posts
Last Edited: 2015-02-15 21:52:39
February 15 2015 21:52 GMT
#11728
On February 16 2015 06:06 travis wrote:
Show nested quote +
On February 16 2015 05:43 Ropid wrote:
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object

Yes, that's what I don't understand. When you do something like this:

myObject = new Whatever();
myObject.setSomeAttribute(...);
myList[counter] = myObject;

And then you repeat that a bunch of times.

Why would that lead to a problem in Java? Shouldn't it be all different objects?
"My goal is to replace my soul with coffee and become immortal."
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-15 21:59:48
February 15 2015 21:57 GMT
#11729
nope, because myList saves a reference to the object, not the object's values.

So myList[0] would point to myObject, myList[1] would point to myObject, myList[3] would point to myObject, etc.

then if myObjects values change, it will say the new values regardless of which myList you call.



Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2015-02-15 22:25:43
February 15 2015 22:17 GMT
#11730
On February 16 2015 06:52 Ropid wrote:
Show nested quote +
On February 16 2015 06:06 travis wrote:
On February 16 2015 05:43 Ropid wrote:
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object

Yes, that's what I don't understand. When you do something like this:

myObject = new Whatever();
myObject.setSomeAttribute(...);
myList[counter] = myObject;

And then you repeat that a bunch of times.

Why would that lead to a problem in Java? Shouldn't it be all different objects?


If you're putting it straight into a list there is no point in not just doing
myList[counter] = new Whatever();

If you need to set something it should be done as a parameter to the constructor.

On February 16 2015 06:57 travis wrote:
Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.


Your original code creates two references to the same object. The first one is the myObject reference and the second is the one in the list. Chances are you're going to go out of scope right after this which will set the first reference for garbage collection, but creating it in the first place is a waste of memory. I'm not sure what you mean by actual reference. Arrays always hold references in Java (unless it's an array of primitives).
I'll always be your shadow and veil your eyes from states of ain soph aur.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
February 15 2015 23:01 GMT
#11731
I'm restructuring the code bases for some of my side projects (moving things into folders, shuffling some projects), and it's awesome how much crappy code i can find now that i'm looking for it. so sad, yet so good.
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17245 Posts
February 15 2015 23:25 GMT
#11732
On February 16 2015 08:01 Blisse wrote:
I'm restructuring the code bases for some of my side projects (moving things into folders, shuffling some projects), and it's awesome how much crappy code i can find now that i'm looking for it. so sad, yet so good.


Boyscout method FTW!
Time is precious. Waste it wisely.
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
February 15 2015 23:56 GMT
#11733
On February 16 2015 06:57 travis wrote:
nope, because myList saves a reference to the object, not the object's values.

So myList[0] would point to myObject, myList[1] would point to myObject, myList[3] would point to myObject, etc.

then if myObjects values change, it will say the new values regardless of which myList you call.



Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.

You can just do myList [counter] = new whatever.

The arrayList will hold a reference to a different object at each position.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-16 00:01:30
February 15 2015 23:59 GMT
#11734
On February 16 2015 07:17 Blitzkrieg0 wrote:
Show nested quote +
On February 16 2015 06:52 Ropid wrote:
On February 16 2015 06:06 travis wrote:
On February 16 2015 05:43 Ropid wrote:
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object

Yes, that's what I don't understand. When you do something like this:

myObject = new Whatever();
myObject.setSomeAttribute(...);
myList[counter] = myObject;

And then you repeat that a bunch of times.

Why would that lead to a problem in Java? Shouldn't it be all different objects?


If you're putting it straight into a list there is no point in not just doing
myList[counter] = new Whatever();

If you need to set something it should be done as a parameter to the constructor.

Show nested quote +
On February 16 2015 06:57 travis wrote:
Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.


Your original code creates two references to the same object. The first one is the myObject reference and the second is the one in the list. Chances are you're going to go out of scope right after this which will set the first reference for garbage collection, but creating it in the first place is a waste of memory. I'm not sure what you mean by actual reference. Arrays always hold references in Java (unless it's an array of primitives).


I don't really know how to say it, but the difference with your method is that it seems like it creates a new "unique" object each time. Instead of making an object and then putting it's reference into the arraylist, you make the arraylist the reference. is that right? it's what it looks like.


On February 16 2015 08:56 solidbebe wrote:

You can just do myList [counter] = new whatever.

The arrayList will hold a reference to a different object at each position.


yeah this is what blitzkrieg is saying right?
Ropid
Profile Joined March 2009
Germany3557 Posts
February 16 2015 00:01 GMT
#11735
On February 16 2015 06:57 travis wrote:
nope, because myList saves a reference to the object, not the object's values.

So myList[0] would point to myObject, myList[1] would point to myObject, myList[3] would point to myObject, etc.

then if myObjects values change, it will say the new values regardless of which myList you call.



Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.

It's true that things point to the same, actual object somewhere in memory. The thing is, when you repeat your actions, and there's the "myObject = new Whatever()" line, at that point, myObject will point to a new, different object. When you then do myObject.setSomeAttribute(12) etc., this will not change what you've originally saved in myList[...] somewhere. That's how I thought Java works here.
"My goal is to replace my soul with coffee and become immortal."
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
February 16 2015 00:10 GMT
#11736
On February 16 2015 08:59 travis wrote:
Show nested quote +
On February 16 2015 07:17 Blitzkrieg0 wrote:
On February 16 2015 06:52 Ropid wrote:
On February 16 2015 06:06 travis wrote:
On February 16 2015 05:43 Ropid wrote:
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList[i] = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object

Yes, that's what I don't understand. When you do something like this:

myObject = new Whatever();
myObject.setSomeAttribute(...);
myList[counter] = myObject;

And then you repeat that a bunch of times.

Why would that lead to a problem in Java? Shouldn't it be all different objects?


If you're putting it straight into a list there is no point in not just doing
myList[counter] = new Whatever();

If you need to set something it should be done as a parameter to the constructor.

On February 16 2015 06:57 travis wrote:
Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.


Your original code creates two references to the same object. The first one is the myObject reference and the second is the one in the list. Chances are you're going to go out of scope right after this which will set the first reference for garbage collection, but creating it in the first place is a waste of memory. I'm not sure what you mean by actual reference. Arrays always hold references in Java (unless it's an array of primitives).


I don't really know how to say it, but the difference with your method is that it seems like it creates a new "unique" object each time. Instead of making an object and then putting it's reference into the arraylist, you make the arraylist the reference. is that right? it's what it looks like.

Those two things are essentially the same. The assignment still stores the reference of the new object at the array index. Which is the same as putting a reference into the arrayList. The difference is only in at what moment the object is created.
That's the 2nd time in a week I've seen someone sig a quote from this GD and I have never witnessed a sig quote happen in my TL history ever before. -Najda
Prillan
Profile Joined August 2011
Sweden350 Posts
Last Edited: 2015-02-16 01:53:12
February 16 2015 01:52 GMT
#11737
On February 16 2015 06:06 travis wrote:
Show nested quote +
On February 16 2015 05:43 Ropid wrote:
On February 16 2015 04:20 travis wrote:
oh, i didn't really read everything you posted because I knew this solution wouldn't work for my situation. I get it though and that's pretty elegant. technically I am sure I could make this method of modifying the objects after I have put them in the arraylist work but I would have to redesign almost my whole program. in my actual program I am picking and choosing many variables through different methods before I know if I actually want to store it in an array or not.

oh well you live you learn. I'd just post my code but I don't want you guys to have to wade through it.

I think I have figured out a clumsy way to fix what I have done, but I will definitely have to keep what I have learned in mind for next time I try to do something like this.

I don't understand. The object you create and then work on to change it, you have a variable in your code to access it, say "myObject". Wouldn't "myList = myObject" work? What breaks in Java if you do that?


it's because i need it to references different objects for each arraylist position, not the same one. i want each position to have a unique object

This is exactly what Blitzkrieg's code does:
ArrayList myList = new ArrayList<MyObject>();
for (int i = 0; i < 100 ; i++) {
myList[i] = new MyObject();
}

The myList ArrayList now contains 100 references to [i]different objects.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
berated-
Profile Blog Joined February 2007
United States1134 Posts
Last Edited: 2015-02-16 03:02:33
February 16 2015 02:44 GMT
#11738
On February 16 2015 06:57 travis wrote:
nope, because myList saves a reference to the object, not the object's values.

So myList[0] would point to myObject, myList[1] would point to myObject, myList[3] would point to myObject, etc.

then if myObjects values change, it will say the new values regardless of which myList you call.



Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.


That's actually false, and not how java works. You should listen to Ropid. While that way may be confusing, it would not set all the objects to the same thing.

Java does not pass by reference, it passes by value..the value of the reference. So when you do myObject = new Whatever(); .. the value of the reference to your new object is stored in myObject. And then, when you assign it to the array, the value of the reference is the put in the array. When you hit another new Whatever(), the value of that reference is now stored in the variable. It is not reassigning references.
goody153
Profile Blog Joined April 2013
44110 Posts
Last Edited: 2015-02-16 02:50:38
February 16 2015 02:50 GMT
#11739
On February 16 2015 04:15 Manit0u wrote:
Show nested quote +
On February 16 2015 03:59 goody153 wrote:
Any linux guru/user here ?

What are the best linux server OS that i should use if i am going to utilize lamp lamp ?


It depends on what you need. Debian is usually the go-to distro for the servers due to its stability and security (you get slightly older packages but you get guaranteed stability and security for that, if you want bleeding edge you'd have to sacrifice that). Another alternative would be CentOS.

http://stackoverflow.com/questions/62222/centos-or-debian-as-a-server-os

Personally, I'd go with Debian + LEMP stack to get better performance, great stability, security and tons of easy-to-find help on the web. I find working with Nginx a lot easier than Apache and you get much better performance from that too. Unless you really, really need Apache to run some scripts in the back-end, then you can go with both Nginx and Apache - Nginx working as a reverse proxy for the Apache.



On February 16 2015 05:17 Morfildur wrote:
Show nested quote +
On February 16 2015 03:59 goody153 wrote:
Any linux guru/user here ?

What are the best linux server OS that i should use if i am going to utilize lamp lamp ?


That is like asking whether the protestant, catholic or muslim religion is better.
Most linux distributions work in server environment with often only tiny differences. I prefer CentOS, at work we use some Debian spin-off, ...

The main differences are yum vs apt and some differences in file system layout, e.g. Debian has the Apache HTTPD config in /etc/apache2, CentOS in /etc/httpd and other small stuff. Pick whichever you are more familiar with, because it doesn't actually really matter (but CentOS is better ).


I should have mentioned that i was actually looking for other options outside CentOS .. Any other network OS where LAMP works ? thanks for the answers guys
this is a quote
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2015-02-16 03:04:59
February 16 2015 02:58 GMT
#11740
On February 16 2015 11:44 berated- wrote:
Show nested quote +
On February 16 2015 06:57 travis wrote:
nope, because myList saves a reference to the object, not the object's values.

So myList[0] would point to myObject, myList[1] would point to myObject, myList[3] would point to myObject, etc.

then if myObjects values change, it will say the new values regardless of which myList you call.



Blitzkrieg's solution was to just make myList[counter] = new myObject, which I am assuming makes the position in the arraylist the actual reference, instead of making the position in the arraylist hold a reference. that's what I think is happening there, at least.


That's actually false, and not how java works. You should listen to Ropid. While that way may be confusing, it would not set all the objects to the same thing.


okay I think I get it now and I think I see what I did wrong.
Prev 1 585 586 587 588 589 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 31m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech77
StarCraft: Brood War
Artosis 708
NaDa 77
sSak 8
Terrorterran 5
GuemChi 0
Dota 2
NeuroSwarm57
League of Legends
Grubby3626
JimRising 118
Counter-Strike
Fnx 1675
fl0m1368
taco 1366
Stewie2K1127
sgares82
Super Smash Bros
Liquid`Ken55
Heroes of the Storm
Khaldor140
Other Games
summit1g9021
C9.Mang0289
Maynarde157
ViBE116
JuggernautJason57
Sick41
kaitlyn33
Organizations
Other Games
gamesdonequick47332
BasetradeTV73
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• RyuSc2 104
• davetesta43
• HeavenSC 38
• Kozan
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• IndyKCrew
StarCraft: Brood War
• Eskiya23 28
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota22755
League of Legends
• Jankos2060
• TFBlade943
Other Games
• imaqtpie1771
• Scarra1577
• Shiphtur398
Upcoming Events
Replay Cast
31m
RSL Revival
10h 31m
ByuN vs SHIN
Clem vs Reynor
OSC
13h 31m
Replay Cast
1d
RSL Revival
1d 10h
Classic vs Cure
FEL
1d 16h
OSC
1d 20h
RSL Revival
2 days
FEL
2 days
FEL
2 days
[ Show More ]
CSO Cup
2 days
BSL20 Non-Korean Champi…
2 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
3 days
RSL Revival
3 days
FEL
3 days
BSL20 Non-Korean Champi…
3 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Replay Cast
5 days
Liquipedia Results

Completed

Proleague 2025-07-07
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.