DJ30 Options – US Major Index Begins to Recover

Best Binary Options Brokers 2020:
  • Binarium

    The Best Binary Options Broker 2020!
    Perfect For Beginners!
    Free Demo Account!
    Free Trading Education!
    Sign-up Bonus!

  • Binomo

    Trustful Broker!


Row-major vs Column-major confusion

I’ve been reading a lot about this, the more I read the more confused I get.

My understanding: In row-major rows are stored contiguously in memory, in column-major columns are stored contiguously in memory. So if we have a sequence of numbers [1, . 9] and we want to store them in a row-major matrix, we get:

while the column-major (correct me if I’m wrong) is:

which is effectively the transpose of the previous matrix.

My confusion: Well, I don’t see any difference. If we iterate on both the matrices (by rows in the first one, and by columns in the second one) we’ll cover the same values in the same order: 1, 2, 3, . 9

Even matrix multiplication is the same, we take the first contiguous elements and multiply them with the second matrix columns. So say we have the matrix M :

If we multiply the previous row-major matrix R with M , that is R x M we’ll get:

If we multiply the column-major matrix C with M , that is C x M by taking the columns of C instead of its rows, we get exactly the same result from R x M

I’m really confused, if everything is the same, why do these two terms even exist? I mean even in the first matrix R , I could look at the rows and consider them columns.

Am I missing something? What does row-major vs col-major actually imply on my matrix math? I’ve always learned in my Linear Algebra classes that we multiply rows from the first matrix with columns from the second one, does that change if the first matrix was in column-major? do we now have to multiply its columns with columns from the second matrix like I did in my example or was that just flat out wrong?

Any clarifications are really appreciated!

EDIT: One of the other main sources of confusion I’m having is GLM. So I hover over its matrix type and hit F12 to see how it’s implemented, there I see a vector array, so if we have a 3×3 matrix we have an array of 3 vectors. Looking at the type of those vectors I saw ‘col_type’ so I assumed that each one of those vectors represent a column, and thus we have a column-major system right?

Best Binary Options Brokers 2020:
  • Binarium

    The Best Binary Options Broker 2020!
    Perfect For Beginners!
    Free Demo Account!
    Free Trading Education!
    Sign-up Bonus!

  • Binomo

    Trustful Broker!

Well, I don’t know to be honest. I wrote this print function to compare my translation matrix with glm’s, I see the translation vector in glm at the last row, and mine is at the last column.

This adds nothing but more confusion. You can clearly see that each vector in glmTranslate matrix represents a row in the matrix. So. that means that the matrix is row-major right? What about my matrix? (I’m using a float array[16]) the translation values are in the last column, does that mean my matrix is column-major and I didn’t now it? tries to stop head from spinning

8 Answers 8

Let’s look at algebra first; algebra doesn’t even have a notion of “memory layout” and stuff.

From an algebraic pov, a MxN real matrix can act on a |R^N vector on its right side and yield a |R^M vector.

Thus, if you were sitting in an exam and given a MxN Matrix and a |R^N vector, you could with trivial operations multiply them and get a result – whether that result is right or wrong will not depend on whether the software your professor uses to check your results internally uses column-major or a row-major layout; it will only depend on if you calculated the contraction of each row of the matrix with the (single) column of the vector properly.

To produce a correct output, the software will – by whatever means – essentially have to contract each row of the Matrix with the column vector, just like you did in the exam.

Thus, the difference between software that aligns column-major and software that uses row-major-layout is not what it calculates, but just how.

To put it more pecisely, the difference between those layouts with regard to the topcial single row’s contraction with the column vector is just the means to determine

  • For a row-major-layout it’s the element just in the next bucket in memory
  • For a column-major-layout it’s the element in the bucket M buckets away.

To show you how that column/row magic is summoned in practice:

You haven’t tagged your question with “c++”, but because you mentioned ‘glm‘, I assume that you can get along with C++.

In C++’s standard library there’s an infamous beast called valarray , which, besides other tricky features, has overloads of operator [], one of them can take a std::slice ( which is essentially a very boring thing, consisting of just three integer-type numbers).

This little slice thing however, has everything one would need to access a row-major-storage column-wise or a column-major-storage row-wise – it has a start, a length, and a stride – the latter represents the “distance to next bucket” I mentioned.

I think you are mix up an implementation detail with usage, if you will.

Lets start with a two-dimensional array, or matrix:

The problem is that computer memory is a one-dimensional array of bytes. To make our discussion easier, lets group the single bytes into groups of four, thus we have something looking like this, (each single, +-+ represents a byte, four bytes represents an integer value (assuming 32-bit operating systems) :

Another way of representing

So, the question is how to map a two dimensional structure (our matrix) onto this one dimensional structure (i.e. memory). There are two ways of doing this.

Row-major order: In this order we put the first row in memory first, and then the second, and so on. Doing this, we would have in memory the following:

With this method, we can find a given element of our array by performing the following arithmetic. Suppose we want to access the $M_$ element of the array. If we assume that we have a pointer to the first element of the array, say ptr , and know the number of columns say nCol , we can find any element by:

To see how this works, consider M_ <02>(i.e. first row, third column — remember C is zero based.

So we access the third element of the array.

Column-major ordering: In this order we put the first column in memory first, and then the second, and so or. Doing this we would have in memory the following:

SO, the short answer – row-major and column-major format describe how the two (or higher) dimensional arrays are mapped into a one dimensional array of memory.

Hope this helps. T.

Doesn’t matter what you use: just be consistent!

Row major or column major is just a convention. Doesn’t matter. C uses row major, Fortran uses column. Both work. Use what’s standard in your programming language/environment.

Mismatching the two will [email protected]#$ stuff up

If you use row major addressing on a matrix stored in colum major, you can get the wrong element, read past end of the array, etc.

It’s incorrect to say code to do matrix multiplication is the same for row major and column major

(Of course the math of matrix multiplication is the same.) Imagine you have two arrays in memory:

If matrices are stored in column major then X, Y, and X*Y are:

If matrices are stored in row major then X, Y, and X*Y are:

There’s nothing deep going on here. It’s just two different conventions. It’s like measuring in miles or kilometers. Either works, you just can’t flip back and forth between the two without converting!

You are right. it doesn’t matter if a system stored the data in a row-major structure or a column-major one. It is just like a protocol. Computer : “Hey, human. I’m going to store your array this way. No prob. Huh?” However, when it comes to performance, it matters. consider the following three things.

1. most arrays are accessed in row-major order.

2. When you access memory, it is not directly read from memory. You first store some blocks of data from memory to cache, then you read data from cache to your processor.

3. If the data you want does not exist in cache, cache should re-fetch the data from the memory

When a cache fetches data from memory, locality is important. That is, if you store data sparsely in memory, your cache should fetch data from memory more often. This action corrupts your programs performance because accessing memory is far slower(over 100times!) then accessing cache. The less you access memory, the faster your program. So, this row-major array is more efficient because accessing its data is more likely to be local.

Ok, so given that the word “confusion” is literally in the title I can understand the level of. confusion.

Firstly, this absolutely is a real problem

Never, EVER succumb to the idea that “it is used be but. PC’s nowadays. “

Of the primary issues here are: -Cache eviction strategy (LRU, FIFO, etc.) as @Y.C.Jung was beginning to touch on -Branch prediction -Pipelining (it’s depth, etc) -Actual physical memory layout -Size of memory -Architecture of machine, (ARM, MIPS, Intel, AMD, Motorola, etc.)

This answer will focus on the Harvard architecture, Von Neumann machine as it is most applicable to the current PC.

The memory hierarchy:

Is a juxtaposition of cost versus speed.

For today’s standard PC system this would be something like: SIZE: 500GB HDD > 8GB RAM > L2 Cache > L1 Cache > Registers. SPEED: 500GB HDD

This leads to the idea of Temporal and Spatial locality. One means how your data is organized, (code, working set, etc.), the other means physically where your data is organized in “memory.”

Given that “most” of today’s PC’s are little-endian (Intel) machines as of late, they lay data into memory in a specific little-endian ordering. It does differ from big-endian, fundamentally.

(For the simplicity of this example, I am going to ‘say’ that things happen in single entries, this is incorrect, entire cache blocks are typically accessed and vary drastically my manufacturer, much less model).

So, now that we have that our of the way, if, hypothetically your program demanded 1GB of data from your 500GB HDD , loaded into your 8GB of RAM, then into the cache hierarchy, then eventually registers , where your program went and read the first entry from your freshest cache line just to have your second (in YOUR code) desired entry happen to be sitting in the next cache line, (i.e. the next ROW instead of column you would have a cache MISS.

Assuming the cache is full, because it is small, upon a miss, according to the eviction scheme, a line would be evicted to make room for the line that ‘does’ have the next data you need. If this pattern repeated you would have a MISS on EVERY attempted data retrieval!

Worse, you would be evicting lines that actually have valid data you are about to need, so you will have to retrieve them AGAIN and AGAIN.

The term for this is called: thrashing and can indeed crash a poorly written/error prone system. (Think windows BSOD).

On the other hand, if you had laid out the data properly, (i.e. Row major). you WOULD still have misses!

But these misses would only occur at the end of each retrieval, not on EVERY attempted retrieval. This results in orders of magnitude of difference in system and program performance.

Very very simple snippet:

Now, compile with: gcc -g col_maj.c -o col.o

Now, run with: time ./col.o real 0m0.009s user 0m0.003s sys 0m0.004s

Now repeat for ROW major:

Compile: terminal4$ gcc -g row_maj.c -o row.o Run: time ./row.o real 0m0.005s user 0m0.001s sys 0m0.003s

Now, as you can see, the Row Major one was significantly faster.

Not convinced? If you would like to see a more drastic example: Make the matrix 1000000 x 1000000, initialize it, transpose it and print it to stdout. “`

(Note, on a *NIX system you WILL need to set ulimit unlimited)

ISSUES with my answer: -Optimizing compilers, they change a LOT of things! -Type of system -Please point any others out -This system has an Intel i5 processor

Как победить OPTIONS при CORS?

Только вчера разбирался для своего проекта по учёту долгов и победил.

На OPTIONS надо возвращать 200 с заголовками и пустой ответ.

Dow Jones Industrial Average


Previous Close

Your Watchlist

Customize MarketWatch

Have Watchlists? Log in to see them here or sign up to get started.

No Items in Watchlist

There are currently no items in this Watchlist.

No Saved Watchlists

Create a list of the investments you want to track.

Uh oh

Something went wrong while loading Watchlist.

Recently Viewed Tickers

No Recent Tickers

Visit a quote page and your recently viewed tickers will be displayed here.


Key Data

  • Open 22,893.47
  • Day Range 22,682.99 – 23,293.89
  • 52 Week Range 18,213.65 – 29,568.57


5 Day
  • 10.79%
1 Month
  • -1.48%
3 Month
  • -19.28%
  • -18.69%
1 Year
  • -11.29%

Recent News

  • MarketWatch
  • WSJ

Bernie Sanders exits Democratic presidential race

29 Out of 30 Dow Stocks Are Up. Why Walmart Is Down.

29 out of 30 stocks in the Dow are up in midday trading Wednesday. Stock in retail giant Walmart is the only one in the red.

Dow nears 600-point gain amid tentative hopes for U.S. to re-open economy

Another 6 million workers likely filed jobless claims in early April as record layoffs mount

S&P 500 Is Nearing a Bull Market, but a Bear Could Return

The S&P 500 might reach the 20% threshold dubbed a bull market. But periods of big gains are often characteristics of longer-term bearish spans in the market.

The Dow Moves Higher as Sanders Quits the Race

Gains in the stock market picked up steam after news that Sen. Bernie Sanders is ending his campaign for president.

Founder of world’s largest hedge fund doubles down on ‘cash is trash’ argument, warning of debt-fueled inflation

Judge Won’t Back New Challenge by PG&E Wildfire Victims

The judge overseeing PG&E’s bankruptcy won’t approve a committee’s letter asking wildfire victims to wait to vote on the utility’s reorganization plan.

Bernie Sanders confirms he’s exiting Democratic presidential race

Coronavirus stock-market volatility is creating the largest daily price swings since 1929 crash

Boeing, Raytheon Technologies Corp. share gains lead Dow’s 589-point surge

Boeing, Raytheon Technologies Corp. share gains lead Dow’s 589-point surge

Tesla Gains on News It Plans to Restart Production in May

That’s good news for investors, who have been concerned about the auto maker’s cash and liquidity and wondering how long the Covid-19 pause will last. But will the economy be open?

Caterpillar decides to maintain dividend, with next payment in scheduled in May

Caterpillar Inc. said Wednesday that it has decided to maintain its quarterly dividend of $1.03 a share, with the next dividend payable May 20 to shareholders of record on April 20. Based on current stock prices, Caterpillar’s implied dividend yield was 3.34%, compared with the SPDR Industrial Select Sector ETF’s yield of 2.51% and the implied yield for the S&P 500 of 2.20%. Many companies have suspended dividend payments to preserve cash amid uncertainties over the impact of the COVID-19 pandemic. Caterpillar’s stock, which rose 1.3% in morning trading, has lost 16.4% year to date, while the Dow Jones Industrial Average has lost 18.8%.

Bernie Sanders exits Democratic presidential race: reports

Sen. Bernie Sanders of Vermont is dropping out of the Democratic presidential race, according to multiple published reports on Wednesday. Sanders revealed his decision to exit in a conference call with staff, said a CNBC report. He is scheduled to speak with supporters at 11:45 a.m. Eastern Time.

Charting an April breakout, S&P 500 sustains rally atop major resistance

U.S. stocks are firmly higher early Wednesday, rising amid optimism that the U.S. government is starting plans to eventually loosen restrictions on the economy. Against this backdrop, each big three U.S. benchmark has sustained an April technical breakout, preserving a surprisingly persistent recovery attempt.

Fed temporarily lifts Wells Fargo’s asset cap so bank can lend to small businesses

The Federal Reserve announced Wednesday that it was temporarily lifting Wells Fargo’s asset cap so that the bank can provide loans to small businesses. The change will only allow the bank to make loans under the Paycheck Protection Program designed for small bank’s and the Fed’s Main Street Lending Program for medium-sized banks that is not yet operational. The change is in place as long as the facilities are active. The growth restrictions on Wells Fargo were a penalty after it was revealed Wells Fargo employees were opening up bank accounts for customers without their knowledge.

Fed temporarily lifts Wells Fargo’s asset cap so bank can lend to small businesses

Stocks touch session highs; Dow up 2.1%

Bernie Sanders is dropping out of Democratic presidential race: reports

Rockwell Automation to cut salaries and discretionary spending, declares regular dividend

Rockwell Automation Corp. said Wednesday it was taking several actions to mitigate the negative effects of the COVID-19 pandemic, with an aim to minimize job cuts, including no incentive compensation payouts for 2020, eliminating discretionary spending and cutting salaries of its executives. The industrial automation company said it was cutting Chief Executive Blake Moret’s salary by 25% beginning in May, cutting salaries of all senior vice presidents by 15% and reducing salaries of all other non-manufacturing employees by 7.5%, while the board of directors have reduced cash fees by 50%. Moret’s 2020 base salary is $1.164 million according to the proxy filing, up 3.6% from his 2020 base of $1.123 million. Moret’s 2020 salary represented 9.6% of his total compensation of $11.710 million, which included non-equity incentive compensation of $1.106 million. Manufacturing employees will not have their pay cut, and will receive a one-time additional payment. The company said it will suspend the company match for its 401(k) plan. “We plan to reverse these actions as soon as possible as markets recover,” the company said. Separately, Rockwell declared a regular quarterly dividend of $1.02 a share, payable June 10 to shareholders of record on May 18. The stock, which rose 4.0% in morning trading, has lost 19.0% over the past three months, while the Dow Jones Industrial Average has declined 20.1%.

Markets Enter New Phase—Where Cash Is All That Matters

A rush for cash shook the financial system Wednesday, as companies and investors hunkered down for a prolonged economic stall, taking the recent market turmoil into a new, more troubling liquidation phase.

The 30 Minutes That Can Make or Break the Trading Day

Sharp stock moves are punctuating the final minutes of the trading day, exacerbating what has already been one of the rockiest stretches of the past decade for financial markets.

All 4 major U.S. credit cards ditch signatures, with eye on biometrics

Fingerprint or retinal scan security is expected someday to become the gold standard in payment authorization.

April 30 (UPI) — Beginning this month, four of the largest credit card networks in the United States no longer require signatures to complete transactions — a move driven by evolving security and technology.

American Express, Discover and Mastercard gave merchants the option to stop requesting handwritten authentication for credit and debit card transactions April 13, while Visa implemented the policy the following day.

Terms for the change will vary. American Express eliminated the requirement for all its cards globally, while Visa lifted the signing requirement only in the United States and Canada for payment systems that read chip cards. Mastercard ended the requirement exclusively in North America, while Discover offers the choice in the United States, Canada, Mexico and Caribbean nations.

While each credit card company eliminated the signature, individual retailers also have the choice to keep collecting signatures or stop.

Several major retail chains, including Walmart, have sought to end the longtime practice because those sales must be processed in a way that takes more time and costs twice as much as transactions that use a PIN.

“Having to sign a receipt can be a hassle for customers and is not necessary to prevent fraud at the point of sale,” said Walmart Senior Vice President and Assistant Treasurer Mike Cook.

In place of signatures, credit card companies are now transitioning to other security methods — some new, some familiar.

The chip

Chip technology was widely adopted in the United States in 2020, when major credit card networks began providing customers with cards embedded with a readable computer chip, or EMV, which stands for Europay, Mastercard and Visa.

Embedded microchips in EMV cards contain encrypted information, making it more difficult for a card to be copied or counterfeited.

Information from EMV transactions is also less valuable to hackers, as each purchase generates a unique code — unlike the electronic data generated from the traditional magnetic strips.

“Less than two years since EMV chip launched in the U.S., fraud declined 66 percent at EMV chip-enabled merchants,” Visa said.

The widespread adoption and use of the EMV chip is the primary factor that has ushered out the need for signatures.


Another security method uses a concept similar to EMV called tokenization — a process by which a card’s 16-digit primary access number, or PAN, is substituted with a unique alternate number, or “token.”

The PAN is the credit card’s main number displayed across the front, which is often given to make purchases online.

Internet, mobile app and some in-store purchases utilize tokenization.

Upon initiating a payment, tokenization creates a randomized “token” to replace the PAN and sends it to the payment processor, which then de-tokenizes the ID and authorizes the payment.

Once the payment has been authorized, the token can never again be used to initiate payment with another retailer. Therefore, it is useless for a thief to mine “tokens” since they can not be used again for any purchase.

Like EMV chips, though, the method helps improve security by adding a dynamic element to each purchase, making it tougher for sensitive information to be stolen.


Credit card companies and other payment services have also begun to adopt biometric technologies as a form of authentication.

Biometrics refer to unique human physical characteristics like fingerprints, facial recognition, voiceprints and iris or retinal scans, unique elements of a user that can entirely replace traditional alphanumeric passwords and are even more secure.

In January, Visa announced pilot institutions that will begin using a new payment card that features an on-card fingerprint sensor.

The card will allow users to register a fingerprint template to be stored in the card, which can then be used to authenticate purchases by placing a finger on the card’s sensor. Integrated green and red lights will indicate a successful or unsuccessful match.

“The world is quickly moving toward a future that will be free of passwords, as consumers realize how biometric technologies can make their lives easier,” said Jack Forestell, head of global merchant solutions for Visa.

Mastercard also launched a trial of biometric cards last year and announced plans to allow all customers to identify themselves with biometrics beginning in April 2020.

Experts and financial institutions believe biometric-secured payments will one day make all other authentication methods obsolete.

“Biometric technologies perfectly meet the public’s expectation for state-of-the-art security when making a payment,” President of Mastercard U.K. and Ireland Mark Barnett said. “It will make the purchase much smoother, and instead of having to remember passwords to authenticate, shoppers will have the chance to use a fingerprint or a picture of themselves.”

In a critique of India’s biometric-based identification system for the BBC, technology lawyer Mishi Choudhary warned potential compromises of databases storing biometric data could have long-lasting consequences.

“Any compromise of such a database is essentially irreversible for a whole human lifetime: no one can change their genetic data or fingerprints in response to a leak,” Choudhary said.

Professor of Law at Georgetown University Alvaro Bedoya also noted biometric features aren’t as inherently private as traditional alphanumeric passwords.

“I do know what your ear looks like, if I meet you, and I can take a high resolution photo of it from afar,” Bedoya said. “I know what your fingerprint looks like if we have a drink and you leave your fingerprints on the pint glass.”

Best Binary Options Brokers 2020:
  • Binarium

    The Best Binary Options Broker 2020!
    Perfect For Beginners!
    Free Demo Account!
    Free Trading Education!
    Sign-up Bonus!

  • Binomo

    Trustful Broker!

Like this post? Please share to your friends:
Binary Options Wiki
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: