Skip to content

Instantly share code, notes, and snippets.

@haoch
Last active October 12, 2015 07:57
Show Gist options
  • Save haoch/3994961 to your computer and use it in GitHub Desktop.
Save haoch/3994961 to your computer and use it in GitHub Desktop.
code comment style (python,javascript,css,java,...)
/* Name
*
* Description
*
* Created by Hao Chen on 11/04/2012.
* Version 1.0 (c) 2012 __MyCompanyName__.All rights reserved.
* Released under Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.html.
*/
/* style name
* -------------------------------------------------------------- */
selector {
attribute : value ; /* description */
}
<!-- description ******************************************
******************************************************
***********.
======================================================= -->
<tag>
<subtag>
....
....
</subtag><!-- end subtag -->
</tag> <!-- end tag -->
/* Name
*
* Description
*
* Created by Hao Chen on 11/04/2012.
* Version 1.0 (c) 2012 __MyCompanyName__. All rights reserved.
* Released under Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.html.
*/
/* name
* description
*
* parameters
* arg -- arg description
* ... -- ...
*
* return
* value -- value description
*/
function func_name(arg){
/* code block
------------------------------------------------- */
// comment
//...
statement
...
return ..
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package __.__.__;
import __.__.__;
import __.__.__;
// ...
/**
title content
<p> description ... </p>
@author Hao Chen;
@since 0.1 */
class __CLASSNAME__ {
/**
Description tile
<p>Method detail description</p>
@since 0.1.0
*/
public static __TYPE__ __FUNCNAME__(){
// ...
}
}
//
// Hello_WorldAppDelegate.h
// Hello World
//
// Created by Hao Chen on 11/04/12.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
""" Subject ****************************************************
Description*****************************************************
Detail**********************************************************
****************************************************************
Created by Hao Chen <cn.haochen@gmail.com> on 11/04/12.
Version 1.0 (c) 2012 __MyCompanyName__. All rights reserved.
Released under Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.html.
"""
class ClassName:
""" subject ****************************************************
description *********************************************************************
***************************************************************************** """
def method(*arg,**kargs):
''' description ****************************************************
********************************************************************
********.
arg -- arg description
arg2 -- arg2 description
'''
# comment 1
statement1
# comment 2
statement2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment