메뉴 건너뛰기

imp

FLEX 개발환경 - J2EE, Tomcat, CS

박영식2007.07.06 10:07조회 수 2886댓글 0

    • 글자 크기

  J2EE는 웹기반의 엔터프라이즈 애플리케이션을 구축하기 위한 썬의 플랫폼이다. J2EE 서비스는 사용자의 브라우저와, 엔터프라이즈 데이터베이스 및 레거시 정보시스템 사이의 중간계층에서 수행된다. J2EE의 핵심요소는, JSP와 자바 서블릿, 그리고 기업내의 정보자원을 하나로 묶기 위한 다양한 인터페이스들의 뒤를 이은 EJB이다. J2EE 인터페이스는 데이터베이스를 위해 JDBC를, 디렉토리를 위해서는 JNDI를, 트랜잭션을 위해서는 JTA를, 메시징을 위해서는 JMS를, 전자우편시스템을 위해서는 JavaMail을, 그리고 CORBA와의 접속을 위해서는 JavaIDL을 각각 포함한다.


  1999년 12월에, 최초의 공식적인 버전으로는 최초로 J2EE 버전 1.2가 발표되었다.


Tomcat : 아파치 소프트웨어 파운데이션(Apache Software Foundation)에서 서버인 자바(Java)를 움직이게 하기 위해 개발한 AP서버.
톰캣은 서블릿 컨테이너이며, 자바 서블릿 Java Servlet과 자바서버 페이지JavaServer Pages 기술에 대한 공식적인 참조 구현체입니다. 자바 서블릿과 자바서버 페이지 스펙은 Java Community Process 주도하에 썬에 의해서 개발됩니다. 톰캣은 아파치 소프트웨어 라이센스 아래 공개적이고 함께 하는 환경에서 개발되고 배포됩니다. 톰캣은 전세계의 베스트 개발자들의 합작으로 의도된 것입니다.

 CS는 creative suite의 약자인데, Adobe사에서 릴리즈한 프로그램들은 다 cs가 붙는다. 마케팅 전략이기도 하고, MS처럼 studio에 여러 언어를 컴파일할 수 있는 컴파일러 및 에디터를 묶어 내놓는 것으로 보이기도 한다. 이럴 수록 사이즈가 커져서 관리하기는 더 어려워질 듯 하다.

박영식 (비회원)
    • 글자 크기
[FACEBOOK] 앱 만들기1 (by 박영식) [R] 우분투 16.04에 RStudio 설치 (by suritam9)

댓글 달기

카길 코리아 - 비료, 식량 산업

[원문보기]
훌륭한 CEO와 안정적인 사업 구조

plot의 속성, axis의 속성, font의 속성 설정

[원문보기]
그림은 plot tool을 본 화면이다. 멋지군..

for j = 1:8192
    a(j-0) = j^(4/3);
end
pplot = plot(a,'m-.','LineWidth',[1.5]);
pfont = text(4096, 65536,'bulletleftarrow middle value','fontsize',18,'color',[1 0 0]);
axis([0 8200 0 170000]);
axis square, title('AXIS SQUARE'), grid;
%%아래의 get함수는 속성을 지정할 수 있는 파라미터와 현재 속성값을 볼 수 있다.
plot_property = get(pplot)
font_property = get(pfont)
axis_property = get(gca)

xml데이터 파싱을 이용한 chart

[원문보기]
Line chart
    <mx:Panel title="Line Chart">
        <mx:LineChart dataProvider="{myAC}" showDataTips="true">
            <mx:horizontalAxis>
                <mx:CategoryAxis dataProvider="{myAC}" categoryField="month"/>
            </mx:horizontalAxis>
            <mx:series>
                <mx:LineSeries yField="apple" displayName="Apple"/>
                <mx:LineSeries yField="orange" displayName="Orange"/>
                <mx:LineSeries yField="banana" displayName="Banana"/>
            </mx:series>
        </mx:LineChart>

Pie chart
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundGradientColors="[#f7f794, #adb2ce]">
    <mx:Script><![CDATA[
        import mx.collections.ArrayCollection;
        import mx.utils.ArrayUtil;
    ]]></mx:Script>
    <!-- xml데이터 모델 소스 지정 -->
    <mx:Model id="myXML" source="data/data.xml"/>
 <!-- XML을 ArrayCollection 데이터로 변환 -->   
    <mx:ArrayCollection id="myAC" source="{ArrayUtil.toArray(myXML.result)}" />
    <mx:Panel title="Pie Chart - apple">
        <mx:PieChart dataProvider="{myAC}" showDataTips="true">
            <mx:series>
             <mx:Array>
                 <mx:PieSeries field="apple" labelPosition="inside"/>
             </mx:Array>
            </mx:series>
        </mx:PieChart>
    </mx:Panel>
    <mx:Panel title="Pie Chart - orange">
        <mx:PieChart dataProvider="{myAC}" showDataTips="true">
            <mx:series>
             <mx:Array>
                 <mx:PieSeries field="orange" labelPosition="inside"/>
             </mx:Array>
            </mx:series>
        </mx:PieChart>
    </mx:Panel>
    <mx:Panel title="Pie Chart - banana">
        <mx:PieChart dataProvider="{myAC}" showDataTips="true">
            <mx:series>
             <mx:Array>
                 <mx:PieSeries field="banana" labelPosition="inside"/>
             </mx:Array>
            </mx:series>
        </mx:PieChart>
    </mx:Panel>
</mx:Application>


[data.xml]
<data>
    <result month="1">
        <apple>20</apple>
        <orange>15</orange>
        <banana>11</banana>
    </result>
    <result month="2">
        <apple>18</apple>
        <orange>17</orange>
        <banana>23</banana>
    </result>
    <result month="3">
        <apple>18</apple>
        <orange>17</orange>
        <banana>23</banana>
    </result>
    <result month="4">
        <apple>11</apple>
        <orange>13</orange>
        <banana>9</banana>
    </result>
    <result month="5">
        <apple>8</apple>
        <orange>7</orange>
        <banana>3</banana>
    </result>
    <result month="6">
        <apple>11</apple>
        <orange>12</orange>
        <banana>21</banana>
    </result>
    <result month="7">
        <apple>20</apple>
        <orange>10</orange>
        <banana>13</banana>
    </result>
    <result month="8">
        <apple>18</apple>
        <orange>16</orange>
        <banana>29</banana>
    </result>
    <result month="9">
        <apple>28</apple>
        <orange>17</orange>
        <banana>22</banana>
    </result>
    <result month="10">
        <apple>18</apple>
        <orange>17</orange>
        <banana>3</banana>
    </result>
    <result month="11">
        <apple>3</apple>
        <orange>4</orange>
        <banana>9</banana>
    </result>
    <result month="12">
        <apple>1</apple>
        <orange>10</orange>
        <banana>13</banana>
    </result>                                       
</data>

퓨리에 변환을 통한 주파수영역으로 전환

[원문보기]
t=linspace(0,1,1000);
g=cos(2*pi*100*t)+cos(2*pi*200*t);
dt=t(2)-t(1);
df=1/dt/(1000-1);
f=[-500:499];
G=fft(g);
G=fftshift(G);
realG = G.* conj(G) / 1000;
subplot(2,1,1);
plot(t,g);
axis([0 0.05 -1.5 2]);
subplot(2,1,2);
plot(f,realG);
axis([-300 300 0 250]);

[GIT] github의 기본적인 명령어

[원문보기]
git reset : add나 rm 명령들을 제거한다.



git는 명령어를 사용하면 commit하고, push 하기 전 까지 완전히 적용이 안 된다.

따라서 add/rm 후, commit 하여 local repository에 적용시키고, push하여 remote repository에 까지 업데이트 한다.

1. git add[rm] 파일명
2. git commit -m "메시지"
3. git push origin master

업데이트 된 내용을 받으려면

git pull

하면 된다.


git checkout  -- <파일> : 현재 작업 중인 파일 중 수정된 파일을 index에 있는 것으로 원복
git reset --hard : 현재 작업 중이 파일을 모두 원복 시킴
git reset -- <파일명> : add같은 명령어로 인덱싱한 것을 취소함

cos함수의 주파수영역에서 보기

[원문보기]
t = 0:0.001:0.6;
x = cos(2*pi*150*t)+cos(2*pi*50*t);
y = x;
subplot(2,1,1)
plot(1000*t(1:50),y(1:50))
title('Signal')
xlabel('time (milliseconds)')
Y = fft(y,512);
Pyy = Y.* conj(Y) / 512;
f = 1000*(0:256)/512;
subplot(2,1,2)
plot(f,Pyy(1:257))
title('Frequency')
xlabel('frequency (Hz)')

[bolt.new] memex를 이용한 연동

[원문보기]

헤드리스 CMS 라는 백엔드와 bolt 라는 웹사이트 AI 코딩 프론트 엔드를 결합하여 사이트를 만들었다.

초반은 잘 되다가 토큰이 떨어져서 챗GPT로 코드를 수정하여 생성, 삭제를 추가했다.

배포는 계속 되는 것 같아 웹사이트 유지하기에는 좋은 것 같다.

 

import React, { useState, useEffect } from 'react';

import Header from './components/Header';

import PostList from './components/PostList';

import PostForm from './components/PostForm';

import PostDetail from './components/PostDetail';

import { Post, ApiItem, ApiResponse } from './types';

 

// Access token for the API

const ACCESS_TOKEN = "";

 

// API URL

const API_URL = "https://api.memexdata.io/memex/api/projects/b545c4b1/models/article/contents/search/v2";

 

function App() {

  const [posts, setPosts] = useState<Post[]>([]);

  const [selectedPost, setSelectedPost] = useState<Post | null>(null);

  const [loading, setLoading] = useState<boolean>(true);

  const [error, setError] = useState<string | null>(null);

 

  useEffect(() => {

    fetchPosts();

  }, []);

 

  const parseEditorJSContent = (jsonString: string): string => {

    try {

      const editorData = JSON.parse(jsonString);

      if (editorData.blocks) {

        // Extract text from blocks

        return editorData.blocks

          .map((block: any) => {

            if (block.type === 'paragraph' || block.type === 'header') {

              return block.data.text;

            } else if (block.type === 'list') {

              return block.data.items.join('\n');

            }

            return '';

          })

          .filter(Boolean)

          .join('\n\n');

      }

      return jsonString;

    } catch (e) {

      // If parsing fails, return the original string

      return jsonString;

    }

  };

 

  const fetchPosts = async () => {

    try {

      setLoading(true);

      setError(null);

      

      const response = await fetch(API_URL, {

        method: 'POST',

        headers: {

          'Content-Type': 'application/json',

          'Access-Token': ACCESS_TOKEN

        },

        body: JSON.stringify({

          size: 10,

          page: 0,

          direction: "DESC",

          orderCond: {

            type: "DATE_CREATE"

          }

        })

      });

 

      if (!response.ok) {

        throw new Error(`API 요청 실패: ${response.status}`);

      }

 

      const data: ApiResponse = await response.json();

      

      if (!data.list || !Array.isArray(data.list)) {

        throw new Error('API 응답 형식이 올바르지 않습니다.');

      }

      let count = 1;

      // Transform API data to our Post format

      const transformedPosts: Post[] = data.list.map((item: ApiItem, index: number) => {

        // Extract categories if available

        const categories = item.data.category 

          ? item.data.category.map(cat => cat.languageMap.KO)

          : [];

        

        // Parse content if it's in EditorJS format

        const contentRaw = item.data.content?.KO || '';

        const parsedContent = parseEditorJSContent(contentRaw);

        

        return {

          uid: item.uid,

          id: count++,

          title: item.data.title?.KO || '제목 없음',

          content: parsedContent,

          author: item.data.author?.KO || '익명',

          createdAt: new Date(item.data.date || Date.now()),

          category: categories

        };

      });

 

      setPosts(transformedPosts);

    } catch (err) {

      console.error('데이터를 가져오는 중 오류 발생:', err);

      setError('데이터를 불러오는 데 실패했습니다. 나중에 다시 시도해주세요.');

      

      // Fallback to sample data if API fails

      const fallbackPosts: Post[] = [

        {

          id: 1,

          title: '첫 번째 게시물입니다',

          content: '게시판에 오신 것을 환영합니다. 이 게시판은 React와 TypeScript로 만들어졌습니다.',

          author: '관리자',

          createdAt: new Date('2025-01-15')

        },

        {

          id: 2,

          title: '게시판 사용 방법',

          content: '게시물을 작성하려면 "새 게시물 작성" 버튼을 클릭하세요.\n게시물을 보려면 제목을 클릭하세요.\n게시물을 삭제하려면 삭제 아이콘을 클릭하세요.',

          author: '관리자',

          createdAt: new Date('2025-01-16')

        }

      ];

      setPosts(fallbackPosts);

    } finally {

      setLoading(false);

    }

  };

 

const handleCreatePost = async (title: string, content: string, author: string) => {

  try {

    const requestBody = {

      publish: true,

      data: {

        title: { KO: title },

        date: new Date().toISOString().replace('Z', ''),

        content: { KO: content },

        author: { KO: author },

        category: []

      }

    };

 

    const response = await fetch(

      'https://api.memexdata.io/memex/external/projects/b545c4b1/models/article/contents',

      {

        method: 'POST',

        headers: {

          'Content-Type': 'application/json',

          'Access-Token': ACCESS_TOKEN,

        },

        body: JSON.stringify(requestBody),

      }

    );

 

    //if (response) {

    //  throw new Error('게시물 생성 실패');

    //}

    

    //const responseData = await response.json();

    console.log('게시물 생성 성공:', response);

    window.location.reload(); // 페이지 새로고침

  } catch (error) {

    console.error('Error creating post:', error);

    alert('게시물 생성 중 오류가 발생했습니다.');

  }

};

 

 

  const handleViewPost = (post: Post) => {

    setSelectedPost(post);

  };

 

  const handleBackToList = () => {

    setSelectedPost(null);

  };

 

const handleDeletePost = async (id: number) => {

  if (window.confirm('정말로 이 게시물을 삭제하시겠습니까?')) {

    try {

      const response = await fetch(

        'https://api.memexdata.io/memex/external/projects/b545c4b1/models/article/contents',

        {

          method: 'DELETE',

          headers: {

            'Content-Type': 'application/json',

            'Access-Token': ACCESS_TOKEN,

          },

          body: JSON.stringify([id]),

        }

      );

 

      if (!response.ok) {

        throw new Error('게시물 삭제 실패');

      }

      

      setPosts(posts.filter(post => post.id !== id));

      if (selectedPost && selectedPost.id === id) {

        setSelectedPost(null);

      }

    window.location.reload(); // 페이지 새로고침

    } catch (error) {

      console.error('Error deleting post:', error);

      alert('게시물 삭제 중 오류가 발생했습니다.');

    }

  }

};

 

 

  const handleRefresh = () => {

    fetchPosts();

  };

 

  return (

    <div className="min-h-screen bg-gray-100">

      <Header />

      <main className="container mx-auto px-4 py-8">

        {selectedPost ? (

          <PostDetail post={selectedPost} onBack={handleBackToList} />

        ) : (

          <>

            <PostForm onSubmit={handleCreatePost} />

            {loading ? (

              <div className="flex justify-center items-center py-12">

                <div className="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"></div>

              </div>

            ) : error ? (

              <div className="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mt-6">

                <p>{error}</p>

                <button 

                  onClick={handleRefresh}

                  className="mt-2 bg-red-200 hover:bg-red-300 text-red-700 font-bold py-1 px-3 rounded text-sm"

                >

                  다시 시도

                </button>

              </div>

            ) : (

              <PostList 

                posts={posts} 

                onViewPost={handleViewPost} 

                onDeletePost={handleDeletePost}

                onRefresh={handleRefresh}

              />

            )}

          </>

        )}

      </main>

      <footer className="bg-gray-800 text-white py-4 mt-8">

        <div className="container mx-auto px-4 text-center">

          <p>© 2025 게시판 웹사이트. All rights reserved.</p>

        </div>

      </footer>

    </div>

  );

}

 

export default App;

[GS] ArrayFormula 함수 활용하기

[원문보기]

ArrayFormula 는 영역의 내용을 그대로 참조할 수 있다.


importrange 함수는 다른 파일(스프레드시트)의 영역을 참조하는데, limit 가 걸려있고, 느리므로 별로 안 좋아한다.


ArrayFormula 를 이용해 다른 view 를 구성하는 것이 필요한 경우 사용 가능하다.


A, B, C 컬럼 중 A, C 만 연속해서 활용해야할 때 좋다.


더더욱 좋은 것은 문자열의 가공이 가능하다는 것이다.


=ArrayFormula(if('sheet'!V3:X="",,left('sheet'!V3:X,19)))


V3 행부터 X 행 전체 내용을 가져오는데, 비어있지 않다면(내용이 있다면) LEFT 함수를 거쳐 출력하는 것이다.


원래 내용은 20자인데, 별로 안 예쁘게 출력될 때, 새로운 view를 구성하면서 문자열을 자르고 출력시킬 수 있다.



또다른 활용으로는 index 와 row 를 이용한 순서 바꾸기(reverse) 이다.


=INDEX(ArrayFormula('sheet'!B$2:B),COUNTA(ArrayFormula('sheet'!$B$2:$B))-ROW()+2,1)


해당 예제는 2행 부터 시작되는 경우이고, arrayformula를 사용하는 시트도 2행부터 시작하여 내용을 맞췄다.


C 컬럼의 경우 그대로 복사하면, 옆의 행을 참조하도록 상대 주소가 반영된다.


3행의 경우도 전체 참조내용에서 row 함수에 의해 index 가 반전되므로 역정렬된 데이터를 볼 수 있다.


구글 form의 고질적인 문제(아래로 쌓이면 내용 확인을 위해 스크롤)가 있어 찾아봤다.

창업일지 - 사업자등록 및 통신판매업신고

[원문보기]
 1. 사업자 등록은 주업종, 주업태 선정 외에는 어려운 점이 없었다. 일반과세자로 등록되었으며, 접수자와의 의견 교환이 종료되면 대기자가 없을시 1분이내에 발급된다.
  -> 장소 : 세무서

 2. 통신판매업신고는 구청 지역경제과에서 하였으며, 여러가지 확인절차(세금 채납 등)을 거쳐 신청을 완료하였다. 사업자등록증과 신분증만 있으면 된다.

함수 - 데이터 생성 함수 magic

[원문보기]

 magic(k)는 1에서 k^2까지의 정수를 사용하여 열, 행 그리고 대각선의 합이 똑같은 정방행렬을 만들어주는 Matlab의 데이터 생성함수이다.


  To get started, select MATLAB Help or Demos from the Help menu.


>> B = magic(4)


B =


    16     2     3    13
     5    11    10     8
     9     7     6    12
     4    14    15     1


>>

[OSX] VMWARE 에 WINDOWS 설치 후, 키보드 매핑

[원문보기]

http://docs.cena.co.kr/?mid=textyle&category=13620&document_srl=17478

위 사이트를 참고하였다.

Left Option(0038) -> Left Windows(E05B)

Left Command(E05B) -> Left Alt(0038)

Right Control(E01D) -> Context Menu(E05D)

Right Option(E038) -> 한자(E071)

Right Command(E05C) -> 한글(E072)


위와 같이 변경해 보았으나, 기본적으로 Left Command + Tab이 OSX의 창 전환 기능이기 때문에, WINDOWS에서 사용할 수 없다. 그래서 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout

에서 Scancode Map의 데이터를 다음과 같이 입력했다.

00 00 00 00   // Map Header

00 00 00 00   // Map Version

06 00 00 00   // Count (DWORD)

5B E0 5B E0   // Left Command(E05B) -> Left Windows(E05B)

38 00 38 00   // Left Option(0038) -> Left Alt(0038)

5D E0 1D E0   // Right Control(E01D) -> Context Menu(E05D)-> 내 맥북 AIR에는 없다

71 E0 38 E0   // Right Option(E038) -> 한자(E071)

72 E0 5C E0   // Right Command(E05C) -> 한글(E072)

00 00 00 00

이렇게 하여, 한자, 한글만 적용했다. 

[R] 구글 플레이스토어 리뷰 수집

[원문보기]

json 등으로 제공되지 않기 때문에, html 을 직접 크롤링해야 하는데, 더보기 버튼 등이 있고, 유용성 순서로 정렬이 기본이므로 제약이 많다.

 

https://blog.naver.com/PostView.nhn?blogId=nife0719&logNo=221329685115&parentCategoryNo=&categoryNo=30&viewDate=&isShowPopularPosts=false&from=postView

 

에서 제공되는 소스를 조금 고쳐서 전체를 다 수집하지 않고, 최근 것 일부만 수집하도록 한다.

 

리뷰가 너무 많을 경우 30분이 넘어가는 일이 발생하므로 다음과 같이 수정하였다.

 

다음을 실행하기 위해서는, r을 다운로드하여 설치하고 https://cran.r-project.org/bin/windows/base/

 

콘솔에서 관련 라이브러리를 설치한다. 아래 코드는 적당한 이름으로 저장하여 불러오기 후 전체 실행하면 된다.

(예제 앱은 스마트 헌혈 임)

 

install.packages("rvest")

install.packages("httr")

install.packages("stringr")

install.packages("RSelenium")

 

 

[다음]

 

library(rvest)

library(RSelenium)

library(httr)

library(stringr)

 

ch=wdman::chrome(port=4444L) #크롬드라이버를 포트

remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4444L, browserName = "chrome")

remDr$open() #크롬 Open

remDr$navigate("https://play.google.com/store/apps/details?id=net.bloodinfo.smartapp&showAllReviews=true") #설정 URL로 이동

 

webElem <- remDr$findElement("css", "body")

webElem$sendKeysToElement(list(key = "end"))

 

# webElemButton <- remDr$findElements(using = 'css selector',value = '.ZFr60d.CeoRYc') #버튼 element 찾기

# remDr$mouseMoveToLocation(webElement = webElemButton) #해당 버튼으로 포인터 이동

 

flag <- TRUE

endCnt <- 0

 

while (flag) {

  Sys.sleep(10)

  webElemButton <- remDr$findElements(using = 'css selector',value = '.ZFr60d.CeoRYc')

 

  if(length(webElemButton)==1){

    endCnt <- 0

    webElem$sendKeysToElement(list(key = "home"))

    webElemButton <- remDr$findElements(using = 'css selector',value = '.ZFr60d.CeoRYc')

    remDr$mouseMoveToLocation(webElement = webElemButton[[1]]) #해당 버튼으로 포인터 이동

    remDr$click()

    webElem$sendKeysToElement(list(key = "end"))

    flag <- FALSE #추가한 부분

  }else{

    if(endCnt>3){

      flag <- FALSE

    }else{

      endCnt <- endCnt + 1

    }

  }

}

 

frontPage <- remDr$getPageSource() #페이지 전체 소스 가져오기

reviewNames <- read_html(frontPage[[1]]) %>% html_nodes('.bAhLNe.kx8XBd') %>% html_nodes('.X43Kjb') %>%  html_text() #페이지 전체 소스에서 리뷰 정보(이름, 날짜) 부분 추출하기 

reviewDates <- read_html(frontPage[[1]]) %>% html_nodes('.bAhLNe.kx8XBd') %>% html_nodes('.p2TkOb') %>%  html_text() #페이지 전체 소스에서 리뷰 정보(이름, 날짜) 부분 추출하기 

reviewComments <- read_html(frontPage[[1]]) %>% html_nodes('.UD7Dzf') %>%  html_text() #페이지 전체 소스에서 리뷰 정보(이름, 날짜) 부분 추출하기 

reviewData <- data.frame(name=reviewNames, date=reviewDates, comment=reviewComments)

 

write.csv(reviewData, paste0("net.bloodinfo.smartapp(",nrow(reviewData),").csv"))

 

remDr$close()

 

[slack] bot 을 이용한 메시지 보내기

[원문보기]

browse Apps -> Custom Integrations -> Bots 에서


bot을 추가하여 이름 정도만 설정하면 access-token을 받을 수 있다.


xoxb 로 시작하는 token을 넣은 뒤 아래와 같은 php 소스로 메시지 전송이 가능하다.


<?php

$cont="#".$_GET["channel"];

echo slack($_GET["cont"],$cont);

function slack($message, $channel)

{

    $ch = curl_init("https://slack.com/api/chat.postMessage");

    $data = http_build_query([

        "token" => "xoxb-~~~",

        "channel" => $channel, //"#general",

        "text" => $message, //"Hello, Foo-Bar channel message.",

        "username" => "MySlackBot",

    ]);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');

    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

    $result = curl_exec($ch);

    curl_close($ch);

    return $result;

}

?>

[C++] md5 해시 만들기

[원문보기]

원래 해더 파일이 분리되어있는데, include 로 안 되서 걍 붙여 넣어 버렸다.

CString md5hash;

char sseed[100];

strRes="문자열";

sprintf( sseed, "%s", strRes);

md5hash=md5((LPSTR)(LPCSTR)sseed);


특정 문자열과 조합된 char 형태를 cstring 으로 해서 넣으면 cstring 타입으로 리턴 값을 얻을 수 있다.


#ifndef md5_INCLUDED

#  define md5_INCLUDED


/*

 * This package supports both compile-time and run-time determination of CPU

 * byte order.  If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be

 * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is

 * defined as non-zero, the code will be compiled to run only on big-endian

 * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to

 * run on either big- or little-endian CPUs, but will run slightly less

 * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.

 */


typedef unsigned char md5_byte_t; /* 8-bit byte */

typedef unsigned int md5_word_t; /* 32-bit word */


/* Define the state of the MD5 Algorithm. */

typedef struct md5_state_s {

md5_word_t count[2]; /* message length in bits, lsw first */

md5_word_t abcd[4]; /* digest buffer */

md5_byte_t buf[64]; /* accumulate block */

} md5_state_t;


#ifdef __cplusplus

extern "C" 

{

#endif


/* Initialize the algorithm. */

void md5_init(md5_state_t *pms);


/* Append a string to the message. */

void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);


/* Finish the message and return the digest. */

void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);


#ifdef __cplusplus

}  /* end extern "C" */

#endif


#endif /* md5_INCLUDED */



#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */

#ifdef ARCH_IS_BIG_ENDIAN

#  define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)

#else

#  define BYTE_ORDER 0

#endif


#define T_MASK ((md5_word_t)~0)

#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)

#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)

#define T3    0x242070db

#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)

#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)

#define T6    0x4787c62a

#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)

#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)

#define T9    0x698098d8

#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)

#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)

#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)

#define T13    0x6b901122

#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)

#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)

#define T16    0x49b40821

#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)

#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)

#define T19    0x265e5a51

#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)

#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)

#define T22    0x02441453

#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)

#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)

#define T25    0x21e1cde6

#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)

#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)

#define T28    0x455a14ed

#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)

#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)

#define T31    0x676f02d9

#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)

#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)

#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)

#define T35    0x6d9d6122

#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)

#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)

#define T38    0x4bdecfa9

#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)

#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)

#define T41    0x289b7ec6

#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)

#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)

#define T44    0x04881d05

#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)

#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)

#define T47    0x1fa27cf8

#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)

#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)

#define T50    0x432aff97

#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)

#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)

#define T53    0x655b59c3

#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)

#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)

#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)

#define T57    0x6fa87e4f

#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)

#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)

#define T60    0x4e0811a1

#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)

#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)

#define T63    0x2ad7d2bb

#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)



static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/){

md5_word_t

a = pms->abcd[0], b = pms->abcd[1],

c = pms->abcd[2], d = pms->abcd[3];

md5_word_t t;

#if BYTE_ORDER > 0

    /* Define storage only for big-endian CPUs. */

    md5_word_t X[16];

#else

    /* Define storage for little-endian or both types of CPUs. */

    md5_word_t xbuf[16];

    const md5_word_t *X;

#endif


{

#if BYTE_ORDER == 0

/*

* Determine dynamically whether this is a big-endian or

* little-endian machine, since we can use a more efficient

* algorithm on the latter.

*/

static const int w = 1;


if (*((const md5_byte_t *)&w)) /* dynamic little-endian */

#endif

#if BYTE_ORDER <= 0 /* little-endian */

{

   /*

* On little-endian machines, we can process properly aligned

* data without copying it.

*/

if (!((data - (const md5_byte_t *)0) & 3)) {

/* data are properly aligned */

X = (const md5_word_t *)data;

} else {

/* not aligned */

memcpy(xbuf, data, 64);

X = xbuf;

}

}

#endif

#if BYTE_ORDER == 0

else /* dynamic big-endian */

#endif

#if BYTE_ORDER >= 0 /* big-endian */

{

   /*

* On big-endian machines, we must arrange the bytes in the

* right order.

*/

const md5_byte_t *xp = data;

int i;


#  if BYTE_ORDER == 0

   X = xbuf; /* (dynamic only) */

#  else

#    define xbuf X /* (static only) */

#  endif

   for (i = 0; i < 16; ++i, xp += 4)

xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);

}

#endif

}


#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))


    /* Round 1. */

    /* Let [abcd k s i] denote the operation

       a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */

#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))

#define SET(a, b, c, d, k, s, Ti)

  t = a + F(b,c,d) + X[k] + Ti;

  a = ROTATE_LEFT(t, s) + b

    /* Do the following 16 operations. */

    SET(a, b, c, d,  0,  7,  T1);

    SET(d, a, b, c,  1, 12,  T2);

SET(c, d, a, b,  2, 17,  T3);

SET(b, c, d, a,  3, 22,  T4);

SET(a, b, c, d,  4,  7,  T5);

SET(d, a, b, c,  5, 12,  T6);

SET(c, d, a, b,  6, 17,  T7);

SET(b, c, d, a,  7, 22,  T8);

SET(a, b, c, d,  8,  7,  T9);

SET(d, a, b, c,  9, 12, T10);

SET(c, d, a, b, 10, 17, T11);

SET(b, c, d, a, 11, 22, T12);

SET(a, b, c, d, 12,  7, T13);

SET(d, a, b, c, 13, 12, T14);

SET(c, d, a, b, 14, 17, T15);

SET(b, c, d, a, 15, 22, T16);

#undef SET


     /* Round 2. */

     /* Let [abcd k s i] denote the operation

          a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */

#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))

#define SET(a, b, c, d, k, s, Ti)

  t = a + G(b,c,d) + X[k] + Ti;

  a = ROTATE_LEFT(t, s) + b

     /* Do the following 16 operations. */

    SET(a, b, c, d,  1,  5, T17);

    SET(d, a, b, c,  6,  9, T18);

SET(c, d, a, b, 11, 14, T19);

SET(b, c, d, a,  0, 20, T20);

SET(a, b, c, d,  5,  5, T21);

SET(d, a, b, c, 10,  9, T22);

SET(c, d, a, b, 15, 14, T23);

SET(b, c, d, a,  4, 20, T24);

SET(a, b, c, d,  9,  5, T25);

SET(d, a, b, c, 14,  9, T26);

SET(c, d, a, b,  3, 14, T27);

SET(b, c, d, a,  8, 20, T28);

SET(a, b, c, d, 13,  5, T29);

SET(d, a, b, c,  2,  9, T30);

SET(c, d, a, b,  7, 14, T31);

SET(b, c, d, a, 12, 20, T32);

#undef SET


     /* Round 3. */

     /* Let [abcd k s t] denote the operation

          a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */

#define H(x, y, z) ((x) ^ (y) ^ (z))

#define SET(a, b, c, d, k, s, Ti)

  t = a + H(b,c,d) + X[k] + Ti;

  a = ROTATE_LEFT(t, s) + b

     /* Do the following 16 operations. */

    SET(a, b, c, d,  5,  4, T33);

    SET(d, a, b, c,  8, 11, T34);

SET(c, d, a, b, 11, 16, T35);

SET(b, c, d, a, 14, 23, T36);

SET(a, b, c, d,  1,  4, T37);

SET(d, a, b, c,  4, 11, T38);

SET(c, d, a, b,  7, 16, T39);

SET(b, c, d, a, 10, 23, T40);

SET(a, b, c, d, 13,  4, T41);

SET(d, a, b, c,  0, 11, T42);

SET(c, d, a, b,  3, 16, T43);

SET(b, c, d, a,  6, 23, T44);

SET(a, b, c, d,  9,  4, T45);

SET(d, a, b, c, 12, 11, T46);

SET(c, d, a, b, 15, 16, T47);

SET(b, c, d, a,  2, 23, T48);

#undef SET


     /* Round 4. */

     /* Let [abcd k s t] denote the operation

          a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */

#define I(x, y, z) ((y) ^ ((x) | ~(z)))

#define SET(a, b, c, d, k, s, Ti)

  t = a + I(b,c,d) + X[k] + Ti;

  a = ROTATE_LEFT(t, s) + b

     /* Do the following 16 operations. */

    SET(a, b, c, d,  0,  6, T49);

    SET(d, a, b, c,  7, 10, T50);

SET(c, d, a, b, 14, 15, T51);

SET(b, c, d, a,  5, 21, T52);

SET(a, b, c, d, 12,  6, T53);

SET(d, a, b, c,  3, 10, T54);

SET(c, d, a, b, 10, 15, T55);

SET(b, c, d, a,  1, 21, T56);

SET(a, b, c, d,  8,  6, T57);

SET(d, a, b, c, 15, 10, T58);

SET(c, d, a, b,  6, 15, T59);

SET(b, c, d, a, 13, 21, T60);

SET(a, b, c, d,  4,  6, T61);

SET(d, a, b, c, 11, 10, T62);

SET(c, d, a, b,  2, 15, T63);

SET(b, c, d, a,  9, 21, T64);

#undef SET


     /* Then perform the following additions. (That is increment each

        of the four registers by the value it had before this block

        was started.) */

    pms->abcd[0] += a;

    pms->abcd[1] += b;

pms->abcd[2] += c;

pms->abcd[3] += d;

}


void md5_init(md5_state_t *pms)

{

pms->count[0] = pms->count[1] = 0;

pms->abcd[0] = 0x67452301;

pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;

pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;

pms->abcd[3] = 0x10325476;

}


void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes){

const md5_byte_t *p = data;

int left = nbytes;

int offset = (pms->count[0] >> 3) & 63;

md5_word_t nbits = (md5_word_t)(nbytes << 3);


if (nbytes <= 0)

return;


/* Update the message length. */

pms->count[1] += nbytes >> 29;

pms->count[0] += nbits;

if (pms->count[0] < nbits)

pms->count[1]++;


/* Process an initial partial block. */

if (offset) {

int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);


memcpy(pms->buf + offset, p, copy);

if (offset + copy < 64)

return;

p += copy;

left -= copy;

md5_process(pms, pms->buf);

}


/* Process full blocks. */

for (; left >= 64; p += 64, left -= 64)

md5_process(pms, p);


/* Process a final partial block. */

if (left)

memcpy(pms->buf, p, left);

}


void md5_finish(md5_state_t *pms, md5_byte_t digest[16]){

static const md5_byte_t pad[64] = {

0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

};

md5_byte_t data[8];

int i;


/* Save the length before padding. */

for (i = 0; i < 8; ++i)

data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));

/* Pad to 56 bytes mod 64. */

md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);

/* Append the length. */

md5_append(pms, data, 8);

for (i = 0; i < 16; ++i)

digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));

}


CString md5(const CString strMd5)

{

    md5_state_t state;

    md5_byte_t digest[16];

    char hex_output[16*2 + 1];

    int di;


    md5_init(&state);

md5_append(&state, (const md5_byte_t *)(LPSTR)(LPCSTR)strMd5, strMd5.GetLength());

    md5_finish(&state, digest);


    for (di = 0; di < 16; ++di)

        sprintf(hex_output + di * 2, "%02x", digest[di]);

    return hex_output;

}

페르미 패러독스

[원문보기]
페르미 이름이 붙은 또 다른 유명한 에피소드가 '페르미 패러독스'다. 이것은 지구 외 문명(생물)의 존재유무에 대한 것으로 다음과 같다.

우주의 크기와 별의 수, 역사의 길이를 생각할 때 지구 외 문명(Extra Terrestrial Civilization, 이하 ETC)이 존재하지 않는 것은 이상하다. 그러나 지구상에서 이제껏 ETC는 목격되지 않았다.

페르미는 이 화제를 동료들에게 자주 던지면서 "다들 어디에 있는 거지?" 하고 물었다고 한다. 이 패러독스를 페르미 패러독스라고 한다. 이 ETC의 존재확률에 관해서는 전형적인 페르미 추정을 응용할 수 있는 과제다. 참고로 미국의 천문학자 프랭크 드레이크 공식'을 유도해냈다.
드레이크 방정식 : N = R X fp X ne X fl X fi Xfc X L
N: 은하계에서 통신할 수 있는 ETC의 수
R: 은하계에서 1년에 별이 탄생할 확률
fp : 행성을 가진 항성의 확률
ne : 행성을 가진 항성 가운데 생명이 유지할 수 있는 환경을 가진 행성의 수
fl : 생명을 유지할 수 있는 행성 가운데 실제로 생명이 있을 확률
fi : 그 행성 가운데 생명이 지적인 생명체로 발전(진화)할 확률
fc : 그 가운데 항성 간 통신을 할 수 있는 문화가 발달할 확률
L : 그런 문화가 통신을 할 기간의 길이

[FACEBOOK] 앱 만들기1

[원문보기]
https://developers.facebook.com/apps

위 사이트에 가서 새 앱 만들기를 누른다.

F1.jpg

이름을 입력하면, 위와 같이 Basic 설정으로 넘어간다.

앱 네임스페이스는 앱의 이름이라고 할 수 있다. 영어로 쓴다.

이메일은 자신의 이메일을 쓰면 된다.

F2.jpg

아래에 웹사이트, 캔버스 URL, MObile Web URL은 http://주소/facebook/ 로 모두 동일하게 적어도 된다.
캔버스 페이지는 http://apps.facebook.com/네임스페이스


변경내용을 저장하고,
이제 facebook 디렉터리의 index.php를 작성한다.


위 사이트에서 sdk를 다운로드 하고 아래와 같이 기본 코드를 작성한다.

require "./php-sdk/src/facebook.php";

$facebook = new Facebook(array(
  'appId'  => '', //어플리케이션 생성시 발급된 'Application ID'를 넣어주자.
  'secret' => '', //어플리케이션 생성시 발급된 'Application Secret' 을 넣어주자.
  'cookie' => true,
));

// Get User ID
$user = $facebook->getUser();

// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is logged into
// Facebook, but we don't know if the access token is valid. An access
// token is invalid if the user logged out of Facebook.

if ($user) {
  try {
    // Proceed knowing you have a logged in user who's authenticated.
    $user_profile = $facebook->api('/me');
  } catch (FacebookApiException $e) {
    error_log($e);
    $user = null;
  }
}

// Login or logout url will be needed depending on current user state.
if ($user) {
  $logoutUrl = $facebook->getLogoutUrl();
} else {
  $loginUrl = $facebook->getLoginUrl();
}
$session=$facebook->getUser();
if ($session==null) {
사용자가 승인하는 부분 // 다음 게시글에서 다룬다.
}

[FACEBOOK] 앱 만들기1

[원문보기]
https://developers.facebook.com/apps

위 사이트에 가서 새 앱 만들기를 누른다.

F1.jpg

이름을 입력하면, 위와 같이 Basic 설정으로 넘어간다.

앱 네임스페이스는 앱의 이름이라고 할 수 있다. 영어로 쓴다.

이메일은 자신의 이메일을 쓰면 된다.

F2.jpg

아래에 웹사이트, 캔버스 URL, MObile Web URL은 http://주소/facebook/ 로 모두 동일하게 적어도 된다.
캔버스 페이지는 http://apps.facebook.com/네임스페이스


변경내용을 저장하고,
이제 facebook 디렉터리의 index.php를 작성한다.


위 사이트에서 sdk를 다운로드 하고 아래와 같이 기본 코드를 작성한다.

require "./php-sdk/src/facebook.php";

$facebook = new Facebook(array(
  'appId'  => '', //어플리케이션 생성시 발급된 'Application ID'를 넣어주자.
  'secret' => '', //어플리케이션 생성시 발급된 'Application Secret' 을 넣어주자.
  'cookie' => true,
));

// Get User ID
$user = $facebook->getUser();

// We may or may not have this data based on whether the user is logged in.
//
// If we have a $user id here, it means we know the user is logged into
// Facebook, but we don't know if the access token is valid. An access
// token is invalid if the user logged out of Facebook.

if ($user) {
  try {
    // Proceed knowing you have a logged in user who's authenticated.
    $user_profile = $facebook->api('/me');
  } catch (FacebookApiException $e) {
    error_log($e);
    $user = null;
  }
}

// Login or logout url will be needed depending on current user state.
if ($user) {
  $logoutUrl = $facebook->getLogoutUrl();
} else {
  $loginUrl = $facebook->getLoginUrl();
}
$session=$facebook->getUser();
if ($session==null) {
사용자가 승인하는 부분 // 다음 게시글에서 다룬다.
}

[R] 우분투 16.04에 RStudio 설치

[원문보기]

아마존 t2.micro에 RStudio를 설치해서 원격으로 접속해 본다.

 

터미널보다 실행 속도가 더 빠르다니 의아하다.

 

http://download2.rstudio.org/ 에서 rstudio-server-1.1.463을 설치했다.

 

http://infondgndg91.blogspot.com/2016/09/1604-lts-rstudio.html 등에서는 rstudio-0.99.896-amd64.deb 를 받으라고 하는데,

 

Package 'libssl0.9.8' has no installation candidate 에러가 발생하여 상위 버전으로 설치했다.

 

 

  422  wget http://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb

  423  sudo gdebi rstudio-server-1.1.463-amd64.deb

 

 

이상 없으면 아래와 같이 출력되며, 자동 실행된다.

 

Reading package lists... Done

Building dependency tree

Reading state information... Done

This package is uninstallable

Wrong architecture 'i386'

ubuntu@ip-172-31-29-250:~$ wget http://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb

--2019-04-10 00:12:20--  http://download2.rstudio.org/rstudio-server-1.1.463-amd64.deb

Resolving download2.rstudio.org (download2.rstudio.org)... 54.239.186.77, 54.239.186.152, 54.239.186.198, ...

Connecting to download2.rstudio.org (download2.rstudio.org)|54.239.186.77|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 63566904 (61M) [application/x-deb]

Saving to: ‘rstudio-server-1.1.463-amd64.deb’

 

rstudio-server-1.1.463-amd64.deb        100%[=============================================================================>]  60.62M  13.8MB/s    in 5.6s

 

2019-04-10 00:12:26 (10.7 MB/s) - ‘rstudio-server-1.1.463-amd64.deb’ saved [63566904/63566904]

 

ubuntu@ip-172-31-29-250:~$ sudo gdebi rstudio-server-1.1.463-amd64.deb

Reading package lists... Done

Building dependency tree

Reading state information... Done

Reading state information... Done

 

RStudio Server

 RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, and workspace management.

Do you want to install the software package? [y/N]:y

Selecting previously unselected package rstudio-server.

(Reading database ... 106368 files and directories currently installed.)

Preparing to unpack rstudio-server-1.1.463-amd64.deb ...

Unpacking rstudio-server (1.1.463) ...

Setting up rstudio-server (1.1.463) ...

groupadd: group 'rstudio-server' already exists

rsession: no process found

Created symlink from /etc/systemd/system/multi-user.target.wants/rstudio-server.service to /etc/systemd/system/rstudio-server.service.

● rstudio-server.service - RStudio Server

   Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: enabled)

   Active: active (running) since Wed 2019-04-10 00:12:41 UTC; 1s ago

  Process: 25430 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)

 Main PID: 25434 (rserver)

    Tasks: 3

   Memory: 14.3M

      CPU: 387ms

   CGroup: /system.slice/rstudio-server.service

           └─25434 /usr/lib/rstudio-server/bin/rserver

 

Apr 10 00:12:41 ip-172-31-29-250 systemd[1]: Starting RStudio Server...

Apr 10 00:12:41 ip-172-31-29-250 systemd[1]: Started RStudio Server.

 

 

8787 포트를 방화벽에서 허용하여 접속하면, 윈도우에 설치한 RStudio와 동일하게 사용가능 하다.

 

 

 

20대 CEO - 박이빛

[원문보기]





파코메리 여성CEO 초청 강연
'대한민국 20대의 꿈과 성공' 주제로 최연소 월스트리트 진출 여성CEO 박이빛씨 강연

㈜파코메리(대표 박형미)는 지난 10일, 교육계 최연소 여성 CEO이자 교육 컨텐츠 분야 여성 CEO 최초로 미국 월스트리트에 진출한 박이빛 씨를 초청 '대한민국 20대의 꿈과 성공'이라는 주제로 강연회를 가졌다.

전국 주요지역 31개 직영점장 및 사원 5백여명을 대상으로 열린 이번 강연회에서 박이빛 씨는 현 시대를 속도, 지식, 신뢰의 시대로 규정하면서 “내 분야가 아니더라도, 나는 내가 내 몸을 투자했을 때 승리를 맛보는 그 쾌락에 승부수를 던진다"며 "경영자는 반드시 자신이 무엇을 원하고 무엇을 원하지 않는가를 정당화할 필요는 없다. 그러나 강하게 원하게 될 때가 있다, 그 때 시작을 해야 뭐든 이뤄낼 수 있다”고 강조했다. 또한 “강하게 신념을 가지는 그것, 그것을 책임질 수 있다면 지금 당장 시작하라”고 주문했다.

또 사람을 다루고 사람을 경영하는 자신만의 생각에 대해 박이빛 씨는 그것을 ‘안전거리’라고 규정했다.

박 CEO는 “우리는 사람이기 때문에 누구나 실패를 할 수 있다고 생각하며 살아야 한다. 그래서 필요한 것이 맨 마지막에 물러설 수 있는 공간, 즉 안전거리를 꼭 확보해 놓아야 한다는 것이다. 맨 마지막에 정말 남는 것은 내 주변의 ‘사람’이다. 돈도 아니고 명예도 아니고 바로 사람이다. 진정한 사람을 곁에 두는 사람은, 돈과 명예가 탐나지 않는다. 그럴 때 비로소 성공 이란 것이 찾아온다.”고 역설했다.

박형미 사장은 박이빛 씨에 대해 “공정한 원칙과 룰 속에서 승부욕이 강하고 진정한 자신만의 투자 방법을 체득한 박이빛 씨야말로 파코메리가 추구하는 미래지향적 투명한 파코메리 시스템과 일치한다”고 소감을 밝혔다.

박이빛 씨는 연봉 2천4백만원의 학원 강사로 시작한 지 5년 만에 10억원의 연봉을 받는 교육분야 최초의 여성 CEO로서 자신의 이름을 건 이빛에듀 뉴욕지사를 지난 7월 7일 월스트리트 중심가에 오픈해 세간의 화제가 됐다
첨부 (1)
evit.jpg
52.3KB / Download 130
위로