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
--# Particle | |
Particle = class() | |
--Class to deal with individual particles. Used for the starburst and raindrops | |
function Particle:init(x,y,xspd,yspd,type,fade) | |
-- you can accept and set parameters here | |
--map to the position of the 100 by 100 blocks in the sprite sheet. The location in the array refers to the type of particle | |
local map={} | |
map[1]={x=0, y=4}--stars | |
map[2]={x=2, y=4}--rain |
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
<!-- to use hearts emoticon on a footer --> | |
<html> | |
<p>Made with <span id="hearts">♥</span> by Dibakar</p> | |
</html> |
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
var http = require('http'); | |
var hostname = '127.0.0.1'; | |
var port = 8080; | |
var server = http.createServer(function(req, res) { | |
res.statusCode = 200; | |
res.setHeader('Content-Type', 'text/plain'); | |
res.end('Hello World\n'); | |
}); |
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
const http = require('http'); | |
const url = require('url'); | |
const path = require('path'); | |
const fs = require('fs'); | |
const mimeTypes = { | |
"html": "text/html", | |
"jpeg": "image/jpeg", | |
"jpg": "image/jpg", | |
"png": "image/png", |
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
const http = require('http'); | |
const url = require('url'); | |
const path = require('path'); | |
const fs = require('fs'); | |
const mimeTypes = { | |
"html": "text/html", | |
"jpeg": "image/jpeg", | |
"jpg": "image/jpg", | |
"png": "image/png", |
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
if(stats.isFile()) { | |
var mimeType = mimeTypes[path.extname(fileName).split(".").reverse()[0]]; | |
res.writeHead(200, {'Content-type': mimeType}); | |
var fileStream = fs.createReadStream(fileName); | |
fileStream.pipe(res); | |
} else if (stats.isDirectory()) { | |
res.writeHead(302, { | |
'Location': 'index.html' | |
}); |
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 car { | |
char name[10]; | |
ind id; | |
public: | |
void getDetails(){} | |
}; | |
int main(){ | |
car ferrari; // ferrari is an object |
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 myFirst_class { | |
private: | |
// data members and member function declarations | |
public: | |
// data members and member function declarations | |
protected: | |
// data members and member function declarations | |
} |
OlderNewer