• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:41
CEST 09:41
KST 16:41
  • 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
Balance hotfix patch 5.0.16b (July 16)43Reynor: GSL Loss Wasn't About Preparation Format16[IPSL] Spring 2026 Grand Finals - This Weekend!5Weekly Cups (July 6 - 12): Protoss strike back12BSL Season 22 Full Overview & Conclusion8
StarCraft 2
General
Balance hotfix patch 5.0.16b (July 16) [D] Wireframe Casting Removed Clem: "I don't have that much hope in Blizzard" Reynor: GSL Loss Wasn't About Preparation Format Is the larve respawn broken?
Tourneys
Master Swan Open (Global Bronze-Master 2) WardiTV Summer Cup 2026 GSL CK #5 Race War RSL Revival: Season 6 - Qualifiers and Main Event HomeStory Cup 29
Strategy
[G] Having the right mentality to improve
Custom Maps
New Map Maker - Looking for Advice - Love or Hate Work In Progress Melee Maps [D]RTS in all its shapes and glory <3
External Content
The PondCast: SC2 News & Results Mutation # 534 Burning Evacuation Mutation # 533 Die Together Mutation # 532 Nuclear Family
Brood War
General
BW General Discussion Pros Debate: Zerg Unfairly Nerfed? (ASL S22 map) Etiquete rules in Asl? Recent recommended BW games Recommended FPV games (post-KeSPA)
Tourneys
Escore Tournament - Season 3 [Megathread] Daily Proleagues Small VOD Thread 2.0 [IPSL] Spring 2026 Grand Finals - This Weekend!
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Creating a full chart of Zerg builds Relatively freeroll strategies
Other Games
General Games
General RTS Discussion Thread Path of Exile Nintendo Switch Thread Beyond All Reason Stormgate/Frost Giant Megathread
Dota 2
Looking for a Dota Mentor 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
TL Mafia
TL Mafia Power Rank NeO.D_StephenKing vs This Guy From 1 Million Dance TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread UK Politics Mega-thread YouTube Thread
Fan Clubs
The IdrA Fan Club The HerO Fan Club!
Media & Entertainment
Movie Discussion! Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Series you have seen recently...
Sports
2024 - 2026 Football Thread MLB/Baseball 2023 McBoner: A hockey love story Tennis[sport] Formula 1 Discussion
World Cup 2022
Tech Support
Simple Questions Simple Answers FPS when play League Of Legend on laptop How to clean a TTe Thermaltake keyboard?
TL Community
Northern Ireland Global Starcraft The Automated Ban List
Blogs
Poker (part 2)
Nebuchad
The Experiences We Want and …
TrAiDoS
An Exploration of th…
waywardstrategy
ramps on octagon
StaticNine
Funny Nicknames
LUCKY_NOOB
Evil Gacha Games and the…
ffswowsucks
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7614 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
Hyrule19228 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
Hyrule19228 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 19m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft722
SortOf 191
StarCraft: Brood War
Shuttle 2122
Leta 279
Larva 188
Dewaltoss 111
Dota 2
Fuzer 70
League of Legends
JimRising 667
Other Games
summit1g6786
XaKoH 146
amsayoshi79
Organizations
Other Games
gamesdonequick2228
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH315
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• lizZardDota2306
League of Legends
• Stunt621
Upcoming Events
RSL Revival
1h 19m
Clem vs Lambo
Scarlett vs Cure
CranKy Ducklings
2h 19m
Epic.LAN
5h 19m
IPSL
8h 19m
Dragon vs Hawk
RSL Revival
1d 1h
Classic vs Trap
herO vs SHIN
Sparkling Tuna Cup
1d 2h
OSC
1d 5h
IPSL
1d 8h
Bonyth vs Ret
WardiTV Weekly
2 days
Monday Night Weeklies
2 days
[ Show More ]
PiGosaur Cup
3 days
The PondCast
4 days
Replay Cast
5 days
CrankTV Team League
5 days
Replay Cast
5 days
CrankTV Team League
6 days
Korean StarCraft League
6 days
Liquipedia Results

Completed

Escore Tournament S3: W3
HSC XXIX
Eternal Conflict S2 E2

Ongoing

IPSL Spring 2026
Acropolis #4
YSL S3
CSL 2026 Summer (S21)
KCM Race Survival 2026 Season 3
ASL S22 SEASON OPEN Day 1
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
SCTL 2026 Spring
Stake Ranked Episode 3
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026

Upcoming

Escore Tournament S3: W4
ASL S22 SEASON OPEN Day 2
Escore Tournament S3: W5
CSLAN 4
Blizzard Classic Cup 2026
HSC XXX
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
Light Tournament 2026
Eternal Conflict S2 Finale
Eternal Conflict S2 E3
Logitech G Connect 2026
StarSeries Fall 2026
FISSURE Playground #5
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
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.