Nishtha Thakur has Published 498 Articles

How to get last day of the previous month in MySQL?

Nishtha Thakur

Nishtha Thakur

Updated on 29-Jan-2020 05:12:09

4K+ Views

With the help of following MySQL query, we can get the last day of previous month −mysql> SELECT LAST_DAY(now() - INTERVAL 1 MONTH) AS 'LAST DAY OF PREVIOUS MONTH'; +----------------------------+ | LAST DAY OF PREVIOUS MONTH | +----------------------------+ | 2017-09-30                 | +----------------------------+ 1 row in set (0.00 sec)

HTML5 validity of nested tables

Nishtha Thakur

Nishtha Thakur

Updated on 28-Jan-2020 10:22:50

174 Views

The validator considers the following table as valid:                 Example                                                                                                                                                My                            Table                                                                                                                

Improve performance of a HTML5 Canvas with particles bouncing around

Nishtha Thakur

Nishtha Thakur

Updated on 28-Jan-2020 09:18:43

160 Views

To enhance the performance of Canvas with particles bouncing around, try the following:Separate the calculations from the drawing.Request a redraw after you have updated your calculations.Optimize collision detection by not testing evert particle against each other.Reduce callback usage.Reduce function calls.Inline.

Stop Web Workers in HTML5

Nishtha Thakur

Nishtha Thakur

Updated on 28-Jan-2020 07:46:34

1K+ Views

Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions and allows long tasks to be executed without yielding to keep the page responsive.Web Workers don't stop by themselves but the page that started them can stop them by calling ... Read More

How to detect all active JavaScript event handlers?

Nishtha Thakur

Nishtha Thakur

Updated on 09-Jan-2020 10:20:19

780 Views

The simplest solution is to use jQuery to detect all active JavaScript event handlers.ExampleYou can try to run the following code to detect active event handlersLive Demo                          var myEvent = $("#demo");          myEvent.mouseover(function() {});          $.each(myEvent.data("events"), function(i, e) {             alert(i);          });                     Demo Text    

Standard way to integrate SAP with external system like .NET application

Nishtha Thakur

Nishtha Thakur

Updated on 18-Dec-2019 07:58:19

385 Views

The SAP tables can be directly accessed by the .net application but it is not recommended to do so. Generally, the SAP database is accessed by the program or reports and there are security checks running behind that and directly accessing SAP tables can cause security threats.ERP Connect is the ... Read More

Join using CE functions in SAP HANA database

Nishtha Thakur

Nishtha Thakur

Updated on 18-Dec-2019 07:42:39

340 Views

You can try using projection node as followsExampletable1 = CE_PROJECTION(:T1, ["ACCT_ID", "SALARY"]); table2 = CE_PROJECTION(:T2, ["EMPL_ID" AS “ACCT_ID”, "ADD", "ZIP", "STATE"]); var_out = CE_JOIN(:table1, :table2, [“ACCT_ID”])Using Projection node, you can rename the column names. Note that EMPL_ID has been renamed to ACCT_IDRead More

Preserve select order within MySQL UNION?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

308 Views

It’s a good choice to use CASE statement. Do not use UNION. Let us first create a table −mysql> create table DemoTable    (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    ShippingDate datetime    ); Query OK, 0 rows affected (0.63 sec)Insert some records in the table using ... Read More

How to search by specific pattern in MySQL?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

159 Views

You can use regular expression for this. Let us first create a table −mysql> create table DemoTable    (    UserId varchar(100)    ); Query OK, 0 rows affected (1.28 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('User-123-G'); Query OK, 1 row affected (0.14 ... Read More

How to center align component using BoxLayout with Java?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:26

7K+ Views

Let us first create a panel and set some buttons −JPanel panel = new JPanel(); JButton btn1 = new JButton("One"); JButton btn2 = new JButton("Two"); JButton btn3 = new JButton("Three"); JButton btn4 = new JButton("Four"); JButton btn5 = new JButton("Five"); panel.add(btn1); panel.add(btn2); panel.add(btn3); panel.add(btn4); panel.add(btn5);Now, use the setAlignmentX() and within ... Read More

Advertisements