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 com.example.myapplication | |
import android.annotation.SuppressLint | |
import android.app.Activity | |
import android.graphics.Matrix | |
import android.graphics.PointF | |
import android.os.Bundle | |
import android.view.ScaleGestureDetector | |
import androidx.core.view.doOnLayout | |
import com.almeros.android.multitouch.MoveGestureDetector |
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 com.example.myapplication | |
import android.annotation.SuppressLint | |
import android.os.Bundle | |
import android.view.ScaleGestureDetector | |
import androidx.appcompat.app.AppCompatActivity | |
import com.example.myapplication.databinding.ActivityMainBinding | |
@SuppressLint("ClickableViewAccessibility") | |
class MainActivity : AppCompatActivity() { |
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 from 'react' | |
import { Text, TextProps } from 'react-native' | |
// The "hook" way. | |
// The `React.PropsWithChildren` type adds the `children` property to the `TextProps` type. | |
const AppText1 = ({ children, style, ...rest }: React.PropsWithChildren<TextProps>) => ( | |
<Text style={[{ fontFamily: 'monospace' }, style]} {...rest}> | |
{children} | |
</Text> | |
) |
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
```bash | |
# open the mysql terminal | |
sudo mysql -u root | |
``` | |
```text | |
use mysql; | |
SELECT User, Host, plugin, authentication_string FROM user; | |
UPDATE user SET plugin='mysql_native_password', authentication_string=PASSWORD('123456') WHERE User='root'; | |
FLUSH PRIVILEGES; |
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
Options -Indexes | |
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin http://DOMAIN-NAME.com:PORT | |
Header set Access-Control-Allow-Credentials true | |
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" | |
Header add Access-Control-Allow-Headers: "Content-Type" | |
Header add Access-Control-Allow-Headers: "Authorization" | |
</IfModule> |
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
Show hidden characters
{ | |
"rulesDirectory": [ | |
"node_modules/codelyzer" | |
], | |
"rules": { | |
"arrow-return-shorthand": true, | |
"callable-types": true, | |
"class-name": true, | |
"comment-format": [ | |
true, |
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
options: | |
formatter: stylish | |
files: | |
include: '**/*.s+(a|c)ss' | |
rules: | |
# Extends | |
extends-before-mixins: 1 | |
extends-before-declarations: 1 | |
placeholder-in-extend: 1 |
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
## File: | |
# /etc/apache2/sites-available/myproject.localhost.conf | |
## Enables a virtual host | |
# a2ensite myproject.localhost.conf | |
## Disables a virtual host | |
# a2dissite myproject.localhost.conf | |
## reloads Apache2 |
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
interface Point { | |
readonly x: number; | |
readonly y: number; | |
} | |
/** | |
* This function returns the intersection between the line AB | |
* and the perpendicular line that contains the point C. | |
*/ | |
function intersection(a: Point, b: Point, c: Point): Point { |
NewerOlder