if ( x == true)
{
    // do something
}

Fucking amateurs :| lol

By Manoochehr Mojgani, 2017-12-19 10:03:29
i++;
i++;
i++;
i++;
Console.WriteLine(i);

He doesn't know what is " i+=4 " :||||

By Manoochehr Mojgani, 2017-12-13 21:46:04
base.transform.name = this.bodyName;
		this.radius = this.diameterKm * 500.0;
		this.mass = Math.Pow(this.radius, 2.0) * this.surfaceGravity;
		this.cameraSwitchHeightM = this.cameraSwitchHeightKm * 1000.0;
		if (this.atmosphereData.shadowIntensity == 0f)
		{
			this.atmosphereData.shadowIntensity = 1.65f;
		}
		this.atmosphereData.atmosphereHeightM = this.atmosphereData.atmosphereHeightKm * 1000.0;
		if (this.terrainData.terrainMaterial != null)
		{
			this.terrainData.terrainMaterial.color = this.terrainData.terrainColor;
		}
		this.terrainData.maxTerrainHeight = this.GetMaxTerrainHeight();
		this.terrainData.unitToAngle = 360.0 / ((this.radius + this.terrainData.maxTerrainHeight) * 2.0 * 3.1415926535897931);
		for (int i = 0; i < this.terrainData.detailLevels.Length; i++)
		{
			this.terrainData.detailLevels[i].chunckSize = (double)this.terrainData.baseChunckSize / Math.Pow(2.0, (double)i);
			this.terrainData.detailLevels[i].angularSize = (float)this.terrainData.detailLevels[i].chunckSize / (float)this.terrainData.heightMaps[0].heightMap.HeightDataArray.Length * 360f;
		}
		this.terrainData.detailLevels[0].loadDistance = double.PositiveInfinity;
		if (this.type == CelestialBodyData.Type.Star)
		{
			this.parentBody = null;
			this.orbitData.SOIMultiplier = double.PositiveInfinity;
		}
		if (this.parentBody != null && (this.type == this.parentBody.type || (this.type == CelestialBodyData.Type.Planet && this.parentBody.type == CelestialBodyData.Type.Moon)))
		{
			this.parentBody = null;
		}
		if (this.parentBody != null)
		{
			this.orbitData._period = Kepler.GetPeriod(0.0, this.orbitData.orbitHeightM, this.parentBody.mass);
			this.orbitData.periodString = Ref.GetTimeString(this.orbitData._period);
			this.orbitData._meanMotion = -6.2831853071795862 / this.orbitData._period;
			this.orbitData.orbitalVelocity = this.orbitData.orbitHeightM * this.orbitData._meanMotion;
			this.orbitData.SOI = this.orbitData.orbitHeightM * Math.Pow(this.mass / this.parentBody.mass, 0.4) * this.orbitData.SOIMultiplier;
			if (!this.ParentHasThisBodyAsSatellite())
			{
				List<CelestialBodyData> list = new List<CelestialBodyData>(this.parentBody.satellites);
				list.Add(this);
				this.parentBody.satellites = list.ToArray();
				this.parentBody.ValidateSatellites();
			}
By Anonymous, 2018-02-16 21:20:56

string date = user.RegistrationDate.ToShortDateString().ToString();
By Anonymous, 2019-02-13 14:51:41
if ((bool)greenButton.IsChecked)
{
    CurrentColor = Color.FromArgb(0xFF, 0x00, 0xCC, 0x00);
}
else if ((bool)greyButton.IsChecked)
{
    CurrentColor = Color.FromArgb(0xFF, 0x79, 0x79, 0x79);
}

foreach (var item in ItemsList.Items)
{
    if ((grid.Background as SolidColorBrush).Color == CurrentColor)
    {
        selectedItems.Add(item);
    }
}
By Anonymous, 2019-09-13 15:41:19
/// <summary>
/// Method that checks if an object is not null
/// </summary>
/// <param name="obj">extend type of <see cref="Object"/></param>
/// <returns>true if object is not null</returns>
public static bool NotNull(this Object obj)
{
    return obj != null;
}


[TestMethod]
public void Test_Something()
{
    // test
    var result = DoSomething();
    
    // assert
    Assert.IsTrue(result.NotNull());
}
By Anonymous, 2017-12-21 15:42:20
/// <summary> 
/// Desctop constructor
/// </summary>
...

This is best XML commentary I found so far.

By Anonymous, 2020-03-11 17:55:37
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class StoryOfMyLife : MonoBehaviour
{
    void OnDestory()
    {
        Debug.Log("  Directed by  ");
        Debug.Log("ROBERT B. WEIDE");
    }
}

For Unity developers only

By SanSanych, 2020-09-25 21:22:53
[HttpPost]
[Route("validaPrepacks")]
public IHttpActionResult ValidaPrepacks(ValidaPrepackVO validacion)
{
    try
    {
        return Ok();
    }
    catch (Exception e)
    {
        return Ok(e.Message);
    }

}

A code that "validate" a pack in the backend

By Anonymous, 2019-09-17 21:48:29
class {
    public State state;
    //enums cant take double values...
    public struct State
    {
        public const float IDLE = 0f;
        public const float WALKING = 0.5f;
        public const float RUNNING = 1f;
    }
    protected void Stop()
    {
        SetSpeed(State.IDLE);
    }
    protected void SetSpeed(float f)
    {
        agent.speed = f;
        if (agent.speed > 1f && agent.speed < 5f)
        {
            f = State.WALKING;
            agent.Resume();
        }
        else if (agent.speed > 5f)
        {
            f = State.RUNNING;
            agent.Resume();
        }
        else
        {
            f = State.IDLE;
            agent.Stop();
        }
    }
}

Who needs static float when you can have a constant in a nested struct, as a bonus State state has 0 references in the project

By SwagridOfficial, 2018-01-05 13:39:24
private void reset_kolejnosc()
{
	this.kolejnosc_s[0] = 1;
	this.kolejnosc_s[1] = 2;
	this.kolejnosc_s[2] = 3;
	this.kolejnosc_s[3] = 4;
	this.kolejnosc_s[4] = 5;
	this.kolejnosc_s[5] = 6;
	this.kolejnosc_s[6] = 7;
	this.kolejnosc_s[7] = 8;
	this.kolejnosc_s[8] = 9;
	this.kolejnosc_s[9] = 10;
}
By winek, 2016-07-17 00:16:00
public event EventHandler<Cles_graph_doivent_etre_redessines> les_graph_doivent_etre_redessines;
public void remove_event()
{
    if (this.les_graph_doivent_etre_redessines != null)
    {
        foreach (EventHandler<Cles_graph_doivent_etre_redessines> F_les_graph_doivent_etre_redessines in this.les_graph_doivent_etre_redessines.GetInvocationList())
        {
            this.les_graph_doivent_etre_redessines -= F_les_graph_doivent_etre_redessines;
        }
    }
}
By Anonymous, 2015-09-14 05:52:20
try {
    User.ClaimToken();
} 
catch {
    User.ClaimToken();
}
By Anonymous, 2017-12-22 08:44:59
if ( variable )
{
    
}
else
{
    Console.WriteLine("Wrong")
}

He doesn't know what "Not" is it :|

By Manoochehr Mojgani, 2017-12-13 17:05:36
string month = DateTime.Today.Month.ToString();
if (DateTime.Today.Month < 10)
{
    month = "0" + month;
}
string day = DateTime.Today.Day.ToString();
if (DateTime.Today.Day < 10)
{
    day = "0" + day;
}

string dateCorrect = String.Format("{0}.{1}.{2}", DateTime.Today.Year, month, day);

string dateDue = "";
if (transferFields.DueDate.SelectedDate.HasValue)
{
    var dateDuearr = transferFields.DueDate.Value.Split(' ')[0].Split('.');
    dateDue = dateDuearr[2] + '.' + dateDuearr[1] + '.' + dateDuearr[0];
}
else {
    dateDue = dateCorrect;
}

Real developers don't use built in parsing and formatting methods.

By You will be proud of our code!, 2017-12-12 09:53:08