• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:00
CEST 20:00
KST 03: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
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun4[ASL21] Ro8 Preview Pt1: Inheritors16[ASL21] Ro16 Preview Pt2: All Star10Team Liquid Map Contest #22 - The Finalists19[ASL21] Ro16 Preview Pt1: Fresh Flow9
Community News
2026 GSL Season 1 Qualifiers25Maestros of the Game 2 announced92026 GSL Tour plans announced15Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid25
StarCraft 2
General
Code S Season 1 - RO12 Group A: Rogue, Percival, Solar, Zoun Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Team Liquid Map Contest #22 - The Finalists MaNa leaves Team Liquid Maestros of the Game 2 announced
Tourneys
2026 GSL Season 1 Qualifiers Sparkling Tuna Cup - Weekly Open Tournament INu's Battles#14 <BO.9 2Matches> GSL CK: More events planned pending crowdfunding RSL Revival: Season 5 - Qualifiers and Main Event
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
The PondCast: SC2 News & Results Mutation # 523 Firewall Mutation # 522 Flip My Base Mutation # 521 Memorable Boss
Brood War
General
BW General Discussion [ASL21] Ro8 Preview Pt1: Inheritors ASL21 General Discussion Leta's ASL S21 Ro.16 review BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[Megathread] Daily Proleagues [ASL21] Ro8 Day 2 [ASL21] Ro8 Day 1 [ASL21] Ro16 Group D
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend?
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Dawn of War IV Diablo IV Total Annihilation Server - TAForever
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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
Vanilla Mini Mafia Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread 3D technology/software discussion European Politico-economics QA Mega-thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Manga] One Piece Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion McBoner: A hockey love story
World Cup 2022
Tech Support
streaming software Strange computer issues (software) [G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Sexual Health Of Gamers
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2715 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
Hyrule19208 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
Hyrule19208 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 6h
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 83
DenverSC2 62
MindelVK 28
StarCraft: Brood War
Britney 17087
Mini 708
EffOrt 619
ggaemo 203
Killer 176
firebathero 156
actioN 149
Sea.KH 54
Hyun 48
Free 31
[ Show more ]
HiyA 30
ajuk12(nOOB) 13
910 3
Dota 2
canceldota13
Counter-Strike
fl0m2093
Fnx 2053
byalli692
allub358
Other Games
Grubby3884
B2W.Neo909
ceh9604
elazer229
ArmadaUGS119
QueenE86
Trikslyr43
C9.Mang040
Organizations
Other Games
BasetradeTV286
Dota 2
PGL Dota 2 - Main Stream214
StarCraft 2
angryscii 23
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 18 non-featured ]
StarCraft 2
• Adnapsc2 11
• Reevou 9
• intothetv
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• Azhi_Dahaki44
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1516
League of Legends
• Nemesis1817
• TFBlade860
Other Games
• imaqtpie756
• Shiphtur214
Upcoming Events
PiGosaur Cup
6h
GSL
15h 30m
Rogue vs Percival
Zoun vs Solar
Replay Cast
1d 6h
GSL
1d 15h
Cure vs TriGGeR
ByuN vs Bunny
KCM Race Survival
1d 16h
Replay Cast
2 days
Replay Cast
2 days
Escore
2 days
OSC
2 days
Replay Cast
3 days
[ Show More ]
Replay Cast
3 days
IPSL
3 days
Ret vs Art_Of_Turtle
Radley vs TBD
BSL
4 days
Replay Cast
4 days
uThermal 2v2 Circuit
4 days
BSL
5 days
IPSL
5 days
eOnzErG vs TBD
G5 vs Nesh
Replay Cast
5 days
Wardi Open
5 days
Afreeca Starleague
5 days
Jaedong vs Light
Monday Night Weeklies
5 days
Replay Cast
6 days
Sparkling Tuna Cup
6 days
Afreeca Starleague
6 days
Snow vs Flash
Liquipedia Results

Completed

Escore Tournament S2: W4
WardiTV TLMC #16
Nations Cup 2026

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026

Upcoming

Escore Tournament S2: W5
KK 2v2 League Season 1
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
Maestros of the Game 2
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
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
BLAST Rivals Spring 2026
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.