小编ARI*_*ANA的帖子

NetBeans无法安装某些模块

我正在使用NetBeans 7.4开发版2,所有软件包.

首先,我使用了NetBeans 7.2,所有包.然后我被通知我有更新.所以我将其更新为7.4开发版.

然后我又收到通知我有更新,我开始更新.但是错误地,我在NetBeans更新时单击了一个php文件,并且发生了导致更新失败的错误.我记不起错误信息了.

**现在我的问题是,当我启动NetBeans时,我收到以下错误消息:**

Warning - could not install some modules: org.eclipse.core.runtime.compatibility.auth - org.netbeans.InvalidException: Netigso: C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\org-eclipse-core-runtime-compatibility-auth.jar: Cannot start org.eclipse.core.runtime.compatibility.auth state remains INSTALLED after start() org.eclipse.equinox.registry - org.netbeans.InvalidException: Netigso: C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\org-eclipse-equinox-registry.jar: Cannot start org.eclipse.equinox.registry state remains INSTALLED after start() org.eclipse.core.contenttype - org.netbeans.InvalidException: Netigso: C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\org-eclipse-core-contenttype.jar: Cannot start org.eclipse.core.contenttype state remains INSTALLED after start() org.eclipse.equinox.app - org.netbeans.InvalidException: Netigso: C:\Program Files\NetBeans 7.3 Beta 2\ide\modules\org-eclipse-equinox-app.jar: Cannot start org.eclipse.equinox.app state remains INSTALLED after …
Run Code Online (Sandbox Code Playgroud)

php java netbeans netbeans-7

7
推荐指数
3
解决办法
3万
查看次数

显示错误的打字稿过滤器无法分配给类型

这是行不通的。显示错误 Type '(Person | null)[]' is not assignable to type 'Person[]'. Type 'Person | null' is not assignable to type 'Person'. Type 'null' is not assignable to type 'Person'.

\n
interface Person {\n  name: string;\n}\n\nfunction filterPersons(persons: Array<Person | null>): Array<Person> {\n    return persons.filter(person => person !== null)\n}\n\nfunction run() {\n    const persons: Array<Person | null> = []\n    persons.push(null)\n    filterPersons(persons)\n}\n\nrun()\n
Run Code Online (Sandbox Code Playgroud)\n

但这正在起作用

\n
interface Person {\n  name: string;\n}\n\nfunction filterPersons(persons: Array<Person | null>): Array<Person> {\n    return persons.filter(person => person !== null) as …
Run Code Online (Sandbox Code Playgroud)

typescript

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

leafletjs自定义标记位置不对

当我为传单js添加自定义标记图标时,标记图标位置不正确.

当我使用自定义标记时,这是一个小提琴http://jsfiddle.net/amrana83/7k5Jr/

这是我使用自定义标记时的代码

<style>
  html, body, #map {
    height: 500px;
    width: 800px;
    margin: 0px;
    padding: 0px
  }
  .leaflet-map-pane {
    z-index: 2 !important;
  }

  .leaflet-google-layer {
    z-index: 1 !important;
  }
</style>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
  <body>
    <div id="map"></div>
    <script>
      var map = new L.Map('map', {center: new L.LatLng(51.5, -0.09), zoom: 4});
      var googleLayer = new L.Google('ROADMAP');
      map.addLayer(googleLayer);
      var greenIcon = new L.Icon({iconUrl: 'http://technobd.rvillage.com/application/modules/Rvillage/externals/images/all_members.png'});
      L.marker([51.5, -0.09], {icon: greenIcon}).bindPopup("I am a green leaf.").addTo(map);//using custom marker …
Run Code Online (Sandbox Code Playgroud)

javascript leaflet

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

Laravel API 测试 - 如何测试具有外部 API 调用的 API

我的 API 代码

public function store (Request $request, $profileId)
{
    $all = $request->all();
    $token = AccessToken::with('users')->where('access_token',$request->input('access_token'))->first();

    if($token && $token->users->isOwnProfile($profileId))
    {
        $rules = [
            'access_token'     => 'required',
            'title'            => 'required',
            'description'      => 'required',
            'file_id'          => 'required',
            'audience_control' => 'required|in:' . join(',', PostRepository::$AUDIENCE_CONTROL),
            'tags'             => 'required',
        ];
        $validator = Validator::make($all, $rules);

        $error = $validator->errors()->toArray();
        if ($validator->fails())
        {
            return $this->setStatusCode(401)
                ->setStatusMessage(trans('api.validation failed'))
                ->respondValidationMessage($error);
        }
        try {
            $response = $this->postRepository->save($request, $profileId);
            if(isset($response['error']))
                return $this->messageSet([
                    'message' => $response['error']['message'],
                ], $response['error']['status_code']);

            return $this->setDataType('post_id')
                ->setStatusCode('200')
                ->respondWithCreatedId(trans('api.Post created'), …
Run Code Online (Sandbox Code Playgroud)

api phpunit unit-testing laravel laravel-5.2

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

2checkout测试支付模拟

在我的php应用程序中,我正在寻找有关如何使用https://www.2checkout.com/模拟测试付款的帮助. 我有使用开发者帐户支付Paypal沙盒的测试付款的经验.但在这里2checkout我无法弄明白.

php payment payment-gateway 2checkout

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

CodeIgniter中的重复数据插入

我只是在pastebin http://pastebin.com/KBtqrAkZ的 codeigniter控制器部分插入数据

  public function add_product()
  {
    $this->lang->load('log_in', 'english');
        log_in_check($this->lang->line('log_in_authentication_error'), 'admin/log_in');
        $this->lang->load('common', 'english');
        $data['title'] = $this->lang->line('admin_index_title');
        $this->load->view('admin_template/header', $data);
        $this->load->view('admin_template/left_menu');
    $data['error_msg'] = '';
        if ($this->form_validation->run('add_product') === TRUE)
        {
      $this->admin_model->add_product($this->input->post());
            $this->session->set_flashdata('status_msg', $this->lang->line('add_product_success'));
            redirect(uri_string(), 'refresh');
      exit ;
          $data['error_msg'] = $this->lang->line('add_product_invalid_data');
        }
        $this->load->view('admin/add_product');
        //$this->load->view('admin_template/notification');
        $this->load->view('admin_template/footer');  
  }
Run Code Online (Sandbox Code Playgroud)

比我的模型部分简单添加在pastebin http://pastebin.com/WiLHV2sr

  public function add_product($data = array())
  {
    $this->db->insert('ishop_product', $data);
    return $this->db->insert_id();
  }
Run Code Online (Sandbox Code Playgroud)

如果我按ctrl + F5或F5而不是数据插入,我的问题是重定向后.我是codeigniter的新手.请帮帮我.任何帮助将不胜感激.

php duplicate-data codeigniter double-submit-prevention

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

yargs 需要构建器选项之一

如何从命令中要求生成器对象中的选项之一

require('yargs')
  .usage('Usage: $0 <cmd> [options]')
  .command(
    'read',
    'Read a note',
    {
      id: {
        demand: true,
        string: true
      },
      first: {
        demand: true,
        boolean: true
      }
    },
    argv => {
      note.read(argv.id).then(data => {
        console.log('==================note read==================');
        console.log(data);
        console.log('==================note read==================');
      });
    }
  )
  .help()
  .strict().argv;
Run Code Online (Sandbox Code Playgroud)

在这里我希望用户传递命令的idfirst选项read

此外,当使用无效选项运行此命令时,它不会显示错误

node app.js read --id=1 --first=1
Run Code Online (Sandbox Code Playgroud)

yargs: ^12.0.5

node.js npm yargs

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

Android活动错误

我是android的新手.在android中我试图运行一个简单的工作.从我的main.xml(http://pastebin.com/Mhgmpj4w)我有一个按钮(我的main.java(http://pastebin.com/b5irLVTc))它将切换到另一个活动second.xml(http: //pastebin.com/F92VxSEZ)它会显示一些文本(我的second.java(http://pastebin.com/MR3L5WXL))但有一些错误(http://pastebin.com/KH2wDh7b).我是新手,请帮帮我.

main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Button" />

</LinearLayout>    
Run Code Online (Sandbox Code Playgroud)

main.java:

    package com.rana.activities;

    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.Button;

    public class Main extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);

            Button b = (Button) findViewById(android.R.id.button1);
            b.setOnClickListener(new OnClickListener() {

                public void onClick(View v) {
                    startActivity(new Intent(Main.this, Second.class));
                }
            });
        }
    }
Run Code Online (Sandbox Code Playgroud)

second.xml:

    <?xml …
Run Code Online (Sandbox Code Playgroud)

android android-activity

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