This file contains hidden or 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
| jQuery (j) => | |
| setInterval -> | |
| $('link[rel="stylesheet"]').each -> @href = @href.replace(/\?.*|$/, '?reload=' + new Date().getTime()) | |
| , 100 |
This file contains hidden or 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
| #!/bin/bash | |
| ### BEGIN INIT INFO | |
| # Provides: APPLICATION | |
| # Required-Start: $all | |
| # Required-Stop: $network $local_fs $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: Start the APPLICATION unicorns at boot | |
| # Description: Enable APPLICATION at boot time. |
This file contains hidden or 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
| int centerX = size / 2; | |
| int centerZ = size / 2; | |
| data[idx(centerX, size - 1, centerZ)] = 1; | |
| for(int i = 0; i < 128; ++i) | |
| { | |
| int endX = std::rand() % (size - 1); | |
| int endZ = std::rand() % (size - 1); |
This file contains hidden or 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
| class User < ActiveRecord::Base | |
| devise :database_authenticatable, :registerable, | |
| :recoverable, :rememberable, :trackable, :validatable | |
| attr_accessible :email, :password, :password_confirmation, :remember_me, :name | |
| validates :name, :presence => true, :uniqueness => true | |
| has_inboxes | |
| end |
This file contains hidden or 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
| struct State | |
| { | |
| vector3df rotate; | |
| vector3df prevPoint; | |
| State() : rotate(vector3df()) {} | |
| State(const State& other) : rotate(other.rotate), prevPoint(other.prevPoint) { } | |
| }; | |
| typedef std::vector<line3df> Lines; |
This file contains hidden or 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 <irrlicht.h> | |
| #include <vector> | |
| #include <iostream> | |
| #include <stack> | |
| #include <map> | |
| #include <functional> | |
| using namespace irr; | |
| using namespace core; | |
| using namespace scene; |
This file contains hidden or 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
| struct MapVector3 | |
| { | |
| Ogre::Vector3 point; | |
| MapVector3(const Ogre::Vector3 &_point) : point(_point) {} | |
| bool operator<( const MapVector3 &rhs ) const | |
| { | |
| if( point.x < rhs.point.x ) | |
| return true; | |
| else if( point.x == rhs.point.x ) |
This file contains hidden or 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
| float discreteNoise( uint32 x ) | |
| { | |
| uint32 t; | |
| x=(x<<13)^x; | |
| t = x*790169+x*x*x*15731 + 1376312588; | |
| return (float)( 1.0-(t%1073741824)/536870912.0 ); | |
| } | |
| float discreteNoise(uint32 x,uint32 y ) | |
| { |
This file contains hidden or 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 <stdio.h> | |
| #include <math.h> | |
| int main(void) | |
| { | |
| double x, y; | |
| printf("Введите координату x >"); | |
| scanf("%lf", &x); |
This file contains hidden or 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 <stdio.h> | |
| #include <math.h> | |
| #define SIZE 9 | |
| int matrix[SIZE][SIZE]; | |
| int main(void) | |
| { | |
| int x, y, step; |