标签: bundle

OSX:指向应用程序包的环境变量?

我希望cscope在MacVim中打开文件而不是vim,所以我试图将MacVim的路径作为cscope使用的EDITOR环境变量的值:

$ export EDITOR=/Applications/MacVim.app/Contents/MacOS/MacVim

如果我现在正在尝试从ctags中编辑文件,它将无法工作并抛出此错误消息:

$ MacVim[8384:10b] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

用命令行调用MacVim

$ /Applications/MacVim.app/Contents/MacOS/MacVim

尽管如此.

我怎样才能解决这个问题?

macos bundle environment-variables cscope

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

在运行时在Eclipse中查找依赖包

Eclipse包(例如,在激活器代码中)如何在运行时找到依赖的Bundle实例?我想找到Eclipse选择的捆绑包以满足依赖性要求,我不想自己解释清单.

示例:我想在我当前捆绑所依赖的所有捆绑包中找到名为"marker.txt"的所有资源.也是传递依赖.为了实现这一点,我需要能够找到所有这些捆绑包.

java osgi bundle eclipse-plugin

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

Magento-以编程方式添加的捆绑产品不适用于购物篮/前端

我遵循了这个效果很好的答案:Magento-以编程方式添加的捆绑产品未在前端显示

我能够即时生成捆绑产品。一切正常。

唯一的问题:我的捆绑产品已正确保存,并且可以通过管理区域看到它。但是,经过这一代的飞速发展,我必须直接将此产品添加到购物篮中。系统返回“找不到产品”。基本上,我必须进入管理区域,只需保存它,然后就可以将其添加到购物篮中。

我真的怀疑索引器存在问题,但是我无法弄清楚到底发生了什么。

我尝试了许多解决方案,例如:

Mage::getSingleton('index/indexer')->processEntityAction(
     $product, 
     Mage_Catalog_Model_Product::ENTITY, 
     Mage_Index_Model_Event::TYPE_SAVE
);
Run Code Online (Sandbox Code Playgroud)

但这仍然行不通。关于我应该在save方法之后触发哪些代码以仅索引此新添加的捆绑产品的任何想法。

先感谢您。

php indexing bundle product magento

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

KnpPaginator和本机查询

我在Symfony2项目中使用KnpPaginatorBundle。当我尝试将Doctrine 2本机查询传递给分页程序实例时,出现错误:

One of listeners must count and slice given target
Run Code Online (Sandbox Code Playgroud)

有没有人为某些本机查询提供此示例的正确实现示例?

在bundle的文档中,我看到了示例(https://github.com/KnpLabs/KnpPaginatorBundle/blob/master/Resources/doc/custom_pagination_subscribers.md),但仅适用于文件系统,我不知道如何将其转换为db查询。

你能帮我吗?

编辑

我的查询:

SELECT a.*, highest_rated_book.*
  FROM authors a
  LEFT JOIN (SELECT * FROM books b ORDER BY b.rate DESC) AS highest_rated_book
  ON a.id = highest_rated_book.author_id
  GROUP BY highest_rated_book.author_id
  ORDER BY a.id;
Run Code Online (Sandbox Code Playgroud)

和表:

author (id, first_name, last_name)
books (id, title, rate, author_id)
Run Code Online (Sandbox Code Playgroud)

bundle symfony doctrine-orm nativequery knppaginator

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

使用OSGi API,如何确定给定的b​​undle是否是片段?

在OSGi API中,对BundleContext.getBundles()的调用将返回所有包,无论它们是否为片段.对于给定的Bundle对象,判断这是否是片段的最佳方法是什么?

osgi bundle osgi-fragment

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

如何创建.bundle来存储图像?

实际上,我已经读过将图像保存为bundle的方法,这是防止它从.ipa文件中复制的正确方法.所以,我想知道如何为图像制作包.请帮帮我.

iphone xcode bundle ios

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

bundle install error"US-ASCII(ArgumentError)中的无效字节序列"

当我尝试运行'bundle install'时,我得到一个奇怪的错误:"US-ASCII(ArgumentError)中的无效字节序列"

  $ bundle install
    Updating git://github.com/devton/catarse_paypal_express.git
    Unfortunately, a fatal error has occurred. Please see the Bundler
    troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
    /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler.rb:294:in `block in load_gemspec_uncached': invalid byte sequence in US-ASCII (ArgumentError)
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler.rb:291:in `chdir'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler.rb:291:in `load_gemspec_uncached'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler.rb:282:in `load_gemspec'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:411:in `block in load_spec_files'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:410:in `each'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:410:in `load_spec_files'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:799:in `load_spec_files'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:381:in `local_specs'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/source.rb:774:in `specs'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:491:in `block in converge_locked_specs'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:480:in `each'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:480:in `converge_locked_specs'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:166:in `resolve'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:113:in `specs'
        from /Users/.../.rvm/gems/ruby-1.9.2-p320@global/gems/bundler-1.2.3/lib/bundler/definition.rb:108:in …
Run Code Online (Sandbox Code Playgroud)

encoding bundle ruby-on-rails bundler ruby-on-rails-3

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

如何通过Android中的ActivityOptions对finish()进行动画制作?

我正在开发一个有两个活动的应用程序,Main和Info.应用程序以MainActivity启动,当您单击按钮时,InfoActivity从右侧滑入.当您单击另一个按钮时,InfoActivity将再次向右滑动并返回Main.

这就是我在MainActivity中实现动画和按钮单击的方法:

buttonInfo.setOnClickListener(new View.OnClickListener() { 
    public void onClick(View v) {
       Intent i = new Intent(getApplicationContext(), Info.class);
       Bundle mAnimate = 
          ActivityOptions.makeCustomAnimation(getApplicationContext(),
           R.anim.ani1,R.anim.ani2).toBundle();

          startActivity(i,mAnimate);
            }
        });
Run Code Online (Sandbox Code Playgroud)

我在InfoActivity中做了类似的工作,效果很好.但是,我想要并且需要使用intent调用finish()而不是startActivity,因为我在MainActivity中有一个服务器连接,当我调用startActivity时它会断开连接.

任何想法如何将这样的动画应用于finish()方法或其他建议?

android bundle android-animation activity-finish

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

Rails环境配置:`method_missing':未定义的方法`action_mailer'

尝试调用Rails控制台(bundle exec rails c)或Rails服务器(bundle exec rails s)会导致抛出以下异常:

~/project/.bundle/gems/railties-4.2.6/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `action_mailer' for #<Rails::Application::Configuration:0x007fdbe46e7400> (NoMethodError)
    from ~/project/config/environments/development.rb:43:in `block in <top (required)>'
    from ~/project/.bundle/gems/railties-4.2.6/lib/rails/railtie.rb:210:in `instance_eval'
    from ~/project/.bundle/gems/railties-4.2.6/lib/rails/railtie.rb:210:in `configure'
    from ~/project/config/environments/development.rb:1:in `<top (required)>'
    from ~/project/.bundle/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
...
Run Code Online (Sandbox Code Playgroud)

我在这里或那里遗漏了一些可能导致不兼容问题的宝石吗?

这是违规行config/environments/development.rb:

  # Save emails to files instead of delivering.
  config.action_mailer.delivery_method = :file
Run Code Online (Sandbox Code Playgroud)

以下是我的Gemfile的内容:

source 'https://rubygems.org'

gem 'rails', '4.2.6'
gem 'activemodel'
gem 'actionmailer'
gem 'sass-rails', '~> 5.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'rollbar'
gem 'meta-tags'
gem 'faraday'
gem 'oj' …
Run Code Online (Sandbox Code Playgroud)

bundle rubygems ruby-on-rails actionmailer ruby-on-rails-4

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

如何在React和TypeScript NPM包中包含CSS文件

我正在创建一系列要在我工作的公司中重复使用的组件。我们使用打字稿,到目前为止,我可以正确地创建组件,转换为javascript并发布为npm。我只使用命令行tsc,没有使用webpack。我的问题取决于使用css文件的特定组件。当我运行安装npm软件包的实际应用程序时,它会引发错误:

./~/my-common-components/dist/DataTable.js Module not found: Can't resolve './DataTable.css' in '.\AdminPortal\admin-portal\node_modules\common-components\dist'

当我查看已编译代码的dist文件夹时,css文件不存在。我尝试将“文件”添加到tsconfig.json文件中,但确实添加了文件,但路径完全相同(src\DataTable.css而不是dist\DataTable.css)

有没有一种方法可以在不使用webpack的情况下将文件包含在最终软件包中?

css bundle typescript

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