Skip to content

Instantly share code, notes, and snippets.

View crai9's full-sized avatar
🏠
Working from home

Craig crai9

🏠
Working from home
  • Glasgow, United Kingdom
  • 21:23 (UTC +01:00)
View GitHub Profile
public static String GetExeArgs(String inPath, String outPath, int seconds = 10)
{
//returns command line arguments
return "-t "+ seconds + " -i " + inPath + " -acodec copy " + outPath;
}
SELECT n.`notificationId`, n.`documentId`, n.`from`, d.`title`, CONCAT(u.`firstName`, " ", u.`lastName`) as fullName
FROM notifications n
INNER JOIN document_records d
ON `d`.`documentId` = n.`documentId`
INNER JOIN users u
ON u.`userId` = n.`from`
WHERE n.`to` = 204 AND n.`seen` = 0;
@RequestMapping(value = {"/checkUser"})
public UserStatus person(@RequestParam("username") String username, @RequestParam(value = "id", required = false) Integer id){
UserStatus u = new UserStatus();
if(id != null){
User u2 = DBManager.getUserById(id);
if(u2.getId() == 0){
u.setValid(false);
return u;
remote: {
message: 'The username is not available',
url: '../../checkUser',
data: function(validator) {
return {
id: validator.getFieldElements('id').val()
};
},
type: 'GET'
}