从perl调用perl脚本(Calling perl script from perl)
我有一个perl脚本,它接受如下两个参数,并根据参数调用适当的函数。 我从bash调用这个脚本,但我想从perl调用它,是否可能?
/opt/sbin/script.pl --group="value1" --rule="value2";
脚本也会以我想要阅读的返回值退出。
I have a perl script which takes 2 arguments as follows and calls appropriate function depending on the argument. I call this script from bash, but i want to call it from perl, is it possible?
/opt/sbin/script.pl --group="value1" --rule="value2";
Also the script exits with a return value that I would like to read.
原文:https://stackoverflow.com/questions/18791292
最满意答案
而不是让
ViewPager
成为ViewPager
中唯一的项目,你应该在ViewPager
放置你想要保持不变的页眉和页脚,这样viewpager中的片段只包含你的“中间框”instead of having the
ViewPager
the only item insideactivity_main
you should put the header and footer you want to remain unchanged insideactivity_main
, so that the fragments in the viewpager only contains your "middle box"
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
首先,当使用视图,窗口小部件等UI元素时,您可能希望避免产生自己的线程,因为只能从创建它的线程触及View。 第二..你也想避免在你的工作线程中睡觉 - 基本上只是使用Handler类(来自android.os)并发布延迟的Runnable,如下所示: https : //stackoverflow.com/a/20784353/2102748 。 请确保在Activity停止时停止对该特定处理程序的所有工作,如下所示: https : //stackoverflow.com/a/3627399/21027 ...
-
而不是让ViewPager成为ViewPager中唯一的项目,你应该在ViewPager放置你想要保持不变的页眉和页脚,这样viewpager中的片段只包含你的“中间框” instead of having the ViewPager the only item inside activity_main you should put the header and footer you want to remain unchanged inside activity_main, so that the fra ...
-
如果那是你想要做的,你应该改变: let cell = self.tableViewFriends.dequeueReusableCellWithIdentifier("CellTableViewFriends") as! CellTableViewFriends; 到cellForRowAtIndexPath(_ :) let cell = self.tableViewFriends.cellForRowAtIndexPath(indexPath) If that's what you want ...
-
试着打电话 notifyDataSetChanged(); //Notifies the attached observers that the underlying data has been changed and any View reflecting the data set should refresh itself. 代替 notifyDataSetInvalidated(); //Notifies the attached observers that the underlyin ...
-
在主页上更改图像(change image on homepage)[2024-02-17]
你真的不应该在服务器端做那些事情。 如果您不打算添加图像,则可以发送当前日期时间(如果您不信任客户端计算机时间),并将其余部分留给javascript。 oImages = [ {time: '2011-01-01', img: 'path/to/image.ext', caption: "image caption"}, ... more images ... ]; 在页面加载时,您只需创建图像标记并根据服务器时间传递源: window.onload = function(){ for(i ... -
使用Swipe更改路线(Change route with Swipe)[2022-07-27]
我认为Dismissible Widget非常适合您的要求 class Main extends StatelessWidget { final bool _isLoggedIn = true; _nextPage(BuildContext context) async { Navigator.of(context).pushReplacementNamed("/home"); } @override Widget build(BuildConte ... -
你可以这样做: $('#mini-nav img').click(function() { // Mark all nav images as not selected $('#mini-nav img').removeClass('selected'); // Hide all images $('.parent > div').hide(); // Show the one the user wanted and set the class on the bu ...
-
使用以下代码,它可以有一个响应后退手势的侦听器。 View setOnTouchListener可以识别运动并执行操作。 执行 android.view.GestureDetector gestureDetector = new android.view.GestureDetector(this, new GestureDetector(Activity.this)); View.OnTouchListener gestureListener = new View.OnTou ...