2017년 10월 13일 금요일

what the fuck steam

what the fuck steam


Running Steam on ubuntu 16.04 64-bit
STEAM_RUNTIME is enabled automatically
Pins up-to-date!
[2017-10-14 04:21:50] Startup - updater built Oct 11 2017 10:57:45
SteamUpdateUI: An X Error occurred
X Error of failed request:  BadWindow (invalid Window parameter)
Major opcode of failed request:  155 (NV-GLX)
Minor opcode of failed request:  4
Resource id in failed request:  0x1400002
Serial number of failed request:  45
xerror_handler: X failed, continuing
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[2017-10-14 04:21:50] Checking for update on startup
[2017-10-14 04:21:50] Checking for available updates...
[2017-10-14 04:21:50] Download skipped: /client/steam_client_ubuntu12 version 1507769972, installed version 1507769972
[2017-10-14 04:21:50] Nothing to do
[2017-10-14 04:21:50] Verifying installation...
[2017-10-14 04:21:50] Performing checksum verification of executable files
[2017-10-14 04:21:50] Verification complete


==============================================================



mv $HOME/.steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libstdc++.so.6{.bak,}

mv $HOME/.steam/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libstdc++.so.6{.bak,}

LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DIAPLAY=:0 steam

안드로이드 공유 기능




안드로이드 공유(sms, sns) 기능





Intent msg = new Intent(Intent.ACTION_SEND);
msg.addCategory(Intent.CATEGORY_DEFAULT);
msg.putExtra(Intent.EXTRA_SUBJECT, "주제");
msg.putExtra(Intent.EXTRA_TEXT, "내용");
msg.putExtra(Intent.EXTRA_TITLE, "제목");
msg.setType("text/plain");   
startActivity(Intent.createChooser(msg, "공유"));

2017년 10월 12일 목요일

천단위 컴마 붙이기








edt1 = (EditText) findViewById(R.id.editText);
edt1.addTextChangedListener(new CustomTextWatcher(edt1));





클래스 생성
=======================================================



import android.text.Editable;
import android.text.Selection;
import android.text.TextWatcher;
import android.widget.EditText;

import java.text.DecimalFormat;

/**
 * Created by buster on 17. 10. 13.
 * 천단위 컴마 붙이기
 *
 */
public class CustomTextWatcher implements TextWatcher {
    @SuppressWarnings("unused")
    private EditText mEditText;
    String strAmount = ""; // 임시 저장값 (콤마)

    public CustomTextWatcher(EditText e) {
        mEditText = e;
    }

    @Override
    public void afterTextChanged(Editable s) {
        // TODO Auto-generated method stub

    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count,
                                  int after) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onTextChanged(CharSequence s, int start, int before, int count) {    //텍스트가 변경될때마다 실행
        if (!s.toString().equals(strAmount)) { // StackOverflow 방지
            strAmount = makeStringComma(s.toString().replace(",", ""));
            mEditText.setText(strAmount);
            Editable e = mEditText.getText();
            Selection.setSelection(e, strAmount.length());
        }
    }

    protected String makeStringComma(String str) {    // 천단위 콤마 처리
        if (str.length() == 0)
            return "";
        long value = Long.parseLong(str);
        DecimalFormat format = new DecimalFormat("###,###");
        return format.format(value);
    }

}
======================================================
계산식에 , 마 제거 해야 정상적인 계산이 이루어 진다.

double input1 = Double.valueOf(edt1.getText().toString().replace(",",""));