有没有办法FCM
从node.js
服务器发送通知?
我在文档中没有找到任何关于它的内容.
我正在使用Laravel.5.3以下是我的查询
$ProjectManagers = Employees::where("designation" , 1)
->pluck(DB::raw('CONCAT(first_name," ",last_name) AS name'),'id');
Run Code Online (Sandbox Code Playgroud)
这引发了一个错误
isset或empty中的非法偏移类型
我可以知道这是否是正确的方法?
如果我不使用联系和使用像
$ProjectManagers = Employees::where("designation" , 1)->pluck('first_name','id');
Run Code Online (Sandbox Code Playgroud)
哪个工作正确并给我结果
Illuminate\Support\Collection Object
(
[items:protected] => Array
(
[8] => Punit
)
)
Run Code Online (Sandbox Code Playgroud)
预期结果 :
Illuminate\Support\Collection Object
(
[items:protected] => Array
(
[8] => Punit Gajjar
)
)
Run Code Online (Sandbox Code Playgroud)
其中第一个名称和姓氏连接在一起.
我读过核心数据不是ORM
吗?任何人都可以列出为什么它不是一个ORM
?
我的观点:
ORM
.通常,在Electron应用程序中,您可以require
从主进程和渲染器进程中节点模块:
var myModule = require('my-module');
Run Code Online (Sandbox Code Playgroud)
但是,如果页面是通过HTTP而不是本地文件系统加载的,那么这似乎不起作用.换句话说,如果我打开这样一个窗口:
win.loadURL(`file://${__dirname}/index.html`);
Run Code Online (Sandbox Code Playgroud)
我可以require
没有问题的节点模块.但是,如果我打开一个这样的窗口:
win.loadURL(`http://localhost:1234/index.html`);
Run Code Online (Sandbox Code Playgroud)
我的require
网页中不再有节点模块 - 我进入Uncaught Error: Cannot find module 'my-module'
了网页的控制台.有没有办法在通过HTTP提供的Electron页面中使用节点模块?
一点上下文:我的公司正在构建一个需要能够作为Web应用程序托管并在Electron shell中的应用程序.为了使这两个环境更加简单和一致,我的Electron应用程序启动了一个本地Web服务器并打开了托管的应用程序http://localhost:1234
.现在,我希望能够使用拼写检查/拼写建议添加到应用程序中electron-spell-check-provider
.这个模块需要在渲染器进程中导入和初始化,所以我正在尝试require('electron-spell-check-provider')
进入我的网页,但是这会因Cannot find module
错误而失败.
当我在iOS 9.0模拟器中运行iOS应用程序时,我收到以下警告消息.
警告消息:"模拟器用户已请求新的图形质量:100"
有没有人见过这个错误?你能解决它吗?你做了什么修复它?
我正在努力建立一个自我调整大小 UITableView Cell
.谷歌搜索后,我找到了这个教程:https://pontifex.azurewebsites.net/self-sizing-uitableviewcell-with-uitextview-in-ios-8/这是非常好的.
在快速,它说的是tableView
?BeginUpdates
可以更新自定义单元格的大小.但它似乎不适用于xamarin ios.
有人可以帮助我吗?非常感谢!
using System;
using Foundation;
using UIKit;
using CoreGraphics;
namespace Ma
{
public partial class DataInput : UITableViewCell
{
public string title { get; set;}
public static readonly UINib Nib = UINib.FromName ("DataInput", NSBundle.MainBundle);
public static readonly NSString Key = new NSString ("DataInput");
public string value { get; set;}
public DataInput (IntPtr handle) : base (handle)
{
}
public static DataInput Create () …
Run Code Online (Sandbox Code Playgroud) 我一直在尝试java
使用以下代码将数据放入弹性搜索中:
String url = "http://localhost:9200/testindex2/test/2";
HttpClient client = new DefaultHttpClient();
HttpPut put = new HttpPut(url);
JSONObject json = new JSONObject();
json.put("email", "abc@abof.com");
json.put("first_name", "abc");
StringEntity se = new StringEntity("JSON: " + json.toString());
se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"Text"));
put.setEntity(se);
HttpResponse response = client.execute(put);
System.out.println("\nSending 'PUT' request to URL : " + url);
System.out.println("Put parameters : " + put.getEntity());
System.out.println("Response Code : " + response.getStatusLine().getStatusCode());
BufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
StringBuffer result = new StringBuffer();
String line = "";
while ((line = …
Run Code Online (Sandbox Code Playgroud) 我想使用make
的eval
函数在 a 中定义几个(动态命名的)变量foreach
,但我无法eval
完成这项工作。
我试过这样的事情:
$(eval \
var1 = val1 \
var2 = val2 \
)
Run Code Online (Sandbox Code Playgroud)
它不起作用:var1
被定义为val1 var2 = val2
和var2
未定义。这是有道理的,因为我放在\
第二行的末尾。但是如果我删除它,eval
呼叫将永远不会终止。
我尝试了不同的方法来让这个\
只被 看到eval
,但没有任何效果。因此问题是:是否可以在同一个eval
调用中定义多个变量?
我当然可以打eval
两次电话……这是相当好奇。
旋转设备不会旋转当前播放的视频.它在iOS 8和9中运行良好.
无法在WebKit中找到可能导致此行为的任何更改.我只是用常规配置实例化WKWebView.
有谁知道是什么原因引起的?
我有一个应用程序,我们需要打开基于语音命令的某些屏幕,如果用户说"打开设置"然后它应该打开设置屏幕,到目前为止,我已经使用了SpeechKit
框架,但我无法检测到的结束言语沉默.就像Siri一样.我想检测用户是否已结束他的句子/短语.
请在下面的代码中找到我SpeechKit
用两种方式集成框架的代码.
A)通过闭包(recognitionTask(with request: SFSpeechRecognitionRequest, resultHandler: @escaping (SFSpeechRecognitionResult?, Error?) -> Swift.Void) -> SFSpeechRecognitionTask
)
let audioEngine = AVAudioEngine()
let speechRecognizer = SFSpeechRecognizer()
let request = SFSpeechAudioBufferRecognitionRequest()
var recognitionTask: SFSpeechRecognitionTask?
func startRecording() throws {
let node = audioEngine.inputNode
let recordingFormat = node.outputFormat(forBus: 0)
node.installTap(onBus: 0, bufferSize: 1024,
format: recordingFormat) { [unowned self]
(buffer, _) in
self.request.append(buffer)
}
audioEngine.prepare()
try audioEngine.start()
weak var weakSelf = self
recognitionTask = speechRecognizer?.recognitionTask(with: request) {
(result, error) in
if …
Run Code Online (Sandbox Code Playgroud) ios ×3
ios10 ×2
node.js ×2
swift ×2
autolayout ×1
concat ×1
core-data ×1
electron ×1
eval ×1
firebase ×1
ios9 ×1
java ×1
laravel ×1
laravel-5.3 ×1
makefile ×1
node-modules ×1
objective-c ×1
orm ×1
pluck ×1
require ×1
speechkit ×1
uitableview ×1
uitextview ×1
wkwebview ×1
xamarin ×1
xcode ×1
xcode7.1 ×1