小编Ney*_*yoh的帖子

Checkstyle eclipse插件:错误无法初始化模块TreeWalker令牌"WILDCARD_TYPE"

我有一个eclipse checkstyle插件的问题,我刚刚安装了这个,当我在java文件上用sun_checkstyle(eclipse)执行checkstyle-configuration时,我有这个错误:

无法初始化模块TreeWalker - 在检查com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck@2261fbd中的Acceptable tokens列表中找不到令牌"WILDCARD_TYPE"无法初始化模块TreeWalker - 在可接受的令牌列表中找不到令牌"WILDCARD_TYPE"检查com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck@2261fbd

但是,当我使用checkstyle配置:Sun Checks或Google Checks时,它是有效的.你有解决方案吗 ?谢谢,Neyoh

java eclipse eclipse-plugin checkstyle

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

PHPExcel返回损坏的二进制文件

我想写一个引用xls文件并检索结果.当我使用单个文件进行测试时,它可以工作,但是当参考文件很复杂时,这会返回一个包含各种数据的损坏文件: 在此输入图像描述

在此输入图像描述 这是最开始的: 在此输入图像描述

我的php文件是:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/London');

if (PHP_SAPI == 'cli')
    die('This example should only be run from a Web Browser');

/** Include PHPExcel */
require_once '../phpexcel/Classes/PHPExcel.php';
$objPHPexcel = PHPExcel_IOFactory::load('../upload/ref/fileref.xls');

$objWorksheet = $objPHPexcel->getActiveSheet();

$objWorksheet = $objPHPexcel->getActiveSheet();
$objWorksheet->getCell('B1')->setValue('toto');
$objWorksheet->getCell('B3')->setValue('toto');







header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="newfiletodownload.xls"');;
header('Cache-Control: max-age=0');
header('Cache-Control: max-age=1');
header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header ('Cache-Control: cache, must-revalidate');
header ('Pragma: public');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Excel5');
$objWriter->save('php://output');
Run Code Online (Sandbox Code Playgroud)

你有解决方案吗?谢谢,Neyoh

php xls file phpexcel

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

Drive API 错误:python 未找到 json 快速入门文件

我正在尝试使用 Google-drive-api,但遇到了问题。我准确地遵循了 google Drive api 快速入门教程的每条说明,但我有一个我没有的文件错误。 Python 快速入门教程 这是我的代码:

from __future__ import print_function
import httplib2
import os

from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage

try:
    import argparse
    flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
    flags = None

# If modifying these scopes, delete your previously saved credentials
# at ~/.credentials/drive-python-quickstart.json
SCOPES = 'https://www.googleapis.com/auth/drive.metadata'
CLIENT_SECRET_FILE = 'client_secret.json'
APPLICATION_NAME = 'Drive API Python Quickstart'


def get_credentials():
    """Gets valid user credentials from storage.

    If nothing has …
Run Code Online (Sandbox Code Playgroud)

python google-drive-api google-oauth

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