• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 05:34
CET 11:34
KST 19:34
  • 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 - Playoffs Preview0RSL 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
Community News
Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15[BSL21] Ro.16 Group Stage (C->B->A->D)4Weekly Cups (Nov 17-23): Solar, MaxPax, Clem win3RSL Season 3: RO16 results & RO8 bracket13
StarCraft 2
General
Maestros of the Game: Live Finals Preview (RO4) BGE Stara Zagora 2026 announced Weekly Cups (Nov 24-30): MaxPax, Clem, herO win SC2 Proleague Discontinued; SKT, KT, SGK, CJ disband Information Request Regarding Chinese Ladder
Tourneys
$5,000+ WardiTV 2025 Championship Constellation Cup - Main Event - Stellar Fest RSL Revival: Season 3 Tenacious Turtle Tussle [Alpha Pro Series] Nice vs Cure
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress Mutation # 500 Fright night Mutation # 499 Chilling Adaptation
Brood War
General
Data analysis on 70 million replays Which season is the best in ASL? [ASL20] Ask the mapmakers — Drop your questions BW General Discussion FlaSh's Valkyrie Copium
Tourneys
[Megathread] Daily Proleagues [BSL21] RO16 Group B - Sunday 21:00 CET [BSL21] RO16 Group C - Saturday 21:00 CET Small VOD Thread 2.0
Strategy
Game Theory for Starcraft How to stay on top of macro? Current Meta PvZ map balance
Other Games
General Games
Stormgate/Frost Giant Megathread The Perfect Game Path of Exile Nintendo Switch Thread Should offensive tower rushing be viable in RTS games?
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
Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine US Politics Mega-thread The Big Programming Thread Artificial Intelligence Thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Where to ask questions and add stream? The Automated Ban List
Blogs
James Bond movies ranking - pa…
Topin
Esports Earnings: Bigger Pri…
TrAiDoS
Thanks for the RSL
Hildegard
Saturation point
Uldridge
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1006 users

The Big Programming Thread - Page 424

Forum Index > General Forum
Post a Reply
Prev 1 422 423 424 425 426 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.
SixStrings
Profile Blog Joined August 2013
Germany2046 Posts
January 09 2014 18:45 GMT
#8461
Don't forget that the only f+p function is exclusive to the _/-logic-chain.
Once you remove the flux-capacitor and restore the dos-command to idle(3)-, the whatchamacallit won't yield any surge results. Rookie mistake, really.
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
January 09 2014 19:43 GMT
#8462
.NET MVC question:
Suppose I have a website with a basic header, sidebar, and content layout. I've found that I really like asynchronous calls so I can display content easily without having to refresh the entire page. Would there be any significant problems if all the links in the sidebar and header performed an ajax update on the content section?
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
January 09 2014 19:54 GMT
#8463
if the user disables javascript your entire website stops working
Liquipediaasante sana squash banana
enigmaticcam
Profile Blog Joined October 2010
United States280 Posts
January 09 2014 20:03 GMT
#8464
On January 10 2014 04:54 tofucake wrote:
if the user disables javascript your entire website stops working

Well it would be an internal website within the network at the workplace. But you're right - I hadn't even thought of that. I suppose there's no way to have a regular link that works without javascript, but can be overridden by javascript when it's enabled?
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
Last Edited: 2014-01-10 07:24:36
January 10 2014 07:21 GMT
#8465
On January 10 2014 05:03 enigmaticcam wrote:
Show nested quote +
On January 10 2014 04:54 tofucake wrote:
if the user disables javascript your entire website stops working

Well it would be an internal website within the network at the workplace. But you're right - I hadn't even thought of that. I suppose there's no way to have a regular link that works without javascript, but can be overridden by javascript when it's enabled?

Sure there is. There's no problem having an anchor element with an onclick event handler, then preventing the default event with javascript. That way, the link will work as a standard link when not using javascript, and will have the javascript event fire instead if it's enabled.

Question is how this makes sense in MVC, since you'll probably have the header and sidebar in _Layout.cshtml and content in views... using ajax to load views into the content seems like it would add a ton of complexity.
Tobberoth
Profile Joined August 2010
Sweden6375 Posts
Last Edited: 2014-01-10 07:24:18
January 10 2014 07:24 GMT
#8466
[double post]
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
January 10 2014 07:58 GMT
#8467
On January 10 2014 16:21 Tobberoth wrote:
Show nested quote +
On January 10 2014 05:03 enigmaticcam wrote:
On January 10 2014 04:54 tofucake wrote:
if the user disables javascript your entire website stops working

Well it would be an internal website within the network at the workplace. But you're right - I hadn't even thought of that. I suppose there's no way to have a regular link that works without javascript, but can be overridden by javascript when it's enabled?

Sure there is. There's no problem having an anchor element with an onclick event handler, then preventing the default event with javascript. That way, the link will work as a standard link when not using javascript, and will have the javascript event fire instead if it's enabled.

Question is how this makes sense in MVC, since you'll probably have the header and sidebar in _Layout.cshtml and content in views... using ajax to load views into the content seems like it would add a ton of complexity.


Worth noting that this is good advice for every website you make. Make it functional without Javascript, no CSS (mostly for accessibility), no Flash, etc. first, and then use all that extra stuff to make it pretty. Most of the time that just means organizing your Divs top to bottom in a sensible manner, and having some kind of default HTML functionality for Javascript links.

It won't be important in the majority of situations you run into, but it doesn't really take effort, and you'll be happy when you do/would've hit those problem scenarios.
Average means I'm better than half of you.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
January 10 2014 20:11 GMT
#8468
hey, could someone take a quick look at this please...

in c#

i have an Ability class

I have a Monster class

I have a Game class

each Monster can have one of two AbilityLists which each contain 4 Abilities

in Game I have:

public Ability[] abilityList1 = new Ability[4];
public Ability[] abilityList2 = new Ability[4];

which makes an array of 4 Abilities called abilityList1

then i have in Game's constructor:

abilityList1[0] = new Ability("smash", 1);
abilityList1[1] = new Ability("crush", 2);
abilityList1[2] = new Ability("mash", 3);
abilityList1[3] = new Ability("desolate", 4);

in Monster i have:

private Ability[] abilityList = new Ability[4];

then in Monster's constructor i have:

public Monster(string monsterNameIn, int monsterPowerIn, int monsterHealthIn, Ability abilityListIn, bool isChosenIn, string isDeadIn)
{
monsterName = monsterNameIn;
monsterHealth = monsterHealthIn;
abilityList = abilityListIn;

it says here though that Cannot implicity convert Game1.Ability to Game1.Ability[]

going to hit post and try to understand this
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
bangsholt
Profile Joined June 2011
Denmark138 Posts
January 10 2014 20:14 GMT
#8469
What is it in the error message you do not understand?

You're trying to assign an array of Ability to a single Ability.

Change your Monster class to hold an array of Ability. Done.
artynko
Profile Joined November 2010
Slovakia86 Posts
January 10 2014 20:15 GMT
#8470
Just look at the type the abilityList in Monster has and what you are sending into the constructor as abilityListIn.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
January 10 2014 20:20 GMT
#8471
ok the red shit went away when i changed

Ability abilityListIn

in the monsters constructor class to

Ability[] abilityListIn

and then changed, in Game constructor, abilitiyList1 back from abilityList[] or whatever i had it as

new Monster("The Grue", 10, 10, abilityList1, false, "alive");
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
FFGenerations
Profile Blog Joined April 2011
7088 Posts
January 10 2014 20:21 GMT
#8472
i was just trying putting [] and stuff all over the place and finally looked at that part, i guess

thanks
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
bangsholt
Profile Joined June 2011
Denmark138 Posts
January 10 2014 20:47 GMT
#8473
... why don't you just read the error message? That one wasn't even cryptic.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2014-01-11 04:36:28
January 11 2014 04:28 GMT
#8474
do you know if computers with visual studio express 2013 treat my .exe any different to my laptop with visual studio ultimate 2012?

i finished my assignment (fast and messy) and it runs as expected on my laptop.

but i just tried it on my PC (downloaded the same file from where i uploaded it to the college) and it stops working when it gets to the end part

the part in question is when SelectMonster form tries to see that all activePlayer's monsters have health < 0 . on my working laptop version, when this is the case (all of his monsters have been killed), endGame is called and endGameScreen form opens

however on my PC, when activePlayer's monsters are all dead it doesn't notice and just shows the SelectMonster form with unfilled buttons

+ Show Spoiler +

on my PC
[image loading]

on my laptop
[image loading]


ill post the file

its really tatty code with 50 forms stuck on the screen and you have to press space bar 100 times to get near the end (dont miss the end by accident) so you are warned

i just want to know why its not working on my PC which has visual express 2013 installed whereas it works on my laptop

http://www.mirrorcreator.com/files/0FDHPLXA/FFGOOP.zip_links

ps you will probably find this amusingly bad
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
CecilSunkure
Profile Blog Joined May 2010
United States2829 Posts
January 11 2014 04:41 GMT
#8475
Are you loading any files from disk that you forgot to package? Text files? DLLs? Do you actually have the correct VS runtime installed on both machines?

Just make sure it will run properly on whatever machine it will be graded on.
FFGenerations
Profile Blog Joined April 2011
7088 Posts
Last Edited: 2014-01-11 04:49:03
January 11 2014 04:46 GMT
#8476
mm i just zipped everything and also copied the .exe from the subfolder and put it at the top folder so more easily accessible for tutor. but also when i ran the program from within visual studio on my PC it broke there aswell. also downloading my uploaded file to laptop to doublecheck it yields the same differing results between machines

i just googled VS runtime , clicked first google link (Microsoft Visual C++ 2010 Redistributable Package (x86)), and tried to install/upgrade on both machines but it said both are on more modern versions already

its weird coz its just some simple function that it breaks on i think. i thought maybe i was using wrong operator so tried & instead of && , and tried moving an if statement up a bit and putting an else below it, but exactly same issue
Cool BW Music Vid - youtube.com/watch?v=W54nlqJ-Nx8 ~~~~~ ᕤ OYSTERS ᕤ CLAMS ᕤ AND ᕤ CUCKOLDS ᕤ ~~~~~~ ༼ ᕤ◕◡◕ ༽ᕤ PUNCH HIM ༼ ᕤ◕◡◕ ༽ᕤ
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
January 11 2014 04:52 GMT
#8477
...why are you downloading C++ Packages for a C# program?

And if you can replace "&" with "&&" at any place in your code without seeing a problem, I'd say you have some serious issues that go far beyond what you're seeing.
Average means I'm better than half of you.
tofucake
Profile Blog Joined October 2009
Hyrule19167 Posts
January 11 2014 05:08 GMT
#8478
On January 11 2014 13:46 FFGenerations wrote:
mm i just zipped everything and also copied the .exe from the subfolder and put it at the top folder so more easily accessible for tutor. but also when i ran the program from within visual studio on my PC it broke there aswell. also downloading my uploaded file to laptop to doublecheck it yields the same differing results between machines

i just googled VS runtime , clicked first google link (Microsoft Visual C++ 2010 Redistributable Package (x86)), and tried to install/upgrade on both machines but it said both are on more modern versions already

its weird coz its just some simple function that it breaks on i think. i thought maybe i was using wrong operator so tried & instead of && , and tried moving an if statement up a bit and putting an else below it, but exactly same issue

& is an operator
&& is a comparator
Liquipediaasante sana squash banana
Ben...
Profile Joined January 2011
Canada3485 Posts
Last Edited: 2014-01-11 05:49:55
January 11 2014 05:38 GMT
#8479
On January 11 2014 13:46 FFGenerations wrote:its weird coz its just some simple function that it breaks on i think. i thought maybe i was using wrong operator so tried & instead of && , and tried moving an if statement up a bit and putting an else below it, but exactly same issue
If you were doing C and that didn't completely explode upon attempted compilation, my head would have itself blown up. && is a boolean value that examines two sets (or variables or whatever you want to call them if you will) and sees if they match or not, returning true if they do, false if they don't. & looks at two binary values and copies the 1's or 0's found in both (Sometimes called bitand. It is one of the bitwise operations).

Say you have two binary values, a = 1011 and b = 1110. & looks at each value in the binary numbers, and if they are the same, it "writes" it down into the resultant binary value. For the above two values, the result of doing a & b would be 1010. If you are familiar with the concept of truth tables in propositional or predicate logic, you can kind of think of & like filling out one of those tables, since technically you could simply read the 1s and 0s as true and false in that context. At least that is how I thought of it when we had to do operations with binary numbers by hand.

Like the other dude said, something must be breaking before this, because there is no way you should get the same errors using those two vastly different things if it is reaching that point in the program when attempting to compile.
"Cliiiiiiiiiiiiiiiiide" -Tastosis
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
January 11 2014 05:51 GMT
#8480
On January 11 2014 14:38 Ben... wrote:
Show nested quote +
On January 11 2014 13:46 FFGenerations wrote:its weird coz its just some simple function that it breaks on i think. i thought maybe i was using wrong operator so tried & instead of && , and tried moving an if statement up a bit and putting an else below it, but exactly same issue
If you were doing C and that didn't completely explode, my head would have itself blown up. && is a boolean value, & looks at two binary values and copies the 1's or 0's found in both.

Say you have two binary values, a = 1011 and b = 1110. & looks at each value in the binary numbers, and if they are the same, it "writes" it down into the resultant binary value. For the above two values, the result of doing a & b would be 1010.


Eh, just want to say this is a fairly bad explanation of a Bitwise AND operation, not to mention incorrect. Bitwise AND compares every bit position in two binary values, and for each position if both are 1 it returns 1 for the corresponding position, otherwise it returns 0.

So yes, 1011 AND 1110 = 1010.

However, 0000 AND 0000 = 0000, even though the corresponding bits in each position are the "same".

The logical operation that does what you describe is a biconditional (XNOR), or "if and only if"
Average means I'm better than half of you.
Prev 1 422 423 424 425 426 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 1h 27m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 192
ProTech123
MindelVK 1
StarCraft: Brood War
Calm 3517
Shuttle 2100
Horang2 1508
actioN 599
Jaedong 455
Larva 451
Mini 330
Light 189
Hyun 185
Rush 135
[ Show more ]
Sharp 133
ZerO 127
Pusan 117
Zeus 101
Last 78
Killer 69
sorry 65
ToSsGirL 48
NotJumperer 32
Mong 31
soO 27
ajuk12(nOOB) 17
Hm[arnc] 9
Terrorterran 7
scan(afreeca) 5
Dota 2
XaKoH 402
XcaliburYe180
Counter-Strike
olofmeister1569
shoxiejesuss585
Super Smash Bros
Westballz17
Other Games
summit1g10655
JimRising 364
Fuzer 155
KnowMe66
ZerO(Twitch)11
Organizations
Other Games
gamesdonequick636
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH226
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota267
League of Legends
• Jankos1794
• Stunt996
Upcoming Events
Wardi Open
1h 27m
StarCraft2.fi
6h 27m
Replay Cast
13h 27m
The PondCast
23h 27m
OSC
1d 5h
Demi vs Mixu
Nicoract vs TBD
Babymarine vs MindelVK
ForJumy vs TBD
Shameless vs Percival
Replay Cast
1d 13h
Korean StarCraft League
2 days
CranKy Ducklings
2 days
SC Evo League
3 days
BSL 21
3 days
Sziky vs OyAji
Gypsy vs eOnzErG
[ Show More ]
OSC
3 days
Solar vs Creator
ByuN vs Gerald
Percival vs Babymarine
Moja vs Krystianer
EnDerr vs ForJumy
sebesdes vs Nicoract
Sparkling Tuna Cup
3 days
OSC
4 days
BSL 21
4 days
Bonyth vs StRyKeR
Tarson vs Dandy
Replay Cast
4 days
Wardi Open
5 days
StarCraft2.fi
5 days
Replay Cast
5 days
StarCraft2.fi
6 days
PiGosaur Monday
6 days
Liquipedia Results

Completed

Proleague 2025-11-30
RSL Revival: Season 3
Light HT

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
CSCL: Masked Kings S3
Slon Tour Season 2
Acropolis #4 - TS3
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
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

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
Kuram Kup
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 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.