无法安装Keras for R

时间:2018-10-16 12:23:34

标签: r keras

我花了一些时间学习R的基础知识,现在我也想安装Keras。

当我尝试这样做时,出现以下错误:

 public class TabFragment1 extends Fragment {

    private int busRouteId = 108900010; //도봉02

    private String serviceKey;
    private String arrivalUrl;
    private String positionUrl;

    private ListView listView;

    private SwipeRefreshLayout swipeRefreshLayout;
    private Handler handler;

    private ArrivalInfo arrivalInfo = new ArrivalInfo();
    private ArrayList<ArrivalInfo> arrivalInfoArrayList = new ArrayList<>();
    private ArrayList<String> arrivalResult = new ArrayList<>();

    private String arsId = ""; //정류소 고유번호
    private String firstTm = ""; //첫차시간
    private String lastTm = ""; //막차시간
    private String stNm = ""; //정류소명

    boolean bl_arsId = false;
    boolean bl_firstTm = false;
    boolean bl_lastTm = false;
    boolean bl_stNm = false;

    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        serviceKey = "";
        arrivalUrl = "http://ws.bus.go.kr/api/rest/arrive/getArrInfoByRouteAll"+"?ServiceKey=" + serviceKey + "&busRouteId=" + busRouteId;
        positionUrl = "http://ws.bus.go.kr/api/rest/buspos/getBusPosByRtid"+"?ServiceKey=" + serviceKey + "&busRouteId=" + busRouteId;

        View view = inflater.inflate(R.layout.activity_dobong02, container, false);

        listView = view.findViewById(R.id.listView);
        swipeRefreshLayout = view.findViewById(R.id.swipeRefreshLayout);

        ArrivalAsync arrivalAsync = new ArrivalAsync() {
            @Override
            protected void onPostExecute(String arrivalUrl) {

                try {
                    XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
                    factory.setNamespaceAware(true);
                    XmlPullParser xpp = factory.newPullParser();

                    xpp.setInput(new StringReader(arrivalUrl));
                    int eventType = xpp.getEventType();
                    while(eventType != XmlPullParser.END_DOCUMENT) {
                        if(eventType == XmlPullParser.START_DOCUMENT) {

                        } else if(eventType == XmlPullParser.START_TAG) {
                            String tagName = xpp.getName();

                            switch (tagName) {
                                case "arsId":
                                    bl_arsId = true;
                                    break;
                                case "firstTm":
                                    bl_firstTm = true;
                                    break;
                                case "lastTm":
                                    bl_lastTm = true;
                                case "stNm":
                                    bl_stNm = true;
                                    break;
                            }
                        } else if(eventType == XmlPullParser.TEXT) {

                            if(bl_arsId) {
                                arsId = xpp.getText();
                                arrivalInfo.arsId = arsId;
                                bl_arsId = false;
                            }

                            if(bl_firstTm) {
                                firstTm = xpp.getText();
                                arrivalInfo.firstTm = firstTm;
                                bl_firstTm = false;
                            }

                            if(bl_lastTm) {
                                lastTm = xpp.getText();
                                arrivalInfo.lastTm = lastTm;
                                bl_lastTm = false;
                            }

                            if(bl_stNm) {
                                stNm = xpp.getText();
                                arrivalInfo.stNm = stNm;
                                bl_stNm = false;
                            }

                        } else if(eventType == XmlPullParser.END_TAG) {
                            String tagName = xpp.getName();

                            if(tagName.equals("itemList"))  {

                                arrivalInfoArrayList.add(arrivalInfo);
                                Log.d("결과", "" + arrivalInfo.arsId + ", " + arrivalInfo.firstTm + ", "+ arrivalInfo.lastTm + ", " + arrivalInfo.stNm);
                                arrivalInfo = new ArrivalInfo();
                            }
                        }
                        eventType = xpp.next();

                    }

                    for(int i = 0; i < arrivalInfoArrayList.size(); i++) {
                        Log.d("배열" + i, "" + arrivalInfoArrayList.get(i).stNm);
                        arrivalResult.add(i, arrivalInfoArrayList.get(i).stNm);
                        Log.d("result배열" + i, "" + arrivalResult.get(i));
                    }

                } catch (Exception e) {
                    e.printStackTrace();
                }
            }


        };

        arrivalAsync.execute(arrivalUrl);

        Log.d("arrivalInfoArrayList", "" + arrivalInfoArrayList.size());
        Log.d("arrivalResult", "" + arrivalResult.size());

        ArrayAdapter<String> listViewAdapter = new ArrayAdapter<>(
                getActivity(),
                android.R.layout.simple_list_item_1,
                arrivalResult
        );

        listView.setAdapter(listViewAdapter);


        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                handler.sendEmptyMessageDelayed(0, 1000);
            }
        });

        handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                swipeRefreshLayout.setRefreshing(false);
            }
        };

        return view;
    }

}

这是一台公司计算机,所以我想这与管理员权限有关吗?我当然可以要求与IT支持人员谈谈,以为我打开一些访问权限,但是我怀疑他们会在没有指导的情况下知道什么。

如果与管理员无关,我在做什么错了?

0 个答案:

没有答案