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
#include <exception> | |
#include <functional> | |
#include <iostream> | |
#include <stdexcept> | |
#include <string> | |
template<typename T> | |
class DEQeue | |
{ | |
public: |
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
#include <iostream> | |
#include <exception> | |
#include <stdexcept> | |
#include <functional> | |
#include <string> | |
// 1234-------- | |
template<typename T> | |
class QeueArray |
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
#include <iostream> | |
int cycle_lenght (int i) | |
{ | |
int lenght = 1; | |
int n = i; | |
while (n != 1) | |
{ | |
n = n % 2 == 0? n / 2 : 3 * n + 1; | |
lenght++; |
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
#include <cstdio> | |
#include <exception> | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
// 1234-------- | |
template<typename T> | |
class Stack |
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
// Compile with g++ -O2 -std=c++0x sho_test.cc -o sho_test | |
// or (gnu gcc 4.7 or above) | |
// Compile with g++ -O2 -std=c++11 sho_test.cc -o sho_test | |
// This package finds the ground state of the Simple Harmonic Oscillator | |
// with a test function \frac{\sqrt\alpha}{\pi^{\frac{1}{4}}} \exp( - \frac{1}{2} x^2\alpha^2) | |
#include <cmath> | |
#include <iomanip> | |
#include <iostream> |
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
#include <algorithm> | |
#include <iostream> | |
#include <valarray> | |
#include <vector> | |
template<typename T> | |
std::ostream& operator<< (std::ostream& os, std::valarray<T> va) | |
{ | |
for (auto&& i : va) | |
os << i << " "; |
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
In [1]: from ublog.models import Entry | |
In [2]: a = Entry.objects.get() | |
In [3]: a | |
Out[3]: <Entry: El título pero mas fuerte> | |
In [4]: a.title = "The title with more ñame" | |
In [5]: a.save() |
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
/* line 141, ../../app/bower_components/sass-bootstrap/lib/_forms.scss */ | |
.form-control[disabled], | |
.form-control[readonly], | |
fieldset[disabled] .form-control { | |
cursor: not-allowed; | |
background-color: #eeeeee; | |
} | |
/* line 148, ../../app/bower_components/sass-bootstrap/lib/_forms.scss */ |
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
subroutine sample_updatenbh(innb_, inbh_, ennb_, enbh_, & | |
r_, species_, st_, it_, stat_) | |
integer, allocatable, dimension(:), intent(inout) :: innb_ | |
integer, allocatable, dimension(:,:), intent(inout) :: inbh_ | |
integer, allocatable, dimension(:), intent(inout) :: ennb_ | |
integer, allocatable, dimension(:,:), intent(inout) :: enbh_ | |
double precision, allocatable, dimension(:,:), intent(in) :: r_ | |
integer, allocatable, dimension(:), intent(in) :: species_ | |
type(sampleTraits), intent(in) :: st_ |
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
side = 5 | |
for i in range(side): | |
for j in range(side): | |
print 0, " ", # La última coma es para evitar el salto de linea | |
print "" |
OlderNewer