text:
Q: Hibernate 5 update after insert I'm upgrading my Hibernate version from 3 to 5. Now I have a few tests that fall with an error:
Caused by: java.sql.BatchUpdateException: The UPDATE statement conflicted with the FOREIGN KEY constraint "application_dme_provider_fk1". The conflict occurred in database "ruslans_00_develop_dev_easycare", table "dbo.application", column 'application_code'.
It occurs when an entity Organisation is saving.
Debug logs show this:
2019-01-22 07:17:14,962 DEBUG [main] SQL - insert into organization (country_code, organization_name, party_id) values (?, ?, ?)
2019-01-22 07:17:14,984 DEBUG [main] SQL - select partyrole0_.party_id as party_id2_109_0_, partyrole0_.party_role_type_code as party_ro1_109_0_ from party_role partyrole0_ where partyrole0_.party_id=? and partyrole0_.party_role_type_code=?
2019-01-22 07:17:14,988 DEBUG [main] SQL - insert into party_role (party_id, party_role_type_code) values (?, ?)
2019-01-22 07:17:15,011 DEBUG [main] SQL - select dmeprovide0_.party_id as party_id1_39_0_, dmeprovide0_.party_role_type_code as party_ro2_39_0_, dmeprovide0_.national_provider_identifier as national3_39_0_ from dme_provider dmeprovide0_ where dmeprovide0_.party_id=? and dmeprovide0_.party_role_type_code=?
2019-01-22 07:17:15,018 DEBUG [main] SQL - insert into dme_provider (national_provider_identifier, party_id, party_role_type_code) values (?, ?, ?)
2019-01-22 07:17:15,953 DEBUG [main] SQL - select organisati0_.id as id1_102_4_, organisati0_.account_number as account_2_102_4_, organisati0_.country_code as country13_102_4_, organisati0_.default_billing_plan_id as default14_102_4_, organisati0_.default_plan_updated_by as default15_102_4_, organisati0_.image_id as image_i16_102_4_, organisati0_.name as name3_102_4_, organisati0_.password_reset_duration_months as password4_102_4_, organisati0_.password_reset_required as password5_102_4_, organisati0_.patient_group_layout_code as patient17_102_4_, organisati0_.physician_access as physicia6_102_4_, organisati0_.default_plan_updated_on as default_7_102_4_, organisati0_.primary_contact_information_id as primary18_102_4_, organisati0_.first_name as first_na8_102_4_, organisati0_.last_name as last_nam9_102_4_, organisati0_.title as title10_102_4_, organisati0_.subscription_level as subscri11_102_4_, organisati0_.type as type12_102_4_, applicatio1_.organisation_id as organisa6_12_6_, applicatio1_.application_code as applicat1_12_6_, applicatio1_.party_id as party_id5_12_6_, applicatio1_.party_role_type_code as party_ro2_12_6_, applicatio1_.application_code as applicat1_6_, applicatio1_.application_code as applicat1_12_0_, applicatio1_.party_id as party_id5_12_0_, applicatio1_.party_role_type_code as party_ro2_12_0_, applicatio1_.is_activating_flag as is_activ3_12_0_, applicatio1_.migrated_to_budapest_flag as migrated4_12_0_, applicatio1_.organisation_id as organisa6_12_0_, image2_.id as id1_79_1_, image2_.description as descript2_79_1_, image2_.image as image3_79_1_, image2_.name as name4_79_1_, image2_.type as type5_79_1_, contactinf3_.id as id1_27_2_, contactinf3_.address_id as address13_27_2_, contactinf3_.email as email2_27_2_, contactinf3_.phone_number_0 as phone_nu3_27_2_, contactinf3_.phone_type_0 as phone_ty4_27_2_, contactinf3_.phone_number_1 as phone_nu5_27_2_, contactinf3_.phone_type_1 as phone_ty6_27_2_, contactinf3_.phone_number_2 as phone_nu7_27_2_, contactinf3_.phone_type_2 as phone_ty8_27_2_, contactinf3_.phone_number_3 as phone_nu9_27_2_, contactinf3_.phone_type_3 as phone_t10_27_2_, contactinf3_.phone_number_4 as phone_n11_27_2_, contactinf3_.phone_type_4 as phone_t12_27_2_, contactinf3_.time_zone_code as time_zo14_27_2_, address4_.id as id1_1_3_, address4_.address_line1 as address_2_1_3_, address4_.address_line2 as address_3_1_3_, address4_.city_suburb as city_sub4_1_3_, address4_.country_code as country_6_1_3_, address4_.postcode as postcode5_1_3_, address4_.state_id as state_id7_1_3_ from organisation organisati0_ left outer join application_dme_provider applicatio1_ on organisati0_.id=applicatio1_.organisation_id left outer join image image2_ on organisati0_.image_id=image2_.id left outer join contact_information contactinf3_ on organisati0_.primary_contact_information_id=contactinf3_.id left outer join address address4_ on contactinf3_.address_id=address4_.id where organisati0_.id=?
2019-01-22 07:17:15,969 DEBUG [main] SQL - select applicatio0_.application_code as applicat1_12_0_, applicatio0_.party_id as party_id5_12_0_, applicatio0_.party_role_type_code as party_ro2_12_0_, applicatio0_.is_activating_flag as is_activ3_12_0_, applicatio0_.migrated_to_budapest_flag as migrated4_12_0_, applicatio0_.organisation_id as organisa6_12_0_ from application_dme_provider applicatio0_ where applicatio0_.application_code=? and applicatio0_.party_id=? and applicatio0_.party_role_type_code=?
2019-01-22 07:17:15,973 DEBUG [main] SQL - select location0_.id as id1_90_2_, location0_.active as active2_90_2_, location0_.contact_information as contact_4_90_2_, location0_.name as name3_90_2_, location0_.organisation_id as organisa5_90_2_, contactinf1_.id as id1_27_0_, contactinf1_.address_id as address13_27_0_, contactinf1_.email as email2_27_0_, contactinf1_.phone_number_0 as phone_nu3_27_0_, contactinf1_.phone_type_0 as phone_ty4_27_0_, contactinf1_.phone_number_1 as phone_nu5_27_0_, contactinf1_.phone_type_1 as phone_ty6_27_0_, contactinf1_.phone_number_2 as phone_nu7_27_0_, contactinf1_.phone_type_2 as phone_ty8_27_0_, contactinf1_.phone_number_3 as phone_nu9_27_0_, contactinf1_.phone_type_3 as phone_t10_27_0_, contactinf1_.phone_number_4 as phone_n11_27_0_, contactinf1_.phone_type_4 as phone_t12_27_0_, contactinf1_.time_zone_code as time_zo14_27_0_, address2_.id as id1_1_1_, address2_.address_line1 as address_2_1_1_, address2_.address_line2 as address_3_1_1_, address2_.city_suburb as city_sub4_1_1_, address2_.country_code as country_6_1_1_, address2_.postcode as postcode5_1_1_, address2_.state_id as state_id7_1_1_ from location location0_ left outer join contact_information contactinf1_ on location0_.contact_information=contactinf1_.id left outer join address address2_ on contactinf1_.address_id=address2_.id where location0_.id=?
2019-01-22 07:17:15,983 DEBUG [main] SQL - select billingpla0_.organisation_id as organisa1_15_0_, billingpla0_.billing_plan_id as billing_2_15_0_, billingpla1_.id as id1_14_1_, billingpla1_.allowed_for_all_orgs_flag as allowed_2_14_1_, billingpla1_.card_only_flag as card_onl3_14_1_, billingpla1_.data_start_at_setup_flag as data_sta4_14_1_, billingpla1_.data_start_offset_days as data_sta5_14_1_, billingpla1_.night_profile_duration_days as night_pr6_14_1_, billingpla1_.plan_availability_end_date as plan_ava7_14_1_, billingpla1_.plan_availability_start_date as plan_ava8_14_1_, billingpla1_.plan_code as plan_cod9_14_1_, billingpla1_.plan_duration_days as plan_du10_14_1_, billingpla1_.plan_name as plan_na11_14_1_, billingpla1_.summary_data_duration_days as summary12_14_1_, billingpla1_.troubleshooting_duration_days as trouble13_14_1_, billingpla1_.version as version14_14_1_ from billing_plan_organisation billingpla0_ inner join billing_plan billingpla1_ on billingpla0_.billing_plan_id=billingpla1_.id where billingpla0_.organisation_id=?
2019-01-22 07:17:16,005 DEBUG [main] SQL - select locations0_.organisation_id as organisa5_90_0_, locations0_.id as id1_90_0_, locations0_.id as id1_90_1_, locations0_.active as active2_90_1_, locations0_.contact_information as contact_4_90_1_, locations0_.name as name3_90_1_, locations0_.organisation_id as organisa5_90_1_, contactinf1_.id as id1_27_2_, contactinf1_.address_id as address13_27_2_, contactinf1_.email as email2_27_2_, contactinf1_.phone_number_0 as phone_nu3_27_2_, contactinf1_.phone_type_0 as phone_ty4_27_2_, contactinf1_.phone_number_1 as phone_nu5_27_2_, contactinf1_.phone_type_1 as phone_ty6_27_2_, contactinf1_.phone_number_2 as phone_nu7_27_2_, contactinf1_.phone_type_2 as phone_ty8_27_2_, contactinf1_.phone_number_3 as phone_nu9_27_2_, contactinf1_.phone_type_3 as phone_t10_27_2_, contactinf1_.phone_number_4 as phone_n11_27_2_, contactinf1_.phone_type_4 as phone_t12_27_2_, contactinf1_.time_zone_code as time_zo14_27_2_, address2_.id as id1_1_3_, address2_.address_line1 as address_2_1_3_, address2_.address_line2 as address_3_1_3_, address2_.city_suburb as city_sub4_1_3_, address2_.country_code as country_6_1_3_, address2_.postcode as postcode5_1_3_, address2_.state_id as state_id7_1_3_, timezone3_.time_zone_code as time_zon1_144_4_, timezone3_.time_zone_name as time_zon2_144_4_ from location locations0_ left outer join contact_information contactinf1_ on locations0_.contact_information=contactinf1_.id left outer join address address2_ on contactinf1_.address_id=address2_.id left outer join time_zone timezone3_ on contactinf1_.time_zone_code=timezone3_.time_zone_code where locations0_.organisation_id=? order by locations0_.name
2019-01-22 07:17:16,015 DEBUG [main] SQL - insert into application_dme_provider (is_activating_flag, migrated_to_budapest_flag, organisation_id, application_code, party_id, party_role_type_code) values (?, ?, ?, ?, ?, ?)
2019-01-22 07:17:16,021 DEBUG [main] SQL - update application_dme_provider set application_code=? where application_code=? and party_id=? and party_role_type_code=?
2019-01-22 07:17:16,030 ERROR [main] BatchingBatch - HHH000315: Exception executing batch [java.sql.BatchUpdateException: The UPDATE statement conflicted with the FOREIGN KEY constraint "application_dme_provider_fk1". The conflict occurred in database "ruslans_00_develop_dev_easycare", table "dbo.application", column 'application_code'.], SQL: update application_dme_provider set application_code=? where application_code=? and party_id=? and party_role_type_code=?
2019-01-22 07:17:16,031 ERROR [main] SqlExceptionHelper - The UPDATE statement conflicted with the FOREIGN KEY constraint "application_dme_provider_fk1". The conflict occurred in database "ruslans_00_develop_dev_easycare", table "dbo.application", column 'application_code'.

Organisation class
@Entity(name = "Organisation")
@Table(name = "organisation", uniqueConstraints = {@UniqueConstraint(name = "organisation_name_udx", columnNames = {"name"})})
@NoArgsConstructor
@EntityListeners(EntityCreateListener.class)
public class Organisation implements Serializable, PatientListEntity {
    public static final SubscriptionLevel DEFAULT_SUBSCRIPTION_LEVEL = SubscriptionLevel.BASIC;

    public static final int NUMBER_OF_DAYS_IN_MONTH = 30;

    public static final int MAX_NAME_LENGTH = 50;

    public static final int MAX_ACCOUNT_NUMBER_LENGTH = 50;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Getter
    @Setter
    private Long id;

    // Some fields

    @Getter
    @OneToMany(mappedBy = "organisation", orphanRemoval = true, cascade = CascadeType.ALL)
    @MapKeyColumn(name = "application_code")
    @JsonManagedReference
    private Map<ApplicationEnum, ApplicationDmeProvider> applicationDmeProviderMap = new HashMap<>();

    // Some fields
}

ApplicationDmeProvider class
@Entity
@Table(name = "application_dme_provider")
@Getter
@Data
@Builder
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@EqualsAndHashCode
public class ApplicationDmeProvider implements Serializable {

    @EmbeddedId
    private ApplicationDmeProviderId applicationDmeProviderId;

    @ManyToOne
    @JoinColumn(name = "organisation_id")
    @JsonBackReference
    private Organisation organisation;

    @Type(type = "yes_no")
    @Column(name = "migrated_to_budapest_flag")
    private boolean migrated;

    @Type(type = "yes_no")
    @Column(name = "is_activating_flag")
    @JsonIgnore
    private boolean activating;
}

ApplicationDmeProviderId class
@Data
@NoArgsConstructor
@Embeddable
@AllArgsConstructor
public class ApplicationDmeProviderId implements Serializable {
    @Column(name = "application_code")
    @Enumerated(EnumType.STRING)
    private ApplicationEnum applicationCode;

    @JsonBackReference
    @Embedded
    private PartyRoleId partyRoleId;
}

We checked this test before Hibernate migration and there is no update at all. It looks like Hibernate 5 changed save behavior for this kind of entity.

A: The problem occurred because of this map applicationDmeProviderMap with ApplicationEnum enum.
The annotation @MapKeyEnumerated(STRING) fixed the problem.


text: Q: Why do we need Python pandas Series? I am learning Python. As far as I understand, Pandas includes Series and DataFrame data structures. It seems to me that Series is just a DataFrame with one column (along with the index column). Why then, do we need the Series data structure? Is the DataFrame not enough?

redpajama_set_name: RedPajamaStackExchange


text:
Q: Using Phoenix with Hbase standalone throws NoSuchMethodError I have downloaded the tar.gz package for Hbase(1.1) and Phoenix(4.4 for hbase 1.1)
Setting up hbase in standalone mode works, I can get into the hbase shell.
Next I placed all .jar files from the the phoenix dir into Hbase's lib folder.
However, every time I try to start the sql shell I get the following error.
I've been at this all day and am staring myself blind here.
The installation instructions on the Phoenix website are pretty short, they basically say, copy the jars, run the .py script.

UPDATE: Should anyone encounter the same Problems, I didn't manage to fix this (yet) but trying on a fresh machine worked for me. So it's probably some conflicting libraries somewhere.

    [ec2-user@ip-172-31-5-224 ~]$ phoenix-4.4.0-HBase-1.1-bin/bin/sqlline.py localhost
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:localhost none none org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:localhost
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
15/06/03 09:09:55 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
15/06/03 09:09:57 WARN impl.MetricsConfig: Cannot locate configuration: tried hadoop-metrics2-phoenix.properties,hadoop-metrics2.properties
15/06/03 09:10:01 WARN ipc.CoprocessorRpcChannel: Call failed on IOException
org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:322)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1619)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:92)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:89)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:126)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:95)
    at org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:56)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.createTable(MetaDataProtos.java:10695)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1261)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1250)
    at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1727)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.DoNotRetryIOException): org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1196)
    at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:213)
    at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:287)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.execService(ClientProtos.java:32675)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1615)
    ... 13 more
15/06/03 09:10:01 WARN client.HTable: Error calling coprocessor service org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService for row \x00SYSTEM\x00CATALOG
java.util.concurrent.ExecutionException: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1739)
    at org.apache.hadoop.hbase.client.HTable.coprocessorService(HTable.java:1695)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1024)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1004)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1249)
    at org.apache.phoenix.query.DelegateConnectionQueryServices.createTable(DelegateConnectionQueryServices.java:112)
    at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1902)
    at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:744)
    at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:303)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:295)
    at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:293)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1236)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1891)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:131)
    at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
    at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
    at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
    at sqlline.Commands.connect(Commands.java:1064)
    at sqlline.Commands.connect(Commands.java:996)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
    at sqlline.SqlLine.dispatch(SqlLine.java:804)
    at sqlline.SqlLine.initArgs(SqlLine.java:588)
    at sqlline.SqlLine.begin(SqlLine.java:656)
    at sqlline.SqlLine.start(SqlLine.java:398)
    at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:322)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1619)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:92)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:89)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:126)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:95)
    at org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:56)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.createTable(MetaDataProtos.java:10695)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1261)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1250)
    at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1727)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.DoNotRetryIOException): org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1196)
    at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:213)
    at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:287)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.execService(ClientProtos.java:32675)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1615)
    ... 13 more
Error: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more (state=08000,code=101)
org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:108)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1041)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.metaDataCoprocessorExec(ConnectionQueryServicesImpl.java:1004)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1249)
    at org.apache.phoenix.query.DelegateConnectionQueryServices.createTable(DelegateConnectionQueryServices.java:112)
    at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1902)
    at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:744)
    at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:303)
    at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:295)
    at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:293)
    at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1236)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1891)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1860)
    at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
    at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:131)
    at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
    at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
    at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
    at sqlline.Commands.connect(Commands.java:1064)
    at sqlline.Commands.connect(Commands.java:996)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
    at sqlline.SqlLine.dispatch(SqlLine.java:804)
    at sqlline.SqlLine.initArgs(SqlLine.java:588)
    at sqlline.SqlLine.begin(SqlLine.java:656)
    at sqlline.SqlLine.start(SqlLine.java:398)
    at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)
    at org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
    ... 10 more

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)
    at org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:95)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.getRemoteException(ProtobufUtil.java:322)
    at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1619)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:92)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel$1.call(RegionCoprocessorRpcChannel.java:89)
    at org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithRetries(RpcRetryingCaller.java:126)
    at org.apache.hadoop.hbase.ipc.RegionCoprocessorRpcChannel.callExecService(RegionCoprocessorRpcChannel.java:95)
    at org.apache.hadoop.hbase.ipc.CoprocessorRpcChannel.callMethod(CoprocessorRpcChannel.java:56)
    at org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService$Stub.createTable(MetaDataProtos.java:10695)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1261)
    at org.apache.phoenix.query.ConnectionQueryServicesImpl$6.call(ConnectionQueryServicesImpl.java:1250)
    at org.apache.hadoop.hbase.client.HTable$16.call(HTable.java:1727)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hbase.ipc.RemoteWithExtrasException(org.apache.hadoop.hbase.DoNotRetryIOException): org.apache.hadoop.hbase.DoNotRetryIOException: SYSTEM.CATALOG: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1149)org.apache.phoenix.coprocessor.generated.MetaDataProtos$MetaDataService.callMethod(MetaDataProtos.java:10515)

org.apache.hadoop.hbase.regionserver.HRegion.execService(HRegion.java:6154)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.execServiceOnRegion(RSRpcServices.java:1692)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1674)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31447)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2031)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107) at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoSuchMethodError: org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment.getRegion()Lorg/apache/hadoop/hbase/regionserver/Region;
        at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.createTable(MetaDataEndpointImpl.java:1054)
        ... 10 more
        at org.apache.hadoop.hbase.ipc.RpcClientImpl.call(RpcClientImpl.java:1196)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient.callBlockingMethod(AbstractRpcClient.java:213)
        at org.apache.hadoop.hbase.ipc.AbstractRpcClient$BlockingRpcChannelImplementation.callBlockingMethod(AbstractRpcClient.java:287)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$BlockingStub.execService(ClientProtos.java:32675)
        at org.apache.hadoop.hbase.protobuf.ProtobufUtil.execService(ProtobufUtil.java:1615)

A: Do not copy all the phoenix jars to hbase. Use this link for installation:https://phoenix.apache.org/installation.html
Now in terminal go to the phoenix directory (which you have extracted from tar.gz) and then run below command:
user@user:~/Downloads/phoenix-4.4.0-HBase-1.1-bin/bin$ ./sqlline.py localhost

Hope this will help you!


text:
Q: Ununderstood English-language joke In a song video made by an American acquaintance, there is a joke that I don't understand. Here is the context:
"Alfresco" and "Pentaho" are two non-competing software applications that can be used together. An Alfresco representative recently made a rap song where he talks about his "tricked out Pentaho". Is it a reference to rappers' pimped out cars? I am not sure I understand.

A: I'm guessing that Pentaho is homophonic to Pinto, as found in the name of the Ford Pinto, a model of car.  You would understand the joke if you understood the reputation the Pinto once carried; no one living in the era it was sold, like my parents did, would ever describe a Pinto as "tricked out" -- a synonym for extravagantly furnished, by the way -- almost from the start it was derided for its numerous quality problems, to the point that Time Magazine rated the car one of the 50 worst cars of all time.  Why? The gas tank was prone to explosions after rear-end collisions, to the point that it was the Pinto which was implicated in the first case ever to be filed against a car manufacturer for criminal homicide.

A: I feel it is MUCH simpler than the other posts here
Penta-HO as in Tricked out HO (NSFW) - i.e. Whore, i.e. prostitute with all the trimmings
See Wikipedia - Ho'

A: You got the connection: it's a reference to something having all the bells and whistles. In this case, it's a fully configured instance of Pentaho.
At the risk of killing a funny reference with over-analysis, the joke is that it alludes to a common hip-hop trope of referring to haters, people who are jealous of one's success. This is evident earlier in the song you linked to, when he says:

Playing World of Warcraft while they type up their code
"But that's not good enough for 'enterprise mode'"
So they laughed and they dissed and they acted like haters
While we coded with the force like open-source Darth Vaders

"Haters hating" is a popular trope amongst nerds and geeks for ultimately unknown reasons (I say it's the repitition, but what do I know?), but it has at least some of its origins in Chamillionaire's "Ridin'". The song has the following hook:

They see me rollin' they hatin'
Trying to catch me ridin' dirty

Chamillionaire is making a reference to a somewhat American-specific racial issue of driving while black, where cops in some areas reportedly conduct racial profiling and make inordinately more traffic stops for African-Americans.
But the song has sparked several memes and image macros and perhaps most famously the nerdy parody anthem by Weird Al Yankovic, "White and Nerdy". In it, he takes "Ridin'"'s melody and replaces the lyrics with various references to geek culture.
You should see the connection between Weird Al's "White and Nerdy" and the video you linked: the joke is the juxtaposition of hip-hop culture concerned with serious racial issues with awkward white nerds who are primarily interested in geeky stuff like open-source projects.
That is to say, haters gonna hate a fully tricked out Pentaho instance.


text:
Q: XmlSerializer, .XmlSerializationWriterList1' threw an exception I've kicked my head with this one for several days now.  I've done a lot of research and have found issues closely related but not specific to my case.
Working on a Visual Studio 2008 SSIS package.  Using only one scripting component. In this scripting component, I am serializing a stongly typed class (CCMSModel) and trying to write it out to the server's d:\ drive.  I am using .NET 3.5.  Works just fine on my development machine but breaks when I deploy it to my SQL Server 2008 R2 (SSIS).  I've completely trimmed down my code to remove any added complexity:
[Serializable]
public class CCMSModel
{
    public string BOBorEOB { get; set; }
}

...
List<CCMSModel> myList = new List<CCMSModel>();
CCMSModel item = new CCMSModel();
item.BOBorEOB = "Test";
myList.Add(item);

string filePath = "d:\\ScheduleFiles\\6xml\\ss.xml";
var serializer = new XmlSerializer(typeof(List<CCMSModel>));
using (var stream = File.OpenWrite(filePath))
{
    serializer.Serialize(stream, myList);
}

...
Want to add that I have sufficient rights to write on the server and I am a sysadmin on the sql server.  I also have an another SSIS package using Visual Studio 2012 (SSIS) with .NET 4.0 and deploying to SQL Server 2012. This package is EXACTLY the same (did a copy / paste of the code) and it works just fine.
In my research I found an article that I couldn't help but to see a very close relationship to.  Same error and same code. However, this particular scenario is using .NET 4.0 and is deploying or executing in an environment that has .NET 4.0 and 4.5.  The article contains a link (at the bottom) claiming to solve the problem (specific to the 4.0/4.5 framework).  Claims that the XMLSerialize, in 4.5, is a bit different from the one that runs on my C# compiler hence the incompatibility.
InvalidProgramException with XmlSerializer
Although the article present a close resemblance, this isn't specifically my set up (since I am on 3.5).  However, it does allude to the fact that I may be experiencing some incompatiblity with the XMLSerialise implementation.  I've hunted down to see if this was the case but I've run dry on my search.
I get an this inner exception error:
System.TypeInitializationException: The type initializer for 'Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1..cctor()


text:
Q: Add Record Rules to leave request Odoo I have used the following rule:
[
  '|',
  ('employee_id.user_id',
  '=',
  user.id),
  ('employee_id.parent_id.user_id',
  '=',
  user.id)
]

to only allow employees to view their leave applications and have only managers see the subordinates leave applications. However, while applying this rule to everyone (Globally), I would like to still have HR Managers (those given Manager roles i believe its base.group_hr_manager in the module) to be able to see every ones leave request ?

A: Don't apply this rule to everyone but instead to base.group_user which is normal users group anyway. Or better: override/extend the domain of both already existing rules Employee Holidays *.
And there already is a rule for "higher" access groups called Holidays Officer which provides HR Officer and HR Manager groups all rights for every leave/holiday.


text:
Q: Delete last line from text file PHP using ftruncate I am trying to delete last line from my text file in PHP using ftruncate, but the problem is the length if line will keep varying most of the times. And I dont want to use file_put_contents, so that I write the file again because the file could be in Megabytes.
Please any suggestions ?

A: To get you an idea what I meant something like this:
$fp = fopen('file.txt', 'r+');
$pos = filesize('file.txt');
while ($pos > 0) {
    $pos = max($pos - 1024, 0);
    fseek($fp, $pos);
    $tmp = fread($fp, 1024);
    $tmppos = strrpos($tmp, "\n");
    if ($tmppos !== false) {
        ftruncate($fp, $pos + $tmppos);
        break;
    }
}

It will read the last 1024 bytes. Find the last newline in that buffer if it exists. If it exists truncate to that position. If is doesn't exists it reads the next 1024 bytes and check them. And so on.


text:
Q: Caching of images and script in the _layouts directory I am trying the figure out why the images (or js, or css) in the _layouts directory are not cached by either IE or FF.
The authentication on the site collection is NTLM. The _layouts folder has anonymous access enabled in IIS.
If I debug with fiddler a page that has been loaded before, I can see the following requests:
GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1   401 Unauthorized
GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1   401 Unauthorized
GET /_layouts/MyApplication/Images/newProject.png HTTP/1.1   200 OK
...
Cache-Control: max-age=31536000
Last-Modified: Tue, 09 Feb 2010 14:40:01 GMT
ETag: "5945d7c295a9ca1:3d0416"
...
This happens for each subsequent access of the page. Do you have any idea why the image is not cached?
Thank you

A: I don't think this has anything to do with Caching. Your images are simply not accessible.
Though in theory your setup should just work, I would check the following:

*

*Application Pool - Make sure your sub application ('MyApplciation') is using the same App Pool as the main SharePoint site. I've encountered problem with this before, I couldn't find a solution for this so ended up assigning the same application pool.

*IIS - If you have set up a virtual directory / application, check all of security settings. I would definately try to delete any virtual directory nodes and then seeing if I can access the images.

*If you're using a CAS policy, try changing it to an out of the box configuration.

*If all else fails, consider moving your images to _layouts/images/ (I know, not ideal but might be a work around)

Can't think of anything else at the moment.


text:
Q: How do I do a Perl regex that matches everything after a backslash and before a certain file extension? "..\directory\[filename].xml"
How would I go about a writing a regex that matches the above string with the quotes included? How do I match up to the .xml?
So far I've got the following. Not sure how to proceed after this, I'm pretty new to Perl.
$content =~ m/"..\\directory\\/

Thanks!

A: Method 1 (using regexes)
#!/usr/bin/perl
use strict;
use warnings;
my $path = "..\\directory\\somefile.xml";

if(my ($before) = $path =~ m{^(.*)\.xml$}) {
    print "[$before] match!\n";
} else {
    print "no match!\n";
};

Output:
[..\directory\somefile] match!

Method 2 (using File::Spec::Win32)
This method makes use of the built-in module File::Spec that comes with every Perl distribution.
This can be better than the first method because it's a specialized module for handling paths.
The built-in module File::Basename is also worth looking at.
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec::Win32;

my $path = "..\\directory\\somefile.xml";
my ($volume,$directories,$file) = File::Spec::Win32->splitpath($path);

print "vol=$volume\n";
print "dirs=$directories\n";
print "file=$file\n";

Output:
vol=
dirs=..\directory\
file=somefile.xml

A: The normal regex for matching the base name component is this.
m{([^\\/]+)$}
In your case you would modify that a little like this.
m{([^\\/]+\.xml)"$}


text:
Q: Java call function from a dll I have this python script that imports a zkemkeeper dll and connects to a time attendance device(ZKTeco). Here is is a script I'm using:
from win32com.client import Dispatch

zk = Dispatch("zkemkeeper.ZKEM")
zk.Connect_Net("192.168.0.17", 4370)
print(zk.StartIdentify())
print(zk.StartEnrollEx(7, 2, 1))

This works fine as expected. However I want to achieve the same using java. How can I call that Connect_Net method?
I tried the following in java but didn't work:
public class ZKEM {

    static {
        System.loadLibrary("zkemkeeper");
    }

    ZKEM() {
    }

    public static native boolean Connect_Net(String IPAdd, int Portl);

}

public class Main {

    public static void main(String[] args) {

        System.err.println(ZKEM.Connect_Net("192.168.0.17", 4370));
    }

}

A: The two choices for calling native code from Java are JNI (Java Native Interface) and JNA (Java Native Access)
The Java runtime can do JNI out of the box, but you need to create a wrapper library with functions specifically made for JNI (just putting in a native keyword is not enough).
JNA is a 3rd party library that uses libffi to make native code accessible from Java.
You have to see for yourself which approach better suits your needs.
Edit: looking at your example code again, is that a COM call? While COM can be done with JNA (doing that myself), it's quite complicated. Your best bet is probably a wrapper C library that does the actual calls or a Java/COM bridge product like JACOB (have never used it, however).

A: Although this is an old post, I am finalizing a pure Java ZKEM:
https://github.com/mkhoudary/ZKTeco4J
I was using ZKemKeeper DLL with COM4J in the past:
https://github.com/mkhoudary/ZKEMJavaPort
But the pure Java one is really robust, you may watch the repo, I am in the final stages


text:
Q: C# convert my WPF MvvM code to Asp.Net Mvc I have a store management Wpf App that use MvvM pattern , and i use Entity Framework , in my project i have models to use them in code first to create my database tables , Xaml for views and i have (ViewModels) , All my logic is in ViewModels Classes,
so I want to create an other project for the same thing (a store manger) using Asp.Net Mvc ,
i dont have problem with models because it have its own class lib , my problem is : How i rewrite my code(that in view models) to have it in my old WPF Project and my new MVC project in the same time without repeat all my logic code Twice (one for viewModels , and the other for Controllers ), so is there any pattern to separate the logic and use it for two different type of projects in my case Wpf and Mvc ?
In other words, is there any common ground between Wpf and Mvc using a pattern like Mvvm Or the only thing i can do is converting my logic to a class lib ?

A: The answer is : .Net Core Class Library , i create a core lib for my models and an other for my business logic , the good thing about core class lib that allow you to use it everywhere , in wpf , Asp , Xamarin and others.


text:
Q: How to disable an onDestroy method from activity in a specific fragment? I have an activity with multiple fragments. When the user reaches the last fragment and clicks on a button, he gets to the MainActivity via intent.
This is a multiplayer quiz app and I need to update a "turn" field in the database which decides wether player 1 or 2 has to play. This field currently gets updated when...
... the player finishes his quiz round normally (by clicking the next button on the last fragment)
... the player clicks the back button of the phone during the game (it opens an AlertDialogso when the player chooses to go back to the MainActivity this triggers an "update turn field method")
There has to be a third option where the turn field gets updated and this is the scenario: The player starts his turn but closes the app during his turn. This means currently that the "turn" field in my database does not get updated which means in my code that neither of the players can resume the game. I want to avoid this by updating the turn field when the user decides to close the app.
In the fragments there is a ProgressBar which is still running when the user accidentally closes the app, I did this in the onStopmethod of the fragment. Because of this I cannot call the onStopmethod in the activity to update the fields in the database, so I am wondering if there is a way to achieve my desired result without calling the onStop method.
Here is my activity where I have currently the method that updates some fields in Firestore inside the onDestroy method:
...
// When the user clicks the phones back button during the game an alert window opens to aks if he is sure to exit the game
    public void onBackPressed() {
        AlertDialog();
    }

public void AlertDialog() {

        yes.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                closeGame();
                Intent i = new Intent(GameActivity.this, MainActivity.class);
                startActivity(i);
                finish();
            }
        });
    }

 @Override
    protected void onDestroy() {
        super.onDestroy();
        updateGameStatus();
    }

    protected void updateGameStatus() {

collectionRef.document(gameId).collection("Round").document("Round").update("round", roundValue + 1)
                            .addOnCompleteListener(new OnCompleteListener<Void>() {
                                @Override
                                public void onComplete(@NonNull Task<Void> task) {
                                }
                            });

        }
...

Is there a good way to achieve my desired result?
Please let me know if you need additional informations.
I very much appreciate any tips!

A: Since there is no way to disable the onDestroy on a specific Fragment, I arranged my code logic around the onDestroymethod of the Activity that holds the Fragments.


text:
Q: Android Studio Parsing TextView I have a problem i don't know how to put my json parsing on a textView via my setter and getter.
I know how to put my json on a listView and I display him but not on a TextView I show my code.
This class represent my layout Listview but I put a text view for test
public class AfficheurListView extends AppCompatActivity {
String json_string;
JSONObject jObj = null;
ValeursAdapter valeursAdapter;
TextView textView;
Valeurs valeurss;
ListView listView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.display_listview_layout);
    json_string=getIntent().getExtras().getString("json_data");

    listView =(ListView)findViewById(R.id.listview);
    textView=(TextView)findViewById(R.id.textView4);

    valeursAdapter=new ValeursAdapter(this,R.layout.new_layout);

    listView.setAdapter(valeursAdapter);
    textView.setText(valeurss.getMpx());

    try {
      /*
            Tab json   []
      jsonObject=new JSONObject(json_string);
       jsonArray=jsonObject.getJSONArray("server_reponse");
       int count=0 ;*/

        // Json Object {}
        String mpx,rds,al,ar,frequence,pilots,id,id_SIGFOX,timestamps,rf;
        jObj = new JSONObject(json_string);
        mpx=  jObj.getString("MPX");
        rds =jObj.getString("RDS");
        rf=jObj.getString("RF");
        frequence =jObj.getString("Frequence");
        timestamps=jObj.getString("timestamp");
        id= jObj.getString("id");
        id_SIGFOX= jObj.getString("id_SIGFOX");
        pilots= jObj.getString("PILOT");
        al= jObj.getString("a_l");
        ar= jObj.getString("a_r");

        Valeurs valeurs=new Valeurs(mpx,rds,al,ar,frequence,pilots,id,timestamps,id_SIGFOX,rf);
        valeursAdapter.add(valeurs);
        //textView.setText(valeurss.getMpx());

    } catch (JSONException e) {

        e.printStackTrace();}

}
}

This class is the getter and setter of my variables:
public class Valeurs{

    private String mpx,rds,al,ar,pilots,frequence,id,timestamps,id_SIGFOX,rf;
        public Valeurs(String mpx, String rds, String al, String ar, String pilots, String frequence, String id, String timestamps, String id_SIGFOX, String rf)

        {
            this.setMpx(mpx);
            this.setRds(rds);
            this.setAl(al);
            this.setAr(ar);
            this.setPilots(pilots);
            this.setFrequence(frequence);
            this.setId(id);
            this.setTimestamps(timestamps);
            this.setId_SIGFOX(id_SIGFOX);
            this.setRf(rf);

        }

    public String getMpx() {
        return mpx;
    }

    public void setMpx(String mpx) {
        this.mpx = mpx;
    }

    public String getRds() {
        return rds;
    }

    public void setRds(String rds) {
        this.rds = rds;
    }

    public String getAl() {
        return al;
    }

    public void setAl(String al) {
        this.al = al;
    }

    public String getAr() {
        return ar;
    }

    public void setAr(String ar) {
        this.ar = ar;
    }

    public String getPilots() {
        return pilots;
    }

    public void setPilots(String pilots) {
        this.pilots = pilots;
    }

    public String getFrequence() {
        return frequence;
    }

    public void setFrequence(String frequence) {
        this.frequence = frequence;
    }

    public String getTimestamps() {
        return timestamps;
    }

    public void setTimestamps(String timestamps) {
        this.timestamps = timestamps;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId_SIGFOX() {
        return id_SIGFOX;
    }

    public void setId_SIGFOX(String id_SIGFOX) {
        this.id_SIGFOX = id_SIGFOX;
    }

    public String getRf() {
        return rf;
    }

    public void setRf(String rf) {
        this.rf = rf;
    }
}

This class put my variables on a new layout for my lisView:
public class ValeursAdapter  extends ArrayAdapter{

    List list=new ArrayList<>();
    public ValeursAdapter(Context context, int resource) {
        super(context, resource);
    }

    public void add(Valeurs object) {
        super.add(object);
        list.add(object);

    }

    @Override
    public int getCount() {

        return list.size();

    }

    @Nullable
    @Override
    public Object getItem(int position) {
        return list.get(position);

    }

    @NonNull
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
         View row;
        row=convertView;

        ValeursDefini valeursDefini;
        if(row==null)
        {
            LayoutInflater layoutInflater=(LayoutInflater)this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            row=layoutInflater.inflate(R.layout.new_layout,parent,false);
            valeursDefini=new ValeursDefini();
            valeursDefini.tx_mpx=(TextView)row.findViewById(R.id.tx_mpx);
            valeursDefini.tx_al=(TextView)row.findViewById(R.id.tx_al);
            valeursDefini.tx_ar=(TextView)row.findViewById(R.id.tx_ar);
            valeursDefini.tx_rds=(TextView)row.findViewById(R.id.tx_rds);
            valeursDefini.tx_frequence=(TextView)row.findViewById(R.id.tx_frequence);
            valeursDefini.tx_pilots=(TextView)row.findViewById(R.id.tx_pilots);

            row.setTag(valeursDefini);

        }
            else {
        valeursDefini=(ValeursDefini)row.getTag();
        }
        Valeurs valeurs= (Valeurs) this.getItem(position);
        valeursDefini.tx_mpx.setText(valeurs.getMpx()+"--");
        valeursDefini.tx_rds.setText(valeurs.getRds()+"--");
        valeursDefini.tx_al.setText(valeurs.getAl()+"--");
        valeursDefini.tx_ar.setText(valeurs.getAr()+"--");
        valeursDefini.tx_pilots.setText(valeurs.getPilots()+"--");
        valeursDefini.tx_frequence.setText(valeurs.getFrequence()+"--");

        return row;
    }
    static class ValeursDefini
    {
        TextView tx_mpx,tx_rds,tx_al,tx_ar,tx_frequence,tx_pilots;

    }
}

log:
E/AndroidRuntime: FATAL EXCEPTION: main
              Process: com.suprem.myapplication, PID: 2288
              java.lang.RuntimeException: Unable to start activity ComponentInfo{com.suprem.myapplication/com.suprem.myapplication.AfficheurListView}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.suprem.myapplication.Valeurs.getMpx()' on a null object reference
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
                  at android.app.ActivityThread.access$800(ActivityThread.java:151)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:135)
                  at android.app.ActivityThread.main(ActivityThread.java:5254)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:372)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
               Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.suprem.myapplication.Valeurs.getMpx()' on a null object reference
                  at com.suprem.myapplication.AfficheurListView$override.onCreate(AfficheurListView.java:36)
                  at com.suprem.myapplication.AfficheurListView$override.access$dispatch(AfficheurListView.java)
                  at com.suprem.myapplication.AfficheurListView.onCreate(AfficheurListView.java:0)
                  at android.app.Activity.performCreate(Activity.java:5990)
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
                  at android.app.ActivityThread.access$800(ActivityThread.java:151)
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
                  at android.os.Handler.dispatchMessage(Handler.java:102)
                  at android.os.Looper.loop(Looper.java:135)
                  at android.app.ActivityThread.main(ActivityThread.java:5254)
                  at java.lang.reflect.Method.invoke(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:372)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

I want display just my variable mpx on the textView4 by using my class Valeur for get the value of mpx on the getter
thanks.

A: You did not initialize Valeurs valeurss;


text:
Q: Visual Studio Code Quick Constructor for Dart not working I created this Dart Class in Visual Studio Code:
class User {
  String userId;
  String info;
}

Ctrl + . not opening the quick fix menu for a quick constructor.

Any suggestions on how to show all of the quick-fix options? like this -

A: That feature does not derive from the official Dart library extension,
You should install this extension from Visual studio marketplace :
from this link
if installed then try Ctrl + . within class and select Generate constructor.
you can follow below numbers to quick fix the

*

*Create a class with properties.

*Place your cursor on the first line
of the class, the constructor or a field.

*Hit CTRL + . to open the
quick fix dialog.

*Choose one of the available options.

*If extension won't work, then you may restart the VS Code.

A: I have the same problem; The extension is installed but I still only have 'Convert class to a mixin'.
Edit: I restarted VSCode and the extension started to work. You may also need to clear workspace cache.

A: Add this extension on visual studio code Dart Data Class Generator. Execute on vscode ctrl + p and paste ext install BendixMa.dart-data-class-generator

A: Ctrl + . doesn't work for me whenever there is a constructor in the class.
When a constructor exists,  Ctrl + .  returns No code actions available
Solution:
comment out any constructor(s)
Then it works as intended, i.e. Ctrl + . on class field displays a pop-up menu to auto-generate class methods, e.g. a constructor, JSON serialisation, toString, copyWith, etc
Remember to uncomment the constructor when you're done!

A: Clearing the cache did the job. I used this extension to clear the cache of the workspace and restart.

A: You should install the Dart Data Class Generator extension in VS. you can use this link : Dart Data Class Generator , restart the VS after you install the extension.

A: Name: Dart Data Class Generator
Id: dotup.dart-data-class-generator
Description: Create dart data classes easily, fast and without writing boilerplate or running code generation.
Version: 0.5.3
Publisher: dotup
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=dotup.dart-data-class-generator
I have tried this extension and its auto-generating constructor and other features by ctrl + . keyboard shortcut. But please after installing this extension try to restart your IDE(VS code).


text:
Q: Action Intent causing a ActivityNotFoundException while starting another activity My TestApp which launches the activity has the following code:
public void startOperaView() {
        Intent browserIntent = new Intent("org.droidtv.nettvbrowser.VIEW");
        Uri luri = Uri.parse("connectedplanet.tv/olvs/test");

        //browserIntent.setClass(getApplicationContext(), Browser.class);
        //browserIntent.setAction("org.droidtv.nettvbrowser.VIEW");
        browserIntent.setType("application/vnd.droidtv.sta");
        browserIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                | Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
        browserIntent.setData(luri);

        startActivity(browserIntent);
    }

And the package "org.droidtv.nettvbrowser" has the following AndroidManifest.xml file:
<activity
            android:name="org.droidtv.nettvbrowser.Browser"
            android:configChanges="locale"
            android:label="@string/app_name" >
            <intent-filter>
             <action android:name="org.droidtv.nettvbrowser.VIEW" />
             <action android:name="android.intent.action.MAIN" />
             <category android:name="android.intent.category.LAUNCHER" />
             <category android:name="android.intent.category.DEFAULT" />
             <data android:mimeType="application/vnd.droidtv.sta" />

            </intent-filter>
        </activity>

The weird part is that if I specify the actual package name in the intent it seems to work fine, Only the action intents are throwing these errors.Any help would be appreciated.Thank You.

A: Refer to http://developer.android.com/guide/topics/manifest/activity-element.html and you can try set android:exported="true"
android:exported

Whether or not the activity can be launched by components of other applications — "true" if it can be, and "false" if not. If "false", the activity can be launched only by components of the same application or applications with the same user ID.
The default value depends on whether the activity contains intent filters. The absence of any filters means that the activity can be invoked only by specifying its exact class name. This implies that the activity is intended only for application-internal use (since others would not know the class name). So in this case, the default value is "false". On the other hand, the presence of at least one filter implies that the activity is intended for external use, so the default value is "true".
This attribute is not the only way to limit an activity's exposure to other applications. You can also use a permission to limit the external entities that can invoke the activity (see the permission attribute).
Or you can refer to something like this:
<activity android:name="OutgoingCallBroadcaster"
        android:theme="@android:style/Theme.NoDisplay"
        android:permission="android.permission.CALL_PHONE"
        android:configChanges="orientation|screenSize|keyboardHidden">
    <!-- CALL action intent filters, for the various ways
         of initiating an outgoing call. -->
    <intent-filter>
        <action android:name="android.intent.action.CALL" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="tel" />
    </intent-filter>
    <intent-filter android:icon="@drawable/ic_launcher_sip_call">
        <action android:name="android.intent.action.CALL" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="sip" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.CALL" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="voicemail" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.CALL" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="vnd.android.cursor.item/phone" />
        <data android:mimeType="vnd.android.cursor.item/phone_v2" />
        <data android:mimeType="vnd.android.cursor.item/person" />
    </intent-filter>
</activity>


text:
Q: Renderscript not working android above 5 I'm building an android app which uses renderscript and if device android version is higher than 5.. (tested on several devices and observed this but may be the reason is different) it fails, otherwise works as normal
I am new to renderscript so used
https://github.com/jean80it/RSRTImgProc as a template.
(this project works but mine fails)
error:
11-25 17:37:54.259 19449-19477/com.stareatit.RSRTImgProc
E/RenderScript: Unable to open shared library
(/data/user/0/com.stareatit.RSRTImgProc/cache/librs.filter.so): (null)
11-25 17:37:55.112 19449-19477/com.stareatit.RSRTImgProc
E/RenderScript: Unable to open shared library
(/data/user/0/com.stareatit.RSRTImgProc/cache/librs.filter_aqua.so):
undefined symbol: root.expand
11-25 17:37:55.696 19449-19477/com.stareatit.RSRTImgProc
E/RenderScript: Unable to open shared library
(/data/user/0/com.stareatit.RSRTImgProc/cache/librs.filter_comic.so):
undefined symbol: root.expand
11-25 17:37:56.368 19449-19477/com.stareatit.RSRTImgProc
E/RenderScript: Unable to open shared library
(/data/user/0/com.stareatit.RSRTImgProc/cache/librs.filter_neon.so):
undefined symbol: root.expand
11-25 17:37:57.645 19449-19477/com.stareatit.RSRTImgProc
E/RenderScript: Unable to open shared library
(/data/user/0/com.stareatit.RSRTImgProc/cache/librs.filter_poster.so):
undefined symbol: root.expand

gradle file:
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.stareatit.RSRTImgProc"
    minSdkVersion 18
    targetSdkVersion 23
    renderscriptTargetApi 18
    renderscriptSupportModeEnabled true
}

buildTypes {
    release {
        minifyEnabled true
        jniDebuggable true
        renderscriptDebuggable true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
} }

renderscirpt files are located in rs folder in main
initializing renderscript context as
    _renderScript = RenderScript.create(this);

in the main activity and in another class (in the same package) creating script as:
new ScriptC_filter(this.rs);

Both tried support library and android renderscript. Result was the same
When minification is enabled, it does not work in any device
Thanks for any help


text:
Q: Unable to start Sonarqube I tried to install sonarqube on Windows Server 2016. No problem during the installation and I even got access to the web interface. Everything is working just fine.
But, I had to restart my server. Now Sonarqube refuses to start again.
Here the sonar.log :
--> Wrapper Started as Console
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2018.05.25 15:51:26 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\sonarqube-6.7.3\temp
2018.05.25 15:51:26 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.05.25 15:51:26 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\sonarqube-6.7.3\elasticsearch]: C:\Program Files\Java\jdk1.8.0_171\jre\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms2048m -Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\sonarqube-6.7.3\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\sonarqube\sonarqube-6.7.3\temp\conf\es
2018.05.25 15:51:26 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.05.25 15:51:27 INFO  app[][o.e.p.PluginsService] no modules loaded
2018.05.25 15:51:27 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2018.05.25 15:51:31 DEBUG app[][i.netty.util.NetUtil] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200

2018.05.25 15:51:34 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{rUfN9MfRR1yx1epNtNzu6A}{127.0.0.1}{127.0.0.1:9001}], ignoring...

2018.05.25 15:51:34 DEBUG app[][o.s.a.p.EsProcessMonitor] Connected to Elasticsearch node: [127.0.0.1:9001]
2018.05.25 15:51:36 DEBUG app[][o.e.c.t.TransportClientNodesService] failed to connect to node [{#transport#-1}{rUfN9MfRR1yx1epNtNzu6A}{127.0.0.1}{127.0.0.1:9001}], ignoring...

2018.05.25 15:51:41 DEBUG app[][o.e.t.n.Netty4Transport] connected to node [{sonarqube}{CFUKuUDmTQ2UsgzJtMo9sA}{-uBZwbFUTHyRUFcE7jQ78w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}]
2018.05.25 15:51:48 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2018.05.25 15:51:48 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube\sonarqube-6.7.3]: C:\Program Files\Java\jdk1.8.0_171\jre\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\sonarqube-6.7.3\temp -Xmx2048m -Xms2048m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;./lib/server/*;C:\sonarqube\sonarqube-6.7.3\lib\jdbc\mssql\mssql-jdbc-6.2.2.jre8.jar org.sonar.server.app.WebServer C:\sonarqube\sonarqube-6.7.3\temp\sq-process5165540938815359073properties
2018.05.25 15:52:10 DEBUG app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [web]: 0
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.05.25 15:52:10 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

the web.log :
2018.05.25 15:51:48 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2018.05.25 15:51:49 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] no modules loaded
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2018.05.25 15:51:51 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.05.25 15:51:52 DEBUG web[][i.n.c.MultithreadEventLoopGroup] -Dio.netty.eventLoopThreads: 2
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] Platform: Windows
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] -Dio.netty.noUnsafe: false
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] Java version: 8
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] sun.misc.Unsafe.theUnsafe: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] sun.misc.Unsafe.copyMemory: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.Buffer.address: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] direct buffer constructor: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.Bits.unaligned: available, true
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable prior to Java9
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent0] java.nio.DirectByteBuffer.<init>(long, int): available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] sun.misc.Unsafe: available
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.tmpdir: C:\sonarqube\sonarqube-6.7.3\temp (java.io.tmpdir)
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.bitMode: 64 (sun.arch.data.model)
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.noPreferDirect: false
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.maxDirectMemory: 2075918336 bytes
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] -Dio.netty.uninitializedArrayAllocationThreshold: -1
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.CleanerJava6] java.nio.ByteBuffer.cleaner(): available
2018.05.25 15:51:52 DEBUG web[][i.n.c.n.NioEventLoop] -Dio.netty.noKeySetOptimization: false
2018.05.25 15:51:52 DEBUG web[][i.n.c.n.NioEventLoop] -Dio.netty.selectorAutoRebuildThreshold: 512
2018.05.25 15:51:52 DEBUG web[][i.n.u.i.PlatformDependent] org.jctools-core.MpscChunkedArrayQueue: available
2018.05.25 15:51:52 DEBUG web[][i.n.c.DefaultChannelId] -Dio.netty.processId: 5492 (auto-detected)
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] -Djava.net.preferIPv4Stack: false
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] -Djava.net.preferIPv6Addresses: false
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] Loopback interface: lo (Software Loopback Interface 1, 127.0.0.1)
2018.05.25 15:51:52 DEBUG web[][i.netty.util.NetUtil] Failed to get SOMAXCONN from sysctl and file \proc\sys\net\core\somaxconn. Default: 200
2018.05.25 15:51:52 DEBUG web[][i.n.c.DefaultChannelId] -Dio.netty.machineId: 00:15:5d:ff:fe:01:ab:03 (auto-detected)
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.level: simple
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetector] -Dio.netty.leakDetection.maxRecords: 4
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.numHeapArenas: 2
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.numDirectArenas: 2
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.pageSize: 8192
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.maxOrder: 11
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.chunkSize: 16777216
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.tinyCacheSize: 512
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.smallCacheSize: 256
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.normalCacheSize: 64
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.maxCachedBufferCapacity: 32768
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.cacheTrimInterval: 8192
2018.05.25 15:51:52 DEBUG web[][i.n.b.PooledByteBufAllocator] -Dio.netty.allocator.useCacheForAllThreads: true
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.allocator.type: pooled
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.threadLocalDirectBufferSize: 65536
2018.05.25 15:51:52 DEBUG web[][i.n.b.ByteBufUtil] -Dio.netty.maxThreadLocalCharBufferSize: 16384
2018.05.25 15:51:52 DEBUG web[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.bytebuf.checkAccessible: true
2018.05.25 15:51:52 DEBUG web[][i.n.u.ResourceLeakDetectorFactory] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@497e6350
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.maxCapacityPerThread: 32768
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.maxSharedCapacityFactor: 2
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.linkCapacity: 16
2018.05.25 15:51:52 DEBUG web[][i.n.util.Recycler] -Dio.netty.recycler.ratio: 8
2018.05.25 15:51:53 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2018.05.25 15:51:53 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.7.3.38370 / baa823c2ae6ed4dd406b2ef12bc5ac6201e466f9
2018.05.25 15:51:53 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost;databaseName=sonar
2018.05.25 15:52:09 ERROR web[][o.s.s.p.Platform] Web server startup failed

I've tried to change a lots of settings in .conf of sonar and wrapper without any success. Can anyone help ? I can provide more info if needed.
Thanks a lot!


text:
Q: How to call a Shell script with variable arguments from a perl script? Perl code is looks like --
sub report_generation($)
{

Shell_sh $ARGV[0] $conn_string $pm_dir/$FILE

}

$ARGV[0] -- > command line argument of perl script

$conn_string --> used in perl script value define in perl script

my $USR=$ARGV[1];
my $PSS=$ARGV[2];
my $INS=$ARGV[3];
my $conn_string=$USR."/".$PSS."\@".$INS;

$pm_dir/$FILE --> want to give file name with file path "$pm_dir/$FILE"

my $pm_dir="$ENV{'ABP_PM_ROOT'}/interfaces/output/report/$date";
my $FILE= 'FILE_NAME_'.$ARGV[0].'_'.get_timestamp().'.dat';

my $db_conn =DBI->connect( 'dbi:Oracle:'. $INS, $USR, $PSS, {AutoCommit => 0 })|| ExitProcess4 (1,$Function_Name ,$DBI::err, $DBI::errstr );

report_generation($db_conn);

A: See system() or ``

A: Use an array to hold the arguments, and then:
system @array;

There are a number of advantages to that mechanism - notably that you do not have to escape everything to prevent the shell interpreting the arguments before you call it.


text:
Q: Error: $ is not defined in Angular Universal I am using jQuery in my Angular Universal project.
I have installed jQuery and invoked it in angular.json file as follows :
"scripts": [
              "node_modules/jquery/dist/jquery.min.js",
              "node_modules/bootstrap/dist/js/bootstrap.min.js",
              "node_modules/tinymce/tinymce.min.js"
            ]

I have declared the variables in app.component.ts as follows:
declare var $: any;

But when I run the app, I get following list of errors:

ReferenceError: $ is not defined
TypeError: window.matchMedia is not a function
ReferenceError: location is not defined

Everything was working fine in the regular Angular app (without server side), but not working in the Universal app (with server side).


text:
Q: Multiple queries in stored procedure not working in codeigniter Need to fetch all rows from 3 tables where current status =1
$query =  $this->db->query("CALL GetALLDetails('1')");
$result = $query->result_array();
print_r($result);

Stored Procedure:-
BEGIN
 select * from table1 where current_status = status;
 select * from table2 where current_status = status;
 select * from table3 where current_status = status;
END

Am getting result of first query statement only.

A: $this->db->trans_start();
$this->db->query('AN SQL QUERY...');
$this->db->query('ANOTHER SQL QUERY...');
$this->db->query('AND YET ANOTHER SQL  QUERY...');
$this->db->trans_complete();

Note:- For more about transactions

*

*transactions


text:
Q: Can't get why I'm always redirected to https(opening my app) Everything was allright, but when I started to working with SSL and run it on thin server with SSL. Tried to run different applications, but this error doesn't conect with application - it appears in all of them.
It is a little bit strange situation. In localhost my application is running, but when I added app into my remoted server and running it - it always opened as https and browser give me error:
  The connection was reset

From my console:
      ERROR bad Request-Line
     ERROR bad URI

I know, that this errors occure, when certificate has errors or some other server errors.
I checked all my config files, deleted all things connected with SSL, but it wants to open with https protocol.
Where I should search for errors ? How can I solve this ?

A: *

*try deleting cache

*do you have a browser extension installed that always access the https version of sites?

A: I just uninstalled thin server and my app started to run again.


text:
Q: this given code should convert a given number into lagest possible no.by replacing suitable no of digits by 9.It is not working x and k are number to be converted and digits to be replaced respectively.
The function int dig counts the number of digits of the number.
#include<iostream>
using namespace std;

int dig(long int n)
{
    int m=0;
    while(n>0)
    {
        n=n/10;
        m++;
    }
    return m;
}

int main(void){
   long long int x,f=1;//here x should take an input upto 18 digits.
   int b=1,k,l,c,j=1,i,r;
   cin>>x;
   cin>>k;
   l=dig(x);
   c=l-k;
   for(i=1;i<=c;i++)
   {
      f=f*10;
   }
   r=(x%f);
   for(i=1;i<=k;i++)
   {
      b=b*10;
   }
   j=(b-1)*f;
   j=j+r;
   cout<<j;
   return 0;
}

A: Reading the code, it looks like your intention is to replace the first k digits of the (up to 18 digit number) x with 9's, and thereby get the resulting large number? i.e. inputting 12345678 and 4 should give 99995678?
If so, read on. If not, disregard this answer.
The logic in the code is correct but it won't handle 18 digits due to loss of precision; some of your variables need to be changed to long long integers to support 18 digits. Note the compiler warnings.
Also, the code does not seem to handle negative values of x correctly, but that is easy to fix (see the use of mul). And it doesn't protect against k being too large, but that is also an easy fix.
Here's a corrected version: with this inputting 123456789012345678 and 4 gives 999956789012345678. Hope this helps.
#include<iostream>
using namespace std;

int dig(long long int n)
{
    int m = 0;
    while (n>0)
    {
        n = n / 10;
        m++;
    }
    return m;
}

int main(void) {
    long long int x, f = 1;//here x should take an input upto 18 digits.
    int b = 1, k, l, c;
    long long int j = 1;
    int i;
    long long int r;
    cin >> x;
    cin >> k;
    int mul = (x < 0) ? -1 : 1;
    x *= mul;
    l = dig(x);
    if (k > l)
    {
        k = l;
    }
    c = l - k;
    for (i = 1; i <= c; i++)
    {
        f = f * 10;
    }
    r = (x%f);
    for (i = 1; i <= k; i++)
    {
        b = b * 10;
    }
    j = (b - 1)*f;
    j = j + r;
    j *= mul;
    cout << j << endl;
    return 0;
}


text:
Q: Is it possible to have a wordpress installation with homepage and all pages on the root, but the posts on a subdir? I want to use Wordpress as a CMS for pages and use the Posts for news or articles.
I'm planning to place the homepage and all other pages (about, contact, etc.) on the site root. I want only the posts on a different path (example: "/blog" ).
I didn't find any answers to help me use that specific structure.
Is that possible? How?

A: Here is a simple trick to do it
First, login to your WordPress administration. Click "Settings" (or "Options"), then click "Permalinks."
After the beginning slash in the "Custom Structure" box, add the subdirectory name followed by another slash.
For example, if your permalink structure was this:
/%year%/%monthnum%/%day%/%postname%/

…You would change it to this:
/blog/%year%/%monthnum%/%day%/%postname%/

Click the "Save Changes" button. Now your post and archive permalinks will contain the subdirectory name that you entered.


text:
Q: Incorrect CSS Blur Rendering When Clipped in Chrome When Hardware Accelerated I'm having an issue with filter: blur() on Chrome.  I've used transform: translate3d(0, 0, 0) to encourage hardware acceleration and it has greatly improved performance (I'm using it sparingly).  I have an element, and I've set its before to have a background image and a blur.  I've set its extents to be outside the bounds of its containing element.

Above is a screenshot of what happens in Chrome.  The hardware accelerated version is on the left, while the non-hardware accelerated is on the right.  Notice that on the left, the blur appears inset with soft edges.
It appears that in Chrome, when hardware accelerated, the element is clipped with an overflow before being blurred, causing the feathered edges.
Other than disabling hardware acceleration, which decimates performance with this large-radius blur, is there a way to encourage Chrome to perform the blur before clipping?
I've attached an example test case below.
Thanks!

      div {
        width: 200px;
        height: 200px;
        position: absolute;
        box-sizing: border-box;

        overflow: hidden;
        border: 2px solid red;
      }

      div::before {
        background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg);
        content: "";
        display: block;
        position: absolute;
        left: -200px;
        top: -200px;
        width: calc(100% + 400px);
        height: calc(100% + 400px);
        background-size: calc(100% + 400px) calc(100% + 400px);

        filter: blur(60px);
        -webkit-filter: blur(60px);
        z-index: 1;
      }

      #incorrect::before {
        -webkit-transform: translate3d(0, 0, 0);
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
      }

      #incorrect {
        left: 100px;
        top: 100px;
      }

      #correct {
        right: 100px;
        top: 100px;
      }

A: You could try setting the last property "translation-value-z" on the #incorrect::before to 1. I dunno why exactly, but it seemed to work.

Translation-value-z is the third vector value and defines the
  translation in the direction of the z-axis (3rd dimension). Attention:
  It can only be a length value, percentage is not supported.

For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate3d

      div {
        width: 200px;
        height: 200px;
        position: absolute;
        box-sizing: border-box;

        overflow: hidden;
        border: 2px solid red;
      }

      div::before {
        background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1024px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg);
        content: "";
        display: block;
        position: absolute;
        left: -200px;
        top: -200px;
        width: calc(100% + 400px);
        height: calc(100% + 400px);
        background-size: calc(100% + 400px) calc(100% + 400px);

        filter: blur(60px);
        -webkit-filter: blur(60px);
        z-index: 1;
      }

      #incorrect::before {
        -webkit-transform: translate3d(0, 0, 1);
        -ms-transform: translate3d(0, 0, 1);
        transform: translate3d(0, 0, 1);
      }

      #incorrect {
        left: 100px;
        top: 100px;
      }

      #correct {
        right: 100px;
        top: 100px;
      }


text:
Q: Using position absolute in mobile Responsive design
Consider this image. Here I have a background image(only the outer part of the player not the buttons timing and the progress bar). Now I want to place the play, next, previous and stop buttons in the places exact same places.
#playbuttonimg{
    margin-left:-95px;
    position: absolute;
    top:20px;
}
#pausebuttonimg{
    margin-left:-95px;
    position: absolute;
    top:20px;
    display: none;
}
#prevbuttonimg{
    position: absolute;
    /*margin-left:-15px;*/
    top:24px;
}
#stopbuttonimg{
    position: absolute;
    margin-left:18px;
    top:24px;
}
#nextbuttonimg{
    position: absolute;
    margin-left:50px;
    top:24px;
}

If I use this style, in desktop browser it comes perfectly but in the mobile devices the margin-left being negative makes the button go beyond the screen and the positive margins will be visible but not placed accordingly.
And as it is mobile website it should fit properly in all the mobile devices. How can I do this in css? Is there a way to do it without using media queries? Or is there any other way so that I can make it fit properly across all the mobile devices?

A: You can add a position:relative; to your main parent div.

A: If you work with percentage values this should work, I mean you have used
margin-left:xxxpx;

in pixels, but if you can calculate its percentage values, this may solve.
For the calculations you can get help of http://resources.sameerast.com/responsive-web-design-formula-easy-calculator.html