soniya.rayabagi
Sun Oct 29 2023
models
generating a model and migration , running a migration, CRUD records in the database different ways.
ayushsrivastava
Sat Oct 28 2023
Critical Rendering Path
In each HTTP request that browser makes for an HTML page, the server returns the data into bytes, these bytes are then converted to Characters, Tokens, Nodes, and finally DOM (Document Object Model).
Once the DOM is generated, the parsing of the page starts, the HTML contains CSS code or links, JavaScript code or links, media elements such as images, etc, each of them is then parsed separately and plugged together to create a render tree, which is then converted to the layout and then is painted on the screen at the refresh rate of 60 frames per second.
This complete process is called a critical rendering path. Optimizing the critical rendering path helps to load the web page faster and without glitches or janks.
soniya.rayabagi
Thu Oct 26 2023
views-and-controllers
all the major stages a request goes through when it enters a Rails app. Like adding route to handle requests , generating controller , worked on first view template .
soniya.rayabagi
Thu Oct 26 2023
rm -rf .git
by running this command you are essentially deleting the entire Git repository, including all the commit history, configuration files, and any other Git-related data, from the current directory as it permanently removes the Git version control .
satya
Wed Oct 25 2023
In fly if your machine has stopped , we can restart the machine by redeploying the app.
syedsibtain
Tue Oct 24 2023
Dart has three types of variables, var
, final
and const
var
is used for dynamic typing, allowing the type of the variable to be inferred at runtime.final
is used to declare a variable that can only be assigned once. It must be initialised when declared, and its value cannot change.const
is used to declare a compile-time constant. It must be initialised with a constant value, and its value cannot change.
ashwanikumarjha
Mon Oct 23 2023
In TypeScript, type annotations are removed when transpiling to JavaScript. This make us believe that type information is lost in JavaScript runtime. However, TypeScript offers a compiler option called emitDecoratorMetadata
that, when enabled, emits metadata about the types used in our code. This metadata is accessible at runtime using reflect-metadata
library.
Libraries like class-transformer
and class-validator
leverage this metadata to transform plain JavaScript objects into instances of specific classes and validate them against certain rules. Even though TypeScript types don't exist at runtime, the information about those types does, this provide us a more structured and safe way of working with data in JavaScript.
iffyuva
Mon Oct 23 2023
One liner for adding a delay in Typescript: await new Promise((r) => setTimeout(r, 2000));
sujay
Sat Oct 21 2023
Difference between const and final in Dart
• Even though both const
and final
cannot be reassigned, there is a subtle difference between them.
• const
variables are used for compile-time constants whereas final
variables are used for run-time constants.
const name = 'Rahul' // DO it as the value is known at compile time```
• When reading from database or reading from a file, the values won't be known at compile time. Use `final` in such cases
soniya.rayabagi
Fri Oct 20 2023
figured out how we can use gitignore
to add the .DS_STORE files into it by deleting the ds.store file first , and then using echo ".DS_Store" >> .gitignore
to add the .ds_store file.
Showing 4 to 5 of 46 results