Krantik Chavan has Published 278 Articles

Chrome and HTML5 GeoLocation denial callback

Krantik Chavan

Krantik Chavan

Updated on 28-Jan-2020 10:06:05

185 Views

For timeout callback in Google Chrome, try the following code:_callback = false; function successCallback(position) {    _callback = true;    console.log('success'); } function errorCallback(error) {    _callback = true;    alert('error'); } setTimeout(function(){if(!_callback)console.log('ignored')}, 20000); navigator.geolocation.getCurrentPosition(    successCallback,    errorCallback,    {timeout: 2000} );

How to either determine SVG text box width or force line breaks after 'x' characters?

Krantik Chavan

Krantik Chavan

Updated on 27-Jan-2020 07:26:08

247 Views

Use the getBBox() function and add a single word at a time to a text object. When it gets too wide, you need to add a line feed.var a = Raphael(500, 500); var b = a.text(100, 100).attr('text-anchor', 'start'); var maxWidth = 100; var content = "Lorem ipsum dolor sit amet, ... Read More

Match any single character in the given set.

Krantik Chavan

Krantik Chavan

Updated on 20-Jan-2020 11:00:37

107 Views

To match any single character in the given set with JavaScript RegExp, use the [aeiou] metacharacter.Example           JavaScript Regular Expression                        var myStr = "Welcome to our website!";          var reg = /[we]/g;          var match = myStr.match(reg);                    document.write(match);          

How can I add debugging code to my JavaScript?

Krantik Chavan

Krantik Chavan

Updated on 17-Jan-2020 11:06:09

205 Views

To add debugging code to JavaScript, use the alert() or document.write() methods in your program. For example, var debugging = true; var whichImage = "widget"; if( debugging ) alert( "Calls swapImage() with argument: " + whichImage ); var swapStatus = swapImage( whichImage ); if( debugging ) alert( "Exits ... Read More

How to determine if an argument is sent to the JavaScript function?

Krantik Chavan

Krantik Chavan

Updated on 07-Jan-2020 10:29:12

112 Views

To determine if an argument is sent to function, use “default” parameters.ExampleYou can try to run the following to implement itLive Demo                    function display(arg1 = 'Tutorials', arg2 = 'Learning') {             document.write(arg1 + ' ' +arg2+"");          }          display('Tutorials', 'Learning');          display('Tutorials');          display();          

How to use variable number of arguments to function in JavaScript?

Krantik Chavan

Krantik Chavan

Updated on 07-Jan-2020 09:37:34

630 Views

To use a variable number of arguments to function, use the arguments object.ExampleYou can try to run the following code to implement arguments to a function in JavaScriptLive Demo                    function functionArgument(val1, val2, val3)  {             ... Read More

Fetching attribute of SAP Webdynpro component in new component

Krantik Chavan

Krantik Chavan

Updated on 18-Dec-2019 08:41:11

182 Views

You need to do the below steps in order to pass values from one Webdynpro component to another:Create both componentsIn the first component, create a method which will call the second componentCreate a parameter in the context of the first component which will be passedCall the first component; once the ... Read More

IMPORTING, EXPORTING and CHANGING Keywords in ABAP

Krantik Chavan

Krantik Chavan

Updated on 09-Dec-2019 06:49:36

4K+ Views

IMPORTING transfers a value from the caller to the called method by passing an actual parameterEXPORTING is just opposite to what IMPORTING does. IT passes value from the method to Caller.CHANGING is transferring the value from caller to method by a variable which is processed or changed and the changed ... Read More

Using SSIS to load data from SQL Server to SAP BW

Krantik Chavan

Krantik Chavan

Updated on 09-Dec-2019 06:24:34

435 Views

I am wondering why you are planning to opt for SSIS for this. It would not be that easy and compatible. Instead, I will suggest you to for any of the below two optionsUse SAP BW standard anyDB source systemBO Data servicesBoth of the options are well compatible and do ... Read More

Using SAP connector 3.0 on an MVC application

Krantik Chavan

Krantik Chavan

Updated on 06-Dec-2019 11:03:47

281 Views

Try adding a new row before calling SetValue. Please check the below:employeeHoli.Append(); employeeHoli.SetValue("ColumnName", "0000345");You use a table parameter that can hold multiple lines. You have to append the above lines that will return some structure and you can fill that structure.

Advertisements