小编Col*_*lby的帖子

SQL Server Management Studio表示此声明不正确

我正在使用SQL Server Management Studio来测试一些SQL查询,并且下面的查询被称为"'语法不正确','',这是'image_uuid'之后的逗号.我读了一下语法,我想我正确地列出了这些列.

我需要将行从一个表移动到一个存档表.我将使用此语句,然后删除我移动的行.如果有更简洁的方法,请解释我还能做些什么.谢谢!

INSERT INTO litmus_mailing_archive(image_uuid, server_id, list_id, mailing_id,
                   litmus_job_id, email_subject, test_email_message_id,
                   test_running, test_started, test_finished,
                   ended_with_error, images_purged, notification_email)
    SELECT 
        (image_uuid, server_id, list_id, mailing_id, 
         litmus_job_id, email_subject, test_email_message_id, 
         test_running, test_started, test_finished, 
         ended_with_error, images_purged, notification_email)
    FROM   
        litmus_mailing
    WHERE  
        server_id = ?
        AND list_id = ?
        AND mailing_id = ?
        AND test_running = 'false'; 
Run Code Online (Sandbox Code Playgroud)

问号只是信息的占位符.当我测试它时,我插入了实际的数据litmus_mailing.

database sql-server

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

递归遍历Scala列表

我正在尝试使用模式匹配递归迭代Scala中的列表.我不能使用任何列表函数,或while/for循环.我需要做的是遍历列表,如果匹配为'4',则删除一个元素.我是Scala的新手,我在教科书中找不到答案,也没有在谷歌上找到答案.其他人都使用过滤方法或其他一些列表方法.

这是我试图做的(这是错的)

def removeFours(lst: List[Int]): List[Int] = {
val newLst = lst
lst match {
  case Nil => Nil
  case a if a == 4 => newLst -= 0
  case n => removeFours(newLst)
}
newLst
}
Run Code Online (Sandbox Code Playgroud)

recursion functional-programming scala pattern-matching

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

Object不是构造函数JavaScript错误

我正在尝试将一些OO设计模式应用于现有脚本,并且在遵循Mozilla帮助中心的一些指南之后,我在尝试实例化对象时仍然遇到错误.

我已经查看了这些资源以寻求帮助,但也许我并不完全理解JavaScript语法.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript

错误:

Uncaught TypeError: GeoLocMap is not a constructor
Run Code Online (Sandbox Code Playgroud)

错误的一行:

var GeoLocMap = new GeoLocMap();
Run Code Online (Sandbox Code Playgroud)

是否应将以下每种方法定义为原型?

谢谢您的帮助!

码:

function GeoLocMap() {

        this.map = -1;
        this.regionName = "";
        this.options = -1;
        this.openCountData = -1;
        this.chart = -1;

        this.getMap = function () {
            if (this.map == -1) {
                this.map = new google.maps.Map(document.getElementById('geochart-colors'), {
                    zoom: 6,
                    //TODO replace with the region retrieved from eventData
                    center: new google.maps.LatLng(lat, long),
                    mapTypeId: google.maps.MapTypeId.ROADMAP
                });
            } else {
                return this.map;
            }
        };

        this.getMapWidth = function …
Run Code Online (Sandbox Code Playgroud)

javascript oop web

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