我正在尝试将Angular 4升级到最新版本(7.0.3),直到生产编译为止一切都很好。在其中收到:
ERROR in : Template parse errors:
The pipe 'filter' could not be found ("v class="form-group">
<ul class="ui-select-list">
<li [attr.name]="item.id" *ngFor="let [ERROR ->]item of data | filter : qModel" innerHtml="{{ 'AAA' | translate }}"></li>
</ul>
</div>
"): C:/x/src/app/components/ui/fields/combo/ui.combo.html@2:44
The pipe 'translate' could not be found ("s="ui-select-list">
<li [attr.name]="item.id" *ngFor="let item of data | filter : qModel" inn[ERROR ->]erHtml="{{ 'AAA' | translate }}"></li>
</ul>
</div>
"): C:/x/src/app/components/ui/fields/combo/ui.combo.html@2:79
Run Code Online (Sandbox Code Playgroud)
为了重现此错误,我从代码中创建了一个最小的存储库:https : //github.com/ptrstpp950/myBugInAngular
结果如下:
ng build --prod app
产生以上错误ng build app …
我在 Java 中有一个非常简单的代码,它从中读取数据 hdfs
try{
InputStream s = new GzipCompressorInputStream(hdfsFileSystem.open(filePath), false);
ByteStreams.copy(s, outputStream);
s.close();
}
catch (Exception ex){
logger.error("Problem with file "+ filePath,ex);
}
Run Code Online (Sandbox Code Playgroud)
有时(并非总是)它会抛出我异常
java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.closeQuietly(Ljava/io/Closeable;)V
at org.apache.hadoop.hdfs.DFSInputStream.getBlockReader(DFSInputStream.java:1099)
at org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:533)
at org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:749)
at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:793)
at java.io.DataInputStream.read(DataInputStream.java:149)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.init(GzipCompressorInputStream.java:136)
at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.<init>(GzipCompressorInputStream.java:129)
[...]
Run Code Online (Sandbox Code Playgroud)
在线下线:
InputStream s = new GzipCompressorInputStream(hdfsFileSystem.open(filePath), false);
Run Code Online (Sandbox Code Playgroud)
我正在使用 bellow maven 依赖项来加载 hadoop 客户端:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.2.0</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)
有谁知道如何解决这个问题?当然,我可以更改catch(Exception e)
为catch(Error e)
,但这不仅仅是解决方法。
有没有快速的方法StringBuilder
在C#中多次追加?当然我可以编写自己的扩展来追加循环,但它看起来无效.
TL; DR;
有没有一种方法可以在.NET Standard中创建与Microsoft.Owin向后兼容的Owin中间件?
细节
我创建了一个简单的中间件,例如:
public class RequestTrackingMiddleware
{
private readonly RequestDelegate _next;
public RequestTrackingMiddleware(RequestDelegate next)
{
_next = next;
}
public async Task Invoke(HttpContext context)
{
var sw = Stopwatch.StartNew();
await _next(context);
sw.Stop();
Console.WriteLine(sw);
}
Run Code Online (Sandbox Code Playgroud)
我将它与Owin一起添加到“经典” ASP.NET应用程序中。使用方法:
public override void Configuration(IAppBuilder app)
{
app.Use<FinaiRequestTrackingMiddleware>();
}
Run Code Online (Sandbox Code Playgroud)
但我最终得到:
Microsoft.AspNet.Identity.Owin.IdentityFactoryMiddleware`2 [....]和Microsoft.AspNetCore.Http.RequestDelegate之间没有可用的转换。
有任何想法吗?
第1部分:我的环境
我有以下文件上传到Hadoop:
{code:[int], customerId:[string], data:{[something more here]}}
code
数字从1到3000, customerId
总计高达4百万,每天高达0.5万date
存储在单独的目录中 - 我将其用作Hive表中的分区我做的大多数查询都是过滤的date
,code
和customerId
.我还有第二个格式文件(我们称之为CUSTOMER_ATTRIBUTES):
[customerId] [attribute_1] [attribute_2] ... [attribute_n]
它包含我所有客户的数据,所以行数高达4百万.
我按以下方式查询和过滤我的数据:
date
- 分区在这里使用WHERE partitionDate IN (20141020,20141020)
code
使用语句进行过滤,例如`WHERE code IN(1,4,5,33,6784)CUSTOMER_ATTRIBUTES
与CUSTOMER_DATA
同条件查询像
SELECT customerId
FROM CUSTOMER_DATA
JOIN CUSTOMER_ATTRIBUTES ON (CUSTOMER_ATTRIBUTES.customerId=CUSTOMER_DATA.customerId)
WHERE CUSTOMER_ATTRIBUTES.attribute_1=[something]
第2部分:问题
有什么有效的方法可以优化我的查询.我读到有关索引和存储桶的信息,我不知道是否可以将它们与外部表一起使用,以及它们是否会优化我的查询.
我在Visual Studio中有一个库项目,它作为网站的一部分进行部署.现在我调试它每次都附加到IIS进程,但它真的很烦人.
有没有办法配置C#Library项目附加到F5上的IIS?我正在使用VS2010和VS2012.
小更新 我通常在我的机器上运行多个w3wp进程.
public partial class MainBookingform : System.Web.UI.Page
{
static int numberOfBeachBookingInteger = 0;
static int numberOfBushBookingInteger = 0;
static int totalRevenueInteger = 0;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["beachBach"] != null)
{
numberOfBeachBookingInteger += 1;
beachBachLabel.Text = numberOfBeachBookingInteger.ToString();
}
if (Session["beachBach"] != null)
{
numberOfBushBookingInteger += 1;
bushBachLabel.Text = numberOfBushBookingInteger.ToString();
}
}
}
Run Code Online (Sandbox Code Playgroud)
嗨,我想在调试程序时看到这些整数从"0"开始.但是,我分配给那些整数的这些标签总是从'1'开始
请帮忙!