• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 22:21
CEST 04:21
KST 11:21
  • 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
Maestros of the Game: Week 1/Play-in Preview9[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway132v2 & SC: Evo Complete: Weekend Double Feature4Team Liquid Map Contest #21 - Presented by Monster Energy10
Community News
Weekly Cups (August 25-31): Clem's Last Straw?32Weekly Cups (Aug 18-24): herO dethrones MaxPax6Maestros of The Game—$20k event w/ live finals in Paris46Weekly Cups (Aug 11-17): MaxPax triples again!15Weekly Cups (Aug 4-10): MaxPax wins a triple6
StarCraft 2
General
Team Liquid Map Contest #21 - Presented by Monster Energy Heaven's Balance Suggestions (roast me) Speculation of future Wardii series Weekly Cups (August 25-31): Clem's Last Straw? Geoff 'iNcontroL' Robinson has passed away
Tourneys
LiuLi Cup - September 2025 Tournaments Sea Duckling Open (Global, Bronze-Diamond) Sparkling Tuna Cup - Weekly Open Tournament Maestros of The Game—$20k event w/ live finals in Paris Monday Nights Weeklies
Strategy
Custom Maps
External Content
Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast Mutation # 486 Watch the Skies
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ Simple editing of Brood War save files? (.mlx) ASL20 General Discussion Starcraft at lower levels TvP BW General Discussion
Tourneys
[Megathread] Daily Proleagues Is there English video for group selection for ASL [ASL20] Ro24 Group F [IPSL] CSLAN Review and CSLPRO Reimagined!
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Warcraft III: The Frozen Throne Nintendo Switch Thread Mechabellum
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
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
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread YouTube Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s) Gtx660 graphics card replacement
TL Community
The Automated Ban List TeamLiquid Team Shirt On Sale
Blogs
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
How Culture and Conflict Imp…
TrAiDoS
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
INDEPENDIENTE LA CTM
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 713 users

The Big Programming Thread - Page 224

Forum Index > General Forum
Post a Reply
Prev 1 222 223 224 225 226 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.
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
December 29 2012 19:14 GMT
#4461
On December 30 2012 04:05 windzor wrote:
Show nested quote +
On December 30 2012 04:04 Recognizable wrote:
Is a library the same thing as a list? Can't find it on google.


In what context? My guess is, that in yours it's a no.


Ok. I probably haven't learned what it is yet. I'll cross paths with libraries someday and keep it in mind when tackling problem 3.
heishe
Profile Blog Joined June 2009
Germany2284 Posts
December 29 2012 19:20 GMT
#4462
On December 30 2012 04:14 Recognizable wrote:
Show nested quote +
On December 30 2012 04:05 windzor wrote:
On December 30 2012 04:04 Recognizable wrote:
Is a library the same thing as a list? Can't find it on google.


In what context? My guess is, that in yours it's a no.


Ok. I probably haven't learned what it is yet. I'll cross paths with libraries someday and keep it in mind when tackling problem 3.


Are you speaking of the C# library class? Then it's a clear no. The library class that provides key->value mappings for fast lookups while list is... well, a list.
If you value your soul, never look into the eye of a horse. Your soul will forever be lost in the void of the horse.
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
December 29 2012 21:26 GMT
#4463
Wait, are we talking about dictionaries(in Python)? Anyway I'll solve the problem some way, some day.
heishe
Profile Blog Joined June 2009
Germany2284 Posts
December 29 2012 21:42 GMT
#4464
On December 30 2012 06:26 Recognizable wrote:
Wait, are we talking about dictionaries(in Python)? Anyway I'll solve the problem some way, some day.


Actually, I was confused. The C# dictionary is "dictionary" in C# as well. Don't know what you mean by library then.
If you value your soul, never look into the eye of a horse. Your soul will forever be lost in the void of the horse.
tec27
Profile Blog Joined June 2004
United States3701 Posts
December 29 2012 23:39 GMT
#4465
He's talking about library in what AmericanUmlaut said, IE: a library to store the number you're factoring. He means a module, or a set of classes, or something along those lines (which you might need to store the number you're factoring because it is likely to be larger than a normal integer, and not all languages have built in large number classes).
Can you jam with the console cowboys in cyberspace?
Recognizable
Profile Blog Joined December 2011
Netherlands1552 Posts
December 30 2012 12:40 GMT
#4466
On December 30 2012 08:39 tec27 wrote:
He's talking about library in what AmericanUmlaut said, IE: a library to store the number you're factoring. He means a module, or a set of classes, or something along those lines (which you might need to store the number you're factoring because it is likely to be larger than a normal integer, and not all languages have built in large number classes).


http://www.tutorialspoint.com/python/python_classes_objects.htm
It's probably in the advanced section here somewhere? I've just started with Classes/Objects.
b3n3tt3
Profile Joined January 2012
595 Posts
Last Edited: 2012-12-30 13:24:00
December 30 2012 13:20 GMT
#4467
A hint to the euler #3:+ Show Spoiler +
checking divisibility can be done by mod(%),
mathematically all prime factors of n are <sqrt(n), so checking for primality upto the sqrt should shave a lot of time
AmericanUmlaut
Profile Blog Joined November 2010
Germany2577 Posts
December 30 2012 14:22 GMT
#4468
When I said "library" I was referring to an external component that offers a collection of classes and/or functions. The reason is that most languages (that I am familiar with) don't offer native support for integers larger than 32 bits, so if you want to store anything larger than that you'll need to use a library that includes a class for very large integers. I think I've read that Python supports larger ints natively, and C has a "long long int" or something like that that supports larger integers, but most languages don't.
The frumious Bandersnatch
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
December 30 2012 15:26 GMT
#4469
On December 30 2012 23:22 AmericanUmlaut wrote:
When I said "library" I was referring to an external component that offers a collection of classes and/or functions. The reason is that most languages (that I am familiar with) don't offer native support for integers larger than 32 bits, so if you want to store anything larger than that you'll need to use a library that includes a class for very large integers. I think I've read that Python supports larger ints natively, and C has a "long long int" or something like that that supports larger integers, but most languages don't.


For some of the euler examples, a 64bit integer won't be enough.

I did most of that either in Perl - which has native support for integers of basically unlimited size - or in C with Gnu MP. Don't know about python.
Shenghi
Profile Joined August 2010
167 Posts
December 30 2012 19:12 GMT
#4470
As far as I'm aware Python has no defined maxmimum number. It's only limited by available address space.
People are not born stupid, they choose to be stupid. If you made that choice, please change your mind.
Frigo
Profile Joined August 2009
Hungary1023 Posts
December 31 2012 16:58 GMT
#4471
Just transitioned from Subversion to Mercurial since my build- and file server is dead and can't access svn repos. Tried the same with Git at the previous server death but it only made my hair stand on end. However the transition to Mercurial was surprisingly easy, TortoiseHg is easy to use. Have yet to push/pull/synchronize it with other repositories though.

Also transitioned from Ant to Gradle, due to the former's inability to generate Eclipse .classpath files based on Ivy dependencies. Again, this was suprisingly easy, was done in 20 minutes most, with my smallish prior experience in Gradle. My build.gradle is like 12 lines long. Have yet to configure Jenkins to use it, but since my server is dead, this is a non-issue at the moment.

However Gradle runs unit tests very slowly for some reason, I'm looking into it at the moment. Apart from this, both utils are recommended.
http://www.fimfiction.net/user/Treasure_Chest
ptrpb
Profile Joined March 2011
Canada753 Posts
Last Edited: 2013-01-01 23:00:07
January 01 2013 22:14 GMT
#4472
nevermind, found the problem
MBAACC | SG | shit at fighting games
TriZen
Profile Blog Joined March 2011
England219 Posts
Last Edited: 2013-01-04 00:43:43
January 03 2013 23:02 GMT
#4473
Heyy, I haven't posted in here before.. probably because I don't really do much programming.

However! It is a part of my computing degree and I am currently stuck on using a jTable with a connected element being a database table. I have absolutely no clue how to sort the table, or have it sorted on load.

If you think you could help, I've put more details of the problem in the spoiler below!

+ Show Spoiler +

The IDE I am using is Netbeans. Had to create a league management system for a given scenario, I have everything done but the jTable sort.

[image loading]

If you have any idea on how I would go about having this load using SQL ORDER BY Points desc (or any other way); i'd greatly appreciate the help.

I really thought it'd be regarding the following statement:

teamQuery = java.beans.Beans.isDesignTime() ? null : AlumniDBPUEntityManager.createQuery("SELECT t FROM Team t");

However changing the SQL at all just presents numerous bugs.


Hopefully when my programming improves i can contribute to this thread more, however at the moment I only really know SQL, html and vb. Thanks in advance :D

Edit: Solved this now - was a simple mistake using sql (solution was SELECT t FROM Team t ORDER BY (t.points) DESC, (t.difference) DESC, (t.name) ASC).
Hug-A-Hydralisk
Profile Joined February 2012
United States174 Posts
January 03 2013 23:26 GMT
#4474


My brother's trip to Las Vegas along with a programmer from Silicon Valley.
Get your PC gaming fix here: http://www.youtube.com/cinicraft YOU KNOW YOU WANT TO!!
DeepBlu2
Profile Blog Joined April 2004
United States975 Posts
January 03 2013 23:48 GMT
#4475
Anyone mind suggesting a good starting language that is important, and a good resource for learning it?
u gotta sk8
Craton
Profile Blog Joined December 2009
United States17250 Posts
Last Edited: 2013-01-04 04:02:50
January 04 2013 00:05 GMT
#4476
C#.NET and C++ are both in pretty high demand are are pretty prevalent in the industry. I don't know how Java stacks up to those, but I imagine it's in strong demand. C# would be the easier one to start with of the first two. I don't really have good learning resources, though.
twitch.tv/cratonz
phar
Profile Joined August 2011
United States1080 Posts
January 04 2013 03:00 GMT
#4477
There are links in the first post of this topic for learning stuffs. If you've done a total of 0 programming before, I would recommend starting with a less syntax heavy language, like Python. Also, learnpythonthehardway.org
Who after all is today speaking about the destruction of the Armenians?
icystorage
Profile Blog Joined November 2008
Jollibee19350 Posts
Last Edited: 2013-01-04 15:42:15
January 04 2013 11:22 GMT
#4478
http://programmerryangosling.tumblr.com/

have you guys seen this? lol pretty funny stuff.

CSS questions:
+ Show Spoiler +

[image loading]


1) how do I extend the width of the main menu bar to fit whole page dynamically?
2) same with the submenu

HTML
+ Show Spoiler +
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="primary.css" type="text/css" />
<title>Untitled Document</title>
</head>
<body>
<div id="container">
<ul id="menu">
<li><a href="#">News</a>
<ul>
<li><a href="#">legacy</a></li>
</ul></li>
<li><a href="#">Expertise</a></li>
<li><a href="#">journey</a>
<ul>
<li><a href="#">legacy</a></li>
<li><a href="#">journey</a></li>
</ul> </li>
<li><a href="#">Solutions</a>
<ul>
<li><a href="#">legacy</a></li>
<li><a href="#">journey</a></li>
<li><a href="#">rally</a></li>
</ul></li>
<li><a href="#">Publications</a>
<ul>
<li><a href="#">legacy</a></li>
<li><a href="#">journey</a></li>
<li><a href="#">rally</a></li>
<li><a href="#">legacy</a></li>
<li><a href="#">journey</a></li>
<li><a href="#">rally</a></li>
</ul>
</li>
<li><a href="#">Regimbeau</a></li>
<li><a href="#" class="hidden">Career</a></li>
<li><a href="#">Contact</a></li>
</ul>
<!--container--></div>
</body>
</html>



CSS
+ Show Spoiler +
html, body {
margin: 0;
font: 100% "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000 ;
background: #000 ;
}
/* HTML5 tags */
header, section, footer,
aside, nav, article, figure {display: block;}
/*
#container {
width: 1000px;
margin: 30px auto 900px;
padding: 0 0 500px;
background: #999 ;
overflow: auto;
text-transform: uppercase;
}
*/

ul#menu {
width:1000px;
text-transform: uppercase;} /* menu properties */

ul#menu ul {width: 500px;} /* controls the number of submenus per row */
ul#menu, ul#menu ul{
list-style-type: none;
font-size: 1em;
background: #f00 ;
} /* submenu properties */
ul#menu li {
height: 30px;
line-height: 30px;
width: 125px;
float: left;
color: #fff ;
}
ul#menu li ul{display: none;} /* hides the submenus*/
ul#menu li:hover ul{display : inline-block;} /* shows submenus on hover*/
ul#menu ul li a {
width: 125px;
float: left;
color: #fff;
} /*submenus items properties*/
ul#menu a{
display: block;
text-decoration: none;
color: #fff ;
} /*menu items properties*/
ul#menu a:hover,
ul#menu a:active {background: #00f ;}

ul#menu .hidden{
display:none;
} /*Hides the menu */
LiquidDota StaffAre you ready for a Miracle-? We are! The International 2017 Champions!
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2013-01-05 02:40:22
January 05 2013 02:38 GMT
#4479
I would use media queries because I don't like JS, and I don't like percentage solutions like the one below.


If you're talking simple HTML/CSS, then put the entire main menu in its own container, set that container's CSS to width to "100%", and set the width of each option in your main as a percentage, all of which add up to 100.


Hopefully I'm not misinterpreting.
There is no one like you in the universe.
Saracen
Profile Blog Joined December 2007
United States5139 Posts
January 05 2013 04:26 GMT
#4480
Just started on ProjectEuler... Is it cheating to use Python? It feels like it's cheating, since Python has pretty much infinite integer precision afaik...

For example, for number 16...
+ Show Spoiler +
reduce(lambda x, y: int(x) + int(y), list(str(2 ** 1000)))

...seems just unfair when it seems like they're looking for a clever/elegant way to deal with large numbers.
Prev 1 222 223 224 225 226 1031 Next
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
SEL S2 Championship: Playoffs
CranKy Ducklings128
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 109
Vindicta 84
StarCraft: Brood War
Britney 12693
Artosis 879
sSak 67
NaDa 29
Icarus 10
yabsab 8
Dota 2
NeuroSwarm116
LuMiX1
Counter-Strike
taco 239
Super Smash Bros
hungrybox580
AZ_Axe84
Other Games
summit1g6686
shahzam912
C9.Mang0641
JimRising 460
ViBE160
Sick125
Maynarde103
Livibee78
Mew2King59
Nathanias20
Organizations
Other Games
gamesdonequick912
BasetradeTV25
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH229
• davetesta2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 1
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Doublelift5739
Other Games
• Scarra1045
Upcoming Events
The PondCast
7h 39m
RSL Revival
7h 39m
Maru vs SHIN
MaNa vs MaxPax
Maestros of the Game
14h 39m
Classic vs TriGGeR
Reynor vs SHIN
OSC
1d
MaNa vs SHIN
SKillous vs ShoWTimE
Bunny vs TBD
Cham vs TBD
RSL Revival
1d 7h
Reynor vs Astrea
Classic vs sOs
Maestros of the Game
1d 14h
Serral vs Ryung
ByuN vs Zoun
BSL Team Wars
1d 16h
Team Bonyth vs Team Dewalt
CranKy Ducklings
2 days
RSL Revival
2 days
GuMiho vs Cham
ByuN vs TriGGeR
Cosmonarchy
2 days
TriGGeR vs YoungYakov
YoungYakov vs HonMonO
HonMonO vs TriGGeR
[ Show More ]
Maestros of the Game
2 days
Solar vs Bunny
Clem vs Rogue
[BSL 2025] Weekly
2 days
RSL Revival
3 days
Cure vs Bunny
Creator vs Zoun
Maestros of the Game
3 days
Maru vs Lambo
herO vs ShoWTimE
BSL Team Wars
3 days
Team Hawk vs Team Sziky
Sparkling Tuna Cup
4 days
Monday Night Weeklies
4 days
Liquipedia Results

Completed

CSL Season 18: Qualifier 2
SEL Season 2 Championship
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL 2025 AUTUMN (S18)
RSL Revival: Season 2
Maestros of the Game
Sisters' Call Cup
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

LASL Season 20
2025 Chongqing Offline CUP
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
EC S1
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
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.