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 |
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
PictureCallback myPictureCallback_JPG = new PictureCallback(){ | |
@Override | |
public void onPictureTaken(byte[] data, Camera arg1) { | |
// TODO Auto-generated method stub | |
try { | |
private final INT_QUALITY = 2; | |
BitmapFactory.Options options=new BitmapFactory.Options(); | |
options.inSampleSize = INT_QUALITY; |
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 javascript line into your bookmark and click on a page | |
//known bug: if jquery is not loaded this will only work on the 2nd click | |
javascript: (function() { if (!window.jQuery) { var script = document.createElement('script'); script.src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"; | |
document.body.appendChild(script); } if (window.markAllElementsBackground) { $('*').each(function() { $(this).css('background-color',$(this).data('save-background-color-data')) }); window.markAllElementsBackground = false; } else { $('*').each(function() { $(this).data('save-background-color-data', $(this).css('background-color')); var color = "#" + Math.floor(Math.random() * 0xFFFFFF).toString(16);$(this).css('background-color', color )}); window.markAllElementsBackground = true ; }})(); | |
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 term_id,count(name) as counter FROM `tbl_term_character` | |
WHERE | |
(name="Size" && (value & b'10')) | |
|| | |
(name="HeadColors" && (value & b'110')) | |
group by term_id | |
having counter = 2 |
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
<env>production</env> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |
<spring.core.version>4.0.6.RELEASE</spring.core.version> | |
<spring.security.core.version>3.2.4.RELEASE</spring.security.core.version> | |
<spring.data.jpa.version>1.6.2.RELEASE</spring.data.jpa.version> | |
<spring.test.version>4.0.6.RELEASE</spring.test.version> | |
<cglib.version>3.1</cglib.version> | |
<org.javassist.version>3.18.2-GA</org.javassist.version> | |
<aspectj.version>1.8.1</aspectj.version> |
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
//new idea to calculate instead of the *FIRST setRectToRect & Translation* | |
//note 1: We do not want to resize the grid - the grid window in his original size | |
//note 2: We acully just want to move the grid from his left top corner to the center of the preivew | |
//note 3: The **SECOND** setRectToRect should be keept because this is the mapping between the *preview* and the *real image* | |
Bitmap bitmapPicture = BitmapFactory.decodeByteArray(data, INT_START, data.length); | |
RectF previewRect = new RectF(0, 0, previewWidth, previewHeight); | |
RectF pictureRect = new RectF(0, 0, bitmapPicture.getWidth(), bitmapPicture.getHeight()); | |
//RectF nativeResRect = new RectF(0, 0, screenWidth, screenHeight); // we actully dont care about the native res because we have the grid coordiantes | |
RectF resultRect = new RectF(0, gridTop, gridRight, gridBottom); | |
final Matrix scaleMatrix = new Matrix(); |