This file contains hidden or 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
package com.bar.chatt.services.messaging; | |
import com.bar.chatt.models.MyMessage; | |
import org.springframework.messaging.Message; | |
public interface MessageReceptor { | |
Message<MyMessage> receive(); | |
} | |
This file contains hidden or 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 class RequestService { | |
private final OkHttpClient client; | |
private final Gson gson = new Gson(); | |
private String KEY; | |
private final String BASE_URL = "api.discountapi.com"; | |
private final String PATH = "/v2/deals"; | |
public RawResponse makeComplexRequest(Map<String, String> params) { |
This file contains hidden or 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
html { | |
min-height: 100vh; | |
min-width: 100vh; | |
} |
This file contains hidden or 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
mainActivityViewModel = new ViewModelProvider(this).get(MainActivityViewModel.class); | |
final Observer<SimpleEquation> equationObserver = equation -> { | |
Log.i(EQUATION, "Equation has changed!"); | |
List<Double> results = equation.getResultList(); | |
if (!results.isEmpty()) { | |
resultView.setText(Double.toString(results.get(results.size() - 1))); | |
} | |
}; |
This file contains hidden or 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
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:166) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:727) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:722) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:166) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:727) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:722) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:166) ~[jackson-databind-2.10.1.jar:2.10.1] | |
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAs |
This file contains hidden or 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
CREATE TABLE `instructors` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`email` varchar(255) DEFAULT NULL, | |
`first_name` varchar(255) DEFAULT NULL, | |
`last_name` varchar(255) DEFAULT NULL, | |
`instructor_details_id` bigint(20) DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `FKoywgffefgbvfhsfs8q8r1lv1k` (`instructor_details_id`), | |
CONSTRAINT `FKoywgffefgbvfhsfs8q8r1lv1k` FOREIGN KEY (`instructor_details_id`) REFERENCES `instructor_details` (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
This file contains hidden or 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
package com.example.demo.model; | |
import javax.persistence.CascadeType; | |
import javax.persistence.Column; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; | |
import javax.persistence.Id; | |
import javax.persistence.JoinColumn; | |
import javax.persistence.OneToOne; |
This file contains hidden or 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 void updateEmployee(long id , Employee employee) { | |
Employee emp = repo.findById(id).get(); | |
if(employee.getFirst_name() != null) { | |
emp.setFirst_name(employee.getFirst_name()); | |
} | |
if(employee.getLast_name() != null) { | |
emp.setLast_name(employee.getLast_name()); | |
} | |
repo.save(emp); | |
} |