我正在触发通过 github 的 Rest api 运行的工作流程。但 github 不会在响应正文中发送任何数据 (204)。如何获取触发请求的运行 ID?我知道getRunsListapi,它会返回工作流 id 的运行,然后我可以获得最新的运行,但是当几乎同时提交两个请求时,这可能会导致问题。
github github-api github-enterprise github-api-v3 github-actions
Google最近发布了对其支持库的更新,该库现在有一个新的" SwipeRefreshLayout "视图.
该视图允许包装另一个视图,同时支持向下滑动以执行刷新操作.
截图:

谷歌没有提供样本(至少没有我能找到的样本),所以我自己尝试过使用它.
每当我刷卡时,我都会遇到崩溃(NPE),但后来我发现这是因为我没有为它提供"OnRefreshListener".
但我仍然不知道如何使用它,更不用说自定义它了
这是布局文件的XML:
<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.swiperefreshlayouttest.MainActivity"
tools:ignore="MergeRootFrame" >
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TTT"
android:textSize="40sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TTT"
android:textSize="40sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TTT"
android:textSize="40sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TTT"
android:textSize="40sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="TTT"
android:textSize="40sp" />
</LinearLayout>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
Run Code Online (Sandbox Code Playgroud)
代码,虽然它根本没有做任何特别的事情:
public class MainActivity extends ActionBarActivity
{
@Override
protected void onCreate(final Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); …Run Code Online (Sandbox Code Playgroud) 首先,这是我在Eclipse中的Java构建路径:

这四个jar的common.jar,core.jar,framework.jar,layout.jar'是从Android源代码打包的,它包含一些开发人员无法公开使用的类.它们不需要导出,因为它们是作弊编译器.在Eclipse中一切都很好.
现在我正在尝试使用gradle将我的项目导入Android-Studio.我已经将jar添加到依赖项中,但是我无法更改我的jar和android jar的编译顺序.我不能把这些罐放在android jar前面.我不熟悉gradle,现在编译器无法在这些jar中找到类.任何帮助将不胜感激!这是我的build.gradle:
apply plugin: 'android'
dependencies {
compile files('jars/common.jar')
compile files('jars/core.jar')
compile files('jars/framework.jar')
compile files('jars/layout.jar')
compile fileTree(dir: 'libs', include: '*.jar')
compile files('jars/animation_nineoldandroids_src.jar')
compile files('jars/json_simple_src.jar')
compile files('jars/jsoup-1.7.2-sources.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "21.1.1"
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, …Run Code Online (Sandbox Code Playgroud) 我的表有1个布尔列.
productid integer
isactive (boolean)
Run Code Online (Sandbox Code Playgroud)
执行查询时
SELECT productid
FROM
product
WHERE ispublish
LIMIT 15 OFFSET 0
Run Code Online (Sandbox Code Playgroud)

Affter我为ispublish专栏创建了索引
CREATE INDEX idx_product_ispublish ON product USING btree (ispublish)
re execute
SELECT productid
FROM
product
WHERE ispublish
LIMIT 15 OFFSET 0
result
Run Code Online (Sandbox Code Playgroud)

=>没有差别我已经尝试但结果是一样的
CREATE INDEX idx_product_ispublish ON product USING btree (ispublish)
CREATE INDEX idx_product_ispublish ON product USING btree (ispublish)
CREATE INDEX idx_product_ispublish ON product (ispublish) WHERE ispublish is TRUE
Run Code Online (Sandbox Code Playgroud)
谁能向我解释一下?
我是创建数据库(产品)表具有拖动列(id,name)的项目,我向此列添加了值,然后显示此错误
Warning in .\libraries\DisplayResults.php#869
A non-numeric value encountered
Backtrace
.\libraries\DisplayResults.php#4933: PMA\libraries\DisplayResults->_getTableNavigation(
integer 0,
integer 0,
boolean false,
string '',
)
.\libraries\DisplayResults.php#4378: PMA\libraries\DisplayResults->_getPlacedTableNavigations(
integer 0,
integer 0,
string 'top_direction_dropdown',
boolean false,
string '',
)
.\libraries\sql.lib.php#1685: PMA\libraries\DisplayResults->getTable(
,
array,
array,
boolean false,
)
.\libraries\sql.lib.php#1976: PMA_getHtmlForSqlQueryResultsTable(
,
string './themes/pmahomme/img/',
NULL,
array,
boolean true,
integer 1,
integer 1,
NULL,
,
array,
)
.\libraries\sql.lib.php#2199: PMA_getQueryResponseForResultsReturned(
,
array,
string 'products',
string 'items',
NULL,
NULL,
,
string './themes/pmahomme/img/',
integer 1,
integer 1,
NULL,
NULL,
NULL,
NULL,
NULL, …Run Code Online (Sandbox Code Playgroud) 所以我看过很多例子,做了大量的谷歌搜索,看了Stack Overflow上的例子......我需要帮助.我有一个Android应用程序,我在设备上存储用户名和密码,我需要加密AES 256.从查看示例,这是我到目前为止:
public class Security {
Cipher ecipher;
Cipher dcipher;
// 8-byte Salt
byte[] salt = {
(byte)0xA9, (byte)0x9B, (byte)0xC8, (byte)0x32,
(byte)0x56, (byte)0x35, (byte)0xE3, (byte)0x03
};
// Iteration count
int iterationCount = 19;
public Security (String passPhrase) {
try {
// Create the key
KeySpec keySpec = new PBEKeySpec(passPhrase.toCharArray(), salt, iterationCount);
SecretKey key = SecretKeyFactory.getInstance(
"PBEWithSHAAndAES").generateSecret(keySpec);
ecipher = Cipher.getInstance(key.getAlgorithm());
dcipher = Cipher.getInstance(key.getAlgorithm());
// Prepare the parameter to the ciphers
AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);
// Create the ciphers …Run Code Online (Sandbox Code Playgroud) 我的前端应用程序使用gmail帐户进行身份验证.
我在身份验证成功后检索id_token,并将其作为授权标头发送为承载令牌.
授权承载token_id
在nodejs服务器端,我调用以下方法来验证令牌.
exports.verifyUser = function(req, res, next) {
var GoogleAuth = require('google-auth-library');
var auth = new GoogleAuth();
var client = new auth.OAuth2(config.passport.google.clientID, config.passport.google.clientSecret, config.passport.google.callbackURL);
// check header or url parameters or post parameters for token
var token = "";
var tokenHeader = req.headers["authorization"];
var items = tokenHeader.split(/[ ]+/);
if (items.length > 1 && items[0].trim().toLowerCase() == "bearer") {
token = items[1];
}
if (token) { …Run Code Online (Sandbox Code Playgroud) 您好,我有以下 JS 代码,可从文件输入创建视频:
<canvas id="prevImgCanvas">Your browser does not support the HTML5 canvas tag.</canvas>
<input id="videoage" type="file" name="video" class="chooseNail" accept="video/*" style="display:none;" onchange="loadSnippetThumb(event)">
<label for="videoage" id="labelvideo" >Choose Video</label>
var loadSnippetThumb = function(event) {
var c = document.getElementById("prevImgCanvas");
var context = c.getContext('2d');
var url = URL.createObjectURL(event.target.files[0]);
var video = document.getElementById('video222');
video.src = url;
video.autoPlay = true;
}
Run Code Online (Sandbox Code Playgroud)
这将创建一个在屏幕上播放的视频,用户选择使用文件输入上传该视频。我不希望视频显示在屏幕上我只想能够挑选视频的随机帧并将其显示在画布上。我怎样才能做到这一点?谢谢。
我最近将android工作室更新到版本2.3,构建工具到25.0.2,gradle 2.3.0和gradle distribution 3.3现在我在构建项目时得到了这个.从来没有旧版本的这个问题.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: java.lang.RuntimeException: Job failed, see logs for details
at com.android.build.gradle.internal.transforms.ProGuardTransform.transform(ProGuardTransform.java:196)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:185)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:181)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:176)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134) …Run Code Online (Sandbox Code Playgroud) 我需要帮助GMSAutocompleteViewController在我的应用程序中打开时在searchBar中设置文本.我GMSAutocompleteViewController在Google Place AutocompleteViewController中使用.
google-maps autocomplete google-places-api google-picker swift
android ×4
javascript ×2
aes ×1
api ×1
autocomplete ×1
build ×1
css ×1
encryption ×1
github ×1
github-api ×1
google-maps ×1
gradle ×1
html ×1
node.js ×1
phpmyadmin ×1
postgresql ×1
proguard ×1
swift ×1
video ×1