IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] JAL デジタル証明書アプリ「VeriFLY」、ワクチン接種証明書の登録が可能に |
https://www.itmedia.co.jp/business/articles/2111/09/news151.html
|
itmedia |
2021-11-09 17:17:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] オンライン会議時のマナー、60~70代は「特に何もしていない」が3割 一番マナーを意識するのは20代 |
https://www.itmedia.co.jp/news/articles/2111/09/news155.html
|
itmedia |
2021-11-09 17:01:00 |
IT |
情報システムリーダーのためのIT情報専門サイト IT Leaders |
鈴与システムテクノロジー、業務マニュアルと社内教育講座を動画化、経営層のメッセージも発信 | IT Leaders |
https://it.impress.co.jp/articles/-/22305
|
Panoptoを提供したアシストが年月日に発表した。 |
2021-11-09 17:14:00 |
AWS |
AWS Japan Blog |
AWS Lambdaによる進化的アーキテクチャの構築 |
https://aws.amazon.com/jp/blogs/news/developing-evolutionary-architecture-with-aws-lambda/
|
ドメインロジックは、クライアントのリクエストに応答する前に、為替レートを使用して株価を他の通貨に換算します。 |
2021-11-09 08:03:17 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
flutterで作成したアプリをXcodeからアプリのアップロードをする際、エラーが発生する。 |
https://teratail.com/questions/368481?rss=all
|
flutterで作成したアプリをXcodeからアプリのアップロードをする際、エラーが発生する。 |
2021-11-09 17:47:43 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
AWS Copilotを用いてbackendへデプロイしたLaravelへnginx経由でアクセスしたいが504になる |
https://teratail.com/questions/368480?rss=all
|
AWSCopilotを用いてbackendへデプロイしたLaravelへnginx経由でアクセスしたいがになる前提・実現したいこと既存のLaravelアプリケーションをFargateで動かしたく、Copilotを用いてデプロイし、ELBを用いてインターネットからアクセスしたい。 |
2021-11-09 17:34:13 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
【videoタグ】HTML5のvideoタグのレスポンシブ対応はどうするべきか。 |
https://teratail.com/questions/368479?rss=all
|
【videoタグ】HTMLのvideoタグのレスポンシブ対応はどうするべきか。 |
2021-11-09 17:29:16 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
JavaScript 変数内の文字列の日本語、ローマ字の文字数を調べたいです |
https://teratail.com/questions/368478?rss=all
|
|
2021-11-09 17:15:14 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ターミナルからcomposerをインストールしたい |
https://teratail.com/questions/368477?rss=all
|
ターミナルからcomposerをインストールしたい閲覧ありがとうございます。 |
2021-11-09 17:13:32 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
javaで指定したソースコードファイルのクラス名などを取得したい |
https://teratail.com/questions/368476?rss=all
|
javaで指定したソースコードファイルのクラス名などを取得したい前提・実現したいこと指定したjavaソースコードファイルのクラス名、パッケージ宣言、importクラス名を取得するコードを書いているのですが・FileReaderでファイルを読み込み、Charactercompareでquotcquotquotlquotquotaquotquotsquotquotsquotなどと順に比較していき、すべて等しかったら次の文字を空白まで読み格納するという方法しか思いつかないのですがもっと便利な関数や書き方があるのでしょうか。 |
2021-11-09 17:13:31 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
GoogleスプレッドシートでTwitterのRTを抽出したい |
https://teratail.com/questions/368475?rss=all
|
twitter |
2021-11-09 17:05:08 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
カテゴリごとに分けたデータを三次元空間で色違いで散布したい |
https://teratail.com/questions/368474?rss=all
|
|
2021-11-09 17:02:36 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【個人開発】独学 + 職業訓練校でプログラミングを学び、ブックマークサービスを作りました。 |
https://qiita.com/hayasakadaichi/items/b7e56b18d7f53ec1af32
|
そんなJavaを使って、授業の中で何度も、クラスやインターフェース、メソッドを作ったおかげで、引数とは戻り値とはインスタンス変数とはコンストラクタとはアクセッサとは継承とはなどを身体で理解し、プログラミング全体やオブジェクト指向への理解が深まりました。 |
2021-11-09 17:14:47 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
test |
https://qiita.com/aoba210/items/be4bf6d150be1b1d167e
|
knowledge |
2021-11-09 17:01:19 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
ターミナルでのawsコマンドを入れるのに困った |
https://qiita.com/Qwertyutr/items/87b4bb3c743ecb2eafbf
|
ターミナルでのawsコマンドを入れるのに困ったtips的な記事。 |
2021-11-09 17:44:07 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【AWS】踏み台サーバの構築方法について(SSH転送) |
https://qiita.com/Kairi_Hatoba/items/a2f853d5118196f9f529
|
【AWS】踏み台サーバの構築方法についてSSH転送踏み台サーバとは踏み台サーバとは、SSH接続を利用し特定ポートの転送をすることで、目的のサーバにアクセスする技術。 |
2021-11-09 17:06:03 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Dockerで任意のイメージやコンテナをまとめて消す |
https://qiita.com/NoSuke23/items/e3e9dee5004f9815f7a0
|
Dockerで任意のイメージやコンテナをまとめて消す任意のイメージやコンテナをまとめて消したいDockerfileを構築したりしてるとコンテナやイメージがどんどん増えていくしかしpruneで全て消す訳にもいかないffilterformatを使うdockerpsdockerimagesではフィルタリングとフォーマッティングができるフィルタリングf任意のキーでフィルタリングできるfは複数回使えるdockerpsaCONTAINERIDIMAGECOMMANDCREATEDaddfoobashsecondsagocdfdfefoobashminutesagodecdfbardockerentrypoints…Aboutanhouragobbaadbardockerentrypoints…AboutanhouragodfbazforeverkillTree…AboutanhouragodockerpsafancestorfooCONTAINERIDIMAGECOMMANDCREATEDaddfoobashsecondsagocdfdfefoobashminutesagoコンテナキー説明idコンテナのIDlabellabelかlabelnameコンテナの名前exited整数値コンテナの終了コード。 |
2021-11-09 17:42:04 |
Linux |
CentOSタグが付けられた新着投稿 - Qiita |
CentOS 8にPHP 7.4を標準リポジトリからインストールする |
https://qiita.com/charon/items/74350fd75c8fa1cf12ac
|
PHPをインストールするCentOSでPHPのモジュールに関する情報を見ると、以下のつのストリームがあることが確認できます。 |
2021-11-09 17:54:28 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【個人開発】独学 + 職業訓練校でプログラミングを学び、ブックマークサービスを作りました。 |
https://qiita.com/hayasakadaichi/items/b7e56b18d7f53ec1af32
|
そんなJavaを使って、授業の中で何度も、クラスやインターフェース、メソッドを作ったおかげで、引数とは戻り値とはインスタンス変数とはコンストラクタとはアクセッサとは継承とはなどを身体で理解し、プログラミング全体やオブジェクト指向への理解が深まりました。 |
2021-11-09 17:14:47 |
技術ブログ |
Developers.IO |
「You are not authorized to perform this operation.」が発生したときの対処法 |
https://dev.classmethod.jp/articles/tsnote-iam-you-are-not-authorized-to-perform-this-operation-001/
|
arenot |
2021-11-09 08:53:53 |
海外TECH |
DEV Community |
Modern JavaScript explained in a way you've never seen before |
https://dev.to/aviyel/modern-javascript-explained-in-a-way-youve-never-seen-before-2020
|
Modern JavaScript explained in a way you x ve never seen before What exactly is JavaScript JavaScript is a High Level programming language It is commonly abbreviated as JS JavaScript along with HTML and CSS is one of the core technologies of the World Wide Web It supports event driven functional and imperative programming styles So without any further ado let s get started VariablesVariables are the containers in which value is stored It includes information that can be used throughout the program Variables can be declared with the var let and const operators The less preferred method is var So let and const are highly recommended for declaring the variables varvar username Tommy letlet firstName Tom constconst lastName Cruise console log username console log firstName console log lastName Using Variables To declare variables we use var let and const The variable declaration method var is not recommended It is only used in JavaScript s previous version version before es The variable should be declared using let It is possible to reassign it The variable should also be declared using const It cannot be redefined and can only have a fixed value var var var name Tom Cruise console log name name pramit armpit console log name Initialzing the variables Initializing the variablesvar greetings console log greetings greetings yoo there console log greetings Rules and convention of JavaScript variables Allowed letters numbers uderscores dollar signs Not allowed do not start variable names with a numbersvar name groot not valid var name thanos validMultiword variables multi word variablesvar firstName thanos camel casingvar first name promear underscore conventionvar FirstName yolomeat pascal caselet letlet name Brad pitt console log name name Christain Bale console log name const const gt constantconst name promeat console log name cannot reassignname pramit have to assign the valueconst greetings but we can change the data inside the objectconst person name pramit age person name promeat person age console log person same goes to the arrayconst numbers numbers push console log numbers console log The console log method is used to print the message in the web console The message can be simple JavaScript strings numbers booleans objects or arrays log to consoleconsole log hello there console log console log true console log false var hey yolo console log hey console log console table a b console error This is an error console clear console warn This is an warning console time check the scripts how long does the code takes console time Hello console log YOOO console log YOOO console log YOOO console log YOOO console log YOOO console log YOOO console timeEnd Hello Data Types Primitive Data Type StringsNumberBooleanUndefinedNull Strings It s a primitive data type that represents and manipulates a string of characters like letters spaces numbers and characters Strings are typically surrounded by quotes either a double quote or a single quote let someString This is a string const stringTwo This is also a string let stringThree let stringSingleQuote This is single quote string Template literals Template strings Template literals are string literals that support embedded expressions They support multi line strings as well as string interpolation let name Aviyel let field open source let purpose name is a community driven monetization platform for field Projects let projectOnboard name has already onboarded field projects console log purpose console log projectOnboard This is a template string This is a multi line string Numbers It is also a primitive data type It encompasses all sets of integer and floating point numbers let firstNumber let secondNumber let floatNumber const numberOne const numberTwo let calculate calculate numberOne numberTwo console log calculate calculate numberOne numberTwo console log calculate calculate numberOne numberTwo console log calculate calculate numberOne numberTwo console log calculate calculate numberOne numberTwo resultconsole log calculate Math Object Math Object its an object because it contains both properties as well as function let valueCalc valueCalc Math PI console log valueCalc valueCalc Math E console log valueCalc valueCalc Math round console log valueCalc valueCalc Math ceil console log valueCalc valueCalc Math floor console log valueCalc valueCalc Math sqrt console log valueCalc valueCalc Math abs converts into positive Numbers console log valueCalc valueCalc Math pow console log valueCalc valueCalc Math min console log valueCalc valueCalc Math max console log valueCalc valueCalc Math random console log valueCalc valueCalc Math random if we want random number from max numebr of console log valueCalc valueCalc Math floor Math random resultconsole log valueCalc Airthematic operators Additional operator const a b c const str st str additionconsole group Addition console log a b console log b c console groupEnd adding stringconsole log str str NOTE JavaScript is a dynamically typed language which means that the type can be changed on the fly Adding Number to String const numberOne const stringOne console log numberOne stringOne Subtraction operatorconst a b c Subtractionconsole group Substration console log a b console log b c console groupEnd Multiplication Operatorconst a b c Multiplicationconsole group Multiplication console log b c console log a b console groupEnd Division Operatorconst a b c Divisionconsole group Modulus console log b c console log a b console groupEnd Increment Operatorconst a b c console group Increment console log a console log a console log c c a console log c a console groupEnd Decrement Operatorconst a b c console group Decrement console log a console log a console log c c a console log c a console groupEnd Booleans It is a primitive data type that can be either true or false let isOpenSource isOpenSource true isOpenSource false resultconsole log isOpenSource Null It is also a primitive data type It is simply an absence of value let existence null resultconsole log existence Undefined It simply denotes the absence of a defined value If a variable is declared but not assigned initialized with a specific value it will have an undefined value It simply denotes the absence of a defined value If a variable is declared but not assigned initialized with a specific value it will have an undefined value let name console log name undefined Non Primitive Data Type FunctionsObjectsArrays Functions Functions are one of JavaScript s fundamental building blocks In JavaScript a function is similar to a procedureーa set of statements that performs a task or calculates a valueーbut for a procedure to qualify as a function it must take some input and return an output with an obvious relationship between the input and the output function add a b return a b console log add es arrow function const add a b gt a b console log add Defining Functions A function is a reusable set of statements to perform a task or calculate a value Function Declaration Function definition or Function statement name of a function list of parameters to that function for example function sub a b return a b The function sub takes two parameters a and b This function consists of one return statement that returns the subtracted value of a b Return Functions return values using the return It ends function execution and returns the specified value to the location where it was called If a return statement is not declared the function will throw undefined by default Function expression Within an expression the function keyword can be used to define a function These functions can be performed anonymously It isn t required to give it a name Anonymous Functions It does not have a name property It can be defined only by using the function keyword for example const add function a b return a b let x add console log x Immediately Invocable Functions Expression IFFEs function x console log x x console log Immidiately Invocable Functions Expressions IFFEs function y name console log y y console log name yooooooo nine NOTE IFFEs can be declared and run at the same time Calling the function Defining a function does not execute it Calling the function actually performs the specified actions with the indicated parameters add sub NOTE Functions must be in scope when they are called but the function declaration can be hoistedconsole log add function add a b return a b Parameters VS ArgumentsParameters A parameter is a named variable passed into a function Parameter variables are used to import arguments into functions Arguments An argument is a value primitive or object passed as input to a function Objects JavaScript objects are containers for named values called properties or methods Objects are built in non primitive data types for storing key value pairs Data inside of that objects is not in order and the values can be of any type Property and value of an Object Curly braces surround the object literal The colon symbol is used to map values to keys All keys must be unique but values can be whatever anything they want Object properties are another name for key value pairs Commas are used to separate key value pairs const projectDetails name Typesense isOpenSource true githubStars Objects can be changed The content inside the objects can be changed even if they are declared with const New properties can be added deleted and can be changed const projectDetails name Typesense isOpenSource true githubStars delete projectDetails isOpenSource projectDetails githubStars console log projectDetails name Typesense githubStars A dot for accessing object propertiesProperties of an object can be accessed by Object propertyName const car name Lambo color orange licensePlate console log car name Lamboconsole log car color orangeJavaScript will throw undefined if we try to access the property which is not declared which does not exist example const car name Lambo color orange licensePlate console log car age Undefined For in loop in objectIt iterates over the keys of an Objectconst car name Lambo color orange licensePlate for let key in car console log key cars key name Lambo color orange licensePlate Passing Objects as an argument When an object is passed as an argument to a function it is passed by reference const age const details name pramit const chngObjArgs ag obj gt age obj name Thanos chngObjArgs age details console log age console log details name Thanos Object Methods If an Object s property value is a function they are referred to as Object Methods const details name gt console log Hello there Yo how are you doing details name Hello there Yo how are you doing Object destructuring const details name Pramit profession web developer isOnline true isOffline false username promeat const name profession isOnline isOffline username details console log name Pramitconsole log profession web developerconsole log isOnline trueconsole log isOffline falseconsole log username promeat Shortcut technique for Object Creations const name Thanos const details name console log details name Thanos “this keyword in JavaScript ObjectIn JavaScript this is a reserved keyword It refers to the method s calling object and can be used to access the object s method const details name Pramit isOnline true thisName return this name console log detail thisName Pramit Another Exampleconst ageCalc oldAge newAge calculateAge return this oldAge this newAge console log ageCalc calculateAge Factory Function The factory function is a function that returns an object Factory Function creating carvar Car function name color creating car object var car parameters as keys to this object car name name car color color function to start engine car vroom function return Vrom vrom car name is car color color return car var carOne Car Lambo orange console log carOne vroom Vrom vrom Lambo is orange color var carTwo Car Ferarri Red console log carTwo vroom Vrom vrom Ferarri is Red color Arrays Multiple values can be stored in a single variable using JavaScript arrays Many values can be stored in an array with a single name and the values can be accessed by referring to an index number const stringArray my name is pramit resultconsole log stringArray const numArray resultconsole log numArray Mixed Arrayconst mixedArray my name is pramit true false resultconsole log mixedArray Index Arrays are list like objects whose prototype has methods to perform traversal and mutation operations Array elements are arranged by an index value Index value always starts with Creating an arraylet comics DC Marvel console log comics Checking the length of an array console log comics length Accessing array items using index positionlet first comics let second comics Accessing the last item of an arraylet last comics comics length Looping an arraycomics forEach function item index array console log item index DC Marvel Adding Items to an end of an array let newLength comics push Capcom DC Marvel Capcom Removing an item from the end of an Arraylet last comics pop remove Capcom DC Marvel Removing an item from the beginning of an Arraylet first comics shift remove DC from the front Marvel Adding an item to the beginning of an Arraylet newLength comics unshift Nintendo add to the front Nintendo Marvel Find the index of an item in the Arraylet pos comics indexOf Marvel Removing an item by index positionlet removedItem comics splice Nintendo Removing items from an index positionlet comics Nintendo DC Marvel Capcom console log comics Nintendo DC Marvel Capcom let removedItems comics splice console log comics Nintendo Capcom console log removedItems DC Marvel Copy an Arraylet shallowCopy comics slice this is how to make a copy orlet copyArray comics ConditionalsConditional statements control behavior and determine whether or not pieces of code can run Conditional statements are used to control the execution flow based on certain conditions If a condition is true you can do one action if it is false you can take a different action If statementIf the expression is truthy then only the code executesconst isOnline true if isOnline console log Thanos is Online else statementelse block executes if the if condition fails const isOnline false if isOnline console log Thanos is Online else console log Thanos is Not Online If else statementEqual toconst age equal toif age console log true else console log wrong Not Equal toconst age if age console log true else console log wrong Equal to value and typeconst age if age console log true else console log wrong Not Equal to value and typeconst age if age console log true else console log wrong Greater than or less thanif age gt console log true else console log wrong if age lt console log true else console log wrong If Else statementconst color purple if color red console log Color is red else if color green console log Color is green else console log Color is Neither red nor green Logical Operator Ampersand operatorconst name pramit const hisAge if hisAge gt amp amp hisAge lt console log name is a Teenager else if hisAge gt amp amp hisAge lt console log name is in his Twenties else console log He is OLD OR operatorif hisAge gt hisAge lt console log name he can join the army else console log name cannot run in race Ternary operatorconsole log hisAge Correct Incorrect If else without a braceif hisAge gt hisAge lt console log name he can join the army else console log name cannot run in race switch case statementThe switch statement is used to perform different actions based on different conditions Switch is evaluated once value of the expression is compared with each case if there is a match the code block gets executed if there is not any match the default code block gets executed const foobar bar switch foobar case foo let x console log x break case bar let y console log y break default console log REEEE Comparison operatorCompares two value and return either true or falseconst name pramit const name PRAMIT console group strings console log name pramit trueconsole log name name falseconsole log name name toLowerCase console groupEnd Numbers comparisonconst firstNumber const secondNumber console group numbers console log firstNumber secondNumber trueconsole log firstNumber secondNumber falseconsole log firstNumber secondNumber falseconsole log firstNumber secondNumber trueconsole groupEnd Booleans comparisonlet yolo let nothing null console group booleans console log Boolean falseconsole log Boolean this trueconsole log Boolean yolo falseconsole log Boolean nothing falseconsole log Boolean trueconsole log Boolean trueconsole groupEnd Objects and Arrays comparisonconst array const array const obj name pramit const obj name pramit console group objects and arrays console log array array falseconsole log obj obj falseconsole log array array falseconsole log obj obj falseconsole groupEnd AND or OR operatorconsole group And console log Boolean true amp amp Boolean true trueconsole log Boolean true amp amp Boolean falseconsole log Boolean amp amp Boolean true falseconsole log Boolean amp amp Boolean falseconsole groupEnd console group OR console log Boolean true Boolean true trueconsole log Boolean true Boolean trueconsole log Boolean Boolean true trueconsole log Boolean Boolean falseconsole groupEnd Ternary operatorIt s an operator which takes three operands a condition followed by a question mark and then an expression to execute if the condition is truthy followed by a colon and finally the expression to execute if the condition is falsy condition expressionIfTrue expressionIfFalseconst age console log age Correct Incorrect Logical OR operatorfalse false falsefalse true truetrue false truetrue true true Logical AND amp amp operatorfalse amp amp false falsefalse amp amp true falsetrue amp amp false falsetrue amp amp true true Loops For loops For Loopsfor let i i lt i console log i Changing Iterationfor let i i lt i if i console log Two console log i Continue the loop Continue statement for let i i lt i if i console log Two continue console log i Another examplelet arr let str for let i i lt arr length i if i continue str str arr i str str split sort a b gt a b console log str Breaking the loop Break statement for let i i lt i if i console log Two break console log i Another examplelet arr let str for let i i lt arr length i if arr i gt break str str arr i console log str Looping through arraysconst names pramit ram shyam hari krishna gopal for let a a lt names length a console log names a Looping through arrays using forEachconst namesTwo pramit ram shyam hari krishna gopal namesTwo forEach nam index array gt console log index nam console log array Looping through arrays of objects using the mapconst users id name pramit id name marattha id name ram id name hari id name gopal id name krishna id name shanker id name shyam const ids users map user gt return user id console log ids For in loop used in Objectsconst userBase firstName pramit lastName marattha age for let x in userBase console log x gt userBase x While Loops and do whileWhile looplet i let j while i lt console log Numbers i i Do While Loopsdo console log Numbers j j while j lt Endless loopfor console log Stuck in an endless loop while true console log Stuck in an endless loop do console log Stuck in an endless loop while true For in looplet arr let sum for let i in arr console log arr hasOwnProperty i if arr hasOwnProperty i sum arr i console log sum For of looplet arr let sum for let i of arr sum i for let i of arr sum i console log sum labeled statementlet firstMatch let arr let arr arr filter i gt i console log arr firstLoop for let i in arr for let x in arr if arr i arr x firstMatch arr i break firstLoop console log file labeledStatement js line firstMatch firstMatch return statementfunction containNumber numbers number for let i in numbers if numbers hasOwnProperty i if numbers i number return true return false let arr let conatinsTwo containNumber arr console log file returnStatement js line conatinsTwo conatinsTwo return without valuefunction someDataWithValue value someData if value return someOtherData function someData console log Some Data function someOtherData console log Some Other Data someDataWithValue false Error handlingCatch all exceptionfunction catchWhenNullEmpty array if array length null throw array is null if array length throw new RangeError return array try catchWhenNullEmpty null console log catchWhenNullEmpty null catch error console log error Catch the specific exceptionfunction throwNewNullOrEmpty array if array null throw Array is null if array length throw new RangeError try throwNewNullOrEmpty catch e if e name RangeError console log Array is Empty else console log Array is not specified Define Exception Typefunction simepleExeption function exception name message this name name this message message throw new exception exception this is a message ScopeGlobal scope Global Scopevar a let b const c Functional Scopefunction check var a let b const c console log Function Scope a b c check If block scopeif true var a let b const c console log If block Scope a b c Loop block Scopefor var a a lt a console log Loop block Scope a ClassesClasses are a template for creating objects Class syntax has two componentsclass declaration class expression Constructor The constructor method is a special method of a class for creating and initializing an object of that class A constructor can use the super keyword to call the constructor of the super class Class Declarationclass sum constructor numberA numberB this numberA numberA this numberB numberB Class Expression named expressionlet Sum class sumTwo constructor numberA numberB this numberA numberA this numberB numberB console log Sum name output sumTwo unnamed expressionlet Sum class constructor numberA numberB this numberA numberA this numberB numberB console log Sum name output Sum Prototype Methodclass Sum constructor numberA numberB this numberA numberA this numberB numberB Getter get totalSum return this calculateSum Method calculateSum return this numberA this numberB const tSum new Sum console log tSum totalSum Binding this When a static or prototype method is called without a value for this such as by assigning the method to a variable and then calling it then this value will be undefined inside the method class Animal speak return this static eat return this let obj new Animal obj speak the Animal objectlet speak obj speak speak undefinedAnimal eat class Animallet eat Animal eat eat undefined Field declaration public field declaration class Sum numberA numberB constructor numberA numberB this numberA numberA this numberB numberB private field declaration class Sum numberA numberB constructor numberA numberB this numberA numberA this numberB numberB Subclassing with extendsextends is used to create a class of another class class Instrument constructor name this name name play console log this name creates a melodic harmony class Guitar extends Instrument constructor name super name play console log this name creates a melody let strum new Guitar Ibanez strum play Ibanez creates a melody Superclass call with super keyword The super keyword is used to access and call functions on an object s parent class Instrument constructor name this name name play console log this name creates a melodic harmony class Guitar extends Instrument play super play console log this name creates a melody let strum new Guitar Ibanez strum play Ibanez creates a melodic harmony Ibanez creates a melody Iterators An iterator is an object which defines a sequence and potentially a return value upon its termination iterators allow you to iterate over an objectSpecifically an iterator is any object which implements the Iterator protocol by having a next method that returns an object with two properties valuedoneOnce created an iterator object can be iterated explicitly by repeatedly calling next function calcRangeIterator start end Infinity step let nextIndex start let iterationCount const rangeIterator next function let result if nextIndex lt end result value nextIndex done false nextIndex step iterationCount return result return value iterationCount done true return rangeIterator using iterators const it calcRangeIterator let result it next while result done console log result value result it next console log Iterated over sequence of size result value Full article Part available here gt Full article Part available here gt Happy Coding Follow aviyelHQ or sign up on Aviyel for early access if you are a project maintainer contributor or just an Open Source enthusiast Join Aviyel s Discord gt Aviyel s worldTwitter gt |
2021-11-09 08:39:44 |
海外TECH |
DEV Community |
Using CSS variables like a pro. |
https://dev.to/timonwa/using-css-variables-like-a-pro-1ddn
|
Using CSS variables like a pro PrerequisitesI am going to assume that you already have basic knowledge on how to style your html documents using CSS And with that on the confirmation Table of ContentsWhat are CSS VariablesThe ScopeThe SyntaxThe Fallback ValueInheritanceSpecificityValidityRecap What are CSS Variables Imagine you are creating a website with a large CSS code base and complexity and you have a brand color of Red and Green which would be reused a number of times throughout the website You decide to use Red as the main color you finish building the website and you show it to your client but the client says he would have preferred Green instead So you have to go back to all the instances that you used Red and then change them to Green That sounds stressful doesn t it especially if the number of those instances are or even more Now imagine if you had used a CSS variable instead to declare the value of the color Red and you had called that variable in all those instances Then when the client decides to go with Green all you have to do is change the color value in one place i e where you declared it and just like that all the Reds suddenly become Green Magical isn t it Not really it s just the power of CSS variables Custom properties sometimes referred to as CSS variables or cascading variables are entities defined by CSS authors that contain specific values to be reused throughout a document CSS variables help to make the reuse of stylings a lot easier All you have to do is declare it once and call it anywhere that you want to use it Now that you know what it s about let s talk about where we can use it The ScopeCSS variables can be used in any CSS selector The type of the selector would determine if the variable would have a global or local scope hence become a global or local variable The global variables can be used by every element in the document while local variables can be used only by the elements inside the selector where it is declared in To create a variable with a global scope declare it inside the root selector The root selector represents the document s root element To create a variable with a local scope declare it inside the selector that is going to use it Do note that it is custom practice to define CSS variables in the root but a few cases might warrant you having them in a local scope The SyntaxThe syntax is really quite simple and it makes use of a var function First of all you have to declare the variable within the selector that you want to use it in Note that only the child elements or descendants of that selector would have access to the variable as explained above Syntaxselector variable name value Example root main color red The variable must begin with two dashes and is case sensitive This means that main color is not the same as Main color or main Color The browser will treat the above as different custom properties The next step is to call the variable within the elements that will use it using the var function Syntaxelement style var name value Examplebutton color var main color blue The value is optional and is known as a fallback value The Fallback ValueThe purpose of a fallback value is that if for any reason the variable cannot be accessed and used by the browser the browser should use this instead So if our variable main color cannot be used then the browser should then use blue An instance would be if wemade a spelling error when declaring our CSS variable name or when calling it are calling a variable that is out of the scope it is being used in forgot to declare the variable in the first place root main coor red button color var main color blue Therefore if our variable cannot be accessed by the browser because it cannot find its declaration anywhere then the browser should use blue as the next best thing If after this the browser still cannot access the fallback value because you did not give it a value to fall back on or you again made a spelling error then you are on your own oh The browser would just look into the styles of the parent element to find if the property value is given there If it s not it then looks into the next parent element and on and on going up until it has no more parent element and results back to its initial value so therefore it would just be looking for styles for it to inherit If it doesn t find one the browser then gives the element back it s default property value lt body gt lt div class outer div gt lt div class inner div gt lt h gt Title lt h gt lt p gt paragraph lt p gt lt div gt lt div gt lt body gt outer div color green inner div color red p coor blue color var color blu You can see here that we are trying to make our p element to have a color of blue but because we did not declare the variable and also misspelled the fallback value it then inherits the red color from it s parent inner div If you were to comment out the inner div color the paragraph would then be a color of green gotten from the outer div and if you were to comment that out again the paragraph would now have a color of black which is the default color it would inherit from the body But mind you if you were to give the body a color of orange the paragraph would be an orange color instead of black It s all about inheritance Let s give another example of this InheritanceThe CSS variables of an element can be inherited by its children if the children do not have their own stylings or custom properties applied to them Or in the case of the example above have a spelling error These children would in the end inherit the style property of it s parent lt div class one gt lt div class two gt lt div class three gt lt div gt lt div class four gt lt div gt lt div gt lt div gt two test px font size var test three test em font size var test From the example above the class two element gets a font size of px which should be inherited by it s children The class four element gets a font size of px which it has inherited from its parent class two element But the class three element on the other hand gets a font size of em because the value of the declared variable has now been changed within the child element SpecificityThe same way specificity works in CSS is how it works with variables Take for example you declare a variable color twice in the same selector firstly as red then secondly as green and then you call the variable in your p element Which color do you think the p element would be div color red color green p color var color If you guessed green then you are right The browser while going through the code would first save the variable as red then when it sees that the variable is again declared a second time with another value it then resaves the value to green When it then finds a call for it in our case the p element it then gives it a color of green And from the example given in Inheritance above you can see that the CSS variable declared in the child element takes precedence over the same CSS variable that was declared in its parent element ValidityIn an instance where the value of a CSS variable is not a valid value for the property of the element it is being called in it either inherits a new value or has its initial value used Lemme further explain this A CSS variable initially when declared would have it s value said to be valid Here the browser has not found any need for it to be used in any element yet so it would have no choice than to call it valid and store it as a valid value for CSS variable But when it gets to an element where it is to be used i e being declared and finds out that the value being given by the variable is not a value that is acceptable as a property value that value then becomes invalid thus making the variable invalid This does not mean that the declaration of the variable in itself is invalid but in the instance where the browser tried to use it and failed it becomes invalid only in that element property and in any other whose element property cannot use the value And in that instance the browser would then look into it s parent element to find a value to use or in the end use its initial value It wouldn t even bother looking for a fallback value Lemme explain with an example lt div gt lt p class p gt This paragraph inherits the color green lt p gt lt p class p gt This paragraph is blue lt p gt lt div gt root font size px div color green p color blue p color var font size blue font size var font size The browser first stores the font size as a valid value of px Then it gives all the paragraphs a color of blue as declared in the p selector It then moves to the p element with a class of p and sees that the variable it has stored is being called and then tries to use it What is expected is that the browser takes the value of our CSS variable font size and substitutes it in our p element but since px is not a valid property value for color the value becomes invalid because it doesn t make sense to the browser The browser then handles this situation in two ways It checks if the property color is inheritable Seeing that it is it then looks for a parent element in this case the div element and finds that there is a color property value the p element can inherit So now the paragraph gets a color of green In the case whereby the element does not have a parent element or it s parent element does not have a property value it can inherit the browser then sets the value back to its default initial value i e black ignoring the fallback value But if you had written color px instead of color var font size then the browser would have viewed that as a syntax error and the previous declaration of color blue on the p element will then be used Now remember that we also used that same variable as a value for the font size for the same element Do you think that the font size of our p element would change or not Yes it would This is because the px value of our CSS variable is now a valid value of the font size property As you can see the variable was only invalid when we tried to use it as a value for our color but then became valid once more when we used it as a value for our font size And that s basically everything you need to know about CSS variables Let s do a quick recap RecapCSS variables help you to create custom CSS styles that can be reused continuously throughout your document or website They can either be globally scoped or locally scoped To use a CSS variable you have to declare the variable in a selector which is usually in the root and then call the variable in the element s you wish to use it in A fallback value is a property value that is to be used if for any reason the CSS variable cannot be accessed and used by the browser Css variables of an element can be inherited by it s children A variable can become invalid if its value is not a property of the style that is being applied The property either then inherits the value of it s parent element or goes back to its initial value when the value of the CSS variable becomes invalid And that wraps it up on the magic that is CSS variables I hope you found it insightful and enjoyed reading it I would be reading your comments down below Till next time guys Byeee Connect with me onTwitter timonwa LinkedIn pelumi Akintokun If you like my notes and would like to support me you can buy me coffee I love the taste of coffee |
2021-11-09 08:29:09 |
海外TECH |
DEV Community |
There are total 3 type of subjects each of them again have unique characteristics. lets try to to understand each of them. |
https://dev.to/sultanularefin/there-are-total-3-type-of-subjects-each-of-them-again-have-unique-characteristics-lets-try-to-to-understand-each-of-them-4aem
|
There are total type of subjects each of them again have unique characteristics lets try to to understand each of them Observable and subject both are observable s means an observer can track them but both of them have some unique characteristics Further there are total type of subjects each of them again have unique characteristics lets try to to understand each of them ObservablesThey are cold Code gets executed when they have at least a single observer Creates copy of data Observable creates copy of data for each observer Uni directional Observer can not assign value to observable origin master SubjectThey are hot code gets executed and value gets broadcast even if there is no observer Shares data Same data get shared between all observers bi directional Observer can assign value to observable origin master If are using using subject then you miss all the values that are broadcast before creation of observer So here comes Replay SubjectReplaySubjectThey are hot code gets executed and value get broadcast even if there is no observer Shares data Same data get shared between all observers bi directional Observer can assign value to observable origin master plusReplay the message stream No matter when you subscribe the replay subject you will receive all the broadcasted messages In subject and replay subject you can not set the initial value to observable So here comes Behavioral SubjectBehaviorSubjectThey are hot code gets executed and value get broadcast even if there is no observer Shares data Same data get shared between all observers bi directional Observer can assign value to observable origin master plusReplay the message stream No matter when you subscribe the replay subject you will receive all the broadcasted messages You can set initial value You can initialize the observable with default value |
2021-11-09 08:23:53 |
海外TECH |
DEV Community |
The Complete CSS Tags Reference - CSS Cheatsheet |
https://dev.to/snowbit/the-complete-css-tags-reference-css-cheatsheet-kh3
|
The Complete CSS Tags Reference CSS CheatsheetIf you are using CSS for frontend web development you may be interested in this article The gist of the article is that you will be able to know all major CSS tags their properties and their values Texttext align container text align justify left Aligns the text to the leftright Aligns the text to the rightcenter Centers the textjustify Stretches the lines so that each line has equal width like in newspapers initial Sets this property to its default value text decorationh text decoration overline h text decoration line through h text decoration underline h text decoration underline overline text transform container text transform uppercase lowercase capitalize none No capitalizationcapitalize Transforms the first character of each word to uppercaseuppercase All characters transform to uppercaselowercase All characters transform to lowercasetext indent container text indent cm word spacing container word spacing em Background Tagsbackground image container background image url Path background position container background position right top bottom left background size container background size cover auto Default value The background image is displayed in its original sizelength Sets the width and height of the background image The first value sets the width the second value sets the height If only one value is given the second is set to auto Read about length unitspercentage Sets the width and height of the background image in percent of the parent element The first value sets the width the second value sets the height If only one value is given the second is set to auto cover Resize the background image to cover the entire container even if it has to stretch the image or cut a little bit off one of the edges contain Resize the background image to make sure the image is fully visible Source of information of parameters provided by WSchools background repeatThe background repeat property sets how the background image should be repeated container background repeat repeat repeat x repeat y no repeat initial inherit background attachementThe background attachment property sets if an image scrolls with the the page or fixed container background attachment scroll fixed local initial inherit background color container background color white background container background color image repeat attachment position Border border width container border width px border stylep dotted border style dotted p dashed border style dashed p solid border style solid p double border style double p groove border style groove p ridge border style ridge p inset border style inset p outset border style outset p none border style none p hidden border style hidden p mix border style dotted dashed solid double dotted Defines a dotted borderdashed Defines a dashed bordersolid Defines a solid borderdouble Defines a double bordergroove Defines a D grooved border The effect depends on the border color valueridge Defines a D ridged border The effect depends on the border color valueinset Defines a D inset border The effect depends on the border color valueoutset Defines a D outset border The effect depends on the border color valuenone Defines no borderhidden Defines a hidden borderborder color container border color aqua border radius container border radius px Box modelfloat container float none clear container clear both display container display block flex inline height container height fit content width container width auto margin container margin top right bottom left padding container padding top right bottom left overflow container overflow hidden visibility container visibility visible Colorscolor container color black opacity container opacity Layoutbox align container box align start box direction container box direction normal box flex container box flex normal box flex group container box flex group box orient container box orient inline box pack container box pack initial box sizing container box sizing border box max width container max width px min width container min width px max height container max height px min height container min height vh Animationsanimation name container animation name helloworld animation duration container animation duration s animation timing function container animation timing function ease in animation delay container animation delay ms animation direction container animation direction normal animation iteration countanimation iteration count property defines the number of times an animation should be played container animation iteration count animation play state container animation play state running animation fill mode container animation fill mode forwards Transitiontransition property container transition property none transition duration container transition duration s transition delay container transition delay ms Listlist style type container list style type none list style position container list style position px list style image container list style image url Flexorder container order flex grow container flex grow flex basis container flex basis auto flex shrink container flex shrink Gridjustify content container justify content start end center stretch space around space between align content container align content start end center stretch space around space between align items container align items start end center stretch justify items container justify items start end center stretch justify self container justify self start end center stretch align self container justify self start end center stretch place self container place self start end center stretch |
2021-11-09 08:22:57 |
海外TECH |
DEV Community |
A Git Cheat Sheet |
https://dev.to/baransel/a-git-cheat-sheet-4mab
|
A Git Cheat Sheet IntroWhen it comes to version control systems there are few software that can beat GIT in performance and relevance GIT was developed by Linus Torvalds in and today millions of companies use it for efficient code management and version control of their projects Open source software is available for download for Linux Windows Solaris and Mac platforms GIT Commands git configOne of the most used git commands email username and file format etc git config which can be used to set user specific configuration values such as the preferred algorithm for example the following command can be used to set up email git config global user email root baransel dev git initThis command is used to create a new GIT directory Sample git init git addThe git add command can be used to add files to the directory For example the following command will index a file named README md located in the local directory git add README md git cloneThe git clone command is used for directory checking purposes If the directory is located on a remote server use git clone baransel path to repository git commitThe git commit command is used to commit changes to the head Note that not all committed changes will go to the remote directory Example git commit m Message related to commit git statusThe git status command displays a list of files that have not yet been added or that have been changed along with the committed files Example git status git pushgit push is another of the most used basic GIT commands With a simple push it pushes the changes made to the master branch of the remote directory associated with the working directory Example git push origin master git checkoutContinue this post on my blog A Git Cheat Sheet |
2021-11-09 08:11:49 |
海外TECH |
Engadget |
Roland replicates more classic synths with the JD-08 and JX-08 sound modules |
https://www.engadget.com/roland-replicates-more-classic-synths-with-the-jd-08-and-jx-8-sound-modules-080042484.html?src=rss
|
Roland replicates more classic synths with the JD and JX sound modulesRoland is again diving into its past with the JX and JD Sound Modules emulating the vintage analog JX P and digital JD synths from the s and s respectively Both reproduce the sounds of those classic synths digitally while adding new effects and patches tuned for contemporary styles Roland s JX P came out in as one of the company s last analog synthesizers It married analog synthesis with digital control offering quot warm pads shimmery chorus and crystalline textures into the most popular songs of the era quot Roland said The JX recreates those sounds with new effects and a polyphoric sequencer nbsp RolandIt features expanded polyphony two part multitimbral capability and dual split modes along with presets from the original hardware and over new patches more in line with modern needs Plus it s available with a panel derived from the synth s companion PG programmer unit for the original hardware letting you store creations in preset slots nbsp The JD meanwhile was a digital synth introduced in with a quot control laden panel and aggressively electronic sound palette quot according to Roland The JD recreates that using quot the original JD waveforms quot and advanced modeling techniques IT also adds expanded polyphony a two part polyphonic sequencer and other modern updates nbsp RolandBoth synths are highly portable can run on USB bus power or batteries and include a built in speaker for mobile sound monitoring They also feature a built in USB C audio MIDI interface to connect to computer production systems along with a full sized MIDI I O The JX and JD Sound Modules will arrive in the US in January for each |
2021-11-09 08:00:42 |
海外TECH |
CodeProject Latest Articles |
Split grapheme in C# |
https://www.codeproject.com/Tips/5317106/Split-grapheme-in-Csharp
|
automatic |
2021-11-09 08:28:00 |
海外科学 |
NYT > Science |
When Kilauea Erupted, a New Volcanic Playbook Was Written |
https://www.nytimes.com/2021/11/09/science/kilauea-volcano-eruption.html
|
When Kilauea Erupted a New Volcanic Playbook Was WrittenScientists learned lessons from the outburst on the island of Hawaii that are changing how responders prepare for eruptions in other places |
2021-11-09 08:49:12 |
海外科学 |
BBC News - Science & Environment |
COP26: Focus on gender as giant puppet takes centre stage |
https://www.bbc.co.uk/news/uk-59209610?at_medium=RSS&at_campaign=KARANGA
|
centre |
2021-11-09 08:44:46 |
金融 |
ニッセイ基礎研究所 |
景気ウォッチャー調査(21年10月)~感染者数減少と緊急事態宣言の解除などで、景況感が大幅改善 |
https://www.nli-research.co.jp/topics_detail1/id=69290?site=nli
|
なお、企業動向関連も上昇しているものの、回答者のコメントからは、半導体不足をはじめとした製造部品の不足や部品・原材料の価格高騰を懸念する意見が多々みられた。 |
2021-11-09 17:38:27 |
ニュース |
BBC News - Home |
Covid-19: Vaccines to be compulsory for frontline NHS staff in England |
https://www.bbc.co.uk/news/health-59215282?at_medium=RSS&at_campaign=KARANGA
|
frontline |
2021-11-09 08:12:07 |
ニュース |
BBC News - Home |
COP26: Focus on gender as giant puppet takes centre stage |
https://www.bbc.co.uk/news/uk-59209610?at_medium=RSS&at_campaign=KARANGA
|
centre |
2021-11-09 08:44:46 |
ニュース |
BBC News - Home |
Rolls-Royce gets funding to develop mini nuclear reactors |
https://www.bbc.co.uk/news/business-59212983?at_medium=RSS&at_campaign=KARANGA
|
reactors |
2021-11-09 08:44:18 |
ニュース |
BBC News - Home |
Caerphilly: Boy, 10, dies after dog attack |
https://www.bbc.co.uk/news/uk-wales-59215417?at_medium=RSS&at_campaign=KARANGA
|
attackthe |
2021-11-09 08:55:09 |
ニュース |
BBC News - Home |
Fight Talk: Saul 'Canelo' Alvarez makes history - what's next? |
https://www.bbc.co.uk/sport/boxing/59169284?at_medium=RSS&at_campaign=KARANGA
|
Fight Talk Saul x Canelo x Alvarez makes history what x s next Boxing reacts to Saul Canelo Alvarez becoming undisputed super middleweight champion but what s next for the Mexican Plus more in this week s Fight Talk |
2021-11-09 08:04:19 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
光ビジネスフォーム(3948)、「増配」を発表して、 配当利回り5.3%に! 年間配当額は1年で21%増加、 2021年12月期は前期比5円増の「1株あたり28円」に! - 配当【増配・減配】最新ニュース! |
https://diamond.jp/articles/-/287108
|
|
2021-11-09 17:15:00 |
ビジネス |
不景気.com |
小倉クラッチの22年3月期は10億円の最終赤字へ、環境悪化 - 不景気.com |
https://www.fukeiki.com/2021/11/ogura-clutch-2022-loss.html
|
小倉クラッチ |
2021-11-09 08:11:15 |
GCP |
Google Cloud Platform Japan 公式ブログ |
Visby のビジョンと専門知識で、3D の世界をさらに鮮やかに |
https://cloud.google.com/blog/ja/topics/startups/powering-arvr-with-google-cloud/
|
GoogleCloudを使うことで、データの処理や動画のレンダリングが倍高速化できました。 |
2021-11-09 10:00:00 |
北海道 |
北海道新聞 |
東京で30人感染、1人死亡 新型コロナ |
https://www.hokkaido-np.co.jp/article/609677/
|
新型コロナウイルス |
2021-11-09 17:19:00 |
北海道 |
北海道新聞 |
コメ作況「平年並み」維持 農水省、全国平均101 |
https://www.hokkaido-np.co.jp/article/609665/
|
作況指数 |
2021-11-09 17:06:00 |
北海道 |
北海道新聞 |
札幌市、乳児用液体ミルク備蓄へ 年度内に300缶 賞味期限1年半 |
https://www.hokkaido-np.co.jp/article/609383/
|
乳児用液体ミルク |
2021-11-09 17:18:08 |
ビジネス |
東洋経済オンライン |
文系も理系に負けずAI活用してほしい訳【動画】 理系AI人材が行わないすべての仕事をどうするか | ワークスタイル | 東洋経済オンライン |
https://toyokeizai.net/articles/-/467369?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
日本企業 |
2021-11-09 18:00:00 |
IT |
週刊アスキー |
今年は3つのクルーズから選べる!「よこはま運河チャレンジ2021」11月21日と12月4日に開催 |
https://weekly.ascii.jp/elem/000/004/074/4074600/
|
運河 |
2021-11-09 17:30:00 |
IT |
週刊アスキー |
『ドラクエタクト』にて本日より「ダイの大冒険」コラボイベントが開催!いまなら毎日「ジェム1000個」プレゼント |
https://weekly.ascii.jp/elem/000/004/074/4074601/
|
開催 |
2021-11-09 17:30:00 |
IT |
週刊アスキー |
第1章は「岩井の胡麻油」! 横浜中華街の「招福門」と老舗食品メーカーとのコラボフェア「ハマッ子レガシー物語」を開始 |
https://weekly.ascii.jp/elem/000/004/074/4074595/
|
横浜中華街 |
2021-11-09 17:10:00 |
IT |
週刊アスキー |
次世代IoTスタートアップだからこそわかった、知財戦略の重要性とは【11/19無料配信セッション】 |
https://weekly.ascii.jp/elem/000/004/074/4074461/
|
次世代IoTスタートアップだからこそわかった、知財戦略の重要性とは【無料配信セッション】アスキーは年月日金、IoTやハードウェア製品をはじめ、AIやクラウド、ネットワーク関連など、モノと通信に関わる事業者すべてに向けたビジネスカンファレンスイベント「IoTHWBIZDAY」をオンラインにて開催。 |
2021-11-09 17:05:00 |
マーケティング |
AdverTimes |
何もしないで終わってしまった日々も肯定したい。 コロナ禍で生まれた新曲『ミラノサンドA』(ゲスト:xiangyu)【後編】 |
https://www.advertimes.com/20211109/article368032/
|
xiangyu |
2021-11-09 08:19:28 |
GCP |
Cloud Blog JA |
Visby のビジョンと専門知識で、3D の世界をさらに鮮やかに |
https://cloud.google.com/blog/ja/topics/startups/powering-arvr-with-google-cloud/
|
GoogleCloudを使うことで、データの処理や動画のレンダリングが倍高速化できました。 |
2021-11-09 10:00:00 |
コメント
コメントを投稿