是否可以使用Raphael js拖放页面周围的对象而不仅仅是圆形和矩形?
我想添加路径和图像,然后你可以移动,但它证明是棘手的.我想与Raphael合作,因为它支持触摸界面.
这是代码
<script>
window.onload = function () {
var R = Raphael(0, 0, "100%", "100%"),
r = R.circle(100, 100, 50).attr({fill: "hsb(0, 1, 1)", stroke: "none", opacity: .5}),
g = R.circle(210, 100, 50).attr({fill: "hsb(.3, 1, 1)", stroke: "none", opacity: .5}),
b = R.circle(320, 100, 50).attr({fill: "hsb(.6, 1, 1)", stroke: "#fff", "fill-opacity": 0, "stroke-width": 0.8, opacity: .5}),
p = R.path("M 250 250 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 …Run Code Online (Sandbox Code Playgroud) 我需要帮助更改页面加载时调用的函数,以及用户点击带有ID的某个div后的任何时间.到目前为止我有这个:
window.onload=function() {
//Do your stuff, JS!
}
Run Code Online (Sandbox Code Playgroud)
是的,我几乎不知道任何JS ......
编辑:我将包括我的JS功能(我没有自己做,明显是另一个更好,更聪明的人:P)
function() {
var maxHeight = 0;
//get the column containers
var colsA = document.getElementById("Content").childNodes;
//get the height of the tallest column
for(var i=0; i < colsA.length; i=i+1) {
if(colsA[i].clientHeight > maxHeight) maxHeight = colsA[i].clientHeight;
}
//set all the column containers heights to maxHeight
for(var i=0; i < colsA.length; i=i+1) {
if(colsA[i].nodeType == 1) colsA[i].style.height = maxHeight+'px';
}
}
Run Code Online (Sandbox Code Playgroud)
它的作用:我有一个包含x个列div的div容器.由于内容的原因,这些列的高度不同.此功能使所有div高度相同.
当我的页面加载时,此代码运行完美.但事后却没有.我有一些可折叠的div可以存储额外的信息,当用户点击它时会进一步提升高度.这就是为什么我想到了那个id的onclick ...不幸的是id是由php动态生成的.
我有visualforce页面CompetitorSearch.page使用CompSearchDummy__c标准控制器.
<apex:page StandardController="CompSearchDummy__c" extensions="CompetitorSearch">
Run Code Online (Sandbox Code Playgroud)
如果我要在页面上添加自定义按钮CompSearchDummy,则CompetitorSearch.page显示页面目标.
但我有Talent使用的页面,Talent__c sObject当我尝试添加自定义按钮并尝试设置目的地时,CompetitorSearch.page不会显示为选项,因为我没有设置Talent__c为standard controller.
是否有可能以某种方式将我的CompetitorSearch.page链接添加到Talent页面?
通常情况下我似乎有一个项目列表,我需要在它们前面添加数字.例如:
Item one
Item two
Item three
Run Code Online (Sandbox Code Playgroud)
应该是:
1. Item one
2. Item two
3. Item three
Run Code Online (Sandbox Code Playgroud)
在vim中,我可以按I编辑模式,插入"1",点击"逃逸".然后我转到下一行,按.,然后^A增加数字.这看起来非常低效......我怎样才能创建一个宏,以便我可以转到下一行,并在开头插入一个比之前的行大一号的数字?
您如何在 Android 上使用 .p12 证书?
我尝试将其添加到Menu/Settings/Location和安全性。
当我这样做时,证书会从 SD 卡中消失,但是当我访问需要 .p12 证书的网站时,我只是收到一个连接错误。
证书、密码、URL都好。我检查了三次。
我不是唯一一个遇到这个问题的人,对吧?我使用 iPad / iPhone 的同事可以轻松使用它,但在 Android 上却很麻烦。他们只需双击 .p12 文件,提供证书密码,就可以设置了。
怎么在安卓上不是这样的?
我正在尝试打开蓝牙设置的标准窗口(设备名称,可发现性等).
但是,一般方法startActivity(intent)结束时指向NullPointerExceptionBluetoothSettings.java onCreate:135.
检查Android代码,我发现在135行他们从意图中获得了一些额外的东西.所以我准备了相同的附加功能(我在android核心BluetoothDevicePicker接口中找到的名称)并发出它 - 与NullPointerException效果相同.
可能是我准备的额外内容的错误名称?
那么当我打开手动操作用户的蓝牙设置时,有没有一种方法可以从系统本身提交的意图中看到那些额外的(特别是名字)?
非常感谢.
我的代码是:
Intent settingsIntent = new Intent();
settingsIntent.setClassName("com.android.settings", com.android.settings.bluetooth.BluetoothSettings");
settingsIntent.putExtra("android.bluetooth.devicepicker.extra.LAUNCH_PACKAGE", "mypackage.bttoggle");
settingsIntent.putExtra("android.bluetooth.devicepicker.extra.DEVICE_PICKER_LAUNCH_CLASS", "mypackage.bttoggle.BluetoothWidget");
PendingIntent settingsPendingIntent = PendingIntent.getActivity(context, 0, settingsIntent, 0);
views.setOnClickPendingIntent(R.id.btnSettings, settingsPendingIntent);
Run Code Online (Sandbox Code Playgroud)
这是一个小部件,所以我需要使用PendingIntent.
此代码在运行时获得以下异常:
ERROR/AndroidRuntime(4905):未捕获的处理程序:由于未捕获的异常而导致线程主要退出ERROR/AndroidRuntime(4905):java.lang.RuntimeException:无法启动活动ComponentInfo {com.android.settings/com.android.settings.bluetooth. BluetoothSettings}:java.lang.NullPointerException ERROR/AndroidRuntime(4905):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)ERROR/AndroidRuntime(4905):在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2621)ERROR/AndroidRuntime(4905):在android.app.ActivityThread.access $ 2200(ActivityThread.java:126)ERROR/AndroidRuntime(4905):在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1932)ERROR/AndroidRuntime(4905):在android.os.Handler.dispatchMessage(Handler.java:99)ERROR/AndroidRuntime(4905):在android.os.Looper.loop(Looper.java:123)ERROR/AndroidRuntime(4905):在android.app.ActivityThread.main(ActivityThread.java:4595)ERROR/AndroidRuntime(4905):at java.lang.reflect.Method.invokeNative(Native Method) )ERROR/AndroidRuntime(4905):at java.lang.reflect.Method.invoke(Method.java:521)ERROR/AndroidRuntime(4905):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java) :860)ERROR/AndroidRuntime(4905):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)ERROR/AndroidRuntime(4905):at dalvik.system.NativeStart.main(Native Method)ERROR/AndroidRuntime(4905):引起:java.lang.NullPointerException ERROR/AndroidRuntime(4905):at com.android.settings.bluetooth.BluetoothSettings.onCreate(BluetoothSettings.java:135)ERROR/AndroidRuntime(4905):at android.app .Instrumentation.callActivityOnCreate(Instrumentation.java:1047)ERROR/AndroidRuntime(4905):在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)ERROR/AndroidRuntime(4905):... 11更多
在调查之后,我发现在BluetoothSettings.java的第135行有:
public class BluetoothSettings extends PreferenceActivity
{
... 132 mNeedAuth = intent.getBooleanExtra(BluetoothDevicePicker.EXTRA_NEED_AUTH, false);
133 mFilterType = intent.getIntExtra(BluetoothDevicePicker.EXTRA_FILTER_TYPE, 134 BluetoothDevicePicker.FILTER_TYPE_ALL);
135 …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Exchange来整合房间预订系统.
我已经创建了一个房间邮箱并进行了设置,以便自动接受预约请求.
创建约会作为标准用户时,我可以将房间添加为资源,并显示其可用性.如果我预订,那么它会成功预订.
我通过Exchange Web服务创建了一个约会空间作为资源.资源已成功预订(在将其作为会议室代表打开时已确认)但未在任何与会者查看的会议中显示.
var service = new ExchangeService(ExchangeVersion.Exchange2007_SP1) {
Credentials =
new NetworkCredential("username", "password", "domain"),
Url = new Uri("https://myexchangeserver.co.uk/EWS/Exchange.asmx")
};
var appointment = new Appointment(service)
{
Subject = "Created by ExchangeTest app",
Body = "Some body text....",
Start = startTime,
End = endTime
};
appointment.RequiredAttendees.Add("AnAttendee@myexchangeserver.co.uk");
appointment.Resources.Add("ARoom@myexchangeserver.co.uk");
appointment.Save(SendInvitationsMode.SendOnlyToAll);
Run Code Online (Sandbox Code Playgroud)
有关为什么它不显示的想法,如果我手动预订它?
作为附注,我实际上无法以除代表之外的任何用户的身份查看此会议室的日历; 它说无法找到该文件夹.
我有HTML:
<div>
<span class="label"><a href="/index/1">Bookmix Offline</a></span>
<span class="button"><a href="/settings/">Settings</a></span>
<span class="button"><a href="/export_all/">Export</a></span>
<span class="button"><a href="/import/">Import</a></span>
</div>
Run Code Online (Sandbox Code Playgroud)
和CSS:
span.button {
float:right;
}
span.label {
margin-left: 30px;
}
Run Code Online (Sandbox Code Playgroud)
在浏览器中,跨度以相反的顺序显示:导入导出设置.我可以通过仅更改CSS文件并保持HTML原样来更改顺序吗?
我想知道是否有一种方法可以替换a中的纯文本,div.number-plate每个角色的图像(逐个)?我正在使用JQuery
非常感谢任何帮助,谢谢
以下合同不会在元数据中生成操作,但如果我删除了回复操作或将其设置为"",则元数据现在可以正确生成操作.为什么?
[System.ServiceModel.ServiceContractAttribute(Namespace="http://Test/Publish", ConfigurationName="IFCRPublish")]
public interface IFCRPublish
{
// CODEGEN: Generating message contract since the operation PublishNotification is neither RPC nor document wrapped.
[System.ServiceModel.OperationContractAttribute(Action="http://Test/PublishNotification", ReplyAction="*")]
PublishNotificationResponse1 PublishNotification(PublishNotificationRequest1 request);
}
Run Code Online (Sandbox Code Playgroud)
如果需要,完整服务代码在WCF元数据中缺少操作.
.net ×2
android ×2
c# ×2
javascript ×2
web-services ×2
apex-code ×1
bluetooth ×1
certificate ×1
css ×1
jquery ×1
macros ×1
metadata ×1
pkcs#12 ×1
raphael ×1
salesforce ×1
settings ×1
ssl ×1
vim ×1
visualforce ×1
wcf ×1