我的协会有一些问题。我有 3 个模型:用户、会员、公司。用户可能(或可能没有)拥有公司/会员资格。这是我的模型的粘贴箱:
我有2个问题:
我有这个我目前正在运行的脚本,它适用于所有实例但只有一个:
#!/bin/sh
pdfopt test.pdf test.opt.pdf &>/dev/null
pdf2swf test.opt.pdf test.swf
[ "$?" -ne 0 ] && exit 2
Run Code Online (Sandbox Code Playgroud)
要执行的更多行遵循上面的代码......
pdf2swf test.pdf test.swf如果" pdf2swf test.opt.pdf test.swf"失败,我将如何更改此脚本以运行" " ?如果第二次尝试失败,那么我会" exit 2".
谢谢
出于某种原因,在if之后,它继续到其他地方,除了把你带到另一个地方的ifs,这里是我目前的代码
<script type="text/javascript">
function whatname(button) {
var post = prompt("Name?", "Visitor")
if(post == "Nick"){
alert("Hi Nick")
window.location = "index.html"
}
if(post == "Visitor"){
alert("Welcome Visitor")
window.location = "index.html"
}
if(post == ""){
alert("Please Enter Name")
}
if(post == null){
alert("Closing")
}
if(post == "show me a secret"){
window.location = "secret.html"
}
if(post == "Greg"){
alert("Test")
}
if(post == "greg"){
alert("Test 1")
}
else{
alert("Welcome " + post + ", Have Fun!")
window.location = "index.html"
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
在if发生后,它继续其他,就像我说点击取消(这将是null)它会说,"关闭"但是比另一个弹出窗口会出现并且会说,"欢迎空闲,玩得开心!" 我不会把它带到其他地方,我不知道什么是错的,如果你能提供帮助,那就太好了.
我正在尝试为show/hide函数创建简单的jquery代码.但我仍然做错了什么.
$(document).ready(function(){
$('.arrow').click(function() {
$('#box').show("slow");
});
$('.arrow').click(function() {
$('#box').hide("slow");
});
$('.arrow').click(function() {
$('#box').show("slow");
});
});
Run Code Online (Sandbox Code Playgroud)
我正在寻找帮助在我的网站上实现flash文件(示例.net web程序).要求是任何.doc和PDF文件应在显示时自动转换为闪存纸.
如果我获得有关如何从PDF文档创建Flash电影的帮助,我将不胜感激.
示例网站网址http://pdfmenot.com/
寻找动态转换的实际实现
提前致谢.
我需要你的帮助来编写一个有效的程序.
我有大约50个函数说call_1(),call_2()... call_50().我需要根据从数据包中读取的索引来调用它们,即如果数据中的字段需要调用25 call_25(),那么10 call_10().
如果其他情况如此,我已经写过这个
if (index == 5)
call_5()
elseif (index == 6)
..so on ..
Run Code Online (Sandbox Code Playgroud)
但我认为这不是有效的写作方式.实现这种情况的任何其他想法?函数指针可以帮助吗?感谢您的帮助.谢谢.