我正在尝试将我的OpenGraph动作添加到新闻源,我了解到这一点,我需要将ExplicitlyShared功能添加到Facebook应用程序的OpenGraph操作设置中,我做到了.然而,当我把它放在我的代码中时,像这样:
OpenGraphObject model = OpenGraphObject.Factory.createForPost("origame_app:model");
model.setProperty("title", modelname);
model.setProperty("url", "http://samples.ogp.me/1386546688246429");
model.setProperty("description", modeldesc);
Bitmap bitmap = decodeSampledBitmapFromUri(filepath[position], 500, 500);
List<Bitmap> images = new ArrayList<Bitmap>();
images.add(bitmap);
OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setProperty("model", model);
action.setExplicitlyShared(true);
@SuppressWarnings("deprecation")
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(this, action, "origame_app:fold", "model")
.setImageAttachmentsForObject("model", images, true)
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
Run Code Online (Sandbox Code Playgroud)
我收到一个错误.但是否则OpenGraph工作得很好.有什么问题?
在我的react.JS项目中,我有一个div。该 div 有一个按钮和一个列表。该列表清楚地标有 id="results"。
return <div>
<Button label="Combine Cards" disabled={!this.props.combineReady} onClick={this.handleClick} accent primary raised />
<br />
<ul >
{ JSON.parse(this.state.data).resultCards.map(function(card){
return <li id="results">{card.deviation} <img src={'https://image.deckbrew.com/mtg/multiverseid/123456.jpg'}/></li>;
}) }
</ul>
</div>;Run Code Online (Sandbox Code Playgroud)
我不喜欢与它摔跤的 styles.css 文件看起来像这样;
/* The list container. */
ul{
list-style: none;
display: inline-block;
width: 263px;
text-align: left;
}
/* The individual list items. */
ul li{
display: block;
padding: 15px 20px;
background-color: #F8F8F8;
color: #7B8585;
margin-bottom: 3px;
position: relative;
transition: 0.3s;
}
/* The card images within the list items. …Run Code Online (Sandbox Code Playgroud)你好 stackoverflow 社区:)
我想在java中创建一个flatbuffers对象,我可以将其序列化为字节数组,然后在java对象中反序列化。我第一次使用平面缓冲区,但无法初始化 java 对象。我的方法一步一步:
这是我的第 4 步的代码:
FlatBufferBuilder fbb = new FlatBufferBuilder(1);
int str = fbb.createString("Dummy");
Monster.startPerson(fbb);
Monster.addName(fbb, str);
int p = Person.endPerson(fbb);
Run Code Online (Sandbox Code Playgroud)
也许有人可以发布一个简单的示例来创建 Flatbuffers 对象,以及如何序列化和反序列化字节数组?
希望得到答复并致以最诚挚的问候,
保罗
我有一个包含 3 个字符串变量的项目。
DateFormatStr 是我需要用来输出日期的格式字符串。DateFormatFrom 是申请申请的开始日期FilloutDateTo 是请求将适用的结束日期。问题是我不想手动指定日期。正如您在下面的示例(一个工作示例)中所看到的,我需要指定日期,但是有没有办法使起始日期的时间为 00:00:00,结束日期的时间为 23:59: 59?
string DateFormatStr = "MM/dd/yy hh:mm:ss tt";
string DateFormatFrom = "12/04/14 00:00:00";
string FilloutDateTo = "12/04/14 23:59:59";
Run Code Online (Sandbox Code Playgroud)
所以我希望系统时间能够识别formatStr变量的起始日期和开始日期。
谢谢
其他3个按钮正常运行,但最后一个按钮是一个可以输入特定颜色进行更改的按钮不起作用.我已经尝试过并检查过,除非我真的很胖并且看不出有什么问题...如果我没有看到如此明显的东西,请提前抱歉.
<html>
<head>
<title>FA2</title>
</head>
<body>
<h1 id=js>JavaScript</h1>
<script>
function show(){
document.getElementById("js").innerHTML="is a Programming Language"}
function reset(){
document.body.style.backgroundColor="white";
document.getElementById("js").innerHTML="JavaScript"}
function red(){
document.body.style.backgroundColor="red"}
function green(){
document.body.style.backgroundColor="green"}
function blue(){
document.body.style.backgroundColor="blue"}
function type(){
var color = prompt("Enter Color");
document.body.style.backgroundColor = color}
</script>
<style type="text/css">
body
{
text-align:center;
font-family:Arial;
}
</style>
<button onclick="show()">Show</button>
<button onclick="reset()">Reset</button>
<hr>
Change Background:
<button onclick="red()">Red</button>
<button onclick="green()">Green</button>
<button onclick="blue()">Blue</button>
<button onclick="type()">Type Color</button>
<hr>
</body>
</html>Run Code Online (Sandbox Code Playgroud)
Chrome中的控制台显示错误:
未捕获的TypeError:type不是函数
我的头脑中的javascript不会执行.我已经尝试排除了很多东西,试图弄清楚为什么我的javascript不会执行任何我有的东西.我得出的结论是我的javascript不会执行.目前我只有一个应该说"已加载"的空白警报,但即使这样也不会加载.
这就是我目前的代码中的内容
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-strict.dtd">
<html lang="nl" xml:lang="nl" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-type" content="text/html; charset=Windows-1252" />
<meta content="Windows-1252" http-equiv="encoding" />
<meta http-equiv="Content-Language" content="nl" />
<title>Micha J</title>
<script src="http://code.jquery.com/jquery-1.8.3.js" type="text/JavaScript" />
<script type="text/JavaScript">
//<![CDATA[
alert("Ready");
//]]>
</script>
<link href="style.css" type="text/css" rel="stylesheet">
</head>
Run Code Online (Sandbox Code Playgroud)
希望有人能够帮助我解决我的问题.