This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program testingist | |
implicit none | |
integer :: i | |
i=3 | |
print *,"Hello the value of i:",i | |
end program testingist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$('#submit_item').click(function() { | |
var item = $('#item').val(); | |
$.post("demo/process", { | |
"item": item | |
}, function(data) { | |
console.log(data.result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the Oracle JDK Repos | |
UBUNTU_VERSION=precise | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu ${UBUNTU_VERSION} main" | tee /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu ${UBUNTU_VERSION} main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
DEBIAN_FRONTEND="noninteractive" apt-get update | |
# Accept the Oracle License | |
echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 boolean true" > /tmp/oracle-license-debconf | |
/usr/bin/debconf-set-selections /tmp/oracle-license-debconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function downloadFile($file,$name,$mime_type=''){ | |
/* | |
This function takes a path to a file to output ($file), | |
the filename that the browser will see ($name) and | |
the MIME type of the file ($mime_type, optional). | |
If you want to do something on download abort/finish, | |
register_shutdown_function('function_name'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function string_concat(s1, s2) ! This is a comment | |
TYPE (string), INTENT(IN) :: s1, s2 | |
TYPE (string) string_concat | |
string_concat%string_data = s1%string_data(1:s1%length) // & | |
s2%string_data(1:s2%length) ! This is a continuation | |
string_concat%length = s1%length + s2%length | |
end fuction string_concat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE string_type | |
IMPLICIT NONE | |
TYPE string80 | |
INTEGER length | |
CHARACTER(LEN=80) :: string_data | |
END TYPE string80 | |
INTERFACE ASSIGNMENT(=) | |
MODULE PROCEDURE c_to_s_assign, s_to_c_assign | |
END INTERFACE | |
INTERFACE OPERATOR(//) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ex .true. | |
op .true. | |
nam cities | |
acc DIRECT | |
seq NO | |
frm UNFORMATTED | |
irec 100 | |
nr 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INTEGER(KIND=2) :: i | |
REAL(KIND=long) :: a | |
COMPLEX :: current | |
LOGICAL :: Pravda | |
CHARACTER(LEN=20) :: word | |
CHARACTER(LEN=2, KIND=Kanji) :: kanji_word |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program quebra_de_linha | |
write(*,*) "Esta é uma linha muito longa e necessita se continuada"& | |
&" em outra linha. Para isso usamos o caractere & para quebrar "& | |
&" e continuar a linha."& | |
&" . . ."& | |
&" até terminar a linha." | |
end program quebra_de_linha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# criando um dicionário vazio | |
>>> dict_atm = {} | |
>>> dict_atm | |
{} | |
# criando um dicionário com valores | |
>>> dict_atm = {'precip': 88, 'radiation': 687} | |
>>> dict_atm | |
{'precip': 88, 'radiation': 687} | |
# resgatando valor pela chave | |
>>> dict_atm['precip'] |
OlderNewer