Html/Javascript widget

Monday, 27 June 2022

OAuth

 OAuth ("Open Authorization") is an open standard for access delegation, commonly used as a way for internet users to grant websites or applications access to their information on other websites but without giving them the passwords. This mechanism is used by companies such as Amazon,Google, Facebook, Microsoft, and Twitter to permit the users to share information about their accounts with third-party applications or websites.

Generally, OAuth provides clients a "secure delegated access" to server resources on behalf of a resource owner. It specifies a process for resource owners to authorize third-party access to their server resources without providing credentials. Designed specifically to work with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be issued to third-party clients by an authorization server, with the approval of the resource owner. The third party then uses the access token to access the protected resources hosted by the resource server. In particular, OAuth 2.0 provides specific authorization flows for web applications, desktop applications, mobile phones, and smart devices.


OAuth 2.0 has been analyzed using formal web protocol analysis. This analysis revealed that in setups with multiple authorization servers, one of which is behaving maliciously, clients can become confused about the authorization server to use and may forward secrets to the malicious authorization server (AS Mix-Up Attack).This prompted the creation of a new best current practice internet draft that sets out to define a new security standard for OAuth 2.0. Assuming a fix against the AS Mix-Up Attack in place, the security of OAuth 2.0 has been proven under strong attacker models using formal analysis.

Typescript

TypeScript is a programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, adding optional static typing to the language. It is designed for the development of large applications and transpiles to JavaScript.
It may be used to develop JavaScript applications for both client-side and server-side execution (as with Node.js or Deno). Multiple options are available for transpilation. The default TypeScript Compiler can be used, or the Babel compiler can be invoked to convert TypeScript to JavaScript.

TypeScript provides static typing through type annotations to enable type checking at compile time. This is optional and can be ignored to use the regular dynamic typing of JavaScript.

function add(left: number, right: number): number {
    return left + right;
}

The annotations for the primitive types are number, boolean and string. Typescript also supports data types with the following annotations: Array, Enums and void.

Additional data types are: Tuple, Union, never and any. An array with predefined data types at each index is Tuple type. A variable that holds more than one type of data is Union type. When you are sure that something is never going to occur you use never type. Weakly- or dynamically-typed structures are of any type. 

Tuesday, 14 June 2022

understanding how JSON handles integers and strings

In JSON, values must be one of the following data types:

  • a string
  • a number
  • an object (JSON object)
  • an array
  • a boolean
  • null

JSON values cannot be one of the following data types:

  • a function
  • a date
  • undefined

 

Strings in JSON must always be in double quotes.
Example
{"name":"John"}


Numbers can be either an integer or a floating point.
Example
{"age":30}


JSON also supports objects, following the JSON syntax:

"obj name": {"field":value}

if value is a string, must be between double quotes.


"obj name": {"field":"string Value"}

 

The following is an example to illustrate both integers and strings

<!DOCTYPE html>
<html>
<body>
<p id="test"> </p>

<script>
var mytxt='{"emp":[' +
'{"name":"paul","surname":"smith","age":25,
"admission":2015},'+
'{"name":"maria","surname":"sheeva","age":20,
"admission":2016},'+
'{"name":"jon","surname":"shiv","age":27,
"admission":2012}]}';

var obj = eval ("(" + mytxt + ")");
document.getElementById("test").innerHTML =
obj.emp[1].name+ " " + obj.emp[1].surname + " " +
obj.emp[1].age + obj.emp[1].admission;
document.getElementById("test").innerHTML =
obj.emp[0].age + obj.emp[1].age + " " +
obj.emp[2].age;
document.getElementById("test").innerHTML =
obj.emp[2].admission + obj.emp[0].admission +
obj.emp[1].admission;


</script>

</body>


</html>


The output of the code above will be 6043, since document.getElementById receives whatever the containers obj.emp[2].admission, obj.emp[0].admission and obj.emp[1].admission hold, adding up the integer values passed in the parameters (2015+2016+2012)



Friday, 13 May 2022

PROFIT, BILLING AND PROFITABILITY: CONCEPTS AND DIFFERENCES

 Despite being commonly associated as synonyms, the words invoicing and monetization do not have the same meaning. Most authors tend to present the concepts of profitability and monetization, as a comparison between a company's profits and its sales revenue. Revenue is the "total sum of a company's sales", in a certain period, from its commercial activity. In that sense, billing is one of the main indicators used to measure the size of a business. Unlike billing, which is all the money that
goes into a company, profit is all the money that is left after deducting all expenses and costs.

Profitability is as a vital force for the organisation and it is the expression of the economic result which is the company-wide goal. Profitability is a
operational efficiency indicator that indicates what is the gain that the company manages to generate. The greater the profitability and turnover, the better the profitability of the company and the shareholders.

Considering that profitability also measures efficiency, it is also understood as the measure of financial return on an investment

Profitability, also expressed as the rate of return, is the profit to investment ratio. Determining the return on investment lets is see if it was consistent
with what had been planned. From the analysis of this indicator, it is possible to assess the organization's final performance, in addition to making it possible to analyse the causes of the problems about profitability. Based on the present considerations, it is important to know the main profitability indexes, since they provide the analyst with an assessment of the company's earnings.

Thursday, 12 May 2022

Marketing Information System

Marketing information system is defined by some as a structure of interaction between people, machines, methods and controls, in order to create an information flow capable of providing the basis for decision making in marketing. The information itself does not lead to the decision; it is necessary to choose a course of action that helps identify problems and opportunities and that indicates paths that reduce uncertainty. It is worth noting that not all companies have exclusive departments for information handling. Generally, it is found in companies, mainly small and medium-sized, sectors such as commercial/sales, logistics that make projections based on sales data, or on small marketing research, which is rarer. An information system can bring different types of advantages for the company in general, not just for the marketing sector. 

 It as a system in which marketing data is formally gathered, stored, analysed and distributed to managers in accordance with their informational needs on a regular basis.Furthermore, an overall Marketing Information System can be defined as a set structure of procedures and methods for the regular, planned collection, analysis and presentation of information for use in making marketing decisions. A marketing information system, which continuously collects the initial, routine and systematic data, is not only used for one particular topic but is designed for monitoring the degree of the marketing success to ensure the achievable of the operation as well. Internal database is a part of the most marketing information systems. In addition, it's relatively convenient to access and retrieve information. A databases allow marketers to tap into an abundance of information useful in making marketing decisions: internal sales reports, newspaper articles, company news releases, government economic reports, bibliographies, and more, often accessed through a computer system.

Internal data is a part of the data that is needed to be collect and handled by the marketing information system. But getting the information that is really needed from a marketing information system depends on what the information is and how it is used. The following internal operating data are essential:

 - Sales data, presented in a graphic format, can provide regular sales trend information and highlight whether certain customer types need to be targeted or focused.


- Price information by product line, comparison with competitors, can monitor market trends; analysed by customer type, it can check price trends in customer groups.


- Stock level data and trends in key accounts or distributors, focusing on whether different outlets need support; provide market share information.


- Market support information, coordinating the effects of marketing promotions, through advertising, direct marketing, trade incentives, consumer competitions and so on; helps to determine whether decisions are being made effectively.


- Competitive information, reviewing competitors' promotions and communications to see if the company is doing it better or worse than competitors, can improve market targeting.

Marketing managers use marketing information systems to develop short-term and long-term plans that outline product sales, profits and growth targets. Information systems facilitate the analysis and monitoring of performance against the objectives of each area of the marketing function. Information marketing systems support models and expert systems are also used to examine the results of various marketing plans.

New Digital Markets

 The recurring changes brought about by technological evolution have impacted societies and markets. Consumer culture has been changing gradually. With the increase in mobility and connectivity, consumers now have limited time to examine and evaluate brands. In a fast-paced world,our attention span tends to go down; people find it increasingly difficult to concentrate. Yet, across multiple channels—online and offline alike— consumers remain exposed to an excess of everything: product features, brand promises and sales pitches. Confused by advertising messages that are too good to be true, customers often overlook them, preferring to turn to more reliable sources of information: their social circle of friends and immediate family. 

 The change in comsumer behaviour in different societies and social groups has directly influenced the market as a whole, pressing it to meet their demands, hitherto repressed, and making it present in the most varied media and platforms. There is virtually no doubt that the digital revolution is one of the most significant influences on consumer behaviour and that the web's impact will continue to expand as more and more people around the world turn to the online world for information and services. Many of us are eager to browse the internet, and it's hard to imagine a time when texting, tweeting, using Facebook, or pinpointing interests on Pinterest wasn't part of our daily lives. In view of the above, the importance of the internet and its influence in the current global market and its social context is undeniable.

 According to a report by We Are Social (2021), web platforms are present in the daily lives of 59.5% of the world population, that is, the internet today has more than 4.5 billion connected users. In this sense, the need for companies to understand that more points of contact and higher volume in messages do not necessarily translate into greater influence. More than that, you need to stand out from the crowd and meaningfully connect with consumers at just a few crucial points of contact. One of the first business models that relate the market to the internet is the well-known e-commerce, the process of buying and selling products by electronic means, such as mobile and Internet applications, both for the retail and online shopping sector, as well as electronic transactions. With the advent of globalisation, commerce is no longer limited to going to the physical store of your choice to choose a product; with one click we can check competing offers, choose brands, see what other buyers say about the product, all in real time. The growing success of commercial transactions of this type is due to the fact that online retailers can predictably provide convenient, informative and personalised experiences for quite different types of consumers and businesses. 

 We can distinguish between entirely virtual companies, which started with a website, with no previous existence as a physical company, and virtual and real companies (brick-and-click), companies that have added an informational website and/or e-commerce option to their operations.

Tuesday, 10 May 2022

Young people are trendsetters

Young people are trendsetters. They are consumers of Generation Right Now, demanding everything right away. When it comes to trends,they are so quick to spot and follow them that marketers often cannot keep up with them. The positive aspect is that these professionals can quickly identify patterns that will influence the market in the near future .

Despite this definition, it is still necessary to understand that many of the trends adopted by the younger consumer public generally turn out to be an ephemeral fad, while a few manage to evolve, evolving to a megatrend, and even reaching the predominant culture.