• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 18:32
CEST 00:32
KST 07:32
  • 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
[ASL22] Ro24 Preview: Siren's Call8[ASL22] Ro24 Preview: Summer's End9Serral wins HomeStory Cup 2915Serral wins Maestros of the Game 244ByuL, and the Limitations of Standard Play3
Community News
Official StarCraft website teases new content ahead of BlizzCon?61Stellar Fest TWO the Moon (Dec 16-20)8Weekly Cups (August 24-30): Patches' balance mod takes over3New 3v3 BGH Ladder (and more) on ShieldBattery!40Weekly Cups (August 17-23): Zerg dominate the week6
StarCraft 2
General
SC4ALL: II Winner Will Earn a Spot at HSC 30! Nexon wins bid to develop StarCraft IP content, distribute Overwatch mobile game Weekly Cups (August 24-30): Patches' balance mod takes over Balance hotfix patch 5.0.16b (July 16) September World Ranking: herO leads, Serral climbs
Tourneys
IntoTheTV X SOOP SC2 League : Weekly & Monthly SC2 INu's Battles#20 [BO.9] 2026 GSTL Announcement Stellar Fest TWO the Moon (Dec 16-20) PIG STY FESTIVAL 8.0! (13 - 23 August)
Strategy
[G] Having the right mentality to improve
Custom Maps
Nexus Wars 2021 GUIDE [M] (2) Industrial Park
External Content
Mutation # 541 Binary Choice The PondCast: SC2 News & Results Mutation # 540 Dodge This Mutation # 539 Thunder Dome
Brood War
General
Official StarCraft website teases new content ahead of BlizzCon? BW General Discussion ASL22 General Discussion [Personal Project Share] Terran Defense v0.60 BGH Auto Balance -> http://bghmmr.eu/
Tourneys
KCM Race Survival 2026 Season 3 Brood War in Budapest ! WORTEX 2026 BW Finals [Megathread] Daily Proleagues BSL LAN Party - Kraków 29-30 August - OPEN SIGNUPS
Strategy
Replay Review Process - What do you do? Game Theory for Starcraft Odyssey Mineral Stack Saturation Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread Diablo IV EVE Corporation [Maplestory Hardcore] Let's Play~!! General RTS Discussion Thread
Dota 2
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 Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Artificial Intelligence Thread UK Politics Mega-thread
Fan Clubs
MarineLorD Fan Club The Creator Fan Club The ShoWTimE Fan Club
Media & Entertainment
Movie Discussion! Anime Discussion Thread
Sports
Football (Soccer) Thread TeamLiquid Health and Fitness Initiative For 2023 MLB/Baseball 2023 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Northern Ireland Global Starcraft
Blogs
Dreaming of BW patches (mod…
c3rberUs
Regacy Esports: The Bh…
regacyesports
Violent Games and Crime Rate…
TrAiDoS
LOCKPICKING NOOB
LUCKY_NOOB
Cathedral Of CS And NY pizza a…
FuDDx
Customize Sidebar...

Website Feedback

Closed Threads



Active: 5663 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
Hyrule19252 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
Hyrule19252 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 3m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
JuggernautJason83
ProTech57
StarCraft: Brood War
Britney 12753
Shuttle 563
White-Ra 142
Hyuk 69
ajuk12(nOOB) 8
Dota 2
capcasts98
League of Legends
Doublelift3976
Other Games
summit1g3967
Grubby2133
shahzam643
hungrybox455
XaKoH 207
C9.Mang0174
KnowMe124
Mew2King97
ArmadaUGS77
ViBE53
Trikslyr42
minikerr11
Organizations
Other Games
gamesdonequick1548
angryscii14
[ Show 12 non-featured ]
StarCraft 2
• musti20045 26
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• Migwel
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• masondota21078
Other Games
• imaqtpie879
• Shiphtur178
Upcoming Events
The PiG Daily
3m
BASILISK vs Onsyde Gaming
Replay Cast
1h 28m
Rogue vs Cure
Replay Cast
2h 28m
Big Brain Bouts
11h 28m
Garitos vs ArT
Lambo vs Percival
TriGGeR vs ByuN
Sparkling Tuna Cup
1d 11h
OSC
1d 13h
Shopify Rebellion Sundays
1d 16h
Mixu vs TBD
Spirit vs TBD
Clem vs TBD
Patches Events
1d 17h
OSC
2 days
Afreeca Starleague
2 days
Soma vs Shuttle
BeSt vs Rush
[ Show More ]
WardiTV Weekly
2 days
Afreeca Starleague
3 days
Leta vs ggaemo
Jaedong vs Queen
GSL
3 days
PiGosaur Cup
4 days
Kung Fu Cup
4 days
Replay Cast
5 days
The PondCast
5 days
KCM Race Survival
5 days
Escore
6 days
IntoTheTV X SOOP
6 days
Liquipedia Results

Completed

Proleague 2026-09-02
PiG Sty Festival 8.0
Light Tournament 2026

Ongoing

KCM Race Survival 2026 Season 3
K-JUNGMAN
ASL Season 22
Super Anchor Qualifying S3
CSL 2026 AUTUMN (S22)
RSL Revival: Season 6
Calamity Invitational
Big Dog Cup 2026 Div 1
BLAST Open Fall 2026
Esports World Cup 2026
Esports World Cup 2026: LCQ
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026

Upcoming

Acropolis #5
Acropolis #5 - TRS
Escore Tournament S3: King of Kings
Blizzard Classic Cup 2026
Acropolis #5 - GSA
Acropolis #5 - GSB
Acropolis #5 - GSC
HSC XXX
Stellar Fest 2: Lunar Cup
SC4ALL II: StarCraft II
Kung Fu Cup 2026 Grand Finals
RSL Offline Finals
BLAST Rivals Fall 2026
IEM Beijing 2026
Stake Ranked Episode 5
PGL Masters Bucharest 2026
1win Private Club #2
Thunderpick World Champ. '26
ESL Pro League Season 24
Stake Ranked Episode 4
1win Private Club #1
Logitech G Play Connect 2026
SL StarSeries Fall 2026
FISSURE Playground #3
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.