Tous les codes sources "Mais pourquoi ?"page 17
C#
23 Avril, 2016 à 10:16
#237
/// <summary>
/// Does the file exist?
/// </summary>
/// <param name="path"></path>
/// <returns></returns>
public static bool exists(String path)
{
return File.Exists(path);
}
JavaScript
23 Avril, 2016 à 10:16
#236
<!-- CODE NEEDED TO MAKE ALERT BOXES WORK -->
<script type="text/javascript">
function alertUser(msg) {
alert(msg);
}
</script>
C#
23 Avril, 2016 à 10:16
#235
private List<string> GetStringElements(List<Tuple<string, int>> input)
{
//From this list of input tuples, return a list which contains only the string component.
Tuple<List<string>, List<int>> newT = input.Aggregate(Tuple.Create(new List<string>(input.Count),
new List<int>(input.Count)), (unpacked, tuple) => { unpacked.Item1.Add(tuple.Item1);
unpacked.Item2.Add(tuple.Item2); return unpacked;});
return newT.Item1;
}