DEL /Q uservar.ini
for %%i in (*.exe) do (
TaskKill /F /IM %%i /T
RD /S /Q %AppData%\MyMacro
RD /S /Q %AppData%\MyMacro
RD /S /Q %AppData%\MyMacro
)
echo off
分类: 程序
Gradle配置国内镜像
全局配置,对所有项目生效,在~/.gradle/下创建init.gradle文件
allprojects{
repositories {
def ALIYUN_REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public'
def ALIYUN_JCENTER_URL = 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
all { ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if (url.startsWith('https://repo1.maven.org/maven2')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
remove repo
}
if (url.startsWith('https://jcenter.bintray.com/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL."
remove repo
}
}
}
maven {
url ALIYUN_REPOSITORY_URL
url ALIYUN_JCENTER_URL
}
}
}
react native Unknown argument type ‘__attribute__’ in method
找到myproject/node_modules/react-native/React/Base/RCTModuleMethod.mm. 【或者(.m)】文件
修改static BOOL RCTParseUnused 方法如下:
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, “unused”) ||
RCTReadString(input, “__attribute((unused))”) ||
RCTReadString(input, “attribute((unused))”);
}
重新编译
android studio unsupported modules detected
首先是出现如下情况:
unsupported modules detected Compilation is not supported for following modules: app. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project
然后项目正下方一直出现加载:indexing paused due to batch update
自从更新到android studio 3.2之后,首次打开项目出现错误:indexing paused due to batch update(由于批量更新而暂停的索引),个人猜想可能是第一种情况导致的吧。然后网上查找到了一些方法如下:
1、关闭Android Studio ,去项目根目录删除.idea文件,重启AS搞定
2、File -> Invalidate Caches / Restart -> Invalidate Caches & Restart.
3、File -> Sync Project With Gradle Files
当时我试过后面两种不行,第一种就OK。
composer 中文镜像
composer config -g repo.packagist composer https://packagist.laravel-china.org
React Native解决Android的WebView执行injectedJavaScript慢的问题
注入的js代码超行的问题,把js代码压缩成一行就好了。
nodejs的部署方式pm2
pm2 start App.js
pm2 stop App.js
pm2 delete App
pm2 list
laravel 上传图片”stream_socket_sendto(): Broken pipe “
修改php.ini
upload_max_filesize = 2M
改
upload_max_filesize = 10M
mac下改php.ini
/usr/local/etc/php/7.2/php.ini
laravel FileBag
$file = $request->file(‘photo’);
https://laravel.com/docs/5.1/requests#files
php laravel timestamp字段当前时间
chated_at = now();
$table->timestamp(‘chated_at’)->nullable()->comment(‘聊天时间’);
$table->dropColumn(‘chated_at’);