1605201120
include common Utils and Widgets
get app info, like: label, packageName, versionName, versionCode
Use shared_preferences for lightweight data access
Author: wiatec
Source Code: https://github.com/wiatec/flutter_common
#flutter #dart #mobile-apps
1599768240
Javascript string includes() is an inbuilt function that determines whether one string may be found within another string, returning true or false as appropriate. With ES6 JavaScript added the includes method natively to both the Array and String natives. While true or false may provide the answer you need, regular expressions can check if a substring exists with a more detailed answer.
The string includes() method lets you determine whether or not a string includes another string. See the following syntax.
str.includes(searchString)
It has only one required parameter which is searchString. It is the substring, which we need to search in the String. See the following example.
// app.js
strA = 'Hello World, Welcome to ES9';
console.log(strA.includes('ES9'));
In the above example, we are checking if the ES9 substring is there inside the strA and if yes then it will return true. In the above example, it is there, so we will see the output true.
#javascript #includes* #string.prototype.includes #js
1605201120
include common Utils and Widgets
get app info, like: label, packageName, versionName, versionCode
Use shared_preferences for lightweight data access
Author: wiatec
Source Code: https://github.com/wiatec/flutter_common
#flutter #dart #mobile-apps
1597773960
NLP Models have shown tremendous advancements in syntactic, semantic and linguistic knowledge for downstream tasks. However, that raises an interesting research question — is it possible for them to go beyond pattern recognition and apply common sense for word-sense disambiguation?
Thus, to identify if BERT, a large pre-trained NLP model developed by Google, can solve common sense tasks, researchers took a closer look. The researchers from Westlake University and Fudan University, in collaboration with Microsoft Research Asia, discovered how the model computes the structured, common sense knowledge for downstream NLP tasks.
According to the researchers, it has been a long-standing debate as to whether pre-trained language models can solve tasks leveraging only a few shallow clues and their common sense of knowledge. To figure that out, researchers used a CommonsenseQA dataset for BERT to solve multiple-choice problems.
#opinions #ai common sense #bert #bert model #common sense #nlp model #nlp models
1624422526
Declarative UI in Flutter is pretty nice, easy to use and it is very enticing to use it as much as possible. But very often developers just go overboard with it — writing everything in a declarative style even when sometimes task can be done much more efficiently and easier to understand in a more imperative way.
What everyone should understand — there always must be a balance between declarative and imperative programming. Each has its own uses and each shines at some tasks brighter than other.
In this series of articles I’ll describe how to solve different problems by creating custom Widgets from scratch. Each one is a little more complicated than a previous one.
There some basic things we need to know before looking at the code.
Widget
— is just an immutable (preferably const) class that contains configuration properties for Elements
and RenderObjects
. It is also responsible for creating said Elements
and RenderObjects
. Important thing to understand — Widgets never contain state nor any business logic, only pass them.
Element
— is an entity responsible for the actual UI tree. It has references to all children and (unlike Widget
) to its parent. Elements
are reused most of the time, unless key
or Widget
are changed. So if onlyWidget
properties are changed, even though new Widget
is allocated, Element
will remain the same.
State
— is nothing more than a user-defined class inside Element
that also has some callbacks from itsElement
exposed.
#custom-widget #ellipsis #flutter #widget
1626913620
In this video I have discussed about Scaffold widget and its different properties.
It is a widget which implements the basic material design structure for the flutter app.
#flutter #exploring flutter widgets #flutter scaffold widget #its properties