Categories
Mastering Development

Laravel password validation rule with error

Validation rule: The password contains characters from at least three of the following five categories: English uppercase characters (A – Z) English lowercase characters (a – z) Base 10 digits (0 – 9) Non-alphanumeric (For example: !, $, #, or %) Unicode characters I want to use the validation rule of password like above and […]

Categories
Mastering Development

how to create a map with value as templatized function pointer

Below code doesn’t compile, please help me where I’m missing. I have member functions with different return types and I need to call those functions by just passing a string name. So I have created a map, Below is the example which matches my requirement, but I’m not able to compile. template<typename T1> shared_ptr<T1> GetBasicClassInfo() […]

Categories
Mastering Development

Python, Nameko, nameko-sqlalchemy : Error : db_uris = self.container.config[DB_URIS_KEY] KeyError: ‘DB_URIS’

Hi everyone, First of all, I want to let you know that I am just beginning to learn about the python micro service library Nameko. I am trying to create a simple micro service that add a user in Sqlite database using nameko-sqlalchemy extention. When I try to run the micro service using the Nameko […]

Categories
Mastering Development

PHP – Extract Custom Operators from String

I have a MySQL database back-end which is searched via PHP. I’m trying to implement custom operators for detailed searching. Here is an example: $string = “o:draw t:spell card”; Where o: = Search by Description and t: = Card Typing. This would be similar to a custom syntax from a site like Scryfall https://scryfall.com/docs/syntax Here […]

Categories
Mastering Development

How to convert rdd object to dataframe in Scala

I read data from ElasticSearch and save into an RDD. val es_rdd = sc.esRDD(“indexname/typename”,query=”?q=*”) The rdd has the next example data: (uniqueId,Map(field -> value)) (uniqueId2,Map(field2 -> value2)) How can I convert this RDD (String, Map to a Dataframe (String, String, String)?

Categories
Mastering Development

Python: SqlAlchemy map existing view to ORM Object

I currently try to map an existing view within my postgreSQL DB to an SqlAlchemy ORM object in python. My view has the following name path_number_view and joins some tables together. It is wokring fine. But I am not able to map the view to an ORM object, when starting the application I get an […]

Categories
Cryptocurrency Ethereum Mastering Development

how i know what function run the trasaction?

i have that question , how i know what function runs the transaction ?, let me explain , if i do a transaction in remix.ethereum i can see the transaction in the bottom and in the details of this i see the next example for “to:” : to: myContract.createForm(address,uint256,string,string,string[],string[],string[],string[]) but if i see the same […]

Categories
Mastering Development

Why is one user getting NoSuchMethodError where tens of thousands don’t?

How can one of our many users get java.lang.NoSuchMethodError: at com.mycelium.wallet.activity.settings.SettingsPreference.getLanguage (SettingsPreference.kt:73) at com.mycelium.wallet.WalletApplication.onCreate (WalletApplication.java:109) at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1127) on this line of Kotlin code: @JvmStatic fun getLanguage(): String? = sharedPreferences.getString(Constants.LANGUAGE_SETTING, Locale.getDefault().language) There are three function calls on this line: android.content.SharedPreferences::getString(String,String), java.util.Locale::getDefault() and java.util.Locale::getLanguage() all of which are available since API 1. The only affected user […]

Categories
Mastering Development

Deserialize Avro message with schema type as object

I’m reading from a Kafka topic, which contains Avro messages. I have given below schema. I’m unable to parse the schema and deserialize the message. {“type”: “record”, “name”: “Request”, “namespace”: “com.sk.avro.model”, “fields”: [ { “name”: “jobId”, “type”: [ “null”, “string” ], “default”: null, “description”: “REQUIRED ” }, { “name”: “businessUnit”, “type”: “com.example.BusinessUnit”, “default”: “ABC”, “description”: […]

Categories
Mastering Development

Laravel canot register for new uses

I am creating a simple login function on my website with a registration feature. The registration feature is functional and users are appearing in the database. However, when I try to register new user, it did not inserted into database and stay on the same page and refresh data in form register. When I enter […]