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
| curl --location --request PUT 'https://b-218e4d71-34b6-424a-ac0b-969fd2755b57.mq.ap-southeast-1.amazonaws.com//api/vhosts/rlife-prod' \ | |
| --header 'Authorization: Basic cHJkX21xX3VzZXI6dXNyIU1RUHIwZHVjKzFvbjAzMjAyNQ==' |
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
| ================================================================================= | |
| SA2 | |
| ================================================================================= | |
| We can think of a pixel value as a function that maps itself to values 0 to 255 in a grayscale image. | |
| True | |
| Which imadjust command should be applied to invert image img. | |
| imadjust(img, [], [1,0]) |
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
| disp('Project in Image Processing'); | |
| pkg load image; | |
| function remove_noise (f) | |
| clc; | |
| close all; | |
| clear; | |
| workspace; | |
| format long g; | |
| format compact; |
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
| clc; | |
| close all; | |
| clear; | |
| disp('Project in Image Processing'); | |
| %//////////// | |
| %/// MAIN /// | |
| %//////////// | |
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
| import java.util.Arrays; | |
| //add class definitions below this line | |
| class Median { | |
| public double calculateMedian(int num1, int num2, int num3, int num4, int num5){ | |
| int[] arr = { num1, num2, num3, num4, num5 }; | |
| double median = 0.0; | |
| Arrays.sort(arr); | |
| if (arr.length % 2 == 0){ | |
| median = ((double)arr[arr.length/2] + (double)arr[arr.length/2 - 1])/2; |
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
| interface Parent1 { | |
| public String identify(); | |
| public default String identify2() { | |
| return "This method is called from Parent1"; | |
| } | |
| } | |
| interface Parent2 { | |
| public String identify(); | |
| public default String identify3() { |
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 practice; | |
| //add class definitions below this line | |
| class SodaMachine { | |
| private String[] sodas = {"coke", "pepsi", "sprite", "dr. pepper"}; | |
| private int cokeInventory; | |
| private int pepsiInventory; | |
| private int spriteInventory; | |
| private int drPepperInventory; |
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
| //add class definitions below this line | |
| class Atm { | |
| private double money; | |
| public double getMoney(){ | |
| return money; | |
| } | |
| public void deposit(double s){ | |
| Double v = Double.valueOf(s); | |
| if(v>=0){ | |
| money += v; |
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
| //add class definitions below this line | |
| import java.util.*; | |
| class Watch { | |
| private String manufacturer; | |
| private String model; | |
| private int diameter; | |
| private int waterResistance; | |
| private String material; | |
| public Watch(String m, String mo, int d, int w, String ma){ | |
| manufacturer = m.toLowerCase(); |
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
| //add class definitions below this line | |
| import java.text.DecimalFormat; | |
| import java.math.RoundingMode; | |
| class Song{ | |
| private String artist; | |
| private String title; | |
| private String album; | |
| private int playCount; | |
| private static final Double PAY_RATE = 0.001; | |
| private Double moneyEarned; |
NewerOlder