Sunday, 22 June 2014

BASIC programs

logo

logo_rsf

BASIC programs

 

WORLD PRESS FREEDOM INDEX 2014 was released from Reporters Without Boarders.

 

We want to calculate 0 to 100 examination point for the country.

 

 

Calculations is (1 - (Rank-1)  / 180) * 100

 

 

No.1 is Finland,

 

(1 - (1 -1) / 180) * 100 = 100

 

 

France is No.39,

 

(1 - (39 -1) / 180) * 100 = 78.88888 = 78.89

 

 

Japan is No.59,

 

(1 - (59 -1) / 180) * 100 = 67.77777 = 67.78

 

 

Spain is No. 35,

 

(1 - (35 -1) / 180) * 100 = 81.11111 = 81.11

 

 

10 REM PRESS FREEDOM

20 PRINT "WORLD PRESS FREEDOM INDEX 2014"

30 INPUT A

40 B =  (1 - (A - 1) / 180) * 100

50 PRINT "THE POINT FOR THE COUNTRY = "; B

60 END

 

 

Where is your country ?

 

What point does your country get ?

 

 

Homework: Make flow chart for this program.


 


(R.S.F. toshiki speed news press, Agence France-Presse, 23 Monday June 2014 The Roman)



 

Maybe you can make another calculate program.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 23 Monday June 2014 The Roman)

 

Thursday, 19 June 2014

BASIC programs

logo

logo_rsf

BASIC programs

 

This article is about arithmetical operator, mathematical operator, and character.

 

 

We already used / and +.

 

+ is plus.

 

/ is divide.

 

minus is -.

 

multiple is *.

 

Parentheses ( and ) have high priority.

 

Calculate order is multiple and divide -> plus and minus.

 

 

10 REM Calculate

20 LET I=5

30 LET J=2

40 PRINT  I+J

50 PRINT I/J

60 PRINT I-J

70 PRINT I*J

80 PRINT (I+J) * 2

90 END

 

 

Then run,

 

7

2.5

3

10

14

 

 

We used LET statement in this program.

 

LET is a statement for an announcement.

 

10 LET I=5

 

means we use I equal 5.

 

 

Computer can calculate.

 

Computer can be a calculator.

 

 

Next is A$ (What we wanted to do was not CHAR$, what we wanted to do was A$).

 

 

10 REM Character

10 INPUT A$

20 PRINT A$

30 END

 

 

Then run,

 

If you input HELLO, then computer returns HELLO.

 

 

10 REM Small AI

20 INPUT A$

30 PRINT A$

40 GOTO 20

50 END

 

 

Then run, your computer will answer the same words for you.

 

Push Control key + C key will stop this program.

 

 

10 REM You can add characters

20 INPUT A$

30 INPUT B$

40 PRINT A$ + B$

50 END

 

(Program-6-20-2014)

 

 

Then run,

 

?

HELLO

?

WORLD

 

Computer will print HELLOWORLD.

 

 

Please learn deference of number and character.

 

 

If you run Program-6-20-2014, and,

 

?

2

?

5

 

Computer will print 25.

 

 

10 REM World Cup

20 INPUT A$

30 INPUT B$

40 INPUT C$

50 INPUT D$

60 PRINT A$ + B$ + C$ + D$

70 END

 

 

Then run,

 

?

Japan

?

Colombia

?

Cote d'Ivoire

?

Greece

 

Computer will show JapanColombiaCote d'IvoireGreece.

 

 

Homework: Write many BASIC programs with arithmetic operators. Make many flow charts for programs in this article and your programs.

 

 

10 REM Area for quadrangle

20 INPUT A

30 INPUT B

40 PRINT A*B

60 END

 

This program print area for quadrangle. (A is a height, B is a width)

 

 

10 REM Area for triangle

10 INPUT A

20 INPUT B

30 PRINT A*B / 2

40 END

 

This program print area for triangle. (A is a height, B is a width)

 

 

Homework: Make BASIC programs for many area calculations and many volume calculations in mathematics. Make all flow charts for your programs.

 

 

(R.S.F. toshiki speed news press, Agence France-Presse, 20 Friday June 2014 The Roman)

 

 

Be this World Cup will good memory for you.

 

 

(R.S.F. toshiki speed news press, Agence France-Presse, 20 Friday June 2014 The Roman)

 

 

 

Cyber attacks loom over KSA, UAE, Qatar oil firms

Cyber attacks loom over KSA, UAE, Qatar oil firms

 

[caption id="attachment_232" align="alignnone" width="300"]1a4c83f8-9c34-410b-b30b-2874bb756b55_16x9_600x338 (A Middle East-based group of hackers has issued a threat warning of cyber attacks against oil, gas and energy companies. (Shutterstock))[/caption]

 

A Middle East-based group of hackers has issued a threat warning of cyber attacks against oil, gas and energy companies in the Middle East, security firm Symantec has revealed.

 

The threat, made by Anonymous, a politically- motivated group of hacktivists, states that they are planning to attack before, during, and after June 20, 2014.

 

This is due to Anonymous disagreeing with the United States dollar being used as the currency to buy and sell oil, Symantec said.

 

According to the security firm, governments that may be attacked include those in The Kingdom of Saudi Arabia, The State of Kuwait and The State of Qatar.

 

Some of the possible company targets include Kuwait Oil Company, Petroleum Development Oman, Qatar Petroleum, Saudi Aramco, ADNOC, ENOC and Bahrain Petroleum Company.

 

While there are limited details regarding the tools that will be used, based on previous observations, Symantec said the attacks will most likely include distributed denial of service (DDoS) attacks, phishing/spear-phishing emails, intrusion and data-theft attempts, vulnerable software exploration, web application exploits, and website defacement.

 

“Public announcements by these groups are often used as a means to gain notoriety or media attention and can be of highly volatile credibility,” the company said.

 

The Middle East’s petrochemical industry has been vulnerable to cyber attacks over the last few years, and Saudi Aramco, the world’s biggest oil producer, was hit by a major virus infection in August 2012.

 

Security experts have warned that the region is not well-prepared to deal with cyber crime and is susceptible to attacks.

 

Symantec said it has detection measures in place regarding the recent threat and also issued some recommendations:

 

Use a layered approach to securing your environment, including enterprise-wide security monitoring.

 

Deploy network intrusion detection/prevention systems to monitor network traffic for malicious activity.

 

Ensure all operating systems and public facing machines have the latest versions and security patches, and antivirus software and definitions up to date.

 

*This article was originally published in Saudi Gazette on June 18, 2014.

 

(Saudi Gazette, Dubai)

 

(Al arabiya News, 8 Wednesday June 2014 The Roman)

 

Wednesday, 11 June 2014

BASIC programs

logo

logo_rsf

BASIC programs

 

This article is for analysis programming beginning.

 

 

10 REM DIMENSION AND AVERAGE

20 DIM A(4)

30 FOR I=0 TO 4

40 READ A(I)

50 NEXT I

60 DATA 0,1,2,3,4

70 REM AVERAGE

80 FOR M=0 TO 4

90 J=J+A(M)

100 NEXT M

110 PRINT M

120 PRINT M/5

130 END

 

 

We set DIM A(4), we READ data, we count all sum for DIM A(4), we print all sum for DIM A(4), we print average for DIM A(4).

 

If we do not clear dimension in memory, then dimension datas are in memory.

 

We can use this dimension datas in the same program.

 

 

Then,

 

We set DIM A(1, 4)

 

 

10 REM DIM A(I, J) AND ANALYSIS

20 DIM A(1,4)

30 FOR I=0 TO 1

40 FOR J=0 TO 4

50 READ (A(I,J)

60 PRINT "A(" ; I ; "," ; J ; ") ="; (A(I,J)

70 NEXT J

80 NEXT I

90 DATA 0,1,2,3,4

100 DATA 10,11,12,13,14

200 PRINT "A SAMPLE OF ANALYSIS"

210 FOR L=0 TO 4

220 S=S+A(0,L)

230 NEXT L

240 PRINT "TOTAL OF A(0,0,) A(0,1) A(0,2) A(0,3) A(0,4) ="; S

250 PRINT "AVERAGE OF A(0,0,) A(0,1) A(0,2) A(0,3) A(0,4) ="; S/5

300 END

 

 

This program shows many messages for you.

 

This program shows total and and average.

 

 

Can you make this program for A(1,0) A(1,1) A(1,2) A(1,3) A(1,4) ?

 

Can you make this program for all A(I,J) ?

 

 

Next program is;

 

 

10 REM INPUT AND AVERAGE

20 INPUT "COUNT ?" ; I

30 DIM A(I-1)

40 FOR J=0 TO (I-1)

50 INPUT A(J)

60 PRINT "A(" ; J ; ") =" ; A(J)

70 NEXT J

80 FOR L=0 TO (I-1)

90 S=S+A(L)

100 NEXT L

110 PRINT "INPUT NUMBERS COUNT =" ; I

120 PRINT "AVERAGE =" ; S/I

130 END

 

 

Let us run this program.

 

COUNT ?

 

then

 

2

 

First

 

?

 

then

 

155

 

Next

 

?

 

then

 

167.5

 

AVERAGE = 161.25

 

 

Please try by your family.

 

 

Next is CHAR$

 

 

10 REM CHAR$

20 INPUT CHAR$(A)

30 PRINT CHR$(A)

40 END

 

 

Then run this program,

 

?

 

You can input HELLO.

 

Computer will show HELLO.

 

 

10 REM CHAR$ AND GOTO

20 INPUT CHAR$(A)

30 PRINT CHAR$(A)

40 GOTO 20

50 END

 

 

You can talk with computer ?

 

Push Control key + C key at the same time will stop this program.

 

 

We used GOTO statement in this program.

 

GOTO 20 means GOTO Line number 20.

 

 

Homework: Make flow charts for all programs in this article.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 11 Wednesday June 2014 The Roman)

 

 

Friday, 6 June 2014

Twitter in talks to buy online music firm SoundCloud

Twitter in talks to buy online music firm SoundCloud

 

[caption id="attachment_220" align="alignnone" width="300"]4263cbae-3fdf-4199-8628-48f90bfcef61_16x9_600x338 (Microblogging platform Twitter Inc has been in talks with Berlin-based audio sharing website SoundCloud in its efforts to add a music service to its offering. (File photo: Reuters))[/caption]

 

Microblogging platform Twitter Inc has been in talks with Berlin-based audio sharing website SoundCloud in its efforts to add a music service to its offering, the Financial Times reported citing people familiar with the matter.

 

Twitter has weighed up deals worth billions of dollars and has also considered buying music-streaming service Spotify and internet-radio provider Pandora Media Inc, the newspaper.

 

SoundCloud is a platform that enables people to upload, record, promote and share their music and other audio files.

 

The company has aggressively expanded its capabilities to carry multimedia content.

 

Last year, it acquired “We Are Hunted,” a three-person music streaming-startup from Australia.

 

SoundCloud declined to comment on the deal while Twitter did not immediately respond to an email seeking comment outside regular the United States business hours.

 

Twitter’s renewed interest in music-streaming companies comes after Apple Inc acquired Beats, the headphones and music-streaming firm founded by Jimmy Iovine and Dr. Dre, for $3 billion.

 

The Beats deal was seen as Apple’s effort to jumpstart an uneven attempt to make headway in music streaming, the fastest-growing segment of the market, as iTunes sales decline.

 

Pandora Media and Spotify have raced ahead while Apple’s eight-month-old iTunes Radio has not made much of a dent.

 

(By Ankush Sharma | Reuters)

 

(Al Arabiya News, 5 Thursday June 2014 The Roman)

 

 

BASIC programs

logo

logo_rsf

BASIC programs

 

This article is dimension and READ statement.

 

 

10 REM DIM(4) AND READ

20 DIM A(4)

30 REM HERE WE SET DIM A(0) TO DIM A(4)

40 FOR I=0 TO 4

50 READ A(I)

60 NEXT I

70 DATA 0,1,2,3,4

80 END

 

 

The run,

 

A(0) is 0

A(1) is 1

A(2) is 2

A(3) is 3

A(4) is 4

 

 

Add,

 

55 PRINT A(I)

 

 

LIST is

 

10 REM DIM(4) AND READ

20 DIM A(4)

30 REM HERE WE SET DIM A(0) TO DIM A(4)

40 FOR I=0 TO 4

50 READ A(I)

55 PRINT A(I)

60 NEXT I

70 DATA 0,1,2,3,4

80 END

 

 

Then run,

 

0

1

2

3

4

 

 

We announced A(4), we read from DATA, input DATA to A(0) to A(4), and result, print result.

 

We call this type data as sequential data.

 

 

Next is loop again, double nest loop.

 

 

5 REM I LOOP

10 FOR I =0 TO 4

20 PRINT I

30 NEXT I

40 END

 

 

Then run,

 

0

1

2

3

4

 

 

I=0 to 4, print I.

 

 

Then,

 

 

5 REM J LOOP

10 FOR J =0 TO 4

20 PRINT J

30 NEXT J

40 END

 

 

Then run,

 

0

1

2

3

4

 

 

J=0 to 4, print J.

 

 

Then,

 

5 REM I LOOP, J LOOP

10 FOR I=0 TO 4

20 FOR J=0 TO 4

30 PRINT I,J

40 NEXT J

50 NEXT I

60 END

 

 

Then run,

 

0 0

0 1

0 2

0 4

1 0

1 1

 

.

.

 

4 3

4 4

 

 

I=0; Loop J=0 to 4

I=1; Loop J=0 to 4

I=2; Loop J=0 to 4

I=3; Loop J=0 to 4

I=4; Loop J=0 to 4

 

 

Then,

 

 

10 REM DIM A(I,J)

20 DIM A(4,4)

30 FOR I=0 TO 4

40 FOR J=0 TO4

50 READ A(I,J)

60 NEXT J

70 NEXT I

80 DATA 0,1,2,3,4

90 DATA 10,11,12,13,14

100 DATA 20,21,22,23,24

110 DATA 30,31,32,33,34

120 DATA 40,41,42,43,44

130 END

 

 

Then run,

 

 

A(0,0) 0

A(0,1) 1

.

.

A(4,3) 43

A(4,4) 44

 

 

Add 55 PRINT A(I,J)

 

 

LIST is,

 

10 REM DIM A(I,J)

20 DIM A(4,4)

30 FOR I=0 TO 4

40 FOR J=0 TO4

50 READ A(I,J)

55 PRINT A(I,J)

60 NEXT J

70 NEXT I

80 DATA 0,1,2,3,4

90 DATA 10,11,12,13,14

100 DATA 20,21,22,23,24

110 DATA 30,31,32,33,34

120 DATA 40,41,42,43,44

130 END

 

This will let you present readed DATA from sequential data.

 

 

0

1

2

3

4

10

11

 

..

 

41

42

43

44

 

 

You can understand how A(I,J) is changing.

 

 

Dimension and READ statement are used in economy analysis, mathematical analysis and multi valuable analysis, and many scenes.

 

 

Homework: Check ASCII code. Make all flow chart for BASIC programs in this article.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 6 Friday June 2014 The Roman)

 

A(I,J) is matrix dimension.

 

For example, A(4,4) is 5 x 5 matrix dimension.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 6 Friday June 2014 The Roman)

 

Wednesday, 4 June 2014

New apple software brings Macs and iPhones closer

New apple software brings Macs and iPhones closer

 

[caption id="attachment_202" align="alignnone" width="300"]Apple CEO Tim Cook introduces the IOS 8 operating system during his keynote address at the Worldwide Developers Conference in San Francisco, California (Apple CEO Tim Cook introduces the IOS 8 operating system during his keynote address at the Worldwide Developers Conference in San Francisco, California June 2, 2014 The Roman. (Reuters))[/caption]

 

Apple on Monday unveiled the new operating software it hopes will create a seamless experience for users flitting between its coveted mobile devices and popular Macintosh computers.

 

A next generation operating system called “Yosemite” and new iOS 8 software for iPads, iPhones and iPod devices were unveiled before 6,000 developers at a sold-out conference here.

 

In a keynote presentation, chief executive Tim Cook said this would make it easy to start tasks on one Apple device and to continue on another, “a seamless experience unparalleled in the industry.”

 

Alongside the operating system updates, the California company -- the world’s largest by market value -- unveiled HealthKit software to manage personal healthcare and HomeKit for home appliances.

 

Apple played to its audience at the conference for third-party developers, hoping to keep them enthused, informed and devoted when it comes to designing hip, fun or functional apps.

 

Cook devoted a chunk of the keynote to a software development kit he billed as the biggest release since the launch of the App Store.

 

Apple also debuted a programming language called Swift, to allow developers write programs that are faster, modern, safer and more interactive than they would be under its pre-decessor Objective C.

 

Doors opened by Apple for developers included letting applications once kept separate in “silos” work with one another.

 

Examples given included a Bing language tool being able to swoop in to translate a Safari browser Web page, or being able to “pin” a Web photo directly from Safari to online bulletin board Pinterest.

 

Apple also opened up its recently introduced Touch ID fingerprint recognition capability to third-party apps, giving the potential for it to become a security feature in more programs.

 

HealthKit was said to provide a secure haven for data collected by devices such as fitness bands that track activity and sleep.

 

Health-related information can now be collectively managed on Apple devices which could then watch for signs of trouble and even fire off messages to doctors when warranted.

 

HomeKit would let iPhones or iPads be used as a centralized control for Internet-linked gadgets such as door locks, lights, thermostats and security systems.

 

“We thought we could bring some rationality to this space,” Apple senior vice president of software engineering Craig Federigh Federighi said while demonstrating HomeKit.

 

Apple came up with a common network protocol, so not only can an iPhone be used to open smart locks but virtual assistant Siri can dim lights and lower thermostat settings when told “Get ready for bed.”

 

Apple also beefed up graphics and speed capabilities for games, which are consistently among the hottest applications on its mobile devices.

 

“This is an incredible set of features; an incredible release,” Cook said.

 

“iOS 8 overall is huge for developers and massive for everyone else.”

 

Apple has sold more than 800 million mobile devices powered by iOS; more than half of those being iPhones, according to Cook.

 

(By AFP | San Francisco )

 

(Al Arabiya News, 3 Tuesday June 2014 The Roman)

 

Sunday, 1 June 2014

BASIC programs

logo

logo_rsf

BASIC programs

 

Next is dimension.

 

The easiest dimension is DIM A(1).

 

10 DIM A(1)

20 INPUT A(0)?

 

(

 

or

 

10 DIM A(1)

20 INPUT A(0)

 

)

 

 

Then run this program,

 

?

 

If you input 2 to question, then,

 

PRINT A(0)

 

is

 

2

 

We use DIMension A(0), you inputted 2 to A(0).

 

You printed A(0).

 

 

DIM A(1) means, we use A(0).

 

If DIM A(2) then, we use A(0), A(1).

 

Can you write what DIM A(3) means ?

 

 

DIM is declaration or announcement.

 

DIM is not a command.

 

For example, direct to,

 

DIM A(1)

 

or

 

INPUT A(1)

 

will be an error.

 

 

This is the easiest dimension.

 

 

Why we use dimension ?

 

 

For example, loop programing,

 

10 DIM A(2)

20 FOR I=0 TO 1

30 INPUT A(I) ?

40 NEXT I

50 END

 

(

 

or

 

10 DIM A(2)

20 FOR I=0 TO 1

30 INPUT A(I)

40 NEXT I

50 END

 

)

 

 

(We added END for this program.)

 

From A(0) to A(1), loop INPUT.

 

 

Why many dimensions ?

 

Let us learn READ next time.

 

 

Homework: Make print program that print all A(I) in program in this article. Add this print program to dimension program.

 

 

Let us learn REM.

 

10 REM This here is nothing means

 

Then, RUN,

 

Nothing happen.

 

 

How to use REM, for example,

 

5 REM program dimension

10 DIM A(2)

20 FOR I=0 TO 1

30 INPUT A(I)

40 NEXT I

50 END

 

 

Homework: How many programs can you write from this article ? How many programs can you write ?

 

 

If this article is difficult, we will wait for you.

 

We are in the start of the long long road of Digital Science, Computer Science.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 1 Sunday June 2014 The Roman)

 

Extra,

 

10 REM extra program 1

20 FOR I=1 TO 10

30 PRINT I

40 NEXT I

50 END

 

10 REM extra program 2

20 INPUT A

30 INPUT B

40 C=A+B

50 PRINT "A+B="; C

60 END

 

 

Homework: Check SPI bus. Check MCP4921 and MCP4922.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 1 Sunday June 2014 The Roman)

 

Homework: Make many flow charts for many BASIC programs and BASIC programs in this article.

 

(R.S.F. toshiki speed news press, Agence France-Presse, 4 Wednesday June 2014 The Roman)