小编S.M*_*ian的帖子

configuration.module有一个未知的属性'loaders'

我输出的错误:

配置对象无效.Webpack已使用与API架构不匹配的配置对象进行初始化. - configuration.module有一个未知的属性'loaders'.这些属性是有效的:object {exprContextCritical?,exprContextRecursive?,exprContextRegExp?,exprContextRequest?,noParse ?, rules?,defaultRules?,unknownContextCritical?,unknownContextRecursive?,unknownContextRegExp?,unknownContextRequest?,unsafeCache?,wrappedContextCritical?,wrappedContextRecursive?,wrappedContextRegExp ?,strictExportPresence?,strictThisContextOnImports?} - >影响正常模块的选项(NormalModuleFactory).

我的webpack.config.js:

var webpack = require('webpack');
var path = require('path');

var BUILD_DIR = path.resolve(__dirname, 'src/client/public');
var APP_DIR = path.resolve(__dirname, 'src/client/app');

var config = {
  entry: APP_DIR + '/index.jsx',
  module : {
    loaders : [
      {
        test : /\.jsx?/,
        include : APP_DIR,
        loader : 'babel-loader'
      }
    ]
  },
  output: {
    path: BUILD_DIR,
    filename: 'bundle.js'
  }

};


module.exports = config;
Run Code Online (Sandbox Code Playgroud)

我的webpack版本:

webpack@4.1.1
Run Code Online (Sandbox Code Playgroud)

reactjs webpack

116
推荐指数
2
解决办法
5万
查看次数

如何检查片段中的权限

我想检查片段内的权限.

我的代码:

        // Here, thisActivity is the current activity
        if (ContextCompat.checkSelfPermission(getActivity(),
                Manifest.permission.ACCESS_FINE_LOCATION)
                != PackageManager.PERMISSION_GRANTED) {


            // Should we show an explanation?
            if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(),
                    android.Manifest.permission.ACCESS_FINE_LOCATION)) {

                // Show an explanation to the user *asynchronously* -- don't block
                // this thread waiting for the user's response! After the user
                // sees the explanation, try again to request the permission.

            } else {

                // No explanation needed, we can request the permission.

                ActivityCompat.requestPermissions(getActivity(),
                        new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},
                        1);



                // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
                // app-defined int …
Run Code Online (Sandbox Code Playgroud)

android android-fragments android-permissions

69
推荐指数
6
解决办法
7万
查看次数

如何在android中创建环形可绘制?

使用此代码我只得到一个边框:

<shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="ring"
    android:innerRadius="15dp"
    android:thickness="2dp"
    android:useLevel="false">
    <solid android:color="#4d4d4d" />

</shape> 
Run Code Online (Sandbox Code Playgroud)

如何制作如下图所示的戒指形状:

在此输入图像描述

android shape

23
推荐指数
3
解决办法
3万
查看次数

如何在android中构建一个梯形?

如何创建如下图像的梯形形状?

在此输入图像描述

我不想使用图像或9.png.

android android-shape

12
推荐指数
2
解决办法
5400
查看次数

调用未定义的函数 Intervention\\Image\\Gd\\imagecreatefromjpeg() - laravel

我收到此错误消息:

Call to undefined function Intervention\\Image\\Gd\\imagecreatefromjpeg()
Run Code Online (Sandbox Code Playgroud)

这是我的 php 信息:

http://behika.com/

我正在使用 laravel 框架(5.6 版)和 php 7.1。

我想上传图片,但出现此错误。

gd
GD Support  enabled
GD Version  bundled (2.1.0 compatible)
GIF Read Support    enabled
GIF Create Support  enabled
PNG Support enabled
libPNG Version  1.6.32
WBMP Support    enabled
XBM Support 
Run Code Online (Sandbox Code Playgroud)

我的商店功能:

public function store(CompanyRequest $request)
{
    $all = $request->except(['category-company', 'flag', 'null', 'file', 'producer-company','manager','address','description','phone']);
    $flag = array_values($request->input('flag'));
    $jsonFlag = json_encode($flag);
    $all['flag'] = $jsonFlag;

    if($request->input('manager')){
        $all['manager']=$request->input('manager');
    }
    if($request->input('address')){
        $all['address']=$request->input('address');
    }
    if($request->input('description')){
        $all['description']=$request->input('description');
    }
    if($request->input('phone')){
        $all['phone']=$request->input('phone');
    }
    $file …
Run Code Online (Sandbox Code Playgroud)

php laravel

11
推荐指数
1
解决办法
6269
查看次数

Android Alarm Manager工作,但延迟了

我想为用户做一个延迟(10分钟),然后用户可以编辑一些东西.

为此,我创建了一个setAlarm函数:

public void setAlarm(Context context,int user,int time) {
   AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
   Intent intent = new Intent(context, sef_time.class);
   intent.putExtra(ONE_TIME, Boolean.FALSE);
   PendingIntent pi = PendingIntent.getBroadcast(context, 0, intent, 0);
   am.set(AlarmManager.RTC, 1000*60*time , pi); 
}
Run Code Online (Sandbox Code Playgroud)

一切正常,但我的报警经理有延迟.例如:

setAlarm(.....,int 10);
Run Code Online (Sandbox Code Playgroud)

它有一个延迟:00:10:03秒或00:10:10 00秒:10:20秒!

我哪里错了?

android alarmmanager

9
推荐指数
2
解决办法
7525
查看次数

如何检查是否在laravel中使用了paginate

我有一个自定义视图和一些功能,我使用paginate和其他功能我不使用paginate.现在我该怎么检查我是否使用过paginate

@if($products->links())

   {{$products->links()}}

@endif // not work 
Run Code Online (Sandbox Code Playgroud)

当然,我知道我可以使用一个变量作为真假来检查它,但有没有任何本机函数来检查它?

pagination laravel laravel-5

9
推荐指数
6
解决办法
7512
查看次数

无效的sdkVersion.有效选项为10.0.0,11.0.0,12.0.0,13.0.0

我想使用这个库:

https://github.com/react-community/create-react-native-app

但我收到此错误消息:

Error: Invalid sdkVersion. Valid options are 10.0.0, 11.0.0, 12.0.0, 13.0.0, 14.0.0, 15.0.0, 16.0.0, 17.0.0, 18.0.0, 19.0.0, 20.0.0, 21.0.0, 22.0.0, 23.0.0, 24.0.0, 25.0.0, 7.0.0, 8.0.0, 9.0.0
Run Code Online (Sandbox Code Playgroud)

我的设备galaxy S4连接到我的mac os,我遵循这个方法:

$ npm install -g create-react-native-app
$ create-react-native-app my-app
$ cd my-app/
$ npm start
Run Code Online (Sandbox Code Playgroud)

在我的屏幕设备上我收到此错误:

something went wrong 

could not load exp://172.20.10.4:19000 network not response timed out
Run Code Online (Sandbox Code Playgroud)

react-native

8
推荐指数
1
解决办法
951
查看次数

如何将高度布局更改为动画(以编程方式)

如何以编程方式将高度布局更改为动画?

第一:

在此输入图像描述

之后:

在此输入图像描述

android android-animation

7
推荐指数
1
解决办法
9850
查看次数

使用Jack编译器时禁用Instant Run

我收到了这条消息gradle:

Instant Run is disabled when Jack compiler is used
Run Code Online (Sandbox Code Playgroud)

我的编译时间太长了.

3:54:11 PM Gradle build finished with 1 warnings(s) in 17m 15s 937ms 
Run Code Online (Sandbox Code Playgroud)

我认为是因为这个消息.

我很担心离线模式.

我的朋友:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '24.0.0'

    defaultConfig {
        applicationId "*.*.*"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        jackOptions {
            enabled true
        }
        // Enabling multidex support.
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    dexOptions …
Run Code Online (Sandbox Code Playgroud)

android android-jack-and-jill android-instant-run

7
推荐指数
2
解决办法
3922
查看次数