About The Reg Coding competition – 10 times as hard as the last one!

PER HERE

I didn’t find out about this contest until it was a month old.

Then I did a little digging on the subject (just a small bit of time) and took notes.

Later after I had the solution to one of the problems I had (unfortunately three weeks later or so) I decided to enter the contest.

Well I am here to report it is hours away from being due (and I am almost done) but I am not going to make it. I just wanted a new computer that wasn’t backdoored as all hell. But fuck, oh well. Alot of shit happened this past week so I have spent only a few hours for about 3 days out of the week writing this. Anyhow, the code is below, and since my site modifies shit I post a source file will also be located HERE. Like I said it is unfinished, and was really the first real world problem I have solved using java.

 

import java.util.*;

public class Decathlon {
/* Create the vector called vectorData to store the first run of names */
Vector vectorData = new Vector();

/* Create the vectors for each event SET ONE OF TWO */
Vector vector100m    = new Vector(),
vector110m    = new Vector(),
vector400m    = new Vector(),
vector1500m   = new Vector(),
vectorDiscus  = new Vector(),
vectorJavelin = new Vector(),
vectorShot    = new Vector(),
vectorLong    = new Vector(),
vectorHigh    = new Vector(),
vectorPole    = new Vector();

/* Creation of constants for use in calculating scores */
/* Throwing */
double discusA  = 12.91d;
double javelinA = 10.14d;
double shotA    = 51.39d;
int    discusB  = 4;
int    javelinB = 7;
double shotB    = 1.5d;
double discusC  = 1.1d;
double javelinC = 1.08d;
double shotC    = 1.05d;

/* Running */
double A100mA    = 25.4347d;
double A110mA    = 5.74352d;
double A400mA    = 1.53775d;
double A1500mA   = 0.03768d;
int    B100mB    = 18;
double B110mB    = 28.5d;
int    B400mB    = 82;
int    B1500mB   = 180;
double C100mC    = 1.81d;
double C110mC    = 1.92d;
double C400mC    = 1.81d;
double C1500mC   = 1.85d;

/* Jumping */
double longA    = 0.14354d;
double highA    = 0.8465d;
double poleA    = 0.2797d;
int    longB    = 220;
int    highB    = 75;
int    poleB    = 100;
double longC    = 1.4d;
double highC    = 1.42d;
double poleC    = 1.35d;

/* Creation of hashmap set for scores to be stored with name */
Map     map100m    = new HashMap(),
map110m    = new HashMap(),
map400m    = new HashMap(),
map1500m   = new HashMap(),
mapDiscus  = new HashMap(),
mapJavelin = new HashMap(),
mapShot    = new HashMap(),
mapLong    = new HashMap(),
mapHigh    = new HashMap(),
mapPole    = new HashMap();

try {
/* Load file into scanner */
Scanner scanner = new Scanner(new File(“Decathlon.dat”));
} catch (java.io.FileNotFoundException fileMissing) {
System.exit(1);
}

public void scanFile() {
/* While loops to load the first data dump. Runs until # is encountered */
while (!scanner.hasNext(“#”))
{
String upper = scanner.next();
vectorData.addElement(upper.toUpperCase());
}
}

public void loadVectors() {

/* Create vaiable to hold size of vectorData divided by 3 */
int vectorDataSize = vectorData.size() / 3;

/* Create variable tempCount which is used in each run */
int tempCount = 1;

/* Search every 3 buckets for name of event, then move on to next event and repeat */
while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“100M”))
{
vector100m.addElement(new String(vectorData.get(tempCount -1)));
vector100m.addElement(new String(vectorData.get(tempCount)));
vector100m.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“110M”))
{
vector110m.addElement(new String(vectorData.get(tempCount -1)));
vector110m.addElement(new String(vectorData.get(tempCount)));
vector110m.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“400M”))
{
vector400m.addElement(new String(vectorData.get(tempCount -1)));
vector400m.addElement(new String(vectorData.get(tempCount)));
vector400m.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
int tempCount = 1;
if(vectorData.get(tempCount).contains(“1500M”))
{
vector1500m.addElement(new String(vectorData.get(tempCount -1)));
vector1500m.addElement(new String(vectorData.get(tempCount)));
vector1500m.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“DISCUS”))
{
vectorDiscus.addElement(new String(vectorData.get(tempCount -1)));
vectorDiscus.addElement(new String(vectorData.get(tempCount)));
vectorDiscus.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“JAVELIN”))
{
vectorJavelin.addElement(new String(vectorData.get(tempCount -1)));
vectorJavelin.addElement(new String(vectorData.get(tempCount)));
vectorJavelin.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“SHOT”))
{
vectorShot.addElement(new String(vectorData.get(tempCount -1)));
vectorShot.addElement(new String(vectorData.get(tempCount)));
vectorShot.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“LONG”))
{
vectorLong.addElement(new String(vectorData.get(tempCount -1)));
vectorLong.addElement(new String(vectorData.get(tempCount)));
vectorLong.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“HIGH”))
{
vectorHigh.addElement(new String(vectorData.get(tempCount -1)));
vectorHigh.addElement(new String(vectorData.get(tempCount)));
vectorHigh.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“100M”))
{
vector100m.addElement(new String(vectorData.get(tempCount -1)));
vector100m.addElement(new String(vectorData.get(tempCount)));
vector100m.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}

/* re-initialize vectorDataSize */
vectorDataSize = vectorData.size() / 3;

/* re-initialize tempCount */
tempCount = 1;

while(vectorDataSize != 0)
{
if(vectorData.get(tempCount).contains(“POLE”))
{
vectorPole.addElement(new String(vectorData.get(tempCount -1)));
vectorPole.addElement(new String(vectorData.get(tempCount)));
vectorPole.addElement(new String(vectorData.get(tempCount +1)));
}
–vectorDataSize;
tempCount = tempCount + 3;
}
}

public void runScores() {
/* Creation of variable dataPointer to be used as a pointer into the data structure */
/* Initial value is 2 because it will point to the first score in the data set */
/* Afterwards it will be incremented by three until variable currentVectorSize is 0 */
int dataPointer = 2;

/* Creation of variable tempScore to temporarily hold the score we are working on */
/* Data type is int so it drops the remainder of the double to round down per rules */
int tempScore;

/* Creation of variables for helping in the calculation of D-B, B-T, and M-B */
double tempDB;
double tempBT;
double tempMB;

/* Code to calculate the scores for the Throwing events*/
/* Code to calculate score for event Discus */

/* Create vaiable to hold size of vectorDiscus divided by 3 */
int vectorDiscusSize = vectorDiscus.size() / 3;

/* Search every 3 buckets for name of event, then move on to next event and repeat */
while(vectorDiscusSize != 0)
{
tempDB = discusB – vectorDiscus.get(dataPointer);
tempExponent = Math.pow((double)tempDB, (double)discusC));
tempScore = discusA * tempExponent;
–vectorDiscusSize;
String nameDiscus = vectorDiscus.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapDiscus.put(nameDiscus, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vectorDiscus divided by 3 */
int vectorJavelinSize = vectorJavelin.size() / 3;

while(vectorJavelin != 0)
{
/* Code to calculate score for event Javelin */
tempDB = javelinB – vectorJavelin.get(dataPointer);
tempExponent = Math.pow((double)tempDB, (double)javelinC));
tempScore = javelinA * tempExponent;
–vectorJavelinSize;
String nameJavelin = vectorJavelin.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapJavelin.put(nameJavelin, tempScore);

}
tempCount2 = 2;

/* Create vaiable to hold size of vectorShot divided by 3 */
int vectorShotSize = vectorJavelin.size() / 3;

while(vectorShot != 0)
{
/* Code to calculate score for event Shot */
tempDB = shotB – vectorShot.get(dataPointer);
tempExponent = Math.pow((double)tempDB, (double)shotC));
tempScore = shotA * tempExponent;
–vectorShotSize;
String nameShot = vectorShot.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapShot.put(nameShot, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vector100m divided by 3 */
int vector100mSize = vector100m.size() / 3;

while(vector100m != 0)
{
/* Code to calculate the scores for the Running events */
/* Code to calculate score for event 100m */
tempBT = B100mB – vector100m.get(dataPointer);
tempExponent = Math.pow((double)tempBT, (double)C100mC));
tempScore = A100mA * tempExponent;
–vectorShotSize;
String name100m = vector100m.get(dataPointer -2)
dataPointer = dataPointer + 3;
map100m.put(name100m, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vector110m divided by 3 */
int vector110mSize = vector110m.size() / 3;

while(vector110m != 0)
{
/* Code to calculate score for event 110m */
tempBT = B110mB – vector110m.get(dataPointer);
tempExponent = Math.pow((double)tempBT, (double)C110mC));
tempScore = A110mA * tempExponent;
–vector110mSize;
String name110m = vector110m.get(dataPointer -2)
dataPointer = dataPointer + 3;
map110m.put(name110mm, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vector400m divided by 3 */
int vector400mSize = vector400m.size() / 3;

while(vector400m != 0)
{
/* Code to calculate score for event 400m */
tempBT = B400mB – vector400m.get(dataPointer);
tempExponent = Math.pow((double)tempBT, (double)C400mC));
tempScore = A400mA * tempExponent;
–vector400mSize;
String name400m = vector400m.get(dataPointer -2)
dataPointer = dataPointer + 3;
map400m.put(name400m, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vector1500m divided by 3 */
int vector1500mSize = vector1500m.size() / 3;

while(vector1500m != 0)
{
/* Code to calculate score for event 1500m */
tempBT = B1500mB – vector1500m.get(dataPointer);
tempExponent = Math.pow((double)tempBT, (double)C1500mC));
tempScore = A1500mA * tempExponent;
–vector1500mSize;
String name1500m = vector1500m.get(dataPointer -2)
dataPointer = dataPointer + 3;
map1500m.put(name1500m, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vectorLong divided by 3 */
int vectorLongSize = vectorLong.size() / 3;

while(vectorLong != 0)
{
/* Code to calculate the scores for the Jumping events */
/* Code to calculate score for event Long */
tempMB = longB – vectorLong.get(dataPointer);
tempExponent = Math.pow((double)tempMB, (double)longC));
tempScore = longA * tempExponent;
–vectorLongSize;
String nameLong = vectorLong.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapLong.put(nameLong, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vectorHigh divided by 3 */
int vectorHighSize = vectorHigh.size() / 3;

while(vectorHigh != 0)
{
/* Code to calculate score for event High */
tempMB = highB – vectorHigh.get(dataPointer);
tempExponent = Math.pow((double)tempMB, (double)highC));
tempScore = highA * tempExponent;
–vectorHighSize;
String nameHigh = vectorHigh.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapHigh.put(nameHigh, tempScore);
}
tempCount2 = 2;

/* Create vaiable to hold size of vectorPole divided by 3 */
int vectorPoleSize = vectorPole.size() / 3;

while(vectorPole != 0)
{
/* Code to calculate score for event Pole */
tempMB = poleB – vectorPole.get(dataPointer);
tempExponent = Math.pow((double)tempMB, (double)poleC));
tempScore = poleA * tempExponent;
–vectorPoleSize;
String namePole = vectorPole.get(dataPointer -2)
dataPointer = dataPointer + 3;
mapPole.put(namePole, tempScore);
}

}

public void oneLargeVector() {

/* Creation of variable int called tempLength to temporarily store the length of the maps */
int tempLength;

/* Creation of vector called vectorNames to temporarily store names */
Vector vectorNames = new Vector();

/* Make one large vector called vectorNamesAndScores to hold all calculated names and scores */
Vector vectorNamesAndScores = new Vector();

/* Code to process names and scores for map100m */
tempLength = map100m.size() -1;
vectorNames.addAll(map100m.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(map100m.get(vectorNames.get(tempLength)));
–tempLength;
}
map100m.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for map110m */
tempLength = map110m.size() -1;
vectorNames.addAll(map100m.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(map110m.get(vectorNames.get(tempLength)));
–tempLength;
}
map110m.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for map400m */
tempLength = map400m.size() -1;
vectorNames.addAll(map400m.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(map400m.get(vectorNames.get(tempLength)));
–tempLength;
}
map400m.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for map1500m */
tempLength = map1500m.size() -1;
vectorNames.addAll(map1500m.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(map1500m.get(vectorNames.get(tempLength)));
–tempLength;
}
map1500m.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapDiscus */
tempLength = mapDiscus.size() -1;
vectorNames.addAll(mapDiscus.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapDiscus.get(vectorNames.get(tempLength)));
–tempLength;
}
mapDiscus.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapJavelin */
tempLength = mapJavelin.size() -1;
vectorNames.addAll(mapJavelin.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapJavelin.get(vectorNames.get(tempLength)));
–tempLength;
}
mapJavelin.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapShot */
tempLength = mapShot.size() -1;
vectorNames.addAll(mapShot.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapShot.get(vectorNames.get(tempLength)));
–tempLength;
}
mapShot.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapLong */
tempLength = mapLong.size() -1;
vectorNames.addAll(mapLong.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapLong.get(vectorNames.get(tempLength)));
–tempLength;
}
mapLong.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapHigh */
tempLength = mapHigh.size() -1;
vectorNames.addAll(mapHigh.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapHigh.get(vectorNames.get(tempLength)));
–tempLength;
}
mapHigh.clear();
vectorNames.removeAllElements();

/* Code to process names and scores for mapPole */
tempLength = mapPole.size() -1;
vectorNames.addAll(mapPole.keySet());
while (tempLength != -1) {
final1.add(vectorNames.get(tempLength));
final1.add(mapPole.get(vectorNames.get(tempLength)));
–tempLength;
}
mapPole.clear();
vectorNames.removeAllElements();
}

}

About Neutrons.

Today I figured I would post data on what a neutron actually is and why it is neutral and yet still bonds to the proton.

 

Turns out a neutron is not much different than a muon. It is made of a combination of electrons and positrons. Only real difference when compared to a muon is the count of these particles. The Muon has a balanced set of particles, plus one electron which gives it its negative -1 charge. Inside the neutron there is an equal balance of particle, both positron and electron. This is what makes the particle neutral. Now the question is why does a neutral particle bond with a charged particle, and the answer is mass. The pure mass of the neutron gives it gravitational pull towards other particles which have charge (namely the proton). Anyhow, that pretty much explains this unknown phenomenon.

Thoughts on Muon

http://arstechnica.com/science/2016/08/researchers-orbit-a-muon-around-an-atom-confirm-physics-is-broken/

 

Per this article:

“They confirm that the problem still exists, and there’s no way of solving it with existing theories.” —> Question: Is the solid theory of how this would be computed not posted on this very website?

” But beyond the mass and instability, the muon should behave a lot like a run-of-the-mill electron.” —> Question: How would a particle with the charge of -1 which has a mass greater than an electron  (which is because it is made of a combination of electrons and positrons) be expected to behave exactly like an electron?

“the value for the radius they got was significantly smaller than the one obtained when you measure using an electron. Remember, the muon and the electron should be equivalent, so there should be no difference.” —> Question: How exactly can you compute the charge of said particle to a constant if you do not have all the variables which are required to calculate such an answer? The Muon being a sub-particle which is a collection of elementary particles (electrons and positrons) may possibly have not only a slight charge difference (which may also change with decay), but also a large mass difference which also changes up decay. One would have to calculate (rationally) the given amount of each elementary particle which makes up the Muon, their respective charges, and the charge resulting in their combination in what one would consider a single mass.

 

It sounds to me that not enough physicists are reading the information posted on this very website, and they are failing in their field because of the lack of their dissemination of said information on this website to the physics community.

Finding those alien transmissions!

RE:”In order to understand the nature of life in the universe, you have to look for it. Researchers at the SETI institute in California have a long history of using high-frequency radio waves to search for extraterrestrial intelligence.”

http://www.theregister.co.uk/2016/08/12/seti_institute_is_trying_to_find_alien_communication_using_a_radio_telescope/

Would one be the smarter US based intelligence type if he or she was searching for frequencies using positrons as the source of the signal rather than electrons? Same media to transfer the wave (air) but different transmission.

One might conclude this would be the more “Egghead” approach.

Mr Robot directory traversal flaw.

I saw an ad for cox advertising USA networks Mr Robot.

I have already seen the series and was wondering if they had new episodes.

So I found https://www.whoismrrobot.com/ .

I was like woah… this is really cool as it has a terminal.

Opened a terminal and found it (by design) only has 3 commands (yikes!).

LS, CD, and OPEN in lowercase.

I was like geeze this seems kinda limited so I found they have a problem when you pass a directory to it containing a well known (ancient I should say) string of characters.

 

Try it for yourself: open /../

breaks you out of the chroot dir.

 

I probably could have gone for a root compromise but I had no way of knowing at that time if this was a root dir of a server or just a fake server made by web code.

 

Well there you have it. A little harmless hack trick for Mr Robot.

Figured it was an easter egg. But seeing as I do not look good in an orange jumpsuit I stopped there.

A new power source?

Is it possible that one could use a gamma ray emitter to create a laser system which could output more energy than used to produce it? In this example one would use a medium like Radon gas of which is irradiated and kicks out more radiation than it is irradiated with.

Simple nmap front end for android

I have been wanting to run my nmap scans from my phone with the android ui.

So I created a little application to do a syn scan and report the results.

The app just asks you to input the ip and then click run nmap.

The results of the scan will be below.

 

It is a very simple app, but it what I needed.

I am thinking on creating an actual front end for some of the scans available but I have yet to get off my ass and do that.

The source code is available at: http://www.coolfuion.com/Nmap-syn-frontend-android.tar.gz

the apk alone is available at: http://www.coolfuion.com/Nmap-syn-frontend-android.apk

 

This assumes you have read my article on compiling nmap for android and have installed the nmap binary.