• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:01
CEST 07:01
KST 14:01
  • 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
Team TLMC #5 - Finalists & Open Tournaments0[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues29LiuLi Cup - September 2025 Tournaments3
StarCraft 2
General
#1: Maru - Greatest Players of All Time Weekly Cups (Sept 8-14): herO & MaxPax split cups Team Liquid Map Contest #21 - Presented by Monster Energy SpeCial on The Tasteless Podcast Team TLMC #5 - Finalists & Open Tournaments
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris SC4ALL $6,000 Open LAN in Philadelphia Sparkling Tuna Cup - Weekly Open Tournament WardiTV TL Team Map Contest #5 Tournaments RSL: Revival, a new crowdfunded tournament series
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
[ASL20] Ro16 Preview Pt2: Turbulence BW General Discussion ASL20 General Discussion Diplomacy, Cosmonarchy Edition BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Ro16 Group D [ASL20] Ro16 Group C [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread General RTS Discussion Thread Nintendo Switch Thread Borderlands 3
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread Russo-Ukrainian War Thread The Big Programming Thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1123 users

The Big Programming Thread - Page 880

Forum Index > General Forum
Post a Reply
Prev 1 878 879 880 881 882 1031 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.
Manit0u
Profile Blog Joined August 2004
Poland17341 Posts
May 08 2017 05:39 GMT
#17581
Was reading a bit on the Ruby object model and it really cracked me up:


the superclass of an eigenclass of a class is the eigenclass of the class’s superclass


Some crazy shit right there.
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-05-08 17:46:04
May 08 2017 17:41 GMT
#17582
--- Nuked ---
Djagulingu
Profile Blog Joined December 2010
Germany3605 Posts
May 08 2017 19:41 GMT
#17583
New at OpenCV. I try saving videos with XVID codec and avi extension. When I save BGR frames, all well and good. When I try saving grayscale, the video doesn't open... I'm about to go fucking crazy.
"windows bash is a steaming heap of shit" tofucake
AKnopf
Profile Blog Joined March 2011
Germany259 Posts
May 08 2017 20:39 GMT
#17584
On May 08 2017 14:39 Manit0u wrote:
Was reading a bit on the Ruby object model and it really cracked me up:


the superclass of an eigenclass of a class is the eigenclass of the class’s superclass


Some crazy shit right there.


Haha, gotta love that! But where did you read that?

The superclass of any eigenclass is always class (that's why it's a class in the first place). And the eigenclass of anything can never be class*. But that's what any classes superclass is. So that definitely is wrong. Funny sentence though :D

* Also there is no eigenclass that is shared with anything (it is "eigen" to its object). But your sentence would mean that the class "C" and its superclass "S" share the same eigenclass "e". This cannot be true, though.

I guess the sentence could be true if by "is" the author means "I *is* an instance if class C or any of its subclasses". But even that would be a stretch since then an eigenclass would have to be the superclass to its object, which it is technically not.




Sorry if I'm wrong here. Did I miss anything? Also sorry for being triggered. Ruby's object model is just too much fun :D




Edit: Just to be sure, I just tried it on tryruby.org

> class << Strin­g
.. puts self.­superclass­.__id__
.. end
=> "11488"
> class << Strin­g.supercla­ss
.. puts self.­__id__
.. end
=> "1184611846"

Not the same
The world - its a funny place
Manit0u
Profile Blog Joined August 2004
Poland17341 Posts
Last Edited: 2017-05-09 09:31:39
May 09 2017 09:25 GMT
#17585
On May 09 2017 05:39 AKnopf wrote:
Show nested quote +
On May 08 2017 14:39 Manit0u wrote:
Was reading a bit on the Ruby object model and it really cracked me up:


the superclass of an eigenclass of a class is the eigenclass of the class’s superclass


Some crazy shit right there.


Haha, gotta love that! But where did you read that?

The superclass of any eigenclass is always class (that's why it's a class in the first place). And the eigenclass of anything can never be class*. But that's what any classes superclass is. So that definitely is wrong. Funny sentence though :D

* Also there is no eigenclass that is shared with anything (it is "eigen" to its object). But your sentence would mean that the class "C" and its superclass "S" share the same eigenclass "e". This cannot be true, though.

I guess the sentence could be true if by "is" the author means "I *is* an instance if class C or any of its subclasses". But even that would be a stretch since then an eigenclass would have to be the superclass to its object, which it is technically not.




Sorry if I'm wrong here. Did I miss anything? Also sorry for being triggered. Ruby's object model is just too much fun :D




Edit: Just to be sure, I just tried it on tryruby.org

> class << Strin­g
.. puts self.­superclass­.__id__
.. end
=> "11488"
> class << Strin­g.supercla­ss
.. puts self.­__id__
.. end
=> "1184611846"

Not the same


https://www.sitepoint.com/understanding-object-model/


class Object; def eigenclass; class << self; self; end; end; end

E.eigenclass
# => #<Class:E>
E.eigenclass.superclass
# => #<Class:C>
C.eigenclass.superclass
# => #<Class:Object>
Object.eigenclass.superclass
# => #<Class:BasicObject>
BasicObject.eigenclass.superclass
# => Class
Class.superclass
# => Module
Module.superclass
# => Object


Edit:

Also, super useful thingie:
[image loading]
Time is precious. Waste it wisely.
shz
Profile Blog Joined October 2010
Germany2687 Posts
Last Edited: 2017-05-09 14:54:22
May 09 2017 14:52 GMT
#17586
Git Question:

Following folder structure:

folderA/folderB/
folderA/folderC/


I want to ignore everything in
folderA/
and its subfolders except 2 files inside
folderA/folderB/


How do I write my .gitignore?
Liquipedia
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2017-05-09 15:06:33
May 09 2017 15:05 GMT
#17587
--- Nuked ---
shz
Profile Blog Joined October 2010
Germany2687 Posts
May 09 2017 15:30 GMT
#17588
Aight. Thanks!
Liquipedia
aRyuujin
Profile Blog Joined January 2011
United States5049 Posts
Last Edited: 2017-05-09 17:55:52
May 09 2017 17:55 GMT
#17589
On May 09 2017 18:25 Manit0u wrote:
Show nested quote +
On May 09 2017 05:39 AKnopf wrote:
On May 08 2017 14:39 Manit0u wrote:
Was reading a bit on the Ruby object model and it really cracked me up:


the superclass of an eigenclass of a class is the eigenclass of the class’s superclass


Some crazy shit right there.


Haha, gotta love that! But where did you read that?

The superclass of any eigenclass is always class (that's why it's a class in the first place). And the eigenclass of anything can never be class*. But that's what any classes superclass is. So that definitely is wrong. Funny sentence though :D

* Also there is no eigenclass that is shared with anything (it is "eigen" to its object). But your sentence would mean that the class "C" and its superclass "S" share the same eigenclass "e". This cannot be true, though.

I guess the sentence could be true if by "is" the author means "I *is* an instance if class C or any of its subclasses". But even that would be a stretch since then an eigenclass would have to be the superclass to its object, which it is technically not.




Sorry if I'm wrong here. Did I miss anything? Also sorry for being triggered. Ruby's object model is just too much fun :D




Edit: Just to be sure, I just tried it on tryruby.org

> class << Strin­g
.. puts self.­superclass­.__id__
.. end
=> "11488"
> class << Strin­g.supercla­ss
.. puts self.­__id__
.. end
=> "1184611846"

Not the same


https://www.sitepoint.com/understanding-object-model/


class Object; def eigenclass; class << self; self; end; end; end

E.eigenclass
# => #<Class:E>
E.eigenclass.superclass
# => #<Class:C>
C.eigenclass.superclass
# => #<Class:Object>
Object.eigenclass.superclass
# => #<Class:BasicObject>
BasicObject.eigenclass.superclass
# => Class
Class.superclass
# => Module
Module.superclass
# => Object


Edit:

Also, super useful thingie:
+ Show Spoiler +

[image loading]



this is why i hate oop
can i get my estro logo back pls
Manit0u
Profile Blog Joined August 2004
Poland17341 Posts
May 10 2017 10:57 GMT
#17590
Imperative all the way?
Time is precious. Waste it wisely.
TMG26
Profile Joined July 2012
Portugal2017 Posts
May 10 2017 11:08 GMT
#17591
Functional all the way.
Supporter of the situational Blink Dagger on Storm.
Hanh
Profile Joined June 2016
146 Posts
May 10 2017 11:27 GMT
#17592
System F
Deleted User 3420
Profile Blog Joined May 2003
24492 Posts
May 13 2017 01:22 GMT
#17593
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?
ZigguratOfUr
Profile Blog Joined April 2012
Iraq16955 Posts
May 13 2017 03:26 GMT
#17594
On May 13 2017 10:22 travis wrote:
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?


Yeah, the solution is wrong.
CoughingHydra
Profile Blog Joined May 2012
177 Posts
Last Edited: 2017-05-13 09:56:57
May 13 2017 09:41 GMT
#17595
On May 13 2017 12:26 ZigguratOfUr wrote:
Show nested quote +
On May 13 2017 10:22 travis wrote:
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?


Yeah, the solution is wrong.

Actually, no! The solution is right - if you have a linear transformation from R^n to R^n (or more generally from a linear space V to a linear space W with dim V = dim W < infinity), then being one to one is equivalent to being onto. This follows from the Rank-nullity theorem. This is very similar to having a mapping from an n-element set to an n-element set - it is onto if and only if it is one to one.
Acrofales
Profile Joined August 2010
Spain18049 Posts
Last Edited: 2017-05-13 10:08:50
May 13 2017 10:06 GMT
#17596
On May 13 2017 18:41 CoughingHydra wrote:
Show nested quote +
On May 13 2017 12:26 ZigguratOfUr wrote:
On May 13 2017 10:22 travis wrote:
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?


Yeah, the solution is wrong.

Actually, no! The solution is right - if you have a linear transformation from R^n to R^n (or more generally from a linear space V to a linear space W with dim V = dim W < infinity), then being one to one is equivalent to being onto. This follows from the Rank-nullity theorem. This is very similar to having a mapping from an n-element set to an n-element set - it is onto if and only if it is one to one.

This doesn't sound right, because they're not finite sets.

My counterexample was wrong for R^n. It'd hold for Z^n. Need to come up with one that works with real numbers.
Hanh
Profile Joined June 2016
146 Posts
May 13 2017 10:56 GMT
#17597
CoughingHydra is correct.
Prillan
Profile Joined August 2011
Sweden350 Posts
Last Edited: 2017-05-13 11:22:41
May 13 2017 11:20 GMT
#17598
On May 13 2017 19:56 Hanh wrote:
CoughingHydra is correct.

Yup, a map being linear is a pretty strong property.

It's a nicely put question since it tests students on: injectivity (one-to-one), surjectivity (onto), rank, nullity and the rank-nullity theorem.


EDIT:
On May 13 2017 19:06 Acrofales wrote:
Show nested quote +
On May 13 2017 18:41 CoughingHydra wrote:
On May 13 2017 12:26 ZigguratOfUr wrote:
On May 13 2017 10:22 travis wrote:
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?


Yeah, the solution is wrong.

Actually, no! The solution is right - if you have a linear transformation from R^n to R^n (or more generally from a linear space V to a linear space W with dim V = dim W < infinity), then being one to one is equivalent to being onto. This follows from the Rank-nullity theorem. This is very similar to having a mapping from an n-element set to an n-element set - it is onto if and only if it is one to one.

This doesn't sound right, because they're not finite sets.

My counterexample was wrong for R^n. It'd hold for Z^n. Need to come up with one that works with real numbers.


Z is not a field, so you wouldn't even have a vector space to begin with.
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Prillan
Profile Joined August 2011
Sweden350 Posts
Last Edited: 2017-05-13 11:22:02
May 13 2017 11:21 GMT
#17599
whoops, double post
TheBB's sidekick, aligulac.com | "Reality is frequently inaccurate." - Douglas Adams
Acrofales
Profile Joined August 2010
Spain18049 Posts
May 13 2017 13:41 GMT
#17600
On May 13 2017 20:20 Prillan wrote:
Show nested quote +
On May 13 2017 19:56 Hanh wrote:
CoughingHydra is correct.

Yup, a map being linear is a pretty strong property.

It's a nicely put question since it tests students on: injectivity (one-to-one), surjectivity (onto), rank, nullity and the rank-nullity theorem.


EDIT:
Show nested quote +
On May 13 2017 19:06 Acrofales wrote:
On May 13 2017 18:41 CoughingHydra wrote:
On May 13 2017 12:26 ZigguratOfUr wrote:
On May 13 2017 10:22 travis wrote:
doing a practice final for linear algebra. True or false

If T is a linear transformation from R^n to R^n which is one-to-one, then for
every y in R^n there exists x such that T(x) = y.

I said false, the solution page says this is true.
but isn't this the definition of onto, not one-to-one ?


Yeah, the solution is wrong.

Actually, no! The solution is right - if you have a linear transformation from R^n to R^n (or more generally from a linear space V to a linear space W with dim V = dim W < infinity), then being one to one is equivalent to being onto. This follows from the Rank-nullity theorem. This is very similar to having a mapping from an n-element set to an n-element set - it is onto if and only if it is one to one.

This doesn't sound right, because they're not finite sets.

My counterexample was wrong for R^n. It'd hold for Z^n. Need to come up with one that works with real numbers.


Z is not a field, so you wouldn't even have a vector space to begin with.

Yeah, forgot that fields need to have a mulitiplicative inverse, so scratch my counterexample Good thing you cought that! It is indeed a great exam question!
Prev 1 878 879 880 881 882 1031 Next
Please log in or register to reply.
Live Events Refresh
PiGosaur Monday
00:00
#49
Liquipedia
OSC
23:00
OSC Elite Rising Star #16
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
WinterStarcraft556
StarCraft: Brood War
Leta 533
Noble 51
ajuk12(nOOB) 43
Icarus 10
Dota 2
NeuroSwarm138
Counter-Strike
Stewie2K448
semphis_45
Super Smash Bros
Mew2King40
Other Games
summit1g4980
C9.Mang0320
XaKoH 150
ViBE142
SortOf52
Trikslyr34
trigger0
Organizations
Other Games
gamesdonequick684
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• OhrlRock 91
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo1125
• Rush1120
• Stunt434
Other Games
• Scarra1215
Upcoming Events
LiuLi Cup
5h 59m
OSC
13h 59m
RSL Revival
1d 4h
Maru vs Reynor
Cure vs TriGGeR
The PondCast
1d 7h
RSL Revival
2 days
Zoun vs Classic
Korean StarCraft League
2 days
BSL Open LAN 2025 - War…
3 days
RSL Revival
3 days
BSL Open LAN 2025 - War…
4 days
RSL Revival
4 days
[ Show More ]
Online Event
4 days
Wardi Open
5 days
Sparkling Tuna Cup
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 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.