Tweetovi

Blokirali ste korisnika/cu @ailrk123

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @ailrk123

  1. Created with Block expression is pretty nice! You can get disposable local binding and make code much cleaner. 030

        let bytes_per_row: UInt = {
      let mut __byte_per_row = width * bytes_per_pixel as UInt;
      __byte_per_row + if __byte_per_row % 4 == 0 {
        4 - __byte_per_row
      } else {
        0
      }
    };
    Poništi
  2. Created with Macros are pretty fun 030

    // holds the last error code.
static mut BMP_LAST_STATUS: BmpStatus = BmpStatus::BmpOk;
macro_rules! set_bmp_global_status {
  ($status:expr) => {
    unsafe {
      BMP_LAST_STATUS = $status
    }
  }
}
    Poništi
  3. Created with Rust has a VERY `heavy` syntax even comparing it with C++. Maybe because of those big brackets?

    impl RWByte for UShort {
  fn read_byte(&mut self, f: &mut File) -> bool {
    let mut little: [UChar; 2] = [0; 2];  // BMP use 16 bits short.
    match f.read(&mut little) {
      Ok(sz) => {
        *self = (little[1] << 8 | little[0]) as UShort;
        if sz == little.len() { true } else { false }
      },
      _ => false
    }
  }
    Poništi
  4. 4. velj
    Poništi
  5. 3. velj

    Created with XV6 notes: It reads the privilege mode from register `mstatus`, and write it in to x. The cool part is x is a register!

    static inline uint64
r_mstatus()
{
  uint64 x;
  asm volatile("csrr %0, mstatus" : "=r" (x) );
  return x;
}
    Poništi
  6. 3. velj

    Created with XV6 notes: csrr stands for `control and status register read`. This code fetch the number of harts you can get , then set pc to `&stack + * 4096`. This will be the very first stack for the OS.

    entry:
	# set up a stack for C.
        # stack0 is declared in start.c,
        # with a 4096-byte stack per CPU.
        # sp = stack0 + (hartid * 4096)
        la sp, stack0
        li a0, 1024*4
	csrr a1, mhartid
        addi a1, a1, 1
        mul a0, a0, a1
        add sp, sp, a0
	# jump to start() in start.c
        call start
    Poništi
  7. 3. velj
    Poništi
  8. 2. velj

    我最近的作息是中间空白两边连起来。。。

    Poništi
  9. 2. velj

    Journalists should never be fond of one government and talk against another, but rather supervising all governments objectively. If your opinions are clearly sided, you are nothing more than a disposable tool. Not as a journalist, more like a propaganda department.

    Poništi
  10. 1. velj
    Prikaži ovu nit
    Poništi
  11. proslijedio/la je Tweet
    17. pro 2019.

    My student has released 文言, or wenyan, an esoteric programming language that closely follows the grammar and tone of classical Chinese literature. There's an online IDE, and it compiles to JS or Python. Github: Site:

    Poništi
  12. 1. velj

    Honestly feel Microsoft is much more capable than Google just by comparing their tooling.

    Prikaži ovu nit
    Poništi
  13. 1. velj

    Tried android studio on windows. It lags sooo hard I don't know how can people use that all day. The VM crashed multiple times and the OS just SHUTDOWN... Probably it is on purpose so you need at least 32 RAM before write anything useful for Android.🐢🐢🐢

    Prikaži ovu nit
    Poništi
  14. 31. sij

    Created with Wiredly clean

      const numberList: Array<JSX.Element> =
    [
      ...Array.from(Array(props.pageButtonLimit).keys())
        .map(e => inHead(props.currentPage, props.pageButtonLimit) ?
          e + 1

          : inTail(props.currentPage, props.totalPage, props.pageButtonLimit) ?
            e + 1 + props.totalPage - props.pageButtonLimit

            :
            e + props.currentPage - Math.floor(props.pageButtonLimit / 2...
    Poništi
  15. 30. sij
    Poništi
  16. 30. sij

    停不下来了

    Prikaži ovu nit
    Poništi
  17. 30. sij

    Picrewの「あの子がこっちを見ている」でつくったよ!

    Prikaži ovu nit
    Poništi
  18. 30. sij

    Picrewの「あの子がこっちを見ている」でつくったよ!

    Poništi
  19. 30. sij

    Picrewの「あの子がこっちを見ている」でつくったよ!

    Poništi
  20. 30. sij

    不知道什么时候定了个月付的amazon prime,一直没买东西也没注意,点开吓死已经自己付了快一年了。。。

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·