Download http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin
Make the .bin file executable
$ chmod a+x AdobeAIRInstaller.bin
Run the .bin file by executing following
public ServiceResponse update(ServiceRequest request) | |
{ | |
final UserFeedPostDAO feedPostDAO = UserFeedPostDAO.newInstance(); | |
final UserFeedPost userFeedPost = (UserFeedPost) request.getDataAsObject(); | |
final UserFeedPost dbFeedPost = feedPostDAO.findByID(userFeedPost.getId()); | |
Integer sessionUserID = request.getUser().getUserId(); | |
List<Integer> roleList = Permission.getRolesByUID(sessionUserID); | |
updatedSummary(userFeedPost); | |
if (!Permission.isPostOwner(sessionUserID, userFeedPost.getUserId())) { | |
return validatePermittedGroupAndGetUpdateResponse(feedPostDAO, userFeedPost, roleList); |
package controllers; | |
import java.io.File; | |
import java.util.List; | |
import play.mvc.BodyParser; | |
import play.mvc.BodyParser.Of; | |
import play.mvc.Controller; | |
import play.mvc.Http.MultipartFormData; | |
import play.mvc.Http.MultipartFormData.FilePart; |
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
Download http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRInstaller.bin
Make the .bin file executable
$ chmod a+x AdobeAIRInstaller.bin
Run the .bin file by executing following
name := """pavilion-play-v0.2""" | |
version := "1.0-SNAPSHOT" | |
lazy val root = (project in file(".")).enablePlugins(PlayJava) | |
//Admin panel start | |
lazy val gulpDirectory = baseDirectory{ _ / "pavilion-panel"} | |
includeFilter in (Assets, unmanagedResources) := "dist" |
lazy val gulpDirectory = baseDirectory { _ / "admin-panel" } | |
unmanagedResourceDirectories in Assets <+= gulpDirectory | |
includeFilter in Assets in unmanagedResourceDirectories := "bower_components" || "dist" || "tmp" | |
excludeFilter in Assets in unmanagedResourceDirectories := new SimpleFileFilter(_.getParent == "node_modules") |
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http'); | |
var app = express(); | |
var server = app.listen(3000); |
{ | |
"data": [ | |
{ | |
"like_count": 105, | |
"total_count": 111, | |
"share_count": 5, | |
"click_count": 0, | |
"comment_count": 1 | |
} | |
] |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.