• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:02
CET 21:02
KST 05:02
  • 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
Team Liquid Map Contest #22 - Presented by Monster Energy5ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13
Community News
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool30Weekly Cups (March 9-15): herO, Clem, ByuN win32026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains18
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Team Liquid Map Contest #22 - Presented by Monster Energy Serral: 24’ EWC form was hurt by military service Weekly Cups (March 9-15): herO, Clem, ByuN win Weekly Cups (August 25-31): Clem's Last Straw?
Tourneys
RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament WardiTV Team League Season 10 KSL Week 87 [GSL CK] #2: Team Classic vs. Team Solar
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026] Map Editor closed ?
External Content
The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death Mutation # 515 Together Forever
Brood War
General
Buy weed dexies in Australia (WhatsApp 0480852135) BGH Auto Balance -> http://bghmmr.eu/ ASL21 General Discussion Gypsy to Korea JaeDong's form before ASL
Tourneys
[BSL22] Open Qualifiers & Ladder Tours [Megathread] Daily Proleagues Small VOD Thread 2.0 IPSL Spring 2026 is here!
Strategy
Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2 Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Path of Exile Stormgate/Frost Giant Megathread Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion 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
Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia TL Mafia Community Thread
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread Mexico's Drug War
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion Tokyo Olympics 2021 Thread General nutrition recommendations Cricket [SPORT]
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
The Automated Ban List
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1598 users

The Big Programming Thread - Page 977

Forum Index > General Forum
Post a Reply
Prev 1 975 976 977 978 979 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.
Acrofales
Profile Joined August 2010
Spain18239 Posts
Last Edited: 2018-10-26 10:57:01
October 26 2018 10:53 GMT
#19521
On October 26 2018 19:45 bo1b wrote:
I know it's possible like that, but I'm asking if it's possible to subtract in anyway. I found this schema out of a textbook:

https://d2vlcm61l7u1fs.cloudfront.net/media/86b/86b4f72e-7407-4e33-af28-e90aacc10ccc/php4ZZyIW.png

Lets say you're trying to find the amount of copies remaining at specific library branch, using an aggregate count might not work, depending on how they've set up the schema. If all they've done is input that there are 5 copies of Casino Royal at that library, and 2 separate people have loaned a copy from that library, how can you output the correct answer?

I'm just trying to find out if you can do arithmetic from one column of data (assuming they're both numbers) to another, which I don't think is possible (or I never learned, which is more likely).

With SQL you can use basic arithmetic. Of course, SQL is not pure relational algebra, so don't know if that answers your question.

E: of course, the question you're asking isn't actually about relational algebra. Which is, per definition, about the relations in your database, not about manipulating individual values. So just as you cannot do string operations in relational algebra, you cannot do arithmetic operations: it's simply not what the algebra is for.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
October 26 2018 11:04 GMT
#19522
That's what I figured, I've been given a certain question relating to it and I don't want to ask for the answer online. Meaning the tutors either explained the problem wrong or I'm reading the question wrong.
tofucake
Profile Blog Joined October 2009
Hyrule19196 Posts
October 26 2018 13:52 GMT
#19523
you can select the book you're checking from book_copies, then join on book_loans and subtract the count(id) of that book.

Also it's odd there's no return_date column in book_loans
Liquipediaasante sana squash banana
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
October 26 2018 20:23 GMT
#19524
There is a due date though.

How do you subtract in relational algebra? Could you give an example if possible?
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
October 26 2018 20:39 GMT
#19525
On October 27 2018 05:23 bo1b wrote:
There is a due date though.

How do you subtract in relational algebra? Could you give an example if possible?


Due date shouldn't tell you if the book has been checked in or not. It should be checked in before the due date and it being past due doesn't mean it was turned in.
I'll always be your shadow and veil your eyes from states of ain soph aur.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
October 26 2018 21:12 GMT
#19526
Ah, yeah I see what you mean. I think it's just a homework assignment, and they weren't being particularly enthusiastic in creating it.
bo1b
Profile Blog Joined August 2012
Australia12814 Posts
Last Edited: 2018-10-30 03:32:53
October 30 2018 03:32 GMT
#19527
I've been using fzf on my linux install, and man oh man is it good. I've put this in my bashrc:

alias m="WD\$(pwd);cd ;mpv \"\$(fzf)\";cd \$wd"

and opening a terminal, and pushing m pulls up a library of every file in my home directory. Typing in a few letters of the show I want to watch narrows it down, and selcting it and pushing enter pulls it up on my screen in mpv. If I know what I want to watch it takes all of about 2 seconds to load up the video and start watching; more to the point I've done something similar with zathura for ebooks; now I have a library without the shitty reader that callibre provides, and it's so so fast.

This post brought to you by surplus autism™
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 01 2018 01:46 GMT
#19528
For once in my life I am trying to plan out my project before jumping into it but I'm struggling to nail down exactly how I want to do some things in terms of design.

I am making a debate site. It has Debates, Posts, Communities, and Users. Posts belong to Debates and Users. Debates belong to Communities and Users. Communities belong to Users. I'll probably need to add Teams and Coalitions.

There are different types of Debates. For example, Direct Debates(1v1 or team v team), Coalition Debates(team vs team with subteams with different objectives).

It seems to me that each type of Debate should be a subclass of Debate. However, I am having problems understanding how to configure that. In a Coalition debate, if Team A and B are in a Coalition, and Team C and D are in a Coalition, then the debate order goes A, C, B, D. However, how would I assign this order to the Debate? I am thinking of having simply, Post A, Post C, Post B, Post D and they must be in order, but this seems like a terrible solution.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 01 2018 01:55 GMT
#19529
On a entirely unrelated note, do you think that at some point in the future Serverless providers will switch to simply using WebAssembly for all of their different types of languages, rather than having to specifically enable certain languages?
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Acrofales
Profile Joined August 2010
Spain18239 Posts
November 01 2018 08:30 GMT
#19530
On November 01 2018 10:46 WarSame wrote:
For once in my life I am trying to plan out my project before jumping into it but I'm struggling to nail down exactly how I want to do some things in terms of design.

I am making a debate site. It has Debates, Posts, Communities, and Users. Posts belong to Debates and Users. Debates belong to Communities and Users. Communities belong to Users. I'll probably need to add Teams and Coalitions.

There are different types of Debates. For example, Direct Debates(1v1 or team v team), Coalition Debates(team vs team with subteams with different objectives).

It seems to me that each type of Debate should be a subclass of Debate. However, I am having problems understanding how to configure that. In a Coalition debate, if Team A and B are in a Coalition, and Team C and D are in a Coalition, then the debate order goes A, C, B, D. However, how would I assign this order to the Debate? I am thinking of having simply, Post A, Post C, Post B, Post D and they must be in order, but this seems like a terrible solution.

This is horribly confusing. I don't think anybody cares about"belonging" for any of those things, except posts. Maybe throw that draft away and focus on the basics:

What is a debate? Is it just a thread? Is it a thread with rules? Is it moderated?

What is the structure of your community? You mention users and community, but then mention teams and coalitions. What are these things? Can users belong to multiple teams? Can teams be in multiple coalitions? Is there something happening at community level, or is it just the set of all users? Are teams and coalitions managed in some way?

emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
November 01 2018 09:23 GMT
#19531
On November 01 2018 17:30 Acrofales wrote:
Show nested quote +
On November 01 2018 10:46 WarSame wrote:
For once in my life I am trying to plan out my project before jumping into it but I'm struggling to nail down exactly how I want to do some things in terms of design.

I am making a debate site. It has Debates, Posts, Communities, and Users. Posts belong to Debates and Users. Debates belong to Communities and Users. Communities belong to Users. I'll probably need to add Teams and Coalitions.

There are different types of Debates. For example, Direct Debates(1v1 or team v team), Coalition Debates(team vs team with subteams with different objectives).

It seems to me that each type of Debate should be a subclass of Debate. However, I am having problems understanding how to configure that. In a Coalition debate, if Team A and B are in a Coalition, and Team C and D are in a Coalition, then the debate order goes A, C, B, D. However, how would I assign this order to the Debate? I am thinking of having simply, Post A, Post C, Post B, Post D and they must be in order, but this seems like a terrible solution.

This is horribly confusing. I don't think anybody cares about"belonging" for any of those things, except posts. Maybe throw that draft away and focus on the basics:

What is a debate? Is it just a thread? Is it a thread with rules? Is it moderated?

What is the structure of your community? You mention users and community, but then mention teams and coalitions. What are these things? Can users belong to multiple teams? Can teams be in multiple coalitions? Is there something happening at community level, or is it just the set of all users? Are teams and coalitions managed in some way?



I agree with the idea of having specific debate types as subclasses of Debate. I also agree with what Acrofales is saying, and that some of the things you say should _have_ users, posts, etc., but not necessarily belong to them. I also don't understand what a community is, to me the community is the entire site.

In my mind the Debate is responsible for managing a debate. A Debate has (among other things): rules (how the debate is structured), teams (at least two), moderators, at least 1 thread (depends on the debate type, maybe some are private), and whatever else you think of that is necessary to actually carry out the debate. Some things floating around in my head: a 1v1 Debate limits the number of teams to 2 and the team size to 1, a coalition debate has a CoalitionTeam instead of a regular Team, each Debate subclass defines the Rules of the debate.
TRUEESPORTS || your days as a respected member of team liquid are over
WarSame
Profile Blog Joined February 2010
Canada1950 Posts
November 04 2018 01:00 GMT
#19532
On November 01 2018 17:30 Acrofales wrote:
Show nested quote +
On November 01 2018 10:46 WarSame wrote:
For once in my life I am trying to plan out my project before jumping into it but I'm struggling to nail down exactly how I want to do some things in terms of design.

I am making a debate site. It has Debates, Posts, Communities, and Users. Posts belong to Debates and Users. Debates belong to Communities and Users. Communities belong to Users. I'll probably need to add Teams and Coalitions.

There are different types of Debates. For example, Direct Debates(1v1 or team v team), Coalition Debates(team vs team with subteams with different objectives).

It seems to me that each type of Debate should be a subclass of Debate. However, I am having problems understanding how to configure that. In a Coalition debate, if Team A and B are in a Coalition, and Team C and D are in a Coalition, then the debate order goes A, C, B, D. However, how would I assign this order to the Debate? I am thinking of having simply, Post A, Post C, Post B, Post D and they must be in order, but this seems like a terrible solution.

This is horribly confusing. I don't think anybody cares about"belonging" for any of those things, except posts. Maybe throw that draft away and focus on the basics:

What is a debate? Is it just a thread? Is it a thread with rules? Is it moderated?

I used belonging to refer to a "has-a" relationship. So a Debate has Posts. I also need to track this stuff to see, for example, who made a specific Debate.

What is the structure of your community? You mention users and community, but then mention teams and coalitions. What are these things? Can users belong to multiple teams? Can teams be in multiple coalitions? Is there something happening at community level, or is it just the set of all users? Are teams and coalitions managed in some way?

A Community has Users that are subscribed to it, and contains Debates within it. I think I might rename it a Forum. It's similar to a Subreddit.

A Team is a group of co-operating Users within a Debate. A Coalition is a group of co-operating Teams to represent a side. The classic example of a Coalition Debate is France and Austria vs. Britain and Prussia to mirror the Napoleonic Wars.

Users cannot belong to multiple Teams. Teams cannot be in multiple Coalitions. Communities are collections of Debates posted to that Community and subscribed Users. Yes, I envision Teams and Coalitions being defined at the start of Debate, with modification possible with agreement between the Moderator(which I haven't thought much about yet), and both sides.

On November 01 2018 18:23 emperorchampion wrote:
Show nested quote +
On November 01 2018 17:30 Acrofales wrote:
On November 01 2018 10:46 WarSame wrote:
For once in my life I am trying to plan out my project before jumping into it but I'm struggling to nail down exactly how I want to do some things in terms of design.

I am making a debate site. It has Debates, Posts, Communities, and Users. Posts belong to Debates and Users. Debates belong to Communities and Users. Communities belong to Users. I'll probably need to add Teams and Coalitions.

There are different types of Debates. For example, Direct Debates(1v1 or team v team), Coalition Debates(team vs team with subteams with different objectives).

It seems to me that each type of Debate should be a subclass of Debate. However, I am having problems understanding how to configure that. In a Coalition debate, if Team A and B are in a Coalition, and Team C and D are in a Coalition, then the debate order goes A, C, B, D. However, how would I assign this order to the Debate? I am thinking of having simply, Post A, Post C, Post B, Post D and they must be in order, but this seems like a terrible solution.

This is horribly confusing. I don't think anybody cares about"belonging" for any of those things, except posts. Maybe throw that draft away and focus on the basics:

What is a debate? Is it just a thread? Is it a thread with rules? Is it moderated?

What is the structure of your community? You mention users and community, but then mention teams and coalitions. What are these things? Can users belong to multiple teams? Can teams be in multiple coalitions? Is there something happening at community level, or is it just the set of all users? Are teams and coalitions managed in some way?



I agree with the idea of having specific debate types as subclasses of Debate. I also agree with what Acrofales is saying, and that some of the things you say should _have_ users, posts, etc., but not necessarily belong to them. I also don't understand what a community is, to me the community is the entire site.

In my mind the Debate is responsible for managing a debate. A Debate has (among other things): rules (how the debate is structured), teams (at least two), moderators, at least 1 thread (depends on the debate type, maybe some are private), and whatever else you think of that is necessary to actually carry out the debate. Some things floating around in my head: a 1v1 Debate limits the number of teams to 2 and the team size to 1, a coalition debate has a CoalitionTeam instead of a regular Team, each Debate subclass defines the Rules of the debate.

I guess I mis-used the term "belong".

Thank you for your stab at it there. I think I like it. I think for Rules I could make an Interface that all Debates must implement to control how they go through their phases.
Can it be I stayed away too long? Did you miss these rhymes while I was gone?
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
November 05 2018 16:54 GMT
#19533
[image loading]
Time is precious. Waste it wisely.
Artesimo
Profile Joined February 2015
Germany567 Posts
November 05 2018 21:48 GMT
#19534
He definiteley wants to be a friends class of her
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
Last Edited: 2018-11-06 15:30:43
November 06 2018 08:58 GMT
#19535
https://www.humblebundle.com/books/dev-ops-oreilly

Edit:
Also this: https://github.com/chubin/cheat.sh

Amazing tool.
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
November 07 2018 17:11 GMT
#19536
[image loading]

Finally something to send to your friends and family...
Time is precious. Waste it wisely.
Manit0u
Profile Blog Joined August 2004
Poland17695 Posts
November 08 2018 14:12 GMT
#19537
Some stuff I'm dealing with at work:

SQL query built with Java JDBC, called from Scala, called from Python, called from bash script...

[image loading]
Time is precious. Waste it wisely.
JosephJameson
Profile Joined November 2018
6 Posts
November 14 2018 20:41 GMT
#19538
--- Nuked ---
TentativePanda
Profile Joined August 2014
United States800 Posts
November 16 2018 20:04 GMT
#19539
FLASK vs Django?

I'm working on a university project and trying to decide which framework would be better for us (group project). Here is the info about the project and the members that are of note:

- Group project (3 of us) due in 2 weeks
- Need to design a user interface for our database server (website backed by DB)
- MySQL was used for database design
- We all have fairly decent python experience (and I'd like to think we are all capable people, willing and able to learn - even in this short amount of time)
- We have little to no web development experience

I know there are plenty of differences from what online (although both would work). I may be wrong, but I think the most important factor for us would be which framework allows us to work and connect to MySQL most easily.

Thank you so much to people who reply, it will be super appreciated!
solidbebe
Profile Blog Joined November 2010
Netherlands4921 Posts
November 16 2018 22:30 GMT
#19540
I have not worked with Django. Ive used Flask with sqlite, not MySQL, but my experience was that it was very straightforward to use. I dont think you can really go wrong with it.
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
Prev 1 975 976 977 978 979 1032 Next
Please log in or register to reply.
Live Events Refresh
BSL
20:00
S22 - Ladder Tour #2
LiquipediaDiscussion
LAN Event
16:30
StarCraft Madness
Airneanach164
Liquipedia
PSISTORM Gaming Misc
15:55
FSL semifinals: PTB vs ASH
Freeedom37
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
elazer 280
JuggernautJason81
Nathanias 52
Ketroc 42
UpATreeSC 37
Vindicta 34
CosmosSc2 25
PattyMac 5
StarCraft: Brood War
EffOrt 603
Horang2 505
Shuttle 207
ggaemo 158
hero 101
Free 101
Dewaltoss 84
Hm[arnc] 26
ZZZero.O 17
ivOry 14
[ Show more ]
SilentControl 10
Dota 2
monkeys_forever322
LuMiX1
League of Legends
JimRising 485
Counter-Strike
fl0m5816
shoxiejesuss1
Heroes of the Storm
Khaldor610
Liquid`Hasu453
Trikslyr85
MindelVK14
Other Games
Grubby3191
FrodaN2145
byalli683
ToD110
Hui .75
Organizations
Other Games
gamesdonequick840
Dota 2
PGL Dota 2 - Main Stream99
StarCraft 2
angryscii 18
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 22 non-featured ]
StarCraft 2
• printf 31
• Adnapsc2 24
• Reevou 6
• LUISG 4
• intothetv
• LaughNgamezSOOP
• IndyKCrew
• Kozan
• AfreecaTV YouTube
• sooper7s
• Migwel
StarCraft: Brood War
• 80smullet 14
• Michael_bg 8
• Azhi_Dahaki3
• Pr0nogo 2
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1077
• masondota21061
Other Games
• imaqtpie1157
• Shiphtur281
Upcoming Events
RSL Revival
13h 58m
herO vs MaxPax
Rogue vs TriGGeR
BSL
23h 58m
Replay Cast
1d 3h
Replay Cast
1d 12h
Afreeca Starleague
1d 13h
Sharp vs Scan
Rain vs Mong
Wardi Open
1d 15h
Monday Night Weeklies
1d 20h
Sparkling Tuna Cup
2 days
Afreeca Starleague
2 days
Soulkey vs Ample
JyJ vs sSak
Replay Cast
3 days
[ Show More ]
Afreeca Starleague
3 days
hero vs YSC
Larva vs Shine
Kung Fu Cup
3 days
Replay Cast
4 days
KCM Race Survival
4 days
The PondCast
4 days
WardiTV Team League
4 days
Replay Cast
5 days
WardiTV Team League
5 days
RSL Revival
6 days
Cure vs Zoun
WardiTV Team League
6 days
BSL
6 days
Liquipedia Results

Completed

Proleague 2026-03-20
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Jeongseon Sooper Cup
BSL Season 22
CSL Elite League 2026
RSL Revival: Season 4
Nations Cup 2026
NationLESS Cup
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

ASL Season 21
Acropolis #4 - TS6
2026 Changsha Offline CUP
CSL 2026 SPRING (S20)
CSL Season 20: Qualifier 1
Acropolis #4
IPSL Spring 2026
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 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 © 2026 TLnet. All Rights Reserved.