Git Product home page Git Product logo

csharp's Introduction

josephworks

A Repository with a script that installs all repositories on JosephWorks' account!

git clone https://github.com/josephworks/josephworks.git && cd josephworks
bash getjosephworks.sh

Update with submodules

git clone https://github.com/josephworks/josephworks
cd josephworks
git submodule update --init --recursive --jobs 8

csharp's People

Contributors

animations-love avatar cmliv3141 avatar gcep650 avatar josephworks avatar mrclarkesoftware avatar nickdmug avatar tamed512 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

csharp's Issues

crap

JOSEPH YOUR CODE IS BROKEN
ALSO FIX THE DAYLIGHT CYCLE ON YOUR MINECRAFT SERVER
image

Bad frequency for MarrysConsole

        protected enum Tone
        {
            REST = 0,
            GbelowC = 3196,
            A = 3220,
            Asharp = 3233,
            B = 3247,
            C = 3262,
            Csharp = 3277,
            D = 3294,
            Dsharp = 3311,
            E = 3330,
            F = 3349,
            Fsharp = 3370,
            G = 3392,
            Gsharp = 3415,
            //Needs tuning, change 1 at the beginning to change frequency by on khz
        }

implplz

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp4
{
class SetofDice
{
Dice[] m_dice = new Dice[5];
bool[] m_keep = new bool[5];
int m_numrolls = 0;
public SetofDice()
{
for (int i = 0; i < m_dice.Length; i++)
{
m_dice[i] = new Dice();
}
}
public void Reset()
{
m_numrolls = 0;
for (int i = 0; i < m_keep.Length; i++)
{
m_keep[i] = false;
}
}
public void Keep(int n)
{
m_keep[n] = true;
}
public void Roll()
{
if (m_numrolls == 3)
return;
m_numrolls++;
for (int i = 0; i < 5; i++)
{
if (!m_keep[i])
m_dice[i].Roll();
}
}
public bool threeOfaKind()
{
int[] vals = new int[5];
for (int i = 0; i < vals.Length; i++)
{
vals[i] = m_dice[i].getValue();
}
Array.Sort(vals);
for (int i = 0; i < 3; i++)
{
if (vals[i] == vals[i + 1] &&
vals[i + 1] == vals[i + 2])
{
return true;
}
}
return false;
}
public bool fourOfaKind()
{
int[] vals = new int[5];
for (int i = 0; i < vals.Length; i++)
{
vals[i] = m_dice[i].getValue();
}
Array.Sort(vals);
for (int i = 0; i < 2; i++)
{
if (vals[i] == vals[i + 1] &&
vals[i + 1] == vals[i + 2] &&
vals[i + 2] == vals[i + 3])
{
return true;
}
}
return false;
}
public bool Yahtzee()
{
int[] vals = new int[5];
for (int i = 0; i < vals.Length; i++)
{
vals[i] = m_dice[i].getValue();
}
Array.Sort(vals);
for (int i = 0; i < 1; i++)
{
if (vals[i] == vals[i + 1] &&
vals[i + 1] == vals[i + 2] &&
vals[i + 2] == vals[i + 3] &&
vals[i + 3] == vals[i + 4])
{
return true;
}
}
return false;
}
public bool fullHouse()
{
int[] vals = new int[5];
for (int i = 0; i < vals.Length; i++)
{
vals[i] = m_dice[i].getValue();
}
Array.Sort(vals);
for (int i = 0; i < 1; i++)
{
if (vals[i] == vals[i + 1] &&
vals[i + 1] == vals[i + 2] &&
vals[i + 3] == vals[i + 4] ||
vals[i + 2] == vals[i + 3] &&
vals[i + 3] == vals[i + 4] &&
vals[i] == vals[i + 1])
{
return true;
}
}
return false;
}
public bool largeStraight()
{
int[] vals = new int[5];
for (int i = 0; i < vals.Length; i++)
{
vals[i] = m_dice[i].getValue();
}
Array.Sort(vals);
if (vals[0] == 1 &&
vals[1] == 2 &&
vals[2] == 3 &&
vals[3] == 4 &&
vals[4] == 5 ||
vals[0] == 2 &&
vals[1] == 3 &&
vals[2] == 4 &&
vals[3] == 5 &&
vals[4] == 6)
{
return true;
}
return false;
}
public int getValue(int n)
{
return m_dice[n].getValue();
}
public override string ToString()
{
string retVal = "";
for (int i = 0; i < m_dice.Length; i++)
{
retVal += m_dice[i].getValue() + ", ";
}
return retVal;
}
}
}

impl

while((MessageBox.Show("Do you want another beep",
"State Controlled Loop", MessageBoxButtons.YesNo,
MessageBoxIcon.Question) == DialogResult.Yes))
{
Beep();
}

sendtobaxley

#pragma config(Sensor, in1,    lineFolower,    sensorLineFollower)
#pragma config(Sensor, in2,    potentiometer,  sensorPotentiometer)
#pragma config(Sensor, in3,    lightSensor,    sensorReflection)
#pragma config(Sensor, dgtl1,  limitSwitch,    sensorDigitalIn)
#pragma config(Sensor, dgtl2,  touchsensor,    sensorTouch)
#pragma config(Sensor, dgtl3,  lowerEncoder,   sensorRotation)
#pragma config(Sensor, dgtl4,  upperEncoder,   sensorRotation)
#pragma config(Sensor, dgtl5,  ultrasonicIn,   sensorDigitalIn)
#pragma config(Sensor, dgtl6,  ultrasonicOut,  sensorDigitalOut)
#pragma config(Sensor, dgtl12, greenLed,       sensorLEDtoVCC)
#pragma config(Motor,  port1,           flashlight,    tmotorVexFlashlight, openLoop, reversed)
#pragma config(Motor,  port2,           rightMotor,    tmotorVex393TurboSpeed_MC29, openLoop, driveRight)
#pragma config(Motor,  port3,           leftMotor,     tmotorVex393TurboSpeed_MC29, openLoop, driveLeft)
#pragma config(Motor,  port8,           servoMotor,    tmotorServoStandard, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

//task servorun()
//{
//	setServo(servoMotor, 95);
//	sleep(1000);
//	while(true)
//	{
//		setServo(servoMotor, 127);
//		sleep(250);
//		setServo(servoMotor, -127);
//	}
//}

task main()
{
	//while (SensorValue(sensorTouch) == 1)
  robotType(none);
  //startTask( servorun );
	while(true)
	{
		turnFlashlightOff(flashlight);
		turnLEDOff(greenLed);
		stopMotor(leftMotor);
		stopMotor(rightMotor);

		untilTouch(touchsensor);

		turnLEDOn(greenLed);
		turnFlashlightOn(flashlight, 127);
		startMotor(leftMotor, 127);
		startMotor(rightMotor, 127);
		setServo(servoMotor, 127);
		sleep(20);
		turnFlashlightOff(flashlight);
		turnLEDOff(greenLed);
		sleep(20);
		setServo(servoMotor, -127);
	}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.