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
| public class RomanToInt { | |
| private static final Map<String, Integer> conversionMap = new HashMap<String, Integer>() { | |
| { | |
| put("I", 1); | |
| put("IV", 4); | |
| put("V", 5); | |
| put("IX", 9); | |
| put("X", 10); | |
| put("XL", 40); | |
| put("L", 50); |
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
| package lan.dk.podcastserver.utils.multipart; | |
| import lan.dk.podcastserver.utils.MimeTypeUtils; | |
| import org.apache.commons.lang3.StringUtils; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import javax.servlet.ServletOutputStream; | |
| import javax.servlet.http.HttpServletRequest; | |
| import javax.servlet.http.HttpServletResponse; |
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
| use enron; | |
| db.messages.aggregate([ | |
| { $unwind: '$headers.To' }, | |
| { $project: { _id: 0, 'headers.To': 1, 'headers.From': 1 } }, | |
| { $group: { _id: { to: '$headers.To', from: '$headers.From' }, count: { $sum : 1 } } }, | |
| { $sort: { count: -1 } }, | |
| { $limit: 5 } | |
| ]); |
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
| user www-data; | |
| worker_processes 4; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 768; | |
| # multi_accept on; | |
| } | |
| http { |