问:
How do i remove "default"?
i have been having some problems understanding where i went wrong in my codes. I have been trying to print out the output of my codes into a json file but apparently, my list is empty because it has this "default" thing printed out. How do i change it such that the books map has Book Id and Serial no. part into the empty {} instead? I already did my own research but unfortunately none of the forums that i went to provided an answer.

Here's my output:

```<code>{"books": {}, "_default":
  {
   "1": {Book ID: XXXX bookid 1 XXXX},
   "2": {Serial No.: XXX serialno 1 XXXX}
  },
 {
   "1": {Book ID: XXX bookid 2 XXXX},
   "2": {Serial No.: XXX serial no. 2 XXX}
 }
}
</code>```

Here are my codes:

```<code>with open("/home/pi/Desktop/json/pillar1.json", 'w+'):
        db = TinyDB('/home/pi/Desktop/json/pillar1.json')
        table = db.table('Books')
        db.insert_multiple([{'Book ID' : variable}, {'Serial no' : variable]}])
</code>```

答:
There is always a _default table, described here

Operations like db.insert_multiple will happen on the _default table.
Which you actually show in your file sniplet correctly.

Table "books" is empty

```<code>"books": {}
</code>```

and the inserts have take place on the _default table

```<code>"_default":
  {
   "1": {Book ID: XXXX bookid 1 XXXX},
   "2": {Serial No.: XXX serialno 1 XXXX}
  },
 {
   "1": {Book ID: XXX bookid 2 XXXX},
   "2": {Serial No.: XXX serial no. 2 XXX}
 }
</code>```

In order to insert in a table, you can do the following:

```<code>with open("/home/pi/Desktop/json/pillar1.json", 'w+'):
        db = TinyDB('/home/pi/Desktop/json/pillar1.json')
        table = db.table('books')
        table.insert_multiple([{'Book ID' : variable}, {'Serial no' : variable]}])
</code>```

note the table.insert_multiple in stead of db.insert_multiple

[EDIT]

you can set your own default table as described here

Title: How do i remove "default"?

Body:
i have been having some problems understanding where i went wrong in my codes. I have been trying to print out the output of my codes into a json file but apparently, my list is empty because it has this "default" thing printed out. How do i change it such that the books map has Book Id and Serial no. part into the empty {} instead? I already did my own research but unfortunately none of the forums that i went to provided an answer.

Here's my output:

{"books": {}, "_default":
  {
   "1": {Book ID: XXXX bookid 1 XXXX},
   "2": {Serial No.: XXX serialno 1 XXXX}
  },
 {
   "1": {Book ID: XXX bookid 2 XXXX},
   "2": {Serial No.: XXX serial no. 2 XXX}
 }
}

Here are my codes:

with open("/home/pi/Desktop/json/pillar1.json", 'w+'):
        db = TinyDB('/home/pi/Desktop/json/pillar1.json')
        table = db.table('Books')
        db.insert_multiple([{'Book ID' : variable}, {'Serial no' : variable]}])

Body:
There is always a _default table, described here

Operations like db.insert_multiple will happen on the _default table.
Which you actually show in your file sniplet correctly.

Table "books" is empty

"books": {}

and the inserts have take place on the _default table

"_default":
  {
   "1": {Book ID: XXXX bookid 1 XXXX},
   "2": {Serial No.: XXX serialno 1 XXXX}
  },
 {
   "1": {Book ID: XXX bookid 2 XXXX},
   "2": {Serial No.: XXX serial no. 2 XXX}
 }

In order to insert in a table, you can do the following:

with open("/home/pi/Desktop/json/pillar1.json", 'w+'):
        db = TinyDB('/home/pi/Desktop/json/pillar1.json')
        table = db.table('books')
        table.insert_multiple([{'Book ID' : variable}, {'Serial no' : variable]}])

note the table.insert_multiple in stead of db.insert_multiple

[EDIT]

you can set your own default table as described here


来源: stackexchange

问:
Urlencode to list in python
```<code>   finalKeywords = []
   #after populating finalKeywords
   query = {
       "apiKey" : self.apikey,
        "country" : country,
        "currency" : currency,
        "kw" : finalKeywords,
        "t" : int(time.time())
    }
    uri = urllib.urlencode(query, True)
    print uri
</code>```

After decoding uri I get

```<code>country=&apiKey=5f0092f1777c3a5ed0de&kw=iphone&kw=android&t=1496924489&currency=usd
</code>```

While my expected output is

```<code>country=&apiKey=5f0092f1777c3a5ed0de&kw[0]=iphone&kw[1]=android&t=1496924489&currency=usd
</code>```

What to do..? I have been looking for solutions but unable to get.

答:
Based on the W3C spec for URLs, [ and ] aren't valid in the search string, and so will be escaped by urlencode. With that caveat, you can construct a dictionary with unique keys by using a dictionary comprehension:

```<code>kw_dict = { "kw[{}]".format(n): finalKeywords[n] for n in range(0, len(finalKeywords)) }
</code>```

You can then add this to the other parts of your query as follows:

```<code>query = dict({
    "apiKey" : self.apikey,
    "country" : country,
    "currency" : currency,
    "t" : int(time.time())
}, **kw_dict)
</code>```

ContentLicense: CC BY-SA 3.0

Title: Urlencode to list in python

Body:
   finalKeywords = []
   #after populating finalKeywords
   query = {
       "apiKey" : self.apikey,
        "country" : country,
        "currency" : currency,
        "kw" : finalKeywords,
        "t" : int(time.time())
    }
    uri = urllib.urlencode(query, True)
    print uri

After decoding uri I get

country=&apiKey=5f0092f1777c3a5ed0de&kw=iphone&kw=android&t=1496924489&currency=usd

While my expected output is

country=&apiKey=5f0092f1777c3a5ed0de&kw[0]=iphone&kw[1]=android&t=1496924489&currency=usd

What to do..? I have been looking for solutions but unable to get.

Body:
Based on the W3C spec for URLs, [ and ] aren't valid in the search string, and so will be escaped by urlencode. With that caveat, you can construct a dictionary with unique keys by using a dictionary comprehension:

kw_dict = { "kw[{}]".format(n): finalKeywords[n] for n in range(0, len(finalKeywords)) }

You can then add this to the other parts of your query as follows:

query = dict({
    "apiKey" : self.apikey,
    "country" : country,
    "currency" : currency,
    "t" : int(time.time())
}, **kw_dict)


问:
ScrollMagic setPin in Safari
I have layout like this fiddle demo. and I have to stick on this layout only.

Onclick of section4 button the section .setpin gets activated. And page jumps and reaches 50% up. It should not Jump.

This is happening only in Safari.

```<code>$('.next2').click(function(){
    var s4 = new ScrollMagic.Scene({
      triggerElement:'#section4',
      triggerHook:0,
      duration:'150%',
      offset:0
    })
    .setPin('#section4')
    .addTo(controller);
});
</code>```

Note: Please check fiddle demo in safari. Because it works fine in chrome and mozilla.

答: Try to add transform: translate3D(0,0,0); to fixed div.

Title: ScrollMagic setPin in Safari

Body:
I have layout like this fiddle demo. and I have to stick on this layout only.

Onclick of section4 button the section .setpin gets activated. And page jumps and reaches 50% up. It should not Jump.

This is happening only in Safari.

$('.next2').click(function(){
    var s4 = new ScrollMagic.Scene({
      triggerElement:'#section4',
      triggerHook:0,
      duration:'150%',
      offset:0
    })
    .setPin('#section4')
    .addTo(controller);
});

Note: Please check fiddle demo in safari. Because it works fine in chrome and mozilla.


问:
Extract output from scipy optimise
After minimising a two parameter function in Python using the Powell algorithm, I am left with the following output:

```<code>fun: -3.5839582049322310
maxcv: 0.0
message: 'Optimization terminated successfully.'
nfev: 98
status: 1
success: True
   x: array([ 1.9116445888705806,  3.7094985019795996])
</code>```

I wish to extract the two optimised parameters in x to then be carried through to another part of the script. Is there a way to automate the extraction of these numbers without having to manually enter them in the script? I have looked in the scipy documentation but have not found anything on how to access the output.

答:
It would be helpful to see the code you use to calculate your result, now I can only guess what you did.

I assume your code looks like:

```<code>res = scipy.optimize.minimize(fun, f0, method='Powell')
</code>```

This function returns an optimizeResult object. To get the actual result of your optimization you need to call

```<code>print(res.x)
</code>```

The type of res.x is a numpy.ndarray. If you want to proceed only if your calculation was successful, then you can do something like

```<code>if res.success:
    print('success, the results are')
    print(res.x)
</code>```

Title: Extract output from scipy optimise

Body:
After minimising a two parameter function in Python using the Powell algorithm, I am left with the following output:

fun: -3.5839582049322310
maxcv: 0.0
message: 'Optimization terminated successfully.'
nfev: 98
status: 1
success: True
   x: array([ 1.9116445888705806,  3.7094985019795996])

I wish to extract the two optimised parameters in x to then be carried through to another part of the script. Is there a way to automate the extraction of these numbers without having to manually enter them in the script? I have looked in the scipy documentation but have not found anything on how to access the output.

Body:
It would be helpful to see the code you use to calculate your result, now I can only guess what you did.

I assume your code looks like:

res = scipy.optimize.minimize(fun, f0, method='Powell')

This function returns an optimizeResult object. To get the actual result of your optimization you need to call

print(res.x)

The type of res.x is a numpy.ndarray. If you want to proceed only if your calculation was successful, then you can do something like

if res.success:
    print('success, the results are')
    print(res.x)


问:
Convincing arguments for using local ranges in Excel over global ones
I believe that it may well be better to use Localised Range names in Excel over global ones.  In Excel 2003 when an range is created using (what I will call) the Name entry box at the top left above the A column, I know that they are global.  I understand it is possible although in most cases improbable to have a Range locally on a sheet with the same name and this will cause very confusing behaviour in both Excel and also in VBA?

I have Googled about, without finding may articles about the subject ( I may have to blog one of my own after this).  I wanted to know thoughts on what other Professional Excel developers do and why?

答:
It's a matter of opinion: different users will have different preferences.

I use global names because I want a convenient and stable label that identifies a range throughout the workbook - in formulae on any worksheet and in VBA processes throughout the entire project.

Essentially, I regard a named range as a global variable and an essential tool for stable cross-sheet processes.

Local names are for declaring different ranges on different sheets with the same name, and that's a recipe for confusion and errors. That being said, Joel Goodwin has supplied an answer with a very good reason for using local names: modular code (like a template generator) that does the same thing on different sheets. I've built template generators that do exactly that.

I'd use local names more if better interfaces were available to view them and use them in VBA - JKP's Names Manager gets a lot of use where I work, but it doesn't eliminate the confusion and errors that were designed-in by Microsoft's implementation.

ContentLicense: CC BY-SA 2.5


问:
Replace for with list comprehension
In this script I have used both list comprehension and for. I need to replace for loop with comprehension and add this solve inside list comprehension.

How can add

```<code>for i in k:
    count_list.append(l.count(i))
</code>```

inside this block

```<code>pairs = [int(pair/2) for pair in count_list if int(pair/2) != 0]
</code>```

My code:

```<code>def sockMerchant(ar):
    l = ar
    k = set(l)
    count_list = []
    for i in k:
         count_list.append(l.count(i))
    pairs = [int(pair/2) for pair in count_list if int(pair/2) != 0]
    return sum(pairs)

n = int(input().strip())
ar = list(map(int, input().strip().split(' ')))
result = sockMerchant(ar)
print(result)
</code>```

答:
You should not be using a list comprehension at all, nor the for loop you have now. The loop is inefficient; by using list.count() you are traversing the whole list l for every unique value, creating a O(N^2) loop.

Use a collections.Counter() object instead and count in O(N) time:

```<code>from collections import Counter

def sockMerchant(ar):
    counts = Counter(ar)
    return sum(count//2 for count in counts.values())
</code>```

or even

```<code>def sockMerchant(ar):
    return sum(count//2 for count in Counter(ar).values())
</code>```

if you insist on a single line.

Note that sum() doesn't mind a few 0 values here and there, so I removed the if test for single 'socks'. Also, I used the // floor division operator rather than turning the floating point result of dividing by 2 back into an integer.

Title: Replace for with list comprehension

Body:
In this script I have used both list comprehension and for. I need to replace for loop with comprehension and add this solve inside list comprehension.

How can add

for i in k:
    count_list.append(l.count(i))

inside this block

pairs = [int(pair/2) for pair in count_list if int(pair/2) != 0]

My code:

def sockMerchant(ar):
    l = ar
    k = set(l)
    count_list = []
    for i in k:
         count_list.append(l.count(i))
    pairs = [int(pair/2) for pair in count_list if int(pair/2) != 0]
    return sum(pairs)

n = int(input().strip())
ar = list(map(int, input().strip().split(' ')))
result = sockMerchant(ar)
print(result)

Body:
You should not be using a list comprehension at all, nor the for loop you have now. The loop is inefficient; by using list.count() you are traversing the whole list l for every unique value, creating a O(N^2) loop.

Use a collections.Counter() object instead and count in O(N) time:

from collections import Counter

def sockMerchant(ar):
    counts = Counter(ar)
    return sum(count//2 for count in counts.values())

or even

def sockMerchant(ar):
    return sum(count//2 for count in Counter(ar).values())

if you insist on a single line.

Note that sum() doesn't mind a few 0 values here and there, so I removed the if test for single 'socks'. Also, I used the // floor division operator rather than turning the floating point result of dividing by 2 back into an integer.


问:
How to convert string into an IP Address?
I am using a function to adding . after every three characters inside the string. But how can i remove "0" in front of number.

```<code>-(NSString *)formatStringAsIpAddress:(NSString*)MacAddressWithoutColon
{
    NSMutableString *macAddressWithColon = [NSMutableString new];
    for (NSUInteger i = 0; i < [MacAddressWithoutColon length]; i++)
    {
        if (i > 0 && i % 3 == 0)
            [macAddressWithColon appendString:@"."];
        unichar c = [MacAddressWithoutColon characterAtIndex:i];
        [macAddressWithColon appendString:[[NSString alloc] initWithCharacters:&c length:1]];
    }
    return macAddressWithColon;
}
</code>```

If i have ip address 010.000.001.016
How can i set it up like 10.0.1.16? and if i have ip address 192.168.001.001? how to remove front 0's from IP address ?

答:
In Swift

```<code>let ip = "0125.052.000.10"
        let split = ip.components(separatedBy: ".")
        for number in split {
            if let isNumber = Int(number){
                print(isNumber) // add this isNumber into array which is shows without initial zeros.
            }
        }
</code>```

Finally join created array as String with dot Component

Body:
I am using a function to adding . after every three characters inside the string. But how can i remove "0" in front of number.

-(NSString *)formatStringAsIpAddress:(NSString*)MacAddressWithoutColon
{
    NSMutableString *macAddressWithColon = [NSMutableString new];
    for (NSUInteger i = 0; i < [MacAddressWithoutColon length]; i++)
    {
        if (i > 0 && i % 3 == 0)
            [macAddressWithColon appendString:@"."];
        unichar c = [MacAddressWithoutColon characterAtIndex:i];
        [macAddressWithColon appendString:[[NSString alloc] initWithCharacters:&c length:1]];
    }
    return macAddressWithColon;
}

If i have ip address 010.000.001.016
How can i set it up like 10.0.1.16? and if i have ip address 192.168.001.001? how to remove front 0's from IP address ?

Body:
In Swift

let ip = "0125.052.000.10"
        let split = ip.components(separatedBy: ".")
        for number in split {
            if let isNumber = Int(number){
                print(isNumber) // add this isNumber into array which is shows without initial zeros.
            }
        }

Finally join created array as String with dot Component


问:
Delete variables based on their duplicate consecutive values in pandas
Suppose I have a dataframe in python with index, variable and value columns. I would like to delete the rows in which the variable has the same value as a previous instant. In other words, I would like to get another dataframe with variables whose values are changing. Example,

Original dataframe:

```<code>Index  var  val
0      x1   10
1      x2   11
2      x1   10
3      x3   12
4      x1   13
5      x3   14
6      x2   12
7      x1   14
</code>```

Output table:

```<code>Index  var  val
0      x1   10
1      x2   11
2      x3   12
3      x1   13
4      x3   14
5      x2   12
6      x1   14
</code>```

What would be the most efficient way to do this?, imagine if I have a lot of variables (1000).

Cheers.

答:
pandas.transform to the rescue.

A good explanation of transform can be found here

```<code>duplicates = df.groupby('var')['val'].transform(lambda x: x.diff()==0)
df[~duplicates].reset_index(drop=True)
</code>```

duplicates

```<code>Index
0    False
1    False
2     True
3    False
4    False
5    False
6    False
7    False
</code>```

result

```<code>    var     val
0   x1  10
1   x2  11
2   x3  12
3   x1  13
4   x3  14
5   x2  12
6   x1  14
</code>```

Body:
Suppose I have a dataframe in python with index, variable and value columns. I would like to delete the rows in which the variable has the same value as a previous instant. In other words, I would like to get another dataframe with variables whose values are changing. Example,

Original dataframe:

Index  var  val
0      x1   10
1      x2   11
2      x1   10
3      x3   12
4      x1   13
5      x3   14
6      x2   12
7      x1   14

Output table:

Index  var  val
0      x1   10
1      x2   11
2      x3   12
3      x1   13
4      x3   14
5      x2   12
6      x1   14

What would be the most efficient way to do this?, imagine if I have a lot of variables (1000).

Cheers.

Body:
pandas.transform to the rescue.

A good explanation of transform can be found here

duplicates = df.groupby('var')['val'].transform(lambda x: x.diff()==0)
df[~duplicates].reset_index(drop=True)

duplicates

Index
0    False
1    False
2     True
3    False
4    False
5    False
6    False
7    False

result

    var     val
0   x1  10
1   x2  11
2   x3  12
3   x1  13
4   x3  14
5   x2  12
6   x1  14


问:
'User' object has no attribute 'allow_add_item'
I tried to extend my user model with the following profile model, but I get an Attribute Error

User' object has no attribute 'allow_add_item

My app model has the following class. Please tell me which corrections are needed.

```<code>class CustomUser(models.Model):
    user = models.OneToOneField(User, related_name="dcf_profile")
    phone = models.CharField(_('phone'), max_length=30, null=True, blank=True)
    receive_news = models.BooleanField(_('receive news'), default=True, db_index=True)
    def allow_add_item(self):
        if self.item_set.count() > settings.DCF_ITEM_PER_USER_LIMIT:
            return False
        else:
            return True

class Item(models.Model):
    slug = models.SlugField(blank=True, null=True, max_length=100)
    user = models.ForeignKey(CustomUser, on_delete=models.CASCADE)
    group = models.ForeignKey(Group, verbose_name=_('group'))
    title = models.CharField(_('title'), max_length=100)
    description = models.TextField(_('description'))

    price = models.DecimalField(_('price'), max_digits=10, decimal_places=2)
    phone = models.CharField(_('phone'), max_length=30)
    is_active = models.BooleanField(_('display'), default=True, db_index=True)
    updated = models.DateTimeField(_('updated'), auto_now=True, db_index=True)
    posted = models.DateTimeField(_('posted'), auto_now_add=True)

    def __unicode__(self):
        return self.title
    class Meta:
        verbose_name = _('item')
        verbose_name_plural = _('items')
        ordering = ('-updated', )
    def get_absolute_url(self):
        return reverse('item', kwargs={
            'pk': self.pk,
            'slug': self.slug
        })
    def get_title(self):
        return u'%s' % self.title
    def get_description(self):
        return u'%s' % self.description[:155]
    def get_keywords(self):
        # TODO need more optimal keywords selection
        return ",".join(set(self.description.split()))
    def get_related(self):
        # TODO Need more complicated related select
        return Item.objects.exclude(pk=self.pk)[:settings.DCF_RELATED_LIMIT]
    def save(self, *args, **kwargs):
        if self.slug is None:
            self.slug = slugify(unidecode(self.title))
        super(Item, self).save(*args, **kwargs)
</code>```

My views.py contains :

```<code>@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
    if not self.request.user.allow_add_item():
        messages.error(self.request, _('You have reached the limit!'))
        return redirect(reverse('my'))
</code>```

答:
Assuming that every user always has a CustomUser attached to it, what you need to change is self.request.user.allow_add_item() to self.request.user.customuser.allow_add_item()

your CustomUser does not replace the regular User, it expands on it through the one to one relationship.

Source: https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#extending-the-existing-user-model

Body:
I tried to extend my user model with the following profile model, but I get an Attribute Error

User' object has no attribute 'allow_add_item

My app model has the following class. Please tell me which corrections are needed.

class CustomUser(models.Model):
    user = models.OneToOneField(User, related_name="dcf_profile")
    phone = models.CharField(_('phone'), max_length=30, null=True, blank=True)
    receive_news = models.BooleanField(_('receive news'), default=True, db_index=True)
    def allow_add_item(self):
        if self.item_set.count() > settings.DCF_ITEM_PER_USER_LIMIT:
            return False
        else:
            return True

class Item(models.Model):
    slug = models.SlugField(blank=True, null=True, max_length=100)
    user = models.ForeignKey(CustomUser, on_delete=models.CASCADE)
    group = models.ForeignKey(Group, verbose_name=_('group'))
    title = models.CharField(_('title'), max_length=100)
    description = models.TextField(_('description'))

    price = models.DecimalField(_('price'), max_digits=10, decimal_places=2)
    phone = models.CharField(_('phone'), max_length=30)
    is_active = models.BooleanField(_('display'), default=True, db_index=True)
    updated = models.DateTimeField(_('updated'), auto_now=True, db_index=True)
    posted = models.DateTimeField(_('posted'), auto_now_add=True)

    def __unicode__(self):
        return self.title
    class Meta:
        verbose_name = _('item')
        verbose_name_plural = _('items')
        ordering = ('-updated', )
    def get_absolute_url(self):
        return reverse('item', kwargs={
            'pk': self.pk,
            'slug': self.slug
        })
    def get_title(self):
        return u'%s' % self.title
    def get_description(self):
        return u'%s' % self.description[:155]
    def get_keywords(self):
        # TODO need more optimal keywords selection
        return ",".join(set(self.description.split()))
    def get_related(self):
        # TODO Need more complicated related select
        return Item.objects.exclude(pk=self.pk)[:settings.DCF_RELATED_LIMIT]
    def save(self, *args, **kwargs):
        if self.slug is None:
            self.slug = slugify(unidecode(self.title))
        super(Item, self).save(*args, **kwargs)

My views.py contains :

@method_decorator(login_required)
def dispatch(self, *args, **kwargs):
    if not self.request.user.allow_add_item():
        messages.error(self.request, _('You have reached the limit!'))
        return redirect(reverse('my'))


问:
How to generate undirect edges by using the element of a Set in Spark
I'm trying to generate some undirect edges using the elements of a Set.Set(1, 4, 5), for example, and the result must be like this:

```<code>(1,4)
(1,5)
(4,5)
</code>```

Any solution will be much appreciated.

答:
Here is a simple example using subset and filter

```<code> val set = Set(1,4,5)

val result = set.subsets().map(_.toList).toList
</code>```

Output:

```<code>List(1, 4)
List(1, 5)
List(4, 5)
</code>```

If you want as a list of tuples then you can convert as

```<code>result.map(list => (list(0), list(1)))
</code>```

Output:

```<code>(1,4)
(1,5)
(4,5)
</code>```

Hope this helps!

Body:
I'm trying to generate some undirect edges using the elements of a Set.Set(1, 4, 5), for example, and the result must be like this:

(1,4)
(1,5)
(4,5)

Any solution will be much appreciated.

Body:
Here is a simple example using subset and filter

 val set = Set(1,4,5)

val result = set.subsets().map(_.toList).toList

Output:

List(1, 4)
List(1, 5)
List(4, 5)

If you want as a list of tuples then you can convert as

result.map(list => (list(0), list(1)))

Output:

(1,4)
(1,5)
(4,5)

Hope this helps!


问:
rails 3 redirect_to pass params to a named route
I am not finding much info on how to do this even though there are lots of suggestions on how to pass params to a redirect using hashs like this redirect_to

```<code>:action => 'something', :controller => 'something'
</code>```

in my app I have the following in the routes file

```<code>match 'profile'   =>  'User#show'
</code>```

my show action loos like this

```<code>def show
 @user = User.find(params[:user])
  @title = @user.first_name
end
</code>```

the redirect happens in the same user controller like this

```<code>   def register
    @title = "Registration"
    @user = User.new(params[:user])

    if @user.save
      redirect_to  '/profile'
    end
  end
</code>```

The question is in the register action when I redirect_to how do I pass along the params so I can grab that user from the database or better yet ... I already have a user variable so how do I pass along the user object to the show action?

-matthew

答:
First off, I'd name your route, to make using it easier:

```<code>match '/profile/:id' => 'users#show', :as => :profile
</code>```

You would then redirect to it, like so:

```<code>redirect_to profile_path(@user) # might have to use profile_path(:id => @user.id)
</code>```

Then to pull the user from the database:

```<code>def show
  @user = User.find(params[:id]) # :id comes from the route '/profile/:id'
  ...
end
</code>```

As an aside, if you use something like Devise for authentication, it provides you with a current_user method, and therefore you wont need to pass around the user's id:

```<code>match '/profile' => 'users#show', :as => :profile

redirect_to profile_path

def show
  @user = current_user
end
</code>```

Body:
I am not finding much info on how to do this even though there are lots of suggestions on how to pass params to a redirect using hashs like this redirect_to

:action => 'something', :controller => 'something'

in my app I have the following in the routes file

match 'profile'   =>  'User#show'

my show action loos like this

def show
 @user = User.find(params[:user])
  @title = @user.first_name
end

the redirect happens in the same user controller like this

   def register
    @title = "Registration"
    @user = User.new(params[:user])

    if @user.save
      redirect_to  '/profile'
    end
  end

The question is in the register action when I redirect_to how do I pass along the params so I can grab that user from the database or better yet ... I already have a user variable so how do I pass along the user object to the show action?

-matthew

Body:
First off, I'd name your route, to make using it easier:

match '/profile/:id' => 'users#show', :as => :profile

You would then redirect to it, like so:

redirect_to profile_path(@user) # might have to use profile_path(:id => @user.id)

Then to pull the user from the database:

def show
  @user = User.find(params[:id]) # :id comes from the route '/profile/:id'
  ...
end

As an aside, if you use something like Devise for authentication, it provides you with a current_user method, and therefore you wont need to pass around the user's id:

match '/profile' => 'users#show', :as => :profile

redirect_to profile_path

def show
  @user = current_user
end


问:
Search an item in a collection based on a dynamic key
I am new in NoSQL database and I want to find a way to search all item in the array based on a key, for example :
if we have this collection
database.collection("col")

```<code>{
    "_id" : ObjectId("59389f763007e086bc310c73"),
    "messageIds" : [
        1,
        2,
        3,
        4,
        5
    ],
    "participants" : {
        "59389e953007e086bc310c36" : 0,
        "59389ea63007e086bc310c41" : 0
    },
    "type" : "f"
}
</code>```

How to find all document that have the participants "59389e953007e086bc310c36" in node.js?

In MongoDb I can find out all items but

```<code>db.getCollection('conversations').find(
    {
        "participants.59389e953007e086bc310c36" :
            {
                $exists: true
            }
    })
</code>```

I can not do that in Node.js because it will not evaluate user_oid by value

```<code>user_oid = "participants."+user_oid;
    let criteria = {
        user_oid: { $exists: true }
    }

    console.log(criteria);
    database.collection(CONVERSATION_COLLECTION).find(criteria, (err,doc) => {
        console.log(doc);
        console.log;

    })
</code>```

答:
You can use <code>[]</code> to set field dynamically </p>

```<code>let criteria = {};
criteria['participants.'+user_oid] = { $exists: true };

console.log(criteria);
database.collection(CONVERSATION_COLLECTION).find(criteria, (err,doc) => {
    console.log(doc);
    console.log;
});
</code>```

Body:
I am new in NoSQL database and I want to find a way to search all item in the array based on a key, for example :
if we have this collection
database.collection("col")

{
    "_id" : ObjectId("59389f763007e086bc310c73"),
    "messageIds" : [
        1,
        2,
        3,
        4,
        5
    ],
    "participants" : {
        "59389e953007e086bc310c36" : 0,
        "59389ea63007e086bc310c41" : 0
    },
    "type" : "f"
}

How to find all document that have the participants "59389e953007e086bc310c36" in node.js?

In MongoDb I can find out all items but

db.getCollection('conversations').find(
    {
        "participants.59389e953007e086bc310c36" :
            {
                $exists: true
            }
    })

I can not do that in Node.js because it will not evaluate user_oid by value

user_oid = "participants."+user_oid;
    let criteria = {
        user_oid: { $exists: true }
    }

    console.log(criteria);
    database.collection(CONVERSATION_COLLECTION).find(criteria, (err,doc) => {
        console.log(doc);
        console.log;

    })

Body:
You can use [] to set field dynamically

let criteria = {};
criteria['participants.'+user_oid] = { $exists: true };

console.log(criteria);
database.collection(CONVERSATION_COLLECTION).find(criteria, (err,doc) => {
    console.log(doc);
    console.log;
});


问:
Neo4j CE failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@473c001d' was successfully initialized, but failed to start
I was trying on NEO4J CE 3.2.1. Worked fine for a couple of days. Unable to start it after downloading APOC jars. I see below error on starting.

```<code>Starting Neo4j failed: Component
'org.neo4j.server.database.LifecycleManagingDatabase@473c001d' was
successfully initialized, but failed to start. Please see the attached cause
exception "org.neo4j.kernel.configuration.Config.getParams()Ljava/util/Map;".
</code>```

Below is the log it generated on starting neo4j. I tried reinstalling as an update and by deleting the neo4j folder from Documents folder and resulted in same.

```2017-06-07 13:57:25.649+0000 WARN [o.n.i.p.PageCache] The dbms.memory.pagecache.size setting has not been configured. It is recommended that this setting is always explicitly configured, to ensure the system has a balanced configuration. Until then, a computed heuristic value of 6440222720 bytes will be used instead.
2017-06-07 13:57:25.722+0000 INFO [o.n.k.i.f.CommunityEditionModule] No locking implementation specified, defaulting to 'community'
2017-06-07 13:57:25.737+0000 INFO [o.n.k.AvailabilityGuard] Requirement makes database unavailable: Database available
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] --- INITIALIZED diagnostics START ---
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Neo4j Kernel properties:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.http.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.security.auth_enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.bolt.type=BOLT
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.directories.neo4j_home=C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.directories.import=import
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.https.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.http.type=HTTP
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.directories.database=C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.logs.http.enabled=false
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.https.type=HTTP
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.edition=community
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.bolt.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Diagnostics providers:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] org.neo4j.kernel.configuration.Config
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] org.neo4j.kernel.info.DiagnosticsManager
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] SYSTEM_MEMORY
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] JAVA_MEMORY
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] OPERATING_SYSTEM
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] JAVA_VIRTUAL_MACHINE
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] CLASSPATH
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] LIBRARY_PATH
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] SYSTEM_PROPERTIES
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] NETWORK
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] System memory information:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Total Physical memory: 15.43 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free Physical memory: 12.19 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Committed virtual memory: 711.41 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Total swap space: 30.85 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free swap space: 27.05 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] JVM memory information:
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free  memory: 265.88 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Total memory: 410.50 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Max   memory: 3.43 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Garbage Collector: PS Scavenge: [PS Eden Space, PS Survivor Space]
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Garbage Collector: PS MarkSweep: [PS Eden Space, PS Survivor Space, PS Old Gen]
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Code Cache (Non-heap memory): committed=10.94 MB, used=10.90 MB, max=240.00 MB, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Metaspace (Non-heap memory): committed=40.38 MB, used=38.85 MB, max=-1.00 B, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Compressed Class Space (Non-heap memory): committed=6.38 MB, used=6.02 MB, max=1.00 GB, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Eden Space (Heap memory): committed=134.00 MB, used=85.12 MB, max=1.20 GB, threshold=?
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Survivor Space (Heap memory): committed=39.50 MB, used=0.00 B, max=39.50 MB, threshold=?
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Old Gen (Heap memory): committed=237.00 MB, used=59.50 MB, max=2.57 GB, threshold=0.00 B
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Operating system information:
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Operating System: Windows 7; version: 6.1; arch: amd64; cpus: 4
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Process id: 8168@OF060R90L0SXV5
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Byte order: LITTLE_ENDIAN
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Local timezone: America/New_York
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] JVM information:
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Name: Java HotSpot(TM) 64-Bit Server VM
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Vendor: Oracle Corporation
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Version: 25.131-b11
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] JIT compiler: HotSpot 64-Bit Tiered Compilers
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Arguments: [-Dexe4j.semaphoreName=Local\c:_program_files_neo4j_ce_3.2.1_bin_neo4j-ce.exe, -Dexe4j.isInstall4j=true, -Dexe4j.moduleName=C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe, -Dexe4j.tempDir=, -Dexe4j.unextractedPosition=0, -Djava.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ActiveState\Perl64 v5.16.1\site\bin;C:\Program Files\ActiveState\Perl64 v5.16.1\bin\;C:\Program Files (x86)\Lenovo\Fingerprint Manager Pro\;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files\Apache Software Foundation\apache-maven-3.5.0\bin;C:\Program Files (x86)\GitExtensions\;C:\Program Files\gradle-3.5\bin;C:\Program Files\nodejs\;C:\Users\KON1299\AppData\Roaming\npm;c:\program files\java\jdk1.8.0_131\jre\bin, -Dexe4j.consoleCodepage=cp0, -Dinstall4j.launcherId=24, -Dinstall4j.swt=false]
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Java classpath:
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/plugins/apoc-3.1.3.7-all.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-desktop-3.2.1.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jaccess.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/bin/neo4j-desktop-3.2.1.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/access-bridge-64.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunmscapi.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\plugins\apoc-3.1.3.7-all.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/.install4j/i4jruntime.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunec.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/nashorn.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/localedata.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/zipfs.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\.install4j\i4jruntime.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/dnsns.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/cldrdata.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunjce_provider.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunpkcs11.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\classes
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] Library path:
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\bin
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\bin
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32\wbem
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32\WindowsPowerShell\v1.0
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\ActiveState\Perl64 v5.16.1\site\bin
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\ActiveState\Perl64 v5.16.1\bin
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files (x86)\Lenovo\Fingerprint Manager Pro
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Dell\Dell Data Protection\Encryption
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Apache Software Foundation\apache-maven-3.5.0\bin
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files (x86)\GitExtensions
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\gradle-3.5\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\nodejs
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Users\KON1299\AppData\Roaming\npm
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\jre\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] System.properties:
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.moduleName = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.semaphoreName = Local\c:_program_files_neo4j_ce_3.2.1_bin_neo4j-ce.exe
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] sun.boot.library.path = c:\program files\java\jdk1.8.0_131\jre\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.consoleCodepage = cp0
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] path.separator = ;
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] file.encoding.pkg = sun.io
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.country = US
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.script =
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] sun.os.patch.level = Service Pack 1
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.exeDir = C:\Program Files\Neo4j CE 3.2.1\bin\
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.dir = C:\Program Files\Neo4j CE 3.2.1\bin
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.variant =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.tempDir =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.jnu.encoding = Cp1252
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.nio.ch.bugLevel =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.udc.source = desktop
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.awt.enableExtraMouseButtons = true
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.launcherId = 24
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.management.compiler = HotSpot 64-Bit Tiered Compilers
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.isInstall4j = true
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.swt = false
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.home = C:\Users\KON1299
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.timezone = America/New_York
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] file.encoding = Cp1252
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.name = KON1299
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.java.command = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.arch.data.model = 64
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.launchName = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.language = en
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] awt.toolkit = sun.awt.windows.WToolkit
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.unextractedPosition = 0
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.appDir = C:\Program Files\Neo4j CE 3.2.1\
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] file.separator = \
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.io.unicode.encoding = UnicodeLittle
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.cpu.endian = little
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.desktop = windows
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.cpu.isalist = amd64
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] Network information:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Software Loopback Interface 1:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 127.0.0.1
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 0:0:0:0:0:0:0:1
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (SSTP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (L2TP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (PPTP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (PPPOE):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface RAS Async Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IKEv2):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:75fa:63ed:4bb1:57cc%eth3
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Teredo Tunneling Pseudo-Interface:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:0:ffff:ffff:fffe%net4
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 10.9.87.85
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:dc25:660:cf70:e2a8%wlan0
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Bluetooth Device (RFCOMM Protocol TDI):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Bluetooth Device (Personal Area Network):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:5163:a5aa:66f3:9480%eth4
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #3:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:ec5c:8cab:1712:4d96%eth5
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #4:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:0:5efe:a09:5755%net7
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #3-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #4-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Teredo Tunneling Pseudo-Interface-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Virtual WiFi Filter Driver-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Native WiFi Filter Driver-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] --- INITIALIZED diagnostics END ---
2017-06-07 13:57:25.955+0000 INFO [o.n.b.v.r.WorkerFactory] Bolt Server extension loaded.
2017-06-07 13:57:25.956+0000 INFO [o.n.b.v.r.WorkerFactory] Bolt enabled on 127.0.0.1:7687.
2017-06-07 13:57:25.969+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:StandardV3_2[v0.A.8] record format from store C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.976+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:StandardV3_2[v0.A.8] record format from store C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.976+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Format not configured. Selected format from the store: RecordFormat:StandardV3_2[v0.A.8]
2017-06-07 13:57:26.170+0000 INFO [o.n.k.i.a.i.IndexingService] IndexingService.init: indexes not specifically mentioned above are ONLINE
2017-06-07 13:57:27.073+0000 INFO [o.n.k.NeoStoreDataSource] No commits found after last check point (which is at LogPosition{logVersion=0, byteOffset=50892771})
2017-06-07 13:57:27.084+0000 INFO [o.n.k.i.a.i.IndexingService] IndexingService.start: indexes not specifically mentioned above are ONLINE
2017-06-07 13:57:27.106+0000 INFO [o.n.k.i.DatabaseHealth] Database health set to OK
2017-06-07 13:57:27.224+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting check pointing...
2017-06-07 13:57:27.225+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting store flush...
2017-06-07 13:57:27.317+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Store flush completed
2017-06-07 13:57:27.318+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting appending check point entry into the tx log...
2017-06-07 13:57:27.319+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Appending check point entry into the tx log completed
2017-06-07 13:57:27.321+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Check pointing completed
2017-06-07 13:57:27.321+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] Log Rotation [0]:  Starting log pruning.
2017-06-07 13:57:27.322+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] Log Rotation [0]:  Log pruning complete.
2017-06-07 13:57:27.417+0000 INFO [o.n.k.i.DiagnosticsManager] --- STOPPING diagnostics START ---
2017-06-07 13:57:27.417+0000 INFO [o.n.k.i.DiagnosticsManager] --- STOPPING diagnostics END ---
2017-06-07 13:57:27.418+0000 INFO [o.n.k.i.f.GraphDatabaseFacadeFactory] Shutdown started
```

答: Finally, I backed up my 'default.graphdb' folder, uninstalled Neo4J from my machine, reinstalled and replaced the new 'default.graphdb' with old one. Its working now.</p>

Body:
I was trying on NEO4J CE 3.2.1. Worked fine for a couple of days. Unable to start it after downloading APOC jars. I see below error on starting.

Starting Neo4j failed: Component
'org.neo4j.server.database.LifecycleManagingDatabase@473c001d' was
successfully initialized, but failed to start. Please see the attached cause
exception "org.neo4j.kernel.configuration.Config.getParams()Ljava/util/Map;".

Below is the log it generated on starting neo4j. I tried reinstalling as an update and by deleting the neo4j folder from Documents folder and resulted in same.

2017-06-07 13:57:25.649+0000 WARN [o.n.i.p.PageCache] The dbms.memory.pagecache.size setting has not been configured. It is recommended that this setting is always explicitly configured, to ensure the system has a balanced configuration. Until then, a computed heuristic value of 6440222720 bytes will be used instead.
2017-06-07 13:57:25.722+0000 INFO [o.n.k.i.f.CommunityEditionModule] No locking implementation specified, defaulting to 'community'
2017-06-07 13:57:25.737+0000 INFO [o.n.k.AvailabilityGuard] Requirement makes database unavailable: Database available
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] --- INITIALIZED diagnostics START ---
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Neo4j Kernel properties:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.http.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.security.auth_enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.bolt.type=BOLT
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.directories.neo4j_home=C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.directories.import=import
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.https.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.http.type=HTTP
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.directories.database=C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.logs.http.enabled=false
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.https.type=HTTP
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.edition=community
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] dbms.connector.bolt.enabled=true
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Diagnostics providers:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] org.neo4j.kernel.configuration.Config
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] org.neo4j.kernel.info.DiagnosticsManager
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] SYSTEM_MEMORY
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] JAVA_MEMORY
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] OPERATING_SYSTEM
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] JAVA_VIRTUAL_MACHINE
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] CLASSPATH
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] LIBRARY_PATH
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] SYSTEM_PROPERTIES
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] NETWORK
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] System memory information:
2017-06-07 13:57:25.738+0000 INFO [o.n.k.i.DiagnosticsManager] Total Physical memory: 15.43 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free Physical memory: 12.19 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Committed virtual memory: 711.41 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Total swap space: 30.85 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free swap space: 27.05 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] JVM memory information:
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Free  memory: 265.88 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Total memory: 410.50 MB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Max   memory: 3.43 GB
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Garbage Collector: PS Scavenge: [PS Eden Space, PS Survivor Space]
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Garbage Collector: PS MarkSweep: [PS Eden Space, PS Survivor Space, PS Old Gen]
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Code Cache (Non-heap memory): committed=10.94 MB, used=10.90 MB, max=240.00 MB, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Metaspace (Non-heap memory): committed=40.38 MB, used=38.85 MB, max=-1.00 B, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: Compressed Class Space (Non-heap memory): committed=6.38 MB, used=6.02 MB, max=1.00 GB, threshold=0.00 B
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Eden Space (Heap memory): committed=134.00 MB, used=85.12 MB, max=1.20 GB, threshold=?
2017-06-07 13:57:25.739+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Survivor Space (Heap memory): committed=39.50 MB, used=0.00 B, max=39.50 MB, threshold=?
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Memory Pool: PS Old Gen (Heap memory): committed=237.00 MB, used=59.50 MB, max=2.57 GB, threshold=0.00 B
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Operating system information:
2017-06-07 13:57:25.740+0000 INFO [o.n.k.i.DiagnosticsManager] Operating System: Windows 7; version: 6.1; arch: amd64; cpus: 4
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Process id: 8168@OF060R90L0SXV5
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Byte order: LITTLE_ENDIAN
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Local timezone: America/New_York
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] JVM information:
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Name: Java HotSpot(TM) 64-Bit Server VM
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Vendor: Oracle Corporation
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Version: 25.131-b11
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] JIT compiler: HotSpot 64-Bit Tiered Compilers
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] VM Arguments: [-Dexe4j.semaphoreName=Local\c:_program_files_neo4j_ce_3.2.1_bin_neo4j-ce.exe, -Dexe4j.isInstall4j=true, -Dexe4j.moduleName=C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe, -Dexe4j.tempDir=, -Dexe4j.unextractedPosition=0, -Djava.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ActiveState\Perl64 v5.16.1\site\bin;C:\Program Files\ActiveState\Perl64 v5.16.1\bin\;C:\Program Files (x86)\Lenovo\Fingerprint Manager Pro\;C:\Program Files\Dell\Dell Data Protection\Encryption\;C:\Program Files\Apache Software Foundation\apache-maven-3.5.0\bin;C:\Program Files (x86)\GitExtensions\;C:\Program Files\gradle-3.5\bin;C:\Program Files\nodejs\;C:\Users\KON1299\AppData\Roaming\npm;c:\program files\java\jdk1.8.0_131\jre\bin, -Dexe4j.consoleCodepage=cp0, -Dinstall4j.launcherId=24, -Dinstall4j.swt=false]
2017-06-07 13:57:25.741+0000 INFO [o.n.k.i.DiagnosticsManager] Java classpath:
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/plugins/apoc-3.1.3.7-all.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-desktop-3.2.1.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jaccess.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/bin/neo4j-desktop-3.2.1.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/access-bridge-64.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunmscapi.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\plugins\apoc-3.1.3.7-all.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.0] file:/C:/Program%20Files/Neo4j%20CE%203.2.1/.install4j/i4jruntime.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunec.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/nashorn.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/localedata.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/jfxrt.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/zipfs.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [classpath] C:\Program Files\Neo4j CE 3.2.1\.install4j\i4jruntime.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/dnsns.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/cldrdata.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunjce_provider.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [loader.1] file:/C:/Program%20Files/Java/jdk1.8.0_131/jre/lib/ext/sunpkcs11.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager]  [bootstrap] C:\Program Files\Java\jdk1.8.0_131\jre\classes
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] Library path:
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\bin
2017-06-07 13:57:25.746+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\bin
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32\wbem
2017-06-07 13:57:25.747+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Windows\System32\WindowsPowerShell\v1.0
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\ActiveState\Perl64 v5.16.1\site\bin
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\ActiveState\Perl64 v5.16.1\bin
2017-06-07 13:57:25.748+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files (x86)\Lenovo\Fingerprint Manager Pro
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Dell\Dell Data Protection\Encryption
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Apache Software Foundation\apache-maven-3.5.0\bin
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files (x86)\GitExtensions
2017-06-07 13:57:25.749+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\gradle-3.5\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\nodejs
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Users\KON1299\AppData\Roaming\npm
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] C:\Program Files\Java\jdk1.8.0_131\jre\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] System.properties:
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.moduleName = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.semaphoreName = Local\c:_program_files_neo4j_ce_3.2.1_bin_neo4j-ce.exe
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] sun.boot.library.path = c:\program files\java\jdk1.8.0_131\jre\bin
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.consoleCodepage = cp0
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] path.separator = ;
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] file.encoding.pkg = sun.io
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.country = US
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.script =
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] sun.os.patch.level = Service Pack 1
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.exeDir = C:\Program Files\Neo4j CE 3.2.1\bin\
2017-06-07 13:57:25.750+0000 INFO [o.n.k.i.DiagnosticsManager] user.dir = C:\Program Files\Neo4j CE 3.2.1\bin
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.variant =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.tempDir =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.jnu.encoding = Cp1252
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.nio.ch.bugLevel =
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] unsupported.dbms.udc.source = desktop
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.awt.enableExtraMouseButtons = true
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.launcherId = 24
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.management.compiler = HotSpot 64-Bit Tiered Compilers
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.isInstall4j = true
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.swt = false
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.home = C:\Users\KON1299
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.timezone = America/New_York
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] file.encoding = Cp1252
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.name = KON1299
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.java.command = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.arch.data.model = 64
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.launchName = C:\Program Files\Neo4j CE 3.2.1\bin\neo4j-ce.exe
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] user.language = en
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] awt.toolkit = sun.awt.windows.WToolkit
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] exe4j.unextractedPosition = 0
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] install4j.appDir = C:\Program Files\Neo4j CE 3.2.1\
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] file.separator = \
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.io.unicode.encoding = UnicodeLittle
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.cpu.endian = little
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.desktop = windows
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] sun.cpu.isalist = amd64
2017-06-07 13:57:25.751+0000 INFO [o.n.k.i.DiagnosticsManager] Network information:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Software Loopback Interface 1:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 127.0.0.1
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 0:0:0:0:0:0:0:1
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (SSTP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (L2TP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (PPTP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (PPPOE):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface RAS Async Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IKEv2):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:75fa:63ed:4bb1:57cc%eth3
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Teredo Tunneling Pseudo-Interface:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:0:ffff:ffff:fffe%net4
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: 10.9.87.85
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:dc25:660:cf70:e2a8%wlan0
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Bluetooth Device (RFCOMM Protocol TDI):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Bluetooth Device (Personal Area Network):
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:5163:a5aa:66f3:9480%eth4
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #3:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:ec5c:8cab:1712:4d96%eth5
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #4:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager]     address: fe80:0:0:0:0:5efe:a09:5755%net7
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #3-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Microsoft ISATAP Adapter #4-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Teredo Tunneling Pseudo-Interface-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Virtual WiFi Filter Driver-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Ethernet Connection I219-LM-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Juniper Network Connect Virtual Adapter-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IPv6)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.942+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (IP)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor)-Symantec Endpoint Protection Firewall-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface WAN Miniport (Network Monitor)-QoS Packet Scheduler-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-Native WiFi Filter Driver-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] Interface Intel(R) Dual Band Wireless-AC 8260-WFP LightWeight Filter-0000:
2017-06-07 13:57:25.943+0000 INFO [o.n.k.i.DiagnosticsManager] --- INITIALIZED diagnostics END ---
2017-06-07 13:57:25.955+0000 INFO [o.n.b.v.r.WorkerFactory] Bolt Server extension loaded.
2017-06-07 13:57:25.956+0000 INFO [o.n.b.v.r.WorkerFactory] Bolt enabled on 127.0.0.1:7687.
2017-06-07 13:57:25.969+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:StandardV3_2[v0.A.8] record format from store C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.976+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Selected RecordFormat:StandardV3_2[v0.A.8] record format from store C:\Users\KON1299\Documents\Neo4j\default.graphdb
2017-06-07 13:57:25.976+0000 INFO [o.n.k.i.s.f.RecordFormatSelector] Format not configured. Selected format from the store: RecordFormat:StandardV3_2[v0.A.8]
2017-06-07 13:57:26.170+0000 INFO [o.n.k.i.a.i.IndexingService] IndexingService.init: indexes not specifically mentioned above are ONLINE
2017-06-07 13:57:27.073+0000 INFO [o.n.k.NeoStoreDataSource] No commits found after last check point (which is at LogPosition{logVersion=0, byteOffset=50892771})
2017-06-07 13:57:27.084+0000 INFO [o.n.k.i.a.i.IndexingService] IndexingService.start: indexes not specifically mentioned above are ONLINE
2017-06-07 13:57:27.106+0000 INFO [o.n.k.i.DatabaseHealth] Database health set to OK
2017-06-07 13:57:27.224+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting check pointing...
2017-06-07 13:57:27.225+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting store flush...
2017-06-07 13:57:27.317+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Store flush completed
2017-06-07 13:57:27.318+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Starting appending check point entry into the tx log...
2017-06-07 13:57:27.319+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Appending check point entry into the tx log completed
2017-06-07 13:57:27.321+0000 INFO [o.n.k.i.t.l.c.CheckPointerImpl] Check Pointing triggered by database shutdown [58]:  Check pointing completed
2017-06-07 13:57:27.321+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] Log Rotation [0]:  Starting log pruning.
2017-06-07 13:57:27.322+0000 INFO [o.n.k.i.t.l.p.LogPruningImpl] Log Rotation [0]:  Log pruning complete.
2017-06-07 13:57:27.417+0000 INFO [o.n.k.i.DiagnosticsManager] --- STOPPING diagnostics START ---
2017-06-07 13:57:27.417+0000 INFO [o.n.k.i.DiagnosticsManager] --- STOPPING diagnostics END ---
2017-06-07 13:57:27.418+0000 INFO [o.n.k.i.f.GraphDatabaseFacadeFactory] Shutdown started


问:
Array of runtime size and frame size deduction
Code:

```<code>#include <stdio.h>

int main() {

    int size;
    scanf("%d", &size);
    int foo[size];

    for(int i = 0; i < size; i++)
            scanf("%d", &foo[i]);

    for(int i = 0; i < size; i++)
            printf("%d\n",foo[i]);

    return 0;
}
</code>```

How does this code compile? More specifically: how does the compiler know what is the size of frame main if size of local variable foois not known at compile time. I was expecting a compile error along the lines: "foo has incomplete type"

To have also tried the code and it also runs fine:

答:
In your code, you will first read data to specify size of array elements and then it will allocate that array on stack.

This approach is available from C99.

How compiler knows the size? It doesn't know. if you will enter too big value for size you may get stack overflow.

It will compile in a way that it will make sure to create as big push as required to put entire array to stack according to variable of size multiplied by size of single array element:

```<code>stack_size_usage = size * sizeof (int)
</code>```

In C89, this would reproduce error as all variables must be first initialized before any code can be executed.

I would instead use HEAP memory for this type of allocation.

```<code>#include <stdio.h>

int main() {
    int size;
    int* foo;
    scanf("%d", &size);

    foo = malloc(sizeof(*foo) * size);
    if (!foo) { /* failed, stop program */ }

    for(int i = 0; i < size; i++)
        scanf("%d", &foo[i]);

    for(int i = 0; i < size; i++)
        printf("%d\n",foo[i]);

    free(foo);
    return 0;
}
</code>```

Body:
Code:

#include <stdio.h>

int main() {

    int size;
    scanf("%d", &size);
    int foo[size];

    for(int i = 0; i < size; i++)
            scanf("%d", &foo[i]);

    for(int i = 0; i < size; i++)
            printf("%d\n",foo[i]);

    return 0;
}

How does this code compile? More specifically: how does the compiler know what is the size of frame main if size of local variable foois not known at compile time. I was expecting a compile error along the lines: "foo has incomplete type"

To have also tried the code and it also runs fine:

Body:
In your code, you will first read data to specify size of array elements and then it will allocate that array on stack.

This approach is available from C99.

How compiler knows the size? It doesn't know. if you will enter too big value for size you may get stack overflow.

It will compile in a way that it will make sure to create as big push as required to put entire array to stack according to variable of size multiplied by size of single array element:

stack_size_usage = size * sizeof (int)

In C89, this would reproduce error as all variables must be first initialized before any code can be executed.

I would instead use HEAP memory for this type of allocation.

#include <stdio.h>

int main() {
    int size;
    int* foo;
    scanf("%d", &size);

    foo = malloc(sizeof(*foo) * size);
    if (!foo) { /* failed, stop program */ }

    for(int i = 0; i < size; i++)
        scanf("%d", &foo[i]);

    for(int i = 0; i < size; i++)
        printf("%d\n",foo[i]);

    free(foo);
    return 0;
}


问:
Can I run an intermediate layer of a Docker image?
When I fetch a Docker image from a repository I see that it pulls a bunch of layers with some ids, but when I try to run them using docker run it tells me that it can't find it.

Can I run a certain layer of a Docker image that I can see through docker history < image_id >, like a paleontologist digging to find something interesting?

What I tried:

```<code>docker pull ruby
Using default tag: latest
latest: Pulling from library/ruby
693502eb7dfb: Already exists
081cd4bfd521: Already exists
5d2dc01312f3: Already exists
54a5f7da9a4f: Pulling fs layer
168cf3f33330: Pulling fs layer
021d84fef638: Pulling fs layer
168c3c107cd1: Waiting
f001b782a027: Waiting
</code>```

Then:

```<code>docker run --rm -it 5d2dc01312f3 bash
Unable to find image '5d2dc01312f3:latest' locally
</code>```

The question popped to me when I was pulling an image that I have build and published. I could see it clearly that one layer had almost 1.2 GB of size. It was the layer where I copied some files from the machine I used to build the image and on the next layer I cleaned and deleted some of those files as I was cleaning the image, but the total size of the image was about 1.5 GB which means that the big fat layer is of 1.2 GB is there. I just want to see if I can peek into that fat layer.

答:
Well, you can run an associated image if the final image was built locally on the same host machine. Each layer would have an intermediate image associated with it. You can show these layers and their associated images by running docker history <image-id>

Images that are pulled from a registry won't have that. In that case, docker history will show the value <missing> to indicate that there are no images associated with these layers. Hence there is nothing to run.

The digests on the output of docker pull are digests of the layers not intermediate images and can't be run.

Here is a typical scenario:

You build an image on a host: An intermediate image will be
created for each layer (this is done for docker build cache)

You push the image to a registry: Only the final image is pushed (which references all the layers), but none of the intermediate images are pushed.

You pull the image on another host: Only the final image is available now on that other Docker host.

You can read more about layers at explaining-docker-image-ids.

ContentLicense: CC BY-SA 4.0

Body:
When I fetch a Docker image from a repository I see that it pulls a bunch of layers with some ids, but when I try to run them using docker run it tells me that it can't find it.

Can I run a certain layer of a Docker image that I can see through docker history < image_id >, like a paleontologist digging to find something interesting?

What I tried:

docker pull ruby
Using default tag: latest
latest: Pulling from library/ruby
693502eb7dfb: Already exists
081cd4bfd521: Already exists
5d2dc01312f3: Already exists
54a5f7da9a4f: Pulling fs layer
168cf3f33330: Pulling fs layer
021d84fef638: Pulling fs layer
168c3c107cd1: Waiting
f001b782a027: Waiting

Then:

docker run --rm -it 5d2dc01312f3 bash
Unable to find image '5d2dc01312f3:latest' locally

The question popped to me when I was pulling an image that I have build and published. I could see it clearly that one layer had almost 1.2 GB of size. It was the layer where I copied some files from the machine I used to build the image and on the next layer I cleaned and deleted some of those files as I was cleaning the image, but the total size of the image was about 1.5 GB which means that the big fat layer is of 1.2 GB is there. I just want to see if I can peek into that fat layer.


问:
Stripe Sources sofort or giropay return url
I am trying to implement payment via Stripe Source (Sofort and Giropay). Everything works fine, except one point:

A user is redirected to the Sofort-Servers. When everything works fine and the user pays the money, he gets redirected to redirect[return_url] as expected. But if the user doesn't pay (for example he has no valid bankdata, or just cancels the payment), he also gets redirected to redirect[return_url].

The problem is, that I dont know at this point, if the payment was successfull or not. So I dont know what to show the user: Payment successfull or redirect to checkout page.

答:
Ok after contacting the support I found out that the right way to do it is the following:

The user gets redirected to you redirect[return_url], including the token from stripe. There you can check on your server, what the status of the payment is and show the user the right message


问:
s3 path printed incorrectly by spark excel reader
I am trying to read an excel sheet from Amazon S3 and here is the code snippet. But it fails saying file doesn't exist though its there , I checked there is a slash (/) missing from the path.

```<code>println(path)
val data = sqlContext.read.
    format("com.crealytics.spark.excel").
    option("location", s3path).
    option("useHeader", "true").
    option("treatEmptyValuesAsNulls", "true").
    option("inferSchema","true").
    option("addColorColumns", "true").
    load(path)
</code>```

path is correctly printed as :
s3a://AKIAJDDDDDDACNA:A6voquDDDDDqNOUsONDy@my-test/test.xlsx

But why the slash is missing when read by spark? Here is the error message :

```<code> Name: java.io.FileNotFoundException
    Message: s3a:/AKIAJYDDDDDDNA:A6DDDDDDDDDwqxkRqUQyXqqNOUsONDy@my-test/test.xlsx (No such file or directory)
    StackTrace:   at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(FileInputStream.java:212)
      at java.io.FileInputStream.<init>(FileInputStream.java:152)
      at java.io.FileInputStream.<init>(FileInputStream.java:104)
      at com.crealytics.spark.excel.ExcelRelation.<init>(ExcelRelation.scala:28)
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:31)
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:7)
      at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:345)
      at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:149)
      at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:122)
      at $anonfun$1.apply(<console>:46)
      at $anonfun$1.apply(<console>:46)
      at time(<console>:36)
</code>```

答:
Somehow the s3a URL is getting down to java.io.FileInputStream.open(), which only works with local filesystem files, not HDFS, S3, etc. You will need to track down what is happening there inside com.crealytics.spark.excel. Welcome to the word of using IDEs to work out what third party libraries get up to :) (IntelliJ IDEA is very good at that BTW, as it can go from a pasted stack trace to the specific source code)

Also: don't put your secrets in your URLs, that's dangerous & something which may get disabled in future for security reasons. Set spark.hadoop.fs.s3a.access.key and spark.hadoop.fs.s3a.secret.key in your spark-defaults.conf.

Body:
I am trying to read an excel sheet from Amazon S3 and here is the code snippet. But it fails saying file doesn't exist though its there , I checked there is a slash (/) missing from the path.

println(path)
val data = sqlContext.read.
    format("com.crealytics.spark.excel").
    option("location", s3path).
    option("useHeader", "true").
    option("treatEmptyValuesAsNulls", "true").
    option("inferSchema","true").
    option("addColorColumns", "true").
    load(path)

path is correctly printed as :
s3a://AKIAJDDDDDDACNA:A6voquDDDDDqNOUsONDy@my-test/test.xlsx

But why the slash is missing when read by spark? Here is the error message :

 Name: java.io.FileNotFoundException
    Message: s3a:/AKIAJYDDDDDDNA:A6DDDDDDDDDwqxkRqUQyXqqNOUsONDy@my-test/test.xlsx (No such file or directory)
    StackTrace:   at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(FileInputStream.java:212)
      at java.io.FileInputStream.<init>(FileInputStream.java:152)
      at java.io.FileInputStream.<init>(FileInputStream.java:104)
      at com.crealytics.spark.excel.ExcelRelation.<init>(ExcelRelation.scala:28)
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:31)
      at com.crealytics.spark.excel.DefaultSource.createRelation(DefaultSource.scala:7)
      at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:345)
      at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:149)
      at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:122)
      at $anonfun$1.apply(<console>:46)
      at $anonfun$1.apply(<console>:46)
      at time(<console>:36)


问:
Background Geolocation For Ionic2
i'm trying to use background geolocation , i found this link :
[a link] https://www.joshmorony.com/adding-background-geolocation-t…/  .
 "Geoposition is not knwon " type script error .

ionic version :2.2.1 , node version :6.10.0 , cordova version:6.5.0 .any suggestion for ionic2 geoloca

location-tracker :

import { Injectable, NgZone } from '@angular/core';
import { Geolocation,Geoposition, BackgroundGeolocation } from 'ionic-native';
import 'rxjs/add/operator/filter';

@Injectable()
export class LocationTracker {

  public watch: any;
  public lat: number = 0;
  public lng: number = 0;

  constructor(public zone: NgZone) {

  }

  startTracking() {
 // Background Tracking

  let config = {
    desiredAccuracy: 0,
    stationaryRadius: 20,
    distanceFilter: 10,
    debug: true,
    interval: 2000
  };

  BackgroundGeolocation.configure((location) => {

    console.log('BackgroundGeolocation:  ' + location.latitude + ',' + location.longitude);

    // Run update inside of Angular's zone
    this.zone.run(() => {
      this.lat = location.latitude;
      this.lng = location.longitude;
    });

   }, (err) => {

    console.log(err);

  }, config);

  // Turn ON the background-geolocation system.
  BackgroundGeolocation.start();

  // Foreground Tracking

  let options = {
    frequency: 3000,
    enableHighAccuracy: true
  };

  this.watch = Geolocation.watchPosition(options).filter((p: any) => p.code === undefined).subscribe((position: Geoposition ) => {

    console.log(position);

    // Run update inside of Angular's zone
    this.zone.run(() => {
      this.lat = position.coords.latitude;
      this.lng = position.coords.longitude;
    });

  });

  }

  stopTracking() {

 console.log('stopTracking');

  BackgroundGeolocation.finish();
  this.watch.unsubscribe();

  }

}```

tion

答:
Assuming that you have already run the following commands;

```<code>ionic plugin add cordova-plugin-geolocation
npm install --save @ionic-native/geolocation
ionic plugin add cordova-plugin-mauron85-background-geolocation
npm install --save @ionic-native/background-geolocation
</code>```

try importing the plugins as follows:

```<code>import { BackgroundGeolocation } from '@ionic-native/background-geolocation';
import { Geolocation, Geoposition } from '@ionic-native/geolocation';
</code>```

Title: Background Geolocation For Ionic2

Body:
i'm trying to use background geolocation , i found this link :
[a link] https://www.joshmorony.com/adding-background-geolocation-t…/  .
 "Geoposition is not knwon " type script error .

ionic version :2.2.1 , node version :6.10.0 , cordova version:6.5.0 .any suggestion for ionic2 geoloca

location-tracker :

import { Injectable, NgZone } from '@angular/core';
import { Geolocation,Geoposition, BackgroundGeolocation } from 'ionic-native';
import 'rxjs/add/operator/filter';

@Injectable()
export class LocationTracker {

  public watch: any;
  public lat: number = 0;
  public lng: number = 0;

  constructor(public zone: NgZone) {

  }

  startTracking() {
 // Background Tracking

  let config = {
    desiredAccuracy: 0,
    stationaryRadius: 20,
    distanceFilter: 10,
    debug: true,
    interval: 2000
  };

  BackgroundGeolocation.configure((location) => {

    console.log('BackgroundGeolocation:  ' + location.latitude + ',' + location.longitude);

    // Run update inside of Angular's zone
    this.zone.run(() => {
      this.lat = location.latitude;
      this.lng = location.longitude;
    });

   }, (err) => {

    console.log(err);

  }, config);

  // Turn ON the background-geolocation system.
  BackgroundGeolocation.start();

  // Foreground Tracking

  let options = {
    frequency: 3000,
    enableHighAccuracy: true
  };

  this.watch = Geolocation.watchPosition(options).filter((p: any) => p.code === undefined).subscribe((position: Geoposition ) => {

    console.log(position);

    // Run update inside of Angular's zone
    this.zone.run(() => {
      this.lat = position.coords.latitude;
      this.lng = position.coords.longitude;
    });

  });

  }

  stopTracking() {

 console.log('stopTracking');

  BackgroundGeolocation.finish();
  this.watch.unsubscribe();

  }

}

tion

Body:
Assuming that you have already run the following commands;

ionic plugin add cordova-plugin-geolocation
npm install --save @ionic-native/geolocation
ionic plugin add cordova-plugin-mauron85-background-geolocation
npm install --save @ionic-native/background-geolocation

try importing the plugins as follows:

import { BackgroundGeolocation } from '@ionic-native/background-geolocation';
import { Geolocation, Geoposition } from '@ionic-native/geolocation';