问:
: Change to Statisticsdata_Dynamic_Consolidation script
Where should I put the following changes to my script :

Triggerdate should be yesterday date (if the script is running on jun 6th midnight, trigger date should be 2017-06-05)

Data should be calculated based on the difference in min of Jun 5th and max of Jun 5th.

This is my script:

```<code>BEGIN

    Declare MinID_ImeiNo int;
    Declare MaxID_ImeiNo int;
    Declare MinID_DynamicFields int;
    Declare MaxID_DynamicFields int;
    Declare Loop_ImeiNo int;
    Declare Loop_DynamicFields int;
    Declare Var_ImeiNo varchar(50);
    Declare Var_FieldName varchar(50);
    Declare DateVar_Previous    varchar(10);
    Declare MaxTriggerdate datetime;
    Declare CurrentValue  float;
    Declare ExistingValue float;
    Declare CurrentDay Datetime;
    Declare PreviousDay Datetime;
    Declare DateVar_Current varchar(10);
    Declare Table_String varchar(3000);
    Declare Value_String varchar(3000);
    Declare MaxTriggerdate_Previous datetime;
    Declare CurrentValue_Copy       int;

    Create TEMPORARY TABLE DynamicFields
    select FieldName from
    dynamictabledetail where CreateConsolidationTable = 1
    and ISOBSOLETE=0
    and TABLENAME = 'STATISTICAL';

    set CurrentDay = now();
    set PreviousDay = date_add(CurrentDay,INTERVAL -1 DAY);

    set Table_String = '';
    set Value_String ='';

    Create TEMPORARY TABLE ImeiNos
    select distinct fabNo from statistical where
    day(Triggerdate) = day(PreviousDay)
    and month(Triggerdate) = month(PreviousDay)
    and year(Triggerdate) = year(PreviousDay);

    alter TABLE DynamicFields  add IDVal int not null primary key auto_increment;

    alter TABLE ImeiNos  add IDVal int not null primary key auto_increment;

    set  MinID_ImeiNo = (select min(IDVal) from ImeiNos);
    set  MaxID_ImeiNo = (select max(IDVal) from ImeiNos);

    set MinID_DynamicFields =(select min(IDVal) from DynamicFields);
    set MaxID_DynamicFields =(select max(IDVal) from DynamicFields);

    set Loop_ImeiNo = MinID_ImeiNo;
    set Loop_DynamicFields = MinID_DynamicFields;
    set DateVar_Previous = (select substring(convert(PreviousDay,char),1,10));
    set DateVar_Current = (select substring(convert(CurrentDay,char),1,10));

    while (Loop_ImeiNo <= MaxID_ImeiNo) do

        set Var_ImeiNo = (select fabNo from  ImeiNos where IDVal = Loop_ImeiNo);
        set MaxTriggerdate  = (select max(Triggerdate) from statistical where fabNo = Var_ImeiNo and Day(Triggerdate) = Day(PreviousDay) and year(Triggerdate) = year(PreviousDay) and month(Triggerdate) = month(PreviousDay));
        set MaxTriggerdate_Previous = (select max(Triggerdate) from statistical where fabNo = Var_ImeiNo);
        set MaxTriggerdate = if(isnull(MaxTriggerdate) = 1,MaxTriggerdate_Previous,MaxTriggerdate);

        while (Loop_DynamicFields <= MaxID_DynamicFields) do
            set Var_FieldName = (select     FieldName from DynamicFields where IDVal = Loop_DynamicFields);
            set ExistingValue = 0;

            set @Query_Var = concat(' set @CurrentValue =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical_consolidation where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ' and day(Triggerdate) = day('  );
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ') and month(Triggerdate) = month(');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ') and year(Triggerdate) = year(');
            set @Query_Var = concat(@Query_Var,'''');

            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var,'))');

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

            set @Query_Var = concat(' set @CurrentValue_Existing =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, '  and ');
            set @Query_Var = concat(@Query_Var, Var_FieldName);
            set @Query_Var = concat(@Query_Var, ' is not null ');
            set @Query_Var =concat(@Query_Var, ' and day(triggerdate) < ');
            set @Query_Var =concat(@Query_Var, day(MaxTriggerdate));
            set @Query_Var =concat(@Query_Var,' and month(triggerdate) <=');
            set @Query_Var =concat(@Query_Var, month(MaxTriggerdate));
            set @Query_Var =concat(@Query_Var,' and year(triggerdate) <=');
            set @Query_Var =concat(@Query_Var, year(MaxTriggerdate));
            set @Query_Var = concat(@Query_Var, ' order by Triggerdate desc  limit 1 );' );

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

          set @CurrentValue_Existing =  if(isnull(@CurrentValue_Existing = 1),0,@CurrentValue_Existing);

            set ExistingValue = if(isnull(@CurrentValue) = 1,@CurrentValue_Existing,@CurrentValue);

            set @Query_Var = concat('set @CurrentValue =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ' and Triggerdate = ' );
            set @Query_Var = concat(@Query_Var, '''');
            set @Query_Var = concat(@Query_Var, MaxTriggerdate);
            set @Query_Var = concat(@Query_Var, '''');
            set @Query_Var = concat(@Query_Var, ')');

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

            set CurrentValue_Copy =  if(isnull(@CurrentValue = 1),0,@CurrentValue);
            set CurrentValue_Copy =  abs(ExistingValue - CurrentValue_Copy);

            set Table_String =  if(isnull(@CurrentValue = 1),Table_String,concat(Table_String,Var_FieldName));
            set Table_String =  if(isnull(@CurrentValue = 1),Table_String,concat(Table_String,','));

            set Value_String = if(isnull(@CurrentValue = 1),Value_String,concat(Value_String,CurrentValue_Copy));
            set Value_String = if(isnull(@CurrentValue = 1),Value_String,concat(Value_String,','));

            set @Query_Var ='';
            set Loop_DynamicFields = Loop_DynamicFields + 1;

        end while ;

            set Table_String = concat(Table_String,'fabNo');
            set Table_String = concat(Table_String,',');
            set Table_String = concat(Table_String,'TriggerDate');

           set Value_String  = concat(Value_String,'''');
            set Value_String  = concat(Value_String,Var_ImeiNo);
            set Value_String  = concat(Value_String,'''');
            set Value_String  = concat(Value_String,',');
            set Value_String  = concat(Value_String,'''');
            set Value_String = concat(Value_String,DateVar_Current );
            set Value_String = concat(Value_String,'''');

            set @Query_Var  = 'Insert statistical_consolidation(';
            set @Query_Var  = concat(@Query_Var,Table_String);
            set @Query_Var   = concat( @Query_Var,') Values(');
            set @Query_Var   = concat( @Query_Var,Value_String);
            set @Query_Var   = concat( @Query_Var,')');

            set @Query_Var = if (Table_String = 'Imei,TriggerDate',' set @CurrentValue = (select 1 from statistical limit 1) ', @Query_Var);

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

        set Loop_ImeiNo = Loop_ImeiNo + 1;

        set Loop_DynamicFields = MinID_DynamicFields;

        set Table_String = '';
        set Value_String = '';
    end while ;

    drop TEMPORARY TABLE DynamicFields;
    drop TEMPORARY TABLE ImeiNos;

END
</code>```

Thanks

答:
As per Sql Server.. Try:

for First Question:

```<code>Select Convert(varchar(10), DATEADD(month, -1, GETDATE()), 120)
</code>```

120 at the last is the date format in following sequence: yyyy-MM-dd

To only get the Date, you can change the size of varchar in Convert function with a different format, such as:

```<code>Select Convert(varchar(2), DATEADD(month, -1, GETDATE()), 101)
</code>```

above Conversion will return only Month. For other formats, visit
Date Time Formats.

For Second Question:

In your case:
    Select DATEDIFF(hour, @startDateTime, @endDateTime)

hour represents the period of measure you want to return

For Detail information about DateDiff See this: Detailed Answer for DATEDIFF

Body:
Where should I put the following changes to my script :

Triggerdate should be yesterday date (if the script is running on jun 6th midnight, trigger date should be 2017-06-05)

Data should be calculated based on the difference in min of Jun 5th and max of Jun 5th.

This is my script:

BEGIN

    Declare MinID_ImeiNo int;
    Declare MaxID_ImeiNo int;
    Declare MinID_DynamicFields int;
    Declare MaxID_DynamicFields int;
    Declare Loop_ImeiNo int;
    Declare Loop_DynamicFields int;
    Declare Var_ImeiNo varchar(50);
    Declare Var_FieldName varchar(50);
    Declare DateVar_Previous    varchar(10);
    Declare MaxTriggerdate datetime;
    Declare CurrentValue  float;
    Declare ExistingValue float;
    Declare CurrentDay Datetime;
    Declare PreviousDay Datetime;
    Declare DateVar_Current varchar(10);
    Declare Table_String varchar(3000);
    Declare Value_String varchar(3000);
    Declare MaxTriggerdate_Previous datetime;
    Declare CurrentValue_Copy       int;

    Create TEMPORARY TABLE DynamicFields
    select FieldName from
    dynamictabledetail where CreateConsolidationTable = 1
    and ISOBSOLETE=0
    and TABLENAME = 'STATISTICAL';

    set CurrentDay = now();
    set PreviousDay = date_add(CurrentDay,INTERVAL -1 DAY);

    set Table_String = '';
    set Value_String ='';

    Create TEMPORARY TABLE ImeiNos
    select distinct fabNo from statistical where
    day(Triggerdate) = day(PreviousDay)
    and month(Triggerdate) = month(PreviousDay)
    and year(Triggerdate) = year(PreviousDay);

    alter TABLE DynamicFields  add IDVal int not null primary key auto_increment;

    alter TABLE ImeiNos  add IDVal int not null primary key auto_increment;

    set  MinID_ImeiNo = (select min(IDVal) from ImeiNos);
    set  MaxID_ImeiNo = (select max(IDVal) from ImeiNos);

    set MinID_DynamicFields =(select min(IDVal) from DynamicFields);
    set MaxID_DynamicFields =(select max(IDVal) from DynamicFields);

    set Loop_ImeiNo = MinID_ImeiNo;
    set Loop_DynamicFields = MinID_DynamicFields;
    set DateVar_Previous = (select substring(convert(PreviousDay,char),1,10));
    set DateVar_Current = (select substring(convert(CurrentDay,char),1,10));

    while (Loop_ImeiNo <= MaxID_ImeiNo) do

        set Var_ImeiNo = (select fabNo from  ImeiNos where IDVal = Loop_ImeiNo);
        set MaxTriggerdate  = (select max(Triggerdate) from statistical where fabNo = Var_ImeiNo and Day(Triggerdate) = Day(PreviousDay) and year(Triggerdate) = year(PreviousDay) and month(Triggerdate) = month(PreviousDay));
        set MaxTriggerdate_Previous = (select max(Triggerdate) from statistical where fabNo = Var_ImeiNo);
        set MaxTriggerdate = if(isnull(MaxTriggerdate) = 1,MaxTriggerdate_Previous,MaxTriggerdate);

        while (Loop_DynamicFields <= MaxID_DynamicFields) do
            set Var_FieldName = (select     FieldName from DynamicFields where IDVal = Loop_DynamicFields);
            set ExistingValue = 0;

            set @Query_Var = concat(' set @CurrentValue =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical_consolidation where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ' and day(Triggerdate) = day('  );
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ') and month(Triggerdate) = month(');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ') and year(Triggerdate) = year(');
            set @Query_Var = concat(@Query_Var,'''');

            set @Query_Var = concat(@Query_Var, DateVar_Previous);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var,'))');

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

            set @Query_Var = concat(' set @CurrentValue_Existing =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, '  and ');
            set @Query_Var = concat(@Query_Var, Var_FieldName);
            set @Query_Var = concat(@Query_Var, ' is not null ');
            set @Query_Var =concat(@Query_Var, ' and day(triggerdate) < ');
            set @Query_Var =concat(@Query_Var, day(MaxTriggerdate));
            set @Query_Var =concat(@Query_Var,' and month(triggerdate) <=');
            set @Query_Var =concat(@Query_Var, month(MaxTriggerdate));
            set @Query_Var =concat(@Query_Var,' and year(triggerdate) <=');
            set @Query_Var =concat(@Query_Var, year(MaxTriggerdate));
            set @Query_Var = concat(@Query_Var, ' order by Triggerdate desc  limit 1 );' );

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

          set @CurrentValue_Existing =  if(isnull(@CurrentValue_Existing = 1),0,@CurrentValue_Existing);

            set ExistingValue = if(isnull(@CurrentValue) = 1,@CurrentValue_Existing,@CurrentValue);

            set @Query_Var = concat('set @CurrentValue =(select ', Var_FieldName);
            set @Query_Var = concat(@Query_Var,' from statistical where fabNo = ');
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, Var_ImeiNo);
            set @Query_Var = concat(@Query_Var,'''');
            set @Query_Var = concat(@Query_Var, ' and Triggerdate = ' );
            set @Query_Var = concat(@Query_Var, '''');
            set @Query_Var = concat(@Query_Var, MaxTriggerdate);
            set @Query_Var = concat(@Query_Var, '''');
            set @Query_Var = concat(@Query_Var, ')');

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

            set CurrentValue_Copy =  if(isnull(@CurrentValue = 1),0,@CurrentValue);
            set CurrentValue_Copy =  abs(ExistingValue - CurrentValue_Copy);

            set Table_String =  if(isnull(@CurrentValue = 1),Table_String,concat(Table_String,Var_FieldName));
            set Table_String =  if(isnull(@CurrentValue = 1),Table_String,concat(Table_String,','));

            set Value_String = if(isnull(@CurrentValue = 1),Value_String,concat(Value_String,CurrentValue_Copy));
            set Value_String = if(isnull(@CurrentValue = 1),Value_String,concat(Value_String,','));

            set @Query_Var ='';
            set Loop_DynamicFields = Loop_DynamicFields + 1;

        end while ;

            set Table_String = concat(Table_String,'fabNo');
            set Table_String = concat(Table_String,',');
            set Table_String = concat(Table_String,'TriggerDate');

           set Value_String  = concat(Value_String,'''');
            set Value_String  = concat(Value_String,Var_ImeiNo);
            set Value_String  = concat(Value_String,'''');
            set Value_String  = concat(Value_String,',');
            set Value_String  = concat(Value_String,'''');
            set Value_String = concat(Value_String,DateVar_Current );
            set Value_String = concat(Value_String,'''');

            set @Query_Var  = 'Insert statistical_consolidation(';
            set @Query_Var  = concat(@Query_Var,Table_String);
            set @Query_Var   = concat( @Query_Var,') Values(');
            set @Query_Var   = concat( @Query_Var,Value_String);
            set @Query_Var   = concat( @Query_Var,')');

            set @Query_Var = if (Table_String = 'Imei,TriggerDate',' set @CurrentValue = (select 1 from statistical limit 1) ', @Query_Var);

            prepare Stmt1 from @Query_Var;
            execute Stmt1 ;

        set Loop_ImeiNo = Loop_ImeiNo + 1;

        set Loop_DynamicFields = MinID_DynamicFields;

        set Table_String = '';
        set Value_String = '';
    end while ;

    drop TEMPORARY TABLE DynamicFields;
    drop TEMPORARY TABLE ImeiNos;

END

Thanks

Body:
As per Sql Server.. Try:

for First Question:

Select Convert(varchar(10), DATEADD(month, -1, GETDATE()), 120)

120 at the last is the date format in following sequence: yyyy-MM-dd

To only get the Date, you can change the size of varchar in Convert function with a different format, such as:

Select Convert(varchar(2), DATEADD(month, -1, GETDATE()), 101)

above Conversion will return only Month. For other formats, visit
Date Time Formats.

For Second Question:

In your case:
    Select DATEDIFF(hour, @startDateTime, @endDateTime)

hour represents the period of measure you want to return

For Detail information about DateDiff See this: Detailed Answer for DATEDIFF


来源: stackexchange

问:
Google play shows 0 device supported for published app
I don't get the solution of this problem i have tested my code on devices with API level range between 19-25 and my code work well on every device than what make my app 0 supported device on play store?? i talk about it to google also they said something wrong with your manifest file and said :

So for example with Nexus 7, the reason why it's not compatible is because of the following reason.
Unsupported framework version:
17
No supported native platform:
armeabi, armeabi-v7a

i still don't get the actual problem behind that please some body help me!!

here below is my manifest file content

```<code><manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my package name">
 <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" android:required="false"/>

    <uses-feature android:name="android.hardware.screen.Portrait" android:required="false" />
    <uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="25" />
 <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>
 <application
        android:name="ABC"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name="SomeActivity"
            android:screenOrientation="sensorPortrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        ......
 </application>
</manifest >
</code>```

here below is my gradle file content:

```<code>uildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId "my package name"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 5
        versionName "1.3"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.0'
    //---------for retrofit----------
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
    compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
    //---------
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:design:25.0.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    testCompile 'junit:junit:4.12'
    //------------- for auto sliding
    compile group: 'com.nineoldandroids', name: 'library', version: '2.4.0'

    //----- staggered gridview
    compile 'com.android.support:cardview-v7:25.0.0'
    //-----for zooming
    //compile 'com.github.chrisbanes:PhotoView:1.3.0'

    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }
    compile project(':photoview')

}
</code>```

答:
I think it should be "p"ortrait instead of "P"ortrait

```<code><uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
</code>```

Look at this link

I set uses-feature android:required="false" but Google play keeps insisting on these features

ContentLicense: CC BY-SA 3.0

Body:
I don't get the solution of this problem i have tested my code on devices with API level range between 19-25 and my code work well on every device than what make my app 0 supported device on play store?? i talk about it to google also they said something wrong with your manifest file and said :

So for example with Nexus 7, the reason why it's not compatible is because of the following reason.
Unsupported framework version:
17
No supported native platform:
armeabi, armeabi-v7a

i still don't get the actual problem behind that please some body help me!!

here below is my manifest file content

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my package name">
 <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" android:required="false"/>

    <uses-feature android:name="android.hardware.screen.Portrait" android:required="false" />
    <uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="25" />
 <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>
 <application
        android:name="ABC"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name="SomeActivity"
            android:screenOrientation="sensorPortrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        ......
 </application>
</manifest >

here below is my gradle file content:

uildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.3'
    defaultConfig {
        applicationId "my package name"
        minSdkVersion 19
        targetSdkVersion 25
        versionCode 5
        versionName "1.3"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.0'
    //---------for retrofit----------
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
    compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
    //---------
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:design:25.0.0'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    testCompile 'junit:junit:4.12'
    //------------- for auto sliding
    compile group: 'com.nineoldandroids', name: 'library', version: '2.4.0'

    //----- staggered gridview
    compile 'com.android.support:cardview-v7:25.0.0'
    //-----for zooming
    //compile 'com.github.chrisbanes:PhotoView:1.3.0'

    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }
    compile project(':photoview')

}

Body:
I think it should be "p"ortrait instead of "P"ortrait

<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />

Look at this link

I set uses-feature android:required="false" but Google play keeps insisting on these features


问:
Is there something like a jasmine `toNotContain` acceptance criteria for tests?
Jasmin comes with many functions for checking the expected values for validating specifications and tests.

Is there besides

```<code>getJasmineRequireObj().toContain = function() { ... };
</code>```

somthing like a

```<code>getJasmineRequireObj().toNotContain = function() { ... };
</code>```

?

If not, how to add an extension or plugin to deliver this feature also
  to our community of developers?

答:
Check below code which will be hwlpful, also documentation
 here https://jasmine.github.io/2.0/introduction.html</p>

```<code>it("also works for finding a substring", function() {
  var a = "foo bar baz";

  expect(a).toContain("bar");
  expect(a).not.toContain("quux");
});
</code>```

Body:
Jasmin comes with many functions for checking the expected values for validating specifications and tests.

Is there besides

getJasmineRequireObj().toContain = function() { ... };

somthing like a

getJasmineRequireObj().toNotContain = function() { ... };

?

If not, how to add an extension or plugin to deliver this feature also
  to our community of developers?

Body:
Check below code which will be hwlpful, also documentation
 here https://jasmine.github.io/2.0/introduction.html

it("also works for finding a substring", function() {
  var a = "foo bar baz";

  expect(a).toContain("bar");
  expect(a).not.toContain("quux");
});


问:
How do I list all tables in all databases in SQL Server in a single result set?
I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is that I would like a single result set. This precludes the otherwise excellent answer from Pinal Dave:

```<code>sp_msforeachdb 'select "?" AS db, * from [?].sys.tables'
</code>```

The above stored proc generates one result set per database, which is fine if you are in an IDE like SSMS that can display multiple result sets. However, I want a single result set because I want a query that is essentially a "find" tool: if I add a clause like WHERE tablename like '%accounts' then it would tell me where to find my BillAccounts, ClientAccounts, and VendorAccounts tables regardless of which database they reside in.

2010.05.20 Update, about 20 minutes later...

So far, Remus' answer looks most interesting. Rather than post this as an answer and award it to myself, I am posting a version of it here that I have modified to include the DB name and a sample filter clause. It is looking like Remus will get the credit for the answer, though, at this point!

```<code>declare @sql nvarchar(max);
set @sql = N'select b.name as "DB", a.name collate Latin1_General_CI_AI as "Table", object_id, schema_id, cast(1 as int) as database_id  from master.sys.tables a join sys.databases b on database_id=1 where a.name like ''account%''';

select @sql = @sql + N' union all select b.name as "DB", a.name collate Latin1_General_CI_AI, object_id, schema_id, ' + cast(database_id as nvarchar(10)) + N' from ' + quotename(name) + N'.sys.tables a join sys.databases b on database_id=' + cast(database_id as nvarchar(10)) + 'where a.name like ''account%'''
from sys.databases where database_id > 1

and state = 0
and user_access = 0;

exec sp_executesql @sql;
</code>```

2010.05.24 Update -- New Front runner!

The feedback and answers have been great. Continued collaborative participation has led to a new frontrunner: KM's answer from May 21!

Here are the issues I uncovered with Remus' solution:

Major issue: Users have different permissions which leads the query to succeed based on the data (i.e. the filtering value). Run on my production database with no filtering (i.e. omitting the WHERE clause) I received this error on several DBs that I do not have permission to access:

The server principal "msorens" is not able to access the database
"ETLprocDB" under the current security context.

The query will succeed with some filtering clauses--those that do not touch the DBs outside my access level.

Minor issue: Not easily degradable to SQL Server 2000 support (yes, there are still some of us out there using it...) because it builds a single string while accumulating entries for each database. With my system, I surpassed the 8000-character mark at around 40 databases.

Minor issue: Duplicate code--the loop setup essentially duplicates the loop body. I understand the rationale but it is just a pet peeve of mine...

KM's answer is not afflicted by these issues. The stored proc sp_msforeachdb takes into account the user's permissions so it avoids permission problems. I have not yet tried the code with SS2000 but KM indicates the adjustments that should do it.

I am posting next my modifications to KM's answer based on my personal preferences. Specifically:

I have removed the server name as it does not really add anything in the result set.

I have split the name components into their own fields in the result set (db name, schema name, and table name).

I have introduced separate filters for each of the three fields.

I have added sorting by the three fields (which can be modified to your preferences).

Here is my modification to KM's code (with a sample filter applied just to the table name):

```<code>SET NOCOUNT ON
DECLARE @AllTables table (DbName sysname,SchemaName sysname, TableName sysname)
DECLARE
     @SearchDb nvarchar(200)
    ,@SearchSchema nvarchar(200)
    ,@SearchTable nvarchar(200)
    ,@SQL nvarchar(4000)
SET @SearchDb='%'
SET @SearchSchema='%'
SET @SearchTable='%Account%'
SET @SQL='select ''?'' as DbName, s.name as SchemaName, t.name as TableName from [?].sys.tables t inner join [?].sys.schemas s on t.schema_id=s.schema_id WHERE ''?'' LIKE '''+@SearchDb+''' AND s.name LIKE '''+@SearchSchema+''' AND t.name LIKE '''+@SearchTable+''''

INSERT INTO @AllTables (DbName, SchemaName, TableName)
    EXEC sp_msforeachdb @SQL
SET NOCOUNT OFF
SELECT * FROM @AllTables ORDER BY DbName, SchemaName, TableName
</code>```

答:
I quite like using INFORMATION_SCHEMA for this as I get the DB name for free.  That and - realising from @KM post that multiple results sets insert nicely - I came up with:</p>

```<code>select top 0 *
    into #temp
    from INFORMATION_SCHEMA.TABLES

insert into #temp
    exec sp_msforeachdb 'select * from [?].INFORMATION_SCHEMA.TABLES'

select * from #temp

drop table #temp
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is that I would like a single result set. This precludes the otherwise excellent answer from Pinal Dave:

sp_msforeachdb 'select "?" AS db, * from [?].sys.tables'

The above stored proc generates one result set per database, which is fine if you are in an IDE like SSMS that can display multiple result sets. However, I want a single result set because I want a query that is essentially a "find" tool: if I add a clause like WHERE tablename like '%accounts' then it would tell me where to find my BillAccounts, ClientAccounts, and VendorAccounts tables regardless of which database they reside in.

2010.05.20 Update, about 20 minutes later...

So far, Remus' answer looks most interesting. Rather than post this as an answer and award it to myself, I am posting a version of it here that I have modified to include the DB name and a sample filter clause. It is looking like Remus will get the credit for the answer, though, at this point!

declare @sql nvarchar(max);
set @sql = N'select b.name as "DB", a.name collate Latin1_General_CI_AI as "Table", object_id, schema_id, cast(1 as int) as database_id  from master.sys.tables a join sys.databases b on database_id=1 where a.name like ''account%''';

select @sql = @sql + N' union all select b.name as "DB", a.name collate Latin1_General_CI_AI, object_id, schema_id, ' + cast(database_id as nvarchar(10)) + N' from ' + quotename(name) + N'.sys.tables a join sys.databases b on database_id=' + cast(database_id as nvarchar(10)) + 'where a.name like ''account%'''
from sys.databases where database_id > 1

and state = 0
and user_access = 0;

exec sp_executesql @sql;

2010.05.24 Update -- New Front runner!

The feedback and answers have been great. Continued collaborative participation has led to a new frontrunner: KM's answer from May 21!

Here are the issues I uncovered with Remus' solution:

Major issue: Users have different permissions which leads the query to succeed based on the data (i.e. the filtering value). Run on my production database with no filtering (i.e. omitting the WHERE clause) I received this error on several DBs that I do not have permission to access:

The server principal "msorens" is not able to access the database
"ETLprocDB" under the current security context.

The query will succeed with some filtering clauses--those that do not touch the DBs outside my access level.

Minor issue: Not easily degradable to SQL Server 2000 support (yes, there are still some of us out there using it...) because it builds a single string while accumulating entries for each database. With my system, I surpassed the 8000-character mark at around 40 databases.

Minor issue: Duplicate code--the loop setup essentially duplicates the loop body. I understand the rationale but it is just a pet peeve of mine...

KM's answer is not afflicted by these issues. The stored proc sp_msforeachdb takes into account the user's permissions so it avoids permission problems. I have not yet tried the code with SS2000 but KM indicates the adjustments that should do it.

I am posting next my modifications to KM's answer based on my personal preferences. Specifically:

I have removed the server name as it does not really add anything in the result set.

I have split the name components into their own fields in the result set (db name, schema name, and table name).

I have introduced separate filters for each of the three fields.

I have added sorting by the three fields (which can be modified to your preferences).

Here is my modification to KM's code (with a sample filter applied just to the table name):

SET NOCOUNT ON
DECLARE @AllTables table (DbName sysname,SchemaName sysname, TableName sysname)
DECLARE
     @SearchDb nvarchar(200)
    ,@SearchSchema nvarchar(200)
    ,@SearchTable nvarchar(200)
    ,@SQL nvarchar(4000)
SET @SearchDb='%'
SET @SearchSchema='%'
SET @SearchTable='%Account%'
SET @SQL='select ''?'' as DbName, s.name as SchemaName, t.name as TableName from [?].sys.tables t inner join [?].sys.schemas s on t.schema_id=s.schema_id WHERE ''?'' LIKE '''+@SearchDb+''' AND s.name LIKE '''+@SearchSchema+''' AND t.name LIKE '''+@SearchTable+''''

INSERT INTO @AllTables (DbName, SchemaName, TableName)
    EXEC sp_msforeachdb @SQL
SET NOCOUNT OFF
SELECT * FROM @AllTables ORDER BY DbName, SchemaName, TableName

Body:
I quite like using INFORMATION_SCHEMA for this as I get the DB name for free.  That and - realising from @KM post that multiple results sets insert nicely - I came up with:

select top 0 *
    into #temp
    from INFORMATION_SCHEMA.TABLES

insert into #temp
    exec sp_msforeachdb 'select * from [?].INFORMATION_SCHEMA.TABLES'

select * from #temp

drop table #temp


问:
div grid tab not in content
I use a php function to put my page content in the index.php, but when I use a grid (tab) in the content it goes out of the content borders.

I put a little bit of the code underneath, you can see the site here: (link deleted > problem solved)

答:
Non floated elements only takes height of their non-floated child or content.

Examples

Situation 1: Non floated parent and non-floated child. The parent element will take full height of it's child.

div{
  border:1px solid;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div></code>```

Situation 2: Non floated parent and but floated child. Again the parent element is only taking height of not-floated child element(s) because the floating elements does not affect the size of the parent element.

div{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div></code>```

Situation 3: Floated parent and floated child. Now this situation is actually a solution of the 2nd Situation, but this situation/solution is not best practice, Especially when you want parent to be centered align of it's parent.

Now why this situation is working? because floated elements will expand to contain it's floated child elements.

div{
  border:1px solid;
  float:left;
}
.float{
  float:left;
  width:50%;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="parent">
  <p  class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div></code>```

Now how we can solve 2nd situation without using 3rd situation. The answer is The clear CSS property.

The clear CSS property specifies whether an element can be next to
  floating elements that precede it or must be moved down (cleared)
  below them. The clear property applies to both floating and
  non-floating elements.

MDN

Now How we can use clear?

The stone age solution, put an element at the bottom of parent element and give it clearfix. This is a good solution but every time you have to add an extra element. Worthless when you cannot edit your dynamic HTML.

div.parent{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <div style="clear:both"></div>
</div></code>```

Now you don't want to add an extra element then let css3 do this job for you, create and element at the bottom of parent with pseudo:after element then assign it a job to clear floated elements.

```<code>.clearfix:after {
  content: "";
  display: table;
  clear: both;
}
</code>```

div.parent{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}
.clearfix:after {
  content: "";
  display: table;
  clear: both;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class="parent clearfix">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

</div></code>```

Sources

Clear CSS property

What is a Clearfix

Title: div grid tab not in content

Body:
Non floated elements only takes height of their non-floated child or content.

Examples

Situation 1: Non floated parent and non-floated child. The parent element will take full height of it's child.

div{
  border:1px solid;
}

<div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div>

Situation 2: Non floated parent and but floated child. Again the parent element is only taking height of not-floated child element(s) because the floating elements does not affect the size of the parent element.

div{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}

<div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div>

Situation 3: Floated parent and floated child. Now this situation is actually a solution of the 2nd Situation, but this situation/solution is not best practice, Especially when you want parent to be centered align of it's parent.

Now why this situation is working? because floated elements will expand to contain it's floated child elements.

div{
  border:1px solid;
  float:left;
}
.float{
  float:left;
  width:50%;
}

<div class="parent">
  <p  class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>
</div>

Now how we can solve 2nd situation without using 3rd situation. The answer is The clear CSS property.

The clear CSS property specifies whether an element can be next to
  floating elements that precede it or must be moved down (cleared)
  below them. The clear property applies to both floating and
  non-floating elements.

MDN

Now How we can use clear?

The stone age solution, put an element at the bottom of parent element and give it clearfix. This is a good solution but every time you have to add an extra element. Worthless when you cannot edit your dynamic HTML.

div.parent{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}

<div class="parent">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <div style="clear:both"></div>
</div>

Now you don't want to add an extra element then let css3 do this job for you, create and element at the bottom of parent with pseudo:after element then assign it a job to clear floated elements.

.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

div.parent{
  border:1px solid;
}
.float{
  float:left;
  width:50%;
}
.clearfix:after {
  content: "";
  display: table;
  clear: both;
}

<div class="parent clearfix">
  <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

  <p class=float>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis magnam, soluta nihil libero sapiente, ullam omnis ipsa adipisci, mollitia vero ea iste nam doloribus iusto voluptatum itaque, dicta fuga assumenda.</p>

</div>

Sources

Clear CSS property

What is a Clearfix


问:
Adding a header to a CSV file program using C#
```<code> InitializeComponent();

 conDB = new csvfile();
 conDB.Path = "E:\\BR_AttendanceDownloadLogs" +
 DateTime.Today.ToString("yyyyMMdd") + ".csv";

 fillCombo();
</code>```

As beginner of programming and a very first time doing CRUD to a csv file in c#. I refer to this link:https://social.msdn.microsoft.com/Forums/en-US/27a98772-2dc6-4197-9f75-6cc119d4a88a/how-to-edit-a-line-from-a-text-file-using-c?forum=Vsexpressvcs that I've been located my source and useful to my program. But it was not satisfy to my specific satisfaction. I want to add header from it. Yes, I successfully added a header using this code.

```<code>   String newFileName = "E:\\BR_AttendanceDownloadLogs" +
   DateTime.Today.ToString("yyyyMMdd") + ".csv";

        string clientHeader = "\"EmployeeCode\"" + ",\"" + "Date" + "\",\""+
        "Time" + "\",\"" + "Type" + "\",\"" + "Remarks" + "\"" +
        Environment.NewLine;

        File.WriteAllText(newFileName, clientHeader);

        conDB.InsertEntrie(txtidno.Text, DatePicker.Text, TimePicker.Text,
        cmbtype.Text, txtremarks.Text);
            //txtID.Text = Convert.ToString(conDB.Entries()-1);
            txtvalue = Convert.ToString(conDB.Entries() - 1);

        fillCombo();
        txtidno.Text = "";
        DatePicker.Text = "";
        TimePicker.Text = "";
        cmbtype.Text = "";
        txtremarks.Text = "";
</code>```

But after successfully added my header like this:
"EmployeeCode","Date","Time","Type","Remarks"
The flow of codes are infected by this type of field in the header. Note! I change the format just like what my header form. The rest of my function that reading the line in csv file is affected by my header.It return to undesirable error. Hope that anyone can rescue me to my Island of error.

答:
You can substitute all that StreamWriter code with a more concise File.AppendAllText and replace your string concatenations with an interpolated string.

These changes will result in a more clean InsertEntry method

```<code>public bool InsertEntry(string idnumber, string date, string time, string type, string remarks)
{
    try
    {
        string line = $"\"{idnumber}\",\"{date}\",\"{time}\",\"{type}\",\"{remarks}\"{Environment.NewLine}";
        File.AppendAllText(data_path, line);
        return true;
    }
    catch (Exception ee)
    {
        string temp = ee.Message;
        return false;
    }
}
</code>```

Of course, the button1 click should write the header just one time, not everytime it is clicked. To avoid this from happening you need to check if the file exists or not before writing the header.

```<code>String newFileName = @"E:\BR_AttendanceDownloadLogs" +
                     DateTime.Today.ToString("yyyyMMdd") + ".csv");
if(!File.Exists(newFileName))
{
    string clientHeader = $"\"EmployeeCode\",\"Date\",\"Time\",\"Type\",\"Remarks\"{Environment.NewLine}";
    File.WriteAllText(newFileName, clientHeader);
}
</code>```

Body:
 InitializeComponent();

 conDB = new csvfile();
 conDB.Path = "E:\\BR_AttendanceDownloadLogs" +
 DateTime.Today.ToString("yyyyMMdd") + ".csv";

 fillCombo();

As beginner of programming and a very first time doing CRUD to a csv file in c#. I refer to this link:https://social.msdn.microsoft.com/Forums/en-US/27a98772-2dc6-4197-9f75-6cc119d4a88a/how-to-edit-a-line-from-a-text-file-using-c?forum=Vsexpressvcs that I've been located my source and useful to my program. But it was not satisfy to my specific satisfaction. I want to add header from it. Yes, I successfully added a header using this code.

   String newFileName = "E:\\BR_AttendanceDownloadLogs" +
   DateTime.Today.ToString("yyyyMMdd") + ".csv";

        string clientHeader = "\"EmployeeCode\"" + ",\"" + "Date" + "\",\""+
        "Time" + "\",\"" + "Type" + "\",\"" + "Remarks" + "\"" +
        Environment.NewLine;

        File.WriteAllText(newFileName, clientHeader);

        conDB.InsertEntrie(txtidno.Text, DatePicker.Text, TimePicker.Text,
        cmbtype.Text, txtremarks.Text);
            //txtID.Text = Convert.ToString(conDB.Entries()-1);
            txtvalue = Convert.ToString(conDB.Entries() - 1);

        fillCombo();
        txtidno.Text = "";
        DatePicker.Text = "";
        TimePicker.Text = "";
        cmbtype.Text = "";
        txtremarks.Text = "";

But after successfully added my header like this:
"EmployeeCode","Date","Time","Type","Remarks"
The flow of codes are infected by this type of field in the header. Note! I change the format just like what my header form. The rest of my function that reading the line in csv file is affected by my header.It return to undesirable error. Hope that anyone can rescue me to my Island of error.

Body:
You can substitute all that StreamWriter code with a more concise File.AppendAllText and replace your string concatenations with an interpolated string.

These changes will result in a more clean InsertEntry method

public bool InsertEntry(string idnumber, string date, string time, string type, string remarks)
{
    try
    {
        string line = $"\"{idnumber}\",\"{date}\",\"{time}\",\"{type}\",\"{remarks}\"{Environment.NewLine}";
        File.AppendAllText(data_path, line);
        return true;
    }
    catch (Exception ee)
    {
        string temp = ee.Message;
        return false;
    }
}

Of course, the button1 click should write the header just one time, not everytime it is clicked. To avoid this from happening you need to check if the file exists or not before writing the header.

String newFileName = @"E:\BR_AttendanceDownloadLogs" +
                     DateTime.Today.ToString("yyyyMMdd") + ".csv");
if(!File.Exists(newFileName))
{
    string clientHeader = $"\"EmployeeCode\",\"Date\",\"Time\",\"Type\",\"Remarks\"{Environment.NewLine}";
    File.WriteAllText(newFileName, clientHeader);
}


问:
On Click Listeners in Fragments
I created a method that I was going to link to a Button on my Fragment.

For some reason when I put the method in the Fragment and go to the layout file for the fragment, the button's on click property doesn't seem to recognize the method. When I put the identical method within the main Activity it seems to recognize the method just fine, but I want to have this method exist within my Fragment.

Does anyone know how I can fix this while still having the method exist in my Fragment?

```<code>public void onClicFragment(View v)
{

}
</code>```

答:
If your Button is in your Fragment, you just simply have to add an OnClickListener to it (in onCreateView() for example):

```<code>@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.some_layout, parent, false);
    Button button = (Button) view.findViewById(R.id.some_button);

    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // ...
        }
    });

    return view;
}
</code>```

Otherwise, you could define the onClick method in your Activity and call the appropriate method of your Fragment from there:

```<code>public class MainActivity extends AppCompatActivity {

    // ...

    public void onClickFragment(View v) {
        SomeFragment f = (SomeFragment) getFragmentManager().findFragmentByTag("SOME_TAG");
        if (f != null) {
            f.someMethod();
        }
    }
}
</code>```

Title: On Click Listeners in Fragments

Body:
I created a method that I was going to link to a Button on my Fragment.

For some reason when I put the method in the Fragment and go to the layout file for the fragment, the button's on click property doesn't seem to recognize the method. When I put the identical method within the main Activity it seems to recognize the method just fine, but I want to have this method exist within my Fragment.

Does anyone know how I can fix this while still having the method exist in my Fragment?

public void onClicFragment(View v)
{

}

Body:
If your Button is in your Fragment, you just simply have to add an OnClickListener to it (in onCreateView() for example):

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.some_layout, parent, false);
    Button button = (Button) view.findViewById(R.id.some_button);

    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            // ...
        }
    });

    return view;
}

Otherwise, you could define the onClick method in your Activity and call the appropriate method of your Fragment from there:

public class MainActivity extends AppCompatActivity {

    // ...

    public void onClickFragment(View v) {
        SomeFragment f = (SomeFragment) getFragmentManager().findFragmentByTag("SOME_TAG");
        if (f != null) {
            f.someMethod();
        }
    }
}


问:
The prefix "context" for element "context:component-scan" is not bound
I am working on spring3 mvc and came up with this error

org.xml.sax.SAXParseException: The prefix "context" for element "context:component-scan" is not bound.

Here is my dispatcher servlet

```<code><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <mvc:annotation-driven />

    <context:component-scan base-package="com.web" />
</code>```

答:
Add the following in the beans of dispatcher-servlet.xml file itself :

so your file looks like :

```<code><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
 http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
 http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

<context:component-scan base-package="com.Project_name.Controller"></context:component-scan>
</beans>
</code>```

Body:
I am working on spring3 mvc and came up with this error

org.xml.sax.SAXParseException: The prefix "context" for element "context:component-scan" is not bound.

Here is my dispatcher servlet

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <mvc:annotation-driven />

    <context:component-scan base-package="com.web" />

Body:
Add the following in the beans of dispatcher-servlet.xml file itself :

so your file looks like :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
 http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
 http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-4.0.xsd
 http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

<context:component-scan base-package="com.Project_name.Controller"></context:component-scan>
</beans>


问:
Django: Right way of using URL patterns: maximum recursion depth exceeded
Im new to Django and im trying to display Hello world from my app.

Im stuck in giving the right URL pattern in urls.py

** UPDATED: Working **

My folder structure is as:

var\www\html\Python_PS\DjangoDemo\boardgames\urls.py

```<code>from django.conf.urls import url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^boardgames/', include('boardgames.urls'))
]
</code>```

var\www\html\Python_PS\DjangoDemo\boardgames\boardgames\views.py

```<code>from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

def home(request):
    return HttpResponse("Hello!")
</code>```

\var\www\html\Python_PS\DjangoDemo\boardgames\boardgames\urls.py

```<code>from django.conf.urls import url, include
from django.contrib import admin
from . import views

urlpatterns = [
    url(r'^$', views.home),
]
</code>```

After importing the include library in urls.py :

I got maximum depth exceeded error.

Or otherwise unable to display the Hello!.

I need to know the proper way of using the the url patters.

My Django version is 1.11 with Python 3.5.2

答:
The urls.py file you had shown is your project URLs file. Create a separate urls.py in your app which i assume is boardgames. Inside that file add the following content:

```<code>from django.conf.urls import url
from boargames import views

urlpatterns=[
   url(r'^board/$',views.home,name='home'),
 ]
</code>```

So now in the browser you can invoke it as http://localhost:8000/views/board

Body:
Im new to Django and im trying to display Hello world from my app.

Im stuck in giving the right URL pattern in urls.py

** UPDATED: Working **

My folder structure is as:

var\www\html\Python_PS\DjangoDemo\boardgames\urls.py

from django.conf.urls import url
from django.contrib import admin

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^boardgames/', include('boardgames.urls'))
]

var\www\html\Python_PS\DjangoDemo\boardgames\boardgames\views.py

from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

def home(request):
    return HttpResponse("Hello!")

\var\www\html\Python_PS\DjangoDemo\boardgames\boardgames\urls.py

from django.conf.urls import url, include
from django.contrib import admin
from . import views

urlpatterns = [
    url(r'^$', views.home),
]

After importing the include library in urls.py :

I got maximum depth exceeded error.

Or otherwise unable to display the Hello!.

I need to know the proper way of using the the url patters.

My Django version is 1.11 with Python 3.5.2

Body:
The urls.py file you had shown is your project URLs file. Create a separate urls.py in your app which i assume is boardgames. Inside that file add the following content:

from django.conf.urls import url
from boargames import views

urlpatterns=[
   url(r'^board/$',views.home,name='home'),
 ]

So now in the browser you can invoke it as http://localhost:8000/views/board


问:
Empty %1 in RewriteCond using mod rewrite
I got some domains with same name but different TLDs - let's say example.com and example.org. I want to redirect all requests from [www.]example.com to www.example.org as to use only one main domain.

I've found following code I'm using in my .htaccess file.

```<code>RewriteCond %{HTTP_HOST} !^www\.(.*)\.org$     [NC]
RewriteRule ^(.*)$       https://www.%1.org/$1 [L,R]
</code>```

Problem is: it redirects to https://www..org/. Seems like variable %1 is empty although it should contain the domain name ("example").

As I understand Apache's httpd documentation it should work like that.

What am I missing?

答:
You can use:

```<code>RewriteCond %{HTTP_HOST} !^www\..+\.org$ [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)\.(?:.+)$ [NC]
RewriteRule ^ https://www.%1.org%{REQUEST_URI} [NE,L,R=301]
</code>```

Empty %1 because in your case you use ! for a negative test, Which does not correspond to...

Body:
I got some domains with same name but different TLDs - let's say example.com and example.org. I want to redirect all requests from [www.]example.com to www.example.org as to use only one main domain.

I've found following code I'm using in my .htaccess file.

RewriteCond %{HTTP_HOST} !^www\.(.*)\.org$     [NC]
RewriteRule ^(.*)$       https://www.%1.org/$1 [L,R]

Problem is: it redirects to https://www..org/. Seems like variable %1 is empty although it should contain the domain name ("example").

As I understand Apache's httpd documentation it should work like that.

What am I missing?

Body:
You can use:

RewriteCond %{HTTP_HOST} !^www\..+\.org$ [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)\.(?:.+)$ [NC]
RewriteRule ^ https://www.%1.org%{REQUEST_URI} [NE,L,R=301]

Empty %1 because in your case you use ! for a negative test, Which does not correspond to...


问:
How can I limit fling in Android gallery to just one item per fling?
I have a gallery with several full screen images. I want to limit the fling gesture to only advance one image at a time (like the HTC Gallery app). What's the right/easiest way to achieve this?</p>

答:
I could not find any way to limit scrolling, but I solved the issue implementing/adapting with some success this code:
http://permalink.gmane.org/gmane.comp.handhelds.android.devel/101327

it implements a gallery with "fling"

ContentLicense: CC BY-SA 2.5


问:
Bing map v7 to v8 migration(DirectionManager class)
I am working on a project to migrate bing map from version7( v7) to v8 and following the procedure mentioned in the document

https://social.technet.microsoft.com/wiki/contents/articles/34563.bing-maps-v7-to-v8-migration-guide.aspx

Our bing map application (v7) is using methods beforeStepRender,beforeSummaryRender,afterWaypointRender  in DirectionManager Events class.As per the document (above link), these methods have been depricated in the v8. Could you please advise what would be the work around to achieve this in bing map v8?

答: Use the directionsUpdated event. No need for all those other events.</p>


问:
MySQL Error: You have an error in your SQL syntax check the manual that corresponds to your MySQL server version for the right syntax to use
I have a SQL query like this:

```<code>SELECT E.snum
FROM Enrolled E
GROUP BY E.snum
HAVING COUNT (*) >= ALL (SELECT COUNT(*)
                         FROM enrolled E2
                         GROUP BY E2.snum)
</code>```

But it generates an error:

You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near ') >= ALL (SELECT COUNT() FROM enrolled E2 GROUP BY E2.snum)
  LIMIT 0, 30' at line 1

What does the error mean?  Why it doesn't allow me to use ALL operator?

答:
Try this</p>

```<code>SELECT E.snum, COUNT(E.snum)
FROM Enrolled E
GROUP BY E.snum
HAVING COUNT (E.snum) >= ALL (SELECT COUNT(*)
                         FROM enrolled E2
                         GROUP BY E2.snum)
</code>```

Body:
I have a SQL query like this:

SELECT E.snum
FROM Enrolled E
GROUP BY E.snum
HAVING COUNT (*) >= ALL (SELECT COUNT(*)
                         FROM enrolled E2
                         GROUP BY E2.snum)

But it generates an error:

You have an error in your SQL syntax; check the manual that
  corresponds to your MySQL server version for the right syntax to use
  near ') >= ALL (SELECT COUNT() FROM enrolled E2 GROUP BY E2.snum)
  LIMIT 0, 30' at line 1

What does the error mean?  Why it doesn't allow me to use ALL operator?

Body:
Try this

SELECT E.snum, COUNT(E.snum)
FROM Enrolled E
GROUP BY E.snum
HAVING COUNT (E.snum) >= ALL (SELECT COUNT(*)
                         FROM enrolled E2
                         GROUP BY E2.snum)


问:
how to make the last div column stay on the top of the page in mobile view?
I divided my divs into 4 columns, in the first column there is a previous page button arrow, in second and third columns contain the content and the last column contains the next page button arrow. But in the mobile view the last column arrow is at the bottom of the page, i need it to be placed on the top near to the previous button arrow.

```<code><div class="container">
                <div class="row">
                    <div class="col-md-1">
                        <form>
                            <input type="button" class="default_previous sprite" alt="Submit">
                        </form>

                    </div>

                    <div class="col-md-4">
                        <div class="container-two-grid">

                            <div class="grid-two imageandtext">
                                <figure>
                                   <div class="imageandtext image_grid">
                                   <label for="selimg1">
                                    <img src="assets/images/painting.jpg" class="img-thumbnail">
                                    </label>
                                     <input type="radio" name="selimg" id="selimg1">
                                    <div class="caption">
                                        <p>Painting</p>
                                    </div>
                                    </div>
                                    <div class="imageandtext image_grid">
                                    <label for="selimg2">
                                        <img src="assets/images/photography.jpg" class="img-thumbnail" >
                                        </label>
                                        <input type="radio" name="selimg" id="selimg2">
                                        <div class="caption">
                                            <p>Photography</p>
                                        </div></div>
                                    </figure>
                                </div>

                                <div class="grid-two imageandtext">
                                <figure>
                                   <div class="imageandtext image_grid">
                                   <label for="selimg3">
                                    <img src="assets/images/drawing.jpg" class="img-thumbnail">
                                    </label>
                                     <input type="radio" name="selimg" id="selimg3">
                                    <div class="caption">
                                        <p>Drawing</p>
                                    </div>
                                    </div>
                                    <div class="imageandtext image_grid">
                                    <label for="selimg4">
                                        <img src="assets/images/sculpture.jpg" class="img-thumbnail" >
                                        </label>
                                        <input type="radio" name="selimg" id="selimg4">
                                        <div class="caption">
                                            <p>Sculpture</p>
                                        </div></div>
                                    </figure>
                                </div>

                                <div class="grid-two imageandtext">
                                <figure>
                                   <div class="imageandtext image_grid">
                                   <label for="selimg5">
                                    <img src="assets/images/painting.jpg" class="img-thumbnail">
                                    </label>
                                     <input type="radio" name="selimg" id="selimg5">
                                    <div class="caption">
                                        <p>Painting</p>
                                    </div>
                                    </div>
                                    <div class="imageandtext image_grid">
                                    <label for="selimg6">
                                        <img src="assets/images/photography.jpg" class="img-thumbnail" >
                                        </label>
                                        <input type="radio" name="selimg" id="selimg6">
                                        <div class="caption">
                                            <p>Photography</p>
                                        </div></div>
                                    </figure>
                                </div>
                               <div class="grid-two imageandtext">
                                <figure>
                                   <div class="imageandtext image_grid">
                                   <label for="selimg7">
                                    <img src="assets/images/drawing.jpg" class="img-thumbnail">
                                    </label>
                                     <input type="radio" name="selimg" id="selimg7">
                                    <div class="caption">
                                        <p>Drawing</p>
                                    </div>
                                    </div>
                                    <div class="imageandtext image_grid">
                                    <label for="selimg8">
                                        <img src="assets/images/sculpture.jpg" class="img-thumbnail" >
                                        </label>
                                        <input type="radio" name="selimg" id="selimg8">
                                        <div class="caption">
                                            <p>Sculpture</p>
                                        </div></div>
                                    </figure>
                                </div>

                            </div>

                        </div>
                        <div class="col-md-6">
                            <div class="container-form-grid">
                                <div class="subject_art">
                                    <form>
                                        <select class="mdb-select">
                                            <option value="" disabled selected>Subject of ART</option>
                                            <option value="1">Option 1</option>
                                            <option value="2">Option 2</option>
                                            <option value="3">Option 3</option>
                                        </select>
                                    </form>
                                </div>

                                <form class="form-inline">

                                    <h4>Dimensions</h4>
                                    <select class="mdb-select">
                                        <option value="" disabled selected>Units</option>
                                        <option value="1">Option 1</option>
                                        <option value="2">Option 2</option>
                                        <option value="3">Option 3</option>
                                    </select>

                                </form>
                                <form class="form-inline">

                                    <div class="md-form form-group">

                                        <input type="text" id="form1" class="form-control">
                                        <label for="form1" class="">Width</label>
                                    </div>

                                    <div class="md-form form-group">
                                        <input type="text" id="form1" class="form-control">
                                        <label for="form1" class="">Height</label>
                                    </div>

                                    <div class="md-form form-group">
                                        <input type="text" id="form1" class="form-control">
                                        <label for="form1" class="">Depth</label>
                                    </div>

                                </form>
                                <form>
                                    <div class="form_weight">
                                        <div class="md-form">
                                            <input type="text" id="form41" class="form-control">
                                            <label for="form41" class="">Weight</label>
                                        </div>
                                    </div>

                                </form>
                                <form class="form-inline">
                                <h4>ART Specifics</h4>
                                    <div class="form_row">
                                        <ul>
                                            <li>
                                                <select class="mdb-select">
                                                    <option value="" disabled selected>Medium</option>
                                                    <option value="1">Option 1</option>
                                                    <option value="2">Option 2</option>
                                                    <option value="3">Option 3</option>
                                                </select>
                                            </li>
                                            <li>
                                                <select class="mdb-select">
                                                    <option value="" disabled selected>Material</option>
                                                    <option value="1">Option 1</option>
                                                    <option value="2">Option 2</option>
                                                    <option value="3">Option 3</option>
                                                </select>
                                            </li>
                                            <li><select class="mdb-select">
                                                <option value="" disabled selected>Styles</option>
                                                <option value="1">Option 1</option>
                                                <option value="2">Option 2</option>
                                                <option value="3">Option 3</option>
                                            </select></li>
                                        </ul>
                                    </div>

                                </form>
                                <form>
                                    <div class="md-form form-width">
                                        <input type="text" id="form1" class="form-control">
                                        <label for="form1" class="">Keywords/Tags (Type 5 to 20 items)  </label>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="col-md-1">
                            <form>
                                <input type="button" class="default-next sprite" alt="Submit">

                            </form>
                        </div>
                    </div>
                </section>
</code>```

css(previous button and next button)

```<code>.uploadart_content .default-next{
      width: 83px;
      height: 65px;
      margin-right: 8px;
      display: inline-block;
      vertical-align: middle;
      background-position: -71px -235px;
      margin-top: 341px;
      border:none;
      outline: none;

    }
    .uploadart_content .default_previous{
      width: 83px;
      height: 65px;
      margin-right: 8px;
      display: inline-block;
      vertical-align: middle;
      background-position: -139px -235px;
      margin-top: 341px;
      border:none;
      outline: none;
    }
</code>```

答:
Alternatively you can also add a hidden col next button that will show in mobile.

```<code><div class="col-md-1"><!-- your current previous button -->
   <form>
    <input type="button" class="default_previous sprite" alt="Submit">
   </form>
</div><!-- your current previous button -->
<div class="col-md-1 hideondesktop"><!-- Added Next button -->
  <form>
   <input type="button" class="default-next sprite" alt="Submit">
  </form>
</div><!-- Added Next button -->
...other cols
...other cols
...other cols
<div class="col-md-1 hideonmobile"><!-- editedNext button -->
 <form>
  <input type="button" class="default-next sprite" alt="Submit">
 </form>
</div><!-- edited Next button -->
</code>```

CSS

```<code>.hideondesktop{
  display:none;
}
    @media all and (max-width:767px){
     .hideondesktop{
       display:block;
     }
     .hideonmobile{
      display:none;
     }
    }
</code>```

Hope this Help.

Body:
I divided my divs into 4 columns, in the first column there is a previous page button arrow, in second and third columns contain the content and the last column contains the next page button arrow. But in the mobile view the last column arrow is at the bottom of the page, i need it to be placed on the top near to the previous button arrow.

                        <form>
                            <input type="button" class="default_previous sprite" alt="Submit">
                        </form>

                                     <input type="radio" name="selimg" id="selimg1">

Painting

                                        <input type="radio" name="selimg" id="selimg2">

Photography

                                     <input type="radio" name="selimg" id="selimg3">

Drawing

                                        <input type="radio" name="selimg" id="selimg4">

Sculpture

                                     <input type="radio" name="selimg" id="selimg5">

Painting

                                        <input type="radio" name="selimg" id="selimg6">

Photography

                                     <input type="radio" name="selimg" id="selimg7">

Drawing

                                        <input type="radio" name="selimg" id="selimg8">

Sculpture

                                    <form>
                                        <select class="mdb-select">
                                            <option value="" disabled selected>Subject of ART</option>
                                            <option value="1">Option 1</option>
                                            <option value="2">Option 2</option>
                                            <option value="3">Option 3</option>
                                        </select>
                                    </form>

                                <form class="form-inline">

Dimensions

                                    <select class="mdb-select">
                                        <option value="" disabled selected>Units</option>
                                        <option value="1">Option 1</option>
                                        <option value="2">Option 2</option>
                                        <option value="3">Option 3</option>
                                    </select>

                                </form>
                                <form class="form-inline">

                                        <input type="text" id="form1" class="form-control">
                                        Width

                                        <input type="text" id="form1" class="form-control">
                                        Height

                                        <input type="text" id="form1" class="form-control">
                                        Depth

                                </form>
                                <form>

                                            <input type="text" id="form41" class="form-control">
                                            Weight

                                </form>
                                <form class="form-inline">

ART Specifics

                                                <select class="mdb-select">
                                                    <option value="" disabled selected>Medium</option>
                                                    <option value="1">Option 1</option>
                                                    <option value="2">Option 2</option>
                                                    <option value="3">Option 3</option>
                                                </select>

                                                <select class="mdb-select">
                                                    <option value="" disabled selected>Material</option>
                                                    <option value="1">Option 1</option>
                                                    <option value="2">Option 2</option>
                                                    <option value="3">Option 3</option>
                                                </select>

<select class="mdb-select">
                                                <option value="" disabled selected>Styles</option>
                                                <option value="1">Option 1</option>
                                                <option value="2">Option 2</option>
                                                <option value="3">Option 3</option>
                                            </select>

                                </form>
                                <form>

                                        <input type="text" id="form1" class="form-control">
                                        Keywords/Tags (Type 5 to 20 items)

                                </form>

                            <form>
                                <input type="button" class="default-next sprite" alt="Submit">

                            </form>

css(previous button and next button)

.uploadart_content .default-next{
      width: 83px;
      height: 65px;
      margin-right: 8px;
      display: inline-block;
      vertical-align: middle;
      background-position: -71px -235px;
      margin-top: 341px;
      border:none;
      outline: none;

    }
    .uploadart_content .default_previous{
      width: 83px;
      height: 65px;
      margin-right: 8px;
      display: inline-block;
      vertical-align: middle;
      background-position: -139px -235px;
      margin-top: 341px;
      border:none;
      outline: none;
    }

Body:
Alternatively you can also add a hidden col next button that will show in mobile.

<div class="col-md-1"><!-- your current previous button -->
   <form>
    <input type="button" class="default_previous sprite" alt="Submit">
   </form>
</div><!-- your current previous button -->
<div class="col-md-1 hideondesktop"><!-- Added Next button -->
  <form>
   <input type="button" class="default-next sprite" alt="Submit">
  </form>
</div><!-- Added Next button -->
...other cols
...other cols
...other cols
<div class="col-md-1 hideonmobile"><!-- editedNext button -->
 <form>
  <input type="button" class="default-next sprite" alt="Submit">
 </form>
</div><!-- edited Next button -->

CSS

.hideondesktop{
  display:none;
}
    @media all and (max-width:767px){
     .hideondesktop{
       display:block;
     }
     .hideonmobile{
      display:none;
     }
    }

Hope this Help.