小编Raj*_*dya的帖子

编译失败。webpack不是功能

我的项目运行正常,但是安装了react-redux和redux之后,我无法启动项目,它向我显示此错误

编译失败。

webpack不是功能

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@0.1.0 start script.
Run Code Online (Sandbox Code Playgroud)

npm ERR!npm可能不是问题。上面可能还有其他日志记录输出。

错误的屏幕截图

npm reactjs npm-start

20
推荐指数
1
解决办法
5313
查看次数

房间@Relation与复合主键

我的问题是这个问题的扩展(也是我的:)) - > 房间复合主键到外键 所以,如果我有这个类:

public class FoodWithIngredients extends Food{

    @Relation(parentColumn = "id", entityColumn = "food_id", entity = 
    Ingredient.class)
    private List<Ingredient> mIngredients;

}
Run Code Online (Sandbox Code Playgroud)

但是PrimaryKey"食物"表是composite (primaryKeys = {"id", "language_id"}).

我如何让@Relation返回记录在哪里"parentColumn = {"id", "language_id"}, entityColumn = {"food_id", food_language_id}"

sqlite android composite-primary-key android-room

11
推荐指数
2
解决办法
826
查看次数

使用InstallAware部署Webservice

我已经创建了WCF Web服务并使用InstallAware创建了设置,以便我们的客户只需运行安装程序,它将在IIS中部署Web服务.我的设置在IIS中的"默认网站"下创建虚拟目录.一切正常,我的设置在"默认网站"下创建虚拟目录并指向正确的路径,但只有在设置完成之前它才会出错.以下是在IIS中创建虚拟目录的代码.

if Variable SUCCESS not Equals ERROR
    if Variable SUCCESS not Equals CANCEL
      Run Program $SUPPORTDIR$\InsertToken1.bat  (WAIT)
      Get IIS Index for Site "Default Web Site" into DEFAULTWEBSITEINDEXVAR
      Create Virtual Folder "WebService" in IIS Site #$DEFAULTWEBSITEINDEXVAR$, pointing to physical location $WWWROOTDIR$WebService
      Get System Setting IIS Anonymous User Account into INETUSR
      Set Read Permissions on File System Object "$WWWROOTDIR$\WebService" for $INETUSR$
    end
  end
Run Code Online (Sandbox Code Playgroud)

在调试MSI代码后,我发现当后续行执行时会给出错误

Create Virtual Folder "WebService" in IIS Site #$DEFAULTWEBSITEINDEXVAR$, pointing to physical location $WWWROOTDIR$WebService
Run Code Online (Sandbox Code Playgroud)

它给出了以下错误

在此输入图像描述

iis windows-installer web-services installaware iis-8

10
推荐指数
1
解决办法
685
查看次数

Django 自定义用户模型错误 ((admin.E108) 'list_display[2]' 的值指的是 'first_name',这不是一个可调用的

我有一个通过使用自定义模型扩展 AbstractBaseUser 来扩展用户模型的代码。我收到此错误消息

(错误::(admin.E108)“list_display[2]”的值指的是“first_name”,它不是可调用的、“UserAdmin”的属性或“towns.MyUser”上的属性或方法。: (admin.E108) 'list_display[3]' 的值指的是 'last_name',它不是可调用的,不是 'UserAdmin' 的属性,也不是 'towns.MyUser' 的属性或方法。

模型文件:

from django.contrib.auth.models import (
        BaseUserManager, AbstractBaseUser
    )


class MyUserManager(BaseUserManager):
    def create_user(self, username, email, password=None):
        if not email:
            raise ValueError('email address is required')

        user = self.model(
                username = username,
                email = self.normalize_email(email)
            )
        user.set_password(password)
        user.save(using=self._db)
        return user

    def create_superuser(self, username, email, password=None):
        user = self.create_user(
                username, email, password=password
            )

        user.is_admin = True
        user.is_staff = True

        user.save(using=self._db)
        return user


class MyUser (AbstractBaseUser):
    username = models.CharField(
            max_length=255,
            unique=True
        )

    email …
Run Code Online (Sandbox Code Playgroud)

django

9
推荐指数
1
解决办法
1万
查看次数

Plotly:仅在特定子图中堆叠条形

我有两个带有两列的条形图,创建如下:

fig = tools.make_subplots(rows=1, cols=2)
trace1 = go.Bar(x=x1 , y=y1)
trace2 = go.Bar(x=x2, y=y2)
fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 1, 1)
trace3 = go.Bar(x=x3 , y=y3)
trace4 = go.Bar(x=x4, y=y4)
fig.append_trace(trace3, 1, 2)
fig.append_trace(trace4, 1, 2)
Run Code Online (Sandbox Code Playgroud)

我只想要带有堆叠条的第二个子图。我尝试了以下

fig['layout']["xaxis2"].update(barmode='stack')
Run Code Online (Sandbox Code Playgroud)

但这当然行不通。如何将“堆栈”属性仅应用于第二个子图而不是整个图形?

谢谢

layout subplot plotly

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

我怎样才能获得所有行的ag-grid?

ag-grid提供了一种使用api.getSelectedRows()函数获取选定行的方法。并提供一种使用api.setRowData([])功能设置所有行的方法。我正在寻找某种东西getAllRows()来返回网格中的所有行。我知道有一种方法可以使用api.forEachNode()etc 遍历所有行。有什么办法可以获取整个行数组?

ag-grid angular5

6
推荐指数
4
解决办法
9653
查看次数

由于节流,无法成功完成 react-native firebase fetch() 操作

import firebase from "react-native-firebase";
remoteKey = "testJSON"
 firebase
            .config()
            .fetch(0)
            .then(() => {
                return firebase.config().activateFetched();
            })
            .then(activated => {
                if (!activated) console.log("Fetched data not activated");
                return firebase.config().getKeysByPrefix(remoteKey);
            });
Run Code Online (Sandbox Code Playgroud)

我在我的本机项目中的 App.js 中调用它,但它给出了错误“fetch() 操作无法完成,由于节流”可能是什么问题?

firebase reactjs react-native

6
推荐指数
1
解决办法
3167
查看次数

使用XCODE9.3(Objective-C)在Apple商店上传应用程序期间PayUmoney iOS SDK出现多个问题

错误:

1.ITMS-90087不支持的架构PayUmoneyCoreSDK.framework也包含不受支持的体系结构'[x86_64,i386]'也适用于CitrusGraphics和PlugNPlay框架.

2.ITMS-90209无效的段对齐CitrusGraphics也没有针对PlugNPlay和PayUmoneyCoreSDK框架的正确段.

3.ITMS-90125二进制无效"LC_ENCRYPTION_INFO加载命令中的加密信息丢失或无效或二进制文件已加密.此二进制文件似乎不是用Apple的链接器构建的"

警告:1.ITMS-90080 PayUMoneyCoreSDK.framwork不是独立可执行文件的位置.请确保您的构建设置已配置为创建PIE可执行文件.

我从嵌入式二进制文件中删除了上面的框架,然后上传到app store.Its上传成功,但app store拒绝了app,因为上面的库找不到问题,app最初崩溃了.

我接受了PayUmoney的支持,他们建议再次集成iOS SDK.我这样做但仍然存在问题.

有人请告诉我为什么会这样?去年,旧的iOS SDK工作得很好.一旦我整合了XCODE 9的新更新,那么问题将会提出.我使用Objective-C和XCODE 9.3

这是更新的iOS SDK链接:https://github.com/payu-intrepos/PayUMoney-IOS-SDK/tree/master/PlugNPlay/Objective-C%20SampleApp

我附上了一些问题.

https://drive.google.com/file/d/1dV8Scc2K47o-V9lhVLSCl46o_cMxA6x0/view?usp=sharing

https://drive.google.com/file/d/17P5ZCegveF2xdq73AEwuX0Wqwr6h68fP/view?usp=sharing

https://drive.google.com/file/d/1xAB0WH1zLlqCRQxEbROVmRBP4TngkEzM/view?usp=sharing

https://drive.google.com/file/d/10gPbOd9fwsMKj_RAqNRexcU6OUNFsgOn/view?usp=sharing

https://drive.google.com/file/d/1KsP7QtvRoPVSCMNAAt9JGDmJEUBfDaH7/view?usp=sharing

https://drive.google.com/file/d/1eXkCvGQU_7fnFJy136jV0S8YkI8Fpvqn/view?usp=sharing

https://drive.google.com/file/d/1oU1TfIwpKQx_dx1eD2nFwmmiAPjKudsu/view?usp=sharing

sdk objective-c ios payumoney xcode9.3

5
推荐指数
0
解决办法
184
查看次数

AttributeError: 'psycopg2.extensions.cursor' 对象没有属性 'fast_executemany'

AttributeError: 'psycopg2.extensions.cursor' 对象没有属性 'fast_executemany'

to_sql() 太慢了。所以试图解决这个问题。但是当我运行以下代码时,我得到了:-

AttributeError: 'psycopg2.extensions.cursor' 对象没有属性 'fast_executemany'

@event.listens_for(conn, 'before_cursor_execute')
def receive_before_cursor_execute(conn, cursor, statement, params, context, executemany):
    if executemany:
        cursor.fast_executemany = True
        cursor.commit()
Run Code Online (Sandbox Code Playgroud)

python pandas amazon-redshift pandas-to-sql

5
推荐指数
1
解决办法
4898
查看次数

使用itextsharp在PDF图像上显示文本

我已经使用iTextsharp的HTMLWorker生成了PDF。在PDF中,我想在标记特定区域的图像上显示文本。为此,我使用了带div标签的位置,但它未在图像上显示文本,但是如果我在浏览器中运行相同的HTML,则它将在特定位置的图像上显示文本。

以下是我用来生成PDF的代码:

StringBuilder sReportHeader = new StringBuilder();

sReportHeader.Append("<table style=\"table-layout:fixed\" width=\"100%\" style=\"font-family:Verdana;font-size:8px;\">" +
                        "<tr>" +
                            "<td align=\"left\">" + @"<img src=\"http://localhost/img/image1.jpg\" width=\"520\"></img></td>" +
                        "</tr>" +
                    "</table>" +
                    "<div id=\"divArea1\" style=\"position:absolute;left:50px;top:250px;font-weight:bold;\">Area1</div>");

MemoryStream workStream = new MemoryStream();
Document document = new Document();
var worker = new HTMLWorker(document);
var pdfWriter = PdfWriter.GetInstance(document, workStream);
document.Open();
worker.StartDocument();
pdfWriter.CloseStream = false;
TwoColumnHeaderFooter twopdf = new TwoColumnHeaderFooter();
pdfWriter.PageEvent = twopdf;
twopdf.OnOpenDocument(pdfWriter, document);
worker.Parse(new StringReader(sReportHeader.ToString()));
worker.EndDocument();
worker.Close();
document.CloseDocument();
document.Close();

byte[] byteInfo = workStream.ToArray();
workStream.Write(byteInfo, 0, byteInfo.Length);
workStream.Position = 0;
pdfWriter.Flush(); …
Run Code Online (Sandbox Code Playgroud)

c# itext

5
推荐指数
0
解决办法
465
查看次数

ubuntu 上的 docker 登录超时“为 org.freedesktop.secrets 调用 StartServiceByName 时出错:已达到超时”

我在做一个简单的sudo docker login. 在使用检查日志时journalctl -xe我发现了以下问题。

Jun 05 01:51:30 ubuntu sudo[24492]: pam_unix(sudo:session): session opened for user root by (uid=0)`

Jun 05 01:51:34 ubuntu dbus-daemon[7120]: [session uid=0 pid=7118] Activating service name='org.freedesktop.secrets' requested by ':1.41' (uid=0 pid=24502 comm="docker-credential-secretservice stostore " label="unconfined")`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-daemon[24511]: couldn't bind to control socket: /home/aliicp/.cache/keyring-KUIFKZ/control: Permission denied`

Jun 05 01:51:34 ubuntu gnome-keyring-d[24511]: couldn't create socket directory: /home/aliicp/.cache/keyring-KUIFKZ: Permission denied`

Jun …
Run Code Online (Sandbox Code Playgroud)

linux ubuntu vmware-workstation docker

4
推荐指数
1
解决办法
1万
查看次数