부트캠프 설치시 부트캠프 지원 소프트웨어를 찾을수 없다 는 메시지가 뜨면 아래의 사이트에서 다운 받아 사용하세요.
https://support.apple.com/ko_KR/downloads/macoscomponents
부트캠프 설치시 부트캠프 지원 소프트웨어를 찾을수 없다 는 메시지가 뜨면 아래의 사이트에서 다운 받아 사용하세요.
https://support.apple.com/ko_KR/downloads/macoscomponents
안드로이드 플러그인
https://dl-ssl.google.com/android/eclipse/
Git 플러그인(Eclipse Git Team Provider 만 설치하면 된다)
http://download.eclipse.org/egit/updates
svn 1.7 버전 공식사이트에서 지원을 안해서 백업 해둠 Eclipse plugin 폴더에 압출 푼후 복사 하면 됨
http://subclipse.tigris.org/ EclipseSvn1.7.zip
사용법은 코드에 아래처럼 pre태그 안에 코드를 넣어주면 됩니다.
<pre class="brush:css; auto-links:false; toolbar:false;">
</pre>
다양한 옵션을 제공합니다.
그 중에서 표시하고자 하는 소스코드가 어떤 종류인지를 명확히 설정해줘야
문법부분에 적절하게 컬러풀한 코드를 보여줍니다.
이 설정을 brush라고 합니다.
* 자주 사용하는 pre 태그를 정리합니다. *
C# : brush:csharp
<pre class="brush:csharp; auto-links:false; toolbar:false;">
</pre>
CSS : brush:css
<pre class="brush:css; auto-links:false; toolbar:false;">
</pre>
JavaScript : brush:javascript
<pre class="brush:javascript; auto-links:false; toolbar:false;">
</pre>
XML : brush:xml
<pre class="brush:xml; auto-links:false; toolbar:false;">
</pre>
HTML : brush:html
<pre class="brush:html; auto-links:false; toolbar:false;">
</pre>
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | <?xml version="1.0" encoding="utf-8"?> <project default="main" basedir="."> <!-- ==================================================================== properties: build.xml에서 사용하는 속성값을 설정한다. ==================================================================== --> <property name="name" value="vegeta" /> <property name="version" value="1.0" /> <property name="src.dir" value="src" /> <property name="build.dir" value="build" /> <property name="classes.dir" value="${build.dir}/classes" /> <property name="jar.file" value="${build.dir}/${name}.jar" /> <property name="dist.dir" value="dist" /> <property name="dist.file" value="${dist.dir}/${name}-${version}" /> <property name="lib.dir" location="libs"/> <!-- Runnable jar 만들기 위한 main클래스 배포용으로 만들땐 이 부분만 빼주면 된다.--> <property name="main-class" value="mrsohn.gui.MainLayout"/><path id="classpath"> <fileset dir="${lib.dir}" includes="*.jar"/> </path> <!-- ==================================================================== compile 타겟 : java파일을 컴파일한다. ==================================================================== --> <!-- <target name="compile"><mkdir dir="${build.dir}" /> <mkdir dir="${classes.dir}" /> <javac srcdir="${src.dir}" destdir="${classes.dir}" encoding="utf-8" includeantruntime="false"> </javac> </target> --> <target name="compile"> <mkdir dir="${classes.dir}" /> <javac srcdir="${src.dir}" destdir="${classes.dir}" debug="yes"includeantruntime="false"> <classpath refid="classpath" /> </javac> </target> <!-- ==================================================================== jars 타겟 : 컴파일한 클래스 파일을 jar로 묶는다. ==================================================================== --> <target name="jars" depends="compile"><jar jarfile="${jar.file}" basedir="${classes.dir}"> <manifest> <attribute name="Main-Class" value="${main-class}" / > <attribute name="Class-Path" value="${jar.dir}/${lib.dir}/vegeta.jar" /> </manifest> </jar> </target> <!-- ==================================================================== distribution 타겟 : 배포본을 만든다. ==================================================================== --> <target name="dist" depends="jars"> <mkdir dir="${dist.file}" /> <zip destfile="${dist.file}.zip" basedir="${build.dir}" includes="*.jar" /> </target> <!-- ============================================================================== main 타겟 : 사용자가 타겟을 지정하지 않은 경우, 기본 값으로 지정되는 타겟이다. ============================================================================== --> <target name="main" depends="jars" /> <!-- ============================================================================== clean 타겟 : 이전의 컴파일한 클래스 파일과 배포 본을 지운다. ============================================================================== --> <target name="clean"> <delete dir="${build.dir}" /> <delete dir="${dist.dir}" /> </target> <!-- ============================================================================== all 타겟 : 모든 작업을 수행한다. ============================================================================== --> <target name="all" depends="clean, dist" /> </project> | cs |
필요 라이브러리 프로젝트 3가지
{ANDROID_SDK}/extras/android/support/v7/appcompat
{ANDROID_SDK}/extras/android/support/v7/recyclerview
{ANDROID_SDK}/extras/android/support/v7/card
import android.content.Context; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; import android.view.Window; public class MainActivity extends AppCompatActivity { private Context mContext; private RecyclerView mRecyclerView; private RecyclerView.Adapter mAdapter; private RecyclerView.LayoutManager mLayoutManager; @Override protected void onCreate(Bundle savedInstanceState) { // Request window feature action bar requestWindowFeature(Window.FEATURE_ACTION_BAR); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Get the application context mContext = getApplicationContext(); // Change the action bar color getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.RED)); // Get the widgets reference from XML layout mRecyclerView = (RecyclerView) findViewById(R.id.recycler_view); // Initialize a new String array String[] colors = { "Red", "Green", "Blue", "Yellow", "Magenta", "Cyan", "Orange", "Aqua", "Azure", "Beige", "Bisque", "Brown", "Coral", "Crimson"}; mLayoutManager = new StaggeredGridLayoutManager(4, StaggeredGridLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(mLayoutManager); // Initialize a new instance of RecyclerView Adapter instance mAdapter = new ColorAdapter(mContext, colors); // Set the adapter for RecyclerView mRecyclerView.setAdapter(mAdapter); } }ColorAdapter.java
import java.util.Random; import android.content.Context; import android.graphics.Color; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class ColorAdapter extends RecyclerView.Adapteractivity_main.xml{ private String[] mDataSet; private Context mContext; private Random mRandom = new Random(); public ColorAdapter(Context context,String[] DataSet){ mDataSet = DataSet; mContext = context; } public static class ViewHolder extends RecyclerView.ViewHolder{ public TextView mTextView; public ViewHolder(View v){ super(v); mTextView = (TextView)v.findViewById(R.id.tv); } } @Override public ColorAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType){ // Create a new View View v = LayoutInflater.from(mContext).inflate(R.layout.custom_view,parent,false); ViewHolder vh = new ViewHolder(v); return vh; } @Override public void onBindViewHolder(ViewHolder holder, int position){ holder.mTextView.setText(mDataSet[position]); // Set a random height for TextView holder.mTextView.getLayoutParams().height = getRandomIntInRange(250,75); // Set a random color for TextView background holder.mTextView.setBackgroundColor(getRandomHSVColor()); } @Override public int getItemCount(){ return mDataSet.length; } // Custom method to get a random number between a range protected int getRandomIntInRange(int max, int min){ return mRandom.nextInt((max-min)+min)+min; } // Custom method to generate random HSV color protected int getRandomHSVColor(){ // Generate a random hue value between 0 to 360 int hue = mRandom.nextInt(361); // We make the color depth full float saturation = 1.0f; // We make a full bright color float value = 1.0f; // We avoid color transparency int alpha = 255; // Finally, generate the color int color = Color.HSVToColor(alpha, new float[]{hue, saturation, value}); // Return the color return color; } }
custom_view.xml
AndroidManifest.xml
vi /Library/LaunchDaemons/com.mysql.mysql.plist
KeepAlive Label com.mysql.mysqld ProgramArguments /usr/local/mysql/bin/mysqld_safe --user=mysql
AndroidManifest.xml
android:configChanges 에 screenSize를 넣어줘야 onCreate를 다시 타지 않는다.
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="screenSize|keyboard|orientation" > |
Activity
import android.app.Activity; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class MainActivity extends Activity { private final String TAG = MainActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); loadView(); } private void loadView() { setContentView(R.layout.activity_main); Button btn = (Button)findViewById(R.id.rotate_button); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (getRequestedOrientation() == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); Log.i(TAG, "SCREEN_ORIENTATION_SENSOR_PORTRAIT"); } else { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); Log.i(TAG, "SCREEN_ORIENTATION_SENSOR_LANDSCAPE"); } } }); } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) { loadView(); } else { loadView(); } } } |