There are several ways to #format your code in #IntelliJ IDEA:
1. Reformatting a Selection (Shortcut: Ctrl+Alt+L (Windows/Linux), ⌘⌥L (macOS))
Highlight the specific section of code you want to reformat.
Press Ctrl + Alt + L (Windows/Linux) or ⌘ + ⌥ + L (macOS).
This will reformat the selected code according to your configured code style settings.
2. Reformatting the Entire File (Shortcut: Ctrl+Alt+Shift+L (Windows/Linux), ⌘⌥⇧L (macOS))
Open the file you want to reformat.
Press Ctrl + Alt + Shift + L (Windows/Linux) or ⌘ + ⌥ + ⇧ + L (macOS).
This will display a dialog where you can choose formatting options (e.g., reformat only changed lines) before applying the formatting to the entire file.
1. Reformatting a Selection (Shortcut: Ctrl+Alt+L (Windows/Linux), ⌘⌥L (macOS))
Highlight the specific section of code you want to reformat.
Press Ctrl + Alt + L (Windows/Linux) or ⌘ + ⌥ + L (macOS).
This will reformat the selected code according to your configured code style settings.
2. Reformatting the Entire File (Shortcut: Ctrl+Alt+Shift+L (Windows/Linux), ⌘⌥⇧L (macOS))
Open the file you want to reformat.
Press Ctrl + Alt + Shift + L (Windows/Linux) or ⌘ + ⌥ + ⇧ + L (macOS).
This will display a dialog where you can choose formatting options (e.g., reformat only changed lines) before applying the formatting to the entire file.
For navigating to source of something:
1. Click on the
2. Press Ctrl + Alt + B
#IntelliJ
1. Click on the
Function or ...2. Press Ctrl + Alt + B
#IntelliJ
Build Your Community - Turn your connections into a powerful online community
by Richard Millington
Buzzing Communities - How to Build Bigger, Better, and More Active Online Communities
by Richard Millington
The Art of Community - Building The New Age Of Participation
by Jono Bacon
Getting Together - How to Build a Community With Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto
Find Your People - Building Deep Community in a Lonely World
by Brendan Burchard
The Business of Belonging - How to Make Community your Competitive Advantage
by Jacqueline Hermes
Building Brand Communities - How Organizations Succeed by Creating Belonging
by Carrie Melissa Jones and Charles Vogl
Superfans - The Easy Way to Stand Out, Grow Your Tribe, and Build a Successful Business
by Pat Flynn
Get Together - How to Build a Community with Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto
Community Building on the Web - Secret Strategies for Successful Online Communities
by Amy Jo Kim
People Powered - How Communities Can Supercharge Your Business, Brand, and Teams
by Jono Bacon
Tribes - We Need You to Lead Us
by Seth Godin
#bookmark #book #professional_networking
by Richard Millington
Buzzing Communities - How to Build Bigger, Better, and More Active Online Communities
by Richard Millington
The Art of Community - Building The New Age Of Participation
by Jono Bacon
Getting Together - How to Build a Community With Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto
Find Your People - Building Deep Community in a Lonely World
by Brendan Burchard
The Business of Belonging - How to Make Community your Competitive Advantage
by Jacqueline Hermes
Building Brand Communities - How Organizations Succeed by Creating Belonging
by Carrie Melissa Jones and Charles Vogl
Superfans - The Easy Way to Stand Out, Grow Your Tribe, and Build a Successful Business
by Pat Flynn
Get Together - How to Build a Community with Your People
by Bailey Richardson, Kevin Huynh, and Kai Elmer Sotto
Community Building on the Web - Secret Strategies for Successful Online Communities
by Amy Jo Kim
People Powered - How Communities Can Supercharge Your Business, Brand, and Teams
by Jono Bacon
Tribes - We Need You to Lead Us
by Seth Godin
#bookmark #book #professional_networking
#mui #media_query #responsive
Using `@mui/system`'s `styled` Component:
Employing `theme.breakpoints`:
Leveraging `useMediaQuery` Hook:
Using `@mui/system`'s `styled` Component:
import { styled } from '@mui/system';
const MyComponent = styled('div')(({ theme }) => ({
width: '100%',
[theme.breakpoints.up('md')]: {
width: '50%',
},
}));
Employing `theme.breakpoints`:
import { useTheme } from '@mui/material/styles';
function MyComponent() {
const theme = useTheme();
const styles = {
container: {
width: '100%',
[theme.breakpoints.up('md')]: {
width: '50%',
},
},
};
return <div style={styles.container}>...</div>;
}
Leveraging `useMediaQuery` Hook:
import { useMediaQuery } from '@mui/material';
function MyComponent() {
const matches = useMediaQuery('(min-width:600px)');
return <div>{matches ? 'Large screen' : 'Small screen'}</div>;
}
Forwarded from Yasin Gorgij
Let's Go Further - 2021.pdf
7.7 MB
1. Meta Engineering
https://lnkd.in/g_JFiycC
2. AWS Architecture
https://lnkd.in/gcqi__Fc
3. Microsoft Engineering
https://lnkd.in/gyqAdgn6
4. Nextflix Tech
https://lnkd.in/gmq77fx8
5. LinkedIn Engineering
https://lnkd.in/gakkkcqD
6. Uber Engineering
https://eng.uber.com/
7. Engineering at Quora
https://lnkd.in/gDTNwika
8. Pinterest Engineering
https://lnkd.in/gGN2U4mn
9. Lyft Engineering Blog
https://eng.lyft.com/
10. Twitter Engineering Blog
https://lnkd.in/gcAATsep
11. Dropbox Engineering Blog
https://dropbox.tech/
12. Spotify Engineering
https://lnkd.in/gChsMWjz
13. Github Engineering
https://lnkd.in/gjVgXwVe
14. Instagram Engineering
https://lnkd.in/ggdgMZUV
15. Canva Engineering Blog
https://canvatechblog.com/
16. Etsy Engineering
https://lnkd.in/gxRFMuSs
17. Airbnb Tech
https://lnkd.in/g9R5CGpw
18. Stripe Engineering
https://lnkd.in/gAEDy5yU
19. Ebay Tech Blog
https://tech.ebayinc.com/
20. Hubspot Product and Engineering
https://lnkd.in/gamxdcvA
21. OpenAI Blog
https://lnkd.in/gv49pjVd
22. Google Engineering Blog:
https://lnkd.in/g5auvtaA
23. Stack Overflow Blog:
https://lnkd.in/gU9uGEen
#tech #blog #webdev #code
https://lnkd.in/g_JFiycC
2. AWS Architecture
https://lnkd.in/gcqi__Fc
3. Microsoft Engineering
https://lnkd.in/gyqAdgn6
4. Nextflix Tech
https://lnkd.in/gmq77fx8
5. LinkedIn Engineering
https://lnkd.in/gakkkcqD
6. Uber Engineering
https://eng.uber.com/
7. Engineering at Quora
https://lnkd.in/gDTNwika
8. Pinterest Engineering
https://lnkd.in/gGN2U4mn
9. Lyft Engineering Blog
https://eng.lyft.com/
10. Twitter Engineering Blog
https://lnkd.in/gcAATsep
11. Dropbox Engineering Blog
https://dropbox.tech/
12. Spotify Engineering
https://lnkd.in/gChsMWjz
13. Github Engineering
https://lnkd.in/gjVgXwVe
14. Instagram Engineering
https://lnkd.in/ggdgMZUV
15. Canva Engineering Blog
https://canvatechblog.com/
16. Etsy Engineering
https://lnkd.in/gxRFMuSs
17. Airbnb Tech
https://lnkd.in/g9R5CGpw
18. Stripe Engineering
https://lnkd.in/gAEDy5yU
19. Ebay Tech Blog
https://tech.ebayinc.com/
20. Hubspot Product and Engineering
https://lnkd.in/gamxdcvA
21. OpenAI Blog
https://lnkd.in/gv49pjVd
22. Google Engineering Blog:
https://lnkd.in/g5auvtaA
23. Stack Overflow Blog:
https://lnkd.in/gU9uGEen
#tech #blog #webdev #code
To format a USB drive with the Windows_FAT_32 type instead of Windows_NTFS on macOS to support cars
diskutil eraseDisk FAT32 CARUSB MBRFormat /dev/disk2
diskutil eraseDisk FAT32 CARUSB MBRFormat /dev/disk2
Set custom allocation unit/cluster sizes when formatting to write faster on it
sudo newfs_msdos -F 32 -b 32768 -c 8 /dev/disk3s1
sudo newfs_msdos -F 32 -b 32768 -c 8 /dev/disk3s1
Cookies are sent with an HTTPS POST request automatically by the browser under certain conditions. Here’s how it works:
1. Automatic Cookie Sending (Browser Default Behavior)
When a browser sends an HTTPS POST request, it includes cookies that match the domain, path, and security settings of the request’s URL. This includes:
• Session cookies (if they haven’t expired)
• Persistent cookies (if stored)
• SameSite-compliant cookies (depending on their policy)
• HttpOnly cookies (not accessible via JavaScript but still sent by the browser)
Example request headers sent by the browser:
2. How to Ensure Cookies Are Sent
For cookies to be sent with a POST request, they must:
1. Be Set for the Correct Domain & Path
• If a cookie is set for example.com, it will be included in requests to https://example.com/*, but not https://another-site.com/*.
2. Match the Secure and SameSite Policies
• Secure Flag → Cookies marked Secure are only sent over HTTPS.
• SameSite Attribute controls cross-site cookie behavior:
• SameSite=Strict → Sent only for same-origin requests.
• SameSite=Lax → Sent for top-level GET requests, but not POST.
• SameSite=None; Secure → Sent in cross-site requests (e.g., API calls from another domain).
3. Not Be HttpOnly If JavaScript Needs Access
• Cookies with HttpOnly cannot be read or set via JavaScript (document.cookie), but they are still included in requests.
3. Sending Cookies with a JavaScript fetch POST Request
If cookies are not sent automatically (e.g., in fetch or XMLHttpRequest), you need to include credentials: "include".
4. Cross-Origin Requests and Cookies
If you’re sending a request to a different origin (CORS request), the server must:
• Allow credentials by setting:
• Allow the request origin explicitly (wildcards * do not work with credentials):
Would you like an example of setting cookies via a server response?
1. Automatic Cookie Sending (Browser Default Behavior)
When a browser sends an HTTPS POST request, it includes cookies that match the domain, path, and security settings of the request’s URL. This includes:
• Session cookies (if they haven’t expired)
• Persistent cookies (if stored)
• SameSite-compliant cookies (depending on their policy)
• HttpOnly cookies (not accessible via JavaScript but still sent by the browser)
Example request headers sent by the browser:
POST /login HTTP/1.1
Host: example.com
Cookie: session_id=abcdef123456; user_token=xyz987
Content-Type: application/json
Content-Length: 452. How to Ensure Cookies Are Sent
For cookies to be sent with a POST request, they must:
1. Be Set for the Correct Domain & Path
• If a cookie is set for example.com, it will be included in requests to https://example.com/*, but not https://another-site.com/*.
2. Match the Secure and SameSite Policies
• Secure Flag → Cookies marked Secure are only sent over HTTPS.
• SameSite Attribute controls cross-site cookie behavior:
• SameSite=Strict → Sent only for same-origin requests.
• SameSite=Lax → Sent for top-level GET requests, but not POST.
• SameSite=None; Secure → Sent in cross-site requests (e.g., API calls from another domain).
3. Not Be HttpOnly If JavaScript Needs Access
• Cookies with HttpOnly cannot be read or set via JavaScript (document.cookie), but they are still included in requests.
3. Sending Cookies with a JavaScript fetch POST Request
If cookies are not sent automatically (e.g., in fetch or XMLHttpRequest), you need to include credentials: "include".
fetch("https://example.com/api", {
method: "POST",
credentials: "include", // Ensures cookies are sent
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ username: "user", password: "pass" })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));4. Cross-Origin Requests and Cookies
If you’re sending a request to a different origin (CORS request), the server must:
• Allow credentials by setting:
Access-Control-Allow-Credentials: true• Allow the request origin explicitly (wildcards * do not work with credentials):
Access-Control-Allow-Origin: https://your-frontend.comWould you like an example of setting cookies via a server response?