This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace FranclinMath | |
{ | |
class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace maaaa | |
{ | |
public class Item | |
{ | |
public string Name { get; set; } | |
public double Priec { get; set; } | |
public int Index { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Cat : Animal | |
{ | |
public Cat(){ | |
base.Sound = "miau miau"; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p style="line-height: 18px; font-size: 18px; font-family: times;"> | |
Click "<i>Load samples</i>" to view and edit more JS samples.<br> | |
<br> | |
Labyrinth generated with JavaScript:<br><br> | |
<script> | |
var firstBusObject ={busNumber:4,stops: [{in:3, out:1},{in:3, out:1},{in:3, out:1}]}; | |
document.write('firstBusObject <br/>'); | |
document.write(firstBusObject.busNumber); | |
document.write(' <br/>'); | |
document.write(firstBusObject.stops[2].in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var atm = new AtmDispenser(); | |
var value = 250; | |
var notes = atm.GetTheCash (value).Dump($" value: {value}"); | |
value = 230; | |
notes = atm.GetTheCash (value).Dump($" value: {value}"); | |
value = 370; | |
notes = atm.GetTheCash (value).Dump ($" value: {value}"); | |
value = 260; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resetSelectedState() { | |
const geoElement = Object.assign([], this.state.states); // create new copy to avoid mutation | |
geoElement.forEach((a) => a.isSelected = false); | |
this.setState({ states: geoElement }); | |
} | |
resetSelectedCountry() { | |
const geoElement = Object.assign([], this.state.countries); // create new copy to avoid mutation | |
geoElement.forEach((a) => a.isSelected = false); | |
this.setState({ countries: geoElement }); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SwitchStuff | |
{ | |
[Benchmark] | |
[Arguments("ThisIsCase1")] | |
[Arguments("ThisIsCase2")] | |
[Arguments("ThisIsCase3")] | |
[Arguments("ThisIsCase4")] | |
[Arguments("ThisIsCase5")] | |
public string ProcessSwitchWithString(string matchCase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// we need to create a consumer class instance - or we will have no listener | |
new ConsumerOurDatabaseAccess(); | |
new WarehouseOurBusinessLogicStuff(); | |
var p = new ProducerOurWebApiEndpoint(); | |
Console.WriteLine("Hey buddy provide order details - and don't play with me!"); | |
while (true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string ProcessItFor(int id) { | |
var a = GetFromDatabase(id) | |
if ((a.Length > 15 && a.Contains("11")) | (a.Length < 20 && a.Contains("2"))) | |
{ | |
// some code here | |
} | |
return string.Empty; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string ProcessItFor(int id) { | |
var a = GetFromDatabase(id) | |
var johnBlogEntryCode = a.Length>15 && a.Contains("11") | |
var maryBlogEntryCode = a.Length<20 && a.Contains("2") | |
var doWeHaveOurBlogEntries = johnBlogEntryCode | maryBlogEntryCode | |
if(doWeHaveOurBlogEntries) | |
{ | |
// some code here | |
} | |
OlderNewer