- Name : Prasoon Shukla
- Email : [email protected]
- IRC : prasoon2211
def sort_bucket(s, bucket, order): | |
d = defaultdict(list) | |
for i in bucket: | |
key = s[i:i+order] | |
d[key].append(i) | |
result = [] | |
for k,v in sorted(d.iteritems()): | |
if len(v) > 1: | |
result += sort_bucket(s, v, order*2) | |
else: |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <unordered_map> | |
#include <algorithm> | |
#define PR cout << 11 << endl; | |
using namespace std; | |
string arr[50010]; | |
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <list> | |
#include <queue> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
class Graph { |
If your server documents are in /home/$USER/public_html directory you need to run | |
sudo chown -R www-data:www-data /home/$USER/public_html | |
to give ownership of the DocumentRoot folder to the user www-data and group www-data. | |
Then you can add yourself to the group www-data | |
sudo adduser $USER www-data |
Nodejs is a new development platform that focusses on developing realtime applications. In this tutorial, we'll be learning how to create a full-fledged chatting application, complete with support for multiple users and multiple chat rooms. We will start slow at first and slowly build up to our goal. This is the first of a multipart turotial series.
Before we start, let us first clarify what node.js is, exactly. Is it a language? No. In fact, node.js is a runtime environment that can run JavaScript code. Also, it is build on top of Google's V8 JavaScript engine. Simply put, this means that Node.js is fast. Fast enough that you can write a web server in it and be confident that it'll handle loads just as well as a server written in C.
Node.js is good for writing application that require constant, or almost constant communication with the server. The thing that separated node f
Parallax scrolling is a relatively new trend in web design. With this effect, you can create an illusion of depth on your webpage. Parallax works by making the background of the webpage scroll at a slower speed that the foreground, thus giving the scene a perceived depth.
So how do we do this? Well, it's quite simple really. Whenever a users scrolls on the page, we'll calculate how much the page has been scrolled. We'll then scale down this 'scroll-height' and move the background image up or down accordingly.
Here's the result we wish to achieve:
Don't worry though, this is just a gif image. The actual result is completely smooth.
* { | |
font-family: dejavu !important; | |
} | |
.fa { | |
font-family: FontAwesome !important; | |
} | |
.nav-pills > li > a:hover { | |
color: #0d93d2; |
* { | |
font-family: dejavu !important; | |
} | |
.fa { | |
font-family: FontAwesome !important; | |
} | |
.nav-pills > li > a:hover { | |
color: #0d93d2; |