.chars()
итератор из строки, фильтруем и считаем:"12121".chars().filter(|&c| c == '2').count()
graphemes
методом:"éaébé".graphemes(true).filter(|&g| g == "é").count()
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Management;
namespace ConsoleApplication7 {
class Program {
static void Main(string[] args) {
Process[] processList = Process.GetProcesses();
Process p = processList.Where(temp => temp.Id == 844).FirstOrDefault();
if (p != null) {
GetCommandLine(p.Id);
}
Console.ReadLine();
}
public static void GetCommandLine(int id) {
using (ManagementObjectSearcher mos = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + id)) {
foreach (ManagementObject mo in mos.Get()) {
Console.WriteLine(mo["CommandLine"]);
}
}
}
}
}
{}[()] = 0
word = 'what
words = [(0,'What'),(1,'the'),(2,'heck?')]
for key,word in words:
print('key:', key)
print('word:', word)
print()
key: 0
word: What
key: 1
word: the
key: 2
word: heck?
words = [(0,'What'),(1,'the'),(2,'heck?')]
for _,word in words:
print(word)
a = {}
a[()] = 5
print(a)
{(): 5}
Мне лично на ум приходит такие как VBA
START TRANSACTION;
INSERT ...
INSERT ...
...
COMMIT;
SET FOREIGN_KEY_CHECKS = 0;
SET UNIQUE_CHECKS = 0;
SET UNIQUE_CHECKS = 1;
SET FOREIGN_KEY_CHECKS = 1;
var a = new Uint32Array(1);
var b = new Int32Array(a.buffer);
a[0] = 3232286728;
console.log(b[0]);
может кто-то пользуется какими-то лайфхаками)Пред тем как писать бред - посвятите 2 минуты гуглению вопроса, хотя бы выглядеть совершенно глупо не будете, и вопрос хоть нормально сформулировать сможете. Не хочется как-то токсично прям отписываться, но такие вопросы вызывают болевые ощущения в глазах...