Month: January 2021

Learn English from News 2021-01-30 15:35

weather, storm, heavy, snow, dangerous, conditions, rule, wear, face, heiress, share, money, rally, ready, probe, riot, evidence, coordination, assault, Washington, January, release, man, Afghanistan

Here are five News Headlines from today’s news.

  • N.J. weather: Winter storm warnings issued with heavy wind-driven snow, dangerous driving conditions expected – NJ.com
  • CDC issues rule requiring travelers to wear face masks – POLITICO
  • Report: Publix heiress gave ‘lion’s share’ of money for Jan. 6 Trump rally – WJXT News4JAX
  • ‘Be ready to fight’: FBI probe of U.S. Capitol riot finds evidence detailing coordination of an assault – The Washington Post
  • $1,400 stimulus checks: Where we stand as January ends – fox8.com
  • Biden faces calls to secure release of U.S. man in Afghanistan – NBC News

Here an analysis of the words that came in the news headline for today:

weather:
Def.: the atmospheric conditions that comprise the state of the atmosphere in terms of temperature and wind and clouds and precipitation
synonyms: atmospheric_condition, weather, weather_condition, conditions
antonyms:

storm:
Def.: a violent weather condition with winds 64-72 knots (11 on the Beaufort scale) and precipitation and thunder and lightning
synonyms: storm, tempest, violent_storm
antonyms:

heavy:
Def.: an actor who plays villainous roles
synonyms: heavy
antonyms: light

snow:
Def.: precipitation falling from clouds in the form of ice crystals
synonyms: C._P._Snow, Snow, snow, snowfall
antonyms:

dangerous:
Def.: involving or causing danger or risk; liable to hurt or harm
synonyms: grave, dangerous, unsafe, grievous
antonyms: safe

conditions
Def.: the prevailing context that influences the performance or the outcome of a process
synonyms: weather, weather_condition, conditions
antonyms:

rule:
Def.: a principle or condition that customarily governs behavior
synonyms: rule, convention, pattern, normal, regulation
antonyms:

wear:
Def.: impairment resulting from long use
synonyms: clothing, article_of_clothing, vesture, wear
antonyms: refresh

face
Def.: the front of the human head from the forehead to the chin and ear to ear
synonyms: look, expression, human_face, face, aspect
antonyms: back, avoid

heiress
Def.: a female heir
synonyms: heiress, inheritress, inheritrix
antonyms:

share
Def.: assets belonging to or due to or contributed by an individual person or group
synonyms: part, share, percentage, portion
antonyms:

money
Def.: the most common medium of exchange; functions as legal tender
synonyms: money
antonyms:

rally
Def.: a large gathering of people intended to arouse enthusiasm
synonyms: mass_meeting, rally, rallying
antonyms: demobilize

ready
Def.: poised for action
synonyms: make, ready, cook, fix
antonyms: unready

probe
Def.: an inquiry into unfamiliar or questionable activities
synonyms: probe, investigation
antonyms:

riot
Def.: a public act of violence by an unruly mob
synonyms: public_violence, riot, belly_laugh, rioting
antonyms:

evidence
Def.: your basis for belief or disbelief; knowledge on which to base belief
synonyms: attest, grounds, evidence
antonyms:

coordination
Def.: the skillful and effective interaction of movements
synonyms: coordination
antonyms: incoordination

assault
Def.: close fighting during the culmination of a military attack
synonyms: Assault, violation, assault, rape
antonyms:

Washington
Def.: the capital of the United States in the District of Columbia and a tourist mecca; George Washington commissioned Charles L’Enfant to lay out the city in 1791
synonyms: Washington, Washington_D.C., American_capital, capital_of_the_United_States
antonyms:

January
Def.: the first month of the year; begins 10 days after the winter solstice
synonyms: Jan, January
antonyms:

release
Def.: merchandise issued for sale or public showing (especially a record or film)
synonyms: release, liberation, freeing
antonyms: hold, block, freeze, confine

man:
Def.: an adult person who is male (as opposed to a woman)
synonyms: military_man, man, adult_male, serviceman
antonyms: civilian, woman

Afghanistan
Def.: a mountainous landlocked country in central Asia; bordered by Iran to the west and Russia to the north and Pakistan to the east and south
synonyms: Afghanistan, Islamic_State_of_Afghanistan
antonyms:

{ Add a Comment }

How to add Google Admob banner to the first row in UItableview, Swift IOS

step 1: create file AdCell.swift


import UIKit
import GoogleMobileAds

class AdCell: UITableViewCell {
    override func awakeFromNib() {
        super.awakeFromNib()
        self.backgroundColor = .clear
    }
    
    class func cellBannerView(rootVC: UIViewController, frame: CGRect) -> GADBannerView {
           let bannerView = GADBannerView()
           bannerView.frame = frame
           bannerView.rootViewController = rootVC
           bannerView.adUnitID = "ca-app-pub-3940256099942544/6300978111"
        bannerView.adSize = GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(frame.size.width)
           return bannerView
       }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
    }
}

step 2: use the Adcell class:


 let bannerViewHeight = GADBannerView(adSize: kGADAdSizeBanner).frame.size.height



 override func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
             return bannerViewHeight + 15
    }

    override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
             let cell = AdCell(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: bannerViewHeight))                     
             let bannerView = AdCell.cellBannerView(rootVC: self, frame:cell.bounds)
             bannerView.translatesAutoresizingMaskIntoConstraints = false
             cell.addSubview(bannerView)
                                
             bannerView.centerXAnchor.constraint(equalTo: cell.centerXAnchor).isActive = true
             bannerView.centerYAnchor.constraint(equalTo: cell.centerYAnchor, constant: -3).isActive = true

             let request = GADRequest()
             bannerView.load(request)

             return cell
        }

{ Add a Comment }

How to show an Alert message when there is no internet connection, swift code

Use this code to show an alert to the user when there is no internet connection. SWIFT IOS code

import SystemConfiguration

override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        if isInternetAvailable() {
            observeUsers()
        } else {
            let alert = UIAlertController(title: "No Connection", message: "No internet connection, connect to the internet and try again.", preferredStyle: .alert)
            alert.addAction(UIAlertAction(title: "ok", style: .default, handler: nil))
            present(alert, animated: true, completion: nil)
            
            return
        }
        
    }



  func isInternetAvailable() -> Bool {
        var zeroAddress = sockaddr_in()
        zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
        zeroAddress.sin_family = sa_family_t(AF_INET)
        
        let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) {
            $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {zeroSockAddress in
                SCNetworkReachabilityCreateWithAddress(nil, zeroSockAddress)
            }
        }
        
        var flags = SCNetworkReachabilityFlags()
        if !SCNetworkReachabilityGetFlags(defaultRouteReachability!, &flags) {
            return false
        }
        let isReachable = flags.contains(.reachable)
        let needsConnection = flags.contains(.connectionRequired)
        return (isReachable && !needsConnection)
    }


{ Add a Comment }