小编Rid*_*oid的帖子

将select中的多行插入另一个表中

假设我有`table1(col1,col2,col3),在col1和col3上插入的值将是相同的,但是在col2上插入的值来自select查询的结果.

我怎么能写我的查询,所以我可以一次多次插入?查询应该执行的示例:

col1  |  col2   | col3

 1        val1     0
 1        val2     0
 1        val3     0
Run Code Online (Sandbox Code Playgroud)

sql oracle oracle10g

5
推荐指数
1
解决办法
8196
查看次数

无法使用自定义按钮关闭对话框

如何解除我的自定义对话框?我得到一个错误使用.cancel().dismiss()作为,如果他们没有外面的本地解决.setpositive/Negative button

试过这个答案,但仍然没有工作..

这是我的对话框代码:

public void showSettingsAlert(){

    final AlertDialog.Builder alertdialog = new AlertDialog.Builder(mcontext);
    LayoutInflater inflater = LayoutInflater.from(mcontext);
    final View customView = inflater.inflate(R.layout.custom_gps,null);
    alertdialog.setView(customView);
    alertdialog.setCancelable(true);
    FlatButton bouton_ok = (FlatButton)customView.findViewById(R.id.custom_ok_button);
    FlatButton bouton_quitter = (FlatButton)customView.findViewById(R.id.custom_cancel_button);

    bouton_ok.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
            mcontext.startActivity(intent);


        }
    });
    bouton_quitter.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
        //to close the whole application : 
            finish();
            System.exit(0);
        }
    });
    alertdialog.show();
}
Run Code Online (Sandbox Code Playgroud)

在我的主机活动中,这是我检查gps是否已启用的方式:

    protected void …
Run Code Online (Sandbox Code Playgroud)

android android-alertdialog

4
推荐指数
1
解决办法
1545
查看次数

Facebook SDK:invalide范围:基本信息使用public_profile,而不是用户朋友

我正在使用facebook sdk 3.15在我的项目上设置facebook登录按钮.请记住,我正在使用parse.com

我使用了parse.com支持提供的代码,可以在这里找到,但是在点击登录按钮后我一直收到这个错误:

invalide scope : basic info use public_profile, user friends instead
Run Code Online (Sandbox Code Playgroud)

我用谷歌搜索错误,一无所获......

谢谢你的帮助 :)

android facebook parse-platform

3
推荐指数
1
解决办法
5144
查看次数

ActionBar按钮:无法访问的语句

你能告诉我我的代码有什么问题吗?(我打赌这是愚蠢的,但我找不到..)

无法访问的声明

我的代码:

    public boolean onOptionsItemSelected(MenuItem item) {
    return super.onOptionsItemSelected(item);

    switch (item.getItemId()){
        case R.id.action_go_home:
            //go home action
            Intent i = new Intent(this, UserProfileActivity.class);
            startActivity(i);
            return true;
            break;
        case R.id.action_select_categories:
            //select categories
            return true;
        case R.id.action_refresh:
            //refresh timeline

            return true;
        default :
            return super.onOptionsItemSelected(item);
    }
}
Run Code Online (Sandbox Code Playgroud)

android switch-statement android-actionbar

-1
推荐指数
1
解决办法
948
查看次数