Showing posts with label work. Show all posts
Showing posts with label work. Show all posts

Saturday, May 24, 2025

工作变动

年初看了几个影视剧,比如电视剧"凡人歌",电影"走走停停",我觉得自己或许可以偶尔当个废柴。正巧公司出了自愿离职计划,我申请了这个项目,休息一下。所以,我又一次离职了。

从入职到现在一年多的时间里,工作上我感觉身心俱疲,没有成就感。我一直在怀疑自己所做的事情是否有意义,自己到底是否适合和喜欢这个职业。虽然不知道未来的路怎么走,也很担心再找工作很困难,但我还是坚持这个选择,毕竟只有身心健康是自己的。我决定停下来,好好想想未来要做什么。

未来,未完待续。

最后一天在公司做的shortcake


read more ››

Monday, September 7, 2015

上班后某天的一点感慨

老早想写一篇博文,毕竟从6月8日开始上班到现在这三个月也开始新的阶段,同时进入了25岁大关。可惜太懒迟迟没有下手。
现在想想好像确实没有什么心得经验教训,只是当下的一些体会罢了。
哎,今天是Labor Day最后一天,明天又要上班了。每到周日晚上心情就非常沉重哎自己太懒了。
而且这周我还oncall!!
好辛苦心好累。。
前一阵子把移动硬盘里我本科和研究生时期的照片全部上传到google photos上去了,巨多,40多个G。单单上传都花了一整天。然后自己慢慢删除一些没用的照片。。这又是一次回忆的过程。无论当时多么的不喜欢上学,现在想起来却是非常珍贵和值得留恋的。想想也是,去年冬天面试各家公司的时候,我成了每周飞2趟三藩,劳累到趋近于崩溃的空中飞人,但是现在我还是挺想念那段在机场在飞机上在三藩的点滴。
自己确实是个恋旧的人,对回忆里的片段无论在自己当时的心境如何,现在想起来都是非常美好的。可能是因为现在全都看得到结局吧。很难想象自己老去以后,看到当年的自己的感慨呢。。
就以某个同学的签名作为结尾吧。
有些日子虽然已经过去很久,可依然还有零星的记忆。

好了,祝自己下周上班开心一切顺利吧~近期重大事件下次再写:)
read more ››

Thursday, July 2, 2015

Useful Links

How to Enable the Developer Options in Android 4.2 on Nexus 4
http://www.valuewalk.com/2013/05/how-to-enable-the-developer-options-in-android-4-2-on-nexus-4/

INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled Trebuchet.apk on device
http://solvedstack.com/questions/install_failed_update_incompatible-when-i-try-to-install-compiled-trebuchet-apk-on-device

Gradle and Android Studio.....

R.java
http://developer.android.com/guide/topics/resources/accessing-resources.html
Once you provide a resource in your application (discussed in Providing Resources), you can apply it by referencing its resource ID

http://stackoverflow.com/questions/20673625/android-gradle-plugin-0-7-0-duplicate-files-during-packaging-of-apk

Undo 'git add' before commit
http://stackoverflow.com/questions/348170/undo-git-add-before-commit

getContex
http://stackoverflow.com/questions/13684094/how-can-we-access-context-of-an-application-in-robolectric

Android unitTest support
http://tools.android.com/tech-docs/unit-testing-support

make android emulator smaller
http://stackoverflow.com/questions/2359895/android-emulator-screen-too-tall

Implements vs. Extends in Java
http://stackoverflow.com/questions/10839131/implements-vs-extends-when-to-use-whats-the-difference

List vs. Arraylist
http://stackoverflow.com/questions/2279030/type-list-vs-type-arraylist-in-java

Array vs. Arraylist
First and Major difference between Array and ArrayList in Java is that Array is a fixed length data structure while ArrayList is a variable length Collection class. You can not store primitives in ArrayList.
http://java67.blogspot.com/2012/12/difference-between-array-vs-arraylist-java.html

Android Category
The BROWSABLE category is required in order for the intent filter to be accessible from a web browser. Without it, clicking a link in a browser cannot resolve to your app. The DEFAULT category is optional, but recommended. Without this category, the activity can be started only with an explicit intent, using your app component name.
https://developer.android.com/training/app-indexing/deep-linking.html

Android Webview
http://developer.android.com/guide/webapps/webview.html

Purpose of using buildscript in build.gradle
http://stackoverflow.com/questions/17773817/purpose-of-buildscript-in-gradle

Androidmanifest path&pathprefix&path
The path part of a URI which must begin with a /. The path attribute specifies a complete path that is matched against the complete path in an Intent object. The pathPrefix attribute specifies a partial path that is matched against only the initial part of the path in the Intent object. The pathPattern attribute specifies a complete path that is matched against the complete path in the Intent object, but it can contain the following wildcards:
http://developer.android.com/guide/topics/manifest/data-element.html

scheme://host:port/path or pathPrefix or pathPattern
        <activity
            android:name=".infra.deeplink.DeepLinkHelperActivity"
            android:configChanges="keyboardHidden|orientation|screenSize">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!--  For Deep Linking -->
                <data
                    android:host="www.linkedin.com"
                    android:pathPrefix="/voyager"
                    android:scheme="https" />
            </intent-filter>
        </activity>


Troubleshooting
logansquare com.bluelinelabs.logansquare.nosuchmapperexception could not be mapped to a json object
Sol: proguard-rules.txt!!
https://github.com/bluelinelabs/LoganSquare

hashMap vs arrayMap
ArrayMap is a generic key->value mapping data structure that is designed to be more memory efficient than a traditional HashMap.
https://developer.android.com/reference/android/support/v4/util/ArrayMap.html

pass class into the method is slow
Reflection?

Remove files from Git commit
If I made the wrong commit, not pushed yet....
http://stackoverflow.com/questions/12481639/remove-files-from-git-commit

Merge latest two commits into one
$ git reset --soft "HEAD^"
$ git commit --amend
http://stackoverflow.com/questions/2563632/how-can-i-merge-two-commits-into-one

Transparent activity in Android
http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android

 To allow your app to take advantage of these changes and ensure that your app fits the style of each user's device, you should set the targetSdkVersion value to match the latest Android version available.

Intent ACTION_VIEW
action -- The general action to be performed, such as ACTION_VIEW, ACTION_EDIT, ACTION_MAIN, etc.
data -- The data to operate on, such as a person record in the contacts database, expressed as a Uri.
http://developer.android.com/reference/android/content/Intent.html

Android click event outside a dialog
Dialog dialog = new Dialog(getActivity());
Window window = dialog.getWindow();
window.setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
                WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL);
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
http://stackoverflow.com/questions/9516287/android-click-event-outside-a-dialog

Git patch apply
$ git apply ../rb562855.patch
http://makandracards.com/makandra/2521-git-how-to-create-and-apply-patches

No underline for drawable in android
http://stackoverflow.com/questions/18869605/failed-to-convert-drawable-into-a-drawable

FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding)
WRAP_CONTENT, which means that the view wants to be just big enough to enclose its content (plus padding)

bring view on front of everything
yourView.bringToFront();
http://stackoverflow.com/questions/6759279/how-to-bring-view-on-front-of-everything

Set radius in Android
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#FFFFFF"/>
    <corners android:radius="10dip"/>
</shape>
http://stackoverflow.com/questions/16161448/how-to-make-layout-with-rounded-corners

Slide down and gone
Cool!
view.animate()
    .translationY(0)
    .alpha(0.0f)
    .setListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            super.onAnimationEnd(animation);
            view.setVisibility(View.GONE);
        }
    });
http://stackoverflow.com/questions/19765938/show-and-hide-a-view-with-a-slide-up-down-animation


Error:Timeout waiting to lock buildscript class cache for build file
delete everything under ~/.gradle/caches


read more ››