我在laravel中构建了一个应用程序,该应用程序假设每4小时使用webhose.io获取所有国家的新闻。它似乎可以正常工作一段时间。但是停止并在一段时间后重新启动。我不知道如何跟踪出了什么问题。
Laravel版本
Laravel Framework 5.5.45
Ubuntu 16.04.5 LTS(GNU / Linux 4.4.0-142-通用x86_64)
CRON职位详情
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month …
Run Code Online (Sandbox Code Playgroud) 获取数据库数据的简单云功能不起作用.
getusermessage()
不管用
错误:
函数执行花了60002毫秒,完成状态:'超时'
Index.JS用于获取数据库结果.
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const cors = require('cors')({origin: true});
// Take the text parameter passed to this HTTP endpoint and insert it into the
// Realtime Database under the path /messages/:pushId/original
exports.addMessage = functions.https.onRequest((req, res) => {
// Grab the text parameter.
const original = req.query.text;
// Push the new message into the Realtime Database using the Firebase Admin SDK.
admin.database().ref('/messages').push({original: original}).then(snapshot => {
// Redirect with 303 SEE …
Run Code Online (Sandbox Code Playgroud) javascript firebase firebase-realtime-database google-cloud-functions
我的代码
class Union {
//Search Function
static boolean search(int A[], int i) {
for (int k = 0; k < A.length; k++) {
if (A[k] == i) {
return true;
}
}
return false;
}
//union
static void union(int A[][], int B[][]) {
int i = 0;
int count = 0;
int C[] = new int[A.length + B.length];
for (; i < A.length; i++) {
if (!(search(B, A[i]))) {
C[count] = A[i];
count++;
}
}
for (; i < (A.length …
Run Code Online (Sandbox Code Playgroud) 我正在使用这个CSS:
#main{
border-radius: 50px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
-webkit-border-radius: 50px;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius: 50px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
}
Run Code Online (Sandbox Code Playgroud)
它在FF,Chrome,IE9(我认为)和Safari中完美运行......但它在IE8中非常难看,
有用户使用IE8,我尝试过.htc 文件, 但不支持border-bottom-right-radius和border-bottom-left-radius ...
我正在寻找支持它的JS或HTC文件(或其他解决方案)我只需要它用于IE8,但它很棒,如果它支持IE6和IE7也是如此!
谢谢!
I am wanted to do some bit testing with cloud function to achieve a bigger goal. As an Android developer, my knowledge is a bit limited in the case of JavaScript.
I am trying to access this database from firebase using Cloud function.
My Code to access this database to get JSON
response in Browser.
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const cors = require('cors')({origin: true});
// Take the text parameter passed to this HTTP endpoint and …
Run Code Online (Sandbox Code Playgroud)javascript firebase firebase-realtime-database google-cloud-functions
我试图在同一个println语句中打印(int,boolean,char,double).
class Test1
{
public static void main(String s[])
{
int a =5;
char c = 'a';
boolean b = true;
double d = 12.46;
System.out.println(a,b,c,d);
/*System.out.println(a); // Here it works fine
System.out.println(b);
System.out.println(c);
System.out.println(d);*/
}
}
Run Code Online (Sandbox Code Playgroud)
Test1.java:10:错误:找不到适合println的方法(int,boolean,char,double)
但我不知道为什么会出现这个错误.当我打印这个在不同的不同声明工作正常.请解释一下.