• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 07:00
CET 13:00
KST 21:00
  • 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
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge1[TLMC] Fall/Winter 2025 Ladder Map Rotation13Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45
StarCraft 2
General
Weekly Cups (Nov 10-16): Reynor, Solar lead Zerg surge [TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview
Tourneys
$5,000+ WardiTV 2025 Championship RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 500 Fright night Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review BW General Discussion
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
How to stay on top of macro? Current Meta PvZ map balance Simple Questions, Simple Answers
Other Games
General Games
Should offensive tower rushing be viable in RTS games? Path of Exile Clair Obscur - Expedition 33 Stormgate/Frost Giant Megathread Nintendo Switch Thread
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine About SC2SEA.COM Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2336 users

The Big Programming Thread - Page 152

Forum Index > General Forum
Post a Reply
Prev 1 150 151 152 153 154 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.
iamke55
Profile Blog Joined April 2004
United States2806 Posts
July 29 2012 22:23 GMT
#3021
So I was googling a SQL problem I had at work and found it amusing when I clicked on a thread and this result popped up. Which one of you was it?
During practice session, I discovered very good build against zerg. -Bisu[Shield]
DumJumJmyWum
Profile Joined March 2011
United States75 Posts
July 29 2012 22:35 GMT
#3022
Hey guys, I was thinking about using Google Web Toolkit with Google App Engine to build something similar to memrise. Originally I was just going to use GAE by itself + Java framework, but saw GWT. Anyone have any experience with GWT?
SiPa
Profile Joined July 2010
Germany129 Posts
Last Edited: 2012-07-30 15:25:04
July 30 2012 12:50 GMT
#3023
Hey Guys, it's me again! I'm sure you missed me
Questions, questions, questions...
+ Show Spoiler +
I got a matrix in an excel-file.
I want to write that matrix into a 2D-array in VisualBasic (or C, C++, C#, preferred VB)
If the matrix is completely filled (no empty spaces in between 2 Values) --> np
If the matrix has "holes" in it, im kinda lost...how do I figure out the last value in a matrix? (at the bottom right; bottom before right)
Is there a function in Excel? (i'm pretty sure i could use that with VB)
Is there an algorithm? ^^ (dont think so)
No matrix-lenght or width specified.
Do Excel files "end"? (xlsx, xls) --> I use
Imports Excel = Microsoft.Office.Interop.Excel
...
Dim ExcelApp As Excel.Application
Dim ExcelWkBook As Excel.Workbook
Dim ExcelWkSheet As Excel.Worksheet
ExcelApp = New Microsoft.Office.Interop.Excel.Application
ExcelWkBook = ExcelApp.Workbooks.Open(filename)
ExcelWkSheet = ExcelWkBook.Worksheets(worksheet)
...
matrix(i, j) = ExcelWkSheet.Cells(i, j).value

with 2 loops around the last line to fill it up.
Could I just read to the "end" of the file?


Ok I kinda found a way: NullReference-Exceptions.
But since i open the File with Excel, the Rows and Columns never stop.
Fuuuuuudamn
I cant think of an elegant way...
Guess i will have the user put the dimensions of the matrix :S
Spidinko
Profile Joined May 2010
Slovakia1174 Posts
July 30 2012 13:39 GMT
#3024
Hey guys. I'm looking for a project for my bachelor's thesis. I'm mostly interested in artificial intelligence, specifically genetic algorithms and neural networks.

Could anyone give me some ideas? I'm running out of time and have no clue what I'm going to do yet.
GhostLink
Profile Joined January 2011
United States450 Posts
July 30 2012 13:50 GMT
#3025
How do i write a python code for combining one picture with another, manipulating it by pixels, i.e. if i wanted to shade a picture grey at it's corners. I'm just starting out and a complete noob, so i'd appreciate anyone who can point me in the right direction.
Let a man play chess, and tell him that every pawn is his friend. Let him think both bishops holy. Let him remember happy days in the shadows of his castles. Let him love his queen. Watch him lose them all.
supereddie
Profile Joined March 2011
Netherlands151 Posts
July 30 2012 18:18 GMT
#3026
On July 30 2012 21:50 SiPa wrote:
Hey Guys, it's me again! I'm sure you missed me
Questions, questions, questions...
+ Show Spoiler +
I got a matrix in an excel-file.
I want to write that matrix into a 2D-array in VisualBasic (or C, C++, C#, preferred VB)
If the matrix is completely filled (no empty spaces in between 2 Values) --> np
If the matrix has "holes" in it, im kinda lost...how do I figure out the last value in a matrix? (at the bottom right; bottom before right)
Is there a function in Excel? (i'm pretty sure i could use that with VB)
Is there an algorithm? ^^ (dont think so)
No matrix-lenght or width specified.
Do Excel files "end"? (xlsx, xls) --> I use
Imports Excel = Microsoft.Office.Interop.Excel
...
Dim ExcelApp As Excel.Application
Dim ExcelWkBook As Excel.Workbook
Dim ExcelWkSheet As Excel.Worksheet
ExcelApp = New Microsoft.Office.Interop.Excel.Application
ExcelWkBook = ExcelApp.Workbooks.Open(filename)
ExcelWkSheet = ExcelWkBook.Worksheets(worksheet)
...
matrix(i, j) = ExcelWkSheet.Cells(i, j).value

with 2 loops around the last line to fill it up.
Could I just read to the "end" of the file?


Ok I kinda found a way: NullReference-Exceptions.
But since i open the File with Excel, the Rows and Columns never stop.
Fuuuuuudamn
I cant think of an elegant way...
Guess i will have the user put the dimensions of the matrix :S

If it is a named matrix, you can use that to select everything and then iterate the selection.
"Do not try to make difficult things possible, but make simple things simple." - David Platt on Software Design
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
July 31 2012 02:32 GMT
#3027
On July 30 2012 22:50 GhostLink wrote:
How do i write a python code for combining one picture with another, manipulating it by pixels, i.e. if i wanted to shade a picture grey at it's corners. I'm just starting out and a complete noob, so i'd appreciate anyone who can point me in the right direction.

You'd need to use a library for file manipulation or look up the file data format so you can modify bits of the file by hand.
ranshaked
Profile Blog Joined August 2010
United States870 Posts
Last Edited: 2012-08-01 00:34:02
August 01 2012 00:15 GMT
#3028
Hey guys, I had an assignment due the other day (passed due date as you can see here: [image loading]

Unfortunately, I still do not understand how to do the assignment, and it's bothering me quite a lot. I've been given a skeleton of code, and I need to design the functions to complete it. It's in C. It's rather long, but if someone can help me in a PM that would be great. I don't want to provide the code on here just in case future students will find it and cheat.

As of right now I have half of the program working, but I need help understanding return values, and exactly what I can put in functions to help it work. It would be greatly appreciated. Thank you all.

EDIT: Can you see the image now?
woozie
Profile Joined July 2010
Sweden53 Posts
August 01 2012 00:24 GMT
#3029
On August 01 2012 09:15 ranshaked wrote:
Hey guys, I had an assignment due the other day (passed due date as you can see here: [image loading])

Unfortunately, I still do not understand how to do the assignment, and it's bothering me quite a lot. I've been given a skeleton of code, and I need to design the functions to complete it. It's in C. It's rather long, but if someone can help me in a PM that would be great. I don't want to provide the code on here just in case future students will find it and cheat.

As of right now I have half of the program working, but I need help understanding return values, and exactly what I can put in functions to help it work. It would be greatly appreciated. Thank you all.


Could you at least give out the information in the pdf file, so that someone might actually know what you're supposed to do ...?
frogmelter
Profile Blog Joined April 2009
United States971 Posts
August 01 2012 00:25 GMT
#3030
On August 01 2012 09:15 ranshaked wrote:
Hey guys, I had an assignment due the other day (passed due date as you can see here: [image loading])

Unfortunately, I still do not understand how to do the assignment, and it's bothering me quite a lot. I've been given a skeleton of code, and I need to design the functions to complete it. It's in C. It's rather long, but if someone can help me in a PM that would be great. I don't want to provide the code on here just in case future students will find it and cheat.

As of right now I have half of the program working, but I need help understanding return values, and exactly what I can put in functions to help it work. It would be greatly appreciated. Thank you all.


I sent a PM. Waiting for a response...
TL+ Member
ranshaked
Profile Blog Joined August 2010
United States870 Posts
August 01 2012 00:27 GMT
#3031
On August 01 2012 09:24 woozie wrote:
Show nested quote +
On August 01 2012 09:15 ranshaked wrote:
Hey guys, I had an assignment due the other day (passed due date as you can see here: [image loading])

Unfortunately, I still do not understand how to do the assignment, and it's bothering me quite a lot. I've been given a skeleton of code, and I need to design the functions to complete it. It's in C. It's rather long, but if someone can help me in a PM that would be great. I don't want to provide the code on here just in case future students will find it and cheat.

As of right now I have half of the program working, but I need help understanding return values, and exactly what I can put in functions to help it work. It would be greatly appreciated. Thank you all.


Could you at least give out the information in the pdf file, so that someone might actually know what you're supposed to do ...?

Yeah I can. + Show Spoiler +
Objectives
1. To learn how to use functions for modular programming
Problem: Tic Tac Toe (tictactoe.c)
The game of Tic Tac Toe is an excellent example of how large problems can be broken down into
solvable portions. During our lecture on 2D arrays we talked about the major tasks associated
with Tic Tac Toe:
 Checking to see if the game board is full
 Getting a user’s move
 Checking that the move is valid
 Placing the move on the board
 Checking to see if there is a winner
In this assignment, you will be completing these tasks. A skeleton program has already been
written for you. Main is completed and the function prototypes are established – do not change
these. Fill in the function based on the instructions provided in the skeleton.
tofucake
Profile Blog Joined October 2009
Hyrule19155 Posts
August 01 2012 00:30 GMT
#3032
Yeah that's wonderful.

But A) the OP clearly states I'll smack you and 2. we can't see those attachments so your post is a waste.

You basically asked "hey guys here's this thing how do I do it?" but you never explained what the thing is.
Liquipediaasante sana squash banana
Abductedonut
Profile Blog Joined December 2010
United States324 Posts
August 01 2012 00:39 GMT
#3033
I can help you ranshaked. Send me a PM!
ranshaked
Profile Blog Joined August 2010
United States870 Posts
August 01 2012 00:49 GMT
#3034
On August 01 2012 09:39 Abductedonut wrote:
I can help you ranshaked. Send me a PM!

Thanks! PM sent.
woozie
Profile Joined July 2010
Sweden53 Posts
August 01 2012 01:49 GMT
#3035
On August 01 2012 09:27 ranshaked wrote:
Show nested quote +
On August 01 2012 09:24 woozie wrote:
On August 01 2012 09:15 ranshaked wrote:
Hey guys, I had an assignment due the other day (passed due date as you can see here: [image loading])

Unfortunately, I still do not understand how to do the assignment, and it's bothering me quite a lot. I've been given a skeleton of code, and I need to design the functions to complete it. It's in C. It's rather long, but if someone can help me in a PM that would be great. I don't want to provide the code on here just in case future students will find it and cheat.

As of right now I have half of the program working, but I need help understanding return values, and exactly what I can put in functions to help it work. It would be greatly appreciated. Thank you all.


Could you at least give out the information in the pdf file, so that someone might actually know what you're supposed to do ...?

Yeah I can. + Show Spoiler +
Objectives
1. To learn how to use functions for modular programming
Problem: Tic Tac Toe (tictactoe.c)
The game of Tic Tac Toe is an excellent example of how large problems can be broken down into
solvable portions. During our lecture on 2D arrays we talked about the major tasks associated
with Tic Tac Toe:
 Checking to see if the game board is full
 Getting a user’s move
 Checking that the move is valid
 Placing the move on the board
 Checking to see if there is a winner
In this assignment, you will be completing these tasks. A skeleton program has already been
written for you. Main is completed and the function prototypes are established – do not change
these. Fill in the function based on the instructions provided in the skeleton.


Right. For me that doesn't seem too difficult. Was there any task in particular that you had a problem with?

Also, please explain what you've done thus far.
SiPa
Profile Joined July 2010
Germany129 Posts
August 01 2012 10:56 GMT
#3036
Hey, I wanna read a Matrix out of a .txt-file using Visual basic and the Library System.IO into a 2-dimensional Array.
Matrix looks like this (example):
1 2 5 1 6
2 5 7,3 5,7 1
2,3 9 8,5 1 2

So the numbers are seperated by empty spaces and some are rational(with , or . ), some are natural.
Suggestions? ^^
Maybe a string for each line, then a string for each number and then CDbl?
And then put those into an array?
Do all at once?
Use an easy function provided by system.io? ^^
Appreciate any help i can get!
artynko
Profile Joined November 2010
Slovakia86 Posts
August 01 2012 11:06 GMT
#3037
On July 30 2012 07:35 DumJumJmyWum wrote:
Hey guys, I was thinking about using Google Web Toolkit with Google App Engine to build something similar to memrise. Originally I was just going to use GAE by itself + Java framework, but saw GWT. Anyone have any experience with GWT?

We use GWT at work and it all depends on the size of the application you plan to do. GWT gets exponencialy worse as you add in extra functionality and some of the js calls take huge ammounts of time to complete. If you just need a simple page with a little dynamic content then it would work fine, anything that is borderline on the enterprise sized app will work very poorly.
On the other hand if you want something small then you could probably use Scala + LIFT or even PHP (shoot me) and save a ton of time spent on getting all the backend stuff working (or use Roo).
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
August 01 2012 11:11 GMT
#3038
On August 01 2012 19:56 SiPa wrote:
Hey, I wanna read a Matrix out of a .txt-file using Visual basic and the Library System.IO into a 2-dimensional Array.
Matrix looks like this (example):
1 2 5 1 6
2 5 7,3 5,7 1
2,3 9 8,5 1 2

So the numbers are seperated by empty spaces and some are rational(with , or . ), some are natural.
Suggestions? ^^
Maybe a string for each line, then a string for each number and then CDbl?
And then put those into an array?
Do all at once?
Use an easy function provided by system.io? ^^
Appreciate any help i can get!

Easiest way is probably to read it one string at a time, use Split to get an array of strings and then place those arrays one at a time into an array of arrays, your 2d array. Do you really need to save the numbers as doubles rather than strings? I think it could be problematic since there's both , and . used. If you do, you would obviously need to loop your arrays once to convert them.
SRBNikola
Profile Blog Joined July 2011
Serbia191 Posts
Last Edited: 2012-08-01 11:50:25
August 01 2012 11:18 GMT
#3039
On August 01 2012 19:56 SiPa wrote:
Hey, I wanna read a Matrix out of a .txt-file using Visual basic and the Library System.IO into a 2-dimensional Array.
Matrix looks like this (example):
1 2 5 1 6
2 5 7,3 5,7 1
2,3 9 8,5 1 2

So the numbers are seperated by empty spaces and some are rational(with , or . ), some are natural.
Suggestions? ^^
Maybe a string for each line, then a string for each number and then CDbl?
And then put those into an array?
Do all at once?
Use an easy function provided by system.io? ^^
Appreciate any help i can get!


Hey, there are 2 ways to do it .Net(maybe more but i know 2 good ways), first way is Regular Expression that i dont think is economic for this, however there is string splitting, basicly you read line and then split string by white space, you will get array of values for each line. You use String.Split(' ') (this is C#, i forgot VB syntax xD but should be something like Sring.Split...) it will return an array of values, u can check length of it and so on.

This might help you
http://msdn.microsoft.com/en-us/library/system.string.split.aspx

Tell me if you are having problems!
SiPa
Profile Joined July 2010
Germany129 Posts
Last Edited: 2012-08-01 11:22:40
August 01 2012 11:21 GMT
#3040
On August 01 2012 20:11 Tobberoth wrote:
+ Show Spoiler +
On August 01 2012 19:56 SiPa wrote:
Hey, I wanna read a Matrix out of a .txt-file using Visual basic and the Library System.IO into a 2-dimensional Array.
Matrix looks like this (example):
1 2 5 1 6
2 5 7,3 5,7 1
2,3 9 8,5 1 2

So the numbers are seperated by empty spaces and some are rational(with , or . ), some are natural.
Suggestions? ^^
Maybe a string for each line, then a string for each number and then CDbl?
And then put those into an array?
Do all at once?
Use an easy function provided by system.io? ^^
Appreciate any help i can get!

Easiest way is probably to read it one string at a time, use Split to get an array of strings and then place those arrays one at a time into an array of arrays, your 2d array. Do you really need to save the numbers as doubles rather than strings? I think it could be problematic since there's both , and . used. If you do, you would obviously need to loop your arrays once to convert them.


CDbl casts both, 6,5 and 6.5, into the same value: 6.5

Edit: Nvm, i guess the last post pretty much explained it
Well, ill try it, lets see...
Prev 1 150 151 152 153 154 1032 Next
Please log in or register to reply.
Live Events Refresh
Wardi Open
12:00
#61
WardiTV105
Rex67
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Reynor 327
ProTech116
Rex 67
StarCraft: Brood War
Britney 41366
Sea 9912
Calm 7556
Horang2 1461
Jaedong 852
EffOrt 326
Soma 321
Stork 303
Larva 255
Light 227
[ Show more ]
Pusan 197
Zeus 171
ZerO 109
Killer 105
Rush 86
ToSsGirL 69
Mind 65
scan(afreeca) 47
yabsab 38
Sea.KH 31
Liquid`Ret 20
Icarus 20
Hm[arnc] 15
ivOry 11
Noble 9
Dota 2
XaKoH 476
XcaliburYe122
Counter-Strike
olofmeister1820
shoxiejesuss894
x6flipin544
zeus279
allub172
Other Games
summit1g15656
B2W.Neo614
Pyrionflax406
Fuzer 300
crisheroes287
rGuardiaN159
ZerO(Twitch)13
Organizations
Dota 2
PGL Dota 2 - Main Stream10791
PGL Dota 2 - Secondary Stream3715
StarCraft: Brood War
UltimateBattle 99
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 12 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 1350
League of Legends
• Stunt533
Upcoming Events
Monday Night Weeklies
5h
Replay Cast
11h
ChoboTeamLeague
13h
WardiTV Korean Royale
1d
BSL: GosuLeague
1d 9h
The PondCast
1d 22h
Replay Cast
2 days
RSL Revival
2 days
herO vs Zoun
Classic vs Reynor
Maru vs SHIN
MaxPax vs TriGGeR
BSL: GosuLeague
3 days
RSL Revival
3 days
[ Show More ]
WardiTV Korean Royale
4 days
RSL Revival
4 days
WardiTV Korean Royale
5 days
IPSL
5 days
Julia vs Artosis
JDConan vs DragOn
RSL Revival
5 days
Wardi Open
6 days
IPSL
6 days
StRyKeR vs OldBoy
Sziky vs Tarson
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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.