reduc_ind = list(xrange(1, len(x.get_shape())))
By Anonymous, 2017-08-14 18:37:29
function renderGroupSelectedSuccessors() {
    var index = 0;
    if (tempSuccessorsGroupsList != null && tempSuccessorsGroupsList.length > 0) {
        var groups = tempSuccessorsGroupsList.splice(0, PageSettings.lazyRenderItemsPerPage);
        var groupSuccessors = '';
        for (var i = 0; i < groups.length; i++) {
            if (index % 10 == 0) {
                groupSuccessors += '<div style="float: left;"><ul>';
            }
            groupSuccessors += '<li><a data-groupid="'+groups[i].GroupID+'">' + groups[i].GroupName + '</a></li>';            
            index++;
            if (index % 10 == 0 || i == groups.length - 1) {
                groupSuccessors += '</ul></div>';
            }
        }
        $('#divGroupSuccessorsList').append(groupSuccessors);
        SetCheckBoxState();
        setTimeout(renderGroupSelectedSuccessors, 50);
    }
}

Where does the data come from? Where does it go? Why isn't this an endless recursive loop? Why has this worked for three years?

By Anonymous, 2019-05-10 13:20:47
var div = '<div class="imgdiv" '+(user[5] ? 'style="display: flex; flex-direction: column; padding: 10px; justify-content: flex-end; background-image: url(\''+user[5]+'\');"' : '')+'>'
        + (usersVideos[userId] && <?= ($authuser ? 'true' : 'false') ?> ? '<i class="f7-icons icon-acc" onclick="videoShow('+user[uID]+')" style="color: white; font-size: 50px; margin-bottom: 5px; cursor: pointer; text-align: left;">play_round</i>' : '')
        + (iam && page=='home' ? '<div> <input id="video-input" onchange="uploadVideo(files)" type="file" accept="video/*" style="display: none; width: 80%; height: 100px; margin: auto; padding-top: 20px;"/> </div> <p class="action_cont" style="padding: 0; padding-top: 12;"> <a class="act_btn" onmousedown=document.getElementById("video-input").click() href="javascript:void(0)" style="text-decoration: none; margin: auto; width: calc(100% - 26px); text-align: center;"> ' + (myMods['video'] ? 'Загрузить новое видео' : 'Добавить видео-превью' ) + ' </a> </p>' : '')
+ '</div>'

JS + CSS + PHP + HTML

By Anon, 2018-08-24 18:30:12
const [glossaries, prompts] = [await getGlossaries(), await getPromps()];

// instead of
// const [glossaries, prompts] = await Promise.all([getGlossaries(), getPrompts()]);

When I was writing the code, I thought for a moment that getGlossaries() and getPrompts() will be executed in parallel

By igor, 2024-01-22 17:24:54
//class tworzenie.FaceOknoDodatki
var b = 2;
   var wlosyT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,7,4,4,7,8,9,10,6,8,6,5,5,7,8,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b];
   var brwiT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b];
   var oczyT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,5,6,6,7,8,8,8,9,9,9,10,10,10,10,10,10];
   var nosT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b];
   var brodaT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,5,6,7,7,8,9];
   var ustaT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,10,10];
   var czachyT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,10];
   var tatuazT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,3,7,7,7,7,8,8,8,9,9,9,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0];
   var opaskaT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,8,9,10,7,8,9,8,9,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   var kolczykiT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,3,3,4,4,5,6,5,6,7,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   var kolczyki2T = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,3,3,6,5,8,9,4,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
   var bliznaT = [tworzenie.FaceOknoDodatki.prototype.b,tworzenie.FaceOknoDodatki.prototype.b,5,7,8,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

code from some shitty polish game, character face creator

By whitemoon, 2024-03-08 19:58:38
int main() {
    int error_code = some_function();
    if (error_code == 1) {
        // In case of error, crash the program by eating up memory
        while (true) new int;
    }
}
By Anonymous, 2024-04-30 08:31:39
#define omae
#define wa (void)0
#define mou (void)0
#define shinderu ;
#define nani (void)
#define return 0; return

int main(void) {
    omae wa, mou shinderu
    nani!
    return 0;
}
By Nobody cares, 2020-05-19 06:46:01
private HashMap<String, Tuple6<float[], String[], String[], String[], String[], String>> memberNameChangedToProtectTheInnocent = null;
By Anonymous, 2017-12-12 12:13:22
function edit_vehality: locality,
      google_place_id: '1'
    };
    let opts = { 'method': 'put', 'route': '/border/' + border_id, 'status': status, 'account_access_token': saved_values.superadmin.account_access_token, 'params': params };
    request(opts)
      .then(function(res) {
        resolve(res.result);
      }).catch(reject);
  })
}
By a poor soul, 2018-04-11 17:07:13
const int ONLY_ONE_ITEM = 1;

if (myList.Count > ONLY_ONE_ITEM)
{
    DoSomething();
}
else
{
    DoSomethingElse();
}
By Anonymous, 2018-05-15 17:04:22
	const ws = new WebSocket('wss://echo.websocket.org', {
		agent: new HttpsProxyAgent(`https://${proxy}`)
	});
	wsz.push(ws);
	ws.onopen = () => {
		if (ws.readyState === WebSocket.OPEN) {
			.....
			ws.close();
		}
	};
	ws.onerror = () => {
		ws.close();
	};

u just cant trust, just cant......

By Neon, 2018-10-23 18:14:26
<ng-container *ngIf="!errors">
    <div *ngIf="errors" class="no-content-wrapper">
        <esel-components-error [error]="errors"></esel-components-error>
    </div>
</ng-container>

Make your code error prone with effective error handling!

By Anonymous, 2019-10-11 12:49:41
public abstract class AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl {
    
    private static AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl theOneAndOnlyInstance;
    private Connection theUnbreakableEverlastingDatabaseLifeline;

    public static AbstractInventoryProductFactoryManagerSingletonServiceManagerFactoryExceptionHandlerResourceHandlerDatabaseConnectionHandlerImpl summonTheSingleton() {
        if (theOneAndOnlyInstance == null) {
            theOneAndOnlyInstance = new ConcreteImplementation();
        }
        return theOneAndOnlyInstance;
    }

    public abstract void initiateUnswervingDatabaseLinkWithCompulsiveRetriesAndUnyieldingTimeout();
    public abstract InventoryProduct concoctAndJumpstartBrandNewInventoryProductPostRigorousValidation();
    public abstract Service bootstrapAndEnrollNovelServicePostInfallibleAvailabilityCheck();
    public abstract void seizeAndChronicleExceptionWithStackTrackAndSignalDeveloper(Exception e);
    public abstract void manageAndFineTuneResourceConsumptionForPeakEfficiency(Resource resource);
    public abstract void launchDatabaseTransactionWithOptimumIsolationLevel();
    public abstract void ratifyDatabaseTransactionAndScourForPossibleConflicts();
    public abstract void revokeDatabaseTransactionInEventOfUnforeseenErrors();
    public abstract void safelySeverDatabaseConnectionAndLiberatePreciousResources();
}
By unknown, 2023-06-08 21:13:00
maybeSomething match {
  case Some(x) => true
  case None => false
}

maybeSomething.getOrElse(false) Short code and readable

By Majid Hosseini, 2017-12-16 07:03:07
<?php

// This code supposed to find adjacent items of a specific one
// $list is an array of ids
// $itemToSearch is an id that might be in the $list

foreach ($list as $item) {
    next($list);
    if ($item == $itemToSearch) {
        break;
    }
    $previousItem = $item;
}
$nextItem = current($list);

The $list variable is a list of ids, e.g [1, 2, 3, 4, 5] The $itemToSearch is an id that might be in $list

By baueri, 2022-05-31 17:30:21