How do I call paint event?

In a method of your Form or Control, you have 3 choices: this.Invalidate(); // request a delayed Repaint by the normal MessageLoop system this.Update(); // forces Repaint of invalidated area this.Refresh(); // Combines Invalidate() and Update() Normally, you would just call Invalidate() and let the system combine that with other Screen updates. If you’re in … Read more

Custom Error Label Placement using jQuery validate (For all or some of your errors)

So if you want all your jQuery Validate error messages to appear in one place you would use http://docs.jquery.com/Plugins/Validation/validate#toptions (Find errorPlacement) option on that page. I noticed some answers on here answer one but not both options. 1) That being said if you want custom placement for all of your errors you can do this: … Read more

How can I select an element by ID with jQuery using regex?

You can combine both selectors in a multiple attribute selector. ​$(“[id^=AAA_][id$=_BBB]”) It will return all the elements that matches all the specified attribute filters: [id^=AAA_] matches elements with id attribute starting with AAA_, and [id$=_BBB] matches elements with id attribute ending with _BBB. Another generic alternatives: Using a custom :regex() selector, Using a .filter()-based approach.

Which eslint rules in my config are slow?

eslint shows the spent times of rules if the environment variable TIMING is set. For example: $ TIMING=1 eslint lib Rule | Time (ms) | Relative :—————————-|———-:|——–: valid-jsdoc | 203.798 | 6.7% camelcase | 142.146 | 4.6% no-unmodified-loop-condition | 136.811 | 4.5% indent | 127.138 | 4.2% no-undefined | 124.525 | 4.1% keyword-spacing | 85.397 … Read more

Running Jupyter notebook in a virtualenv: installed sklearn module not available

You probably have not installed jupyter / IPython in your virtualenv. Try the following: python -c “import IPython” and check that the jupyter command found in your $PATH is the one from the bin folder of your venv: which jupyter For windows users in a powershell console, you can use the following to check that … Read more

Vagrant, how to specify the disk size?

I have used the vagrant plugin vagrant-disksize to resize the disk. It worked. It can also help to specify the initial disk size. Run the following at the command line: vagrant plugin install vagrant-disksize and use the following in your Vagrantfile: vagrant.configure(‘2’) do |config| config.vm.box = ‘ubuntu/xenial64’ config.disksize.size=”50GB” end