What's new
Roleplay UK

Join the UK's biggest roleplay community on FiveM and experience endless new roleplay opportunities!

Guess the Language (Programming Edition)

TacticalPanda

A Panda Holding a Glock 18
Investor
Lifetime Donator
Hello, Ladies and Gentleman!

Here i got a game. So what you have to do, is post a snippet of code, and if someone replies to your comment with the programming language, they get to post the next snippet.

Ill start.

'

$fwend = $_POST['fwend'];

$conn = mysqli_connect('localhost', 'root', 'randompass', 'fwends');

$stmt = $conn->prepare('INSERT INTO fwends_list(fwend) VALUES(?)');

$stmt->bind_param('s', $fwend);

$stmt->execute();

'

Good luck,

Fellow Programmers <3

 
-cough php- -cough- on my phone I'll post a snippet of code tomorrow 
fine il post one insted to keep it going.

 

bool CreateTriangle(HWND hMainWnd) {
 
    D3D11_BUFFER_DESC bd;
    ZeroMemory( &bd, sizeof(bd) );
    bd.Usage = D3D11_USAGE_DEFAULT;
    bd.ByteWidth = sizeof( Vertex ) * ARRAYSIZE(space_ship);   
    bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
    bd.CPUAccessFlags = 0;

     D3D11_SUBRESOURCE_DATA InitData;
    ZeroMemory( &InitData, sizeof(InitData) );
  
    InitData.pSysMem = space_ship;
    HRESULT hr = d3dDevice->CreateBuffer( &bd, &InitData, &vertexBuffer );
    if( hr != S_OK) {
        MessageBox(hMainWnd, TEXT("Failed to create vertex buffer"), szAppClassName, NULL);

        return false;
    }

    // Determine the aabb for the space ship mesh
    Calcaabb(space_ship, ARRAYSIZE(space_ship), &min_xyz_spaceship, &max_xyz_spaceship);

    // Camera aabb so we can collide with the objects
    min_xyz_cam.m128_f32[0] = -1.0f;
    min_xyz_cam.m128_f32[1] = -1.0f;
    min_xyz_cam.m128_f32[2] = -1.0f;
    min_xyz_cam.m128_f32[0] = 0.0f;

    max_xyz_cam.m128_f32[0] = 1.0f;
    max_xyz_cam.m128_f32[1] = 1.0f;
    max_xyz_cam.m128_f32[2] = 1.0f;
    max_xyz_cam.m128_f32[0] = 0.0f;

    // Create the constant buffer
    bd.Usage = D3D11_USAGE_DEFAULT;
    bd.ByteWidth = sizeof(ConstantBuffer);
    bd.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
    bd.CPUAccessFlags = 0;
    hr = d3dDevice->CreateBuffer( &bd, NULL, &constantBuffer );
    if( hr != S_OK ) {
        MessageBox(hMainWnd, TEXT("Failed to create constant buffer"), szAppClassName, NULL);

        return false;
    }
    return true;

}

 
C++ 

/**
* @Author: Ciaran "Ciaran" Langton
* @Date: 2016-11-20T21:28:00+00:00
* @Email: email@ciaranlangton.com
* @Last modified by: Ciaran "Ciaran" Langton
* @Last modified time: 2016-11-20T21:28:00+00:00
*/
import React from 'react';
import LoadingScreen from '../components/loadingscreen.component';
import GameScreen from '../components/gamescreen.component';
import { createStore } from 'redux';
import { connect, Provider } from 'react-redux';
import Reducers from '../reducers'
import { loadGames } from '../actions';

export default class App extends React.Component {
constructor() {
super();

// Setup default state
this.state = {
loading: true,
};

// Create Store
this.store = createStore(Reducers);

// Log States
this.store.subscribe(() => console.log(this.store.getState()));

// Simulate Loading
setTimeout(() => {
this.store.dispatch(loadGames([
{ id: 1, name: 'Test One' },
{ id: 2, name: 'Test Two' },
{ id: 3, name: 'Test Three' }
]));

// Disable loading screen.
this.setState({ loading: false });
}, 1000);
};

render() {
return (
<Provider store={this.store}>
<div>
{ this.state.loading ? <LoadingScreen/> : React.createElement(connect((state) => {return {games: state.games}})(GameScreen))}
</div>
</Provider>
);
};
};


try including the version of the language too, not only the name.

 
Last edited by a moderator:
Java script i have no idea of the version.

        public static string GetAccessToken()
        {
            var token = TryGetExistingTokenFromGlobalContext();
            if (!string.IsNullOrEmpty(token))
            {
                ScenarioContextWrapper.SetContextObject(AuthenticationScenarioContextEnum.IdentityWebsiteCustomerApiAccessToken.ToString(), token);
                return token;
            }

 
Java script i have no idea of the version.

        public static string GetAccessToken()
        {
            var token = TryGetExistingTokenFromGlobalContext();
            if (!string.IsNullOrEmpty(token))
            {
                ScenarioContextWrapper.SetContextObject(AuthenticationScenarioContextEnum.IdentityWebsiteCustomerApiAccessToken.ToString(), token);
                return token;
            }
I'm 99.5% this is C#,

body {
    background-style: Kawaii;
}

h1 {
    color: pink;
}

p {
    font-family: Fwendfont;
    font-size: 1337px;


 
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.

 
Code:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
BF aka brainfuck :p

My snippet:

#!/bin/csh

foreach i ( d* )

   switch ( $i )

      case d?:

         echo $i is short

         breaksw

      default:

         echo $i is long

   endsw

end

 
Last edited by a moderator:
BF aka brainfuck :p

My snippet:

#!/bin/csh

foreach i ( d* )

   switch ( $i )

      case d?:

         echo $i is short

         breaksw

      default:

         echo $i is long

   endsw

end
it looks like unix code?

 
Those People That Think They Know To Code xD

<!DOCTYPE html>
<html>
<Head>
<Body>
public class CustomMath {
public static int multiply(int a, string b) {
return a * b;
}
}
</Head>
</Body>
</html>


LoL Dont judge Me

 
Back
Top