Here are two types of comment:
# Hello I can be viewed by the client. I'm a license or whatever
# I'm a personal note. I don't want to appear in the compiled js
It appears that in the compiled js, neither comment appears. I want to show a license, so how should I do this. What other types of comments are there with coffeescript. A shown multiline comment would be perfect for a license, for example.
From the fine manual:
Sometimes you'd like to pass a block comment through to the generated JavaScript. For example, when you need to embed a licensing header at the top of a file. Block comments, which mirror the syntax for block strings, are preserved in the generated code.
That even comes the example that:
###
SkinnyMochaHalfCaffScript Compiler v1.0
Released under the MIT License
###
becomes
/*
SkinnyMochaHalfCaffScript Compiler v1.0
Released under the MIT License
*/
in the generated JavaScript.
Related
I am reading the android platform-build docs with gnu makefile(Android.mk) from https://android.googlesource.com/platform/build/+/master/core/build-system.html.
Now I met an issue I didn't find a related template example?
<h3><a name="templates"/>How to add another component to the build - Android.mk templates</h3>
<p>You have a new library, a new app, or a new executable. For each of the
common types of modules, there is a corresponding file in the templates
directory. It will usually be enough to copy one of these, and fill in your
own values. Some of the more esoteric values are not included in the
templates, but are instead just documented here, as is the documentation
on using custom tools to generate files.</p>
<p>Mostly, you can just look for the TODO comments in the templates and do
what it says. Please remember to delete the TODO comments when you're done
to keep the files clean. The templates have minimal documentation in them,
because they're going to be copied, and when that gets stale, the copies just
won't get updated. So read on...</p>
<h4>Apps</h4>
<p>Use the <code>templates/apps</code> file.</p>
<p>This template is pretty self-explanitory. See the variables below for more
details.</p>
As sections mentioned above I assume there are somethings named 'templates' directory for
a library, apps ... But I couldn't find that in android source tree.
Could anyone enlighten me?
The examples are not located in a templates subfolder, but in the same directory as build-system.html:
binary.mk, shared_library.mk, java_library.mk, and many more.
Note: Android is switching from the Makefile-based build system to Soong. You might want to consider switching, too.
Till GWT 2.5, all the css class were obfuscated by default but in GWT 2.7, while running in super dev mode, it append complete package in class name. I have tried below but it does not work.
<set-configuration-property name="CssResource.style" value="obj"/>
I does not obfuscated css styles rather it prints name like com-google-gwt-user-cellview-client-CellTable-Style-cellTableCell.
This is on purpose. There's a comment in the code explaining why:
// CSSResourceGenerator needs to produce stable, unique naming for its input.
// Currently on default settings CssResourceGenerator's obfuscation depends on
// whole world knowledge and thus will produce collision in obfuscated mode, since in
// incremental compiles that information is not available.
along with a TODO to eventually fix the CSSResourceGenerator.
But, if I may ask, what's the problem with non-obfuscated style names?
I tried
s=Normalizer.normalize(s, Normalizer.Form.NFD).replaceAll("[^\\p{ASCII}]", "");
But it seems that GWT API doesn't provide such fonction.
I tried also :
s=s.replace("é",e);
But it doesn't work either
The scenario is I'am trying to générate token from the clicked Widget's text for the history management
You can take ASCII folding filter from Lucene and add to your project. You can just take foldToASCII() method from ASCIIFoldingFilter (the method does not have any dependencies). There is also a patch in Jira that has a full class for that without any dependencies - see here. It should be compiled by GWT without any problems. License should be also OK, since it is Apache License, but don't quote me on it - you should ask a real lawyer.
#okrasz, the foldToASCII() worked but I found a shorter one Transform a String to URL standard String in Java
I read some info regarding getting .h files for undocumented API. Most of sources recommend class-dump (or class-dump-x and class-dump-z).
However it doesn't work with iPhone Security.framework. It doesn't contain Objective-C runtime information.
The only other way which I found is to use nm or otool. This will give the names of functions and disassembly for them.
Does anybody know some faster way to get undocumented functions signature than reading disassembly and trying to figure out what parameters go where and what could it be?
You mean this undocumented api, documented here..
Security.framework is not private or undocumented.
As far as headers go, installed on my harddrive in the 3.2 sdk i find:
/Security.framework/Headers/Security.h
/Security.framework/Headers/Secbase.h
/Security.framework/Headers/SecCertificate.h
/Security.framework/Headers/SecIdentitiy.h
/Security.framework/Headers/SecImportExport.h
/Security.framework/Headers/SecItem.h
/Security.framework/Headers/SecKey.h
/Security.framework/Headers/SecPolicy.h
/Security.framework/Headers/SecRandom.h
/Security.framework/Headers/SecTrust.h
As for a little reverse engineering 101, you should realise that a framework doesn't contain or in anyway have a use for header files, or function signatures. When provided they are solely for the benefit of the developer. There is no C or C++ or objective-c code in the compiled framework, only the raw machine code.
As you have seen, if objective-c was used Class-Dump can do a pretty good job of arranging objective-c symbols into something that looks like a header file, only missing type information that isn't used at runtime, so still not that useful.
If the source language was C then you are screwed. There may be a function name symbol but there is no info about arguments or return type.
There are bunch of additional undocumented API's which are not mentioned in official documentation. As example, part of them could be seen here:
http://www.opensource.apple.com/source/Security/Security-55163.44/sec/Security/
I'm an independent developer working primarily with iPhone applications, and I'm currently engaged in several different projects. Some are for myself, and others are for one of a number of clients. Because of this, I'd like to have a way to have Xcode set the copyright notice at the top of each source file on a per-project basis.
I've seen these questions, and I understand that Xcode by default pulls the organization on the user's Address Book contact card for the copyright statement, and that you can change the property either in the Address Book or on the terminal. What I'm looking for is a setting that lets that default be changed for each project, and has Xcode remember the copyright assignee (i.e. I don't want to have to change my Address Book organization entry each time I switch projects).
You can change the organization Xcode currently uses by issuing the following command in Terminal:
defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME = "Some Company Name"; }'
You can then create scripts that switch the current company for Xcode.
Upgrade to Xcode 3.2, which now has a project setting for organization name.
You might want to make custom templates. Have a look at this question:
Change templates in Xcode
look in text macros section:
Change the text used for the header of a new file by setting the value of the FILEHEADER text macro.
The example shows the default definition for the macro. Other macros are included in the definition by including three underscore (___) characters before and after the name of the macro. The line with COPYRIGHT is included only if an organization name is set.
// ___FILENAME___
// ___PACKAGENAME___
//
// Created by ___FULLUSERNAME___ on ___DATE___.
// ___COPYRIGHT___
//