  C RUBY-ON-RAILS MYSQL ASP.NET DEVELOPMENT RUBY .NET LINUX SQL-SERVER REGEX WINDOWS ALGORITHM ECLIPSE VISUAL-STUDIO STRING SVN PERFORMANCE APACHE-FLEX UNIT-TESTING SECURITY LINQ UNIX MATH EMAIL OOP LANGUAGE-AGNOSTIC VB6 MSBUILD # What does the notation () => mean and how to use it?

## What does the notation () => mean and how to use it? Tag : javascript , By : kraszie Date : November 24 2020, 09:00 AM

I hope this helps you . That's an ES2015 (aka ES6) arrow function. It's a function expression that inherits this (and arguments, and a few other things) from the context where it's created. So basically:
``````test: function() { return { type: 'TEST_ACTION' }; }
`````` Boards Message : You Must Login Or Sign Up to Add Your Comments .

## Difference between big-O notation and theta notation, why (theta) Ө-notation is suitable to insertion sort to describe i

Tag : algorithm , By : alexmajy
Date : March 29 2020, 07:55 AM
To fix this issue We use Ө-notation to write worst case running time of insertion sort. But I’m not able to relate properties of Ө-notation with insertion sort, why Ө-notation is suitable to insertion sort. How does the insertion sort function f(n), lies between the c1*n^2 and c2*n^2 for all n>=n0. , The use of Ө-notation :
``````suppose we have a function ,
f(n) = 4logn + loglogn
we can write this function as
f(n) = Ө(logn)
Because its upper bound and lower bound
are O(logn) and  Ω(logn) repectively, which are same
so it is legal to write this function as ,
f(n)=  Ө(logn)
``````
``````     **Finding upper bound :**

f(n) = 4logn+loglogn

For all sufficience value of n>=2

4logn <= 4 logn
loglogn <= logn

Thus ,

f(n) = 4logn+loglogn <= 4logn+logn
<= 5logn
= O(logn)       // where c1 can be 5 and n0 =2
**Finding lower bound :**

f(n) = 4logn+loglogn

For all sufficience value of n>=2

f(n) = 4logn+loglogn >= logn
Thus,              f(n) =  Ω(logn)   // where c2 can be 1 and n0=2

so ,
f(n) = Ɵ(logn)
``````
``````If running time of insertion sort is described by simple function f(n).
In particular , if f(n) = 2n^2+n+1 then

Finding upper bound:
for all sufficient large value of n>=1
2n^2<=2n^2   ------------------- (1)
n <=n^2    --------------------(2)
1 <=n^2    --------------------(3)
adding eq 1,2 and 3, we get.
2n^2+n+1<= 2n^2+n^2+n^2
that is
f(n)<= 4n^2
f(n) = O(n^2)  where c=4 and n0=1

Finding lower bound:
for all sufficient large value of n>=1
2n^2+n^2+1 >= 2n^2
that is ,
f(n) >= 2n^2
f(n) = Ω(n^2) where c=2 and n0=1
because upper bound and lower bound are same,
f(n) = Ө(n^2)

if f(n)= 2n^2+n+1 then, c1*g(n) and c2*g(n) are presented by diagram:
``````

## How to convert big negative scientific notation number into decimal notation string in javascript?

Tag : javascript , By : Steve Jones
Date : March 29 2020, 07:55 AM
like below fixes the issue This works for any positive or negative number with the exponential 'E', positive or negative. (You can convert a numerical string to a number by prefixing '+', or make it a string method, or a method of any object, and call the string or number.)
``````Number.prototype.noExponents= function(){
var data= String(this).split(/[eE]/);
if(data.length== 1) return data;

var  z= '', sign= this<0? '-':'',
str= data.replace('.', ''),
mag= Number(data)+ 1;

if(mag<0){
z= sign + '0.';
while(mag++) z += '0';
return z + str.replace(/^\-/,'');
}
mag -= str.length;
while(mag--) z += '0';
return str + z;
}

var n=2.54E-20;
n.noExponents();
``````
``````"0.0000000000000000000254"
``````

## What is the difference between array notation and object notation when creating multiple chunks in webpack?

Tag : javascript , By : Bharath
Date : March 29 2020, 07:55 AM
To fix this issue If you just want to specify several chunks you can just add hot-loading script to one of them:
``````entry: {
vandor: './vendor/vendor.js',
app: ['webpack-hot-middleware/client', './src/js/entry.js']
},
``````
``````entry: {
vandor: ['./vendor/vendor.js'],
app: ['./src/js/entry.js']
},
...
webpackConfig.entry.app.unshift('webpack-hot-middleware/client');
``````

## How do I replace array-style notation in templates with object-notation when switching from cakephp 2.x to 3.x

Tag : php , By : Blaise Roth
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further When migrating, what is a fast way to replace the array notation of cakephp 2.x , this regular expression works: find this
``````\\$order\['(\w+)'\]
``````
``````\$order->\1
``````
``````\\$offcut->\$1
``````

## Prevent Jupyter from switching between normal mathematical notation and scientific notation

Tag : python , By : Heals1ic
Date : March 29 2020, 07:55 AM
around this issue I want to ask a question about turning off scientific notation of numbers in Jupyter notebook. , This is a numpy print issue:
``````In : with np.printoptions(suppress=True):
...:     np.array([[1.63276953e+02, 1.41858314e-01],
...:    [1.64042353e+02, 5.13131094e-01]])
...:
In : with np.printoptions(suppress=True):
...:    print( np.array([[1.63276953e+02, 1.41858314e-01],
...:    [1.64042353e+02, 5.13131094e-01]]))
...:
...:
[[163.276953     0.14185831]
[164.042353     0.51313109]]

In : with np.printoptions(suppress=False):
...:    print( np.array([[1.63276953e+02, 1.41858314e-01],
...:    [1.64042353e+02, 5.13131094e-01]]))
...:
...:
[[1.63276953e+02 1.41858314e-01]
[1.64042353e+02 5.13131094e-01]]
`````` 