jamesmatchett / james-helps-friends-code Goto Github PK
View Code? Open in Web Editor NEWWhere I help people with programming :)
Where I help people with programming :)
Why does this vvv
print('print("print")')
Become this vvv
print("print")
also uh
how to create a concatenation?
`using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _3WayDistanceCalculator
{
public partial class Form1 : Form
{
decimal time;
decimal speedOfLight = 299792458;
decimal distance;
string var1;
string var2;
string var3;
decimal tb1;
decimal tb2;
decimal tb3;
int distance2;
public Form1()
{
InitializeComponent();
comboBox2.SelectedIndex = 0;
comboBox1.SelectedIndex = 1;
comboBox3.SelectedIndex = 3;
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox2.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox3.DropDownStyle = ComboBoxStyle.DropDownList;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox2.SelectedItem.ToString() == "Speed of light" ||
comboBox1.SelectedItem.ToString() == "Speed of light" &&
comboBox2.SelectedItem.ToString() == "Distance")
{
comboBox3.SelectedIndex = 2;
comboBox3.Enabled = false;
}
else
{
comboBox3.Enabled = true;
}
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light")
{
comboBox2.SelectedIndex = 2;
comboBox2.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox1.SelectedItem.ToString() == "Speed of light")
{
textBox1.Enabled = false;
textBox1.Text = "299792458";
}
else
{
textBox1.Enabled = true;
textBox1.Text = "";
}
if (comboBox1.SelectedItem.ToString() == "Distance" && comboBox2.SelectedItem.ToString() == "Distance")
{
comboBox2.SelectedIndex = 0;
}
if (comboBox1.SelectedItem.ToString() == "Distance")
{
label1.Text = "Distance";
}
if (comboBox1.SelectedItem.ToString() == "Speed of light")
{
label1.Text = "Speed of light";
}
if (comboBox1.SelectedItem.ToString() == "Time")
{
label1.Text = "Time";
}
}
private void button1_Click(object sender, EventArgs e)
{
//tb1 = Convert.ToDecimal(textBox1.Text);
//tb2 = Convert.ToDecimal(textBox2.Text);
//tb3 = Convert.ToDecimal(textBox3.Text);
if (tb1 != speedOfLight)
{
}
if (comboBox1.SelectedItem.ToString() == "Distance" && comboBox2.SelectedItem.ToString() == "Speed of light")
{
var1 = textBox1.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}
label4.Text = var3;
distance = 0;
}
if (comboBox2.SelectedItem.ToString() == "Distance" && comboBox1.SelectedItem.ToString() == "Speed of light")
{
label4.Text = "Working";
var1 = textBox2.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}
label4.Text = var3;
distance = 0;
}
if (comboBox1.SelectedItem.ToString() == "Distance" && comboBox3.SelectedItem.ToString() == "Speed of light")
{
var1 = textBox1.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}
}
if (comboBox3.SelectedItem.ToString() == "Distance" && comboBox1.SelectedItem.ToString() == "Speed of light")
{
var3 = textBox3.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}
}
if (comboBox2.SelectedItem.ToString() == "Distance" && comboBox3.SelectedItem.ToString() == "Speed of light")
{
var3 = textBox3.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}
}
if (comboBox3.SelectedItem.ToString() == "Distance" && comboBox2.SelectedItem.ToString() == "Speed of light")
{
var3 = textBox3.Text;
distance = Convert.ToDecimal(var1);
time = distance / speedOfLight;
var3 = time.ToString();
label4.Text = var3;
/*if (time == 1)
{
var3 = time.ToString() + " Second";
}
else
{
var3 = time.ToString() + " Seconds";
}*/
}
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light" ||
comboBox1.SelectedItem.ToString() == "Speed of light" &&
comboBox3.SelectedItem.ToString() == "Distance")
{
comboBox2.SelectedIndex = 2;
comboBox2.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light" ||
comboBox2.SelectedItem.ToString() == "Speed of light" &&
comboBox3.SelectedItem.ToString() == "Distance")
{
comboBox1.SelectedIndex = 2;
comboBox1.Enabled = false;
}
else
{
comboBox1.Enabled = true;
}
if (comboBox3.SelectedItem.ToString() == "Distance" && comboBox2.SelectedItem.ToString() == "Distance")
{
comboBox2.SelectedIndex = 0;
}
if (comboBox3.SelectedItem.ToString() == "Distance" && comboBox1.SelectedItem.ToString() == "Distance")
{
comboBox1.SelectedIndex = 0;
}
if (comboBox3.SelectedItem.ToString() == "Speed of light")
{
textBox3.Enabled = false;
textBox3.Text = "299792458";
}
else
{
textBox3.Enabled = true;
textBox3.Text = "";
}
if (comboBox3.SelectedItem.ToString() == "Distance")
{
label3.Text = "Distance";
}
if (comboBox3.SelectedItem.ToString() == "Speed of light")
{
label3.Text = "Speed of light";
}
if (comboBox3.SelectedItem.ToString() == "Time")
{
label3.Text = "Time";
}
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light" /*||
comboBox2.SelectedItem.ToString() == "Speed of light" &&
comboBox3.SelectedItem.ToString() == "Distance"*/)
{
comboBox1.SelectedIndex = 2;
comboBox1.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox1.SelectedItem.ToString() == "Speed of light")
{
comboBox3.SelectedIndex = 2;
comboBox3.Enabled = false;
}
else
{
comboBox3.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Speed of light")
{
textBox2.Enabled = false;
textBox2.Text = "299792458";
}
else
{
textBox2.Enabled = true;
textBox2.Text = "";
}
if (comboBox2.SelectedItem.ToString() == "Speed of light")
{
}
if (comboBox2.SelectedItem.ToString() == "Distance")
{
label2.Text = "Distance";
}
if (comboBox2.SelectedItem.ToString() == "Speed of light")
{
label2.Text = "Speed of light";
}
if (comboBox2.SelectedItem.ToString() == "Time")
{
label2.Text = "Time";
}
}
}
}
`
I just want to write my first program in python
i want to pick up roblox girlfriends using cā
`using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace _3WayDistanceCalculator
{
public partial class Form1 : Form
{
decimal time;
decimal speedOfLight = 299792458;
decimal distance;
string var1;
string var2;
public Form1()
{
InitializeComponent();
comboBox2.SelectedIndex = 0;
comboBox1.SelectedIndex = 1;
comboBox3.SelectedIndex = 3;
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox2.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox3.DropDownStyle = ComboBoxStyle.DropDownList;
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox2.SelectedItem.ToString() == "Speed of light" ||
comboBox1.SelectedItem.ToString() == "Speed of light" &&
comboBox2.SelectedItem.ToString() == "Distance")
{
comboBox3.SelectedIndex = 2;
comboBox3.Enabled = false;
}
else
{
comboBox3.Enabled = true;
}
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light")
{
comboBox2.SelectedIndex = 2;
comboBox2.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox1.SelectedItem.ToString() == "Distance")
{
label1.Text = "Distance";
}
if (comboBox1.SelectedItem.ToString() == "Speed of light")
{
label1.Text = "Speed of light";
}
if (comboBox1.SelectedItem.ToString() == "Time")
{
label1.Text = "Time";
}
}
private void button1_Click(object sender, EventArgs e)
{
//string comb1 = Convert.ToString(comboBox1);
//string comb2 = Convert.ToString(comboBox2);
//if (comb1 == "Distance" && comb2 == "Speed of light")
if (comboBox1.SelectedItem.ToString() == "Distance" && comboBox2.SelectedItem.ToString() == "Speed of light")
{
var1 = textBox1.Text;
var2 = textBox2.Text;
distance = Convert.ToDecimal(var1);
speedOfLight = Convert.ToInt32(var2);
time = distance / speedOfLight;
string var3 = time.ToString() + " Seconds";
label4.Text = var3;
}
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light" ||
comboBox1.SelectedItem.ToString() == "Speed of light" &&
comboBox3.SelectedItem.ToString() == "Distance")
{
comboBox2.SelectedIndex = 2;
comboBox2.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light")
{
comboBox1.SelectedIndex = 2;
comboBox1.Enabled = false;
}
else
{
comboBox1.Enabled = true;
}
if (comboBox3.SelectedItem.ToString() == "Distance")
{
label3.Text = "Distance";
}
if (comboBox3.SelectedItem.ToString() == "Speed of light")
{
label3.Text = "Speed of light";
}
if (comboBox3.SelectedItem.ToString() == "Time")
{
label3.Text = "Time";
}
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox3.SelectedItem.ToString() == "Speed of light" ||
comboBox2.SelectedItem.ToString() == "Speed of light" &&
comboBox3.SelectedItem.ToString() == "Distance")
{
comboBox1.SelectedIndex = 2;
comboBox1.Enabled = false;
}
else
{
comboBox2.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Distance" &&
comboBox1.SelectedItem.ToString() == "Speed of light")
{
comboBox3.SelectedIndex = 2;
comboBox3.Enabled = false;
}
else
{
comboBox3.Enabled = true;
}
if (comboBox2.SelectedItem.ToString() == "Speed of light")
{
}
if (comboBox2.SelectedItem.ToString() == "Distance")
{
label2.Text = "Distance";
}
if (comboBox2.SelectedItem.ToString() == "Speed of light")
{
label2.Text = "Speed of light";
}
if (comboBox2.SelectedItem.ToString() == "Time")
{
label2.Text = "Time";
}
}
}
}
`
Archive.zip
Save me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.