Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Return

Andrey nOy39

💭
Return
View GitHub Profile
View gist:079a4c869151ce9f101a7ff7a375a654
package com.company;
public class Room {
Floor floor;
RoomType roomType;
int roomNumber;
String guest = "EMPTY";
boolean isSmoking;
View testPi
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /tmp/test_cross_compile
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
View querry 1
select task0_.id as taskId,
task0_.color as taskColor,
task0_.created as created,
task0_.is_done as isDone,
task0_.task_id as subTask_id,
task0_.user_id as user_id
from task task0_
where task0_.user_id=1 and (task0_.task_id is null)
group by task0_.id
order by task0_.id asc;
View for
List<TaskResponse> responseList = new ArrayList<>();
List<Task> mainContentList = taskRepo.findAllByUserAndSubTaskNullOrderByIdAsc(currentUser);
for (Task task: mainContentList) {
responseList.add(new TaskResponse(
task.getId(),
task.getName(),
task.getColor(),
task.getImageUrl(),
task.getCreated(),
task.getExpiredDate(),
@nOy39
nOy39 / Controller
Created Aug 31, 2018
HttpMediaTypeNotSupportedException
View Controller
@PostMapping(value = "image")
public void addImage(@RequestParam("file") MultipartFile file,
@RequestBody Workers workers) {
workers.setPhotoFile(utilService.createFileName(file));
workersRepo.save(workers);
}
View Spring variant 1(worked Post Method)
@PostMapping(value = "image")
public void addImage(@RequestParam("file") MultipartFile file,
@RequestParam("firstName") String firstName,
@RequestParam("lastName") String lastName,
@RequestParam("unit") String unit,
@RequestParam("job") String job) {
Workers workers = new Workers();
workers.setPhotoFile(utilService.createFileName(file));
workers.setFirstName(firstName);
workers.setLastName(lastName);
View nuxt.config.js
<script>
export default {
name: "main",
data() {
return {
test: [],
testJSPlaceHolder: [],
errors: []
}
},
View honcho.js
/*!
* Honcho
*
* Multiple PLC Manager
*
*/
/**
* Module dependencies
*/
@nOy39
nOy39 / webdev_online_resources.md
Created Jul 18, 2018 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
View webdev_online_resources.md
View main.js
var bearsApi = Vue.resource('/blog/bears/');
function findIndex(id, bears) {
let i = 0;
bears.forEach(function (element) {
if (element.id === id) {
console.log(i);
return i;
}