小编Sac*_*van的帖子

AWS s3 api错误:指定的存储桶不存在

我正在使用节点AWS SDK将图像保存到s3.尽管存在存储桶并且我具有正确的权限,但我仍然收到以下错误:

{ [NoSuchBucket: The specified bucket does not exist]
  message: 'The specified bucket does not exist',
  code: 'NoSuchBucket',
  time: Tue Oct 21 2014 12:32:50 GMT-0400 (EDT),
  statusCode: 404,
  retryable: false }
Run Code Online (Sandbox Code Playgroud)

我的nodejs代码:

var fs = require('fs');

var AWS = require('aws-sdk'); //AWS library (used to provide temp credectials to a front end user)
AWS.config.loadFromPath('./AWS_credentials.json'); //load aws credentials from the     authentication text file



var s3 = new AWS.S3();

fs.readFile(__dirname + '/image.jpg', function(err, data) {

var params = {
    Bucket: 'https://s3.amazonaws.com/siv.io',
    Key: …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 amazon-web-services node.js

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

操作方法:Windows CE 6.0的平台构建器

我是Platform Builder的新手.

我需要知道如何使用平台构建器.

当我用Google搜索时,我无法找到从哪里开始.

以下是我要找的.

  1. 要下载哪些精确工具?在我搜索时,没有称为平台构建器的工具.那么下载什么.
  2. 任何相同的书籍或文章.
  3. 使用相同的演练.

platform-builder windows-ce

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

需要良好的RDLC(报告)示例/样本

我正处于报告工具的评估阶段.

我更喜欢RDLC.但我需要在野外提供一些示例/样本,这可以指导我们使用现成的RDLC.

我将寻找简单的数据列表和使用矩阵,计算,分组等复杂的示例.

如果我们在某个地方陷入困境,这将有助于我们制定参考点.

rdlc reporting-services

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

将EF4与Caliburn.Micro绑定:我应该将我的实体作为ViewModel的属性公开吗?

使用Caliburn.Micro,我想知道将EF4实体暴露为ViewModel的属性(这里 和此处讨论的一种技术)的优缺点.这使我可以避免为每个字段编写getter和setter(参见下面的OneCustomer).缺点是我需要在XAML中编写所有绑定语句(LastName不在ViewModel中,但需要XAML绑定).如果我坚持使用每个字段的属性填充我的ViewModel的规定技术(如下面的FirstName),我最终必须编写大量的额外代码才能调用NotifyOfProperyChange.该应用程序将非常庞大.我应该将每个实体公开为ViewModel的属性吗?

在我的ViewModel中:

private MyEntities _context = new MyEntities();
private BindableCollection<Customer> _custBindableCollection; 
private Customer _oneCustomer;
private string _firstName;

public void Load() 
{
    _custBindableCollection = new BindableCollection<Customer>(_context.Customers.Where(row => row.CustomerType == "FOO"));
    AllCustomers = _custBindableCollection;
    _oneCustomer = _custBindableCollection.FirstOrDefault();
    FirstName = _oneCustomer.FirstName;
    OneCustomer = _oneCustomer;
}

public BindableCollection<Customer> AllCustomers
{ 
get { return _custBindableCollection;}
set {_custBindableCollection = value;
      NotifyOfPropertyChange(() => AllCustomers);}
}

public Customer OneCustomer
{
 get { return _oneCustomer;}
 set { _oneCustomer = value;
        NotifyOfPropertyChange(() => OneCustomer);}
} 

public …
Run Code Online (Sandbox Code Playgroud)

wpf entity-framework mvvm caliburn.micro

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

Java中的GWT编译问题(Google App Engine)

我在使用eclipse的java中使用Google App引擎时有一个奇怪的编译问题.当我尝试GWT编译我的代码时,我收到如下错误:

Compiling module beer.SQLBeer
   Validating newly compiled units
      Ignored 1 unit with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Finding entry point classes
      [ERROR] Errors in 'file:/C:/Users/Mark/workspace/SQLBeer/src/beer/client/SQLBeer.java'
         [ERROR] Line 12: The import com.google.appengine.api.rdbms cannot be resolved
         [ERROR] Line 13: The import com.google.apphosting cannot be resolved
         [ERROR] Line 14: The import com.google.cloud cannot be resolved
         [ERROR] Line 18: ServersServlet cannot be resolved to a type
         [ERROR] Line …
Run Code Online (Sandbox Code Playgroud)

java gwt google-app-engine

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

将报告绑定到web mvc2中的reportviewer

我有asp.net MVC2应用程序.我正在使用VS2008,并希望将生成的报告从我的控制器连接到reportviewer.

有任何想法吗?

到目前为止我有这个代码"控制器"

//should pass data to report
 public ActionResult GenerateReport()
      {


        LocalReport report = new LocalReport();
        report.ReportPath = Server.MapPath("~/Reports/KingsCourt.rdlc");

        List<InvoiceRow> rows = new List<InvoiceRow>();

        rows.Add(new InvoiceRow { name = "Testing item", value = (decimal)25.85 });
        rows.Add(new InvoiceRow { name = "Testing item2", value = (decimal)5.15 });
        ReportDataSource source = new ReportDataSource("InvoiceRow", rows);
        report.DataSources.Add(source);

        ViewData["InvoiceRow"] = report;
        return View();
      }
Run Code Online (Sandbox Code Playgroud)

和查看页面:

 <form id="form1" runat="server">

  <h2>GenerateReport</h2>
  <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
      Font-Size="8pt" Height="400px" Width="400px">
    <LocalReport ReportPath="Reports\KingsCourt.rdlc">
      <DataSources>
        <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="InvoiceRow" /> …
Run Code Online (Sandbox Code Playgroud)

reportviewer visual-studio-2008 asp.net-mvc-2

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

是否可以使用泛型方法而不在java中传递参数类型

问题:

我想创建一个泛型函数,它将返回strogly类型的对象.

功能:

public <T > T GetPet(AnimalKingdom allAnimals,int id) {
    return (T) allAnimals.getAnimalsManager().findAnimalById(id);

}
Run Code Online (Sandbox Code Playgroud)

上面的函数将返回强类型对象或抛出错误.

用法:

GetPet<Tiger>(thisZoo,tigersId).Roar();
Run Code Online (Sandbox Code Playgroud)

来自C#背景.谷歌相同,但无法找到解决方案,似乎我需要传递功能的泛型类型才能工作.

如何在java中实现上述场景.

java generics

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

DropDownList值在MVC 3中始终无效

我有一个联系表单,将电子邮件发送到从dropDownList中选择的地址之一.但是当发布表单时,DropDownList始终无效.

完整型号:

public class ContactModels
{
    [Display(Name = "Nome")]
    [Required(ErrorMessage = "Nome é obrigatório.")]
    [StringLength(100, ErrorMessage = "Nome não pode conter mais de 100 caracteres.")]
    public string Name { get; set; }

    [Display(Name = "Empresa")]
    public string Company { get; set; }

    [Display(Name = "E-mail")]
    [Required(ErrorMessage = "Endereço de email é obrigatório.")]
    [RegularExpression("[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", ErrorMessage = "Email não é válido.")]
    public string Email { get; set; }

    [Display(Name = "Telefone")]
    [Required(ErrorMessage = "Telefone é obrigatório.")]
    [StringLength(15, ErrorMessage = "Nome não pode …
Run Code Online (Sandbox Code Playgroud)

validation asp.net-mvc-3 drop-down-menu

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

UItableview单元格混乱(再次)

基本上我有这个UItableview,生成时由2个单元组成:一个有分数,如果你触摸另一个,它会插入另一行分数.所有这一切都很好但是当我滚动并且第一个单元格离开屏幕时,当它返回时它会在它上面添加另一个(它叠加它)!我想我做错了什么与dequeueReusableCellWithIdentifieraddSubview,但我无法弄清楚它是什么?

这是我的代码:

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    int feedIndex = [indexPath indexAtPosition:[indexPath length] - 1];
    static NSString *CellIdentifier1 = @"Cell1";
    static NSString *CellIdentifier2 = @"Cell2";


    if (feedIndex == 0)// configures the first cell

    {

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1 forIndexPath:indexPath];

        if (cell == nil) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier1];

    textField1 = [[UITextField alloc] initWithFrame:CGRectMake(0, (44 - 15) / 2.0, 80, 15)];
    textField1.font = [UIFont boldSystemFontOfSize:15];
        textField1.tag = i+1;// to keep track of the …
Run Code Online (Sandbox Code Playgroud)

cell uitableview

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