小编Jam*_*emp的帖子

IIS URL重写在子虚拟目录中不重定向

我在'default web site\orchard'上安装了Asp.NET Application ...可以在http:// localhost/orchard上访问,我想使用URL Rewrite.我添加了规则:

<rewrite>
    <rewriteMaps>
        <rewriteMap name="Blogger">
            <add key="/aaa" value="/tags/tag1" />
        </rewriteMap>
    </rewriteMaps>
    <rules>
        <clear />
        <rule name="Rewrite rule1 for Blogger" stopProcessing="true">
        <match url=".*" />
            <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                <add input="{Blogger:{REQUEST_URI}}" pattern="(.*)" />
            </conditions>
            <action type="Redirect" url="{C:1}" appendQueryString="false" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>
Run Code Online (Sandbox Code Playgroud)

但是当我转到http:// localhost/orchard/aaa时,会返回错误404而不是重定向到http:// localhost/orchard/tags/tag1.

当我把我的Web应用程序放在网站重定向的根文件夹中时.http:// localhost/aaa被重定向到http:// localhost/tags/tag1.

我做错了什么?

感谢帮助.

iis url-rewrite-module

7
推荐指数
0
解决办法
1000
查看次数

如何从CommandLine设置ClickOnce应用程序的PublishUrl

我正在开发一个clickonce应用程序.我试图使用它从命令行发布它

msbuild Project.csproj /t:Publish /p:configuration=release;
Run Code Online (Sandbox Code Playgroud)

问题是我想设置一些其他属性以及'PublishUrl'等配置.

我试过这个

msbuild Project.csproj /t:Publish /p:configuration=release;publishurl="\\sdmm\publish\"
Run Code Online (Sandbox Code Playgroud)

它成功构建,但该项目的输出将被复制到app.publish文件夹中的应用程序的调试文件夹中.

我应该怎么处理这件事.谢谢

deployment msbuild clickonce command-line

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

使用role ="list"和role ="listitem"的原因是什么?

使用以下代码有什么好处吗?

<ul role="list">
    <li role="listitem"></li>
    <li role="listitem"></li>
    <li role="listitem"></li>
</ul>
Run Code Online (Sandbox Code Playgroud)


以下代码与辅助技术具有相同的含义吗?

<ul>
    <li></li>
    <li></li>
    <li></li>
</ul>
Run Code Online (Sandbox Code Playgroud)

html list wai-aria

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

如何在智能手机和平板电脑上扩展Phaser 3游戏及其资产?

我是与Phaser 3和ApacheCórdova一起合作创建移动Android游戏的新手。

我创建了一个1200 x 800像素的游戏。在平板电脑上看起来不错,但在智能手机上却不行。如何缩放以在多种屏幕尺寸下工作?

此外,我需要帮助来强制使用Phaser 3调整游戏​​方向。

谢谢

javascript cordova phaser-framework

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

我是否可以阻止Visual Studio 2012+发布packages.config和EF图表文件?

当我在Visual Studio 2012/2013/2015中发布ASP.NET Web应用程序时,默认情况下,Visual Studio还将发布packages.config(来自NuGet)和任何*.edmx.diagram文件(来自Entity Framework).

我知道我可以进入项目并单独将这些文件的属性从Build Action Content切换到Build Action None,但是,我必须为我使用Entity Framework的每个项目或任何其他NuGet提供的包执行此操作.

我可以将发布过程配置为逐个项目地排除文件,但是是否可以在所有项目中全局告诉Visual Studio 2012/2013/2015 排除这些文件?

visual-studio one-click-web-publishing visual-studio-2012

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

移相器是否能够进行大型多人游戏?

新手在这里.我正在使用phaser,特别是等距插件.

我想知道在处理实时多重连接方面是否有可能使用类似于agar.io的移相器创建游戏,生成一个包含大约300名玩家的巨大地图,所有这一切都没有在游戏中产生太大影响性能.我真的不知道如何处理多人游戏部分(可能是套接字,node.js),因为它可以很好地工作.至于生成一张非常大的地图,我也很空白.

  • 在移相器中,是否有可能创建一个等距型游戏来处理当用户到达可见"地图"边缘时生成的多个实时多人游戏和巨型地图?怎么样?
  • 如果没有,我应该选择什么(js和其他应用程序中的游戏引擎)才能实现我想要的目标?

javascript isometric phaser-framework

6
推荐指数
2
解决办法
2790
查看次数

虚幻引擎在 Linux 上启动时崩溃

我已经从源代码编译了虚幻引擎,一切都很成功。但是当我尝试启动 UE4Editor 时它崩溃了。控制台上的错误是:

[2017.04.14-05.25.55:381][  0]LogExit: Exiting.
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Run Code Online (Sandbox Code Playgroud)

附加崩溃日志和诊断文件。

环境:

Linux andrii-asus 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

UE4.log:

Log file open, 04/14/17 08:20:46
LogInit:Display: Running engine without a game
LogPlatformFile: Not using cached read wrapper
LogInit:Display: RandInit(-1053205140) SRandInit(-1053205140).
LogTaskGraph: Started task graph with 5 named threads and 6 total threads with 1 sets of task threads.
LogStats: Stats thread started at …
Run Code Online (Sandbox Code Playgroud)

linux segmentation-fault unreal-engine4

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

在反应组件中渲染Phaser.io画布

import React, { Component } from 'react';
import Phaser from 'phaser';

export default class App extends Component {
  constructor(props) {
    super(props);

    this.game = null;
    this.create = () => {
      this.game.stage.backgroundColor = '#124184';
    }
  }

  componentDidMount() {
    this.game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-target',
      {
        create: this.create
      }
    );

    console.log(this.create);
  }

  render() {
    return (
      <section id="phaser-target">
        hello there old friend
      </section>
    )
  }
}
Run Code Online (Sandbox Code Playgroud)

所以我创建了Phaser游戏对象,在组件中做了mount方法,请注意我的html样子如下:

<body style="overflow: hidden;">
    <noscript>
      You need to enable JavaScript to run …
Run Code Online (Sandbox Code Playgroud)

javascript reactjs phaser-framework

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

如何使用Phaser 3使画布响应式?

以前我在Phaser 2上工作,但现在我需要切换到Phaser 3。

我试图使画布具有响应能力,ScaleManager但无法正常工作。

我认为某些方法已更改,但我没有找到任何帮助重新调整全屏舞台大小的方法。

var bSize = {
  bWidth: window.innerWidth ||
    root.clientWidth ||
    body.clientWidth,
  bHeight: window.innerHeight ||
    root.clientHeight ||
    body.clientHeight,
};

var game;

var canvas = document.getElementById("canvas");

function create() {

    // Scaling options
    game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;

    // Have the game centered horizontally
    game.scale.pageAlignHorizontally = true;

    // And vertically
    game.scale.pageAlignVertically = true;

    // Screen size will be set automatically
    game.scale.setScreenSize(true);
}

window.onload = function() {

    // Create game canvas and run some blocks
    game = new Phaser.Game(
        bSize.bWidth, …
Run Code Online (Sandbox Code Playgroud)

phaser-framework

6
推荐指数
2
解决办法
5037
查看次数

如何在 ASP.NET Core 6 控制器中访问 appsettings.json 中的值

我根据 Visual Studio 2022 中提供的默认模板创建了一个全新的 ASP.NET Core Web API 项目 (.NET 6)。之后,我在 appsettings.json 文件中添加了一个配置密钥controller并尝试在类中访问它,但不能。

我的appsettings.json文件如下:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ProjectName" : "VeryFunny"
}

Run Code Online (Sandbox Code Playgroud)

控制器代码如下:

public class WeatherForecastController : ControllerBase
{
    private static readonly string[] Summaries = new[]
    {
    "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
    };

    private readonly IConfiguration _configuration;

    public WeatherForecastController(IConfiguration configuration)
    {
        _configuration = configuration;
    }

    [HttpGet(Name = "GetWeatherForecast")]
    public IEnumerable<WeatherForecast> …
Run Code Online (Sandbox Code Playgroud)

c# asp.net-core-webapi .net-6.0

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