• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 16:26
CEST 22:26
KST 05:26
  • 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: Progenitors5Code 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] Ro8 Preview Pt2: Progenitors ASL21 General Discussion Why there arent any 256x256 pro maps? BW General Discussion 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: 1264 users

The Big Programming Thread - Page 1010

Forum Index > General Forum
Post a Reply
Prev 1 1008 1009 1010 1011 1012 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.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
September 18 2019 11:57 GMT
#20181
Speaking of OP. I think this should be added there for Ruby: https://www.poodr.com/

Amazing book in general.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19210 Posts
September 18 2019 12:58 GMT
#20182
I'd put it in but the site isn't loading for me so eh?
Liquipediaasante sana squash banana
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
September 18 2019 13:05 GMT
#20183
On September 18 2019 21:58 tofucake wrote:
I'd put it in but the site isn't loading for me so eh?


Tested and it is working for me.
I'll always be your shadow and veil your eyes from states of ain soph aur.
tofucake
Profile Blog Joined October 2009
Hyrule19210 Posts
September 18 2019 13:40 GMT
#20184
Yeah basically as soon as I posted that it loaded. Whatever.
Liquipediaasante sana squash banana
Blitzkrieg0
Profile Blog Joined August 2010
United States13132 Posts
September 18 2019 13:46 GMT
#20185
On September 18 2019 22:40 tofucake wrote:
Yeah basically as soon as I posted that it loaded. Whatever.


Complaining about things not working should be officially supported troubleshooting steps.
I'll always be your shadow and veil your eyes from states of ain soph aur.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-09-23 14:20:54
September 23 2019 14:19 GMT
#20186
So i started making my first webpage. I am using python3 (DJANGO) right now i am wondering what should i use for frontend. Bootstrap?? I will add i have almost none experience in regards to web development, the only thing i did that is somehow connected is automation with selenium so i will have to learn everything from scrap.

What do You guys recommend?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
Last Edited: 2019-09-24 09:45:32
September 24 2019 06:37 GMT
#20187
On September 23 2019 23:19 Silvanel wrote:
So i started making my first webpage. I am using python3 (DJANGO) right now i am wondering what should i use for frontend. Bootstrap?? I will add i have almost none experience in regards to web development, the only thing i did that is somehow connected is automation with selenium so i will have to learn everything from scrap.

What do You guys recommend?


This will get you through the basics:
https://www.obeythetestinggoat.com/pages/book.html#toc

Bootstrap and JQuery will be fine to begin with. Later on you'll want to figure out how to not do a full stack but rather a back-end API in Python and front-end in React if you want to be more versatile (I have started with front-end, moved on to full-stack and now I only ever do back-end and never want to touch front again).

Starting with full-stack and simple stuff like Bootstrap and JQuery will give you a nice overview of the basics so it'll be much easier to grasp other concepts later down the line.

The biggest challenge with web-dev is that you need to cross a lot of boundaries. You need to know how the web works, know HTML, CSS, JS, most likely SQL (please don't use MySQL, go with PostgreSQL), language of choice for the back-end (PHP, Java, Ruby, Python, etc.) and on top of that you'll probably need to know how to set up a Linux server in some capacity.

When you grasp the basics you then learn about automated deployment cycles with test pipeline, learn about Docker, various async messaging systems (Kafka, RabbitMQ), numerous authentication and encryption schemes and what not.

It's not easy to get started so begin with small and simple things or you'll get overwhelmed and drown.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19210 Posts
September 24 2019 10:43 GMT
#20188
There is nothing wrong with mysql. I personally prefer it to postgres
Liquipediaasante sana squash banana
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
September 24 2019 10:49 GMT
#20189
Thanks for answer, right now my aim is to just finish my little personal side project, plus be able to handle maintenace of our test report database at work. In both places this is just a sideline thing, not major by part by any means but it is nice to learn new things.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
September 25 2019 08:53 GMT
#20190
On September 24 2019 19:43 tofucake wrote:
There is nothing wrong with mysql. I personally prefer it to postgres


But why? Everything is worse in mysql. It has fewer data types, some truly wonky stuff (I don't remember if they fixed NULL = NULL for uniqueness purposes etc.) and is in general just a worse db in my opinion.

In the modern days, where you tend to use a lot of JSON postgres is superb with its special data types for json and ability to create indices for json internal properties. Bloody brilliant.
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19210 Posts
September 25 2019 12:42 GMT
#20191
MySQL has JSON: https://dev.mysql.com/doc/refman/5.7/en/json.html

And plenty others. Part of it is that it's the first SQL I learned, but I've been working with a lot of postgres, redshift, and TSQL recently and I find them frustratingly annoying in the little things, like why can't I use double quotes for strings like in every other language? Why is double quotes a column? Why are square brackets also column? Why are there more options for defining column than there are for defining value?
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
Last Edited: 2019-09-26 11:01:15
September 26 2019 11:00 GMT
#20192
Since I've been mostly just removing code instead of writing code at work for the past months (removed ~40k lines of code recently) I went back to doing some MUD coding on the side.

Now I'll get to work with oldschool LPC code from 1998. This'll be fun.
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-02 12:53:06
October 02 2019 12:52 GMT
#20193
So i am working at my website and i need to answer philosophical question (i am using DJANGO).

I want to render a table with ~60 rows, each row with 4 fields one of which will be various kinds of input fields and rest are just text. Texts are unique in each row. INput fields types vary by row.
Now the question is how to do that in efficient and elegant way (The options i see):
a)I can render each row separetly in .html file, but that seems very ugly and time consuming
b)Load from model.py via forms.py but i am not really sure how to that correctly --> one model with those rows as fields? But in DJANGO Input fields (Char or Integer) do not support adding user defined fields with that, so i do not know how to add that text data i need--> other then overridding all Input fields type i would use (do not seem elegant at all). I guess i can store my text data in some dictionary/list and load from it but that doesnt look nice...
c)Load without forms.py as intermediary directly from models.py (but i am not really sure how to do that, didnt find such use case in any tutorial.
d) Other options???

So my question is how to do that properly? Where should i hold the text data corespodning to Input fields? What are the best practices/my options?
Pathetic Greta hater.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-02 20:17:19
October 02 2019 20:14 GMT
#20194
Or more specific, i have some data that i want to render on page, thats mostly text data (like 60 rows of unique text). And models in DJANGO are working in a way that each field is supossed to represent a field in database. But i dont want to store that text in database. Were do i put this text data (other then .html itself) so i can loop over those 60 rows in convinient fashion if not in a model?

Normally i would just define a list somewhere and loop over it but how do i access that list in .html file?
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
Last Edited: 2019-10-03 01:33:03
October 03 2019 01:32 GMT
#20195
You can generate stuff in html.


<h1>Table</h1>

<table>
{% for obj in obj_list %}
<tr class="whatever">
<td>{{ obj.val }}</td>
<td>{{ obj.other_val }}</td>
</tr>
{% endfor %}
</table>
Time is precious. Waste it wisely.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-03 07:00:42
October 03 2019 06:48 GMT
#20196
I know that. But i have hard time retriving the data. Right now i am using CreateView class and acessing my model fields trough "form.field". See my code below.

models.py

class ShipSystems(Ship):
def __init__(self, *args, **kwargs):
super(ShipSystems, self).__init__(*args, **kwargs)

thrust = models.PositiveIntegerField(default=0, max_length=2)
advanced_thrust = models.PositiveIntegerField(default=0, max_length=2)
ftl_drive = models.BooleanField()
screens = models.PositiveIntegerField(default=0)
armor = models.PositiveIntegerField(default=0)
fire_control = models.PositiveIntegerField(default=0)
shield_generators = models.PositiveIntegerField(default=0)


views.py

class CVShipSystems(CreateView):
template_name = 'fading_thrust/ship_systems_form.html'
model = ShipSystems
fields = ['thrust', 'advanced_thrust', 'ftl_drive', 'screens', 'armor', 'fire_control', 'shield_generators']



ship_systems_form.html

{% extends "fading_thrust/home.html" %}
{% block title %}Fading Thrust{% endblock title %}

{% block content %}
<div class="pb-2 mt-4 mb-2 border-bottom">
<h3>Ship systems</h3>
</div>
<div class="table-responsive table-sm table-striped">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>System name</th>
<th>Selection</th>
<th>Mass</th>
<th>Points</th>
<th>Comments</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Standard drive</td>
<td>{{ form.thrust }}</td>
<td>5 % of total mass per point of thrust</td>
<td>1 point per point of mass</td>
<td>Half of thrust can be spent on turning</td>
</tr>
</tbody>
</table>
</div>

<button type="submit" class="btn btn-primary">Save</button>
{% endblock content %}


And this works and renders just fine. The problem i have is how do i pass text or other data to ship_systems_form.html ??? What tags should i use???? I tried numerous tags and always got the result that page rendered but field was empty (it looks if it doesnt find a tag and just skips it and renders rest of page).
I also tried usuing ListView class but with similiar results. So maybe i am making some basic mistake....i also never saw
 obj_list 
mentioned but i did try
 object_list 
(and it didnt work) when i tried to call
 object_list.thrust 
or
 ShipSystems.thrust 
or something similiar. What tag should work in Your opinion?
Pathetic Greta hater.
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-05 19:23:40
October 05 2019 19:01 GMT
#20197
Nevermind. I am an idiot
Pathetic Greta hater.
SC-Shield
Profile Joined December 2018
Bulgaria843 Posts
October 06 2019 10:46 GMT
#20198
Just out of curiosity, how long do you stay at company on average?
Silvanel
Profile Blog Joined March 2003
Poland4751 Posts
Last Edited: 2019-10-07 07:13:09
October 07 2019 07:10 GMT
#20199
I am into my fifth year working at the same company, doing basicly the same stuff the whole time(automotive embedded - testing/test automation). Its starting to wear on me, so i am considering switching. Hence learning new technologies etc.

Ohh, i will also add that for all those years i am doing stuff for the same customer. The projectes i worked for are named: NTG5, NTG6, NTG7, NTG7 RSU. Go figure.
Pathetic Greta hater.
Manit0u
Profile Blog Joined August 2004
Poland17743 Posts
October 08 2019 14:03 GMT
#20200
On October 06 2019 19:46 SC-Shield wrote:
Just out of curiosity, how long do you stay at company on average?


It's 6 to 24 months for me, so the average would be about 15 months
Time is precious. Waste it wisely.
Prev 1 1008 1009 1010 1011 1012 1032 Next
Please log in or register to reply.
Live Events Refresh
Monday Night Weeklies
16:00
#50
RotterdaM949
TKL 338
SteadfastSC193
IndyStarCraft 192
BRAT_OK 166
ZombieGrub95
EnkiAlexander 41
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RotterdaM 949
TKL 338
SteadfastSC 193
IndyStarCraft 192
BRAT_OK 166
ZombieGrub95
StarCraft: Brood War
Calm 3321
Mini 442
ggaemo 239
Dewaltoss 106
Hm[arnc] 24
Dota 2
Gorgc6420
monkeys_forever484
League of Legends
JimRising 217
Counter-Strike
pashabiceps2102
Super Smash Bros
Mew2King113
Heroes of the Storm
Liquid`Hasu448
Other Games
Grubby4272
FrodaN1291
Liquid`RaSZi1262
summit1g1179
Beastyqt1035
shahzam441
C9.Mang0286
ArmadaUGS157
KnowMe136
UpATreeSC115
mouzStarbuck105
Trikslyr56
MindelVK10
Organizations
Other Games
BasetradeTV564
Dota 2
PGL Dota 2 - Main Stream38
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 17 non-featured ]
StarCraft 2
• kabyraGe 106
• Adnapsc2 14
• Reevou 6
• Kozan
• Migwel
• AfreecaTV YouTube
• sooper7s
• intothetv
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• blackmanpl 46
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• imaqtpie2147
Other Games
• Shiphtur319
• WagamamaTV282
Upcoming Events
Replay Cast
3h 34m
Sparkling Tuna Cup
13h 34m
Afreeca Starleague
13h 34m
Snow vs Flash
WardiTV Invitational
14h 34m
SHIN vs Nicoract
Solar vs Nice
PiGosaur Cup
1d 3h
GSL
1d 13h
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
[ Show More ]
Escore
3 days
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
GSL
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
IEM Atlanta 2026
Asian Champions League 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.