pre-compilation

application.css not being served as an asset

坚强是说给别人听的谎言 提交于 2019-12-04 02:18:20
EDIT 4, 5 and 6 8 hours in, any more ideas are welcome :) Maybe this bug is already known and solved, but I get the behaviour I described in edit 2&3, when you have this in a .css.erb file in app/assets/stylesheets : li { background-image: url(<%= asset_path "logo_80px_80px.png" %>); } The problem part seems to be the asset_path method call, but .css.scss also breaks it with: li { background-image: url(image-path("logo_80px_80px.png")); } My GemFile is: source 'http://rubygems.org' gem 'rails', '3.1.3' gem 'pg', '0.11.0' gem 'gravatar_image_tag', '1.0.0.pre2' gem 'will_paginate' gem 'rake' gem

ASP.NET in-place precompile doesn’t work as expected

时间秒杀一切 提交于 2019-12-03 09:49:39
I am trying to use ASP.NET precompile tool aspnet_compiler.exe to compile site after it has been deployed. As per book definition running in-place precompile on web machine should improve first page load experience. The compilation tool compiles each ASP.NET page, storing the compiled version in the %WINDIR%\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files folder just like if the pages had each been visited for the first time from a browser. In-place precompilation can speed up the first request made to newly deployed ASP.NET pages on your site because it alleviates the runtime from

Precompiling Handlebars.js templates in Windows

▼魔方 西西 提交于 2019-12-02 22:00:54
Looking at the Handlebars.js documentation for precompilation. The instructions are for OSX. Can this be done on Windows as well? If so, when they say to "install node and npm" does "node" refer to " node.js "? Install Node.js for Windows from here: http://nodejs.org/download/ . Run in the command prompt: npm install handlebars -g Now you can use the following syntax in the command prompt: handlebars <input> -f <output> ,where <input> is an original template file name, and <output> is a pre-compliled template file name. Example: handlebars person.hbr -f person.js In visual studio you have 2

How can I get gcc to add a prefix to all symbol names

六月ゝ 毕业季﹏ 提交于 2019-11-30 12:53:19
I know that in the past there was an option -fprefix-function-name that would add a prefix to all generated symbols, it doesn't seem to be part of gcc anymore. Is there any other way to do this? George Skoptsov I believe this answer will give you the solution. In short, you can 'prefix' symbols in an existing library using objcopy like this: objcopy --prefix-symbols=foo_ foo.o hide0 *EDIT: George Skoptsov's solution 's better than mine :) The nm trick might come in handy though. This is not exactly what you are looking for, but I have had to do something similar in the past (renaming the

Can Ruby, PHP, or Perl create a pre-compiled file for the code like Python?

佐手、 提交于 2019-11-30 03:43:37
For Python, it can create a pre-compiled version file.pyc so that the program can be run without interpreted again. Can Ruby, PHP, and Perl do the same on the command line? There is no portable bytecode specification for Ruby, and thus also no standard way to load precompiled bytecode archives. However, almost all Ruby implementations use some kind of bytecode or intcode format, and several of them can dump and reload bytecode archives. YARV always compiles to bytecode before executing the code, however that is usually only done in memory. There are ways to dump out the bytecode to disk. At

Coffeescript compilation error in ruby on rails

痞子三分冷 提交于 2019-11-30 03:38:30
问题 I am using coffeescript+ruby-on-rails. The compilation of coffeescript into pure JS leads to an error if there is a syntax problem in the coffee code. On the browser when I run the app, I get this error: ExecJS::RuntimeError Is there any way to find out what caused the compilation error, when it was trying to compile coffee code to JS? Attached is a screenshot of the error Following is the entry in the server log, which no way indicates the file which actually caused the syntax error:

Can Ruby, PHP, or Perl create a pre-compiled file for the code like Python?

流过昼夜 提交于 2019-11-29 00:53:20
问题 For Python, it can create a pre-compiled version file.pyc so that the program can be run without interpreted again. Can Ruby, PHP, and Perl do the same on the command line? 回答1: There is no portable bytecode specification for Ruby, and thus also no standard way to load precompiled bytecode archives. However, almost all Ruby implementations use some kind of bytecode or intcode format, and several of them can dump and reload bytecode archives. YARV always compiles to bytecode before executing

How to run a command at compile time within Makefile generated by CMake?

折月煮酒 提交于 2019-11-28 04:08:15
I would like to pass some options to a compiler. The option would have to be calculated at compile time - everytime when 'make' is invoked, not when 'cmake', so execute_process command does not cut it. (does it?) For instance passing a date to a g++ compiler like that: g++ prog.cpp -o prog -DDATETIME="17:09:2009,14:25" But with DATETIME calculated at compile time. Any idea how to do it in CMake? Bounty edit: A least hackish solution will be accepted. Please note that I want to be able to exectue an arbitrary command at compile time, not only 'date'. Edit 2: It have to work on Linux, Windows

How to run a command at compile time within Makefile generated by CMake?

故事扮演 提交于 2019-11-27 00:22:30
问题 I would like to pass some options to a compiler. The option would have to be calculated at compile time - everytime when 'make' is invoked, not when 'cmake', so execute_process command does not cut it. (does it?) For instance passing a date to a g++ compiler like that: g++ prog.cpp -o prog -DDATETIME="17:09:2009,14:25" But with DATETIME calculated at compile time. Any idea how to do it in CMake? Bounty edit: A least hackish solution will be accepted. Please note that I want to be able to