Flex条件编译 - 是否可以在flex库项目中进行条件编译?(Flex conditional compilation-Is it possible to have conditional compilation in flex library project?)
使用Flex,在使用的条件编译中创建了桌面和Web应用程序。 它运行成功。 现在,我想为桌面和网络提供单个swc文件。 因此创建了满足该条件的库项目。 虽然在flex库项目中使用条件编译会遇到许多问题,例如冲突变量名和重复函数等等,这在使用没有swc文件的flex项目时我没有遇到过。
所以问题就出现了:是否可以对flex库项目进行条件编译?
Using Flex, created a desktop and web application in that used conditional compilation. It runs successfully. Now, I Would like to have the single swc file for both Desktop and web. So created the library project for satisfying that condition. While using conditional compilation in flex library project getting many issues like conflicts variable name and duplicate functions and so on, which I haven't faced while using flex projects without swc file.
So the question arises now: Is it possible to have conditional compilation on a flex library project?
原文:https://stackoverflow.com/questions/17062684
最满意答案
不,这不是流程的工作原理。
第2.3节第2段:
...如果字符或字符串文字的c-char-sequence , s-char-sequence或r-char-sequence之外的通用字符名称的十六进制值对应于控制字符...或者基本源字符集中的字符,程序格式不正确。
所以你的程序是不正确的。 有些编译器可能会选择以您指定的方式解析通用字符名称,但这将是非标准扩展。
除此之外,你做对了。 如果你写道:
R\ "\u0058(Please no?)\u0058"
\u0058
将被还原。No, that's not how the process works.
Section 2.3, paragraph 2:
... if the hexadecimal value for a universal-character-name outside the c-char-sequence, s-char-sequence, or r-char-sequence of a character or string literal corresponds to a control character ... or to a character in the basic source character set, the program is ill-formed.
So your program is ill-formed. Some compilers may choose to resolve the universal-character-names in the way you indicate, but that would be a non-standard extension.
Other than that, you've got it right. If you wrote:
R\ "\u0058(Please no?)\u0058"
The
\u0058
's would be reverted.
相关问答
更多-
什么是“u”和“r”字符串标记,什么是原始字符串文字?(What exactly do “u” and “r” string flags do, and what are raw string literals?)[2022-05-09]
没有真正的“原始字符串 ”; 有原始的字符串文字 ,正是在开头报价之前用'r'标记的字符串文字。 “原始字符串文字”对于字符串文字来说略有不同的语法,其中反斜杠“ \ ”被视为“只是一个反斜杠”(除非它在否则会终止文字的引号之前)没有“转义序列”来表示换行符,制表符,后退空格,表单,等等。 在正常字符串文字中,每个反斜杠必须加倍,以避免被视为转义序列的开始。 这种语法变体的存在主要是因为正则表达式模式的语法很重,但反斜杠(但从不在最后),所以上面的“except”子句并不重要),而且当您避免将每个表达式加倍 ... -
不,这不是流程的工作原理。 第2.3节第2段: ...如果字符或字符串文字的c-char-sequence , s-char-sequence或r-char-sequence之外的通用字符名称的十六进制值对应于控制字符...或者基本源字符集中的字符,程序格式不正确。 所以你的程序是不正确的。 有些编译器可能会选择以您指定的方式解析通用字符名称,但这将是非标准扩展。 除此之外,你做对了。 如果你写道: R\ "\u0058(Please no?)\u0058" \u0058将被还原。 No, that's ...
-
>>> u'\\u4f60\\u4f60'.decode('unicode_escape') u'\u4f60\u4f60' >>> u'\\u4f60\\u4f60'.decode('unicode_escape') u'\u4f60\u4f60'
-
直接比较应该开箱即用: In [1]: u'string' == 'string' Out[1]: True A direct comparison should work out of the box: In [1]: u'string' == 'string' Out[1]: True
-
不幸的是,我不知道一种评估。 String s = "aaa\\u2022bbb\\u2014ccc"; StringBuffer buf = new StringBuffer(); Matcher m = Pattern.compile("\\\\u([0-9A-Fa-f]{4})").matcher(s); while (m.find()) { try { int cp = Integer.parseInt(m.group(1), ...
-
无法理解为什么字母u在raw_input()的输出前加上前缀(Cannot understand why the letter u prefixes my output of the raw_input())[2021-12-10]
问题在于你的字符串插值。 在你的代码中,你使用类似于: print "Your name is %r" % name 相反,你要么使用: print "Your name is %s" % name ...这使Python手动将name视为字符串,或使用: print "Your name is {0}".format(name) ...这是更新,更优选的方式,并且不太挑剔使用。 以下是发生了什么的细节。 当你使用raw_input() ,Python会返回一种称为unicode字符串的特殊字符串 。 ... -
由于您的实体已经序列化,请将您的JsonResponse更改为Response : use Symfony\Component\HttpFoundation\Response; // ... $response = new Response($jsonContent); $response->headers->set('Content-Type', 'application/json'); return $response; 或者在创建JsonResponse之前解码您的结果: return new ...
-
如果你真的需要这个,那么你可以使用这样的RE: UPDATE table SET c = regexp_replace(c, '[^\\]\\(u\d{4})', '\\\\\1', 'g'); 确保启用了standard_conforming_strings并将regex_flavor设置为高级。 SHOW standard_conforming_strings; standard_conforming_strings ----------------------------- on (1 row ...
-
这样的事情可以在负向前瞻的帮助下起作用: OUTPUT string(25) ""|\t|\n|\\u0027|\\u0022|"" string(29) ""|\\\t|\\\n|\\u0027|\\u ...
-
美丽的汤解码字符串(Beautiful Soup decode string)[2021-12-23]
s = "%u003c%u0062%u0072%u003e%u003c%u0064%u0069%u0076%u0020%u0063%u006c......" s = s.replace("%", "\\") print s.decode('unicode-escape') 并解析数字: s = "%u003c%u0062%u0072%u003e%u003c%u0064%u0069%u0076%u0020%u0063%u006c......" s = s.replace("%", "\\") html ...