我正在开发一个使用Windows Phone 8地图服务的应用程序.
我按照http://themightyhedgehog.blogspot.de/2013/01/how-to-use-google-maps-in-your-own.html链接 ,尝试开发包含Google Map的应用程序.
但是我在Xaml上遇到了一个错误
MapAppScope:BindingHelpers.TileSource="{Binding GoogleMap}"
我得到的错误是:
在Xaml中:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Microsoft_Phone_Controls_Maps:Map
Name="MyMap"
Grid.Column="1"
LogoVisibility="Collapsed"
d:LayoutOverrides="GridBox"
MapAppScope:BindingHelpers.TileSource="{Binding GoogleMap}"
Margin="0,0,0,2">
<Microsoft_Phone_Controls_Maps:Map.Mode>
<MSPCMCore:MercatorMode/>
</Microsoft_Phone_Controls_Maps:Map.Mode>
</Microsoft_Phone_Controls_Maps:Map>
</Grid>
Run Code Online (Sandbox Code Playgroud)
在.CS中:
namespace Google_Map_App
{
public enum GoogleType
{
Street = 'm',
Hybrid = 'y',
Satellite = 's',
Physical = 't',
PhysicalHybrid = 'p',
StreetOverlay = 'h',
WaterOverlay = 'r'
}
public class Google : TileSource
{
public Google()
{
MapType = GoogleType.Street;
UriFormat = @"http://mt{0}.google.com/vt/lyrs={1}&z={2}&x={3}&y={4}";
}
public …Run Code Online (Sandbox Code Playgroud) 好吧,我从 4 个不同的 Matlab 函数制作了 4 个独立的可执行文件来构建人脸识别系统。我正在使用不同的批处理代码调用这 4 个可执行文件并对图像执行任务。我拥有的图像总数超过 300k。这 4 个可执行文件中有 3 个运行良好,但是当我尝试调用 Fisherface 函数的独立可执行文件时,我面临“内存不足”问题。它使用 Fisher 的线性判别分析简单地计算每个图像的独特特征。该分析应用于由超过 150,000 张大小为 60*60 的图像的像素值组成的巨大人脸矩阵。因此矩阵的大小是 150,000*3600。
好吧,我所理解的是由于 RAM 中的连续内存不足而发生的。所以作为一个出路,我选择将我的大图像集划分为多个子集,每个子集包含 3000 张图像。现在,当提供输入人脸时,它会在每个子集中搜索该输入的最佳匹配,并最终整理出具有最低距离(欧几里得)的 3 个最佳匹配的最终列表。这解决了内存不足错误,但识别率变得低得多。因为当在原始人脸矩阵中进行判别分析时(我已经在包含 4000-5000 张图像的较小数据集中进行了测试),它给出了很好的识别率。
我正在寻找解决这个问题的方法。我想对大矩阵执行所有操作。有没有办法更高效地实现该功能,例如在Matlab中动态分配内存?我希望我已经相当具体,以便解释我的问题。下面,我提供了该特定可执行文件的代码段。
function FisherfaceCorenew(matname)
load(matname);
Class_number = size(T,2) ;
Class_population = 1;
P = Class_population * Class_number; % Total number of training images
%%%%%%%%%%%%%%%%%%%%%%%% calculating the mean image
m_database = single(mean(T,2));
%%%%%%%%%%%%%%%%%%%%%%%% Calculating the deviation of each image from mean image
A = T - repmat(m_database,1,P);
L = single(A')*single(A); …Run Code Online (Sandbox Code Playgroud) 我正在构建一个离子应用程序,其中我在标题中添加了工具栏,它有5个按钮来导航.但是当我在浏览器设备上尝试代码时,水平滚动对于工具栏工作正常,但在实际设备中,它将无法正常工作.有时它滚动,有时它不会.下面是相同的代码.
<ion-header>
<ion-navbar color="light">
<ion-title>Home</ion-title>
<ion-buttons end>
<button ion-button icon-only>
<ion-icon name="search"></ion-icon>
</button>
<button ion-button icon-only>
<ion-icon name="cart"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
<ion-toolbar color="light">
<ion-buttons>
<button ion-button clear>{{'All'|translate}}</button>
</ion-buttons>
<ion-buttons *ngFor="let facet of parentCategories">
<button ion-button [ngClass]=" {'active' : selectedFacet == facet}">{{facet}}
</button>
<button ion-button icon-only clear class="accordion" (tap)="getSubFacets(facet);accordion(event)" *ngIf="selectedFacet == facet"><ion-icon name="ios-arrow-down"></ion-icon></button>
</ion-buttons>
<div id="sub-category" class="sub-category">
<ion-buttons *ngFor="let subFacet of childCategories">
<button ion-button [ngClass]=" {'active' : selectedSubFacet == subFacet}" (tap)="getFilteredProducts('categoryFacet',subFacetMap.get(subFacet), selectedFacet, subFacet)">
{{subFacet}}</button>
</ion-buttons>
</div>
</ion-toolbar>
</ion-header>
Run Code Online (Sandbox Code Playgroud)
CSS:
.toolbar-content { …Run Code Online (Sandbox Code Playgroud) 我无法将我的应用程序部署到heroku。git Remote 中的多个应用程序。我该如何解决这个问题?
Error: Multiple apps in git remotes
Usage: --remote origin
or: --app arcane-scrubland-65909
Your local git repository has more than 1 app referenced in git
remotes.
Because of this, we can't determine which app you want to run this
command against.
Specify the app you want with --app or --remote.
Heroku remotes in repo:
secure-badlands-61058 (heroku)
arcane-scrubland-65909 (origin)
Run Code Online (Sandbox Code Playgroud) Flutter 应用程序未显示状态栏 (PFA)。我不想全屏查看我的应用程序。有没有办法解决这个问题。
main.dart
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: '',
theme: ThemeData(
primarySwatch: Colors.purple,
fontFamily: 'FIRSNEUE'
),
home: SplashScreenFirst(),
routes: <String, WidgetBuilder> {
'/dashboard': (BuildContext context) => Dashboard(title: 'HOUSR'),
'/login': (BuildContext context) => Login(),
'/service-dashboard': (BuildContext context) => Service(),
'/service-exists': (BuildContext context) => ServiceExists(),
'/partnerOffers' : (BuildContext context) => Partner(),
'/visitorRequest' : (BuildContext context) => VisitorRequest(),
'/vistorRequestSuccess' : (BuildContext context) => VisitorRequestSuccess(),
'/mealPlan' …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 SHA256 哈希来搜索图像:
我有sha256哈希值,我想知道是否存在具有此 sha256 哈希值的 docker 镜像。是否可以做到这一点以及如何做到?
我们有很多 (n1:EffortUser)-[r1:EFFORT]->(n2:EffortObject) 需要按天和周计算,即有多少 EffortObject:Email 做了 EffortUser SENT。如果您有很多用户和电子邮件可能需要相当长的时间,那么我们希望并行化此查询。
现在我们正在使用:
match(n1:EffortUser)-[r1:EFFORT]-(n2:EffortObject)
where r1.Effort = 'yes' and r1.TimeEvent>='2017-01-01' and r1.TimeEvent<='2017-12-31'
return distinct n1.Name as User, date(datetime(r1.TimeEvent)) as date, count(distinct r1.IdUnique) as count
order by user, date
Run Code Online (Sandbox Code Playgroud)
似乎有几个选项可以并行化/优化它,但所有的文档都相当糟糕。
我做了一些研究,发现了以下 APOC 函数,但我可能无法让它们工作(而且我在 Stackoverflow 上也找不到太多东西)。以下哪个选项是最好的,包括 使用上述示例代码的示例?这让我发疯。我们有 4 个内核和 32 GB 的内存,所以这应该运行得非常快,但我就是无法让它工作。
https://neo4j.com/docs/labs/apoc/current/cypher-execution/
CALL apoc.cypher.runMany('cypher;\nstatements;',{params},{config})
Run Code Online (Sandbox Code Playgroud)
运行每个分号分隔的语句并返回摘要 - 当前没有模式操作
CALL apoc.cypher.mapParallel(fragment, params, list-to-parallelize) yield value
Run Code Online (Sandbox Code Playgroud)
并行批量执行片段,并将列表段分配给 _
https://neo4j.com/docs/labs/apoc/current/cypher-execution/running-cypher/
apoc.cypher.mapParallel(fragment :: STRING?, params :: MAP?, list :: LIST? OF ANY?) :: (value :: MAP?)
Run Code Online (Sandbox Code Playgroud)
apoc.cypher.mapParallel(fragment, params, list-to-parallelize) yield value …
我正在尝试使用 Selenium 和 JAVA 自动化 Web 测试,
我有一个 Web 应用程序,其中某些部分(例如页眉和页脚)在多个页面上重复。我正在使用页面对象模型,为每个网页创建页面类文件。所有网页都有相同的页眉和页脚。
我创建了两个页面类文件 HomePage.java 和 SmallBusinessPage.java 以及组件页眉和页脚的两个单独的类文件 Header.java 和 Footer.java。这些文件与页面类文件位于单独的包中。我的测试类文件是TestCaseDevelopment.java,基类是TestBase.java。我需要使用 HomePage 对象从测试类 TestCaseDevelopment.java 访问标头链接“enroll”(其定位器位于 Header.java 文件中)。(HomePage 包含 HeaderHomePage 定位器,它可以在网页上查找整个标题。Header.java 文件中的 LinkEnroll 定位器在标题中定位链接。因此链接的完整定位器是 HeaderHomePage+LinkEnroll,这意味着//header//div[@id='masthead']//a[normalize-space()='Enroll']我无法访问它。
我不想在每个页面类文件中为页眉和页脚创建重复项。如何将这些部分定义为单独的类文件并将它们包含到我的页面类文件中?
主页.java
public class HomePage extends TestBase {
@FindBy(xpath = "//header//div[@id='masthead']")
public Header HeaderHomePage;
public HomePage() {
PageFactory.initElements(driver, this);
}
}
Run Code Online (Sandbox Code Playgroud)
小型企业页面.java
public class SmallBusinessPage extends TestBase{
@FindBy(xpath = "//header//div[@id='masthead']")
public Header HeaderSmallBusiness;
public SmallBusinessPage() {
PageFactory.initElements(driver, this);
}
}
Run Code Online (Sandbox Code Playgroud)
标头
public class Header extends TestBase{
@FindBy(xpath="//a[normalize-space()='Enroll']") …Run Code Online (Sandbox Code Playgroud) 我正在使用 Angular 9,所有代码在 chrome 中都可以正常工作,但在 IE11 中却不行,我没有使用任何正则表达式,而且大多数情况下我都在使用 back tics。
\n页面加载时 Polyfills-es5.js 中出现以下错误:
\n\n\n错误错误:未捕获(承诺中):语法错误:字符集中的范围无效
\n
单击任何延迟加载的路由按钮后出现以下错误
\n\n\n错误错误:未捕获(承诺中):TypeError:无法获取未定义或空引用的属性\'\xc9\xb5mod\'\nTypeError:无法获取未定义或空引用的属性\'\xc9\xb5mod\'
\n
路线.ts:
\nconst routes: Routes = [\n {\n path: \'home\',\n canActivate: [AuthGuard],\n\n children: [\n {\n path: \'\',\n //loadChildren: () => DashboardModule,\n loadChildren: () => import(\'./dashboard/dashboard.module\').then(m => m.DashboardModule),\n },\n {\n path: \'create\',\n canActivateChild: [AuthGuard],\n //loadChildren: () => HomeModule,\n loadChildren: () => import(\'./home/home.module\').then(m => m.HomeModule),\n },\n {\n path: \'inquiry\',\n canActivateChild: [AuthGuard],\n //loadChildren: () => InquiryModule,\n loadChildren: () => …Run Code Online (Sandbox Code Playgroud) javascript typescript internet-explorer-11 angular-ui-router angular
我是 Flutter 新手,我正在开发一个电子商务网站,我想在我的欢迎页面中添加一个 Grid 来显示最近的产品,我正在尝试使用 GridVeiw.builder,但出现错误
失败的断言:第 551 行 pos 12:“child.hasSize”:不正确。
我不明白为什么我会看到这个错误。
我的欢迎屏幕
import 'package:ecommerce_practice/components/carousel.dart';
import 'package:ecommerce_practice/components/horizontal_list.dart';
import 'package:ecommerce_practice/components/products.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class WelcomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('E-commerce'),
backgroundColor: Colors.red,
actions: [
IconButton(
icon: Icon(
Icons.search,
),
color: Colors.white,
onPressed: () {},
),
IconButton(
icon: Icon(Icons.shopping_cart),
color: Colors.white,
onPressed: () {},
)
],
),
drawer: Drawer(
child: ListView(
children: [
UserAccountsDrawerHeader(
accountName: Text("Aleem"),
accountEmail: Text('aleem.alam@outlook.com'),
currentAccountPicture: GestureDetector(
child: CircleAvatar( …Run Code Online (Sandbox Code Playgroud) android ×2
angular ×2
dart ×2
flutter ×2
c#-4.0 ×1
containers ×1
css3 ×1
cypher ×1
docker ×1
dockerfile ×1
footer ×1
git ×1
google-maps ×1
header ×1
heroku ×1
ionic3 ×1
ios ×1
java ×1
javascript ×1
matlab ×1
neo4j ×1
neo4j-apoc ×1
pom.xml ×1
selenium ×1
typescript ×1