Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Code



  4 ways to obtain access token in OAuth 2.0

OAuth 2.0 is an authorization mechanism, it's ,mainly used for issuing access token. There are 4 ways to obtain access token as per RFC 6749. Authorization code Implicit Password Client credentials The third party application must obtain a client id and client secret from the target service before obtaining access token no matter which method to use. This is to prevent token to be used maliciously. Authorization code With this method, the third party application must first get an authorization...

   OAUTH2,ACCESS TOKEN,REFRESH TOKEN     2019-06-29 07:12:03

  That’s Not TDD

A few months ago I was visiting a client who was having a lot of problems using TDD. “It takes over half an hour to run our unit tests,” he said. “You are not doing TDD,” I said. “In order for tests to be valuable all of them must run fast—within a few seconds, or developers will stop running tests frequently.” “But how to I make them run fast?” he asked, “Just connecting to the database takes 30 seconds” So I showed him a techn...

   TDD,Driver,QA,Model,Uncontrol,Method     2011-08-25 02:26:29

  How long does the heuristic cache of the browser actually cache?

Heuristic cache Heuristic caching is the default behavior of browser caching (i.e., for responses without Cache-Control), which is not simply "not caching", but implicitly caching based on the so-called "heuristic cache". HTTP is designed to cache as much as possible, so even if Cache-Control is not specified, the response will be stored and reused if certain conditions are met. This is called heuristic caching. HTTP/1.1 200 OK Content-Type: text/html Content-Length: 1024 Date: Tue, 22 Feb 2022 ...

   HEURISTIC CACHE,WEB DESIGN     2023-05-26 08:40:13

  Does Android team like to eat Kitkat?

Google released the new Android development code for Android 4.4 :KitKat.The new version will bring astonishing user experience for Android users. The interesting thing about the name is that it has the same name as one brand of Nescafe's chocolate wafer. Nescafe has authorized that Google can use this name as their development code. We may guess that the project team or the director was eating Kitkat or like to eat Kitkat while they were brainstorming the new development code, so they came out ...

   Android,Kitkat,development code     2013-09-03 23:03:03

  Send email using PHPMailer on GoDaddy hosting

According to PHPMailer troubleshooting guide, GoDaddy has a very strict rule on sending email using PHPMailer. Popular US hosting provider GoDaddy imposes very strict (to the point of becoming almost useless) constraints on sending an email. They block outbound SMTP to ports 25, 465 and 587 to all servers except their own. This problem is the subject of many frustrating questions on Stack Overflow. If you find your script works on your local machine, but not when you upload it to GoDaddy, ...

   PHP,PHPMAILER,GODADDY     2018-11-16 08:28:55

  Find files by size in Linux

In Linux systems, you may encounter a situation where there is no enough space on the system while you are trying to install some new packages or writing some data. In this case, you may want to clear some unneeded files. A frequent need will be find the largest files in the system so that they can be deleted first and disk space can be released quickly. In this post, we will show a simple command to find files by size so that we know what files are taking the specified space on the system, This...

   LINUX,FILESIZE,FIND     2020-04-25 08:02:45

  Microsoft Edge extension manifest v2 migration to v3

In June 2023, Microsoft Edge would not allow Edge extensions with manifest version before v3 to be listed on Microsoft web stores as v3 extensions add more security privacy related restrictions on some of the functions. Hence all extensions with manifest v2 must migrate to v3. In this post, we would show how we did the migration for one of our extensions and the changes made. There is a checklist provided by Microsoft Edge team on what needs to be updated so that the extension can stil...

   MICROSOFT EDGE,EXTENSION,MANIFEST V3     2022-10-01 02:54:47

  What can select do in GoLang

In Go language, select is a keyword used to listen to and perform IO operations related to channels. With the select statement, we can simultaneously listen to multiple channels and perform corresponding operations when any of the channels are ready. This article will summarize the common uses of the select statement and provide some considerations when using it. Basic syntax The basic syntax of the select statement is as follows: select { case <-channel1: // when channel1 has data to ...

   GOLANG,SELECT,USAGE,SYNTAX,TUTORIAL     2023-08-12 20:17:02

  PHP function overloading puzzle clearer

PHP's meaning of overloading is different than Java's. In PHP, overloading means that you are able to add object members at runtime, by implementing some of the __magic methods, like __get, __set, __call, __callStatic. You load objects with new members. Overloading in PHP provides means to dynamically "create" properties and methods. These dynamic entities are processed via magic methods one can establish in a class for various action types. Some example:class Foo{    p...

   PHP,function overloading,OOP,default val     2011-07-11 03:24:30

  Chrome extension manifest v2 migration to v3

In 2023, Google would not allow Chrome extensions with manifest version before v3 to be listed on Chrome web stores as v3 extensions add more security privacy related restrictions on some of the functions. Hence all extensions with manifest v2 must migrate to v3. In this post, we would show how we did the migration for one of our extensions and the changes made. There is a checklist provided by Chrome team on what needs to be updated so that the extension can still work in v3. It can be checked ...

   CHROME EXTENSION,MANIFEST V3,MIGRATION     2022-09-24 10:44:54