• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:37
CEST 22:37
KST 05:37
  • 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
TL.net Map Contest #21: Voting10[ASL20] Ro4 Preview: Descent11Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
Chinese SC2 server to reopen; live all-star event in Hangzhou17Weekly Cups (Oct 13-19): Clem Goes for Four2BSL Team A vs Koreans - Sat-Sun 16:00 CET6Weekly Cups (Oct 6-12): Four star herO85.0.15 Patch Balance Hotfix (2025-10-8)81
StarCraft 2
General
RotterdaM "Serral is the GOAT, and it's not close" 5.0.15 Patch Balance Hotfix (2025-10-8) Weekly Cups (Oct 13-19): Clem Goes for Four Chinese SC2 server to reopen; live all-star event in Hangzhou Weekly Cups (March 17-23): Clem Bounces Back
Tourneys
RSL Season 3 Qualifier Links and Dates $1,200 WardiTV October (Oct 21st-31st) SC2's Safe House 2 - October 18 & 19 INu's Battles #13 - ByuN vs Zoun Tenacious Turtle Tussle
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 496 Endless Infection Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers
Brood War
General
SnOw's Awful Building Placements vs barracks Is there anyway to get a private coach? BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion BSL Season 21
Tourneys
[Megathread] Daily Proleagues 300$ 3D!Community Brood War Super Cup #4 [ASL20] Semifinal B Azhi's Colosseum - Anonymous Tournament
Strategy
BW - ajfirecracker Strategy & Training Current Meta Roaring Currents ASL final [I] Funny Protoss Builds/Strategies
Other Games
General Games
Stormgate/Frost Giant Megathread Path of Exile Nintendo Switch Thread Dawn of War IV ZeroSpace Megathread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread The Chess Thread Russo-Ukrainian War Thread Men's Fashion Thread
Fan Clubs
The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Series you have seen recently... [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Sabrina was soooo lame on S…
Peanutsc
Our Last Hope in th…
KrillinFromwales
Certified Crazy
Hildegard
Rocket League: Traits, Abili…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1904 users

The Big Programming Thread - Page 224

Forum Index > General Forum
Post a Reply
Prev 1 222 223 224 225 226 1032 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 States3702 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
Germany2580 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 States17256 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 1032 Next
Please log in or register to reply.
Live Events Refresh
OSC
16:00
Masters Cup #150 Qual 1-2
davetesta17
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 157
ProTech104
Railgan 90
JuggernautJason84
StarCraft: Brood War
Soulkey 193
Dewaltoss 96
scan(afreeca) 39
NaDa 11
Dota 2
Dendi1217
monkeys_forever205
Counter-Strike
Stewie2K498
Foxcn197
Heroes of the Storm
Liquid`Hasu453
Other Games
Grubby2965
FrodaN1831
fl0m821
Beastyqt534
shahzam390
B2W.Neo151
Skadoodle133
C9.Mang0128
ArmadaUGS87
Trikslyr56
Mew2King45
QueenE43
fpsfer 2
Organizations
Other Games
BasetradeTV134
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Hupsaiya 28
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• RayReign 13
• Michael_bg 3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• imaqtpie2671
Upcoming Events
Tenacious Turtle Tussle
2h 24m
The PondCast
13h 24m
OSC
15h 24m
WardiTV Invitational
1d 14h
Online Event
1d 19h
RSL Revival
2 days
RSL Revival
2 days
WardiTV Invitational
2 days
Afreeca Starleague
3 days
Snow vs Soma
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV Invitational
3 days
CrankTV Team League
3 days
RSL Revival
3 days
Wardi Open
4 days
CrankTV Team League
4 days
Replay Cast
5 days
WardiTV Invitational
5 days
CrankTV Team League
5 days
Replay Cast
6 days
CrankTV Team League
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
BSL 21 Non-Korean Championship
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
CranK Gathers Season 2: SC II Pro Teams
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 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.