C 言語の not 演算子には2種類ある。 ~
と !
。論理学では ~
を否定で使うことが多いけれど C 言語での論理否定は !
、 ~
はビットごとの否定。
// bitwise-not.c
#include <stdbool.h>
int main() { return ~false; }
static vtype roffbuf; // Line buffer. | |
static char *roffp = roffbuf; // Pointer into line buffer. | |
static int roffpline = 0; // Place to print line now being loaded. | |
static uint8_t count_previous_non_blank_chars(const char *from); | |
// Print out strings, filling up lines as we go. | |
static void roff(const char *p) { | |
uint8_t count; | |
loop: |
import unittest | |
def cleanup_list(list): | |
i = 0 | |
while i < len(list): # pop のたびに list 長が変わる | |
elem = list[i] | |
if not elem.alive: | |
list.pop(i) | |
else: |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <vector> | |
int main() { | |
auto v = std::vector<int> {1, 2, 3}; | |
// Use transform to update all elements in the vector. | |
std::transform(std::cbegin(v), std::cend(v), std::begin(v), |
1月 | 2月 | 3月 | 4月 | 5月 | 6月 | 7月 | 8月 | 9月 | 10月 | 11月 | 12月 |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 32 | 60 | 91 | 121 | 152 | 182 | 213 | 244 | 274 | 305 | 335 |
2 | 33 | 61 | 92 | 122 | 153 | 183 | 214 | 245 | 275 | 306 | 336 |
3 | 34 | 62 | 93 | 123 | 154 | 184 | 215 | 246 | 276 | 307 | 337 |
4 | 35 | 63 | 94 | 124 | 155 | 185 | 216 | 247 | 277 | 308 | 338 |
5 | 36 | 64 | 95 | 125 | 156 | 186 | 217 | 248 | 278 | 309 | 339 |
6 | 37 | 65 | 96 | 126 | 157 | 187 | 218 | 249 | 279 | 310 | 340 |
7 | 38 | 66 | 97 | 127 | 158 | 188 | 219 | 250 | 280 | 311 | 341 |
8 | 39 | 67 | 98 | 128 | 159 | 189 | 220 | 251 | 281 | 312 | 342 |