我有一个定义组件的pas单元.
如何将其添加到调色板?我知道的唯一方法是将它包含在一个包中,这是直接的方法吗?
我正在使用精美的盒子来创建弹出窗口并使用iframe在其上加载另一个页面.这是我的代码
<script type="text/javascript">
$(document).ready(function() {
$('.calendar .day').click(function() {
day_num = $(this).find('.day_num').html();
day_data = prompt('Enter Stuff', $(this).find('.content').html());
if (day_data != null) {
$.ajax({
url: window.location,
type: 'POST',
data: {
day: day_num,
data: day_data
},
success: function(msg) {
location.reload();
}
});
}
});
});
$(document).ready(function(){
$("a.iframeFancybox1").fancybox({
'width' : 800,
'height' : 650,
'overlayOpacity' : '0.4',
'overlayColor' : '#000',
'hideOnContentClick' : false,
'autoScale' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'type' : 'iframe'
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
它成功加载页面并完成这些工作.但是,它不是关闭弹出窗体,而是在弹出窗口中加载弹出源窗体.我想在完成工作时关闭弹出窗体并返回到生成弹出窗口的主菜单页面.如何通过弹出窗体的按钮单击实现此目的.
此致,Rangana
我需要从下载的文件中读取一些元信息.但我不知道该怎么做.
这是我的代码:
// Path form field_file
$file = 'public://directory/filename.txt';
file_get_contents($file);
Run Code Online (Sandbox Code Playgroud)
此代码导致此警告:
警告:file_get_contents():无法找到包装器"public" - 您是否忘记在配置PHP时启用它?
知道我做错了什么吗?
我尝试使用以下代码来合并音频.
AVMutableComposition* composition = [AVMutableComposition composition];
AVURLAsset* videoAsset = [[AVURLAsset alloc]initWithURL:audioURL options:nil];
AVURLAsset* audioAsset1 = [[AVURLAsset alloc]initWithURL:audioURL1 options:nil];
AVURLAsset* audioAsset2 = [[AVURLAsset alloc]initWithURL:audioURL1 options:nil];
AVMutableCompositionTrack *compositionVideoTrack = [composition addMutableTrackWithMediaType:AVMediaTypeAudio preferredTrackID:kCMPersistentTrackID_Invalid];
NSError* error = NULL;
[compositionVideoTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero,videoAsset.duration)
ofTrack:[[videoAsset tracksWithMediaType:AVMediaTypeVideo]objectAtIndex:0]
atTime:kCMTimeZero
AVMutableCompositionTrack *compositionAudioTrack1 = [composition addMutableTrackWithMediaType:AVMediaTypeAudio preferredTrackID:kCMPersistentTrackID_Invalid];
[compositionAudioTrack1 insertTimeRange:CMTimeRangeMake(kCMTimeZero,audioAsset1.duration)
ofTrack:[[audioAsset1 tracksWithMediaType:AVMediaTypeAudio]objectAtIndex:0]
atTime:kCMTimeZero
error:&error];
AVMutableCompositionTrack *compositionAudioTrack2 = [composition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid];
[compositionAudioTrack2 insertTimeRange:CMTimeRangeMake(kCMTimeZero,audioAsset2.duration)
ofTrack:[[audioAsset2 tracksWithMediaType:AVMediaTypeAudio]objectAtIndex:0]
atTime:kCMTimeZero
error:&error];
Run Code Online (Sandbox Code Playgroud)
当我尝试执行"[[audioAsset1 tracksWithMediaType:AVMediaTypeAudio] objectAtIndex:0]"时,它给出了以下错误
*** Terminating app due to uncaught exception 'NSRangeException',
reason: '*** -[NSMutableArray objectAtIndex:]: index 0 …Run Code Online (Sandbox Code Playgroud) 使用IE访问此页面非常慢,但使用Firefox要快得多.特别是当我增加人的节点数量时.有什么想法有什么不对?
http://thejit.org/static/v20/Jit/Examples/RGraph/example1.html
BTW:从本地文件系统访问时,IE甚至很慢.
乔治,提前谢谢
我试图掌握NUnit - 我已经安装它并在一个项目中成功运行它.我想保持生产代码与testcode分开,所以我在不同的项目中编写测试.测试项目链接到原始项目.(IDE C#Express 2010)
我的Testcode看起来像这样:
using NUnit.Framework;
namespace test.Import
{
[TestFixture]
class XMLOpenTest
{
[Test]
public void openNotAPath(){
try
{
production.Import.XMLHandler.open("Not A Path");
}
catch
{
Assert.Fail("File Open Fail");
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我知道我可以通过将production.Import.XMLHandler类公开来解决这个问题,但我不想更改我的生产代码以允许这种测试.
我该如何解决这个问题?我可以更改我的测试代码吗?是否有其他好方法可以在两个项目中分离测试和生产代码?互联网上有dummys的资源吗?
这是该文件的一个示例.假设我想解析第6列值并将它们存储在数组中.
42 test.example.com activityViewer/index.html 8a699fe62751d158dad57f6b9a3ae5a4 1291836592 4.1938788890839 4 test.example.com activityViewer/index.html ca0317343500ac35d46ca6b6bfe5918d 1291836592 4.224240064621 38 test.example.com activityViewer/index.html 2a473f02e814896af9d20ad333dfd5c5 1291836592 4.2302849292755 9 test.example.com activityViewer/index.html ac3942ad87fb0ce3efb034cdfc3d4c79 1291836592 4.2612450122833 31 test.example.com activityViewer/index.html 3497d90401e18483119b60a378bd8d27 1291836592 4.3139219284058 25 test.example.com activityViewer/index.html 377b12a86f6bbde33dc89e94cacd5246 1291836592 27.90621805191 3 test.example.com activityViewer/index.html 493bf2ba361b77d09305a14e9253322d 1291836592 29.722389936447
我想玩scala.ref.WeakReference.但是,在尝试实现大事之前,我想尝试检查scala控制台中的行为.我尝试了一些但我无法获得被取消引用的对象.这是我的尝试之一:
> class A
defined class A
> class B(var value: A)
defined class B
> new B(new A)
res0: B = B@c8aeb3
> new scala.ref.WeakReference(res0.value)
res1: scala.ref.WeakReference[A] = scala.ref.WeakReferenceWithWrapper@16a5d72
> res0.value = new A
> res1.get // Here I hope to get None
res3: Option[A] = Some(A@135707c)
Run Code Online (Sandbox Code Playgroud)
另一个尝试是由下面的oxbow_lakes给出的.
我也尝试过徒劳地显式运行垃圾收集器(调用java.lang.System.gc).
有没有办法取消引用的内容res1?
我需要在symfony中为API返回疯狂的http代码状态
我需要返回状态码24我试着这样做:
$this->getResponse()->setStatusCode('24');
Run Code Online (Sandbox Code Playgroud)
但我总是得到响应代码500
当我尝试返回像404,403这样的"正常"状态代码时:
$this->getResponse()->setStatusCode('403');
Run Code Online (Sandbox Code Playgroud)
它没有问题
任何想法为什么?
我目前正在使用DDMS透视来模拟带有gpx文件的android模拟器的移动.但是,我只能找到其中包含lat/lon对的gpx文件,而不是速度,海拔高度等.有关找到一个好的gpx文件的地方有什么建议,其中包含上述数据用于模拟器测试目的吗?谢谢.
更新:我注意到我正在使用的文件确实具有高度,但是当我检索它时它显示为零.只有lat/lon正确显示.Android模拟器可以只使用纬度/经度的gpx文件,而不是高度吗?
javascript ×2
php ×2
ajax ×1
android ×1
audio ×1
avurlasset ×1
c# ×1
codeigniter ×1
console ×1
delphi ×1
drupal ×1
drupal-7 ×1
fancybox ×1
filestream ×1
firefox ×1
http ×1
http-headers ×1
iphone ×1
jquery ×1
merge ×1
nunit ×1
parsing ×1
performance ×1
perl ×1
scala ×1
symfony1 ×1