这不是一个真正的问题,抱歉.我只是想获得有关获取不同安卓制造商的时钟和闹钟的闹钟和时钟的包和类名的帮助.
我在这里列出了HTC,三星和股票Android类名.但你可以猜出包名.
// HTC
"com.htc.android.worldclock.TimerAlert",//
"com.htc.android.worldclock.AlarmAlert",//
// Samsung
"com.sec.android.app.clockpackage.ClockPackage",//
"com.sec.android.app.clockpackage.alarm.AlarmAlert",//
// Motorola
"com.motorola.blur.alarmclock.AlarmAlert",//
"com.motorola.blur.alarmclock.AlarmClock",//
"com.motorola.blur.alarmclock.AlarmTimerAlert",
// Stock Android Clock
"com.android.alarmclock.AlarmClock",// 1.5 / 1.6
"com.android.deskclock.DeskClock",//
Run Code Online (Sandbox Code Playgroud)
如果您有LG,Sony或任何其他Android制造商,请添加到此列表中.我求求你.
我需要格式化double类型,使其至少有两位小数,但不限制最大小数位数:
5 -> "5.00"
5.5 -> "5.50"
5.55 -> "5.55"
5.555 -> "5.555"
5.5555 -> "5.5555"
Run Code Online (Sandbox Code Playgroud)
我怎样才能实现它?
我有两张桌子:
First
------
id
name
Second
------
id
name
Run Code Online (Sandbox Code Playgroud)
另外一个表连接前两个:
Third
------
first_id
second_id
Run Code Online (Sandbox Code Playgroud)
第三个表只用于解决M:N问题.它应该有自己的ID吗?
我已经阅读了新Angular路由器的文档.他们用于路由到变量的示例如下:
组件/模块:
angular.module('myApp', ['ngFuturisticRouter'])
.controller('AppController', ['$router', function($router) {
$router.config({ path: '/user/:id' component: 'user' });
this.user = { name: 'Brian', id: 123 };
});
Run Code Online (Sandbox Code Playgroud)
HTML /模板:
<div ng-controller="AppController as app">
<a router-link="user({id: app.user.id})">{{app.user.name}}</a>
</div>
Run Code Online (Sandbox Code Playgroud)
这是我的组件:
@RouteConfig([
{ path: '/', component: Home, as: 'home' },
{ path: '/displays/:id', component: DisplayDetails, as: 'display-details' }
])
Run Code Online (Sandbox Code Playgroud)
我的HTML /模板:
<div class="col-md-3" *ng-for="#display of displays">
<a [router-link]="['/display-details({id: display.id})']"><display-card ></display-card></a>
</div>
Run Code Online (Sandbox Code Playgroud)
我也试过而不是把组件别名(display-details)
我尝试将实际路径和组件放在自己身上,但它们都给了我同样的错误:
EXCEPTION: Component "App" has no route named "display-details({id: display.id})". in [null]
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Angular 2 Forms,但不是使用input
我想使用editable div
.
这有效:
<input type="text" [(ngModel)]="value">
Run Code Online (Sandbox Code Playgroud)
但这会引发错误:
<div contentEditable="true" [(ngModel)]="value"></div>
Run Code Online (Sandbox Code Playgroud)
TypeError:设置只有getter的属性
有没有办法使用Angular Forms的div?我不想使用输入或textarea
我有工作的应用程序(Availible here tandtpartners.herokuapp.com)
但是我
remote: ! The requested API endpoint was not found. Are you using the right HTTP verb (i.e. GET vs. POST), and did you specify your intended version with the Accept header?
在尝试再次部署应用程序时遇到了错误.
甚至当我克隆这个应用程序到另一个文件夹,并添加了一些!
到index.html
,我收到了同样的错误.
C:\heroku\2\tandtpartners>git status
On branch master
Your branch is up-to-date with 'heroku/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: hello/templates/index.html
C:\heroku\2\tandtpartners>git commit -m "Changed only index html"
[master 8a56e0d] Changed only index html
1 …
Run Code Online (Sandbox Code Playgroud) ArrayField的当前管理窗口小部件是一个字段,逗号为分隔符,如下所示(文本列表):
这不太理想,因为我会有更长的文本(甚至20个单词)并包含逗号.我可以将分隔符更改为其他内容,但仍然无法帮助管理中的不可读内容.
我想要的是有一个字段列表,我可以在管理员中更改.类似于下图的东西
我可以使用另一个表来解决这个问题,但我想知道是否有可能以这种方式解决它.
我有一个显示GIF图像的应用程序.如果图像保存在drawable中,一切正常,我就像这样访问它
is=context.getResources().openRawResource(R.drawable.mygif);
movie = Movie.decodeStream(is);
Run Code Online (Sandbox Code Playgroud)
但我需要从互联网上下载图像,所以我将它保存到CacheDir,这很好.我尝试了下面的内容来阅读它.
try
{
is = new BufferedInputStream(new FileInputStream(new File(context.getCacheDir(), "mygif.gif")));
}
catch (FileNotFoundException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
movie = Movie.decodeStream(is);
Run Code Online (Sandbox Code Playgroud)
还有这个
movie = Movie.decodeFile(new File(context.getCacheDir(), "mygif.gif").getPath());
Run Code Online (Sandbox Code Playgroud)
但无论如何,它都以
java.io.IOException
at java.io.InputStream.reset(InputStream.java:218)
at android.graphics.Movie.decodeStream(Native Method)
at android.graphics.Movie.decodeTempStream(Movie.java:74)
at android.graphics.Movie.decodeFile(Movie.java:59)
Run Code Online (Sandbox Code Playgroud)
要么
java.io.IOException: Mark has been invalidated.
at java.io.BufferedInputStream.reset(BufferedInputStream.java:350)
at android.graphics.Movie.decodeStream(Native Method)
Run Code Online (Sandbox Code Playgroud)
我认为这是一个非常简单的错误,但我无法克服它.清单有:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Run Code Online (Sandbox Code Playgroud) 我有一个listview,以50个项目开始,我想在用户滚动列表时添加更多内容,但是在它们到达列表末尾之前.我一直在使用atEnd属性知道我什么时候在列表末尾,并在那时添加更多项目,但我宁愿在我50%时开始添加新项目 - 75%的方式通过列表,以便用户不太可能等待更多数据
我试图在我的 Angular 6 + Material 项目中随处使用骨架占位符。我被困住了<table>
,因为我不知道在数据尚未加载时如何使用占位符(下面的示例图片):
我正在使用什么
<table mat-table [dataSource]="dataSource">
<ng-container matColumnDef="date">
<th mat-header-cell *matHeaderCellDef>Date</th>
<td mat-cell *matCellDef="let v">{{ v.date }}</td>
</ng-container>
<ng-container matColumnDef="description">
<th mat-header-cell *matHeaderCellDef>Description</th>
<td mat-cell *matCellDef="let v">{{ v.description }}</td>
</ng-container>
<ng-container matColumnDef="amount">
<th mat-header-cell *matHeaderCellDef class="text-right">Amount</th>
<td mat-cell *matCellDef="let v" class="text-right">{{ v.amount }}</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我的骨架占位符可能是
<tr *ngFor="let s of [1, 2, 3]">
<td><span class="sk skw-2 skh-3"></span></td>
<td><span class="sk skw-3 skh-3"></span></td>
<td><span class="sk skw-2 skh-3"></span></td> …
Run Code Online (Sandbox Code Playgroud) angular ×3
android ×2
django ×2
.net ×1
blackberry ×1
c# ×1
class ×1
clock ×1
django-admin ×1
file-io ×1
git ×1
heroku ×1
html-table ×1
ioexception ×1
package ×1
python-3.x ×1
qt ×1
routing ×1
sql ×1