Friday, March 4, 2022

Recent Questions - Stack Overflow

Recent Questions - Stack Overflow

Recent Questions - Stack Overflow


INotifyPropertyChanged interface bug in vb.net and winforms?

Posted: 04 Mar 2022 01:44 AM PST

I've created a small project in vb.net with a class and the INotifypropertyChanged interface. The properties from the class bound to text boxes in the main form.

Everything is working fine, but there is one big problem. If I change one property by entering a new value in the text box, the getter of all other properties in the same class firing to. If I enter values manually, that's no issue, but if I have external changes - like timer updates - no entering is possible anymore. The cursor in all text boxes flickering, because the external changed property is fires every time.

Why, I mean, this is a bug? I've built the same application and functions in WPF and C#. And if I change a property, only the getter of this property firing - not all other in the same class. To reproduce this issue, I've created a small application on GitHub.

Link to the GitHub Repo: Link

GIF Record from the issue

The issue: It's not possible to enter a value in the Double Number text box, because the cursor is flickering and no enter is possible.

Spark Error: Executor XXX finished with state EXITED message Command exited with code 1 exitStatus 1

Posted: 04 Mar 2022 01:43 AM PST

I build the standalone spark cluster on Oracle linux. I add this line in spark-env.sh on Master:

 export SPARK_MASTER_HOST=x.x.x.x  

And add these lines in spark-env.sh in both Master and Worker:

 export PYSPARK_PYTHON=/usr/bin/python3.8   export PYSPARK_DRIVER_PYTHON=/usr/bin/python3.8  

Also, I insert IP of worker in worker file for both Master and Worker. I start Spark Cluster in this way: In master:

 /opt/spark/sbin/start-master.sh  

In worker:

 /opt/spark/sbin/start-worker.sh spark://x.x.x.x:7077  

In fact, I have one worker and one master. I configure ~/.bashrc like this:

 export JAVA_HOME=/opt/oracle/java/jdk1.8.0_25   export PATH=$JAVA_HOME/bin:$PATH   alias python=/usr/bin/python3.8   export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_4:$LD_LIBRARY_PATH   export PATH=/opt/oracle/instantclient_21_4:$PATH   export SPARK_HOME=/opt/spark   export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin   export PYSPARK_HOME=/usr/bin/python3.8   export PYSPARK_DRIVER_PYTHON=python3.8   export PYSPARK_PYTHON=/usr/bin/python3.8          

While I run spark-submit I have no error, but the command run for ever without any result. I see these line:

 22/03/04 12:07:40 INFO TaskSchedulerImpl: Adding task set 0.0 with 2 tasks resource profile 0   22/03/04 12:07:41 INFO StandaloneAppClient$ClientEndpoint: Executor updated: app-20220304120738-0000/0 is now EXITED (Command exited with code 1)   22/03/04 12:07:41 INFO StandaloneSchedulerBackend: Executor app-20220304120738-0000/0 removed: Command exited with code 1   22/03/04 12:07:41 INFO StandaloneAppClient$ClientEndpoint: Executor added: app-20220304120738-0000/3 on worker-20220304120443-192.9.200.68-42185 (192.9.200.68:42185) with 2 core(s)   22/03/04 12:07:41 INFO StandaloneSchedulerBackend: Granted executor ID app-20220304120738-0000/3 on hostPort 192.9.200.68:42185 with 2 core(s), 2.0 GiB RAM  

I check worker log, and I have this error:

 22/03/04 12:07:38 INFO SecurityManager: SecurityManager: authentication disabled; ui acls disabled; users  with view permissions: Set(root); groups with view permissions: Set(); users  with m$   22/03/04 12:07:38 INFO ExecutorRunner: Launch command: "/opt/oracle/java/jdk1.8.0_25/bin/java" "-cp" "/opt/spark/conf/:/opt/spark/jars/*" "-Xmx2048M" "-Dspark.driver.port=40345" "-XX:+PrintGC$   22/03/04 12:07:38 INFO ExecutorRunner: Launch command: "/opt/oracle/java/jdk1.8.0_25/bin/java" "-cp" "/opt/spark/conf/:/opt/spark/jars/*" "-Xmx2048M" "-Dspark.driver.port=40345" "-XX:+PrintGC$   22/03/04 12:07:38 INFO ExecutorRunner: Launch command: "/opt/oracle/java/jdk1.8.0_25/bin/java" "-cp" "/opt/spark/conf/:/opt/spark/jars/*" "-Xmx2048M" "-Dspark.driver.port=40345" "-XX:+PrintGC$   22/03/04 12:07:41 INFO Worker: Executor app-20220304120738-0000/0 finished with state EXITED message Command exited with code 1 exitStatus 1   22/03/04 12:07:41 INFO ExternalShuffleBlockResolver: Clean up non-shuffle and non-RDD files associated with the finished executor 0   22/03/04 12:07:41 INFO ExternalShuffleBlockResolver: Executor is not registered (appId=app-20220304120738-0000, execId=0)  

spark-submit is like this:

 /opt/spark/bin/spark-submit --master spark://x.x.x.x:7077 --files etl/sparkConfig.json --py-files etl/brn_utils.py,etl/cst.py,etl/cst_utils.py,etl/emp_utils.py,etl/general_utils.py,etl/grouping.py,etl/grp_state.py,etl/conn.py etl/main.py  

I test in root user, also I create spark user and nothing change.

Would you please guide me what is wrong?

Thanks.

How to scrape glassdoor salary data with beautifulsoup and selenium

Posted: 04 Mar 2022 01:43 AM PST

I am trying to scrape salary data from glassdoor website. However, the problem is that during the process the data is not collected for some reasons. And I am not sure where the error is.

email = "" # your email here  password = "" # your password here    # Manual options for the city, num pages to scrape, and URL  pages = 700  cityName = "United-Kingdom"  cityURL = "https://www.glassdoor.co.uk/Salaries/uk-systems-engineer-salary-SRCH_IL.0,2_IN2_KO3,19.htm?clickSource=searchBtn"    def obj_dict(obj):      return obj.__dict__  

No comments:

Post a Comment