Sideways Dictionary

Posted September 8, 2017 by dionscher
Categories: Development

It’s like a dictionary, but using analogies instead of definitions. Use it as a tool for finding and sharing helpful analogies to explain technology. Because if everyone understands technology better, we can make technology work better for everyone.

https://sidewaysdictionary.com

 

Advertisements

Testing

Posted November 7, 2016 by dionscher
Categories: Development

testing

Web Development

Posted April 26, 2016 by dionscher
Categories: ASP .NET MVC, Development, Fun

spiders

Returning 401 HTTP Status Code on Authentication Failure in MVC 5 Web API’s

Posted April 15, 2016 by dionscher
Categories: ASP .NET MVC, Development

Tags:

Was experiencing a problem that my AJAX requests were not receiving any 401 errors.

Turns out the security pipeline in OWIN and MVC 5 has changed and a custom filter attribute was no longer returning 401 and 403 status codes. Instead it returns a 200 status code and inserting the following information in the header.

X-Responded-JSON: {"status":401,"headers":{"location":"http:\/\/localhost:59540\/Account"}}

As a result JQuery does not detect the error and simply did nothing. Fortunately this great article by Kevin Junghans helped to solve this problem.

After reading this article I discovered the following the OWIN help:

“The LoginPath property informs the middleware that it should change an outgoing 401 Unauthorized status code into a 302 redirection onto the given login path. The current url which generated the 401 is added to the LoginPath as a query string parameter named by the ReturnUrlParameter. Once a request to the LoginPath grants a new SignIn identity, the ReturnUrlParameter value is used to redirect the browser back to the url which caused the original unauthorized status code.

If the LoginPath is null or empty, the middleware will not look for 401 Unauthorized status codes, and it will not redirect automatically when a login occurs.”

Hopefully this saves you the time I spent bumbling around in the deep, dark pit of despair.

-Dion

Server-side paging, sorting, filtering and grouping with the Kendo UI Grid and NHibernate

Posted December 17, 2015 by dionscher
Categories: Development, NHibernate

KendoNHIntegration3

Trying to integrate Telerik’s Kendo Grid with NHibernate and you keep getting a nasty exception? How to get server-side data operations working without experiencing the grouping error?

Find out more.

https://dionscher.wordpress.com/technical-articles/server-side-paging-sorting-filtering-and-grouping-with-the-kendo-ui-grid-and-nhibernate/

 

 

Explanations at Last!

Posted December 14, 2015 by dionscher
Categories: Fun

Q: Why do men’s clothes have buttons on the right while women’s clothes have buttons on the left?
A: When buttons were invented, they were very expensive and worn primarily by the rich. Since most people are right-handed, it is easierto push buttons on the right through holes on the left. Because wealthy women were dressed by maids, dressmakers put the buttons on the maid’s right! And that’s where women’s buttons have remained since.

Q: Why do ships and aircraft use ‘mayday’ as their call for help?
A: This comes from the French word m’aidez -meaning ‘help me’ — and is pronounced, approximately, ‘mayday.’

Q: Why are zero scores in tennis called ‘love’?
A: In France , where tennis became popular, round zero on the scoreboard looked like an egg and was called ‘l’oeuf,’ which is French for ‘egg.’ When tennis was introduced in the US , Americans (mis)pronounced it ‘love.’

Q. Why do X’s at the end of a letter signify kisses?
A: In the Middle Ages, when many people were unable to read or write, documents were often signed using an X. Kissing the X represented an oath to fulfill obligations specified in the document. The X and the kiss eventually became synonymous.

Q: Why is shifting responsibility to someone else called ‘passing the buck’?
A: In card games, it was once customary to pass an item, called a buck, from player to player to indicate whose turn it was to deal. If a player did not wish to assume the responsibility of dealing,he would ‘pass the buck’ to the next player.

Q: Why do people clink their glasses before drinking a toast?
A: It used to be common for someone to try to kill an enemy by offering him a poisoned drink. To prove to a guest that a drink was safe, it
became customary for a guest to pour a small amount of his drink into the glass of the host. Both men would drink it simultaneously.
When a guest trusted his host, he would only touch or clink the host’s glass with his own.

Q: Why are people in the public eye said to be ‘in the limelight’?
A:Invented in 1825,limelight was used in lighthouses and theatres by burning a cylinder of lime which produced a brilliant light. In the
theatre,a performer ‘in the limelight’ was the centre of attention.

Q: Why is someone who is feeling great ‘on cloud nine’?
A: Types of clouds are numbered according to the altitudes they attain, with nine being the highest cloud If someone is said to be on cloud
nine, that person is floating well above worldly cares.

Q: In golf, where did the term ‘Caddie’ come from?
A. When Mary Queen of Scots went to France as a young girl,Louis, King of France , learned that she loved the Scots game ‘golf.’ So he had the first course outside of Scotland built for her enjoyment. To make sure she was properly chaperoned (and guarded) while she played, Louis hired cadets from a military school to accompany her. Mary liked this a lot and when returned to Scotland (not a very good idea in the long run), she took the practice with her. In French, the word cadet is pronounced ‘ca-day’ and the Scots changed it into ‘caddie’.

Q: Why are many coin banks shaped like pigs?
A: Long ago, dishes and cookware in Europe were made of a dense orange clay called ‘pygg’. When people saved coins in jars made of this clay, the jars became known as ‘pygg banks.’ When an English potter misunderstood the word, he made a container that resembled a
pig. And it caught on.

Q: Did you ever wonder why dimes, quarters and half dollars have notches (milling), while pennies and nickels do not?
A: The US Mint began putting notches on the edges of coins containing gold and silver to discourage holders from shaving off small
quantities of the precious metals. Dimes, quarters and half dollars are notched because they used to contain silver. Pennies and nickels
aren’t notched because the metals they contain are not valuable enough to shave.

-END-

Multithreaded programming – theory vs actual

Posted April 20, 2015 by dionscher
Categories: Development

Tags:

multithreaded programming