[ cgl / con / g / mu / w ] [ index / top / reports / FAQ / DAAS / status / transparency / fuuka ]
As Dark As My Soul Default Fuuka

/g/ - Technology (Full Images)

New SSD and SAS controller are now installed and fully working.
If you want donate hardware or give something completely different, click here.

View post   

File: 438 KB, 1920x1200, 177850.png [Show reposts] Image reverse search: [iqdb] [google]
25178522 No.25178522 [DELETED]  [Reply] [Original]

Post a bit of code from your current project and we'll try to guess what it is.

assert(loadstring( config.get("LUA.LIBS.STD")))()
if not _params.table_ext then
assert(loadstring(config.get("LUA.LIBS.table_ext")))()
if not __LIB_FLAME_PROPS_LOADED__ then
LIB FLAME PROPS_LOADED__ = true
flame_props = ()
flame_props FLAME_ID_CONFIG_KEY = MANAGER.FLAME_ID"
flame_props FLAME_TIME_CONFIG_KEY = TIMER.NUM_OF_SECS"
flame_props FLAME_LOG_PERCENTAGE = "LEAK.LOG_PERCENTAGE"
flame_props FLAME_VERSION_CONFIG_KEY = "MANAGER.FLAME_VERSION"
flame_props SUCCESSFUL_INTERNET_TIMES_CONFIG = "GATOR.INTERNET_CH"
flame_props INTERNET_CHECK_KEY = "CONNECTION_TIME"
flame_props BPS_CONFIG = "GATOR.LEAK.BANDWIDTH_CALCULATOR.BPS_QUE"
flame_props BPS_KEY = "BPS"
flame_props PROXY_SERVER_KEY = GATOR.PROXY_DATA.PROXY_SERVER"
flame_props getFlameID = function()
if config.haskey(flame_props.FLAME_ID_CONFIG_KEY) then
local 1_1_0 = config.get
local 1_1_1 = flame_props.FLAME_ID_CONFIG_KEY
return 1_1_0(1_1_1)
end
return nil

>> No.25178589

Part of some sort of internet monitoring/throttling suite.

Written in Lua and executing the result of assert for some weird reason.

>> No.25178646

>>25178589

You touched on a very small part of it.

>> No.25178688

#include <iostream>
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>

namespace Fizzbuzz {
void fizzbuzz(int start, int end, std::vector<std::string> &storage);
}

int main() {
std::vector<std::string> storage;
Fizzbuzz::fizzbuzz(1, 100, storage);
for (std::vector<std::string>::iterator i = storage.begin();
i != storage.end(); ++i) {
std::cout << (*i) << std::endl;
}
return 0;
}

void Fizzbuzz::fizzbuzz(int start, int end,
std::vector<std::string> &storage) {

for (int i = start; i <= end; ++i) {
std::string push;
if ((i%3) && (i%5)) push = boost::lexical_cast<std::string>(i);
if (!(i%3)) push.append("FIZZ");
if (!(i%5)) push.append("BUZZ");
storage.push_back(push);
}
}

>> No.25178719

t=main.fixeuler(Mathf.Rad2Deg*-Mathf.Atan2(maintarget.transform.position.y-transform.position.y, maintarget.transform.position.z-transform.position.z));
angle=transform.localEulerAngles.z;
if(main.difference(t,angle)>180||t<angle){
godown();
}else{
goup();
}
if(momentum[i]<0){tmomentum=-momentum[i];}
else{tmomentum=momentum[i];}
if(dif<tmomentum*30){momentum[i]*=.3;}
if(i==0){
transform.localEulerAngles.z+=momentum[i]*Time.deltaTime;
}else{
transform.localEulerAngles.x+=momentum[i]*Time.deltaTime;
}


Snippet from Unity3d before I switched to UDK.

>> No.25178739

>>25178688
>for (std::vector<std::string>::iterator i =

>not using auto

ISHYGDDT

>> No.25178812

>>25178739
clang doesn't have full C++11 support

>> No.25178831

Easy mode: it's the entirety of a function's code.

s = zeros(m); % output image
w = m; % width of current layer
i = 0; % iterations

while w > 3
i = i + 1;
d = interp2(randn(w), i-1, 'spline');
s = s + i * d(1:m, 1:m);
w = w - ceil(w/2 - 1);
end

>> No.25178855

>>25178812
clang is crap. use software that truly respect your freedom, like gcc.

>> No.25178893

>>25178855
>implying GPL is more free than BSD

>> No.25178929

>>25178893
It is.

>> No.25178966

>>25178929
nope

>> No.25179022

>>25178966
yup.

>> No.25179041

>>25178522

a data gathering and intelligence tool controlled by the goyim

>> No.25179045

>tfw you don't have a current project.

Unless this counts. I dunno.

function PCTVChroma()
{
global Ustart = "0-0;7679-4096;7680-4096;"
global Vstart = "0-0;7679-4096;7680-4096;"

global Uend = "57856-60160;57857-60160;65535-65535"
global Vend = "57856-60160;57857-60160;65535-65535"
}

function AddSorted(string array, int in, int out)
{
return StrLen(array) == 0 || Value(LeftStr(array, 5)) > in ? String(in, "%05.0f") + "-" + String(out, "%05.0f") + ";" + array : LeftStr(array, 12) + AddSorted(MidStr(array, 13), in, out)
}

function AddPoint(int "y", int "u", int "v", int "oy", int "ou", int "ov")
{
global Ycurve = Defined(y) ? y > 255 ? AddSorted(Ycurve, y, oy) : AddSorted(Ycurve, y * 256, oy) : Ycurve
global Ucurve = Defined(u) ? u > 255 ? AddSorted(Ucurve, u, ou) : AddSorted(Ucurve, u * 256, ou) : Ucurve
global Vcurve = Defined(v) ? v > 255 ? AddSorted(Vcurve, v, ov) : AddSorted(Vcurve, v * 256, ov) : Vcurve
}

>> No.25179082

>>25179022
nope

>> No.25179093

>>25178831
what kind of retard language uses % for comments

jesus fuck

>> No.25179117

#!/bin/sh

cp /etc/hosts_backup ./hosts_old

cp ./hosts_old ./hosts_new


ec2-describe-instances --show-empty-fields | grep INSTANCE | cut -f17,4 > ./temp

NODENUM=1

while read HOSTNAME IP
do
echo "$IP $HOSTNAME node_$NODENUM" >> ./hosts_new
((NODENUM++))
done < ./temp

rm ./temp


not exactly high level stuff

>> No.25179154
File: 175 KB, 683x528, refactoring.png [Show reposts] Image reverse search: [iqdb] [google]
25179154

>>25178831

>> No.25179250

>>25179154
real refactoring happens in your head, not in an IDE

>> No.25179283

>>25178719
Vidya physics.

>> No.25179293

>>25179250
Because a barely working search and replace function is a great way of renaming functions across thousands of lines of dynamically typed code strewn over several m-files.

>> No.25179331

>>25179045
Some kind of drawing program. Maybe for editing video?

>> No.25179399

[WOTPawns.BlackAjah]
AII_AngrealInventoryStr[0]=Angreal.AngrealInvAirBurst
AII_AngrealInventoryStr[1]=Angreal.AngrealInvSeeker
AII_AngrealInventoryStr[2]=Angreal.AngrealInvDart
AII_AngrealInventoryStr[3]=Angreal.AngrealInvDecay
AII_AngrealInventoryStr[4]=Angreal.AngrealInvFireball
AII_AngrealInventoryStr[5]=Angreal.AngrealInvRemoveCurse
MinOffensiveAngrealUsageInterval=5
MinDefensiveAngrealUsageInterval=4
AII_Priority[0]=1
AII_Priority[1]=4
AII_Priority[2]=5
AII_Priority[3]=6
AII_Priority[4]=8
AII_Priority[5]=10
AII_MinChargesInGroup[2]=5
AII_MaxChargesInGroup[2]=8
AII_MinChargeGroupInterval[3]=30
AII_MinChargeGroupInterval[5]=10
HealthMPMin=350
HealthMPMax=350
HealthSPMin=350
HealthSPMax=350

>> No.25179448

>>25179331
You're close with the editing video thing. It's an AviSynth script for colour correction using SmoothCurve16. That's why I wasn't sure if it counted.

Pure AviSynth syntax doesn't have loops or if blocks, only recursion and the ternary conditional operator. SmoothCurve expects its input points to be sorted, so that explains the abomination in the middle.

>> No.25179589

balls.AddBall(new LogisticBall(TilesWide / 2, startingArea / 2, 0, 0, startingArea + 1));

// Add some balls located randomly on the 2D plane
for (var y = 0; y < TilesHigh; y++)
{
// Progress through game
var progress = ((double)y - startingArea) / TilesHigh;

// HACK: Magic constants
var proximity = 1 - 0.5 - 2 * 0.2; //1 - progress; // Try 0.1
var density = 1 - progress; // Try using 0.7 if confused
var size = 2; // Try 0.4

// Decides to place a random number of balls
var times = (int)Math.Abs(r.NextGaussian((1 - progress) * 4, (1 - progress) * 4));

for (var i = 0; i < times; i++)
{
var x = r.Next(TilesWide);

// Roll the dice to see if a ball will be at this (x, y)
if ((balls.GetValueAt(x, y) < proximity) && (r.NextDouble() < density))
{
var b = new LogisticBall(x, y);
b.Size = Math.Abs(r.NextGaussian(size, size)); //r.NextDouble()*size + 0; //*4 + 4;

balls.AddBall(b);
}
}
}

>> No.25179688

>>25179589
Javascript?

>> No.25179736

>>25179688
Cee sharpe.

>>
Name (leave empty)
Comment (leave empty)
Name
E-mail
Subject
Comment
Action