//////////////////////////////////////////
          // Add ROI coordinates into Environment
          //////////////////////////////////////////
          AddROIcoordinatesIntoEnvironment();

It really helped me understand the code.

By Anonymous, 2022-05-30 00:49:45
                Path path = FileSystems.getDefault().getPath("../../../../../../../../../../EmailResults.csv");
                Files.deleteIfExists(path);
By Anonymous, 2021-11-12 20:18:57

abstract class ASong(
    var songId: Int = 0,
    var title: String? = "",
    var clipArt: String? = "",
    var artist: String? = "",
    var source: String? = "",
    var songType: Int = 0,
    var length: String? = "",
    var downloadPath: String? = "",
    var category: String? = ""
) : Parcelable {

    @Transient
    var totalDuration: Long = 0
    @Transient
    var currentPosition: Long = 0
    @Transient
    var playingPercent = 0

    private fun calculatePlayingPercent(): Int {
        return if (currentPosition == 0L || totalDuration == 0L) 0 else (currentPosition * 100 / totalDuration).toInt()
    }

}
© 2021 GitHub, Inc

Probably meant to stand for AbstractSong. Ens up sounding awkward or like somebody who just wrote their first class.

By peakvalleytech, 2021-11-13 00:07:44
# Weird list cleanup
product = "{0}".format(list(product))
product = re.sub(r"\), \(+", "], [", product)
product = re.sub(r"\(+", "[", product)
product = product.replace(")]", "]]").replace(")", "")
product = ast.literal_eval(product)

I don't know why I get this strange fomat for this array of objects... Ok let's do it fast: 1 - Convert array in string 2 - Clean up string 3 - Convert string in array

By Anonymous, 2018-09-05 23:51:16
strcpy(szBuffer, sBuffer);

so many questions given you by Hungarian notation

By bvs23bkv33, 2017-06-09 08:24:49
if ($this->getTestSku()) {
   ...
} elseif ($this->getTestOffset() >= 0 && $this->getTestLimit() > 0) {
   ...
} else {
   Mage::throwException(sprintf("Invalid parameters for test mode: sku %s or offset %s and limit %s", $this->getTestSku(), $this->getTestOffset(), $this->getTestLimit()));
}
By Anonymous, 2018-03-13 13:56:56
<table class="table table-sm o_main_table" style="width='100%'">
    <!-- ... thanks ...-->    
</table>

Found that on a customer's project, wonder if my employee knows about inline css

By Anonymous, 2022-06-10 11:39:58

    def dow_to_dict_from_self(self):
        # res = {'name': self.name, 'enabled': self.enabled }
        res = {'sun': 0, 'mon': 0, 'tue': 0, 'wed': 0, 'thr': 0, 'fri': 0,
               'sat': 0,
               'enabled': 0, 'dow': 0, 'name': 'untitled'}

        if (int(self.days_of_week) & 0x01) == 0x01:  # sun
            res['sun'] = 1
        if (int(self.days_of_week) & 0x02) == 0x02:  # mon
            res['mon'] = 1
        if (int(self.days_of_week) & 0x04) == 0x04:  # tue
            res['tue'] = 1
        if (int(self.days_of_week) & 0x08) == 0x08:  # wed
            res['wed'] = 1
        if (int(self.days_of_week) & 0x10) == 0x10:  # thr
            res['thr'] = 1
            res['thu'] = 1  # '%a' returns thu for Thursday
        if (int(self.days_of_week) & 0x20) == 0x20:  # fri
            res['fri'] = 1
        if (int(self.days_of_week) & 0x40) == 0x40:  # sat
            res['sat'] = 1
        if (int(
                self.days_of_week) & 0x40) == 0x80:  # enabled # new enable#
            # flag -- duplicate in db
            res['enabled'] = 1

        res['enabled'] = self.enabled  # remove this
        res['dow'] = self.days_of_week
        res['name'] = self.name

        return res

kept the original comments - they're very helpful

By Anonymous, 2018-07-11 19:40:44
// powtierdzenie decyzji
function zapytaj(pytanie){
	if(confirm(pytanie)) return true
	else return false;
}
By first year student, 2018-10-02 21:30:46
class FileReader extends EventTarget(...READER_EVENTS) {
    // [...]
    readAsArrayBuffer() {
        throw new Error('FileReader.readAsArrayBuffer is not implemented');
    }
}

React Native's way of saying they don't support FileReader.readAsArrayBuffer()

By Aurovik, 2018-12-12 12:50:22
    @Override
    public String toString() {
        List<Integer> accountLevels = new ArrayList<>();
        List<String> accountIds = new ArrayList<>();

        for (SelectedHierarchyLevel selectedHierarchyLevel : selectedHierarchyLevels) {
            accountLevels.add(selectedHierarchyLevel.getLevel());
            accountIds.add(selectedHierarchyLevel.getAccountRowId());
        }

        vetoAreValidIds(accountIds);
        StringBuilder converterString = new StringBuilder();

        convert(accountLevels, converterString);
        converterString.append("$");
        convert(accountIds, converterString);

        return converterString.toString();
    }

Just because you can, doesn’t mean you should.

By Anonymous, 2019-04-12 10:55:17
        if (CATEGORY_NORMAL.equalsIgnoreCase(categorie)) {
            return assignGroupStartWithPrefix(assignmentGroups);
        } else if (CATEGORY_EXTERNAL.equalsIgnoreCase(categorie)) {
            return assignGroupStartWithPrefix(assignmentGroups);
        } 
By Anon, 2019-05-14 13:58:23
var list = new List<string>() { // Assume some items in the list };

for (var i = 0; i < list.Count; i++)
{
    var item = list[i];
    list.Remove(item);
    
    i--;
}

Simple alternative to List.Clear()

By Taylor, 2017-12-13 07:07:56
try{
    //...
    getMyDataFromServer();
    //...
}catch(Excepion e){
    // :D
}

HMM FIXED BUG!

By H20, 2017-12-23 11:12:50
#33 PHP +3
<?
if (ini_get('register_globals') != 1){
if ((isset($_POST) == true) && (is_array($_POST) == true)) extract($_POST, EXTR_OVERWRITE);
if ((isset($_GET) == true) && (is_array($_GET) == true)) extract($_GET, EXTR_OVERWRITE);}
By Sobak, 2015-07-21 07:59:13