• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 07:43
CEST 13:43
KST 20:43
  • 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
[ASL19] Finals Recap: Standing Tall8HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL42Weekly Cups (June 23-29): Reynor in world title form?12FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
RELIABLE USDT RECOVERY SERVICE//TECHY FORCE CYBER The SCII GOAT: A statistical Evaluation Statistics for vetoed/disliked maps Esports World Cup 2025 - Final Player Roster How does the number of casters affect your enjoyment of esports?
Tourneys
RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo) FEL Cracov 2025 (July 27) - $8000 live event HomeStory Cup 27 (June 27-29)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Flash Announces Hiatus From ASL BW General Discussion [ASL19] Finals Recap: Standing Tall BGH Auto Balance -> http://bghmmr.eu/ Help: rep cant save
Tourneys
[Megathread] Daily Proleagues [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET The Casual Games of the Week Thread [BSL20] ProLeague LB Final - Saturday 20:00 CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread Trading/Investing Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread NBA General Discussion Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
Game Sound vs. Music: The Im…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 663 users

The Big Programming Thread - Page 620

Forum Index > General Forum
Post a Reply
Prev 1 618 619 620 621 622 1031 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.
Artesimo
Profile Joined February 2015
Germany546 Posts
April 22 2015 15:42 GMT
#12381
I seriously dont know what I am supposed to learn : /
I am at the beginning of my second semester and had the bad luck to get the same professor like last semester who is just the worst. Hadnt had a single lecture in programming since the start of this semester and yet I am tasked to do theese assignments since I am one of the few unlucky folks that couldnt switch to another professor because of to much people switching .
Artesimo
Profile Joined February 2015
Germany546 Posts
April 22 2015 16:15 GMT
#12382
Okay, so far I got this to extract the names of the guests:


regex reg1("[A-Z][a-z]+[' '][A-Z][a-z]+");

Which translates to:
Find anything that matches having a capital character from A-Z, followed by at least one lower case letter from a-z, followed by a whitespace, followed by a capital character from A-Z, followed by at least one lower case letter from a-z, which should give me an match in every line there is a name, no matter if the guy got billions of middlenames or just the regular firstname lastname.

However, this still leaves me with the whole moderator-line being matched, while also being unable to directly extract their names. I assume "sregex_iterator" would help me if I manage to formulate the correct matching-restrictions?
Cyx.
Profile Joined November 2010
Canada806 Posts
April 22 2015 16:31 GMT
#12383
On April 23 2015 01:15 Artesimo wrote:
However, this still leaves me with the whole moderator-line being matched, while also being unable to directly extract their names. I assume "sregex_iterator" would help me if I manage to formulate the correct matching-restrictions?

Yup, you're pretty much on track
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
April 22 2015 16:47 GMT
#12384
--- Nuked ---
Artesimo
Profile Joined February 2015
Germany546 Posts
Last Edited: 2015-04-22 17:16:10
April 22 2015 17:12 GMT
#12385
okay, so far I got this:

sregex_iterator iterator(line.begin(), line.end(), reg1); //sets up our itrator. line is the line I get via "getline"
sregex_iterator iterator_end; //setting up a ending-condition

while (iterator != iterator_end)
{
cout << *iterator << endl; //doesnt work for some reason, despite me having found exakt this line in a tutorial
++iterator;
}


I fail however, to check my work since I cant find a way to print out whats in iterator, or store it somewhere (which would be crucial to work with it).

Just to recheck:
My plan is to find all names via sregex_iterator, which should be strings that go "firstname lastname", from that string extract firstname and lastname (since I am required to create the guests/hosts as objects with the attributes firstname and lastname) and work with that. How do I store the content of iterator? For the hosts, I just will choose to search for host and apply the regex-critera on everything that comes after "host" in that line.

On the light of my professor:
+ Show Spoiler +
He always stays vague with his tasks and explains very weird, even though that might be just us not understanding. I just feel frustratet since I once again spend multiple days on this simple thing, because once again we got told nothing. There exists so much stuff in c++ that it sometimes feel impossible to find what he aims at/what is the best for that situation.
Also, ee did complain. At the end of the semester, we organized that the whole course complained about him, without any effect so far. Before that, we went to our student body and they pretty much told us "Yeah we know. Pretty much every semester that gets him for the first time complains without any success. Just live with it and try to learn from your fellow students that got others profs, because otherwise you are screwed in the third semester (third programming courses arent hold by him)." During semester break I did a extra course in programming that my university offers where the professor even made fun of me (in a kind way) for being in the lectures of this prof. So I guess I just try to deal with it and next time I just ask here which keywords I should look up. Sorry for my constant nagging.


EDIT: Got how to access the elements found by iterator.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-04-22 19:32:14
April 22 2015 19:30 GMT
#12386
sucks dude
u need to reply 100% only on urself for learning in uni. ur profs wont tell u SHIT
3 yrs = ive never heard of reg expressions until ur post
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2015-04-22 20:02:04
April 22 2015 19:57 GMT
#12387
--- Nuked ---
Artesimo
Profile Joined February 2015
Germany546 Posts
April 22 2015 20:02 GMT
#12388
We actually have 2 really good profs or at least everyone says they are good, but I cant attend their lectures since I have other lectures at that time (I attend a university where your shedule is more strict, you get assign to a certain group and have a few options in term of lectures but for the most part is is pretty determined. Pro is that you are guaranteed to get your degree in time as long as you dont fail any exams, contra is I am unable to avoid this prof without changing the group which I had to request which got denied(since everyone was requesting it). Its almost funny, his lectures arent as full anymore and I barely know anybody since most of them are people who failed last semester, the rest mostly changed group^^. I just will try to get an internship and learn from there. Also, regex is awesome, I wish I had knew about this before
fmod
Profile Blog Joined November 2013
Cayman Islands330 Posts
April 22 2015 20:52 GMT
#12389
On April 23 2015 04:57 Nesserev wrote:
That's weird, I saw regular expressions in at least 2 courses in my first year:
- Computer Systems and Architecture: which came with an introduction to Linux, and thus 'sed', 'awk', 'grep', ... which all use regular expressions.
- Automata & Languages: regular languages and Finite Automata

I guess some universities don't really handle these subjects.

I once satirically dropped the sentence "The best thing about Java, is that it's Turing Complete" on my friends, while we were drunkenly argueing whether or not Java was a good/shit language. (I was trash-worthy drunk.) They went to a different college/university, and they had never even heard about the term.

EDIT:
Which is kinda weird to me, because a background in Automata and Languages seems necessary for understanding parser techniques and compilers.

Where did you go to uni? According to a lot of people the level of unis in Belgium is really good.
I don't particularly like you.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-04-22 21:06:42
April 22 2015 20:57 GMT
#12390
On April 23 2015 04:57 Nesserev wrote:
That's weird, I saw regular expressions in at least 2 courses in my first year:
- Computer Systems and Architecture: which came with an introduction to Linux, and thus 'sed', 'awk', 'grep', ... which all use regular expressions.
- Automata & Languages: regular languages and Finite Automata

I guess some universities don't really handle these subjects.

I once satirically dropped the sentence "The best thing about Java, is that it's Turing Complete" on my friends, while we were drunkenly argueing whether or not Java was a good/shit language. (I was trash-worthy drunk.) They went to a different college/university, and they had never even heard about the term.

EDIT:
Which is kinda weird to me, because a background in Automata and Languages seems necessary for understanding parser techniques and compilers.


my first 2 years, at a college, i was still making database in microsoft access

jumped to the 3rd year of a uni course, managed to pick the zero-content classes

2nd half of the year i had lost motivation and was playing dota nonstop

now i'm here, quit dota/games permanently, ready to work like a bitch, but it might be too late

just have to get passing grades on my Project (due in tomorrow) and Exam (2 weeks time)

and hope that they permit me to take Second Assessment for my two failed units

i tried to confirm my situation with head of department and departmental office but they are ignoring me, so i guess i just have to assume that i've applied the rules to my senario correctly

the rules are

1) "we changed it so that you are permitted to take Second Assessment if you dont submit/attempt the final assignment of a unit"
2) you are permitted to fail up to 40 credits and still be eligible for Second Assessment


my grades are:

20 credit unit : RASS = 37 + (fail) = FAIL

20 credit unit : DISTMOB = 20 + (fail) = FAIL

20 credit unit : PARD = 52

20 credit unit : ASE = 50 + (exam) = NEED 40+ ON COMING EXAM

40 credit unit : PROJECT = (project) = NEED 40+ ON PROJECT

120 total

so i'm correct aren't i

i had/have the opportunity of handing in my RASS and DISTMOB second assignments but since the first assignments had marks below 40, i can't average a 40 in the units, so as far as i can make out there's no point in even trying

Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Acrofales
Profile Joined August 2010
Spain17969 Posts
April 22 2015 21:05 GMT
#12391
FFGenerations, can you program FizzBuzz?
FFGenerations
Profile Blog Joined April 2011
7088 Posts
April 22 2015 21:09 GMT
#12392
i would certainly give it a go, then 10 hours later spam a programming forum about how i can't open my IDE
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
dust7
Profile Joined March 2010
199 Posts
Last Edited: 2015-04-22 21:23:40
April 22 2015 21:12 GMT
#12393
On April 23 2015 04:30 FFGenerations wrote:
sucks dude
u need to reply 100% only on urself for learning in uni. ur profs wont tell u SHIT
3 yrs = ive never heard of reg expressions until ur post

Regular expressions were part of the first programming lecture for comp sci at my uni. Another unusual (but good) thing is that the language of choice was C.

I was hard, though, about 90% failed that class. In the final exam we had a computer, a linux command line, vim, and had to complete one string parsing and one recursion programming exercise.
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
April 22 2015 21:19 GMT
#12394
Ah, document parsing...

Biggest bullshit I had in a Uni course was parsing what I'm pretty sure was a full text dump of like Piratebay or imdb or something. Zero consistency in the data: records had from 5-8 entries, no clear separators for each data point, no way of knowing if a record went like "Title/Producer/Year/$" or "Title/Year" or "Title/Producer/$", etc.

Plus the hilarity of going through a massive text file in school and seeing some very obvious Porn titles. "Hey Professor, the data for Big Lebowski looks completely different from the format of Big Black Cocks 10."
Average means I'm better than half of you.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2015-04-22 21:39:08
April 22 2015 21:37 GMT
#12395
yeah looking at the university year 2 syllabus its entirely possible they covered regex aswell as many many many other things i have no idea about.

my college course on the other hand stopped at basic arrays. i only learnt to spell the word "mathematics" reliably this year and only because i've been saying i don't know any

i have no one to blame but myself but whatever
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2015-04-22 21:57:47
April 22 2015 21:56 GMT
#12396
--- Nuked ---
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-04-22 22:42:28
April 22 2015 22:41 GMT
#12397
@Artesimo

that is the stupidest programming project i've ever seen (in 2nd year too?) and it's no wonder people drop out if that's the kind of shit they have to put up with. i'm pretty sure the real solution is to just hardcode it unless you're supposed to be writing some generic parser...
There is no one like you in the universe.
TMG26
Profile Joined July 2012
Portugal2017 Posts
April 22 2015 22:53 GMT
#12398
At my University we learn Functional Programming (in Haskell) in the very first semester, that and a bunch of math courses makes the first semester. On the second we get Imperative Programming (using C), some more advanced calculus, a course on computers architecture, with some assembly and stuff, and Language Theory (regex, grammars and stuff, Theory only tough, compilers and that theory practical use was on the second year).

I think it is a very good start.
Supporter of the situational Blink Dagger on Storm.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
April 23 2015 05:50 GMT
#12399
this is how i feel being half way thru my project report

Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
April 23 2015 07:05 GMT
#12400
--- Nuked ---
Prev 1 618 619 620 621 622 1031 Next
Please log in or register to reply.
Live Events Refresh
RSL Revival
10:00
Season 1: Playoffs Day 1
ByuN vs Classic
Clem vs Cham
Crank 1636
Tasteless1233
IndyStarCraft 140
Rex135
3DClanTV 81
IntoTheiNu 63
LiquipediaDiscussion
The PondCast
10:00
Episode 53
CranKy Ducklings32
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Crank 1636
Tasteless 1233
IndyStarCraft 140
Rex 135
Harstem 90
ProTech54
EnDerr 4
StarCraft: Brood War
Britney 35486
Sea 3662
Rain 3520
Horang2 3155
Jaedong 1082
BeSt 716
EffOrt 472
Larva 461
Mini 434
Light 336
[ Show more ]
actioN 313
Stork 278
ToSsGirL 220
Last 155
Killer 155
Pusan 102
Mong 86
ZerO 80
Sharp 69
Snow 68
Mind 51
hero 50
sSak 47
Rush 42
Noble 35
Nal_rA 32
sorry 26
yabsab 25
Shinee 21
Sacsri 18
ajuk12(nOOB) 16
soO 14
Icarus 13
Movie 12
JulyZerg 12
NaDa 9
SilentControl 8
IntoTheRainbow 5
Bale 3
Dota 2
BananaSlamJamma536
XcaliburYe471
420jenkins389
Counter-Strike
shoxiejesuss815
x6flipin557
allub150
Super Smash Bros
Mew2King151
Other Games
B2W.Neo519
DeMusliM477
crisheroes286
Lowko158
SortOf60
Pyrionflax49
ArmadaUGS15
ZerO(Twitch)13
Organizations
StarCraft: Brood War
Kim Chul Min (afreeca) 1401
StarCraft 2
ComeBackTV 840
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• StrangeGG 23
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 3
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV398
Upcoming Events
WardiTV European League
4h 18m
ByuN vs NightPhoenix
HeRoMaRinE vs HiGhDrA
Krystianer vs sebesdes
MaxPax vs Babymarine
SKillous vs Mixu
ShoWTimE vs MaNa
Replay Cast
12h 18m
RSL Revival
22h 18m
herO vs SHIN
Reynor vs Cure
OSC
1d 1h
WardiTV European League
1d 4h
Scarlett vs Percival
Jumy vs ArT
YoungYakov vs Shameless
uThermal vs Fjant
Nicoract vs goblin
Harstem vs Gerald
FEL
1d 4h
Korean StarCraft League
1d 15h
CranKy Ducklings
1d 22h
RSL Revival
1d 22h
FEL
2 days
[ Show More ]
Sparkling Tuna Cup
2 days
RSL Revival
2 days
FEL
3 days
BSL: ProLeague
3 days
Dewalt vs Bonyth
Replay Cast
4 days
Replay Cast
4 days
The PondCast
5 days
Replay Cast
6 days
RSL Revival
6 days
Liquipedia Results

Completed

Proleague 2025-06-28
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
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
IEM Cologne 2025
FISSURE Playground #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 © 2025 TLnet. All Rights Reserved.