Featured image of post Weekly Report 2022.29

Weekly Report 2022.29

Absurdity

Life becomes meaningless once you stopped thinking.

Entertainment

街角魔族 S2

Very interesting animation, a little tricky day-to-day life & YURI.

What matters? is so important for us, everyone. Just like the Magic-Core for Mahou shoujos, We need the Life-Core(The most important thing in your life) to live our lives. Once you figure out what matters, and just focus all your heart on it, then you can easily say out loud that ’this is the meaning of my life'.

But, if your core is out of your control, then bruh, you will suffer a lot. The more you care, the more you are gonna get hurt.

Work, Consumerism and the New Poor

Why we should work? What is the new poor?

Living in a consumerism society, everyone is a consumer, which means, there is no way to escape from it even you intend to do so. Everything we need relies on this Supply Demand mechanism. People need to eat food, wear clothes, live in big houses, which means they need tons of money, so they need to work, just like everyone else did.

Learning

JNI

Process Java-Passed Param

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
extern "C" JNIEXPORT jint JNICALL jni_native_do_something(JNIEnv* env, jobject, jobject param) {
  if (param) {
    jclass j_clz = env->FindClass("cn/az/code/HelloJni");
    jobject j_param_ref = env->NewGlobalRef(param);
    jfield j_param_id = env->GetFieldID(j_clz, "id", "Ljava/lang/String;"),

    SampleParam param;
    jstring j_param_id_str = env->GetObjectField(j_param_ref, j_param_id);
    if (j_param_id_str) {
      const char* param_id_str = env->GetStringUTFChars(j_param_id_str, 0);
      param.id = param_id_str;
    }
    std::cout << param.id << std::endl;
    return 0;
  }
}

Callback Java Method

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
extern JavaVM *global_jvm_;

class JVMAttach {
  private:
    bool attached;
  public:
    // attach to current java thread
    JVMAttach(JNIEnv **jni_env) : attached(false) {
      if (global_jvm_->GetEnv((void**)jni_env, JNI_VERSION_1_8) < 0) {
        *jni_env = nullptr;
        attached = false;
        SPDLOG_ERROR("JVMAttach Attach Current Thread failed");
      } else {
        attached = true;
      }
    }
};

void callback(jobject jobj) {
  JNIEnv *jni_env = nullptr;
  JVMAttach jvm_attach(&jni_env);
  if (jni_env == nullptr) {
    SPDLOG_ERROR("get jni env failed");
  }
  jclass j_clz = jni_env->GetObjectClass(jobj);
  jobject jobj_ref = jni_env->NewGlobalRef(jobj);
  jmethod j_say_hello = jni_env->GetMethodID(j_clz, "sayHello", "()V");

  jni_env->CallVoidMethod(jobj_ref, j_say_hello);
}

Life

Quite ordinary week, no need to depict.

Thought

需要管理的不是时间,而是注意力

  • 很多人做事情没有计划
  • 纵使有计划,也很难按计划实施
  • 纵使按计划实施了,也不一定是用心去做的
  • 纵使用心去做了,也不一定能够达到预期的效果
  • 计划,就是用来被打破的;没有计划,就自然不会被打破
  • 时间有限,注意力甚之
  • 完成一件重要的事情本身就需要很多注意力
  • 如果注意力不集中,一方面事情不一定能够完成,另一方面拖长了时间周期
  • 所以番茄钟的 25 分钟是让你集中注意力这么长时间,而不是在这 25 分钟内做某件事情「却不问专心程度」

Quotation

  • 让人觉察到情商很高是一种情商不太高的行为。但让讨厌的人觉察到情商不高是一种智商很高的行为。
  • 把「关注」按钮谨慎地视作你愿意「雇佣」这个人。
  • 自诩「对世界充满好奇」也可能是「没有一个专精领域」的托辞。
  • 「能用愚蠢解释的,就不要用恶意。」

Recommendation

举办婚礼的理由

Always be grateful to those who care you

  1. You officially become a significant investment in everyone’s Happiness Portfolio.
  2. A wedding solidifies your union into a concrete memory of support.
  3. Planning the wedding reveals a lot about each other’s priorities and values.

References

Licensed under CC BY-NC-SA 4.0
Last updated on Sep 08, 2022 09:09 CST
The older I get, the more I realize that most of life is a matter of what we pay attention to, of what we attend to [with focus].
Built with Hugo
Theme Stack designed by Jimmy