<commit_before>package com.markjmind.uni;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.view.View;

/**
 * start : 2012.08.30<br>
 * <br>
 * 비동기 Layout Controll인 JwViewController를 확장한 클래스이다.<br>
 * Layout에 관련된 Util을 추가확장 했다.<br>
 * 
 * @author 오재웅      
 * @version 2013.11.17
 */
public class Jwc extends JwViewController{ 
	
	
	public static Drawable getDrawable(int R_drawable_id,View view){
		return view.getResources().getDrawable(R_drawable_id);
	}
	public static Drawable getDrawable(int R_drawable_id,Context context){
		return context.getResources().getDrawable(R_drawable_id);
	}
	public static void setBackgroundDrawable(int R_drawable_id,View view){
		Drawable d = getDrawable(R_drawable_id, view);
		if(d!=null){
			view.setBackgroundDrawable(d);
		}
	}
	public static int getColor(String color){
		return Color.parseColor(color);
	}

	public static float getDensity(Context context){
		return  context.getResources().getDisplayMetrics().density;
	}
	public static float getDensity(Activity context){
		return  context.getResources().getDisplayMetrics().density;
	}
	public static float getDensity(View view){
		return  view.getContext().getResources().getDisplayMetrics().density;
	}
	
}<commit_msg>Jwc에 pix to dp, dp to pix 추가<commit_after>package com.markjmind.uni;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.view.View;

/**
 * start : 2012.08.30<br>
 * <br>
 * 비동기 Layout Controll인 JwViewController를 확장한 클래스이다.<br>
 * Layout에 관련된 Util을 추가확장 했다.<br>
 * 
 * @author 오재웅      
 * @version 2013.11.17
 */
public class Jwc extends JwViewController{ 
	
	
	public static Drawable getDrawable(int R_drawable_id,View view){
		return view.getResources().getDrawable(R_drawable_id);
	}
	public static Drawable getDrawable(int R_drawable_id,Context context){
		return context.getResources().getDrawable(R_drawable_id);
	}
	public static void setBackgroundDrawable(int R_drawable_id,View view){
		Drawable d = getDrawable(R_drawable_id, view);
		if(d!=null){
			view.setBackgroundDrawable(d);
		}
	}
	public static int getColor(String color){
		return Color.parseColor(color);
	}

	public static float getDensity(Context context){
		return  context.getResources().getDisplayMetrics().density;
	}
	public static float getDensity(Activity context){
		return  context.getResources().getDisplayMetrics().density;
	}
	public static float getDensity(View view){
		return  view.getContext().getResources().getDisplayMetrics().density;
	}

	public static int getDp(Context context, int pix){
		return (int)(pix/context.getResources().getDisplayMetrics().density);
	}

	public static int getPix(Context context, int dp){
		return (int)(dp*context.getResources().getDisplayMetrics().density);
	}
	
}
{'fraction_non_alphanumeric': 0.11183757742601515, 'fraction_numerical': 0.011011699931176875, 'mean_word_length': 5.251612903225807, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5821636', 'n_tokens_mistral': 1010, 'n_tokens_neox': 983, 'n_words': 207}