Google Cloud Bigtable和Google Cloud Datastore/App Engine数据存储区之间有什么区别,主要的实际优点/缺点是什么?AFAIK Cloud Datastore构建于Bigtable之上.
google-app-engine google-cloud-datastore google-cloud-bigtable
我正在尝试使用适用于SIP电话的JavaScript库进行一些音频/视频测试,因为Chrome 47因为此错误而无法再在本地开发中进行测试:
NavigatorUserMediaError {}
constraintName: ""
message: "Only secure origins are allowed (see:https://goo. gl/Y0ZkNV)."
name: "PermissionDeniedError"
Run Code Online (Sandbox Code Playgroud)
Chrome中是否有选项(标记)可禁用此功能?或者有没有办法下载旧版本的Chrome(我找不到)?
我的应用程序运行在App引擎Java SDK上,从今天早上开始,我注意到开放实例没有处理新请求,而是正在启动新的Frontent实例.所以现在我有大约250个开放实例(比通常多很多).此外,实例在版本1.9.5上运行.
请指教!
我正在使用GWT Super Dev,我在Chrome中激活了源地图.虽然我可以在Sources选项卡中看到Java类,但我无法弄清楚如何查看未处理异常的完整堆栈跟踪.
那我该怎么做?
我想使用setGroup堆栈通知(如下所述:https://developer.android.com/training/wearables/notifications/stacks.html)基本上,我使用0作为通知ID(始终相同),builder.setGroup("test_group_key")但是新通知总是取代前一个.可能是什么问题呢 ?
码:
public BasicNotifier(Context context) {
super(context);
notifManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_launcher)
.setSound(alarmSound)
.setAutoCancel(true);
stackBuilder = TaskStackBuilder.create(context);
stackBuilder.addParentStack(getParentActivityClass());
}
public void showNotification(String title, String text, Intent intent, Class cls) {
if (text.length() > 190)
text = text.substring(0, 189) + "...";
mBuilder.setTicker(text).setContentText(text).setContentTitle(title);
Intent notificationIntent = intent == null ? new Intent() : new Intent(intent);
notificationIntent.setClass(getContext(), cls);
stackBuilder.addNextIntent(notificationIntent);
PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(resultPendingIntent);
mBuilder.setGroup("test_group_key");
Notification notif = mBuilder.build();
notif.flags |= …Run Code Online (Sandbox Code Playgroud) 我正在使用一个简单的 exoplayer 测试代码从 URL 播放视频,我注意到在播放器连接后,它会缓冲大约 2-3 秒直到开始播放(我指的是大约 2-3 秒,因为我不知道确切它内部是如何工作的,它可能是一定数量的字节)。考虑到连接大约需要 1-2 秒(然后开始缓冲,然后有效地启动视频),启动视频大约需要 4 秒,这似乎太多了。我使用速度测试应用程序在检测到的速度约 24Mbits/s 的连接上测试了 3 秒视频,640x480,1.23MB 大小)。
有没有办法加快视频的启动速度(例如,通过设置启动所需的初始缓冲大小)?
这是我的测试代码:
TrackSelector trackSelector = new DefaultTrackSelector();
player = ExoPlayerFactory.newSimpleInstance(this, trackSelector);
PlayerView playerView = findViewById(R.id.player_view);
playerView.setPlayer(player);
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(this,
Util.getUserAgent(this, "simpleAudioApp"));
dataSourceFactory = new CacheDataSourceFactory(getSimpleCacheInstance(),
dataSourceFactory);
Uri audioSourceUri = Uri.parse("http://...somevideo.mp4");
MediaSource audioSource = new ExtractorMediaSource.Factory(dataSourceFactory)
.createMediaSource(audioSourceUri);
LoopingMediaSource loopingSource = new LoopingMediaSource(audioSource, 1);
// Prepare the player with the source.
player.prepare(loopingSource);
player.setPlayWhenReady(true);
player.addListener(new Player.EventListener() {
@Override
public void onPlayerStateChanged(boolean playWhenReady, int …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用我的本地IP 127.0.0.1上的Chrome v.20.0在开发模式下加载我的应用.应用无法加载,并显示以下内容:
消息:"GWT代码服务器断开连接很可能,您关闭了GWT开发模式.或者,您可能已经丢失了网络连接.要解决此问题,请尝试重新启动GWT开发模式并刷新此页面."
在上一条消息(重叠)之上:"插件无法连接到开发模式服务器127.0.0.1:9997按照基本的故障排除说明"
这开始发生在大约6-9个月前,在刷新1或2页后,模块正确加载.现在,我无法使用Chrome在开发模式下加载我的应用程序.(在firefox中一切都很好).我正在使用GWT 2.4
更新:
这些错误没有伴随任何代码堆栈跟踪输出.通常,如果我将地址格式127.0.0.1更改为localhost,则加载模块,但这不再起作用...
我在RecyclerView中使用SimpleExoPlayer,有时在调用时出现错误
simplePlayer.setPlayWhenReady(true);
Run Code Online (Sandbox Code Playgroud)
视频播放器保持空白,出现问题的时间并不总是相同(我没有找到确切的模拟方法)
例外:
java.lang.IllegalStateException: Handler (android.os.Handler) {edbfbdd} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:545)
at android.os.Handler.enqueueMessage(Handler.java:662)
at android.os.Handler.sendMessageAtTime(Handler.java:631)
at android.os.Handler.sendMessageDelayed(Handler.java:601)
at android.os.Handler.sendMessage(Handler.java:538)
at android.os.Message.sendToTarget(Message.java:418)
at com.google.android.exoplayer2.ExoPlayerImplInternal.setPlayWhenReady(ExoPlayerImplInternal.java:183)
at com.google.android.exoplayer2.ExoPlayerImpl.setPlayWhenReady(ExoPlayerImpl.java:245)
at com.google.android.exoplayer2.SimpleExoPlayer.updatePlayWhenReady(SimpleExoPlayer.java:1188)
at com.google.android.exoplayer2.SimpleExoPlayer.setPlayWhenReady(SimpleExoPlayer.java:896)
Run Code Online (Sandbox Code Playgroud)
我的代码在自定义视图中运行(在回收器视图适配器中更新):
MyView h = this;
h.playerView = new PlayerView(getContext());
h.playerView.setVisibility(View.GONE);
h.postFrameLayout.addView(h.playerView, 0);
h.postFrameLayout.getLayoutParams().width = swidth;
h.postFrameLayout.getLayoutParams().height = (int) (swidth );
h.playerView.getLayoutParams().width = swidth;
h.playerView.getLayoutParams().height = (int) (swidth );
if (player != null){
player.release();
}
DefaultLoadControl loadControl = new DefaultLoadControl.Builder()
.setBufferDurationsMs(1100, 2000, 1000, 1000).createDefaultLoadControl(); …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用此方法修改pdf(第一个代码块 - 使用PDFStreamParser并迭代PDFOperator,然后在需要时更新COSString):
http://www.coderanch.com/t/556009/open-source/PdfBox-Replace-String-double-pdf
我遇到了一些UTF-8字符(变音符号)的问题:当我打印我要更新的文本时,它显示为"Societ??ii Na?ionale"(其中'?'是像0002或0004这样的代码).
有趣的是:
我可以为用于更新pdf(或至少尝试...)的类做什么(配置),以便正确显示所有UTF-8字符?
编辑:
截图: 
编辑2:
我搜索了PDFTextStripper及其超类中的pdfbox源代码,然后我发现了文本的提取方式:
在processStream方法的开头我们有
graphicsState = new PDGraphicsState(aPage.findCropBox());
Run Code Online (Sandbox Code Playgroud)
在processEncodedText中剥离文本时,使用如下的PDFont类实例:
final PDFont font = graphicsState.getTextState().getFont();
Run Code Online (Sandbox Code Playgroud)
并且使用以下内容从byte []中提取文本:
String c = font.encode( string, i, codeLength );
Run Code Online (Sandbox Code Playgroud)
新的问题是,当我使用相同的2行代码实例化一个PDFont类时,我得到一个"null"字体类,因此我不能使用.encode(...)方法.这些类的源代码在这里:http: //grepcode.com/file/repo1.maven.org/maven2/org.apache.pdfbox/pdfbox/1.5.0/org/apache/pdfbox/util/PDFStreamEngine.java和http://grepcode.com/file/repo1.maven.org/maven2/org.apache.pdfbox/pdfbox/1.5.0/org/apache/pdfbox/util/PDFTextStripper.java
我正在挖掘更多......
是否可以从 PWA 的 javascript 或 html(例如使用特定的 URI 方案)打开站点设置(用户可以接受或阻止权限)?我现在对 Android 感兴趣,当然这在任何操作系统上都非常有用。
主要问题是,在 PWA 中,某些用户很难(有时不可能)查看或激活通知权限(如果之前被阻止),即使您显示消息或向他们提供说明如何操作的文档。
例如,您可以在 Chrome 中打开它(网址栏锁定图标或长按 PWA 图标):