• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 10:48
CEST 16:48
KST 23:48
  • 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
Serral wins HomeStory Cup 2914Serral wins Maestros of the Game 243ByuL, and the Limitations of Standard Play3Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12
Community News
Weekly Cups (July 27-Aug 2): SHIN's big week0SC4ALL II: Brood War - $2500 - Dec 5-69SC4ALL II announced - $10,000 prize pool, Dec 5-64PIG STY FESTIVAL 8.0! (13 - 23 August)14Neeb returns to progaming; rejoins ONSYDE18
StarCraft 2
General
Protoss AoE skill expression 5.0.16 patch for SC2 goes live (8 worker start) StarCraft 2 at SC4ALL II Invite #3/8 - Clem Balance hotfix patch 5.0.16b (July 16) Clem: "I don't have that much hope in Blizzard"
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament PIG STY FESTIVAL 8.0! (13 - 23 August) Tasteless Time Warp: SC Evo Showmatch (May 25) SC4ALL II announced - $10,000 prize pool, Dec 5-6 RSL Revival: Season 6 - Qualifiers and Main Event
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
The PondCast: SC2 News & Results Mutation # 537 Hostile Territory Mutation # 536 Railroad Switch Mutation # 535 Assembly of Vengeance
Brood War
General
ASL 22 Proposed Map Pool Making an Online Broodwar Manager Game ASL22 General Discussion [Personal Project Share] Terran Defense v0.60 Data needed
Tourneys
Escore Tournament - Season 3 KCM Race Survival 2026 Season 3 SC4ALL II: Brood War - $2500 - Dec 5-6 Small VOD Thread 2.0
Strategy
Odyssey Mineral Stack Saturation Any training maps people recommend? Fighting Spirit mining rates Simple Questions, Simple Answers
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread ZeroSpace Early Access is Now Live! Beyond All Reason
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
[TL LoL EUW IHs] Teemo shall perish TSM pausing esports and CLG Dead
Heroes of the Storm
Heroes of the Storm 2.0
Hearthstone
Deck construction bug
TL Mafia
TL Mafia Power Rank TL Mafia Community Thread NeO.D_StephenKing vs This Guy From 1 Million Dance
Community
General
US Politics Mega-thread European Politico-economics QA Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread Artificial Intelligence Thread
Fan Clubs
The Clem Fan Club INnoVation Fan Club The Scarlett Fan Club
Media & Entertainment
Anime Discussion Thread Movie Discussion! Series you have seen recently... [Req][Books] Good Fantasy/SciFi books
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion MLB/Baseball 2023 McBoner: A hockey love story
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Simple Questions Simple Answers FPS when play League Of Legend on laptop
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Please support my new stand…
Peanutsc
What is a Gamer?
TrAiDoS
Hello guys!
LIN1s
ASL S22 English Commentary…
namkraft
Poker (part 2)
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 4677 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
Poland17821 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
Hyrule19235 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
Hyrule19235 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
Poland4769 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
Poland17821 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
Hyrule19235 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
Poland4769 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
Poland17821 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
Hyrule19235 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
Poland17821 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
Poland4769 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
Poland4769 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
Poland17821 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
Poland4769 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
Poland4769 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
Bulgaria873 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
Poland4769 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
Poland17821 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
IntoTheTV X SOOP
11:00
ISSL Weekly#1
IntoTheiNu 1333
WardiTV871
Rex121
CranKy Ducklings100
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Lowko584
LamboSC2 182
Rex 121
ProTech71
ByuN (SOOP) 26
StarCraft: Brood War
Shuttle 4043
EffOrt 1404
Horang2 1130
firebathero 677
BeSt 620
Soma 402
Snow 287
Larva 283
Stork 263
hero 190
[ Show more ]
Dewaltoss 112
Sharp 79
Leta 66
Sea.KH 63
Hyun 56
Barracks 34
HiyA 29
scan(afreeca) 27
Bale 23
Terrorterran 17
sorry 15
Sexy 14
Rock 13
IntoTheRainbow 9
Dota 2
qojqva1230
syndereN330
Fuzer 141
XcaliburYe44
Counter-Strike
fl0m6644
kRYSTAL_59
Super Smash Bros
Mew2King98
Other Games
singsing1993
B2W.Neo940
hiko764
Liquid`VortiX220
Hui .163
XaKoH 74
QueenE49
ArmadaUGS38
[ Show 15 non-featured ]
StarCraft 2
• mYiSmile117
• CranKy Ducklings SOOP10
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• Michael_bg 5
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV564
League of Legends
• Jankos1734
• Nemesis1510
• TFBlade656
Upcoming Events
Big Brain Bouts
1h 13m
DnS vs Rex
Reynor vs Cure
Replay Cast
9h 13m
RSL Revival
18h 13m
herO vs SHIN
Clem vs Solar
Serral vs Rogue
Ladder Legends
1d 3h
Ladder Legends
1d 5h
RSL Revival
1d 18h
OSC
1d 22h
OSC
2 days
WardiTV Weekly
2 days
The Patches Monday
3 days
[ Show More ]
Sparkling Tuna Cup
3 days
PiG Sty Festival
3 days
PiGosaur Cup
4 days
Replay Cast
4 days
Kung Fu Cup
4 days
Replay Cast
5 days
The PondCast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-08-05
CranK Gathers Season 4: BW vs SC2 Team League
Eternal Conflict S2 Finale

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
Acropolis #5
Escore Tournament S3: W6
RSL Revival: Season 6
Esports World Cup 2026: LCQ
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2

Upcoming

Escore Tournament S3: W7
CSLAN 4
ASL Season 22
Escore Tournament S3: W8
Acropolis #5 - TRS
Blizzard Classic Cup 2026
Acropolis #5 - GSA
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
PiG Sty Festival 8.0
Big Dog Cup 2026 Div 1
Thunderpick World Champ.
ESL Pro League Season 24
Stake Ranked Episode 4
Logitech G Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 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.