Site | Percent Goal |
---|---|
Quora | 2.59% |
Medium | 2.96% |
GitHub | 1.72% |
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
public interface ProductRepository extends CrudRepository<Product, String> | |
{ | |
List<Product> findByBuyPriceGreaterThanOrderByBuyPriceDesc(BigDecimal buyPrice); | |
} |
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
select ... | |
from products product0_ | |
where product0_.buyPrice>? | |
order by product0_.buyPrice desc |
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
@SpringBootApplication | |
public class Application | |
{ | |
private static final Logger log = LoggerFactory.getLogger(Application.class); | |
public static void main(String[] args) | |
{ | |
SpringApplication.run(Application.class); | |
} |
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
doTheFirstThing(function (err, firstResult) { | |
doTheSecondThing(firstResult, function (err, secondResult) { | |
doTheThirdThing(secondResult, function (err, thirdResult) { | |
doTheFourthThing(thirdResult); | |
}); | |
}); | |
}); |
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
doTheFirstThing() | |
.then(doTheSecondThing) | |
.then(doTheThirdThing) | |
.then(doTheFourthThing); |
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 someOtherModule = require('./someOtherModule'); | |
var myModule = function() { | |
this.doSomethingCool(input, callback) { | |
// do something cool here | |
return someOtherModule.thatReturnsPromises(input) | |
.then(function (result) { | |
// do something else cool here | |
return result++; | |
}) |
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 myModule = require('myModule'); | |
myModule.doSomethingCool(100, function (err, result) { | |
if (err) { | |
console.error(err); | |
return; | |
} | |
console.log(result); | |
}); |
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 myModule = require('myModule'); | |
myModule.doSomethingCool(100) | |
.then(function (result) { | |
console.log(result); | |
}) | |
.error(function (err) { | |
console.error(err); | |
}); |