comments

Deserializing the comments in XML file

南笙酒味 提交于 2019-12-01 21:07:36
I am trying to deserialize the following sample XML file.I have created the schema for this XML file.With the help of schema i am able to deserialize the XML into object. But my problem is i have a XML comments(ex: <!----Test--> ) on my XML file.Deserializer is not reading the comments from the XML to object which i created using schema. And also i noted there is no entry available in schema for the comment node. How can i read the comments from XML file to object? The point of object serialization is to save the state of an object, and restore it later. Object fields are mapped to XML

Disabling comments or likes on a specific post made via the Facebook API

只愿长相守 提交于 2019-12-01 20:48:33
I have an app that posts a message to a person's Facebook Timeline / wall. Is there a way to disable commenting or likes on that post via the Graph API? You can only disable commenting for a post if the end user is a 'page' or public profile, but not if posting to a normal user. No that's not possible with graph api! No - whether or not a post can be liked or commented on is determined by the privacy settings of the user who posted the content - for example, you may not be able to comment on posts in a Group, even if the posts are visible to you, because the Group admin has selected to only

How do you inspect the type of (*) on OCaml's toplevel?

醉酒当歌 提交于 2019-12-01 18:01:27
I wanted to see the type of the multiplication function (*), so I tapped it into the OCaml toplevel. # (*) However, the toplevel echoed: (*);; 1: this is the start of a comment. and then consumed any further input I put in. I figured that I had to get out of the comment mode by pressing Ctrl+d to send EOF. Great. But surely, I should be able to query the type of any function, including our mysterious multiplication function (*) ?! I would be incredibly disappointed if that is a limitation of the toplevel. It does recognize *) as the end of the comment, but it's still waiting for the end of the

Is it possible to change the way Xcode indents comment blocks?

烈酒焚心 提交于 2019-12-01 17:27:36
问题 By default, Xcode automatically indents multiple lines of code within C-style comment blocks by one space: /* this is a comment block line 1 line 2 */ Is it possible to modify this behaviour? I would prefer to have no indentation within comment blocks. 回答1: This is not a complete answer, but Xcode has code formatting options under the key XCCodeSenseFormattingOptions. You can set the options via command line or by editing the plist: defaults write com.apple.Xcode XCCodeSenseFormattingOptions

Setting the comment of a column to that of another column in Postgresql

雨燕双飞 提交于 2019-12-01 17:20:40
Suppose I create a table in Postgresql with a comment on a column: create table t1 ( c1 varchar(10) ); comment on column t1.c1 is 'foo'; Some time later, I decide to add another column: alter table t1 add column c2 varchar(20); I want to look up the comment contents of the first column, and associate with the new column: select comment_text from (what?) where table_name = 't1' and column_name = 'c1' The (what?) is going to be a system table, but after having looked around in pgAdmin and searching on the web I haven't learnt its name. Ideally I'd like to be able to: comment on column t1.c1 is

Is it possible to change the way Xcode indents comment blocks?

时光怂恿深爱的人放手 提交于 2019-12-01 17:06:31
By default, Xcode automatically indents multiple lines of code within C-style comment blocks by one space: /* this is a comment block line 1 line 2 */ Is it possible to modify this behaviour? I would prefer to have no indentation within comment blocks. This is not a complete answer, but Xcode has code formatting options under the key XCCodeSenseFormattingOptions. You can set the options via command line or by editing the plist: defaults write com.apple.Xcode XCCodeSenseFormattingOptions -dict PreExpressionsSpacing "" PreCommaSpacing " " Unfortunately, I cannot find any setting for the one

Do comments affect Perl performance?

泄露秘密 提交于 2019-12-01 16:51:07
I'm optimizing some frequently run Perl code (once per day per file). Do comments slow Perl scripts down? My experiments lean towards no: use Benchmark; timethese(20000000, { 'comments' => '$b=1; # comment ... (100 times) ', 'nocomments' => '$b=1;'}); Gives pretty much identical values (apart from noise). Benchmark: timing 10000000 iterations of comments, nocomments... comments: 1 wallclock secs ( 0.53 usr + 0.00 sys = 0.53 CPU) @ 18832391.71/s (n=10000000) nocomments: 0 wallclock secs ( 0.44 usr + 0.00 sys = 0.44 CPU) @ 22935779.82/s (n=10000000) Benchmark: timing 20000000 iterations of

Facebook App Domain disappears

本小妞迷上赌 提交于 2019-12-01 15:44:45
I've added a comment box to my site. I'm using an app_id. I've added my domain to "App Domain" in the settings section for the app. I save it. I then come back and the "App Domain" has disappeared. It's like it's not being saved. What am I doing wrong? I found how to do this - the UI and error messages are simply terrible. First, you need to set your site url in the website section - to eg http://www.example.com . Click Save Then you can go to the app domain field, type 'example.com' and press enter - it should highlight. You can do the same to add more domains. This managed to get them to

MySQL is not supporting single line comments here. What would be the reason?

删除回忆录丶 提交于 2019-12-01 15:34:49
问题 Here is what I am getting when I use single line comment (using -- ): ERROR 1064 (42000): You have an error in your SQL syntax Actually I am using these comments in a procedure to show what exactly a line does. Then I checked directly at the MySQL command line, but I got this error: mysql> select 1;--test select +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) -> ; check the manual that corresponds to your MySQL server version for the right syntax to use near '--test select' at line 1 Do

Add comment to excel using python win32

谁说胖子不能爱 提交于 2019-12-01 14:41:28
I am trying to add new comment to excel with python, using win32. import win32com.client as win32 excel = win32.gencache.EnsureDispatch('Excel.Application') wb = excel.Workbooks.Open(r'C:\...\.xlsx') ws = wb.Worksheets('sheet1') ws.Cells(1,1).AddComment = "comment" --> object has no attribute 'AddComment' Do you know how to add new comment to excel using win32? Thank you! Add comment is a method not a property. ws = wb.Worksheets('sheet1') ws.Cells(1,1).AddComment("comment") Just read the the documentation in the MSDN . 来源: https://stackoverflow.com/questions/47222373/add-comment-to-excel