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
MvcResult result = (MvcResult) mockMvc.perform(post("/api/search/report/advanced").contentType(TestUtil.APPLICATION_JSON_UTF8) | |
.content(pageRequest.getBytes())) | |
.andExpect(status().isOk()) | |
.andExpect(content().contentType(TestUtil.APPLICATION_JSON_UTF8)) | |
.andExpect(jsonPath("$[0].page").value(page.intValue())) | |
.andExpect(jsonPath("$[0].page").exists()).andReturn(); | |
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
booolView.render().$el.find('img').one('load', function(event) { | |
/* make sure to cancel timeout first */ | |
model.trigger('boool:load-event'); | |
self.collection.trigger('boool:load-event'); | |
console.log('loaded'); | |
}).one('error', function(event) { | |
console.log('error loading the img'); |
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
connect: { | |
options: { | |
port: 9000, | |
// // change this to '0.0.0.0' to access the server from outside | |
// // hostname: 'localhost' | |
hostname: '0.0.0.0' | |
}, | |
livereload: { | |
options: { | |
middleware: function (connect) { |
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
/** | |
* | |
* add bind to function prototype example | |
* model.on('click',myobject.somefunction.bind(this)); | |
* | |
*/ | |
Function.prototype.bind = function(context) { | |
var fn = this; // correlates to this.onTimeout | |
return function() { // what gets passed: an anonymous 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
/* this WORKS */ | |
@RequestMapping(value = "{field}/image/{name}.jpg", method = RequestMethod.GET) | |
public void getImage(HttpServletResponse response, @PathVariable("field") String field,@PathVariable("name") String name) | |
throws NoSuchImageException, BadFieldNameException, IOException, PathTraversalException { | |
model.uploadMagdirImageFile(MagdirPrecondition.fieldNameOk(field),name, response); | |
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
based on http://stackoverflow.com/a/19346375/1211174 | |
UPDATE `reports` r | |
INNER JOIN | |
`reportstemp` as t | |
ON | |
`r`.`REPORT_ID`= `t`.`REPORT_ID` | |
SET | |
`r`.`LAST_MODIFIED` = `t`.`LAST_MODIFIED`, | |
`r`.`modifier_id` = `t`.`modifier_id` |
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 TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME | |
FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE COLLATION_NAME != 'utf8_general_ci' | |
LIMIT 0 , 30 |
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
Hibernate: | |
select | |
count(reportqs0_.REPORT_ID) as col_0_0_ | |
from | |
reports reportqs0_ | |
inner join | |
reports_projects projects1_ | |
on reportqs0_.REPORT_ID=projects1_.report_id | |
inner join | |
projects project2_ |
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 rp.report_id, rp.project_id, rp.project FROM `reports_projects` as rp where rp.project not in (select p.CODE from projects as p) limit 50 |
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
##version control: | |
http://git-scm.com/video/what-is-version-control | |
##git installing: | |
http://git-scm.com/ | |
##git learning: | |
http://git-scm.com/documentation | |
https://training.github.com/kit/downloads/github-git-cheat-sheet.pdf |
OlderNewer