• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 15:27
CEST 21:27
KST 04:27
  • 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
[ASL21] Ro8 Preview Pt2: Progenitors4Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun13[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists22
Community News
RSL Revival: Season 5 - Qualifiers and Main Event10Code S Season 1 (2026) - RO12 Results12026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Code S Season 1 (2026) - RO12 Results Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Team Liquid Map Contest #22 - The Finalists MaNa leaves Team Liquid
Tourneys
StarCraft Evolution League (SC Evo Biweekly) 2026 GSL Season 2 Qualifiers Sparkling Tuna Cup - Weekly Open Tournament $1,400 SEL Season 3 Ladder Invitational RSL Revival: Season 5 - Qualifiers and Main Event
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 524 Death and Taxes The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base
Brood War
General
ASL21 General Discussion Why there arent any 256x256 pro maps? BW General Discussion [ASL21] Ro8 Preview Pt2: Progenitors BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL21] Ro8 Day 3 [Megathread] Daily Proleagues [ASL21] Ro8 Day 2 Escore Tournament StarCraft Season 2
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread OutLive 25 (RTS Game) Daigo vs Menard Best of 10 Dawn of War IV Nintendo Switch Thread
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread European Politico-economics QA Mega-thread 3D technology/software discussion Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Movie Stars In Video Games: …
TrAiDoS
ramps on octagon
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1195 users

The Big Programming Thread - Page 1011

Forum Index > General Forum
Post a Reply
Prev 1 1009 1010 1011 1012 1013 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.
Excludos
Profile Blog Joined April 2010
Norway8255 Posts
October 08 2019 14:39 GMT
#20201
On October 06 2019 19:46 SC-Shield wrote:
Just out of curiosity, how long do you stay at company on average?


I only spent a year in my first two jobs, quitting both because I was unhappy (and because I was making dirt compared to what I should have been making).

This time I'm amazingly happy at a small-end consultant company owned by the employees (and subsequently, all the profits are either used on the employees, or goes into the employees' pockets), and I just bought in on some shares too. So I'll probably be staying here for a while until I decide to move over into a more management oriented job, which is years and years away.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-11 12:57:22
October 11 2019 12:12 GMT
#20202
How to debug POST requests in django?
In my template i have
 <input type="submit" value="Save"> 
when i click it i see that POST is made and it returns OK
 [11/Oct/2019 13:58:38] "POST /ship_systems_base/2/ HTTP/1.1" 200 24582 
but the data in database is not changed. How to debug this? How to see what is posted to database (i suspect something different than i think it is but how to debug this ???).

EDIT: The answer is (for those interested) if You have Your fields declared in views.py and do not use those fields in template You will get post OK but data will not be saved (even if You have default or blank declared for those fields not used fields).
Pathetic Greta hater.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
October 17 2019 09:28 GMT
#20203
Is still someone reading this topic or have i scared everyone away with my django questions ??
Pathetic Greta hater.
Excludos
Profile Blog Joined April 2010
Norway8255 Posts
October 17 2019 09:54 GMT
#20204
On October 17 2019 18:28 Silvanel wrote:
Is still someone reading this topic or have i scared everyone away with my django questions ??


Not much for anyone to comment on when you asked and answered your own question but it's also a bit specific for most people here (Including myself who have never worked with Django). It's a type of question you'd have more luck asking on StackOverflow or similar
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-17 10:01:36
October 17 2019 10:00 GMT
#20205
Yeah. I figured as much.
I guess i will have to start using StackOverflow. There is too many very specific interactions happening on the borders between html/application/database to get answers simply by browsing documentation.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
October 17 2019 11:20 GMT
#20206
On October 17 2019 19:00 Silvanel wrote:
Yeah. I figured as much.
I guess i will have to start using StackOverflow. There is too many very specific interactions happening on the borders between html/application/database to get answers simply by browsing documentation.


Use the book I posted (it has online version that is completely free). If you go through it you'll see how to debug things and learn how to create and test a full stack web application with Django.
Time is precious. Waste it wisely.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
October 23 2019 17:31 GMT
#20207
Well guys, this will probably be my last semester. You all did it, you successfully got this doofus through a decent CS program.

Anyone hiring for data analysis / ML ? Looking for a cushy job w/ radically high pay.
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
October 23 2019 17:45 GMT
#20208
Data Analysis and ML is actually hiring a lot right now. Try checking out consulting companies - they can be a great place to get started in the field.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-10-27 19:44:26
October 27 2019 19:37 GMT
#20209
I haven't done java in like almost 4 years. Wondering if someone can help me with something.

In my data structures class, I am having to make various structures that use hashing. We have to fill in the methods for each class, it's backed by an interface and the project also includes some other classes we are supposed to use.

In the first structure I am making, the class has:


private KVPairList[] table;


Now, KVPairList is a class we were provided. It seems to be the case that we are supposed to use it.
It is essentially an iterable linked list of KVPair objects (another class we are provided).

The KVPairList class essentially looks like a linked list. It has an inner class, nodes. It has head, tail, etc. It has a constructor:


public KVPairList(){
head = tail = null;
count = 0;
}


So what is going on here? What is KVPairList[]? This object isn't an array. How do I even instantiate a new KVPairList[] ? The only way I can make a new KVPairList is to do:


table[size] = new KVPairList();


But what the heck does this even mean? a new KVPairList() is an empty linked list. So what does it mean for an array of size N to be an empty linked list?

Furthermore, if I do that, it clearly doesn't actually create a KVPairList() because I don't have access to it's methods.
Have they made this project intentionally confusing, or are there java conventions that I am not understanding here?



edit: okay, so does this syntax instantiate an array of size "size", where each index is a new KVPairList?
If so, this assignment is extremely confusing and this is the opposite way of how I would think we should do this lol
Apom
Profile Blog Joined August 2011
France656 Posts
October 27 2019 19:45 GMT
#20210
`table[size]` is not an array of size N. It is the item at index `size` in the array `table` (assuming the array was initialized before).
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
October 27 2019 19:52 GMT
#20211
The array wasn't yet initialized.

spoiler so it doesn't take up too much space:

+ Show Spoiler +


public class SeparateChainingHashTable implements HashTable{

/* ****************************************************************** */
/* ***** PRIVATE FIELDS / METHODS PROVIDED TO YOU: DO NOT EDIT! ***** */
/* ****************************************************************** */

private KVPairList[] table;
private int count;
private PrimeGenerator primeGenerator;

// We mask the top bit of the default hashCode() to filter away negative values.
// Have to copy over the implementation from OpenAddressingHashTable; no biggie.
private int hash(String key){
return (key.hashCode() & 0x7fffffff) % table.length;
}

/* **************************************** */
/* IMPLEMENT THE FOLLOWING PUBLIC METHODS: */
/* **************************************** */
/**
* Default constructor. Initializes the internal storage with a size equal to the default of {@link PrimeGenerator}.
*/
public SeparateChainingHashTable(){
/*We have to implement this constructor. How do I instantiate table? And what is it?
}





Here is the fields and constructor of KVPairList:

+ Show Spoiler +


public class KVPairList implements Iterable<KVPair>{

private class Node {
KVPair pair;
Node next;

Node(String key, String value, Node next){
pair = new KVPair(key, value);
this.next = next;
}

Node(String key, String value){
this(key, value, null);
}

}

private Node head, tail;
private int count;

/**
* Default constructor. Initializes an empty {@link KVPairList}.
*/
public KVPairList(){
head = tail = null;
count = 0;
}

...
...
...




I am really just not understand this
Apom
Profile Blog Joined August 2011
France656 Posts
October 27 2019 19:58 GMT
#20212
If the array is not initialized then it will either be a runtime error (null referencing or invalid index), or a compiler error (I can't remember if the Java compiler catches this).
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
Last Edited: 2019-10-27 20:04:49
October 27 2019 19:59 GMT
#20213
+ Show Spoiler [reference post] +
On October 28 2019 04:37 travis wrote:
I haven't done java in like almost 4 years. Wondering if someone can help me with something.

In my data structures class, I am having to make various structures that use hashing. We have to fill in the methods for each class, it's backed by an interface and the project also includes some other classes we are supposed to use.

In the first structure I am making, the class has:


private KVPairList[] table;


Now, KVPairList is a class we were provided. It seems to be the case that we are supposed to use it.
It is essentially an iterable linked list of KVPair objects (another class we are provided).

The KVPairList class essentially looks like a linked list. It has an inner class, nodes. It has head, tail, etc. It has a constructor:


public KVPairList(){
head = tail = null;
count = 0;
}


So what is going on here? What is KVPairList[]? This object isn't an array. How do I even instantiate a new KVPairList[] ? The only way I can make a new KVPairList is to do:


table[size] = new KVPairList();


But what the heck does this even mean? a new KVPairList() is an empty linked list. So what does it mean for an array of size N to be an empty linked list?

Furthermore, if I do that, it clearly doesn't actually create a KVPairList() because I don't have access to it's methods.
Have they made this project intentionally confusing, or are there java conventions that I am not understanding here?



edit: okay, so does this syntax instantiate an array of size "size", where each index is a new KVPairList?
If so, this assignment is extremely confusing and this is the opposite way of how I would think we should do this lol


Mystery class in the first code block has a member variable that is an array of KVPairList. You're going to hash something which will give you a number. That's the index of table. Each index of the table is a linked list as you've noted. This is to deal with collisions in the hash table.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-10-27 20:00:34
October 27 2019 20:00 GMT
#20214
ah wait a sec I think I see what you are saying.
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
Last Edited: 2019-10-27 20:06:24
October 27 2019 20:05 GMT
#20215
On October 28 2019 04:59 Blitzkrieg0 wrote:
Mystery class in the first code block has a member variable that is an array of KVPairList. You're going to hash something which will give you a number. That's the index of table. Each index of the table is a linked list as you've noted. This is to deal with collisions in the hash table.


ohh....
I think I have come to the root of my confusion.

So KVPairList is a linked list of <key,value> pairs. I forgot that even though the hashed keys will correspond to one index, the keys themselves in a given KVPairList may be different. Because of collisions.

Okay, this does make sense to me. I was confused about why KVPairList was even taking keys as a parameter, rather than only taking values.

I think this clears up all the confusion. Thanks you guys!
ShoCkeyy
Profile Blog Joined July 2008
7815 Posts
October 27 2019 21:21 GMT
#20216
On October 24 2019 02:31 travis wrote:
Well guys, this will probably be my last semester. You all did it, you successfully got this doofus through a decent CS program.

Anyone hiring for data analysis / ML ? Looking for a cushy job w/ radically high pay.


PM'd you.
Life?
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
November 01 2019 18:53 GMT
#20217
update chrome if you use it:

https://thehackernews.com/2019/11/chrome-zero-day-update.html
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
November 01 2019 20:56 GMT
#20218
On November 02 2019 03:53 travis wrote:
update chrome if you use it:

https://thehackernews.com/2019/11/chrome-zero-day-update.html


Only fools use Chrome.
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
November 05 2019 08:10 GMT
#20219
How long do You usually wait for getting Your answer on stackoverflow?? I post my django related question but nothing yet.
Here it is in case someone wants to take a look: https://stackoverflow.com/questions/58692118/accessing-foreignkey-field-value-inside-template
Pathetic Greta hater.
Excludos
Profile Blog Joined April 2010
Norway8255 Posts
November 05 2019 11:23 GMT
#20220
On November 05 2019 17:10 Silvanel wrote:
How long do You usually wait for getting Your answer on stackoverflow?? I post my django related question but nothing yet.
Here it is in case someone wants to take a look: https://stackoverflow.com/questions/58692118/accessing-foreignkey-field-value-inside-template


Depends entirely on how lucky you are. Could be anything from 10 minutes to 10 years. The more niche your question is, the less likely it is to get answered.
Prev 1 1009 1010 1011 1012 1013 1032 Next
Please log in or register to reply.
Live Events Refresh
Monday Night Weeklies
16:00
#50
RotterdaM936
TKL 357
SteadfastSC229
IndyStarCraft 216
BRAT_OK 148
ZombieGrub83
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 936
TKL 357
SteadfastSC 229
IndyStarCraft 216
BRAT_OK 148
UpATreeSC 132
ZombieGrub83
StarCraft: Brood War
Calm 3737
Britney 2061
Mini 524
ggaemo 260
Dewaltoss 124
Hm[arnc] 23
Dota 2
Gorgc6018
monkeys_forever412
Counter-Strike
pashabiceps1659
Super Smash Bros
Mew2King83
Heroes of the Storm
Liquid`Hasu316
Other Games
Grubby3375
Liquid`RaSZi1287
FrodaN1188
Beastyqt1091
B2W.Neo1080
qojqva757
ceh9682
C9.Mang0264
shahzam200
ArmadaUGS146
KnowMe134
Hui .79
Trikslyr64
MindelVK14
Organizations
Other Games
BasetradeTV395
Dota 2
PGL Dota 2 - Main Stream47
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 19 non-featured ]
StarCraft 2
• kabyraGe 81
• Adnapsc2 7
• Reevou 6
• intothetv
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• Migwel
• Kozan
• IndyKCrew
StarCraft: Brood War
• blackmanpl 32
• 80smullet 22
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• imaqtpie1850
• Jankos1619
• TFBlade1065
Other Games
• Shiphtur304
Upcoming Events
Replay Cast
4h 33m
Sparkling Tuna Cup
14h 33m
Afreeca Starleague
14h 33m
Snow vs Flash
WardiTV Invitational
15h 33m
SHIN vs Nicoract
Solar vs Nice
GSL
1d 14h
Classic vs Cure
Maru vs Rogue
GSL
2 days
SHIN vs Zoun
ByuN vs herO
OSC
2 days
OSC
2 days
Replay Cast
3 days
Escore
3 days
[ Show More ]
The PondCast
3 days
WardiTV Invitational
3 days
Zoun vs Ryung
Lambo vs ShoWTimE
OSC
4 days
Replay Cast
4 days
CranKy Ducklings
4 days
RSL Revival
4 days
SHIN vs Bunny
ByuN vs Shameless
WardiTV Invitational
4 days
Krystianer vs TriGGeR
Cure vs Rogue
uThermal 2v2 Circuit
4 days
BSL
4 days
Replay Cast
5 days
Sparkling Tuna Cup
5 days
RSL Revival
5 days
Cure vs Zoun
Clem vs Lambo
WardiTV Invitational
5 days
BSL
5 days
Replay Cast
6 days
Afreeca Starleague
6 days
Liquipedia Results

Completed

Proleague 2026-05-02
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
SCTL 2026 Spring
RSL Revival: Season 5
2026 GSL S1
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

YSL S3
Escore Tournament S2: W6
KK 2v2 League Season 1
BSL 22 Non-Korean Championship
Escore Tournament S2: W7
Escore Tournament S2: W8
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
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 © 2026 TLnet. All Rights Reserved.