This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Query<JwtToken> query = createNamedQuery("UPDATE JwtToken SET isValid = false WHERE loginId = :loginId", | |
JwtToken.class); | |
Map<String, Object> paramMap = new HashMap<>(); | |
paramMap.put("loginId", loginId); | |
paramMap.forEach(query::setParameter); | |
query.executeUpdate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
y = df1.index | |
x = preprocessing.scale(df1) | |
phy_features = ['A', 'B', 'C'] | |
phy_transformer = Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('scaler', StandardScaler())]) | |
phy_processer = ColumnTransformer(transformers=[('phy', phy_transformer, phy_features)]) | |
fa_features = ['D', 'E', 'F'] | |
fa_transformer = Pipeline(steps=[('imputer', SimpleImputer(strategy='median')), ('scaler', StandardScaler())]) | |
fa_processer = ColumnTransformer(transformers=[('fa', fa_transformer, fa_features)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.ensemble import RandomForestClassifier, VotingClassifier | |
from mlxtend.feature_selection import ColumnSelector | |
from sklearn.pipeline import make_pipeline | |
y = df1.index | |
x = preprocessing.scale(df1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn import svm | |
from sklearn.model_selection import train_test_split | |
from sklearn.model_selection import cross_val_score | |
from sklearn import preprocessing | |
import pandas as pd | |
import numpy as np | |
from statistics import mean | |
from sklearn.ensemble import RandomForestClassifier | |
#Read the csv file into dataframe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.warana.adservice.dto; | |
public class ResponseDTO<T> { | |
private boolean status; | |
private T responseObject; | |
public ResponseDTO() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: s near line 1, column 87 [UPDATE org.warana.adservice.entity.SellerAdvertisement s SET s.unitPrice = :unitPrice s.lastUpdated = :lastUpdated WHERE s.adId = :adId] | |
at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:297) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:189) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113) ~[hibern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: s near line 1, column 87 [UPDATE org.warana.adservice.entity.SellerAdvertisement s SET s.unitPrice = :unitPrice s.lastUpdated = :lastUpdated WHERE s.adId = :adId] | |
at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:297) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:189) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144) ~[hibernate-core-5.4.12.Final.jar:5.4.12.Final] | |
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:113) ~[hibern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Query getUpdateSellerAdvertisementQuery(SellerAdvertisementDTO sellerAdvertisementDTO, String adId, | |
EntityManager entityManager) { | |
StringBuilder queryBuilder = new StringBuilder("UPDATE SellerAdvertisement s SET "); | |
Map<String, Object> parameterValues = new HashMap<>(); | |
if (sellerAdvertisementDTO.getUserId() != null) { | |
queryBuilder.append("s.userId = :userId "); | |
parameterValues.put("userId", sellerAdvertisementDTO.getUserId()); | |
} | |
if (sellerAdvertisementDTO.getItemId() != null) { | |
queryBuilder.append("s.itemId = :itemId "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] Building WSO2 Carbon - SCIM - Common Component 2.0.16-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ org.wso2.carbon.identity.inbound.provisioning.scim2.common --- | |
[INFO] Deleting E:\wso2\sources\identity-inbound-provisioning-scim2\components\org.wso2.carbon.identity.inbound.provisioning.scim2.common\target | |
[INFO] | |
[INFO] --- maven-checkstyle-plugin:2.17:check (validate) @ org.wso2.carbon.identity.inbound.provisioning.scim2.common --- | |
[INFO] Starting audit... | |
E:\wso2\sources\identity-inbound-provisioning-scim2\components\org.wso2.carbon.identity.inbound.provisioning.scim2.common\src\test\java\org\wso2\carbon\identity\inbound\provisioning\scim2\common\test\unit\SCIMCommonUtilsTests.java:33: error: First sentence should end with a period. | |
Audit done. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import javax.net.ssl.SSLServerSocketFactory; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.net.SocketTimeoutException; |