Recent programs

5.3

an anonymous user · May 26, 2022 · Bash
c=0
for m in {1..12}; do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  if [c<5]
  then
    c=$((c+1))
    [[ "$a" = *"31 days"* ]] && echo "$a"
done

5.3

an anonymous user · May 26, 2022 · Bash
c=0
for m in {1..12}; do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  if [c<5]
      then
        c=$((c+1))
        [[ "$a" = *"31 days"* ]] && echo "$a"
done

5.3

an anonymous user · May 26, 2022 · Bash
for m in {1..12};
do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  [[ "$a"= *"31 days"* ]] && echo "$a"
done 

5.3

an anonymous user · May 26, 2022 · Bash
for m in {1..12};
do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  [[ "$a"= *"31 days" ]] && echo "$a"
done 

print program

Shailu · updated May 26, 2022 · Assembly
section .data
   msg db "Hello World , This is Shailendra Chaudhari"
   msg_len equ $-msg
   
section .text

global _start
_start:
   mov rax,1 ;system call 1 for write operation
   mov rdi,2 ; system call 2 to carry stdout function
   mov rsi,msg  ;passing address to console to show content of variable

10a.r

an anonymous user · May 26, 2022 · R
array1=array(1:30,dim=c(3,5,2))
print(array1)

r program

an anonymous user · May 26, 2022 · R
list1=list(g1=1:10,g2="R programming",g3="HTML")
print("original list:")
print(list 1)
names(list1)=c("one","two","three")
print("Assign new names 'one','two'and'three'to the elements of the said list")
print(list1)

r program internal 3

an anonymous user · May 26, 2022 · R
list_data <- list(c("Red","Green","Black"), matrix(c(1,3,5,7,9,11), nrow = 2),
list("Python", "PHP", "Java"))
print("List:")
print(list_data)
print("Remove the second element of the list:")
list_data[2] = NULL
print("New list:")
print(list_data)

r 1

an anonymous user · May 26, 2022 · R
a<- c(1,2,3)
b<- c(4,5,6)
c<- c(7,8,9)
m<- cbind(a,b,c)
print("content of the said matrix:")
print(m)




find levels of factor

an anonymous user · May 26, 2022 · R
v = c(1, 2, 3, 3, 4, NA, 3, 2, 4, 5, NA, 5)
print("Original vector:")
print(v)
print("Levels of factor of the said vector:")
print(levels(factor(v)))

5.3

an anonymous user · May 26, 2022 · Bash
for m in {1..12}; do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  [[ "$a" = *"31 days"* ]] && echo "$a"
done

r program internal 2

an anonymous user · May 26, 2022 · R
a = c(10,20,10,10,40,50,20,30)
b = c(10,30,10,20,0,50,30,30)
print("Original data frame:")
ab = data.frame(a,b)
print(ab)
print("Duplicate elements of the said data frame:")
print(duplicated(ab))
print("Unique rows of the said data frame:")
print(unique(ab))

r install

an anonymous user · May 26, 2022 · R
name = readline(prompt="Input your name: ")
age =  readline(prompt="Input your age: ")
print(paste("My name is",name, "and I am",age ,"years old."))
print(R.version.string)

r 1

an anonymous user · May 26, 2022 · R
a<- c(1,2,3)
b<- c(4,5,6)
c<- c(7,8,9)
m<- cbind(a,b,c)
print("content of the said matrix:")
print(m)




5.4

an anonymous user · May 26, 2022 · Bash
#!/bin/bash
begin="-$(date +'%-m') + 2"
end="10+$begin"

for ((i=$begin; i<=$2end; i++)); do
    echo $(date -d "$i month -$(date +%d) days" | awk '{ printf "%s - %s days", $2, $3 }')
done

5.3

an anonymous user · May 26, 2022 · Bash
for m in {1..12}; do
  a=$(date -d "$m/1 + 1 month - 1 day" "+%b - %d days";)
  $ [[ "$a" = *"31 days"* ]] && echo "$a"
done

5.4

an anonymous user · May 26, 2022 · Bash
#!/bin/bash
begin="-$(date +'%-m') + 2"
end="10+$begin"

for ((i=$begin; i<=$end; i+2)); do
    echo $(date -d "$i month -$(date +%d) days" | awk '{ printf "%s - %s days", $2, $3 }')
done

calculator

an anonymous user · May 26, 2022 · Bash
echo "Enter Two numbers : "
read a
read b

echo "Enter Choice :"
echo "1. Addition"
echo "2. Subtraction"
echo "3. Multiplication"
echo "4. Division"
read ch

5.4

an anonymous user · May 26, 2022 · Bash
#!/bin/bash
begin="-$(date +'%-m') + 2"
end="10+$begin"

for ((i=$begin; i<=$end; i++)); do
    echo $(date -d "$2i month -$(date +%d) days" | awk '{ printf "%s - %s days", $2, $3 }')
done

assign new names

an anonymous user · May 26, 2022 · R
list1 = list(g1 = 1:10, g2 = "R Programming", g3 = "HTML")
print("Original list:")
print(list1)
names(list1) = c("one","two","three")
print("Assign new names 'one','two' and 'three' to the elements of the said list:")
print(list1)