小编Adr*_*eja的帖子

Android ADB没有看到设备

我正在尝试在OMEGA T107平板电脑上运行我的应用程序.但是adb看不到我的设备.我几乎尝试了一切.

android tablet adb

23
推荐指数
7
解决办法
10万
查看次数

ExpandableListView和复选框

我在Android中编写简单的过滤器,并希望使用ExpandableListAdapter复选框.

我没有创建列表或检查复选框的问题.但我真的不知道如何记住选择.关闭组并再次打开或当我尝试打开不同的组时,复选框是更改.

我试图在网上阅读,但我没有找到如何解决我的问题.

这是我的代码:

public class TasksFilterDialog extends Dialog{

private static final String TAG = "Filter Dialog";
private static final String ChildID = "ChildID";
private static final String GroupID = "GroupID";

private boolean[] statusCheck;

ExpandableListView list;
SimpleExpandableListAdapter listAdapter;

public TasksFilterDialog(Context context) {
    super(context);
    statusCheck = new boolean[Tasks.Status.values().length];
    for(int i=0; i<statusCheck.length; i++)
        statusCheck[i]=true;
}


@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "Creating dialog");
    this.setContentView(R.layout.tasks_filter);
    list = (ExpandableListView)findViewById(R.id.filter_list);
    setListAdapter();                       // Setting Adapter Values to use on list
    list.setAdapter(listAdapter);           // Setting …
Run Code Online (Sandbox Code Playgroud)

android

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

Qt QSignalMapper不起作用

我正在尝试使用QSignalMapper在点击时将信号发送器(QPushButton)发送到插槽.但它不起作用,我真的不知道为什么.

如果你知道一种不同的方法,那么告诉我会很高兴,但我真的想知道如何使用QSignalMapper,因为它将来会很有用.

moviebase.h

    #ifndef MOVIEBASE_H
    #define MOVIEBASE_H

    #include <QtGui/QMainWindow>
    #include <Qt\qsignalmapper.h>

    #include "ui_moviebase.h"
    #include "include\DBAdapter.h"
    #include "include\objView.h"

    class MovieBase : public QMainWindow
    {

        Q_OBJECT

    public:
        MovieBase(QWidget *parent = 0, Qt::WFlags flags = 0);
        ~MovieBase();

    private:

        Ui::MovieBaseClass ui;

        DBAdapter *db;
        DBAdapter::Type type;
        QPushButton *buttonChecked;
        QSignalMapper *pushButtonMapper;

        void setMainButtonsFunct();


    private slots:
        void button_pushed(const QPushButton &);

    };

    #endif // MOVIEBASE_H
Run Code Online (Sandbox Code Playgroud)

moviebase.cpp

#include "moviebase.h"

MovieBase::MovieBase(QWidget *parent, Qt::WFlags flags)
    : QMainWindow(parent, flags)
{
    ui.setupUi(this);
    db = new DBAdapter();

    this->type = DBAdapter::Movie;

    this->setMainButtonsFunct();

    ObjView *obj = …
Run Code Online (Sandbox Code Playgroud)

c++ qt

2
推荐指数
1
解决办法
1912
查看次数

EntityManager为null.不能注射

我正在尝试将我的项目与db连接.我有一个已经连接并在此数据库上运行的项目.我需要第二个并使用jms在它们之间进行通信.我配置secon连接到同一个数据库,它不工作.好的连接还可以.当我创建Entity类然后在db中我看到新表.很好.但我写的控制器应该注入实体管理器,它总是为空.我不知道为什么.这是我的配置.

@Configuration
@ComponentScan(basePackages = { "**.*****.**********" })
public class CalculationWorkerRootConfig {

    @Bean
    public static PropertyPlaceholderConfigurer propertyPlaceholderConfigurer() {
        PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
        ppc.setLocation(new ClassPathResource("/persistence.properties"));
        return ppc;
    }

} 
Run Code Online (Sandbox Code Playgroud)

这是经理配置器:

@Configuration
@EnableTransactionManagement
@EnableJpaRepositories
public class CalculationWorkerPersistenceConfig implements TransactionManagementConfigurer {

    @Value("${dataSource.driverClassName}")
    private String driver;
    @Value("${dataSource.url}")
    private String url;
    @Value("${dataSource.username}")
    private String username;
    @Value("${dataSource.password}")
    private String password;
    @Value("${hibernate.dialect}")
    private String dialect;
    @Value("${hibernate.hbm2ddl.auto}")
    private String hbm2ddlAuto;

@Bean
public DataSource configureDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName(driver);
    dataSource.setUrl(url);
    dataSource.setUsername(username);
    dataSource.setPassword(password);
    return dataSource;
}

@Bean …
Run Code Online (Sandbox Code Playgroud)

spring hibernate jpa entitymanager

0
推荐指数
1
解决办法
2290
查看次数

标签 统计

android ×2

adb ×1

c++ ×1

entitymanager ×1

hibernate ×1

jpa ×1

qt ×1

spring ×1

tablet ×1