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

# How to use dot notation after +

By : Olexandr Grasymenko
Date : October 17 2020, 06:10 PM
seems to work fine I have JSON data in another file, I am accessing that from a module file. I am using a loop to get lots of data easily but I am stuck on a problem. When using dot notation it goes cars.c1.name, but in my example it is cars.c+i+.. and then it stops because I don't know how to add .name to that. , here is what's wrong with what you are doing:
code :
``````const carName = cars.c+i+.name; // not working
``````
``````const carName = cars["c"+ i].name;
``````

Share :

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

By : Heath Burnett
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 :
code :
``````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?

By : man xiao
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.)
code :
``````Number.prototype.noExponents= function(){
var data= String(this).split(/[eE]/);
if(data.length== 1) return data[0];

var  z= '', sign= this<0? '-':'',
str= data[0].replace('.', ''),
mag= Number(data[1])+ 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?

By : Giri Shankar
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:
code :
``````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

By : Dmytro Melnyk
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
code :
``````\\$order\['(\w+)'\]
``````
``````\$order->\1
``````
``````\\$offcut->\$1
``````

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

By : user3701457
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:
code :
``````In [544]: with np.printoptions(suppress=True):
...:     np.array([[1.63276953e+02, 1.41858314e-01],
...:    [1.64042353e+02, 5.13131094e-01]])
...:
In [545]: 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 [546]: 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]]
``````