https://www.trccompsci.online/mediawiki/api.php?action=feedcontributions&user=C3ypt1c&feedformat=atomTRCCompSci - AQA Computer Science - User contributions [en-gb]2024-03-28T11:04:08ZUser contributionsMediaWiki 1.31.6https://www.trccompsci.online/mediawiki/index.php?title=Bits_Bytes_etc&diff=8871Bits Bytes etc2024-02-28T01:28:16Z<p>C3ypt1c: /* Old Units */ .</p>
<hr />
<div>=Units=<br />
<br />
== Summary ==<br />
{| class="wikitable" <br />
|-<br />
! colspan="4" style="text-align:center; font-weight:bold; font-size:large;" | New Spec<br />
|- style="font-weight:bold;"<br />
| Name<br />
| Symbol<br />
| Power<br />
| Size in bytes<br />
|-<br />
| Byte<br />
| B<br />
| 10<sup>0</sup><br />
| 1<br />
|-<br />
| Kilo Byte<br /><br />
| KB<br />
| 10<sup>3</sup><br />
| 1,000<br />
|-<br />
| Mega Byte<br />
| MB<br />
| 10<sup>6</sup><br />
| 1,000,000<br />
|-<br />
| Giga Byte<br />
| GB<br />
| 10<sup>9</sup><br />
| 1,000,000,000<br /><br />
|-<br />
| Tera Byte<br />
| TB<br />
| 10<sup>12</sup><br />
| 1,000,000,000,000<br /><br />
|-<br />
| Peta Byte<br />
| PB<br />
| 10<sup>15</sup><br />
| 1,000,000,000,000,000<br /><br />
|-<br />
| Exa Byte<br />
| EB<br />
| 10<sup>18</sup><br />
| 1,000,000,000,000,000,000<br />
|-<br />
| Zatta Byte<br />
| ZB<br />
| 10<sup>21</sup><br />
| 1,000,000,000,000,000,000,000<br /><br />
|-<br />
| Yotta Byte<br />
| YB<br />
| 10<sup>24</sup><br />
| 1,000,000,000,000,000,000,000,000<br />
|}<br />
<br />
{| class="wikitable" <br />
|-<br />
! colspan="4" style="text-align:center; font-weight:bold; font-size:large;" | Old Spec<br />
|- style="font-weight:bold;"<br />
| Name<br />
| Symbol<br />
| Power<br />
| Size in bytes<br />
|-<br />
| Byte<br />
| B<br />
| 2<sup>0</sup><br />
| 1<br />
|-<br />
| Kibi Byte<br /><br />
| KiB<br />
| 2<sup>10</sup><br />
| 1,024<br /><br />
|-<br />
| Migi Byte<br />
| MiB<br />
| 2<sup>20</sup><br />
| 1,048,576<br />
|-<br />
| Gigi Byte<br />
| GiB<br />
| 2<sup>30</sup><br />
| 1,073,741,824<br />
|-<br />
| Tebi Byte<br />
| TiB<br />
| 2<sup>40</sup><br />
| 1,099,511,627,776<br />
|-<br />
| Pebi Byte<br />
| PiB<br />
| 2<sup>50</sup><br />
| 1,125,899,906,842,624<br />
|-<br />
| Exbi Byte<br />
| EiB<br />
| 2<sup>60</sup><br />
| 1,152,921,504,606,846,976<br />
|-<br />
| Zebi Byte<br />
| ZiB<br />
| 2<sup>70</sup><br />
| 1,180,591,620,717,411,303,424<br />
|-<br />
| Yobi Byte<br />
| YiB<br />
| 2<sup>80</sup><br />
| 1,208,925,819,614,629,174,706,176<br />
|}<br />
<br />
===CraigNDave===<br />
<youtube>9kzCoDFrMGE</youtube><br />
<br />
https://www.youtube.com/watch?v=9kzCoDFrMGE&list=PLCiOXwirraUCa2MYf_oSM94uvwIGPMZ1q<br />
<br />
<br />
===Computer Science Tutor===<br />
<br />
<youtube>Ol3PxSpEeT4</youtube><br />
<br />
https://www.youtube.com/watch?v=Ol3PxSpEeT4&list=PL04uZ7242_M6O_6ITD6ncf7EonVHyBeCm<br />
<br />
=New Units=<br />
'''Computer Science units are now based around the powers of 10'''<br />
<br />
=='''Powers of 10'''==<br />
<br />
<br />
For each unit add 3 to the power to go up in powers of 10 for each unit of data for example : <br />
1GB = 10^9 with the power of 10 being 1,000,000,000 bytes <br />
However if you subtract three powers from 10^9 then 10^6 = 1,000,000 bytes<br />
<br />
==The Bit==<br />
The Bit is a single binary digit used in computing and is represented using either a 1 or 0. The two values of a single digit act as an On or Off function or True/False and putting them together can result in unique functions as 1 digit can control one variable and another digit can control an entirely different variable. By putting multiple bits together functions become more complex and have more outcomes as if you set one value to true it can lead to another set of values different to what you would get if it was set to false. Putting 8 of theses bits together is called a [[Bits_Bytes_etc#The_Byte|byte]]<br />
<br />
==The Byte==<br />
A byte is made up of '''8 [[Bits_Bytes_etc#The_Bit|bits]]''', and larger amounts of data are based around the value of a byte (e.g [[Bits_Bytes_etc#Giga_Byte|Gigabyte]] being 1,000,000,000 bytes). A single byte represents one binary number, as it is made up of a total of 8 1's and 0's. A single byte can also represent a single character, such as the letter B.<br />
<br />
==Kilo Byte==<br />
A Kilo Byte is 1000 bytes. It is also a multiple of the byte unit with the prefix (kB).<br />
<br />
==Mega Byte==<br />
A Mega Byte is 1000 Kilo Bytes, thus is 1000000 Bytes.<br />
In Base 10 the prefix Mega is 10^6.<br />
<br />
==Giga Byte==<br />
1 giga byte (1Gb) is 1000 megabytes and also 1 Gigabyte (G / GB) = 10^9 bytes = 1,000,000,000 bytes<br />
<br />
==Tera Byte==<br />
1 TeraByte = 1,000 GigaByte, 10^12 bytes<br />
<br />
==Peta Byte==<br />
'''Symbol''' PB<br />
'''Power''' 10^15<br />
<br />
==Exa Byte==<br />
'''Symbol''': EB<br />
'''Power''': 10^18<br />
'''Bytes''': 1,000,000,000,000,000,000<br />
<br />
==Zetta Byte==<br />
'''Symbol''': ZB<br />
'''Power''': 10^21<br />
'''Bytes''': 1,000,000,000,000,000,000,000<br />
<br />
==Yotta Byte==<br />
<br />
Yottabyte (YB) is a unit of digital information that equals to one septillion (10^24).<br />
<br />
=Old Units=<br />
'''Units based around powers of 2, according to the spec you don't need to know these.'''<br />
<br />
==Powers of 2==<br />
A power of two is a number of the form 2<sup>n</sup> where n is an integer. (e.g. 7).<br />
<br />
{| class="wikitable"<br />
|-<br />
! Power of 2 !! Equivalent<br />
|-<br />
| 2<sup>0</sup> = 1 || (Anything to the power of itself is always 1)<br />
|-<br />
| 2<sup>1</sup> = 2 || 2x1 = 2<br />
|-<br />
| 2<sup>3</sup> = 4 || 2x2 = 4<br />
|-<br />
| 2<sup>4</sup> = 8 || 2x2x2 = 8<br />
|-<br />
| 2<sup>5</sup> = 16 || 2x2x2x2 = 16<br />
|}<br />
Etc.<br />
<br />
==Kibi Byte==<br />
<br />
A kibibyte is a multiple of the unit byte, with the binary prefix 'kibi' meaning 2 to the power of 10 or 1024 bytes. <br />
Therefore meaning 1 kibibyte is 1024 bytes.<br />
<br /><br />
The unit symbol for a kibibyte is KiB.<br />
<br />
==Mebi Byte==<br />
The binary prefix mebi means 2^20; therefore one mebibyte is equal to 1048576bytes = 1024 kibibytes.<br />
<br />
The unit symbol for the mebibyte is MiB.<br />
<br />
1 MiB = 2^20 bytes = 1024 kibibytes = 1048576bytes<br />
<br />
==Gibi Byte==<br />
<br />
1 GiB is equal to 2^30. (Two to the power of thirty)<br />
<br />
1 GB = 0.931323 GiB<br />
<br />
==Tebi Byte==<br />
A tebibyte is a unit of data storage that equals 2 to the 40th power, or 1,099,511,627,776 bytes. While a terabyte can be estimated as 10^12 or 1,000,000,000,000 bytes, a tebibyte is exactly 1,099,511,627,776 bytes.<br />
<br />
==Pebi Byte==<br />
<br />
A '''Pebi Byte''' is a '''multiple of the unit byte''', used for '''digital information.''' <br />
<br />
The prefix for '''pebi''' is '''Pi'''<br />
and the prefix for '''pebibyte''' is '''PiB<br />
'''<br />
1,125,899,906,842,624 bytes and is equivalent to '''1024 tebibytes''' or '''1 pebibyte. <br />
'''<br />
<br />
to get from '''pebibytes to bits''', you can do:<br />
pebibytes times 2 to the power of 50 '''(PiB x 2^50)''' or pebibytes times 1024 to the power of 5 '''(PiB x 1024^5)<br />
'''<br />
and to get from '''bits to pebibytes''', you can do:<br />
bits divided by 2 to the power of 50 '''(bits / 2^50)''' or bits times 1024 to the power of 5 '''(bits / 1024^5)<br />
'''<br />
<br />
==Exbi Byte==<br />
2^60<br />
<br />
==Zebi Byte==<br />
2^70<br />
<br />
==Yobi Byte==<br />
2^80</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Bits_Bytes_etc&diff=8870Bits Bytes etc2024-02-28T01:26:36Z<p>C3ypt1c: Added a helpful lookup table.</p>
<hr />
<div>=Units=<br />
<br />
== Summary ==<br />
{| class="wikitable" <br />
|-<br />
! colspan="4" style="text-align:center; font-weight:bold; font-size:large;" | New Spec<br />
|- style="font-weight:bold;"<br />
| Name<br />
| Symbol<br />
| Power<br />
| Size in bytes<br />
|-<br />
| Byte<br />
| B<br />
| 10<sup>0</sup><br />
| 1<br />
|-<br />
| Kilo Byte<br /><br />
| KB<br />
| 10<sup>3</sup><br />
| 1,000<br />
|-<br />
| Mega Byte<br />
| MB<br />
| 10<sup>6</sup><br />
| 1,000,000<br />
|-<br />
| Giga Byte<br />
| GB<br />
| 10<sup>9</sup><br />
| 1,000,000,000<br /><br />
|-<br />
| Tera Byte<br />
| TB<br />
| 10<sup>12</sup><br />
| 1,000,000,000,000<br /><br />
|-<br />
| Peta Byte<br />
| PB<br />
| 10<sup>15</sup><br />
| 1,000,000,000,000,000<br /><br />
|-<br />
| Exa Byte<br />
| EB<br />
| 10<sup>18</sup><br />
| 1,000,000,000,000,000,000<br />
|-<br />
| Zatta Byte<br />
| ZB<br />
| 10<sup>21</sup><br />
| 1,000,000,000,000,000,000,000<br /><br />
|-<br />
| Yotta Byte<br />
| YB<br />
| 10<sup>24</sup><br />
| 1,000,000,000,000,000,000,000,000<br />
|}<br />
<br />
{| class="wikitable" <br />
|-<br />
! colspan="4" style="text-align:center; font-weight:bold; font-size:large;" | Old Spec<br />
|- style="font-weight:bold;"<br />
| Name<br />
| Symbol<br />
| Power<br />
| Size in bytes<br />
|-<br />
| Byte<br />
| B<br />
| 2<sup>0</sup><br />
| 1<br />
|-<br />
| Kibi Byte<br /><br />
| KiB<br />
| 2<sup>10</sup><br />
| 1,024<br /><br />
|-<br />
| Migi Byte<br />
| MiB<br />
| 2<sup>20</sup><br />
| 1,048,576<br />
|-<br />
| Gigi Byte<br />
| GiB<br />
| 2<sup>30</sup><br />
| 1,073,741,824<br />
|-<br />
| Tebi Byte<br />
| TiB<br />
| 2<sup>40</sup><br />
| 1,099,511,627,776<br />
|-<br />
| Pebi Byte<br />
| PiB<br />
| 2<sup>50</sup><br />
| 1,125,899,906,842,624<br />
|-<br />
| Exbi Byte<br />
| EiB<br />
| 2<sup>60</sup><br />
| 1,152,921,504,606,846,976<br />
|-<br />
| Zebi Byte<br />
| ZiB<br />
| 2<sup>70</sup><br />
| 1,180,591,620,717,411,303,424<br />
|-<br />
| Yobi Byte<br />
| YiB<br />
| 2<sup>80</sup><br />
| 1,208,925,819,614,629,174,706,176<br />
|}<br />
<br />
===CraigNDave===<br />
<youtube>9kzCoDFrMGE</youtube><br />
<br />
https://www.youtube.com/watch?v=9kzCoDFrMGE&list=PLCiOXwirraUCa2MYf_oSM94uvwIGPMZ1q<br />
<br />
<br />
===Computer Science Tutor===<br />
<br />
<youtube>Ol3PxSpEeT4</youtube><br />
<br />
https://www.youtube.com/watch?v=Ol3PxSpEeT4&list=PL04uZ7242_M6O_6ITD6ncf7EonVHyBeCm<br />
<br />
=New Units=<br />
'''Computer Science units are now based around the powers of 10'''<br />
<br />
=='''Powers of 10'''==<br />
<br />
<br />
For each unit add 3 to the power to go up in powers of 10 for each unit of data for example : <br />
1GB = 10^9 with the power of 10 being 1,000,000,000 bytes <br />
However if you subtract three powers from 10^9 then 10^6 = 1,000,000 bytes<br />
<br />
==The Bit==<br />
The Bit is a single binary digit used in computing and is represented using either a 1 or 0. The two values of a single digit act as an On or Off function or True/False and putting them together can result in unique functions as 1 digit can control one variable and another digit can control an entirely different variable. By putting multiple bits together functions become more complex and have more outcomes as if you set one value to true it can lead to another set of values different to what you would get if it was set to false. Putting 8 of theses bits together is called a [[Bits_Bytes_etc#The_Byte|byte]]<br />
<br />
==The Byte==<br />
A byte is made up of '''8 [[Bits_Bytes_etc#The_Bit|bits]]''', and larger amounts of data are based around the value of a byte (e.g [[Bits_Bytes_etc#Giga_Byte|Gigabyte]] being 1,000,000,000 bytes). A single byte represents one binary number, as it is made up of a total of 8 1's and 0's. A single byte can also represent a single character, such as the letter B.<br />
<br />
==Kilo Byte==<br />
A Kilo Byte is 1000 bytes. It is also a multiple of the byte unit with the prefix (kB).<br />
<br />
==Mega Byte==<br />
A Mega Byte is 1000 Kilo Bytes, thus is 1000000 Bytes.<br />
In Base 10 the prefix Mega is 10^6.<br />
<br />
==Giga Byte==<br />
1 giga byte (1Gb) is 1000 megabytes and also 1 Gigabyte (G / GB) = 10^9 bytes = 1,000,000,000 bytes<br />
<br />
==Tera Byte==<br />
1 TeraByte = 1,000 GigaByte, 10^12 bytes<br />
<br />
==Peta Byte==<br />
'''Symbol''' PB<br />
'''Power''' 10^15<br />
<br />
==Exa Byte==<br />
'''Symbol''': EB<br />
'''Power''': 10^18<br />
'''Bytes''': 1,000,000,000,000,000,000<br />
<br />
==Zetta Byte==<br />
'''Symbol''': ZB<br />
'''Power''': 10^21<br />
'''Bytes''': 1,000,000,000,000,000,000,000<br />
<br />
==Yotta Byte==<br />
<br />
Yottabyte (YB) is a unit of digital information that equals to one septillion (10^24).<br />
<br />
=Old Units=<br />
'''Units based around powers of 2, according to the spec you don't need to know these'''<br />
<br />
==Powers of 2==<br />
A power of two is a number of the form 2<sup>n</sup> where n is an integer. (e.g. 7).<br />
<br />
{| class="wikitable"<br />
|-<br />
! Power of 2 !! Equivalent<br />
|-<br />
| 2<sup>0</sup> = 1 || (Anything to the power of itself is always 1)<br />
|-<br />
| 2<sup>1</sup> = 2 || 2x1 = 2<br />
|-<br />
| 2<sup>3</sup> = 4 || 2x2 = 4<br />
|-<br />
| 2<sup>4</sup> = 8 || 2x2x2 = 8<br />
|-<br />
| 2<sup>5</sup> = 16 || 2x2x2x2 = 16<br />
|}<br />
Etc.<br />
<br />
==Kibi Byte==<br />
<br />
A kibibyte is a multiple of the unit byte, with the binary prefix 'kibi' meaning 2 to the power of 10 or 1024 bytes. <br />
Therefore meaning 1 kibibyte is 1024 bytes.<br />
<br /><br />
The unit symbol for a kibibyte is KiB.<br />
<br />
==Mebi Byte==<br />
The binary prefix mebi means 2^20; therefore one mebibyte is equal to 1048576bytes = 1024 kibibytes.<br />
<br />
The unit symbol for the mebibyte is MiB.<br />
<br />
1 MiB = 2^20 bytes = 1024 kibibytes = 1048576bytes<br />
<br />
==Gibi Byte==<br />
<br />
1 GiB is equal to 2^30. (Two to the power of thirty)<br />
<br />
1 GB = 0.931323 GiB<br />
<br />
==Tebi Byte==<br />
A tebibyte is a unit of data storage that equals 2 to the 40th power, or 1,099,511,627,776 bytes. While a terabyte can be estimated as 10^12 or 1,000,000,000,000 bytes, a tebibyte is exactly 1,099,511,627,776 bytes.<br />
<br />
==Pebi Byte==<br />
<br />
A '''Pebi Byte''' is a '''multiple of the unit byte''', used for '''digital information.''' <br />
<br />
The prefix for '''pebi''' is '''Pi'''<br />
and the prefix for '''pebibyte''' is '''PiB<br />
'''<br />
1,125,899,906,842,624 bytes and is equivalent to '''1024 tebibytes''' or '''1 pebibyte. <br />
'''<br />
<br />
to get from '''pebibytes to bits''', you can do:<br />
pebibytes times 2 to the power of 50 '''(PiB x 2^50)''' or pebibytes times 1024 to the power of 5 '''(PiB x 1024^5)<br />
'''<br />
and to get from '''bits to pebibytes''', you can do:<br />
bits divided by 2 to the power of 50 '''(bits / 2^50)''' or bits times 1024 to the power of 5 '''(bits / 1024^5)<br />
'''<br />
<br />
==Exbi Byte==<br />
2^60<br />
<br />
==Zebi Byte==<br />
2^70<br />
<br />
==Yobi Byte==<br />
2^80</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Bits_Bytes_etc&diff=8869Bits Bytes etc2024-02-28T00:54:35Z<p>C3ypt1c: typo</p>
<hr />
<div>=Units=<br />
<br />
===CraigNDave===<br />
<youtube>9kzCoDFrMGE</youtube><br />
<br />
https://www.youtube.com/watch?v=9kzCoDFrMGE&list=PLCiOXwirraUCa2MYf_oSM94uvwIGPMZ1q<br />
<br />
<br />
===Computer Science Tutor===<br />
<br />
<youtube>Ol3PxSpEeT4</youtube><br />
<br />
https://www.youtube.com/watch?v=Ol3PxSpEeT4&list=PL04uZ7242_M6O_6ITD6ncf7EonVHyBeCm<br />
<br />
=New Units=<br />
'''Computer Science units are now based around the powers of 10'''<br />
<br />
=='''Powers of 10'''==<br />
<br />
<br />
For each unit add 3 to the power to go up in powers of 10 for each unit of data for example : <br />
1GB = 10^9 with the power of 10 being 1,000,000,000 bytes <br />
However if you subtract three powers from 10^9 then 10^6 = 1,000,000 bytes<br />
<br />
==The Bit==<br />
The Bit is a single binary digit used in computing and is represented using either a 1 or 0. The two values of a single digit act as an On or Off function or True/False and putting them together can result in unique functions as 1 digit can control one variable and another digit can control an entirely different variable. By putting multiple bits together functions become more complex and have more outcomes as if you set one value to true it can lead to another set of values different to what you would get if it was set to false. Putting 8 of theses bits together is called a [[Bits_Bytes_etc#The_Byte|byte]]<br />
<br />
==The Byte==<br />
A byte is made up of '''8 [[Bits_Bytes_etc#The_Bit|bits]]''', and larger amounts of data are based around the value of a byte (e.g [[Bits_Bytes_etc#Giga_Byte|Gigabyte]] being 1,000,000,000 bytes). A single byte represents one binary number, as it is made up of a total of 8 1's and 0's. A single byte can also represent a single character, such as the letter B.<br />
<br />
==Kilo Byte==<br />
A Kilo Byte is 1000 bytes. It is also a multiple of the byte unit with the prefix (kB).<br />
<br />
==Mega Byte==<br />
A Mega Byte is 1000 Kilo Bytes, thus is 1000000 Bytes.<br />
In Base 10 the prefix Mega is 10^6.<br />
<br />
==Giga Byte==<br />
1 giga byte (1Gb) is 1000 megabytes and also 1 Gigabyte (G / GB) = 10^9 bytes = 1,000,000,000 bytes<br />
<br />
==Tera Byte==<br />
1 TeraByte = 1,000 GigaByte, 10^12 bytes<br />
<br />
==Peta Byte==<br />
'''Symbol''' PB<br />
'''Power''' 10^15<br />
<br />
==Exa Byte==<br />
'''Symbol''': EB<br />
'''Power''': 10^18<br />
'''Bytes''': 1,000,000,000,000,000,000<br />
<br />
==Zetta Byte==<br />
'''Symbol''': ZB<br />
'''Power''': 10^21<br />
'''Bytes''': 1,000,000,000,000,000,000,000<br />
<br />
==Yotta Byte==<br />
<br />
Yottabyte (YB) is a unit of digital information that equals to one septillion (10^24).<br />
<br />
=Old Units=<br />
'''Units based around powers of 2, according to the spec you don't need to know these'''<br />
<br />
==Powers of 2==<br />
A power of two is a number of the form 2<sup>n</sup> where n is an integer. (e.g. 7).<br />
<br />
{| class="wikitable"<br />
|-<br />
! Power of 2 !! Equivalent<br />
|-<br />
| 2<sup>0</sup> = 1 || (Anything to the power of itself is always 1)<br />
|-<br />
| 2<sup>1</sup> = 2 || 2x1 = 2<br />
|-<br />
| 2<sup>3</sup> = 4 || 2x2 = 4<br />
|-<br />
| 2<sup>4</sup> = 8 || 2x2x2 = 8<br />
|-<br />
| 2<sup>5</sup> = 16 || 2x2x2x2 = 16<br />
|}<br />
Etc.<br />
<br />
==Kibi Byte==<br />
<br />
A kibibyte is a multiple of the unit byte, with the binary prefix 'kibi' meaning 2 to the power of 10 or 1024 bytes. <br />
Therefore meaning 1 kibibyte is 1024 bytes.<br />
<br /><br />
The unit symbol for a kibibyte is KiB.<br />
<br />
==Mebi Byte==<br />
The binary prefix mebi means 2^20; therefore one mebibyte is equal to 1048576bytes = 1024 kibibytes.<br />
<br />
The unit symbol for the mebibyte is MiB.<br />
<br />
1 MiB = 2^20 bytes = 1024 kibibytes = 1048576bytes<br />
<br />
==Gibi Byte==<br />
<br />
1 GiB is equal to 2^30. (Two to the power of thirty)<br />
<br />
1 GB = 0.931323 GiB<br />
<br />
==Tebi Byte==<br />
A tebibyte is a unit of data storage that equals 2 to the 40th power, or 1,099,511,627,776 bytes. While a terabyte can be estimated as 10^12 or 1,000,000,000,000 bytes, a tebibyte is exactly 1,099,511,627,776 bytes.<br />
<br />
==Pebi Byte==<br />
<br />
A '''Pebi Byte''' is a '''multiple of the unit byte''', used for '''digital information.''' <br />
<br />
The prefix for '''pebi''' is '''Pi'''<br />
and the prefix for '''pebibyte''' is '''PiB<br />
'''<br />
1,125,899,906,842,624 bytes and is equivalent to '''1024 tebibytes''' or '''1 pebibyte. <br />
'''<br />
<br />
to get from '''pebibytes to bits''', you can do:<br />
pebibytes times 2 to the power of 50 '''(PiB x 2^50)''' or pebibytes times 1024 to the power of 5 '''(PiB x 1024^5)<br />
'''<br />
and to get from '''bits to pebibytes''', you can do:<br />
bits divided by 2 to the power of 50 '''(bits / 2^50)''' or bits times 1024 to the power of 5 '''(bits / 1024^5)<br />
'''<br />
<br />
==Exbi Byte==<br />
2^60<br />
<br />
==Zebi Byte==<br />
2^70<br />
<br />
==Yobi Byte==<br />
2^80</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=8782User:C3ypt1c2024-01-21T00:44:27Z<p>C3ypt1c: Changed my deets</p>
<hr />
<div><div style="text-align:center; color:#88f;"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016.<br />
<br><br><br />
Contact email: <tt>[http://mailto:lukasz@baldy.ga lukasz@baldy.ga]</tt><br />
<br><br><br />
Website: <tt style="color:#88f !important;">https://baldy.ga/</tt><br />
<br><br><br />
</p><br />
<div style="background-color:#333;color:#aaa;width:50%;overflow-wrap:break-word;transform: translate(50%,-0%);><tt><br />
++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>+++++++++++++.>+++++++++++.--.--------.++++++++++.-.---------.<<++.>>+++++++.+++.+++++++.-----------------.++++++++++++++.<<.>>++++++.----------.++++++.<<++++++++++++++.--------------.>.>-.<++++++++++++++.>+++++.<<.>>------.<.+++++.-.<++++++++++++++.--------------.<br />
</tt></div><br />
<br><br />
<div style="font-size: 0.8em;"><br />
I'm still alive btw<br />
</div><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=8188User:C3ypt1c2020-11-10T05:12:14Z<p>C3ypt1c: Happy ending?</p>
<hr />
<div><div style="text-align:center; color:#88f;"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016.<br />
<br><br><br />
Contact email: <tt>c3ypt1c@gmail.com</tt><br />
<br><br><br />
Website: <tt style="color:#88f !important;">https://lukasz.baldy.ga/</tt><br />
<br><br><br />
</p><br />
<div style="background-color:#333;color:#aaa;width:50%;overflow-wrap:break-word;transform: translate(50%,-0%);><tt><br />
++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>+++++++++++++.>+++++++++++.--.--------.++++++++++.-.---------.<<++.>>+++++++.+++.+++++++.-----------------.++++++++++++++.<<.>>++++++.----------.++++++.<<++++++++++++++.--------------.>.>-.<++++++++++++++.>+++++.<<.>>------.<.+++++.-.<++++++++++++++.--------------.<br />
</tt></div><br />
<br><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=HelloWorld_-_Python&diff=8187HelloWorld - Python2020-11-10T00:40:53Z<p>C3ypt1c: /* Writing to the Screen */ added python link and formatting</p>
<hr />
<div>=Writing to the Screen=<br />
The first command you will need to learn for Python is the [https://docs.python.org/3/library/functions.html#print print] command. This will do exactly as you would expect, it prints text to the screen:<br />
<br />
<syntaxhighlight lang=python><br />
print("anything as long as it is between the quotes")<br />
</syntaxhighlight><br />
<br />
Now to write <code>helloworld</code> to the screen we will need to use:<br />
<br />
<syntaxhighlight lang=python><br />
print("helloworld")<br />
</syntaxhighlight><br />
<br />
'''Remember Python is case sensitive so it is important to be precise with your coding'''<br />
<br />
Try this and run your program.<br />
<br />
=Print Command Options=<br />
To display a string without going to a new line:<br />
<syntaxhighlight lang=python3><br />
print ("Hello World" , end="") <br />
</syntaxhighlight><br />
<br />
To display the contents of a variable without going to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1, end="") <br />
</syntaxhighlight><br />
<br />
To display a string and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print ("Hello World") <br />
</syntaxhighlight><br />
<br />
To display the output of a variable and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1) <br />
</syntaxhighlight><br />
<br />
To move the output stream to a new line:<br />
<syntaxhighlight lang=python3><br />
print () <br />
</syntaxhighlight><br />
<br />
=Now Try=<br />
# Create a square of 5x5, you can do this by writing 5 characters in one line and then copy this line 5 times.<br />
# Create a triangle, it should be 5 lines high, the point should have a single character.<br />
# Create a program to write out the chorus of your favourite song.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=HelloWorld_-_Python&diff=8186HelloWorld - Python2020-11-10T00:37:54Z<p>C3ypt1c: /* Now Try */ typos and format</p>
<hr />
<div>=Writing to the Screen=<br />
The first command you will need to learn for Python is the 'print()' command. This will do exactly as you would expect, it prints text to the screen:<br />
<br />
<syntaxhighlight lang=python><br />
print("anything as long as it is between the quotes")<br />
</syntaxhighlight><br />
<br />
Now to write helloworld to the screen we will need to use:<br />
<br />
<syntaxhighlight lang=python><br />
print("helloworld")<br />
</syntaxhighlight><br />
<br />
'''Remember Python is case sensitive so it is important to be precise with your coding'''<br />
<br />
Try this and run your program.<br />
<br />
=Print Command Options=<br />
To display a string without going to a new line:<br />
<syntaxhighlight lang=python3><br />
print ("Hello World" , end="") <br />
</syntaxhighlight><br />
<br />
To display the contents of a variable without going to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1, end="") <br />
</syntaxhighlight><br />
<br />
To display a string and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print ("Hello World") <br />
</syntaxhighlight><br />
<br />
To display the output of a variable and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1) <br />
</syntaxhighlight><br />
<br />
To move the output stream to a new line:<br />
<syntaxhighlight lang=python3><br />
print () <br />
</syntaxhighlight><br />
<br />
=Now Try=<br />
# Create a square of 5x5, you can do this by writing 5 characters in one line and then copy this line 5 times.<br />
# Create a triangle, it should be 5 lines high, the point should have a single character.<br />
# Create a program to write out the chorus of your favourite song.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=HelloWorld_-_Python&diff=8185HelloWorld - Python2020-11-10T00:36:17Z<p>C3ypt1c: /* Print Command Options */ Removed rounded " and changed python to python3 (as all things should be)</p>
<hr />
<div>=Writing to the Screen=<br />
The first command you will need to learn for Python is the 'print()' command. This will do exactly as you would expect, it prints text to the screen:<br />
<br />
<syntaxhighlight lang=python><br />
print("anything as long as it is between the quotes")<br />
</syntaxhighlight><br />
<br />
Now to write helloworld to the screen we will need to use:<br />
<br />
<syntaxhighlight lang=python><br />
print("helloworld")<br />
</syntaxhighlight><br />
<br />
'''Remember Python is case sensitive so it is important to be precise with your coding'''<br />
<br />
Try this and run your program.<br />
<br />
=Print Command Options=<br />
To display a string without going to a new line:<br />
<syntaxhighlight lang=python3><br />
print ("Hello World" , end="") <br />
</syntaxhighlight><br />
<br />
To display the contents of a variable without going to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1, end="") <br />
</syntaxhighlight><br />
<br />
To display a string and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print ("Hello World") <br />
</syntaxhighlight><br />
<br />
To display the output of a variable and then move the output stream to a new line: <br />
<syntaxhighlight lang=python3><br />
print (number1) <br />
</syntaxhighlight><br />
<br />
To move the output stream to a new line:<br />
<syntaxhighlight lang=python3><br />
print () <br />
</syntaxhighlight><br />
<br />
=Now Try=<br />
1 Create a sqaure of 5x5, you can do this by writing 5 characters in one line and then copy this line 5 times.<br />
<br />
2 Create a triangle, it should be 5 lines high, the point should have a single character.<br />
<br />
3 Create a program to write out the chorus of you favourite song.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=7237User:C3ypt1c2019-09-07T13:42:12Z<p>C3ypt1c: you're wasting your time</p>
<hr />
<div><div style="text-align:center; color:#88f;"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016.<br />
<br><br><br />
Contact email: <tt>c3ypt1c@gmail.com</tt><br />
<br><br><br />
Website: <tt style="color:#88f !important;">https://lukasz.baldy.ga/</tt><br />
<br><br><br />
</p><br />
<div style="background-color:#333;color:#aaa;width:50%;overflow-wrap:break-word;transform: translate(50%,-0%);><tt><br />
+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;[&#8203;>&#8203;+&#8203;>&#8203;+&#8203;+&#8203;+&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;<&#8203;<&#8203;<&#8203;<&#8203;-&#8203;]&#8203;>&#8203;>&#8203;>&#8203;>&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;.&#8203;<&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;>&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;-&#8203;-&#8203;.&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;-&#8203;-&#8203;-&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;-&#8203;-&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<&#8203;+&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;.&#8203;-&#8203;-&#8203;-&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;>&#8203;-&#8203;-&#8203;.&#8203;<&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;<&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;>&#8203;>&#8203;+&#8203;+&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;>&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;<&#8203;-&#8203;-&#8203;.&#8203;>&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;-&#8203;-&#8203;.&#8203;>&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;.&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;-&#8203;.&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;>&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;+&#8203;.&#8203;<br />
</tt></div><br />
<br><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=7236User:C3ypt1c2019-09-07T13:10:16Z<p>C3ypt1c: </p>
<hr />
<div><div style="text-align:center; color:#88f;"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016.<br />
<br><br><br />
Contact email: <tt>c3ypt1c@gmail.com</tt><br />
<br><br><br />
Website: <tt style="color:#88f !important;">https://lukasz.baldy.ga/</tt><br />
<br><br><br />
</p><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=7235User:C3ypt1c2019-09-07T13:09:00Z<p>C3ypt1c: </p>
<hr />
<div><div style="text-align:center; color:#88f;"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016.<br />
<br><br />
Contact email: <tt>c3ypt1c@gmail.com</tt><br />
<br><br />
Website: <tt style="color:#88f !important;">https://lukasz.baldy.ga/</tt><br />
<br><br />
</p><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=7234User:C3ypt1c2019-09-07T12:48:30Z<p>C3ypt1c: </p>
<hr />
<div><div style="text-align:center; color:#88f"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Contributor of Computer Science Wiki from the year 2016<br>Contact email: <tt>c3ypt1c@gmail.com</tt><br></p><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=AQA_-_Comp_Sci_-_A_Level_-_Paper_2&diff=7233AQA - Comp Sci - A Level - Paper 22019-09-07T12:29:51Z<p>C3ypt1c: change a letter</p>
<hr />
<div><br />
Remember for the A Level Unit 2, will cover all of the topics from year 1 and year 2 from the topics areas below. <br />
<br />
Each page clearly identifies which topics are year 1 or year 2, the AS Level exam will only cover year 1 topics.<br />
<br />
Remember you can use a calculator for this exam, this will make the binary/hexadecimal parts of this easier.<br />
<br />
=Topics=<br />
*[[Fundamentals of data representation]]<br />
*[[Fundamentals of computer systems]]<br />
*[[Fundamentals of computer organisation and architecture]]<br />
*[[Consequences of uses of computing]]<br />
*[[Fundamentals of communication and networking]]<br />
*[[Fundamentals of databases]] - '''Yr 2 Only'''<br />
*[[Big Data]] - '''Yr 2 Only'''<br />
*[[Fundamentals of functional programming]] - '''Yr 2 Only'''<br />
*Systematic approach to problem solving</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Installing_Visual_Studio&diff=7232Installing Visual Studio2019-09-07T12:22:13Z<p>C3ypt1c: /* Download */</p>
<hr />
<div>This will be the version used in college after summer 2017.<br />
<br />
==Download==<br />
<br />
[https://visualstudio.microsoft.com/vs/older-downloads/ Visual Studio 2015 Community Edition] is free to download and install. If you wish to install the [https://visualstudio.microsoft.com/downloads/ the latest Visual Studio], it is also free. <br />
<br />
==Installation==<br />
{{Need_Expanding}}<br />
The overall disk space required is approximately 8GB and additional space per internal drive installed. Most of VS files will be stored on the root drive (C:).<br />
<br />
==Alternatives==<br />
The alternative is [[Installing MonoDevelop|MonoDevelop / Xamarin Studio]].</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:AJackson&diff=3930User:AJackson2017-11-14T14:10:37Z<p>C3ypt1c: Undo revision 3929 by C3ypt1c (talk)</p>
<hr />
<div><br />
“It’s ridiculous to live 100 years and only be able to remember 30 million bytes. You know, less than a compact disc. The human condition is really becoming more obsolete every minute.”- (Marvin Minsky)</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:AJackson&diff=3929User:AJackson2017-11-14T14:10:00Z<p>C3ypt1c: </p>
<hr />
<div><br />
“It’s ridiculous to live 100 years and only be able to remember 30 million bytes. You know, less than a compact disc. The human condition is really becoming more obsolete every minute.”- ([[user:c3ypt1c]])</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Remove&diff=3924Remove2017-11-14T13:59:46Z<p>C3ypt1c: Spellings and stuff.. (will rewrite later)</p>
<hr />
<div><syntaxhighlight lang=csharp><br />
public string Remove()<br />
{<br />
string Item = "";<br />
if (IsEmpty())<br />
{<br />
return "";<br />
}<br />
else<br />
{<br />
Item = Contents[0];<br />
for (int Count = 1; Count < Rear + 1; Count++)<br />
{<br />
Contents[Count - 1] = Contents[Count];<br />
}<br />
Contents[Rear] = "";<br />
Rear--;<br />
return Item;<br />
}<br />
}<br />
</syntaxhighlight><br />
This method is a quite inefficient Get method for the queue. Recall that a queue is a first-in first-out data structure, therefore a queue should always return the first value added to it, regardless of any values added later down the line. This method firstly checks whether the queue is empty or not, on the off condition it is empty the queue returns an empty string; from a programming standpoint IMO this is ludicrous, the method should instead raise an exception if this was the condition. But I digress. Next the queue stores the value it intends to return and then shifts each value in the queue down a single index; it also then replaces the rear value to String.Empty & de-increments the rear value of the queue before returning the stored return value.<br />
== Functions and Global Variables used ==<br />
* [[IsEmpty|IsEmpty()]]<br />
* Other</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Arrays_-_2018&diff=3922Arrays - 20182017-11-14T13:50:43Z<p>C3ypt1c: Redirected to the Arrays page</p>
<hr />
<div>#REDIRECT [[Arrays]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Section_C_2018&diff=3921Section C 20182017-11-14T13:48:01Z<p>C3ypt1c: /* Skeleton Program */</p>
<hr />
<div>__NOTOC__<br />
=Introduction=<br />
'''THIS SECTION SHOULD RELATE ONLY TO THE SKELETON PROGRAM FOR SUMMER 2018'''<br />
<br />
You are advised to spend no more than 15 minutes on this section. Questions will refer to the Preliminary Material and the Skeleton Program, but will not require programming.<br />
<br />
This section will ask you questions about the code itself and will test your knowledge of the section A theory topics used within the skeleton program.<br />
<br />
=Skeleton Program=<br />
==QueueOfTiles==<br />
This section is to explain what this class does, its methods and data values:<br />
<br />
[[QueueOfTiles Purpose]]<br />
<br />
[[QueueOfTiles Variables]]<br />
<br />
[[QueueOfTiles Constructor]]<br />
<br />
[[IsEmpty]]<br />
<br />
[[Remove]]<br />
<br />
[[Add]]<br />
<br />
[[Show]]<br />
<br />
==Procedures & Functions==<br />
This section is to explain the subroutines within the skeleton program, use the pages below to explain each routine:<br />
<br />
[[CreateTileDirectory]]<br />
<br />
[[DisplayTileValues]]<br />
<br />
[[GetStartingHand]]<br />
<br />
[[LoadAllowedWords]]<br />
<br />
[[CheckWordIsInTiles]]<br />
<br />
[[CheckWordIsValid]]<br />
<br />
[[AddEndOfTurnTiles]]<br />
<br />
[[FillHandWithTiles]]<br />
<br />
[[GetScoreForWord]]<br />
<br />
[[UpdateAfterAllowedWord]]<br />
<br />
[[UpdateScoreWithPenalty]]<br />
<br />
[[GetChoice]]<br />
<br />
[[GetNewTileChoice]]<br />
<br />
[[DisplayTilesInHand]]<br />
<br />
[[HaveTurn]]<br />
<br />
[[DisplayWinner]]<br />
<br />
[[PlayGame]]<br />
<br />
[[DisplayMenu]]<br />
<br />
==Global Variables==<br />
<br />
<br />
<br />
==Main Program==<br />
Click here for an explanation of the Main section: <br />
<br />
[[Main Section 2018]]<br />
<br />
=Theory Related Terms=<br />
You may be asked to explain the following terms and identify where they are used in the skeleton program. Use the pages below to document examples within the skeleton program:<br />
<br />
=Programming Structures / Theory=<br />
You may be asked about the following programming techniques and asked to identify them in the skeleton program. Use the pages below to document examples within the skeleton program:<br />
<br />
[[Constants - 2018]] <br />
<br />
[[Selection - 2018]]<br />
<br />
[[Repetition - 2018]]<br />
<br />
[[Arrays - 2018]]<br />
<br />
[[Functions - 2018]]<br />
<br />
[[Subroutines - Methods - 2018]]<br />
<br />
[[Parameter Passing - 2018]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Fundamentals_of_computer_systems&diff=2383Fundamentals of computer systems2017-03-23T10:51:27Z<p>C3ypt1c: /* Quiz Section */</p>
<hr />
<div>=Topics=<br />
==Hardware & Software==<br />
Year 1:<br><br />
[[Hardware]] - {{done}}<br><br />
[[Classification of Software]] - {{partially done}}<br><br />
[[Classification of Programming Languages]] - {{done}}<br><br />
[[Programming Language Translators]] - {{partially done}}<br><br />
[[Assembly Language]] - {{partially done}}<br><br />
[[Operating Systems]] - {{done}}<br />
<br />
==Logic Gates==<br />
Year 1:<br />
<br />
[[AND , OR , NOT Gates]] {{done}}<br><br />
[[NAND , NOR , XOR Gates]] {{done}}<br><br />
[[Half Adder / Full Adder]] {{done}}<br><br />
[[Flip Flops]] {{partially done}}<br><br />
[[Boolean Equations]] <br><br />
[[Boolean Algebra]] <br><br />
[[De Morgan's Law]] {{done}}<br><br />
<br />
==Quiz Section==<br />
<br />
[[Comp Systems 1]]<br />
<br />
[[Comp Systems 2]]<br />
<br />
[[Comp Systems 3]]<br />
<br />
[[Comp Systems 4]]<br />
<br />
[[Comp Systems 5]]<br />
<br />
[[Comp Systems 6]]<br />
<br />
[[Comp Systems 7]]<br />
<br />
[[Comp Systems 8]]<br />
<br />
[[Comp Systems 9]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Linear_Search&diff=2279Linear Search2017-03-19T21:56:28Z<p>C3ypt1c: Added python code because I'm lazy to write in C#</p>
<hr />
<div>{{Need_Expanding}}<br />
Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.<br />
<br />
Here's a simple example in Python 3.<br />
<syntaxhighlight lang="python" line><br />
ar = [["A", 1], ["B", 2], ["C", 3], ["D", 4], ["E", 5]];<br />
##Array to be searched<br />
<br />
def linearSearch(arr, toFind):<br />
for x in arr: ##Goes by element 1 by 1<br />
if x[0] == toFind: return x[1]; ##If you find the item, return the value.<br />
return None; #If you don't, return None for nothing.<br />
<br />
print ( "Looking for 'A'", linearSearch(ar, "A") );<br />
print ( "Looking for 'E'", linearSearch(ar, "E") );<br />
print ( "Looking for 'l'", linearSearch(ar, "l") );<br />
<br />
##Return:<br />
##Looking for 'A' 1<br />
##Looking for 'E' 5<br />
##Looking for 'l' None<br />
<br />
</syntaxhighlight></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Dynamic_vs_Static&diff=2278Dynamic vs Static2017-03-19T21:36:58Z<p>C3ypt1c: </p>
<hr />
<div>{{Need_Expanding}}<br />
<br><br />
==Static Data Structure==<br />
With a static data structure, the size of the structure is fixed.<br />
Static data structures are very good for storing a well-defined number of data items. <br />
For example a programmer might be coding an 'Undo' function where the last 10 user actions are kept in case they want to undo their actions. In this case the maximum allowed is 10 steps and so he decides to form a 10 item data structure.<br />
===Advantage===<br />
*The memory allocation is fixed and so there will be no problem with adding and removing data items.<br />
*Easier to program as there is no need to check on data structure size at any point.<br />
<br />
===Disadvantage===<br />
*Can be very inefficient as the memory for the data structure has been set aside regardless of whether it is needed or not whilst the program is executing.<br />
<br />
==Dynamic Data Structure==<br />
<br />
There are many situations where the number of items to be stored is not known before hand. Memory is allocated to the data structure dynamically i.e. as the program executes.<br />
<br />
In this case the programmer will consider using a dynamic data structure. This means the data structure is allowed to grow and shrink as the demand for storage arises. The programmer should also set a maximum size to help avoid memory collisions.<br />
<br />
For example a programmer coding a print spooler will have to maintain a data structure to store print jobs, but he cannot know before hand how many jobs there will be.<br />
<br />
===Advantage===<br />
*Makes the most efficient use of memory as the data structure only uses as much memory as it needs<br />
<br />
===Disadvantage===<br />
*Because the memory allocation is dynamic, it is possible for the structure to 'overflow' should it exceed its allowed limit. It can also 'underflow' should it become empty.<br />
*Harder to program as the software needs to keep track of its size and data item locations at all times<br />
<br />
==Heap==<br />
==Memory Leakage==<br />
==Garbage Collectors==</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Template:Need_Expanding&diff=2277Template:Need Expanding2017-03-19T21:31:19Z<p>C3ypt1c: Removed protection from "Template:Need Expanding"</p>
<hr />
<div><div style="position:relative; background-color:#E5CD14; width:230px; height:55px; border:1px solid #ddd;"><br />
<div style="position:absolute; background-color:#FDFFFE; left:10px; width:220px; height:55px; text-align: center;"><p><b>This section needs expansion.</b><br><i>You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} adding to it].</i></p><br />
</div><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Recursion&diff=2276Recursion2017-03-19T21:29:04Z<p>C3ypt1c: /* Basics of recursion */ Joke inserted :D</p>
<hr />
<div>== Basics of recursion ==<br />
[http://compsci.duckdns.org/mediawiki/index.php/Recursion Recursion] is an important programming technique that causes a function to call itself. The approach can be applied to many types of problems, and recursion is one of the central ideas of computer science. A common computer programming tactic is to divide a problem into sub-problems of the same type as the original, solve those sub-problems, and combine the results. This is often referred to as the divide-and-conquer method. Recursion and iteration (looping) are strongly related—a function can return the same results either with recursion or iteration. Usually, a particular computation will lend itself to one technique or the other, and you simply choose the most natural or preferable approach.<br />
<br />
==Base Case==<br />
In the base case, the routine does not call itself. But, when a routine does have to call itself in order to complete its sub-task, then that is known as the recursive case. So, there are 2 types of cases when using a recursive algorithm: base cases and recursive cases.<br />
<br />
==General Case==<br />
==Recursion & the Stack==<br />
== Example ==<br />
<syntaxhighlight lang="csharp"> <br />
using System;<br />
<br />
class Program<br />
{<br />
static int Recursive(int value, ref int count)<br />
{<br />
count++;<br />
if (value >= 10)<br />
{<br />
// throw new Exception("End");<br />
return value;<br />
}<br />
return Recursive(value + 1, ref count);<br />
}<br />
<br />
static void Main()<br />
{<br />
//<br />
// Call recursive method with two parameters.<br />
//<br />
int count = 0;<br />
int total = Recursive(5, ref count);<br />
//<br />
// Write the result from the method calls and also the call count.<br />
//<br />
Console.WriteLine(total);<br />
Console.WriteLine(count);<br />
}<br />
}<br />
<br />
</syntaxhighlight><br />
=== Output ===<br />
'''10''' ''Total value of 10 was added up''. <br /><br />
'''6''' ''Six method calls.''</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Dictionaries&diff=2275Dictionaries2017-03-19T21:23:05Z<p>C3ypt1c: Expanded definition slightly....</p>
<hr />
<div>{{Need_Expanding}}<br />
==Definition==<br />
A dictionary stores a series of Key / Value pairs. The values are aligned with the keys so calling for a key will return the value. <br />
This is very useful if you have a lot of values that you need to weed though to get a value or if you constantly change a value in a line of values.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Trees&diff=2274Trees2017-03-19T21:18:34Z<p>C3ypt1c: Undo revision 1251 by WayneForPresident (talk) Latest revision did nothing.</p>
<hr />
<div>{{Need_Expanding}}</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Template:Need_Expanding&diff=2272Template:Need Expanding2017-03-19T21:04:16Z<p>C3ypt1c: Little Css Tricks</p>
<hr />
<div><div style="position:relative; background-color:#E5CD14; width:230px; height:55px; border:1px solid #ddd;"><br />
<div style="position:absolute; background-color:#FDFFFE; left:10px; width:220px; height:55px; text-align: center;"><p><b>This section needs expansion.</b><br><i>You can help by [{{fullurl:{{FULLPAGENAME}}|action=edit}} adding to it].</i></p><br />
</div><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=File:FSMnotationtable3.jpg&diff=2271File:FSMnotationtable3.jpg2017-03-19T20:48:04Z<p>C3ypt1c: C3ypt1c moved page File:FSMnotationtable3.jpg to File:FSMnotationtable.jpg: Overwriting the same file.</p>
<hr />
<div>#REDIRECT [[File:FSMnotationtable.jpg]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Data_Protection_Act&diff=2269Data Protection Act2017-03-19T20:43:53Z<p>C3ypt1c: Changed image size so that it didn't interfere with the text at hand.</p>
<hr />
<div>== The Data Protection Act ==<br />
[[File:Data.jpg|right|thumb]]<br />
The data protection act is in place to protect peoples data which is stored on servers and on companies computers.<br />
<br />
The Data Protection Act states that:<br />
* If you collect data, you must not use it for a different reason.<br />
* You must not share data with external sources.<br />
* People have the right to see data about themselves.<br />
* You must not keep data for longer than you need to and it must be up-to-date.<br />
* You must not send data outside the European Economic Area (EEA) to an area with lower protection.<br />
* People who store data must be registered with the Information Commissioner’s Office (ICO).<br />
* If you store data, the data must be protected and safe.<br />
* If companies have information about you that is wrong, it is your right to as them to change it.<br />
<br />
==Your right to view/request==<br />
*You can ask the organisation you think is holding, using or sharing the personal information you want, to supply you with copies of both paper and computer records and related information.<br />
*Data requests are fulfilled by an appointed data controller at an organisation. <br />
*Organisations may charge a fee of up to £10 (£2 if it is a request to a credit reference agency for information about your financial standing only).<br />
*There are special rules that apply to fees for paper based health records (the maximum fee is currently £50) and education records (a sliding scale from £1 to £50 depending on the number of pages provided).<br />
*However, it is important to remember that not all personal information is covered and there are ‘exemptions’ within the Act which may allow an organisation to refuse to comply with your subject access request in certain circumstances.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Create_DB_%26_Table_Queries&diff=2268Create DB & Table Queries2017-03-19T20:25:54Z<p>C3ypt1c: Changed lowered or titled sql commands into capital to avoid confusion between commands and variables names and text.</p>
<hr />
<div>=Creating A Database=<br />
Once you have an sql server / phpmyadmin running, you will need to create a database. This is very simple:<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE DATABASE DBName ;<br />
</syntaxhighlight><br />
<br />
so to create a database called my_db:<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE DATABASE my_db ;<br />
</syntaxhighlight><br />
<br />
=Creating A Table=<br />
Now you have a database, you will need to create a table within your database. The create table sql should give a name for the table and then the name of each field and its data type & size.<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE TABLE table_name<br />
(<br />
field_name1 data_type(size),<br />
field_name2 data_type(size),<br />
filed_name3 data_type(size),<br />
....<br />
);<br />
</syntaxhighlight><br />
<br />
<br />
The data types available within SQL can vary and within your exam any suitable data type will be allowed:<br />
<br />
===Text data types===<br />
CHAR(x), VARCHAR(x), TEXT, STRING, Long Text, Memo<br />
<br />
===Number data types===<br />
INT(x), Tiny INT(x), Long, double, decimal, float<br />
<br />
===Date data types===<br />
Date, Time, DateTime, TimeStamp<br />
<br />
===Example===<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE TABLE Student<br />
(<br />
ID Int(6),<br />
FirstName VARCHAR(16),<br />
LastName VARCHAR(16),<br />
Initial VARCHAR(1),<br />
DoB Date()<br />
);<br />
</syntaxhighlight><br />
<br />
==Primary Key==<br />
The option 'Primary Key' can be added to your definition to identify which field is the key.<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE TABLE Student<br />
(<br />
ID Int(6) Primary Key,<br />
FirstName VARCHAR(16),<br />
LastName VARCHAR(16),<br />
Initial VARCHAR(1),<br />
DoB Date()<br />
);<br />
</syntaxhighlight><br />
<br />
The above example is for SQL and would be considered ideal. Others such as MySQL uses Primary Key differently:<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE TABLE Student<br />
(<br />
ID Int(6),<br />
FirstName VARCHAR(16),<br />
LastName VARCHAR(16),<br />
Initial VARCHAR(1),<br />
DoB Date(),<br />
Primary Key(ID)<br />
);<br />
</syntaxhighlight><br />
<br />
In your exam either will be accepted.<br />
<br />
==Foreign Key==<br />
Remember a relationship is essentially the use of a primary key from one table, as a normal field in another table. So to make your database relational you will need to define the foreign keys as well:<br />
<br />
<syntaxhighlight lang=sql><br />
CREATE TABLE Student<br />
(<br />
ID Int(6),<br />
FirstName VARCHAR(16),<br />
LastName VARCHAR(16),<br />
Initial VARCHAR(1),<br />
DoB Date(),<br />
GenderID Int(1)<br />
Primary Key(ID)<br />
Foreign Key (GenderID) References GenderTypes.ID<br />
);<br />
</syntaxhighlight></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=File:XOR_Gate.png&diff=2037File:XOR Gate.png2017-03-10T12:55:00Z<p>C3ypt1c: C3ypt1c uploaded a new version of File:XOR Gate.png</p>
<hr />
<div>"The XOR"<br />
Solid black pixels on white - Joe Emery 2017</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=File:Nand_Gate.png&diff=2029File:Nand Gate.png2017-03-10T12:45:09Z<p>C3ypt1c: C3ypt1c moved page File:Nand gate.png to File:Nand Gate.png: Replace</p>
<hr />
<div>nand gate</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=File:Nand_gate.png&diff=2030File:Nand gate.png2017-03-10T12:45:09Z<p>C3ypt1c: C3ypt1c moved page File:Nand gate.png to File:Nand Gate.png: Replace</p>
<hr />
<div>#REDIRECT [[File:Nand Gate.png]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:TechCypher&diff=1989User:TechCypher2017-03-10T12:20:24Z<p>C3ypt1c: Blanked the page</p>
<hr />
<div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Linux_Foundation&diff=1979Linux Foundation2017-03-10T12:14:37Z<p>C3ypt1c: </p>
<hr />
<div>==What it is==<br />
The Linux Foundation is a non-profit trade association to promote, protect and advance [https://en.wikipedia.org/wiki/Linux Linux Operating System] & collaborate development of Linux based software. The foundation is supported by Cisco, Fujitsu, HP, IBM, Intel, Microsoft, NEC, Oracle, Qualcomm and Samsung and developers around the world.<ref>Citation needed</ref><br />
<br />
The Linux Foundation promotes, protects, and standardizes Linux "by providing a comprehensive set of services to compete effectively with closed platforms". The origin of the foundation can be traced back to the year 2000, with its original goals being to "accelerate the deployment of Linux for enterprise computing" and "to be the recognized center-of-gravity for the Linux industry"<ref>[https://en.wikipedia.org/wiki/Linux_Foundation Linux Foundation]</ref>.<br />
<br />
==Goals of the foundation==<br />
The goals of the Linux foundation is to promote and advance the understandings of the Linux software with no charge. They also sponsor Linux developers so they can work full time on their programming. The Linux Foundation offers application developers standardization services and support that makes Linux an attractive target for their development efforts.<br />
<br />
They support the Linux community by providing technical information and education during annual events such as; LinuxCon.<br />
<br />
==Offerings==<br />
The Linux foundation alongside various companies have produced various open source tools and infrastructure to achieve compliance at lower costs, increasing cross-organization efficiency and integration of compliance with product development; examples of such programs include:<br />
<br />
*FOSSology (which scans codebases, identifies licenses in use, creates machine readable license lists, and enables automatic notice file creation).<br />
*SPDX Tools (tools for validating, transforming, reading, and writing SPDX format files).<br />
*Dependency Checker (capable of identifying code combinations at the dynamic and static link level).<br />
*Code Janitor (provides linguistic review capabilities to make sure developers did not leave comments in the source code).<br />
<br />
for a comprehensive look at the projects produced by the Linux foundation, view "https://www.linuxfoundation.org/projects/directory"<br />
==References==<br />
<references /></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Linux_Foundation&diff=1978Linux Foundation2017-03-10T12:14:18Z<p>C3ypt1c: Fixed references from last edit</p>
<hr />
<div>==What it is==<br />
The Linux Foundation is a non-profit trade association to promote, protect and advance [https://en.wikipedia.org/wiki/Linux Linux Operating System] & collaborate development of Linux based software. The foundation is supported by Cisco, Fujitsu, HP, IBM, Intel, Microsoft, NEC, Oracle, Qualcomm and Samsung and developers around the world.<ref>Citation needed</ref><br />
<br />
The Linux Foundation promotes, protects, and standardizes Linux "by providing a comprehensive set of services to compete effectively with closed platforms". The origin of the foundation can be traced back to the year 2000, with its original goals being to "accelerate the deployment of Linux for enterprise computing" and "to be the recognized center-of-gravity for the Linux industry"<ref>[https://en.wikipedia.org/wiki/Linux_Foundation Linux Foundation]</ref>.<br />
<br />
<br />
<br />
==Goals of the foundation==<br />
The goals of the Linux foundation is to promote and advance the understandings of the Linux software with no charge. They also sponsor Linux developers so they can work full time on their programming. The Linux Foundation offers application developers standardization services and support that makes Linux an attractive target for their development efforts.<br />
<br />
They support the Linux community by providing technical information and education during annual events such as; LinuxCon.<br />
<br />
==Offerings==<br />
The Linux foundation alongside various companies have produced various open source tools and infrastructure to achieve compliance at lower costs, increasing cross-organization efficiency and integration of compliance with product development; examples of such programs include:<br />
<br />
*FOSSology (which scans codebases, identifies licenses in use, creates machine readable license lists, and enables automatic notice file creation).<br />
*SPDX Tools (tools for validating, transforming, reading, and writing SPDX format files).<br />
*Dependency Checker (capable of identifying code combinations at the dynamic and static link level).<br />
*Code Janitor (provides linguistic review capabilities to make sure developers did not leave comments in the source code).<br />
<br />
for a comprehensive look at the projects produced by the Linux foundation, view "https://www.linuxfoundation.org/projects/directory"<br />
==References==<br />
<references /></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Linux_Foundation&diff=1977Linux Foundation2017-03-10T12:13:34Z<p>C3ypt1c: /* What it is */ Added sources. Fixed words.</p>
<hr />
<div>==What it is==<br />
The Linux Foundation is a non-profit trade association to promote, protect and advance [https://en.wikipedia.org/wiki/Linux Linux Operating System] & collaborate development of Linux based software. The foundation is supported by Cisco, Fujitsu, HP, IBM, Intel, Microsoft, NEC, Oracle, Qualcomm and Samsung and developers around the world.<ref>Citation needed</ref><br />
<br />
The Linux Foundation promotes, protects, and standardizes Linux "by providing a comprehensive set of services to compete effectively with closed platforms". The origin of the foundation can be traced back to the year 2000, with its original goals being to "accelerate the deployment of Linux for enterprise computing" and "to be the recognized center-of-gravity for the Linux industry"<ref>[https://en.wikipedia.org/wiki/Linux_Foundation Linux Foundation]</ref>.<br />
<br />
<references /><br />
<br />
==Goals of the foundation==<br />
The goals of the Linux foundation is to promote and advance the understandings of the Linux software with no charge. They also sponsor Linux developers so they can work full time on their programming. The Linux Foundation offers application developers standardization services and support that makes Linux an attractive target for their development efforts.<br />
<br />
They support the Linux community by providing technical information and education during annual events such as; LinuxCon.<br />
<br />
==Offerings==<br />
The Linux foundation alongside various companies have produced various open source tools and infrastructure to achieve compliance at lower costs, increasing cross-organization efficiency and integration of compliance with product development; examples of such programs include:<br />
<br />
*FOSSology (which scans codebases, identifies licenses in use, creates machine readable license lists, and enables automatic notice file creation).<br />
*SPDX Tools (tools for validating, transforming, reading, and writing SPDX format files).<br />
*Dependency Checker (capable of identifying code combinations at the dynamic and static link level).<br />
*Code Janitor (provides linguistic review capabilities to make sure developers did not leave comments in the source code).<br />
<br />
for a comprehensive look at the projects produced by the Linux foundation, view "https://www.linuxfoundation.org/projects/directory"</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Number_Systems_/_Number_Bases&diff=1542Number Systems / Number Bases2017-02-16T11:45:52Z<p>C3ypt1c: /* Binary Number System */</p>
<hr />
<div>=Number Systems=<br />
The number systems used in Computer Science are often referred to as Base 16, Base 10, Base 8, or Base 2. <br />
<br />
The number base specifies how many digits are used (Including Zero) and how much each digit is multiplied by as it is moved from right to left.<br />
<br />
=Denary Number system=<br />
Also sometimes referred to as the Decimal number system, the Denary number system uses the digits 0-9 which means there are 10 possible digits.<br />
<br />
If we go beyond the digit 9 in denary another column is used; i.e the ‘tens’ column or the ‘Hundreds’ Column.<br />
<br />
This means the number 10 in denary would be 1 ‘ten’ plus 0 ‘units’<br />
<br />
The first column, the one on the far right, s 10 to the power 0. For each subsequent column the power is increased by 1.<br />
<br />
[[File:a68ec88b918976a97c85a9df1a08b912.jpg]]<br />
<br />
=Binary Number System=<br />
The Binary number system is an essential system as all digital content is stored using binary, Binary is the base 2 number system.<br />
Unlike other systems binary uses only two different digits 0 and 1 to represent any given number.<br />
0 is represented as 0, and 1 is represented as 1 and just like the decimal system if the value exceeds 1 an additional column is needed.<br />
As binary is in base 2 it uses twos instead of tens which the decimal system uses.<br />
So for example 10 would translate to 8 plus 0 plus 2 plus 0 and would read 1010. The Zeros are present to show the columns 2² and 2°<br />
The first column on the far right is 2 to the power 0, for each subsequent column the power is increased by 1.<br />
<table style="width:100%; border-style: solid;border-width: thin;" class="wikitable"><br />
<tr style=""><br />
<th style="width:11%;text-align:left !important;">Value</th><br />
<th style="width:11%;text-align:left !important;">128's</th><br />
<th style="width:11%;text-align:left !important;">64's</th><br />
<th style="width:11%;text-align:left !important;">32's</th><br />
<th style="width:11%;text-align:left !important;">16's</th><br />
<th style="width:11%;text-align:left !important;">8's</th><br />
<th style="width:11%;text-align:left !important;">4's</th><br />
<th style="width:11%;text-align:left !important;">2's</th><br />
<th style="width:11%;text-align:left !important;">1's</th><br />
</tr><br />
<tr><br />
<td style="width:11%;">Power<br></td><br />
<td style="width:11%;">2<sup>7</sup></td><br />
<td style="width:11%;">2<sup>6</sup></td><br />
<td style="width:11%;">2<sup>5</sup></td><br />
<td style="width:11%;">2<sup>4</sup></td><br />
<td style="width:11%;">2<sup>3</sup></td><br />
<td style="width:11%;">2<sup>2</sup></td><br />
<td style="width:11%;">2<sup>1</sup></td><br />
<td style="width:11%;">2<sup>0</sup></td><br />
</tr><br />
</table><br />
<table><br />
<tr><br />
<td>1</td><br />
</tr><br />
</table><br />
<br />
=Hexadecimal Number System=<br />
Hexadecimal is base 16 meaning it has 16 different digits, 0 to 15.<br />
The numbers 0 to 9 are the same as denary, but the numbers 10 to 15 use the letters A to F.<br />
[[File:dec_hex_bin.jpg]]<br />
<br />
The first column on the far right is 16 to the power 0 for each subsequent column the power is increased by 1.<br />
[[File:Hexidecimal Powers.jpg]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:000025845&diff=1541User:0000258452017-02-16T10:48:32Z<p>C3ypt1c: Spam</p>
<hr />
<div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:Westy-Chan&diff=1400User:Westy-Chan2017-02-06T14:34:30Z<p>C3ypt1c: Blanked the page</p>
<hr />
<div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:000025845&diff=1398User:0000258452017-02-06T14:33:26Z<p>C3ypt1c: It was funny while it lasted.</p>
<hr />
<div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Handling_Exceptions&diff=1347Handling Exceptions2017-01-16T13:20:49Z<p>C3ypt1c: /* Example One: */</p>
<hr />
<div>Even if you program compiles successfully, errors can still be generated at runtime during the execution of the program. When this occurs, visual studio will present you with an '''Exception'''. Sometimes, the generation of these errors cannot feasibly be avoided and thus requires the use of '''Exception Handling'''. <br />
<br />
Exception handling is done by using the following code to control what code to run in case the program encounters a specific exception<br />
<syntaxhighlight lang="csharp" line><br />
try<br />
{<br />
//code to attempt to execute (may result in error)<br />
}<br />
catch(Exception)<br />
{<br />
//what to do if the code fails <br />
//this defaults to 'throw;' which will cause your program to exit unexpectedly. <br />
}<br />
</syntaxhighlight><br />
The 'Exception' part of the code can be left as is, but will catch '''ALL''' exceptions encountered within that piece of code, this can be a bad thing if a genuine error occurs and it is generally a good idea to determine the type of exception that you are encountering, and placing a reference to that there.<br />
<br />
=== Determining the type of exception ===<br />
[[File:ExceptionExample.png|400px|thumb|right|An example of an 'IndexOutOfRangeException' in visual studio]] <br />
When an exception is unhandled, visual studio will present a dialogue box presenting you with the type of exception and some possible solutions. In this image, the Exception is System.IndexOutOfRangeException.<br />
To catch this exception you would use the code:<br />
<syntaxhighlight lang="csharp" line><br />
catch(IndexOutOfRangeException)<br />
{<br />
//code to execute<br />
}<br />
</syntaxhighlight><br />
<br />
== Examples of Exception Handling ==<br />
<br />
=== Example One: ===<br />
Below is an example of how exception handling can be used to detect the existence of [[Text Files]], and if one exists, load the username from the file.<br />
<br />
<syntaxhighlight lang="csharp" line><br />
class Program <br />
{<br />
static void Main(string[] args)<br />
{<br />
try<br />
{<br />
using (StreamReader Load = new StreamReader("Program/Preferences.txt"))<br />
{<br />
//Try to read from preferences.txt<br />
Username = Load.ReadLine();<br />
}<br />
}<br />
catch(NullReferenceException) //Null reference exception occurs when the file cannot be found<br />
{<br />
using (StreamWriter Save = new StreamWriter("Program/Preferences.txt"))<br />
{<br />
//Preferences.txt does not exist, so create one<br />
Save.Write(Username);<br />
}<br />
}<br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
=== Example Two: ===<br />
<br />
You can handle any exception by just using "<tt>catch( Exception )</tt>".<br />
<tabber><br />
C#=<syntaxhighlight lang="csharp" line><br />
class Program {<br />
static void Main(string[] args) {<br />
int a;<br />
int b = 0;<br />
try {<br />
a = 1 / b;<br />
Console.WriteLine("Exception not caught! :C");<br />
}<br />
catch ( Exception ) {<br />
Console.WriteLine("Exception caught!");<br />
}<br />
}<br />
}<br />
</syntaxhighlight><br />
|-|<br />
Output=<tt style='color:brown'>Exception caught!</tt><br />
</tabber></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Shortest_Path&diff=1345Shortest Path2017-01-16T13:04:51Z<p>C3ypt1c: Fixed Link</p>
<hr />
<div>The shortest path is usually found by ''[https://www.youtube.com/watch?v=gdmfOwyQlcI Dijkstra's algorithm]''. <br />
The algorithm functions as follows:<br />
# The first node has a distance of 0, this is locked in and labeled node one.<br />
# Each non locked in node that is connected by a weighted arc gains a temporary label equal to the total weight to reach it so long as the new distance is less then any previously marked.<br />
# The lowest distance node is locked in with the shortest distance available and marked as the next node in the path.<br />
# Each new arc available is then checked, and the second and third steps are repeated using the total distance to reach the node.<br />
# Once every node is marked, the shortest path would be the backwards path from the last node, where taking the arc reaches the distance on the locked in node until the final number is zero at the start.</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:000025845&diff=1344User:0000258452017-01-16T12:55:28Z<p>C3ypt1c: Removed excessive spam.</p>
<hr />
<div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=Arrays&diff=1343Arrays2017-01-16T12:49:44Z<p>C3ypt1c: Link trick :3</p>
<hr />
<div><br />
==Understanding arrays==<br />
[[File:Arrays.jpg|200px|thumb|right|People queuing.]]<br />
<p>Arrays are like a queue of people, but person number 0 is the first person in the queue. Imagine it like the picture on the right. As you can see, you know that if you wanted the 3rd person in the queue you would select them something like "queue person 2" and if you wanted the last person in the queue you would say something like "queue person 4" and if you wanted the first person in the queue, you would say "queue person 0". Essentially, instead of starting counting from 1, you start counting from 0.</p><br />
<p>You should also remember that it is possible to create an array within an array. Think of it as a queue, and in each queue is another queue. These special arrays are called [[#MA|Multidimensional Arrays]]</p><br />
<br />
==Arrays in C#==<br />
<p>There are several ways of declaring arrays in C#. There are several ways shown below:</p><br />
<br />
Creates an <u>empty</u> array that will return integers.<br />
<syntaxhighlight lang="csharp">int[] arrayname; // Allocates Array to Memory But Doesn't Initalize It</syntaxhighlight><br />
<br />
Creates an <u>empty</u> array that will return integers, but it's size is 10. (10 people in a queue).<br />
<syntaxhighlight lang="csharp">arraynumbers = new int[10]; // Allocates &amp Initalises</syntaxhighlight><br />
<br />
Creates an array with values for each number in the queue.<br />
<syntaxhighlight lang="csharp">int[] numbers = {1, 2, 3, 4, 5};</syntaxhighlight><br />
<br />
Don't forget that it can be any data type.<br />
<syntaxhighlight lang="csharp">string[] strings = {"one", "two", "three", "four", "five"};</syntaxhighlight><br />
<br />
<p>To get something from an array, you can simply do the same as I explained before.</p><br />
<syntaxhighlight lang="csharp" line><br />
string[] strings = {"one", "two", "three", "four", "five"}; //Declares strings as an array of strings.<br />
Console.WriteLine(strings[0]); //Writes the first thing in the array<br />
Console.WriteLine(strings[2]); //Writes the third thing in the array<br />
Console.WriteLine(strings[4]); //Writes the fifth thing in the array<br />
//Output:<br />
//one<br />
//three<br />
//five<br />
</syntaxhighlight><br />
<br />
<p id="MA">To create a '''Multidimensional Array''' add a comer in the square brackets forming the array, for example:</p><br />
<br />
<tabber><br />
C#=<br />
<syntaxhighlight lang="csharp" line><br />
int[,] _2DArray = new int[5,5]; // Creates a 2dimensional Array<br />
_2DArray[2,2] = 7; // Accesses item at index X:2 Y:2 and sets it = to 7<br />
<br />
Console.WriteLine("{0} AT X:2 Y:2", _2DArray[2,2]);<br />
</syntaxhighlight><br />
</tabber><br />
<br />
For '''3Dimensional Arrays''' the same process applies, just with another commer, and the same continues for 4, 5, 6... dimensional arrays.<br />
<br />
<tabber><br />
C#=<br />
<syntaxhighlight lang="csharp" line><br />
int[,,] _3DArray = new int[5,5,5]; // Creates a 3dimensional Array<br />
_3DArray[2,2,2] = 7; // Accesses item at index X:2 Y:2 Z:2 and sets it = to 7<br />
<br />
Console.WriteLine("{0} AT X:2 Y:2 Z:2", _2DArray[2,2,2]);<br />
</syntaxhighlight><br />
</tabber><br />
<br />
To define the items contained in a three dimensional array during runtime, you must use multiple curly braces ({CURLY}) for each dimension however this becomes impractical for any arrays possesing a dimension greater then 2.<br />
<br />
<tabber><br />
C#=<br />
<syntaxhighlight lang="csharp" line><br />
int[,] _2DArray = new [,] {<br />
{1, 2, 3, 4, 5}<br />
{6, 7, 8, 9, 10}<br />
}; <br />
<br />
// Creates new array with 2 rows and 5 columns<br />
</syntaxhighlight><br />
</tabber><br />
<br />
==Arrays & Repetition==<br />
<br />
A for loop can be used to access every element within a array, this could be to read or write from the array:<br />
<syntaxhighlight lang=csharp line><br />
int[] NumList = new int[1000];<br />
Random RanNum = new Random();<br />
for (int i = 0; i < 1000; i++) <br />
{<br />
NumList[i] = RanNum.Next(1,10000);<br />
}<br />
</syntaxhighlight><br />
<br />
This declares an array of 1000 integers. The for loop will cycle from 0 to the thousandth item and each cycle will add a random number into that element of the array. You could use a for loop to read the list also:<br />
<br />
<syntaxhighlight lang=csharp line><br />
for (int i = 0; i < 1000; i++) <br />
{<br />
Console.WriteLine(NumList[i]);<br />
}<br />
</syntaxhighlight><br />
<br />
If you only wish to read from the array you could also use a foreach loop:<br />
<br />
<syntaxhighlight lang=csharp line><br />
foreach (int value in NumList) <br />
{<br />
Console.WriteLine(value);<br />
}<br />
</syntaxhighlight><br />
<br />
==Downsides==<br />
*An array can only be of a single data type<br />
*Once declared and initialised, memory is allocated for the whole structure even if it is empty<br />
*Normally they can't be resized once created, ie a Static Data Type.<br />
*Operations such as removing an element or inserting a value in the middle of the array require excessive processing and movement.<br />
<br />
<br />
For a more detailed examination of these points see: [[Array Downsides extended]]</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=1342User:C3ypt1c2017-01-16T12:24:50Z<p>C3ypt1c: </p>
<hr />
<div><div style="text-align:center; color:#88f"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator, Contributor and Bureaucrat of Computer Science Wiki<br>Contact email: <tt>c3ypt1c@gmail.com</tt><br></p><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=PHP_Basics&diff=834PHP Basics2016-12-17T13:55:26Z<p>C3ypt1c: /* PHP Variables */ added an example where " and ' are different</p>
<hr />
<div>{{Need_Expanding}}<br />
<br />
PHP is a server side scripting language, which is run on the server before the page is served to the client. Essentially it dynamically creates pages on the fly. It can be written on it's own our within normal standard HTML etc. It must be stored on a running webserver and you can only access it via it's URL in a browser. The page the client will receive will have all of the server side elements replaced with the output of the code. If your viewed source you would only see standard HTML and text.<br />
<br />
==PHP Tags==<br />
<br />
PHP code must be contained within PHP tags, these tags can be placed anywhere in the page because they are all run before the page is served to the client.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php // the opening PHP tag<br />
// your PHP code<br />
?> // the closing PHP tag<br />
</syntaxhighlight><br />
<br />
Within your PHP tags every line must be terminated with a semi colon.<br />
<br />
==PHP Comments==<br />
<br />
Like all languages PHP supports comments, these can greatly help the maintenance of a project because the developer / programmer may not be the person who maintains the project when it is live. The comments are exactly the same as in C#:<br />
<br />
<syntaxhighlight lang="php" line><br />
// This will comment a single line or include a comment at the end of that single line<br />
</syntaxhighlight><br />
<br />
Alternatively:<br />
<br />
<syntaxhighlight lang="php" line><br />
/*<br />
This will comment all lines<br />
between the start and<br />
the end comment marks<br />
*/<br />
</syntaxhighlight><br />
<br />
== Creating a Hello World in PHP ==<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<?php echo "hello world"; ?><br />
|-|<br />
Output=hello world<br />
</tabber><br />
<br />
<tt>echo</tt> is used to write text to the page, you could also echo html code or variables:<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<?php echo "<p>Hello World<br>Hola Mundo</p>"; ?></syntaxhighlight><br />
|-|<br />
Output HTML=<syntaxhighlight lang="html5" line><p>Hello World<br>Hola Mundo</p></syntaxhighlight><br />
|-|<br />
Output=<p>Hello World<br>Hola Mundo</p><br />
</tabber><br />
<br />
You could also do this:<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<html><br />
<head> <title> Hello World </title> </head><br />
<body><br />
<p><br />
<?php echo "Hello World"; ?><br />
<br><br />
<?php echo "Hola Mundo"; ?><br />
</p><br />
</body><br />
</html><br />
</syntaxhighlight><br />
|-|<br />
Output HTML=<syntaxhighlight lang="html5" line><br />
<html><br />
<head> <title> Hello World </title> </head><br />
<body><br />
<p><br />
Hello World<br />
<br><br />
Hola Mundo<br />
</p><br />
</body><br />
</html><br />
</syntaxhighlight><br />
|-|<br />
Output=<p><br />
Hello World<br />
<br><br />
Hola Mundo<br />
</p><br />
</tabber><br />
<br />
==PHP Variables==<br />
In PHP you don't declare variables before they are used, instead you just assign it a value and PHP will automatically convert it to the correct data type in the background. All variables in PHP start with the dollar sign ($) followed by the name of the variable. The name must start with a letter, and can only contain alpha-numeric characters and underscore. Variables are also case sensitive.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$name = "wayne";<br />
$age = 21;<br />
$alive = true; <br />
?><br />
</syntaxhighlight><br />
<br />
The above example creates 3 different variables, notice that you don't need to declare the data types.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$message = "<p> Hello World <br> Hola Mundo </p>"; <br />
echo $message; <br />
?><br />
</syntaxhighlight><br />
<br />
You can join together text using a period <tt>.</tt> :<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$message = "Hello World"; <br />
echo "<p>".$message."</p>; <br />
?><br />
</syntaxhighlight><br />
<br />
Calculations can be performed as normal but PHP will dynamically alter data types to suit. so this:<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$number = 5;<br />
$text = "5" <br />
echo $number + $text; <br />
?><br />
</syntaxhighlight><br />
<br />
will produce the output 10.<br><br />
<br />
It is also important to note that variables inside double quotes will be displayed as their value, while variables in single quotes will only produce what you wrote. For example:<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$a = "Hello";<br />
echo "$a<br>" . '$a';<br />
?><br />
//Output:<br />
//Hello<br />
//$a<br />
</syntaxhighlight><br />
<br />
==PHP Constants==<br />
<br />
Constants are like variables however once they are declared they cannot be changes or undefined. The name of a constant must start with either an underscore or letter.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
define (Message, "<p> Hello World <br> Hola Mundo </p>"); <br />
echo Message; <br />
?><br />
</syntaxhighlight><br />
<br />
You can also include another parameter (true) to make the constant insensitive to the case:<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
define (Message, "<p> Hello World <br> Hola Mundo </p>", true); <br />
echo mESSAGE; <br />
?><br />
</syntaxhighlight><br />
<br />
==PHP Operators==<br />
<br />
==PHP Selection==<br />
<br />
==PHP Repetition==<br />
<br />
==PHP Functions==<br />
<br />
==PHP & Forms==<br />
==PHP Other Commands==</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=PHP_Basics&diff=833PHP Basics2016-12-17T13:44:23Z<p>C3ypt1c: /* Creating a Hello World in PHP */ Added tabbers for php and their results</p>
<hr />
<div>{{Need_Expanding}}<br />
<br />
PHP is a server side scripting language, which is run on the server before the page is served to the client. Essentially it dynamically creates pages on the fly. It can be written on it's own our within normal standard HTML etc. It must be stored on a running webserver and you can only access it via it's URL in a browser. The page the client will receive will have all of the server side elements replaced with the output of the code. If your viewed source you would only see standard HTML and text.<br />
<br />
==PHP Tags==<br />
<br />
PHP code must be contained within PHP tags, these tags can be placed anywhere in the page because they are all run before the page is served to the client.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php // the opening PHP tag<br />
// your PHP code<br />
?> // the closing PHP tag<br />
</syntaxhighlight><br />
<br />
Within your PHP tags every line must be terminated with a semi colon.<br />
<br />
==PHP Comments==<br />
<br />
Like all languages PHP supports comments, these can greatly help the maintenance of a project because the developer / programmer may not be the person who maintains the project when it is live. The comments are exactly the same as in C#:<br />
<br />
<syntaxhighlight lang="php" line><br />
// This will comment a single line or include a comment at the end of that single line<br />
</syntaxhighlight><br />
<br />
Alternatively:<br />
<br />
<syntaxhighlight lang="php" line><br />
/*<br />
This will comment all lines<br />
between the start and<br />
the end comment marks<br />
*/<br />
</syntaxhighlight><br />
<br />
== Creating a Hello World in PHP ==<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<?php echo "hello world"; ?><br />
|-|<br />
Output=hello world<br />
</tabber><br />
<br />
<tt>echo</tt> is used to write text to the page, you could also echo html code or variables:<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<?php echo "<p>Hello World<br>Hola Mundo</p>"; ?></syntaxhighlight><br />
|-|<br />
Output HTML=<syntaxhighlight lang="html5" line><p>Hello World<br>Hola Mundo</p></syntaxhighlight><br />
|-|<br />
Output=<p>Hello World<br>Hola Mundo</p><br />
</tabber><br />
<br />
You could also do this:<br />
<tabber><br />
PHP=<syntaxhighlight lang="php" line><br />
<html><br />
<head> <title> Hello World </title> </head><br />
<body><br />
<p><br />
<?php echo "Hello World"; ?><br />
<br><br />
<?php echo "Hola Mundo"; ?><br />
</p><br />
</body><br />
</html><br />
</syntaxhighlight><br />
|-|<br />
Output HTML=<syntaxhighlight lang="html5" line><br />
<html><br />
<head> <title> Hello World </title> </head><br />
<body><br />
<p><br />
Hello World<br />
<br><br />
Hola Mundo<br />
</p><br />
</body><br />
</html><br />
</syntaxhighlight><br />
|-|<br />
Output=<p><br />
Hello World<br />
<br><br />
Hola Mundo<br />
</p><br />
</tabber><br />
<br />
==PHP Variables==<br />
In PHP you don't declare variables before they are used, instead you just assign it a value and PHP will automatically convert it to the correct data type in the background. All variables in PHP start with the dollar sign ($) followed by the name of the variable. The name must start with a letter, and can only contain alpha-numeric characters and underscore. Variables are also case sensitive.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$name = "wayne";<br />
$age = 21;<br />
$alive = true; <br />
?><br />
</syntaxhighlight><br />
<br />
The above example creates 3 different variables, notice that you don't need to declare the data types.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$message = "<p> Hello World <br> Hola Mundo </p>"; <br />
echo $message; <br />
?><br />
</syntaxhighlight><br />
<br />
You can join together text using the . :<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$message = "Hello World"; <br />
echo "<p>".$message."</p>; <br />
?><br />
</syntaxhighlight><br />
<br />
Calculations can be performed as normal but PHP will dynamically alter data types to suit. so this:<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
$number = 5;<br />
$text = "5" <br />
echo $number + $text; <br />
?><br />
</syntaxhighlight><br />
<br />
will produce the output 10.<br />
<br />
==PHP Constants==<br />
<br />
Constants are like variables however once they are declared they cannot be changes or undefined. The name of a constant must start with either an underscore or letter.<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
define (Message, "<p> Hello World <br> Hola Mundo </p>"); <br />
echo Message; <br />
?><br />
</syntaxhighlight><br />
<br />
You can also include another parameter (true) to make the constant insensitive to the case:<br />
<br />
<syntaxhighlight lang="php" line><br />
<?php <br />
define (Message, "<p> Hello World <br> Hola Mundo </p>", true); <br />
echo mESSAGE; <br />
?><br />
</syntaxhighlight><br />
<br />
==PHP Operators==<br />
<br />
==PHP Selection==<br />
<br />
==PHP Repetition==<br />
<br />
==PHP Functions==<br />
<br />
==PHP & Forms==<br />
==PHP Other Commands==</div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=828User:C3ypt1c2016-12-17T13:24:23Z<p>C3ypt1c: Removed</p>
<hr />
<div><div style="text-align:center; color:#88f"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Bureaucrat of Computer Science Wiki<br>Contact email: <tt>c3ypt1c@gmail.com</tt><br></p><br />
</div></div>C3ypt1chttps://www.trccompsci.online/mediawiki/index.php?title=User:C3ypt1c&diff=827User:C3ypt1c2016-12-17T13:23:59Z<p>C3ypt1c: Another test</p>
<hr />
<div><div style="text-align:center; color:#88f"><br />
<h1>Lukasz Baldyga</h1><br />
<p>Moderator and Bureaucrat of Computer Science Wiki<br>Contact email: <tt>c3ypt1c@gmail.com</tt><br></p><br />
</div><br />
<iframe src="http://phpcompsci.lukaszbaldy.ga/"></iframe><br />
<script><br />
alert("Hello");<br />
</script></div>C3ypt1c