This file contains hidden or 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
| public String getAbsolutePath(Uri uri) { | |
| String[] projection = { MediaStore.MediaColumns.DATA }; | |
| @SuppressWarnings("deprecation") | |
| Cursor cursor = managedQuery(uri, projection, null, null, null); | |
| if (cursor != null) { | |
| int column_index = cursor.getColumnIndexOrThrow(MediaStore.MediaColumns.DATA); | |
| cursor.moveToFirst(); | |
| return cursor.getString(column_index); | |
| } else | |
| return null; |
This file contains hidden or 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
| <!-- Base application theme. --> | |
| <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
| <item name="android:actionBarStyle">@style/ActionBar</item> | |
| <item name="actionBarStyle">@style/ActionBar</item> | |
| </style> | |
| <!-- Actionbar Theme --> | |
| <style name="ActionBar" parent="Widget.AppCompat.Light.ActionBar.Solid.Inverse"> | |
| <item name="android:background">@color/verde_header</item> | |
| <item name="background">@color/verde_header</item> | |
| </style> |
This file contains hidden or 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
| chown -R apache:apache <dir> | |
| chmod -R 755 <dir> | |
| chcon -R -t httpd_sys_rw_content_t <dir> |
This file contains hidden or 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
| <?php | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/editorjs@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/header@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/paragraph@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/image@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/link@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/embed@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/personality@latest' ); | |
| $this->registerJsFile( 'https://cdn.jsdelivr.net/npm/@editorjs/table@latest' ); |
This file contains hidden or 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 { useState } from 'react' | |
| const useApi = (apiFunction: any) => { | |
| const [data, setData] = useState() | |
| const [error, setError] = useState(false) | |
| const [loading, setLoading] = useState(false) | |
| const request = async (...args: any[]) => { | |
| try { |
This file contains hidden or 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
| export function memorySizeOf(obj) { | |
| var bytes = 0 | |
| function sizeOf(obj) { | |
| if (obj !== null && obj !== undefined) { | |
| switch (typeof obj) { | |
| case 'number': | |
| bytes += 8 | |
| break | |
| case 'string': |
OlderNewer