小编Jar*_*red的帖子

如何在Windows上使用Perl的默认应用程序打开文件?

我有一个文件目录,我想定期扫描并使用与之关联的默认应用程序执行.它们不是可执行的系统("file.torrent"); 不起作用.你如何在Perl中运行带有相关应用程序的文件?

windows perl system

2
推荐指数
2
解决办法
2060
查看次数

如何以编程方式定期从网站获取内容?

让我先说一下,只要它在Windows上运行,我不关心这个解决方案的语言.我的问题是这个.有一个网站的数据经常更新,我希望定期获取以便以后报告.该网站需要JavaScript才能正常工作,因此只使用wget不起作用.在程序中嵌入浏览器或使用独立浏览器定期搜索此数据的屏幕有什么好方法?理想情况下,我想抓住页面上的某些表,但如果需要,可以使用正则表达式.

automation

1
推荐指数
1
解决办法
2148
查看次数

是否可以使用Perl解析这个噩梦?

我正在处理一些doc文件,当复制并粘贴到文本文件中时,会给我以下示例'output':

ARTA215   ADVANCED LIFE DRAWING (3 Cr) (2:2)  + Studio 1 hr.
This advanced study in drawing with the life ....
Prerequisite: ARTA150
Lab Fee Required

ARTA220   CERAMICS II  (3 Cr) (2:2)  + Studio 1 hr.
This course affords the student the opportunity to ex...
Lab Fee Required

ARTA250   SPECIAL TOPICS IN ART 
  This course focuses on selected topic....

ARTA260   PORTFOLIO DEVELOPMENT   (3 Cr) (3:0)
The purpose of this course is to pre....
BIOS010   INTRODUCTION TO BIOLOGICAL CONCEPTS (3IC) (2:2) …
Run Code Online (Sandbox Code Playgroud)

regex perl parsing

1
推荐指数
2
解决办法
662
查看次数

如何向MainFrame内容添加多个组件

我想制作几个面板的窗口.我可以将一个附加到MainFrame的内容:import swing._

class View(model:Model) extends MainFrame {
  title = "app"

  val parameters = new FlowPanel() {
    contents += new Label("Tempo: ")
    contents += new ComboBox(Seq("80", "100", "120", "140"))
    contents += new Label("Metric: ")
    contents += new Label("Note: ")
  }

  contents = parameters
}
Run Code Online (Sandbox Code Playgroud)

但是当我试图追加另一个时:

    class View(model:Model) extends MainFrame {
      title = "app"

      val parameters = new FlowPanel() {
        contents += new Label("Tempo: ")
        contents += new ComboBox(Seq("80", "100", "120", "140"))
        contents += new Label("Metric: ")
        contents += new Label("Note: ") …
Run Code Online (Sandbox Code Playgroud)

swing scala

1
推荐指数
1
解决办法
663
查看次数

Groovy相当于Python的exec语句?

在Python中,我可以使用exec(string)执行任意代码.我怎么能在Groovy中这样做?我希望代码在我当前运行的应用程序的上下文中执行,而不是像我使用的是Groovy shell.

groovy

0
推荐指数
1
解决办法
1137
查看次数

注入springSecurityService不起作用

在以下来自控制器的代码片段中,我在尝试访问springSecurityService.currentUser时遇到空指针异常.我希望def springSecurityService自动注入服务,我错过了什么?

@Transactional(readOnly = true)
@Secured('ROLE_USER')
class TaskController {

    static allowedMethods = [save: "POST", update: "PUT", delete: "DELETE"]

    def index(Integer max) {
        params.max = Math.min(max ?: 10, 100)
def springSecurityService
def user = springSecurityService.currentUser
Run Code Online (Sandbox Code Playgroud)

grails grails-spring-security

0
推荐指数
1
解决办法
164
查看次数