// Unit testing react-router
// pay attention to write it at your test file top level
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom') as any,
useNavigate: () => mockedUsedNavigate,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from 'react' | |
const useLocation = () => { | |
const initialState = { | |
latitude: '', | |
longitude: '', | |
error: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYSQL_ROOT_PASSWORD=traccar | |
MYSQL_ROOT_HOST='%' | |
MYSQL_DATABASE=traccar | |
MYSQL_USER=traccar | |
MYSQL_PASSWORD=traccar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package client.websocket.adapter.parent; | |
import com.google.gwt.user.client.Window; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
import org.springframework.messaging.simp.stomp.StompCommand; | |
import org.springframework.messaging.simp.stomp.StompHeaders; | |
import org.springframework.messaging.simp.stomp.StompSession; | |
import org.springframework.messaging.simp.stomp.StompSessionHandlerAdapter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package your.pkg; | |
import io.r2dbc.postgresql.PostgresqlConnectionConfiguration; | |
import io.r2dbc.postgresql.PostgresqlConnectionFactory; | |
import io.r2dbc.spi.ConnectionFactory; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.PropertySource; | |
import org.springframework.data.r2dbc.config.AbstractR2dbcConfiguration; | |
import org.springframework.data.r2dbc.core.DefaultReactiveDataAccessStrategy; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- https://stackoverflow.com/questions/20801874/how-to-build-an-executable-jar-from-multi-module-maven-project/20802018#20802018 --> | |
<!-- https://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven?page=1&tab=votes#tab-top --> | |
<build> | |
<plugins> | |
<!-- mvn package --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<version>3.2.4</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================== | |
ODOO building blocs | |
============== | |
I expose Odoo 14 models structure here. Have a look to reference for further informations. | |
1. Models: represents a business object | |
They are built around three main base ORM classes BaseModel, AbstractModel and Model | |
Models are not directly accessible; one should use recordsets to do so. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.item1 { grid-area: header; } | |
.item2 { grid-area: sidebar; } | |
.item3 { grid-area: main; } | |
.item4 { grid-area: aside; } | |
.item5 { grid-area: footer; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Every browser is backed by a rendering engine to draw the HTML/CSS web page. | |
- Firefox → Gecko | |
- Safari → WebKit | |
- Chrome → Blink (a fork of Webkit). | |
- Opera → Blink (no longer uses Presto since Feb 2013) | |
- IE → Trident (discontinued) | |
- Edge → EdgeHTML (clean-up fork of Trident) (Edge switched to Blink in 2019) | |
css prefixes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Flexbox layout is most appropriate to the components of an application, and small-scale layouts, | |
while the Grid layout is intended for larger scale layouts. | |
The main idea behind the flex layout is to give the container the ability to alter its items’ width & height (and order) | |
to best fill the available space. | |
shorthand properties: | |
- flex: [flex-grow] [flex-shrink] [flex-basis]; | |
- flex-flow: [flex-direction] [flex-wrap] | |
References: |
NewerOlder