Odaise Gaelach wrote: » This is probably a stupid question, but... what does it do?
conor.hogan.2 wrote: » I'm sure its been mentioned but I hate badly formatted code, where the {} braces etc are all out of sync so you have no idea where to add or remove code without first sorting it out.
Evil Phil wrote: » Agreed, companies need a coding standards document and everybody should be complying with it.
private class BaseThing { } private class SomeThing : BaseThing { } private class OtherThing : BaseThing { } private T DoSomethingDumb<T>(BaseThing item, Func<SomeThing, T> somethingHander, Func<OtherThing, T> otherThingHandler) { if (item is SomeThing) { return somethingHander(item as SomeThing); } else if (item is OtherThing) { return otherThingHandler(item as OtherThing); } throw new NotSupportedException(); }
BaseThing thing = new SomeThing(); string fail = DoSomethingDumb<string>(thing, (someThing) => "something fails", (otherThing) => "otherThingFails");
// Remove pre-processor cobolLines ^[ ][ ][ ][ AIS^D][ AIS^D][ AIS^D][ ][.]* if ((cobolLine != null && cobolLine[0] == AsciiSpace && cobolLine[1] == AsciiSpace && cobolLine[2] == AsciiSpace) && (((cobolLine[3] == 0x41 || cobolLine[3] == 0x49 || cobolLine[3] == 0x53 && cobolLine[3] != AsciiSpace && cobolLine[3] != 0x44) && (cobolLine[4] == 0x41 || cobolLine[4] == 0x49 || cobolLine[4] == 0x53 || cobolLine[4] == AsciiSpace && cobolLine[4] != 0x44) && (cobolLine[5] == 0x41 || cobolLine[5] == 0x49 || cobolLine[5] == 0x53 || cobolLine[5] == AsciiSpace && cobolLine[5] != 0x44)) || ((cobolLine[3] == 0x41 || cobolLine[3] == 0x49 || cobolLine[3] == 0x53 || cobolLine[3] == AsciiSpace && cobolLine[3] != 0x44) && (cobolLine[4] == 0x41 || cobolLine[4] == 0x49 || cobolLine[4] == 0x53 && cobolLine[4] != AsciiSpace && cobolLine[4] != 0x44) && (cobolLine[5] == 0x41 || cobolLine[5] == 0x49 || cobolLine[5] == 0x53 || cobolLine[5] == AsciiSpace && cobolLine[5] != 0x44)) || ((cobolLine[3] == 0x41 || cobolLine[3] == 0x49 || cobolLine[3] == 0x53 || cobolLine[3] == AsciiSpace && cobolLine[3] != 0x44) && (cobolLine[4] == 0x41 || cobolLine[4] == 0x49 || cobolLine[4] == 0x53 || cobolLine[4] == AsciiSpace && cobolLine[4] != 0x44) && (cobolLine[5] == 0x41 || cobolLine[5] == 0x49 || cobolLine[5] == 0x53 && cobolLine[5] != AsciiSpace && cobolLine[5] != 0x44))) && (cobolLine[6] != AsciiAsterisk)) { cobolLine = null; WriteCSV("Pre-processing", filePath, currentLineNumber, currentColumnNumber, originalLine, cobolLine); }
this.lengthHeader = BitConverter.ToInt16(pclength, 0) < 4094 ? 2 : 4; ... this.loadedrecords / (ts.TotalSeconds > 0 ? ts.TotalSeconds : 1), ... return _instance ?? (_instance = new Context()); ... this.byteSize = (this.storageType == StorageType.Packed) ? (this.Length + 2) / 2 : this.Length; ... etc
// this fires when the page is loaded protected void Page_Load(object sender, EventArgs e) {......
#define begin { #define end }
On Error Resume Next
srsly78 wrote: » VB code: On Error Resume Next
public class A : B { protected A (X, Y, Z) : (Y, Z, X) { } } public class B : C { protected B (Y, Z, X) : (Z, X, Y) { } } public class C { protected B (Z, X, Y) : (X, Y, Z) { } }
Colonel Panic wrote: » As if deep inheritance wasn't fail enough!
Currently smashing my head off a wall as I don't understand jQuery and can't read the syntax.
G-Money wrote: » Ah well, at least it's not Perl!
#!/bin/perl print ''=~('(?{'.('^)@./~'^'.[)@[^').'"'.('[$$^)^//@~/(@.+.~^^)@~)+@^._'^':^^;[;[[)^[@)@@]^.;[,^[^,;]}').',$/})');
G-Money wrote: » Currently smashing my head off a wall as I don't understand jQuery and can't read the syntax. Ah well, at least it's not Perl!
if($iphone == $true) { // load iphone stylesheet }
Creamy Goodness wrote: » if($iphone == $true) { // load iphone stylesheet } wtf?