This file contains 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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import com.google.common.collect.ComparisonChain; | |
import org.apache.commons.beanutils.BeanComparator; | |
import org.apache.commons.collections.comparators.ComparatorChain; | |
import org.apache.commons.lang3.builder.CompareToBuilder; |
This file contains 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
/* | |
Usage: | |
$ele.on('style', function(e, prop, value) { | |
if (prop == 'left') { | |
console.debug('new value for left: ' + value); | |
} | |
}); | |
*/ | |
// This plugin also throws events for individual style properties incase the entire 'style' attribute is removed | |
(function() { |
This file contains 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 express = require('express'); | |
var busboy = require('connect-busboy'); // middleware for form/file upload | |
var fs = require('fs'); | |
var app = express(); | |
app.use(express.static('./public')); | |
app.use(busboy()); | |
app.post('/testFormDataBinary', function(req, res) { | |
req.pipe(req.busboy); |
This file contains 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 express = require('express'); | |
var fs = require('fs'); | |
var multer = require('multer'); // v1.0.5 | |
var app = express(); | |
app.use(express.static('./public')); | |
var upload = multer(); // for parsing multipart/form-data | |
app.post('/testFormData', upload.array(), function(req, res) { |
This file contains 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 formData = new FormData(); | |
formData.append("user", "Mario"); | |
formData.append("testdot", imgData); | |
createRequest("POST", "some webservice", callback).send(formData); | |
/* | |
* SOLUTION 1 | |
*/ | |
function callback(file) { | |
var reader = new FileReader(); |
NewerOlder